summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Core/Dxe/DxeMain.h
diff options
context:
space:
mode:
authorMichael D Kinney <michael.d.kinney@intel.com>2024-01-28 13:33:32 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-01-30 18:30:02 +0000
commitaf6e0e728f652f496a6fb1e659617c9662f774ac (patch)
tree3adbcc0fa975178e13fe263e38b80e3b5812c444 /MdeModulePkg/Core/Dxe/DxeMain.h
parentc5e702e45ad4e71e1bfc710c9db0826c1c893b18 (diff)
downloadedk2-af6e0e728f652f496a6fb1e659617c9662f774ac.tar.gz
edk2-af6e0e728f652f496a6fb1e659617c9662f774ac.tar.bz2
edk2-af6e0e728f652f496a6fb1e659617c9662f774ac.zip
MdeModulePkg/Core/Dxe: Set MemoryTypeInfo bin range from HOB
Provide an optional method for PEI to declare a specific address range to use for the Memory Type Information bins. The current algorithm uses heuristics that tends to place the Memory Type Information bins in the same location, but memory configuration changes across boots or algorithm changes across a firmware updates could potentially change the Memory Type Information bin location. If the bin locations move across an S4 save/resume cycle, then the S4 resume may fail. Enabling this feature increases the number of scenarios that an S4 resume operation may succeed. If the HOB List contains a Resource Descriptor HOB that describes tested system memory and has an Owner GUID of gEfiMemoryTypeInformationGuid, then use the address range described by the Resource Descriptor HOB as the preferred location of the Memory Type Information bins. If this HOB is not detected, then the current behavior is preserved. The HOB with an Owner GUID of gEfiMemoryTypeInformationGuid is ignored for the following conditions: * The HOB with an Owner GUID of gEfiMemoryTypeInformationGuid is smaller than the Memory Type Information bins. * The HOB list contains more than one Resource Descriptor HOB with an owner GUID of gEfiMemoryTypeInformationGuid. * The Resource Descriptor HOB with an Owner GUID of gEfiMemoryTypeInformationGuid is the same Resource Descriptor HOB that that describes the PHIT memory range. Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Aaron Li <aaron.li@intel.com> Cc: Liu Yun <yun.y.liu@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'MdeModulePkg/Core/Dxe/DxeMain.h')
-rw-r--r--MdeModulePkg/Core/Dxe/DxeMain.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/Dxe/DxeMain.h b/MdeModulePkg/Core/Dxe/DxeMain.h
index 86a7be2f51..53e26703f8 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain.h
+++ b/MdeModulePkg/Core/Dxe/DxeMain.h
@@ -277,6 +277,12 @@ CoreInitializePool (
VOID
);
+VOID
+CoreSetMemoryTypeInformationRange (
+ IN EFI_PHYSICAL_ADDRESS Start,
+ IN UINT64 Length
+ );
+
/**
Called to initialize the memory map and add descriptors to
the current descriptor list.