diff options
author | mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-11-27 02:47:37 +0000 |
---|---|---|
committer | mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-11-27 02:47:37 +0000 |
commit | b74350e9562f0ad4400afdbc2a157d66f55fb113 (patch) | |
tree | 849e1160cb415dfbf11e4e6d0c6b979e3c72d8c2 /MdeModulePkg/Core/DxeIplPeim | |
parent | 7a5064ce425f85da87deaabc726945d1c980aafb (diff) | |
download | edk2-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')
-rw-r--r-- | MdeModulePkg/Core/DxeIplPeim/DxeIpl.h | 2 | ||||
-rw-r--r-- | MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 4 | ||||
-rw-r--r-- | MdeModulePkg/Core/DxeIplPeim/DxeLoad.c | 31 |
3 files changed, 37 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h index dab6839ef3..e82cf38db2 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h @@ -30,6 +30,8 @@ Abstract: #include <Ppi/SectionExtraction.h>
#include <Ppi/FvLoadFile.h>
#include <Ppi/MemoryDiscovered.h>
+#include <Ppi/ReadOnlyVariable2.h>
+#include <Guid/MemoryTypeInformation.h>
#include <Ppi/Decompress.h>
#include <Ppi/FirmwareVolumeInfo.h>
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf index c28525acaf..898e67ed5a 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf @@ -93,6 +93,10 @@ gEfiDxeIplPpiGuid # PPI SOMETIMES_PRODUCED
gEfiPeiDecompressPpiGuid
gEfiPeiFirmwareVolumeInfoPpiGuid
+ gEfiPeiReadOnlyVariable2PpiGuid
+
+[Guids]
+ gEfiMemoryTypeInformationGuid
[FeaturePcd.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportCustomDecompress
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
//
|