Skip to content

Commit b819388

Browse files
kraxelmergify[bot]
authored andcommitted
OvmfPkg: create Tcg12ConfigPei.inf
Split Tcg2ConfigPei.inf into two variants: Tcg12ConfigPei.inf with TPM 1.2 support included and Tcg2ConfigPei.inf supporting TPM 2.0 only. This allows x86 builds to choose whenever TPM 1.2 support should be included or not by picking the one or the other inf file. Switch x86 builds to Tcg12ConfigPei.inf, so they continue to have TPM 1.2 support. No functional change. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Tested-by: Stefan Berger <stefanb@linux.ibm.com>
1 parent 5711ff4 commit b819388

File tree

4 files changed

+59
-12
lines changed

4 files changed

+59
-12
lines changed

OvmfPkg/OvmfTpmComponentsPei.dsc.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
!if $(TPM_ENABLE) == TRUE
66
OvmfPkg/Tcg/TpmMmioSevDecryptPei/TpmMmioSevDecryptPei.inf
7-
OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
7+
OvmfPkg/Tcg/Tcg2Config/Tcg12ConfigPei.inf
88
SecurityPkg/Tcg/TcgPei/TcgPei.inf
99
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf {
1010
<LibraryClasses>

OvmfPkg/OvmfTpmPei.fdf.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
!if $(TPM_ENABLE) == TRUE
66
INF OvmfPkg/Tcg/TpmMmioSevDecryptPei/TpmMmioSevDecryptPei.inf
7-
INF OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
7+
INF OvmfPkg/Tcg/Tcg2Config/Tcg12ConfigPei.inf
88
INF SecurityPkg/Tcg/TcgPei/TcgPei.inf
99
INF SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf
1010
INF SecurityPkg/Tcg/Tcg2PlatformPei/Tcg2PlatformPei.inf
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
## @file
2+
# Set TPM device type - supports TPM 1.2 and 2.0
3+
#
4+
# In SecurityPkg, this module initializes the TPM device type based on a UEFI
5+
# variable and/or hardware detection. In OvmfPkg, the module only performs TPM
6+
# hardware detection.
7+
#
8+
# Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
9+
# Copyright (C) 2018, Red Hat, Inc.
10+
#
11+
# SPDX-License-Identifier: BSD-2-Clause-Patent
12+
##
13+
14+
[Defines]
15+
INF_VERSION = 0x00010005
16+
BASE_NAME = Tcg2ConfigPei
17+
FILE_GUID = 8AD3148F-945F-46B4-8ACD-71469EA73945
18+
MODULE_TYPE = PEIM
19+
VERSION_STRING = 1.0
20+
ENTRY_POINT = Tcg2ConfigPeimEntryPoint
21+
22+
[Sources]
23+
Tcg2ConfigPeim.c
24+
Tpm12Support.h
25+
Tpm12Support.c
26+
27+
[Packages]
28+
MdePkg/MdePkg.dec
29+
MdeModulePkg/MdeModulePkg.dec
30+
OvmfPkg/OvmfPkg.dec
31+
SecurityPkg/SecurityPkg.dec
32+
33+
[LibraryClasses]
34+
PeimEntryPoint
35+
DebugLib
36+
PeiServicesLib
37+
Tpm2DeviceLib
38+
BaseLib
39+
Tpm12DeviceLib
40+
41+
[Guids]
42+
gEfiTpmDeviceSelectedGuid ## PRODUCES ## GUID # Used as a PPI GUID
43+
gEfiTpmDeviceInstanceTpm20DtpmGuid ## SOMETIMES_CONSUMES
44+
gEfiTpmDeviceInstanceTpm12Guid ## SOMETIMES_CONSUMES
45+
46+
[Ppis]
47+
gPeiTpmInitializationDonePpiGuid ## SOMETIMES_PRODUCES
48+
49+
[Pcd]
50+
gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid ## PRODUCES
51+
52+
[Depex.IA32, Depex.X64]
53+
gOvmfTpmMmioAccessiblePpiGuid
54+
55+
[Depex.ARM, Depex.AARCH64]
56+
gOvmfTpmDiscoveredPpiGuid

OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## @file
2-
# Set TPM device type
2+
# Set TPM device type - supports TPM 2.0 only
33
#
44
# In SecurityPkg, this module initializes the TPM device type based on a UEFI
55
# variable and/or hardware detection. In OvmfPkg, the module only performs TPM
@@ -22,11 +22,6 @@
2222
[Sources]
2323
Tcg2ConfigPeim.c
2424
Tpm12Support.h
25-
26-
[Sources.IA32, Sources.X64]
27-
Tpm12Support.c
28-
29-
[Sources.ARM, Sources.AARCH64]
3025
Tpm12SupportNull.c
3126

3227
[Packages]
@@ -41,10 +36,6 @@
4136
PeiServicesLib
4237
Tpm2DeviceLib
4338

44-
[LibraryClasses.IA32, LibraryClasses.X64]
45-
BaseLib
46-
Tpm12DeviceLib
47-
4839
[Guids]
4940
gEfiTpmDeviceSelectedGuid ## PRODUCES ## GUID # Used as a PPI GUID
5041
gEfiTpmDeviceInstanceTpm20DtpmGuid ## SOMETIMES_CONSUMES

0 commit comments

Comments
 (0)