From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.39207.1639568404472837937 for ; Wed, 15 Dec 2021 03:40:04 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gtvdIkMn; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639568403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+jeXyGPboNFblOko7pmRIgPQ8QTJSi/raYXRiLKX8ik=; b=gtvdIkMnLbUa597yln99EW9AzlZ7qqJvfsMtGLQTjsR7RBZvPwoSB85SR/++VLdhrWXTrm CLxl3PPJ/iDs759PkgmVqW6kQUs1oG9V1O1usi8R5FX5HelkdNwLJdyl/pVp7gaj7TCY4u eJCr0BOsBjSpzaCAJmZhKe4KfMtdhSQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-15-X0fLfDj6NCOrpQMNPwbxww-1; Wed, 15 Dec 2021 06:40:02 -0500 X-MC-Unique: X0fLfDj6NCOrpQMNPwbxww-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3111E801B35; Wed, 15 Dec 2021 11:40:00 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.14]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 77EAB96F2C; Wed, 15 Dec 2021 11:39:40 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 15A091800622; Wed, 15 Dec 2021 12:39:20 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Tom Lendacky , James Bottomley , Jiewen Yao , Jordan Justen , Min Xu , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Pawel Polawski , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Brijesh Singh , Gerd Hoffmann , Erdem Aktas , Ard Biesheuvel Subject: [PATCH v4 4/5] OvmfPkg: create Tcg12ConfigPei.inf Date: Wed, 15 Dec 2021 12:39:19 +0100 Message-Id: <20211215113920.1015403-5-kraxel@redhat.com> In-Reply-To: <20211215113920.1015403-1-kraxel@redhat.com> References: <20211215113920.1015403-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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 Reviewed-by: Stefan Berger Tested-by: Stefan Berger --- OvmfPkg/OvmfTpmComponentsPei.dsc.inc | 2 +- .../{Tcg2ConfigPei.inf => Tcg12ConfigPei.inf} | 11 ++--------- OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf | 11 +---------- OvmfPkg/OvmfTpmPei.fdf.inc | 2 +- 4 files changed, 5 insertions(+), 21 deletions(-) copy OvmfPkg/Tcg/Tcg2Config/{Tcg2ConfigPei.inf => Tcg12ConfigPei.inf} (82%) diff --git a/OvmfPkg/OvmfTpmComponentsPei.dsc.inc b/OvmfPkg/OvmfTpmComponentsPei.dsc.inc index 99fa7c13b3e7..87d491da5047 100644 --- a/OvmfPkg/OvmfTpmComponentsPei.dsc.inc +++ b/OvmfPkg/OvmfTpmComponentsPei.dsc.inc @@ -4,7 +4,7 @@ !if $(TPM_ENABLE) == TRUE OvmfPkg/Tcg/TpmMmioSevDecryptPei/TpmMmioSevDecryptPei.inf - OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf + OvmfPkg/Tcg/Tcg2Config/Tcg12ConfigPei.inf SecurityPkg/Tcg/TcgPei/TcgPei.inf SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf { diff --git a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf b/OvmfPkg/Tcg/Tcg2Config/Tcg12ConfigPei.inf similarity index 82% copy from OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf copy to OvmfPkg/Tcg/Tcg2Config/Tcg12ConfigPei.inf index 39d1deeed16b..e8e0b88e6058 100644 --- a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf +++ b/OvmfPkg/Tcg/Tcg2Config/Tcg12ConfigPei.inf @@ -1,5 +1,5 @@ ## @file -# Set TPM device type +# Set TPM device type - supports TPM 1.2 and 2.0 # # In SecurityPkg, this module initializes the TPM device type based on a UEFI # variable and/or hardware detection. In OvmfPkg, the module only performs TPM @@ -14,7 +14,7 @@ [Defines] INF_VERSION = 0x00010005 BASE_NAME = Tcg2ConfigPei - FILE_GUID = BF7F2B0C-9F2F-4889-AB5C-12460022BE87 + FILE_GUID = 8AD3148F-945F-46B4-8ACD-71469EA73945 MODULE_TYPE = PEIM VERSION_STRING = 1.0 ENTRY_POINT = Tcg2ConfigPeimEntryPoint @@ -22,13 +22,8 @@ [Defines] [Sources] Tcg2ConfigPeim.c Tpm12Support.h - -[Sources.IA32, Sources.X64] Tpm12Support.c -[Sources.ARM, Sources.AARCH64] - Tpm12SupportNull.c - [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec @@ -40,8 +35,6 @@ [LibraryClasses] DebugLib PeiServicesLib Tpm2DeviceLib - -[LibraryClasses.IA32, LibraryClasses.X64] BaseLib Tpm12DeviceLib diff --git a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf b/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf index 39d1deeed16b..51078c981374 100644 --- a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf +++ b/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf @@ -1,5 +1,5 @@ ## @file -# Set TPM device type +# Set TPM device type - supports TPM 2.0 only # # In SecurityPkg, this module initializes the TPM device type based on a UEFI # variable and/or hardware detection. In OvmfPkg, the module only performs TPM @@ -22,11 +22,6 @@ [Defines] [Sources] Tcg2ConfigPeim.c Tpm12Support.h - -[Sources.IA32, Sources.X64] - Tpm12Support.c - -[Sources.ARM, Sources.AARCH64] Tpm12SupportNull.c [Packages] @@ -41,10 +36,6 @@ [LibraryClasses] PeiServicesLib Tpm2DeviceLib -[LibraryClasses.IA32, LibraryClasses.X64] - BaseLib - Tpm12DeviceLib - [Guids] gEfiTpmDeviceSelectedGuid ## PRODUCES ## GUID # Used as a PPI GUID gEfiTpmDeviceInstanceTpm20DtpmGuid ## SOMETIMES_CONSUMES diff --git a/OvmfPkg/OvmfTpmPei.fdf.inc b/OvmfPkg/OvmfTpmPei.fdf.inc index 9aefd73d219c..709a608cc3bd 100644 --- a/OvmfPkg/OvmfTpmPei.fdf.inc +++ b/OvmfPkg/OvmfTpmPei.fdf.inc @@ -4,7 +4,7 @@ !if $(TPM_ENABLE) == TRUE INF OvmfPkg/Tcg/TpmMmioSevDecryptPei/TpmMmioSevDecryptPei.inf -INF OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf +INF OvmfPkg/Tcg/Tcg2Config/Tcg12ConfigPei.inf INF SecurityPkg/Tcg/TcgPei/TcgPei.inf INF SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf INF SecurityPkg/Tcg/Tcg2PlatformPei/Tcg2PlatformPei.inf -- 2.33.1