VirtualBox

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

Last change on this file since 13510 was 13002, checked in by vboxsync, 16 years ago

Add PCI irq routing information to have 32 slots available on the host PCI bus. Disabled atm because Vista seems to want a reactivation

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
File size: 37.2 KB
Line 
1// $Id: vbox.dsl 13002 2008-10-06 11:38:33Z 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 Offset (0x80),
144 ININ, 32,
145 Offset (0x200),
146 VAIN, 32,
147 }
148
149 Method (_INI, 0, NotSerialized)
150 {
151 Store (0xbadc0de, VAIN)
152 DBG ("MEML: ")
153 HEX4 (MEML)
154 DBG ("UIOA: ")
155 HEX4 (UIOA)
156 }
157
158 // PCI PIC IRQ Routing table
159 // Must match pci.c:pci_slot_get_pirq
160 Name (PR00, Package ()
161 {
162 Package (0x04) {0x0002FFFF, 0x00, LNKB, 0x00,},
163 Package (0x04) {0x0002FFFF, 0x01, LNKC, 0x00,},
164 Package (0x04) {0x0002FFFF, 0x02, LNKD, 0x00,},
165 Package (0x04) {0x0002FFFF, 0x03, LNKA, 0x00,},
166
167 Package (0x04) {0x0003FFFF, 0x00, LNKC, 0x00,},
168 Package (0x04) {0x0003FFFF, 0x01, LNKD, 0x00,},
169 Package (0x04) {0x0003FFFF, 0x02, LNKA, 0x00,},
170 Package (0x04) {0x0003FFFF, 0x03, LNKB, 0x00,},
171
172 Package (0x04) {0x0004FFFF, 0x00, LNKD, 0x00,},
173 Package (0x04) {0x0004FFFF, 0x01, LNKA, 0x00,},
174 Package (0x04) {0x0004FFFF, 0x02, LNKB, 0x00,},
175 Package (0x04) {0x0004FFFF, 0x03, LNKC, 0x00,},
176
177 Package (0x04) {0x0005FFFF, 0x00, LNKA, 0x00,},
178 Package (0x04) {0x0005FFFF, 0x01, LNKB, 0x00,},
179 Package (0x04) {0x0005FFFF, 0x02, LNKC, 0x00,},
180 Package (0x04) {0x0005FFFF, 0x03, LNKD, 0x00,},
181
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
187 Package (0x04) {0x0007FFFF, 0x00, LNKC, 0x00,},
188 Package (0x04) {0x0007FFFF, 0x01, LNKD, 0x00,},
189 Package (0x04) {0x0007FFFF, 0x02, LNKA, 0x00,},
190 Package (0x04) {0x0007FFFF, 0x03, LNKB, 0x00,},
191
192 Package (0x04) {0x0008FFFF, 0x00, LNKD, 0x00,},
193 Package (0x04) {0x0008FFFF, 0x01, LNKA, 0x00,},
194 Package (0x04) {0x0008FFFF, 0x02, LNKB, 0x00,},
195 Package (0x04) {0x0008FFFF, 0x03, LNKC, 0x00,},
196
197 Package (0x04) {0x0009FFFF, 0x00, LNKA, 0x00,},
198 Package (0x04) {0x0009FFFF, 0x01, LNKB, 0x00,},
199 Package (0x04) {0x0009FFFF, 0x02, LNKC, 0x00,},
200 Package (0x04) {0x0009FFFF, 0x03, LNKD, 0x00,},
201
202 Package (0x04) {0x000AFFFF, 0x00, LNKB, 0x00,},
203 Package (0x04) {0x000AFFFF, 0x01, LNKC, 0x00,},
204 Package (0x04) {0x000AFFFF, 0x02, LNKD, 0x00,},
205 Package (0x04) {0x000AFFFF, 0x03, LNKA, 0x00,},
206
207 Package (0x04) {0x000BFFFF, 0x00, LNKC, 0x00,},
208 Package (0x04) {0x000BFFFF, 0x01, LNKD, 0x00,},
209 Package (0x04) {0x000BFFFF, 0x02, LNKA, 0x00,},
210 Package (0x04) {0x000BFFFF, 0x03, LNKB, 0x00,},
211
212 Package (0x04) {0x000CFFFF, 0x00, LNKD, 0x00,},
213 Package (0x04) {0x000CFFFF, 0x01, LNKA, 0x00,},
214 Package (0x04) {0x000CFFFF, 0x02, LNKB, 0x00,},
215 Package (0x04) {0x000CFFFF, 0x03, LNKC, 0x00,},
216
217 Package (0x04) {0x000DFFFF, 0x00, LNKA, 0x00,},
218 Package (0x04) {0x000DFFFF, 0x01, LNKB, 0x00,},
219 Package (0x04) {0x000DFFFF, 0x02, LNKC, 0x00,},
220 Package (0x04) {0x000DFFFF, 0x03, LNKD, 0x00,},
221
222 Package (0x04) {0x000EFFFF, 0x00, LNKB, 0x00,},
223 Package (0x04) {0x000EFFFF, 0x01, LNKC, 0x00,},
224 Package (0x04) {0x000EFFFF, 0x02, LNKD, 0x00,},
225 Package (0x04) {0x000EFFFF, 0x03, LNKA, 0x00,},
226
227 Package (0x04) {0x000FFFFF, 0x00, LNKC, 0x00,},
228 Package (0x04) {0x000FFFFF, 0x01, LNKD, 0x00,},
229 Package (0x04) {0x000FFFFF, 0x02, LNKA, 0x00,},
230 Package (0x04) {0x000FFFFF, 0x03, LNKB, 0x00,},
231
232/* Disabled atm because Vista wants a reactivation
233 Package (0x04) {0x0010FFFF, 0x00, LNKD, 0x00,},
234 Package (0x04) {0x0010FFFF, 0x01, LNKA, 0x00,},
235 Package (0x04) {0x0010FFFF, 0x02, LNKB, 0x00,},
236 Package (0x04) {0x0010FFFF, 0x03, LNKC, 0x00,},
237
238 Package (0x04) {0x0011FFFF, 0x00, LNKA, 0x00,},
239 Package (0x04) {0x0011FFFF, 0x01, LNKB, 0x00,},
240 Package (0x04) {0x0011FFFF, 0x02, LNKC, 0x00,},
241 Package (0x04) {0x0011FFFF, 0x03, LNKD, 0x00,},
242
243 Package (0x04) {0x0012FFFF, 0x00, LNKB, 0x00,},
244 Package (0x04) {0x0012FFFF, 0x01, LNKC, 0x00,},
245 Package (0x04) {0x0012FFFF, 0x02, LNKD, 0x00,},
246 Package (0x04) {0x0012FFFF, 0x03, LNKA, 0x00,},
247
248 Package (0x04) {0x0013FFFF, 0x00, LNKC, 0x00,},
249 Package (0x04) {0x0013FFFF, 0x01, LNKD, 0x00,},
250 Package (0x04) {0x0013FFFF, 0x02, LNKA, 0x00,},
251 Package (0x04) {0x0013FFFF, 0x03, LNKB, 0x00,},
252
253 Package (0x04) {0x0014FFFF, 0x00, LNKD, 0x00,},
254 Package (0x04) {0x0014FFFF, 0x01, LNKA, 0x00,},
255 Package (0x04) {0x0014FFFF, 0x02, LNKB, 0x00,},
256 Package (0x04) {0x0014FFFF, 0x03, LNKC, 0x00,},
257
258 Package (0x04) {0x0015FFFF, 0x00, LNKA, 0x00,},
259 Package (0x04) {0x0015FFFF, 0x01, LNKB, 0x00,},
260 Package (0x04) {0x0015FFFF, 0x02, LNKC, 0x00,},
261 Package (0x04) {0x0015FFFF, 0x03, LNKD, 0x00,},
262
263 Package (0x04) {0x0016FFFF, 0x00, LNKB, 0x00,},
264 Package (0x04) {0x0016FFFF, 0x01, LNKC, 0x00,},
265 Package (0x04) {0x0016FFFF, 0x02, LNKD, 0x00,},
266 Package (0x04) {0x0016FFFF, 0x03, LNKA, 0x00,},
267
268 Package (0x04) {0x0017FFFF, 0x00, LNKC, 0x00,},
269 Package (0x04) {0x0017FFFF, 0x01, LNKD, 0x00,},
270 Package (0x04) {0x0017FFFF, 0x02, LNKA, 0x00,},
271 Package (0x04) {0x0017FFFF, 0x03, LNKB, 0x00,},
272
273 Package (0x04) {0x0018FFFF, 0x00, LNKD, 0x00,},
274 Package (0x04) {0x0018FFFF, 0x01, LNKA, 0x00,},
275 Package (0x04) {0x0018FFFF, 0x02, LNKB, 0x00,},
276 Package (0x04) {0x0018FFFF, 0x03, LNKC, 0x00,},
277
278 Package (0x04) {0x0019FFFF, 0x00, LNKA, 0x00,},
279 Package (0x04) {0x0019FFFF, 0x01, LNKB, 0x00,},
280 Package (0x04) {0x0019FFFF, 0x02, LNKC, 0x00,},
281 Package (0x04) {0x0019FFFF, 0x03, LNKD, 0x00,},
282
283 Package (0x04) {0x001AFFFF, 0x00, LNKB, 0x00,},
284 Package (0x04) {0x001AFFFF, 0x01, LNKC, 0x00,},
285 Package (0x04) {0x001AFFFF, 0x02, LNKD, 0x00,},
286 Package (0x04) {0x001AFFFF, 0x03, LNKA, 0x00,},
287
288 Package (0x04) {0x001BFFFF, 0x00, LNKC, 0x00,},
289 Package (0x04) {0x001BFFFF, 0x01, LNKD, 0x00,},
290 Package (0x04) {0x001BFFFF, 0x02, LNKA, 0x00,},
291 Package (0x04) {0x001BFFFF, 0x03, LNKB, 0x00,},
292
293 Package (0x04) {0x001CFFFF, 0x00, LNKD, 0x00,},
294 Package (0x04) {0x001CFFFF, 0x01, LNKA, 0x00,},
295 Package (0x04) {0x001CFFFF, 0x02, LNKB, 0x00,},
296 Package (0x04) {0x001CFFFF, 0x03, LNKC, 0x00,},
297
298 Package (0x04) {0x001DFFFF, 0x00, LNKA, 0x00,},
299 Package (0x04) {0x001DFFFF, 0x01, LNKB, 0x00,},
300 Package (0x04) {0x001DFFFF, 0x02, LNKC, 0x00,},
301 Package (0x04) {0x001DFFFF, 0x03, LNKD, 0x00,},
302
303 Package (0x04) {0x001EFFFF, 0x00, LNKB, 0x00,},
304 Package (0x04) {0x001EFFFF, 0x01, LNKC, 0x00,},
305 Package (0x04) {0x001EFFFF, 0x02, LNKD, 0x00,},
306 Package (0x04) {0x001EFFFF, 0x03, LNKA, 0x00,},
307
308 Package (0x04) {0x001FFFFF, 0x00, LNKC, 0x00,},
309 Package (0x04) {0x001FFFFF, 0x01, LNKD, 0x00,},
310 Package (0x04) {0x001FFFFF, 0x02, LNKA, 0x00,},
311 Package (0x04) {0x001FFFFF, 0x03, LNKB, 0x00,}
312*/
313 })
314
315 // PCI I/O APIC IRQ Routing table
316 // Must match pci.c:pci_slot_get_acpi_pirq
317 Name (PR01, Package ()
318 {
319 Package (0x04) {0x0002FFFF, 0x00, 0x00, 0x12,},
320 Package (0x04) {0x0002FFFF, 0x01, 0x00, 0x13,},
321 Package (0x04) {0x0002FFFF, 0x02, 0x00, 0x14,},
322 Package (0x04) {0x0002FFFF, 0x03, 0x00, 0x15,},
323
324 Package (0x04) {0x0003FFFF, 0x00, 0x00, 0x13,},
325 Package (0x04) {0x0003FFFF, 0x01, 0x00, 0x14,},
326 Package (0x04) {0x0003FFFF, 0x02, 0x00, 0x15,},
327 Package (0x04) {0x0003FFFF, 0x03, 0x00, 0x16,},
328
329 Package (0x04) {0x0004FFFF, 0x00, 0x00, 0x14,},
330 Package (0x04) {0x0004FFFF, 0x01, 0x00, 0x15,},
331 Package (0x04) {0x0004FFFF, 0x02, 0x00, 0x16,},
332 Package (0x04) {0x0004FFFF, 0x03, 0x00, 0x17,},
333
334 Package (0x04) {0x0005FFFF, 0x00, 0x00, 0x15,},
335 Package (0x04) {0x0005FFFF, 0x01, 0x00, 0x16,},
336 Package (0x04) {0x0005FFFF, 0x02, 0x00, 0x17,},
337 Package (0x04) {0x0005FFFF, 0x03, 0x00, 0x10,},
338
339 Package (0x04) {0x0006FFFF, 0x00, 0x00, 0x16,},
340 Package (0x04) {0x0006FFFF, 0x01, 0x00, 0x17,},
341 Package (0x04) {0x0006FFFF, 0x02, 0x00, 0x10,},
342 Package (0x04) {0x0006FFFF, 0x03, 0x00, 0x11,},
343
344 Package (0x04) {0x0007FFFF, 0x00, 0x00, 0x17,},
345 Package (0x04) {0x0007FFFF, 0x01, 0x00, 0x10,},
346 Package (0x04) {0x0007FFFF, 0x02, 0x00, 0x11,},
347 Package (0x04) {0x0007FFFF, 0x03, 0x00, 0x12,},
348
349 Package (0x04) {0x0008FFFF, 0x00, 0x00, 0x10,},
350 Package (0x04) {0x0008FFFF, 0x01, 0x00, 0x11,},
351 Package (0x04) {0x0008FFFF, 0x02, 0x00, 0x12,},
352 Package (0x04) {0x0008FFFF, 0x03, 0x00, 0x13,},
353
354 Package (0x04) {0x0009FFFF, 0x00, 0x00, 0x11,},
355 Package (0x04) {0x0009FFFF, 0x01, 0x00, 0x12,},
356 Package (0x04) {0x0009FFFF, 0x02, 0x00, 0x13,},
357 Package (0x04) {0x0009FFFF, 0x03, 0x00, 0x14,},
358
359 Package (0x04) {0x000AFFFF, 0x00, 0x00, 0x12,},
360 Package (0x04) {0x000AFFFF, 0x01, 0x00, 0x13,},
361 Package (0x04) {0x000AFFFF, 0x02, 0x00, 0x14,},
362 Package (0x04) {0x000AFFFF, 0x03, 0x00, 0x15,},
363
364 Package (0x04) {0x000BFFFF, 0x00, 0x00, 0x13,},
365 Package (0x04) {0x000BFFFF, 0x01, 0x00, 0x14,},
366 Package (0x04) {0x000BFFFF, 0x02, 0x00, 0x15,},
367 Package (0x04) {0x000BFFFF, 0x03, 0x00, 0x16,},
368
369 Package (0x04) {0x000CFFFF, 0x00, 0x00, 0x14,},
370 Package (0x04) {0x000CFFFF, 0x01, 0x00, 0x15,},
371 Package (0x04) {0x000CFFFF, 0x02, 0x00, 0x16,},
372 Package (0x04) {0x000CFFFF, 0x03, 0x00, 0x17,},
373
374 Package (0x04) {0x000DFFFF, 0x00, 0x00, 0x15,},
375 Package (0x04) {0x000DFFFF, 0x01, 0x00, 0x16,},
376 Package (0x04) {0x000DFFFF, 0x02, 0x00, 0x17,},
377 Package (0x04) {0x000DFFFF, 0x03, 0x00, 0x10,},
378
379 Package (0x04) {0x000EFFFF, 0x00, 0x00, 0x16,},
380 Package (0x04) {0x000EFFFF, 0x01, 0x00, 0x17,},
381 Package (0x04) {0x000EFFFF, 0x02, 0x00, 0x10,},
382 Package (0x04) {0x000EFFFF, 0x03, 0x00, 0x11,},
383
384 Package (0x04) {0x000FFFFF, 0x00, 0x00, 0x17,},
385 Package (0x04) {0x000FFFFF, 0x01, 0x00, 0x10,},
386 Package (0x04) {0x000FFFFF, 0x02, 0x00, 0x11,},
387 Package (0x04) {0x000FFFFF, 0x03, 0x00, 0x12,},
388
389/* Disabled atm because Vista wants a reactivation
390 Package (0x04) {0x0010FFFF, 0x00, 0x00, 0x10,},
391 Package (0x04) {0x0010FFFF, 0x01, 0x00, 0x11,},
392 Package (0x04) {0x0010FFFF, 0x02, 0x00, 0x12,},
393 Package (0x04) {0x0010FFFF, 0x03, 0x00, 0x13,},
394
395 Package (0x04) {0x0011FFFF, 0x00, 0x00, 0x11,},
396 Package (0x04) {0x0011FFFF, 0x01, 0x00, 0x12,},
397 Package (0x04) {0x0011FFFF, 0x02, 0x00, 0x13,},
398 Package (0x04) {0x0011FFFF, 0x03, 0x00, 0x14,},
399
400 Package (0x04) {0x0012FFFF, 0x00, 0x00, 0x12,},
401 Package (0x04) {0x0012FFFF, 0x01, 0x00, 0x13,},
402 Package (0x04) {0x0012FFFF, 0x02, 0x00, 0x14,},
403 Package (0x04) {0x0012FFFF, 0x03, 0x00, 0x15,},
404
405 Package (0x04) {0x0013FFFF, 0x00, 0x00, 0x13,},
406 Package (0x04) {0x0013FFFF, 0x01, 0x00, 0x14,},
407 Package (0x04) {0x0013FFFF, 0x02, 0x00, 0x15,},
408 Package (0x04) {0x0013FFFF, 0x03, 0x00, 0x16,},
409
410 Package (0x04) {0x0014FFFF, 0x00, 0x00, 0x14,},
411 Package (0x04) {0x0014FFFF, 0x01, 0x00, 0x15,},
412 Package (0x04) {0x0014FFFF, 0x02, 0x00, 0x16,},
413 Package (0x04) {0x0014FFFF, 0x03, 0x00, 0x17,},
414
415 Package (0x04) {0x0015FFFF, 0x00, 0x00, 0x15,},
416 Package (0x04) {0x0015FFFF, 0x01, 0x00, 0x16,},
417 Package (0x04) {0x0015FFFF, 0x02, 0x00, 0x17,},
418 Package (0x04) {0x0015FFFF, 0x03, 0x00, 0x10,},
419
420 Package (0x04) {0x0016FFFF, 0x00, 0x00, 0x16,},
421 Package (0x04) {0x0016FFFF, 0x01, 0x00, 0x17,},
422 Package (0x04) {0x0016FFFF, 0x02, 0x00, 0x10,},
423 Package (0x04) {0x0016FFFF, 0x03, 0x00, 0x11,},
424
425 Package (0x04) {0x0017FFFF, 0x00, 0x00, 0x17,},
426 Package (0x04) {0x0017FFFF, 0x01, 0x00, 0x10,},
427 Package (0x04) {0x0017FFFF, 0x02, 0x00, 0x11,},
428 Package (0x04) {0x0017FFFF, 0x03, 0x00, 0x12,},
429
430 Package (0x04) {0x0018FFFF, 0x00, 0x00, 0x10,},
431 Package (0x04) {0x0018FFFF, 0x01, 0x00, 0x11,},
432 Package (0x04) {0x0018FFFF, 0x02, 0x00, 0x12,},
433 Package (0x04) {0x0018FFFF, 0x03, 0x00, 0x13,},
434
435 Package (0x04) {0x0019FFFF, 0x00, 0x00, 0x11,},
436 Package (0x04) {0x0019FFFF, 0x01, 0x00, 0x12,},
437 Package (0x04) {0x0019FFFF, 0x02, 0x00, 0x13,},
438 Package (0x04) {0x0019FFFF, 0x03, 0x00, 0x14,},
439
440 Package (0x04) {0x001AFFFF, 0x00, 0x00, 0x12,},
441 Package (0x04) {0x001AFFFF, 0x01, 0x00, 0x13,},
442 Package (0x04) {0x001AFFFF, 0x02, 0x00, 0x14,},
443 Package (0x04) {0x001AFFFF, 0x03, 0x00, 0x15,},
444
445 Package (0x04) {0x001BFFFF, 0x00, 0x00, 0x13,},
446 Package (0x04) {0x001BFFFF, 0x01, 0x00, 0x14,},
447 Package (0x04) {0x001BFFFF, 0x02, 0x00, 0x15,},
448 Package (0x04) {0x001BFFFF, 0x03, 0x00, 0x16,},
449
450 Package (0x04) {0x001CFFFF, 0x00, 0x00, 0x14,},
451 Package (0x04) {0x001CFFFF, 0x01, 0x00, 0x15,},
452 Package (0x04) {0x001CFFFF, 0x02, 0x00, 0x16,},
453 Package (0x04) {0x001CFFFF, 0x03, 0x00, 0x17,},
454
455 Package (0x04) {0x001DFFFF, 0x00, 0x00, 0x15,},
456 Package (0x04) {0x001DFFFF, 0x01, 0x00, 0x16,},
457 Package (0x04) {0x001DFFFF, 0x02, 0x00, 0x17,},
458 Package (0x04) {0x001DFFFF, 0x03, 0x00, 0x10,},
459
460 Package (0x04) {0x001EFFFF, 0x00, 0x00, 0x16,},
461 Package (0x04) {0x001EFFFF, 0x01, 0x00, 0x17,},
462 Package (0x04) {0x001EFFFF, 0x02, 0x00, 0x10,},
463 Package (0x04) {0x001EFFFF, 0x03, 0x00, 0x11,},
464
465 Package (0x04) {0x001FFFFF, 0x00, 0x00, 0x17,},
466 Package (0x04) {0x001FFFFF, 0x01, 0x00, 0x10,},
467 Package (0x04) {0x001FFFFF, 0x02, 0x00, 0x11,},
468 Package (0x04) {0x001FFFFF, 0x03, 0x00, 0x12,}
469*/
470 })
471
472 // Possible resource settings for PCI link A
473 Name (PRSA, ResourceTemplate ()
474 {
475 IRQ (Level, ActiveLow, Shared) {5,9,10,11}
476 })
477
478 // Possible resource settings for PCI link B
479 Name (PRSB, ResourceTemplate ()
480 {
481 IRQ (Level, ActiveLow, Shared) {5,9,10,11}
482 })
483
484 // Possible resource settings for PCI link C
485 Name (PRSC, ResourceTemplate ()
486 {
487 IRQ (Level, ActiveLow, Shared) {5,9,10,11}
488 })
489
490 // Possible resource settings for PCI link D
491 Name (PRSD, ResourceTemplate ()
492 {
493 IRQ (Level, ActiveLow, Shared) {5,9,10,11}
494 })
495
496 // PCI bus 0
497 Device (PCI0)
498 {
499 Name (_HID, EisaId ("PNP0A03"))
500 Name (_ADR, 0x00) // address
501 Name (_BBN, 0x00) // base bus adddress
502 Name (_UID, 0x00)
503
504 // Method that returns routing table
505 Method (_PRT, 0, NotSerialized)
506 {
507 if (LEqual (LAnd (PICM, UIOA), Zero)) {
508 DBG ("RETURNING PIC\n")
509 Store (0x00, \_SB.PCI0.SBRG.APDE)
510 Store (0x00, \_SB.PCI0.SBRG.APAD)
511 Return (PR00)
512 }
513 else {
514 DBG ("RETURNING APIC\n")
515 Store (0xbe, \_SB.PCI0.SBRG.APDE)
516 Store (0xef, \_SB.PCI0.SBRG.APAD)
517 Return (PR01)
518 }
519 }
520
521 Device (SBRG)
522 {
523 // Address of the PIIX3 (device 1 function 0)
524 Name (_ADR, 0x00010000)
525 OperationRegion (PCIC, PCI_Config, 0x00, 0xff)
526
527 Field (PCIC, ByteAcc, NoLock, Preserve)
528 {
529 Offset (0xad),
530 APAD, 8,
531 Offset (0xde),
532 APDE, 8,
533 }
534
535 // Keyboard device
536 Device (PS2K)
537 {
538 Name (_HID, EisaId ("PNP0303"))
539 Method (_STA, 0, NotSerialized)
540 {
541 Return (0x0F)
542 }
543
544 Name (_CRS, ResourceTemplate ()
545 {
546 IO (Decode16, 0x0060, 0x0060, 0x00, 0x01)
547 IO (Decode16, 0x0064, 0x0064, 0x00, 0x01)
548 IRQNoFlags () {1}
549 })
550 }
551
552 // DMA Controller
553 Device (DMAC)
554 {
555 Name (_HID, EisaId ("PNP0200"))
556 Name (_CRS, ResourceTemplate ()
557 {
558 IO (Decode16, 0x0000, 0x0000, 0x01, 0x10)
559 IO (Decode16, 0x0080, 0x0080, 0x01, 0x10)
560 IO (Decode16, 0x00C0, 0x00C0, 0x01, 0x20)
561 DMA (Compatibility, BusMaster, Transfer8_16) {4}
562 })
563 }
564
565 // Floppy disk controller
566 Device (FDC0)
567 {
568 Name (_HID, EisaId ("PNP0700"))
569
570 OperationRegion (CFDC, SystemIO, 0x4054, 0x08)
571 Field (CFDC, DwordAcc, NoLock, Preserve)
572 {
573 FSTA, 32,
574 }
575
576 Method (_STA, 0, NotSerialized)
577 {
578 Return (FSTA)
579 }
580
581 // Current resource settings
582 Name (_CRS, ResourceTemplate ()
583 {
584 IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
585 IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
586 IRQNoFlags () {6}
587 DMA (Compatibility, NotBusMaster, Transfer8) {2}
588 })
589
590 // Possible resource settings
591 Name (_PRS, ResourceTemplate ()
592 {
593 IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
594 IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
595 IRQNoFlags () {6}
596 DMA (Compatibility, NotBusMaster, Transfer8) {2}
597 })
598
599 }
600
601 // Mouse device
602 Device (PS2M)
603 {
604 Name (_HID, EisaId ("PNP0F03"))
605 Method (_STA, 0, NotSerialized)
606 {
607 Return (0x0F)
608 }
609
610 Name (_CRS, ResourceTemplate ()
611 {
612 IO (Decode16, 0x0060, 0x0060, 0x00, 0x01)
613 IO (Decode16, 0x0064, 0x0064, 0x00, 0x01)
614 IRQNoFlags () {12}
615 })
616 }
617
618 // Parallel port
619 Device (LPT)
620 {
621 Name (_HID, EisaId ("PNP0400"))
622 Method (_STA, 0, NotSerialized)
623 {
624 Return (0x0F)
625 }
626 Name (_CRS, ResourceTemplate ()
627 {
628 IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
629 IO (Decode16, 0x0778, 0x0778, 0x08, 0x08)
630 IRQNoFlags () {7}
631 })
632 }
633 }
634
635 // Control method battery
636 Device (BAT0)
637 {
638 Name (_HID, EisaId ("PNP0C0A"))
639 Name (_UID, 0x00)
640
641 Scope (\_GPE)
642 {
643 // GPE bit 0 handler
644 // GPE.0 must be set and SCI raised when
645 // battery info changed and _BIF must be
646 // re-evaluated
647 Method (_L00, 0, NotSerialized)
648 {
649 Notify (\_SB.PCI0.BAT0, 0x81)
650 }
651 }
652
653 OperationRegion (CBAT, SystemIO, 0x4040, 0x08)
654 Field (CBAT, DwordAcc, NoLock, Preserve)
655 {
656 IDX0, 32,
657 DAT0, 32,
658 }
659
660 IndexField (IDX0, DAT0, DwordAcc, NoLock, Preserve)
661 {
662 STAT, 32,
663 PRAT, 32,
664 RCAP, 32,
665 PVOL, 32,
666
667 UNIT, 32,
668 DCAP, 32,
669 LFCP, 32,
670 BTEC, 32,
671 DVOL, 32,
672 DWRN, 32,
673 DLOW, 32,
674 GRN1, 32,
675 GRN2, 32,
676
677 BSTA, 32,
678 APSR, 32,
679 }
680
681 Method (_STA, 0, NotSerialized)
682 {
683 return (BSTA)
684 }
685
686 Name (PBIF, Package ()
687 {
688 0x01, // Power unit, 1 - mA
689 0x7fffffff, // Design capacity
690 0x7fffffff, // Last full charge capacity
691 0x00, // Battery technology
692 0xffffffff, // Design voltage
693 0x00, // Design capacity of Warning
694 0x00, // Design capacity of Low
695 0x04, // Battery capacity granularity 1
696 0x04, // Battery capacity granularity 2
697 "1", // Model number
698 "0", // Serial number
699 "VBOX", // Battery type
700 "innotek" // OEM Information
701 })
702
703 Name (PBST, Package () {
704 0, // Battery state
705 0x7fffffff, // Battery present rate
706 0x7fffffff, // Battery remaining capacity
707 0x7fffffff // Battery present voltage
708 })
709
710 // Battery information
711 Method (_BIF, 0, NotSerialized)
712 {
713 Store (UNIT, Index (PBIF, 0,))
714 Store (DCAP, Index (PBIF, 1,))
715 Store (LFCP, Index (PBIF, 2,))
716 Store (BTEC, Index (PBIF, 3,))
717 Store (DVOL, Index (PBIF, 4,))
718 Store (DWRN, Index (PBIF, 5,))
719 Store (DLOW, Index (PBIF, 6,))
720 Store (GRN1, Index (PBIF, 7,))
721 Store (GRN2, Index (PBIF, 8,))
722
723 DBG ("_BIF:\n")
724 HEX4 (DerefOf (Index (PBIF, 0,)))
725 HEX4 (DerefOf (Index (PBIF, 1,)))
726 HEX4 (DerefOf (Index (PBIF, 2,)))
727 HEX4 (DerefOf (Index (PBIF, 3,)))
728 HEX4 (DerefOf (Index (PBIF, 4,)))
729 HEX4 (DerefOf (Index (PBIF, 5,)))
730 HEX4 (DerefOf (Index (PBIF, 6,)))
731 HEX4 (DerefOf (Index (PBIF, 7,)))
732 HEX4 (DerefOf (Index (PBIF, 8,)))
733
734 return (PBIF)
735 }
736
737 // Battery status
738 Method (_BST, 0, NotSerialized)
739 {
740 Store (STAT, Index (PBST, 0,))
741 Store (PRAT, Index (PBST, 1,))
742 Store (RCAP, Index (PBST, 2,))
743 Store (PVOL, Index (PBST, 3,))
744/*
745 DBG ("_BST:\n")
746 HEX4 (DerefOf (Index (PBST, 0,)))
747 HEX4 (DerefOf (Index (PBST, 1,)))
748 HEX4 (DerefOf (Index (PBST, 2,)))
749 HEX4 (DerefOf (Index (PBST, 3,)))
750*/
751 return (PBST)
752 }
753 }
754
755 Device (AC)
756 {
757 Name (_HID, "ACPI0003")
758 Name (_UID, 0x00)
759 Name (_PCL, Package (0x01)
760 {
761 \_SB
762 })
763
764 Method (_PSR, 0, NotSerialized)
765 {
766 // DBG ("_PSR:\n")
767 // HEX4 (\_SB.PCI0.BAT0.APSR)
768 return (\_SB.PCI0.BAT0.APSR)
769 }
770
771 Method (_STA, 0, NotSerialized)
772 {
773 return (0x0f)
774 }
775 }
776 }
777 }
778
779 Scope (\_SB)
780 {
781 Scope (PCI0)
782 {
783 // PCI0 current resource settings
784 Name (CRS, ResourceTemplate ()
785 {
786 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
787 0x0000,
788 0x0000,
789 0x00FF,
790 0x0000,
791 0x0100)
792 IO (Decode16, 0x0CF8, 0x0CF8, 0x01, 0x08)
793 WordIO (ResourceProducer, MinFixed, MaxFixed,
794 PosDecode, EntireRange,
795 0x0000,
796 0x0000,
797 0x0CF7,
798 0x0000,
799 0x0CF8)
800 WordIO (ResourceProducer, MinFixed, MaxFixed,
801 PosDecode, EntireRange,
802 0x0000,
803 0x0D00,
804 0xFFFF,
805 0x0000,
806 0xF300)
807
808 /* Taken from ACPI faq (with some modifications) */
809 DwordMemory( // descriptor for video RAM behind ISA bus
810 ResourceProducer, // bit 0 of general flags is 0
811 PosDecode,
812 MinFixed, // Range is fixed
813 MaxFixed, // Range is Fixed
814 Cacheable,
815 ReadWrite,
816 0x00000000, // Granularity
817 0x000a0000, // Min
818 0x000bffff, // Max
819 0x00000000, // Translation
820 0x00020000 // Range Length
821 )
822
823 DwordMemory( // Consumed-and-produced resource
824 // (all of memory space)
825 ResourceProducer, // bit 0 of general flags is 0
826 PosDecode, // positive Decode
827 MinFixed, // Range is fixed
828 MaxFixed, // Range is fixed
829 Cacheable,
830 ReadWrite,
831 0x00000000, // Granularity
832 0x00000000, // Min (calculated dynamically)
833
834 0xffdfffff, // Max = 4GB - 2MB
835 0x00000000, // Translation
836 0xdfdfffff, // Range Length (calculated
837 // dynamically)
838 , // Optional field left blank
839 , // Optional field left blank
840 MEM3 // Name declaration for this
841 // descriptor
842 )
843 })
844
845 Method (_CRS, 0, NotSerialized)
846 {
847 CreateDwordField (CRS, \_SB.PCI0.MEM3._MIN, RAMT)
848 CreateDwordField (CRS, \_SB.PCI0.MEM3._LEN, RAMR)
849 Store (MEML, RAMT)
850 Subtract (0xffe00000, RAMT, RAMR)
851 Return (CRS)
852 }
853 }
854 }
855
856 Scope (\_SB)
857 {
858 // Fields within PIIX3 configuration[0x60..0x63] with
859 // IRQ mappings
860 Field (\_SB.PCI0.SBRG.PCIC, ByteAcc, NoLock, Preserve)
861 {
862 Offset (0x60),
863 PIRA, 8,
864 PIRB, 8,
865 PIRC, 8,
866 PIRD, 8
867 }
868
869 Name (BUFA, ResourceTemplate ()
870 {
871 IRQ (Level, ActiveLow, Shared) {15}
872 })
873 CreateWordField (BUFA, 0x01, ICRS)
874
875 // Generic status of IRQ routing entry
876 Method (LSTA, 1, NotSerialized)
877 {
878 And (Arg0, 0x80, Local0)
879// DBG ("LSTA: ")
880// HEX (Arg0)
881 If (Local0)
882 {
883 Return (0x09)
884 }
885 Else
886 {
887 Return (0x0B)
888 }
889 }
890
891 // Generic "current resource settings" for routing entry
892 Method (LCRS, 1, NotSerialized)
893 {
894 And (Arg0, 0x0F, Local0)
895 ShiftLeft (0x01, Local0, ICRS)
896// DBG ("LCRS: ")
897// HEX (ICRS)
898 Return (BUFA)
899 }
900
901 // Generic "set resource settings" for routing entry
902 Method (LSRS, 1, NotSerialized)
903 {
904 CreateWordField (Arg0, 0x01, ISRS)
905 FindSetRightBit (ISRS, Local0)
906 Return (Decrement (Local0))
907 }
908
909 // Generic "disable" for routing entry
910 Method (LDIS, 1, NotSerialized)
911 {
912 Return (Or (Arg0, 0x80))
913 }
914
915 // Link A
916 Device (LNKA)
917 {
918 Name (_HID, EisaId ("PNP0C0F"))
919 Name (_UID, 0x01)
920
921 // Status
922 Method (_STA, 0, NotSerialized)
923 {
924 DBG ("LNKA._STA\n")
925 Return (LSTA (PIRA))
926 }
927
928 // Possible resource settings
929 Method (_PRS, 0, NotSerialized)
930 {
931 DBG ("LNKA._PRS\n")
932 Return (PRSA)
933 }
934
935 // Disable
936 Method (_DIS, 0, NotSerialized)
937 {
938 DBG ("LNKA._DIS\n")
939 Store (LDIS (PIRA), PIRA)
940 }
941
942 // Current resource settings
943 Method (_CRS, 0, NotSerialized)
944 {
945 DBG ("LNKA._CRS\n")
946 Return (LCRS (PIRA))
947 }
948
949 // Set resource settings
950 Method (_SRS, 1, NotSerialized)
951 {
952 DBG ("LNKA._SRS: ")
953 HEX (LSRS (Arg0))
954 Store (LSRS (Arg0), PIRA)
955 }
956 }
957
958 // Link B
959 Device (LNKB)
960 {
961 Name (_HID, EisaId ("PNP0C0F"))
962 Name (_UID, 0x02)
963 Method (_STA, 0, NotSerialized)
964 {
965 // DBG ("LNKB._STA\n")
966 Return (LSTA (PIRB))
967 }
968
969 Method (_PRS, 0, NotSerialized)
970 {
971 // DBG ("LNKB._PRS\n")
972 Return (PRSB)
973 }
974
975 Method (_DIS, 0, NotSerialized)
976 {
977 // DBG ("LNKB._DIS\n")
978 Store (LDIS (PIRB), PIRB)
979 }
980
981 Method (_CRS, 0, NotSerialized)
982 {
983 // DBG ("LNKB._CRS\n")
984 Return (LCRS (PIRB))
985 }
986
987 Method (_SRS, 1, NotSerialized)
988 {
989 DBG ("LNKB._SRS: ")
990 HEX (LSRS (Arg0))
991 Store (LSRS (Arg0), PIRB)
992 }
993 }
994
995 // Link C
996 Device (LNKC)
997 {
998 Name (_HID, EisaId ("PNP0C0F"))
999 Name (_UID, 0x03)
1000 Method (_STA, 0, NotSerialized)
1001 {
1002 // DBG ("LNKC._STA\n")
1003 Return (LSTA (PIRC))
1004 }
1005
1006 Method (_PRS, 0, NotSerialized)
1007 {
1008 // DBG ("LNKC._PRS\n")
1009 Return (PRSC)
1010 }
1011
1012 Method (_DIS, 0, NotSerialized)
1013 {
1014 // DBG ("LNKC._DIS\n")
1015 Store (LDIS (PIRC), PIRC)
1016 }
1017
1018 Method (_CRS, 0, NotSerialized)
1019 {
1020 // DBG ("LNKC._CRS\n")
1021 Return (LCRS (PIRC))
1022 }
1023
1024 Method (_SRS, 1, NotSerialized)
1025 {
1026 DBG ("LNKC._SRS: ")
1027 HEX (LSRS (Arg0))
1028 Store (LSRS (Arg0), PIRC)
1029 }
1030 }
1031
1032 // Link D
1033 Device (LNKD)
1034 {
1035 Name (_HID, EisaId ("PNP0C0F"))
1036 Name (_UID, 0x04)
1037 Method (_STA, 0, NotSerialized)
1038 {
1039 // DBG ("LNKD._STA\n")
1040 Return (LSTA (PIRD))
1041 }
1042
1043 Method (_PRS, 0, NotSerialized)
1044 {
1045 // DBG ("LNKD._PRS\n")
1046 Return (PRSD)
1047 }
1048
1049 Method (_DIS, 0, NotSerialized)
1050 {
1051 // DBG ("LNKD._DIS\n")
1052 Store (LDIS (PIRA), PIRD)
1053 }
1054
1055 Method (_CRS, 0, NotSerialized)
1056 {
1057 // DBG ("LNKD._CRS\n")
1058 Return (LCRS (PIRD))
1059 }
1060
1061 Method (_SRS, 1, NotSerialized)
1062 {
1063 DBG ("LNKD._SRS: ")
1064 HEX (LSRS (Arg0))
1065 Store (LSRS (Arg0), PIRD)
1066 }
1067 }
1068 }
1069
1070 // Sx states
1071 Name (_S0, Package (2) {
1072 0x00,
1073 0x00,
1074 })
1075
1076 Name (_S5, Package (2) {
1077 0x05,
1078 0x05,
1079 })
1080
1081 Method (_PTS, 1, NotSerialized)
1082 {
1083 DBG ("Prepare to sleep: ")
1084 HEX (Arg0)
1085 }
1086}
1087
1088/*
1089 * Local Variables:
1090 * comment-start: "//"
1091 * End:
1092 */
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