VirtualBox

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

Last change on this file since 86692 was 86408, checked in by vboxsync, 4 years ago

AMD IOMMU: bugref:9654 Add IVRS (IOMMU I/O Virtualization Reporting Structure) to the ACPI table and fixes to ACPI to accomodate the new system index for the IOMMU and southbridge I/O APIC devices.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 67.4 KB
Line 
1/* $Id: vbox.dsl 86408 2020-10-02 08:24:37Z vboxsync $ */
2/** @file
3 * VirtualBox ACPI
4 */
5
6/*
7 * Copyright (C) 2006-2020 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18DefinitionBlock ("DSDT.aml", "DSDT", 2, "VBOX ", "VBOXBIOS", 2)
19{
20 // Declare debugging ports withing SystemIO
21 OperationRegion(DBG0, SystemIO, 0x3000, 4)
22
23 // Writes to this field Will dump hex char
24 Field (DBG0, ByteAcc, NoLock, Preserve)
25 {
26 DHE1, 8,
27 }
28
29 // Writes to this field Will dump hex word
30 Field (DBG0, WordAcc, NoLock, Preserve)
31 {
32 DHE2, 16,
33 }
34
35 // Writes to this field Will dump hex double word
36 Field (DBG0, DWordAcc, NoLock, Preserve)
37 {
38 DHE4, 32,
39 }
40
41 // Writes to this field will dump ascii char
42 Field (DBG0, ByteAcc, NoLock, Preserve)
43 {
44 Offset (1),
45 DCHR, 8
46 }
47
48 // Shortcuts
49 Method(HEX, 1)
50 {
51 Store (Arg0, DHE1)
52 }
53
54 Method(HEX2, 1)
55 {
56 Store (Arg0, DHE2)
57 }
58
59 Method(HEX4, 1)
60 {
61 Store (Arg0, DHE4)
62 }
63
64 // Code from Microsoft sample
65 // http://www.microsoft.com/whdc/system/pnppwr/powermgmt/_OSI-method.mspx
66
67 //
68 // SLEN(Str) - Returns the length of Str (excluding NULL).
69 //
70 Method(SLEN, 1)
71 {
72 //
73 // Note: The caller must make sure that the argument is a string object.
74 //
75 Store(Arg0, Local0)
76 Return(Sizeof(Local0))
77 }
78
79
80 //
81 // S2BF(Str) - Convert a string object into a buffer object.
82 //
83 Method(S2BF, 1, Serialized)
84 {
85 //
86 // Note: The caller must make sure that the argument is a string object.
87 //
88 // Local0 contains length of string + NULL.
89 //
90 Store(Arg0, Local0)
91 Add(SLEN(Local0), One, Local0)
92 //
93 // Convert the string object into a buffer object.
94 //
95 Name(BUFF, Buffer(Local0) {})
96 Store(Arg0, BUFF)
97 Return(BUFF)
98 }
99
100 //
101 // MIN(Int1, Int2) - Returns the minimum of Int1 or Int2.
102 //
103 //
104 Method(MIN, 2)
105 {
106 //
107 // Note: The caller must make sure that both arguments are integer objects.
108 //
109 If (LLess(Arg0, Arg1))
110 {
111 Return(Arg0)
112 }
113 Else
114 {
115 Return(Arg1)
116 }
117 }
118
119 //
120 // SCMP(Str1, Str2) - Compare Str1 and Str2.
121 // Returns One if Str1 > Str2
122 // Returns Zero if Str1 == Str2
123 // Returns Ones if Str1 < Str2
124 //
125 Method(SCMP, 2)
126 {
127 //
128 // Note: The caller must make sure that both arguments are string objects.
129 //
130 // Local0 is a buffer of Str1.
131 // Local1 is a buffer of Str2.
132 // Local2 is the indexed byte of Str1.
133 // Local3 is the indexed byte of Str2.
134 // Local4 is the index to both Str1 and Str2.
135 // Local5 is the length of Str1.
136 // Local6 is the length of Str2.
137 // Local7 is the minimum of Str1 or Str2 length.
138 //
139
140 Store(Arg0, Local0)
141 Store(S2BF(Local0), Local0)
142
143 Store(S2BF(Arg1), Local1)
144 Store(Zero, Local4)
145
146 Store(SLEN(Arg0), Local5)
147 Store(SLEN(Arg1), Local6)
148 Store(MIN(Local5, Local6), Local7)
149
150 While (LLess(Local4, Local7))
151 {
152 Store(Derefof(Index(Local0, Local4)), Local2)
153 Store(Derefof(Index(Local1, Local4)), Local3)
154 If (LGreater(Local2, Local3))
155 {
156 Return(One)
157 }
158 Else
159 {
160 If (LLess(Local2, Local3))
161 {
162 Return(Ones)
163 }
164 }
165
166 Increment(Local4)
167 }
168
169 If (LLess(Local4, Local5))
170 {
171 Return(One)
172 }
173 Else
174 {
175 If (LLess(Local4, Local6))
176 {
177 Return(Ones)
178 }
179 Else
180 {
181 Return(Zero)
182 }
183 }
184 }
185
186 // Return one if strings match, zero otherwise. Wrapper around SCMP
187 Method (MTCH, 2)
188 {
189 Store(Arg0, Local0)
190 Store(Arg1, Local1)
191 Store(SCMP(Local0, Local1), Local2)
192 Return(LNot(Local2))
193 }
194
195 // Convert ASCII string to buffer and store it's contents (char by
196 // char) into DCHR (thus possibly writing the string to console)
197 Method (\DBG, 1, NotSerialized)
198 {
199 Store(Arg0, Local0)
200 Store(S2BF (Local0), Local1)
201 Store(SizeOf (Local1), Local0)
202 Decrement (Local0)
203 Store(Zero, Local2)
204 While (Local0)
205 {
206 Decrement (Local0)
207 Store (DerefOf (Index (Local1, Local2)), DCHR)
208 Increment (Local2)
209 }
210 }
211
212 // Microsoft Windows version indicator
213 Name(MSWV, Ones)
214
215 //
216 // Return Windows version. Detect non-Microsoft OSes.
217 //
218 // 0 : Not Windows OS
219 // 2 : Windows Me
220 // 3 : Windows 2000 (NT pre-XP)
221 // 4 : Windows XP
222 // 5 : Windows Server 2003
223 // 6 : Windows Vista
224 // 7 : Windows 7
225 // 8 : Windows 8
226 // 9 : Windows 8.1
227 // 10 : Windows 10
228 Method(MSWN, 0, NotSerialized)
229 {
230 If (LNotEqual(MSWV, Ones))
231 {
232 Return(MSWV)
233 }
234
235 Store(0x00, MSWV)
236 DBG("_OS: ")
237 DBG(_OS)
238 DBG("\n")
239
240 // Does OS provide the _OSI method?
241 If (CondRefOf(_OSI))
242 {
243 DBG("_OSI exists\n")
244 // OS returns non-zero value in response to _OSI query if it
245 // supports the interface. Newer Windows releases support older
246 // versions of the ACPI interface.
247 If (_OSI("Windows 2001"))
248 {
249 Store(4, MSWV) // XP
250 }
251 If (_OSI("Windows 2001.1"))
252 {
253 Store(5, MSWV) // Server 2003
254 }
255 If (_OSI("Windows 2006"))
256 {
257 Store(6, MSWV) // Vista
258 }
259 If (_OSI("Windows 2009"))
260 {
261 Store(7, MSWV) // Windows 7
262 }
263 If (_OSI("Windows 2012"))
264 {
265 Store(8, MSWV) // Windows 8
266 }
267 If (_OSI("Windows 2013"))
268 {
269 Store(9, MSWV) // Windows 8.1
270 }
271 If (_OSI("Windows 2015"))
272 {
273 Store(10, MSWV) // Windows 10
274 }
275
276 // This must come last and is a trap. No version of Windows
277 // reports this!
278 If (_OSI("Windows 2006 SP2"))
279 {
280 DBG("Windows 2006 SP2 supported\n")
281 // Not a Microsoft OS
282 Store(0, MSWV)
283 }
284 }
285 Else
286 {
287 // No _OSI, could be older NT or Windows 9x
288 If (MTCH(_OS, "Microsoft Windows NT"))
289 {
290 Store(3, MSWV)
291 }
292 If (MTCH(_OS, "Microsoft WindowsME: Millennium Edition"))
293 {
294 Store(2, MSWV)
295 }
296 }
297
298 // Does OS provide the _REV method?
299 If (CondRefOf(_REV))
300 {
301 DBG("_REV: ")
302 HEX4(_REV)
303
304 // Defeat most Linuxes and other non-Microsoft OSes. Microsoft Windows
305 // up to Server 2003 reports ACPI 1.0 support, Vista up to Windows 10
306 // reports ACPI 2.0 support. Anything pretending to be a Windows OS
307 // with higher ACPI revision support is a fake.
308 If (LAnd(LGreater(MSWV, 0),LGreater(_REV, 2)))
309 {
310 If (LLess(MSWV,8))
311 {
312 DBG("ACPI rev mismatch, not a Microsoft OS\n")
313 Store(0, MSWV)
314 }
315 }
316 }
317
318 DBG("Determined MSWV: ")
319 HEX4(MSWV)
320
321 Return(MSWV)
322 }
323
324 Name(PICM, 0)
325 Method(_PIC, 1)
326 {
327 DBG ("Pic mode: ")
328 HEX4 (Arg0)
329 Store (Arg0, PICM)
330 }
331
332 // Declare indexed registers used for reading configuration information
333 OperationRegion (SYSI, SystemIO, 0x4048, 0x08)
334 Field (SYSI, DwordAcc, NoLock, Preserve)
335 {
336 IDX0, 32,
337 DAT0, 32,
338 }
339
340 IndexField (IDX0, DAT0, DwordAcc, NoLock, Preserve)
341 {
342 MEML, 32, // low-memory length (64KB units)
343 UIOA, 32, // if IO APIC enabled
344 UHPT, 32, // if HPET enabled
345 USMC, 32, // if SMC enabled
346 UFDC, 32, // if floppy controller enabled
347 SL2B, 32, // Serial2 base IO address
348 SL2I, 32, // Serial2 IRQ
349 SL3B, 32, // Serial3 base IO address
350 SL3I, 32, // Serial3 IRQ
351 PMNN, 32, // start of 64-bit prefetch window (64KB units)
352 URTC, 32, // if RTC shown in tables
353 CPUL, 32, // flag of CPU lock state
354 CPUC, 32, // CPU to check lock status
355 CPET, 32, // type of CPU hotplug event
356 CPEV, 32, // id of CPU event targets
357 NICA, 32, // Primary NIC PCI address
358 HDAA, 32, // HDA PCI address
359 PWRS, 32, // power states
360 IOCA, 32, // southbridge IO controller PCI address
361 HBCA, 32, // host bus controller address
362 PCIB, 32, // PCI MCFG base start
363 PCIL, 32, // PCI MCFG length
364 SL0B, 32, // Serial0 base IO address
365 SL0I, 32, // Serial0 IRQ
366 SL1B, 32, // Serial1 base IO address
367 SL1I, 32, // Serial1 IRQ
368 PP0B, 32, // Parallel0 base IO address
369 PP0I, 32, // Parallel0 IRQ
370 PP1B, 32, // Parallel1 base IO address
371 PP1I, 32, // Parallel1 IRQ
372 PMNX, 32, // limit of 64-bit prefetch window (64KB units)
373 NVMA, 32, // Primary NVMe controller PCI address
374 Offset (0x80),
375 ININ, 32,
376 Offset (0x200),
377 VAIN, 32,
378 IOMA, 32, // AMD IOMMU
379 SIOA, 32, // Southbridge IO APIC (when AMD IOMMU is present)
380 }
381
382 Scope (\_SB)
383 {
384 Method (_INI, 0, NotSerialized)
385 {
386 Store (0xbadc0de, VAIN)
387 DBG ("MEML: ")
388 HEX4 (MEML)
389 DBG ("UIOA: ")
390 HEX4 (UIOA)
391 DBG ("UHPT: ")
392 HEX4 (UHPT)
393 DBG ("USMC: ")
394 HEX4 (USMC)
395 DBG ("UFDC: ")
396 HEX4 (UFDC)
397 DBG ("PMNN: ")
398 HEX4 (PMNN)
399 }
400
401 // PCI PIC IRQ Routing table
402 // Must match pci.c:pci_slot_get_pirq
403 Name (PR00, Package ()
404 {
405/** @todo add devices 0/1 to be complete */
406 Package (0x04) {0x0002FFFF, 0x00, LNKB, 0x00,},
407 Package (0x04) {0x0002FFFF, 0x01, LNKC, 0x00,},
408 Package (0x04) {0x0002FFFF, 0x02, LNKD, 0x00,},
409 Package (0x04) {0x0002FFFF, 0x03, LNKA, 0x00,},
410
411 Package (0x04) {0x0003FFFF, 0x00, LNKC, 0x00,},
412 Package (0x04) {0x0003FFFF, 0x01, LNKD, 0x00,},
413 Package (0x04) {0x0003FFFF, 0x02, LNKA, 0x00,},
414 Package (0x04) {0x0003FFFF, 0x03, LNKB, 0x00,},
415
416 Package (0x04) {0x0004FFFF, 0x00, LNKD, 0x00,},
417 Package (0x04) {0x0004FFFF, 0x01, LNKA, 0x00,},
418 Package (0x04) {0x0004FFFF, 0x02, LNKB, 0x00,},
419 Package (0x04) {0x0004FFFF, 0x03, LNKC, 0x00,},
420
421 Package (0x04) {0x0005FFFF, 0x00, LNKA, 0x00,},
422 Package (0x04) {0x0005FFFF, 0x01, LNKB, 0x00,},
423 Package (0x04) {0x0005FFFF, 0x02, LNKC, 0x00,},
424 Package (0x04) {0x0005FFFF, 0x03, LNKD, 0x00,},
425
426 Package (0x04) {0x0006FFFF, 0x00, LNKB, 0x00,},
427 Package (0x04) {0x0006FFFF, 0x01, LNKC, 0x00,},
428 Package (0x04) {0x0006FFFF, 0x02, LNKD, 0x00,},
429 Package (0x04) {0x0006FFFF, 0x03, LNKA, 0x00,},
430
431 Package (0x04) {0x0007FFFF, 0x00, LNKC, 0x00,},
432 Package (0x04) {0x0007FFFF, 0x01, LNKD, 0x00,},
433 Package (0x04) {0x0007FFFF, 0x02, LNKA, 0x00,},
434 Package (0x04) {0x0007FFFF, 0x03, LNKB, 0x00,},
435
436 Package (0x04) {0x0008FFFF, 0x00, LNKD, 0x00,},
437 Package (0x04) {0x0008FFFF, 0x01, LNKA, 0x00,},
438 Package (0x04) {0x0008FFFF, 0x02, LNKB, 0x00,},
439 Package (0x04) {0x0008FFFF, 0x03, LNKC, 0x00,},
440
441 Package (0x04) {0x0009FFFF, 0x00, LNKA, 0x00,},
442 Package (0x04) {0x0009FFFF, 0x01, LNKB, 0x00,},
443 Package (0x04) {0x0009FFFF, 0x02, LNKC, 0x00,},
444 Package (0x04) {0x0009FFFF, 0x03, LNKD, 0x00,},
445
446 Package (0x04) {0x000AFFFF, 0x00, LNKB, 0x00,},
447 Package (0x04) {0x000AFFFF, 0x01, LNKC, 0x00,},
448 Package (0x04) {0x000AFFFF, 0x02, LNKD, 0x00,},
449 Package (0x04) {0x000AFFFF, 0x03, LNKA, 0x00,},
450
451 Package (0x04) {0x000BFFFF, 0x00, LNKC, 0x00,},
452 Package (0x04) {0x000BFFFF, 0x01, LNKD, 0x00,},
453 Package (0x04) {0x000BFFFF, 0x02, LNKA, 0x00,},
454 Package (0x04) {0x000BFFFF, 0x03, LNKB, 0x00,},
455
456 Package (0x04) {0x000CFFFF, 0x00, LNKD, 0x00,},
457 Package (0x04) {0x000CFFFF, 0x01, LNKA, 0x00,},
458 Package (0x04) {0x000CFFFF, 0x02, LNKB, 0x00,},
459 Package (0x04) {0x000CFFFF, 0x03, LNKC, 0x00,},
460
461 Package (0x04) {0x000DFFFF, 0x00, LNKA, 0x00,},
462 Package (0x04) {0x000DFFFF, 0x01, LNKB, 0x00,},
463 Package (0x04) {0x000DFFFF, 0x02, LNKC, 0x00,},
464 Package (0x04) {0x000DFFFF, 0x03, LNKD, 0x00,},
465
466 Package (0x04) {0x000EFFFF, 0x00, LNKB, 0x00,},
467 Package (0x04) {0x000EFFFF, 0x01, LNKC, 0x00,},
468 Package (0x04) {0x000EFFFF, 0x02, LNKD, 0x00,},
469 Package (0x04) {0x000EFFFF, 0x03, LNKA, 0x00,},
470
471 Package (0x04) {0x000FFFFF, 0x00, LNKC, 0x00,},
472 Package (0x04) {0x000FFFFF, 0x01, LNKD, 0x00,},
473 Package (0x04) {0x000FFFFF, 0x02, LNKA, 0x00,},
474 Package (0x04) {0x000FFFFF, 0x03, LNKB, 0x00,},
475
476 Package (0x04) {0x0010FFFF, 0x00, LNKD, 0x00,},
477 Package (0x04) {0x0010FFFF, 0x01, LNKA, 0x00,},
478 Package (0x04) {0x0010FFFF, 0x02, LNKB, 0x00,},
479 Package (0x04) {0x0010FFFF, 0x03, LNKC, 0x00,},
480
481 Package (0x04) {0x0011FFFF, 0x00, LNKA, 0x00,},
482 Package (0x04) {0x0011FFFF, 0x01, LNKB, 0x00,},
483 Package (0x04) {0x0011FFFF, 0x02, LNKC, 0x00,},
484 Package (0x04) {0x0011FFFF, 0x03, LNKD, 0x00,},
485
486 Package (0x04) {0x0012FFFF, 0x00, LNKB, 0x00,},
487 Package (0x04) {0x0012FFFF, 0x01, LNKC, 0x00,},
488 Package (0x04) {0x0012FFFF, 0x02, LNKD, 0x00,},
489 Package (0x04) {0x0012FFFF, 0x03, LNKA, 0x00,},
490
491 Package (0x04) {0x0013FFFF, 0x00, LNKC, 0x00,},
492 Package (0x04) {0x0013FFFF, 0x01, LNKD, 0x00,},
493 Package (0x04) {0x0013FFFF, 0x02, LNKA, 0x00,},
494 Package (0x04) {0x0013FFFF, 0x03, LNKB, 0x00,},
495
496 Package (0x04) {0x0014FFFF, 0x00, LNKD, 0x00,},
497 Package (0x04) {0x0014FFFF, 0x01, LNKA, 0x00,},
498 Package (0x04) {0x0014FFFF, 0x02, LNKB, 0x00,},
499 Package (0x04) {0x0014FFFF, 0x03, LNKC, 0x00,},
500
501 Package (0x04) {0x0015FFFF, 0x00, LNKA, 0x00,},
502 Package (0x04) {0x0015FFFF, 0x01, LNKB, 0x00,},
503 Package (0x04) {0x0015FFFF, 0x02, LNKC, 0x00,},
504 Package (0x04) {0x0015FFFF, 0x03, LNKD, 0x00,},
505
506 Package (0x04) {0x0016FFFF, 0x00, LNKB, 0x00,},
507 Package (0x04) {0x0016FFFF, 0x01, LNKC, 0x00,},
508 Package (0x04) {0x0016FFFF, 0x02, LNKD, 0x00,},
509 Package (0x04) {0x0016FFFF, 0x03, LNKA, 0x00,},
510
511 Package (0x04) {0x0017FFFF, 0x00, LNKC, 0x00,},
512 Package (0x04) {0x0017FFFF, 0x01, LNKD, 0x00,},
513 Package (0x04) {0x0017FFFF, 0x02, LNKA, 0x00,},
514 Package (0x04) {0x0017FFFF, 0x03, LNKB, 0x00,},
515
516 Package (0x04) {0x0018FFFF, 0x00, LNKD, 0x00,},
517 Package (0x04) {0x0018FFFF, 0x01, LNKA, 0x00,},
518 Package (0x04) {0x0018FFFF, 0x02, LNKB, 0x00,},
519 Package (0x04) {0x0018FFFF, 0x03, LNKC, 0x00,},
520
521 Package (0x04) {0x0019FFFF, 0x00, LNKA, 0x00,},
522 Package (0x04) {0x0019FFFF, 0x01, LNKB, 0x00,},
523 Package (0x04) {0x0019FFFF, 0x02, LNKC, 0x00,},
524 Package (0x04) {0x0019FFFF, 0x03, LNKD, 0x00,},
525
526 Package (0x04) {0x001AFFFF, 0x00, LNKB, 0x00,},
527 Package (0x04) {0x001AFFFF, 0x01, LNKC, 0x00,},
528 Package (0x04) {0x001AFFFF, 0x02, LNKD, 0x00,},
529 Package (0x04) {0x001AFFFF, 0x03, LNKA, 0x00,},
530
531 Package (0x04) {0x001BFFFF, 0x00, LNKC, 0x00,},
532 Package (0x04) {0x001BFFFF, 0x01, LNKD, 0x00,},
533 Package (0x04) {0x001BFFFF, 0x02, LNKA, 0x00,},
534 Package (0x04) {0x001BFFFF, 0x03, LNKB, 0x00,},
535
536 Package (0x04) {0x001CFFFF, 0x00, LNKD, 0x00,},
537 Package (0x04) {0x001CFFFF, 0x01, LNKA, 0x00,},
538 Package (0x04) {0x001CFFFF, 0x02, LNKB, 0x00,},
539 Package (0x04) {0x001CFFFF, 0x03, LNKC, 0x00,},
540
541 Package (0x04) {0x001DFFFF, 0x00, LNKA, 0x00,},
542 Package (0x04) {0x001DFFFF, 0x01, LNKB, 0x00,},
543 Package (0x04) {0x001DFFFF, 0x02, LNKC, 0x00,},
544 Package (0x04) {0x001DFFFF, 0x03, LNKD, 0x00,},
545
546 Package (0x04) {0x001EFFFF, 0x00, LNKB, 0x00,},
547 Package (0x04) {0x001EFFFF, 0x01, LNKC, 0x00,},
548 Package (0x04) {0x001EFFFF, 0x02, LNKD, 0x00,},
549 Package (0x04) {0x001EFFFF, 0x03, LNKA, 0x00,},
550
551 Package (0x04) {0x001FFFFF, 0x00, LNKC, 0x00,},
552 Package (0x04) {0x001FFFFF, 0x01, LNKD, 0x00,},
553 Package (0x04) {0x001FFFFF, 0x02, LNKA, 0x00,},
554 Package (0x04) {0x001FFFFF, 0x03, LNKB, 0x00,}
555 })
556
557 // PCI I/O APIC IRQ Routing table
558 // Must match pci.c:pci_slot_get_acpi_pirq
559 Name (PR01, Package ()
560 {
561/** @todo add devices 0/1 to be complete */
562 Package (0x04) {0x0002FFFF, 0x00, 0x00, 0x12,},
563 Package (0x04) {0x0002FFFF, 0x01, 0x00, 0x13,},
564 Package (0x04) {0x0002FFFF, 0x02, 0x00, 0x14,},
565 Package (0x04) {0x0002FFFF, 0x03, 0x00, 0x15,},
566
567 Package (0x04) {0x0003FFFF, 0x00, 0x00, 0x13,},
568 Package (0x04) {0x0003FFFF, 0x01, 0x00, 0x14,},
569 Package (0x04) {0x0003FFFF, 0x02, 0x00, 0x15,},
570 Package (0x04) {0x0003FFFF, 0x03, 0x00, 0x16,},
571
572 Package (0x04) {0x0004FFFF, 0x00, 0x00, 0x14,},
573 Package (0x04) {0x0004FFFF, 0x01, 0x00, 0x15,},
574 Package (0x04) {0x0004FFFF, 0x02, 0x00, 0x16,},
575 Package (0x04) {0x0004FFFF, 0x03, 0x00, 0x17,},
576
577 Package (0x04) {0x0005FFFF, 0x00, 0x00, 0x15,},
578 Package (0x04) {0x0005FFFF, 0x01, 0x00, 0x16,},
579 Package (0x04) {0x0005FFFF, 0x02, 0x00, 0x17,},
580 Package (0x04) {0x0005FFFF, 0x03, 0x00, 0x10,},
581
582 Package (0x04) {0x0006FFFF, 0x00, 0x00, 0x16,},
583 Package (0x04) {0x0006FFFF, 0x01, 0x00, 0x17,},
584 Package (0x04) {0x0006FFFF, 0x02, 0x00, 0x10,},
585 Package (0x04) {0x0006FFFF, 0x03, 0x00, 0x11,},
586
587 Package (0x04) {0x0007FFFF, 0x00, 0x00, 0x17,},
588 Package (0x04) {0x0007FFFF, 0x01, 0x00, 0x10,},
589 Package (0x04) {0x0007FFFF, 0x02, 0x00, 0x11,},
590 Package (0x04) {0x0007FFFF, 0x03, 0x00, 0x12,},
591
592 Package (0x04) {0x0008FFFF, 0x00, 0x00, 0x10,},
593 Package (0x04) {0x0008FFFF, 0x01, 0x00, 0x11,},
594 Package (0x04) {0x0008FFFF, 0x02, 0x00, 0x12,},
595 Package (0x04) {0x0008FFFF, 0x03, 0x00, 0x13,},
596
597 Package (0x04) {0x0009FFFF, 0x00, 0x00, 0x11,},
598 Package (0x04) {0x0009FFFF, 0x01, 0x00, 0x12,},
599 Package (0x04) {0x0009FFFF, 0x02, 0x00, 0x13,},
600 Package (0x04) {0x0009FFFF, 0x03, 0x00, 0x14,},
601
602 Package (0x04) {0x000AFFFF, 0x00, 0x00, 0x12,},
603 Package (0x04) {0x000AFFFF, 0x01, 0x00, 0x13,},
604 Package (0x04) {0x000AFFFF, 0x02, 0x00, 0x14,},
605 Package (0x04) {0x000AFFFF, 0x03, 0x00, 0x15,},
606
607 Package (0x04) {0x000BFFFF, 0x00, 0x00, 0x13,},
608 Package (0x04) {0x000BFFFF, 0x01, 0x00, 0x14,},
609 Package (0x04) {0x000BFFFF, 0x02, 0x00, 0x15,},
610 Package (0x04) {0x000BFFFF, 0x03, 0x00, 0x16,},
611
612 Package (0x04) {0x000CFFFF, 0x00, 0x00, 0x14,},
613 Package (0x04) {0x000CFFFF, 0x01, 0x00, 0x15,},
614 Package (0x04) {0x000CFFFF, 0x02, 0x00, 0x16,},
615 Package (0x04) {0x000CFFFF, 0x03, 0x00, 0x17,},
616
617 Package (0x04) {0x000DFFFF, 0x00, 0x00, 0x15,},
618 Package (0x04) {0x000DFFFF, 0x01, 0x00, 0x16,},
619 Package (0x04) {0x000DFFFF, 0x02, 0x00, 0x17,},
620 Package (0x04) {0x000DFFFF, 0x03, 0x00, 0x10,},
621
622 Package (0x04) {0x000EFFFF, 0x00, 0x00, 0x16,},
623 Package (0x04) {0x000EFFFF, 0x01, 0x00, 0x17,},
624 Package (0x04) {0x000EFFFF, 0x02, 0x00, 0x10,},
625 Package (0x04) {0x000EFFFF, 0x03, 0x00, 0x11,},
626
627 Package (0x04) {0x000FFFFF, 0x00, 0x00, 0x17,},
628 Package (0x04) {0x000FFFFF, 0x01, 0x00, 0x10,},
629 Package (0x04) {0x000FFFFF, 0x02, 0x00, 0x11,},
630 Package (0x04) {0x000FFFFF, 0x03, 0x00, 0x12,},
631
632 Package (0x04) {0x0010FFFF, 0x00, 0x00, 0x10,},
633 Package (0x04) {0x0010FFFF, 0x01, 0x00, 0x11,},
634 Package (0x04) {0x0010FFFF, 0x02, 0x00, 0x12,},
635 Package (0x04) {0x0010FFFF, 0x03, 0x00, 0x13,},
636
637 Package (0x04) {0x0011FFFF, 0x00, 0x00, 0x11,},
638 Package (0x04) {0x0011FFFF, 0x01, 0x00, 0x12,},
639 Package (0x04) {0x0011FFFF, 0x02, 0x00, 0x13,},
640 Package (0x04) {0x0011FFFF, 0x03, 0x00, 0x14,},
641
642 Package (0x04) {0x0012FFFF, 0x00, 0x00, 0x12,},
643 Package (0x04) {0x0012FFFF, 0x01, 0x00, 0x13,},
644 Package (0x04) {0x0012FFFF, 0x02, 0x00, 0x14,},
645 Package (0x04) {0x0012FFFF, 0x03, 0x00, 0x15,},
646
647 Package (0x04) {0x0013FFFF, 0x00, 0x00, 0x13,},
648 Package (0x04) {0x0013FFFF, 0x01, 0x00, 0x14,},
649 Package (0x04) {0x0013FFFF, 0x02, 0x00, 0x15,},
650 Package (0x04) {0x0013FFFF, 0x03, 0x00, 0x16,},
651
652 Package (0x04) {0x0014FFFF, 0x00, 0x00, 0x14,},
653 Package (0x04) {0x0014FFFF, 0x01, 0x00, 0x15,},
654 Package (0x04) {0x0014FFFF, 0x02, 0x00, 0x16,},
655 Package (0x04) {0x0014FFFF, 0x03, 0x00, 0x17,},
656
657 Package (0x04) {0x0015FFFF, 0x00, 0x00, 0x15,},
658 Package (0x04) {0x0015FFFF, 0x01, 0x00, 0x16,},
659 Package (0x04) {0x0015FFFF, 0x02, 0x00, 0x17,},
660 Package (0x04) {0x0015FFFF, 0x03, 0x00, 0x10,},
661
662 Package (0x04) {0x0016FFFF, 0x00, 0x00, 0x16,},
663 Package (0x04) {0x0016FFFF, 0x01, 0x00, 0x17,},
664 Package (0x04) {0x0016FFFF, 0x02, 0x00, 0x10,},
665 Package (0x04) {0x0016FFFF, 0x03, 0x00, 0x11,},
666
667 Package (0x04) {0x0017FFFF, 0x00, 0x00, 0x17,},
668 Package (0x04) {0x0017FFFF, 0x01, 0x00, 0x10,},
669 Package (0x04) {0x0017FFFF, 0x02, 0x00, 0x11,},
670 Package (0x04) {0x0017FFFF, 0x03, 0x00, 0x12,},
671
672 Package (0x04) {0x0018FFFF, 0x00, 0x00, 0x10,},
673 Package (0x04) {0x0018FFFF, 0x01, 0x00, 0x11,},
674 Package (0x04) {0x0018FFFF, 0x02, 0x00, 0x12,},
675 Package (0x04) {0x0018FFFF, 0x03, 0x00, 0x13,},
676
677 Package (0x04) {0x0019FFFF, 0x00, 0x00, 0x11,},
678 Package (0x04) {0x0019FFFF, 0x01, 0x00, 0x12,},
679 Package (0x04) {0x0019FFFF, 0x02, 0x00, 0x13,},
680 Package (0x04) {0x0019FFFF, 0x03, 0x00, 0x14,},
681
682 Package (0x04) {0x001AFFFF, 0x00, 0x00, 0x12,},
683 Package (0x04) {0x001AFFFF, 0x01, 0x00, 0x13,},
684 Package (0x04) {0x001AFFFF, 0x02, 0x00, 0x14,},
685 Package (0x04) {0x001AFFFF, 0x03, 0x00, 0x15,},
686
687 Package (0x04) {0x001BFFFF, 0x00, 0x00, 0x13,},
688 Package (0x04) {0x001BFFFF, 0x01, 0x00, 0x14,},
689 Package (0x04) {0x001BFFFF, 0x02, 0x00, 0x15,},
690 Package (0x04) {0x001BFFFF, 0x03, 0x00, 0x16,},
691
692 Package (0x04) {0x001CFFFF, 0x00, 0x00, 0x14,},
693 Package (0x04) {0x001CFFFF, 0x01, 0x00, 0x15,},
694 Package (0x04) {0x001CFFFF, 0x02, 0x00, 0x16,},
695 Package (0x04) {0x001CFFFF, 0x03, 0x00, 0x17,},
696
697 Package (0x04) {0x001DFFFF, 0x00, 0x00, 0x15,},
698 Package (0x04) {0x001DFFFF, 0x01, 0x00, 0x16,},
699 Package (0x04) {0x001DFFFF, 0x02, 0x00, 0x17,},
700 Package (0x04) {0x001DFFFF, 0x03, 0x00, 0x10,},
701
702 Package (0x04) {0x001EFFFF, 0x00, 0x00, 0x16,},
703 Package (0x04) {0x001EFFFF, 0x01, 0x00, 0x17,},
704 Package (0x04) {0x001EFFFF, 0x02, 0x00, 0x10,},
705 Package (0x04) {0x001EFFFF, 0x03, 0x00, 0x11,},
706
707 Package (0x04) {0x001FFFFF, 0x00, 0x00, 0x17,},
708 Package (0x04) {0x001FFFFF, 0x01, 0x00, 0x10,},
709 Package (0x04) {0x001FFFFF, 0x02, 0x00, 0x11,},
710 Package (0x04) {0x001FFFFF, 0x03, 0x00, 0x12,}
711 })
712
713 // Possible resource settings for PCI link A
714 Name (PRSA, ResourceTemplate ()
715 {
716 IRQ (Level, ActiveLow, Shared) {5,9,10,11}
717 })
718
719 // Possible resource settings for PCI link B
720 Name (PRSB, ResourceTemplate ()
721 {
722 IRQ (Level, ActiveLow, Shared) {5,9,10,11}
723 })
724
725 // Possible resource settings for PCI link C
726 Name (PRSC, ResourceTemplate ()
727 {
728 IRQ (Level, ActiveLow, Shared) {5,9,10,11}
729 })
730
731 // Possible resource settings for PCI link D
732 Name (PRSD, ResourceTemplate ()
733 {
734 IRQ (Level, ActiveLow, Shared) {5,9,10,11}
735 })
736
737 // PCI bus 0
738 Device (PCI0)
739 {
740
741 Name (_HID, EisaId ("PNP0A03")) // PCI bus PNP id
742 Method(_ADR, 0, NotSerialized) // PCI address
743 {
744 Return (HBCA)
745 }
746 Name (_BBN, 0x00) // base bus address (bus number)
747 Name (_UID, 0x00)
748
749 // Method that returns routing table; also opens PCI to I/O APIC
750 // interrupt routing backdoor by writing 0xdead 0xbeef signature
751 // to ISA bridge config space. See DevPCI.cpp/pciSetIrqInternal().
752 Method (_PRT, 0, NotSerialized)
753 {
754 if (LEqual (LAnd (PICM, UIOA), Zero)) {
755 DBG ("RETURNING PIC\n")
756 Store (0x00, \_SB.PCI0.SBRG.APDE)
757 Store (0x00, \_SB.PCI0.SBRG.APAD)
758 Return (PR00)
759 }
760 else {
761 DBG ("RETURNING APIC\n")
762 Store (0xbe, \_SB.PCI0.SBRG.APDE)
763 Store (0xef, \_SB.PCI0.SBRG.APAD)
764 Return (PR01)
765 }
766 }
767
768 Device (SBRG)
769 {
770 // Address of the southbridge device (PIIX or ICH9)
771 Method(_ADR, 0, NotSerialized)
772 {
773 Return (IOCA)
774 }
775 OperationRegion (PCIC, PCI_Config, 0x00, 0xff)
776
777 Field (PCIC, ByteAcc, NoLock, Preserve)
778 {
779 Offset (0xad),
780 APAD, 8,
781 Offset (0xde),
782 APDE, 8,
783 }
784
785 // PCI MCFG MMIO ranges
786 Device (^PCIE)
787 {
788 Name (_HID, EisaId ("PNP0C02"))
789 Name (_UID, 0x11)
790 Name (CRS, ResourceTemplate ()
791 {
792 Memory32Fixed (ReadOnly,
793 0xdc000000, // Address Base
794 0x4000000, // Address Length
795 _Y13)
796 })
797 Method (_CRS, 0, NotSerialized)
798 {
799 CreateDWordField (CRS, \_SB.PCI0.PCIE._Y13._BAS, BAS1)
800 CreateDWordField (CRS, \_SB.PCI0.PCIE._Y13._LEN, LEN1)
801 Store (PCIB, BAS1)
802 Store (PCIL, LEN1)
803 Return (CRS)
804 }
805 Method (_STA, 0, NotSerialized)
806 {
807 if (LEqual (PCIB, Zero)) {
808 Return (0x00)
809 }
810 else {
811 Return (0x0F)
812 }
813 }
814 }
815
816 // Keyboard device
817 Device (PS2K)
818 {
819 Name (_HID, EisaId ("PNP0303"))
820 Method (_STA, 0, NotSerialized)
821 {
822 Return (0x0F)
823 }
824
825 Name (_CRS, ResourceTemplate ()
826 {
827 IO (Decode16, 0x0060, 0x0060, 0x00, 0x01)
828 IO (Decode16, 0x0064, 0x0064, 0x00, 0x01)
829 IRQNoFlags () {1}
830 })
831 }
832
833 // DMA Controller
834 Device (DMAC)
835 {
836 Name (_HID, EisaId ("PNP0200"))
837 Name (_CRS, ResourceTemplate ()
838 {
839 IO (Decode16, 0x0000, 0x0000, 0x01, 0x10)
840 IO (Decode16, 0x0080, 0x0080, 0x01, 0x10)
841 IO (Decode16, 0x00C0, 0x00C0, 0x01, 0x20)
842 DMA (Compatibility, BusMaster, Transfer8_16) {4}
843 })
844 }
845
846 // Floppy disk controller
847 Device (FDC0)
848 {
849 Name (_HID, EisaId ("PNP0700"))
850
851 Method (_STA, 0, NotSerialized)
852 {
853 Return (UFDC)
854 }
855
856 // Current resource settings
857 Name (_CRS, ResourceTemplate ()
858 {
859 IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
860 IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
861 IRQNoFlags () {6}
862 DMA (Compatibility, NotBusMaster, Transfer8) {2}
863 })
864
865 // Possible resource settings
866 Name (_PRS, ResourceTemplate ()
867 {
868 IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
869 IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
870 IRQNoFlags () {6}
871 DMA (Compatibility, NotBusMaster, Transfer8) {2}
872 })
873
874 }
875
876 // Mouse device
877 Device (PS2M)
878 {
879 Name (_HID, EisaId ("PNP0F03"))
880 Method (_STA, 0, NotSerialized)
881 {
882 Return (0x0F)
883 }
884
885 Name (_CRS, ResourceTemplate ()
886 {
887 IRQNoFlags () {12}
888 })
889 }
890
891 // Parallel port 0
892 Device (^LPT0)
893 {
894 Name (_HID, EisaId ("PNP0400"))
895 Name (_UID, 0x01)
896 Method (_STA, 0, NotSerialized)
897 {
898 If (LEqual (PP0B, Zero))
899 {
900 Return (0x00)
901 }
902 Else
903 {
904 Return (0x0F)
905 }
906 }
907 Name (CRS, ResourceTemplate ()
908 {
909 IO (Decode16, 0x0378, 0x0378, 0x08, 0x08, _Y18)
910 IRQNoFlags (_Y19) {7}
911 })
912 Method (_CRS, 0, NotSerialized)
913 {
914 CreateWordField (CRS, \_SB.PCI0.LPT0._Y18._MIN, PMI0)
915 CreateWordField (CRS, \_SB.PCI0.LPT0._Y18._MAX, PMA0)
916 CreateWordField (CRS, \_SB.PCI0.LPT0._Y18._ALN, PAL0)
917 CreateWordField (CRS, \_SB.PCI0.LPT0._Y18._LEN, PLE0)
918 CreateWordField (CRS, \_SB.PCI0.LPT0._Y19._INT, PIQ0)
919 Store (PP0B, PMI0)
920 Store (PP0B, PMA0)
921 If (LEqual (0x3BC, PP0B)) {
922 Store (0x04, PAL0)
923 Store (0x04, PLE0)
924 }
925 ShiftLeft (0x01, PP0I, PIQ0)
926 Return (CRS)
927 }
928 }
929
930 // Parallel port 1
931 Device (^LPT1)
932 {
933 Name (_HID, EisaId ("PNP0400"))
934 Name (_UID, 0x02)
935 Method (_STA, 0, NotSerialized)
936 {
937 If (LEqual (PP1B, Zero))
938 {
939 Return (0x00)
940 }
941 Else
942 {
943 Return (0x0F)
944 }
945 }
946 Name (CRS, ResourceTemplate ()
947 {
948 IO (Decode16, 0x0278, 0x0278, 0x08, 0x08, _Y20)
949 IRQNoFlags (_Y21) {5}
950 })
951 Method (_CRS, 0, NotSerialized)
952 {
953 CreateWordField (CRS, \_SB.PCI0.LPT1._Y20._MIN, PMI1)
954 CreateWordField (CRS, \_SB.PCI0.LPT1._Y20._MAX, PMA1)
955 CreateWordField (CRS, \_SB.PCI0.LPT1._Y20._ALN, PAL1)
956 CreateWordField (CRS, \_SB.PCI0.LPT1._Y20._LEN, PLE1)
957 CreateWordField (CRS, \_SB.PCI0.LPT1._Y21._INT, PIQ1)
958 Store (PP1B, PMI1)
959 Store (PP1B, PMA1)
960 If (LEqual (0x3BC, PP1B)) {
961 Store (0x04, PAL1)
962 Store (0x04, PLE1)
963 }
964 ShiftLeft (0x01, PP1I, PIQ1)
965 Return (CRS)
966 }
967 }
968
969
970 // Serial port 0
971 Device (^SRL0)
972 {
973 Name (_HID, EisaId ("PNP0501"))
974 Name (_UID, 0x01)
975 Method (_STA, 0, NotSerialized)
976 {
977 If (LEqual (SL0B, Zero))
978 {
979 Return (0x00)
980 }
981 Else
982 {
983 Return (0x0F)
984 }
985 }
986 Name (CRS, ResourceTemplate ()
987 {
988 IO (Decode16, 0x03F8, 0x03F8, 0x01, 0x08, _Y14)
989 IRQNoFlags (_Y15) {4}
990 })
991 Method (_CRS, 0, NotSerialized)
992 {
993 CreateWordField (CRS, \_SB.PCI0.SRL0._Y14._MIN, MIN0)
994 CreateWordField (CRS, \_SB.PCI0.SRL0._Y14._MAX, MAX0)
995 CreateWordField (CRS, \_SB.PCI0.SRL0._Y15._INT, IRQ0)
996 Store (SL0B, MIN0)
997 Store (SL0B, MAX0)
998 ShiftLeft (0x01, SL0I, IRQ0)
999 Return (CRS)
1000 }
1001 }
1002
1003 // Serial port 1
1004 Device (^SRL1)
1005 {
1006 Name (_HID, EisaId ("PNP0501"))
1007 Name (_UID, 0x02)
1008 Method (_STA, 0, NotSerialized)
1009 {
1010 If (LEqual (SL1B, Zero))
1011 {
1012 Return (0x00)
1013 }
1014 Else
1015 {
1016 Return (0x0F)
1017 }
1018 }
1019 Name (CRS, ResourceTemplate ()
1020 {
1021 IO (Decode16, 0x02F8, 0x02F8, 0x01, 0x08, _Y16)
1022 IRQNoFlags (_Y17) {3}
1023 })
1024 Method (_CRS, 0, NotSerialized)
1025 {
1026 CreateWordField (CRS, \_SB.PCI0.SRL1._Y16._MIN, MIN1)
1027 CreateWordField (CRS, \_SB.PCI0.SRL1._Y16._MAX, MAX1)
1028 CreateWordField (CRS, \_SB.PCI0.SRL1._Y17._INT, IRQ1)
1029 Store (SL1B, MIN1)
1030 Store (SL1B, MAX1)
1031 ShiftLeft (0x01, SL1I, IRQ1)
1032 Return (CRS)
1033 }
1034 }
1035
1036 // Serial port 2
1037 Device (^SRL2)
1038 {
1039 Name (_HID, EisaId ("PNP0501"))
1040 Name (_UID, 0x03)
1041 Method (_STA, 0, NotSerialized)
1042 {
1043 If (LEqual (SL2B, Zero))
1044 {
1045 Return (0x00)
1046 }
1047 Else
1048 {
1049 Return (0x0F)
1050 }
1051 }
1052 Name (CRS, ResourceTemplate ()
1053 {
1054 IO (Decode16, 0x03E8, 0x03E8, 0x01, 0x08, _Y22)
1055 IRQNoFlags (_Y23) {3}
1056 })
1057 Method (_CRS, 0, NotSerialized)
1058 {
1059 CreateWordField (CRS, \_SB.PCI0.SRL2._Y22._MIN, MIN1)
1060 CreateWordField (CRS, \_SB.PCI0.SRL2._Y22._MAX, MAX1)
1061 CreateWordField (CRS, \_SB.PCI0.SRL2._Y23._INT, IRQ1)
1062 Store (SL2B, MIN1)
1063 Store (SL2B, MAX1)
1064 ShiftLeft (0x01, SL2I, IRQ1)
1065 Return (CRS)
1066 }
1067 }
1068
1069 // Serial port 3
1070 Device (^SRL3)
1071 {
1072 Name (_HID, EisaId ("PNP0501"))
1073 Name (_UID, 0x04)
1074 Method (_STA, 0, NotSerialized)
1075 {
1076 If (LEqual (SL3B, Zero))
1077 {
1078 Return (0x00)
1079 }
1080 Else
1081 {
1082 Return (0x0F)
1083 }
1084 }
1085 Name (CRS, ResourceTemplate ()
1086 {
1087 IO (Decode16, 0x02E8, 0x02E8, 0x01, 0x08, _Y24)
1088 IRQNoFlags (_Y25) {3}
1089 })
1090 Method (_CRS, 0, NotSerialized)
1091 {
1092 CreateWordField (CRS, \_SB.PCI0.SRL3._Y24._MIN, MIN1)
1093 CreateWordField (CRS, \_SB.PCI0.SRL3._Y24._MAX, MAX1)
1094 CreateWordField (CRS, \_SB.PCI0.SRL3._Y25._INT, IRQ1)
1095 Store (SL3B, MIN1)
1096 Store (SL3B, MAX1)
1097 ShiftLeft (0x01, SL3I, IRQ1)
1098 Return (CRS)
1099 }
1100 }
1101
1102 // Programmable Interval Timer (i8254)
1103 Device (TIMR)
1104 {
1105 Name (_HID, EisaId ("PNP0100"))
1106 Name (_CRS, ResourceTemplate ()
1107 {
1108 IO (Decode16,
1109 0x0040, // Range Minimum
1110 0x0040, // Range Maximum
1111 0x00, // Alignment
1112 0x04, // Length
1113 )
1114 IO (Decode16,
1115 0x0050, // Range Minimum
1116 0x0050, // Range Maximum
1117 0x10, // Alignment
1118 0x04, // Length
1119 )
1120 })
1121 }
1122
1123 // Programmable Interrupt Controller (i8259)
1124 Device (PIC)
1125 {
1126 Name (_HID, EisaId ("PNP0000"))
1127 Name (_CRS, ResourceTemplate ()
1128 {
1129 IO (Decode16,
1130 0x0020, // Range Minimum
1131 0x0020, // Range Maximum
1132 0x00, // Alignment
1133 0x02, // Length
1134 )
1135 IO (Decode16,
1136 0x00A0, // Range Minimum
1137 0x00A0, // Range Maximum
1138 0x00, // Alignment
1139 0x02, // Length
1140 )
1141 // because in APIC configs PIC connected to pin 0,
1142 // and ISA IRQ0 rerouted to pin 2
1143 IRQNoFlags ()
1144 {2}
1145 })
1146 }
1147
1148
1149 // Real Time Clock and CMOS (MC146818)
1150 Device (RTC)
1151 {
1152 Name (_HID, EisaId ("PNP0B00"))
1153 Name (_CRS, ResourceTemplate ()
1154 {
1155 IO (Decode16,
1156 0x0070, // Range Minimum
1157 0x0070, // Range Maximum
1158 0x01, // Alignment
1159 0x02, // Length
1160 )
1161 })
1162 Method (_STA, 0, NotSerialized)
1163 {
1164 Return (URTC)
1165 }
1166 }
1167
1168 // High Precision Event Timer
1169 Device(HPET)
1170 {
1171 Name (_HID, EISAID("PNP0103"))
1172 Name (_CID, EISAID("PNP0C01"))
1173 Name(_UID, 0)
1174
1175 Method (_STA, 0, NotSerialized)
1176 {
1177 Return(UHPT)
1178 }
1179
1180 Name(CRS, ResourceTemplate()
1181 {
1182 IRQNoFlags ()
1183 {0}
1184 IRQNoFlags ()
1185 {8}
1186 Memory32Fixed (ReadWrite,
1187 0xFED00000, // Address Base
1188 0x00000400 // Address Length
1189 )
1190 })
1191
1192 Method (_CRS, 0, NotSerialized)
1193 {
1194 Return (CRS)
1195 }
1196 }
1197
1198 // AMD IOMMU (AMD-Vi), I/O Virtualization Reporting Structure
1199 Device (IVRS)
1200 {
1201 Method(_ADR, 0, NotSerialized)
1202 {
1203 Return (IOMA)
1204 }
1205 Method (_STA, 0, NotSerialized)
1206 {
1207 if (LEqual (IOMA, Zero)) {
1208 Return (0x00)
1209 }
1210 else {
1211 Return (0x0F)
1212 }
1213 }
1214 }
1215
1216 // System Management Controller
1217 Device (SMC)
1218 {
1219 Name (_HID, EisaId ("APP0001"))
1220 Name (_CID, "smc-napa")
1221
1222 Method (_STA, 0, NotSerialized)
1223 {
1224 Return (USMC)
1225 }
1226 Name (CRS, ResourceTemplate ()
1227 {
1228 IO (Decode16,
1229 0x0300, // Range Minimum
1230 0x0300, // Range Maximum
1231 0x01, // Alignment
1232 0x20) // Length
1233 IRQNoFlags ()
1234 {6}
1235
1236 })
1237 Method (_CRS, 0, NotSerialized)
1238 {
1239 Return (CRS)
1240 }
1241 }
1242 }
1243
1244 // NVMe controller. Required to convince OS X that
1245 // the controller is an internal (built-in) device.
1246 Device (SSD0)
1247 {
1248 Method(_ADR, 0, NotSerialized)
1249 {
1250 Return (NVMA)
1251 }
1252 Method (_STA, 0, NotSerialized)
1253 {
1254 if (LEqual (NVMA, Zero)) {
1255 Return (0x00)
1256 }
1257 else {
1258 Return (0x0F)
1259 }
1260 }
1261 // Port 0
1262 Device (PRT0)
1263 {
1264 Name (_ADR, 0xffff)
1265 }
1266 }
1267
1268 // NIC
1269 Device (GIGE)
1270 {
1271 /**
1272 * Generic NIC, according to
1273 * http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/devids.txt
1274 * Needed by some Windows guests.
1275 */
1276 Name (_HID, EisaId ("PNP8390"))
1277
1278 Method(_ADR, 0, NotSerialized)
1279 {
1280 Return (NICA)
1281 }
1282 /* Name (_PRW, Package (0x02)
1283 {
1284 0x09,
1285 0x04
1286 }) */
1287
1288 /* Wake up on LAN? */
1289 /* Method (EWOL, 1, NotSerialized)
1290 {
1291 Return (0x00)
1292 } */
1293
1294 Method (_STA, 0, NotSerialized)
1295 {
1296 if (LEqual (NICA, Zero)) {
1297 Return (0x00)
1298 }
1299 else {
1300 Return (0x0F)
1301 }
1302 }
1303 }
1304
1305 // Graphics device
1306 Device (GFX0)
1307 {
1308 Name (_ADR, 0x00020000)
1309
1310 // Windows releases older than Windows 8 (starting with Windows 2000)
1311 // get confused by this and lose the monitor device node. One of
1312 // the consequences is that color management is not available.
1313 // For Windows 2000 - Windows 7, disable this device (while keeping
1314 // it enabled for non-Microsoft OSes).
1315 Method (_STA, 0, NotSerialized)
1316 {
1317 If (LAnd (LGreater (MSWN(), 0x00), LLess (MSWN(), 0x08)))
1318 {
1319 Return(0x00)
1320 }
1321 Else
1322 {
1323 Return(0x0F)
1324 }
1325 }
1326
1327 Scope (\_GPE)
1328 {
1329 // GPE bit 2 handler
1330 // GPE.2 must be set and SCI raised when
1331 // display information changes.
1332 Method (_L02, 0, NotSerialized)
1333 {
1334 Notify (\_SB.PCI0.GFX0, 0x81)
1335 }
1336 }
1337
1338 Method (_DOS, 1) { }
1339
1340 Method (_DOD, 0, NotSerialized)
1341 {
1342 Return (Package()
1343 {
1344 0x80000100
1345 })
1346 }
1347
1348 Device (VGA)
1349 {
1350 Method (_ADR, 0, Serialized)
1351 {
1352 Return (0x0100)
1353 }
1354 }
1355 }
1356
1357 // HDA Audio card
1358 Device (HDEF)
1359 {
1360 Method(_DSM, 4, NotSerialized)
1361 {
1362 Store (Package (0x04)
1363 {
1364 "layout-id",
1365 Buffer (0x04)
1366 {
1367 /* 04 */ 0x04, 0x00, 0x00, 0x00
1368 },
1369
1370 "PinConfigurations",
1371 Buffer (Zero) {}
1372 }, Local0)
1373 if (LEqual (Arg0, ToUUID("a0b5b7c6-1318-441c-b0c9-fe695eaf949b")))
1374 {
1375 If (LEqual (Arg1, One))
1376 {
1377 if (LEqual(Arg2, Zero))
1378 {
1379 Store (Buffer (0x01)
1380 {
1381 0x03
1382 }
1383 , Local0)
1384 Return (Local0)
1385 }
1386 if (LEqual(Arg2, One))
1387 {
1388 Return (Local0)
1389 }
1390 }
1391 }
1392 Store (Buffer (0x01)
1393 {
1394 0x0
1395 }
1396 , Local0)
1397 Return (Local0)
1398 }
1399
1400 Method(_ADR, 0, NotSerialized)
1401 {
1402 Return (HDAA)
1403 }
1404
1405 Method (_STA, 0, NotSerialized)
1406 {
1407 if (LEqual (HDAA, Zero)) {
1408 Return (0x00)
1409 }
1410 else {
1411 Return (0x0F)
1412 }
1413 }
1414 }
1415
1416
1417 // Control method battery
1418 Device (BAT0)
1419 {
1420 Name (_HID, EisaId ("PNP0C0A"))
1421 Name (_UID, 0x00)
1422
1423 Scope (\_GPE)
1424 {
1425 // GPE bit 0 handler
1426 // GPE.0 must be set and SCI raised when battery info
1427 // changed. Do NOT re-evaluate _BIF (battery info, never
1428 // changes) but DO re-evaluate _BST (dynamic state). Also
1429 // re-evaluate the AC adapter status.
1430 Method (_L00, 0, NotSerialized)
1431 {
1432 // _BST must be re-evaluated (battery state)
1433 Notify (\_SB.PCI0.BAT0, 0x80)
1434 // _PSR must be re-evaluated (AC adapter status)
1435 Notify (\_SB.PCI0.AC, 0x80)
1436 }
1437 }
1438
1439 OperationRegion (CBAT, SystemIO, 0x4040, 0x08)
1440 Field (CBAT, DwordAcc, NoLock, Preserve)
1441 {
1442 IDX0, 32,
1443 DAT0, 32,
1444 }
1445
1446 IndexField (IDX0, DAT0, DwordAcc, NoLock, Preserve)
1447 {
1448 STAT, 32,
1449 PRAT, 32,
1450 RCAP, 32,
1451 PVOL, 32,
1452
1453 UNIT, 32,
1454 DCAP, 32,
1455 LFCP, 32,
1456 BTEC, 32,
1457 DVOL, 32,
1458 DWRN, 32,
1459 DLOW, 32,
1460 GRN1, 32,
1461 GRN2, 32,
1462
1463 BSTA, 32,
1464 APSR, 32,
1465 }
1466
1467 Method (_STA, 0, NotSerialized)
1468 {
1469 return (BSTA)
1470 }
1471
1472 Name (PBIF, Package ()
1473 {
1474 0x01, // Power unit, 1 - mA
1475 0x7fffffff, // Design capacity
1476 0x7fffffff, // Last full charge capacity
1477 0x00, // Battery technology
1478 0xffffffff, // Design voltage
1479 0x00, // Design capacity of Warning
1480 0x00, // Design capacity of Low
1481 0x04, // Battery capacity granularity 1
1482 0x04, // Battery capacity granularity 2
1483 "1", // Model number
1484 "0", // Serial number
1485 "VBOX", // Battery type
1486 "innotek" // OEM Information
1487 })
1488
1489 Name (PBST, Package () {
1490 0, // Battery state
1491 0x7fffffff, // Battery present rate
1492 0x7fffffff, // Battery remaining capacity
1493 0x7fffffff // Battery present voltage
1494 })
1495
1496 // Battery information
1497 Method (_BIF, 0, NotSerialized)
1498 {
1499 Store (UNIT, Index (PBIF, 0,))
1500 Store (DCAP, Index (PBIF, 1,))
1501 Store (LFCP, Index (PBIF, 2,))
1502 Store (BTEC, Index (PBIF, 3,))
1503 Store (DVOL, Index (PBIF, 4,))
1504 Store (DWRN, Index (PBIF, 5,))
1505 Store (DLOW, Index (PBIF, 6,))
1506 Store (GRN1, Index (PBIF, 7,))
1507 Store (GRN2, Index (PBIF, 8,))
1508
1509 DBG ("_BIF:\n")
1510 HEX4 (DerefOf (Index (PBIF, 0,)))
1511 HEX4 (DerefOf (Index (PBIF, 1,)))
1512 HEX4 (DerefOf (Index (PBIF, 2,)))
1513 HEX4 (DerefOf (Index (PBIF, 3,)))
1514 HEX4 (DerefOf (Index (PBIF, 4,)))
1515 HEX4 (DerefOf (Index (PBIF, 5,)))
1516 HEX4 (DerefOf (Index (PBIF, 6,)))
1517 HEX4 (DerefOf (Index (PBIF, 7,)))
1518 HEX4 (DerefOf (Index (PBIF, 8,)))
1519
1520 return (PBIF)
1521 }
1522
1523 // Battery status
1524 Method (_BST, 0, NotSerialized)
1525 {
1526 Store (STAT, Index (PBST, 0,))
1527 Store (PRAT, Index (PBST, 1,))
1528 Store (RCAP, Index (PBST, 2,))
1529 Store (PVOL, Index (PBST, 3,))
1530/*
1531 DBG ("_BST:\n")
1532 HEX4 (DerefOf (Index (PBST, 0,)))
1533 HEX4 (DerefOf (Index (PBST, 1,)))
1534 HEX4 (DerefOf (Index (PBST, 2,)))
1535 HEX4 (DerefOf (Index (PBST, 3,)))
1536*/
1537 return (PBST)
1538 }
1539 }
1540
1541 Device (AC)
1542 {
1543 Name (_HID, "ACPI0003")
1544 Name (_UID, 0x00)
1545 Name (_PCL, Package (0x01)
1546 {
1547 \_SB
1548 })
1549
1550 Method (_PSR, 0, NotSerialized)
1551 {
1552 // DBG ("_PSR:\n")
1553 // HEX4 (\_SB.PCI0.BAT0.APSR)
1554 return (\_SB.PCI0.BAT0.APSR)
1555 }
1556
1557 Method (_STA, 0, NotSerialized)
1558 {
1559 return (0x0f)
1560 }
1561 }
1562 }
1563 }
1564
1565 Scope (\_SB)
1566 {
1567 Scope (PCI0)
1568 {
1569 // PCI0 current resource settings
1570 Name (CRS, ResourceTemplate ()
1571 {
1572 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
1573 0x0000,
1574 0x0000,
1575 0x00FF,
1576 0x0000,
1577 0x0100)
1578 IO (Decode16, 0x0CF8, 0x0CF8, 0x01, 0x08)
1579 WordIO (ResourceProducer, MinFixed, MaxFixed,
1580 PosDecode, EntireRange,
1581 0x0000,
1582 0x0000,
1583 0x0CF7,
1584 0x0000,
1585 0x0CF8)
1586 WordIO (ResourceProducer, MinFixed, MaxFixed,
1587 PosDecode, EntireRange,
1588 0x0000,
1589 0x0D00,
1590 0xFFFF,
1591 0x0000,
1592 0xF300)
1593
1594 /* Taken from ACPI faq (with some modifications) */
1595 DwordMemory( // descriptor for video RAM behind ISA bus
1596 ResourceProducer, // bit 0 of general flags is 0
1597 PosDecode,
1598 MinFixed, // Range is fixed
1599 MaxFixed, // Range is Fixed
1600 Cacheable,
1601 ReadWrite,
1602 0x00000000, // Granularity
1603 0x000a0000, // Min
1604 0x000bffff, // Max
1605 0x00000000, // Translation
1606 0x00020000 // Range Length
1607 )
1608
1609 DwordMemory( // Consumed-and-produced resource
1610 // (all of low memory space)
1611 ResourceProducer, // bit 0 of general flags is 0
1612 PosDecode, // positive Decode
1613 MinFixed, // Range is fixed
1614 MaxFixed, // Range is fixed
1615 Cacheable,
1616 ReadWrite,
1617 0x00000000, // Granularity
1618 0xe0000000, // Min (calculated dynamically)
1619
1620 0xfdffffff, // Max = 4GB - 32MB
1621 0x00000000, // Translation
1622 0x1e000000, // Range Length (calculated
1623 // dynamically)
1624 , // Optional field left blank
1625 , // Optional field left blank
1626 MEM3 // Name declaration for this
1627 // descriptor
1628 )
1629 })
1630
1631 Name (TOM, ResourceTemplate ()
1632 {
1633 QwordMemory(
1634 ResourceProducer, // bit 0 of general flags is 0
1635 PosDecode, // positive Decode
1636 MinFixed, // Range is fixed
1637 MaxFixed, // Range is fixed
1638 Prefetchable,
1639 ReadWrite,
1640 0x0000000000000000, // _GRA: Granularity.
1641 0x0000000100000000, // _MIN: Min address, def. 4GB, will be overwritten.
1642 0x0000000fffffffff, // _MAX: Max address, def. 64GB-1, will be overwritten.
1643 0x0000000000000000, // _TRA: Translation
1644 0x0000000f00000000, // _LEN: Range length (_MAX-_MIN+1)
1645 , // ResourceSourceIndex: Optional field left blank
1646 , // ResourceSource: Optional field left blank
1647 MEM4 // Name declaration for this descriptor.
1648 )
1649 })
1650
1651 Method (_CRS, 0, NotSerialized)
1652 {
1653 CreateDwordField (CRS, \_SB.PCI0.MEM3._MIN, RAMT)
1654 CreateDwordField (CRS, \_SB.PCI0.MEM3._LEN, RAMR)
1655
1656 Store (MEML, RAMT)
1657 Subtract (0xfe000000, RAMT, RAMR)
1658
1659 if (LNotEqual (PMNN, 0x00000000))
1660 {
1661 // Not for Windows < 7!
1662 If (LOr (LLess (MSWN(), 0x01), LGreater (MSWN(), 0x06)))
1663 {
1664 CreateQwordField (TOM, \_SB.PCI0.MEM4._MIN, TM4N)
1665 CreateQwordField (TOM, \_SB.PCI0.MEM4._MAX, TM4X)
1666 CreateQwordField (TOM, \_SB.PCI0.MEM4._LEN, TM4L)
1667
1668 Multiply (PMNN, 0x10000, TM4N) // PMNN in units of 64KB
1669 Subtract (Multiply (PMNX, 0x10000), 1, TM4X) // PMNX in units of 64KB
1670 Add (Subtract (TM4X, TM4N), 1, TM4L) // determine LEN, MAX is already there
1671
1672 ConcatenateResTemplate (CRS, TOM, Local2)
1673
1674 Return (Local2)
1675 }
1676 }
1677
1678 Return (CRS)
1679 }
1680
1681 /* Defined in PCI Firmware Specification 3.0 and ACPI 3.0, with both specs
1682 * referencing each other. The _OSC method must be present to make Linux happy,
1683 * but needs to prevent the OS from taking much control so as to not upset Windows.
1684 * NB: The first DWORD is defined in the ACPI spec but not the PCI FW spec.
1685 */
1686 Method (_OSC, 4)
1687 {
1688 Name(SUPP, 0) // Support field value
1689 Name(CTRL, 0) // Control field value
1690
1691 // Break down the input capabilities buffer into individual DWORDs
1692 CreateDWordField(Arg3, 0, CDW1)
1693 CreateDWordField(Arg3, 4, CDW2)
1694 CreateDWordField(Arg3, 8, CDW3)
1695
1696 If (LEqual (Arg0, ToUUID("33db4d5b-1ff7-401c-9657-7441c03dd766")))
1697 {
1698 // Stash the Support and Control fields
1699 Store(CDW2, SUPP)
1700 Store(CDW3, CTRL)
1701
1702 DBG("_OSC: SUPP=")
1703 HEX4(SUPP)
1704 DBG(" CTRL=")
1705 HEX4(CTRL)
1706 DBG("\n")
1707
1708 // Mask off the PCI Express Capability Structure control
1709 // Not emulated well enough to satisfy Windows (Vista and later)
1710 And(CTRL, 0x0F, CTRL)
1711
1712 // If capabilities were masked, set the Capabilities Masked flag (bit 4)
1713 If (LNotEqual(CDW3, CTRL))
1714 {
1715 Or(CDW1, 0x10, CDW1)
1716 }
1717
1718 // Update the Control field and return
1719 Store(CTRL, CDW3)
1720 Return(Arg3)
1721 }
1722 Else
1723 {
1724 // UUID not known, set Unrecognized UUID flag (bit 2)
1725 Or(CDW1, 0x04, CDW1)
1726 Return(Arg3)
1727 }
1728 }
1729 }
1730 }
1731
1732 Scope (\_SB)
1733 {
1734 // Fields within PIIX3 configuration[0x60..0x63] with
1735 // IRQ mappings
1736 Field (\_SB.PCI0.SBRG.PCIC, ByteAcc, NoLock, Preserve)
1737 {
1738 Offset (0x60),
1739 PIRA, 8,
1740 PIRB, 8,
1741 PIRC, 8,
1742 PIRD, 8
1743 }
1744
1745 Name (BUFA, ResourceTemplate ()
1746 {
1747 IRQ (Level, ActiveLow, Shared) {15}
1748 })
1749 CreateWordField (BUFA, 0x01, ICRS)
1750
1751 // Generic status of IRQ routing entry
1752 Method (LSTA, 1, NotSerialized)
1753 {
1754 And (Arg0, 0x80, Local0)
1755// DBG ("LSTA: ")
1756// HEX (Arg0)
1757 If (Local0)
1758 {
1759 Return (0x09)
1760 }
1761 Else
1762 {
1763 Return (0x0B)
1764 }
1765 }
1766
1767 // Generic "current resource settings" for routing entry
1768 Method (LCRS, 1, NotSerialized)
1769 {
1770 And (Arg0, 0x0F, Local0)
1771 ShiftLeft (0x01, Local0, ICRS)
1772// DBG ("LCRS: ")
1773// HEX (ICRS)
1774 Return (BUFA)
1775 }
1776
1777 // Generic "set resource settings" for routing entry
1778 Method (LSRS, 1, NotSerialized)
1779 {
1780 CreateWordField (Arg0, 0x01, ISRS)
1781 FindSetRightBit (ISRS, Local0)
1782 Return (Decrement (Local0))
1783 }
1784
1785 // Generic "disable" for routing entry
1786 Method (LDIS, 1, NotSerialized)
1787 {
1788 Return (Or (Arg0, 0x80))
1789 }
1790
1791 // Link A
1792 Device (LNKA)
1793 {
1794 Name (_HID, EisaId ("PNP0C0F"))
1795 Name (_UID, 0x01)
1796
1797 // Status
1798 Method (_STA, 0, NotSerialized)
1799 {
1800 DBG ("LNKA._STA\n")
1801 Return (LSTA (PIRA))
1802 }
1803
1804 // Possible resource settings
1805 Method (_PRS, 0, NotSerialized)
1806 {
1807 DBG ("LNKA._PRS\n")
1808 Return (PRSA)
1809 }
1810
1811 // Disable
1812 Method (_DIS, 0, NotSerialized)
1813 {
1814 DBG ("LNKA._DIS\n")
1815 Store (LDIS (PIRA), PIRA)
1816 }
1817
1818 // Current resource settings
1819 Method (_CRS, 0, NotSerialized)
1820 {
1821 DBG ("LNKA._CRS\n")
1822 Return (LCRS (PIRA))
1823 }
1824
1825 // Set resource settings
1826 Method (_SRS, 1, NotSerialized)
1827 {
1828 DBG ("LNKA._SRS: ")
1829 HEX (LSRS (Arg0))
1830 Store (LSRS (Arg0), PIRA)
1831 }
1832 }
1833
1834 // Link B
1835 Device (LNKB)
1836 {
1837 Name (_HID, EisaId ("PNP0C0F"))
1838 Name (_UID, 0x02)
1839 Method (_STA, 0, NotSerialized)
1840 {
1841 // DBG ("LNKB._STA\n")
1842 Return (LSTA (PIRB))
1843 }
1844
1845 Method (_PRS, 0, NotSerialized)
1846 {
1847 // DBG ("LNKB._PRS\n")
1848 Return (PRSB)
1849 }
1850
1851 Method (_DIS, 0, NotSerialized)
1852 {
1853 // DBG ("LNKB._DIS\n")
1854 Store (LDIS (PIRB), PIRB)
1855 }
1856
1857 Method (_CRS, 0, NotSerialized)
1858 {
1859 // DBG ("LNKB._CRS\n")
1860 Return (LCRS (PIRB))
1861 }
1862
1863 Method (_SRS, 1, NotSerialized)
1864 {
1865 DBG ("LNKB._SRS: ")
1866 HEX (LSRS (Arg0))
1867 Store (LSRS (Arg0), PIRB)
1868 }
1869 }
1870
1871 // Link C
1872 Device (LNKC)
1873 {
1874 Name (_HID, EisaId ("PNP0C0F"))
1875 Name (_UID, 0x03)
1876 Method (_STA, 0, NotSerialized)
1877 {
1878 // DBG ("LNKC._STA\n")
1879 Return (LSTA (PIRC))
1880 }
1881
1882 Method (_PRS, 0, NotSerialized)
1883 {
1884 // DBG ("LNKC._PRS\n")
1885 Return (PRSC)
1886 }
1887
1888 Method (_DIS, 0, NotSerialized)
1889 {
1890 // DBG ("LNKC._DIS\n")
1891 Store (LDIS (PIRC), PIRC)
1892 }
1893
1894 Method (_CRS, 0, NotSerialized)
1895 {
1896 // DBG ("LNKC._CRS\n")
1897 Return (LCRS (PIRC))
1898 }
1899
1900 Method (_SRS, 1, NotSerialized)
1901 {
1902 DBG ("LNKC._SRS: ")
1903 HEX (LSRS (Arg0))
1904 Store (LSRS (Arg0), PIRC)
1905 }
1906 }
1907
1908 // Link D
1909 Device (LNKD)
1910 {
1911 Name (_HID, EisaId ("PNP0C0F"))
1912 Name (_UID, 0x04)
1913 Method (_STA, 0, NotSerialized)
1914 {
1915 // DBG ("LNKD._STA\n")
1916 Return (LSTA (PIRD))
1917 }
1918
1919 Method (_PRS, 0, NotSerialized)
1920 {
1921 // DBG ("LNKD._PRS\n")
1922 Return (PRSD)
1923 }
1924
1925 Method (_DIS, 0, NotSerialized)
1926 {
1927 // DBG ("LNKD._DIS\n")
1928 Store (LDIS (PIRA), PIRD)
1929 }
1930
1931 Method (_CRS, 0, NotSerialized)
1932 {
1933 // DBG ("LNKD._CRS\n")
1934 Return (LCRS (PIRD))
1935 }
1936
1937 Method (_SRS, 1, NotSerialized)
1938 {
1939 DBG ("LNKD._SRS: ")
1940 HEX (LSRS (Arg0))
1941 Store (LSRS (Arg0), PIRD)
1942 }
1943 }
1944 }
1945
1946 // Sx states
1947 Name (_S0, Package (2) {
1948 0x00,
1949 0x00,
1950 })
1951
1952 // Shift one by the power state number
1953 If (And(PWRS, ShiftLeft(One,1))) {
1954 Name (_S1, Package (2) {
1955 0x01,
1956 0x01,
1957 })
1958 }
1959
1960 If (And(PWRS, ShiftLeft(One,4))) {
1961 Name (_S4, Package (2) {
1962 0x05,
1963 0x05,
1964 })
1965 }
1966
1967 Name (_S5, Package (2) {
1968 0x05,
1969 0x05,
1970 })
1971
1972 Method (_PTS, 1, NotSerialized)
1973 {
1974 DBG ("Prepare to sleep: ")
1975 HEX (Arg0)
1976 }
1977}
1978
1979/*
1980 * Local Variables:
1981 * comment-start: "//"
1982 * End:
1983 */
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