From nobody Sun May 5 14:34:33 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+54923+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+54923+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1582743922; cv=none; d=zohomail.com; s=zohoarc; b=nMo+jvS+7JnaSg23tMFC+lOfb2pQUcqyqCKahvyUg2nbXqtEXtcQkA9UGQ0wbSCDwdH+HciZS9m/iCUDoJJ9RakZAXve3sTw16It69QBtf8XnZLtn2ffG7nAdtJIBBOiOBVIYwW91LPXYzkJXDAo4/MqnrLNLEpyneOFwMiaDOU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582743922; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=KRZRkrFofSOYMyx3bn77rs0hTIRJxV+Xf+XHgpt8JcU=; b=KkK5iSiYonW4L7nEqg0KhAs/JsfTUC7VIe8wNnYcOq4likxXJnJ66aFg3Vq0wqW9JTwh4K3u+LuBCMGaoEP6G0QCbWav8SnILUR1+lucOe9OR63RP6VshvqJ+hxisd4pm/cgV76VKWEX9sFKvhfjh4XPN2ugRJSPpDSzWTkdxDA= 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+54923+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 1582743922403391.2862392720748; Wed, 26 Feb 2020 11:05:22 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id bsY3YY1788612xBvtF9ltIKe; Wed, 26 Feb 2020 11:05:21 -0800 X-Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by mx.groups.io with SMTP id smtpd.web12.588.1582743920671785961 for ; Wed, 26 Feb 2020 11:05:21 -0800 X-Received: by mail-wr1-f67.google.com with SMTP id v4so61730wrs.8 for ; Wed, 26 Feb 2020 11:05:20 -0800 (PST) X-Gm-Message-State: 9wv2LFvx9vOrkYn4Zt26i8yHx1787277AA= X-Google-Smtp-Source: APXvYqwSKxCF/0+PNdfKrd9FMwK9cditiyfLj1nT6YHyB/rykuGpFhIPUHlNs7Llc+9LZ63ZFGQzAQ== X-Received: by 2002:adf:f7c6:: with SMTP id a6mr122697wrq.164.1582743918995; Wed, 26 Feb 2020 11:05:18 -0800 (PST) X-Received: from e123331-lin.home ([2a01:cb1d:112:6f00:816e:ff0d:fb69:f613]) by smtp.gmail.com with ESMTPSA id z1sm3932823wmf.42.2020.02.26.11.05.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 11:05:18 -0800 (PST) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , lersek@redhat.com, eric.auger@redhat.com, philmd@redhat.com, marcandre.lureau@redhat.com, stefanb@linux.ibm.com, leif@nuviainc.com Subject: [edk2-devel] [PATCH v3 1/9] OvmfPkg/Tcg2ConfigPei: introduce a signalling PPI to depex on Date: Wed, 26 Feb 2020 20:05:06 +0100 Message-Id: <20200226190514.31395-2-ard.biesheuvel@linaro.org> In-Reply-To: <20200226190514.31395-1-ard.biesheuvel@linaro.org> References: <20200226190514.31395-1-ard.biesheuvel@linaro.org> 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1582743921; bh=ALci41oZ6YEGJe13nBHz3eWcx5II9qGnzNRQ9EtXOQw=; h=Cc:Date:From:Reply-To:Subject:To; b=nXXqZeGcxZOIgmaCZIohGuevsYA+UsCD6nClEKYg3yrZ7dia4GXAf59R9/6Ppv7+0Up gzLNmlGYF4uLVPnWpaOeleWiPpnXzm0Wbmf5v/XgO4WacMYUfdTtrj54L/lYuhc5hUlKI XbqcYXNdkMdMb766hh5Dx63G8Ym49WX5HkA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" On ARM systems, the TPM does not live at a fixed address, and so we need the platform to discover it first. So introduce a PPI that signals that the TPM address has been discovered and recorded in the appropriate PCD, and make Tcg2ConfigPei depex on it when built for ARM or AARCH64. Reviewed-by: Laszlo Ersek Signed-off-by: Ard Biesheuvel --- OvmfPkg/OvmfPkg.dec | 5 +++++ OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec index 4c5b6511cb97..30faecb7a5c8 100644 --- a/OvmfPkg/OvmfPkg.dec +++ b/OvmfPkg/OvmfPkg.dec @@ -87,6 +87,11 @@ [Guids] gEfiLegacyBiosGuid =3D {0x2E3044AC, 0x879F, 0x490F, {0x= 97, 0x60, 0xBB, 0xDF, 0xAF, 0x69, 0x5F, 0x50}} gEfiLegacyDevOrderVariableGuid =3D {0xa56074db, 0x65fe, 0x45f7, {0x= bd, 0x21, 0x2d, 0x2b, 0xdd, 0x8e, 0x96, 0x52}} =20 +[Ppis] + # PPI whose presence in the PPI database signals that the TPM base addre= ss + # has been discovered and recorded + gOvmfTpmDiscoveredPpiGuid =3D {0xb9a61ad0, 0x2802, 0x41f3, {0x= b5, 0x13, 0x96, 0x51, 0xce, 0x6b, 0xd5, 0x75}} + [Protocols] gVirtioDeviceProtocolGuid =3D {0xfa920010, 0x6785, 0x4941, {0x= b6, 0xec, 0x49, 0x8c, 0x57, 0x9f, 0x16, 0x0a}} gXenBusProtocolGuid =3D {0x3d3ca290, 0xb9a5, 0x11e3, {0x= b7, 0x5d, 0xb8, 0xac, 0x6f, 0x7d, 0x65, 0xe6}} diff --git a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf b/OvmfPkg/Tcg/Tcg2Con= fig/Tcg2ConfigPei.inf index e34cd6210611..55684ba045b3 100644 --- a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf +++ b/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf @@ -25,6 +25,7 @@ [Sources] [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec + OvmfPkg/OvmfPkg.dec SecurityPkg/SecurityPkg.dec =20 [LibraryClasses] @@ -43,5 +44,8 @@ [Ppis] [Pcd] gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid ## PROD= UCES =20 -[Depex] +[Depex.IA32, Depex.X64] TRUE + +[Depex.ARM, Depex.AARCH64] + gOvmfTpmDiscoveredPpiGuid --=20 2.17.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 (#54923): https://edk2.groups.io/g/devel/message/54923 Mute This Topic: https://groups.io/mt/71571514/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 Sun May 5 14:34:33 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+54924+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+54924+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1582743923; cv=none; d=zohomail.com; s=zohoarc; b=ZLjxmI3F2KgPRIdr6u0oCdsHZqv4xXyyunJIoRq5loGPd0FezZn2DMlvzcDdKJ7UZ3BjSkINr9wjv7puYqApTToygFCYkYQA7p1/JuuKLZBDy1bKnBDV3YbrKmP8YIUXIqOTzK1U8TZgc0Y26Y8wSxB/HCl+pgvaeFpk5vgIHnM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582743923; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=KiDRlGEuW8y4ENhzXepYtKIft6gV3IjtNSL/XeLOnPU=; b=fgj80giJpKkXV+So5edThYfhpXWhjI3rILgm4ArGlLB5B3xZUYZknrz4DbgFTvdQx/WWMKYioks7QDB7POKZw4K9Y1mJm0831T5e+YSJwdjPZnLY4e4UdXzdZJg+sXwXhjFQsUTiREbWoc1+gwtub2U84tYHSnBmDzVJYVOpHro= 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+54924+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 1582743923374298.5833705358983; Wed, 26 Feb 2020 11:05:23 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id YXrnYY1788612xf3HFmEw4gW; Wed, 26 Feb 2020 11:05:22 -0800 X-Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by mx.groups.io with SMTP id smtpd.web09.598.1582743921844490485 for ; Wed, 26 Feb 2020 11:05:22 -0800 X-Received: by mail-wr1-f67.google.com with SMTP id r17so69139wrj.7 for ; Wed, 26 Feb 2020 11:05:21 -0800 (PST) X-Gm-Message-State: AXz8BhFCcQDX0zTNqcwpx3PAx1787277AA= X-Google-Smtp-Source: APXvYqwyyYSE4SNxOnc1BH+r+lnnCj0slJWqFP9svkqdJmoVGQL5JTLVvenrx+b7gTbVug9UFsr6Pg== X-Received: by 2002:adf:fdc2:: with SMTP id i2mr124318wrs.166.1582743920206; Wed, 26 Feb 2020 11:05:20 -0800 (PST) X-Received: from e123331-lin.home ([2a01:cb1d:112:6f00:816e:ff0d:fb69:f613]) by smtp.gmail.com with ESMTPSA id z1sm3932823wmf.42.2020.02.26.11.05.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 11:05:19 -0800 (PST) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , lersek@redhat.com, eric.auger@redhat.com, philmd@redhat.com, marcandre.lureau@redhat.com, stefanb@linux.ibm.com, leif@nuviainc.com Subject: [edk2-devel] [PATCH v3 2/9] ArmVirtPkg/PlatformPeiLib: make PcdLib dependency explicit in .INF Date: Wed, 26 Feb 2020 20:05:07 +0100 Message-Id: <20200226190514.31395-3-ard.biesheuvel@linaro.org> In-Reply-To: <20200226190514.31395-1-ard.biesheuvel@linaro.org> References: <20200226190514.31395-1-ard.biesheuvel@linaro.org> 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1582743922; bh=4TidktuOCoH4HUhAWDtDF/t/bgScUpLjni8sEcDu9s0=; h=Cc:Date:From:Reply-To:Subject:To; b=wnDa4essD/FE62+4f1SBVI4/Sse+cepNGbsqc+TcpBIck1d/i+sVU+4MJLu2cXH3p+A nsHA2JDuzHhdJ+ZzH+9TgrIcwtFCoNK5+UeeVFujjUFSK9Pl2Icu7b6fUcICnj6xiv0QQ PSWHf4RHdX6B1axebBf8qxX2Vod9hDChouc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" We currently include PcdLib.h in PlatformPeiLib, without declaring this dependency in its .INF description. Since all the PCDs we use resolve to fixed type in practice, this does not really matter at the moment, but since we will be adding dynamic PCD references in a subsequent patch, let's make the PcdLib dependency explicit, so that its dispatch is guaranteed to be ordered correctly with respect to the provider of the dynamic PCD PPI. Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.inf | 1 + 1 file changed, 1 insertion(+) diff --git a/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.inf b/ArmVirt= Pkg/Library/PlatformPeiLib/PlatformPeiLib.inf index 46db117ac28e..5428040f121d 100644 --- a/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.inf +++ b/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.inf @@ -29,6 +29,7 @@ [LibraryClasses] DebugLib HobLib FdtLib + PcdLib =20 [FixedPcd] gArmTokenSpaceGuid.PcdFvSize --=20 2.17.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 (#54924): https://edk2.groups.io/g/devel/message/54924 Mute This Topic: https://groups.io/mt/71571515/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 Sun May 5 14:34:33 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+54925+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+54925+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1582743925; cv=none; d=zohomail.com; s=zohoarc; b=Ospp+dFYGH+1IaQK8yhzAguGlrKjzxGSIy+8gxVYOYE1yEz/s/FrUL9ju8tVymzT2j/yC8PTa9HGdfk2aaGFBEyHld4YJayCGFLI+SJOOACRk32visyFmBIDEs7JgbM9SYA55FfqldJEWwVf+sCBwjOC9gWAZkzv7wsaAds9+cE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582743925; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=rxhEu/EqIgD9sn5tLlk8zhuW2iMrPy+2GdUgvZlJyD0=; b=K3WFWsXWVPFbbEHGKmGi6z6ZsfuGj9CWLOLNdYHhl5plaiuBphF4Zgs5lNPs2o/o29LYBja17CCRxCX2/ScM54E1qTBIMRWzSWq4LCqhWfWMiUgqqqf9uV+4N5OLgdvWnbx+NwcKQVmTnrI6tweqruJMHnWa8j5NwwSyP1OMcDk= 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+54925+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 1582743925240584.0857557035081; Wed, 26 Feb 2020 11:05:25 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id Ck4JYY1788612x550zY6CInJ; Wed, 26 Feb 2020 11:05:24 -0800 X-Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by mx.groups.io with SMTP id smtpd.web09.599.1582743923502928121 for ; Wed, 26 Feb 2020 11:05:23 -0800 X-Received: by mail-wm1-f66.google.com with SMTP id q9so454308wmj.5 for ; Wed, 26 Feb 2020 11:05:23 -0800 (PST) X-Gm-Message-State: y3x5QrjicPGIIszMa5SqhG8px1787277AA= X-Google-Smtp-Source: APXvYqwkbe+D+lfOC1dzF+J58e00YeAPVYDMPbm9vQ46OiwDS6nUTf3Qyihen76oKwv/2sVwZukQJA== X-Received: by 2002:a05:600c:2302:: with SMTP id 2mr360869wmo.66.1582743921435; Wed, 26 Feb 2020 11:05:21 -0800 (PST) X-Received: from e123331-lin.home ([2a01:cb1d:112:6f00:816e:ff0d:fb69:f613]) by smtp.gmail.com with ESMTPSA id z1sm3932823wmf.42.2020.02.26.11.05.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 11:05:20 -0800 (PST) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , lersek@redhat.com, eric.auger@redhat.com, philmd@redhat.com, marcandre.lureau@redhat.com, stefanb@linux.ibm.com, leif@nuviainc.com Subject: [edk2-devel] [PATCH v3 3/9] ArmVirtPkg/PlatformPeiLib: discover the TPM base address from the DT Date: Wed, 26 Feb 2020 20:05:08 +0100 Message-Id: <20200226190514.31395-4-ard.biesheuvel@linaro.org> In-Reply-To: <20200226190514.31395-1-ard.biesheuvel@linaro.org> References: <20200226190514.31395-1-ard.biesheuvel@linaro.org> 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1582743924; bh=0Idh8tme1a1E4a5aMw9UWk1uHu/+1H4LhLSPDiwufIE=; h=Cc:Date:From:Reply-To:Subject:To; b=St7AMJrML/HI0rTK/nk6mEhhr/NsBMLLlwLr+FHz1yBPhYJ/JJmUgeswxLC18EG/RG5 Lv7dxCi5m7HdwkWbZKjZoTIFKkA/pCxkEc0LvmfYSasJQBYalHB2Qtj6uX1chQ5tcMd0v oocBom2cgQwPqbFjsPLBLNGBk8rqUoFWgCE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Introduce a boolean PCD that tells us whether TPM support is enabled in the build, and if it is, record the TPM base address in the existing routine that traverses the device tree in the platform PEIM. If a TPM is found, install the gOvmfTpmDiscoveredPpiGuid signalling PPI that will unlock the dispatch of OvmfPkg's Tcg2ConfigPei. If TPM2 support is enabled in the build but no TPM2 device is found, install the gPeiTpmInitializationDonePpiGuid PPI, which is normally installed by Tcg2ConfigPei if no TPM2 is found, but in our case Tcg2ConfigPei will never run so let's do it here instead. Signed-off-by: Ard Biesheuvel Acked-by: Laszlo Ersek --- ArmVirtPkg/ArmVirtPkg.dec | 6 ++ ArmVirtPkg/ArmVirtQemu.dsc | 5 + ArmVirtPkg/ArmVirtQemuKernel.dsc | 6 ++ ArmVirtPkg/ArmVirtXen.dsc | 6 ++ ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.c | 101 +++++++++++++++= +++-- ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.inf | 19 +++- 6 files changed, 129 insertions(+), 14 deletions(-) diff --git a/ArmVirtPkg/ArmVirtPkg.dec b/ArmVirtPkg/ArmVirtPkg.dec index a019cc269d10..08ddd68a863e 100644 --- a/ArmVirtPkg/ArmVirtPkg.dec +++ b/ArmVirtPkg/ArmVirtPkg.dec @@ -36,6 +36,12 @@ [Guids.common] [Protocols] gFdtClientProtocolGuid =3D { 0xE11FACA0, 0x4710, 0x4C8E, { 0xA7, 0xA2, 0= x01, 0xBA, 0xA2, 0x59, 0x1B, 0x4C } } =20 +[PcdsFeatureFlag] + # + # Feature Flag PCD that defines whether TPM2 support is enabled + # + gArmVirtTokenSpaceGuid.PcdTpm2SupportEnabled|FALSE|BOOLEAN|0x00000004 + [PcdsFixedAtBuild, PcdsPatchableInModule] # # This is the physical address where the device tree is expected to be s= tored diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 7ae6702ac1f0..7d05415d0f93 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -237,6 +237,11 @@ [PcdsDynamicDefault.common] gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0 gUefiOvmfPkgTokenSpaceGuid.PcdQemuSmbiosValidated|FALSE =20 + # + # TPM2 support + # + gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0 + [PcdsDynamicHii] gArmVirtTokenSpaceGuid.PcdForceNoAcpi|L"ForceNoAcpi"|gArmVirtVariableGui= d|0x0|FALSE|NV,BS =20 diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKerne= l.dsc index 3b0f04967a4b..720f8fa78b3d 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -172,6 +172,12 @@ [PcdsFixedAtBuild.common] gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|3 =20 [PcdsPatchableInModule.common] + # we need to provide a resolution for this PCD that supports PcdSet64() + # being called from ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.c, + # even though that call will be compiled out on this platform as it does + # not (and cannot) support the TPM2 driver stack + gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0 + # # This will be overridden in the code # diff --git a/ArmVirtPkg/ArmVirtXen.dsc b/ArmVirtPkg/ArmVirtXen.dsc index 1b42a9a81323..baa21f389947 100644 --- a/ArmVirtPkg/ArmVirtXen.dsc +++ b/ArmVirtPkg/ArmVirtXen.dsc @@ -95,6 +95,12 @@ [PcdsFixedAtBuild.common] gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE =20 [PcdsPatchableInModule.common] + # we need to provide a resolution for this PCD that supports PcdSet64() + # being called from ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.c, + # even though that call will be compiled out on this platform as it does + # not (and cannot) support the TPM2 driver stack + gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0 + # # This will be overridden in the code # diff --git a/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.c b/ArmVirtPk= g/Library/PlatformPeiLib/PlatformPeiLib.c index 0a1469550db0..8b5b3dd5dc1c 100644 --- a/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.c +++ b/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.c @@ -1,7 +1,7 @@ /** @file * * Copyright (c) 2011-2014, ARM Limited. All rights reserved. -* Copyright (c) 2014, Linaro Limited. All rights reserved. +* Copyright (c) 2014-2020, Linaro Limited. All rights reserved. * * SPDX-License-Identifier: BSD-2-Clause-Patent * @@ -13,11 +13,24 @@ #include #include #include +#include #include =20 #include #include =20 +STATIC CONST EFI_PEI_PPI_DESCRIPTOR mTpm2DiscoveredPpi =3D { + EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST, + &gOvmfTpmDiscoveredPpiGuid, + NULL +}; + +STATIC CONST EFI_PEI_PPI_DESCRIPTOR mTpm2InitializationDonePpi =3D { + EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST, + &gPeiTpmInitializationDonePpiGuid, + NULL +}; + EFI_STATUS EFIAPI PlatformPeim ( @@ -31,14 +44,18 @@ PlatformPeim ( UINT64 *FdtHobData; UINT64 *UartHobData; INT32 Node, Prev; + INT32 Parent, Depth; CONST CHAR8 *Compatible; CONST CHAR8 *CompItem; CONST CHAR8 *NodeStatus; INT32 Len; + INT32 RangesLen; INT32 StatusLen; CONST UINT64 *RegProp; + CONST UINT32 *RangesProp; UINT64 UartBase; - + UINT64 TpmBase; + EFI_STATUS Status; =20 Base =3D (VOID*)(UINTN)PcdGet64 (PcdDeviceTreeInitialBaseAddress); ASSERT (Base !=3D NULL); @@ -58,18 +75,18 @@ PlatformPeim ( ASSERT (UartHobData !=3D NULL); *UartHobData =3D 0; =20 - // - // Look for a UART node - // - for (Prev =3D 0;; Prev =3D Node) { - Node =3D fdt_next_node (Base, Prev, NULL); + TpmBase =3D 0; + + for (Prev =3D Depth =3D 0;; Prev =3D Node) { + Node =3D fdt_next_node (Base, Prev, &Depth); if (Node < 0) { break; } =20 - // - // Check for UART node - // + if (Depth =3D=3D 1) { + Parent =3D Node; + } + Compatible =3D fdt_getprop (Base, Node, "compatible", &Len); =20 // @@ -93,10 +110,74 @@ PlatformPeim ( =20 *UartHobData =3D UartBase; break; + } else if (FeaturePcdGet (PcdTpm2SupportEnabled) && + AsciiStrCmp (CompItem, "tcg,tpm-tis-mmio") =3D=3D 0) { + + RegProp =3D fdt_getprop (Base, Node, "reg", &Len); + ASSERT (Len =3D=3D 8 || Len =3D=3D 16); + if (Len =3D=3D 8) { + TpmBase =3D fdt32_to_cpu (RegProp[0]); + } else if (Len =3D=3D 16) { + TpmBase =3D fdt64_to_cpu (ReadUnaligned64 ((UINT64 *)RegProp)); + } + + if (Depth > 1) { + // + // QEMU/mach-virt may put the TPM on the platform bus, in which = case + // we have to take its 'ranges' property into account to transla= te the + // MMIO address. This consists of a + // tuple, where the child base and the size use the same number = of + // cells as the 'reg' property above, and the parent base uses 2= cells + // + RangesProp =3D fdt_getprop (Base, Parent, "ranges", &RangesLen); + ASSERT (RangesProp !=3D NULL); + + // + // a plain 'ranges' attribute without a value implies a 1:1 mapp= ing + // + if (RangesLen !=3D 0) { + // + // assume a single translated range with 2 cells for the paren= t base + // + if (RangesLen !=3D Len + 2 * sizeof (UINT32)) { + DEBUG ((DEBUG_WARN, + "%a: 'ranges' property has unexpected size %d\n", + __FUNCTION__, RangesLen)); + break; + } + + if (Len =3D=3D 8) { + TpmBase -=3D fdt32_to_cpu (RangesProp[0]); + } else { + TpmBase -=3D fdt64_to_cpu (ReadUnaligned64 ((UINT64 *)Ranges= Prop)); + } + + // + // advance RangesProp to the parent bus address + // + RangesProp =3D (UINT32 *)((UINT8 *)RangesProp + Len / 2); + TpmBase +=3D fdt64_to_cpu (ReadUnaligned64 ((UINT64 *)RangesPr= op)); + } + } + break; } } } =20 + if (FeaturePcdGet (PcdTpm2SupportEnabled)) { + if (TpmBase !=3D 0) { + DEBUG ((DEBUG_INFO, "%a: TPM @ 0x%lx\n", __FUNCTION__, TpmBase)); + + Status =3D (EFI_STATUS)PcdSet64S (PcdTpmBaseAddress, TpmBase); + ASSERT_EFI_ERROR (Status); + + Status =3D PeiServicesInstallPpi (&mTpm2DiscoveredPpi); + } else { + Status =3D PeiServicesInstallPpi (&mTpm2InitializationDonePpi); + } + ASSERT_EFI_ERROR (Status); + } + BuildFvHob (PcdGet64 (PcdFvBaseAddress), PcdGet32 (PcdFvSize)); =20 return EFI_SUCCESS; diff --git a/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.inf b/ArmVirt= Pkg/Library/PlatformPeiLib/PlatformPeiLib.inf index 5428040f121d..3f97ef080520 100644 --- a/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.inf +++ b/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.inf @@ -1,7 +1,7 @@ #/** @file # # Copyright (c) 2011-2015, ARM Limited. All rights reserved. -# Copyright (c) 2014, Linaro Limited. All rights reserved. +# Copyright (c) 2014-2020, Linaro Limited. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -11,7 +11,7 @@ [Defines] INF_VERSION =3D 0x00010005 BASE_NAME =3D PlatformPeiLib FILE_GUID =3D 59C11815-F8DA-4F49-B4FB-EC1E41ED1F06 - MODULE_TYPE =3D SEC + MODULE_TYPE =3D BASE VERSION_STRING =3D 1.0 LIBRARY_CLASS =3D PlatformPeiLib =20 @@ -21,15 +21,21 @@ [Sources] [Packages] ArmPkg/ArmPkg.dec ArmVirtPkg/ArmVirtPkg.dec - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec EmbeddedPkg/EmbeddedPkg.dec + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + OvmfPkg/OvmfPkg.dec + SecurityPkg/SecurityPkg.dec + +[FeaturePcd] + gArmVirtTokenSpaceGuid.PcdTpm2SupportEnabled =20 [LibraryClasses] DebugLib HobLib FdtLib PcdLib + PeiServicesLib =20 [FixedPcd] gArmTokenSpaceGuid.PcdFvSize @@ -38,6 +44,11 @@ [FixedPcd] [Pcd] gArmTokenSpaceGuid.PcdFvBaseAddress gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress + gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress ## SOMETIMES_PRO= DUCES + +[Ppis] + gOvmfTpmDiscoveredPpiGuid ## SOMETIMES_PRO= DUCES + gPeiTpmInitializationDonePpiGuid ## SOMETIMES_PRO= DUCES =20 [Guids] gEarlyPL011BaseAddressGuid --=20 2.17.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 (#54925): https://edk2.groups.io/g/devel/message/54925 Mute This Topic: https://groups.io/mt/71571517/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 Sun May 5 14:34:33 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+54926+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+54926+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1582743927; cv=none; d=zohomail.com; s=zohoarc; b=TgFx+Ot7fMePQek0XamG9NmghgREIwf3q0bXC04fMeOTK004L+XHxXvx8M2/rgwCIPN0G6nYIvbP0NAsu4Y1/DnDkBJ31mcvjRNQvjGO0c4s5KaagS23czu6cy78EDave3UWNl48qKZ9U6nbbtNwaJDedkeUxEiVOvnYbT455aQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582743927; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=9JKB5Xf9oKKWrNggo5YFwzxWCAuJHRkPrGJKFI/dIhY=; b=VwGmlWivprA3DLlrAt/6gC+aqi4zBd0JA0sTu+sWfO5iGBbaW+bOCEHEEwdEDAdCzLB5s72Z7VvUDm96XNaCsjYLJszynQFPUgsfMFhLi3+PLA8L6Y6nkmkIq0TCpjBVQOFP5vNK8hMIdMGxEr1t98yUlyfOD+UvVvuXyF5315s= 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+54926+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 15827439271991003.5008827964342; Wed, 26 Feb 2020 11:05:27 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id wnbZYY1788612xEFnkZJlWXT; Wed, 26 Feb 2020 11:05:26 -0800 X-Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mx.groups.io with SMTP id smtpd.web10.601.1582743925086080924 for ; Wed, 26 Feb 2020 11:05:25 -0800 X-Received: by mail-wr1-f44.google.com with SMTP id j7so24909wrp.13 for ; Wed, 26 Feb 2020 11:05:24 -0800 (PST) X-Gm-Message-State: BNWzASBXjCJpL3ILQk0GBW3jx1787277AA= X-Google-Smtp-Source: APXvYqxyIy/YPupp5FpspTWBRxUOacziYpaV1kL7e4waxUQnGofQpv1QCVNvStFzK92FlSLrUC1DGA== X-Received: by 2002:adf:e5c2:: with SMTP id a2mr84741wrn.85.1582743923176; Wed, 26 Feb 2020 11:05:23 -0800 (PST) X-Received: from e123331-lin.home ([2a01:cb1d:112:6f00:816e:ff0d:fb69:f613]) by smtp.gmail.com with ESMTPSA id z1sm3932823wmf.42.2020.02.26.11.05.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 11:05:21 -0800 (PST) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , lersek@redhat.com, eric.auger@redhat.com, philmd@redhat.com, marcandre.lureau@redhat.com, stefanb@linux.ibm.com, leif@nuviainc.com Subject: [edk2-devel] [PATCH v3 4/9] ArmVirtPkg: implement ArmVirtPsciResetSystemPeiLib Date: Wed, 26 Feb 2020 20:05:09 +0100 Message-Id: <20200226190514.31395-5-ard.biesheuvel@linaro.org> In-Reply-To: <20200226190514.31395-1-ard.biesheuvel@linaro.org> References: <20200226190514.31395-1-ard.biesheuvel@linaro.org> 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1582743926; bh=KhuVr20AkmZxi2uri9MtnyBaVIPnqrqIKX5JX+X4vp0=; h=Cc:Date:From:Reply-To:Subject:To; b=CN+H/PiHaxPlxq/gKplSJuOm0+JSG0rW8pEKYoV4s2YRsM3QDgGw99G8o6j1V707Pbw +VIboNcGrKKECVOJXsRPxnSZSH50oxxThxpHIbsYxngO4OYMWX+6OAUZrfHtoQziq/e6p VtmEiLoJcgwmgV4roU4usif4cWDSbvITokk= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Implement a ArmVirtPkg specific version of the PSCI ResetSystemLib that is usable in the PEI phase, as the existing one relies on the FDT client protocol, making it unsuitable. Note that accessing the device tree passed by QEMU via its initial base address is guaranteed to be safe at any time during the PEI phase, so we can defer discovery of the PSCI method until the time the reset library is actually invoked (which is rarely) Signed-off-by: Ard Biesheuvel Acked-by: Laszlo Ersek --- ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiL= ib.c | 232 ++++++++++++++++++++ ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiL= ib.inf | 39 ++++ 2 files changed, 271 insertions(+) diff --git a/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciRes= etSystemPeiLib.c b/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtP= sciResetSystemPeiLib.c new file mode 100644 index 000000000000..394a04e3c384 --- /dev/null +++ b/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSyste= mPeiLib.c @@ -0,0 +1,232 @@ +/** @file + Reset System lib using PSCI hypervisor or secure monitor calls + + Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
+ Copyright (c) 2013, ARM Ltd. All rights reserved.
+ Copyright (c) 2014-2020, Linaro Ltd. All rights reserved.
+ Copyright (c) 2019, Intel Corporation. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +typedef enum { + PsciMethodUnknown, + PsciMethodSmc, + PsciMethodHvc, +} PSCI_METHOD; + +STATIC +PSCI_METHOD +DiscoverPsciMethod ( + VOID + ) +{ + VOID *DeviceTreeBase; + INT32 Node, Prev; + INT32 Len; + CONST CHAR8 *Compatible; + CONST CHAR8 *CompatibleItem; + CONST VOID *Prop; + + DeviceTreeBase =3D (VOID*)(UINTN)PcdGet64 (PcdDeviceTreeInitialBaseAddre= ss); + ASSERT (fdt_check_header (DeviceTreeBase) =3D=3D 0); + + // + // Enumerate all FDT nodes looking for the PSCI node and capture the met= hod + // + for (Prev =3D 0;; Prev =3D Node) { + Node =3D fdt_next_node (DeviceTreeBase, Prev, NULL); + if (Node < 0) { + break; + } + + Compatible =3D fdt_getprop (DeviceTreeBase, Node, "compatible", &Len); + if (Compatible =3D=3D NULL) { + continue; + } + + // + // Iterate over the NULL-separated items in the compatible string + // + for (CompatibleItem =3D Compatible; CompatibleItem < Compatible + Len; + CompatibleItem +=3D 1 + AsciiStrLen (CompatibleItem)) { + + if (AsciiStrCmp (CompatibleItem, "arm,psci-0.2") !=3D 0) { + continue; + } + + Prop =3D fdt_getprop (DeviceTreeBase, Node, "method", NULL); + if (!Prop) { + DEBUG ((DEBUG_ERROR, "%a: Missing PSCI method property\n", + __FUNCTION__)); + return PsciMethodUnknown; + } + + if (AsciiStrnCmp (Prop, "hvc", 3) =3D=3D 0) { + return PsciMethodHvc; + } else if (AsciiStrnCmp (Prop, "smc", 3) =3D=3D 0) { + return PsciMethodSmc; + } else { + DEBUG ((DEBUG_ERROR, "%a: Unknown PSCI method \"%a\"\n", __FUNCTIO= N__, + Prop)); + return PsciMethodUnknown; + } + } + } + return PsciMethodUnknown; +} + +STATIC +VOID +PerformPsciAction ( + IN UINTN Arg0 + ) +{ + ARM_SMC_ARGS ArmSmcArgs; + ARM_HVC_ARGS ArmHvcArgs; + + ArmSmcArgs.Arg0 =3D Arg0; + ArmHvcArgs.Arg0 =3D Arg0; + + switch (DiscoverPsciMethod ()) { + case PsciMethodHvc: + ArmCallHvc (&ArmHvcArgs); + break; + + case PsciMethodSmc: + ArmCallSmc (&ArmSmcArgs); + break; + + default: + DEBUG ((DEBUG_ERROR, "%a: no PSCI method defined\n", __FUNCTION__)); + ASSERT (FALSE); + } +} + +/** + This function causes a system-wide reset (cold reset), in which + all circuitry within the system returns to its initial state. This type = of reset + is asynchronous to system operation and operates without regard to + cycle boundaries. + + If this function returns, it means that the system does not support cold= reset. +**/ +VOID +EFIAPI +ResetCold ( + VOID + ) +{ + // Send a PSCI 0.2 SYSTEM_RESET command + PerformPsciAction (ARM_SMC_ID_PSCI_SYSTEM_RESET); +} + +/** + This function causes a system-wide initialization (warm reset), in which= all processors + are set to their initial state. Pending cycles are not corrupted. + + If this function returns, it means that the system does not support warm= reset. +**/ +VOID +EFIAPI +ResetWarm ( + VOID + ) +{ + // Map a warm reset into a cold reset + ResetCold (); +} + +/** + This function causes the system to enter a power state equivalent + to the ACPI G2/S5 or G3 states. + + If this function returns, it means that the system does not support shut= down reset. +**/ +VOID +EFIAPI +ResetShutdown ( + VOID + ) +{ + // Send a PSCI 0.2 SYSTEM_OFF command + PerformPsciAction (ARM_SMC_ID_PSCI_SYSTEM_OFF); +} + +/** + This function causes a systemwide reset. The exact type of the reset is + defined by the EFI_GUID that follows the Null-terminated Unicode string = passed + into ResetData. If the platform does not recognize the EFI_GUID in Reset= Data + the platform must pick a supported reset type to perform.The platform may + optionally log the parameters from any non-normal reset that occurs. + + @param[in] DataSize The size, in bytes, of ResetData. + @param[in] ResetData The data buffer starts with a Null-terminated str= ing, + followed by the EFI_GUID. +**/ +VOID +EFIAPI +ResetPlatformSpecific ( + IN UINTN DataSize, + IN VOID *ResetData + ) +{ + // Map the platform specific reset as reboot + ResetCold (); +} + +/** + The ResetSystem function resets the entire platform. + + @param[in] ResetType The type of reset to perform. + @param[in] ResetStatus The status code for the reset. + @param[in] DataSize The size, in bytes, of ResetData. + @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm,= or EfiResetShutdown + the data buffer starts with a Null-terminated = string, optionally + followed by additional binary data. The string= is a description + that the caller may use to further indicate th= e reason for the + system reset. +**/ +VOID +EFIAPI +ResetSystem ( + IN EFI_RESET_TYPE ResetType, + IN EFI_STATUS ResetStatus, + IN UINTN DataSize, + IN VOID *ResetData OPTIONAL + ) +{ + switch (ResetType) { + case EfiResetWarm: + ResetWarm (); + break; + + case EfiResetCold: + ResetCold (); + break; + + case EfiResetShutdown: + ResetShutdown (); + return; + + case EfiResetPlatformSpecific: + ResetPlatformSpecific (DataSize, ResetData); + return; + + default: + return; + } +} diff --git a/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciRes= etSystemPeiLib.inf b/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVir= tPsciResetSystemPeiLib.inf new file mode 100644 index 000000000000..3a65706e8dc6 --- /dev/null +++ b/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSyste= mPeiLib.inf @@ -0,0 +1,39 @@ +#/** @file +# Reset System lib using PSCI hypervisor or secure monitor calls +# +# Copyright (c) 2008, Apple Inc. All rights reserved.
+# Copyright (c) 2014-2020, Linaro Ltd. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# +#**/ + +[Defines] + INF_VERSION =3D 1.27 + BASE_NAME =3D ArmVirtPsciResetSystemPeiLib + FILE_GUID =3D 551cfb98-c185-41a3-86bf-8cdb7e2a530c + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D ResetSystemLib|PEIM + +[Sources] + ArmVirtPsciResetSystemPeiLib.c + +[Packages] + ArmPkg/ArmPkg.dec + ArmVirtPkg/ArmVirtPkg.dec + EmbeddedPkg/EmbeddedPkg.dec + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + +[LibraryClasses] + ArmSmcLib + ArmHvcLib + BaseLib + DebugLib + FdtLib + HobLib + +[Pcd] + gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress --=20 2.17.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 (#54926): https://edk2.groups.io/g/devel/message/54926 Mute This Topic: https://groups.io/mt/71571519/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 Sun May 5 14:34:33 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+54927+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+54927+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1582743928; cv=none; d=zohomail.com; s=zohoarc; b=ZD1FX30Vjh3GUa3L9qbIq5koQ6vycCm+y/YEd8GcPPRC+kaEOve+51PIF/WrvBwy5RZZy6HiYSyl+ZRAB71sDHZOf/lrpFVBQtUFfZQkDIqgYGD7iyJGerws7QUHjwP2g3bi+TZrEBg9cqekIjnUdKwsw2OXCMJWqg9jNfahp18= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582743928; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=gycBdHVtiTEXafGEsCuNKCLKiPHVIkl0zEjPKe8jAQ4=; b=E+6gAfTjTlxD5tsLButAGlX5N2koEXGCNgkv4s/ygv9wxeqCcATrKBmg0FJZO9cLXUP7W/IAQvMg1yrOvVWR+swaGA7lIhZ2LBKh/js2imOouxBPulpwkUNQ7AVqCrgbtqqrovSQJ54aBZ6NiwER1smeyFSmu84hI4m59FHJ910= 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+54927+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 158274392867884.43358357542502; Wed, 26 Feb 2020 11:05:28 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id HKHaYY1788612xeza0Fj737x; Wed, 26 Feb 2020 11:05:27 -0800 X-Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mx.groups.io with SMTP id smtpd.web10.602.1582743926546577566 for ; Wed, 26 Feb 2020 11:05:26 -0800 X-Received: by mail-wr1-f68.google.com with SMTP id w12so104148wrt.2 for ; Wed, 26 Feb 2020 11:05:26 -0800 (PST) X-Gm-Message-State: OpdIduO1RZshMDzsBQvX0VGfx1787277AA= X-Google-Smtp-Source: APXvYqwAk45Ma7g+vox9ns1lv+sw11FZCqwydwOHt18vo6lJ2r0ErbXHRXVqKbwNQbPjvynA8eiuTQ== X-Received: by 2002:adf:facc:: with SMTP id a12mr121251wrs.100.1582743924759; Wed, 26 Feb 2020 11:05:24 -0800 (PST) X-Received: from e123331-lin.home ([2a01:cb1d:112:6f00:816e:ff0d:fb69:f613]) by smtp.gmail.com with ESMTPSA id z1sm3932823wmf.42.2020.02.26.11.05.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 11:05:23 -0800 (PST) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , lersek@redhat.com, eric.auger@redhat.com, philmd@redhat.com, marcandre.lureau@redhat.com, stefanb@linux.ibm.com, leif@nuviainc.com Subject: [edk2-devel] [PATCH v3 5/9] ArmVirtPkg/ArmVirtQemu: add ResetSystem PEIM for upcoming TPM2 support Date: Wed, 26 Feb 2020 20:05:10 +0100 Message-Id: <20200226190514.31395-6-ard.biesheuvel@linaro.org> In-Reply-To: <20200226190514.31395-1-ard.biesheuvel@linaro.org> References: <20200226190514.31395-1-ard.biesheuvel@linaro.org> 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1582743927; bh=+xZSCBqPnBmErRD2y/09OIR03nvh8GxVYz4isg7PJXU=; h=Cc:Date:From:Reply-To:Subject:To; b=vq0XVOjjjpDAaxqGyVpw3jVctcNTIpxUenMs5oXIwIjia46f0GdZD80D8G2VpX8vJXF LcMDgOygsJmggU4fIhSYa5OagLJ1ex61imbVmQRsC2vAXtuYZjrkPTVFNg4imhNVnergW dPDmeeY3q+cYW/MemSnyTLbtjQh6EwjtbGs= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" As a first step in gradually adding TPM2 support to ArmVirtQemu, add the TPM2_ENABLE configurable to the [Defines] section, and if it is set, add the ResetSystem PEIM to the build, along with the library class references that we will need to support it: - wire ArmVirtPsciResetSystemPeiLib into the ResetSystem PEIM itself, which will be in charge of performing the actual reset - add PeiResetSystemLib as the common ResetSystemLib resolution for PEIM class modules, so that other PEIMs will invoke the PPI published by the ResetSystem PEIM. Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- ArmVirtPkg/ArmVirtQemu.dsc | 14 ++++++++++++++ ArmVirtPkg/ArmVirtQemu.fdf | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 7d05415d0f93..d1757cdba671 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -29,6 +29,7 @@ [Defines] # DEFINE TTY_TERMINAL =3D FALSE DEFINE SECURE_BOOT_ENABLE =3D FALSE + DEFINE TPM2_ENABLE =3D FALSE =20 # # Network definition @@ -77,6 +78,10 @@ [LibraryClasses.common] [LibraryClasses.common.PEIM] ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoP= eiLib.inf =20 +!if $(TPM2_ENABLE) =3D=3D TRUE + ResetSystemLib|MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.= inf +!endif + [LibraryClasses.common.DXE_DRIVER] ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf =20 @@ -100,6 +105,8 @@ [PcdsFeatureFlag.common] =20 gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE =20 + gArmVirtTokenSpaceGuid.PcdTpm2SupportEnabled|$(TPM2_ENABLE) + [PcdsFixedAtBuild.common] !if $(ARCH) =3D=3D AARCH64 gArmTokenSpaceGuid.PcdVFPEnabled|1 @@ -266,6 +273,13 @@ [Components.common] =20 MdeModulePkg/Universal/Variable/Pei/VariablePei.inf =20 +!if $(TPM2_ENABLE) =3D=3D TRUE + MdeModulePkg/Universal/ResetSystemPei/ResetSystemPei.inf { + + ResetSystemLib|ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVi= rtPsciResetSystemPeiLib.inf + } +!endif + MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf { NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompre= ssLib.inf diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf index 2c8936a1ae15..f55918d26b06 100644 --- a/ArmVirtPkg/ArmVirtQemu.fdf +++ b/ArmVirtPkg/ArmVirtQemu.fdf @@ -113,6 +113,10 @@ [FV.FVMAIN_COMPACT] INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf =20 +!if $(TPM2_ENABLE) =3D=3D TRUE + INF MdeModulePkg/Universal/ResetSystemPei/ResetSystemPei.inf +!endif + FILE FV_IMAGE =3D 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 { SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRE= D =3D TRUE { SECTION FV_IMAGE =3D FVMAIN --=20 2.17.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 (#54927): https://edk2.groups.io/g/devel/message/54927 Mute This Topic: https://groups.io/mt/71571520/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 Sun May 5 14:34:33 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+54928+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+54928+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1582743929; cv=none; d=zohomail.com; s=zohoarc; b=VJ23AwXs5jJ4pPTS8AOs88ADt36Hxk0R2U9qs5UG/aYDB4fEKsxHGNP/8Qlc8kEK8xGPWiMskLCApoyJikawO0I+92pmwq6nnqBCqcd+Be+jhpkDPwCIYiJqgFNT0N8VjtTRA/o9P3Wm/V7KCXuXph0Dk1HXxPiabUxbGjpCXe0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582743929; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=rjeVq/ZPf/HqxsLCNobstWmbNjD7dfWDuAWrX46nf1c=; b=dIoCgJooc+PBNeGeUE35FK8cg9l7AtVVXN8ZOQHZGTpck+bavJNGQ+MluhzlMHeJXj8vQXjZSBbPnoY8AJyhgJtjcppMVGhenhCbsdcMi24C2duOqiEmRxHgifapvDTMZc7URgeid2668Ebr3VAMlDi3yv16zt7dPqpY2wImJgM= 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+54928+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 158274392993332.59919629297826; Wed, 26 Feb 2020 11:05:29 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id fECQYY1788612xnZk21eqOMZ; Wed, 26 Feb 2020 11:05:29 -0800 X-Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mx.groups.io with SMTP id smtpd.web09.600.1582743928375448381 for ; Wed, 26 Feb 2020 11:05:28 -0800 X-Received: by mail-wr1-f42.google.com with SMTP id v2so31201wrp.12 for ; Wed, 26 Feb 2020 11:05:28 -0800 (PST) X-Gm-Message-State: YHyLA1d7akdoNKk8wwgc34t3x1787277AA= X-Google-Smtp-Source: APXvYqwU8DSYEpvYLiTkF4G1n4o0MiSxDLIhZW5eyTMBS/4CDT0KEXmpPHSkgXz3VrY8vKYgrvXMfw== X-Received: by 2002:adf:8b59:: with SMTP id v25mr67596wra.419.1582743926102; Wed, 26 Feb 2020 11:05:26 -0800 (PST) X-Received: from e123331-lin.home ([2a01:cb1d:112:6f00:816e:ff0d:fb69:f613]) by smtp.gmail.com with ESMTPSA id z1sm3932823wmf.42.2020.02.26.11.05.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 11:05:25 -0800 (PST) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , lersek@redhat.com, eric.auger@redhat.com, philmd@redhat.com, marcandre.lureau@redhat.com, stefanb@linux.ibm.com, leif@nuviainc.com Subject: [edk2-devel] [PATCH v3 6/9] ArmVirtPkg/ArmVirtQemu: enable TPM2 support in the PEI phase Date: Wed, 26 Feb 2020 20:05:11 +0100 Message-Id: <20200226190514.31395-7-ard.biesheuvel@linaro.org> In-Reply-To: <20200226190514.31395-1-ard.biesheuvel@linaro.org> References: <20200226190514.31395-1-ard.biesheuvel@linaro.org> 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1582743929; bh=GQhlnWVk4ucLJ0Q9jcrteati7tHwhkBcIG4pVjv2aYc=; h=Cc:Date:From:Reply-To:Subject:To; b=qNDtkx1q0RDbQih3Y8624QfL+EjnaTWBUzrLhuwgXSehZ/ZboRXS1zzPw8BqePr1oMa XnFHz1Vm/y0QthxjZi5lX222kgwAi15mCJoyoxxnntzZCLMxeVauYUWq2R91zrSs9Wi1M nOPqZzyQjqOkccf7IMMWPNFo1Ox5zQx31s8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Incorporate the PEI components and the associated library class resolutions and PCD declarations to enable TPM2 support in the PEI phase. Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- ArmVirtPkg/ArmVirtQemu.dsc | 20 ++++++++++++++++++++ ArmVirtPkg/ArmVirtQemu.fdf | 2 ++ 2 files changed, 22 insertions(+) diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index d1757cdba671..8950116dacab 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -75,11 +75,17 @@ [LibraryClasses.common] PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.i= nf PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridge= Lib.inf =20 +!if $(TPM2_ENABLE) =3D=3D TRUE + Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf +!endif + [LibraryClasses.common.PEIM] ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoP= eiLib.inf =20 !if $(TPM2_ENABLE) =3D=3D TRUE + BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf ResetSystemLib|MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.= inf + Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf !endif =20 [LibraryClasses.common.DXE_DRIVER] @@ -248,6 +254,10 @@ [PcdsDynamicDefault.common] # TPM2 support # gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0 +!if $(TPM2_ENABLE) =3D=3D TRUE + gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid|{0x00, 0x00, 0x00, 0x00= , 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} + gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask|0 +!endif =20 [PcdsDynamicHii] gArmVirtTokenSpaceGuid.PcdForceNoAcpi|L"ForceNoAcpi"|gArmVirtVariableGui= d|0x0|FALSE|NV,BS @@ -278,6 +288,16 @@ [Components.common] ResetSystemLib|ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVi= rtPsciResetSystemPeiLib.inf } + OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf + SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf { + + HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCrypt= oRouterPei.inf + NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf + NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256= .inf + NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384= .inf + NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512= .inf + NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf + } !endif =20 MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf { diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf index f55918d26b06..b5e2253295fe 100644 --- a/ArmVirtPkg/ArmVirtQemu.fdf +++ b/ArmVirtPkg/ArmVirtQemu.fdf @@ -115,6 +115,8 @@ [FV.FVMAIN_COMPACT] =20 !if $(TPM2_ENABLE) =3D=3D TRUE INF MdeModulePkg/Universal/ResetSystemPei/ResetSystemPei.inf + INF OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf + INF SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf !endif =20 FILE FV_IMAGE =3D 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 { --=20 2.17.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 (#54928): https://edk2.groups.io/g/devel/message/54928 Mute This Topic: https://groups.io/mt/71571523/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 Sun May 5 14:34:33 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+54929+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+54929+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1582743931; cv=none; d=zohomail.com; s=zohoarc; b=KCR5l+KEnjTLNisi6X73ILSrFQfLHElTZuQ5nhcW2UL4BGP+91HR3/ZvIE10Lk1uYJ6nvO7jZJdmv07InEYsUN6IQZnuxDnTMrqC8BPN8amjHhR29Ci4k1oKZkrU2uLNU/3jSpnxPC9yZIpTncuZHEvtegITGEa/0BgGag7rT5s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582743931; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=VC4vB36SmBFRpPm+YBHrYHnuIaxGVQT3a04yMScleuc=; b=QnGhOOvtvZ86aUiQ/aiE0y52caHIzzqXb/Gfb8p+MzY7cf2xFXk4XWK8qEU+lMKf2zpZGUCMfO6lUFh5fVGdg++6/d22SxKBaHzYvC24FM8mvAJ0rFk6a1JYVniyBshSwg2AdYTpVjzcZFhfvNZfn9rANAY6lZaQEko9Tv5FIP0= 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+54929+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 1582743931203140.35336834935993; Wed, 26 Feb 2020 11:05:31 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id AksqYY1788612xP9U5Rx4k2t; Wed, 26 Feb 2020 11:05:30 -0800 X-Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mx.groups.io with SMTP id smtpd.web10.603.1582743929521034145 for ; Wed, 26 Feb 2020 11:05:29 -0800 X-Received: by mail-wr1-f49.google.com with SMTP id v2so31272wrp.12 for ; Wed, 26 Feb 2020 11:05:29 -0800 (PST) X-Gm-Message-State: LN8qtLma2O456hOiwkk52z5Cx1787277AA= X-Google-Smtp-Source: APXvYqy7nVHnTuNoRh+4eHEY+8pzBTYxeqeYL+icbLxANB0TqM1QnAZi0ABvK4u8KsNkinLYscJQIw== X-Received: by 2002:a5d:5224:: with SMTP id i4mr67079wra.285.1582743927818; Wed, 26 Feb 2020 11:05:27 -0800 (PST) X-Received: from e123331-lin.home ([2a01:cb1d:112:6f00:816e:ff0d:fb69:f613]) by smtp.gmail.com with ESMTPSA id z1sm3932823wmf.42.2020.02.26.11.05.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 11:05:27 -0800 (PST) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , lersek@redhat.com, eric.auger@redhat.com, philmd@redhat.com, marcandre.lureau@redhat.com, stefanb@linux.ibm.com, leif@nuviainc.com Subject: [edk2-devel] [PATCH v3 7/9] ArmVirtPkg/ArmVirtQemu: enable the DXE phase TPM2 support module Date: Wed, 26 Feb 2020 20:05:12 +0100 Message-Id: <20200226190514.31395-8-ard.biesheuvel@linaro.org> In-Reply-To: <20200226190514.31395-1-ard.biesheuvel@linaro.org> References: <20200226190514.31395-1-ard.biesheuvel@linaro.org> 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1582743930; bh=sZ+U9VddWzatGXok5xP06eGrKgR8E5srCFu/UEoMtx4=; h=Cc:Date:From:Reply-To:Subject:To; b=sR93hCXYZF6s6xOx+Z06z2nKowCSlhy4HJztRQ12YtIf+n6a1aM8+k9BOee4/o6Juqf 5Msuh99l+VxwqtJSAHSJA+O60nO5MpNyQDv/RL4R07Nw7OeEaYlN4eilSm++3nTU0eeZL paIF4cApgaPZUQyeCJ6I60J46seZ8PUg6SU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Enable the TPM2 support module in the DXE phase, and the associated libraries and PCDs that it requires. This will be wired into the measured boot support code in a subsequent patch. Note that Tcg2Dxe.inf is added to ArmVirtQemuFvMain.fdf.inc, which is shared with other platforms in ArmVirtPkg, but as those will not set the TPM2_ENABLE define, this change does not affect them. Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/ArmVirtQemu.dsc | 23 ++++++++++++++++++++ ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 7 ++++++ 2 files changed, 30 insertions(+) diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 8950116dacab..9fe5ab37611c 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -77,6 +77,8 @@ [LibraryClasses.common] =20 !if $(TPM2_ENABLE) =3D=3D TRUE Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf + Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibQemu/DxeT= cg2PhysicalPresenceLib.inf + TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure= mentLib.inf !endif =20 [LibraryClasses.common.PEIM] @@ -91,6 +93,10 @@ [LibraryClasses.common.PEIM] [LibraryClasses.common.DXE_DRIVER] ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf =20 +!if $(TPM2_ENABLE) =3D=3D TRUE + Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf +!endif + [LibraryClasses.common.UEFI_DRIVER] UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf =20 @@ -469,6 +475,23 @@ [Components.common] MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf =20 + # + # TPM2 support + # +!if $(TPM2_ENABLE) =3D=3D TRUE + SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf { + + HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCrypt= oRouterDxe.inf + Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibR= outerDxe.inf + NULL|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf + NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf + NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256= .inf + NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384= .inf + NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512= .inf + NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf + } +!endif + # # ACPI Support # diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuF= vMain.fdf.inc index 31f615a9d0f9..63247fd10058 100644 --- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc +++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc @@ -182,3 +182,10 @@ [FV.FvMain] # Ramdisk support # INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf + + # + # TPM2 support + # +!if $(TPM2_ENABLE) =3D=3D TRUE + INF SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf +!endif --=20 2.17.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 (#54929): https://edk2.groups.io/g/devel/message/54929 Mute This Topic: https://groups.io/mt/71571524/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 Sun May 5 14:34:33 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+54930+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+54930+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1582743932; cv=none; d=zohomail.com; s=zohoarc; b=eTbLNiylfy5dDN+9gq8jB8kH8IhMXEdtPfbckcmnH/FYFSvkyYLpLeb+phau9uhtnGw6usCNrtS/L5LOv0G+vQ1EjLEXHB1noPoVSAHDCD6FHLdAUIjcYSxgz39GG1qMeVxwJhr9nYgUAsD911ZRM8GDAzgGjU8/t3Oj3mlVBpA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582743932; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=H6E/gn5OnF5rBnYm/y7NA0xqsiZjcHWvig9lc9702NY=; b=atfPquEyYskkO8vmoyRreS9F9SvIgpvpBpQ77lbjZkpHDaiT7VOIZjzCci/y1uHm24B5QGT0VaZtEwAJnG0YrLGouuUxubg/zrPZOyqsYJqBpoGhD2ks+U3Cmi82W4w4FeU5/zcGj8iojimOPDuEzn8Gyd8kCIdoQqPUZ13lFXM= 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+54930+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 1582743932501644.6112131143276; Wed, 26 Feb 2020 11:05:32 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id HheQYY1788612x56hC5Kch7i; Wed, 26 Feb 2020 11:05:31 -0800 X-Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by mx.groups.io with SMTP id smtpd.web12.591.1582743930845765295 for ; Wed, 26 Feb 2020 11:05:31 -0800 X-Received: by mail-wm1-f65.google.com with SMTP id q9so454992wmj.5 for ; Wed, 26 Feb 2020 11:05:30 -0800 (PST) X-Gm-Message-State: zFeS9rCVhMHqjG2WDtJkSZUUx1787277AA= X-Google-Smtp-Source: APXvYqy2yAObSQ7w459Ax+ONu1sY0YnFgIrgI0o2zkDeBiFUFxmCWAf9/+DpX9VtGb1WmSm0hF7sdA== X-Received: by 2002:a05:600c:2104:: with SMTP id u4mr307153wml.93.1582743929176; Wed, 26 Feb 2020 11:05:29 -0800 (PST) X-Received: from e123331-lin.home ([2a01:cb1d:112:6f00:816e:ff0d:fb69:f613]) by smtp.gmail.com with ESMTPSA id z1sm3932823wmf.42.2020.02.26.11.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 11:05:28 -0800 (PST) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , lersek@redhat.com, eric.auger@redhat.com, philmd@redhat.com, marcandre.lureau@redhat.com, stefanb@linux.ibm.com, leif@nuviainc.com Subject: [edk2-devel] [PATCH v3 8/9] ArmVirtPkg/ArmVirtQemu: enable the TPM2 configuration module Date: Wed, 26 Feb 2020 20:05:13 +0100 Message-Id: <20200226190514.31395-9-ard.biesheuvel@linaro.org> In-Reply-To: <20200226190514.31395-1-ard.biesheuvel@linaro.org> References: <20200226190514.31395-1-ard.biesheuvel@linaro.org> 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1582743931; bh=+K+EfJqWi2W18CxOAYBki08pNf2SBtkB3+73iWcB3K4=; h=Cc:Date:From:Reply-To:Subject:To; b=IRIwrwPNIJYky7nOIjd1BfcqQ55Q1wFj34gVwOCVYRRveeEcI+kqDEOZjCBbmvXLI1D ZpPJjcq/RylTB8Mh2rRNeNS5d3SzK9206svNh6pk3b6lDN8RVkBSouKgoV3c4+zASl3Ih hv3OUMFdcLgSTrbbhiHRaiDCzqb55nuDg3I= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Enable the DXE phase component that publishes the HII pages and associated logic to enable TPM2 parameters to be configured by the user via the setup menu. Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- ArmVirtPkg/ArmVirtQemu.dsc | 9 +++++++++ ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 3 +++ 2 files changed, 12 insertions(+) diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 9fe5ab37611c..7cb2d1b42fb8 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -30,6 +30,7 @@ [Defines] DEFINE TTY_TERMINAL =3D FALSE DEFINE SECURE_BOOT_ENABLE =3D FALSE DEFINE TPM2_ENABLE =3D FALSE + DEFINE TPM2_CONFIG_ENABLE =3D FALSE =20 # # Network definition @@ -268,6 +269,11 @@ [PcdsDynamicDefault.common] [PcdsDynamicHii] gArmVirtTokenSpaceGuid.PcdForceNoAcpi|L"ForceNoAcpi"|gArmVirtVariableGui= d|0x0|FALSE|NV,BS =20 +!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 @@ -490,6 +496,9 @@ [Components.common] 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 # diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuF= vMain.fdf.inc index 63247fd10058..d481e4b2b8fb 100644 --- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc +++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc @@ -188,4 +188,7 @@ [FV.FvMain] # !if $(TPM2_ENABLE) =3D=3D TRUE INF SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf +!if $(TPM2_CONFIG_ENABLE) =3D=3D TRUE + INF SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf +!endif !endif --=20 2.17.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 (#54930): https://edk2.groups.io/g/devel/message/54930 Mute This Topic: https://groups.io/mt/71571525/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 Sun May 5 14:34:33 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+54931+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+54931+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1582743933; cv=none; d=zohomail.com; s=zohoarc; b=j0yP2cJG1bjNCI/m+hd25iaCpPlbkLtZYT0MUXuvWQtfxx+acIzT48i4iGJB8pwYQKjDJ5Bw9DuAY7qogDJkax6qY8TRDmYUT2vXf9wAj6rpuO+W/0SdkPlAeLAPjxek6SmXjBmG3WGO45bR7PmFmp87FCkbY7LFIjzxSOcWrH4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582743933; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=dxZkOmN1Zo5fiTpU1XnasTcpV+dhyEoYup/Hz2RVWBs=; b=NMQeALGfqBgzjG40dPEj1dEFwzhyl2ndANCEHH9jZJLVV/R743GQchvWIJwGlAAW8Igva3fbTRPCUBtxHuPs7m5XaazIORMlX1i1xKXLnz+JWh+o0CrSputn6hU6aJy+8RE6kzxyGrlLBRpqgf0kkIDjjwzYFF0tbxy1uH+WVE8= 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+54931+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 1582743933917735.5654333091735; Wed, 26 Feb 2020 11:05:33 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id H3mFYY1788612xqtFGZhKefQ; Wed, 26 Feb 2020 11:05:33 -0800 X-Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mx.groups.io with SMTP id smtpd.web09.603.1582743932155426808 for ; Wed, 26 Feb 2020 11:05:32 -0800 X-Received: by mail-wr1-f68.google.com with SMTP id m16so40128wrx.11 for ; Wed, 26 Feb 2020 11:05:31 -0800 (PST) X-Gm-Message-State: rVGLU5QsdtTbHGe9BIEUvSALx1787277AA= X-Google-Smtp-Source: APXvYqxYH731OovudUmpADM0R0GtdKC+sw7FeD0j0pwICKkITiBnDH1TPdgYWh/H1q9I7k4wf+LM2Q== X-Received: by 2002:adf:f288:: with SMTP id k8mr77341wro.301.1582743930460; Wed, 26 Feb 2020 11:05:30 -0800 (PST) X-Received: from e123331-lin.home ([2a01:cb1d:112:6f00:816e:ff0d:fb69:f613]) by smtp.gmail.com with ESMTPSA id z1sm3932823wmf.42.2020.02.26.11.05.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 11:05:29 -0800 (PST) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , lersek@redhat.com, eric.auger@redhat.com, philmd@redhat.com, marcandre.lureau@redhat.com, stefanb@linux.ibm.com, leif@nuviainc.com Subject: [edk2-devel] [PATCH v3 9/9] ArmVirtPkg/ArmVirtQemu: enable TPM2 based measured boot Date: Wed, 26 Feb 2020 20:05:14 +0100 Message-Id: <20200226190514.31395-10-ard.biesheuvel@linaro.org> In-Reply-To: <20200226190514.31395-1-ard.biesheuvel@linaro.org> References: <20200226190514.31395-1-ard.biesheuvel@linaro.org> 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1582743933; bh=ThLcLmFpj+573Ao5RPRD7ouM2OMkJwYWzFnkmXdUvuE=; h=Cc:Date:From:Reply-To:Subject:To; b=wDqkWsz5lcszrPOhLPS0QDaQ4U6sKt5nJpXDN35i2DX+2Zz0fZs2HgA6nUzYzAfFXUo F8Wps2N1gYnu49Cg2ZXn6XG+2j/ykQXtVHYvcb/AssPayOnoYGBjKJTsMnnlCqHhuxwkR I+Z+4d+vscAeXXL6lqXZFzlHqHp+DIUkIcA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Now that all the TPM2 related plumbing is in place, we can add the final piece that performs the measurements of loaded images into the appropriate PCRs. Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- ArmVirtPkg/ArmVirtQemu.dsc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 7cb2d1b42fb8..a0d179a72b2a 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -346,6 +346,9 @@ [Components.common] MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf { NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificatio= nLib.inf +!if $(TPM2_ENABLE) =3D=3D TRUE + NULL|SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib= .inf +!endif } SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDx= e.inf OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.inf --=20 2.17.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 (#54931): https://edk2.groups.io/g/devel/message/54931 Mute This Topic: https://groups.io/mt/71571527/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-