blob: 86eccb2eb0f04d0daeaa56c82968a12e77d18c9c [file] [log] [blame]
Jens Rottmann73d49652013-02-28 09:56:20 +01001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2011 Advanced Micro Devices, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
Jens Rottmann73d49652013-02-28 09:56:20 +010014 */
15
16/* DefinitionBlock Statement */
17DefinitionBlock (
18 "DSDT.AML", /* Output filename */
19 "DSDT", /* Signature */
20 0x02, /* DSDT Revision, needs to be 2 for 64bit */
21 "AMD ", /* OEMID */
22 "COREBOOT", /* TABLE ID */
23 0x00010001 /* OEM Revision */
24 )
25{ /* Start of ASL file */
26 /* #include <arch/i386/acpi/debug.asl> */ /* Include global debug methods if needed */
27
28 /* Data to be patched by the BIOS during POST */
29 /* FIXME the patching is not done yet! */
30 /* Memory related values */
31 Name(LOMH, 0x0) /* Start of unused memory in C0000-E0000 range */
32 Name(PBAD, 0x0) /* Address of BIOS area (If TOM2 != 0, Addr >> 16) */
33 Name(PBLN, 0x0) /* Length of BIOS area */
34
35 Name(PCBA, CONFIG_MMCONF_BASE_ADDRESS) /* Base address of PCIe config space */
36 Name(HPBA, 0xFED00000) /* Base address of HPET table */
37
38 Name(SSFG, 0x0D) /* S1 support: bit 0, S2 Support: bit 1, etc. S0 & S5 assumed */
39
40 /* USB overcurrent mapping pins. */
41 Name(UOM0, 0)
42 Name(UOM1, 2)
43 Name(UOM2, 0)
44 Name(UOM3, 7)
45 Name(UOM4, 2)
46 Name(UOM5, 2)
47 Name(UOM6, 6)
48 Name(UOM7, 2)
49 Name(UOM8, 6)
50 Name(UOM9, 6)
51
52 /* Some global data */
Edward O'Callaghanf7d8f092014-05-31 13:57:52 +100053 Name(OSVR, 3) /* Assume nothing. WinXp = 1, Vista = 2, Linux = 3, WinCE = 4 */
Jens Rottmann73d49652013-02-28 09:56:20 +010054 Name(OSV, Ones) /* Assume nothing */
55 Name(PMOD, One) /* Assume APIC */
56
57 /*
58 * Processor Object
59 *
60 */
61 Scope (\_PR) { /* define processor scope */
62 Processor(
63 C000, /* name space name, align with BLDCFG_PROCESSOR_SCOPE_NAME[01] */
64 0, /* Unique number for this processor */
65 0x810, /* PBLK system I/O address !hardcoded! */
66 0x06 /* PBLKLEN for boot processor */
67 ) {
68 }
69
70 Processor(
71 C001, /* name space name */
72 1, /* Unique number for this processor */
73 0x810, /* PBLK system I/O address !hardcoded! */
74 0x06 /* PBLKLEN for boot processor */
75 ) {
76 }
77 Processor(
78 C002, /* name space name */
79 2, /* Unique number for this processor */
80 0x810, /* PBLK system I/O address !hardcoded! */
81 0x06 /* PBLKLEN for boot processor */
82 ) {
83 }
84 Processor(
85 C003, /* name space name */
86 3, /* Unique number for this processor */
87 0x810, /* PBLK system I/O address !hardcoded! */
88 0x06 /* PBLKLEN for boot processor */
89 ) {
90 }
91 } /* End _PR scope */
92
93 /* PIC IRQ mapping registers, C00h-C01h. */
94 OperationRegion(PRQM, SystemIO, 0x00000C00, 0x00000002)
95 Field(PRQM, ByteAcc, NoLock, Preserve) {
96 PRQI, 0x00000008,
97 PRQD, 0x00000008, /* Offset: 1h */
98 }
99 IndexField(PRQI, PRQD, ByteAcc, NoLock, Preserve) {
100 PIRA, 0x00000008, /* Index 0 */
101 PIRB, 0x00000008, /* Index 1 */
102 PIRC, 0x00000008, /* Index 2 */
103 PIRD, 0x00000008, /* Index 3 */
104 PIRE, 0x00000008, /* Index 4 */
105 PIRF, 0x00000008, /* Index 5 */
106 PIRG, 0x00000008, /* Index 6 */
107 PIRH, 0x00000008, /* Index 7 */
108 }
109
110 /* PCI Error control register */
111 OperationRegion(PERC, SystemIO, 0x00000C14, 0x00000001)
112 Field(PERC, ByteAcc, NoLock, Preserve) {
113 SENS, 0x00000001,
114 PENS, 0x00000001,
115 SENE, 0x00000001,
116 PENE, 0x00000001,
117 }
118
119 /* Client Management index/data registers */
120 OperationRegion(CMT, SystemIO, 0x00000C50, 0x00000002)
121 Field(CMT, ByteAcc, NoLock, Preserve) {
122 CMTI, 8,
123 /* Client Management Data register */
124 G64E, 1,
125 G64O, 1,
126 G32O, 2,
127 , 2,
128 GPSL, 2,
129 }
130
131 /* GPM Port register */
132 OperationRegion(GPT, SystemIO, 0x00000C52, 0x00000001)
133 Field(GPT, ByteAcc, NoLock, Preserve) {
134 GPB0,1,
135 GPB1,1,
136 GPB2,1,
137 GPB3,1,
138 GPB4,1,
139 GPB5,1,
140 GPB6,1,
141 GPB7,1,
142 }
143
144 /* Flash ROM program enable register */
145 OperationRegion(FRE, SystemIO, 0x00000C6F, 0x00000001)
146 Field(FRE, ByteAcc, NoLock, Preserve) {
147 , 0x00000006,
148 FLRE, 0x00000001,
149 }
150
151 /* PM2 index/data registers */
152 OperationRegion(PM2R, SystemIO, 0x00000CD0, 0x00000002)
153 Field(PM2R, ByteAcc, NoLock, Preserve) {
154 PM2I, 0x00000008,
155 PM2D, 0x00000008,
156 }
157
158 /* Power Management I/O registers, TODO:PMIO is quite different in SB800. */
159 OperationRegion(PIOR, SystemIO, 0x00000CD6, 0x00000002)
160 Field(PIOR, ByteAcc, NoLock, Preserve) {
161 PIOI, 0x00000008,
162 PIOD, 0x00000008,
163 }
164 IndexField (PIOI, PIOD, ByteAcc, NoLock, Preserve) {
165 Offset(0x00), /* MiscControl */
166 , 1,
167 T1EE, 1,
168 T2EE, 1,
169 Offset(0x01), /* MiscStatus */
170 , 1,
171 T1E, 1,
172 T2E, 1,
173 Offset(0x04), /* SmiWakeUpEventEnable3 */
174 , 7,
175 SSEN, 1,
176 Offset(0x07), /* SmiWakeUpEventStatus3 */
177 , 7,
178 CSSM, 1,
179 Offset(0x10), /* AcpiEnable */
180 , 6,
181 PWDE, 1,
182 Offset(0x1C), /* ProgramIoEnable */
183 , 3,
184 MKME, 1,
185 IO3E, 1,
186 IO2E, 1,
187 IO1E, 1,
188 IO0E, 1,
189 Offset(0x1D), /* IOMonitorStatus */
190 , 3,
191 MKMS, 1,
192 IO3S, 1,
193 IO2S, 1,
194 IO1S, 1,
195 IO0S,1,
196 Offset(0x20), /* AcpiPmEvtBlk. TODO: should be 0x60 */
197 APEB, 16,
198 Offset(0x36), /* GEvtLevelConfig */
199 , 6,
200 ELC6, 1,
201 ELC7, 1,
202 Offset(0x37), /* GPMLevelConfig0 */
203 , 3,
204 PLC0, 1,
205 PLC1, 1,
206 PLC2, 1,
207 PLC3, 1,
208 PLC8, 1,
209 Offset(0x38), /* GPMLevelConfig1 */
210 , 1,
211 PLC4, 1,
212 PLC5, 1,
213 , 1,
214 PLC6, 1,
215 PLC7, 1,
216 Offset(0x3B), /* PMEStatus1 */
217 GP0S, 1,
218 GM4S, 1,
219 GM5S, 1,
220 APS, 1,
221 GM6S, 1,
222 GM7S, 1,
223 GP2S, 1,
224 STSS, 1,
225 Offset(0x55), /* SoftPciRst */
226 SPRE, 1,
227 , 1,
228 , 1,
229 PNAT, 1,
230 PWMK, 1,
231 PWNS, 1,
232
233 /* Offset(0x61), */ /* Options_1 */
234 /* ,7, */
235 /* R617,1, */
236
237 Offset(0x65), /* UsbPMControl */
238 , 4,
239 URRE, 1,
240 Offset(0x68), /* MiscEnable68 */
241 , 3,
242 TMTE, 1,
243 , 1,
244 Offset(0x92), /* GEVENTIN */
245 , 7,
246 E7IS, 1,
247 Offset(0x96), /* GPM98IN */
248 G8IS, 1,
249 G9IS, 1,
250 Offset(0x9A), /* EnhanceControl */
251 ,7,
252 HPDE, 1,
253 Offset(0xA8), /* PIO7654Enable */
254 IO4E, 1,
255 IO5E, 1,
256 IO6E, 1,
257 IO7E, 1,
258 Offset(0xA9), /* PIO7654Status */
259 IO4S, 1,
260 IO5S, 1,
261 IO6S, 1,
262 IO7S, 1,
263 }
264
265 /* PM1 Event Block
266 * First word is PM1_Status, Second word is PM1_Enable
267 */
268 OperationRegion(P1EB, SystemIO, APEB, 0x04)
269 Field(P1EB, ByteAcc, NoLock, Preserve) {
270 TMST, 1,
271 , 3,
272 BMST, 1,
273 GBST, 1,
274 Offset(0x01),
275 PBST, 1,
276 , 1,
277 RTST, 1,
278 , 3,
279 PWST, 1,
280 SPWS, 1,
281 Offset(0x02),
282 TMEN, 1,
283 , 4,
284 GBEN, 1,
285 Offset(0x03),
286 PBEN, 1,
287 , 1,
288 RTEN, 1,
289 , 3,
290 PWDA, 1,
291 }
292
293 Scope(\_SB) {
294 /* PCIe Configuration Space for 16 busses */
295 OperationRegion(PCFG, SystemMemory, PCBA, 0x01000000) /* Each bus consumes 1MB */
296 Field(PCFG, ByteAcc, NoLock, Preserve) {
297 /* Byte offsets are computed using the following technique:
298 * ((bus number + 1) * ((device number * 8) * 4096)) + register offset
299 * The 8 comes from 8 functions per device, and 4096 bytes per function config space
300 */
301 Offset(0x00088024), /* Byte offset to SATA register 24h - Bus 0, Device 17, Function 0 */
302 STB5, 32,
303 Offset(0x00098042), /* Byte offset to OHCI0 register 42h - Bus 0, Device 19, Function 0 */
304 PT0D, 1,
305 PT1D, 1,
306 PT2D, 1,
307 PT3D, 1,
308 PT4D, 1,
309 PT5D, 1,
310 PT6D, 1,
311 PT7D, 1,
312 PT8D, 1,
313 PT9D, 1,
314 Offset(0x000A0004), /* Byte offset to SMBUS register 4h - Bus 0, Device 20, Function 0 */
315 SBIE, 1,
316 SBME, 1,
317 Offset(0x000A0008), /* Byte offset to SMBUS register 8h - Bus 0, Device 20, Function 0 */
318 SBRI, 8,
319 Offset(0x000A0014), /* Byte offset to SMBUS register 14h - Bus 0, Device 20, Function 0 */
320 SBB1, 32,
321 Offset(0x000A0078), /* Byte offset to SMBUS register 78h - Bus 0, Device 20, Function 0 */
322 ,14,
323 P92E, 1, /* Port92 decode enable */
324 }
325
326 OperationRegion(SB5, SystemMemory, STB5, 0x1000)
327 Field(SB5, AnyAcc, NoLock, Preserve){
328 /* Port 0 */
329 Offset(0x120), /* Port 0 Task file status */
330 P0ER, 1,
331 , 2,
332 P0DQ, 1,
333 , 3,
334 P0BY, 1,
335 Offset(0x128), /* Port 0 Serial ATA status */
336 P0DD, 4,
337 , 4,
338 P0IS, 4,
339 Offset(0x12C), /* Port 0 Serial ATA control */
340 P0DI, 4,
341 Offset(0x130), /* Port 0 Serial ATA error */
342 , 16,
343 P0PR, 1,
344
345 /* Port 1 */
346 offset(0x1A0), /* Port 1 Task file status */
347 P1ER, 1,
348 , 2,
349 P1DQ, 1,
350 , 3,
351 P1BY, 1,
352 Offset(0x1A8), /* Port 1 Serial ATA status */
353 P1DD, 4,
354 , 4,
355 P1IS, 4,
356 Offset(0x1AC), /* Port 1 Serial ATA control */
357 P1DI, 4,
358 Offset(0x1B0), /* Port 1 Serial ATA error */
359 , 16,
360 P1PR, 1,
361
362 /* Port 2 */
363 Offset(0x220), /* Port 2 Task file status */
364 P2ER, 1,
365 , 2,
366 P2DQ, 1,
367 , 3,
368 P2BY, 1,
369 Offset(0x228), /* Port 2 Serial ATA status */
370 P2DD, 4,
371 , 4,
372 P2IS, 4,
373 Offset(0x22C), /* Port 2 Serial ATA control */
374 P2DI, 4,
375 Offset(0x230), /* Port 2 Serial ATA error */
376 , 16,
377 P2PR, 1,
378
379 /* Port 3 */
380 Offset(0x2A0), /* Port 3 Task file status */
381 P3ER, 1,
382 , 2,
383 P3DQ, 1,
384 , 3,
385 P3BY, 1,
386 Offset(0x2A8), /* Port 3 Serial ATA status */
387 P3DD, 4,
388 , 4,
389 P3IS, 4,
390 Offset(0x2AC), /* Port 3 Serial ATA control */
391 P3DI, 4,
392 Offset(0x2B0), /* Port 3 Serial ATA error */
393 , 16,
394 P3PR, 1,
395 }
396 }
397
398
399 #include "acpi/routing.asl"
400
401 Scope(\_SB) {
402
Edward O'Callaghanf7d8f092014-05-31 13:57:52 +1000403 Method(OSFL, 0){
Jens Rottmann73d49652013-02-28 09:56:20 +0100404
Edward O'Callaghanf7d8f092014-05-31 13:57:52 +1000405 if(LNotEqual(OSVR, Ones)) {Return(OSVR)} /* OS version was already detected */
Jens Rottmann73d49652013-02-28 09:56:20 +0100406
407 if(CondRefOf(\_OSI,Local1))
408 {
Edward O'Callaghanf7d8f092014-05-31 13:57:52 +1000409 Store(1, OSVR) /* Assume some form of XP */
Jens Rottmann73d49652013-02-28 09:56:20 +0100410 if (\_OSI("Windows 2006")) /* Vista */
411 {
Edward O'Callaghanf7d8f092014-05-31 13:57:52 +1000412 Store(2, OSVR)
Jens Rottmann73d49652013-02-28 09:56:20 +0100413 }
414 } else {
415 If(WCMP(\_OS,"Linux")) {
Edward O'Callaghanf7d8f092014-05-31 13:57:52 +1000416 Store(3, OSVR) /* Linux */
Jens Rottmann73d49652013-02-28 09:56:20 +0100417 } Else {
Edward O'Callaghanf7d8f092014-05-31 13:57:52 +1000418 Store(4, OSVR) /* Gotta be WinCE */
Jens Rottmann73d49652013-02-28 09:56:20 +0100419 }
420 }
Edward O'Callaghanf7d8f092014-05-31 13:57:52 +1000421 Return(OSVR)
Jens Rottmann73d49652013-02-28 09:56:20 +0100422 }
423
424 Method(_PIC, 0x01, NotSerialized)
425 {
426 If (Arg0)
427 {
428 \_SB.CIRQ()
429 }
430 Store(Arg0, PMOD)
431 }
432 Method(CIRQ, 0x00, NotSerialized){
433 Store(0, PIRA)
434 Store(0, PIRB)
435 Store(0, PIRC)
436 Store(0, PIRD)
437 Store(0, PIRE)
438 Store(0, PIRF)
439 Store(0, PIRG)
440 Store(0, PIRH)
441 }
442
443 Name(IRQB, ResourceTemplate(){
444 IRQ(Level,ActiveLow,Shared){15}
445 })
446
447 Name(IRQP, ResourceTemplate(){
448 IRQ(Level,ActiveLow,Exclusive){3, 4, 5, 7, 10, 11, 12, 15}
449 })
450
451 Name(PITF, ResourceTemplate(){
452 IRQ(Level,ActiveLow,Exclusive){9}
453 })
454
455 Device(INTA) {
456 Name(_HID, EISAID("PNP0C0F"))
457 Name(_UID, 1)
458
459 Method(_STA, 0) {
460 if (PIRA) {
461 Return(0x0B) /* sata is invisible */
462 } else {
463 Return(0x09) /* sata is disabled */
464 }
465 } /* End Method(_SB.INTA._STA) */
466
467 Method(_DIS ,0) {
468 /* DBGO("\\_SB\\LNKA\\_DIS\n") */
469 Store(0, PIRA)
470 } /* End Method(_SB.INTA._DIS) */
471
472 Method(_PRS ,0) {
473 /* DBGO("\\_SB\\LNKA\\_PRS\n") */
474 Return(IRQP)
475 } /* Method(_SB.INTA._PRS) */
476
477 Method(_CRS ,0) {
478 /* DBGO("\\_SB\\LNKA\\_CRS\n") */
479 CreateWordField(IRQB, 0x1, IRQN)
480 ShiftLeft(1, PIRA, IRQN)
481 Return(IRQB)
482 } /* Method(_SB.INTA._CRS) */
483
484 Method(_SRS, 1) {
485 /* DBGO("\\_SB\\LNKA\\_CRS\n") */
486 CreateWordField(ARG0, 1, IRQM)
487
488 /* Use lowest available IRQ */
489 FindSetRightBit(IRQM, Local0)
490 if (Local0) {
491 Decrement(Local0)
492 }
493 Store(Local0, PIRA)
494 } /* End Method(_SB.INTA._SRS) */
495 } /* End Device(INTA) */
496
497 Device(INTB) {
498 Name(_HID, EISAID("PNP0C0F"))
499 Name(_UID, 2)
500
501 Method(_STA, 0) {
502 if (PIRB) {
503 Return(0x0B) /* sata is invisible */
504 } else {
505 Return(0x09) /* sata is disabled */
506 }
507 } /* End Method(_SB.INTB._STA) */
508
509 Method(_DIS ,0) {
510 /* DBGO("\\_SB\\LNKB\\_DIS\n") */
511 Store(0, PIRB)
512 } /* End Method(_SB.INTB._DIS) */
513
514 Method(_PRS ,0) {
515 /* DBGO("\\_SB\\LNKB\\_PRS\n") */
516 Return(IRQP)
517 } /* Method(_SB.INTB._PRS) */
518
519 Method(_CRS ,0) {
520 /* DBGO("\\_SB\\LNKB\\_CRS\n") */
521 CreateWordField(IRQB, 0x1, IRQN)
522 ShiftLeft(1, PIRB, IRQN)
523 Return(IRQB)
524 } /* Method(_SB.INTB._CRS) */
525
526 Method(_SRS, 1) {
527 /* DBGO("\\_SB\\LNKB\\_CRS\n") */
528 CreateWordField(ARG0, 1, IRQM)
529
530 /* Use lowest available IRQ */
531 FindSetRightBit(IRQM, Local0)
532 if (Local0) {
533 Decrement(Local0)
534 }
535 Store(Local0, PIRB)
536 } /* End Method(_SB.INTB._SRS) */
537 } /* End Device(INTB) */
538
539 Device(INTC) {
540 Name(_HID, EISAID("PNP0C0F"))
541 Name(_UID, 3)
542
543 Method(_STA, 0) {
544 if (PIRC) {
545 Return(0x0B) /* sata is invisible */
546 } else {
547 Return(0x09) /* sata is disabled */
548 }
549 } /* End Method(_SB.INTC._STA) */
550
551 Method(_DIS ,0) {
552 /* DBGO("\\_SB\\LNKC\\_DIS\n") */
553 Store(0, PIRC)
554 } /* End Method(_SB.INTC._DIS) */
555
556 Method(_PRS ,0) {
557 /* DBGO("\\_SB\\LNKC\\_PRS\n") */
558 Return(IRQP)
559 } /* Method(_SB.INTC._PRS) */
560
561 Method(_CRS ,0) {
562 /* DBGO("\\_SB\\LNKC\\_CRS\n") */
563 CreateWordField(IRQB, 0x1, IRQN)
564 ShiftLeft(1, PIRC, IRQN)
565 Return(IRQB)
566 } /* Method(_SB.INTC._CRS) */
567
568 Method(_SRS, 1) {
569 /* DBGO("\\_SB\\LNKC\\_CRS\n") */
570 CreateWordField(ARG0, 1, IRQM)
571
572 /* Use lowest available IRQ */
573 FindSetRightBit(IRQM, Local0)
574 if (Local0) {
575 Decrement(Local0)
576 }
577 Store(Local0, PIRC)
578 } /* End Method(_SB.INTC._SRS) */
579 } /* End Device(INTC) */
580
581 Device(INTD) {
582 Name(_HID, EISAID("PNP0C0F"))
583 Name(_UID, 4)
584
585 Method(_STA, 0) {
586 if (PIRD) {
587 Return(0x0B) /* sata is invisible */
588 } else {
589 Return(0x09) /* sata is disabled */
590 }
591 } /* End Method(_SB.INTD._STA) */
592
593 Method(_DIS ,0) {
594 /* DBGO("\\_SB\\LNKD\\_DIS\n") */
595 Store(0, PIRD)
596 } /* End Method(_SB.INTD._DIS) */
597
598 Method(_PRS ,0) {
599 /* DBGO("\\_SB\\LNKD\\_PRS\n") */
600 Return(IRQP)
601 } /* Method(_SB.INTD._PRS) */
602
603 Method(_CRS ,0) {
604 /* DBGO("\\_SB\\LNKD\\_CRS\n") */
605 CreateWordField(IRQB, 0x1, IRQN)
606 ShiftLeft(1, PIRD, IRQN)
607 Return(IRQB)
608 } /* Method(_SB.INTD._CRS) */
609
610 Method(_SRS, 1) {
611 /* DBGO("\\_SB\\LNKD\\_CRS\n") */
612 CreateWordField(ARG0, 1, IRQM)
613
614 /* Use lowest available IRQ */
615 FindSetRightBit(IRQM, Local0)
616 if (Local0) {
617 Decrement(Local0)
618 }
619 Store(Local0, PIRD)
620 } /* End Method(_SB.INTD._SRS) */
621 } /* End Device(INTD) */
622
623 Device(INTE) {
624 Name(_HID, EISAID("PNP0C0F"))
625 Name(_UID, 5)
626
627 Method(_STA, 0) {
628 if (PIRE) {
629 Return(0x0B) /* sata is invisible */
630 } else {
631 Return(0x09) /* sata is disabled */
632 }
633 } /* End Method(_SB.INTE._STA) */
634
635 Method(_DIS ,0) {
636 /* DBGO("\\_SB\\LNKE\\_DIS\n") */
637 Store(0, PIRE)
638 } /* End Method(_SB.INTE._DIS) */
639
640 Method(_PRS ,0) {
641 /* DBGO("\\_SB\\LNKE\\_PRS\n") */
642 Return(IRQP)
643 } /* Method(_SB.INTE._PRS) */
644
645 Method(_CRS ,0) {
646 /* DBGO("\\_SB\\LNKE\\_CRS\n") */
647 CreateWordField(IRQB, 0x1, IRQN)
648 ShiftLeft(1, PIRE, IRQN)
649 Return(IRQB)
650 } /* Method(_SB.INTE._CRS) */
651
652 Method(_SRS, 1) {
653 /* DBGO("\\_SB\\LNKE\\_CRS\n") */
654 CreateWordField(ARG0, 1, IRQM)
655
656 /* Use lowest available IRQ */
657 FindSetRightBit(IRQM, Local0)
658 if (Local0) {
659 Decrement(Local0)
660 }
661 Store(Local0, PIRE)
662 } /* End Method(_SB.INTE._SRS) */
663 } /* End Device(INTE) */
664
665 Device(INTF) {
666 Name(_HID, EISAID("PNP0C0F"))
667 Name(_UID, 6)
668
669 Method(_STA, 0) {
670 if (PIRF) {
671 Return(0x0B) /* sata is invisible */
672 } else {
673 Return(0x09) /* sata is disabled */
674 }
675 } /* End Method(_SB.INTF._STA) */
676
677 Method(_DIS ,0) {
678 /* DBGO("\\_SB\\LNKF\\_DIS\n") */
679 Store(0, PIRF)
680 } /* End Method(_SB.INTF._DIS) */
681
682 Method(_PRS ,0) {
683 /* DBGO("\\_SB\\LNKF\\_PRS\n") */
684 Return(PITF)
685 } /* Method(_SB.INTF._PRS) */
686
687 Method(_CRS ,0) {
688 /* DBGO("\\_SB\\LNKF\\_CRS\n") */
689 CreateWordField(IRQB, 0x1, IRQN)
690 ShiftLeft(1, PIRF, IRQN)
691 Return(IRQB)
692 } /* Method(_SB.INTF._CRS) */
693
694 Method(_SRS, 1) {
695 /* DBGO("\\_SB\\LNKF\\_CRS\n") */
696 CreateWordField(ARG0, 1, IRQM)
697
698 /* Use lowest available IRQ */
699 FindSetRightBit(IRQM, Local0)
700 if (Local0) {
701 Decrement(Local0)
702 }
703 Store(Local0, PIRF)
704 } /* End Method(_SB.INTF._SRS) */
705 } /* End Device(INTF) */
706
707 Device(INTG) {
708 Name(_HID, EISAID("PNP0C0F"))
709 Name(_UID, 7)
710
711 Method(_STA, 0) {
712 if (PIRG) {
713 Return(0x0B) /* sata is invisible */
714 } else {
715 Return(0x09) /* sata is disabled */
716 }
717 } /* End Method(_SB.INTG._STA) */
718
719 Method(_DIS ,0) {
720 /* DBGO("\\_SB\\LNKG\\_DIS\n") */
721 Store(0, PIRG)
722 } /* End Method(_SB.INTG._DIS) */
723
724 Method(_PRS ,0) {
725 /* DBGO("\\_SB\\LNKG\\_PRS\n") */
726 Return(IRQP)
727 } /* Method(_SB.INTG._CRS) */
728
729 Method(_CRS ,0) {
730 /* DBGO("\\_SB\\LNKG\\_CRS\n") */
731 CreateWordField(IRQB, 0x1, IRQN)
732 ShiftLeft(1, PIRG, IRQN)
733 Return(IRQB)
734 } /* Method(_SB.INTG._CRS) */
735
736 Method(_SRS, 1) {
737 /* DBGO("\\_SB\\LNKG\\_CRS\n") */
738 CreateWordField(ARG0, 1, IRQM)
739
740 /* Use lowest available IRQ */
741 FindSetRightBit(IRQM, Local0)
742 if (Local0) {
743 Decrement(Local0)
744 }
745 Store(Local0, PIRG)
746 } /* End Method(_SB.INTG._SRS) */
747 } /* End Device(INTG) */
748
749 Device(INTH) {
750 Name(_HID, EISAID("PNP0C0F"))
751 Name(_UID, 8)
752
753 Method(_STA, 0) {
754 if (PIRH) {
755 Return(0x0B) /* sata is invisible */
756 } else {
757 Return(0x09) /* sata is disabled */
758 }
759 } /* End Method(_SB.INTH._STA) */
760
761 Method(_DIS ,0) {
762 /* DBGO("\\_SB\\LNKH\\_DIS\n") */
763 Store(0, PIRH)
764 } /* End Method(_SB.INTH._DIS) */
765
766 Method(_PRS ,0) {
767 /* DBGO("\\_SB\\LNKH\\_PRS\n") */
768 Return(IRQP)
769 } /* Method(_SB.INTH._CRS) */
770
771 Method(_CRS ,0) {
772 /* DBGO("\\_SB\\LNKH\\_CRS\n") */
773 CreateWordField(IRQB, 0x1, IRQN)
774 ShiftLeft(1, PIRH, IRQN)
775 Return(IRQB)
776 } /* Method(_SB.INTH._CRS) */
777
778 Method(_SRS, 1) {
779 /* DBGO("\\_SB\\LNKH\\_CRS\n") */
780 CreateWordField(ARG0, 1, IRQM)
781
782 /* Use lowest available IRQ */
783 FindSetRightBit(IRQM, Local0)
784 if (Local0) {
785 Decrement(Local0)
786 }
787 Store(Local0, PIRH)
788 } /* End Method(_SB.INTH._SRS) */
789 } /* End Device(INTH) */
790
791 } /* End Scope(_SB) */
792
793
794 /* Supported sleep states: */
795 Name(\_S0, Package () {0x00, 0x00, 0x00, 0x00} ) /* (S0) - working state */
796
797 If (LAnd(SSFG, 0x01)) {
798 Name(\_S1, Package () {0x01, 0x01, 0x00, 0x00} ) /* (S1) - sleeping w/CPU context */
799 }
800 If (LAnd(SSFG, 0x02)) {
801 Name(\_S2, Package () {0x02, 0x02, 0x00, 0x00} ) /* (S2) - "light" Suspend to RAM */
802 }
803 If (LAnd(SSFG, 0x04)) {
804 Name(\_S3, Package () {0x03, 0x03, 0x00, 0x00} ) /* (S3) - Suspend to RAM */
805 }
806 If (LAnd(SSFG, 0x08)) {
807 Name(\_S4, Package () {0x04, 0x04, 0x00, 0x00} ) /* (S4) - Suspend to Disk */
808 }
809
810 Name(\_S5, Package () {0x05, 0x05, 0x00, 0x00} ) /* (S5) - Soft Off */
811
812 Name(\_SB.CSPS ,0) /* Current Sleep State (S0, S1, S2, S3, S4, S5) */
813 Name(CSMS, 0) /* Current System State */
814
815 /* Wake status package */
816 Name(WKST,Package(){Zero, Zero})
817
818 /*
819 * \_PTS - Prepare to Sleep method
820 *
821 * Entry:
822 * Arg0=The value of the sleeping state S1=1, S2=2, etc
823 *
824 * Exit:
825 * -none-
826 *
827 * The _PTS control method is executed at the beginning of the sleep process
828 * for S1-S5. The sleeping value is passed to the _PTS control method. This
829 * control method may be executed a relatively long time before entering the
830 * sleep state and the OS may abort the operation without notification to
831 * the ACPI driver. This method cannot modify the configuration or power
832 * state of any device in the system.
833 */
834 Method(\_PTS, 1) {
835 /* DBGO("\\_PTS\n") */
836 /* DBGO("From S0 to S") */
837 /* DBGO(Arg0) */
838 /* DBGO("\n") */
839
840 /* Don't allow PCIRST# to reset USB */
841 if (LEqual(Arg0,3)){
842 Store(0,URRE)
843 }
844
845 /* Clear sleep SMI status flag and enable sleep SMI trap. */
846 /*Store(One, CSSM)
847 Store(One, SSEN)*/
848
849 /* On older chips, clear PciExpWakeDisEn */
850 /*if (LLessEqual(\_SB.SBRI, 0x13)) {
851 * Store(0,\_SB.PWDE)
852 *}
853 */
854
855 /* Clear wake status structure. */
856 Store(0, Index(WKST,0))
857 Store(0, Index(WKST,1))
858 } /* End Method(\_PTS) */
859
860 /*
861 * The following method results in a "not a valid reserved NameSeg"
862 * warning so I have commented it out for the duration. It isn't
863 * used, so it could be removed.
864 *
865 *
866 * \_GTS OEM Going To Sleep method
867 *
868 * Entry:
869 * Arg0=The value of the sleeping state S1=1, S2=2
870 *
871 * Exit:
872 * -none-
873 *
874 * Method(\_GTS, 1) {
875 * DBGO("\\_GTS\n")
876 * DBGO("From S0 to S")
877 * DBGO(Arg0)
878 * DBGO("\n")
879 * }
880 */
881
882 /*
883 * \_BFS OEM Back From Sleep method
884 *
885 * Entry:
886 * Arg0=The value of the sleeping state S1=1, S2=2
887 *
888 * Exit:
889 * -none-
890 */
891 Method(\_BFS, 1) {
892 /* DBGO("\\_BFS\n") */
893 /* DBGO("From S") */
894 /* DBGO(Arg0) */
895 /* DBGO(" to S0\n") */
896 }
897
898 /*
899 * \_WAK System Wake method
900 *
901 * Entry:
902 * Arg0=The value of the sleeping state S1=1, S2=2
903 *
904 * Exit:
905 * Return package of 2 DWords
906 * Dword 1 - Status
907 * 0x00000000 wake succeeded
908 * 0x00000001 Wake was signaled but failed due to lack of power
909 * 0x00000002 Wake was signaled but failed due to thermal condition
910 * Dword 2 - Power Supply state
911 * if non-zero the effective S-state the power supply entered
912 */
913 Method(\_WAK, 1) {
914 /* DBGO("\\_WAK\n") */
915 /* DBGO("From S") */
916 /* DBGO(Arg0) */
917 /* DBGO(" to S0\n") */
918
919 /* Re-enable HPET */
920 Store(1,HPDE)
921
922 /* Restore PCIRST# so it resets USB */
923 if (LEqual(Arg0,3)){
924 Store(1,URRE)
925 }
926
927 /* Arbitrarily clear PciExpWakeStatus */
928 Store(PWST, PWST)
929
930 /* if(DeRefOf(Index(WKST,0))) {
931 * Store(0, Index(WKST,1))
932 * } else {
933 * Store(Arg0, Index(WKST,1))
934 * }
935 */
936 Return(WKST)
937 } /* End Method(\_WAK) */
938
939 Scope(\_GPE) { /* Start Scope GPE */
940 /* General event 0 */
941 /* Method(_L00) {
942 * DBGO("\\_GPE\\_L00\n")
943 * }
944 */
945
946 /* General event 1 */
947 /* Method(_L01) {
948 * DBGO("\\_GPE\\_L00\n")
949 * }
950 */
951
952 /* General event 2 */
953 /* Method(_L02) {
954 * DBGO("\\_GPE\\_L00\n")
955 * }
956 */
957
958 /* General event 3 */
959 Method(_L03) {
960 /* DBGO("\\_GPE\\_L00\n") */
961 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
962 }
963
964 /* General event 4 */
965 /* Method(_L04) {
966 * DBGO("\\_GPE\\_L00\n")
967 * }
968 */
969
970 /* General event 5 */
971 /* Method(_L05) {
972 * DBGO("\\_GPE\\_L00\n")
973 * }
974 */
975
976 /* General event 6 - Used for GPM6, moved to USB.asl */
977 /* Method(_L06) {
978 * DBGO("\\_GPE\\_L00\n")
979 * }
980 */
981
982 /* General event 7 - Used for GPM7, moved to USB.asl */
983 /* Method(_L07) {
984 * DBGO("\\_GPE\\_L07\n")
985 * }
986 */
987
988 /* Legacy PM event */
989 Method(_L08) {
990 /* DBGO("\\_GPE\\_L08\n") */
991 }
992
993 /* Temp warning (TWarn) event */
994 Method(_L09) {
995 /* DBGO("\\_GPE\\_L09\n") */
996 /* Notify (\_TZ.TZ00, 0x80) */
997 }
998
999 /* Reserved */
1000 /* Method(_L0A) {
1001 * DBGO("\\_GPE\\_L0A\n")
1002 * }
1003 */
1004
1005 /* USB controller PME# */
1006 Method(_L0B) {
1007 /* DBGO("\\_GPE\\_L0B\n") */
1008 Notify(\_SB.PCI0.UOH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1009 Notify(\_SB.PCI0.UOH2, 0x02) /* NOTIFY_DEVICE_WAKE */
1010 Notify(\_SB.PCI0.UOH3, 0x02) /* NOTIFY_DEVICE_WAKE */
1011 Notify(\_SB.PCI0.UOH4, 0x02) /* NOTIFY_DEVICE_WAKE */
1012 Notify(\_SB.PCI0.UOH5, 0x02) /* NOTIFY_DEVICE_WAKE */
1013 Notify(\_SB.PCI0.UOH6, 0x02) /* NOTIFY_DEVICE_WAKE */
1014 Notify(\_SB.PCI0.UEH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1015 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1016 }
1017
1018 /* AC97 controller PME# */
1019 /* Method(_L0C) {
1020 * DBGO("\\_GPE\\_L0C\n")
1021 * }
1022 */
1023
1024 /* OtherTherm PME# */
1025 /* Method(_L0D) {
1026 * DBGO("\\_GPE\\_L0D\n")
1027 * }
1028 */
1029
1030 /* GPM9 SCI event - Moved to USB.asl */
1031 /* Method(_L0E) {
1032 * DBGO("\\_GPE\\_L0E\n")
1033 * }
1034 */
1035
1036 /* PCIe HotPlug event */
1037 /* Method(_L0F) {
1038 * DBGO("\\_GPE\\_L0F\n")
1039 * }
1040 */
1041
1042 /* ExtEvent0 SCI event */
1043 Method(_L10) {
1044 /* DBGO("\\_GPE\\_L10\n") */
1045 }
1046
1047
1048 /* ExtEvent1 SCI event */
1049 Method(_L11) {
1050 /* DBGO("\\_GPE\\_L11\n") */
1051 }
1052
1053 /* PCIe PME# event */
1054 /* Method(_L12) {
1055 * DBGO("\\_GPE\\_L12\n")
1056 * }
1057 */
1058
1059 /* GPM0 SCI event - Moved to USB.asl */
1060 /* Method(_L13) {
1061 * DBGO("\\_GPE\\_L13\n")
1062 * }
1063 */
1064
1065 /* GPM1 SCI event - Moved to USB.asl */
1066 /* Method(_L14) {
1067 * DBGO("\\_GPE\\_L14\n")
1068 * }
1069 */
1070
1071 /* GPM2 SCI event - Moved to USB.asl */
1072 /* Method(_L15) {
1073 * DBGO("\\_GPE\\_L15\n")
1074 * }
1075 */
1076
1077 /* GPM3 SCI event - Moved to USB.asl */
1078 /* Method(_L16) {
1079 * DBGO("\\_GPE\\_L16\n")
1080 * }
1081 */
1082
1083 /* GPM8 SCI event - Moved to USB.asl */
1084 /* Method(_L17) {
1085 * DBGO("\\_GPE\\_L17\n")
1086 * }
1087 */
1088
1089 /* GPIO0 or GEvent8 event */
1090 Method(_L18) {
1091 /* DBGO("\\_GPE\\_L18\n") */
1092 Notify(\_SB.PCI0.PBR2, 0x02) /* NOTIFY_DEVICE_WAKE */
1093 Notify(\_SB.PCI0.PBR4, 0x02) /* NOTIFY_DEVICE_WAKE */
1094 Notify(\_SB.PCI0.PBR5, 0x02) /* NOTIFY_DEVICE_WAKE */
1095 Notify(\_SB.PCI0.PBR6, 0x02) /* NOTIFY_DEVICE_WAKE */
1096 Notify(\_SB.PCI0.PBR7, 0x02) /* NOTIFY_DEVICE_WAKE */
1097 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1098 }
1099
1100 /* GPM4 SCI event - Moved to USB.asl */
1101 /* Method(_L19) {
1102 * DBGO("\\_GPE\\_L19\n")
1103 * }
1104 */
1105
1106 /* GPM5 SCI event - Moved to USB.asl */
1107 /* Method(_L1A) {
1108 * DBGO("\\_GPE\\_L1A\n")
1109 * }
1110 */
1111
1112 /* Azalia SCI event */
1113 Method(_L1B) {
1114 /* DBGO("\\_GPE\\_L1B\n") */
1115 Notify(\_SB.PCI0.AZHD, 0x02) /* NOTIFY_DEVICE_WAKE */
1116 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1117 }
1118
1119 /* GPM6 SCI event - Reassigned to _L06 */
1120 /* Method(_L1C) {
1121 * DBGO("\\_GPE\\_L1C\n")
1122 * }
1123 */
1124
1125 /* GPM7 SCI event - Reassigned to _L07 */
1126 /* Method(_L1D) {
1127 * DBGO("\\_GPE\\_L1D\n")
1128 * }
1129 */
1130
1131 /* GPIO2 or GPIO66 SCI event */
1132 /* Method(_L1E) {
1133 * DBGO("\\_GPE\\_L1E\n")
1134 * }
1135 */
1136
1137 /* SATA SCI event - Moved to sata.asl */
1138 /* Method(_L1F) {
1139 * DBGO("\\_GPE\\_L1F\n")
1140 * }
1141 */
1142
1143 } /* End Scope GPE */
1144
1145 #include "acpi/usb.asl"
1146
1147 /* South Bridge */
1148 Scope(\_SB) { /* Start \_SB scope */
1149 #include <arch/x86/acpi/globutil.asl> /* global utility methods expected within the \_SB scope */
1150
1151 /* _SB.PCI0 */
1152 /* Note: Only need HID on Primary Bus */
1153 Device(PCI0) {
1154 External (TOM1)
1155 External (TOM2)
Mike Loptien061c6642013-03-15 13:24:53 -06001156 Name(_HID, EISAID("PNP0A08")) /* PCI Express Root Bridge */
1157 Name(_CID, EISAID("PNP0A03")) /* PCI Root Bridge */
Jens Rottmann73d49652013-02-28 09:56:20 +01001158 Name(_ADR, 0x00180000) /* Dev# = BSP Dev#, Func# = 0 */
Mike Loptien061c6642013-03-15 13:24:53 -06001159
1160 /* Operating System Capabilities Method */
Martin Rothc7b26c32015-11-24 16:17:11 -07001161 Method (_OSC, 4)
1162 {
1163 /* Check for PCI/PCI-X/PCIe GUID */
1164 If (LEqual (Arg0, ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766")))
Mike Loptien061c6642013-03-15 13:24:53 -06001165 {
1166 /* Let OS control everything */
1167 Return (Arg3)
1168 }
Martin Rothc7b26c32015-11-24 16:17:11 -07001169 Else
1170 {
1171 /* Unrecognized UUID, so set bit 2 of Arg3 to 1 */
1172 CreateDWordField (Arg3, 0, CDW1)
1173 Or (CDW1, 4, CDW1)
1174 Return (Arg3)
1175 }
1176 } /* End _OSC */
Mike Loptien061c6642013-03-15 13:24:53 -06001177
Jens Rottmann73d49652013-02-28 09:56:20 +01001178 Method(_BBN, 0) { /* Bus number = 0 */
1179 Return(0)
1180 }
1181 Method(_STA, 0) {
1182 /* DBGO("\\_SB\\PCI0\\_STA\n") */
1183 Return(0x0B) /* Status is visible */
1184 }
1185
1186 Method(_PRT,0) {
1187 If(PMOD){ Return(APR0) } /* APIC mode */
1188 Return (PR0) /* PIC Mode */
1189 } /* end _PRT */
1190
1191 /* Describe the Northbridge devices */
1192 Device(AMRT) {
1193 Name(_ADR, 0x00000000)
1194 } /* end AMRT */
1195
1196 /* The internal GFX bridge */
1197 Device(AGPB) {
1198 Name(_ADR, 0x00010000)
1199 Name(_PRW, Package() {0x18, 4})
1200 Method(_PRT,0) {
1201 Return (APR1)
1202 }
1203 } /* end AGPB */
1204
1205 /* The external GFX bridge */
1206 Device(PBR2) {
1207 Name(_ADR, 0x00020000)
1208 Name(_PRW, Package() {0x18, 4})
1209 Method(_PRT,0) {
1210 If(PMOD){ Return(APS2) } /* APIC mode */
1211 Return (PS2) /* PIC Mode */
1212 } /* end _PRT */
1213 } /* end PBR2 */
1214
1215 /* Dev3 is also an external GFX bridge, not used in Herring */
1216
1217 Device(PBR4) {
1218 Name(_ADR, 0x00040000)
1219 Name(_PRW, Package() {0x18, 4})
1220 Method(_PRT,0) {
1221 If(PMOD){ Return(APS4) } /* APIC mode */
1222 Return (PS4) /* PIC Mode */
1223 } /* end _PRT */
1224 } /* end PBR4 */
1225
1226 Device(PBR5) {
1227 Name(_ADR, 0x00050000)
1228 Name(_PRW, Package() {0x18, 4})
1229 Method(_PRT,0) {
1230 If(PMOD){ Return(APS5) } /* APIC mode */
1231 Return (PS5) /* PIC Mode */
1232 } /* end _PRT */
1233 } /* end PBR5 */
1234
1235 Device(PBR6) {
1236 Name(_ADR, 0x00060000)
1237 Name(_PRW, Package() {0x18, 4})
1238 Method(_PRT,0) {
1239 If(PMOD){ Return(APS6) } /* APIC mode */
1240 Return (PS6) /* PIC Mode */
1241 } /* end _PRT */
1242 } /* end PBR6 */
1243
1244 /* The onboard EtherNet chip */
1245 Device(PBR7) {
1246 Name(_ADR, 0x00070000)
1247 Name(_PRW, Package() {0x18, 4})
1248 Method(_PRT,0) {
1249 If(PMOD){ Return(APS7) } /* APIC mode */
1250 Return (PS7) /* PIC Mode */
1251 } /* end _PRT */
1252 } /* end PBR7 */
1253
1254 /* GPP */
1255 Device(PBR9) {
1256 Name(_ADR, 0x00090000)
1257 Name(_PRW, Package() {0x18, 4})
1258 Method(_PRT,0) {
1259 If(PMOD){ Return(APS9) } /* APIC mode */
1260 Return (PS9) /* PIC Mode */
1261 } /* end _PRT */
1262 } /* end PBR9 */
1263
1264 Device(PBRa) {
1265 Name(_ADR, 0x000A0000)
1266 Name(_PRW, Package() {0x18, 4})
1267 Method(_PRT,0) {
1268 If(PMOD){ Return(APSa) } /* APIC mode */
1269 Return (PSa) /* PIC Mode */
1270 } /* end _PRT */
1271 } /* end PBRa */
1272
1273 Device(PE20) {
1274 Name(_ADR, 0x00150000)
1275 Name(_PRW, Package() {0x18, 4})
1276 Method(_PRT,0) {
1277 If(PMOD){ Return(APE0) } /* APIC mode */
1278 Return (PE0) /* PIC Mode */
1279 } /* end _PRT */
1280 } /* end PE20 */
1281 Device(PE21) {
1282 Name(_ADR, 0x00150001)
1283 Name(_PRW, Package() {0x18, 4})
1284 Method(_PRT,0) {
1285 If(PMOD){ Return(APE1) } /* APIC mode */
1286 Return (PE1) /* PIC Mode */
1287 } /* end _PRT */
1288 } /* end PE21 */
1289 Device(PE22) {
1290 Name(_ADR, 0x00150002)
1291 Name(_PRW, Package() {0x18, 4})
1292 Method(_PRT,0) {
1293 If(PMOD){ Return(APE2) } /* APIC mode */
1294 Return (APE2) /* PIC Mode */
1295 } /* end _PRT */
1296 } /* end PE22 */
1297 Device(PE23) {
1298 Name(_ADR, 0x00150003)
1299 Name(_PRW, Package() {0x18, 4})
1300 Method(_PRT,0) {
1301 If(PMOD){ Return(APE3) } /* APIC mode */
1302 Return (PE3) /* PIC Mode */
1303 } /* end _PRT */
1304 } /* end PE23 */
1305
1306 /* PCI slot 1, 2, 3 */
1307 Device(PIBR) {
1308 Name(_ADR, 0x00140004)
1309 Name(_PRW, Package() {0x18, 4})
1310
1311 Method(_PRT, 0) {
1312 Return (PCIB)
1313 }
1314 }
1315
1316 /* Describe the Southbridge devices */
1317 Device(STCR) {
1318 Name(_ADR, 0x00110000)
1319 #include "acpi/sata.asl"
1320 } /* end STCR */
1321
1322 Device(UOH1) {
1323 Name(_ADR, 0x00120000)
1324 Name(_PRW, Package() {0x0B, 3})
1325 } /* end UOH1 */
1326
1327 Device(UOH2) {
1328 Name(_ADR, 0x00120002)
1329 Name(_PRW, Package() {0x0B, 3})
1330 } /* end UOH2 */
1331
1332 Device(UOH3) {
1333 Name(_ADR, 0x00130000)
1334 Name(_PRW, Package() {0x0B, 3})
1335 } /* end UOH3 */
1336
1337 Device(UOH4) {
1338 Name(_ADR, 0x00130002)
1339 Name(_PRW, Package() {0x0B, 3})
1340 } /* end UOH4 */
1341
1342 Device(UOH5) {
1343 Name(_ADR, 0x00160000)
1344 Name(_PRW, Package() {0x0B, 3})
1345 } /* end UOH5 */
1346
1347 Device(UOH6) {
1348 Name(_ADR, 0x00160002)
1349 Name(_PRW, Package() {0x0B, 3})
1350 } /* end UOH5 */
1351
1352 Device(UEH1) {
1353 Name(_ADR, 0x00140005)
1354 Name(_PRW, Package() {0x0B, 3})
1355 } /* end UEH1 */
1356
1357 Device(SBUS) {
1358 Name(_ADR, 0x00140000)
1359 } /* end SBUS */
1360
Jens Rottmann73d49652013-02-28 09:56:20 +01001361 Device(AZHD) {
1362 Name(_ADR, 0x00140002)
1363 OperationRegion(AZPD, PCI_Config, 0x00, 0x100)
1364 Field(AZPD, AnyAcc, NoLock, Preserve) {
1365 offset (0x42),
1366 NSDI, 1,
1367 NSDO, 1,
1368 NSEN, 1,
1369 offset (0x44),
1370 IPCR, 4,
1371 offset (0x54),
1372 PWST, 2,
1373 , 6,
1374 PMEB, 1,
1375 , 6,
1376 PMST, 1,
1377 offset (0x62),
1378 MMCR, 1,
1379 offset (0x64),
1380 MMLA, 32,
1381 offset (0x68),
1382 MMHA, 32,
1383 offset (0x6C),
1384 MMDT, 16,
1385 }
Jens Rottmann73d49652013-02-28 09:56:20 +01001386 } /* end AZHD */
1387
1388 Device(LIBR) {
1389 Name(_ADR, 0x00140003)
1390 /* Method(_INI) {
1391 * DBGO("\\_SB\\PCI0\\LpcIsaBr\\_INI\n")
1392 } */ /* End Method(_SB.SBRDG._INI) */
1393
1394 /* Real Time Clock Device */
1395 Device(RTC0) {
1396 Name(_HID, EISAID("PNP0B00")) /* AT Real Time Clock (not PIIX4 compatible) */
1397 Name(_CRS, ResourceTemplate() {
1398 IRQNoFlags(){8}
1399 IO(Decode16,0x0070, 0x0070, 0, 2)
1400 /* IO(Decode16,0x0070, 0x0070, 0, 4) */
1401 })
1402 } /* End Device(_SB.PCI0.LpcIsaBr.RTC0) */
1403
1404 Device(TMR) { /* Timer */
1405 Name(_HID,EISAID("PNP0100")) /* System Timer */
1406 Name(_CRS, ResourceTemplate() {
1407 IRQNoFlags(){0}
1408 IO(Decode16, 0x0040, 0x0040, 0, 4)
1409 /* IO(Decode16, 0x0048, 0x0048, 0, 4) */
1410 })
1411 } /* End Device(_SB.PCI0.LpcIsaBr.TMR) */
1412
1413 Device(SPKR) { /* Speaker */
1414 Name(_HID,EISAID("PNP0800")) /* AT style speaker */
1415 Name(_CRS, ResourceTemplate() {
1416 IO(Decode16, 0x0061, 0x0061, 0, 1)
1417 })
1418 } /* End Device(_SB.PCI0.LpcIsaBr.SPKR) */
1419
1420 Device(PIC) {
1421 Name(_HID,EISAID("PNP0000")) /* AT Interrupt Controller */
1422 Name(_CRS, ResourceTemplate() {
1423 IRQNoFlags(){2}
1424 IO(Decode16,0x0020, 0x0020, 0, 2)
1425 IO(Decode16,0x00A0, 0x00A0, 0, 2)
1426 /* IO(Decode16, 0x00D0, 0x00D0, 0x10, 0x02) */
1427 /* IO(Decode16, 0x04D0, 0x04D0, 0x10, 0x02) */
1428 })
1429 } /* End Device(_SB.PCI0.LpcIsaBr.PIC) */
1430
1431 Device(MAD) { /* 8257 DMA */
1432 Name(_HID,EISAID("PNP0200")) /* Hardware Device ID */
1433 Name(_CRS, ResourceTemplate() {
1434 DMA(Compatibility,BusMaster,Transfer8){4}
1435 IO(Decode16, 0x0000, 0x0000, 0x10, 0x10)
1436 IO(Decode16, 0x0081, 0x0081, 0x01, 0x03)
1437 IO(Decode16, 0x0087, 0x0087, 0x01, 0x01)
1438 IO(Decode16, 0x0089, 0x0089, 0x01, 0x03)
1439 IO(Decode16, 0x008F, 0x008F, 0x01, 0x01)
1440 IO(Decode16, 0x00C0, 0x00C0, 0x10, 0x20)
1441 }) /* End Name(_SB.PCI0.LpcIsaBr.MAD._CRS) */
1442 } /* End Device(_SB.PCI0.LpcIsaBr.MAD) */
1443
1444 Device(COPR) {
1445 Name(_HID,EISAID("PNP0C04")) /* Math Coprocessor */
1446 Name(_CRS, ResourceTemplate() {
1447 IO(Decode16, 0x00F0, 0x00F0, 0, 0x10)
1448 IRQNoFlags(){13}
1449 })
1450 } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */
1451#if 0
1452 Device(HPTM) {
1453 Name(_HID,EISAID("PNP0103"))
1454 Name(CRS,ResourceTemplate() {
1455 Memory32Fixed(ReadOnly,0xFED00000, 0x00000400, HPT) /* 1kb reserved space */
1456 })
1457 Method(_STA, 0) {
1458 Return(0x0F) /* sata is visible */
1459 }
1460 Method(_CRS, 0) {
1461 CreateDwordField(CRS, ^HPT._BAS, HPBA)
1462 Store(HPBA, HPBA)
1463 Return(CRS)
1464 }
1465 } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */
1466#endif
Jens Rottmann23d13b12013-02-28 10:24:20 +01001467 #include "acpi/superio.asl"
Jens Rottmann73d49652013-02-28 09:56:20 +01001468 } /* end LIBR */
1469
1470 Device(HPBR) {
1471 Name(_ADR, 0x00140004)
1472 } /* end HostPciBr */
1473
1474 Device(ACAD) {
1475 Name(_ADR, 0x00140005)
1476 } /* end Ac97audio */
1477
1478 Device(ACMD) {
1479 Name(_ADR, 0x00140006)
1480 } /* end Ac97modem */
1481
1482 Name(CRES, ResourceTemplate() {
Mike Loptien42ad2002013-03-15 13:05:59 -06001483 /* Set the Bus number and Secondary Bus number for the PCI0 device
1484 * The Secondary bus range for PCI0 lets the system
1485 * know what bus values are allowed on the downstream
1486 * side of this PCI bus if there is a PCI-PCI bridge.
1487 * PCI busses can have 256 secondary busses which
1488 * range from [0-0xFF] but they do not need to be
1489 * sequential.
1490 */
1491 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
1492 0x0000, /* address granularity */
1493 0x0000, /* range minimum */
1494 0x00FF, /* range maximum */
1495 0x0000, /* translation */
1496 0x0100, /* length */
1497 ,, PSB0) /* ResourceSourceIndex, ResourceSource, DescriptorName */
1498
Jens Rottmann23d13b12013-02-28 10:24:20 +01001499 IO(Decode16, 0x004E, 0x004E, 1, 2) /* SIO config regs */
1500 IO(Decode16, 0x0E00, 0x0E00, 1, 0x80) /* SIO runtime regs */
Jens Rottmann73d49652013-02-28 09:56:20 +01001501 IO(Decode16, 0x0CF8, 0x0CF8, 1, 8)
1502
1503 WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1504 0x0000, /* address granularity */
1505 0x0000, /* range minimum */
1506 0x0CF7, /* range maximum */
1507 0x0000, /* translation */
1508 0x0CF8 /* length */
1509 )
1510
1511 WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1512 0x0000, /* address granularity */
1513 0x0D00, /* range minimum */
1514 0xFFFF, /* range maximum */
1515 0x0000, /* translation */
1516 0xF300 /* length */
1517 )
1518
1519 Memory32Fixed(READONLY, 0x000A0000, 0x00020000, VGAM) /* VGA memory space */
1520#if 0
1521 Memory32Fixed(READONLY, 0x000C0000, 0x00020000, EMM1) /* Assume C0000-E0000 empty */
1522 Memory32Fixed(READONLY, 0x000E0000, 0x00020000, RDBS) /* BIOS ROM area */
1523
1524 /* DRAM Memory from 1MB to TopMem */
1525 Memory32Fixed(READWRITE, 0x00100000, 0, DMLO) /* 1MB to TopMem */
1526
1527 /* BIOS space just below 4GB */
1528 DWORDMemory(
1529 ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1530 0x00, /* Granularity */
1531 0x00000000, /* Min */
1532 0x00000000, /* Max */
1533 0x00000000, /* Translation */
1534 0x00000001, /* Max-Min, RLEN */
1535 ,,
1536 PCBM
1537 )
1538
1539 /* DRAM memory from 4GB to TopMem2 */
1540 QWORDMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1541 0x00000000, /* Granularity */
1542 0x00000000, /* Min */
1543 0x00000000, /* Max */
1544 0x00000000, /* Translation */
1545 0x00000001, /* Max-Min, RLEN */
1546 ,,
1547 DMHI
1548 )
1549
1550 /* BIOS space just below 16EB */
1551 QWORDMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1552 0x00000000, /* Granularity */
1553 0x00000000, /* Min */
1554 0x00000000, /* Max */
1555 0x00000000, /* Translation */
1556 0x00000001, /* Max-Min, RLEN */
1557 ,,
1558 PEBM
1559 )
1560#endif
1561 /* memory space for PCI BARs below 4GB */
1562 Memory32Fixed(ReadOnly, 0x00000000, 0x00000000, MMIO)
1563 }) /* End Name(_SB.PCI0.CRES) */
1564
1565 Method(_CRS, 0) {
1566 /* DBGO("\\_SB\\PCI0\\_CRS\n") */
1567#if 0
1568 CreateDWordField(CRES, ^EMM1._BAS, EM1B)
1569 CreateDWordField(CRES, ^EMM1._LEN, EM1L)
1570 CreateDWordField(CRES, ^DMLO._BAS, DMLB)
1571 CreateDWordField(CRES, ^DMLO._LEN, DMLL)
1572 CreateDWordField(CRES, ^PCBM._MIN, PBMB)
1573 CreateDWordField(CRES, ^PCBM._LEN, PBML)
1574
1575 CreateQWordField(CRES, ^DMHI._MIN, DMHB)
1576 CreateQWordField(CRES, ^DMHI._LEN, DMHL)
1577 CreateQWordField(CRES, ^PEBM._MIN, EBMB)
1578 CreateQWordField(CRES, ^PEBM._LEN, EBML)
1579
1580 If(LGreater(LOMH, 0xC0000)){
1581 Store(0xC0000, EM1B) /* Hole above C0000 and below E0000 */
1582 Subtract(LOMH, 0xC0000, EM1L) /* subtract start, assumes allocation from C0000 going up */
1583 }
1584
1585 /* Set size of memory from 1MB to TopMem */
1586 Subtract(TOM1, 0x100000, DMLL)
1587
1588 /*
1589 * If(LNotEqual(TOM2, 0x00000000)){
1590 * Store(0x100000000,DMHB) DRAM from 4GB to TopMem2
1591 * Subtract(TOM2, 0x100000000, DMHL)
1592 * }
1593 */
1594
1595 /* If there is no memory above 4GB, put the BIOS just below 4GB */
1596 If(LEqual(TOM2, 0x00000000)){
1597 Store(PBAD,PBMB) /* Reserve the "BIOS" space */
1598 Store(PBLN,PBML)
1599 }
1600 Else { /* Otherwise, put the BIOS just below 16EB */
1601 ShiftLeft(PBAD,16,EBMB) /* Reserve the "BIOS" space */
1602 Store(PBLN,EBML)
1603 }
1604#endif
1605 CreateDWordField(CRES, ^MMIO._BAS, MM1B)
1606 CreateDWordField(CRES, ^MMIO._LEN, MM1L)
1607 /*
1608 * Declare memory between TOM1 and 4GB as available
1609 * for PCI MMIO.
1610 * Use ShiftLeft to avoid 64bit constant (for XP).
1611 * This will work even if the OS does 32bit arithmetic, as
1612 * 32bit (0x00000000 - TOM1) will wrap and give the same
1613 * result as 64bit (0x100000000 - TOM1).
1614 */
1615 Store(TOM1, MM1B)
1616 ShiftLeft(0x10000000, 4, Local0)
1617 Subtract(Local0, TOM1, Local0)
1618 Store(Local0, MM1L)
1619
1620 Return(CRES) /* note to change the Name buffer */
1621 } /* end of Method(_SB.PCI0._CRS) */
1622
1623 /*
1624 *
1625 * FIRST METHOD CALLED UPON BOOT
1626 *
1627 * 1. If debugging, print current OS and ACPI interpreter.
1628 * 2. Get PCI Interrupt routing from ACPI VSM, this
1629 * value is based on user choice in BIOS setup.
1630 */
1631 Method(_INI, 0) {
1632 /* DBGO("\\_SB\\_INI\n") */
1633 /* DBGO(" DSDT.ASL code from ") */
1634 /* DBGO(__DATE__) */
1635 /* DBGO(" ") */
1636 /* DBGO(__TIME__) */
1637 /* DBGO("\n Sleep states supported: ") */
1638 /* DBGO("\n") */
1639 /* DBGO(" \\_OS=") */
1640 /* DBGO(\_OS) */
1641 /* DBGO("\n \\_REV=") */
1642 /* DBGO(\_REV) */
1643 /* DBGO("\n") */
1644
1645 /* Determine the OS we're running on */
Edward O'Callaghanf7d8f092014-05-31 13:57:52 +10001646 OSFL()
Jens Rottmann73d49652013-02-28 09:56:20 +01001647
1648 /* On older chips, clear PciExpWakeDisEn */
1649 /*if (LLessEqual(\SBRI, 0x13)) {
1650 * Store(0,\PWDE)
1651 * }
1652 */
1653 } /* End Method(_SB._INI) */
1654 } /* End Device(PCI0) */
1655
1656 Device(PWRB) { /* Start Power button device */
1657 Name(_HID, EISAID("PNP0C0C"))
1658 Name(_UID, 0xAA)
1659 Name(_PRW, Package () {3, 0x04}) /* wake from S1-S4 */
1660 Name(_STA, 0x0B) /* sata is invisible */
1661 }
1662 } /* End \_SB scope */
1663
1664 Scope(\_SI) {
1665 Method(_SST, 1) {
1666 /* DBGO("\\_SI\\_SST\n") */
1667 /* DBGO(" New Indicator state: ") */
1668 /* DBGO(Arg0) */
1669 /* DBGO("\n") */
1670 }
1671 } /* End Scope SI */
Jens Rottmann73d49652013-02-28 09:56:20 +01001672}
1673/* End of ASL file */