File: TECHNOTES

package info (click to toggle)
thinkpad 5.8-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 604 kB
  • ctags: 1,459
  • sloc: ansic: 5,985; makefile: 226; sh: 179; asm: 44; sed: 22
file content (157 lines) | stat: -rw-r--r-- 4,949 bytes parent folder | download | duplicates (2)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
On my ThinkPad 600 (51U),

ThinkPad registers
------------------
Writing certain values to 0xB2 "Advanced power management port" causes hibernation to occur.

APM states
----------
APM reported:
ALL      0x001  0x0 (APM_STATE_READY)
DISPLAY  0x100  0x0 (APM_STATE_READY)
STORAGE  0x200  0x0 (APM_STATE_READY)
PARALLEL 0x300  0x0 (APM_STATE_READY)
SERIAL   0x400  error 0x1 (APM_DISABLED) when the serial port is switched off using PS2.EXE
         0x400  0x0 (APM_STATE_READY)    when the serial port is switched on using PS2.EXE
         0x400  0x3 (APM_STATE_OFF)      when the serial port is switched on using PS2.EXE and off using tpctl
         0x401  error 0x9 (APM_BAD_DEVICE)
NETWORK  0x500  error 0x9 (APM_BAD_DEVICE)
PCMCIA   0x600  0x0 (APM_STATE_READY)

Kernel programming
------------------
Well you might want to take a look at my slides from my Linux Kernel
Programming tutorial at Linux Kongress, they are available at 
http://home.cern.ch/~jes/slides/kongress-kernel-2000-print.ps.gz

SMAPI BIOS info
---------------
Hi,
Just my 2c on the identification issue. I've done a tiny bit of
research for asset management purposes. The following works for all
IBM notebooks and desktops I've come across back to but not including
MCA based machines. Haven't any experience at all with other brands.

System Management BIOS equipped PCs should be identifiable by getting
mainboard Manufacturer, Product, Version data using SMBIOS calls. More
info and source code at
http://www.ibm.com/products/surepath/other/smbios.html.

Non-SMBIOS Thinkpads has their type info at real address F000:FFC8
(like 9546X9A for TP760ED). Additionally, location F000:FFB6 can be
checked for a valid IBM serial number (7 chars).

Here's a DOS DEBUG dump from my TP760ED:
F000:FFB0  54 36 30 57 57 20 35 35-38 48 31 31 59 32 4D 58   T60WW 558H11Y2MX
F000:FFC0  39 4B 33 30 30 38 36 39-39 35 34 36 58 39 41 AF   9K3008699546X9A.
F000:FFD0  00 00 00 00 00 00 00 00-00 00 00 00 2D B1 00 F0   ............-...
F000:FFE0  21 00 52 01 00 00 00 00-00 00 00 00 00 00 00 00   !.R.............
F000:FFF0  CD 19 E0 00 F0 31 32 2F-30 39 2F 39 39 00 FC DE   .....12/09/99...

I would like comments from anybody, who can find the above procedure 
not being able to identify a Thinkpad, or mistakenly identifying
some other brand as a Thinkpad.

Best regards,
Hans Henrik Moller

Undocumented SMAPI calls gleaned from Mwave/ACP modem driver
------------------------------------------------------------
int /* bRC */ smapi_request(unsigned short inBX, unsigned short inCX,
                  unsigned short inDI, unsigned short inSI,
                  unsigned short *outAX, unsigned short *outBX,
                  unsigned short *outCX, unsigned short *outDX,
                  unsigned short *outDI, unsigned short *outSI)

inBX   0x1402
inCX   0x0000
inDI   0x0000
inSI   0x0000
outBX  0x0100   serial port A present
outCX  0x0001   serial port A enabled
outSI  0x00FF   serial port A IRQ
outSI  0xFF00   serial port A base I/O address index into { 0x03F8, 0x02F8, 0x03E8, 0x02E8 }

To disable serial port A:
inBX   0x1403
inCX   0x0100
inDI   0x0000
inSI   outSI from 0x1402 call

inBX   0x1404
inCX   0x0000
inDI   0x0000
inSI   0x0000
outBX  0x0100   serial port B present
outCX  0x0001   serial port B enabled
outSI  0x00FF   serial port B IRQ
outSI  0xFF00   serial port B base I/O address index into { 0x03F8, 0x02F8, 0x03E8, 0x02E8 }

To disable serial port B:
inBX   0x1405
inCX   0x0100
inDI   0x0000
inSI   outSI from 0x1402 call

inBX   0x1700
inCX   0x0000
inDx   0x0000
inSI   0x0000
then:
inBX   0x1704
inCX   0x0000
inDI   0x0000
inSI   0x0000
outCX  0x00FF   IR port IRQ
outSI  0x00FF   IR port base I/O address index into { 0x03F8, 0x02F8, 0x03E8, 0x02E8 }

To disable IR port:
inBX   0x1701
inCX   0x0100
inDI   0x0000
inSI   0x0000
then:
inBX   0x1700
inCX   0x0000
inDI   0x0000
inSI   0x0000
then:
inBX   0x1705
inCX   0x01ff
inDI   0x0000
inSI   outSI from prev 0x1700 call
then:
inBX   0x1704
inCX   0x0000
inDI   0x0000
inSI   0x0000

inBX   0x1802
inCX   0x0000
inDI   0x0000
inSI   0x0000
outBX  0x0100   IMODEM DSP present
outCX  0x0001   IMODEM DSP enabled
outDI  0x00FF   IMODEM DSP base I/O address index into  { 0x0030, 0x4E30, 0x8E30, 0xCE30, 0x0130, 0x0350, 0x0070, 0x0DB0 }
outSI  0x00FF   IMODEM DSP IRQ
       0xFF00   IMODEM DSP DMA

inBX   0x1804
inCX   0x0000
inDI   0x0000
inSI   0x0000
outCX  0x0001   IMODEM UART-enabled flag
outSI  0x000F   IMODEM UART IRQ
       0xFF00   IMODEM UART base I/O address index into { 0x03F8, 0x02F8, 0x03E8, 0x02E8 }

inBX   0x1803
inCX   0x0101
inDI   0xffff   IMODEM DSP base I/O address index into  { 0x0030, 0x4E30, 0x8E30, 0xCE30, 0x0130, 0x0350, 0x0070, 0x0DB0 }
inSI   0x00ff   IMODEM DSP IRQ (preserve 0xff00 from 0x1802 call)

inBX   0x1805
inCX   0x0101
inDI   0x0000
inSI   0x00ff   IMODEM UART IRQ
       0xff00   IMODEM UART base I/O address index into { 0x03F8, 0x02F8, 0x03E8, 0x02E8 }