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
This commit is contained in:
@@ -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>
|
||||
|
||||
|
@@ -93,6 +93,10 @@
|
||||
gEfiDxeIplPpiGuid # PPI SOMETIMES_PRODUCED
|
||||
gEfiPeiDecompressPpiGuid
|
||||
gEfiPeiFirmwareVolumeInfoPpiGuid
|
||||
gEfiPeiReadOnlyVariable2PpiGuid
|
||||
|
||||
[Guids]
|
||||
gEfiMemoryTypeInformationGuid
|
||||
|
||||
[FeaturePcd.common]
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportCustomDecompress
|
||||
|
@@ -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
|
||||
//
|
||||
|
Reference in New Issue
Block a user