diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-10-18 10:01:06 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-10-18 10:01:06 +0000 |
commit | 02422d17f76d5d08b2d9fa0bf5908a9c6144b997 (patch) | |
tree | 6a07f75f6d1325fa8d7353c9b1963aa462ddced7 /MdeModulePkg/Core/Pei | |
parent | e6c560aad63b09e6aaee3ccc65be462651772fe5 (diff) | |
download | edk2-platforms-02422d17f76d5d08b2d9fa0bf5908a9c6144b997.tar.xz |
Fix a bug:
PI spec Vol 1, 7.3.1 specifies that this same information reported by EFI_SEC_PLATFORM_INFORMATION_PPI
will be placed in a GUIDed HOB with the PPI GUID as the HOB GUID for HOB consumer phase.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4166 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Pei')
-rw-r--r-- | MdeModulePkg/Core/Pei/PeiMain.h | 1 | ||||
-rw-r--r-- | MdeModulePkg/Core/Pei/PeiMain.inf | 1 | ||||
-rw-r--r-- | MdeModulePkg/Core/Pei/PeiMain/PeiMain.c | 34 |
3 files changed, 36 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/Pei/PeiMain.h b/MdeModulePkg/Core/Pei/PeiMain.h index 156c6b2ed4..37aca731ee 100644 --- a/MdeModulePkg/Core/Pei/PeiMain.h +++ b/MdeModulePkg/Core/Pei/PeiMain.h @@ -37,6 +37,7 @@ Revision History #include <Ppi/GuidedSectionExtraction.h>
#include <Ppi/LoadFile.h>
#include <Ppi/Security2.h>
+#include <Ppi/SecPlatformInformation.h>
#include <Library/DebugLib.h>
#include <Library/PeiCoreEntryPoint.h>
#include <Library/BaseLib.h>
diff --git a/MdeModulePkg/Core/Pei/PeiMain.inf b/MdeModulePkg/Core/Pei/PeiMain.inf index a954cadeda..392a548e24 100644 --- a/MdeModulePkg/Core/Pei/PeiMain.inf +++ b/MdeModulePkg/Core/Pei/PeiMain.inf @@ -96,6 +96,7 @@ gEfiPeiFirmwareVolumeInfoPpiGuid
gEfiPeiLoadFilePpiGuid
gEfiPeiSecurity2PpiGuid
+ gEfiSecPlatformInformationPpiGuid
[FixedPcd.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported
diff --git a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c index 4dd7f26c30..d7b5807bf7 100644 --- a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c +++ b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c @@ -122,6 +122,9 @@ Returns: PEI_CORE_INSTANCE *OldCoreData;
EFI_PEI_CPU_IO_PPI *CpuIo;
EFI_PEI_PCI_CFG2_PPI *PciCfg;
+ UINT64 SecPlatformInfoRecordSize;
+ EFI_SEC_PLATFORM_INFORMATION_PPI *SecPlatformInfoPpi;
+ EFI_SEC_PLATFORM_INFORMATION_RECORD *SecPlatformInfoRecord;
mTick = 0;
OldCoreData = (PEI_CORE_INSTANCE *) Data;
@@ -234,6 +237,37 @@ Returns: if (PpiList != NULL) {
Status = PeiServicesInstallPpi (PpiList);
ASSERT_EFI_ERROR (Status);
+
+ //
+ // PI spec Vol 1, 7.3.1 specifies that this same information reported by EFI_SEC_PLATFORM_INFORMATION_PPI
+ // will be placed in a GUIDed HOB with the PPI GUID as the HOB GUID for HOB consumer phase.
+ //
+ Status = PeiServicesLocatePpi (
+ &gEfiSecPlatformInformationPpiGuid,
+ 0,
+ NULL,
+ (VOID **) &SecPlatformInfoPpi
+ );
+ if (!EFI_ERROR (Status)) {
+ SecPlatformInfoRecord = AllocateZeroPool (sizeof(*SecPlatformInfoRecord));
+ ASSERT (SecPlatformInfoRecord != NULL);
+
+ SecPlatformInfoRecordSize = sizeof(*SecPlatformInfoRecord);
+
+ Status = SecPlatformInfoPpi->PlatformInformation (
+ (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer (),
+ &SecPlatformInfoRecordSize,
+ SecPlatformInfoRecord
+ );
+
+ if (!EFI_ERROR (Status)) {
+ BuildGuidDataHob (
+ &gEfiSecPlatformInformationPpiGuid,
+ SecPlatformInfoRecord,
+ sizeof (*SecPlatformInfoRecord)
+ );
+ }
+ }
}
}
|