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 "BlSupportDxe.h"
|
||||||
|
#include <Guid/TpmInstance.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Reserve MMIO/IO resource in GCD
|
Reserve MMIO/IO resource in GCD
|
||||||
@@ -105,6 +106,7 @@ BlDxeEntryPoint (
|
|||||||
EFI_HOB_GUID_TYPE *GuidHob;
|
EFI_HOB_GUID_TYPE *GuidHob;
|
||||||
EFI_PEI_GRAPHICS_INFO_HOB *GfxInfo;
|
EFI_PEI_GRAPHICS_INFO_HOB *GfxInfo;
|
||||||
ACPI_BOARD_INFO *AcpiBoardInfo;
|
ACPI_BOARD_INFO *AcpiBoardInfo;
|
||||||
|
UINTN Size;
|
||||||
|
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
//
|
//
|
||||||
@@ -140,6 +142,27 @@ BlDxeEntryPoint (
|
|||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
Status = PcdSet64S (PcdPciExpressBaseSize, AcpiBoardInfo->PcieBaseSize);
|
Status = PcdSet64S (PcdPciExpressBaseSize, AcpiBoardInfo->PcieBaseSize);
|
||||||
ASSERT_EFI_ERROR (Status);
|
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;
|
return EFI_SUCCESS;
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
MdeModulePkg/MdeModulePkg.dec
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
UefiPayloadPkg/UefiPayloadPkg.dec
|
UefiPayloadPkg/UefiPayloadPkg.dec
|
||||||
|
SecurityPkg/SecurityPkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
UefiDriverEntryPoint
|
UefiDriverEntryPoint
|
||||||
@@ -45,6 +46,8 @@
|
|||||||
gUefiSystemTableInfoGuid
|
gUefiSystemTableInfoGuid
|
||||||
gUefiAcpiBoardInfoGuid
|
gUefiAcpiBoardInfoGuid
|
||||||
gEfiGraphicsInfoHobGuid
|
gEfiGraphicsInfoHobGuid
|
||||||
|
gEfiTpmDeviceInstanceTpm20DtpmGuid ## SOMETIMES_CONSUMES
|
||||||
|
gEfiTpmDeviceInstanceTpm12Guid ## SOMETIMES_CONSUMES
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution
|
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution
|
||||||
@@ -53,6 +56,7 @@
|
|||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupVideoVerticalResolution
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
|
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize
|
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize
|
||||||
|
gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid ## SOMETIMES_PRODUCES
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
TRUE
|
TRUE
|
||||||
|
@@ -464,6 +464,8 @@
|
|||||||
gUefiCpuPkgTokenSpaceGuid.PcdSevEsIsEnabled|0
|
gUefiCpuPkgTokenSpaceGuid.PcdSevEsIsEnabled|0
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
|
gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|TRUE
|
||||||
|
|
||||||
|
gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid|{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Components Section - list of all EDK II Modules needed by this Platform.
|
# Components Section - list of all EDK II Modules needed by this Platform.
|
||||||
|
Reference in New Issue
Block a user