public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2 0/1] bhyve: tpm support
@ 2023-06-07 13:17 Corvin Köhne
  2023-06-07 13:17 ` [PATCH v2 1/1] OvmfPkg/Bhyve: include TPM driver Corvin Köhne
  0 siblings, 1 reply; 4+ messages in thread
From: Corvin Köhne @ 2023-06-07 13:17 UTC (permalink / raw)
  To: devel; +Cc: Corvin Köhne

Hi,

I'm working on TPM emulation for bhyve and would like to merge this
patchset to edk2.

As already send this patch to edk2 by mistake, I'm now resending this
patch as v2.

I've already created a PR to run all CI checks at:
https://github.com/tianocore/edk2/pull/4531

Thanks,
Corvin

Corvin Köhne (1):
  OvmfPkg/Bhyve: include TPM driver

 OvmfPkg/Bhyve/BhyveX64.dsc | 17 +++++++++++++++--
 OvmfPkg/Bhyve/BhyveX64.fdf |  7 +++++++
 2 files changed, 22 insertions(+), 2 deletions(-)

-- 
2.40.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 1/1] OvmfPkg/Bhyve: include TPM driver
  2023-06-07 13:17 [PATCH v2 0/1] bhyve: tpm support Corvin Köhne
@ 2023-06-07 13:17 ` Corvin Köhne
  2023-06-07 14:24   ` Rebecca Cran
  2023-06-19 10:09   ` Gerd Hoffmann
  0 siblings, 2 replies; 4+ messages in thread
From: Corvin Köhne @ 2023-06-07 13:17 UTC (permalink / raw)
  To: devel
  Cc: Corvin Köhne, Ard Biesheuvel, Jiewen Yao, Jordan Justen,
	Gerd Hoffmann, Rebecca Cran, Peter Grehan

From: Corvin Köhne <c.koehne@beckhoff.com>

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 <c.koehne@beckhoff.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Peter Grehan <grehan@freebsd.org>
---
 OvmfPkg/Bhyve/BhyveX64.dsc | 17 +++++++++++++++--
 OvmfPkg/Bhyve/BhyveX64.fdf |  7 +++++++
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc
index 7b974706f958..7fa40998ae80 100644
--- a/OvmfPkg/Bhyve/BhyveX64.dsc
+++ b/OvmfPkg/Bhyve/BhyveX64.dsc
@@ -32,6 +32,8 @@ [Defines]
   DEFINE SMM_REQUIRE             = FALSE
   DEFINE SOURCE_DEBUG_ENABLE     = FALSE
 
+!include OvmfPkg/Include/Dsc/OvmfTpmDefines.dsc.inc
+
   #
   # Network definition
   #
@@ -226,8 +228,7 @@ [LibraryClasses]
   OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
   XenPlatformLib|OvmfPkg/Library/XenPlatformLib/XenPlatformLib.inf
 
-  Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLib.inf
-  TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
+!include OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc
 
 [LibraryClasses.common]
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
@@ -564,12 +565,17 @@ [PcdsDynamicDefault]
 
   gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x00
 
+!include OvmfPkg/Include/Dsc/OvmfTpmPcds.dsc.inc
+
   # MdeModulePkg resolution sets up the system display resolution
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|0
 
+[PcdsDynamicHii]
+!include OvmfPkg/Include/Dsc/OvmfTpmPcdsHii.dsc.inc
+
 ################################################################################
 #
 # Components Section - list of all EDK II Modules needed by this Platform.
@@ -609,6 +615,8 @@ [Components]
     <LibraryClasses>
   }
 
+!include OvmfPkg/Include/Dsc/OvmfTpmComponentsPei.dsc.inc
+
   #
   # DXE Phase modules
   #
@@ -632,6 +640,7 @@ [Components]
 !if $(SECURE_BOOT_ENABLE) == TRUE
       NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf
 !endif
+!include OvmfPkg/Include/Dsc/OvmfTpmSecurityStub.dsc.inc
   }
 
   MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
@@ -826,3 +835,7 @@ [Components]
       NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
   }
 
+  #
+  # TPM support
+  #
+!include OvmfPkg/Include/Dsc/OvmfTpmComponentsDxe.dsc.inc
diff --git a/OvmfPkg/Bhyve/BhyveX64.fdf b/OvmfPkg/Bhyve/BhyveX64.fdf
index 3f6270c048cc..c62d5757092e 100644
--- a/OvmfPkg/Bhyve/BhyveX64.fdf
+++ b/OvmfPkg/Bhyve/BhyveX64.fdf
@@ -158,6 +158,8 @@ [FV.PEIFV]
 INF  OvmfPkg/Bhyve/SmmAccess/SmmAccessPei.inf
 !endif
 
+!include OvmfPkg/Include/Fdf/OvmfTpmPei.fdf.inc
+
 ################################################################################
 
 [FV.DXEFV]
@@ -335,6 +337,11 @@ [FV.DXEFV]
 INF  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
 !endif
 
+#
+# TPM support
+#
+!include OvmfPkg/Include/Fdf/OvmfTpmDxe.fdf.inc
+
 ################################################################################
 
 [FV.FVMAIN_COMPACT]
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/1] OvmfPkg/Bhyve: include TPM driver
  2023-06-07 13:17 ` [PATCH v2 1/1] OvmfPkg/Bhyve: include TPM driver Corvin Köhne
@ 2023-06-07 14:24   ` Rebecca Cran
  2023-06-19 10:09   ` Gerd Hoffmann
  1 sibling, 0 replies; 4+ messages in thread
From: Rebecca Cran @ 2023-06-07 14:24 UTC (permalink / raw)
  To: Corvin Köhne, devel
  Cc: Corvin Köhne, Ard Biesheuvel, Jiewen Yao, Jordan Justen,
	Gerd Hoffmann, Peter Grehan

Reviewed-by: Rebecca Cran <rebecca@bsdio.com>


-- 

Rebecca Cran


On 6/7/23 07:17, Corvin Köhne wrote:
> From: Corvin Köhne <c.koehne@beckhoff.com>
>
> 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 <c.koehne@beckhoff.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Rebecca Cran <rebecca@bsdio.com>
> Cc: Peter Grehan <grehan@freebsd.org>
> ---
>   OvmfPkg/Bhyve/BhyveX64.dsc | 17 +++++++++++++++--
>   OvmfPkg/Bhyve/BhyveX64.fdf |  7 +++++++
>   2 files changed, 22 insertions(+), 2 deletions(-)
>
> diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc
> index 7b974706f958..7fa40998ae80 100644
> --- a/OvmfPkg/Bhyve/BhyveX64.dsc
> +++ b/OvmfPkg/Bhyve/BhyveX64.dsc
> @@ -32,6 +32,8 @@ [Defines]
>     DEFINE SMM_REQUIRE             = FALSE
>     DEFINE SOURCE_DEBUG_ENABLE     = FALSE
>   
> +!include OvmfPkg/Include/Dsc/OvmfTpmDefines.dsc.inc
> +
>     #
>     # Network definition
>     #
> @@ -226,8 +228,7 @@ [LibraryClasses]
>     OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
>     XenPlatformLib|OvmfPkg/Library/XenPlatformLib/XenPlatformLib.inf
>   
> -  Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLib.inf
> -  TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
> +!include OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc
>   
>   [LibraryClasses.common]
>     BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
> @@ -564,12 +565,17 @@ [PcdsDynamicDefault]
>   
>     gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x00
>   
> +!include OvmfPkg/Include/Dsc/OvmfTpmPcds.dsc.inc
> +
>     # MdeModulePkg resolution sets up the system display resolution
>     gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|0
>     gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|0
>     gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|0
>     gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|0
>   
> +[PcdsDynamicHii]
> +!include OvmfPkg/Include/Dsc/OvmfTpmPcdsHii.dsc.inc
> +
>   ################################################################################
>   #
>   # Components Section - list of all EDK II Modules needed by this Platform.
> @@ -609,6 +615,8 @@ [Components]
>       <LibraryClasses>
>     }
>   
> +!include OvmfPkg/Include/Dsc/OvmfTpmComponentsPei.dsc.inc
> +
>     #
>     # DXE Phase modules
>     #
> @@ -632,6 +640,7 @@ [Components]
>   !if $(SECURE_BOOT_ENABLE) == TRUE
>         NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf
>   !endif
> +!include OvmfPkg/Include/Dsc/OvmfTpmSecurityStub.dsc.inc
>     }
>   
>     MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
> @@ -826,3 +835,7 @@ [Components]
>         NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
>     }
>   
> +  #
> +  # TPM support
> +  #
> +!include OvmfPkg/Include/Dsc/OvmfTpmComponentsDxe.dsc.inc
> diff --git a/OvmfPkg/Bhyve/BhyveX64.fdf b/OvmfPkg/Bhyve/BhyveX64.fdf
> index 3f6270c048cc..c62d5757092e 100644
> --- a/OvmfPkg/Bhyve/BhyveX64.fdf
> +++ b/OvmfPkg/Bhyve/BhyveX64.fdf
> @@ -158,6 +158,8 @@ [FV.PEIFV]
>   INF  OvmfPkg/Bhyve/SmmAccess/SmmAccessPei.inf
>   !endif
>   
> +!include OvmfPkg/Include/Fdf/OvmfTpmPei.fdf.inc
> +
>   ################################################################################
>   
>   [FV.DXEFV]
> @@ -335,6 +337,11 @@ [FV.DXEFV]
>   INF  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
>   !endif
>   
> +#
> +# TPM support
> +#
> +!include OvmfPkg/Include/Fdf/OvmfTpmDxe.fdf.inc
> +
>   ################################################################################
>   
>   [FV.FVMAIN_COMPACT]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/1] OvmfPkg/Bhyve: include TPM driver
  2023-06-07 13:17 ` [PATCH v2 1/1] OvmfPkg/Bhyve: include TPM driver Corvin Köhne
  2023-06-07 14:24   ` Rebecca Cran
@ 2023-06-19 10:09   ` Gerd Hoffmann
  1 sibling, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2023-06-19 10:09 UTC (permalink / raw)
  To: Corvin Köhne
  Cc: devel, Corvin Köhne, Ard Biesheuvel, Jiewen Yao,
	Jordan Justen, Rebecca Cran, Peter Grehan

On Wed, Jun 07, 2023 at 03:17:19PM +0200, Corvin Köhne wrote:
> From: Corvin Köhne <c.koehne@beckhoff.com>
> 
> 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 <c.koehne@beckhoff.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Rebecca Cran <rebecca@bsdio.com>
> Cc: Peter Grehan <grehan@freebsd.org>

Acked-by: Gerd Hoffmann <kraxel@redhat.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-19 10:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-07 13:17 [PATCH v2 0/1] bhyve: tpm support Corvin Köhne
2023-06-07 13:17 ` [PATCH v2 1/1] OvmfPkg/Bhyve: include TPM driver Corvin Köhne
2023-06-07 14:24   ` Rebecca Cran
2023-06-19 10:09   ` Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox