__apm_bios_call(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __apm_bios_call(9)

okay so first things first, bestie: this little cutie lives in the Kernel API Manual section 9 (that's the kernel-API girlies, not your regular command-line girlies πŸ’–). and no, section 9 is not a personality trait, it's just where all the kernel functions hang out. slay.


πŸŽ€ NAME πŸŽ€

__apm_bios_call β€” make an APM BIOS 32bit call. literally that's the whole job. icon behavior.


✨ SYNOPSIS ✨

long __apm_bios_call (void *_call );
πŸ™ˆ yes the spacing is a little feral, we don't fix it, we respect it.

🌸 ARGUMENTS 🌸

  • _call β€” pointer to struct apm_bios_call. that's it. that's the whole argument list. give her a pointer and let her cook πŸ”₯

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does she do? she makes an APM call using the 32bit protected mode interface. very demure, very privileged-mode of her πŸ‘‘

the caller is responsible for knowing if APM BIOS is configured and enabled β€” like, that's on you, bestie, she is not doing a vibe check on your BIOS for you 🫢

heads up though: this call can disable interrupts for a long period of time on some laptops. yes, literally a long period. that's not a fun quirky character flaw, that's a real caveat β€” plan accordingly 😭

and where does the answer show up? the return value is in AH and the carry flag is loaded into AL. so cute, so x86 of her.

if there's an error, then the error code is returned in AH (bits 8-15 of eax) and this function returns non-zero. periodt.


πŸ’€ NOTE πŸ’€

this makes the call on the current CPU. like, the one you're standing on right now. no sneaky migration, no "she's on tour", current CPU only 🧚


🌈 SEE ALSO 🌈

the kernel file ./arch/x86/kernel/apm_32.c, and also this whole friend group right here:


πŸ’œ and that's the page!! she ships out of ./arch/x86/kernel, dated October 2026, and her official little name tag says __apm_bios_call(9) πŸŽ€ go forth and make your protected-mode calls responsibly, bestie πŸ’…βœ¨
πŸ“¦ where this page comes from