plpks_read_fw_var(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– plpks_read_fw_var β€” the group-chat rundown πŸ’–

okay so real talk, bestie: this one comes straight out of the Kernel API Manual (section 9, kernel internals, iykyk) and it's called plpks_read_fw_var. Let's get into it 🌸


✨ NAME ✨

plpks_read_fw_var β€” fetches the data for the specified variable that is owned by the firmware consumer 🫢


✨ SYNOPSIS ✨

int plpks_read_fw_var(struct plpks_var *var);

✨ ARGUMENTS ✨

  • var β€” the variable we're reading out of the PLPKS. that's the whole mood πŸ’…

✨ DESCRIPTION ✨

so the tea is: the consumer or the owner of the object is the firmware. not us. we're just visiting 🧚

The H_PKS_READ_OBJECT HCALL is the thing that actually reads an object from the PLPKS β€” that's the hypercall doing the heavy lifting, main character energy fr fr.

Here's the part you cannot skip, bestie: the caller has to allocate the buffer var->data and specify the length for this buffer in var->datalen. You're not getting a free buffer out of this function, no cap. And if no buffer is provided at all? Then var->datalen gets populated with the requested object's size instead β€” so you can call it once to ask "how big even is this?", then allocate, then call again 😭 lowkey iconic two-step.

Possible reasons for the returned errno values, laid out all pretty:

  • -ENXIO β€” if PLPKS is not supported πŸ™ˆ
  • -EIO β€” if PLPKS access is blocked due to the LPAR's state, or if an error occurred while processing the request πŸ’€
  • -EINVAL β€” if invalid authorization parameter; if invalid object label parameter; if invalid object label len parameter; if invalid output data parameter; if invalid output data len parameter ⭐
  • -EPERM β€” if access is denied 🚫
  • -ENOENT β€” if the requested object was not found πŸ¦‹
  • -EFBIG β€” if the requested object couldn't be stored in the buffer provided πŸ“
  • -EBUSY β€” if unable to handle the request 🌈
fr fr read that -EFBIG line twice β€” that's the "your buffer was cute but too small" error and it will find you πŸ’€

✨ RETURN ✨

On success, 0 is returned. If not? A negative errno. That's it, that's the whole vibe check πŸ‘‘


✨ SEE ALSO ✨

the kernel file, right here:

./arch/powerpc/platforms/pseries/plpks.c

and the whole PLPKS friend group, all showing up to the party πŸŽ€


and that's the page!! mwah πŸ’‹ this lil manpage lives in ./arch/powerpc/platforms/pseries and it's dated October 2026 β€” go off, archive girlies πŸŒΈβœ¨πŸ’œ

πŸ“¦ where this page comes from