VirtualBox

source: vbox/trunk/src/VBox/Devices/PC/vbox.dsl@ 16684

Last change on this file since 16684 was 16170, checked in by vboxsync, 16 years ago

More device work

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
File size: 38.4 KB
Line 
1// $Id: vbox.dsl 16170 2009-01-22 14:40:08Z vboxsync $
2/// @file
3//
4// VirtualBox ACPI
5//
6// Copyright (C) 2006-2007 Sun Microsystems, Inc.
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
17DefinitionBlock ("DSDT.aml", "DSDT", 1, "VBOX ", "VBOXBIOS", 2)
18{
19 // Declare debugging ports withing SystemIO
20 OperationRegion(DBG0, SystemIO, 0x3000, 4)
21
22 // Writes to this field Will dump hex char
23 Field (DBG0, ByteAcc, NoLock, Preserve)
24 {
25 DHE1, 8,
26 }
27
28 // Writes to this field Will dump hex word
29 Field (DBG0, WordAcc, NoLock, Preserve)
30 {
31 DHE2, 16,
32 }
33
34 // Writes to this field Will dump hex double word
35 Field (DBG0, DWordAcc, NoLock, Preserve)
36 {
37 DHE4, 32,
38 }
39
40 // Writes to this field will dump ascii char
41 Field (DBG0, ByteAcc, NoLock, Preserve)
42 {
43 Offset (1),
44 DCHR, 8
45 }
46
47 // Shortcuts
48 Method(HEX, 1)
49 {
50 Store (Arg0, DHE1)
51 }
52
53 Method(HEX2, 1)
54 {
55 Store (Arg0, DHE2)
56 }
57
58 Method(HEX4, 1)
59 {
60 Store (Arg0, DHE4)
61 }
62
63 // Code from Microsoft sample
64 // http://www.microsoft.com/whdc/system/pnppwr/powermgmt/_OSI-method.mspx
65
66 //
67 // SLEN(Str) - Returns the length of Str (excluding NULL).
68 //
69 Method(SLEN, 1)
70 {
71 //
72 // Note: The caller must make sure that the argument is a string object.
73 //
74 Store(Arg0, Local0)
75 Return(Sizeof(Local0))
76 }
77
78 Method(S2BF, 1)
79 {
80 //
81 // Note: The caller must make sure that the argument is a string object.
82 //
83 // Local0 contains length of string + NULL.
84 //
85 Store(Arg0, Local0)
86 Add(SLEN(Local0), One, Local0)
87 //
88 // Convert the string object into a buffer object.
89 //
90 Name(BUFF, Buffer(Local0) {})
91 Store(Arg0, BUFF)
92 Return(BUFF)
93 }
94
95 // Convert ASCII string to buffer and store it's contents (char by
96 // char) into DCHR (thus possibly writing the string to console)
97 Method (\DBG, 1, NotSerialized)
98 {
99 Store(Arg0, Local0)
100 Store(S2BF (Local0), Local1)
101 Store(SizeOf (Local1), Local0)
102 Decrement (Local0)
103 Store(Zero, Local2)
104 While (Local0)
105 {
106 Decrement (Local0)
107 Store (DerefOf (Index (Local1, Local2)), DCHR)
108 Increment (Local2)
109 }
110 }
111
112 Name(PICM, 0)
113 Method(_PIC, 1)
114 {
115 DBG ("Pic mode: ")
116 HEX4 (Arg0)
117 Store (Arg0, PICM)
118 }
119
120 // Processor object
121 // #1463: Showing the CPU can make the guest do bad things on it like SpeedStep.
122 // In this case, XP SP2 contains this buggy Intelppm.sys driver which wants to mess
123 // with SpeedStep if it finds a CPU object and when it finds out that it can't, it
124 // tries to unload and crashes (MS probably never tested this code path).
125// Scope (\_PR)
126// {
127// Processor (CPU1, 0x01, 0x00000000, 0x00) {}
128// }
129
130 Scope (\_SB)
131 {
132 OperationRegion (SYSI, SystemIO, 0x4048, 0x08)
133 Field (SYSI, DwordAcc, NoLock, Preserve)
134 {
135 IDX0, 32,
136 DAT0, 32,
137 }
138
139 IndexField (IDX0, DAT0, DwordAcc, NoLock, Preserve)
140 {
141 MEML, 32,
142 UIOA, 32,
143 UHPT, 32,
144 USMC, 32,
145 UFDC, 32,
146 Offset (0x80),
147 ININ, 32,
148 Offset (0x200),
149 VAIN, 32,
150 }
151
152 Method (_INI, 0, NotSerialized)
153 {
154 Store (0xbadc0de, VAIN)
155 DBG ("MEML: ")
156 HEX4 (MEML)
157 DBG ("UIOA: ")
158 HEX4 (UIOA)
159 DBG ("UHPT: ")
160 HEX4 (UHPT)
161 DBG ("USMC: ")
162 HEX4 (USMC)
163 DBG ("UFDC: ")
164 HEX4 (UFDC)
165 }
166
167 // PCI PIC IRQ Routing table
168 // Must match pci.c:pci_slot_get_pirq
169 Name (PR00, Package ()
170 {
171 Package (0x04) {0x0002FFFF, 0x00, LNKB, 0x00,},
172 Package (0x04) {0x0002FFFF, 0x01, LNKC, 0x00,},
173 Package (0x04) {0x0002FFFF, 0x02, LNKD, 0x00,},
174 Package (0x04) {0x0002FFFF, 0x03, LNKA, 0x00,},
175
176 Package (0x04) {0x0003FFFF, 0x00, LNKC, 0x00,},
177 Package (0x04) {0x0003FFFF, 0x01, LNKD, 0x00,},
178 Package (0x04) {0x0003FFFF, 0x02, LNKA, 0x00,},
179 Package (0x04) {0x0003FFFF, 0x03, LNKB, 0x00,},
180
181 Package (0x04) {0x0004FFFF, 0x00, LNKD, 0x00,},
182 Package (0x04) {0x0004FFFF, 0x01, LNKA, 0x00,},
183 Package (0x04) {0x0004FFFF, 0x02, LNKB, 0x00,},
184 Package (0x04) {0x0004FFFF, 0x03, LNKC, 0x00,},
185
186 Package (0x04) {0x0005FFFF, 0x00, LNKA, 0x00,},
187 Package (0x04) {0x0005FFFF, 0x01, LNKB, 0x00,},
188 Package (0x04) {0x0005FFFF, 0x02, LNKC, 0x00,},
189 Package (0x04) {0x0005FFFF, 0x03, LNKD, 0x00,},
190
191 Package (0x04) {0x0006FFFF, 0x00, LNKB, 0x00,},
192 Package (0x04) {0x0006FFFF, 0x01, LNKC, 0x00,},
193 Package (0x04) {0x0006FFFF, 0x02, LNKD, 0x00,},
194 Package (0x04) {0x0006FFFF, 0x03, LNKA, 0x00,},
195
196 Package (0x04) {0x0007FFFF, 0x00, LNKC, 0x00,},
197 Package (0x04) {0x0007FFFF, 0x01, LNKD, 0x00,},
198 Package (0x04) {0x0007FFFF, 0x02, LNKA, 0x00,},
199 Package (0x04) {0x0007FFFF, 0x03, LNKB, 0x00,},
200
201 Package (0x04) {0x0008FFFF, 0x00, LNKD, 0x00,},
202 Package (0x04) {0x0008FFFF, 0x01, LNKA, 0x00,},
203 Package (0x04) {0x0008FFFF, 0x02, LNKB, 0x00,},
204 Package (0x04) {0x0008FFFF, 0x03, LNKC, 0x00,},
205
206 Package (0x04) {0x0009FFFF, 0x00, LNKA, 0x00,},
207 Package (0x04) {0x0009FFFF, 0x01, LNKB, 0x00,},
208 Package (0x04) {0x0009FFFF, 0x02, LNKC, 0x00,},
209 Package (0x04) {0x0009FFFF, 0x03, LNKD, 0x00,},
210
211 Package (0x04) {0x000AFFFF, 0x00, LNKB, 0x00,},
212 Package (0x04) {0x000AFFFF, 0x01, LNKC, 0x00,},
213 Package (0x04) {0x000AFFFF, 0x02, LNKD, 0x00,},
214 Package (0x04) {0x000AFFFF, 0x03, LNKA, 0x00,},
215
216 Package (0x04) {0x000BFFFF, 0x00, LNKC, 0x00,},
217 Package (0x04) {0x000BFFFF, 0x01, LNKD, 0x00,},
218 Package (0x04) {0x000BFFFF, 0x02, LNKA, 0x00,},
219 Package (0x04) {0x000BFFFF, 0x03, LNKB, 0x00,},
220
221 Package (0x04) {0x000CFFFF, 0x00, LNKD, 0x00,},
222 Package (0x04) {0x000CFFFF, 0x01, LNKA, 0x00,},
223 Package (0x04) {0x000CFFFF, 0x02, LNKB, 0x00,},
224 Package (0x04) {0x000CFFFF, 0x03, LNKC, 0x00,},
225
226 Package (0x04) {0x000DFFFF, 0x00, LNKA, 0x00,},
227 Package (0x04) {0x000DFFFF, 0x01, LNKB, 0x00,},
228 Package (0x04) {0x000DFFFF, 0x02, LNKC, 0x00,},
229 Package (0x04) {0x000DFFFF, 0x03, LNKD, 0x00,},
230
231 Package (0x04) {0x000EFFFF, 0x00, LNKB, 0x00,},
232 Package (0x04) {0x000EFFFF, 0x01, LNKC, 0x00,},
233 Package (0x04) {0x000EFFFF, 0x02, LNKD, 0x00,},
234 Package (0x04) {0x000EFFFF, 0x03, LNKA, 0x00,},
235
236 Package (0x04) {0x000FFFFF, 0x00, LNKC, 0x00,},
237 Package (0x04) {0x000FFFFF, 0x01, LNKD, 0x00,},
238 Package (0x04) {0x000FFFFF, 0x02, LNKA, 0x00,},
239 Package (0x04) {0x000FFFFF, 0x03, LNKB, 0x00,},
240
241 Package (0x04) {0x0010FFFF, 0x00, LNKD, 0x00,},
242 Package (0x04) {0x0010FFFF, 0x01, LNKA, 0x00,},
243 Package (0x04) {0x0010FFFF, 0x02, LNKB, 0x00,},
244 Package (0x04) {0x0010FFFF, 0x03, LNKC, 0x00,},
245
246 Package (0x04) {0x0011FFFF, 0x00, LNKA, 0x00,},
247 Package (0x04) {0x0011FFFF, 0x01, LNKB, 0x00,},
248 Package (0x04) {0x0011FFFF, 0x02, LNKC, 0x00,},
249 Package (0x04) {0x0011FFFF, 0x03, LNKD, 0x00,},
250
251 Package (0x04) {0x0012FFFF, 0x00, LNKB, 0x00,},
252 Package (0x04) {0x0012FFFF, 0x01, LNKC, 0x00,},
253 Package (0x04) {0x0012FFFF, 0x02, LNKD, 0x00,},
254 Package (0x04) {0x0012FFFF, 0x03, LNKA, 0x00,},
255
256 Package (0x04) {0x0013FFFF, 0x00, LNKC, 0x00,},
257 Package (0x04) {0x0013FFFF, 0x01, LNKD, 0x00,},
258 Package (0x04) {0x0013FFFF, 0x02, LNKA, 0x00,},
259 Package (0x04) {0x0013FFFF, 0x03, LNKB, 0x00,},
260
261 Package (0x04) {0x0014FFFF, 0x00, LNKD, 0x00,},
262 Package (0x04) {0x0014FFFF, 0x01, LNKA, 0x00,},
263 Package (0x04) {0x0014FFFF, 0x02, LNKB, 0x00,},
264 Package (0x04) {0x0014FFFF, 0x03, LNKC, 0x00,},
265
266 Package (0x04) {0x0015FFFF, 0x00, LNKA, 0x00,},
267 Package (0x04) {0x0015FFFF, 0x01, LNKB, 0x00,},
268 Package (0x04) {0x0015FFFF, 0x02, LNKC, 0x00,},
269 Package (0x04) {0x0015FFFF, 0x03, LNKD, 0x00,},
270
271 Package (0x04) {0x0016FFFF, 0x00, LNKB, 0x00,},
272 Package (0x04) {0x0016FFFF, 0x01, LNKC, 0x00,},
273 Package (0x04) {0x0016FFFF, 0x02, LNKD, 0x00,},
274 Package (0x04) {0x0016FFFF, 0x03, LNKA, 0x00,},
275
276 Package (0x04) {0x0017FFFF, 0x00, LNKC, 0x00,},
277 Package (0x04) {0x0017FFFF, 0x01, LNKD, 0x00,},
278 Package (0x04) {0x0017FFFF, 0x02, LNKA, 0x00,},
279 Package (0x04) {0x0017FFFF, 0x03, LNKB, 0x00,},
280
281 Package (0x04) {0x0018FFFF, 0x00, LNKD, 0x00,},
282 Package (0x04) {0x0018FFFF, 0x01, LNKA, 0x00,},
283 Package (0x04) {0x0018FFFF, 0x02, LNKB, 0x00,},
284 Package (0x04) {0x0018FFFF, 0x03, LNKC, 0x00,},
285
286 Package (0x04) {0x0019FFFF, 0x00, LNKA, 0x00,},
287 Package (0x04) {0x0019FFFF, 0x01, LNKB, 0x00,},
288 Package (0x04) {0x0019FFFF, 0x02, LNKC, 0x00,},
289 Package (0x04) {0x0019FFFF, 0x03, LNKD, 0x00,},
290
291 Package (0x04) {0x001AFFFF, 0x00, LNKB, 0x00,},
292 Package (0x04) {0x001AFFFF, 0x01, LNKC, 0x00,},
293 Package (0x04) {0x001AFFFF, 0x02, LNKD, 0x00,},
294 Package (0x04) {0x001AFFFF, 0x03, LNKA, 0x00,},
295
296 Package (0x04) {0x001BFFFF, 0x00, LNKC, 0x00,},
297 Package (0x04) {0x001BFFFF, 0x01, LNKD, 0x00,},
298 Package (0x04) {0x001BFFFF, 0x02, LNKA, 0x00,},
299 Package (0x04) {0x001BFFFF, 0x03, LNKB, 0x00,},
300
301 Package (0x04) {0x001CFFFF, 0x00, LNKD, 0x00,},
302 Package (0x04) {0x001CFFFF, 0x01, LNKA, 0x00,},
303 Package (0x04) {0x001CFFFF, 0x02, LNKB, 0x00,},
304 Package (0x04) {0x001CFFFF, 0x03, LNKC, 0x00,},
305
306 Package (0x04) {0x001DFFFF, 0x00, LNKA, 0x00,},
307 Package (0x04) {0x001DFFFF, 0x01, LNKB, 0x00,},
308 Package (0x04) {0x001DFFFF, 0x02, LNKC, 0x00,},
309 Package (0x04) {0x001DFFFF, 0x03, LNKD, 0x00,},
310
311 Package (0x04) {0x001EFFFF, 0x00, LNKB, 0x00,},
312 Package (0x04) {0x001EFFFF, 0x01, LNKC, 0x00,},
313 Package (0x04) {0x001EFFFF, 0x02, LNKD, 0x00,},
314 Package (0x04) {0x001EFFFF, 0x03, LNKA, 0x00,},
315
316 Package (0x04) {0x001FFFFF, 0x00, LNKC, 0x00,},
317 Package (0x04) {0x001FFFFF, 0x01, LNKD, 0x00,},
318 Package (0x04) {0x001FFFFF, 0x02, LNKA, 0x00,},
319 Package (0x04) {0x001FFFFF, 0x03, LNKB, 0x00,}
320 })
321
322 // PCI I/O APIC IRQ Routing table
323 // Must match pci.c:pci_slot_get_acpi_pirq
324 Name (PR01, Package ()
325 {
326 Package (0x04) {0x0002FFFF, 0x00, 0x00, 0x12,},
327 Package (0x04) {0x0002FFFF, 0x01, 0x00, 0x13,},
328 Package (0x04) {0x0002FFFF, 0x02, 0x00, 0x14,},
329 Package (0x04) {0x0002FFFF, 0x03, 0x00, 0x15,},
330
331 Package (0x04) {0x0003FFFF, 0x00, 0x00, 0x13,},
332 Package (0x04) {0x0003FFFF, 0x01, 0x00, 0x14,},
333 Package (0x04) {0x0003FFFF, 0x02, 0x00, 0x15,},
334 Package (0x04) {0x0003FFFF, 0x03, 0x00, 0x16,},
335
336 Package (0x04) {0x0004FFFF, 0x00, 0x00, 0x14,},
337 Package (0x04) {0x0004FFFF, 0x01, 0x00, 0x15,},
338 Package (0x04) {0x0004FFFF, 0x02, 0x00, 0x16,},
339 Package (0x04) {0x0004FFFF, 0x03, 0x00, 0x17,},
340
341 Package (0x04) {0x0005FFFF, 0x00, 0x00, 0x15,},
342 Package (0x04) {0x0005FFFF, 0x01, 0x00, 0x16,},
343 Package (0x04) {0x0005FFFF, 0x02, 0x00, 0x17,},
344 Package (0x04) {0x0005FFFF, 0x03, 0x00, 0x10,},
345
346 Package (0x04) {0x0006FFFF, 0x00, 0x00, 0x16,},
347 Package (0x04) {0x0006FFFF, 0x01, 0x00, 0x17,},
348 Package (0x04) {0x0006FFFF, 0x02, 0x00, 0x10,},
349 Package (0x04) {0x0006FFFF, 0x03, 0x00, 0x11,},
350
351 Package (0x04) {0x0007FFFF, 0x00, 0x00, 0x17,},
352 Package (0x04) {0x0007FFFF, 0x01, 0x00, 0x10,},
353 Package (0x04) {0x0007FFFF, 0x02, 0x00, 0x11,},
354 Package (0x04) {0x0007FFFF, 0x03, 0x00, 0x12,},
355
356 Package (0x04) {0x0008FFFF, 0x00, 0x00, 0x10,},
357 Package (0x04) {0x0008FFFF, 0x01, 0x00, 0x11,},
358 Package (0x04) {0x0008FFFF, 0x02, 0x00, 0x12,},
359 Package (0x04) {0x0008FFFF, 0x03, 0x00, 0x13,},
360
361 Package (0x04) {0x0009FFFF, 0x00, 0x00, 0x11,},
362 Package (0x04) {0x0009FFFF, 0x01, 0x00, 0x12,},
363 Package (0x04) {0x0009FFFF, 0x02, 0x00, 0x13,},
364 Package (0x04) {0x0009FFFF, 0x03, 0x00, 0x14,},
365
366 Package (0x04) {0x000AFFFF, 0x00, 0x00, 0x12,},
367 Package (0x04) {0x000AFFFF, 0x01, 0x00, 0x13,},
368 Package (0x04) {0x000AFFFF, 0x02, 0x00, 0x14,},
369 Package (0x04) {0x000AFFFF, 0x03, 0x00, 0x15,},
370
371 Package (0x04) {0x000BFFFF, 0x00, 0x00, 0x13,},
372 Package (0x04) {0x000BFFFF, 0x01, 0x00, 0x14,},
373 Package (0x04) {0x000BFFFF, 0x02, 0x00, 0x15,},
374 Package (0x04) {0x000BFFFF, 0x03, 0x00, 0x16,},
375
376 Package (0x04) {0x000CFFFF, 0x00, 0x00, 0x14,},
377 Package (0x04) {0x000CFFFF, 0x01, 0x00, 0x15,},
378 Package (0x04) {0x000CFFFF, 0x02, 0x00, 0x16,},
379 Package (0x04) {0x000CFFFF, 0x03, 0x00, 0x17,},
380
381 Package (0x04) {0x000DFFFF, 0x00, 0x00, 0x15,},
382 Package (0x04) {0x000DFFFF, 0x01, 0x00, 0x16,},
383 Package (0x04) {0x000DFFFF, 0x02, 0x00, 0x17,},
384 Package (0x04) {0x000DFFFF, 0x03, 0x00, 0x10,},
385
386 Package (0x04) {0x000EFFFF, 0x00, 0x00, 0x16,},
387 Package (0x04) {0x000EFFFF, 0x01, 0x00, 0x17,},
388 Package (0x04) {0x000EFFFF, 0x02, 0x00, 0x10,},
389 Package (0x04) {0x000EFFFF, 0x03, 0x00, 0x11,},
390
391 Package (0x04) {0x000FFFFF, 0x00, 0x00, 0x17,},
392 Package (0x04) {0x000FFFFF, 0x01, 0x00, 0x10,},
393 Package (0x04) {0x000FFFFF, 0x02, 0x00, 0x11,},
394 Package (0x04) {0x000FFFFF, 0x03, 0x00, 0x12,},
395
396 Package (0x04) {0x0010FFFF, 0x00, 0x00, 0x10,},
397 Package (0x04) {0x0010FFFF, 0x01, 0x00, 0x11,},
398 Package (0x04) {0x0010FFFF, 0x02, 0x00, 0x12,},
399 Package (0x04) {0x0010FFFF, 0x03, 0x00, 0x13,},
400
401 Package (0x04) {0x0011FFFF, 0x00, 0x00, 0x11,},
402 Package (0x04) {0x0011FFFF, 0x01, 0x00, 0x12,},
403 Package (0x04) {0x0011FFFF, 0x02, 0x00, 0x13,},
404 Package (0x04) {0x0011FFFF, 0x03, 0x00, 0x14,},
405
406 Package (0x04) {0x0012FFFF, 0x00, 0x00, 0x12,},
407 Package (0x04) {0x0012FFFF, 0x01, 0x00, 0x13,},
408 Package (0x04) {0x0012FFFF, 0x02, 0x00, 0x14,},
409 Package (0x04) {0x0012FFFF, 0x03, 0x00, 0x15,},
410
411 Package (0x04) {0x0013FFFF, 0x00, 0x00, 0x13,},
412 Package (0x04) {0x0013FFFF, 0x01, 0x00, 0x14,},
413 Package (0x04) {0x0013FFFF, 0x02, 0x00, 0x15,},
414 Package (0x04) {0x0013FFFF, 0x03, 0x00, 0x16,},
415
416 Package (0x04) {0x0014FFFF, 0x00, 0x00, 0x14,},
417 Package (0x04) {0x0014FFFF, 0x01, 0x00, 0x15,},
418 Package (0x04) {0x0014FFFF, 0x02, 0x00, 0x16,},
419 Package (0x04) {0x0014FFFF, 0x03, 0x00, 0x17,},
420
421 Package (0x04) {0x0015FFFF, 0x00, 0x00, 0x15,},
422 Package (0x04) {0x0015FFFF, 0x01, 0x00, 0x16,},
423 Package (0x04) {0x0015FFFF, 0x02, 0x00, 0x17,},
424 Package (0x04) {0x0015FFFF, 0x03, 0x00, 0x10,},
425
426 Package (0x04) {0x0016FFFF, 0x00, 0x00, 0x16,},
427 Package (0x04) {0x0016FFFF, 0x01, 0x00, 0x17,},
428 Package (0x04) {0x0016FFFF, 0x02, 0x00, 0x10,},
429 Package (0x04) {0x0016FFFF, 0x03, 0x00, 0x11,},
430
431 Package (0x04) {0x0017FFFF, 0x00, 0x00, 0x17,},
432 Package (0x04) {0x0017FFFF, 0x01, 0x00, 0x10,},
433 Package (0x04) {0x0017FFFF, 0x02, 0x00, 0x11,},
434 Package (0x04) {0x0017FFFF, 0x03, 0x00, 0x12,},
435
436 Package (0x04) {0x0018FFFF, 0x00, 0x00, 0x10,},
437 Package (0x04) {0x0018FFFF, 0x01, 0x00, 0x11,},
438 Package (0x04) {0x0018FFFF, 0x02, 0x00, 0x12,},
439 Package (0x04) {0x0018FFFF, 0x03, 0x00, 0x13,},
440
441 Package (0x04) {0x0019FFFF, 0x00, 0x00, 0x11,},
442 Package (0x04) {0x0019FFFF, 0x01, 0x00, 0x12,},
443 Package (0x04) {0x0019FFFF, 0x02, 0x00, 0x13,},
444 Package (0x04) {0x0019FFFF, 0x03, 0x00, 0x14,},
445
446 Package (0x04) {0x001AFFFF, 0x00, 0x00, 0x12,},
447 Package (0x04) {0x001AFFFF, 0x01, 0x00, 0x13,},
448 Package (0x04) {0x001AFFFF, 0x02, 0x00, 0x14,},
449 Package (0x04) {0x001AFFFF, 0x03, 0x00, 0x15,},
450
451 Package (0x04) {0x001BFFFF, 0x00, 0x00, 0x13,},
452 Package (0x04) {0x001BFFFF, 0x01, 0x00, 0x14,},
453 Package (0x04) {0x001BFFFF, 0x02, 0x00, 0x15,},
454 Package (0x04) {0x001BFFFF, 0x03, 0x00, 0x16,},
455
456 Package (0x04) {0x001CFFFF, 0x00, 0x00, 0x14,},
457 Package (0x04) {0x001CFFFF, 0x01, 0x00, 0x15,},
458 Package (0x04) {0x001CFFFF, 0x02, 0x00, 0x16,},
459 Package (0x04) {0x001CFFFF, 0x03, 0x00, 0x17,},
460
461 Package (0x04) {0x001DFFFF, 0x00, 0x00, 0x15,},
462 Package (0x04) {0x001DFFFF, 0x01, 0x00, 0x16,},
463 Package (0x04) {0x001DFFFF, 0x02, 0x00, 0x17,},
464 Package (0x04) {0x001DFFFF, 0x03, 0x00, 0x10,},
465
466 Package (0x04) {0x001EFFFF, 0x00, 0x00, 0x16,},
467 Package (0x04) {0x001EFFFF, 0x01, 0x00, 0x17,},
468 Package (0x04) {0x001EFFFF, 0x02, 0x00, 0x10,},
469 Package (0x04) {0x001EFFFF, 0x03, 0x00, 0x11,},
470
471 Package (0x04) {0x001FFFFF, 0x00, 0x00, 0x17,},
472 Package (0x04) {0x001FFFFF, 0x01, 0x00, 0x10,},
473 Package (0x04) {0x001FFFFF, 0x02, 0x00, 0x11,},
474 Package (0x04) {0x001FFFFF, 0x03, 0x00, 0x12,}
475 })
476
477 // Possible resource settings for PCI link A
478 Name (PRSA, ResourceTemplate ()
479 {
480 IRQ (Level, ActiveLow, Shared) {5,9,10,11}
481 })
482
483 // Possible resource settings for PCI link B
484 Name (PRSB, ResourceTemplate ()
485 {
486 IRQ (Level, ActiveLow, Shared) {5,9,10,11}
487 })
488
489 // Possible resource settings for PCI link C
490 Name (PRSC, ResourceTemplate ()
491 {
492 IRQ (Level, ActiveLow, Shared) {5,9,10,11}
493 })
494
495 // Possible resource settings for PCI link D
496 Name (PRSD, ResourceTemplate ()
497 {
498 IRQ (Level, ActiveLow, Shared) {5,9,10,11}
499 })
500
501 // PCI bus 0
502 Device (PCI0)
503 {
504 Name (_HID, EisaId ("PNP0A03"))
505 Name (_ADR, 0x00) // address
506 Name (_BBN, 0x00) // base bus adddress
507 Name (_UID, 0x00)
508
509 // Method that returns routing table
510 Method (_PRT, 0, NotSerialized)
511 {
512 if (LEqual (LAnd (PICM, UIOA), Zero)) {
513 DBG ("RETURNING PIC\n")
514 Store (0x00, \_SB.PCI0.SBRG.APDE)
515 Store (0x00, \_SB.PCI0.SBRG.APAD)
516 Return (PR00)
517 }
518 else {
519 DBG ("RETURNING APIC\n")
520 Store (0xbe, \_SB.PCI0.SBRG.APDE)
521 Store (0xef, \_SB.PCI0.SBRG.APAD)
522 Return (PR01)
523 }
524 }
525
526 Device (SBRG)
527 {
528 // Address of the PIIX3 (device 1 function 0)
529 Name (_ADR, 0x00010000)
530 OperationRegion (PCIC, PCI_Config, 0x00, 0xff)
531
532 Field (PCIC, ByteAcc, NoLock, Preserve)
533 {
534 Offset (0xad),
535 APAD, 8,
536 Offset (0xde),
537 APDE, 8,
538 }
539
540 // Keyboard device
541 Device (PS2K)
542 {
543 Name (_HID, EisaId ("PNP0303"))
544 Method (_STA, 0, NotSerialized)
545 {
546 Return (0x0F)
547 }
548
549 Name (_CRS, ResourceTemplate ()
550 {
551 IO (Decode16, 0x0060, 0x0060, 0x00, 0x01)
552 IO (Decode16, 0x0064, 0x0064, 0x00, 0x01)
553 IRQNoFlags () {1}
554 })
555 }
556
557 // DMA Controller
558 Device (DMAC)
559 {
560 Name (_HID, EisaId ("PNP0200"))
561 Name (_CRS, ResourceTemplate ()
562 {
563 IO (Decode16, 0x0000, 0x0000, 0x01, 0x10)
564 IO (Decode16, 0x0080, 0x0080, 0x01, 0x10)
565 IO (Decode16, 0x00C0, 0x00C0, 0x01, 0x20)
566 DMA (Compatibility, BusMaster, Transfer8_16) {4}
567 })
568 }
569
570 // Floppy disk controller
571 Device (FDC0)
572 {
573 Name (_HID, EisaId ("PNP0700"))
574
575 Method (_STA, 0, NotSerialized)
576 {
577 Return (UFDC)
578 }
579
580 // Current resource settings
581 Name (_CRS, ResourceTemplate ()
582 {
583 IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
584 IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
585 IRQNoFlags () {6}
586 DMA (Compatibility, NotBusMaster, Transfer8) {2}
587 })
588
589 // Possible resource settings
590 Name (_PRS, ResourceTemplate ()
591 {
592 IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
593 IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
594 IRQNoFlags () {6}
595 DMA (Compatibility, NotBusMaster, Transfer8) {2}
596 })
597
598 }
599
600 // Mouse device
601 Device (PS2M)
602 {
603 Name (_HID, EisaId ("PNP0F03"))
604 Method (_STA, 0, NotSerialized)
605 {
606 Return (0x0F)
607 }
608
609 Name (_CRS, ResourceTemplate ()
610 {
611 IO (Decode16, 0x0060, 0x0060, 0x00, 0x01)
612 IO (Decode16, 0x0064, 0x0064, 0x00, 0x01)
613 IRQNoFlags () {12}
614 })
615 }
616
617 // Parallel port
618 Device (LPT)
619 {
620 Name (_HID, EisaId ("PNP0400"))
621 Method (_STA, 0, NotSerialized)
622 {
623 Return (0x0F)
624 }
625 Name (_CRS, ResourceTemplate ()
626 {
627 IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
628 IO (Decode16, 0x0778, 0x0778, 0x08, 0x08)
629 IRQNoFlags () {7}
630 })
631 }
632 }
633
634 // Control method battery
635 Device (BAT0)
636 {
637 Name (_HID, EisaId ("PNP0C0A"))
638 Name (_UID, 0x00)
639
640 Scope (\_GPE)
641 {
642 // GPE bit 0 handler
643 // GPE.0 must be set and SCI raised when
644 // battery info changed and _BIF must be
645 // re-evaluated
646 Method (_L00, 0, NotSerialized)
647 {
648 Notify (\_SB.PCI0.BAT0, 0x81)
649 }
650 }
651
652 OperationRegion (CBAT, SystemIO, 0x4040, 0x08)
653 Field (CBAT, DwordAcc, NoLock, Preserve)
654 {
655 IDX0, 32,
656 DAT0, 32,
657 }
658
659 IndexField (IDX0, DAT0, DwordAcc, NoLock, Preserve)
660 {
661 STAT, 32,
662 PRAT, 32,
663 RCAP, 32,
664 PVOL, 32,
665
666 UNIT, 32,
667 DCAP, 32,
668 LFCP, 32,
669 BTEC, 32,
670 DVOL, 32,
671 DWRN, 32,
672 DLOW, 32,
673 GRN1, 32,
674 GRN2, 32,
675
676 BSTA, 32,
677 APSR, 32,
678 }
679
680 Method (_STA, 0, NotSerialized)
681 {
682 return (BSTA)
683 }
684
685 Name (PBIF, Package ()
686 {
687 0x01, // Power unit, 1 - mA
688 0x7fffffff, // Design capacity
689 0x7fffffff, // Last full charge capacity
690 0x00, // Battery technology
691 0xffffffff, // Design voltage
692 0x00, // Design capacity of Warning
693 0x00, // Design capacity of Low
694 0x04, // Battery capacity granularity 1
695 0x04, // Battery capacity granularity 2
696 "1", // Model number
697 "0", // Serial number
698 "VBOX", // Battery type
699 "innotek" // OEM Information
700 })
701
702 Name (PBST, Package () {
703 0, // Battery state
704 0x7fffffff, // Battery present rate
705 0x7fffffff, // Battery remaining capacity
706 0x7fffffff // Battery present voltage
707 })
708
709 // Battery information
710 Method (_BIF, 0, NotSerialized)
711 {
712 Store (UNIT, Index (PBIF, 0,))
713 Store (DCAP, Index (PBIF, 1,))
714 Store (LFCP, Index (PBIF, 2,))
715 Store (BTEC, Index (PBIF, 3,))
716 Store (DVOL, Index (PBIF, 4,))
717 Store (DWRN, Index (PBIF, 5,))
718 Store (DLOW, Index (PBIF, 6,))
719 Store (GRN1, Index (PBIF, 7,))
720 Store (GRN2, Index (PBIF, 8,))
721
722 DBG ("_BIF:\n")
723 HEX4 (DerefOf (Index (PBIF, 0,)))
724 HEX4 (DerefOf (Index (PBIF, 1,)))
725 HEX4 (DerefOf (Index (PBIF, 2,)))
726 HEX4 (DerefOf (Index (PBIF, 3,)))
727 HEX4 (DerefOf (Index (PBIF, 4,)))
728 HEX4 (DerefOf (Index (PBIF, 5,)))
729 HEX4 (DerefOf (Index (PBIF, 6,)))
730 HEX4 (DerefOf (Index (PBIF, 7,)))
731 HEX4 (DerefOf (Index (PBIF, 8,)))
732
733 return (PBIF)
734 }
735
736 // Battery status
737 Method (_BST, 0, NotSerialized)
738 {
739 Store (STAT, Index (PBST, 0,))
740 Store (PRAT, Index (PBST, 1,))
741 Store (RCAP, Index (PBST, 2,))
742 Store (PVOL, Index (PBST, 3,))
743/*
744 DBG ("_BST:\n")
745 HEX4 (DerefOf (Index (PBST, 0,)))
746 HEX4 (DerefOf (Index (PBST, 1,)))
747 HEX4 (DerefOf (Index (PBST, 2,)))
748 HEX4 (DerefOf (Index (PBST, 3,)))
749*/
750 return (PBST)
751 }
752 }
753
754 Device (AC)
755 {
756 Name (_HID, "ACPI0003")
757 Name (_UID, 0x00)
758 Name (_PCL, Package (0x01)
759 {
760 \_SB
761 })
762
763 Method (_PSR, 0, NotSerialized)
764 {
765 // DBG ("_PSR:\n")
766 // HEX4 (\_SB.PCI0.BAT0.APSR)
767 return (\_SB.PCI0.BAT0.APSR)
768 }
769
770 Method (_STA, 0, NotSerialized)
771 {
772 return (0x0f)
773 }
774 }
775 }
776 }
777
778 Scope (\_SB)
779 {
780 Scope (PCI0)
781 {
782 // PCI0 current resource settings
783 Name (CRS, ResourceTemplate ()
784 {
785 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
786 0x0000,
787 0x0000,
788 0x00FF,
789 0x0000,
790 0x0100)
791 IO (Decode16, 0x0CF8, 0x0CF8, 0x01, 0x08)
792 WordIO (ResourceProducer, MinFixed, MaxFixed,
793 PosDecode, EntireRange,
794 0x0000,
795 0x0000,
796 0x0CF7,
797 0x0000,
798 0x0CF8)
799 WordIO (ResourceProducer, MinFixed, MaxFixed,
800 PosDecode, EntireRange,
801 0x0000,
802 0x0D00,
803 0xFFFF,
804 0x0000,
805 0xF300)
806
807 /* Taken from ACPI faq (with some modifications) */
808 DwordMemory( // descriptor for video RAM behind ISA bus
809 ResourceProducer, // bit 0 of general flags is 0
810 PosDecode,
811 MinFixed, // Range is fixed
812 MaxFixed, // Range is Fixed
813 Cacheable,
814 ReadWrite,
815 0x00000000, // Granularity
816 0x000a0000, // Min
817 0x000bffff, // Max
818 0x00000000, // Translation
819 0x00020000 // Range Length
820 )
821
822 DwordMemory( // Consumed-and-produced resource
823 // (all of memory space)
824 ResourceProducer, // bit 0 of general flags is 0
825 PosDecode, // positive Decode
826 MinFixed, // Range is fixed
827 MaxFixed, // Range is fixed
828 Cacheable,
829 ReadWrite,
830 0x00000000, // Granularity
831 0x00000000, // Min (calculated dynamically)
832
833 0xffdfffff, // Max = 4GB - 2MB
834 0x00000000, // Translation
835 0xdfdfffff, // Range Length (calculated
836 // dynamically)
837 , // Optional field left blank
838 , // Optional field left blank
839 MEM3 // Name declaration for this
840 // descriptor
841 )
842 })
843
844 Method (_CRS, 0, NotSerialized)
845 {
846 CreateDwordField (CRS, \_SB.PCI0.MEM3._MIN, RAMT)
847 CreateDwordField (CRS, \_SB.PCI0.MEM3._LEN, RAMR)
848 Store (MEML, RAMT)
849 Subtract (0xffe00000, RAMT, RAMR)
850 Return (CRS)
851 }
852 }
853 }
854
855 Scope (\_SB)
856 {
857 // High Precision Event Timer
858 Device(HPET) {
859 Name(_HID, EISAID("PNP0103"))
860 Name(_UID, 0)
861 Method (_STA, 0, NotSerialized) {
862 Return(UHPT)
863 }
864 Name(_CRS, ResourceTemplate() {
865 DWordMemory(
866 ResourceConsumer, PosDecode, MinFixed, MaxFixed,
867 NonCacheable, ReadWrite,
868 0x00000000,
869 0xFED00000,
870 0xFED003FF,
871 0x00000000,
872 0x00000400 /* 1K memory: FED00000 - FED003FF */
873 )
874 })
875 }
876
877 // System Management Controller
878 Device (SMC)
879 {
880 Name (_HID, EisaId ("APP0001"))
881 Name (_CID, "smc-napa")
882
883 Method (_STA, 0, NotSerialized)
884 {
885 Return (USMC)
886 }
887 Name (_CRS, ResourceTemplate ()
888 {
889 IO (Decode16,
890 0x0300, // Range Minimum
891 0x0300, // Range Maximum
892 0x01, // Alignment
893 0x20, // Length
894 )
895 //IRQNoFlags () {8}
896 })
897 }
898
899 // Fields within PIIX3 configuration[0x60..0x63] with
900 // IRQ mappings
901 Field (\_SB.PCI0.SBRG.PCIC, ByteAcc, NoLock, Preserve)
902 {
903 Offset (0x60),
904 PIRA, 8,
905 PIRB, 8,
906 PIRC, 8,
907 PIRD, 8
908 }
909
910 Name (BUFA, ResourceTemplate ()
911 {
912 IRQ (Level, ActiveLow, Shared) {15}
913 })
914 CreateWordField (BUFA, 0x01, ICRS)
915
916 // Generic status of IRQ routing entry
917 Method (LSTA, 1, NotSerialized)
918 {
919 And (Arg0, 0x80, Local0)
920// DBG ("LSTA: ")
921// HEX (Arg0)
922 If (Local0)
923 {
924 Return (0x09)
925 }
926 Else
927 {
928 Return (0x0B)
929 }
930 }
931
932 // Generic "current resource settings" for routing entry
933 Method (LCRS, 1, NotSerialized)
934 {
935 And (Arg0, 0x0F, Local0)
936 ShiftLeft (0x01, Local0, ICRS)
937// DBG ("LCRS: ")
938// HEX (ICRS)
939 Return (BUFA)
940 }
941
942 // Generic "set resource settings" for routing entry
943 Method (LSRS, 1, NotSerialized)
944 {
945 CreateWordField (Arg0, 0x01, ISRS)
946 FindSetRightBit (ISRS, Local0)
947 Return (Decrement (Local0))
948 }
949
950 // Generic "disable" for routing entry
951 Method (LDIS, 1, NotSerialized)
952 {
953 Return (Or (Arg0, 0x80))
954 }
955
956 // Link A
957 Device (LNKA)
958 {
959 Name (_HID, EisaId ("PNP0C0F"))
960 Name (_UID, 0x01)
961
962 // Status
963 Method (_STA, 0, NotSerialized)
964 {
965 DBG ("LNKA._STA\n")
966 Return (LSTA (PIRA))
967 }
968
969 // Possible resource settings
970 Method (_PRS, 0, NotSerialized)
971 {
972 DBG ("LNKA._PRS\n")
973 Return (PRSA)
974 }
975
976 // Disable
977 Method (_DIS, 0, NotSerialized)
978 {
979 DBG ("LNKA._DIS\n")
980 Store (LDIS (PIRA), PIRA)
981 }
982
983 // Current resource settings
984 Method (_CRS, 0, NotSerialized)
985 {
986 DBG ("LNKA._CRS\n")
987 Return (LCRS (PIRA))
988 }
989
990 // Set resource settings
991 Method (_SRS, 1, NotSerialized)
992 {
993 DBG ("LNKA._SRS: ")
994 HEX (LSRS (Arg0))
995 Store (LSRS (Arg0), PIRA)
996 }
997 }
998
999 // Link B
1000 Device (LNKB)
1001 {
1002 Name (_HID, EisaId ("PNP0C0F"))
1003 Name (_UID, 0x02)
1004 Method (_STA, 0, NotSerialized)
1005 {
1006 // DBG ("LNKB._STA\n")
1007 Return (LSTA (PIRB))
1008 }
1009
1010 Method (_PRS, 0, NotSerialized)
1011 {
1012 // DBG ("LNKB._PRS\n")
1013 Return (PRSB)
1014 }
1015
1016 Method (_DIS, 0, NotSerialized)
1017 {
1018 // DBG ("LNKB._DIS\n")
1019 Store (LDIS (PIRB), PIRB)
1020 }
1021
1022 Method (_CRS, 0, NotSerialized)
1023 {
1024 // DBG ("LNKB._CRS\n")
1025 Return (LCRS (PIRB))
1026 }
1027
1028 Method (_SRS, 1, NotSerialized)
1029 {
1030 DBG ("LNKB._SRS: ")
1031 HEX (LSRS (Arg0))
1032 Store (LSRS (Arg0), PIRB)
1033 }
1034 }
1035
1036 // Link C
1037 Device (LNKC)
1038 {
1039 Name (_HID, EisaId ("PNP0C0F"))
1040 Name (_UID, 0x03)
1041 Method (_STA, 0, NotSerialized)
1042 {
1043 // DBG ("LNKC._STA\n")
1044 Return (LSTA (PIRC))
1045 }
1046
1047 Method (_PRS, 0, NotSerialized)
1048 {
1049 // DBG ("LNKC._PRS\n")
1050 Return (PRSC)
1051 }
1052
1053 Method (_DIS, 0, NotSerialized)
1054 {
1055 // DBG ("LNKC._DIS\n")
1056 Store (LDIS (PIRC), PIRC)
1057 }
1058
1059 Method (_CRS, 0, NotSerialized)
1060 {
1061 // DBG ("LNKC._CRS\n")
1062 Return (LCRS (PIRC))
1063 }
1064
1065 Method (_SRS, 1, NotSerialized)
1066 {
1067 DBG ("LNKC._SRS: ")
1068 HEX (LSRS (Arg0))
1069 Store (LSRS (Arg0), PIRC)
1070 }
1071 }
1072
1073 // Link D
1074 Device (LNKD)
1075 {
1076 Name (_HID, EisaId ("PNP0C0F"))
1077 Name (_UID, 0x04)
1078 Method (_STA, 0, NotSerialized)
1079 {
1080 // DBG ("LNKD._STA\n")
1081 Return (LSTA (PIRD))
1082 }
1083
1084 Method (_PRS, 0, NotSerialized)
1085 {
1086 // DBG ("LNKD._PRS\n")
1087 Return (PRSD)
1088 }
1089
1090 Method (_DIS, 0, NotSerialized)
1091 {
1092 // DBG ("LNKD._DIS\n")
1093 Store (LDIS (PIRA), PIRD)
1094 }
1095
1096 Method (_CRS, 0, NotSerialized)
1097 {
1098 // DBG ("LNKD._CRS\n")
1099 Return (LCRS (PIRD))
1100 }
1101
1102 Method (_SRS, 1, NotSerialized)
1103 {
1104 DBG ("LNKD._SRS: ")
1105 HEX (LSRS (Arg0))
1106 Store (LSRS (Arg0), PIRD)
1107 }
1108 }
1109 }
1110
1111 // Sx states
1112 Name (_S0, Package (2) {
1113 0x00,
1114 0x00,
1115 })
1116
1117 Name (_S5, Package (2) {
1118 0x05,
1119 0x05,
1120 })
1121
1122 Method (_PTS, 1, NotSerialized)
1123 {
1124 DBG ("Prepare to sleep: ")
1125 HEX (Arg0)
1126 }
1127}
1128
1129/*
1130 * Local Variables:
1131 * comment-start: "//"
1132 * End:
1133 */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette