audk/UefiCpuPkg/Library/MpInitLib/X64
Lendacky, Thomas via groups.io 67a6f414aa UefiCpuPkg/MpInitLib: Ensure SEV-SNP VMSA allocations are not 2MB aligned
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4353

Due to AMD erratum #1467, an SEV-SNP VMSA should not be 2MB aligned. To
work around this issue, allocate two pages instead of one. Because of the
way that page allocation is implemented, always try to use the second
page. If the second page is not 2MB aligned, free the first page and use
the second page. If the second page is 2MB aligned, free the second page
and use the first page. Freeing in this way reduces holes in the memory
map.

Fixes: 06544455d0 ("UefiCpuPkg/MpInitLib: Use SEV-SNP AP Creation ...")
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>

Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Ray Ni <ray.ni@intel.com>
2023-04-01 03:15:51 +00:00
..
AmdSev.c UefiCpuPkg/MpInitLib: Ensure SEV-SNP VMSA allocations are not 2MB aligned 2023-04-01 03:15:51 +00:00
AmdSev.nasm UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm 2023-03-07 08:14:59 +00:00
CreatePageTable.c UefiCpuPkg/CpuPageTableLib: Add OUTPUT IsModified parameter. 2023-03-27 08:21:58 +00:00
MpFuncs.nasm UefiCpuPkg: Solve that stack top address is not mapped in pagetable 2023-03-27 05:08:15 +00:00