PAPR_SYSPARM_IOC_GET(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ PAPR_SYSPARM_IOC_GET ✨

kernel api manual, but make it bestie-friendly πŸŽ€ β€” yes we're reading a section 9 page together, hold my iced coffee 🧚


πŸ’– NAME πŸ’–

PAPR_SYSPARM_IOC_GET β€” the ioctl that goes and fetches the value of a PAPR system parameter for you. that's it, that's the whole vibe πŸ¦‹


🌸 SYNOPSIS 🌸

PAPR_SYSPARM_IOC_GET

literally just the one thing, no arguments to memorize, we love a low-maintenance icon πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so first thing you're gonna notice: this bad boy uses _IOWR and you might be like "girl why is it read and write??" and the answer is one corner case πŸ’…

pulling the value of the "OS Service Entitlement Status" parameter (60) needs the caller to actually supply input data β€” a date string β€” in the buffer that gets passed to firmware. so yeah, it writes to you but it also needs a lil something from you first. give and take, healthy relationship 🫢

because of that, the length and data of the incoming papr_sysparm_io_block are always used to initialize the work area that gets handed to ibm,get-system-parameter. always always. no skipping.

now, no other parameters are known to take input this way β€” none, zero, nada β€” so in the normal everyday case, callers are encouraged (but not required) to zero-initialize length and data. encouraged bestie, not forced. it's giving polite suggestion energy 🌈

⚠️ real talk though: on error the contents of the ioblock are indeterminate. like, unknown. do not trust them. do not build a personality around them. πŸ’€

πŸ”₯ RETURN πŸ”₯

here's your vibe check on what comes back:

  • 0 β€” success, slay πŸŽ‰ and length is the length of valid data in data, and it will not exceed PAPR_SYSPARM_MAX_OUTPUT.
  • -EIO β€” platform error. (-1) 😭
  • -EINVAL β€” incorrect data length or format. (-9999) πŸ™ˆ
  • -EPERM β€” the calling partition is not allowed to access this parameter. (-9002) like, security said no 🚫
  • -EOPNOTSUPP β€” parameter not supported on this platform. (-3) wrong platform, wrong era, moving on ✨

πŸŽ€ SEE ALSO πŸŽ€

  • kernel file ./arch/powerpc/include/uapi/asm/papr-sysparm.h β€” go read it, iykyk πŸ“–
  • PAPR_SYSPARM_IOC_SET(9) β€” the setter sibling, the other main character πŸ‘‘

and that's the whole page, bestie!! 🌸 this gem lives in ./arch/powerpc/include/uapi/asm, stamped October 2026 β€” no cap, go get those system parameters πŸ’–βœ¨πŸ¦‹πŸ’…

πŸ“¦ where this page comes from