OvmfPkg/Bhyve: include TPM driver

Bhyve will gain support for TPM emulation in the near future. Therefore,
prepare OVMF by copying all TPM driver used by qemu's OVMF DSC into the
bhyve OVMF DSC.

Signed-off-by: Corvin Köhne <corvink@FreeBSD.org>
Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Corvin Köhne 2023-06-19 13:54:12 +02:00 committed by mergify[bot]
parent c301291dc3
commit 5779671137
2 changed files with 22 additions and 2 deletions

View File

@ -32,6 +32,8 @@
DEFINE SMM_REQUIRE = FALSE DEFINE SMM_REQUIRE = FALSE
DEFINE SOURCE_DEBUG_ENABLE = FALSE DEFINE SOURCE_DEBUG_ENABLE = FALSE
!include OvmfPkg/Include/Dsc/OvmfTpmDefines.dsc.inc
# #
# Network definition # Network definition
# #
@ -226,8 +228,7 @@
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
XenPlatformLib|OvmfPkg/Library/XenPlatformLib/XenPlatformLib.inf XenPlatformLib|OvmfPkg/Library/XenPlatformLib/XenPlatformLib.inf
Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLib.inf !include OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
[LibraryClasses.common] [LibraryClasses.common]
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
@ -564,12 +565,17 @@
gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x00 gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x00
!include OvmfPkg/Include/Dsc/OvmfTpmPcds.dsc.inc
# MdeModulePkg resolution sets up the system display resolution # MdeModulePkg resolution sets up the system display resolution
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|0 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|0
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|0 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|0
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|0 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|0
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|0 gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|0
[PcdsDynamicHii]
!include OvmfPkg/Include/Dsc/OvmfTpmPcdsHii.dsc.inc
################################################################################ ################################################################################
# #
# Components Section - list of all EDK II Modules needed by this Platform. # Components Section - list of all EDK II Modules needed by this Platform.
@ -609,6 +615,8 @@
<LibraryClasses> <LibraryClasses>
} }
!include OvmfPkg/Include/Dsc/OvmfTpmComponentsPei.dsc.inc
# #
# DXE Phase modules # DXE Phase modules
# #
@ -632,6 +640,7 @@
!if $(SECURE_BOOT_ENABLE) == TRUE !if $(SECURE_BOOT_ENABLE) == TRUE
NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf
!endif !endif
!include OvmfPkg/Include/Dsc/OvmfTpmSecurityStub.dsc.inc
} }
MdeModulePkg/Universal/EbcDxe/EbcDxe.inf MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
@ -826,3 +835,7 @@
NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
} }
#
# TPM support
#
!include OvmfPkg/Include/Dsc/OvmfTpmComponentsDxe.dsc.inc

View File

@ -158,6 +158,8 @@ INF UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
INF OvmfPkg/Bhyve/SmmAccess/SmmAccessPei.inf INF OvmfPkg/Bhyve/SmmAccess/SmmAccessPei.inf
!endif !endif
!include OvmfPkg/Include/Fdf/OvmfTpmPei.fdf.inc
################################################################################ ################################################################################
[FV.DXEFV] [FV.DXEFV]
@ -335,6 +337,11 @@ INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
!endif !endif
#
# TPM support
#
!include OvmfPkg/Include/Fdf/OvmfTpmDxe.fdf.inc
################################################################################ ################################################################################
[FV.FVMAIN_COMPACT] [FV.FVMAIN_COMPACT]