Tspi_TPM_DirRead(3)

πŸ’– Tspi_TPM_DirRead πŸ’–

okay bestie, welcome to the manual page for Tspi_TPM_DirRead(3) β€” straight out of the TCG Software Stack Developer's Reference ✨ this is your girl's guide to reading a Data Integrity Register, and yes, it's as iconic as it sounds πŸŽ€


🌸 NAME 🌸

Tspi_TPM_DirRead β€” Read a Data Integrity Register πŸ’…


✨ 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_DirRead(TSS_HTPM hTPM,             UINT32 ulDirIndex,
                            UINT32*  pulDirDataLength, BYTE** prgbDirData);

like, look at that signature. it's giving function. 😌


πŸ¦‹ DESCRIPTION πŸ¦‹

So Tspi_TPM_DirRead reads a data integrity register, periodt. And what even is a DIR, you ask? DIRs are non-volatile memory areas β€” meaning they persist across reboots, no cap, they stay put 🫢 β€” and they're maintained by the TPM itself. little memory vaults. obsessed.


πŸŽ€ PARAMETERS πŸŽ€

hTPM

The hTPM parameter is how you specify the handle of the TPM object. that's your TPM's little name tag πŸ’–

ulDirIndex

The ulDirIndex parameter is the index of the DIR you wanna read. and if you're sitting there like "bestie how many DIR registers does this TPM even have??" β€” you query the TPM for the number of DIR registers it supports using Tspi_TPM_GetCapability(3). iykyk. πŸ”₯

pulDirDataLength

The pulDirDataLength parameter receives the length in bytes of the prgbDirData parameter. it's the size tag, she's reporting back πŸ“

prgbDirData

The prgbDirData parameter receives a pointer to memory containing the DIR data. boom, that's the goods πŸ’…


πŸ’€ RETURN CODES πŸ’€

Tspi_TPM_DirRead returns TSS_SUCCESS on success, and otherwise one of these values comes back at you:

  • TSS_E_INVALID_HANDLE β€” hTPM is not a valid handle. bestie that's not a real handle 😭
  • TSS_E_INTERNAL_ERROR β€” an internal SW error has been detected. not her fault, something internal is going through it πŸ’€
  • TSS_E_BAD_PARAMETER β€” one or more parameters is bad. check your args babe πŸ™ˆ

πŸ‘‘ CONFORMING TO πŸ‘‘

Tspi_TPM_DirRead conforms to the Trusted Computing Group Software Specification version 1.1 Golden. standards! she has them! ⭐


🌈 SEE ALSO 🌈

read one, write one β€” balance 🧚


fr fr that's the whole page β€” TSS 1.1, dated 2004-05-25, and that footer lives down at the bottom like the little signature it is. mwah, go read some registers bestie πŸ’œβœ¨