| Previous | Next |
| TPM_20_E_NV_RANGE | TPM_20_E_NV_LOCKED |
TPM_20_E_NV_SIZE
TPM_20_E_NV_SIZE is returned while defining an NV index whose requested dataSize is larger than the TPM permits for that index. The failure concerns the size of one proposed index, before normal read or write operations can use it.
What determines the limit
- The public NV definition contains the index handle, attributes, name algorithm, authorization policy, and requested data size.
- A TPM reports implementation limits through capability properties. The maximum useful transfer size for one command is also separate from the total size of an index.
- Some NV types such as counters, bit fields, extend indices, and ordinary data indices have command-specific semantics; a caller must use a size compatible with the chosen type.
What to inspect
- Compare the requested
dataSizewith the TPM's capability properties rather than reusing a fixed size from another machine. - Check the NV attributes and intended operation. A counter or bit-field index should not be treated as an arbitrary byte store.
- Do not confuse this code with
TPM_20_E_NV_SPACE: reducing one index can resolveNV_SIZE, whileNV_SPACEmeans aggregate nonvolatile storage is exhausted.
Safe recovery
Choose a smaller design only when it still preserves the required security properties. Splitting a protected value across several indices changes the authorization and lifecycle model, so it must be an explicit design decision rather than a blind retry.
References: TCG TPM 2.0 Library Part 2: Structures and tpm2_nvreadpublic documentation.
Looking for a different code? Search another status or error code.