]> git.proxmox.com Git - mirror_edk2.git/commit
MpInitLib: Move the Above1Mb vector allocation to MpInitLibInitialize
authorRay Ni <ray.ni@intel.com>
Sun, 8 May 2022 05:22:49 +0000 (13:22 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 10 Jun 2022 12:15:49 +0000 (12:15 +0000)
commitccc269756f773d35aab67ccb935fa9548f30cff3
tree9e8d7b9463e9f506b9dbdc92bdb19834d14d9a04
parent283ab9437aadc5c70a9df8bd751954045250e024
MpInitLib: Move the Above1Mb vector allocation to MpInitLibInitialize

The AP vector consists of 2 parts:
1. the initial 16-bit code that should be under 1MB and page aligned.
2. the 32-bit/64-bit code that can be anywhere in the memory with any
   alignment.

The need of part #2 is because the memory under 1MB is temporary
"stolen" for use and will "give" back after all AP wake up. The range
of memory is not marked as code page in page table. CPU may trigger
exception as soon as NX is enabled.

The part #2 memory allocation can be done in the MpInitLibInitialize.

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