snake_inventory(9)
π snake_inventory(9) β a Kernel API Manual moment π
okay so bestie, welcome to the Kernel API Manual, we're literally in the kernel docs rn and this one is a little retro gem β¨
β¨ NAME β¨
snake_inventory β and honestly? the original page gives us nothing after that dash π no description, no little teaser, just the name and vibes. iconic of it, honestly π
πΈ SYNOPSIS πΈ
void snake_inventory (void );
π¦ ARGUMENTS π¦
voidβ no arguments, bestie. zero. none. it takes nothing and it needs nothing π«Ά
π DESCRIPTION π
okay so story time π β before PDC_SYSTEM_MAP was invented, the PDC_MEM_MAP call was the one doing the work. like, that was the moment, that was the era π
to use it, we initialise mod_path.bc to 0xff and then try all values of mod to get the HPA for the top-level devices. yes, all of them. we're brute-forcing our way to the answer and honestly? slay π₯
and it gets better β bus adapters may have sub-devices π and those get discovered by setting bc[5] to 0 and bc[4] to the module, then trying all possible functions. it's giving "try everything until something works" and ngl that's a whole mood π
lowkey if you're reading this thinking "that's a lot of trying", yeah. that's the bit. the trying is the algorithm π
π SEE ALSO π
- Kernel file
./arch/parisc/kernel/inventory.cβ the actual source, go read it, it's right there π add_system_map_addresses(9)π§system_map_inventory(9)β
and that's the whole page bestie, no cap π
sign-off szn π β this little beauty lives under ./arch/parisc/kernel (that's the source/version babe), stamped October 2026, and it's forever known as snake_inventory(9) πΈπ¦β¨
π¦ 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