From: "Ni, Ray" <ray.ni@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"ardb@kernel.org" <ardb@kernel.org>,
"Xie, Yuanhao" <yuanhao.xie@intel.com>
Subject: Re: [edk2-devel] [PATCH] UefiCpuPkg:Fixed AsmRelocateApLoopStart and ensure allocated memory <4GB
Date: Fri, 6 Jan 2023 04:12:02 +0000 [thread overview]
Message-ID: <MN6PR11MB8244DC949FD8DAB17FDEB3028CFB9@MN6PR11MB8244.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CAMj1kXEU892BYLJCFmpxGUdUnuo1V5gYsATLsroFbK1PLGWdYw@mail.gmail.com>
> > @@ -555,19 +556,25 @@ InitMpGlobalData (
> > )
> > );
> >
> > - mReservedTopOfApStack = (UINTN)AllocateReservedPages (EFI_SIZE_TO_PAGES (ApSafeBufferSize));
> > - ASSERT (mReservedTopOfApStack != 0);
> > - ASSERT ((mReservedTopOfApStack & (UINTN)(CPU_STACK_ALIGNMENT - 1)) == 0);
> > - ASSERT ((AP_SAFE_STACK_SIZE & (CPU_STACK_ALIGNMENT - 1)) == 0);
> > -
> > - mReservedApLoopFunc = (VOID *)(mReservedTopOfApStack + CpuMpData->CpuCount * AP_SAFE_STACK_SIZE);
> > - if (StandardSignatureIsAuthenticAMD ()) {
> > + if (StandardSignatureIsAuthenticAMD () && (sizeof (UINTN) == sizeof (UINT64))) {
>
> This looks the wrong way around.
Ard,
Only AMD X64 (including SEV and without SEV) runs the code that switches to 32bit paging disabled mode.
Intel X64 runs the code that stays at 64bit paging mode. So no need for <4G memory.
All IA32 CPUs (including intel and AMD) stays at 32bit paging disabled mode. The AllocateReservedPages() call
should not return a memory above 4GB in 32bit env.
Did I miss anything?
Thanks,
Ray
next prev parent reply other threads:[~2023-01-06 4:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-05 6:21 [PATCH] UefiCpuPkg:Fixed AsmRelocateApLoopStart and ensure allocated memory <4GB Yuanhao Xie
2023-01-05 6:28 ` [edk2-devel] " Ni, Ray
2023-01-05 7:19 ` Yuanhao Xie
2023-01-05 9:38 ` Ard Biesheuvel
2023-01-06 4:12 ` Ni, Ray [this message]
2023-01-06 6:42 ` Laszlo Ersek
2023-01-06 8:03 ` Gerd Hoffmann
2023-01-06 8:30 ` Laszlo Ersek
2023-01-06 8:39 ` Ni, Ray
2023-01-06 9:19 ` Laszlo Ersek
2023-01-06 9:45 ` Ni, Ray
2023-01-06 10:35 ` Laszlo Ersek
2023-01-06 11:14 ` Gerd Hoffmann
2023-01-06 12:20 ` Laszlo Ersek
2023-01-06 8:43 ` Yuanhao Xie
2023-01-06 9:04 ` Laszlo Ersek
2023-01-06 15:42 ` Lendacky, Thomas
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=MN6PR11MB8244DC949FD8DAB17FDEB3028CFB9@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