xref: /freebsd/share/man/man4/man4.i386/smapi.4 (revision 4f8f43b06ed07e96a250855488cc531799d5b78f)
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.Dd April 1, 2003
27.Dt SMAPI 4 i386
28.Os
29.Sh NAME
30.Nm smapi
31.Nd "System Management Application Program Interface driver"
32.Sh DESCRIPTION
33Many
34.Tn IBM Thinkpad
35laptops utilize a special software interface known as
36.Tn SMAPI
37(System Management Application Program Interface).
38This interface controls various aspects of the system including:
39.Bl -bullet
40.It
41System Interface
42(the
43.Tn BIOS
44can store system information such as the system identifier),
45.It
46System Configuration (where devices such as the display can be configured),
47.It
48Power Management (software can interact with the
49.Tn SMAPI BIOS
50for Power Management control).
51.El
52.Pp
53Client software must locate a
54.Dq "header image"
55stored in the
56.Li F000
57segment in the
58.Tn Thinkpad ROM
59(read-only memory), which resides at the 16-byte boundary.
60This is considered the
61.Dq "Entry Point"
62for the service.
63.Pp
64The
65.Dq "header image"
66stores information like:
67.Bl -bullet
68.It
69signature,
70.It
71.Tn SMAPI
72version (major and minor),
73.It
74header image length,
75.It
76checksum information (which verifies the image),
77.It
78an Information Word (used to identify the
79.Tn BIOS
80service level),
81.It
82Real Mode Entry Point (where clients using the
83Real/V86 mode for the far-call value),
84.It
85and finally a 16-bit/32-bit Protected Mode Entry
86Point: base code address which specifies the
87.Tn BIOS
88physical address.
89The client must prepare a 64 kilobyte selector for this
90.Tn BIOS ) .
91.El
92.Pp
93To invoke the
94.Tn SMAPI BIOS ,
95a far-call must be used on the entry point specified in the header file.
96All other information should be stored in the client data area.
97The client is required to prepare both an input and output parameter in a
98data area of its own.
99This area can be
100.Dq informed
101by pushing those pointers into its stack before the far-calls.
102.Pp
103The
104.Tn SMAPI BIOS
105uses the stack and data areas with the selector during a
106.Tn BIOS
107invocation, thus the caller must define the same privilege area as the
108.Tn BIOS .
109.Pp
110The parameter structure will be made up by using the input and output
111fields prepared by the caller.
112The input field will specify the function request to the
113.Tn BIOS .
114The
115.Tn BIOS
116will then drop a return value into the output field.
117These fields are made up of three parts.
118The first holds parameters, function numbers, and return codes.
119The next will contain an offset in hexadecimal.
120Finally a length field which is comprised of Byte, Word, or Double Word.
121.Sh SEE ALSO
122.Rs
123.%B "IBM Thinkpad 560/560E Technical Reference"
124.%O "06J0536 S76H-7587-01"
125.Re
126.Rs
127.%B "IBM Thinkpad 560Z Technical Reference"
128.%O "xxxxxxx xxxx-xxxx-xx"
129.Re
130.Rs
131.%B "IBM Thinkpad 600 Technical Reference"
132.%O "xxxxxxx xxxx-xxxx-xx"
133.Re
134.Rs
135.%B "IBM Thinkpad 760XD/760XL/765D/765L Technical Reference"
136.%O "06J0537 S30H-2433-02"
137.Re
138.Rs
139.%B "IBM Thinkpad 770 Technical Reference"
140.%O "05L1739 S05L-1739-00"
141.Re
142.Sh AUTHORS
143.An -nosplit
144The
145.Nm
146driver was written by
147.An Matthew N. Dodd Aq Mt mdodd@FreeBSD.org .
148This manual page was written by
149.An Tom Rhodes Aq Mt trhodes@FreeBSD.org
150and
151.An Matthew N. Dodd Aq Mt mdodd@FreeBSD.org .
152