REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2443

Add Tcg2PpVendorLibExecutePendingRequestEx and
Tcg2PpVendorLibSubmitRequestToPreOSFunctionEx to handle the
EFI_TCG2_PHYSICAL_PRESENCE parameters.
Add the definition first.

Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Jian J Wang <jian.j.w...@intel.com>
Cc: Chao Zhang <chao.b.zh...@intel.com>
Signed-off-by: Zhichao Gao <zhichao....@intel.com>
---
 SecurityPkg/Include/Library/Tcg2PpVendorLib.h | 54 ++++++++++++++++++-
 1 file changed, 53 insertions(+), 1 deletion(-)

diff --git a/SecurityPkg/Include/Library/Tcg2PpVendorLib.h 
b/SecurityPkg/Include/Library/Tcg2PpVendorLib.h
index 569eba6874..8f7fcf4e84 100644
--- a/SecurityPkg/Include/Library/Tcg2PpVendorLib.h
+++ b/SecurityPkg/Include/Library/Tcg2PpVendorLib.h
@@ -7,7 +7,7 @@
 
   Caution: This function may receive untrusted input.
 
-Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2020, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -16,6 +16,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #define _TCG2_PP_VENDOR_LIB_H_
 
 #include <IndustryStandard/Tpm20.h>
+#include <Guid/Tcg2PhysicalPresenceData.h>
 #include <Protocol/Tcg2Protocol.h>
 #include <Library/Tcg2PhysicalPresenceLib.h>
 
@@ -46,6 +47,33 @@ Tcg2PpVendorLibExecutePendingRequest (
   OUT BOOLEAN               *ResetRequired
   );
 
+/**
+  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 platform 
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 required.
+                                   False, it indicates the reset is not 
required.
+
+  @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.
 
@@ -98,6 +126,30 @@ Tcg2PpVendorLibSubmitRequestToPreOSFunction (
   IN UINT32                 RequestParameter
   );
 
+/**
+  The callback for TPM vendor specific physical presence which is called for
+  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 method.
+
+  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 Environment 
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 for
   Get User Confirmation Status for Operation.
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to