Home
last modified time | relevance | path

Searched refs:nvIndex (Results 1 – 25 of 59) sorted by relevance

123

/external/tpm2/
DNV_Extend.c27 NV_INDEX nvIndex; in TPM2_NV_Extend() local
37 result = NvWriteAccessChecks(in->authHandle, in->nvIndex); in TPM2_NV_Extend()
42 NvGetIndexInfo(in->nvIndex, &nvIndex); in TPM2_NV_Extend()
45 if(nvIndex.publicArea.attributes.TPMA_NV_EXTEND != SET) in TPM2_NV_Extend()
50 if( nvIndex.publicArea.attributes.TPMA_NV_ORDERLY == CLEAR in TPM2_NV_Extend()
51 || nvIndex.publicArea.attributes.TPMA_NV_WRITTEN == CLEAR) in TPM2_NV_Extend()
63 oldDigest.t.size = CryptGetHashDigestSize(nvIndex.publicArea.nameAlg); in TPM2_NV_Extend()
65 if(nvIndex.publicArea.attributes.TPMA_NV_WRITTEN == SET) in TPM2_NV_Extend()
67 NvGetIndexData(in->nvIndex, &nvIndex, 0, in TPM2_NV_Extend()
75 newDigest.t.size = CryptStartHash(nvIndex.publicArea.nameAlg, &hashState); in TPM2_NV_Extend()
[all …]
DNV_SetBits.c27 NV_INDEX nvIndex; in TPM2_NV_SetBits() local
36 result = NvWriteAccessChecks(in->authHandle, in->nvIndex); in TPM2_NV_SetBits()
41 NvGetIndexInfo(in->nvIndex, &nvIndex); in TPM2_NV_SetBits()
44 if(nvIndex.publicArea.attributes.TPMA_NV_BITS != SET) in TPM2_NV_SetBits()
48 if(nvIndex.publicArea.attributes.TPMA_NV_WRITTEN == CLEAR) in TPM2_NV_SetBits()
52 NvGetIntIndexData(in->nvIndex, &nvIndex, &oldValue); in TPM2_NV_SetBits()
59 if( ( nvIndex.publicArea.attributes.TPMA_NV_ORDERLY == CLEAR in TPM2_NV_SetBits()
61 || nvIndex.publicArea.attributes.TPMA_NV_WRITTEN == CLEAR) in TPM2_NV_SetBits()
73 result = NvWriteIndexData(in->nvIndex, &nvIndex, 0, 8, &newValue); in TPM2_NV_SetBits()
DNV_Write.c29 NV_INDEX nvIndex; in TPM2_NV_Write() local
35 NvGetIndexInfo(in->nvIndex, &nvIndex); in TPM2_NV_Write()
39 result = NvWriteAccessChecks(in->authHandle, in->nvIndex); in TPM2_NV_Write()
45 if( nvIndex.publicArea.attributes.TPMA_NV_COUNTER == SET in TPM2_NV_Write()
46 || nvIndex.publicArea.attributes.TPMA_NV_BITS == SET in TPM2_NV_Write()
47 || nvIndex.publicArea.attributes.TPMA_NV_EXTEND == SET) in TPM2_NV_Write()
51 if((in->data.t.size + in->offset) > nvIndex.publicArea.dataSize) in TPM2_NV_Write()
56 if( nvIndex.publicArea.attributes.TPMA_NV_WRITEALL == SET in TPM2_NV_Write()
57 && in->data.t.size < nvIndex.publicArea.dataSize) in TPM2_NV_Write()
65 return NvWriteIndexData(in->nvIndex, &nvIndex, in->offset, in TPM2_NV_Write()
DNV_Increment.c25 NV_INDEX nvIndex; in TPM2_NV_Increment() local
32 result = NvWriteAccessChecks(in->authHandle, in->nvIndex); in TPM2_NV_Increment()
37 NvGetIndexInfo(in->nvIndex, &nvIndex); in TPM2_NV_Increment()
40 if(nvIndex.publicArea.attributes.TPMA_NV_COUNTER != SET) in TPM2_NV_Increment()
46 if(nvIndex.publicArea.attributes.TPMA_NV_WRITTEN == CLEAR) in TPM2_NV_Increment()
50 NvGetIntIndexData(in->nvIndex, &nvIndex, &countValue); in TPM2_NV_Increment()
58 if( nvIndex.publicArea.attributes.TPMA_NV_ORDERLY == SET in TPM2_NV_Increment()
73 return NvWriteIndexData(in->nvIndex, &nvIndex, 0, 8, &countValue); in TPM2_NV_Increment()
DNV.c850 NV_INDEX nvIndex; in NvEntityStartup() local
857 _plat__NvMemoryRead(indexAddr, sizeof(NV_INDEX), &nvIndex); in NvEntityStartup()
858 attributes = nvIndex.publicArea.attributes; in NvEntityStartup()
884 memcpy(&publicAreaAttributesValue, &nvIndex.publicArea.attributes, in NvEntityStartup()
888 nvIndex.publicArea.attributes = attributes; in NvEntityStartup()
889 _plat__NvMemoryWrite(indexAddr, sizeof(NV_INDEX), &nvIndex); in NvEntityStartup()
906 nvIndex.publicArea.attributes.TPMA_NV_ORDERLY = CLEAR; in NvEntityStartup()
907 NvGetIntIndexData(nvHandle, &nvIndex, &counter); in NvEntityStartup()
908 nvIndex.publicArea.attributes.TPMA_NV_ORDERLY = SET; in NvEntityStartup()
912 NvWriteIndexData(nvHandle, &nvIndex, 0, sizeof(counter), &counter); in NvEntityStartup()
[all …]
DNV_WriteLock.c27 NV_INDEX nvIndex; in TPM2_NV_WriteLock() local
33 result = NvWriteAccessChecks(in->authHandle, in->nvIndex); in TPM2_NV_WriteLock()
44 NvGetIndexInfo(in->nvIndex, &nvIndex); in TPM2_NV_WriteLock()
48 if( nvIndex.publicArea.attributes.TPMA_NV_WRITEDEFINE == CLEAR in TPM2_NV_WriteLock()
49 && nvIndex.publicArea.attributes.TPMA_NV_WRITE_STCLEAR == CLEAR) in TPM2_NV_WriteLock()
64 nvIndex.publicArea.attributes.TPMA_NV_WRITELOCKED = SET; in TPM2_NV_WriteLock()
67 NvWriteIndexInfo(in->nvIndex, &nvIndex); in TPM2_NV_WriteLock()
DNV_spt.c32 NV_INDEX nvIndex; in NvReadAccessChecks() local
34 NvGetIndexInfo(nvHandle, &nvIndex); in NvReadAccessChecks()
48 if(! nvIndex.publicArea.attributes.TPMA_NV_OWNERREAD) in NvReadAccessChecks()
54 if(!nvIndex.publicArea.attributes.TPMA_NV_PPREAD) in NvReadAccessChecks()
64 if(nvIndex.publicArea.attributes.TPMA_NV_WRITTEN == CLEAR) in NvReadAccessChecks()
90 NV_INDEX nvIndex; in NvWriteAccessChecks() local
92 NvGetIndexInfo(nvHandle, &nvIndex); in NvWriteAccessChecks()
106 if(! nvIndex.publicArea.attributes.TPMA_NV_OWNERWRITE) in NvWriteAccessChecks()
112 if(!nvIndex.publicArea.attributes.TPMA_NV_PPWRITE) in NvWriteAccessChecks()
DNV_ReadLock.c26 NV_INDEX nvIndex; in TPM2_NV_ReadLock() local
39 result = NvReadAccessChecks(in->authHandle, in->nvIndex); in TPM2_NV_ReadLock()
53 NvGetIndexInfo(in->nvIndex, &nvIndex); in TPM2_NV_ReadLock()
56 if(nvIndex.publicArea.attributes.TPMA_NV_READ_STCLEAR == CLEAR) in TPM2_NV_ReadLock()
62 nvIndex.publicArea.attributes.TPMA_NV_READLOCKED = SET; in TPM2_NV_ReadLock()
64 NvWriteIndexInfo(in->nvIndex, &nvIndex); in TPM2_NV_ReadLock()
DNV_ChangeAuth.c23 NV_INDEX nvIndex; in TPM2_NV_ChangeAuth() local
32 NvGetIndexInfo(in->nvIndex, &nvIndex); in TPM2_NV_ChangeAuth()
39 if(in->newAuth.t.size > CryptGetHashDigestSize(nvIndex.publicArea.nameAlg)) in TPM2_NV_ChangeAuth()
44 nvIndex.authValue = in->newAuth; in TPM2_NV_ChangeAuth()
46 NvWriteIndexInfo(in->nvIndex, &nvIndex); in TPM2_NV_ChangeAuth()
DNV_Read.c28 NV_INDEX nvIndex; in TPM2_NV_Read() local
34 NvGetIndexInfo(in->nvIndex, &nvIndex); in TPM2_NV_Read()
39 result = NvReadAccessChecks(in->authHandle, in->nvIndex); in TPM2_NV_Read()
44 if((in->size + in->offset) > nvIndex.publicArea.dataSize) in TPM2_NV_Read()
52 NvGetIndexData(in->nvIndex, &nvIndex, in->offset, in->size, out->data.t.buffer); in TPM2_NV_Read()
DNV_Certify.c32 NV_INDEX nvIndex; in TPM2_NV_Certify() local
51 NvGetIndexInfo(in->nvIndex, &nvIndex); in TPM2_NV_Certify()
55 result = NvReadAccessChecks(in->authHandle, in->nvIndex); in TPM2_NV_Certify()
61 if((in->size + in->offset) > nvIndex.publicArea.dataSize) in TPM2_NV_Certify()
86 NvGetName(in->nvIndex, &certifyInfo.attested.nv.indexName.t.name); in TPM2_NV_Certify()
95 NvGetIndexData(in->nvIndex, &nvIndex, in TPM2_NV_Certify()
DNV_UndefineSpace.c25 NV_INDEX nvIndex; in TPM2_NV_UndefineSpace() local
36 NvGetIndexInfo(in->nvIndex, &nvIndex); in TPM2_NV_UndefineSpace()
39 if(SET == nvIndex.publicArea.attributes.TPMA_NV_POLICY_DELETE) in TPM2_NV_UndefineSpace()
45 && nvIndex.publicArea.attributes.TPMA_NV_PLATFORMCREATE == SET) in TPM2_NV_UndefineSpace()
51 NvDeleteEntity(in->nvIndex); in TPM2_NV_UndefineSpace()
DNV_UndefineSpaceSpecial.c23 NV_INDEX nvIndex; in TPM2_NV_UndefineSpaceSpecial() local
35 NvGetIndexInfo(in->nvIndex, &nvIndex); in TPM2_NV_UndefineSpaceSpecial()
38 if(CLEAR == nvIndex.publicArea.attributes.TPMA_NV_POLICY_DELETE) in TPM2_NV_UndefineSpaceSpecial()
44 NvDeleteEntity(in->nvIndex); in TPM2_NV_UndefineSpaceSpecial()
DNV_ReadPublic.c16 NV_INDEX nvIndex; in TPM2_NV_ReadPublic() local
21 NvGetIndexInfo(in->nvIndex, &nvIndex); in TPM2_NV_ReadPublic()
24 out->nvPublic.t.nvPublic = nvIndex.publicArea; in TPM2_NV_ReadPublic()
27 out->nvName.t.size = NvGetName(in->nvIndex, &out->nvName.t.name); in TPM2_NV_ReadPublic()
DEntity.c215 NV_INDEX nvIndex; in EntityGetAuthValue() local
216 NvGetIndexInfo(handle, &nvIndex); in EntityGetAuthValue()
217 authValue = nvIndex.authValue; in EntityGetAuthValue()
297 NV_INDEX nvIndex; in EntityGetAuthPolicy() local
298 NvGetIndexInfo(handle, &nvIndex); in EntityGetAuthPolicy()
299 *authPolicy = nvIndex.publicArea.authPolicy; in EntityGetAuthPolicy()
300 hashAlg = nvIndex.publicArea.nameAlg; in EntityGetAuthPolicy()
384 NV_INDEX nvIndex; in EntityGetHierarchy() local
385 NvGetIndexInfo(handle, &nvIndex); in EntityGetHierarchy()
389 if(nvIndex.publicArea.attributes.TPMA_NV_PLATFORMCREATE == SET) in EntityGetHierarchy()
DPolicyNV.c30 NV_INDEX nvIndex; in TPM2_PolicyNV() local
40 NvGetIndexInfo(in->nvIndex, &nvIndex); in TPM2_PolicyNV()
51 result = NvReadAccessChecks(in->authHandle, in->nvIndex); in TPM2_PolicyNV()
55 if((nvIndex.publicArea.dataSize - in->offset) < in->operandB.t.size) in TPM2_PolicyNV()
61 NvGetIndexData(in->nvIndex, &nvIndex, in->offset, in TPM2_PolicyNV()
182 nvName.t.size = EntityGetName(in->nvIndex, &nvName.t.name); in TPM2_PolicyNV()
DNV_fp.h35 NV_INDEX *nvIndex, // IN: RAM image of index header
41 NV_INDEX *nvIndex // OUT: NV index structure
44 NV_INDEX *nvIndex, // IN: RAM image of NV Index header
80 NV_INDEX *nvIndex, // IN: RAM copy of NV Index
86 NV_INDEX *nvIndex // IN: NV Index info to be written
DSessionProcess.c53 NV_INDEX nvIndex; in IsDAExempted() local
54 NvGetIndexInfo(handle, &nvIndex); in IsDAExempted()
55 result = (nvIndex.publicArea.attributes.TPMA_NV_NO_DA == SET); in IsDAExempted()
325 NV_INDEX nvIndex; in IsAuthValueAvailable() local
326 NvGetIndexInfo(handle, &nvIndex); in IsAuthValueAvailable()
329 if (nvIndex.publicArea.attributes.TPMA_NV_AUTHWRITE == SET) in IsAuthValueAvailable()
334 if (nvIndex.publicArea.attributes.TPMA_NV_AUTHREAD == SET) in IsAuthValueAvailable()
418 NV_INDEX nvIndex; in IsAuthPolicyAvailable() local
419 NvGetIndexInfo(handle, &nvIndex); in IsAuthPolicyAvailable()
421 if(nvIndex.publicArea.authPolicy.t.size != 0) in IsAuthPolicyAvailable()
[all …]
DNV_ChangeAuth_fp.h13 TPMI_RH_NV_INDEX nvIndex; member
DNV_Increment_fp.h14 TPMI_RH_NV_INDEX nvIndex; member
DNV_ReadLock_fp.h14 TPMI_RH_NV_INDEX nvIndex; member
DNV_UndefineSpace_fp.h14 TPMI_RH_NV_INDEX nvIndex; member
DNV_UndefineSpaceSpecial_fp.h13 TPMI_RH_NV_INDEX nvIndex; member
DNV_WriteLock_fp.h14 TPMI_RH_NV_INDEX nvIndex; member
/external/vboot_reference/utility/include/
Dtpmextras.h22 uint32_t nvIndex; member

123