Tspi_T...entLog(3)

πŸ’– Tspi_TPM_GetEventLog πŸ’–

okay bestie, gather round, because we're diving into the TCG Software Stack Developer's Reference and this one is a whole vibe. it's Tspi_T...entLog(3) if you're being all formal about it, but we're gonna be on a first-name basis 🫢


✨ NAME ✨

Tspi_TPM_GetEventLog β€” get the entire PCR event log. the WHOLE thing. no crumbs left behind πŸ’…


🌸 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_GetEventLog(TSS_HTPM        hTPM, UINT32* pulEventNumber,
                                TSS_PCR_EVENT** prgPcrEvents);

like yes, that's a lot of includes, but that's just how the TSS rolls, periodt ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

Tspi_TPM_GetEventLog hands you the whole entire event log β€” the one that was used to create all of the PCRs. not a snippet, not a highlight reel, the full saga. it's giving archivist energy and we're obsessed πŸ‘‘


πŸŽ€ PARAMETERS πŸŽ€

hTPM

the handle of the TPM object. your lil entry pass to the TPM world πŸ”‘

pulEventNumber

this one receives the number of returned event data structures that live inside the prgPcrEvents parameter. it's the count, bestie, it's how many we got πŸ“Š

prgPcrEvents

receives a pointer to an array of PCR event data. IMPORTANT: if it's NULL, then only the number of elements gets returned in the pulEventNumber parameter. so you can absolutely do a lil recon mission first, then come back for the goods πŸ‘€


⭐ RETURN CODES ⭐

Tspi_TPM_GetEventLog returns TSS_SUCCESS on success β€” slay β€” otherwise one of these lil guys shows up instead:

  • TSS_E_INVALID_HANDLE β€” hTPM is not a valid handle to the TPM object. the vibe check failed πŸ’€
  • TSS_E_INTERNAL_ERROR β€” an error occurred internal to the TSS. not our fault, not your fault, it's just internal drama 😭

🌈 CONFORMING TO 🌈

Tspi_TPM_GetEventLog conforms to the Trusted Computing Group Software Specification version 1.1 Golden. golden!! like the name says. iconic behavior fr fr ✨


πŸ’œ SEE ALSO πŸ’œ

iykyk, go read those next, they're the sibling chapters of this saga πŸ“š


and that's the whole page, bestie!! this lil doc came from TSS 1.1, dated 2004-05-26 β€” vintage but still hitting different. mwah, go forth and log those events πŸ’‹πŸŽ€