1 | // $Id: vbox.dsl 2988 2007-06-01 17:36:09Z vboxsync $
|
---|
2 | /// @file
|
---|
3 | //
|
---|
4 | // VirtualBox ACPI
|
---|
5 | //
|
---|
6 | // Copyright (C) 2006-2007 innotek GmbH
|
---|
7 | //
|
---|
8 | // This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
9 | // available from http://www.virtualbox.org. This file is free software;
|
---|
10 | // you can redistribute it and/or modify it under the terms of the GNU
|
---|
11 | // General Public License as published by the Free Software Foundation,
|
---|
12 | // in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
---|
13 | // distribution. VirtualBox OSE is distributed in the hope that it will
|
---|
14 | // be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
15 | //
|
---|
16 | // If you received this file as part of a commercial VirtualBox
|
---|
17 | // distribution, then only the terms of your commercial VirtualBox
|
---|
18 | // license agreement apply instead of the previous paragraph.
|
---|
19 | //
|
---|
20 |
|
---|
21 | DefinitionBlock ("DSDT.aml", "DSDT", 1, "VBOX ", "VBOXBIOS", 2)
|
---|
22 | {
|
---|
23 | // Declare debugging ports withing SystemIO
|
---|
24 | OperationRegion(DBG0, SystemIO, 0x3000, 4)
|
---|
25 |
|
---|
26 | // Writes to this field Will dump hex char
|
---|
27 | Field (DBG0, ByteAcc, NoLock, Preserve)
|
---|
28 | {
|
---|
29 | DHE1, 8,
|
---|
30 | }
|
---|
31 |
|
---|
32 | // Writes to this field Will dump hex word
|
---|
33 | Field (DBG0, WordAcc, NoLock, Preserve)
|
---|
34 | {
|
---|
35 | DHE2, 16,
|
---|
36 | }
|
---|
37 |
|
---|
38 | // Writes to this field Will dump hex double word
|
---|
39 | Field (DBG0, DWordAcc, NoLock, Preserve)
|
---|
40 | {
|
---|
41 | DHE4, 32,
|
---|
42 | }
|
---|
43 |
|
---|
44 | // Writes to this field will dump ascii char
|
---|
45 | Field (DBG0, ByteAcc, NoLock, Preserve)
|
---|
46 | {
|
---|
47 | Offset (1),
|
---|
48 | DCHR, 8
|
---|
49 | }
|
---|
50 |
|
---|
51 | // Shortcuts
|
---|
52 | Method(HEX, 1)
|
---|
53 | {
|
---|
54 | Store (Arg0, DHE1)
|
---|
55 | }
|
---|
56 |
|
---|
57 | Method(HEX2, 1)
|
---|
58 | {
|
---|
59 | Store (Arg0, DHE2)
|
---|
60 | }
|
---|
61 |
|
---|
62 | Method(HEX4, 1)
|
---|
63 | {
|
---|
64 | Store (Arg0, DHE4)
|
---|
65 | }
|
---|
66 |
|
---|
67 | // Code from Microsoft sample
|
---|
68 | // http://www.microsoft.com/whdc/system/pnppwr/powermgmt/_OSI-method.mspx
|
---|
69 |
|
---|
70 | //
|
---|
71 | // SLEN(Str) - Returns the length of Str (excluding NULL).
|
---|
72 | //
|
---|
73 | Method(SLEN, 1)
|
---|
74 | {
|
---|
75 | //
|
---|
76 | // Note: The caller must make sure that the argument is a string object.
|
---|
77 | //
|
---|
78 | Store(Arg0, Local0)
|
---|
79 | Return(Sizeof(Local0))
|
---|
80 | }
|
---|
81 |
|
---|
82 | Method(S2BF, 1)
|
---|
83 | {
|
---|
84 | //
|
---|
85 | // Note: The caller must make sure that the argument is a string object.
|
---|
86 | //
|
---|
87 | // Local0 contains length of string + NULL.
|
---|
88 | //
|
---|
89 | Store(Arg0, Local0)
|
---|
90 | Add(SLEN(Local0), One, Local0)
|
---|
91 | //
|
---|
92 | // Convert the string object into a buffer object.
|
---|
93 | //
|
---|
94 | Name(BUFF, Buffer(Local0) {})
|
---|
95 | Store(Arg0, BUFF)
|
---|
96 | Return(BUFF)
|
---|
97 | }
|
---|
98 |
|
---|
99 | // Convert ASCII string to buffer and store it's contents (char by
|
---|
100 | // char) into DCHR (thus possibly writing the string to console)
|
---|
101 | Method (\DBG, 1, NotSerialized)
|
---|
102 | {
|
---|
103 | Store(Arg0, Local0)
|
---|
104 | Store(S2BF (Local0), Local1)
|
---|
105 | Store(SizeOf (Local1), Local0)
|
---|
106 | Decrement (Local0)
|
---|
107 | Store(Zero, Local2)
|
---|
108 | While (Local0)
|
---|
109 | {
|
---|
110 | Decrement (Local0)
|
---|
111 | Store (DerefOf (Index (Local1, Local2)), DCHR)
|
---|
112 | Increment (Local2)
|
---|
113 | }
|
---|
114 | }
|
---|
115 |
|
---|
116 | Name(PICM, 0)
|
---|
117 | Method(_PIC, 1)
|
---|
118 | {
|
---|
119 | DBG ("Pic mode: ")
|
---|
120 | HEX4 (Arg0)
|
---|
121 | Store (Arg0, PICM)
|
---|
122 | }
|
---|
123 |
|
---|
124 | // Processor object
|
---|
125 | // #1463: Showing the CPU can make the guest do bad things on it like SpeedStep.
|
---|
126 | // In this case, XP SP2 contains this buggy Intelppm.sys driver which wants to mess
|
---|
127 | // with SpeedStep if it finds a CPU object and when it finds out that it can't, it
|
---|
128 | // tries to unload and crashes (MS probably never tested this code path).
|
---|
129 | // Scope (\_PR)
|
---|
130 | // {
|
---|
131 | // Processor (CPU1, 0x01, 0x00000000, 0x00) {}
|
---|
132 | // }
|
---|
133 |
|
---|
134 | Scope (\_SB)
|
---|
135 | {
|
---|
136 | OperationRegion (SYSI, SystemIO, 0x4048, 0x08)
|
---|
137 | Field (SYSI, DwordAcc, NoLock, Preserve)
|
---|
138 | {
|
---|
139 | IDX0, 32,
|
---|
140 | DAT0, 32,
|
---|
141 | }
|
---|
142 |
|
---|
143 | IndexField (IDX0, DAT0, DwordAcc, NoLock, Preserve)
|
---|
144 | {
|
---|
145 | MEML, 32,
|
---|
146 | UIOA, 32,
|
---|
147 | Offset (0x80),
|
---|
148 | ININ, 32,
|
---|
149 | Offset (0x200),
|
---|
150 | VAIN, 32,
|
---|
151 | }
|
---|
152 |
|
---|
153 | Method (_INI, 0, NotSerialized)
|
---|
154 | {
|
---|
155 | Store (0xbadc0de, VAIN)
|
---|
156 | DBG ("MEML: ")
|
---|
157 | HEX4 (MEML)
|
---|
158 | DBG ("UIOA: ")
|
---|
159 | HEX4 (UIOA)
|
---|
160 | }
|
---|
161 |
|
---|
162 | // PCI PIC IRQ Routing table
|
---|
163 | // Must match pci.c:pci_slot_get_pirq
|
---|
164 | Name (PR00, Package ()
|
---|
165 | {
|
---|
166 | Package (0x04) {0x0002FFFF, 0x00, LNKB, 0x00,},
|
---|
167 | Package (0x04) {0x0002FFFF, 0x01, LNKC, 0x00,},
|
---|
168 | Package (0x04) {0x0002FFFF, 0x02, LNKD, 0x00,},
|
---|
169 | Package (0x04) {0x0002FFFF, 0x03, LNKA, 0x00,},
|
---|
170 | Package (0x04) {0x0003FFFF, 0x00, LNKC, 0x00,},
|
---|
171 | Package (0x04) {0x0003FFFF, 0x01, LNKD, 0x00,},
|
---|
172 | Package (0x04) {0x0003FFFF, 0x02, LNKA, 0x00,},
|
---|
173 | Package (0x04) {0x0003FFFF, 0x03, LNKB, 0x00,},
|
---|
174 | Package (0x04) {0x0004FFFF, 0x00, LNKD, 0x00,},
|
---|
175 | Package (0x04) {0x0004FFFF, 0x01, LNKA, 0x00,},
|
---|
176 | Package (0x04) {0x0004FFFF, 0x02, LNKB, 0x00,},
|
---|
177 | Package (0x04) {0x0004FFFF, 0x03, LNKC, 0x00,},
|
---|
178 | Package (0x04) {0x0005FFFF, 0x00, LNKA, 0x00,},
|
---|
179 | Package (0x04) {0x0005FFFF, 0x01, LNKB, 0x00,},
|
---|
180 | Package (0x04) {0x0005FFFF, 0x02, LNKC, 0x00,},
|
---|
181 | Package (0x04) {0x0005FFFF, 0x03, LNKD, 0x00,},
|
---|
182 | Package (0x04) {0x0006FFFF, 0x00, LNKB, 0x00,},
|
---|
183 | Package (0x04) {0x0006FFFF, 0x01, LNKC, 0x00,},
|
---|
184 | Package (0x04) {0x0006FFFF, 0x02, LNKD, 0x00,},
|
---|
185 | Package (0x04) {0x0006FFFF, 0x03, LNKA, 0x00,},
|
---|
186 | Package (0x04) {0x0007FFFF, 0x00, LNKC, 0x00,},
|
---|
187 | Package (0x04) {0x0007FFFF, 0x01, LNKD, 0x00,},
|
---|
188 | Package (0x04) {0x0007FFFF, 0x02, LNKA, 0x00,},
|
---|
189 | Package (0x04) {0x0007FFFF, 0x03, LNKB, 0x00,},
|
---|
190 | Package (0x04) {0x0008FFFF, 0x00, LNKD, 0x00,},
|
---|
191 | Package (0x04) {0x0008FFFF, 0x01, LNKA, 0x00,},
|
---|
192 | Package (0x04) {0x0008FFFF, 0x02, LNKB, 0x00,},
|
---|
193 | Package (0x04) {0x0008FFFF, 0x03, LNKC, 0x00,},
|
---|
194 | Package (0x04) {0x0009FFFF, 0x00, LNKA, 0x00,},
|
---|
195 | Package (0x04) {0x0009FFFF, 0x01, LNKB, 0x00,},
|
---|
196 | Package (0x04) {0x0009FFFF, 0x02, LNKC, 0x00,},
|
---|
197 | Package (0x04) {0x0009FFFF, 0x03, LNKD, 0x00,},
|
---|
198 | Package (0x04) {0x000AFFFF, 0x00, LNKB, 0x00,},
|
---|
199 | Package (0x04) {0x000AFFFF, 0x01, LNKC, 0x00,},
|
---|
200 | Package (0x04) {0x000AFFFF, 0x02, LNKD, 0x00,},
|
---|
201 | Package (0x04) {0x000AFFFF, 0x03, LNKA, 0x00,},
|
---|
202 | Package (0x04) {0x000BFFFF, 0x00, LNKC, 0x00,},
|
---|
203 | Package (0x04) {0x000BFFFF, 0x01, LNKD, 0x00,},
|
---|
204 | Package (0x04) {0x000BFFFF, 0x02, LNKA, 0x00,},
|
---|
205 | Package (0x04) {0x000BFFFF, 0x03, LNKB, 0x00,},
|
---|
206 | Package (0x04) {0x000CFFFF, 0x00, LNKD, 0x00,},
|
---|
207 | Package (0x04) {0x000CFFFF, 0x01, LNKA, 0x00,},
|
---|
208 | Package (0x04) {0x000CFFFF, 0x02, LNKB, 0x00,},
|
---|
209 | Package (0x04) {0x000CFFFF, 0x03, LNKC, 0x00,},
|
---|
210 | Package (0x04) {0x000DFFFF, 0x00, LNKA, 0x00,},
|
---|
211 | Package (0x04) {0x000DFFFF, 0x01, LNKB, 0x00,},
|
---|
212 | Package (0x04) {0x000DFFFF, 0x02, LNKC, 0x00,},
|
---|
213 | Package (0x04) {0x000DFFFF, 0x03, LNKD, 0x00,},
|
---|
214 | Package (0x04) {0x000EFFFF, 0x00, LNKB, 0x00,},
|
---|
215 | Package (0x04) {0x000EFFFF, 0x01, LNKC, 0x00,},
|
---|
216 | Package (0x04) {0x000EFFFF, 0x02, LNKD, 0x00,},
|
---|
217 | Package (0x04) {0x000EFFFF, 0x03, LNKA, 0x00,},
|
---|
218 | Package (0x04) {0x000FFFFF, 0x00, LNKC, 0x00,},
|
---|
219 | Package (0x04) {0x000FFFFF, 0x01, LNKD, 0x00,},
|
---|
220 | Package (0x04) {0x000FFFFF, 0x02, LNKA, 0x00,},
|
---|
221 | Package (0x04) {0x000FFFFF, 0x03, LNKB, 0x00,}
|
---|
222 | })
|
---|
223 |
|
---|
224 | // PCI I/O APIC IRQ Routing table
|
---|
225 | // Must match pci.c:pci_slot_get_acpi_pirq
|
---|
226 | Name (PR01, Package ()
|
---|
227 | {
|
---|
228 | Package (0x04) {0x0002FFFF, 0x00, 0x00, 0x12,},
|
---|
229 | Package (0x04) {0x0002FFFF, 0x01, 0x00, 0x13,},
|
---|
230 | Package (0x04) {0x0002FFFF, 0x02, 0x00, 0x14,},
|
---|
231 | Package (0x04) {0x0002FFFF, 0x03, 0x00, 0x15,},
|
---|
232 | Package (0x04) {0x0003FFFF, 0x00, 0x00, 0x13,},
|
---|
233 | Package (0x04) {0x0003FFFF, 0x01, 0x00, 0x14,},
|
---|
234 | Package (0x04) {0x0003FFFF, 0x02, 0x00, 0x15,},
|
---|
235 | Package (0x04) {0x0003FFFF, 0x03, 0x00, 0x16,},
|
---|
236 | Package (0x04) {0x0004FFFF, 0x00, 0x00, 0x14,},
|
---|
237 | Package (0x04) {0x0004FFFF, 0x01, 0x00, 0x15,},
|
---|
238 | Package (0x04) {0x0004FFFF, 0x02, 0x00, 0x16,},
|
---|
239 | Package (0x04) {0x0004FFFF, 0x03, 0x00, 0x17,},
|
---|
240 | Package (0x04) {0x0005FFFF, 0x00, 0x00, 0x15,},
|
---|
241 | Package (0x04) {0x0005FFFF, 0x01, 0x00, 0x16,},
|
---|
242 | Package (0x04) {0x0005FFFF, 0x02, 0x00, 0x17,},
|
---|
243 | Package (0x04) {0x0005FFFF, 0x03, 0x00, 0x10,},
|
---|
244 | Package (0x04) {0x0006FFFF, 0x00, 0x00, 0x16,},
|
---|
245 | Package (0x04) {0x0006FFFF, 0x01, 0x00, 0x17,},
|
---|
246 | Package (0x04) {0x0006FFFF, 0x02, 0x00, 0x10,},
|
---|
247 | Package (0x04) {0x0006FFFF, 0x03, 0x00, 0x11,},
|
---|
248 | Package (0x04) {0x0007FFFF, 0x00, 0x00, 0x17,},
|
---|
249 | Package (0x04) {0x0007FFFF, 0x01, 0x00, 0x10,},
|
---|
250 | Package (0x04) {0x0007FFFF, 0x02, 0x00, 0x11,},
|
---|
251 | Package (0x04) {0x0007FFFF, 0x03, 0x00, 0x12,},
|
---|
252 | Package (0x04) {0x0008FFFF, 0x00, 0x00, 0x10,},
|
---|
253 | Package (0x04) {0x0008FFFF, 0x01, 0x00, 0x11,},
|
---|
254 | Package (0x04) {0x0008FFFF, 0x02, 0x00, 0x12,},
|
---|
255 | Package (0x04) {0x0008FFFF, 0x03, 0x00, 0x13,},
|
---|
256 | Package (0x04) {0x0009FFFF, 0x00, 0x00, 0x11,},
|
---|
257 | Package (0x04) {0x0009FFFF, 0x01, 0x00, 0x12,},
|
---|
258 | Package (0x04) {0x0009FFFF, 0x02, 0x00, 0x13,},
|
---|
259 | Package (0x04) {0x0009FFFF, 0x03, 0x00, 0x14,},
|
---|
260 | Package (0x04) {0x000AFFFF, 0x00, 0x00, 0x12,},
|
---|
261 | Package (0x04) {0x000AFFFF, 0x01, 0x00, 0x13,},
|
---|
262 | Package (0x04) {0x000AFFFF, 0x02, 0x00, 0x14,},
|
---|
263 | Package (0x04) {0x000AFFFF, 0x03, 0x00, 0x15,},
|
---|
264 | Package (0x04) {0x000BFFFF, 0x00, 0x00, 0x13,},
|
---|
265 | Package (0x04) {0x000BFFFF, 0x01, 0x00, 0x14,},
|
---|
266 | Package (0x04) {0x000BFFFF, 0x02, 0x00, 0x15,},
|
---|
267 | Package (0x04) {0x000BFFFF, 0x03, 0x00, 0x16,},
|
---|
268 | Package (0x04) {0x000CFFFF, 0x00, 0x00, 0x14,},
|
---|
269 | Package (0x04) {0x000CFFFF, 0x01, 0x00, 0x15,},
|
---|
270 | Package (0x04) {0x000CFFFF, 0x02, 0x00, 0x16,},
|
---|
271 | Package (0x04) {0x000CFFFF, 0x03, 0x00, 0x17,},
|
---|
272 | Package (0x04) {0x000DFFFF, 0x00, 0x00, 0x15,},
|
---|
273 | Package (0x04) {0x000DFFFF, 0x01, 0x00, 0x16,},
|
---|
274 | Package (0x04) {0x000DFFFF, 0x02, 0x00, 0x17,},
|
---|
275 | Package (0x04) {0x000DFFFF, 0x03, 0x00, 0x10,},
|
---|
276 | Package (0x04) {0x000EFFFF, 0x00, 0x00, 0x16,},
|
---|
277 | Package (0x04) {0x000EFFFF, 0x01, 0x00, 0x17,},
|
---|
278 | Package (0x04) {0x000EFFFF, 0x02, 0x00, 0x10,},
|
---|
279 | Package (0x04) {0x000EFFFF, 0x03, 0x00, 0x11,},
|
---|
280 | Package (0x04) {0x000FFFFF, 0x00, 0x00, 0x17,},
|
---|
281 | Package (0x04) {0x000FFFFF, 0x01, 0x00, 0x10,},
|
---|
282 | Package (0x04) {0x000FFFFF, 0x02, 0x00, 0x11,},
|
---|
283 | Package (0x04) {0x000FFFFF, 0x03, 0x00, 0x12,}
|
---|
284 | })
|
---|
285 |
|
---|
286 | // Possible resource settings for PCI link A
|
---|
287 | Name (PRSA, ResourceTemplate ()
|
---|
288 | {
|
---|
289 | IRQ (Level, ActiveLow, Shared) {5,9,10,11}
|
---|
290 | })
|
---|
291 |
|
---|
292 | // Possible resource settings for PCI link B
|
---|
293 | Name (PRSB, ResourceTemplate ()
|
---|
294 | {
|
---|
295 | IRQ (Level, ActiveLow, Shared) {5,9,10,11}
|
---|
296 | })
|
---|
297 |
|
---|
298 | // Possible resource settings for PCI link C
|
---|
299 | Name (PRSC, ResourceTemplate ()
|
---|
300 | {
|
---|
301 | IRQ (Level, ActiveLow, Shared) {5,9,10,11}
|
---|
302 | })
|
---|
303 |
|
---|
304 | // Possible resource settings for PCI link D
|
---|
305 | Name (PRSD, ResourceTemplate ()
|
---|
306 | {
|
---|
307 | IRQ (Level, ActiveLow, Shared) {5,9,10,11}
|
---|
308 | })
|
---|
309 |
|
---|
310 | // PCI bus 0
|
---|
311 | Device (PCI0)
|
---|
312 | {
|
---|
313 | Name (_HID, EisaId ("PNP0A03"))
|
---|
314 | Name (_ADR, 0x00) // address
|
---|
315 | Name (_BBN, 0x00) // base bus adddress
|
---|
316 | Name (_UID, 0x00)
|
---|
317 |
|
---|
318 | // Method that returns routing table
|
---|
319 | Method (_PRT, 0, NotSerialized)
|
---|
320 | {
|
---|
321 | if (LEqual (LAnd (PICM, UIOA), Zero)) {
|
---|
322 | DBG ("RETURNING PIC\n")
|
---|
323 | Store (0x00, \_SB.PCI0.SBRG.APDE)
|
---|
324 | Store (0x00, \_SB.PCI0.SBRG.APAD)
|
---|
325 | Return (PR00)
|
---|
326 | }
|
---|
327 | else {
|
---|
328 | DBG ("RETURNING APIC\n")
|
---|
329 | Store (0xbe, \_SB.PCI0.SBRG.APDE)
|
---|
330 | Store (0xef, \_SB.PCI0.SBRG.APAD)
|
---|
331 | Return (PR01)
|
---|
332 | }
|
---|
333 | }
|
---|
334 |
|
---|
335 | Device (SBRG)
|
---|
336 | {
|
---|
337 | // Address of the PIIX3 (device 1 function 0)
|
---|
338 | Name (_ADR, 0x00010000)
|
---|
339 | OperationRegion (PCIC, PCI_Config, 0x00, 0xff)
|
---|
340 |
|
---|
341 | Field (PCIC, ByteAcc, NoLock, Preserve)
|
---|
342 | {
|
---|
343 | Offset (0xad),
|
---|
344 | APAD, 8,
|
---|
345 | Offset (0xde),
|
---|
346 | APDE, 8,
|
---|
347 | }
|
---|
348 |
|
---|
349 | // Keyboard device
|
---|
350 | Device (PS2K)
|
---|
351 | {
|
---|
352 | Name (_HID, EisaId ("PNP0303"))
|
---|
353 | Method (_STA, 0, NotSerialized)
|
---|
354 | {
|
---|
355 | Return (0x0F)
|
---|
356 | }
|
---|
357 |
|
---|
358 | Name (_CRS, ResourceTemplate ()
|
---|
359 | {
|
---|
360 | IO (Decode16, 0x0060, 0x0060, 0x00, 0x01)
|
---|
361 | IO (Decode16, 0x0064, 0x0064, 0x00, 0x01)
|
---|
362 | IRQNoFlags () {1}
|
---|
363 | })
|
---|
364 | }
|
---|
365 |
|
---|
366 | // DMA Controller
|
---|
367 | Device (DMAC)
|
---|
368 | {
|
---|
369 | Name (_HID, EisaId ("PNP0200"))
|
---|
370 | Name (_CRS, ResourceTemplate ()
|
---|
371 | {
|
---|
372 | IO (Decode16, 0x0000, 0x0000, 0x01, 0x10)
|
---|
373 | IO (Decode16, 0x0080, 0x0080, 0x01, 0x10)
|
---|
374 | IO (Decode16, 0x00C0, 0x00C0, 0x01, 0x20)
|
---|
375 | DMA (Compatibility, BusMaster, Transfer8_16) {4}
|
---|
376 | })
|
---|
377 | }
|
---|
378 |
|
---|
379 | // Floppy disk controller
|
---|
380 | Device (FDC0)
|
---|
381 | {
|
---|
382 | Name (_HID, EisaId ("PNP0700"))
|
---|
383 |
|
---|
384 | // Current resource settings
|
---|
385 | Name (_CRS, ResourceTemplate ()
|
---|
386 | {
|
---|
387 | IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
|
---|
388 | IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
|
---|
389 | IRQNoFlags () {6}
|
---|
390 | DMA (Compatibility, NotBusMaster, Transfer8) {2}
|
---|
391 | })
|
---|
392 |
|
---|
393 | // Possible resource settings
|
---|
394 | Name (_PRS, ResourceTemplate ()
|
---|
395 | {
|
---|
396 | IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
|
---|
397 | IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
|
---|
398 | IRQNoFlags () {6}
|
---|
399 | DMA (Compatibility, NotBusMaster, Transfer8) {2}
|
---|
400 | })
|
---|
401 |
|
---|
402 | }
|
---|
403 |
|
---|
404 | // Mouse device
|
---|
405 | Device (PS2M)
|
---|
406 | {
|
---|
407 | Name (_HID, EisaId ("PNP0F03"))
|
---|
408 | Method (_STA, 0, NotSerialized)
|
---|
409 | {
|
---|
410 | Return (0x0F)
|
---|
411 | }
|
---|
412 |
|
---|
413 | Name (_CRS, ResourceTemplate ()
|
---|
414 | {
|
---|
415 | IO (Decode16, 0x0060, 0x0060, 0x00, 0x01)
|
---|
416 | IO (Decode16, 0x0064, 0x0064, 0x00, 0x01)
|
---|
417 | IRQNoFlags () {12}
|
---|
418 | })
|
---|
419 | }
|
---|
420 | }
|
---|
421 |
|
---|
422 | // Control method battery
|
---|
423 | Device (BAT0)
|
---|
424 | {
|
---|
425 | Name (_HID, EisaId ("PNP0C0A"))
|
---|
426 | Name (_UID, 0x00)
|
---|
427 |
|
---|
428 | Scope (\_GPE)
|
---|
429 | {
|
---|
430 | // GPE bit 0 handler
|
---|
431 | // GPE.0 must be set and SCI raised when
|
---|
432 | // battery info changed and _BIF must be
|
---|
433 | // re-evaluated
|
---|
434 | Method (_L00, 0, NotSerialized)
|
---|
435 | {
|
---|
436 | Notify (\_SB.PCI0.BAT0, 0x81)
|
---|
437 | }
|
---|
438 | }
|
---|
439 |
|
---|
440 | OperationRegion (CBAT, SystemIO, 0x4040, 0x08)
|
---|
441 | Field (CBAT, DwordAcc, NoLock, Preserve)
|
---|
442 | {
|
---|
443 | IDX0, 32,
|
---|
444 | DAT0, 32,
|
---|
445 | }
|
---|
446 |
|
---|
447 | IndexField (IDX0, DAT0, DwordAcc, NoLock, Preserve)
|
---|
448 | {
|
---|
449 | STAT, 32,
|
---|
450 | PRAT, 32,
|
---|
451 | RCAP, 32,
|
---|
452 | PVOL, 32,
|
---|
453 |
|
---|
454 | UNIT, 32,
|
---|
455 | DCAP, 32,
|
---|
456 | LFCP, 32,
|
---|
457 | BTEC, 32,
|
---|
458 | DVOL, 32,
|
---|
459 | DWRN, 32,
|
---|
460 | DLOW, 32,
|
---|
461 | GRN1, 32,
|
---|
462 | GRN2, 32,
|
---|
463 |
|
---|
464 | BSTA, 32,
|
---|
465 | APSR, 32,
|
---|
466 | }
|
---|
467 |
|
---|
468 | Method (_STA, 0, NotSerialized)
|
---|
469 | {
|
---|
470 | return (BSTA)
|
---|
471 | }
|
---|
472 |
|
---|
473 | Name (PBIF, Package ()
|
---|
474 | {
|
---|
475 | 0x01, // Power unit, 1 - mA
|
---|
476 | 0x7fffffff, // Design capacity
|
---|
477 | 0x7fffffff, // Last full charge capacity
|
---|
478 | 0x00, // Battery technology
|
---|
479 | 0xffffffff, // Design voltage
|
---|
480 | 0x00, // Design capacity of Warning
|
---|
481 | 0x00, // Design capacity of Low
|
---|
482 | 0x04, // Battery capacity granularity 1
|
---|
483 | 0x04, // Battery capacity granularity 2
|
---|
484 | "1", // Model number
|
---|
485 | "0", // Serial number
|
---|
486 | "VBOX", // Battery type
|
---|
487 | "innotek" // OEM Information
|
---|
488 | })
|
---|
489 |
|
---|
490 | Name (PBST, Package () {
|
---|
491 | 0, // Battery state
|
---|
492 | 0x7fffffff, // Battery present rate
|
---|
493 | 0x7fffffff, // Battery remaining capacity
|
---|
494 | 0x7fffffff // Battery present voltage
|
---|
495 | })
|
---|
496 |
|
---|
497 | // Battery information
|
---|
498 | Method (_BIF, 0, NotSerialized)
|
---|
499 | {
|
---|
500 | Store (UNIT, Index (PBIF, 0,))
|
---|
501 | Store (DCAP, Index (PBIF, 1,))
|
---|
502 | Store (LFCP, Index (PBIF, 2,))
|
---|
503 | Store (BTEC, Index (PBIF, 3,))
|
---|
504 | Store (DVOL, Index (PBIF, 4,))
|
---|
505 | Store (DWRN, Index (PBIF, 5,))
|
---|
506 | Store (DLOW, Index (PBIF, 6,))
|
---|
507 | Store (GRN1, Index (PBIF, 7,))
|
---|
508 | Store (GRN2, Index (PBIF, 8,))
|
---|
509 |
|
---|
510 | DBG ("_BIF:\n")
|
---|
511 | HEX4 (DerefOf (Index (PBIF, 0,)))
|
---|
512 | HEX4 (DerefOf (Index (PBIF, 1,)))
|
---|
513 | HEX4 (DerefOf (Index (PBIF, 2,)))
|
---|
514 | HEX4 (DerefOf (Index (PBIF, 3,)))
|
---|
515 | HEX4 (DerefOf (Index (PBIF, 4,)))
|
---|
516 | HEX4 (DerefOf (Index (PBIF, 5,)))
|
---|
517 | HEX4 (DerefOf (Index (PBIF, 6,)))
|
---|
518 | HEX4 (DerefOf (Index (PBIF, 7,)))
|
---|
519 | HEX4 (DerefOf (Index (PBIF, 8,)))
|
---|
520 |
|
---|
521 | return (PBIF)
|
---|
522 | }
|
---|
523 |
|
---|
524 | // Battery status
|
---|
525 | Method (_BST, 0, NotSerialized)
|
---|
526 | {
|
---|
527 | Store (STAT, Index (PBST, 0,))
|
---|
528 | Store (PRAT, Index (PBST, 1,))
|
---|
529 | Store (RCAP, Index (PBST, 2,))
|
---|
530 | Store (PVOL, Index (PBST, 3,))
|
---|
531 | /*
|
---|
532 | DBG ("_BST:\n")
|
---|
533 | HEX4 (DerefOf (Index (PBST, 0,)))
|
---|
534 | HEX4 (DerefOf (Index (PBST, 1,)))
|
---|
535 | HEX4 (DerefOf (Index (PBST, 2,)))
|
---|
536 | HEX4 (DerefOf (Index (PBST, 3,)))
|
---|
537 | */
|
---|
538 | return (PBST)
|
---|
539 | }
|
---|
540 | }
|
---|
541 |
|
---|
542 | Device (AC)
|
---|
543 | {
|
---|
544 | Name (_HID, "ACPI0003")
|
---|
545 | Name (_UID, 0x00)
|
---|
546 | Name (_PCL, Package (0x01)
|
---|
547 | {
|
---|
548 | \_SB
|
---|
549 | })
|
---|
550 |
|
---|
551 | Method (_PSR, 0, NotSerialized)
|
---|
552 | {
|
---|
553 | // DBG ("_PSR:\n")
|
---|
554 | // HEX4 (\_SB.PCI0.BAT0.APSR)
|
---|
555 | return (\_SB.PCI0.BAT0.APSR)
|
---|
556 | }
|
---|
557 |
|
---|
558 | Method (_STA, 0, NotSerialized)
|
---|
559 | {
|
---|
560 | return (0x0f)
|
---|
561 | }
|
---|
562 | }
|
---|
563 | }
|
---|
564 | }
|
---|
565 |
|
---|
566 | Scope (\_SB)
|
---|
567 | {
|
---|
568 | Scope (PCI0)
|
---|
569 | {
|
---|
570 | // PCI0 current resource settings
|
---|
571 | Name (CRS, ResourceTemplate ()
|
---|
572 | {
|
---|
573 | WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
|
---|
574 | 0x0000,
|
---|
575 | 0x0000,
|
---|
576 | 0x00FF,
|
---|
577 | 0x0000,
|
---|
578 | 0x0100)
|
---|
579 | IO (Decode16, 0x0CF8, 0x0CF8, 0x01, 0x08)
|
---|
580 | WordIO (ResourceProducer, MinFixed, MaxFixed,
|
---|
581 | PosDecode, EntireRange,
|
---|
582 | 0x0000,
|
---|
583 | 0x0000,
|
---|
584 | 0x0CF7,
|
---|
585 | 0x0000,
|
---|
586 | 0x0CF8)
|
---|
587 | WordIO (ResourceProducer, MinFixed, MaxFixed,
|
---|
588 | PosDecode, EntireRange,
|
---|
589 | 0x0000,
|
---|
590 | 0x0D00,
|
---|
591 | 0xFFFF,
|
---|
592 | 0x0000,
|
---|
593 | 0xF300)
|
---|
594 |
|
---|
595 | /* Taken from ACPI faq (with some modifications) */
|
---|
596 | DwordMemory( // descriptor for video RAM behind ISA bus
|
---|
597 | ResourceProducer, // bit 0 of general flags is 0
|
---|
598 | PosDecode,
|
---|
599 | MinFixed, // Range is fixed
|
---|
600 | MaxFixed, // Range is Fixed
|
---|
601 | Cacheable,
|
---|
602 | ReadWrite,
|
---|
603 | 0x00000000, // Granularity
|
---|
604 | 0x000a0000, // Min
|
---|
605 | 0x000bffff, // Max
|
---|
606 | 0x00000000, // Translation
|
---|
607 | 0x00020000 // Range Length
|
---|
608 | )
|
---|
609 |
|
---|
610 | DwordMemory( // Consumed-and-produced resource
|
---|
611 | // (all of memory space)
|
---|
612 | ResourceProducer, // bit 0 of general flags is 0
|
---|
613 | PosDecode, // positive Decode
|
---|
614 | MinFixed, // Range is fixed
|
---|
615 | MaxFixed, // Range is fixed
|
---|
616 | Cacheable,
|
---|
617 | ReadWrite,
|
---|
618 | 0x00000000, // Granularity
|
---|
619 | 0x00000000, // Min (calculated dynamically)
|
---|
620 |
|
---|
621 | 0xffdfffff, // Max = 4GB - 2MB
|
---|
622 | 0x00000000, // Translation
|
---|
623 | 0xdfdfffff, // Range Length (calculated
|
---|
624 | // dynamically)
|
---|
625 | , // Optional field left blank
|
---|
626 | , // Optional field left blank
|
---|
627 | MEM3 // Name declaration for this
|
---|
628 | // descriptor
|
---|
629 | )
|
---|
630 | })
|
---|
631 |
|
---|
632 | Method (_CRS, 0, NotSerialized)
|
---|
633 | {
|
---|
634 | CreateDwordField (CRS, \_SB.PCI0.MEM3._MIN, RAMT)
|
---|
635 | CreateDwordField (CRS, \_SB.PCI0.MEM3._LEN, RAMR)
|
---|
636 | Store (MEML, RAMT)
|
---|
637 | Subtract (0xffe00000, RAMT, RAMR)
|
---|
638 | Return (CRS)
|
---|
639 | }
|
---|
640 | }
|
---|
641 | }
|
---|
642 |
|
---|
643 | Scope (\_SB)
|
---|
644 | {
|
---|
645 | // Fields within PIIX3 configuration[0x60..0x63] with
|
---|
646 | // IRQ mappings
|
---|
647 | Field (\_SB.PCI0.SBRG.PCIC, ByteAcc, NoLock, Preserve)
|
---|
648 | {
|
---|
649 | Offset (0x60),
|
---|
650 | PIRA, 8,
|
---|
651 | PIRB, 8,
|
---|
652 | PIRC, 8,
|
---|
653 | PIRD, 8
|
---|
654 | }
|
---|
655 |
|
---|
656 | Name (BUFA, ResourceTemplate ()
|
---|
657 | {
|
---|
658 | IRQ (Level, ActiveLow, Shared) {15}
|
---|
659 | })
|
---|
660 | CreateWordField (BUFA, 0x01, ICRS)
|
---|
661 |
|
---|
662 | // Generic status of IRQ routing entry
|
---|
663 | Method (LSTA, 1, NotSerialized)
|
---|
664 | {
|
---|
665 | And (Arg0, 0x80, Local0)
|
---|
666 | // DBG ("LSTA: ")
|
---|
667 | // HEX (Arg0)
|
---|
668 | If (Local0)
|
---|
669 | {
|
---|
670 | Return (0x09)
|
---|
671 | }
|
---|
672 | Else
|
---|
673 | {
|
---|
674 | Return (0x0B)
|
---|
675 | }
|
---|
676 | }
|
---|
677 |
|
---|
678 | // Generic "current resource settings" for routing entry
|
---|
679 | Method (LCRS, 1, NotSerialized)
|
---|
680 | {
|
---|
681 | And (Arg0, 0x0F, Local0)
|
---|
682 | ShiftLeft (0x01, Local0, ICRS)
|
---|
683 | // DBG ("LCRS: ")
|
---|
684 | // HEX (ICRS)
|
---|
685 | Return (BUFA)
|
---|
686 | }
|
---|
687 |
|
---|
688 | // Generic "set resource settings" for routing entry
|
---|
689 | Method (LSRS, 1, NotSerialized)
|
---|
690 | {
|
---|
691 | CreateWordField (Arg0, 0x01, ISRS)
|
---|
692 | FindSetRightBit (ISRS, Local0)
|
---|
693 | Return (Decrement (Local0))
|
---|
694 | }
|
---|
695 |
|
---|
696 | // Generic "disable" for routing entry
|
---|
697 | Method (LDIS, 1, NotSerialized)
|
---|
698 | {
|
---|
699 | Return (Or (Arg0, 0x80))
|
---|
700 | }
|
---|
701 |
|
---|
702 | // Link A
|
---|
703 | Device (LNKA)
|
---|
704 | {
|
---|
705 | Name (_HID, EisaId ("PNP0C0F"))
|
---|
706 | Name (_UID, 0x01)
|
---|
707 |
|
---|
708 | // Status
|
---|
709 | Method (_STA, 0, NotSerialized)
|
---|
710 | {
|
---|
711 | DBG ("LNKA._STA\n")
|
---|
712 | Return (LSTA (PIRA))
|
---|
713 | }
|
---|
714 |
|
---|
715 | // Possible resource settings
|
---|
716 | Method (_PRS, 0, NotSerialized)
|
---|
717 | {
|
---|
718 | DBG ("LNKA._PRS\n")
|
---|
719 | Return (PRSA)
|
---|
720 | }
|
---|
721 |
|
---|
722 | // Disable
|
---|
723 | Method (_DIS, 0, NotSerialized)
|
---|
724 | {
|
---|
725 | DBG ("LNKA._DIS\n")
|
---|
726 | Store (LDIS (PIRA), PIRA)
|
---|
727 | }
|
---|
728 |
|
---|
729 | // Current resource settings
|
---|
730 | Method (_CRS, 0, NotSerialized)
|
---|
731 | {
|
---|
732 | DBG ("LNKA._CRS\n")
|
---|
733 | Return (LCRS (PIRA))
|
---|
734 | }
|
---|
735 |
|
---|
736 | // Set resource settings
|
---|
737 | Method (_SRS, 1, NotSerialized)
|
---|
738 | {
|
---|
739 | DBG ("LNKA._SRS: ")
|
---|
740 | HEX (LSRS (Arg0))
|
---|
741 | Store (LSRS (Arg0), PIRA)
|
---|
742 | }
|
---|
743 | }
|
---|
744 |
|
---|
745 | // Link B
|
---|
746 | Device (LNKB)
|
---|
747 | {
|
---|
748 | Name (_HID, EisaId ("PNP0C0F"))
|
---|
749 | Name (_UID, 0x02)
|
---|
750 | Method (_STA, 0, NotSerialized)
|
---|
751 | {
|
---|
752 | // DBG ("LNKB._STA\n")
|
---|
753 | Return (LSTA (PIRB))
|
---|
754 | }
|
---|
755 |
|
---|
756 | Method (_PRS, 0, NotSerialized)
|
---|
757 | {
|
---|
758 | // DBG ("LNKB._PRS\n")
|
---|
759 | Return (PRSB)
|
---|
760 | }
|
---|
761 |
|
---|
762 | Method (_DIS, 0, NotSerialized)
|
---|
763 | {
|
---|
764 | // DBG ("LNKB._DIS\n")
|
---|
765 | Store (LDIS (PIRB), PIRB)
|
---|
766 | }
|
---|
767 |
|
---|
768 | Method (_CRS, 0, NotSerialized)
|
---|
769 | {
|
---|
770 | // DBG ("LNKB._CRS\n")
|
---|
771 | Return (LCRS (PIRB))
|
---|
772 | }
|
---|
773 |
|
---|
774 | Method (_SRS, 1, NotSerialized)
|
---|
775 | {
|
---|
776 | DBG ("LNKB._SRS: ")
|
---|
777 | HEX (LSRS (Arg0))
|
---|
778 | Store (LSRS (Arg0), PIRB)
|
---|
779 | }
|
---|
780 | }
|
---|
781 |
|
---|
782 | // Link C
|
---|
783 | Device (LNKC)
|
---|
784 | {
|
---|
785 | Name (_HID, EisaId ("PNP0C0F"))
|
---|
786 | Name (_UID, 0x03)
|
---|
787 | Method (_STA, 0, NotSerialized)
|
---|
788 | {
|
---|
789 | // DBG ("LNKC._STA\n")
|
---|
790 | Return (LSTA (PIRC))
|
---|
791 | }
|
---|
792 |
|
---|
793 | Method (_PRS, 0, NotSerialized)
|
---|
794 | {
|
---|
795 | // DBG ("LNKC._PRS\n")
|
---|
796 | Return (PRSC)
|
---|
797 | }
|
---|
798 |
|
---|
799 | Method (_DIS, 0, NotSerialized)
|
---|
800 | {
|
---|
801 | // DBG ("LNKC._DIS\n")
|
---|
802 | Store (LDIS (PIRC), PIRC)
|
---|
803 | }
|
---|
804 |
|
---|
805 | Method (_CRS, 0, NotSerialized)
|
---|
806 | {
|
---|
807 | // DBG ("LNKC._CRS\n")
|
---|
808 | Return (LCRS (PIRC))
|
---|
809 | }
|
---|
810 |
|
---|
811 | Method (_SRS, 1, NotSerialized)
|
---|
812 | {
|
---|
813 | DBG ("LNKC._SRS: ")
|
---|
814 | HEX (LSRS (Arg0))
|
---|
815 | Store (LSRS (Arg0), PIRC)
|
---|
816 | }
|
---|
817 | }
|
---|
818 |
|
---|
819 | // Link D
|
---|
820 | Device (LNKD)
|
---|
821 | {
|
---|
822 | Name (_HID, EisaId ("PNP0C0F"))
|
---|
823 | Name (_UID, 0x04)
|
---|
824 | Method (_STA, 0, NotSerialized)
|
---|
825 | {
|
---|
826 | // DBG ("LNKD._STA\n")
|
---|
827 | Return (LSTA (PIRD))
|
---|
828 | }
|
---|
829 |
|
---|
830 | Method (_PRS, 0, NotSerialized)
|
---|
831 | {
|
---|
832 | // DBG ("LNKD._PRS\n")
|
---|
833 | Return (PRSD)
|
---|
834 | }
|
---|
835 |
|
---|
836 | Method (_DIS, 0, NotSerialized)
|
---|
837 | {
|
---|
838 | // DBG ("LNKD._DIS\n")
|
---|
839 | Store (LDIS (PIRA), PIRD)
|
---|
840 | }
|
---|
841 |
|
---|
842 | Method (_CRS, 0, NotSerialized)
|
---|
843 | {
|
---|
844 | // DBG ("LNKD._CRS\n")
|
---|
845 | Return (LCRS (PIRD))
|
---|
846 | }
|
---|
847 |
|
---|
848 | Method (_SRS, 1, NotSerialized)
|
---|
849 | {
|
---|
850 | DBG ("LNKD._SRS: ")
|
---|
851 | HEX (LSRS (Arg0))
|
---|
852 | Store (LSRS (Arg0), PIRD)
|
---|
853 | }
|
---|
854 | }
|
---|
855 | }
|
---|
856 |
|
---|
857 | // Sx states
|
---|
858 | Name (_S0, Package (2) {
|
---|
859 | 0x00,
|
---|
860 | 0x00,
|
---|
861 | })
|
---|
862 |
|
---|
863 | Name (_S5, Package (2) {
|
---|
864 | 0x05,
|
---|
865 | 0x05,
|
---|
866 | })
|
---|
867 |
|
---|
868 | Method (_PTS, 1, NotSerialized)
|
---|
869 | {
|
---|
870 | DBG ("Prepare to sleep: ")
|
---|
871 | HEX (Arg0)
|
---|
872 | }
|
---|
873 | }
|
---|
874 |
|
---|
875 | /*
|
---|
876 | * Local Variables:
|
---|
877 | * comment-start: "//"
|
---|
878 | * End:
|
---|
879 | */
|
---|