From 7b6327ff03bb4436261ffad246ba3a14de10391f Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Fri, 8 May 2020 14:16:51 +0200 Subject: [PATCH] OvmfPkg/PlatformPei: increase memory type info defaults MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Any new OVMF binary (containing commit d42fdd6f8384, and built with SMM_REQUIRE) is likely to reboot during its first boot, regardless of whether the variable store is logically empty, or it contains a MemoryTypeInformation variable from an earlier OVMF binary. This "reboot on first boot after OVMF upgrade" occurs despite having eliminated BS Code/Data tracking in earlier parts of this series. Meaning that we've outgrown the bins of those memory types too that matter for SMM security. Eliminating said reboot will make an upgrade to edk2-stable202005 more comfortable for users. Increase the defaults empirically. (The total doesn't exceed 3MB by much.) Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Philippe Mathieu-Daudé Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2706 Signed-off-by: Laszlo Ersek Message-Id: <20200508121651.16045-5-lersek@redhat.com> Reviewed-by: Ard Biesheuvel --- OvmfPkg/OvmfPkgIa32.dsc | 10 +++++----- OvmfPkg/OvmfPkgIa32X64.dsc | 10 +++++----- OvmfPkg/OvmfPkgX64.dsc | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index c3081e3299..d0df9cbbfb 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -542,11 +542,11 @@ # of BIN hints that made sense at a particular time, for some (now likely # unknown) workloads / boot paths. # - gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS|0x4 - gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory|0x8 - gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType|0x4 - gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|0x30 - gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|0x24 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS|0x80 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory|0x10 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType|0x80 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|0x100 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|0x100 # # Network Pcds diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index cb0c10e6f4..b3ae62fee9 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -547,11 +547,11 @@ # of BIN hints that made sense at a particular time, for some (now likely # unknown) workloads / boot paths. # - gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS|0x4 - gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory|0x8 - gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType|0x4 - gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|0x30 - gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|0x24 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS|0x80 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory|0x10 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType|0x80 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|0x100 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|0x100 [PcdsFixedAtBuild.X64] # diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index c1eaf6cdb2..f7fe75ebf5 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -546,11 +546,11 @@ # of BIN hints that made sense at a particular time, for some (now likely # unknown) workloads / boot paths. # - gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS|0x4 - gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory|0x8 - gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType|0x4 - gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|0x30 - gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|0x24 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS|0x80 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory|0x10 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType|0x80 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|0x100 + gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|0x100 # # Network Pcds -- 2.39.2