From 912718d8c7c783c310a34f6a2dd816c359d9624a Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Thu, 12 Mar 2020 23:35:54 +0100 Subject: [PATCH] OvmfPkg/PlatformPei: explain EFI_MEMORY_TYPE_INFORMATION page counts MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Add a code comment that explains the nature of the NumberOfPages field values. Including this kind of historical information was suggested by Leif in (alternative link: ). Right now, the most recent commit updating the page counts has been commit 991d95636264 ("[...] Update default memory type information to reduce EFI Memory Map fragmentation.", 2010-07-16). Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Leif Lindholm Cc: Philippe Mathieu-Daudé Suggested-by: Leif Lindholm Signed-off-by: Laszlo Ersek Message-Id: <20200312223555.29267-2-lersek@redhat.com> Reviewed-by: Leif Lindholm --- OvmfPkg/PlatformPei/MemTypeInfo.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OvmfPkg/PlatformPei/MemTypeInfo.c b/OvmfPkg/PlatformPei/MemTypeInfo.c index c709236a45..863c6f3826 100644 --- a/OvmfPkg/PlatformPei/MemTypeInfo.c +++ b/OvmfPkg/PlatformPei/MemTypeInfo.c @@ -19,6 +19,12 @@ #include "Platform.h" +// +// The NumberOfPages values below are ad-hoc. They are updated sporadically at +// best (please refer to git-blame for past updates). The values capture a set +// of BIN hints that made sense at a particular time, for some (now likely +// unknown) workloads / boot paths. +// STATIC EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] = { { EfiACPIMemoryNVS, 0x004 }, { EfiACPIReclaimMemory, 0x008 }, -- 2.39.5