xref: /freebsd/share/man/man4/man4.i386/smapi.4 (revision 3078531de10dcae44b253a35125c949ff4235284)
1.\"
2.\" Copyright (c) 2003 Tom Rhodes
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.\" $FreeBSD$
27.\"
28.Dd April 1, 2003
29.Dt SMAPI 4 i386
30.Os
31.Sh NAME
32.Nm smapi
33.Nd "System Management Application Program Interface driver"
34.Sh DESCRIPTION
35Many
36.Tn IBM Thinkpad
37laptops utilize a special software interface known as
38.Tn SMAPI
39(System Management Application Program Interface).
40This interface controls various aspects of the system including:
41.Bl -bullet
42.It
43System Interface
44(the
45.Tn BIOS
46can store system information such as the system identifier),
47.It
48System Configuration (where devices such as the display can be configured),
49.It
50Power Management (software can interact with the
51.Tn SMAPI BIOS
52for Power Management control).
53.El
54.Pp
55Client software must locate a
56.Dq "header image"
57stored in the
58.Li F000
59segment in the
60.Tn Thinkpad ROM
61(read-only memory), which resides at the 16-byte boundary.
62This is considered the
63.Dq "Entry Point"
64for the service.
65.Pp
66The
67.Dq "header image"
68stores information like:
69.Bl -bullet
70.It
71signature,
72.It
73.Tn SMAPI
74version (major and minor),
75.It
76header image length,
77.It
78checksum information (which verifies the image),
79.It
80an Information Word (used to identify the
81.Tn BIOS
82service level),
83.It
84Real Mode Entry Point (where clients using the
85Real/V86 mode for the far-call value),
86.It
87and finally a 16-bit/32-bit Protected Mode Entry
88Point: base code address which specifies the
89.Tn BIOS
90physical address.
91The client must prepare a 64 kilobyte selector for this
92.Tn BIOS ) .
93.El
94.Pp
95To invoke the
96.Tn SMAPI BIOS ,
97a far-call must be used on the entry point specified in the header file.
98All other information should be stored in the client data area.
99The client is required to prepare both an input and output parameter in a
100data area of its own.
101This area can be
102.Dq informed
103by pushing those pointers into its stack before the far-calls.
104.Pp
105The
106.Tn SMAPI BIOS
107uses the stack and data areas with the selector during a
108.Tn BIOS
109invocation, thus the caller must define the same privilege area as the
110.Tn BIOS .
111.Pp
112The parameter structure will be made up by using the input and output
113fields prepared by the caller.
114The input field will specify the function request to the
115.Tn BIOS .
116The
117.Tn BIOS
118will then drop a return value into the output field.
119These fields are made up of three parts.
120The first holds parameters, function numbers, and return codes.
121The next will contain an offset in hexadecimal.
122Finally a length field which is comprised of Byte, Word, or Double Word.
123.Sh SEE ALSO
124.Rs
125.%B "IBM Thinkpad 560/560E Technical Reference"
126.%O "06J0536 S76H-7587-01"
127.Re
128.Rs
129.%B "IBM Thinkpad 560Z Technical Reference"
130.%O "xxxxxxx xxxx-xxxx-xx"
131.Re
132.Rs
133.%B "IBM Thinkpad 600 Technical Reference"
134.%O "xxxxxxx xxxx-xxxx-xx"
135.Re
136.Rs
137.%B "IBM Thinkpad 760XD/760XL/765D/765L Technical Reference"
138.%O "06J0537 S30H-2433-02"
139.Re
140.Rs
141.%B "IBM Thinkpad 770 Technical Reference"
142.%O "05L1739 S05L-1739-00"
143.Re
144.Sh AUTHORS
145.An -nosplit
146The
147.Nm
148driver was written by
149.An Matthew N. Dodd Aq Mt mdodd@FreeBSD.org .
150This manual page was written by
151.An Tom Rhodes Aq Mt trhodes@FreeBSD.org
152and
153.An Matthew N. Dodd Aq Mt mdodd@FreeBSD.org .
154