VirtualBox

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

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

ACPI: returned UCP[123] for saved state compatibility

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
File size: 49.5 KB
Line 
1// $Id: vbox.dsl 20595 2009-06-15 17:38:22Z 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 // So we enable this ACPI object only for certain guests, which do need it,
126 // if by accident Windows guest seen enabled CPU object, just boot from latest
127 // known good configuration, as it remembers state, even if ACPI object gets disabled.
128 Scope (\_PR)
129 {
130 Processor (CPU0, /* Name */
131 0x00, /* Id */
132 0x0, /* Processor IO ports range start */
133 0x0 /* Processor IO ports range length */
134 )
135 {
136 Method (_STA) { Return(\_SB.UCP0) }
137 }
138 Processor (CPU1, /* Name */
139 0x01, /* Id */
140 0x0, /* Processor IO ports range start */
141 0x0 /* Processor IO ports range length */
142 )
143 {
144 }
145 Processor (CPU2, /* Name */
146 0x02, /* Id */
147 0x0, /* Processor IO ports range start */
148 0x0 /* Processor IO ports range length */
149 )
150 {
151 }
152 Processor (CPU3, /* Name */
153 0x03, /* Id */
154 0x0, /* Processor IO ports range start */
155 0x0 /* Processor IO ports range length */
156 )
157 {
158 }
159 Processor (CPU4, /* Name */
160 0x04, /* Id */
161 0x0, /* Processor IO ports range start */
162 0x0 /* Processor IO ports range length */
163 )
164 {
165 }
166 Processor (CPU5, /* Name */
167 0x05, /* Id */
168 0x0, /* Processor IO ports range start */
169 0x0 /* Processor IO ports range length */
170 )
171 {
172 }
173 Processor (CPU6, /* Name */
174 0x06, /* Id */
175 0x0, /* Processor IO ports range start */
176 0x0 /* Processor IO ports range length */
177 )
178 {
179 }
180 Processor (CPU7, /* Name */
181 0x07, /* Id */
182 0x0, /* Processor IO ports range start */
183 0x0 /* Processor IO ports range length */
184 )
185 {
186 }
187 Processor (CPU8, /* Name */
188 0x08, /* Id */
189 0x0, /* Processor IO ports range start */
190 0x0 /* Processor IO ports range length */
191 )
192 {
193 }
194 Processor (CPU9, /* Name */
195 0x09, /* Id */
196 0x0, /* Processor IO ports range start */
197 0x0 /* Processor IO ports range length */
198 )
199 {
200 }
201 Processor (CPUA, /* Name */
202 0x0a, /* Id */
203 0x0, /* Processor IO ports range start */
204 0x0 /* Processor IO ports range length */
205 )
206 {
207 }
208 Processor (CPUB, /* Name */
209 0x0b, /* Id */
210 0x0, /* Processor IO ports range start */
211 0x0 /* Processor IO ports range length */
212 )
213 {
214 }
215 Processor (CPUC, /* Name */
216 0x0c, /* Id */
217 0x0, /* Processor IO ports range start */
218 0x0 /* Processor IO ports range length */
219 )
220 {
221 }
222 Processor (CPUD, /* Name */
223 0x0d, /* Id */
224 0x0, /* Processor IO ports range start */
225 0x0 /* Processor IO ports range length */
226 )
227 {
228 }
229 Processor (CPUE, /* Name */
230 0x0e, /* Id */
231 0x0, /* Processor IO ports range start */
232 0x0 /* Processor IO ports range length */
233 )
234 {
235 }
236 Processor (CPUF, /* Name */
237 0x0f, /* Id */
238 0x0, /* Processor IO ports range start */
239 0x0 /* Processor IO ports range length */
240 )
241 {
242 }
243 Processor (CPUG, /* Name */
244 0x10, /* Id */
245 0x0, /* Processor IO ports range start */
246 0x0 /* Processor IO ports range length */
247 )
248 {
249 }
250 Processor (CPUH, /* Name */
251 0x11, /* Id */
252 0x0, /* Processor IO ports range start */
253 0x0 /* Processor IO ports range length */
254 )
255 {
256 }
257 Processor (CPUI, /* Name */
258 0x12, /* Id */
259 0x0, /* Processor IO ports range start */
260 0x0 /* Processor IO ports range length */
261 )
262 {
263 }
264 Processor (CPUJ, /* Name */
265 0x13, /* Id */
266 0x0, /* Processor IO ports range start */
267 0x0 /* Processor IO ports range length */
268 )
269 {
270 }
271 Processor (CPUK, /* Name */
272 0x14, /* Id */
273 0x0, /* Processor IO ports range start */
274 0x0 /* Processor IO ports range length */
275 )
276 {
277 }
278 Processor (CPUL, /* Name */
279 0x15, /* Id */
280 0x0, /* Processor IO ports range start */
281 0x0 /* Processor IO ports range length */
282 )
283 {
284 }
285 Processor (CPUM, /* Name */
286 0x16, /* Id */
287 0x0, /* Processor IO ports range start */
288 0x0 /* Processor IO ports range length */
289 )
290 {
291 }
292 Processor (CPUN, /* Name */
293 0x17, /* Id */
294 0x0, /* Processor IO ports range start */
295 0x0 /* Processor IO ports range length */
296 )
297 {
298 }
299 Processor (CPUO, /* Name */
300 0x18, /* Id */
301 0x0, /* Processor IO ports range start */
302 0x0 /* Processor IO ports range length */
303 )
304 {
305 }
306 Processor (CPUP, /* Name */
307 0x19, /* Id */
308 0x0, /* Processor IO ports range start */
309 0x0 /* Processor IO ports range length */
310 )
311 {
312 }
313 Processor (CPUQ, /* Name */
314 0x1a, /* Id */
315 0x0, /* Processor IO ports range start */
316 0x0 /* Processor IO ports range length */
317 )
318 {
319 }
320 Processor (CPUR, /* Name */
321 0x1b, /* Id */
322 0x0, /* Processor IO ports range start */
323 0x0 /* Processor IO ports range length */
324 )
325 {
326 }
327 Processor (CPUS, /* Name */
328 0x1c, /* Id */
329 0x0, /* Processor IO ports range start */
330 0x0 /* Processor IO ports range length */
331 )
332 {
333 }
334 Processor (CPUT, /* Name */
335 0x1d, /* Id */
336 0x0, /* Processor IO ports range start */
337 0x0 /* Processor IO ports range length */
338 )
339 {
340 }
341 Processor (CPUU, /* Name */
342 0x1e, /* Id */
343 0x0, /* Processor IO ports range start */
344 0x0 /* Processor IO ports range length */
345 )
346 {
347 }
348 Processor (CPUV, /* Name */
349 0x1f, /* Id */
350 0x0, /* Processor IO ports range start */
351 0x0 /* Processor IO ports range length */
352 )
353 {
354 }
355
356 }
357
358 Scope (\_SB)
359 {
360 OperationRegion (SYSI, SystemIO, 0x4048, 0x08)
361 Field (SYSI, DwordAcc, NoLock, Preserve)
362 {
363 IDX0, 32,
364 DAT0, 32,
365 }
366
367 IndexField (IDX0, DAT0, DwordAcc, NoLock, Preserve)
368 {
369 MEML, 32,
370 UIOA, 32,
371 UHPT, 32,
372 USMC, 32,
373 UFDC, 32,
374 // @todo: maybe make it bitmask instead?
375 UCP0, 32,
376 UCP1, 32,
377 UCP2, 32,
378 UCP3, 32,
379 MEMH, 32,
380 URTC, 32,
381 Offset (0x80),
382 ININ, 32,
383 Offset (0x200),
384 VAIN, 32,
385 }
386
387 Method (_INI, 0, NotSerialized)
388 {
389 Store (0xbadc0de, VAIN)
390 DBG ("MEML: ")
391 HEX4 (MEML)
392 DBG ("UIOA: ")
393 HEX4 (UIOA)
394 DBG ("UHPT: ")
395 HEX4 (UHPT)
396 DBG ("USMC: ")
397 HEX4 (USMC)
398 DBG ("UFDC: ")
399 HEX4 (UFDC)
400 DBG ("UCP0: ")
401 HEX4 (UCP0)
402 DBG ("MEMH: ")
403 HEX4 (MEMH)
404 }
405
406 // PCI PIC IRQ Routing table
407 // Must match pci.c:pci_slot_get_pirq
408 Name (PR00, Package ()
409 {
410 Package (0x04) {0x0002FFFF, 0x00, LNKB, 0x00,},
411 Package (0x04) {0x0002FFFF, 0x01, LNKC, 0x00,},
412 Package (0x04) {0x0002FFFF, 0x02, LNKD, 0x00,},
413 Package (0x04) {0x0002FFFF, 0x03, LNKA, 0x00,},
414
415 Package (0x04) {0x0003FFFF, 0x00, LNKC, 0x00,},
416 Package (0x04) {0x0003FFFF, 0x01, LNKD, 0x00,},
417 Package (0x04) {0x0003FFFF, 0x02, LNKA, 0x00,},
418 Package (0x04) {0x0003FFFF, 0x03, LNKB, 0x00,},
419
420 Package (0x04) {0x0004FFFF, 0x00, LNKD, 0x00,},
421 Package (0x04) {0x0004FFFF, 0x01, LNKA, 0x00,},
422 Package (0x04) {0x0004FFFF, 0x02, LNKB, 0x00,},
423 Package (0x04) {0x0004FFFF, 0x03, LNKC, 0x00,},
424
425 Package (0x04) {0x0005FFFF, 0x00, LNKA, 0x00,},
426 Package (0x04) {0x0005FFFF, 0x01, LNKB, 0x00,},
427 Package (0x04) {0x0005FFFF, 0x02, LNKC, 0x00,},
428 Package (0x04) {0x0005FFFF, 0x03, LNKD, 0x00,},
429
430 Package (0x04) {0x0006FFFF, 0x00, LNKB, 0x00,},
431 Package (0x04) {0x0006FFFF, 0x01, LNKC, 0x00,},
432 Package (0x04) {0x0006FFFF, 0x02, LNKD, 0x00,},
433 Package (0x04) {0x0006FFFF, 0x03, LNKA, 0x00,},
434
435 Package (0x04) {0x0007FFFF, 0x00, LNKC, 0x00,},
436 Package (0x04) {0x0007FFFF, 0x01, LNKD, 0x00,},
437 Package (0x04) {0x0007FFFF, 0x02, LNKA, 0x00,},
438 Package (0x04) {0x0007FFFF, 0x03, LNKB, 0x00,},
439
440 Package (0x04) {0x0008FFFF, 0x00, LNKD, 0x00,},
441 Package (0x04) {0x0008FFFF, 0x01, LNKA, 0x00,},
442 Package (0x04) {0x0008FFFF, 0x02, LNKB, 0x00,},
443 Package (0x04) {0x0008FFFF, 0x03, LNKC, 0x00,},
444
445 Package (0x04) {0x0009FFFF, 0x00, LNKA, 0x00,},
446 Package (0x04) {0x0009FFFF, 0x01, LNKB, 0x00,},
447 Package (0x04) {0x0009FFFF, 0x02, LNKC, 0x00,},
448 Package (0x04) {0x0009FFFF, 0x03, LNKD, 0x00,},
449
450 Package (0x04) {0x000AFFFF, 0x00, LNKB, 0x00,},
451 Package (0x04) {0x000AFFFF, 0x01, LNKC, 0x00,},
452 Package (0x04) {0x000AFFFF, 0x02, LNKD, 0x00,},
453 Package (0x04) {0x000AFFFF, 0x03, LNKA, 0x00,},
454
455 Package (0x04) {0x000BFFFF, 0x00, LNKC, 0x00,},
456 Package (0x04) {0x000BFFFF, 0x01, LNKD, 0x00,},
457 Package (0x04) {0x000BFFFF, 0x02, LNKA, 0x00,},
458 Package (0x04) {0x000BFFFF, 0x03, LNKB, 0x00,},
459
460 Package (0x04) {0x000CFFFF, 0x00, LNKD, 0x00,},
461 Package (0x04) {0x000CFFFF, 0x01, LNKA, 0x00,},
462 Package (0x04) {0x000CFFFF, 0x02, LNKB, 0x00,},
463 Package (0x04) {0x000CFFFF, 0x03, LNKC, 0x00,},
464
465 Package (0x04) {0x000DFFFF, 0x00, LNKA, 0x00,},
466 Package (0x04) {0x000DFFFF, 0x01, LNKB, 0x00,},
467 Package (0x04) {0x000DFFFF, 0x02, LNKC, 0x00,},
468 Package (0x04) {0x000DFFFF, 0x03, LNKD, 0x00,},
469
470 Package (0x04) {0x000EFFFF, 0x00, LNKB, 0x00,},
471 Package (0x04) {0x000EFFFF, 0x01, LNKC, 0x00,},
472 Package (0x04) {0x000EFFFF, 0x02, LNKD, 0x00,},
473 Package (0x04) {0x000EFFFF, 0x03, LNKA, 0x00,},
474
475 Package (0x04) {0x000FFFFF, 0x00, LNKC, 0x00,},
476 Package (0x04) {0x000FFFFF, 0x01, LNKD, 0x00,},
477 Package (0x04) {0x000FFFFF, 0x02, LNKA, 0x00,},
478 Package (0x04) {0x000FFFFF, 0x03, LNKB, 0x00,},
479
480 Package (0x04) {0x0010FFFF, 0x00, LNKD, 0x00,},
481 Package (0x04) {0x0010FFFF, 0x01, LNKA, 0x00,},
482 Package (0x04) {0x0010FFFF, 0x02, LNKB, 0x00,},
483 Package (0x04) {0x0010FFFF, 0x03, LNKC, 0x00,},
484
485 Package (0x04) {0x0011FFFF, 0x00, LNKA, 0x00,},
486 Package (0x04) {0x0011FFFF, 0x01, LNKB, 0x00,},
487 Package (0x04) {0x0011FFFF, 0x02, LNKC, 0x00,},
488 Package (0x04) {0x0011FFFF, 0x03, LNKD, 0x00,},
489
490 Package (0x04) {0x0012FFFF, 0x00, LNKB, 0x00,},
491 Package (0x04) {0x0012FFFF, 0x01, LNKC, 0x00,},
492 Package (0x04) {0x0012FFFF, 0x02, LNKD, 0x00,},
493 Package (0x04) {0x0012FFFF, 0x03, LNKA, 0x00,},
494
495 Package (0x04) {0x0013FFFF, 0x00, LNKC, 0x00,},
496 Package (0x04) {0x0013FFFF, 0x01, LNKD, 0x00,},
497 Package (0x04) {0x0013FFFF, 0x02, LNKA, 0x00,},
498 Package (0x04) {0x0013FFFF, 0x03, LNKB, 0x00,},
499
500 Package (0x04) {0x0014FFFF, 0x00, LNKD, 0x00,},
501 Package (0x04) {0x0014FFFF, 0x01, LNKA, 0x00,},
502 Package (0x04) {0x0014FFFF, 0x02, LNKB, 0x00,},
503 Package (0x04) {0x0014FFFF, 0x03, LNKC, 0x00,},
504
505 Package (0x04) {0x0015FFFF, 0x00, LNKA, 0x00,},
506 Package (0x04) {0x0015FFFF, 0x01, LNKB, 0x00,},
507 Package (0x04) {0x0015FFFF, 0x02, LNKC, 0x00,},
508 Package (0x04) {0x0015FFFF, 0x03, LNKD, 0x00,},
509
510 Package (0x04) {0x0016FFFF, 0x00, LNKB, 0x00,},
511 Package (0x04) {0x0016FFFF, 0x01, LNKC, 0x00,},
512 Package (0x04) {0x0016FFFF, 0x02, LNKD, 0x00,},
513 Package (0x04) {0x0016FFFF, 0x03, LNKA, 0x00,},
514
515 Package (0x04) {0x0017FFFF, 0x00, LNKC, 0x00,},
516 Package (0x04) {0x0017FFFF, 0x01, LNKD, 0x00,},
517 Package (0x04) {0x0017FFFF, 0x02, LNKA, 0x00,},
518 Package (0x04) {0x0017FFFF, 0x03, LNKB, 0x00,},
519
520 Package (0x04) {0x0018FFFF, 0x00, LNKD, 0x00,},
521 Package (0x04) {0x0018FFFF, 0x01, LNKA, 0x00,},
522 Package (0x04) {0x0018FFFF, 0x02, LNKB, 0x00,},
523 Package (0x04) {0x0018FFFF, 0x03, LNKC, 0x00,},
524
525 Package (0x04) {0x0019FFFF, 0x00, LNKA, 0x00,},
526 Package (0x04) {0x0019FFFF, 0x01, LNKB, 0x00,},
527 Package (0x04) {0x0019FFFF, 0x02, LNKC, 0x00,},
528 Package (0x04) {0x0019FFFF, 0x03, LNKD, 0x00,},
529
530 Package (0x04) {0x001AFFFF, 0x00, LNKB, 0x00,},
531 Package (0x04) {0x001AFFFF, 0x01, LNKC, 0x00,},
532 Package (0x04) {0x001AFFFF, 0x02, LNKD, 0x00,},
533 Package (0x04) {0x001AFFFF, 0x03, LNKA, 0x00,},
534
535 Package (0x04) {0x001BFFFF, 0x00, LNKC, 0x00,},
536 Package (0x04) {0x001BFFFF, 0x01, LNKD, 0x00,},
537 Package (0x04) {0x001BFFFF, 0x02, LNKA, 0x00,},
538 Package (0x04) {0x001BFFFF, 0x03, LNKB, 0x00,},
539
540 Package (0x04) {0x001CFFFF, 0x00, LNKD, 0x00,},
541 Package (0x04) {0x001CFFFF, 0x01, LNKA, 0x00,},
542 Package (0x04) {0x001CFFFF, 0x02, LNKB, 0x00,},
543 Package (0x04) {0x001CFFFF, 0x03, LNKC, 0x00,},
544
545 Package (0x04) {0x001DFFFF, 0x00, LNKA, 0x00,},
546 Package (0x04) {0x001DFFFF, 0x01, LNKB, 0x00,},
547 Package (0x04) {0x001DFFFF, 0x02, LNKC, 0x00,},
548 Package (0x04) {0x001DFFFF, 0x03, LNKD, 0x00,},
549
550 Package (0x04) {0x001EFFFF, 0x00, LNKB, 0x00,},
551 Package (0x04) {0x001EFFFF, 0x01, LNKC, 0x00,},
552 Package (0x04) {0x001EFFFF, 0x02, LNKD, 0x00,},
553 Package (0x04) {0x001EFFFF, 0x03, LNKA, 0x00,},
554
555 Package (0x04) {0x001FFFFF, 0x00, LNKC, 0x00,},
556 Package (0x04) {0x001FFFFF, 0x01, LNKD, 0x00,},
557 Package (0x04) {0x001FFFFF, 0x02, LNKA, 0x00,},
558 Package (0x04) {0x001FFFFF, 0x03, LNKB, 0x00,}
559 })
560
561 // PCI I/O APIC IRQ Routing table
562 // Must match pci.c:pci_slot_get_acpi_pirq
563 Name (PR01, Package ()
564 {
565 Package (0x04) {0x0002FFFF, 0x00, 0x00, 0x12,},
566 Package (0x04) {0x0002FFFF, 0x01, 0x00, 0x13,},
567 Package (0x04) {0x0002FFFF, 0x02, 0x00, 0x14,},
568 Package (0x04) {0x0002FFFF, 0x03, 0x00, 0x15,},
569
570 Package (0x04) {0x0003FFFF, 0x00, 0x00, 0x13,},
571 Package (0x04) {0x0003FFFF, 0x01, 0x00, 0x14,},
572 Package (0x04) {0x0003FFFF, 0x02, 0x00, 0x15,},
573 Package (0x04) {0x0003FFFF, 0x03, 0x00, 0x16,},
574
575 Package (0x04) {0x0004FFFF, 0x00, 0x00, 0x14,},
576 Package (0x04) {0x0004FFFF, 0x01, 0x00, 0x15,},
577 Package (0x04) {0x0004FFFF, 0x02, 0x00, 0x16,},
578 Package (0x04) {0x0004FFFF, 0x03, 0x00, 0x17,},
579
580 Package (0x04) {0x0005FFFF, 0x00, 0x00, 0x15,},
581 Package (0x04) {0x0005FFFF, 0x01, 0x00, 0x16,},
582 Package (0x04) {0x0005FFFF, 0x02, 0x00, 0x17,},
583 Package (0x04) {0x0005FFFF, 0x03, 0x00, 0x10,},
584
585 Package (0x04) {0x0006FFFF, 0x00, 0x00, 0x16,},
586 Package (0x04) {0x0006FFFF, 0x01, 0x00, 0x17,},
587 Package (0x04) {0x0006FFFF, 0x02, 0x00, 0x10,},
588 Package (0x04) {0x0006FFFF, 0x03, 0x00, 0x11,},
589
590 Package (0x04) {0x0007FFFF, 0x00, 0x00, 0x17,},
591 Package (0x04) {0x0007FFFF, 0x01, 0x00, 0x10,},
592 Package (0x04) {0x0007FFFF, 0x02, 0x00, 0x11,},
593 Package (0x04) {0x0007FFFF, 0x03, 0x00, 0x12,},
594
595 Package (0x04) {0x0008FFFF, 0x00, 0x00, 0x10,},
596 Package (0x04) {0x0008FFFF, 0x01, 0x00, 0x11,},
597 Package (0x04) {0x0008FFFF, 0x02, 0x00, 0x12,},
598 Package (0x04) {0x0008FFFF, 0x03, 0x00, 0x13,},
599
600 Package (0x04) {0x0009FFFF, 0x00, 0x00, 0x11,},
601 Package (0x04) {0x0009FFFF, 0x01, 0x00, 0x12,},
602 Package (0x04) {0x0009FFFF, 0x02, 0x00, 0x13,},
603 Package (0x04) {0x0009FFFF, 0x03, 0x00, 0x14,},
604
605 Package (0x04) {0x000AFFFF, 0x00, 0x00, 0x12,},
606 Package (0x04) {0x000AFFFF, 0x01, 0x00, 0x13,},
607 Package (0x04) {0x000AFFFF, 0x02, 0x00, 0x14,},
608 Package (0x04) {0x000AFFFF, 0x03, 0x00, 0x15,},
609
610 Package (0x04) {0x000BFFFF, 0x00, 0x00, 0x13,},
611 Package (0x04) {0x000BFFFF, 0x01, 0x00, 0x14,},
612 Package (0x04) {0x000BFFFF, 0x02, 0x00, 0x15,},
613 Package (0x04) {0x000BFFFF, 0x03, 0x00, 0x16,},
614
615 Package (0x04) {0x000CFFFF, 0x00, 0x00, 0x14,},
616 Package (0x04) {0x000CFFFF, 0x01, 0x00, 0x15,},
617 Package (0x04) {0x000CFFFF, 0x02, 0x00, 0x16,},
618 Package (0x04) {0x000CFFFF, 0x03, 0x00, 0x17,},
619
620 Package (0x04) {0x000DFFFF, 0x00, 0x00, 0x15,},
621 Package (0x04) {0x000DFFFF, 0x01, 0x00, 0x16,},
622 Package (0x04) {0x000DFFFF, 0x02, 0x00, 0x17,},
623 Package (0x04) {0x000DFFFF, 0x03, 0x00, 0x10,},
624
625 Package (0x04) {0x000EFFFF, 0x00, 0x00, 0x16,},
626 Package (0x04) {0x000EFFFF, 0x01, 0x00, 0x17,},
627 Package (0x04) {0x000EFFFF, 0x02, 0x00, 0x10,},
628 Package (0x04) {0x000EFFFF, 0x03, 0x00, 0x11,},
629
630 Package (0x04) {0x000FFFFF, 0x00, 0x00, 0x17,},
631 Package (0x04) {0x000FFFFF, 0x01, 0x00, 0x10,},
632 Package (0x04) {0x000FFFFF, 0x02, 0x00, 0x11,},
633 Package (0x04) {0x000FFFFF, 0x03, 0x00, 0x12,},
634
635 Package (0x04) {0x0010FFFF, 0x00, 0x00, 0x10,},
636 Package (0x04) {0x0010FFFF, 0x01, 0x00, 0x11,},
637 Package (0x04) {0x0010FFFF, 0x02, 0x00, 0x12,},
638 Package (0x04) {0x0010FFFF, 0x03, 0x00, 0x13,},
639
640 Package (0x04) {0x0011FFFF, 0x00, 0x00, 0x11,},
641 Package (0x04) {0x0011FFFF, 0x01, 0x00, 0x12,},
642 Package (0x04) {0x0011FFFF, 0x02, 0x00, 0x13,},
643 Package (0x04) {0x0011FFFF, 0x03, 0x00, 0x14,},
644
645 Package (0x04) {0x0012FFFF, 0x00, 0x00, 0x12,},
646 Package (0x04) {0x0012FFFF, 0x01, 0x00, 0x13,},
647 Package (0x04) {0x0012FFFF, 0x02, 0x00, 0x14,},
648 Package (0x04) {0x0012FFFF, 0x03, 0x00, 0x15,},
649
650 Package (0x04) {0x0013FFFF, 0x00, 0x00, 0x13,},
651 Package (0x04) {0x0013FFFF, 0x01, 0x00, 0x14,},
652 Package (0x04) {0x0013FFFF, 0x02, 0x00, 0x15,},
653 Package (0x04) {0x0013FFFF, 0x03, 0x00, 0x16,},
654
655 Package (0x04) {0x0014FFFF, 0x00, 0x00, 0x14,},
656 Package (0x04) {0x0014FFFF, 0x01, 0x00, 0x15,},
657 Package (0x04) {0x0014FFFF, 0x02, 0x00, 0x16,},
658 Package (0x04) {0x0014FFFF, 0x03, 0x00, 0x17,},
659
660 Package (0x04) {0x0015FFFF, 0x00, 0x00, 0x15,},
661 Package (0x04) {0x0015FFFF, 0x01, 0x00, 0x16,},
662 Package (0x04) {0x0015FFFF, 0x02, 0x00, 0x17,},
663 Package (0x04) {0x0015FFFF, 0x03, 0x00, 0x10,},
664
665 Package (0x04) {0x0016FFFF, 0x00, 0x00, 0x16,},
666 Package (0x04) {0x0016FFFF, 0x01, 0x00, 0x17,},
667 Package (0x04) {0x0016FFFF, 0x02, 0x00, 0x10,},
668 Package (0x04) {0x0016FFFF, 0x03, 0x00, 0x11,},
669
670 Package (0x04) {0x0017FFFF, 0x00, 0x00, 0x17,},
671 Package (0x04) {0x0017FFFF, 0x01, 0x00, 0x10,},
672 Package (0x04) {0x0017FFFF, 0x02, 0x00, 0x11,},
673 Package (0x04) {0x0017FFFF, 0x03, 0x00, 0x12,},
674
675 Package (0x04) {0x0018FFFF, 0x00, 0x00, 0x10,},
676 Package (0x04) {0x0018FFFF, 0x01, 0x00, 0x11,},
677 Package (0x04) {0x0018FFFF, 0x02, 0x00, 0x12,},
678 Package (0x04) {0x0018FFFF, 0x03, 0x00, 0x13,},
679
680 Package (0x04) {0x0019FFFF, 0x00, 0x00, 0x11,},
681 Package (0x04) {0x0019FFFF, 0x01, 0x00, 0x12,},
682 Package (0x04) {0x0019FFFF, 0x02, 0x00, 0x13,},
683 Package (0x04) {0x0019FFFF, 0x03, 0x00, 0x14,},
684
685 Package (0x04) {0x001AFFFF, 0x00, 0x00, 0x12,},
686 Package (0x04) {0x001AFFFF, 0x01, 0x00, 0x13,},
687 Package (0x04) {0x001AFFFF, 0x02, 0x00, 0x14,},
688 Package (0x04) {0x001AFFFF, 0x03, 0x00, 0x15,},
689
690 Package (0x04) {0x001BFFFF, 0x00, 0x00, 0x13,},
691 Package (0x04) {0x001BFFFF, 0x01, 0x00, 0x14,},
692 Package (0x04) {0x001BFFFF, 0x02, 0x00, 0x15,},
693 Package (0x04) {0x001BFFFF, 0x03, 0x00, 0x16,},
694
695 Package (0x04) {0x001CFFFF, 0x00, 0x00, 0x14,},
696 Package (0x04) {0x001CFFFF, 0x01, 0x00, 0x15,},
697 Package (0x04) {0x001CFFFF, 0x02, 0x00, 0x16,},
698 Package (0x04) {0x001CFFFF, 0x03, 0x00, 0x17,},
699
700 Package (0x04) {0x001DFFFF, 0x00, 0x00, 0x15,},
701 Package (0x04) {0x001DFFFF, 0x01, 0x00, 0x16,},
702 Package (0x04) {0x001DFFFF, 0x02, 0x00, 0x17,},
703 Package (0x04) {0x001DFFFF, 0x03, 0x00, 0x10,},
704
705 Package (0x04) {0x001EFFFF, 0x00, 0x00, 0x16,},
706 Package (0x04) {0x001EFFFF, 0x01, 0x00, 0x17,},
707 Package (0x04) {0x001EFFFF, 0x02, 0x00, 0x10,},
708 Package (0x04) {0x001EFFFF, 0x03, 0x00, 0x11,},
709
710 Package (0x04) {0x001FFFFF, 0x00, 0x00, 0x17,},
711 Package (0x04) {0x001FFFFF, 0x01, 0x00, 0x10,},
712 Package (0x04) {0x001FFFFF, 0x02, 0x00, 0x11,},
713 Package (0x04) {0x001FFFFF, 0x03, 0x00, 0x12,}
714 })
715
716 // Possible resource settings for PCI link A
717 Name (PRSA, ResourceTemplate ()
718 {
719 IRQ (Level, ActiveLow, Shared) {5,9,10,11}
720 })
721
722 // Possible resource settings for PCI link B
723 Name (PRSB, ResourceTemplate ()
724 {
725 IRQ (Level, ActiveLow, Shared) {5,9,10,11}
726 })
727
728 // Possible resource settings for PCI link C
729 Name (PRSC, ResourceTemplate ()
730 {
731 IRQ (Level, ActiveLow, Shared) {5,9,10,11}
732 })
733
734 // Possible resource settings for PCI link D
735 Name (PRSD, ResourceTemplate ()
736 {
737 IRQ (Level, ActiveLow, Shared) {5,9,10,11}
738 })
739
740 // PCI bus 0
741 Device (PCI0)
742 {
743 Name (_HID, EisaId ("PNP0A03"))
744 Name (_ADR, 0x00) // address
745 Name (_BBN, 0x00) // base bus adddress
746 Name (_UID, 0x00)
747
748 // Method that returns routing table
749 Method (_PRT, 0, NotSerialized)
750 {
751 if (LEqual (LAnd (PICM, UIOA), Zero)) {
752 DBG ("RETURNING PIC\n")
753 Store (0x00, \_SB.PCI0.SBRG.APDE)
754 Store (0x00, \_SB.PCI0.SBRG.APAD)
755 Return (PR00)
756 }
757 else {
758 DBG ("RETURNING APIC\n")
759 Store (0xbe, \_SB.PCI0.SBRG.APDE)
760 Store (0xef, \_SB.PCI0.SBRG.APAD)
761 Return (PR01)
762 }
763 }
764
765 Device (SBRG)
766 {
767 // Address of the PIIX3 (device 1 function 0)
768 Name (_ADR, 0x00010000)
769 OperationRegion (PCIC, PCI_Config, 0x00, 0xff)
770
771 Field (PCIC, ByteAcc, NoLock, Preserve)
772 {
773 Offset (0xad),
774 APAD, 8,
775 Offset (0xde),
776 APDE, 8,
777 }
778
779 // Keyboard device
780 Device (PS2K)
781 {
782 Name (_HID, EisaId ("PNP0303"))
783 Method (_STA, 0, NotSerialized)
784 {
785 Return (0x0F)
786 }
787
788 Name (_CRS, ResourceTemplate ()
789 {
790 IO (Decode16, 0x0060, 0x0060, 0x00, 0x01)
791 IO (Decode16, 0x0064, 0x0064, 0x00, 0x01)
792 IRQNoFlags () {1}
793 })
794 }
795
796 // DMA Controller
797 Device (DMAC)
798 {
799 Name (_HID, EisaId ("PNP0200"))
800 Name (_CRS, ResourceTemplate ()
801 {
802 IO (Decode16, 0x0000, 0x0000, 0x01, 0x10)
803 IO (Decode16, 0x0080, 0x0080, 0x01, 0x10)
804 IO (Decode16, 0x00C0, 0x00C0, 0x01, 0x20)
805 DMA (Compatibility, BusMaster, Transfer8_16) {4}
806 })
807 }
808
809 // Floppy disk controller
810 Device (FDC0)
811 {
812 Name (_HID, EisaId ("PNP0700"))
813
814 Method (_STA, 0, NotSerialized)
815 {
816 Return (UFDC)
817 }
818
819 // Current resource settings
820 Name (_CRS, ResourceTemplate ()
821 {
822 IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
823 IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
824 IRQNoFlags () {6}
825 DMA (Compatibility, NotBusMaster, Transfer8) {2}
826 })
827
828 // Possible resource settings
829 Name (_PRS, ResourceTemplate ()
830 {
831 IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
832 IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
833 IRQNoFlags () {6}
834 DMA (Compatibility, NotBusMaster, Transfer8) {2}
835 })
836
837 }
838
839 // Mouse device
840 Device (PS2M)
841 {
842 Name (_HID, EisaId ("PNP0F03"))
843 Method (_STA, 0, NotSerialized)
844 {
845 Return (0x0F)
846 }
847
848 Name (_CRS, ResourceTemplate ()
849 {
850 IO (Decode16, 0x0060, 0x0060, 0x00, 0x01)
851 IO (Decode16, 0x0064, 0x0064, 0x00, 0x01)
852 IRQNoFlags () {12}
853 })
854 }
855
856 // Parallel port
857 Device (LPT)
858 {
859 Name (_HID, EisaId ("PNP0400"))
860 Method (_STA, 0, NotSerialized)
861 {
862 Return (0x0F)
863 }
864 Name (_CRS, ResourceTemplate ()
865 {
866 IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
867 IO (Decode16, 0x0778, 0x0778, 0x08, 0x08)
868 IRQNoFlags () {7}
869 })
870 }
871 }
872
873 // Control method battery
874 Device (BAT0)
875 {
876 Name (_HID, EisaId ("PNP0C0A"))
877 Name (_UID, 0x00)
878
879 Scope (\_GPE)
880 {
881 // GPE bit 0 handler
882 // GPE.0 must be set and SCI raised when
883 // battery info changed and _BIF must be
884 // re-evaluated
885 Method (_L00, 0, NotSerialized)
886 {
887 Notify (\_SB.PCI0.BAT0, 0x81)
888 }
889 }
890
891 OperationRegion (CBAT, SystemIO, 0x4040, 0x08)
892 Field (CBAT, DwordAcc, NoLock, Preserve)
893 {
894 IDX0, 32,
895 DAT0, 32,
896 }
897
898 IndexField (IDX0, DAT0, DwordAcc, NoLock, Preserve)
899 {
900 STAT, 32,
901 PRAT, 32,
902 RCAP, 32,
903 PVOL, 32,
904
905 UNIT, 32,
906 DCAP, 32,
907 LFCP, 32,
908 BTEC, 32,
909 DVOL, 32,
910 DWRN, 32,
911 DLOW, 32,
912 GRN1, 32,
913 GRN2, 32,
914
915 BSTA, 32,
916 APSR, 32,
917 }
918
919 Method (_STA, 0, NotSerialized)
920 {
921 return (BSTA)
922 }
923
924 Name (PBIF, Package ()
925 {
926 0x01, // Power unit, 1 - mA
927 0x7fffffff, // Design capacity
928 0x7fffffff, // Last full charge capacity
929 0x00, // Battery technology
930 0xffffffff, // Design voltage
931 0x00, // Design capacity of Warning
932 0x00, // Design capacity of Low
933 0x04, // Battery capacity granularity 1
934 0x04, // Battery capacity granularity 2
935 "1", // Model number
936 "0", // Serial number
937 "VBOX", // Battery type
938 "innotek" // OEM Information
939 })
940
941 Name (PBST, Package () {
942 0, // Battery state
943 0x7fffffff, // Battery present rate
944 0x7fffffff, // Battery remaining capacity
945 0x7fffffff // Battery present voltage
946 })
947
948 // Battery information
949 Method (_BIF, 0, NotSerialized)
950 {
951 Store (UNIT, Index (PBIF, 0,))
952 Store (DCAP, Index (PBIF, 1,))
953 Store (LFCP, Index (PBIF, 2,))
954 Store (BTEC, Index (PBIF, 3,))
955 Store (DVOL, Index (PBIF, 4,))
956 Store (DWRN, Index (PBIF, 5,))
957 Store (DLOW, Index (PBIF, 6,))
958 Store (GRN1, Index (PBIF, 7,))
959 Store (GRN2, Index (PBIF, 8,))
960
961 DBG ("_BIF:\n")
962 HEX4 (DerefOf (Index (PBIF, 0,)))
963 HEX4 (DerefOf (Index (PBIF, 1,)))
964 HEX4 (DerefOf (Index (PBIF, 2,)))
965 HEX4 (DerefOf (Index (PBIF, 3,)))
966 HEX4 (DerefOf (Index (PBIF, 4,)))
967 HEX4 (DerefOf (Index (PBIF, 5,)))
968 HEX4 (DerefOf (Index (PBIF, 6,)))
969 HEX4 (DerefOf (Index (PBIF, 7,)))
970 HEX4 (DerefOf (Index (PBIF, 8,)))
971
972 return (PBIF)
973 }
974
975 // Battery status
976 Method (_BST, 0, NotSerialized)
977 {
978 Store (STAT, Index (PBST, 0,))
979 Store (PRAT, Index (PBST, 1,))
980 Store (RCAP, Index (PBST, 2,))
981 Store (PVOL, Index (PBST, 3,))
982/*
983 DBG ("_BST:\n")
984 HEX4 (DerefOf (Index (PBST, 0,)))
985 HEX4 (DerefOf (Index (PBST, 1,)))
986 HEX4 (DerefOf (Index (PBST, 2,)))
987 HEX4 (DerefOf (Index (PBST, 3,)))
988*/
989 return (PBST)
990 }
991 }
992
993 Device (AC)
994 {
995 Name (_HID, "ACPI0003")
996 Name (_UID, 0x00)
997 Name (_PCL, Package (0x01)
998 {
999 \_SB
1000 })
1001
1002 Method (_PSR, 0, NotSerialized)
1003 {
1004 // DBG ("_PSR:\n")
1005 // HEX4 (\_SB.PCI0.BAT0.APSR)
1006 return (\_SB.PCI0.BAT0.APSR)
1007 }
1008
1009 Method (_STA, 0, NotSerialized)
1010 {
1011 return (0x0f)
1012 }
1013 }
1014 }
1015 }
1016
1017 Scope (\_SB)
1018 {
1019 Scope (PCI0)
1020 {
1021 // PCI0 current resource settings
1022 Name (CRS, ResourceTemplate ()
1023 {
1024 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
1025 0x0000,
1026 0x0000,
1027 0x00FF,
1028 0x0000,
1029 0x0100)
1030 IO (Decode16, 0x0CF8, 0x0CF8, 0x01, 0x08)
1031 WordIO (ResourceProducer, MinFixed, MaxFixed,
1032 PosDecode, EntireRange,
1033 0x0000,
1034 0x0000,
1035 0x0CF7,
1036 0x0000,
1037 0x0CF8)
1038 WordIO (ResourceProducer, MinFixed, MaxFixed,
1039 PosDecode, EntireRange,
1040 0x0000,
1041 0x0D00,
1042 0xFFFF,
1043 0x0000,
1044 0xF300)
1045
1046 /* Taken from ACPI faq (with some modifications) */
1047 DwordMemory( // descriptor for video RAM behind ISA bus
1048 ResourceProducer, // bit 0 of general flags is 0
1049 PosDecode,
1050 MinFixed, // Range is fixed
1051 MaxFixed, // Range is Fixed
1052 Cacheable,
1053 ReadWrite,
1054 0x00000000, // Granularity
1055 0x000a0000, // Min
1056 0x000bffff, // Max
1057 0x00000000, // Translation
1058 0x00020000 // Range Length
1059 )
1060
1061 DwordMemory( // Consumed-and-produced resource
1062 // (all of low memory space)
1063 ResourceProducer, // bit 0 of general flags is 0
1064 PosDecode, // positive Decode
1065 MinFixed, // Range is fixed
1066 MaxFixed, // Range is fixed
1067 Cacheable,
1068 ReadWrite,
1069 0x00000000, // Granularity
1070 0x00000000, // Min (calculated dynamically)
1071
1072 0xffdfffff, // Max = 4GB - 2MB
1073 0x00000000, // Translation
1074 0xdfdfffff, // Range Length (calculated
1075 // dynamically)
1076 , // Optional field left blank
1077 , // Optional field left blank
1078 MEM3 // Name declaration for this
1079 // descriptor
1080 )
1081 })
1082
1083// Name (TOM, ResourceTemplate () // Memory above 4GB (aka high), appended when needed.
1084// {
1085// QWORDMemory(
1086// ResourceProducer, // bit 0 of general flags is 0
1087// PosDecode, // positive Decode
1088// MinFixed, // Range is fixed
1089// MaxFixed, // Range is fixed
1090// Cacheable,
1091// ReadWrite,
1092// 0x0000000000000000, // _GRA: Granularity.
1093// 0 /*0x0000000100000000*/, // _MIN: Min address, 4GB.
1094// 0 /*0x00000fffffffffff*/, // _MAX: Max possible address, 16TB.
1095// 0x0000000000000000, // _TRA: Translation
1096// 0x0000000000000000, // _LEN: Range length (calculated dynamically)
1097// , // ResourceSourceIndex: Optional field left blank
1098// , // ResourceSource: Optional field left blank
1099// MEM4 // Name declaration for this descriptor.
1100// )
1101// })
1102
1103 Method (_CRS, 0, NotSerialized)
1104 {
1105 CreateDwordField (CRS, \_SB.PCI0.MEM3._MIN, RAMT)
1106 CreateDwordField (CRS, \_SB.PCI0.MEM3._LEN, RAMR)
1107// CreateQwordField (TOM, \_SB.PCI0.MEM4._LEN, TM4L)
1108// CreateQwordField (TOM, \_SB.PCI0.MEM4._LEN, TM4N)
1109// CreateQwordField (TOM, \_SB.PCI0.MEM4._LEN, TM4X)
1110
1111 Store (MEML, RAMT)
1112 Subtract (0xffe00000, RAMT, RAMR)
1113
1114// If (LNotEqual (MEMH, 0x00000000))
1115// {
1116// //
1117// // Update the TOM resource template and append it to CRS.
1118// // This way old < 4GB guest doesn't see anything different.
1119// // (MEMH is the memory above 4GB specified in 64KB units.)
1120// //
1121// // Note: ACPI v2 doesn't do 32-bit integers. IASL may fail on
1122// // seeing 64-bit constants and the code probably wont work.
1123// //
1124// Store (1, TM4N)
1125// ShiftLeft (TM4N, 32, TM4N)
1126//
1127// Store (0x00000fff, TM4X)
1128// ShiftLeft (TM4X, 32, TM4X)
1129// Or (TM4X, 0xffffffff, TM4X)
1130//
1131// Store (MEMH, TM4L)
1132// ShiftLeft (TM4L, 16, TM4L)
1133//
1134// ConcatenateResTemplate (CRS, TOM, Local2)
1135// Return (Local2)
1136// }
1137
1138 Return (CRS)
1139 }
1140 }
1141 }
1142
1143 Scope (\_SB)
1144 {
1145 // High Precision Event Timer
1146 Device(HPET) {
1147 Name(_HID, EISAID("PNP0103"))
1148 Name (_CID, 0x010CD041)
1149 Name(_UID, 0)
1150 Method (_STA, 0, NotSerialized) {
1151 Return(UHPT)
1152 }
1153 Name(_CRS, ResourceTemplate() {
1154 DWordMemory(
1155 ResourceConsumer, PosDecode, MinFixed, MaxFixed,
1156 NonCacheable, ReadWrite,
1157 0x00000000,
1158 0xFED00000,
1159 0xFED003FF,
1160 0x00000000,
1161 0x00000400 /* 1K memory: FED00000 - FED003FF */
1162 )
1163 })
1164 }
1165
1166 // Conditionally enabled, as lead to hang of Windows 7 and Vista guests
1167 Device (RTC) {
1168 Name (_HID, EisaId ("PNP0B00"))
1169 Name (_CRS, ResourceTemplate ()
1170 {
1171 IO (Decode16,
1172 0x0070, // Range Minimum
1173 0x0070, // Range Maximum
1174 0x01, // Alignment
1175 0x08, // Length
1176 )
1177 })
1178 Method (_STA, 0, NotSerialized)
1179 {
1180 Return (URTC)
1181 }
1182 }
1183
1184 // System Management Controller
1185 Device (SMC)
1186 {
1187 Name (_HID, EisaId ("APP0001"))
1188 Name (_CID, "smc-napa")
1189
1190 Method (_STA, 0, NotSerialized)
1191 {
1192 Return (USMC)
1193 }
1194 Name (_CRS, ResourceTemplate ()
1195 {
1196 IO (Decode16,
1197 0x0300, // Range Minimum
1198 0x0300, // Range Maximum
1199 0x01, // Alignment
1200 0x20, // Length
1201 )
1202 // This line seriously confuses Windows ACPI driver, so not even try to
1203 // enable SMC for Windows guests
1204 IRQNoFlags () {8}
1205 })
1206 }
1207
1208 // Fields within PIIX3 configuration[0x60..0x63] with
1209 // IRQ mappings
1210 Field (\_SB.PCI0.SBRG.PCIC, ByteAcc, NoLock, Preserve)
1211 {
1212 Offset (0x60),
1213 PIRA, 8,
1214 PIRB, 8,
1215 PIRC, 8,
1216 PIRD, 8
1217 }
1218
1219 Name (BUFA, ResourceTemplate ()
1220 {
1221 IRQ (Level, ActiveLow, Shared) {15}
1222 })
1223 CreateWordField (BUFA, 0x01, ICRS)
1224
1225 // Generic status of IRQ routing entry
1226 Method (LSTA, 1, NotSerialized)
1227 {
1228 And (Arg0, 0x80, Local0)
1229// DBG ("LSTA: ")
1230// HEX (Arg0)
1231 If (Local0)
1232 {
1233 Return (0x09)
1234 }
1235 Else
1236 {
1237 Return (0x0B)
1238 }
1239 }
1240
1241 // Generic "current resource settings" for routing entry
1242 Method (LCRS, 1, NotSerialized)
1243 {
1244 And (Arg0, 0x0F, Local0)
1245 ShiftLeft (0x01, Local0, ICRS)
1246// DBG ("LCRS: ")
1247// HEX (ICRS)
1248 Return (BUFA)
1249 }
1250
1251 // Generic "set resource settings" for routing entry
1252 Method (LSRS, 1, NotSerialized)
1253 {
1254 CreateWordField (Arg0, 0x01, ISRS)
1255 FindSetRightBit (ISRS, Local0)
1256 Return (Decrement (Local0))
1257 }
1258
1259 // Generic "disable" for routing entry
1260 Method (LDIS, 1, NotSerialized)
1261 {
1262 Return (Or (Arg0, 0x80))
1263 }
1264
1265 // Link A
1266 Device (LNKA)
1267 {
1268 Name (_HID, EisaId ("PNP0C0F"))
1269 Name (_UID, 0x01)
1270
1271 // Status
1272 Method (_STA, 0, NotSerialized)
1273 {
1274 DBG ("LNKA._STA\n")
1275 Return (LSTA (PIRA))
1276 }
1277
1278 // Possible resource settings
1279 Method (_PRS, 0, NotSerialized)
1280 {
1281 DBG ("LNKA._PRS\n")
1282 Return (PRSA)
1283 }
1284
1285 // Disable
1286 Method (_DIS, 0, NotSerialized)
1287 {
1288 DBG ("LNKA._DIS\n")
1289 Store (LDIS (PIRA), PIRA)
1290 }
1291
1292 // Current resource settings
1293 Method (_CRS, 0, NotSerialized)
1294 {
1295 DBG ("LNKA._CRS\n")
1296 Return (LCRS (PIRA))
1297 }
1298
1299 // Set resource settings
1300 Method (_SRS, 1, NotSerialized)
1301 {
1302 DBG ("LNKA._SRS: ")
1303 HEX (LSRS (Arg0))
1304 Store (LSRS (Arg0), PIRA)
1305 }
1306 }
1307
1308 // Link B
1309 Device (LNKB)
1310 {
1311 Name (_HID, EisaId ("PNP0C0F"))
1312 Name (_UID, 0x02)
1313 Method (_STA, 0, NotSerialized)
1314 {
1315 // DBG ("LNKB._STA\n")
1316 Return (LSTA (PIRB))
1317 }
1318
1319 Method (_PRS, 0, NotSerialized)
1320 {
1321 // DBG ("LNKB._PRS\n")
1322 Return (PRSB)
1323 }
1324
1325 Method (_DIS, 0, NotSerialized)
1326 {
1327 // DBG ("LNKB._DIS\n")
1328 Store (LDIS (PIRB), PIRB)
1329 }
1330
1331 Method (_CRS, 0, NotSerialized)
1332 {
1333 // DBG ("LNKB._CRS\n")
1334 Return (LCRS (PIRB))
1335 }
1336
1337 Method (_SRS, 1, NotSerialized)
1338 {
1339 DBG ("LNKB._SRS: ")
1340 HEX (LSRS (Arg0))
1341 Store (LSRS (Arg0), PIRB)
1342 }
1343 }
1344
1345 // Link C
1346 Device (LNKC)
1347 {
1348 Name (_HID, EisaId ("PNP0C0F"))
1349 Name (_UID, 0x03)
1350 Method (_STA, 0, NotSerialized)
1351 {
1352 // DBG ("LNKC._STA\n")
1353 Return (LSTA (PIRC))
1354 }
1355
1356 Method (_PRS, 0, NotSerialized)
1357 {
1358 // DBG ("LNKC._PRS\n")
1359 Return (PRSC)
1360 }
1361
1362 Method (_DIS, 0, NotSerialized)
1363 {
1364 // DBG ("LNKC._DIS\n")
1365 Store (LDIS (PIRC), PIRC)
1366 }
1367
1368 Method (_CRS, 0, NotSerialized)
1369 {
1370 // DBG ("LNKC._CRS\n")
1371 Return (LCRS (PIRC))
1372 }
1373
1374 Method (_SRS, 1, NotSerialized)
1375 {
1376 DBG ("LNKC._SRS: ")
1377 HEX (LSRS (Arg0))
1378 Store (LSRS (Arg0), PIRC)
1379 }
1380 }
1381
1382 // Link D
1383 Device (LNKD)
1384 {
1385 Name (_HID, EisaId ("PNP0C0F"))
1386 Name (_UID, 0x04)
1387 Method (_STA, 0, NotSerialized)
1388 {
1389 // DBG ("LNKD._STA\n")
1390 Return (LSTA (PIRD))
1391 }
1392
1393 Method (_PRS, 0, NotSerialized)
1394 {
1395 // DBG ("LNKD._PRS\n")
1396 Return (PRSD)
1397 }
1398
1399 Method (_DIS, 0, NotSerialized)
1400 {
1401 // DBG ("LNKD._DIS\n")
1402 Store (LDIS (PIRA), PIRD)
1403 }
1404
1405 Method (_CRS, 0, NotSerialized)
1406 {
1407 // DBG ("LNKD._CRS\n")
1408 Return (LCRS (PIRD))
1409 }
1410
1411 Method (_SRS, 1, NotSerialized)
1412 {
1413 DBG ("LNKD._SRS: ")
1414 HEX (LSRS (Arg0))
1415 Store (LSRS (Arg0), PIRD)
1416 }
1417 }
1418 }
1419
1420 // Sx states
1421 Name (_S0, Package (2) {
1422 0x00,
1423 0x00,
1424 })
1425
1426 Name (_S5, Package (2) {
1427 0x05,
1428 0x05,
1429 })
1430
1431 Method (_PTS, 1, NotSerialized)
1432 {
1433 DBG ("Prepare to sleep: ")
1434 HEX (Arg0)
1435 }
1436}
1437
1438/*
1439 * Local Variables:
1440 * comment-start: "//"
1441 * End:
1442 */
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