From: "Ni, Ray" <ray.ni@intel.com>
To: "Xie, Yuanhao" <yuanhao.xie@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Dong, Guo" <guo.dong@intel.com>,
"Rhodes, Sean" <sean@starlabs.systems>,
"Lu, James" <james.lu@intel.com>, "Guo, Gua" <gua.guo@intel.com>,
"Kuo, Ted" <ted.kuo@intel.com>
Subject: Re: [PATCH] UefiCpuPkg: Solve that stack top address is not mapped in pagetable
Date: Thu, 23 Mar 2023 03:26:43 +0000 [thread overview]
Message-ID: <MN6PR11MB8244E61983BE9904883882758C879@MN6PR11MB8244.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230321072959.881-1-yuanhao.xie@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
> -----Original Message-----
> From: Xie, Yuanhao <yuanhao.xie@intel.com>
> Sent: Tuesday, March 21, 2023 3:30 PM
> To: devel@edk2.groups.io
> Cc: Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Rhodes,
> Sean <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo, Gua
> <gua.guo@intel.com>; Kuo, Ted <ted.kuo@intel.com>
> Subject: [PATCH] UefiCpuPkg: Solve that stack top address is not mapped in
> pagetable
>
> 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 <guo.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Sean Rhodes <sean@starlabs.systems>
> Cc: James Lu <james.lu@intel.com>
> Cc: Gua Guo <gua.guo@intel.com>
> Signed-off-by: Ted Kuo <ted.kuo@intel.com>
> ---
> 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
prev parent reply other threads:[~2023-03-23 3:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-21 7:29 [PATCH] UefiCpuPkg: Solve that stack top address is not mapped in pagetable Yuanhao Xie
2023-03-23 3:26 ` Ni, Ray [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MN6PR11MB8244E61983BE9904883882758C879@MN6PR11MB8244.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox