UefiPayloadPkg: Advertise TPM support in BlSupportDxe
In BlSupportDxe read the AcpiBoardInfo and set PcdTpmInstanceGuid to indicate that a TPM is likely present as TPM tables had been installed by the bootloader. The Tcg*Dxes will probe for the TPM, so no need to do it here as well. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
This commit is contained in:
committed by
Tim Crawford
parent
c134065066
commit
7f99fae217
@@ -7,6 +7,7 @@
|
||||
|
||||
**/
|
||||
#include "BlSupportDxe.h"
|
||||
#include <Guid/TpmInstance.h>
|
||||
|
||||
/**
|
||||
Reserve MMIO/IO resource in GCD
|
||||
@@ -105,6 +106,7 @@ BlDxeEntryPoint (
|
||||
EFI_HOB_GUID_TYPE *GuidHob;
|
||||
EFI_PEI_GRAPHICS_INFO_HOB *GfxInfo;
|
||||
ACPI_BOARD_INFO *AcpiBoardInfo;
|
||||
UINTN Size;
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
//
|
||||
@@ -140,6 +142,27 @@ BlDxeEntryPoint (
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
Status = PcdSet64S (PcdPciExpressBaseSize, AcpiBoardInfo->PcieBaseSize);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
if (AcpiBoardInfo->TPM12Present)
|
||||
{
|
||||
Size = sizeof (gEfiTpmDeviceInstanceTpm12Guid);
|
||||
Status = PcdSetPtrS (
|
||||
PcdTpmInstanceGuid,
|
||||
&Size,
|
||||
&gEfiTpmDeviceInstanceTpm12Guid
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
else if (AcpiBoardInfo->TPM20Present)
|
||||
{
|
||||
Size = sizeof (gEfiTpmDeviceInstanceTpm20DtpmGuid);
|
||||
Status = PcdSetPtrS (
|
||||
PcdTpmInstanceGuid,
|
||||
&Size,
|
||||
&gEfiTpmDeviceInstanceTpm20DtpmGuid
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
Reference in New Issue
Block a user