VirtualBox

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

Last change on this file since 103137 was 98103, checked in by vboxsync, 23 months ago

Copyright year updates by scm.

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