tpm_is_tpm2(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– tpm_is_tpm2(9) β€” Kernel API Manual πŸ’–

okay so bestie, gather round, because we're about to find out the ONE thing everyone wants to know: do we have a TPM2 chip? that's it. that's the whole function. she's a vibe check for your silicon. ✨


🌸 NAME 🌸

tpm_is_tpm2 β€” do we have a TPM2 chip? (yes, this is genuinely the entire personality)


πŸ¦‹ SYNOPSIS πŸ¦‹

int tpm_is_tpm2 (struct tpm_chip *chip );

literally one function, one argument, no notes. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • chip β€” a struct tpm_chip instance. pass NULL if you want the default chip, because sometimes you just can't be bothered to pick one and honestly? valid. 🫢

⭐ RETURN ⭐

the receipts, bestie:

  • 1 β€” we DO have a TPM2 chip. slay. πŸ‘‘
  • 0 β€” we do NOT have a TPM2 chip. it's giving legacy. πŸ’€
  • a negative number for system errors (errno) β€” so if it's negative, something went wrong and you should go read your errno, no cap. 😭

πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, fr fr:

all icons, all in the same directory, iykyk. 🌈


lowkey important: 1 means yes, 0 means no, and negative means ✨something broke✨ β€” don't mix those up or it's gonna be a whole thing. πŸ™ˆ

and that's the page! πŸŽ€ this lil gem lives under ./drivers/char/tpm, and the version/date situation is October 2026 β€” so yeah, she's timestamped and official, tpm_is_tpm2(9) and all. periodt. πŸ’œπŸ§š

πŸ“¦ where this page comes from