From nobody Thu Apr 25 06:33:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+53021+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53021+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1578494405; cv=none; d=zohomail.com; s=zohoarc; b=QSI3c52GEXUisUhwASBzP55bM5prsDIxTyjS6OJAAw5i7nrI03Nt5tg6hrBNGYm2Jl5283wOtti19rVBppg97o0gG4fSCCFHFAY2P4pSd6Aat3sGkR2KSiVfAy2MzN3KqPYy5rfakIlN4icoxgaT7gwGhL4XGkORa5JP1WIuIBE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578494405; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=AH0mSnQozT698296zWRbfBg7jSN2GyB2FJLpLLv57mw=; b=GJXNsNBdAy8mzSndT1sa90vl3wm33tp1XpHuXys9WHbQDM9CoPK+f+6RU2vCT7bM2hZ7XmRhlfXpIhW9mnFnSgk7Q3roQaLNcDpuXaFMHrXnwRhTChmhTojYmWuwYzLL9xeMwkYnW2wvAZ52B25MNbrADWjw2DrPUVdlJbx0CBc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53021+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1578494405333805.449149415491; Wed, 8 Jan 2020 06:40:05 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id WyBnYY1788612xXpUsAgq4Ny; Wed, 08 Jan 2020 06:40:04 -0800 X-Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by mx.groups.io with SMTP id smtpd.web12.8719.1578494330608915036 for ; Wed, 08 Jan 2020 06:38:53 -0800 X-Received: by mail-wm1-f67.google.com with SMTP id u2so2758580wmc.3 for ; Wed, 08 Jan 2020 06:38:50 -0800 (PST) X-Gm-Message-State: l9AEOELz2sfDdrVlClc8Qsp3x1787277AA= X-Google-Smtp-Source: APXvYqyuTp7pD9fZi9KrcGupUF879t1nDGhMDneYEtkigo7c7EKjgfKAKoRBEwU7RJ5qSQae5OQBYw== X-Received: by 2002:a1c:2187:: with SMTP id h129mr4449536wmh.44.1578494328899; Wed, 08 Jan 2020 06:38:48 -0800 (PST) X-Received: from localhost.localdomain ([2a01:cb1d:112:6f00:30ac:cba9:9f83:e5db]) by smtp.gmail.com with ESMTPSA id r15sm3934848wmh.21.2020.01.08.06.38.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2020 06:38:48 -0800 (PST) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: philmd@redhat.com, lersek@redhat.com, Ard Biesheuvel Subject: [edk2-devel] [PATCH 1/2] OvmfPkg: reorganize TPM2 support in DSC/FDF files Date: Wed, 8 Jan 2020 15:38:42 +0100 Message-Id: <20200108143843.4198-2-ard.biesheuvel@linaro.org> In-Reply-To: <20200108143843.4198-1-ard.biesheuvel@linaro.org> References: <20200108143843.4198-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ard.biesheuvel@linaro.org Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1578494404; bh=DT6uXsQAIMqMC488MRqkEqUR2HV+c81bd0jESv6/9jw=; h=Cc:Date:From:Reply-To:Subject:To; b=URcpusyqHKDeAekv0Tcty4o5A8U3iI4ilJP4jfdLHeGPCe2g72ZqQJfABbIBWm8q6HQ fy4+gA9EcuQ3mgE6tAjg8z4kkIuEaiw4XeuOH58q2LvGzVcbs3ST0DXjt1nWp/OXrD4y7 IElT36GoHaGufF78Hg8WiLEPrFY3Z0PMz4k= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Put the TPM2 related DXE modules together in the DSC, and add a TPM2 support header comment while at it. Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- OvmfPkg/OvmfPkgIa32.dsc | 9 ++++++--- OvmfPkg/OvmfPkgIa32X64.dsc | 9 ++++++--- OvmfPkg/OvmfPkgX64.dsc | 3 +++ OvmfPkg/OvmfPkgIa32.fdf | 3 +++ OvmfPkg/OvmfPkgIa32X64.fdf | 3 +++ OvmfPkg/OvmfPkgX64.fdf | 3 +++ 6 files changed, 24 insertions(+), 6 deletions(-) diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index 9a60eb8fe2b0..f9e0b4b5bc54 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -632,9 +632,6 @@ [Components] NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512= .inf NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf } -!if $(TPM2_CONFIG_ENABLE) =3D=3D TRUE - SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf -!endif !endif =20 # @@ -902,6 +899,9 @@ [Components] } !endif =20 + # + # TPM2 support + # !if $(TPM2_ENABLE) =3D=3D TRUE SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf { @@ -914,4 +914,7 @@ [Components] NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512= .inf NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf } +!if $(TPM2_CONFIG_ENABLE) =3D=3D TRUE + SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf +!endif !endif diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index 1d1480b50b02..ee83bbaa5379 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -644,9 +644,6 @@ [Components.IA32] NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512= .inf NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf } -!if $(TPM2_CONFIG_ENABLE) =3D=3D TRUE - SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf -!endif !endif =20 [Components.X64] @@ -916,6 +913,9 @@ [Components.X64] } !endif =20 + # + # TPM2 support + # !if $(TPM2_ENABLE) =3D=3D TRUE SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf { @@ -928,4 +928,7 @@ [Components.X64] NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512= .inf NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf } +!if $(TPM2_CONFIG_ENABLE) =3D=3D TRUE + SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf +!endif !endif diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index c287a436f8ec..2b6106ff313f 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -914,6 +914,9 @@ [Components] } !endif =20 + # + # TPM2 support + # !if $(TPM2_ENABLE) =3D=3D TRUE SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf { diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf index 586bbff08585..63607551ed75 100644 --- a/OvmfPkg/OvmfPkgIa32.fdf +++ b/OvmfPkg/OvmfPkgIa32.fdf @@ -343,6 +343,9 @@ [FV.DXEFV] INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf !endif =20 +# +# TPM2 support +# !if $(TPM2_ENABLE) =3D=3D TRUE INF SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf !if $(TPM2_CONFIG_ENABLE) =3D=3D TRUE diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf index e49adc425fce..0488e5d95ffe 100644 --- a/OvmfPkg/OvmfPkgIa32X64.fdf +++ b/OvmfPkg/OvmfPkgIa32X64.fdf @@ -350,6 +350,9 @@ [FV.DXEFV] INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf !endif =20 +# +# TPM2 support +# !if $(TPM2_ENABLE) =3D=3D TRUE INF SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf !if $(TPM2_CONFIG_ENABLE) =3D=3D TRUE diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf index e49adc425fce..0488e5d95ffe 100644 --- a/OvmfPkg/OvmfPkgX64.fdf +++ b/OvmfPkg/OvmfPkgX64.fdf @@ -350,6 +350,9 @@ [FV.DXEFV] INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf !endif =20 +# +# TPM2 support +# !if $(TPM2_ENABLE) =3D=3D TRUE INF SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf !if $(TPM2_CONFIG_ENABLE) =3D=3D TRUE --=20 2.20.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#53021): https://edk2.groups.io/g/devel/message/53021 Mute This Topic: https://groups.io/mt/69529189/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu Apr 25 06:33:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+53022+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53022+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1578494428; cv=none; d=zohomail.com; s=zohoarc; b=OrDCNUiuzM6gJAxBSY4GTrLbzSDTJdTiTnTVXajkkKEldNtVXgp6/2IrYZG6R+/c3KINblF3RH9bJBgWmMb96K3BVqYAmH5ZekpeugTHmAQFioYYfZMLhd/sDEVbWK8yVJNVvE10JacNac5CbJ9w+YUoC+mCiQqeXSkCZClp/C8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578494428; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=NxaOVLBGlHcVsPkN6+9pP9N7NlACNCQF73vPfMF4xVM=; b=d/+4SCdI3FcwMSUcXPIhNZxXt/wpoFAh1Io8+RXeHObGQqUP68laTjvnA2rJlASDJcxN7aM3yFuc93Z3Zvlk7SVN83dlNYsak2gFaHone0dhZkrK+YkNaksVqI/3CDaO800KBORVgebUCzE4j35zSbVYEOiqIShqhrz5QSLkSgo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53022+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1578494428319962.31004816955; Wed, 8 Jan 2020 06:40:28 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id FqqQYY1788612xW9aXzHdi41; Wed, 08 Jan 2020 06:40:27 -0800 X-Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by mx.groups.io with SMTP id smtpd.web09.8623.1578494332546111883 for ; Wed, 08 Jan 2020 06:38:55 -0800 X-Received: by mail-wm1-f67.google.com with SMTP id q9so2711536wmj.5 for ; Wed, 08 Jan 2020 06:38:52 -0800 (PST) X-Gm-Message-State: T8ZdfihyX7SvmH7U6HEt2Yqtx1787277AA= X-Google-Smtp-Source: APXvYqxoEcU48iEPPYAhU7RCfAmpqTuyGkO/yTFBqVKS65UguEKMW+3O9kOXwe/5Cf5bWaLWfW8oFw== X-Received: by 2002:a1c:1f56:: with SMTP id f83mr4346977wmf.93.1578494330805; Wed, 08 Jan 2020 06:38:50 -0800 (PST) X-Received: from localhost.localdomain ([2a01:cb1d:112:6f00:30ac:cba9:9f83:e5db]) by smtp.gmail.com with ESMTPSA id r15sm3934848wmh.21.2020.01.08.06.38.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2020 06:38:49 -0800 (PST) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: philmd@redhat.com, lersek@redhat.com, Ard Biesheuvel Subject: [edk2-devel] [PATCH 2/2] OvmfPkg: use HII type PCDs for TPM2 config related variables Date: Wed, 8 Jan 2020 15:38:43 +0100 Message-Id: <20200108143843.4198-3-ard.biesheuvel@linaro.org> In-Reply-To: <20200108143843.4198-1-ard.biesheuvel@linaro.org> References: <20200108143843.4198-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ard.biesheuvel@linaro.org Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1578494427; bh=d8AeKl+cnae4aWWGkDhiPWFzXvLjkoRhTzxSreKx7co=; h=Cc:Date:From:Reply-To:Subject:To; b=slCEMK6lx1o25GsgZfbaVMyjnzi3bTO7Dj6ZFg/buiFSPg6dhnTPXozToUXcbMHpL3c 3t8y/7nFSTmlmXTaAAk12EC3RqJpX7Dw+shGAgLuIl7QNYcuI64ClieWedWNMqXL14CYm D4sYfJ2/9MJi/LLmSWyvmzNhl7W8SE9MqJc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The HII pages that are part of Tcg2ConfigDxe expect the following PCDs to be of dynamic HII type, so declare them as such. gEfiSecurityPkgTokenSpaceGuid.PcdTcgPhysicalPresenceInterfaceVer gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableRev Currently, the TPM2 ACPI table is not produced, since we do not incorporate the Tcg2Smm module, which implements the SMI based physical presence interface exposed to the OS. Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- OvmfPkg/OvmfPkgIa32.dsc | 6 ++++++ OvmfPkg/OvmfPkgIa32X64.dsc | 6 ++++++ OvmfPkg/OvmfPkgX64.dsc | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index f9e0b4b5bc54..408da4cc19ac 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -575,6 +575,12 @@ [PcdsDynamicDefault] gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid|{0x00, 0x00, 0x00, 0x00= , 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} !endif =20 +[PcdsDynamicHii] +!if $(TPM2_CONFIG_ENABLE) =3D=3D TRUE + gEfiSecurityPkgTokenSpaceGuid.PcdTcgPhysicalPresenceInterfaceVer|L"TCG2_= VERSION"|gTcg2ConfigFormSetGuid|0x0|"1.3"|NV,BS + gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableRev|L"TCG2_VERSION"|gTcg2C= onfigFormSetGuid|0x8|3|NV,BS +!endif + ##########################################################################= ###### # # Components Section - list of all EDK II Modules needed by this Platform. diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index ee83bbaa5379..1ec94010c215 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -587,6 +587,12 @@ [PcdsDynamicDefault] gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid|{0x00, 0x00, 0x00, 0x00= , 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} !endif =20 +[PcdsDynamicHii] +!if $(TPM2_CONFIG_ENABLE) =3D=3D TRUE + gEfiSecurityPkgTokenSpaceGuid.PcdTcgPhysicalPresenceInterfaceVer|L"TCG2_= VERSION"|gTcg2ConfigFormSetGuid|0x0|"1.3"|NV,BS + gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableRev|L"TCG2_VERSION"|gTcg2C= onfigFormSetGuid|0x8|3|NV,BS +!endif + ##########################################################################= ###### # # Components Section - list of all EDK II Modules needed by this Platform. diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index 2b6106ff313f..058ab00e69c6 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -586,6 +586,12 @@ [PcdsDynamicDefault] gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid|{0x00, 0x00, 0x00, 0x00= , 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} !endif =20 +[PcdsDynamicHii] +!if $(TPM2_CONFIG_ENABLE) =3D=3D TRUE + gEfiSecurityPkgTokenSpaceGuid.PcdTcgPhysicalPresenceInterfaceVer|L"TCG2_= VERSION"|gTcg2ConfigFormSetGuid|0x0|"1.3"|NV,BS + gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableRev|L"TCG2_VERSION"|gTcg2C= onfigFormSetGuid|0x8|3|NV,BS +!endif + ##########################################################################= ###### # # Components Section - list of all EDK II Modules needed by this Platform. --=20 2.20.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#53022): https://edk2.groups.io/g/devel/message/53022 Mute This Topic: https://groups.io/mt/69529190/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-