Tspi_TPM_DirWrite(3)

✨ Tspi_TPM_DirWrite ✨

okay bestie, welcome to the Tspi_TPM_DirWrite(3) page from the Library Functions Manual, aka the TCG Software Stack Developer's Reference 🌸 and yes we are reading a whole manpage together, it's giving study date energy πŸ’…


πŸ’– NAME πŸ’–

Tspi_TPM_DirWrite β€” write to a Data Integrity Register, no cap πŸ“


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <tss/platform.h>
#include <tss/tcpa_defines.h>
#include <tss/tcpa_typedef.h>
#include <tss/tcpa_struct.h>
#include <tss/tss_typedef.h>
#include <tss/tss_structs.h>
#include <tss/tspi.h>

TSS_RESULT Tspi_TPM_DirWrite(TSS_HTPM hTPM,            UINT32 ulDirIndex,
                             UINT32   ulDirDataLength, BYTE*  rgbDirData);

like, look at those includes, so many headers, she's thorough πŸ’œ


🌈 DESCRIPTION 🌈

Tspi_TPM_DirWrite writes a data integrity register, periodt. ✍️

Bestie, the vibe check here is: you gotta already know which DIR index you're writing to and what data you're putting in there before you even call this command. It does not hold your hand, it does not guess, it just writes. So come prepared πŸŽ€


🧚 PARAMETERS 🧚

hTPM

The hTPM parameter is used to specify the handle of the TPM object. literally the "which TPM are we talking to" of it all πŸ‘‘

ulDirIndex

The ulDirIndex parameter is the index of the DIR to write. 🎯 Wanna know how many DIR registers your TPM even supports? Use Tspi_TPM_GetCapability(3) β€” she'll tell you, iykyk.

ulDirDataLength

The ulDirDataLength parameter is the length in bytes of the rgbDirData parameter. yes bestie, it's the length of the data, we love a matching pair πŸ’«

rgbDirData

The rgbDirData parameter is a pointer to memory containing the data to be written to the DIR. just a lil pointer, pointing at your precious bytes 🫢


πŸ”₯ RETURN CODES πŸ”₯

Tspi_TPM_DirWrite returns TSS_SUCCESS on success πŸŽ‰ otherwise one of the following values is returned:

  • TSS_E_INVALID_HANDLE β€” hTPM is not a valid handle. like, who is she?? not a real handle πŸ’€
  • TSS_E_INTERNAL_ERROR β€” An internal SW error has been detected. something went wrong in the software guts, not your fault (probably) 😭
  • TSS_E_BAD_PARAMETER β€” One or more parameters is bad. bestie check ur args πŸ™ˆ

πŸ‘‘ CONFORMING TO πŸ‘‘

Tspi_TPM_DirWrite conforms to the Trusted Computing Group Software Specification version 1.1 Golden ⭐ she follows the rules, she's certified, she's iconic.


🌸 SEE ALSO 🌸

go read those too, we love a cross-reference moment πŸ“š


okay that's the whole page, bestie!! this one came from TSS 1.1, dated 2004-05-25, and it lives in the Library Functions Manual πŸ’– thanks for reading with me, mwah, slay, bye πŸŽ€βœ¨