[HACK]UefiPayloadPkg: Fix TPM2 support without PEI

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
This commit is contained in:
Patrick Rudolph
2021-01-28 09:07:39 +01:00
committed by Tim Crawford
parent 802391f1fe
commit 10cbbe06d3
3 changed files with 13 additions and 0 deletions

View File

@@ -2740,6 +2740,15 @@ DriverEntry (
DEBUG ((EFI_D_INFO, "Tcg2.NumberOfPCRBanks - 0x%08x\n", mTcgDxeData.BsCap.NumberOfPCRBanks));
DEBUG ((EFI_D_INFO, "Tcg2.ActivePcrBanks - 0x%08x\n", mTcgDxeData.BsCap.ActivePcrBanks));
// HACK: This is usually done in Tcg2Pei
UINT32 Tpm2PcrMask;
Tpm2PcrMask = PcdGet32 (PcdTpm2HashMask);
if (Tpm2PcrMask != mTcgDxeData.BsCap.HashAlgorithmBitmap) {
Tpm2PcrMask &= mTcgDxeData.BsCap.HashAlgorithmBitmap;
Status = PcdSet32S (PcdTpm2HashMask, Tpm2PcrMask);
ASSERT_EFI_ERROR (Status);
}
if (mTcgDxeData.BsCap.TPMPresentFlag) {
//
// Setup the log area and copy event log from hob list to it

View File

@@ -107,6 +107,7 @@
gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableLaml ## PRODUCES
gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableLasa ## PRODUCES
gEfiMdeModulePkgTokenSpaceGuid.PcdTcgPfpMeasurementRevision ## CONSUMES
gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask ## PRODUCES
[Depex]
# According to PcdTpm2AcpiTableRev definition in SecurityPkg.dec

View File

@@ -483,8 +483,11 @@
gUefiCpuPkgTokenSpaceGuid.PcdSevEsIsEnabled|0
gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
## Patched by BlSupportDxe
gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid|{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
gEfiSecurityPkgTokenSpaceGuid.PcdTpmInitializationPolicy|0
## Match the hash algorithms listed in Tcg2Dxe
gEfiSecurityPkgTokenSpaceGuid.PcdTcg2HashAlgorithmBitmap|0x1F
################################################################################
#