From: "Ard Biesheuvel" <ardb@kernel.org>
To: devel@edk2.groups.io, yuanhao.xie@intel.com
Cc: Gerd Hoffmann <kraxel@redhat.com>,
"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>
Subject: Re: [edk2-devel] [Patch V2 2/5] UefiCpuPkg: Contiguous memory allocation and code clean-up.
Date: Thu, 23 Feb 2023 14:32:45 +0100 [thread overview]
Message-ID: <CAMj1kXGtGtYQwVRW7GbzmM310Gw0k+yad_8fjorbyLoXUAm78w@mail.gmail.com> (raw)
In-Reply-To: <CO1PR11MB502666D81C291A224DD7547CF0AB9@CO1PR11MB5026.namprd11.prod.outlook.com>
On Thu, 23 Feb 2023 at 06:53, Yuanhao Xie <yuanhao.xie@intel.com> wrote:
>
> Hi,
>
> Set "Address = BASE_4GB - 1" first is to ensure the maximum address value is 4GB, since APs will be switched to 32 bit before OS, I mean in the original implementation.
> By the way, in patch 5, only SEV-ES processor keep this limitation, since for the generic processors they keep in 64 bit before handing off the process to OS, and for those 32-bit processors, they don't need this limitation.
>
> Regards,
> Yuanhao
> -----Original Message-----
> From: Gerd Hoffmann <kraxel@redhat.com>
> Sent: Tuesday, February 21, 2023 5:26 PM
> To: devel@edk2.groups.io; Xie, Yuanhao <yuanhao.xie@intel.com>
> 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>
> Subject: Re: [edk2-devel] [Patch V2 2/5] UefiCpuPkg: Contiguous memory allocation and code clean-up.
>
> Hi,
>
> > + Address = BASE_4GB - 1;
>
> Why do you set Address here ...
>
> > + Status = gBS->AllocatePages (
> > + AllocateMaxAddress,
> > + EfiReservedMemoryType,
> > + StackPages+FuncPages,
> > + &Address
> > + );
>
> ... when it is overridden here anyway?
>
AllocateMaxAddress uses the provided address as the upper bound for
the allocation.
next prev parent reply other threads:[~2023-02-23 13:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-20 5:20 [PATCH 0/5] Put APs in 64 bit mode before handoff to OS Yuanhao Xie
2023-02-20 5:20 ` [Patch V2 1/5] UefiCpuPkg: Duplicate RelocateApLoop for the processors with SEV-ES Yuanhao Xie
2023-02-21 9:22 ` Gerd Hoffmann
2023-02-23 5:54 ` Yuanhao Xie
2023-02-20 5:20 ` [Patch V2 2/5] UefiCpuPkg: Contiguous memory allocation and code clean-up Yuanhao Xie
2023-02-21 9:26 ` [edk2-devel] " Gerd Hoffmann
2023-02-23 5:53 ` Yuanhao Xie
2023-02-23 13:32 ` Ard Biesheuvel [this message]
2023-02-20 5:20 ` [Patch V2 3/5] OvmfPkg: Add CpuPageTableLib required by MpInitLib Yuanhao Xie
2023-02-20 5:20 ` [Patch V2 4/5] UefiPayloadPkg: " Yuanhao Xie
2023-02-20 5:20 ` [Patch V2 5/5] UefiCpuPkg: Put APs in 64 bit mode before handoff to OS Yuanhao Xie
2023-02-20 14:11 ` Lendacky, Thomas
2023-02-20 17:43 ` [edk2-devel] " Yuanhao Xie
2023-02-20 18:05 ` 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=CAMj1kXGtGtYQwVRW7GbzmM310Gw0k+yad_8fjorbyLoXUAm78w@mail.gmail.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