From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 60D7F740035 for ; Tue, 16 Jan 2024 15:42:39 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=NA+Db5oT8aLr4Y36f1Xr1EJB20h2MNAM7T3dA8tmJnc=; 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=eY3fZHHEIkysYIln+kTSECjpr8Jreu4QKxs4M5Hv0HaB+bHNb0wQOVeiyhrLaRxCmMKwkPeP 0R3rKjqE4muTLR0IARtaHhKXol6zEpW34vGZsKME1TEiMiT0QOjOpmYUzeOmCywW/2g9/NtvnJi eQ9YVLbEQT1223HfpDDYmoiI= X-Received: by 127.0.0.2 with SMTP id bYkWYY7687511xaKYKeOr4ft; 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: yN2ZvzulUNIK6FbFG6lTv2vRx7686176AA= Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=eY3fZHHE; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Signed-off-by: Gerd Hoffmann --- 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/Tcg2Config/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 UEFI -# 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 = 0x00010005 - BASE_NAME = Tcg2ConfigPei - FILE_GUID = 8AD3148F-945F-46B4-8ACD-71469EA73945 - MODULE_TYPE = PEIM - VERSION_STRING = 1.0 - ENTRY_POINT = 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 ## PRODUCES - -[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 = 0xc4) and error code (TPM_BADTAG = 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 = SwapBytes16 (TPM_TAG_RQU_COMMAND); - Command.paramSize = SwapBytes32 (sizeof (Command)); - Command.ordinal = SwapBytes32 (TPM_ORD_GetTicks); - - Length = sizeof (Response); - Status = 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 = Tpm12RequestUseTpm (); - if (EFI_ERROR (Status)) { - return Status; - } - - return TestTpm12 (); -} -- 2.43.0 -=-=-=-=-=-=-=-=-=-=-=- 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/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-