VirtualBox

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

Last change on this file since 33434 was 33434, checked in by vboxsync, 14 years ago

ACPI: _DSM method for HDEF entry.

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