14fde7c2fSTom Rhodes.\" 24fde7c2fSTom Rhodes.\" Copyright (c) 2003 Tom Rhodes 34fde7c2fSTom Rhodes.\" All rights reserved. 44fde7c2fSTom Rhodes.\" 54fde7c2fSTom Rhodes.\" Redistribution and use in source and binary forms, with or without 64fde7c2fSTom Rhodes.\" modification, are permitted provided that the following conditions 74fde7c2fSTom Rhodes.\" are met: 84fde7c2fSTom Rhodes.\" 1. Redistributions of source code must retain the above copyright 94fde7c2fSTom Rhodes.\" notice, this list of conditions and the following disclaimer. 104fde7c2fSTom Rhodes.\" 2. Redistributions in binary form must reproduce the above copyright 114fde7c2fSTom Rhodes.\" notice, this list of conditions and the following disclaimer in the 124fde7c2fSTom Rhodes.\" documentation and/or other materials provided with the distribution. 134fde7c2fSTom Rhodes.\" 144fde7c2fSTom Rhodes.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 154fde7c2fSTom Rhodes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 164fde7c2fSTom Rhodes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 174fde7c2fSTom Rhodes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 184fde7c2fSTom Rhodes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 194fde7c2fSTom Rhodes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 204fde7c2fSTom Rhodes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 214fde7c2fSTom Rhodes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 224fde7c2fSTom Rhodes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 234fde7c2fSTom Rhodes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 244fde7c2fSTom Rhodes.\" SUCH DAMAGE. 254fde7c2fSTom Rhodes.\" 264fde7c2fSTom Rhodes.Dd April 1, 2003 274fde7c2fSTom Rhodes.Dt SMAPI 4 i386 284fde7c2fSTom Rhodes.Os 294fde7c2fSTom Rhodes.Sh NAME 304fde7c2fSTom Rhodes.Nm smapi 314fde7c2fSTom Rhodes.Nd "System Management Application Program Interface driver" 324fde7c2fSTom Rhodes.Sh DESCRIPTION 334fde7c2fSTom RhodesMany 344fde7c2fSTom Rhodes.Tn IBM Thinkpad 354fde7c2fSTom Rhodeslaptops utilize a special software interface known as 364fde7c2fSTom Rhodes.Tn SMAPI 374fde7c2fSTom Rhodes(System Management Application Program Interface). 384fde7c2fSTom RhodesThis interface controls various aspects of the system including: 394fde7c2fSTom Rhodes.Bl -bullet 404fde7c2fSTom Rhodes.It 414fde7c2fSTom RhodesSystem Interface 424fde7c2fSTom Rhodes(the 434fde7c2fSTom Rhodes.Tn BIOS 444fde7c2fSTom Rhodescan store system information such as the system identifier), 454fde7c2fSTom Rhodes.It 464fde7c2fSTom RhodesSystem Configuration (where devices such as the display can be configured), 474fde7c2fSTom Rhodes.It 484fde7c2fSTom RhodesPower Management (software can interact with the 494fde7c2fSTom Rhodes.Tn SMAPI BIOS 504fde7c2fSTom Rhodesfor Power Management control). 514fde7c2fSTom Rhodes.El 524fde7c2fSTom Rhodes.Pp 534fde7c2fSTom RhodesClient software must locate a 544fde7c2fSTom Rhodes.Dq "header image" 554fde7c2fSTom Rhodesstored in the 564fde7c2fSTom Rhodes.Li F000 574fde7c2fSTom Rhodessegment in the 584fde7c2fSTom Rhodes.Tn Thinkpad ROM 594fde7c2fSTom Rhodes(read-only memory), which resides at the 16-byte boundary. 604fde7c2fSTom RhodesThis is considered the 614fde7c2fSTom Rhodes.Dq "Entry Point" 624fde7c2fSTom Rhodesfor the service. 634fde7c2fSTom Rhodes.Pp 644fde7c2fSTom RhodesThe 654fde7c2fSTom Rhodes.Dq "header image" 664fde7c2fSTom Rhodesstores information like: 674fde7c2fSTom Rhodes.Bl -bullet 684fde7c2fSTom Rhodes.It 694fde7c2fSTom Rhodessignature, 704fde7c2fSTom Rhodes.It 714fde7c2fSTom Rhodes.Tn SMAPI 724fde7c2fSTom Rhodesversion (major and minor), 734fde7c2fSTom Rhodes.It 744fde7c2fSTom Rhodesheader image length, 754fde7c2fSTom Rhodes.It 764fde7c2fSTom Rhodeschecksum information (which verifies the image), 774fde7c2fSTom Rhodes.It 784fde7c2fSTom Rhodesan Information Word (used to identify the 794fde7c2fSTom Rhodes.Tn BIOS 804fde7c2fSTom Rhodesservice level), 814fde7c2fSTom Rhodes.It 824fde7c2fSTom RhodesReal Mode Entry Point (where clients using the 834fde7c2fSTom RhodesReal/V86 mode for the far-call value), 844fde7c2fSTom Rhodes.It 854fde7c2fSTom Rhodesand finally a 16-bit/32-bit Protected Mode Entry 864fde7c2fSTom RhodesPoint: base code address which specifies the 874fde7c2fSTom Rhodes.Tn BIOS 884fde7c2fSTom Rhodesphysical address. 894fde7c2fSTom RhodesThe client must prepare a 64 kilobyte selector for this 904fde7c2fSTom Rhodes.Tn BIOS ) . 914fde7c2fSTom Rhodes.El 924fde7c2fSTom Rhodes.Pp 934fde7c2fSTom RhodesTo invoke the 944fde7c2fSTom Rhodes.Tn SMAPI BIOS , 954fde7c2fSTom Rhodesa far-call must be used on the entry point specified in the header file. 964fde7c2fSTom RhodesAll other information should be stored in the client data area. 974fde7c2fSTom RhodesThe client is required to prepare both an input and output parameter in a 984fde7c2fSTom Rhodesdata area of its own. 994fde7c2fSTom RhodesThis area can be 1004fde7c2fSTom Rhodes.Dq informed 1014fde7c2fSTom Rhodesby pushing those pointers into its stack before the far-calls. 1024fde7c2fSTom Rhodes.Pp 1034fde7c2fSTom RhodesThe 1044fde7c2fSTom Rhodes.Tn SMAPI BIOS 1054fde7c2fSTom Rhodesuses the stack and data areas with the selector during a 1064fde7c2fSTom Rhodes.Tn BIOS 1074fde7c2fSTom Rhodesinvocation, thus the caller must define the same privilege area as the 1084fde7c2fSTom Rhodes.Tn BIOS . 1094fde7c2fSTom Rhodes.Pp 1104fde7c2fSTom RhodesThe parameter structure will be made up by using the input and output 1114fde7c2fSTom Rhodesfields prepared by the caller. 1124fde7c2fSTom RhodesThe input field will specify the function request to the 1134fde7c2fSTom Rhodes.Tn BIOS . 1144fde7c2fSTom RhodesThe 1154fde7c2fSTom Rhodes.Tn BIOS 1164fde7c2fSTom Rhodeswill then drop a return value into the output field. 1174fde7c2fSTom RhodesThese fields are made up of three parts. 1184fde7c2fSTom RhodesThe first holds parameters, function numbers, and return codes. 1194fde7c2fSTom RhodesThe next will contain an offset in hexadecimal. 1204fde7c2fSTom RhodesFinally a length field which is comprised of Byte, Word, or Double Word. 1214fde7c2fSTom Rhodes.Sh SEE ALSO 1224fde7c2fSTom Rhodes.Rs 1234fde7c2fSTom Rhodes.%B "IBM Thinkpad 560/560E Technical Reference" 1244fde7c2fSTom Rhodes.%O "06J0536 S76H-7587-01" 1254fde7c2fSTom Rhodes.Re 1264fde7c2fSTom Rhodes.Rs 1274fde7c2fSTom Rhodes.%B "IBM Thinkpad 560Z Technical Reference" 1284fde7c2fSTom Rhodes.%O "xxxxxxx xxxx-xxxx-xx" 1294fde7c2fSTom Rhodes.Re 1304fde7c2fSTom Rhodes.Rs 1314fde7c2fSTom Rhodes.%B "IBM Thinkpad 600 Technical Reference" 1324fde7c2fSTom Rhodes.%O "xxxxxxx xxxx-xxxx-xx" 1334fde7c2fSTom Rhodes.Re 1344fde7c2fSTom Rhodes.Rs 1354fde7c2fSTom Rhodes.%B "IBM Thinkpad 760XD/760XL/765D/765L Technical Reference" 1364fde7c2fSTom Rhodes.%O "06J0537 S30H-2433-02" 1374fde7c2fSTom Rhodes.Re 1384fde7c2fSTom Rhodes.Rs 1394fde7c2fSTom Rhodes.%B "IBM Thinkpad 770 Technical Reference" 1404fde7c2fSTom Rhodes.%O "05L1739 S05L-1739-00" 1414fde7c2fSTom Rhodes.Re 1424fde7c2fSTom Rhodes.Sh AUTHORS 1434fde7c2fSTom Rhodes.An -nosplit 1444fde7c2fSTom RhodesThe 1454fde7c2fSTom Rhodes.Nm 1464fde7c2fSTom Rhodesdriver was written by 147*6c899950SBaptiste Daroussin.An Matthew N. Dodd Aq Mt mdodd@FreeBSD.org . 1484fde7c2fSTom RhodesThis manual page was written by 149*6c899950SBaptiste Daroussin.An Tom Rhodes Aq Mt trhodes@FreeBSD.org 1504fde7c2fSTom Rhodesand 151*6c899950SBaptiste Daroussin.An Matthew N. Dodd Aq Mt mdodd@FreeBSD.org . 152