From nobody Thu Dec 18 19:40:19 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+113912+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+113912+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1705419758; cv=none; d=zohomail.com; s=zohoarc; b=Vm5eR0aJ2WOFf3JgrNE1B/+U2lSQWJW1TcEE4g8IRoiN4ue7dx/q7rpopONNPx5OtlAL9UVfRgMQnxPCVFMOyV35jqDkpJFBAkRCQYhMQG+Iin32Lakf/YZ0Qx73cbO8ufWZBey/BMbWaCDupLEMItfTzB7aSsMeevG+CF9btSM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705419758; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=ENZ2cHQz0ezcHp+m4y+H+wYImppDtu4jtE0eZfen5tc=; b=X1l9EqDFLXMn17J5EuucT8kw8FHydwW5/91na7pRXamg2J/ZMly0KcYj6kimBafMHl+b47NRBFtCQZf/2XxYC1AH2wWPPPaVSYxxd04WQsvyA2FKxoI0eN755tyO/FLdl4wqDzsZibiG0TvCXpOv3dcLMi1izWQGebL25amwOf4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+113912+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1705419758537603.2715991263393; Tue, 16 Jan 2024 07:42:38 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=VVUlpmZCvlDE8r6GENoumYRPLwojlN9eqdwJoyE9JDA=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1705419758; v=1; b=w5J1vUKw3d96DTkInO9lxXfTayR2AFGOPUZJ2AU2uiS77vYJhtHCl8UrI1Y/VbFoDrAwwsXr 5kvMAbyoXf8ABhUe1EtYM5C2P8AXUv/wECWrgHqqFIypnqFbVwmBIKlm+dqNW6hlSmeKiM5k2ZJ 17hl8hKixa64izC0Fw2IisIE= X-Received: by 127.0.0.2 with SMTP id n2KWYY1788612xEzFY7kV5Ik; Tue, 16 Jan 2024 07:42:38 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.18486.1705419757569955271 for ; Tue, 16 Jan 2024 07:42:37 -0800 X-Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-504-sDxEH08WNq2VnzBSl8FeAw-1; Tue, 16 Jan 2024 10:42:32 -0500 X-MC-Unique: sDxEH08WNq2VnzBSl8FeAw-1 X-Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DD3083C23FC7 for ; Tue, 16 Jan 2024 15:42:31 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.193.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9539F2026D6F; Tue, 16 Jan 2024 15:42:31 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 846EA18017FC; Tue, 16 Jan 2024 16:42:29 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Oliver Steffen , Gerd Hoffmann Subject: [edk2-devel] [PATCH 2/2] OvmfPkg/Tcg2Config: remove unused TPM 1.2 support Date: Tue, 16 Jan 2024 16:42:29 +0100 Message-ID: <20240116154229.554679-3-kraxel@redhat.com> In-Reply-To: <20240116154229.554679-1-kraxel@redhat.com> References: <20240116154229.554679-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: 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,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: Ya63ilveqz3guA5xsaKINE5ax1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1705419759726100003 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Gerd Hoffmann Reviewed-by: Laszlo Ersek --- OvmfPkg/Tcg/Tcg2Config/Tcg12ConfigPei.inf | 56 --------------- OvmfPkg/Tcg/Tcg2Config/Tpm12Support.c | 83 ----------------------- 2 files changed, 139 deletions(-) delete mode 100644 OvmfPkg/Tcg/Tcg2Config/Tcg12ConfigPei.inf delete mode 100644 OvmfPkg/Tcg/Tcg2Config/Tpm12Support.c diff --git a/OvmfPkg/Tcg/Tcg2Config/Tcg12ConfigPei.inf b/OvmfPkg/Tcg/Tcg2Co= nfig/Tcg12ConfigPei.inf deleted file mode 100644 index e8e0b88e6058..000000000000 --- a/OvmfPkg/Tcg/Tcg2Config/Tcg12ConfigPei.inf +++ /dev/null @@ -1,56 +0,0 @@ -## @file -# Set TPM device type - supports TPM 1.2 and 2.0 -# -# In SecurityPkg, this module initializes the TPM device type based on a U= EFI -# variable and/or hardware detection. In OvmfPkg, the module only performs= TPM -# hardware detection. -# -# Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
-# Copyright (C) 2018, Red Hat, Inc. -# -# SPDX-License-Identifier: BSD-2-Clause-Patent -## - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D Tcg2ConfigPei - FILE_GUID =3D 8AD3148F-945F-46B4-8ACD-71469EA73945 - MODULE_TYPE =3D PEIM - VERSION_STRING =3D 1.0 - ENTRY_POINT =3D Tcg2ConfigPeimEntryPoint - -[Sources] - Tcg2ConfigPeim.c - Tpm12Support.h - Tpm12Support.c - -[Packages] - MdePkg/MdePkg.dec - MdeModulePkg/MdeModulePkg.dec - OvmfPkg/OvmfPkg.dec - SecurityPkg/SecurityPkg.dec - -[LibraryClasses] - PeimEntryPoint - DebugLib - PeiServicesLib - Tpm2DeviceLib - BaseLib - Tpm12DeviceLib - -[Guids] - gEfiTpmDeviceSelectedGuid ## PRODUCES ## GUID # Used as a PPI = GUID - gEfiTpmDeviceInstanceTpm20DtpmGuid ## SOMETIMES_CONSUMES - gEfiTpmDeviceInstanceTpm12Guid ## SOMETIMES_CONSUMES - -[Ppis] - gPeiTpmInitializationDonePpiGuid ## SOMETIMES_PRODUCES - -[Pcd] - gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid ## PROD= UCES - -[Depex.IA32, Depex.X64] - gOvmfTpmMmioAccessiblePpiGuid - -[Depex.ARM, Depex.AARCH64] - gOvmfTpmDiscoveredPpiGuid diff --git a/OvmfPkg/Tcg/Tcg2Config/Tpm12Support.c b/OvmfPkg/Tcg/Tcg2Config= /Tpm12Support.c deleted file mode 100644 index c88da5758b44..000000000000 --- a/OvmfPkg/Tcg/Tcg2Config/Tpm12Support.c +++ /dev/null @@ -1,83 +0,0 @@ -/** @file - Implement the InternalTpm12Detect() function on top of the Tpm12DeviceLib - class. - - Copyright (C) 2020, Red Hat, Inc. - - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ - -#include -#include - -#include "Tpm12Support.h" - -#pragma pack (1) -typedef struct { - TPM_RSP_COMMAND_HDR Hdr; - TPM_CURRENT_TICKS CurrentTicks; -} TPM_RSP_GET_TICKS; -#pragma pack () - -/** - Probe for the TPM for 1.2 version, by sending TPM1.2 GetTicks - - Sending a TPM1.2 command to a TPM2 should return a TPM1.2 - header (tag =3D 0xc4) and error code (TPM_BADTAG =3D 0x1e) - - @retval EFI_SUCCESS TPM version 1.2 probing successful. - - @return Error codes propagated from Tpm12SubmitCommand(). -**/ -STATIC -EFI_STATUS -TestTpm12 ( - ) -{ - EFI_STATUS Status; - TPM_RQU_COMMAND_HDR Command; - TPM_RSP_GET_TICKS Response; - UINT32 Length; - - Command.tag =3D SwapBytes16 (TPM_TAG_RQU_COMMAND); - Command.paramSize =3D SwapBytes32 (sizeof (Command)); - Command.ordinal =3D SwapBytes32 (TPM_ORD_GetTicks); - - Length =3D sizeof (Response); - Status =3D Tpm12SubmitCommand ( - sizeof (Command), - (UINT8 *)&Command, - &Length, - (UINT8 *)&Response - ); - if (EFI_ERROR (Status)) { - return Status; - } - - return EFI_SUCCESS; -} - -/** - Detect the presence of a TPM with interface version 1.2. - - @retval EFI_SUCCESS TPM-1.2 available. The Tpm12RequestUseTpm() and - Tpm12SubmitCommand(TPM_ORD_GetTicks) operations - (from the Tpm12DeviceLib class) have succeeded. - - @return Error codes propagated from Tpm12RequestUseTpm(= ) and - Tpm12SubmitCommand(). -**/ -EFI_STATUS -InternalTpm12Detect ( - VOID - ) -{ - EFI_STATUS Status; - - Status =3D Tpm12RequestUseTpm (); - if (EFI_ERROR (Status)) { - return Status; - } - - return TestTpm12 (); -} --=20 2.43.0 -=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 (#113912): https://edk2.groups.io/g/devel/message/113912 Mute This Topic: https://groups.io/mt/103764205/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-