From patchwork Fri Oct 14 14:35:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Natanael Copa X-Patchwork-Id: 13007062 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BBC2CC43217 for ; Fri, 14 Oct 2022 14:37:59 +0000 (UTC) Received: from localhost ([::1]:59286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojLoy-00088m-JA for qemu-devel@archiver.kernel.org; Fri, 14 Oct 2022 10:37:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45756) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojLmQ-0006fS-3A for qemu-devel@nongnu.org; Fri, 14 Oct 2022 10:35:20 -0400 Received: from mx1.tetrasec.net ([66.245.177.37]:39668) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojLmO-0001Q9-8L for qemu-devel@nongnu.org; Fri, 14 Oct 2022 10:35:17 -0400 Received: from mx1.tetrasec.net (mail.local [127.0.0.1]) by mx1.tetrasec.net (Postfix) with ESMTP id D7B8CDE1AF; Fri, 14 Oct 2022 14:35:11 +0000 (UTC) Received: from ncopa-desktop.lan (ti0056a400-4229.bb.online.no [85.167.239.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: alpine@tanael.org) by mx1.tetrasec.net (Postfix) with ESMTPSA id 2EA1DDE1AE; Fri, 14 Oct 2022 14:35:10 +0000 (UTC) From: Natanael Copa To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Natanael Copa Subject: [PATCH] edk2: fix TPM 2.0 regression Date: Fri, 14 Oct 2022 16:35:01 +0200 Message-Id: <20221014143501.5458-1-ncopa@alpinelinux.org> X-Mailer: git-send-email 2.38.0 MIME-Version: 1.0 Received-SPF: softfail client-ip=66.245.177.37; envelope-from=ncopa@alpinelinux.org; helo=mx1.tetrasec.net X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Fix a regression that was introduced with the edk2 202202 upgrade (commit e2f3137c7344). Upstream changed TPM_ENABLE to TPM1_ENABLE and TPM2_ENABLE. This led to TPM 2.0 (which is needed for windows 11) silently got disabled. Ref: https://github.com/tianocore/edk2/commit/4de8d61bcec02a13ceed84f92b0cf3ea58adf9c5 Signed-off-by: Natanael Copa --- I have not really been able to test this, due to issues with building the OVMF_CODE.fd from the qemu source tree. I do have tested building OVMF_CODE.fd for the Alpine Linux package, and adding -D TPM2_ENABLE dis solve the issue in windows guests. So I believe it is fine. I don't think an explicit -D TPM1_ENABLE is needed as I believe it is the default. https://github.com/tianocore/edk2/blob/8fc06b6e19e3df93cc989b4f85877d8a7783e5bf/OvmfPkg/OvmfTpmDefines.dsc.inc#L8 The -D TPM_CONFIG_ENABLE can probably be removed. It was not found anywhere when grepping the sources. roms/Makefile.edk2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roms/Makefile.edk2 b/roms/Makefile.edk2 index 485f2244b1..eb47f008c6 100644 --- a/roms/Makefile.edk2 +++ b/roms/Makefile.edk2 @@ -101,7 +101,7 @@ submodules: -D NETWORK_IP6_ENABLE \ -D NETWORK_HTTP_BOOT_ENABLE \ -D NETWORK_TLS_ENABLE \ - -D TPM_ENABLE \ + -D TPM2_ENABLE \ -D TPM_CONFIG_ENABLE cp edk2/Build/OvmfIa32/$(target)_$(call toolchain,i386)/FV/OVMF_CODE.fd $@ @@ -113,7 +113,7 @@ submodules: -D NETWORK_IP6_ENABLE \ -D NETWORK_HTTP_BOOT_ENABLE \ -D NETWORK_TLS_ENABLE \ - -D TPM_ENABLE \ + -D TPM2_ENABLE \ -D TPM_CONFIG_ENABLE \ -D SECURE_BOOT_ENABLE \ -D SMM_REQUIRE @@ -127,7 +127,7 @@ submodules: -D NETWORK_IP6_ENABLE \ -D NETWORK_HTTP_BOOT_ENABLE \ -D NETWORK_TLS_ENABLE \ - -D TPM_ENABLE \ + -D TPM2_ENABLE \ -D TPM_CONFIG_ENABLE cp edk2/Build/OvmfX64/$(target)_$(call toolchain,x86_64)/FV/OVMF_CODE.fd $@ @@ -140,7 +140,7 @@ submodules: -D NETWORK_IP6_ENABLE \ -D NETWORK_HTTP_BOOT_ENABLE \ -D NETWORK_TLS_ENABLE \ - -D TPM_ENABLE \ + -D TPM2_ENABLE \ -D TPM_CONFIG_ENABLE \ -D SECURE_BOOT_ENABLE \ -D SMM_REQUIRE