diag204(9)
π« 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, thataddrpoints to β but only ifaddris actually given, iykyk π«Ά.addrβ the memory area (it's avmalloc'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, bothsizeandaddrmust 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms