From nobody Tue Feb 10 04:15:09 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+52708+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+52708+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1578020677; cv=none; d=zohomail.com; s=zohoarc; b=mMOiM0addnkQEP1VyrlTqY4Rc8IChfv+QVC7HusIv4omgJgrVXGVO4vobS5B2W8Ndhoezm+d5TDCqJfF7HMKCkf70cJIDqbu9yK6Nd6z9lwf4HWoyqy+81Me2PkkKg4queej4Tc5sxabt3W29crCt1NR3qNguyacy8P6EfFTo3Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578020677; 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=7mmaTAqVlRSngrm1YCrlcqTY2PIHRci9xu7IN8SyLJ8=; b=gNVbRrPoe7jW8dqWTX5vz2YDvLVzRZqMCs51KTNupQ0JSKmGyoYPEMCTwL9/shIve/E11mvVdIOn3ITIYGxvEfJFr2Orpixx5THOEeTIPxw++2paYXVSumHI8CCSc8FjYA8JcRgTQo5CqKyE1IcRtwDXkp+ddJxVX9DxMqX0wHo= 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+52708+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 1578020677345514.4918175330935; Thu, 2 Jan 2020 19:04:37 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id aC9wYY1788612xVkBUauHpSf; Thu, 02 Jan 2020 19:04:36 -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:36 -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:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,389,1571727600"; d="scan'208";a="252455059" X-Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by fmsmga002.fm.intel.com with ESMTP; 02 Jan 2020 19:04:35 -0800 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Chao Zhang Subject: [edk2-devel] [PATCH 01/13] SecurityPkg/Tcg2PpVerndorLib: Add two Ex function to handle PPdata Date: Fri, 3 Jan 2020 11:04:15 +0800 Message-Id: <20200103030428.28176-2-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: pmTpHKGfbPCdFUMYAX8pcN4ix1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1578020676; bh=+LW5FP26a1Ras9LrOUyBtLmnQyqVGHHmUJo+VaQZpno=; h=Cc:Date:From:Reply-To:Subject:To; b=LPYrcpub7pibPZOwpoZcmv/kKKXTkkTIfOtlbWh0zL0oVnHGezcJ/WM887dhXYOkPTD r7amVDb2pC7aCeUlMckbxiuT0lwcpPUFk3iXR1aS1WPpM2w+AdSd7Wp8BhljfOAOM/F/X Lxcgd38AXmBUMG0WM8j1cvD8l7Fcz8J+ECw= 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. Add the definition first. Cc: Jiewen Yao Cc: Jian J Wang Cc: Chao Zhang Signed-off-by: Zhichao Gao --- SecurityPkg/Include/Library/Tcg2PpVendorLib.h | 54 ++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/SecurityPkg/Include/Library/Tcg2PpVendorLib.h b/SecurityPkg/In= clude/Library/Tcg2PpVendorLib.h index 569eba6874..8f7fcf4e84 100644 --- a/SecurityPkg/Include/Library/Tcg2PpVendorLib.h +++ b/SecurityPkg/Include/Library/Tcg2PpVendorLib.h @@ -7,7 +7,7 @@ =20 Caution: This function may receive untrusted input. =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 **/ @@ -16,6 +16,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define _TCG2_PP_VENDOR_LIB_H_ =20 #include +#include #include #include =20 @@ -46,6 +47,33 @@ Tcg2PpVendorLibExecutePendingRequest ( OUT BOOLEAN *ResetRequired ); =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 + ); + /** Check if there is a valid physical presence command request. =20 @@ -98,6 +126,30 @@ Tcg2PpVendorLibSubmitRequestToPreOSFunction ( IN UINT32 RequestParameter ); =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 + ); + /** 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 (#52708): https://edk2.groups.io/g/devel/message/52708 Mute This Topic: https://groups.io/mt/69392327/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-