nx842_exec_vas(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 nx842_exec_vas 🌸

okay so bestie, you're in the Kernel API Manual, section 9, and today's main character is nx842_exec_vas. she compresses, she decompresses, she does it all on the NX842 coprocessor β€” let's get into it πŸ’…


✨ NAME ✨

nx842_exec_vas β€” compress/decompress data using the 842 algorithm πŸŽ€


✨ SYNOPSIS ✨

int nx842_exec_vas (const unsigned char *in , unsigned int inlen ,
       unsigned char *out , unsigned int *outlenp , void *workmem , int fc );

✨ ARGUMENTS ✨

  • in β€” the input buffer pointer, aka where your data lives rn 🫢
  • inlen β€” the input buffer size, gotta tell her how much to look at
  • out β€” the output buffer pointer, where the glow-up happens ✨
  • outlenp β€” the output buffer size pointer (it's a pointer, she points, that's her job)
  • workmem β€” working memory buffer pointer, and its size is determined by nx842_powernv_driver.workmem_size β€” very specific, no guessing πŸ”₯
  • fc β€” the function code, see CCW Function Codes in nx-842.h iykyk πŸ“Ž

✨ DESCRIPTION ✨

So the (De)compression is provided by the NX842 coprocessor on IBM PowerNV systems, and what she does is compress or decompress the provided input buffer straight into the provided output buffer. literally her whole thing πŸ’–

Upon return from this function outlen contains the length of the output data β€” that's your receipt, keep it. If there's an error, then outlen will be 0 and the error will be specified by the return code from this function. so if you see a zero, don't panic, just read the return code, bestie 😭

⚠️ the workmem buffer should only be used by one function call at a time. one at a time. do not share. she is not built for that chaos πŸ™ˆ

✨ RETURN ✨

  • 0 β€” Success, output of length outlenp stored in the buffer at out πŸ‘‘ slay
  • -ENODEV β€” Hardware unavailable, so like… the hardware ghosted you πŸ’€
  • -ENOSPC β€” Output buffer is to small (yes, "to", that's how it's written in here, don't come for me 😭)
  • -EMSGSIZE β€” Input buffer too large, she said that's too much
  • -EINVAL β€” buffer constraints do not fix nx842_constraints
  • -EPROTO β€” hardware error during operation, not the vibe
  • -ETIMEDOUT β€” hardware did not complete operation in reasonable time ⏰
  • -EINTR β€” operation was aborted 🫠

✨ SEE ALSO ✨

Kernel file ./drivers/crypto/nx/nx-common-powernv.c β€” plus go read nx842_exec_icswx(9), nx842_powernv_compress(9), and nx842_powernv_decompress(9) when you're done here, they're all linked up like a little friend group πŸ¦‹


πŸŽ€ and that's the page!! brought to you by ./drivers/crypto/nx, dated October 2026, filed under nx842_exec_vas(9) β€” mwah, go compress something iconic πŸ’œ
πŸ“¦ where this page comes from