]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg: add customized Tcg2ConfigPei clone
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 22 Feb 2018 13:20:58 +0000 (14:20 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Fri, 9 Mar 2018 17:09:21 +0000 (18:09 +0100)
commit6cf1880fb5b668d85f367137f87becb7a83aa14c
tree0a844d621465400145ec09e1f40e575acb1e56c8
parent5487d002fa381c68031ca95ac8e469be641661d4
OvmfPkg: add customized Tcg2ConfigPei clone

The Tcg2ConfigPei module informs the firmware globally about the TPM
device type, by setting the PcdTpmInstanceGuid PCD to the appropriate
GUID value. The original module under SecurityPkg can perform device
detection, or read a cached value from a non-volatile UEFI variable.

OvmfPkg's clone of the module only performs the TPM2 hardware detection.

This is what the module does:

- Check the QEMU hardware for TPM2 availability only

- If found, set the dynamic PCD "PcdTpmInstanceGuid" to
  &gEfiTpmDeviceInstanceTpm20DtpmGuid. This is what informs the rest of
  the firmware about the TPM type.

- Install the gEfiTpmDeviceSelectedGuid PPI. This action permits the
  PEI_CORE to dispatch the Tcg2Pei module, which consumes the above PCD.
  In effect, the gEfiTpmDeviceSelectedGuid PPI serializes the setting
  and the consumption of the "TPM type" PCD.

- If no TPM2 was found, install gPeiTpmInitializationDonePpiGuid.
  (Normally this is performed by Tcg2Pei, but Tcg2Pei doesn't do it if
  no TPM2 is available. So in that case our Tcg2ConfigPei must do it.)

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Stefan Berger <stefanb@linux.vnet.ibm.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
OvmfPkg/OvmfPkgIa32.dsc
OvmfPkg/OvmfPkgIa32.fdf
OvmfPkg/OvmfPkgIa32X64.dsc
OvmfPkg/OvmfPkgIa32X64.fdf
OvmfPkg/OvmfPkgX64.dsc
OvmfPkg/OvmfPkgX64.fdf
OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf [new file with mode: 0644]
OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c [new file with mode: 0644]