SMAPI(4)

πŸ’– SMAPI(4) πŸ’–

okay so bestie, welcome to the i386 Kernel Interfaces Manual section, and today's main character is smapi β€” no cap, it's literally the System Management Application Program Interface driver and it's kind of a big deal πŸŽ€


✨ NAME ✨

smapi β€” System Management Application Program Interface driver πŸ¦‹


🌸 DESCRIPTION 🌸

okay so listen up, because this is genuinely iconic: so many IBM Thinkpad laptops run on a special lil software interface called SMAPI (System Management Application Program Interface). and this interface? it's giving control freak in the best way, because it handles a bunch of stuff, like:

  • System Interface β€” the BIOS can store system info like the system identifier πŸ’Ύ
  • System Configuration β€” this is where devices like the display get configured ✨
  • Power Management β€” software can talk to the SMAPI BIOS for Power Management control πŸ”‹

so if you're client software and you wanna play, you have to find a β€œheader image” first. it's stored in the F000 segment in the Thinkpad ROM (read-only memory, bestie), and it lives right at the 16-byte boundary. that spot? that's the β€œEntry Point” for the service. periodt. πŸ‘‘

and the β€œheader image” is lowkey a whole info dump, it stores things like:

  • signature,
  • SMAPI version (major and minor),
  • header image length,
  • checksum information (which verifies the image),
  • an Information Word (used to identify the BIOS service level),
  • Real Mode Entry Point (where clients using the Real/V86 mode for the far-call value),
  • and finally a 16-bit/32-bit Protected Mode Entry Point: base code address which specifies the BIOS physical address. the client must prepare a 64 kilobyte selector for this BIOS 🫢

now, to actually invoke the SMAPI BIOS, you have to use a far-call on the entry point specified in the header file. everything else? goes in the client data area. and your 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. iykyk πŸ’…

the SMAPI BIOS uses the stack and data areas with the selector during a BIOS invocation, so yeah β€” the caller must define the same privilege area as the BIOS. no shortcuts, bestie.

and the parameter structure? it's built from the input and output fields the caller prepares. the input field specifies the function request to the BIOS, and then the BIOS drops a return value into the output field. and these fields are made up of three parts:

  1. the first one holds parameters, function numbers, and return codes πŸ“‹
  2. the next one contains an offset in hexadecimal πŸ”’
  3. and finally a length field, which is comprised of Byte, Word, or Double Word πŸ“

like... the structure? immaculate. it ate. πŸ”₯


πŸ¦‹ 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.

πŸ‘‘ 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> πŸŽ€


and that's the whole vibe, bestie β€” this page came to you from the <strong>Debian</strong> build, dated <strong>April 1, 2003</strong>, filed under <strong>SMAPI(4)</strong>. slay, go forth, and far-call responsibly πŸ’–βœ¨

πŸ“¦ where this page comes from