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 <[email protected]> 
Sent: Tuesday, February 21, 2023 5:26 PM
To: [email protected]; Xie, Yuanhao <[email protected]>
Cc: Dong, Guo <[email protected]>; Ni, Ray <[email protected]>; Rhodes, Sean 
<[email protected]>; Lu, James <[email protected]>; Guo, Gua 
<[email protected]>
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?

Otherwise the patch looks good to me.

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100453): https://edk2.groups.io/g/devel/message/100453
Mute This Topic: https://groups.io/mt/97081030/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to