summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/PlatformPei/MemDetect.c
diff options
context:
space:
mode:
authorBrijesh Singh via groups.io <brijesh.singh=amd.com@groups.io>2021-12-09 11:27:58 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-09 06:28:10 +0000
commitea3a12d9706dd405d5eb96901be31de28c3134af (patch)
treea4335b91c0129b03d7cd678ad5f6b0d10b75023a /OvmfPkg/PlatformPei/MemDetect.c
parentb7b88720312be7daa5a7d955f7b5816a41e87485 (diff)
downloadedk2-ea3a12d9706dd405d5eb96901be31de28c3134af.tar.gz
edk2-ea3a12d9706dd405d5eb96901be31de28c3134af.tar.bz2
edk2-ea3a12d9706dd405d5eb96901be31de28c3134af.zip
OvmfPkg/PlatformPei: mark cpuid and secrets memory reserved in EFI map
When SEV-SNP is active, the CPUID and Secrets memory range contains the information that is used during the VM boot. The content need to be persist across the kexec boot. Mark the memory range as Reserved in the EFI map so that guest OS or firmware does not use the range as a system RAM. Cc: Michael Roth <michael.roth@amd.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Min Xu <min.m.xu@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Erdem Aktas <erdemaktas@google.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Diffstat (limited to 'OvmfPkg/PlatformPei/MemDetect.c')
-rw-r--r--OvmfPkg/PlatformPei/MemDetect.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetect.c
index 3f59a1ac79..738ed0c208 100644
--- a/OvmfPkg/PlatformPei/MemDetect.c
+++ b/OvmfPkg/PlatformPei/MemDetect.c
@@ -871,6 +871,8 @@ InitializeRamRegions (
{
QemuInitializeRam ();
+ SevInitializeRam ();
+
if (mS3Supported && (mBootMode != BOOT_ON_S3_RESUME)) {
//
// This is the memory range that will be used for PEI on S3 resume