X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=SecurityPkg%2FLibrary%2FTpm2CommandLib%2FTpm2NVStorage.c;h=87572de20164cfa952e4d0c8d999531c8e35196e;hp=14b10952415ec49dadb08c03d3788ffde07cf931;hb=289b714b77008aa4200c0be25c4b4e25df04955a;hpb=dd577319e83d13a7ab46ffdccb6635281d2ca9e5 diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c b/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c index 14b1095241..87572de201 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2NVStorage.c @@ -2,13 +2,7 @@ Implement TPM2 NVStorage related command. Copyright (c) 2013 - 2018, 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. +SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -162,7 +156,7 @@ typedef struct { @param[in] NvIndex The NV Index. @param[out] NvPublic The public area of the index. @param[out] NvName The Name of the nvIndex. - + @retval EFI_SUCCESS Operation completed successfully. @retval EFI_DEVICE_ERROR The command was unsuccessful. @retval EFI_NOT_FOUND The command was returned successfully, but NvIndex is not found. @@ -192,7 +186,7 @@ Tpm2NvReadPublic ( SendBuffer.Header.commandCode = SwapBytes32(TPM_CC_NV_ReadPublic); SendBuffer.NvIndex = SwapBytes32 (NvIndex); - + SendBufferSize = (UINT32) sizeof (SendBuffer); SendBuffer.Header.paramSize = SwapBytes32 (SendBufferSize); @@ -265,7 +259,7 @@ Tpm2NvReadPublic ( CopyMem (NvName->name, (UINT8 *)&RecvBuffer + sizeof(TPM2_RESPONSE_HEADER) + sizeof(UINT16) + NvPublicSize + sizeof(UINT16), NvNameSize); NvName->size = NvNameSize; - + return EFI_SUCCESS; } @@ -278,7 +272,7 @@ Tpm2NvReadPublic ( @param[in] AuthSession Auth Session context @param[in] Auth The authorization data. @param[in] NvPublic The public area of the index. - + @retval EFI_SUCCESS Operation completed successfully. @retval EFI_DEVICE_ERROR The command was unsuccessful. @retval EFI_ALREADY_STARTED The command was returned successfully, but NvIndex is already defined. @@ -414,7 +408,7 @@ Done: @param[in] AuthHandle TPM_RH_OWNER or TPM_RH_PLATFORM+{PP}. @param[in] NvIndex The NV Index. @param[in] AuthSession Auth Session context - + @retval EFI_SUCCESS Operation completed successfully. @retval EFI_DEVICE_ERROR The command was unsuccessful. @retval EFI_NOT_FOUND The command was returned successfully, but NvIndex is not found. @@ -521,7 +515,7 @@ Done: @param[in] Size Number of bytes to read. @param[in] Offset Byte offset into the area. @param[in,out] OutData The data read. - + @retval EFI_SUCCESS Operation completed successfully. @retval EFI_DEVICE_ERROR The command was unsuccessful. @retval EFI_NOT_FOUND The command was returned successfully, but NvIndex is not found. @@ -648,7 +642,7 @@ Tpm2NvRead ( } CopyMem (OutData->buffer, &RecvBuffer.Data.buffer, OutData->size); - + Done: // // Clear AuthSession Content @@ -666,7 +660,7 @@ Done: @param[in] AuthSession Auth Session context @param[in] InData The data to write. @param[in] Offset The offset into the NV Area. - + @retval EFI_SUCCESS Operation completed successfully. @retval EFI_DEVICE_ERROR The command was unsuccessful. @retval EFI_NOT_FOUND The command was returned successfully, but NvIndex is not found.