tpm2_pcr_read(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tpm2_pcr_read β€” read a PCR value

okay so bestie, welcome to the Kernel API Manual ✨ this one's from the 9 section (that's the kernel-dev girlies) and it's all about tpm2_pcr_read β€” literally just reading a PCR value, no cap 🫢


🌸 SYNOPSIS 🌸

int tpm2_pcr_read (struct tpm_chip *chip , u32 pcr_idx , struct
     tpm_digest *digest , u16 *digest_size_ptr );

that's the whole signature, copy it exactly, don't be cute with it πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • chip β€” the TPM chip you're working with. your main character 🫢
  • pcr_idx β€” the index of the PCR you wanna read. which one? that one. πŸ‘‘
  • digest β€” the PCR bank and the buffer where the current PCR value gets written. it's giving "two jobs, one struct" πŸ’…
  • digest_size_ptr β€” a pointer to the variable that stores the digest size. yeah, pointer-to-the-size, iconic ✨

⭐ RETURN ⭐

same as with tpm_transmit_cmd. that's it, that's the whole vibe. go check that one for the details, iykyk πŸ’€


🌈 SEE ALSO 🌈

kernel file: ./drivers/char/tpm/tpm2-cmd.c

the whole friend group πŸ’œ:


ngl bestie, this page is short and sweet β€” read it, use it, and go read tpm_transmit_cmd if you want the return-value tea πŸ”₯

k bye, this page lives in ./drivers/char/tpm, dated October 2026, and it slayed πŸ’…βœ¨πŸ“

πŸ“¦ where this page comes from