SMAPI(4)
π» SMAPI(4) β the ThinkPad whisperer, i386 Kernel Interfaces Manual π«Ά
okay so bestie, buckle up, because this is the smapi page β the System Management Application Program Interface driver β¨ and it's lowkey iconic. i386 Kernel Interfaces Manual energy, we love to see it.
πΈ NAME πΈ
smapi β the System Management Application Program Interface driver, no cap. it's the little driver that talks to the BIOS so your laptop doesn't have to do it alone π
π¦ DESCRIPTION π¦
okay so picture this: lots of IBM Thinkpad laptops have this special software interface, right? it's called SMAPI (System Management Application Program Interface) and it is literally the main character of the BIOS world. it controls a bunch of different things in the system, including:
- System Interface β the BIOS can store system info in here, like the system identifier π
- System Configuration β this is where devices get configured, the display being one of them π₯οΈ
- Power Management β software can interact with the SMAPI BIOS for Power Management control, so yeah, power stuff β‘
π finding the entry point π
so client software has to go find a "header image" hiding out in the F000 segment inside the Thinkpad ROM (read-only memory), and it lives at the 16-byte boundary. that's the "Entry Point" for the service, fr fr. that's the spot. that's the vibe.
β¨ what's inside the header image β¨
the "header image" is storing all kinds of info, like:
- the signature ποΈ
- the SMAPI version (major and minor, both of them, we're thorough)
- the header image length
- checksum information (this is the part that verifies the image, so it's kind of the vibe check of the whole thing)
- an Information Word (used to identify the BIOS service level)
- Real Mode Entry Point β this is where clients using the Real/V86 mode go for the far-call value
- and finally a 16-bit/32-bit Protected Mode Entry Point: the base code address which specifies the BIOS physical address. and listen β the client must prepare a
64kilobyte selector for this BIOS. not optional, bestie π
π invoking the SMAPI BIOS π
to invoke the SMAPI BIOS, you have to use a far-call on the entry point specified in the header file. everything else? store it in the client data area. simple as that.
the client is required to prepare both an input and an output parameter in a data area of its own. this area can be "informed" by pushing those pointers into its stack before the far-calls π«Ά
also, heads up: the SMAPI BIOS uses the stack and data areas with the selector during a BIOS invocation, so the caller must define the same privilege area as the BIOS. same privilege area, no shortcuts.
β the parameter structure β
the parameter structure gets made up by using the input and output fields that the caller prepared. the input field specifies the function request to the BIOS, and then the BIOS drops a return value into the output field. cute, right?
these fields are made up of three parts:
- the first one holds parameters, function numbers, and return codes
- the next one contains an offset in hexadecimal
- and finally a length field, which is comprised of Byte, Word, or Double Word
three parts, all accounted for, periodt π
π SEE ALSO π
- IBM Thinkpad 560/560E Technical Reference,
06J0536 S76H-7587-01. - IBM Thinkpad 560Z Technical Reference,
xxxxxxx xxxx-xxxx-xx. - IBM Thinkpad 600 Technical Reference,
xxxxxxx xxxx-xxxx-xx. - IBM Thinkpad 760XD/760XL/765D/765L Technical Reference,
06J0537 S30H-2433-02. - IBM Thinkpad 770 Technical Reference,
05L1739 S05L-1739-00.
like, go read the technical references if you want the full lore, iykyk π
π AUTHORS π
the smapi driver was written by Matthew N. Dodd <mdodd@FreeBSD.org> π
and this manual page was written by Tom Rhodes <trhodes@FreeBSD.org> and Matthew N. Dodd <mdodd@FreeBSD.org> π«Ά
ngl bestie, if you're poking at F000 segments and far-calls, you're built different. respect. π§
and that's the page!! mwah π β brought to you by Debian, dated April 1, 2003, filed under SMAPI(4). slay, go forth and configure your ThinkPad πΈβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2003 Tom Rhodes
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms