tpm2_parse_create_primary(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ tpm2_parse_create_primary(9) ✨

okay so bestie, welcome to the Kernel API Manual β€” this one's about tpm2_parse_create_primary, and no cap it's a little parser with main character energy. It lives in the kernel's TPM world and its whole job is parsing the data the TPM throws back at you from TPM_CC_CREATE_PRIMARY. That's it, that's the vibe. πŸ’…


🌸 NAME 🌸

tpm2_parse_create_primary β€” literally just parses the data returned from TPM_CC_CREATE_PRIMARY, bestie. That's the whole assignment. πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

int tpm2_parse_create_primary (struct tpm_chip *chip , struct tpm_buf
*buf , u32 *handle , u32 hierarchy , u8 *name );

like yes, five arguments, she's got range πŸ’–

πŸ‘‘ ARGUMENTS πŸ‘‘

  • chip β€” the TPM that the primary was created under. your designated TPM bestie, basically 🫢
  • buf β€” the response buffer from the chip. this is where the TPM's little reply lives ✨
  • handle β€” pointer to be filled in with the return handle of the primary. she gets filled in iykyk πŸŽ€
  • hierarchy β€” the hierarchy the primary was created for. gotta know which family tree we're in 🌈
  • name β€” pointer to be filled in with the primary key name. iconic, named, loved ⭐

πŸ’€ RETURN πŸ’€

  • 0 β€” OK. slay, it worked, periodt πŸ’…
  • -errno β€” a system error. not the vibe, ngl 😭
  • TPM_RC β€” a TPM error. the chip said no fr fr πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

the kernel file lives at ./drivers/char/tpm/tpm2-sessions.c β€” go read her, she's the source of truth πŸ‘‘


bestie listen β€” that's the whole squad, all eight of them, no gatekeeping πŸ’œ

and that's the page! 🧚 from ./drivers/char/tpm, dated October 2026, signed off in classic form as tpm2_parse_create_primary(9) β€” arrivederci, go parse something gorgeous πŸŒΈπŸ¦‹πŸ’–

πŸ“¦ where this page comes from