nx842_exec_icswx(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nx842_exec_icswx β€” the Kernel API Manual moment (section 9, bestie)

okay so you found the nx842_exec_icswx(9) page and you're like "what is this even" β€” don't worry, I got you. This is the Kernel API Manual entry, section 9, and it's literally the compress/decompress data using the 842 algorithm girlie. Let's get into it ✨


πŸŽ€ NAME πŸŽ€

nx842_exec_icswx β€” compress/decompress data using the 842 algorithm

fr fr that's the whole vibe: you give it data, it squishes it or unsquishes it.


✨ SYNOPSIS ✨

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

look at her. six whole arguments. she's serving signature, she's serving types, she's serving const correctness 🌸


πŸ¦‹ ARGUMENTS πŸ¦‹

  • in β€” input buffer pointer. the raw data you're feeding in, mwah πŸ’–
  • inlen β€” input buffer size. how much data is actually in in, be honest.
  • out β€” output buffer pointer. where the glow-up happens ✨
  • outlenp β€” output buffer size pointer. it's a pointer to the size, not the size itself, iykyk 🫢
  • workmem β€” working memory buffer pointer, and bestie the size is determined by nx842_powernv_driver.workmem_size β€” don't just make one up πŸ’€
  • fc β€” function code, see CCW Function Codes in nx-842.h πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

so the (de)compression here is provided by the NX842 coprocessor on IBM PowerNV systems πŸ”₯ This function compresses or decompresses the provided input buffer into the provided output buffer. that's it, that's the job. hardware does the heavy lifting, you just point at buffers.

Upon return from this function outlen contains the length of the output data πŸ‘€ If there is an error then outlen will be 0 and an error will be specified by the return code from this function. so if you see a zero there, that's your villain origin story, check the return code.

The workmem buffer should only be used by one function call at a time 🚨 like it is not a shareable snack. one call at a time, periodt.


πŸ“ RETURN πŸ“

  • 0 β€” Success, output of length outlenp stored in the buffer at out πŸŽ‰ slay
  • -ENODEV β€” Hardware unavailable 😭
  • -ENOSPC β€” Output buffer is to small πŸ₯² (yes that's the original spelling, I don't make the rules)
  • -EMSGSIZE β€” Input buffer too large πŸ’€
  • -EINVAL β€” buffer constraints do not fix nx842_constraints πŸ™ˆ
  • -EPROTO β€” hardware error during operation πŸ”₯
  • -ETIMEDOUT β€” hardware did not complete operation in reasonable time ⏰
  • -EINTR β€” operation was aborted βœ‹

🌈 SEE ALSO 🌈

go read those next, bestie, you're already this deep in the nx folder 🧚


aaaand that's the page πŸ’… big kiss to ./drivers/crypto/nx, the October 2026 crew, for shipping this one β€” nx842_exec_icswx(9), no cap, iconic. πŸ‘‘

πŸ“¦ where this page comes from