From nobody Tue Feb 10 01:34:55 2026 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+52709+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+52709+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1578020678; cv=none; d=zohomail.com; s=zohoarc; b=X+gCI1NDTsHPwVV9srji8y6/H+lfjwYntPGntjn5ivXfRyWxUdHzc6+nZenRcQFZiihCzYRcC4sJBCOv8votZUx4BcyytOt9bDorhpvmZ/Mebvfiw0YDUfSrOsmHCEdsosyqWqTj+aTB7/CeCGMhOnUI+Bj5nHYAga3P45CvUL8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578020678; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=EyKGAb+y1dBU9FTD67CkttMQVPVnpNMmqzDnED1gKvU=; b=CGe8dRtCf9LNPjmg2wQ7Slnm00t640pW12bzAt0tvkbtVTy2qn/Mnbxk5BZlXGZ2qZa+zusxMZ1fxueNMNswfAfXJO+INWexgU9kC+wB9OqH0eQWnjpusk5420uvwfWPLKNUJf2pXUg86ABS+GW9VrkewFQQoOD/1PenZUdcZs8= 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+52709+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 1578020678830177.15233189087087; Thu, 2 Jan 2020 19:04:38 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id ksJxYY1788612xdOtBEWthqd; Thu, 02 Jan 2020 19:04:38 -0800 X-Received: from mga04.intel.com (mga04.intel.com []) by mx.groups.io with SMTP id smtpd.web09.3729.1578020675360032184 for ; Thu, 02 Jan 2020 19:04:37 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jan 2020 19:04:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,389,1571727600"; d="scan'208";a="252455076" X-Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by fmsmga002.fm.intel.com with ESMTP; 02 Jan 2020 19:04:36 -0800 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Chao Zhang Subject: [edk2-devel] [PATCH 02/13] SecurityPkg/Tcg2PpVendorLib: Add implementation of new Ex function Date: Fri, 3 Jan 2020 11:04:16 +0800 Message-Id: <20200103030428.28176-3-zhichao.gao@intel.com> In-Reply-To: <20200103030428.28176-1-zhichao.gao@intel.com> References: <20200103030428.28176-1-zhichao.gao@intel.com> MIME-Version: 1.0 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,zhichao.gao@intel.com X-Gm-Message-State: bBqX8t3VGitECTrQDVK1uSKNx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1578020678; bh=L+UTT7PAt2njLwx1shV3+VvqfWDZeZalZ+wugQC2Ido=; h=Cc:Date:From:Reply-To:Subject:To; b=YDOSx8AMiwIpjtbYtFJITvrnDVW9Cz4CR6hm0MVEceowtLU+YsGp4VuCSkQOnhoOjK8 fRvuSql/vmyn2iDZX+3YfwQq+c8xtJ7xpQoz+WZIkgmQUn7YFO+dJgKugJi29cvuWF+TT 1cI+gG9DycnaPlBE0Pjw34WU7N/fCWTMh6A= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2443 Add Tcg2PpVendorLibExecutePendingRequestEx and Tcg2PpVendorLibSubmitRequestToPreOSFunctionEx to handle the EFI_TCG2_PHYSICAL_PRESENCE parameters. Implement in the null version. Cc: Jiewen Yao Cc: Jian J Wang Cc: Chao Zhang Signed-off-by: Zhichao Gao --- .../Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.c | 61 ++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.c = b/SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.c index 895d05a28d..0b57ba44e3 100644 --- a/SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.c +++ b/SecurityPkg/Library/Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.c @@ -1,7 +1,7 @@ /** @file NULL Tcg2 PP Vendor library instance that does not support any vendor sp= ecific PPI. =20 -Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -40,6 +40,37 @@ Tcg2PpVendorLibExecutePendingRequest ( return TCG_PP_OPERATION_RESPONSE_BIOS_FAILURE; } =20 +/** + Check and execute the requested physical presence command. + + This API should be invoked in BIOS boot phase to process pending request. + + Caution: This function may receive untrusted input. + + If OperationRequest < 128, then ASSERT(). + + @param[in] PlatformAuth platform auth value. NULL means no plat= form auth change. + @param[in] PPData Ptr to EFI_TCG2_PHYSICAL_PRESENCE data. + @param[in, out] ManagementFlags BIOS TPM Management Flags. + @param[out] ResetRequired If reset is required to vendor settings= in effect. + True, it indicates the reset is require= d. + False, it indicates the reset is not re= quired. + + @return TPM Operation Response to OS Environment. +**/ +UINT32 +EFIAPI +Tcg2PpVendorLibExecutePendingRequestEx ( + IN TPM2B_AUTH *PlatformAuth, OPTIONAL + IN EFI_TCG2_PHYSICAL_PRESENCE *PPData, + IN OUT UINT32 *ManagementFlags, + OUT BOOLEAN *ResetRequired + ) +{ + ASSERT (PPData->PPRequest >=3D TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OP= ERATION); + return TCG_PP_OPERATION_RESPONSE_BIOS_FAILURE; +} + /** Check if there is a valid physical presence command request. =20 @@ -100,6 +131,34 @@ Tcg2PpVendorLibSubmitRequestToPreOSFunction ( return TCG_PP_SUBMIT_REQUEST_TO_PREOS_NOT_IMPLEMENTED; } =20 +/** + The callback for TPM vendor specific physical presence which is called f= or + Submit TPM Operation Request to Pre-OS Environment and + Submit TPM Operation Request to Pre-OS Environment 2. + + This API should be invoked in OS runtime phase to interface with ACPI me= thod. + + Caution: This function may receive untrusted input. + + If OperationRequest < 128, then ASSERT(). + + @param[in] *PPData Ptr to EFI_TCG2_PHYSICAL_PRESENCE data. + @param[in] ManagementFlags BIOS TPM Management Flags. + + @return Return Code for Submit TPM Operation Request to Pre-OS Environme= nt and + Submit TPM Operation Request to Pre-OS Environment 2. +**/ +UINT32 +EFIAPI +Tcg2PpVendorLibSubmitRequestToPreOSFunctionEx ( + IN EFI_TCG2_PHYSICAL_PRESENCE *PPdata, + IN UINT32 ManagementFlags + ) +{ + ASSERT (PPdata->PPRequest >=3D TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OP= ERATION); + return TCG_PP_SUBMIT_REQUEST_TO_PREOS_NOT_IMPLEMENTED; +} + /** The callback for TPM vendor specific physical presence which is called f= or Get User Confirmation Status for Operation. --=20 2.21.0.windows.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 (#52709): https://edk2.groups.io/g/devel/message/52709 Mute This Topic: https://groups.io/mt/69392329/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-