]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Include/Library/Tpm12CommandLib.h
SecurityPkg: Clean up source files
[mirror_edk2.git] / SecurityPkg / Include / Library / Tpm12CommandLib.h
index 037a1f34bca51891f30da1ff4fb606963b8a3908..6695a0c94bfc698641aee6a3db8a0ec85e3dbe80 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This library is used by other modules to send TPM12 command.\r
 \r
-Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -84,7 +84,7 @@ typedef struct {
 \r
 /**\r
   Send NV DefineSpace command to TPM1.2.\r
-  \r
+\r
   @param PubInfo           The public parameters of the NV area.\r
   @param EncAuth           The encrypted AuthData, only valid if the attributes require subsequent authorization.\r
 \r
@@ -100,7 +100,7 @@ Tpm12NvDefineSpace (
 \r
 /**\r
   Send NV ReadValue command to TPM1.2.\r
-  \r
+\r
   @param NvIndex           The index of the area to set.\r
   @param Offset            The offset into the area.\r
   @param DataSize          The size of the data area.\r
@@ -120,7 +120,7 @@ Tpm12NvReadValue (
 \r
 /**\r
   Send NV WriteValue command to TPM1.2.\r
-  \r
+\r
   @param NvIndex           The index of the area to set.\r
   @param Offset            The offset into the NV Area.\r
   @param DataSize          The size of the data parameter.\r
@@ -138,4 +138,88 @@ Tpm12NvWriteValue (
   IN UINT8          *Data\r
   );\r
 \r
+/**\r
+Extend a TPM PCR.\r
+\r
+@param[in]  DigestToExtend    The 160 bit value representing the event to be recorded.\r
+@param[in]  PcrIndex          The PCR to be updated.\r
+@param[out] NewPcrValue       New PCR value after extend.\r
+\r
+@retval EFI_SUCCESS           Operation completed successfully.\r
+@retval EFI_TIMEOUT           The register can't run into the expected status in time.\r
+@retval EFI_BUFFER_TOO_SMALL  Response data buffer is too small.\r
+@retval EFI_DEVICE_ERROR      Unexpected device behavior.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Tpm12Extend (\r
+  IN  TPM_DIGEST    *DigestToExtend,\r
+  IN  TPM_PCRINDEX  PcrIndex,\r
+  OUT TPM_DIGEST    *NewPcrValue\r
+  );\r
+\r
+/**\r
+Send TSC_PhysicalPresence command to TPM.\r
+\r
+@param[in] PhysicalPresence   The state to set the TPMs Physical Presence flags.\r
+\r
+@retval EFI_SUCCESS           Operation completed successfully.\r
+@retval EFI_TIMEOUT           The register can't run into the expected status in time.\r
+@retval EFI_BUFFER_TOO_SMALL  Response data buffer is too small.\r
+@retval EFI_DEVICE_ERROR      Unexpected device behavior.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Tpm12PhysicalPresence (\r
+  IN      TPM_PHYSICAL_PRESENCE     PhysicalPresence\r
+  );\r
+\r
+/**\r
+Send TPM_ContinueSelfTest command to TPM.\r
+\r
+@retval EFI_SUCCESS           Operation completed successfully.\r
+@retval EFI_TIMEOUT           The register can't run into the expected status in time.\r
+@retval EFI_BUFFER_TOO_SMALL  Response data buffer is too small.\r
+@retval EFI_DEVICE_ERROR      Unexpected device behavior.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Tpm12ContinueSelfTest (\r
+  VOID\r
+  );\r
+\r
+/**\r
+Get TPM capability permanent flags.\r
+\r
+@param[out] TpmPermanentFlags   Pointer to the buffer for returned flag structure.\r
+\r
+@retval EFI_SUCCESS           Operation completed successfully.\r
+@retval EFI_TIMEOUT           The register can't run into the expected status in time.\r
+@retval EFI_BUFFER_TOO_SMALL  Response data buffer is too small.\r
+@retval EFI_DEVICE_ERROR      Unexpected device behavior.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Tpm12GetCapabilityFlagPermanent (\r
+  OUT TPM_PERMANENT_FLAGS  *TpmPermanentFlags\r
+  );\r
+\r
+/**\r
+Get TPM capability volatile flags.\r
+\r
+@param[out] VolatileFlags   Pointer to the buffer for returned flag structure.\r
+\r
+@retval EFI_SUCCESS      Operation completed successfully.\r
+@retval EFI_DEVICE_ERROR The command was unsuccessful.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Tpm12GetCapabilityFlagVolatile (\r
+  OUT TPM_STCLEAR_FLAGS                 *VolatileFlags\r
+  );\r
 #endif\r