papr_sysparm_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– papr_sysparm_get β€” bestie's guide to grabbing a PAPR system param πŸ’–

okay so real talk, this one's from the Kernel API Manual (yes, the kernel has a manual, she's iconic like that), and it's literally just "hey can I see what this system parameter is set to?" β€” that's the whole vibe.


✨ NAME ✨

papr_sysparm_get β€” retrieve the value of a PAPR system parameter. no cap, that's it, that's the job πŸŽ€


🌸 SYNOPSIS 🌸

int papr_sysparm_get (papr_sysparm_t param , struct papr_sysparm_buf *buf );

two arguments, one int coming back at you. clean. minimal. she ate πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • param β€” the PAPR system parameter token ✨. it's the one described in section 7.3.16 "System Parameters Option", so like, go read that if you need the lore iykyk.
  • buf β€” a struct papr_sysparm_buf, and the move is to pass the one you got back from papr_sysparm_buf_alloc 🫢. don't just freestyle some random buffer, okay?

πŸ’œ DESCRIPTION πŸ’œ

so basically: place the result of querying the specified parameter, if available, into buf. that's the whole assignment fr fr.

the result includes a be16 length header followed by the value β€” and that value might be a string, or it might be binary data. either way, go look at struct papr_sysparm_buf for the details, she's got the receipts πŸ“‹.

here's the tea though β€” there's at least one parameter (60, OS Service Entitlement Status) where the results actually depend on the incoming contents of the work area 😭. so because of that, the caller-supplied buffer gets copied unmodified into the work area before calling ibm,get-system-parameter. like, your bytes matter. keep them exactly as they are. periodt.

and now for the fine print, bestie, pay attention:

a defined parameter may not be implemented on a given system. and even some implemented parameters may not be available to all partitions on a system. also a parameter's disposition may change at any time due to system configuration changes or partition migration πŸ”₯. so like… don't get too attached to any answer, she's fluid.

🌈 CONTEXT 🌈

  • this function may sleep 😴. so please, do not call her from a context where sleeping is a crime. she needs her nap.

⭐ RETURN ⭐

  • 0 on success πŸŽ‰
  • -errno otherwise πŸ’€
  • and crucially: buf is unmodified on error. so if it flops, your buffer is still exactly the way you left it. no surprise edits, we love a respectful function πŸ™ˆ.

πŸ“ SEE ALSO πŸ“

  • Kernel file ./arch/powerpc/platforms/pseries/papr-sysparm.c β€” go read the source, it's giving main character energy πŸ‘‘

🧚 and that's the whole page! tysm for coming to my TED talk, this was ./arch/powerpc/platforms/pseries, dated October 2026, and the manual page is papr_sysparm_get(9) β€” mwah, slay, see you in the next one πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from