X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=SecurityPkg%2FInclude%2FLibrary%2FTcg2PhysicalPresenceLib.h;h=39febcb65588639c603012248f9eb4a38243f008;hp=ce45f174549651197ae4720edd611b6abcd4e4b1;hb=d6b926e76e3d639ac37610e97d33ff9e3a6281eb;hpb=1abfa4ce4835639c66ae82cc0d72cffcf3f28b6b diff --git a/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h b/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h index ce45f17454..39febcb655 100644 --- a/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h +++ b/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h @@ -1,15 +1,9 @@ /** @file - Ihis library is intended to be used by BDS modules. + This library is intended to be used by BDS modules. This library will execute TPM2 request. -Copyright (c) 2015, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -35,14 +29,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // // UEFI TCG2 library definition bit of the BIOS Information Flags // -#define TCG2_BIOS_INFORMATION_FLAG_HIERACHY_CONTROL_STORAGE_DISABLE BIT8 -#define TCG2_BIOS_INFORMATION_FLAG_HIERACHY_CONTROL_ENDORSEMENT_DISABLE BIT9 +#define TCG2_BIOS_INFORMATION_FLAG_HIERARCHY_CONTROL_STORAGE_DISABLE BIT8 +#define TCG2_BIOS_INFORMATION_FLAG_HIERARCHY_CONTROL_ENDORSEMENT_DISABLE BIT9 // // UEFI TCG2 library definition bit of the BIOS Storage Management Flags // #define TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_ENABLE_BLOCK_SID BIT16 #define TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_DISABLE_BLOCK_SID BIT17 +#define TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_ENABLE_BLOCK_SID BIT18 // // Default value @@ -52,16 +47,23 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. TCG2_BIOS_TPM_MANAGEMENT_FLAG_PP_REQUIRED_FOR_CHANGE_EPS | \ TCG2_BIOS_TPM_MANAGEMENT_FLAG_PP_REQUIRED_FOR_CHANGE_PCRS) +// +// Default value +// +#define TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_DEFAULT (TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_ENABLE_BLOCK_SID | \ + TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_DISABLE_BLOCK_SID |\ + TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_ENABLE_BLOCK_SID) + /** Check and execute the pending TPM request. - The TPM request may come from OS or BIOS. This API will display request information and wait + The TPM request may come from OS or BIOS. This API will display request information and wait for user confirmation if TPM request exists. The TPM request will be sent to TPM device after - the TPM request is confirmed, and one or more reset may be required to make TPM request to + the TPM request is confirmed, and one or more reset may be required to make TPM request to take effect. - + This API should be invoked after console in and console out are all ready as they are required - to display request information and get user input to confirm the request. + to display request information and get user input to confirm the request. @param PlatformAuth platform auth value. NULL means no platform auth change. **/ @@ -76,7 +78,7 @@ Tcg2PhysicalPresenceLibProcessRequest ( The TPM request may come from OS. This API will check if TPM request exists and need user input to confirmation. - + @retval TRUE TPM needs input to confirm user physical presence. @retval FALSE TPM doesn't need input to confirm user physical presence. @@ -116,6 +118,26 @@ Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction ( OUT UINT32 *Response ); +/** + The handler for TPM physical presence function: + 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. + + @param[in, out] Pointer to OperationRequest TPM physical presence operation request. + @param[in, out] Pointer to RequestParameter TPM physical presence operation request parameter. + + @return Return Code for Submit TPM Operation Request to Pre-OS Environment and + Submit TPM Operation Request to Pre-OS Environment 2. + **/ +UINT32 +Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx ( + IN OUT UINT32 *OperationRequest, + IN OUT UINT32 *RequestParameter + ); /** The handler for TPM physical presence function: @@ -125,7 +147,7 @@ Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction ( This API should be invoked in OS runtime phase to interface with ACPI method. Caution: This function may receive untrusted input. - + @param[in] OperationRequest TPM physical presence operation request. @param[in] RequestParameter TPM physical presence operation request parameter. @@ -146,7 +168,7 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction ( This API should be invoked in OS runtime phase to interface with ACPI method. Caution: This function may receive untrusted input. - + @param[in] OperationRequest TPM physical presence operation request. @return Return Code for Get User Confirmation Status for Operation.