Lines Matching refs:nv_index
28 int EpidFindNvIndex(Tpm2Ctx* ctx, uint32_t nv_index) { in EpidFindNvIndex() argument
31 if (ctx->nv[i].nv_index == nv_index) return i; in EpidFindNvIndex()
45 EpidStatus Tpm2NvDefineSpace(Tpm2Ctx* ctx, uint32_t nv_index, size_t size) { in Tpm2NvDefineSpace() argument
50 if (nv_index < MIN_NV_INDEX) { in Tpm2NvDefineSpace()
53 if (EpidFindNvIndex(ctx, nv_index) != -1) { in Tpm2NvDefineSpace()
60 ctx->nv[index].nv_index = nv_index; in Tpm2NvDefineSpace()
66 EpidStatus Tpm2NvUndefineSpace(Tpm2Ctx* ctx, uint32_t nv_index) { in Tpm2NvUndefineSpace() argument
71 if (nv_index < MIN_NV_INDEX) { in Tpm2NvUndefineSpace()
74 index = EpidFindNvIndex(ctx, nv_index); in Tpm2NvUndefineSpace()
78 ctx->nv[index].nv_index = 0; in Tpm2NvUndefineSpace()
84 EpidStatus Tpm2NvRead(Tpm2Ctx* ctx, uint32_t nv_index, size_t size, in Tpm2NvRead() argument
91 if (nv_index < MIN_NV_INDEX) { in Tpm2NvRead()
94 index = EpidFindNvIndex(ctx, nv_index); in Tpm2NvRead()
108 EpidStatus Tpm2NvWrite(Tpm2Ctx* ctx, uint32_t nv_index, size_t size, in Tpm2NvWrite() argument
115 if (nv_index < MIN_NV_INDEX) { in Tpm2NvWrite()
118 index = EpidFindNvIndex(ctx, nv_index); in Tpm2NvWrite()