diag204(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« diag204 πŸ’«

okay so bestie, welcome to the diag204(9) page from the Kernel API Manual β€” yes we're in kernel-land, yes it's s390, and yes it's giving big main character energy πŸŽ€ this one's short and sweet, so let's get into it ✨


🌸 NAME 🌸

diag204 β€” literally just: issue the diagnose 204 call. that's it. that's the whole vibe πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int diag204 (unsigned long subcode , unsigned long size , void *addr );

like, three args, one int back. no cap, that's the whole signature πŸ™ˆ


πŸŽ€ ARGUMENTS πŸŽ€

  • subcode β€” the subcode of diagnose 204 that you actually want to run ✨ whichever one you pick, that's the one that gets executed.
  • size β€” the size of the area, measured in pages, that addr points to β€” but only if addr is actually given, iykyk 🫢.
  • addr β€” the memory area (it's a vmalloc'ed one!) where the result gets written πŸ’–.

πŸ’œ DESCRIPTION πŸ’œ

so the whole thing is: execute diagnose 204 with the subcode you handed it, and write the result into the memory area you specified with addr. iconic, honestly πŸ‘‘

but listen β€” the details matter, bestie, don't skip them:

⚠️ for subcodes that don't write a result to memory, both size and addr must be zero. not "should", must. zero. both of them. no exceptions πŸ”₯

and if you do specify addr, it has two strict requirements, fr fr:

  • it must be page aligned πŸ“
  • it must have been allocated with vmalloc 🧚

the good news? if a conversion to real / physical addresses is required, this function handles that for you β€” you don't have to do it yourself, it's already slaying that job πŸ’…βœ¨


🌈 SEE ALSO 🌈

  • Kernel file ./arch/s390/kernel/diag/diag.c β€” go read the source, bestie, it's right there πŸ“–πŸ’–

and that's a wrap, cutie 🫢 this page came to you from ./arch/s390/kernel/diag, dated October 2026 β€” go forth and diagnose responsibly, mwah πŸ’‹πŸŒΈ

πŸ“¦ where this page comes from