Skip to content
Commit 67a6f414 authored by Lendacky, Thomas via groups.io's avatar Lendacky, Thomas via groups.io Committed by mergify[bot]
Browse files

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: 06544455 ("UefiCpuPkg/MpInitLib: Use SEV-SNP AP Creation ...")
Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>

Acked-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Acked-by: default avatarRay Ni <ray.ni@intel.com>
parent 3323359a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment