1 | // $Id: vbox.dsl 15008 2008-12-04 21:45:53Z vboxsync $
|
---|
2 | /// @file
|
---|
3 | //
|
---|
4 | // VirtualBox ACPI
|
---|
5 | //
|
---|
6 | // Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
7 | //
|
---|
8 | // This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
9 | // available from http://www.virtualbox.org. This file is free software;
|
---|
10 | // you can redistribute it and/or modify it under the terms of the GNU
|
---|
11 | // General Public License as published by the Free Software Foundation,
|
---|
12 | // in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
---|
13 | // distribution. VirtualBox OSE is distributed in the hope that it will
|
---|
14 | // be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
15 | //
|
---|
16 |
|
---|
17 | DefinitionBlock ("DSDT.aml", "DSDT", 1, "VBOX ", "VBOXBIOS", 2)
|
---|
18 | {
|
---|
19 | // Declare debugging ports withing SystemIO
|
---|
20 | OperationRegion(DBG0, SystemIO, 0x3000, 4)
|
---|
21 |
|
---|
22 | // Writes to this field Will dump hex char
|
---|
23 | Field (DBG0, ByteAcc, NoLock, Preserve)
|
---|
24 | {
|
---|
25 | DHE1, 8,
|
---|
26 | }
|
---|
27 |
|
---|
28 | // Writes to this field Will dump hex word
|
---|
29 | Field (DBG0, WordAcc, NoLock, Preserve)
|
---|
30 | {
|
---|
31 | DHE2, 16,
|
---|
32 | }
|
---|
33 |
|
---|
34 | // Writes to this field Will dump hex double word
|
---|
35 | Field (DBG0, DWordAcc, NoLock, Preserve)
|
---|
36 | {
|
---|
37 | DHE4, 32,
|
---|
38 | }
|
---|
39 |
|
---|
40 | // Writes to this field will dump ascii char
|
---|
41 | Field (DBG0, ByteAcc, NoLock, Preserve)
|
---|
42 | {
|
---|
43 | Offset (1),
|
---|
44 | DCHR, 8
|
---|
45 | }
|
---|
46 |
|
---|
47 | // Shortcuts
|
---|
48 | Method(HEX, 1)
|
---|
49 | {
|
---|
50 | Store (Arg0, DHE1)
|
---|
51 | }
|
---|
52 |
|
---|
53 | Method(HEX2, 1)
|
---|
54 | {
|
---|
55 | Store (Arg0, DHE2)
|
---|
56 | }
|
---|
57 |
|
---|
58 | Method(HEX4, 1)
|
---|
59 | {
|
---|
60 | Store (Arg0, DHE4)
|
---|
61 | }
|
---|
62 |
|
---|
63 | // Code from Microsoft sample
|
---|
64 | // http://www.microsoft.com/whdc/system/pnppwr/powermgmt/_OSI-method.mspx
|
---|
65 |
|
---|
66 | //
|
---|
67 | // SLEN(Str) - Returns the length of Str (excluding NULL).
|
---|
68 | //
|
---|
69 | Method(SLEN, 1)
|
---|
70 | {
|
---|
71 | //
|
---|
72 | // Note: The caller must make sure that the argument is a string object.
|
---|
73 | //
|
---|
74 | Store(Arg0, Local0)
|
---|
75 | Return(Sizeof(Local0))
|
---|
76 | }
|
---|
77 |
|
---|
78 | Method(S2BF, 1)
|
---|
79 | {
|
---|
80 | //
|
---|
81 | // Note: The caller must make sure that the argument is a string object.
|
---|
82 | //
|
---|
83 | // Local0 contains length of string + NULL.
|
---|
84 | //
|
---|
85 | Store(Arg0, Local0)
|
---|
86 | Add(SLEN(Local0), One, Local0)
|
---|
87 | //
|
---|
88 | // Convert the string object into a buffer object.
|
---|
89 | //
|
---|
90 | Name(BUFF, Buffer(Local0) {})
|
---|
91 | Store(Arg0, BUFF)
|
---|
92 | Return(BUFF)
|
---|
93 | }
|
---|
94 |
|
---|
95 | // Convert ASCII string to buffer and store it's contents (char by
|
---|
96 | // char) into DCHR (thus possibly writing the string to console)
|
---|
97 | Method (\DBG, 1, NotSerialized)
|
---|
98 | {
|
---|
99 | Store(Arg0, Local0)
|
---|
100 | Store(S2BF (Local0), Local1)
|
---|
101 | Store(SizeOf (Local1), Local0)
|
---|
102 | Decrement (Local0)
|
---|
103 | Store(Zero, Local2)
|
---|
104 | While (Local0)
|
---|
105 | {
|
---|
106 | Decrement (Local0)
|
---|
107 | Store (DerefOf (Index (Local1, Local2)), DCHR)
|
---|
108 | Increment (Local2)
|
---|
109 | }
|
---|
110 | }
|
---|
111 |
|
---|
112 | Name(PICM, 0)
|
---|
113 | Method(_PIC, 1)
|
---|
114 | {
|
---|
115 | DBG ("Pic mode: ")
|
---|
116 | HEX4 (Arg0)
|
---|
117 | Store (Arg0, PICM)
|
---|
118 | }
|
---|
119 |
|
---|
120 | // Processor object
|
---|
121 | // #1463: Showing the CPU can make the guest do bad things on it like SpeedStep.
|
---|
122 | // In this case, XP SP2 contains this buggy Intelppm.sys driver which wants to mess
|
---|
123 | // with SpeedStep if it finds a CPU object and when it finds out that it can't, it
|
---|
124 | // tries to unload and crashes (MS probably never tested this code path).
|
---|
125 | // Scope (\_PR)
|
---|
126 | // {
|
---|
127 | // Processor (CPU1, 0x01, 0x00000000, 0x00) {}
|
---|
128 | // }
|
---|
129 |
|
---|
130 | Scope (\_SB)
|
---|
131 | {
|
---|
132 | OperationRegion (SYSI, SystemIO, 0x4048, 0x08)
|
---|
133 | Field (SYSI, DwordAcc, NoLock, Preserve)
|
---|
134 | {
|
---|
135 | IDX0, 32,
|
---|
136 | DAT0, 32,
|
---|
137 | }
|
---|
138 |
|
---|
139 | IndexField (IDX0, DAT0, DwordAcc, NoLock, Preserve)
|
---|
140 | {
|
---|
141 | MEML, 32,
|
---|
142 | UIOA, 32,
|
---|
143 | Offset (0x80),
|
---|
144 | ININ, 32,
|
---|
145 | Offset (0x200),
|
---|
146 | VAIN, 32,
|
---|
147 | }
|
---|
148 |
|
---|
149 | Method (_INI, 0, NotSerialized)
|
---|
150 | {
|
---|
151 | Store (0xbadc0de, VAIN)
|
---|
152 | DBG ("MEML: ")
|
---|
153 | HEX4 (MEML)
|
---|
154 | DBG ("UIOA: ")
|
---|
155 | HEX4 (UIOA)
|
---|
156 | }
|
---|
157 |
|
---|
158 | // PCI PIC IRQ Routing table
|
---|
159 | // Must match pci.c:pci_slot_get_pirq
|
---|
160 | Name (PR00, Package ()
|
---|
161 | {
|
---|
162 | Package (0x04) {0x0002FFFF, 0x00, LNKB, 0x00,},
|
---|
163 | Package (0x04) {0x0002FFFF, 0x01, LNKC, 0x00,},
|
---|
164 | Package (0x04) {0x0002FFFF, 0x02, LNKD, 0x00,},
|
---|
165 | Package (0x04) {0x0002FFFF, 0x03, LNKA, 0x00,},
|
---|
166 |
|
---|
167 | Package (0x04) {0x0003FFFF, 0x00, LNKC, 0x00,},
|
---|
168 | Package (0x04) {0x0003FFFF, 0x01, LNKD, 0x00,},
|
---|
169 | Package (0x04) {0x0003FFFF, 0x02, LNKA, 0x00,},
|
---|
170 | Package (0x04) {0x0003FFFF, 0x03, LNKB, 0x00,},
|
---|
171 |
|
---|
172 | Package (0x04) {0x0004FFFF, 0x00, LNKD, 0x00,},
|
---|
173 | Package (0x04) {0x0004FFFF, 0x01, LNKA, 0x00,},
|
---|
174 | Package (0x04) {0x0004FFFF, 0x02, LNKB, 0x00,},
|
---|
175 | Package (0x04) {0x0004FFFF, 0x03, LNKC, 0x00,},
|
---|
176 |
|
---|
177 | Package (0x04) {0x0005FFFF, 0x00, LNKA, 0x00,},
|
---|
178 | Package (0x04) {0x0005FFFF, 0x01, LNKB, 0x00,},
|
---|
179 | Package (0x04) {0x0005FFFF, 0x02, LNKC, 0x00,},
|
---|
180 | Package (0x04) {0x0005FFFF, 0x03, LNKD, 0x00,},
|
---|
181 |
|
---|
182 | Package (0x04) {0x0006FFFF, 0x00, LNKB, 0x00,},
|
---|
183 | Package (0x04) {0x0006FFFF, 0x01, LNKC, 0x00,},
|
---|
184 | Package (0x04) {0x0006FFFF, 0x02, LNKD, 0x00,},
|
---|
185 | Package (0x04) {0x0006FFFF, 0x03, LNKA, 0x00,},
|
---|
186 |
|
---|
187 | Package (0x04) {0x0007FFFF, 0x00, LNKC, 0x00,},
|
---|
188 | Package (0x04) {0x0007FFFF, 0x01, LNKD, 0x00,},
|
---|
189 | Package (0x04) {0x0007FFFF, 0x02, LNKA, 0x00,},
|
---|
190 | Package (0x04) {0x0007FFFF, 0x03, LNKB, 0x00,},
|
---|
191 |
|
---|
192 | Package (0x04) {0x0008FFFF, 0x00, LNKD, 0x00,},
|
---|
193 | Package (0x04) {0x0008FFFF, 0x01, LNKA, 0x00,},
|
---|
194 | Package (0x04) {0x0008FFFF, 0x02, LNKB, 0x00,},
|
---|
195 | Package (0x04) {0x0008FFFF, 0x03, LNKC, 0x00,},
|
---|
196 |
|
---|
197 | Package (0x04) {0x0009FFFF, 0x00, LNKA, 0x00,},
|
---|
198 | Package (0x04) {0x0009FFFF, 0x01, LNKB, 0x00,},
|
---|
199 | Package (0x04) {0x0009FFFF, 0x02, LNKC, 0x00,},
|
---|
200 | Package (0x04) {0x0009FFFF, 0x03, LNKD, 0x00,},
|
---|
201 |
|
---|
202 | Package (0x04) {0x000AFFFF, 0x00, LNKB, 0x00,},
|
---|
203 | Package (0x04) {0x000AFFFF, 0x01, LNKC, 0x00,},
|
---|
204 | Package (0x04) {0x000AFFFF, 0x02, LNKD, 0x00,},
|
---|
205 | Package (0x04) {0x000AFFFF, 0x03, LNKA, 0x00,},
|
---|
206 |
|
---|
207 | Package (0x04) {0x000BFFFF, 0x00, LNKC, 0x00,},
|
---|
208 | Package (0x04) {0x000BFFFF, 0x01, LNKD, 0x00,},
|
---|
209 | Package (0x04) {0x000BFFFF, 0x02, LNKA, 0x00,},
|
---|
210 | Package (0x04) {0x000BFFFF, 0x03, LNKB, 0x00,},
|
---|
211 |
|
---|
212 | Package (0x04) {0x000CFFFF, 0x00, LNKD, 0x00,},
|
---|
213 | Package (0x04) {0x000CFFFF, 0x01, LNKA, 0x00,},
|
---|
214 | Package (0x04) {0x000CFFFF, 0x02, LNKB, 0x00,},
|
---|
215 | Package (0x04) {0x000CFFFF, 0x03, LNKC, 0x00,},
|
---|
216 |
|
---|
217 | Package (0x04) {0x000DFFFF, 0x00, LNKA, 0x00,},
|
---|
218 | Package (0x04) {0x000DFFFF, 0x01, LNKB, 0x00,},
|
---|
219 | Package (0x04) {0x000DFFFF, 0x02, LNKC, 0x00,},
|
---|
220 | Package (0x04) {0x000DFFFF, 0x03, LNKD, 0x00,},
|
---|
221 |
|
---|
222 | Package (0x04) {0x000EFFFF, 0x00, LNKB, 0x00,},
|
---|
223 | Package (0x04) {0x000EFFFF, 0x01, LNKC, 0x00,},
|
---|
224 | Package (0x04) {0x000EFFFF, 0x02, LNKD, 0x00,},
|
---|
225 | Package (0x04) {0x000EFFFF, 0x03, LNKA, 0x00,},
|
---|
226 |
|
---|
227 | Package (0x04) {0x000FFFFF, 0x00, LNKC, 0x00,},
|
---|
228 | Package (0x04) {0x000FFFFF, 0x01, LNKD, 0x00,},
|
---|
229 | Package (0x04) {0x000FFFFF, 0x02, LNKA, 0x00,},
|
---|
230 | Package (0x04) {0x000FFFFF, 0x03, LNKB, 0x00,},
|
---|
231 |
|
---|
232 | Package (0x04) {0x0010FFFF, 0x00, LNKD, 0x00,},
|
---|
233 | Package (0x04) {0x0010FFFF, 0x01, LNKA, 0x00,},
|
---|
234 | Package (0x04) {0x0010FFFF, 0x02, LNKB, 0x00,},
|
---|
235 | Package (0x04) {0x0010FFFF, 0x03, LNKC, 0x00,},
|
---|
236 |
|
---|
237 | Package (0x04) {0x0011FFFF, 0x00, LNKA, 0x00,},
|
---|
238 | Package (0x04) {0x0011FFFF, 0x01, LNKB, 0x00,},
|
---|
239 | Package (0x04) {0x0011FFFF, 0x02, LNKC, 0x00,},
|
---|
240 | Package (0x04) {0x0011FFFF, 0x03, LNKD, 0x00,},
|
---|
241 |
|
---|
242 | Package (0x04) {0x0012FFFF, 0x00, LNKB, 0x00,},
|
---|
243 | Package (0x04) {0x0012FFFF, 0x01, LNKC, 0x00,},
|
---|
244 | Package (0x04) {0x0012FFFF, 0x02, LNKD, 0x00,},
|
---|
245 | Package (0x04) {0x0012FFFF, 0x03, LNKA, 0x00,},
|
---|
246 |
|
---|
247 | Package (0x04) {0x0013FFFF, 0x00, LNKC, 0x00,},
|
---|
248 | Package (0x04) {0x0013FFFF, 0x01, LNKD, 0x00,},
|
---|
249 | Package (0x04) {0x0013FFFF, 0x02, LNKA, 0x00,},
|
---|
250 | Package (0x04) {0x0013FFFF, 0x03, LNKB, 0x00,},
|
---|
251 |
|
---|
252 | Package (0x04) {0x0014FFFF, 0x00, LNKD, 0x00,},
|
---|
253 | Package (0x04) {0x0014FFFF, 0x01, LNKA, 0x00,},
|
---|
254 | Package (0x04) {0x0014FFFF, 0x02, LNKB, 0x00,},
|
---|
255 | Package (0x04) {0x0014FFFF, 0x03, LNKC, 0x00,},
|
---|
256 |
|
---|
257 | Package (0x04) {0x0015FFFF, 0x00, LNKA, 0x00,},
|
---|
258 | Package (0x04) {0x0015FFFF, 0x01, LNKB, 0x00,},
|
---|
259 | Package (0x04) {0x0015FFFF, 0x02, LNKC, 0x00,},
|
---|
260 | Package (0x04) {0x0015FFFF, 0x03, LNKD, 0x00,},
|
---|
261 |
|
---|
262 | Package (0x04) {0x0016FFFF, 0x00, LNKB, 0x00,},
|
---|
263 | Package (0x04) {0x0016FFFF, 0x01, LNKC, 0x00,},
|
---|
264 | Package (0x04) {0x0016FFFF, 0x02, LNKD, 0x00,},
|
---|
265 | Package (0x04) {0x0016FFFF, 0x03, LNKA, 0x00,},
|
---|
266 |
|
---|
267 | Package (0x04) {0x0017FFFF, 0x00, LNKC, 0x00,},
|
---|
268 | Package (0x04) {0x0017FFFF, 0x01, LNKD, 0x00,},
|
---|
269 | Package (0x04) {0x0017FFFF, 0x02, LNKA, 0x00,},
|
---|
270 | Package (0x04) {0x0017FFFF, 0x03, LNKB, 0x00,},
|
---|
271 |
|
---|
272 | Package (0x04) {0x0018FFFF, 0x00, LNKD, 0x00,},
|
---|
273 | Package (0x04) {0x0018FFFF, 0x01, LNKA, 0x00,},
|
---|
274 | Package (0x04) {0x0018FFFF, 0x02, LNKB, 0x00,},
|
---|
275 | Package (0x04) {0x0018FFFF, 0x03, LNKC, 0x00,},
|
---|
276 |
|
---|
277 | Package (0x04) {0x0019FFFF, 0x00, LNKA, 0x00,},
|
---|
278 | Package (0x04) {0x0019FFFF, 0x01, LNKB, 0x00,},
|
---|
279 | Package (0x04) {0x0019FFFF, 0x02, LNKC, 0x00,},
|
---|
280 | Package (0x04) {0x0019FFFF, 0x03, LNKD, 0x00,},
|
---|
281 |
|
---|
282 | Package (0x04) {0x001AFFFF, 0x00, LNKB, 0x00,},
|
---|
283 | Package (0x04) {0x001AFFFF, 0x01, LNKC, 0x00,},
|
---|
284 | Package (0x04) {0x001AFFFF, 0x02, LNKD, 0x00,},
|
---|
285 | Package (0x04) {0x001AFFFF, 0x03, LNKA, 0x00,},
|
---|
286 |
|
---|
287 | Package (0x04) {0x001BFFFF, 0x00, LNKC, 0x00,},
|
---|
288 | Package (0x04) {0x001BFFFF, 0x01, LNKD, 0x00,},
|
---|
289 | Package (0x04) {0x001BFFFF, 0x02, LNKA, 0x00,},
|
---|
290 | Package (0x04) {0x001BFFFF, 0x03, LNKB, 0x00,},
|
---|
291 |
|
---|
292 | Package (0x04) {0x001CFFFF, 0x00, LNKD, 0x00,},
|
---|
293 | Package (0x04) {0x001CFFFF, 0x01, LNKA, 0x00,},
|
---|
294 | Package (0x04) {0x001CFFFF, 0x02, LNKB, 0x00,},
|
---|
295 | Package (0x04) {0x001CFFFF, 0x03, LNKC, 0x00,},
|
---|
296 |
|
---|
297 | Package (0x04) {0x001DFFFF, 0x00, LNKA, 0x00,},
|
---|
298 | Package (0x04) {0x001DFFFF, 0x01, LNKB, 0x00,},
|
---|
299 | Package (0x04) {0x001DFFFF, 0x02, LNKC, 0x00,},
|
---|
300 | Package (0x04) {0x001DFFFF, 0x03, LNKD, 0x00,},
|
---|
301 |
|
---|
302 | Package (0x04) {0x001EFFFF, 0x00, LNKB, 0x00,},
|
---|
303 | Package (0x04) {0x001EFFFF, 0x01, LNKC, 0x00,},
|
---|
304 | Package (0x04) {0x001EFFFF, 0x02, LNKD, 0x00,},
|
---|
305 | Package (0x04) {0x001EFFFF, 0x03, LNKA, 0x00,},
|
---|
306 |
|
---|
307 | Package (0x04) {0x001FFFFF, 0x00, LNKC, 0x00,},
|
---|
308 | Package (0x04) {0x001FFFFF, 0x01, LNKD, 0x00,},
|
---|
309 | Package (0x04) {0x001FFFFF, 0x02, LNKA, 0x00,},
|
---|
310 | Package (0x04) {0x001FFFFF, 0x03, LNKB, 0x00,}
|
---|
311 | })
|
---|
312 |
|
---|
313 | // PCI I/O APIC IRQ Routing table
|
---|
314 | // Must match pci.c:pci_slot_get_acpi_pirq
|
---|
315 | Name (PR01, Package ()
|
---|
316 | {
|
---|
317 | Package (0x04) {0x0002FFFF, 0x00, 0x00, 0x12,},
|
---|
318 | Package (0x04) {0x0002FFFF, 0x01, 0x00, 0x13,},
|
---|
319 | Package (0x04) {0x0002FFFF, 0x02, 0x00, 0x14,},
|
---|
320 | Package (0x04) {0x0002FFFF, 0x03, 0x00, 0x15,},
|
---|
321 |
|
---|
322 | Package (0x04) {0x0003FFFF, 0x00, 0x00, 0x13,},
|
---|
323 | Package (0x04) {0x0003FFFF, 0x01, 0x00, 0x14,},
|
---|
324 | Package (0x04) {0x0003FFFF, 0x02, 0x00, 0x15,},
|
---|
325 | Package (0x04) {0x0003FFFF, 0x03, 0x00, 0x16,},
|
---|
326 |
|
---|
327 | Package (0x04) {0x0004FFFF, 0x00, 0x00, 0x14,},
|
---|
328 | Package (0x04) {0x0004FFFF, 0x01, 0x00, 0x15,},
|
---|
329 | Package (0x04) {0x0004FFFF, 0x02, 0x00, 0x16,},
|
---|
330 | Package (0x04) {0x0004FFFF, 0x03, 0x00, 0x17,},
|
---|
331 |
|
---|
332 | Package (0x04) {0x0005FFFF, 0x00, 0x00, 0x15,},
|
---|
333 | Package (0x04) {0x0005FFFF, 0x01, 0x00, 0x16,},
|
---|
334 | Package (0x04) {0x0005FFFF, 0x02, 0x00, 0x17,},
|
---|
335 | Package (0x04) {0x0005FFFF, 0x03, 0x00, 0x10,},
|
---|
336 |
|
---|
337 | Package (0x04) {0x0006FFFF, 0x00, 0x00, 0x16,},
|
---|
338 | Package (0x04) {0x0006FFFF, 0x01, 0x00, 0x17,},
|
---|
339 | Package (0x04) {0x0006FFFF, 0x02, 0x00, 0x10,},
|
---|
340 | Package (0x04) {0x0006FFFF, 0x03, 0x00, 0x11,},
|
---|
341 |
|
---|
342 | Package (0x04) {0x0007FFFF, 0x00, 0x00, 0x17,},
|
---|
343 | Package (0x04) {0x0007FFFF, 0x01, 0x00, 0x10,},
|
---|
344 | Package (0x04) {0x0007FFFF, 0x02, 0x00, 0x11,},
|
---|
345 | Package (0x04) {0x0007FFFF, 0x03, 0x00, 0x12,},
|
---|
346 |
|
---|
347 | Package (0x04) {0x0008FFFF, 0x00, 0x00, 0x10,},
|
---|
348 | Package (0x04) {0x0008FFFF, 0x01, 0x00, 0x11,},
|
---|
349 | Package (0x04) {0x0008FFFF, 0x02, 0x00, 0x12,},
|
---|
350 | Package (0x04) {0x0008FFFF, 0x03, 0x00, 0x13,},
|
---|
351 |
|
---|
352 | Package (0x04) {0x0009FFFF, 0x00, 0x00, 0x11,},
|
---|
353 | Package (0x04) {0x0009FFFF, 0x01, 0x00, 0x12,},
|
---|
354 | Package (0x04) {0x0009FFFF, 0x02, 0x00, 0x13,},
|
---|
355 | Package (0x04) {0x0009FFFF, 0x03, 0x00, 0x14,},
|
---|
356 |
|
---|
357 | Package (0x04) {0x000AFFFF, 0x00, 0x00, 0x12,},
|
---|
358 | Package (0x04) {0x000AFFFF, 0x01, 0x00, 0x13,},
|
---|
359 | Package (0x04) {0x000AFFFF, 0x02, 0x00, 0x14,},
|
---|
360 | Package (0x04) {0x000AFFFF, 0x03, 0x00, 0x15,},
|
---|
361 |
|
---|
362 | Package (0x04) {0x000BFFFF, 0x00, 0x00, 0x13,},
|
---|
363 | Package (0x04) {0x000BFFFF, 0x01, 0x00, 0x14,},
|
---|
364 | Package (0x04) {0x000BFFFF, 0x02, 0x00, 0x15,},
|
---|
365 | Package (0x04) {0x000BFFFF, 0x03, 0x00, 0x16,},
|
---|
366 |
|
---|
367 | Package (0x04) {0x000CFFFF, 0x00, 0x00, 0x14,},
|
---|
368 | Package (0x04) {0x000CFFFF, 0x01, 0x00, 0x15,},
|
---|
369 | Package (0x04) {0x000CFFFF, 0x02, 0x00, 0x16,},
|
---|
370 | Package (0x04) {0x000CFFFF, 0x03, 0x00, 0x17,},
|
---|
371 |
|
---|
372 | Package (0x04) {0x000DFFFF, 0x00, 0x00, 0x15,},
|
---|
373 | Package (0x04) {0x000DFFFF, 0x01, 0x00, 0x16,},
|
---|
374 | Package (0x04) {0x000DFFFF, 0x02, 0x00, 0x17,},
|
---|
375 | Package (0x04) {0x000DFFFF, 0x03, 0x00, 0x10,},
|
---|
376 |
|
---|
377 | Package (0x04) {0x000EFFFF, 0x00, 0x00, 0x16,},
|
---|
378 | Package (0x04) {0x000EFFFF, 0x01, 0x00, 0x17,},
|
---|
379 | Package (0x04) {0x000EFFFF, 0x02, 0x00, 0x10,},
|
---|
380 | Package (0x04) {0x000EFFFF, 0x03, 0x00, 0x11,},
|
---|
381 |
|
---|
382 | Package (0x04) {0x000FFFFF, 0x00, 0x00, 0x17,},
|
---|
383 | Package (0x04) {0x000FFFFF, 0x01, 0x00, 0x10,},
|
---|
384 | Package (0x04) {0x000FFFFF, 0x02, 0x00, 0x11,},
|
---|
385 | Package (0x04) {0x000FFFFF, 0x03, 0x00, 0x12,},
|
---|
386 |
|
---|
387 | Package (0x04) {0x0010FFFF, 0x00, 0x00, 0x10,},
|
---|
388 | Package (0x04) {0x0010FFFF, 0x01, 0x00, 0x11,},
|
---|
389 | Package (0x04) {0x0010FFFF, 0x02, 0x00, 0x12,},
|
---|
390 | Package (0x04) {0x0010FFFF, 0x03, 0x00, 0x13,},
|
---|
391 |
|
---|
392 | Package (0x04) {0x0011FFFF, 0x00, 0x00, 0x11,},
|
---|
393 | Package (0x04) {0x0011FFFF, 0x01, 0x00, 0x12,},
|
---|
394 | Package (0x04) {0x0011FFFF, 0x02, 0x00, 0x13,},
|
---|
395 | Package (0x04) {0x0011FFFF, 0x03, 0x00, 0x14,},
|
---|
396 |
|
---|
397 | Package (0x04) {0x0012FFFF, 0x00, 0x00, 0x12,},
|
---|
398 | Package (0x04) {0x0012FFFF, 0x01, 0x00, 0x13,},
|
---|
399 | Package (0x04) {0x0012FFFF, 0x02, 0x00, 0x14,},
|
---|
400 | Package (0x04) {0x0012FFFF, 0x03, 0x00, 0x15,},
|
---|
401 |
|
---|
402 | Package (0x04) {0x0013FFFF, 0x00, 0x00, 0x13,},
|
---|
403 | Package (0x04) {0x0013FFFF, 0x01, 0x00, 0x14,},
|
---|
404 | Package (0x04) {0x0013FFFF, 0x02, 0x00, 0x15,},
|
---|
405 | Package (0x04) {0x0013FFFF, 0x03, 0x00, 0x16,},
|
---|
406 |
|
---|
407 | Package (0x04) {0x0014FFFF, 0x00, 0x00, 0x14,},
|
---|
408 | Package (0x04) {0x0014FFFF, 0x01, 0x00, 0x15,},
|
---|
409 | Package (0x04) {0x0014FFFF, 0x02, 0x00, 0x16,},
|
---|
410 | Package (0x04) {0x0014FFFF, 0x03, 0x00, 0x17,},
|
---|
411 |
|
---|
412 | Package (0x04) {0x0015FFFF, 0x00, 0x00, 0x15,},
|
---|
413 | Package (0x04) {0x0015FFFF, 0x01, 0x00, 0x16,},
|
---|
414 | Package (0x04) {0x0015FFFF, 0x02, 0x00, 0x17,},
|
---|
415 | Package (0x04) {0x0015FFFF, 0x03, 0x00, 0x10,},
|
---|
416 |
|
---|
417 | Package (0x04) {0x0016FFFF, 0x00, 0x00, 0x16,},
|
---|
418 | Package (0x04) {0x0016FFFF, 0x01, 0x00, 0x17,},
|
---|
419 | Package (0x04) {0x0016FFFF, 0x02, 0x00, 0x10,},
|
---|
420 | Package (0x04) {0x0016FFFF, 0x03, 0x00, 0x11,},
|
---|
421 |
|
---|
422 | Package (0x04) {0x0017FFFF, 0x00, 0x00, 0x17,},
|
---|
423 | Package (0x04) {0x0017FFFF, 0x01, 0x00, 0x10,},
|
---|
424 | Package (0x04) {0x0017FFFF, 0x02, 0x00, 0x11,},
|
---|
425 | Package (0x04) {0x0017FFFF, 0x03, 0x00, 0x12,},
|
---|
426 |
|
---|
427 | Package (0x04) {0x0018FFFF, 0x00, 0x00, 0x10,},
|
---|
428 | Package (0x04) {0x0018FFFF, 0x01, 0x00, 0x11,},
|
---|
429 | Package (0x04) {0x0018FFFF, 0x02, 0x00, 0x12,},
|
---|
430 | Package (0x04) {0x0018FFFF, 0x03, 0x00, 0x13,},
|
---|
431 |
|
---|
432 | Package (0x04) {0x0019FFFF, 0x00, 0x00, 0x11,},
|
---|
433 | Package (0x04) {0x0019FFFF, 0x01, 0x00, 0x12,},
|
---|
434 | Package (0x04) {0x0019FFFF, 0x02, 0x00, 0x13,},
|
---|
435 | Package (0x04) {0x0019FFFF, 0x03, 0x00, 0x14,},
|
---|
436 |
|
---|
437 | Package (0x04) {0x001AFFFF, 0x00, 0x00, 0x12,},
|
---|
438 | Package (0x04) {0x001AFFFF, 0x01, 0x00, 0x13,},
|
---|
439 | Package (0x04) {0x001AFFFF, 0x02, 0x00, 0x14,},
|
---|
440 | Package (0x04) {0x001AFFFF, 0x03, 0x00, 0x15,},
|
---|
441 |
|
---|
442 | Package (0x04) {0x001BFFFF, 0x00, 0x00, 0x13,},
|
---|
443 | Package (0x04) {0x001BFFFF, 0x01, 0x00, 0x14,},
|
---|
444 | Package (0x04) {0x001BFFFF, 0x02, 0x00, 0x15,},
|
---|
445 | Package (0x04) {0x001BFFFF, 0x03, 0x00, 0x16,},
|
---|
446 |
|
---|
447 | Package (0x04) {0x001CFFFF, 0x00, 0x00, 0x14,},
|
---|
448 | Package (0x04) {0x001CFFFF, 0x01, 0x00, 0x15,},
|
---|
449 | Package (0x04) {0x001CFFFF, 0x02, 0x00, 0x16,},
|
---|
450 | Package (0x04) {0x001CFFFF, 0x03, 0x00, 0x17,},
|
---|
451 |
|
---|
452 | Package (0x04) {0x001DFFFF, 0x00, 0x00, 0x15,},
|
---|
453 | Package (0x04) {0x001DFFFF, 0x01, 0x00, 0x16,},
|
---|
454 | Package (0x04) {0x001DFFFF, 0x02, 0x00, 0x17,},
|
---|
455 | Package (0x04) {0x001DFFFF, 0x03, 0x00, 0x10,},
|
---|
456 |
|
---|
457 | Package (0x04) {0x001EFFFF, 0x00, 0x00, 0x16,},
|
---|
458 | Package (0x04) {0x001EFFFF, 0x01, 0x00, 0x17,},
|
---|
459 | Package (0x04) {0x001EFFFF, 0x02, 0x00, 0x10,},
|
---|
460 | Package (0x04) {0x001EFFFF, 0x03, 0x00, 0x11,},
|
---|
461 |
|
---|
462 | Package (0x04) {0x001FFFFF, 0x00, 0x00, 0x17,},
|
---|
463 | Package (0x04) {0x001FFFFF, 0x01, 0x00, 0x10,},
|
---|
464 | Package (0x04) {0x001FFFFF, 0x02, 0x00, 0x11,},
|
---|
465 | Package (0x04) {0x001FFFFF, 0x03, 0x00, 0x12,}
|
---|
466 | })
|
---|
467 |
|
---|
468 | // Possible resource settings for PCI link A
|
---|
469 | Name (PRSA, ResourceTemplate ()
|
---|
470 | {
|
---|
471 | IRQ (Level, ActiveLow, Shared) {5,9,10,11}
|
---|
472 | })
|
---|
473 |
|
---|
474 | // Possible resource settings for PCI link B
|
---|
475 | Name (PRSB, ResourceTemplate ()
|
---|
476 | {
|
---|
477 | IRQ (Level, ActiveLow, Shared) {5,9,10,11}
|
---|
478 | })
|
---|
479 |
|
---|
480 | // Possible resource settings for PCI link C
|
---|
481 | Name (PRSC, ResourceTemplate ()
|
---|
482 | {
|
---|
483 | IRQ (Level, ActiveLow, Shared) {5,9,10,11}
|
---|
484 | })
|
---|
485 |
|
---|
486 | // Possible resource settings for PCI link D
|
---|
487 | Name (PRSD, ResourceTemplate ()
|
---|
488 | {
|
---|
489 | IRQ (Level, ActiveLow, Shared) {5,9,10,11}
|
---|
490 | })
|
---|
491 |
|
---|
492 | // PCI bus 0
|
---|
493 | Device (PCI0)
|
---|
494 | {
|
---|
495 | Name (_HID, EisaId ("PNP0A03"))
|
---|
496 | Name (_ADR, 0x00) // address
|
---|
497 | Name (_BBN, 0x00) // base bus adddress
|
---|
498 | Name (_UID, 0x00)
|
---|
499 |
|
---|
500 | // Method that returns routing table
|
---|
501 | Method (_PRT, 0, NotSerialized)
|
---|
502 | {
|
---|
503 | if (LEqual (LAnd (PICM, UIOA), Zero)) {
|
---|
504 | DBG ("RETURNING PIC\n")
|
---|
505 | Store (0x00, \_SB.PCI0.SBRG.APDE)
|
---|
506 | Store (0x00, \_SB.PCI0.SBRG.APAD)
|
---|
507 | Return (PR00)
|
---|
508 | }
|
---|
509 | else {
|
---|
510 | DBG ("RETURNING APIC\n")
|
---|
511 | Store (0xbe, \_SB.PCI0.SBRG.APDE)
|
---|
512 | Store (0xef, \_SB.PCI0.SBRG.APAD)
|
---|
513 | Return (PR01)
|
---|
514 | }
|
---|
515 | }
|
---|
516 |
|
---|
517 | Device (SBRG)
|
---|
518 | {
|
---|
519 | // Address of the PIIX3 (device 1 function 0)
|
---|
520 | Name (_ADR, 0x00010000)
|
---|
521 | OperationRegion (PCIC, PCI_Config, 0x00, 0xff)
|
---|
522 |
|
---|
523 | Field (PCIC, ByteAcc, NoLock, Preserve)
|
---|
524 | {
|
---|
525 | Offset (0xad),
|
---|
526 | APAD, 8,
|
---|
527 | Offset (0xde),
|
---|
528 | APDE, 8,
|
---|
529 | }
|
---|
530 |
|
---|
531 | // Keyboard device
|
---|
532 | Device (PS2K)
|
---|
533 | {
|
---|
534 | Name (_HID, EisaId ("PNP0303"))
|
---|
535 | Method (_STA, 0, NotSerialized)
|
---|
536 | {
|
---|
537 | Return (0x0F)
|
---|
538 | }
|
---|
539 |
|
---|
540 | Name (_CRS, ResourceTemplate ()
|
---|
541 | {
|
---|
542 | IO (Decode16, 0x0060, 0x0060, 0x00, 0x01)
|
---|
543 | IO (Decode16, 0x0064, 0x0064, 0x00, 0x01)
|
---|
544 | IRQNoFlags () {1}
|
---|
545 | })
|
---|
546 | }
|
---|
547 |
|
---|
548 | // DMA Controller
|
---|
549 | Device (DMAC)
|
---|
550 | {
|
---|
551 | Name (_HID, EisaId ("PNP0200"))
|
---|
552 | Name (_CRS, ResourceTemplate ()
|
---|
553 | {
|
---|
554 | IO (Decode16, 0x0000, 0x0000, 0x01, 0x10)
|
---|
555 | IO (Decode16, 0x0080, 0x0080, 0x01, 0x10)
|
---|
556 | IO (Decode16, 0x00C0, 0x00C0, 0x01, 0x20)
|
---|
557 | DMA (Compatibility, BusMaster, Transfer8_16) {4}
|
---|
558 | })
|
---|
559 | }
|
---|
560 |
|
---|
561 | // Floppy disk controller
|
---|
562 | Device (FDC0)
|
---|
563 | {
|
---|
564 | Name (_HID, EisaId ("PNP0700"))
|
---|
565 |
|
---|
566 | OperationRegion (CFDC, SystemIO, 0x4054, 0x08)
|
---|
567 | Field (CFDC, DwordAcc, NoLock, Preserve)
|
---|
568 | {
|
---|
569 | FSTA, 32,
|
---|
570 | }
|
---|
571 |
|
---|
572 | Method (_STA, 0, NotSerialized)
|
---|
573 | {
|
---|
574 | Return (FSTA)
|
---|
575 | }
|
---|
576 |
|
---|
577 | // Current resource settings
|
---|
578 | Name (_CRS, ResourceTemplate ()
|
---|
579 | {
|
---|
580 | IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
|
---|
581 | IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
|
---|
582 | IRQNoFlags () {6}
|
---|
583 | DMA (Compatibility, NotBusMaster, Transfer8) {2}
|
---|
584 | })
|
---|
585 |
|
---|
586 | // Possible resource settings
|
---|
587 | Name (_PRS, ResourceTemplate ()
|
---|
588 | {
|
---|
589 | IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06)
|
---|
590 | IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01)
|
---|
591 | IRQNoFlags () {6}
|
---|
592 | DMA (Compatibility, NotBusMaster, Transfer8) {2}
|
---|
593 | })
|
---|
594 |
|
---|
595 | }
|
---|
596 |
|
---|
597 | // Mouse device
|
---|
598 | Device (PS2M)
|
---|
599 | {
|
---|
600 | Name (_HID, EisaId ("PNP0F03"))
|
---|
601 | Method (_STA, 0, NotSerialized)
|
---|
602 | {
|
---|
603 | Return (0x0F)
|
---|
604 | }
|
---|
605 |
|
---|
606 | Name (_CRS, ResourceTemplate ()
|
---|
607 | {
|
---|
608 | IO (Decode16, 0x0060, 0x0060, 0x00, 0x01)
|
---|
609 | IO (Decode16, 0x0064, 0x0064, 0x00, 0x01)
|
---|
610 | IRQNoFlags () {12}
|
---|
611 | })
|
---|
612 | }
|
---|
613 |
|
---|
614 | // Parallel port
|
---|
615 | Device (LPT)
|
---|
616 | {
|
---|
617 | Name (_HID, EisaId ("PNP0400"))
|
---|
618 | Method (_STA, 0, NotSerialized)
|
---|
619 | {
|
---|
620 | Return (0x0F)
|
---|
621 | }
|
---|
622 | Name (_CRS, ResourceTemplate ()
|
---|
623 | {
|
---|
624 | IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
|
---|
625 | IO (Decode16, 0x0778, 0x0778, 0x08, 0x08)
|
---|
626 | IRQNoFlags () {7}
|
---|
627 | })
|
---|
628 | }
|
---|
629 | }
|
---|
630 |
|
---|
631 | // Control method battery
|
---|
632 | Device (BAT0)
|
---|
633 | {
|
---|
634 | Name (_HID, EisaId ("PNP0C0A"))
|
---|
635 | Name (_UID, 0x00)
|
---|
636 |
|
---|
637 | Scope (\_GPE)
|
---|
638 | {
|
---|
639 | // GPE bit 0 handler
|
---|
640 | // GPE.0 must be set and SCI raised when
|
---|
641 | // battery info changed and _BIF must be
|
---|
642 | // re-evaluated
|
---|
643 | Method (_L00, 0, NotSerialized)
|
---|
644 | {
|
---|
645 | Notify (\_SB.PCI0.BAT0, 0x81)
|
---|
646 | }
|
---|
647 | }
|
---|
648 |
|
---|
649 | OperationRegion (CBAT, SystemIO, 0x4040, 0x08)
|
---|
650 | Field (CBAT, DwordAcc, NoLock, Preserve)
|
---|
651 | {
|
---|
652 | IDX0, 32,
|
---|
653 | DAT0, 32,
|
---|
654 | }
|
---|
655 |
|
---|
656 | IndexField (IDX0, DAT0, DwordAcc, NoLock, Preserve)
|
---|
657 | {
|
---|
658 | STAT, 32,
|
---|
659 | PRAT, 32,
|
---|
660 | RCAP, 32,
|
---|
661 | PVOL, 32,
|
---|
662 |
|
---|
663 | UNIT, 32,
|
---|
664 | DCAP, 32,
|
---|
665 | LFCP, 32,
|
---|
666 | BTEC, 32,
|
---|
667 | DVOL, 32,
|
---|
668 | DWRN, 32,
|
---|
669 | DLOW, 32,
|
---|
670 | GRN1, 32,
|
---|
671 | GRN2, 32,
|
---|
672 |
|
---|
673 | BSTA, 32,
|
---|
674 | APSR, 32,
|
---|
675 | }
|
---|
676 |
|
---|
677 | Method (_STA, 0, NotSerialized)
|
---|
678 | {
|
---|
679 | return (BSTA)
|
---|
680 | }
|
---|
681 |
|
---|
682 | Name (PBIF, Package ()
|
---|
683 | {
|
---|
684 | 0x01, // Power unit, 1 - mA
|
---|
685 | 0x7fffffff, // Design capacity
|
---|
686 | 0x7fffffff, // Last full charge capacity
|
---|
687 | 0x00, // Battery technology
|
---|
688 | 0xffffffff, // Design voltage
|
---|
689 | 0x00, // Design capacity of Warning
|
---|
690 | 0x00, // Design capacity of Low
|
---|
691 | 0x04, // Battery capacity granularity 1
|
---|
692 | 0x04, // Battery capacity granularity 2
|
---|
693 | "1", // Model number
|
---|
694 | "0", // Serial number
|
---|
695 | "VBOX", // Battery type
|
---|
696 | "innotek" // OEM Information
|
---|
697 | })
|
---|
698 |
|
---|
699 | Name (PBST, Package () {
|
---|
700 | 0, // Battery state
|
---|
701 | 0x7fffffff, // Battery present rate
|
---|
702 | 0x7fffffff, // Battery remaining capacity
|
---|
703 | 0x7fffffff // Battery present voltage
|
---|
704 | })
|
---|
705 |
|
---|
706 | // Battery information
|
---|
707 | Method (_BIF, 0, NotSerialized)
|
---|
708 | {
|
---|
709 | Store (UNIT, Index (PBIF, 0,))
|
---|
710 | Store (DCAP, Index (PBIF, 1,))
|
---|
711 | Store (LFCP, Index (PBIF, 2,))
|
---|
712 | Store (BTEC, Index (PBIF, 3,))
|
---|
713 | Store (DVOL, Index (PBIF, 4,))
|
---|
714 | Store (DWRN, Index (PBIF, 5,))
|
---|
715 | Store (DLOW, Index (PBIF, 6,))
|
---|
716 | Store (GRN1, Index (PBIF, 7,))
|
---|
717 | Store (GRN2, Index (PBIF, 8,))
|
---|
718 |
|
---|
719 | DBG ("_BIF:\n")
|
---|
720 | HEX4 (DerefOf (Index (PBIF, 0,)))
|
---|
721 | HEX4 (DerefOf (Index (PBIF, 1,)))
|
---|
722 | HEX4 (DerefOf (Index (PBIF, 2,)))
|
---|
723 | HEX4 (DerefOf (Index (PBIF, 3,)))
|
---|
724 | HEX4 (DerefOf (Index (PBIF, 4,)))
|
---|
725 | HEX4 (DerefOf (Index (PBIF, 5,)))
|
---|
726 | HEX4 (DerefOf (Index (PBIF, 6,)))
|
---|
727 | HEX4 (DerefOf (Index (PBIF, 7,)))
|
---|
728 | HEX4 (DerefOf (Index (PBIF, 8,)))
|
---|
729 |
|
---|
730 | return (PBIF)
|
---|
731 | }
|
---|
732 |
|
---|
733 | // Battery status
|
---|
734 | Method (_BST, 0, NotSerialized)
|
---|
735 | {
|
---|
736 | Store (STAT, Index (PBST, 0,))
|
---|
737 | Store (PRAT, Index (PBST, 1,))
|
---|
738 | Store (RCAP, Index (PBST, 2,))
|
---|
739 | Store (PVOL, Index (PBST, 3,))
|
---|
740 | /*
|
---|
741 | DBG ("_BST:\n")
|
---|
742 | HEX4 (DerefOf (Index (PBST, 0,)))
|
---|
743 | HEX4 (DerefOf (Index (PBST, 1,)))
|
---|
744 | HEX4 (DerefOf (Index (PBST, 2,)))
|
---|
745 | HEX4 (DerefOf (Index (PBST, 3,)))
|
---|
746 | */
|
---|
747 | return (PBST)
|
---|
748 | }
|
---|
749 | }
|
---|
750 |
|
---|
751 | Device (AC)
|
---|
752 | {
|
---|
753 | Name (_HID, "ACPI0003")
|
---|
754 | Name (_UID, 0x00)
|
---|
755 | Name (_PCL, Package (0x01)
|
---|
756 | {
|
---|
757 | \_SB
|
---|
758 | })
|
---|
759 |
|
---|
760 | Method (_PSR, 0, NotSerialized)
|
---|
761 | {
|
---|
762 | // DBG ("_PSR:\n")
|
---|
763 | // HEX4 (\_SB.PCI0.BAT0.APSR)
|
---|
764 | return (\_SB.PCI0.BAT0.APSR)
|
---|
765 | }
|
---|
766 |
|
---|
767 | Method (_STA, 0, NotSerialized)
|
---|
768 | {
|
---|
769 | return (0x0f)
|
---|
770 | }
|
---|
771 | }
|
---|
772 | }
|
---|
773 | }
|
---|
774 |
|
---|
775 | Scope (\_SB)
|
---|
776 | {
|
---|
777 | Scope (PCI0)
|
---|
778 | {
|
---|
779 | // PCI0 current resource settings
|
---|
780 | Name (CRS, ResourceTemplate ()
|
---|
781 | {
|
---|
782 | WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
|
---|
783 | 0x0000,
|
---|
784 | 0x0000,
|
---|
785 | 0x00FF,
|
---|
786 | 0x0000,
|
---|
787 | 0x0100)
|
---|
788 | IO (Decode16, 0x0CF8, 0x0CF8, 0x01, 0x08)
|
---|
789 | WordIO (ResourceProducer, MinFixed, MaxFixed,
|
---|
790 | PosDecode, EntireRange,
|
---|
791 | 0x0000,
|
---|
792 | 0x0000,
|
---|
793 | 0x0CF7,
|
---|
794 | 0x0000,
|
---|
795 | 0x0CF8)
|
---|
796 | WordIO (ResourceProducer, MinFixed, MaxFixed,
|
---|
797 | PosDecode, EntireRange,
|
---|
798 | 0x0000,
|
---|
799 | 0x0D00,
|
---|
800 | 0xFFFF,
|
---|
801 | 0x0000,
|
---|
802 | 0xF300)
|
---|
803 |
|
---|
804 | /* Taken from ACPI faq (with some modifications) */
|
---|
805 | DwordMemory( // descriptor for video RAM behind ISA bus
|
---|
806 | ResourceProducer, // bit 0 of general flags is 0
|
---|
807 | PosDecode,
|
---|
808 | MinFixed, // Range is fixed
|
---|
809 | MaxFixed, // Range is Fixed
|
---|
810 | Cacheable,
|
---|
811 | ReadWrite,
|
---|
812 | 0x00000000, // Granularity
|
---|
813 | 0x000a0000, // Min
|
---|
814 | 0x000bffff, // Max
|
---|
815 | 0x00000000, // Translation
|
---|
816 | 0x00020000 // Range Length
|
---|
817 | )
|
---|
818 |
|
---|
819 | DwordMemory( // Consumed-and-produced resource
|
---|
820 | // (all of memory space)
|
---|
821 | ResourceProducer, // bit 0 of general flags is 0
|
---|
822 | PosDecode, // positive Decode
|
---|
823 | MinFixed, // Range is fixed
|
---|
824 | MaxFixed, // Range is fixed
|
---|
825 | Cacheable,
|
---|
826 | ReadWrite,
|
---|
827 | 0x00000000, // Granularity
|
---|
828 | 0x00000000, // Min (calculated dynamically)
|
---|
829 |
|
---|
830 | 0xffdfffff, // Max = 4GB - 2MB
|
---|
831 | 0x00000000, // Translation
|
---|
832 | 0xdfdfffff, // Range Length (calculated
|
---|
833 | // dynamically)
|
---|
834 | , // Optional field left blank
|
---|
835 | , // Optional field left blank
|
---|
836 | MEM3 // Name declaration for this
|
---|
837 | // descriptor
|
---|
838 | )
|
---|
839 | })
|
---|
840 |
|
---|
841 | Method (_CRS, 0, NotSerialized)
|
---|
842 | {
|
---|
843 | CreateDwordField (CRS, \_SB.PCI0.MEM3._MIN, RAMT)
|
---|
844 | CreateDwordField (CRS, \_SB.PCI0.MEM3._LEN, RAMR)
|
---|
845 | Store (MEML, RAMT)
|
---|
846 | Subtract (0xffe00000, RAMT, RAMR)
|
---|
847 | Return (CRS)
|
---|
848 | }
|
---|
849 | }
|
---|
850 | }
|
---|
851 |
|
---|
852 | Scope (\_SB)
|
---|
853 | {
|
---|
854 | // Fields within PIIX3 configuration[0x60..0x63] with
|
---|
855 | // IRQ mappings
|
---|
856 | Field (\_SB.PCI0.SBRG.PCIC, ByteAcc, NoLock, Preserve)
|
---|
857 | {
|
---|
858 | Offset (0x60),
|
---|
859 | PIRA, 8,
|
---|
860 | PIRB, 8,
|
---|
861 | PIRC, 8,
|
---|
862 | PIRD, 8
|
---|
863 | }
|
---|
864 |
|
---|
865 | Name (BUFA, ResourceTemplate ()
|
---|
866 | {
|
---|
867 | IRQ (Level, ActiveLow, Shared) {15}
|
---|
868 | })
|
---|
869 | CreateWordField (BUFA, 0x01, ICRS)
|
---|
870 |
|
---|
871 | // Generic status of IRQ routing entry
|
---|
872 | Method (LSTA, 1, NotSerialized)
|
---|
873 | {
|
---|
874 | And (Arg0, 0x80, Local0)
|
---|
875 | // DBG ("LSTA: ")
|
---|
876 | // HEX (Arg0)
|
---|
877 | If (Local0)
|
---|
878 | {
|
---|
879 | Return (0x09)
|
---|
880 | }
|
---|
881 | Else
|
---|
882 | {
|
---|
883 | Return (0x0B)
|
---|
884 | }
|
---|
885 | }
|
---|
886 |
|
---|
887 | // Generic "current resource settings" for routing entry
|
---|
888 | Method (LCRS, 1, NotSerialized)
|
---|
889 | {
|
---|
890 | And (Arg0, 0x0F, Local0)
|
---|
891 | ShiftLeft (0x01, Local0, ICRS)
|
---|
892 | // DBG ("LCRS: ")
|
---|
893 | // HEX (ICRS)
|
---|
894 | Return (BUFA)
|
---|
895 | }
|
---|
896 |
|
---|
897 | // Generic "set resource settings" for routing entry
|
---|
898 | Method (LSRS, 1, NotSerialized)
|
---|
899 | {
|
---|
900 | CreateWordField (Arg0, 0x01, ISRS)
|
---|
901 | FindSetRightBit (ISRS, Local0)
|
---|
902 | Return (Decrement (Local0))
|
---|
903 | }
|
---|
904 |
|
---|
905 | // Generic "disable" for routing entry
|
---|
906 | Method (LDIS, 1, NotSerialized)
|
---|
907 | {
|
---|
908 | Return (Or (Arg0, 0x80))
|
---|
909 | }
|
---|
910 |
|
---|
911 | // Link A
|
---|
912 | Device (LNKA)
|
---|
913 | {
|
---|
914 | Name (_HID, EisaId ("PNP0C0F"))
|
---|
915 | Name (_UID, 0x01)
|
---|
916 |
|
---|
917 | // Status
|
---|
918 | Method (_STA, 0, NotSerialized)
|
---|
919 | {
|
---|
920 | DBG ("LNKA._STA\n")
|
---|
921 | Return (LSTA (PIRA))
|
---|
922 | }
|
---|
923 |
|
---|
924 | // Possible resource settings
|
---|
925 | Method (_PRS, 0, NotSerialized)
|
---|
926 | {
|
---|
927 | DBG ("LNKA._PRS\n")
|
---|
928 | Return (PRSA)
|
---|
929 | }
|
---|
930 |
|
---|
931 | // Disable
|
---|
932 | Method (_DIS, 0, NotSerialized)
|
---|
933 | {
|
---|
934 | DBG ("LNKA._DIS\n")
|
---|
935 | Store (LDIS (PIRA), PIRA)
|
---|
936 | }
|
---|
937 |
|
---|
938 | // Current resource settings
|
---|
939 | Method (_CRS, 0, NotSerialized)
|
---|
940 | {
|
---|
941 | DBG ("LNKA._CRS\n")
|
---|
942 | Return (LCRS (PIRA))
|
---|
943 | }
|
---|
944 |
|
---|
945 | // Set resource settings
|
---|
946 | Method (_SRS, 1, NotSerialized)
|
---|
947 | {
|
---|
948 | DBG ("LNKA._SRS: ")
|
---|
949 | HEX (LSRS (Arg0))
|
---|
950 | Store (LSRS (Arg0), PIRA)
|
---|
951 | }
|
---|
952 | }
|
---|
953 |
|
---|
954 | // Link B
|
---|
955 | Device (LNKB)
|
---|
956 | {
|
---|
957 | Name (_HID, EisaId ("PNP0C0F"))
|
---|
958 | Name (_UID, 0x02)
|
---|
959 | Method (_STA, 0, NotSerialized)
|
---|
960 | {
|
---|
961 | // DBG ("LNKB._STA\n")
|
---|
962 | Return (LSTA (PIRB))
|
---|
963 | }
|
---|
964 |
|
---|
965 | Method (_PRS, 0, NotSerialized)
|
---|
966 | {
|
---|
967 | // DBG ("LNKB._PRS\n")
|
---|
968 | Return (PRSB)
|
---|
969 | }
|
---|
970 |
|
---|
971 | Method (_DIS, 0, NotSerialized)
|
---|
972 | {
|
---|
973 | // DBG ("LNKB._DIS\n")
|
---|
974 | Store (LDIS (PIRB), PIRB)
|
---|
975 | }
|
---|
976 |
|
---|
977 | Method (_CRS, 0, NotSerialized)
|
---|
978 | {
|
---|
979 | // DBG ("LNKB._CRS\n")
|
---|
980 | Return (LCRS (PIRB))
|
---|
981 | }
|
---|
982 |
|
---|
983 | Method (_SRS, 1, NotSerialized)
|
---|
984 | {
|
---|
985 | DBG ("LNKB._SRS: ")
|
---|
986 | HEX (LSRS (Arg0))
|
---|
987 | Store (LSRS (Arg0), PIRB)
|
---|
988 | }
|
---|
989 | }
|
---|
990 |
|
---|
991 | // Link C
|
---|
992 | Device (LNKC)
|
---|
993 | {
|
---|
994 | Name (_HID, EisaId ("PNP0C0F"))
|
---|
995 | Name (_UID, 0x03)
|
---|
996 | Method (_STA, 0, NotSerialized)
|
---|
997 | {
|
---|
998 | // DBG ("LNKC._STA\n")
|
---|
999 | Return (LSTA (PIRC))
|
---|
1000 | }
|
---|
1001 |
|
---|
1002 | Method (_PRS, 0, NotSerialized)
|
---|
1003 | {
|
---|
1004 | // DBG ("LNKC._PRS\n")
|
---|
1005 | Return (PRSC)
|
---|
1006 | }
|
---|
1007 |
|
---|
1008 | Method (_DIS, 0, NotSerialized)
|
---|
1009 | {
|
---|
1010 | // DBG ("LNKC._DIS\n")
|
---|
1011 | Store (LDIS (PIRC), PIRC)
|
---|
1012 | }
|
---|
1013 |
|
---|
1014 | Method (_CRS, 0, NotSerialized)
|
---|
1015 | {
|
---|
1016 | // DBG ("LNKC._CRS\n")
|
---|
1017 | Return (LCRS (PIRC))
|
---|
1018 | }
|
---|
1019 |
|
---|
1020 | Method (_SRS, 1, NotSerialized)
|
---|
1021 | {
|
---|
1022 | DBG ("LNKC._SRS: ")
|
---|
1023 | HEX (LSRS (Arg0))
|
---|
1024 | Store (LSRS (Arg0), PIRC)
|
---|
1025 | }
|
---|
1026 | }
|
---|
1027 |
|
---|
1028 | // Link D
|
---|
1029 | Device (LNKD)
|
---|
1030 | {
|
---|
1031 | Name (_HID, EisaId ("PNP0C0F"))
|
---|
1032 | Name (_UID, 0x04)
|
---|
1033 | Method (_STA, 0, NotSerialized)
|
---|
1034 | {
|
---|
1035 | // DBG ("LNKD._STA\n")
|
---|
1036 | Return (LSTA (PIRD))
|
---|
1037 | }
|
---|
1038 |
|
---|
1039 | Method (_PRS, 0, NotSerialized)
|
---|
1040 | {
|
---|
1041 | // DBG ("LNKD._PRS\n")
|
---|
1042 | Return (PRSD)
|
---|
1043 | }
|
---|
1044 |
|
---|
1045 | Method (_DIS, 0, NotSerialized)
|
---|
1046 | {
|
---|
1047 | // DBG ("LNKD._DIS\n")
|
---|
1048 | Store (LDIS (PIRA), PIRD)
|
---|
1049 | }
|
---|
1050 |
|
---|
1051 | Method (_CRS, 0, NotSerialized)
|
---|
1052 | {
|
---|
1053 | // DBG ("LNKD._CRS\n")
|
---|
1054 | Return (LCRS (PIRD))
|
---|
1055 | }
|
---|
1056 |
|
---|
1057 | Method (_SRS, 1, NotSerialized)
|
---|
1058 | {
|
---|
1059 | DBG ("LNKD._SRS: ")
|
---|
1060 | HEX (LSRS (Arg0))
|
---|
1061 | Store (LSRS (Arg0), PIRD)
|
---|
1062 | }
|
---|
1063 | }
|
---|
1064 | }
|
---|
1065 |
|
---|
1066 | // Sx states
|
---|
1067 | Name (_S0, Package (2) {
|
---|
1068 | 0x00,
|
---|
1069 | 0x00,
|
---|
1070 | })
|
---|
1071 |
|
---|
1072 | Name (_S5, Package (2) {
|
---|
1073 | 0x05,
|
---|
1074 | 0x05,
|
---|
1075 | })
|
---|
1076 |
|
---|
1077 | Method (_PTS, 1, NotSerialized)
|
---|
1078 | {
|
---|
1079 | DBG ("Prepare to sleep: ")
|
---|
1080 | HEX (Arg0)
|
---|
1081 | }
|
---|
1082 | }
|
---|
1083 |
|
---|
1084 | /*
|
---|
1085 | * Local Variables:
|
---|
1086 | * comment-start: "//"
|
---|
1087 | * End:
|
---|
1088 | */
|
---|