Fapi_NvWrite(3)
π Fapi_NvWrite(3) β Library Functions Manual π
okay bestie, you opened the Library Functions Manual page for Fapi_NvWrite, and I got you. This is the FAPI situation for writing to NV, either one-call or async. Every single detail is staying, no cap. π
π NAME π
Fapi_NvWrite β Fapi_NvWrite. Thatβs the whole name, iconic and to the point. π«Ά
β¨ SYNOPSIS β¨
π§ Functions π§
TSS2_RC Fapi_NvWrite (FAPI_CONTEXT *context, char const *path, uint8_t
const *data, size_t size)
TSS2_RC Fapi_NvWrite_Async (FAPI_CONTEXT *context, char const *path,
uint8_t const *data, size_t size)
TSS2_RC Fapi_NvWrite_Finish (FAPI_CONTEXT *context)
πΈ Detailed Description πΈ
okay so these are the FAPI functions that invoke NvWrite either as a one-call situation or in an asynchronous manner. Pick your lane, bestie. π«
π Function Documentation π
π§ TSS2_RC Fapi_NvWrite π§
TSS2_RC Fapi_NvWrite (FAPI_CONTEXT * context, char const * nvPath, uint8_t
const * data, size_t size)
One-Call function for Fapi_NvWrite. Yes, capital C in βOne-Call,β we respect the original. It writes data to a "regular" (not pin, extend or counter) NV index. Periodt. π₯
π Parameters π
contextβ TheFAPI_CONTEXTnvPathβ The path of the NV index to writedataβ The data to write to the NV indexsizeβ The size of data in bytes
π©· Return values π©·
TSS2_RC_SUCCESSβ if the function call was a success.TSS2_FAPI_RC_BAD_REFERENCEβ ifcontext,nvPath, ordatais NULL.TSS2_FAPI_RC_BAD_CONTEXTβ if context corruption is detected.TSS2_FAPI_RC_BAD_PATHβ ifnvPathis not found.TSS2_FAPI_RC_NV_EXCEEDEDβ if the NV is not large enough for the data to be written.TSS2_FAPI_RC_NV_WRONG_TYPEβ if the NV index is not a "regular" one.TSS2_FAPI_RC_NV_NOT_WRITEABLEβ if the NV is not a writeable index.TSS2_FAPI_RC_POLICY_UNKNOWNβ if the policy is unknown.TSS2_FAPI_RC_BAD_SEQUENCEβ if the context has an asynchronous operation already pending.TSS2_FAPI_RC_IO_ERRORβ if the data cannot be saved.TSS2_FAPI_RC_MEMORYβ if the FAPI cannot allocate enough memory for internal operations or return parameters.TSS2_FAPI_RC_NO_TPMβ if FAPI was initialized in no-TPM-mode via its config file.TSS2_FAPI_RC_TRY_AGAINβ if an I/O operation is not finished yet and this function needs to be called again.TSS2_FAPI_RC_BAD_VALUEβ if an invalid value was passed into the function.TSS2_FAPI_RC_PATH_NOT_FOUNDβ if a FAPI object path was not found during authorization.TSS2_FAPI_RC_KEY_NOT_FOUNDβ if a key was not found.TSS2_FAPI_RC_GENERAL_FAILUREβ if an internal error occurred.TSS2_FAPI_RC_AUTHORIZATION_UNKNOWNβ if a required authorization callback is not set.TSS2_FAPI_RC_AUTHORIZATION_FAILEDβ if the authorization attempt fails.TSS2_ESYS_RC_*β possible error codes of ESAPI.TSS2_FAPI_RC_NOT_PROVISIONEDβ FAPI was not provisioned.
π TSS2_RC Fapi_NvWrite_Async π
TSS2_RC Fapi_NvWrite_Async (FAPI_CONTEXT * context, char const * nvPath,
uint8_t const * data, size_t size)
Asynchronous function for Fapi_NvWrite. It writes data to a "regular" (not pin, extend or counter) NV index. Then call Fapi_NvWrite_Finish to finish the execution of this command. Donβt leave it hanging, bestie. π«
π Parameters π
contextβ TheFAPI_CONTEXTnvPathβ The path of the NV index to writedataβ The data to write to the NV indexsizeβ The size of data in bytes
π©· Return values π©·
TSS2_RC_SUCCESSβ if the function call was a success.TSS2_FAPI_RC_BAD_REFERENCEβ ifcontext,nvPath, ordatais NULL.TSS2_FAPI_RC_BAD_CONTEXTβ if context corruption is detected.TSS2_FAPI_RC_BAD_PATHβ ifnvPathis not found.TSS2_FAPI_RC_NV_EXCEEDEDβ if the NV is not large enough for the data to be written.TSS2_FAPI_RC_NV_WRONG_TYPEβ if the NV index is not a "regular" one.TSS2_FAPI_RC_NV_NOT_WRITEABLEβ if the NV is not a writeable index.TSS2_FAPI_RC_POLICY_UNKNOWNβ if the policy is unknown.TSS2_FAPI_RC_BAD_SEQUENCEβ if the context has an asynchronous operation already pending.TSS2_FAPI_RC_IO_ERRORβ if the data cannot be saved.TSS2_FAPI_RC_MEMORYβ if the FAPI cannot allocate enough memory for internal operations or return parameters.TSS2_FAPI_RC_NO_TPMβ if FAPI was initialized in no-TPM-mode via its config file.
π¦ TSS2_RC Fapi_NvWrite_Finish π¦
TSS2_RC Fapi_NvWrite_Finish (FAPI_CONTEXT * context)
Asynchronous finish function for Fapi_NvWrite. This function should be called after a previous Fapi_NvWrite. Lowkey the cleanup-era main character. β¨
π Parameters π
contextβ TheFAPI_CONTEXT
π©· Return values π©·
TSS2_RC_SUCCESSβ if the function call was a success.TSS2_FAPI_RC_BAD_REFERENCEβ ifcontextis NULL.TSS2_FAPI_RC_BAD_CONTEXTβ if context corruption is detected.TSS2_FAPI_RC_BAD_SEQUENCEβ if the context has an asynchronous operation already pending.TSS2_FAPI_RC_IO_ERRORβ if the data cannot be saved.TSS2_FAPI_RC_MEMORYβ if the FAPI cannot allocate enough memory for internal operations or return parameters.TSS2_FAPI_RC_TRY_AGAINβ if the asynchronous operation is not yet complete. Call this function again later.TSS2_FAPI_RC_BAD_VALUEβ if an invalid value was passed into the function.TSS2_FAPI_RC_BAD_PATHβ if a path is used in inappropriate context or contains illegal characters.TSS2_FAPI_RC_PATH_NOT_FOUNDβ if a FAPI object path was not found during authorization.TSS2_FAPI_RC_KEY_NOT_FOUNDβ if a key was not found.TSS2_FAPI_RC_GENERAL_FAILUREβ if an internal error occurred.TSS2_FAPI_RC_AUTHORIZATION_UNKNOWNβ if a required authorization callback is not set.TSS2_FAPI_RC_AUTHORIZATION_FAILEDβ if the authorization attempt fails.TSS2_FAPI_RC_POLICY_UNKNOWNβ if policy search for a certain policy digest was not successful.TSS2_ESYS_RC_*β possible error codes of ESAPI.TSS2_FAPI_RC_NOT_PROVISIONEDβ FAPI was not provisioned.
π Author π
Generated automatically by Doxygen for tpm2-tss from the source code. So yeah, Doxygen wrote this, not a human with a ring light. π
π xoxo, bestie β this page comes from tpm2-tss, Version 4.1.5, and the page title is Fapi_NvWrite(3). The footer didnβt give a date, so Iβm not inventing one β periodt. Mwah! π
π¦ where this page comes from
- fedora 44: tpm2-tss-devel 4.1.5-1.fc44 Β· BSD-2-Clause
- fedora 44: tpm2-tss-devel 4.1.5-1.fc44 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms