mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-21 12:44:50 +02:00
Use firmware version instead of hardcode string for S-CRTM version identifier
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by : Fu, Siyuan <siyuan.fu@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13677 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
9063c328df
commit
333a53ee5b
@ -29,6 +29,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#include <Library/HobLib.h>
|
#include <Library/HobLib.h>
|
||||||
#include <Library/PcdLib.h>
|
#include <Library/PcdLib.h>
|
||||||
#include <Library/PeiServicesTablePointerLib.h>
|
#include <Library/PeiServicesTablePointerLib.h>
|
||||||
|
#include <Library/BaseLib.h>
|
||||||
|
|
||||||
#include "TpmComm.h"
|
#include "TpmComm.h"
|
||||||
|
|
||||||
@ -90,8 +91,6 @@ EFI_PEI_NOTIFY_DESCRIPTOR mNotifyList[] = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
CHAR8 mSCrtmVersion[] = "{D20BC7C6-A1A5-415c-AE85-38290AB6BE04}";
|
|
||||||
|
|
||||||
EFI_PLATFORM_FIRMWARE_BLOB mMeasuredFvInfo[FixedPcdGet32 (PcdPeiCoreMaxFvSupported)];
|
EFI_PLATFORM_FIRMWARE_BLOB mMeasuredFvInfo[FixedPcdGet32 (PcdPeiCoreMaxFvSupported)];
|
||||||
UINT32 mMeasuredFvIndex = 0;
|
UINT32 mMeasuredFvIndex = 0;
|
||||||
|
|
||||||
@ -180,20 +179,21 @@ MeasureCRTMVersion (
|
|||||||
TCG_PCR_EVENT_HDR TcgEventHdr;
|
TCG_PCR_EVENT_HDR TcgEventHdr;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Here, only a static GUID is measured instead of real CRTM version.
|
// Use FirmwareVersion string to represent CRTM version.
|
||||||
// OEMs should get real CRTM version string and measure it.
|
// OEMs should get real CRTM version string and measure it.
|
||||||
//
|
//
|
||||||
|
|
||||||
TcgEventHdr.PCRIndex = 0;
|
TcgEventHdr.PCRIndex = 0;
|
||||||
TcgEventHdr.EventType = EV_S_CRTM_VERSION;
|
TcgEventHdr.EventType = EV_S_CRTM_VERSION;
|
||||||
TcgEventHdr.EventSize = sizeof (mSCrtmVersion);
|
TcgEventHdr.EventSize = StrSize((CHAR16*)PcdGetPtr (PcdFirmwareVersionString));
|
||||||
|
|
||||||
return HashLogExtendEvent (
|
return HashLogExtendEvent (
|
||||||
PeiServices,
|
PeiServices,
|
||||||
(UINT8*)&mSCrtmVersion,
|
(UINT8*)PcdGetPtr (PcdFirmwareVersionString),
|
||||||
TcgEventHdr.EventSize,
|
TcgEventHdr.EventSize,
|
||||||
TpmHandle,
|
TpmHandle,
|
||||||
&TcgEventHdr,
|
&TcgEventHdr,
|
||||||
(UINT8*)&mSCrtmVersion
|
(UINT8*)PcdGetPtr (PcdFirmwareVersionString)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,6 +46,8 @@
|
|||||||
TimerLib
|
TimerLib
|
||||||
IoLib
|
IoLib
|
||||||
PeiServicesTablePointerLib
|
PeiServicesTablePointerLib
|
||||||
|
BaseLib
|
||||||
|
PcdLib
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gTcgEventEntryHobGuid
|
gTcgEventEntryHobGuid
|
||||||
@ -64,6 +66,7 @@
|
|||||||
[FixedPcd]
|
[FixedPcd]
|
||||||
gEfiSecurityPkgTokenSpaceGuid.PcdHideTpmSupport
|
gEfiSecurityPkgTokenSpaceGuid.PcdHideTpmSupport
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported ## CONSUMES
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported ## CONSUMES
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString ## CONSUMES
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
gEfiPeiMasterBootModePpiGuid AND
|
gEfiPeiMasterBootModePpiGuid AND
|
||||||
|
Loading…
x
Reference in New Issue
Block a user