]> git.proxmox.com Git - mirror_edk2.git/commit
MpInitLib: Only allocate below 1MB memory for 16bit code
authorRay Ni <ray.ni@intel.com>
Sat, 7 May 2022 14:25:19 +0000 (22:25 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 10 Jun 2022 12:15:49 +0000 (12:15 +0000)
commit283ab9437aadc5c70a9df8bd751954045250e024
tree7de26ef9e4b059ed7635d7d698f0b698ab9dd1f3
parentb4d7b9d2b50f12d34f00afc7c7b4710778209521
MpInitLib: Only allocate below 1MB memory for 16bit code

Today's implementation allocates below 1MB memory for the 16bit, 32bit
and 64bit code.

But it's not necessary since now the 32bit and 64bit code run at high
memory no matter in PEI and DXE phase.

The patch simplifies the logic to remove the code that handles the
case when WakeupBufferHigh is 0.
It also reduce the memory foot print under 1MB by allocating
memory for 16bit code only.

MP_CPU_EXCHANGE_INFO is still under 1MB which is immediate
after the 16bit code.

Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
UefiCpuPkg/Library/MpInitLib/AmdSev.c
UefiCpuPkg/Library/MpInitLib/MpEqu.inc
UefiCpuPkg/Library/MpInitLib/MpLib.c