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