TianoCore EDK2 master
Loading...
Searching...
No Matches
Tpm12NvStorage.c File Reference

Go to the source code of this file.

Data Structures

struct  TPM_CMD_NV_DEFINE_SPACE
 
struct  TPM_CMD_NV_READ_VALUE
 
struct  TPM_RSP_NV_READ_VALUE
 
struct  TPM_CMD_NV_WRITE_VALUE
 

Macros

#define TPMNVVALUELENGTH   1024
 

Functions

EFI_STATUS EFIAPI Tpm12NvDefineSpace (IN TPM12_NV_DATA_PUBLIC *PubInfo, IN TPM_ENCAUTH *EncAuth)
 
EFI_STATUS EFIAPI Tpm12NvReadValue (IN TPM_NV_INDEX NvIndex, IN UINT32 Offset, IN OUT UINT32 *DataSize, OUT UINT8 *Data)
 
EFI_STATUS EFIAPI Tpm12NvWriteValue (IN TPM_NV_INDEX NvIndex, IN UINT32 Offset, IN UINT32 DataSize, IN UINT8 *Data)
 

Detailed Description

Implement TPM1.2 NV storage related command.

Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Tpm12NvStorage.c.

Macro Definition Documentation

◆ TPMNVVALUELENGTH

#define TPMNVVALUELENGTH   1024

Definition at line 20 of file Tpm12NvStorage.c.

Function Documentation

◆ Tpm12NvDefineSpace()

EFI_STATUS EFIAPI Tpm12NvDefineSpace ( IN TPM12_NV_DATA_PUBLIC PubInfo,
IN TPM_ENCAUTH EncAuth 
)

Send NV DefineSpace command to TPM1.2.

Parameters
PubInfoThe public parameters of the NV area.
EncAuthThe encrypted AuthData, only valid if the attributes require subsequent authorization.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORUnexpected device behavior.

Definition at line 64 of file Tpm12NvStorage.c.

◆ Tpm12NvReadValue()

EFI_STATUS EFIAPI Tpm12NvReadValue ( IN TPM_NV_INDEX  NvIndex,
IN UINT32  Offset,
IN OUT UINT32 *  DataSize,
OUT UINT8 *  Data 
)

Send NV ReadValue command to TPM1.2.

Parameters
NvIndexThe index of the area to set.
OffsetThe offset into the area.
DataSizeThe size of the data area.
DataThe data to set the area to.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORUnexpected device behavior.

Definition at line 129 of file Tpm12NvStorage.c.

◆ Tpm12NvWriteValue()

EFI_STATUS EFIAPI Tpm12NvWriteValue ( IN TPM_NV_INDEX  NvIndex,
IN UINT32  Offset,
IN UINT32  DataSize,
IN UINT8 *  Data 
)

Send NV WriteValue command to TPM1.2.

Parameters
NvIndexThe index of the area to set.
OffsetThe offset into the NV Area.
DataSizeThe size of the data parameter.
DataThe data to set the area to.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORUnexpected device behavior.

Definition at line 191 of file Tpm12NvStorage.c.