06J0536 S76H-7587-01
Note Before using this information and the product it supports, be sure to read the general information under “Notices” on page B-1.
Contents Figures Tables Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii Section 1. System Overview . . . Description . . . . . . . . . . . . . . System Board Devices and Features System Board I/O Address Map . . Specifications . . . . . . . . . . . . . Power Supply . . . . . . . . . . . . . Voltages . . . . . . . . . . . . . .
System Control Port B (Hex 0061) System Control Port A (Hex 0092) Power-On Password . . . . . . . . Selectable Drive-Startup Sequence Hardware Compatibility . . . . . . . . Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Section 3. Subsystems . . . . . Video Subsystem . . . . . . . . . . Video Modes . . . . . . . . . . .
Figures 1-1. 1-2. 1-3. 1-4. 1-5. 1-6. 1-7. 1-8. 1-9. 1-10. 2-1. 2-2. 2-3. 2-4. 2-5. 2-6. 2-7. 2-8. 2-9. 2-10. 2-11. 2-12. 2-13. 2-14. 2-15. 2-16. 2-17. 2-18. 2-19. 2-20. 2-21. 2-22. 2-23. 2-24. 2-25. 2-26. 2-27. 2-28. 2-29. 2-30. Model and Submodel Bytes . . . . . . . . . . . . . . . System Board Devices and Features . . . . . . . . . . System Board I/O Address Map . . . . . . . . . . . . . Performance Specifications for the ThinkPad 560/560E Physical Specifications for the ThinkPad 560/560E . .
2-31. 2-32. 2-33. 3-1. 3-2. System Control Port B (Hex 0061, Read) System Control Port A (Hex 0092) . . . Error Codes . . . . . . . . . . . . . . . . . PCMCIA Standards and Specifications . PCMCIA PC Card Slot Pin Assignments . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27 2-28 2-31 3-8 3-9 . . . . 3-4 . . . . . . . . . . Tables 3-1.
Preface This technical reference contains hardware and software interface information specific to the IBM* ThinkPad* 560/560E computer. This technical reference is intended for those who develop hardware and software products for the computer. Users should understand computer architecture and programming concepts. This publication consists of the following sections and appendixes: Section 1, “System Overview,” describes the system, features, and specifications.
Attention The term Reserved describes certain signals, bits, and registers that should not be changed. Use of reserved areas can cause compatibility problems, loss of data, or permanent damage to the hardware. When the contents of a register are changed, the state of the reserved bits must be preserved. When possible, read the register first and change only the bits that must be changed.
Section 1. System Overview Description . . . . . . . . . . . . . . System Board Devices and Features System Board I/O Address Map . . Specifications . . . . . . . . . . . . . Performance Specifications . . . . . . Physical Specifications Acoustical Readings . . . . . . Power Supply . . . . . . . . . . . . . Voltages . . . . . . . . . . . . . . Output Protection . . . . . . . . . Voltage Sequencing . . . . . . . . Power Supply Connector . . . . . Battery Pack . . . . . . . . . . . . . Copyright IBM Corp.
Description The IBM Personal System/2 Hardware Interface Technical Reference describes devices common to the PS/2* AT-bus system family. The IBM ThinkPad 560/560E computer (hereafter called the 560, ThinkPad computer, or computer) is a notebook-size computer that features the AT* bus architecture. Each computer supports one external diskette drive and one internal hard disk drive.
System Board Devices and Features Figure 1-2 lists the system board devices and their features. The IBM Personal System/2 Hardware Interface Technical Reference describes devices common to PS/2 products by type number.
Device Type Features Video subsystem – SVGA video functions: ThinkPad 560: Up to 256 colors on the DSTN LCD Up to 16 777 216 colors on an external display Up to 65 536 colors on the TFT LCD Up to 16 777 216 colors on an external display ThinkPad 560E: Up to 65 536 colors on the DSTN LCD Up to 16 777 216 colors on an external display Up to 262 144 colors on the TFT LCD Up to 16 777 216 colors on an external display See “Video Subsystem” on page 3-2 for more details of the video subsystem.
Device Type Features Audio subsystem Infrared subsystem – – Sound Blaster**-Pro compatible Supports: ThinkPad 560: IrDA 1.0 ThinkPad 560E: IrDA 1.1 ñ Personal Computer Memory Card International Association Figure 1-2 (Part 3 of 3).
System Board I/O Address Map Figure 1-3 shows the I/O address map.
Address (Hex) Device 03B4, 03B5, 03BA 03BC–03BE 03C0–03C5 03C6–03C9 03CA, 03CC, 03CE, 03CF 03D4, 03D5, 03DA, 3D8, 3D9 03E0–03E3 03E8–03EF 03F0–03F7 03F6–03F7 03F8–03FF 0D00, 0D01 15E8–15EF 2100–21FF 23C0–23C7 43C6, 43C7, 43C8, 43C9 46E8 83C6, 83C8 CF8–CFB CFC–CFF F104 Video subsystem Parallel port 1 Video subsystem Video DAC Video subsystem Video subsystem PCMCIA interface Serial port 3 Diskette drive controller Hard disk drive registers Serial port 1 Reserved Reserved Reserved Reserved Reserved Reserved
Specifications Figure 1-4 to Figure 1-7 on page 1-10 list the specifications for the computer. Performance Specifications Device Microprocessor (66 MHz–15 ns clock) Access to RAM:ñ Memory read Page hit, burst Page miss, burst Memory write Page miss, burst Access to ROM: Refresh rate (typically performed every 15.
Physical Specifications Size Width: 297 mm (11.7 in.) Depth: 222 mm (8.7 in.) Height: 31.0 mm (1.22 in.) Weightñ (approximate value) DSTN display: 1.87 kg (4.12 lb) TFT display: 1.86 kg (4.10 lb) Air Temperature System on (without diskette) 5.0°C to 35.0°C (41°F to 95°F) System on (with diskette) 10.0°C to 35.0°C (50°F to 95°F) System off 5.0°C to 43.
Electrical Specifications (35 W) 100–240 Input Voltageñ (V ac) Frequency (Hz) 50/60 Inputò (kVA) 0.132 ñ Range is automatically selected; sine wave input is required. ò At maximum configuration. Figure 1-6. Electrical Specifications for the ThinkPad 560/560E Acoustical Readings LWAd in bels Operate Idle LpAm in dB Operate Idle m in dB Operate Idle 4.0 34 27 3.4 30 22 Notes: LWAd Is the declared sound power level for the random sample of machines.
Power Supply The power supply converts the ac voltage to dc voltage and provides power for the following: System board set Diskette drive Hard disk drive Auxiliary devices Keyboard LCD panel PCMCIA cards Voltages The power supply generates five different dc voltages: VCCCPU, VCC3A, VCC5M, VCCSW, and VCC12M. Figure 1-8 shows the maximum current for each voltage. Output Voltage (V dc) Current (A) VCCCPU +2.9 or +2.5 2.20 VCC3A +3.3 2.00 VCC5M +5.0 3.00 VCCSW +5.0 0.
Output Protection A short circuit placed on any dc output (between outputs or between an output and a dc return) latches all dc outputs into a shutdown state, with no hazardous condition to the power supply. If an overvoltage fault occurs in the power supply, the power supply latches all dc outputs into a shutdown state before any output exceeds 135% of the nominal value of the power supply. Voltage Sequencing When power is turned on, the output voltages reach their operational voltages within 2 seconds.
Battery Pack The ThinkPad computer uses a lithium-ion (Li-Ion) battery pack that meets the following electrical specifications: Nominal Voltage +10.8 V dc Capacity (average) 2.2 ampere hours (AH) Protection Overcurrent protection Overvoltage protection Overdischarge protection Thermal protection Figure 1-10.
1-14 ThinkPad 560/560E System Overview
Section 2. System Board Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . Microprocessor . . . . . . . . . . . . . . . . . . . . . . . . . . Cache Memory Operation . . . . . . . . . . . . . . . . . . Cacheable Address Space . . . . . . . . . . . . . . . . . . Keyboard/Mouse Connector . . . . . . . . . . . . . . . . . . . Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Connector . . . . . . . . . . . . . . . . . . . . . . . . . . . Scan Codes . . . . . . . . . . . . . . .
Description This section describes the microprocessor, connectors, memory subsystems, and miscellaneous system functions and ports for the ThinkPad computers. You can find additional information about these topics in IBM Personal System/2 Hardware Interface Technical Reference–AT-Bus Subsystems. Microprocessor The ThinkPad 560 uses the Intel Pentium 100/120/133MHz microprocessor. This microprocessor contains a full 32-bit RISC integer core, a built-in math coprocessor, and a 16KB internal cache memory.
When the microprocessor performs a memory read, the data address is used to find the data in the cache. If the data is found (a hit), it is read from the cache memory and no external bus cycle occurs. If the data is not found (a miss), an external bus cycle is used to read the data from system memory. If the address of the missed data is in a cacheable address space, the data is stored in the cache memory and the remainder of the cache line is read.
Keyboard/Mouse Connector Each ThinkPad computer has a keyboard/mouse connector where the IBM mouse, keyboard, or numeric keypad is connected. Signals The keyboard and mouse signals are driven by open-collector drivers pulled to 5 V dc through a pull-up resistor. Figure 2-1 lists the signals. Sink current High-level output voltage Low-level output voltage High-level input voltage Low-level input voltage 20 mA 5.0 V dc minus pullup 0.5 V dc 2.0 V dc 0.
Scan Codes Figure 2-3 shows the key numbers assigned to keys on the 84-key keyboard (for the U.S. and Japan). Figure 2-4 on page 2-6 shows the key numbers assigned to keys on the 85-key keyboard (for countries other than the U.S. and Japan). For scan codes assigned to each numbered key, refer to the IBM Personal System/2 Hardware Interface Technical Reference.
110 112 113 114 115 1 2 3 4 16 17 116 117 118 119 5 6 7 8 19 18 20 21 22 124 125 126 75 80 85 120 121 122 123 76 81 86 9 10 11 12 23 26 25 24 15 13 28 27 43 30 31 44 45 Fn 58 32 46 34 33 47 48 35 49 60 50 38 37 36 51 52 39 53 40 54 62 61 42 41 57 55 64 83 79 Left 84 89 Right Figure 2-4.
Figure 2-5 shows the key numbers assigned to keys on the external numeric keypad. For scan codes assigned to each numbered key, refer to the IBM Personal System/2 Hardware Interface Technical Reference. 90 95 100 91 96 101 105 106 92 97 102 93 98 103 108 99 104 Figure 2-5.
Hard Disk Drive Connector The hard disk drive is connected to the system board. The following shows the pin assignments for the connector on the system board.
External Connector The Port Replicator is connected through the 100-pin external connector at the bottom of the computer.
Pin Signal Type 23 24 25 26 27 28 29 30 31 GND NC Mouse Data Mouse Clock GND NC NC GND Ring Indicator G – K K G – – G S Pin 73 74 75 76 77 78 79 80 81 32 33 34 Clear to Send Request to Send Data Set Ready S S S 82 83 84 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 GND GND −AUTO FD XT −ERROR −INIT −SLCT IN Data Bit 4 Data Bit 6 −ACK PE GND RED BLUE HSYNC VSYNC GND G G P P P P P P P P G V V V V G 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Signal Type GND SAFE5V Keyboard Data Keyboard
Diskette Drive and Controller Figure 2-8 shows the read, write, and format capabilities of the diskette drive for the ThinkPad computer. Format Size Diskette Type 3.5-inch 1.0MB Diskette 3.5-inch 2.0MB Diskette 720KB 1.2MB 1.44MB RWF − − RWF − RWF Legend:: 1KB (kilobyte) 1MB (megabyte) R W F 1024 bytes 1 048 576 bytes Read Write Format Figure 2-8.
Diskette Drive Connector The external diskette drive is connected through the diskette drive connector, located on the left side of the computer.
Memory The ThinkPad computers use the following types of memory: Read-only memory (ROM) Random access memory (RAM) Real-time clock/complementary metal-oxide semiconductor RAM (RT/CMOS RAM) ROM Subsystem The ROM subsystem consists of four banks of 128KB memory. ROM is active when power is turned on and is assigned to the top of the first and last 1MB of address space (hex 000F0000–000FFFFF and hex FFFF0000–FFFFFFFF).
System Memory Map Memory is mapped by the memory controller registers. Figure 2-10 shows the memory map for a correctly functioning system. Memory can be mapped differently if POST detects an error in system board memory or RT/CMOS RAM. In the figure, the variable x represents the number of 1MB blocks of system board memory starting at or above the hex 100000 boundary.
Pin 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 Signal Ground Ground MD15 MD48 MD14 MD49 MD13 MD50 MD12 MD51 +3.3V dc +3.3V dc MD11 MD52 MD10 MD53 MD9 MD54 MD8 MD55 Ground Ground −CAS1 −CAS6 −CAS5 −CAS2 +3.3V dc +3.3V dc MA0 MA3 MA1 MA4 MA2 MA5 Ground Ground MD47 MD16 MD46 MD17 MD45 MD18 MD44 MD19 +3.3V dc +3.
RT/CMOS RAM The RT/CMOS RAM (real-time clock/complementary metal-oxide semiconductor RAM) module contains the real-time clock and 128 bytes of CMOS RAM. The clock circuitry uses 14 bytes of this memory; the remainder is allocated to configuration and system-status information. A battery is built into the module to keep the RT/CMOS RAM active when the power supply is not turned on. Figure 2-12 lists the RT/CMOS RAM bytes and their addresses.
RT/CMOS Address and NMI Mask Register (Hex 0070) The NMI mask register is used with the RT/CMOS data register (hex 0071) to read from and write to the RT/CMOS RAM bytes. Attention The operation following a write to hex 0070 should access hex 0071; otherwise, intermittent failures of the RT/CMOS RAM can occur. Bit Function 7 6–0 NMI mask RT/CMOS RAM address Figure 2-13. RT/CMOS Address and NMI Mask Register (Hex 0070) Bit 7 When this write-only bit is set to 1, the NMI is masked (disabled).
RT/CMOS RAM I/O Operations During I/O operations to the RT/CMOS RAM addresses, you should mask interrupts to prevent other interrupt routines from changing the RT/CMOS address register before data is read or written. After I/O operations, you should leave the RT/CMOS address and NMI mask register (hex 0070) pointing to status register D (hex 00D). Attention The operation following a write to hex 0070 should access hex 0071; otherwise, intermittent failures of the RT/CMOS RAM can occur.
Real-Time Clock Bytes (Hex 000–00D): Bit definitions and addresses for the real-time clock bytes are shown in Figure 2-15. Address (Hex) Function 000 001 002 003 004 005 006 007 008 009 00A 00B 00C 00D Seconds Second alarm Minutes Minute alarm Hours Hour alarm Day of week Date of month Month Year Status register Status register Status register Status register Byte Number 0 1 2 3 4 5 6 7 8 9 10 11 12 13 A B C D Figure 2-15.
square-wave output frequency and a 976.562-microsecond periodic interrupt rate. Status Register B (Hex 00B) Bit Function 7 6 5 4 3 2 1 0 Set Enable periodic interrupt Enable alarm interrupt Enable update-ended interrupt Enable square wave Date mode 24-hour mode Enable daylight-saving time Figure 2-17. Status Register B (Hex 00B) Bit 7 When set to 0, this bit updates the cycle, normally by advancing the count at a rate of one cycle per second.
Bit 0 When set to 1, this bit enables the daylight-saving-time mode. When set to 0, this bit disables the daylight-saving-time mode, and the clock reverts to standard time. The system initializes this bit to 0. Status Register C (Hex 00C) Bit Function 7 6 5 4 3–0 Interrupt request flag Periodic interrupt flag Alarm interrupt flag Update-ended interrupt flag Reserved Figure 2-18. Status Register C (Hex 00C) Note: Interrupts are enabled by bits 6, 5, and 4 in status register B.
CMOS RAM Configuration Figure 2-20 shows the bit definitions for the CMOS RAM configuration bytes. Diagnostic Status Byte (Hex 00E) Bit Function 7 6 5 4 3 2 1, 0 Real-time clock power Configuration record and checksum status Incorrect configuration Memory size mismatch Hard disk controller/drive C initialization status Time status indicator Reserved Figure 2-20. Diagnostic Status Byte (Hex 00E) Bit 7 When set to 1, this bit indicates that the real-time clock has lost power.
Diskette Drive Type Byte (Hex 010): This byte indicates the type of the installed diskette drive. Bit Drive Type 7–4 3–0 Diskette drive type Reserved Figure 2-21. Diskette Drive Type Byte (Hex 010) Bits 7–4 These bits indicate the diskette drive type. Bits 7–4 Description 0110 Diskette drive (2.88MB) 0100 Diskette drive (1.44MB) Note: Combinations not shown are reserved. Figure 2-22. Diskette Drive Type Bits 7–4 Bits 3–0 These bits are reserved.
Hard Disk Drive Type Byte (Hex 012): This byte defines the type of hard disk drive installed. Hex 00 indicates that no hard disk drive is installed. Bit Drive Type 7–4 3–0 Hard disk drive 0 Hard disk drive 1 Figure 2-26. Hard Disk Drive Type Byte Reserved Bytes (Hex 013): These bytes are reserved. Equipment Byte (Hex 014): This byte defines the basic equipment in the system for the power-on diagnostic tests.
Bits 3–2 These bits are reserved. Bit 1 When set to 1, this bit indicates that a coprocessor is installed. Bit 0 When set to 1, this bit indicates that physical diskette drive 0 is installed. Low and High Base Memory Bytes (Hex 015 and Hex 016): The low and high base memory bytes define the amount of memory below the 640KB address space. The value in these bytes represents the number of 1KB blocks of base memory. For example, hex 0280 indicates 640KB. The low byte is hex 015; the high byte is hex 016.
Miscellaneous System Functions and Ports This section provides information about nonmaskable interrupts (NMIs), the power-on password, and hardware compatibility. Nonmaskable Interrupt (NMI) The NMI signals the system microprocessor that a parity error or a channel check timeout has occurred. This situation can cause lost data or an overrun error on some I/O devices. The NMI masks all other interrupts.
System Control Port B (Hex 0061) Bit definitions for the write and read functions of this port are shown in the following figures: Bit Function 7–4 3 2 1 0 Reserved Reserved (should be 0) Enable parity check Enable speaker data Timer 2 gate to speaker Figure 2-30. System Control Port B (Hex 0061, Write) Bit Function 7 6 5 4 3 2 1 0 Parity check Channel check Timer 2 output Toggles with each refresh request Reserved Enable parity check Enable speaker data Timer 2 gate to speaker Figure 2-31.
System Control Port A (Hex 0092) Bit Function 7–3 2 1 0 Reserved Reserved (must be set to 0) Alternate gate A20 Alternate hot reset Figure 2-32. System Control Port A (Hex 0092) Bits 7–3 These bits are reserved. Bit 2 This bit is reserved. Bit 1 This bit is used to enable the ‘address 20’ signal (A20) when the microprocessor is in the real address mode. When this bit is set to 0, A20 cannot be used in real mode addressing. This bit is set to 0 during a system reset.
If you do not follow this procedure, the results are unpredictable. Note: Whenever possible, use BIOS as an interface to reset the system microprocessor to the real mode. For more information about resetting the system microprocessor, refer to the IBM Personal System/2 and Personal Computer BIOS Interface. Power-On Password RT/CMOS RAM has 8 bytes reserved for the power-on password and the check character. The 8 bytes are initialized to hex 00. The microprocessor can access these bytes only during POST.
Attention When changing your startup sequence, you must be extremely careful when doing write operations (such as copying, saving, or formatting). Your data or programs can be overwritten if you select the wrong drive. For more information about the selectable drive-startup sequence, refer to the ThinkPad User's Guide. Hardware Compatibility The computer supports most of the interfaces used by the IBM Personal Computer AT* and the Personal System/2* (PS/2*) products.
The parallel printer ports (Parallel 1, Parallel 2, and Parallel 3) in compatibility mode. Error Codes POST returns a three or more character code message to indicate the type of test that failed. Figure 2-33 lists the failure indicated with the associated error code. Error Code Description 101 102 103 104 105 107 108 109 110 111 118 158 159 161 163 173 174 175 177 178 179 183 184 185 186 188 189 190 191XX 195 196 201 202 203 215 221 301 Interrupt failure. Timer failure. Timer interrupt failure.
Error Code Description 601 602 604 1101 1201 1701 1780, 1790 1781, 1791 2401 8081 Diskette drive or controller error. No valid boot record on diskette. Invalid diskette drive error. Serial-A test failure. Serial-B test failure. Hard disk controller failure. Hard disk 0 error. Hard disk 1 error. System board video error. PCMCIA presence test failure (PCMCIA revision number also checked). PCMCIA register test failure. System bus error (8042 mouse interface). External mouse error.
Section 3. Subsystems Video Subsystem . . . . . . . . . . Video Modes . . . . . . . . . . . Audio Subsystem . . . . . . . . . . Sound Blaster Support Function Audio Port Specifications . . . . Infrared (IR) Subsystem . . . . . . System Settings . . . . . . . . . PCMCIA Subsystem . . . . . . . . Pin Assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Video Subsystem The video subsystem consists of the SVGA video controller and video random-access memory. The video subsystem supports TFT and DSTN displays. The video subsystem also supports PS/2 analog displays without any additional adapters. Note: Use of any video subsystem features not documented in this book can result in future incompatibility.
ThinkPad 560E Displaying output on the LCD or both on the LCD and monitor: Resolution Supported Color Depth 640×480 256, 65 536, and 16 777 216 800×600 1024×768 (virtual screen) 256 and 65 536 Displaying output on the monitor: Resolution Refresh Rate Supported Color Depth 640×480 60Hz 256, 65 536, and 16 777 216 72Hz 75Hz 85Hz 800×600 60Hz 75Hz 85Hz 1024×768 256 and 65 536 60Hz 75Hz 43.5Hz (interlace) 1280×1024 60Hz 256 43.
3-4 Table 3-1 (Page 1 of 2).
Table 3-1 (Page 2 of 2).
Audio Subsystem Sound Blaster Support Function The Sound Blaster support function provides three system settings: I/O address, IRQ level, and DMA channel. I/O Address IRQ Level DMA Channel 0220–022F (Default) 0240–024F 0338–033F (FM synthesizer) IRQ IRQ IRQ IRQ DMA 0 DMA 1 (Default) – – 5 (Default) 7 10 11 Audio Port Specifications Audio Output: – – – – ⅛-inch mini-jack for headphone Headphone speaker output: 22 mW (32 ohm) maximum Maximum output level: 2.
Infrared (IR) Subsystem The IR subsystem of ThinkPad 560 is designed to be compatible with the IrDA** Serial Infrared Physical Layer Link Specification Version 1.0 and Data Link Specification Version 1.0. The IR subsystem of ThinkPad 560E is designed to be compatible with the IrDA** Serial Infrared Physical Layer Link Specification Version 1.0 or 1.1 and Data Link Specification Version 1.0. System Settings The I/O address can be selected from the following with the system utility program.
Standards and Specifications Characteristics PCMCIA Card Standard Release 2.0 or 2.1 PCMCIA Socket Services Interface Specifications Release 2.0 or 2.1 PCMCIA Card Services Interface Specifications Release 2.0 or 2.1 PC Card Physical Configuration Type II and Type III Supported voltage 5.0 V dc only Figure 3-1.
Pin Assignments Figure 3-2 shows the pin assignments for the PCMCIA slots.
3-10 ThinkPad 560/560E Subsystems
Appendix A. System Management API (SMAPI) BIOS Overview What is SMAPI BIOS? . . . . . . . . . . . . . . Header Image . . . . . . . . . . . . . . . . . . . Calling Convention . . . . . . . . . . . . . . . . Parameter Structure . . . . . . . . . . . . . Sample in Assembler Language . . . . . Sample in C Language . . . . . . . . . . Calling Convention Pseudo Code . . . . . . Return Codes . . . . . . . . . . . . . . . . . . . Function Description . . . . . . . . . . . . . . . System Information Service . . . .
Get Hibernation Timer . . . . . Set Hibernation Timer . . . . . Get System Event 3 Condition Set System Event 3 Condition Get System Resume Condition Set System Resume Condition Get System Resume Timer . . Set System Resume Timer . . Request System Standby . . . Request System Suspend . . Request System Hibernation . Request System Off . . . . . . Samples . . . . . . . . . . . . . . Data Structure . . . . . . . . . Function Declaration . . . . . . . Installation Check . . . . . . . . . BIOS Call . . . . . .
What is SMAPI BIOS? The ThinkPad Basic Input/Output System (BIOS) provides a special software interface, called the System Management Application Program Interface (SMAPI) BIOS, to control the following unique features of the ThinkPad system: System Information This BIOS provides unique ThinkPad information, such as the system identifier (system ID).
Header Image Systems that support SMAPI BIOS must provide the following header image in the F000 segment system ROM area at the 16-byte boundary. The client needs to search and find this SMAPI BIOS header image to get the entry point for the service.
Information Word This area identifies the BIOS service level defined below. Information Bit Bit Bit Bit Word ð 1 2 3-15 : : : : Real/V86 mode interface support 16-bit protected mode support 32-bit protected mode support Reserved Real Mode Entry Point The entry point is specified in segment, offset format. Clients using Real/V86 mode can use this area for the far-call value.
Calling Convention The client can invoke the SMAPI BIOS with a far-call to the entry point that is specified in the header file. All parameters for the BIOS and other results are stored in the client data area; the client needs to prepare an input parameter / output parameter area in its data area, and informs this area by pushing those pointers onto the its stack before the far-calls. The SMAPI BIOS uses the stack/data area directly with the selector when the BIOS is invoked.
Sample in Assembler Language ; ; Input Parameter Structure ; SMB_INPARM STRUC @SMBIN_FUNC DB @SMBIN_SUB_FUNC DB @SMBIN_PARM_1 DW @SMBIN_PARM_2 DW @SMBIN_PARM_3 DW @SMBIN_PARM_4 DD @SMBIN_PARM_5 DD SMB_INPARM ENDS ? ? ? ? ? ? ? ; ; Output Parameter Structure ; SMB_OUTPARM @SMBOUT_RC @SMBOUT_SUB_RC @SMBOUT_PARM_1 @SMBOUT_PARM_2 @SMBOUT_PARM_3 @SMBOUT_PARM_4 @SMBOUT_PARM_5 SMB_OUTPARM STRUC DB DB DW DW DW DD DD ENDS ? ? ? ? ? ? ? ThinkPad 560/560E SMAPI BIOS A-7
Sample in C Language // // Input Parameter Structure // typedef struct { BYTE SMBIN_FUNC ; BYTE SMBIN_SUB_FUNC ; WORD SMBIN_PARM_1 ; WORD SMBIN_PARM_2 ; WORD SMBIN_PARM_3 ; DWORD SMBIN_PARM_4 ; DWORD SMBIN_PARM_5 ; } INPARM, \PINPARM ; // // Output Parameter Structure // typedef struct { BYTE SMBOUT_RC ; BYTE SMBOUT_SUB_RC ; WORD SMBOUT_PARM_1 ; WORD SMBOUT_PARM_2 ; WORD SMBOUT_PARM_3 ; DWORD SMBOUT_PARM_4 ; DWORD SMBOUT_PARM_5 ; } OUTPARM, \POUTPARM ; typedef INPARM typedef OUTPARM A-8 far \ FPINPARM ;
Calling Convention Pseudo Code The following describes the calling convention using pseudo code.
C Language typedef WORD (far \ SMB)(FPINPARM, FPOUTPARM) ; SMB INPARM OUTPARM WORD SmapiBios ; InputParm ; OutputParm ; RC ; RC = SmapiBios(&InputParm, &OutputParm) ; A-10 ThinkPad 560/560E SMAPI BIOS
Return Codes The following return codes are stored in both the AL (AX) register and the return code field of the output parameter. ððh 53h 81h 86h 9ðh 91h 92h Aðh A1h A2h A3h A4h A5h No Error SMAPI function is not available Invalid parameter Function is not supported System error System is invalid System is busy Device error (Disk Read Error) Device is busy Device is not attached Device is disabled Request parameter is out of range Request parameter is not accepted All other values are reserved.
Function Description System Information Service Get System Identification Input Field Major Function Number - ððh Minor Function Number - ððh Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Return Value Format = ððh - ASCII Format = ð1h - Binary Format Parameter 1 - System ID Parameter 2 - Country Code Parameter 3 - System BIOS revision Parameter 4 - (Bit 16-31) Reserved - (Bi
Get CPU Information Input Field Major Function Number - ððh Minor Function Number - ð1h Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - Reserved Parameter 2 - CPU ID (Bit 15- 8) Microprocessor Type (Bit 7- ð) Microprocessor Stepping Level = FFFFh : Unknown Parameter 3 - Clock Information (Bit 15- 8) CPU clock (units: MHz) = FFh : Unknown (Bit 7- ð) Inter
Get Display Device Information Input Field Major Function Number - ððh Minor Function Number - ð2h Parameter 1 - (Bit 8 ) (Bit 9 ) (Bit 15-1ð) (Bit 7- ð) Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved LCD information External CRT information Reserved Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - (Bit 15- 8) Built-in display device (panel) information 1 = ððh : Monochrome STN LCD = ð1h : Monochrome TFT LCD = ð2h
Get Slave Micro Control Unit Information Input Field Major Function Number - ððh Minor Function Number - ð6h Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Return Value Format = ððh - ASCII Format = ð1h - Binary Format Parameter 1 - Reserved Parameter 2 - Slave Controller Revision (= ðFFFFh) - Not valid Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Thi
Get System Sensor Status Input Field Major Function Number - ððh Minor Function Number - ð7h Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - Reserved Parameter 2 - Current Status Bit 8 - LID Status = ð : Open = 1 : Close Bit 9 - Keyboard Status = ð : Close = 1 : Open Bit 1ð- AC Adapter = ð : Not attached = 1 : Attached Bit 15- 11 : Reserved (Bit 7- ð) Re
Get Video Information Input Field Major Function Number - ððh Minor Function Number - ð8h Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - Video BIOS revision Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved ThinkPad 560/560E SMAPI BIOS A-17
Get Refresh Rate Capability Input Field Major Function Number - ððh Minor Function Number - ð9h Parameter 1 - Reserved Parameter 2 - mode = ððxxh - VGA modes. (Bit ð-7 is ignored.
Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - Reserved Parameter 2 - Refresh rate capability for specified mode: Bit ð - 6ðHz available. Bit 1 - 72Hz available. Bit 2 - 75Hz available. Bit 3 - 43Hz(I) available. Bit 4 - 56Hz available. Bit 5 - 7ðHz available. Bit 6 - 85Hz available. Bit 7 - 48Hz(I) available. Bit 8-15 : Reserved (must be B'ð').
System Configuration Service Get Display Device State Input Field Major Function Number - 1ðh Minor Function Number - ððh Parameter 1 - Reserved Parameter 2 - Request Type = ððððh : Current hardware = ððð1h : CMOS (effective after reboot) Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved A-20 ThinkPad 560/560E SMAPI BIOS
Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - Display Device Function Capability (Bit ð) Display Function Type = ð : Not Supported = 1 : Supported (Bit 15- 1) Reserved Parameter 2 - (Bit 15- 8) Display current status Bit ð - Built-in display (panel) status = ð : Disable = 1 : Enable Bit 1 - CRT status = ð : Disable = 1 : Enable Bit 2 - TV status = ð : Disable = 1 : Enable Bit 6 - 3 : Reserved Bit 7 - Dual Enable Flag = ð : Disable = 1 : Enable (Bit 7- ð) Display Fucn
Set Display Device State Input Field Major Function Number - 1ðh Minor Function Number - ð1h Parameter 1 - Reserved Parameter 2 - Request display status Bit ð - Built-in display (panel) status = ð : Disable = 1 : Enable Bit 1 - CRT status = ð : Disable = 1 : Enable Bit 2 - TV status = ð : Disable = 1 : Enable Bit 5 - 3 : Reserved Bit 6 - Monitor Detection Ignore = ð : Do not ignore (should be) = 1 : Ignore Bit 7 - Dual Enable Flag = ð : Disable = 1 : Enable Parameter 3 - Reserved Parameter 4 - Reserved Par
Get Pointing Device State Input Field Major Function Number - 11h Minor Function Number - ð2h Parameter 1 - Reserved Parameter 2 - (Bit 15- 8) Request Type = ððh - Current hardware = ð1h - CMOS (effective after reboot) (Bit 7- ð) Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - Reserved Parameter 2 - (Bit 15- 8) Pointing device current status Bit 8 - Built-in Pointing device status = ð : Dis
Set Pointing Device State Input Field Major Function Number - 11h Minor Function Number - ð3h Parameter 1 - Reserved Parameter 2 - (Bit 15- 8) Pointing device current status Bit 8 - Built-in Pointing device status = ð : Disable = 1 : Enable Bit 9 - External Pointing device status = ð : Disable = 1 : Enable Bit 15- 1ð: Reserved (Bit 7- ð) Request Type = ððh - Current hardware = ð1h - CMOS (effective after reboot) Bit 7- 2: Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output
Get Hotkey Sticky/Lock Input Field Major Function Number - 13h Minor Function Number - ð2h Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - Reserved Parameter 2 - (Bit 15- 8) Capability Bit 9-8 - Fn Key Lock (Bit 9, bit 8) = (ð, ð) - Not Supported (ð, 1) - Sticky Fn Key support (1, 1) - Sticky and Lock Fn Key support (1, ð) - Reserved Bit 15-1ð - Reserved
Set Hotkey Sticky/Lock Support Input Field Major Function Number - 13h Minor Function Number - ð3h Parameter 1 - Reserved Parameter 2 - (Bit 15- 8) Reserved (Bit 7- ð) Request Status Bit 1-ð - Sticky/Lock Fn key support (Bit 1, bit ð) = (ð, ð) - Disable (ð, 1) - Enable Sticky Fn Key support (1, 1) - Enable Sticky and Lock Fn Key support (1, ð) - Reserved Bit 7-2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - R
Power Management Service Get Power Management Mode (BL=00h) Input Field Major Function Number - 22h Minor Function Number - ððh Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - Reserved Parameter 2 - (Bit 15- 8) Power management mode Battery operation = ððh - High Performance mode = ð1h - Auto Power Management mode = ð2h - Manual Power Management mode (Bi
Set Power Management Mode Input Field Major Function Number - 22h Minor Function Number - ð1h Parameter 1 - Reserved Parameter 2 - (Bit 15- 8) Power management mode Battery operation = ððh - High Performance mode = ð1h - Auto Power Management mode = ð2h - Manual Power Management mode (Bit 7- ð) Power management mode AC operation = ððh - High Performance mode = ð1h - Auto Power Management mode = ð2h - Manual Power Management mode Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output F
Get Timer Control Input Field Major Function Number - 22h Minor Function Number - ð2h Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved ThinkPad 560/560E SMAPI BIOS A-29
Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - Reserved Parameter 2 - (Bit 15- 8) Capability of Timer Control Bit 8 - System (Hibernation/Suspend) timer = ð : Not Supported = 1 : Supported Bit 9 - Standby timer = ð : Not Supported = 1 : Supported Bit 1ð - LCD off timer = ð : Not Supported = 1 : Supported Bit 11 - HDD off timer = ð : Not Supported = 1 : Supported Bit 15-12 - Reserved (Bit 7- ð) Timer Control Bit ð - System (Hibernation/Suspend) timer = ð : Disable = 1
Set Timer Control Input Field Major Function Number - 22h Minor Function Number - ð3h Parameter 1 - Reserved Parameter 2 - (Bit 15- 8) Reserved (Bit 7- ð) Timer Control Bit ð - System (Hibernation/Suspend) timer = ð : Disable = 1 : Enable Bit 1 - Standby timer = ð : Disable = 1 : Enable Bit 2 - LCD off timer = ð : Disable = 1 : Enable Bit 3 - HDD off timer = ð : Disable = 1 : Enable Bit 7-4 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Sta
Event Bit Definition Bit Bit Bit Bit Bit Bit 2-ð 3 4 5 6 7 - Reserved Standby Suspend RediSafe Hibernation Power off Note: If bits are duplicated, the highest bit is available.
Get System Event Global Condition Input Field Major Function Number - 3ðh Minor Function Number - ððh Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - Reserved Parameter 2 - (Bit 15- 8) Capability for event Bit 8 - RediSafe is controlled by global conditions. (RediSafe bit is ignored in each event condition.
Set System Event Global Condition Input Field Major Function Number - 3ðh Minor Function Number - ð1h Parameter 1 - Reserved Parameter 2 - (Bit 15- 8) Reserved (Bit 7- ð) Global condition for event Bit ð - Enable safe suspend if suspend is selected.
Get System Event 1 Condition Input Field Major Function Number - 31h Minor Function Number - ððh Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - Reserved Parameter 2 - hardware and software event definition Bit 15-8 - Capability (See page A-32.) Bit 7-ð - Condition (See page A-32.
Set System Event 1 Condition Input Field Major Function Number - 31h Minor Function Number - ð1h Parameter 1 - Reserved Parameter 2 - Condition for hardware and software event Bit 15-8 - Capability (See page A-32.) Bit 7-ð - Condition (See page A-32.) Parameter 3 - Reserved Parameter 4 - (Bit 31-16) Reserved (Bit 15- ð) Condition for power switch detection Bit 15-8 - Capability (See page A-32.) Bit 7-ð - Condition (See page A-32.
Get System Event 2 Condition Input Field Major Function Number - 32h Minor Function Number - ððh Parameter 1 - Reserved Parameter 2 - System timer expiry event definition Bit 15-8 - Capability (See page A-32.) Bit 7-ð - Condition (See page A-32.) Parameter 3 - Reserved Parameter 4 - (Bit 31-16) Reserved (Bit 15- ð) Standby timer expiry event definition Bit 15-8 - Capability (See page A-32.) Bit 7-ð - Condition (See page A-32.
Set System Event 2 Condition Input Field Major Function Number - 32h Minor Function Number - ð1h Parameter 1 - Reserved Parameter 2 - Condition for System timer expiry Bit 15-8 - Capability (See page A-32.) Bit 7-ð - Condition (See page A-32.) Parameter 3 - Reserved Parameter 4 - (Bit 31-16) Reserved (Bit 15- ð) Condition for Standby timer expired Bit 15-8 - Capability (See page A-32.) Bit 7-ð - Condition (See page A-32.
Get System Timer Input Field Major Function Number - 32h Minor Function Number - ð2h Parameter 1 - Reserved Parameter 2 - (Bit 15- 8) Power mode Select = ððh - Reserved = ð1h - Manual PM mode (AC) = ð2h - Manual PM mode (Battery) = F3h - High Performance mode = F4h - Auto Pwr Mgmt mode (Bit 7- ð) Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - (Bit 15- 8) System Timer Capability Bit 8 = ð -
Set System Timer Input Field Major Function Number - 32h Minor Function Number - ð3h Parameter 1 - Reserved Parameter 2 - (Bit 15- 8) Power mode Select = ððh - All mode = ð1h - Manual PM mode (AC) = ð2h - Manual PM mode (Battery) = F3h - High Performance mode = F4h - Auto Pwr Mgmt mode (Bit 7- ð) System Timer initial value (units: minutes) = ððh - Disable system timer Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserv
Get Standby Timer Input Field Major Function Number - 32h Minor Function Number - ð4h Parameter 1 - Reserved Parameter 2 - (Bit 15- 8) Power mode Select = ððh - Reserved = ð1h - Manual PM mode (AC) = ð2h - Manual PM mode (Battery) = F3h - High Performance mode = F4h - Auto Pwr Mgmt mode (Bit 7- ð) Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - (Bit 15- 8) Standby Timer Capability Bit 8 = ð
Set Standby Timer Input Field Major Function Number - 32h Minor Function Number - ð5h Parameter 1 - Reserved Parameter 2 - (Bit 15- 8) Power mode Select = ððh - All mode = ð1h - Manual PM mode (AC) = ð2h - Manual PM mode (Battery) = F3h - High Performance mode = F4h - Auto Pwr Mgmt mode (Bit 7- ð) Standby Timer initial value (units: minutes) = ððh - Disable standby timer Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Res
Get Hibernation Timer Input Field Major Function Number - 32h Minor Function Number - ð6h Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - Reserved Parameter 2 - (Bit 15- 8) Reserved (Bit 7- ð) Hibernation Timer during suspend mode initial value (units: minutes) = ððh - Disable hibernation timer during suspend mode Parameter 3 - Reserved Parameter 4 - Res
Set Hibernation Timer Input Field Major Function Number - 32h Minor Function Number - ð7h Parameter 1 - Reserved Parameter 2 - (Bit 15- 8) Reserved (Bit 7- ð) Hibernation Timer during suspend mode initial value (units: minutes) = ððh - Disable hibernation timer during suspend mode Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - Reserved Parameter 2 - Reserved Reserved Parameter 3 - Reserved Paramete
Get System Event 3 Condition Input Field Major Function Number - 33h Minor Function Number - ððh Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - Reserved Parameter 2 - Critical low battery condition detection event definition Bit 15-8 - Capability (See page A-32.) Bit 7-ð - Condition (See page A-32.
Set System Event 3 Condition Input Field Major Function Number - 33h Minor Function Number - ð1h Parameter 1 - Reserved Parameter 2 - (Bit 15- 8) Reserved (Bit 7- ð) Condition for critical low battery condition detection Bit 7-ð - Condition (See page A-32.) Parameter 3 - Reserved Parameter 4 - (Bit 31- 8) Reserved (Bit 7- ð) Condition for out-of-environment condition detection Bit 7-ð - Condition (See page A-32.
Get System Resume Condition Input Field Major Function Number - 34h Minor Function Number - ððh Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - Reserved Parameter 2 - Condition for resuming trigger from system suspend mode Bit ð - Resume switch by hardware Bit 1 - LID open detection Bit 2 - RTC alarm (Resume Timer) detection Bit 3 - RI from the Serial De
Set System Resume Condition Input Field Major Function Number - 34h Minor Function Number - ð1h Parameter 1 - Reserved Parameter 2 - Condition for resuming trigger from the system suspend mode Bit ð - Resume switch by hardware Bit 1 - LID open detection Bit 2 - RTC alarm (Resume Timer) detection Bit 3 - RI from the Serial Device detection Bit 15-4 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserved Paramet
Get System Resume Timer Input Field Major Function Number - 34h Minor Function Number - ð2h Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - TOD of Resume Timer (BCD format) Bit 7-ð - Seconds (ð - 59) Bit 15-8 - Minutes (ð - 59) Bit 23-16 - Hours (ð - 23) Bit 31-24 - Reserved Parameter 5
Set System Resume Timer Input Field Major Function Number - 34h Minor Function Number - ð3h Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - TOD of Resume Timer (BCD format) Bit 7-ð - Seconds (ð - 59) Bit 15-8 - Minutes (ð - 59) Bit 23-16 - Hours (ð - 23) Bit 31-24 - Reserved Parameter 5 - Date of Resume Timer (BCD format) Bit 7-ð - Day (1 - 31) Bit 15-8 - Month (1 - 12) Bit 23-16 - Year (ð - 99) Bit 3ð-24 - Reserved Bit 31 - Resume Date Validation = ð - Valid (Specified d
Request System Standby Input Field Major Function Number - 7ðh Minor Function Number - ððh Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Request System Suspend Input Field Major Function Number - 7ðh Minor Function Number - ð1h Parameter 1 - Reserved P
Request System Hibernation Input Field Major Function Number - 7ðh Minor Function Number - ð2h Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Output Field Return Code - Error Status Auxiliary Return Code - Reserved Parameter 1 - Reserved Parameter 2 - Reserved Parameter 3 - Reserved Parameter 4 - Reserved Parameter 5 - Reserved Request System Off Input Field Major Function Number - 7ðh Minor Function Number - ð3h Parameter 1 - Reserved P
Samples Data Structure Assembler Language ; ; Smapi BIOS Header ; SMB_HEADER STRUC @SMBHDR_SIG DB ; +ðð - Signature @SMBHDR_VER DB ; +ð4 - Major version @SMBHDR_VER_VER DB ; +ð5 - Minor version @SMBHDR_LEN DB ; +ð6 - Length @SMBHDR_CHKSUM DB ; +ð7 - Checksum @SMBHDR_INFO DW ; +ð8 - Information Word @SMBHDR_RSV1 DW ; +ðA - Reserve 1 @SMBHDR_R_OFFSET DW ; +ðC - Real mode Offset @SMBHDR_R_SEGMENT DW ; +ðE - Real mode Segment @SMBHDR_RSV2 DW ; +1ð - Reserve 2 @SMBHDR_P16_OFFSET DW ; +12 - 16-bit protected mode
Parameters A-54 ; ;Input Parameter ; SMB_INPARM @SMBIN_FUNC @SMBIN_SUB_FUNC @SMBIN_PARM_1 @SMBIN_PARM_2 @SMBIN_PARM_3 @SMBIN_PARM_4 @SMBIN_PARM_5 SMB_INPARM STRUC DB DB DW DW DW DD DD ENDS ? ? ? ? ? ? ? ; ;Output Parameter ; SMB_OUTPARM @SMBOUT_RC @SMBOUT_SUB_RC @SMBOUT_PARM_1 @SMBOUT_PARM_2 @SMBOUT_PARM_3 @SMBOUT_PARM_4 @SMBOUT_PARM_5 SMB_OUTPARM STRUC DB DB DW DW DW DD DD ENDS ? ? ? ? ? ? ? ThinkPad 560/560E SMAPI BIOS
C Language // // SMAPI BIOS Header // typedef struct { BYTE SMBHDR_SIG[4] ; // Signature BYTE SMBHDR_VER ; // Major Version BYTE SMBHDR_VER_VER ; // Minor Version BYTE SMBHDR_LEN ; // Length BYTE SMBHDR_CHKSUM ; // Checksum WORD SMBHDR_INFO ; // Information word WORD SMBHDR_RSV1 ; // Reserve 1 WORD SMBHDR_R_OFFSET ; // Real mode offset WORD SMBHDR_R_SEGMENT ; // Real mode segment WORD SMBHDR_RSV2 ; // Reserve 2 WORD SMBHDR_P16_OFFSET ; // 16-bit Protect mode offset DWORD SMBHDR_P16_BASE ; // 16-bit Protect
Parameters // // Input Parameter // typedef struct { BYTE SMBIN_FUNC BYTE SMBIN_SUB_FUNC WORD SMBIN_PARM_1 WORD SMBIN_PARM_2 WORD SMBIN_PARM_3 DWORD SMBIN_PARM_4 DWORD SMBIN_PARM_5 } INPARM, \PINPARM ; // // Output Parameter // typedef struct { BYTE SMBOUT_RC BYTE SMBOUT_SUB_RC WORD SMBOUT_PARM_1 WORD SMBOUT_PARM_2 WORD SMBOUT_PARM_3 DWORD SMBOUT_PARM_4 DWORD SMBOUT_PARM_5 } OUTPARM, \POUTPARM ; A-56 ThinkPad 560/560E SMAPI BIOS ; ; ; ; ; ; ; ; ; ; ; ; ; ;
Function Declaration C Language // // Smapi BIOS function // typedef WORD (far \ SMB)(PINPARM, POUTPARM) ; ThinkPad 560/560E SMAPI BIOS A-57
Installation Check Assembler Language: Real Mode ; ; FindSmapi ; ----------; ; On Entry : None ; On Exit : CF = ; DX ; BX ; ; CF = ; FindSmapi ð .. Find out - Segment - Pointer to Header 1 .. No Smapi BIOS Proc Near push push push push eax cx si ds mov mov mov mov mov ax, BIOS_SEG ; Fððð Segment ds, ax bx, ð ; Start Point cx, SMB_CAND_CNT ; Total Check Count eax, 'BMS$' ; Target Strings cmp je add loop stc jmp eax, dword ptr ds:[bx].
@@: ; mov Find Smapi Head dx, BIOS_SEG ; pushf cld mov xor movzx Calculate Checksum.. next. ; Save Direction flag ; Clear it si, bx ax, ax cx,byte ptr ds:[bx].
C Language typedef struct { BYTE SMBHDR_SIG[4] ; // Signature BYTE SMBHDR_VER ; // Major Version BYTE SMBHDR_VER_VER ; // Minor Version BYTE SMBHDR_LEN ; // Length BYTE SMBHDR_CHKSUM ; // Checksum WORD SMBHDR_INFO ; // Information Word WORD SMBHDR_RSV1 ; // Reserve 1 WORD SMBHDR_R_OFFSET ; // Real Mode Offset WORD SMBHDR_R_SEGMENT ; // Real Mode Segment } SMB_HEADER_REAL, far \ PFSMB_HEADER_REAL ; A-60 ThinkPad 560/560E SMAPI BIOS
BOOLEAN GetSmapiEntry(PSMB pFunc) { PFSMB_HEADER_REAL MyPtr = ðxFððððððð ; WORD cnt = ð ; BYTE cksum = ð ; // // 1) Search for signature first // while((cnt++ < ðx1ððð) && !(((MyPtr->SMBHDR_SIG)[ð] == '$') && ((MyPtr->SMBHDR_SIG)[1] == 'S') && ((MyPtr->SMBHDR_SIG)[2] == 'M') && ((MyPtr->SMBHDR_SIG)[3] == 'B') )) { MyPtr++ ; } // // 2) Find the Signature? // if (cnt >= ðx1ððð) { // We cannot find it.
BIOS Call Assembler Language: 16-Bit Protected Mode ; ; Build Input Parameter Field ; mov mov al, SMB_GET_SYSID [bx].@Func, al mov push mov push call add ax, offset OutputParm ax ax, offset InputParm ax _SmapiBios sp, 4 ; ; Get information from Output Parm ; or ax, ax jnz Error mov mov A-62 bx, offset OutputParm al, [bx].
32-Bit Protected Mode ; ; Build Input Parameter Field ; mov ebx, offset InputParm mov al, SMB_GET_SYSID mov [ebx].@Func, al mov push mov push call add eax, offset OutputParm eax eax, offset InputParm eax _SmapiBios sp, 8 ; ; Get information from Output Parm ; or ax, ax jnz Error mov mov ebx, offset OutputParm ax, [ebx].
C Language WORD GetSystemID() { SMB SmapiEntry ; INPARM MyInput ; OUTPARM MyOutput ; WORD Rc = -1 ; if (GetSmapiEntry(&SmapiEntry)) { MyInput.SMBIN_FUNC MyInput.SMBIN_SUB_FUNC = ð ; = ð ; if (SmapiEntry(&MyInput, &MyOutput)) { // No System ID is available } else { Rc = MyOutput.SMBOUT_PARM_1 ; } } else { // No Smapi BIOS interface. // Try to use CBIOS INT 15.
Appendix B. Notices References in this publication to IBM products, programs, or services do not imply that IBM intends to make these available in all countries in which IBM operates. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used.
Trademarks The following terms, denoted by an asterisk (*) in this publication, are trademarks of the IBM Corporation in the United States or other countries or both: AT IBM Personal Computer AT Personal System/2 PS/2 ThinkPad TrackPoint III The following terms, denoted by a double asterisk (**) in this publication, are trademarks of other companies as follows: Intel IntelDX4 Intel486 IrDA PCMCIA Pentium Sound Blaster 286 287 386 387 8086 8087 8088 82077AA Intel Corporation Intel Corporation Intel Corpor
Index A acoustical readings, specifications 1-10 address 20 gate 2-28 address and NMI mask register, RT/CMOS 2-17 address map RT/CMOS RAM 2-16 system board I/O 1-6 air temperature, specifications 1-9 alternative method of resetting 2-28 altitude, specifications 1-9 anticipated page miss 1-8 audio subsystem 3-6 B battery 2-21 battery pack, specifications 1-13 boot selectable drive-startup sequence 2-29 bus master access to system board RAM, specifications 1-8 C cables 1-9 cache memory operation 2-2 cache,
DSTN LCD (dual-scan supertwisted nematic liquid crystal display) 3-2 K EEPROM subsystem 1-3 electrical specifications 1-9 electromagnetic compatibility, specifications 1-9 enable NMI 2-17 equipment byte, RT/CMOS RAM configuration 2-24 error codes 2-31 external connector 2-9 key numbers 2-5 for the 84-key keyboard 2-5 for the 85-key keyboard 2-6 for the external numeric keypad 2-7 keyboard connector 2-4 ID 2-6 signals 2-4 keyboard/auxiliary device controller 1-4 keyboard/mouse connector 2-4 F L E faul
microprocessor (continued) cache memory operation 2-2 mode switch compatibility 2-28 performance 1-8 real address mode 2-28 specifications 1-3, 1-8 mode switch, protected 2-28 model identifier 1-2 model/submodel bytes 1-2 description 2-2 model identifier 1-2 mouse connector 2-4 signals 2-4 N NMI (nonmaskable interrupt) 2-26 O output protection, power supply 1-12 output voltage sequencing overvoltage fault 1-12 1-12 POST (continued) memory errors 2-14 parity check 2-26 password 2-29 reset 2-28 ROM test
registers (continued) status 2-19, 2-20, 2-21 reserved bytes, RT/CMOS RAM configuration 2-25 reset, alternative method 2-28 ROM (read-only memory) 2-13 RT/CMOS address and NMI mask register (hex 0070) 2-17 data register (hex 0071) 2-17 RAM address map 2-16 RAM configuration configuration CRC bytes 2-25 date-century byte 2-25 diagnostic status byte 2-22 diskette drive type byte 2-23 equipment byte 2-24 hard disk drive 2, 3 type byte 2-23, 2-24 low and high base memory bytes 2-25 low and high expansion memory
specifications (continued) heat output 1-9 humidity 1-9 maximum altitude 1-9 microprocessor 1-8 PCMCIA 3-7 performance 1-8 refresh rate 1-8 size 1-9 weight 1-9 standards, PCMCIA 3-7 status register register A (hex 00A) 2-19 register B (hex 00B) 2-20 register C (hex 00C) 2-21 register D (hex 00D) 2-21 switch to real 2-28 system control ports 2-28 functions, miscellaneous 2-26 performance 1-8 reset 2-26 system board devices 1-3 CMOS RAM subsystem 1-3 diskette drive controller 1-4 DMA controller 1-3 EEPROM sub
IBM Part Number: 06J0536 Printed in the United States of America