From mboxrd@z Thu Jan 1 00:00:00 1970 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.5085.1582814474337228013 for ; Thu, 27 Feb 2020 06:41:14 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=EYjCuYbr; spf=pass (domain: linaro.org, ip: 209.85.221.49, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wr1-f49.google.com with SMTP id z15so3694775wrl.1 for ; Thu, 27 Feb 2020 06:41:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FHRpKFeuJIyrL75viiaNo0spIC1LwJPrgEhaSgKUGxo=; b=EYjCuYbrmcpluOVEVurdHgNYFrQyYDUpMraYoUk9dF1daOI2ziZEUCbR7Ax0LBniib wigEqVOu1gy1qVNTEaBXGGL1EhPezrzs2rlB98r7YBhzabxt0otMtPzITevDWMTBf7FH OEiPr0RK7rZ7EVJ0LWvU0CUWWjlUWuUy5kDkqDQXu79azSdsTmi1Tz5JO7ouvbzr6r/U rTNopeDWA+tZjO4VkYhi2aH9U+EgsgojG8eImgBUrntcgb1Nb9SN6jNHrMhyAGWPdOyZ SKjeMkmveXEt4KjfsSqD5az1AfFrM7h88KGgxDLp9Uac2BmMSJ3jvaxY6stX7NhwDV+B attg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FHRpKFeuJIyrL75viiaNo0spIC1LwJPrgEhaSgKUGxo=; b=L4Dl0mDLb5oaCScNvHq98RnstyNTJDKmDM5Z5p8PM0vmOdy4WXrXuYx70D5WALdSXQ gq7ZwqKNiLrCHKUCAgYhb/Zn5IRBd/sWYrEyZq60ocmMbD0IeArL2c6eT3KnSQQPFCR8 YnJrU3I5hFih6tAm0dWw/dSS9Ov9QfEjOuhtn/QGzeJsWdw2PxkE8PAe4j2ZC8NTtp/m JOvmpKuRd5XluJn9qBRBq9JPlLCrj3ndEGrxKGEJQc3jXMlFwR8DOZOnn7dUnuZP1u/8 cM1rfCo3emch6fPkBX/tc6Q4AdjSElOiNdd6uj6rnfEEELD1CYRwINq1Gt3QkWo73uI+ pGxQ== X-Gm-Message-State: APjAAAWIHFVt0CnaATOMO20LM5M5L9oG9aqOmCEkX71bPu4hJmSpPm0D no7OJSPxzUjYwM6IdHiMIX4NqdsUmA4= X-Google-Smtp-Source: APXvYqyEROhYPl241SmpOZtiWRR6eUluNU6VH2E20TEVI6V7V+twlyPTBmMhZ6kIi5st5PjWNz7Gww== X-Received: by 2002:a05:6000:1142:: with SMTP id d2mr5122377wrx.62.1582814472667; Thu, 27 Feb 2020 06:41:12 -0800 (PST) Return-Path: Received: from localhost.localdomain (aaubervilliers-682-1-29-142.w90-88.abo.wanadoo.fr. [90.88.192.142]) by smtp.gmail.com with ESMTPSA id k7sm8273575wrq.12.2020.02.27.06.41.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 06:41:11 -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: [PATCH v4 10/11] ArmVirtPkg/ArmVirtQemu: enable the TPM2 configuration module Date: Thu, 27 Feb 2020 15:40:55 +0100 Message-Id: <20200227144056.56988-11-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200227144056.56988-1-ard.biesheuvel@linaro.org> References: <20200227144056.56988-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. This patch ports (parts of) the following commits to ArmVirtQemu: - 3103389043bd ("OvmfPkg: Add TCG2 Configuration menu to the Device Manager menu", 2019-02-11) - cf3ad972a210 ("OvmfPkg: reorganize TPM2 support in DSC/FDF files", 2020-01-09) - f55477fe2d62 ("OvmfPkg: use HII type PCDs for TPM2 config related variables", 2020-01-09) 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 598ac49b3c40..f93e13987db4 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -30,6 +30,7 @@ [Defines] DEFINE TTY_TERMINAL = FALSE DEFINE SECURE_BOOT_ENABLE = FALSE DEFINE TPM2_ENABLE = FALSE + DEFINE TPM2_CONFIG_ENABLE = FALSE # # Network definition @@ -270,6 +271,11 @@ [PcdsDynamicDefault.common] [PcdsDynamicHii] gArmVirtTokenSpaceGuid.PcdForceNoAcpi|L"ForceNoAcpi"|gArmVirtVariableGuid|0x0|FALSE|NV,BS +!if $(TPM2_CONFIG_ENABLE) == TRUE + gEfiSecurityPkgTokenSpaceGuid.PcdTcgPhysicalPresenceInterfaceVer|L"TCG2_VERSION"|gTcg2ConfigFormSetGuid|0x0|"1.3"|NV,BS + gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableRev|L"TCG2_VERSION"|gTcg2ConfigFormSetGuid|0x8|3|NV,BS +!endif + ################################################################################ # # Components Section - list of all EDK II Modules needed by this Platform @@ -492,6 +498,9 @@ [Components.common] NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf } +!if $(TPM2_CONFIG_ENABLE) == TRUE + SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf +!endif !endif # diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc index a93a9970c8d2..211f7aeb6f62 100644 --- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc +++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc @@ -178,6 +178,9 @@ [FV.FvMain] # !if $(TPM2_ENABLE) == TRUE INF SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf +!if $(TPM2_CONFIG_ENABLE) == TRUE + INF SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf +!endif !endif # -- 2.20.1