summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2007-11-27 02:47:37 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2007-11-27 02:47:37 +0000
commitb74350e9562f0ad4400afdbc2a157d66f55fb113 (patch)
tree849e1160cb415dfbf11e4e6d0c6b979e3c72d8c2 /MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
parent7a5064ce425f85da87deaabc726945d1c980aafb (diff)
downloadedk2-platforms-b74350e9562f0ad4400afdbc2a157d66f55fb113.tar.xz
1) Improve the EFI Memory Map stability to improve ACPI S4 support
2) Update DXE IPL to always publish the MemoryTypeInformation HOB git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4327 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/DxeIplPeim/DxeLoad.c')
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/DxeLoad.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
index d593e30c74..b7cadedd89 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
@@ -170,6 +170,9 @@ DxeLoadCore (
EFI_PEI_FV_HANDLE VolumeHandle;
EFI_PEI_FILE_HANDLE FileHandle;
UINTN Instance;
+ EFI_PEI_READ_ONLY_VARIABLE2_PPI *Variable;
+ UINTN DataSize;
+ EFI_MEMORY_TYPE_INFORMATION MemoryData [EfiMaxMemoryType + 1];
//
// if in S3 Resume, restore configure
@@ -192,6 +195,34 @@ DxeLoadCore (
//
}
+ Status = PeiServicesLocatePpi (
+ &gEfiPeiReadOnlyVariable2PpiGuid,
+ 0,
+ NULL,
+ (VOID **)&Variable
+ );
+ ASSERT_EFI_ERROR (Status);
+
+ DataSize = sizeof (MemoryData);
+ Status = Variable->GetVariable (
+ Variable,
+ EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME,
+ &gEfiMemoryTypeInformationGuid,
+ NULL,
+ &DataSize,
+ &MemoryData
+ );
+
+ if (!EFI_ERROR (Status)) {
+ //
+ // Build the GUID'd HOB for DXE
+ //
+ BuildGuidDataHob (
+ &gEfiMemoryTypeInformationGuid,
+ MemoryData,
+ DataSize
+ );
+ }
//
// If any FV contains an encapsulated FV extract that FV
//