tpm2_pcr_read(9)
π 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 π:
tpm2_calc_ordinal_duration(9)tpm2_pcr_extend(9)tpm2_get_random(9)tpm2_flush_context(9)tpm2_get_tpm_pt(9)tpm2_shutdown(9)tpm2_do_selftest(9)tpm2_probe(9)tpm2_startup(9)tpm2_auto_startup(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms