From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web11.7304.1679383819063383511 for ; Tue, 21 Mar 2023 00:30:19 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=PMde/rep; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: yuanhao.xie@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679383819; x=1710919819; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ZiEczgrTKjfNKUnUIZ9maWQKCUGem/KW8/UzwKcXDkM=; b=PMde/repI1TX1W7ai+qlL1/pG7iIYd5lbncX6e1i45n+AlWQHY2mw4yN g/ULArLGabgQ06T0ZyL7kn8EktYKbE22Pcsp52rjOsWnlwS49q/v8FZxK Ne1lc7W4YdfMABzPPDRexF3u/uWkFU+HXq/2vCf3RgBGLjg6TZ7ch5Ai4 x5vtrLUjyFauPgrHQ4ufr+XT4qjwsJJYDfEZepnmJ99X9GTQgSyLMVgpO E8AXrkUrSAQnLgWuUwQFO7DxLLWsOI5/vHA4ioqXd3wKNQTQFrNJ6wbDS xmnNMI5OxgK5cwoctmv88/SyUkX7Tzch4ITt5Zwz5PP7Wb9UmnS4QU5Of Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10655"; a="338905935" X-IronPort-AV: E=Sophos;i="5.98,278,1673942400"; d="scan'208";a="338905935" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2023 00:30:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10655"; a="824819059" X-IronPort-AV: E=Sophos;i="5.98,278,1673942400"; d="scan'208";a="824819059" Received: from xieyuanh-mobl.ccr.corp.intel.com ([10.238.0.208]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2023 00:30:17 -0700 From: "Yuanhao Xie" To: devel@edk2.groups.io Cc: Guo Dong , Ray Ni , Sean Rhodes , James Lu , Gua Guo , Ted Kuo Subject: [PATCH] UefiCpuPkg: Solve that stack top address is not mapped in pagetable Date: Tue, 21 Mar 2023 15:29:59 +0800 Message-Id: <20230321072959.881-1-yuanhao.xie@intel.com> X-Mailer: git-send-email 2.39.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit For the case CPU logic index is 0, RSP points to the very top of all AP stacks. That address is not mapped in page table. Cc: Guo Dong Cc: Ray Ni Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo Signed-off-by: Ted Kuo --- UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 1 + 1 file changed, 1 insertion(+) diff --git a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm index 9ebe31795b..5bcdf7726b 100644 --- a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm +++ b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm @@ -315,6 +315,7 @@ MwaitCheckGeneric: MwaitLoopGeneric: cli mov rax, rsp ; Set Monitor Address + sub eax, 8 ; To ensure the monitor address is in the page table xor ecx, ecx ; ecx = 0 xor edx, edx ; edx = 0 monitor -- 2.39.1.windows.1