2 * This file is part of the coreboot project.
4 * Copyright (C) 2011 - 2012 Advanced Micro Devices, Inc.
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.
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.
16 /* DefinitionBlock Statement */
18 "DSDT.AML", /* Output filename */
19 "DSDT", /* Signature */
20 0x02, /* DSDT Revision, needs to be 2 for 64bit */
22 "COREBOOT", /* TABLE ID */
23 0x00010001 /* OEM Revision */
25 { /* Start of ASL file */
26 /* #include <arch/x86/acpi/debug.asl> */ /* Include global debug methods if needed */
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 */
35 Name(PCBA, CONFIG_MMCONF_BASE_ADDRESS) /* Base address of PCIe config space */
36 Name(PCLN, Multiply(0x100000, CONFIG_MMCONF_BUS_NUMBER)) /* Length of PCIe config space, 1MB each bus */
38 Name(HPBA, 0xFED00000) /* Base address of HPET table */
39 Name(SSFG, 0x0D) /* S1 support: bit 0, S2 Support: bit 1, etc. S0 & S5 assumed */
41 /* USB overcurrent mapping pins. */
53 /* Some global data */
54 Name(OSVR, 3) /* Assume nothing. WinXp = 1, Vista = 2, Linux = 3, WinCE = 4 */
55 Name(OSV, Ones) /* Assume nothing */
56 Name(PMOD, One) /* Assume APIC */
62 Scope (\_PR) { /* define processor scope */
64 C000, /* name space name */
65 0x00, /* Unique number for this processor */
66 0x810, /* PBLK system I/O address !hardcoded! */
67 0x06 /* PBLKLEN for boot processor */
69 //#include "acpi/cpstate.asl"
71 Processor(C001, 0x01, 0x00000000, 0x00) {}
72 Processor(C002, 0x02, 0x00000000, 0x00) {}
73 Processor(C003, 0x03, 0x00000000, 0x00) {}
74 Processor(C004, 0x04, 0x00000000, 0x00) {}
75 Processor(C005, 0x05, 0x00000000, 0x00) {}
76 Processor(C006, 0x06, 0x00000000, 0x00) {}
77 Processor(C007, 0x07, 0x00000000, 0x00) {}
78 Processor(C008, 0x08, 0x00000000, 0x00) {}
79 Processor(C009, 0x09, 0x00000000, 0x00) {}
80 Processor(C00A, 0x0A, 0x00000000, 0x00) {}
81 Processor(C00B, 0x0B, 0x00000000, 0x00) {}
82 Processor(C00C, 0x0C, 0x00000000, 0x00) {}
83 Processor(C00D, 0x0D, 0x00000000, 0x00) {}
84 Processor(C00E, 0x0E, 0x00000000, 0x00) {}
85 Processor(C00F, 0x0F, 0x00000000, 0x00) {}
86 Processor(C010, 0x10, 0x00000000, 0x00) {}
87 Processor(C011, 0x11, 0x00000000, 0x00) {}
88 Processor(C012, 0x12, 0x00000000, 0x00) {}
89 Processor(C013, 0x13, 0x00000000, 0x00) {}
90 Processor(C014, 0x14, 0x00000000, 0x00) {}
91 Processor(C015, 0x15, 0x00000000, 0x00) {}
92 Processor(C016, 0x16, 0x00000000, 0x00) {}
93 Processor(C017, 0x17, 0x00000000, 0x00) {}
94 Processor(C018, 0x18, 0x00000000, 0x00) {}
95 Processor(C019, 0x19, 0x00000000, 0x00) {}
96 Processor(C01A, 0x1A, 0x00000000, 0x00) {}
97 Processor(C01B, 0x1B, 0x00000000, 0x00) {}
98 Processor(C01C, 0x1C, 0x00000000, 0x00) {}
99 Processor(C01D, 0x1D, 0x00000000, 0x00) {}
100 Processor(C01E, 0x1E, 0x00000000, 0x00) {}
101 Processor(C01F, 0x1F, 0x00000000, 0x00) {}
102 Processor(C020, 0x20, 0x00000000, 0x00) {}
103 Processor(C021, 0x21, 0x00000000, 0x00) {}
104 Processor(C022, 0x22, 0x00000000, 0x00) {}
105 Processor(C023, 0x23, 0x00000000, 0x00) {}
106 Processor(C024, 0x24, 0x00000000, 0x00) {}
107 Processor(C025, 0x25, 0x00000000, 0x00) {}
108 Processor(C026, 0x26, 0x00000000, 0x00) {}
109 Processor(C027, 0x27, 0x00000000, 0x00) {}
110 Processor(C028, 0x28, 0x00000000, 0x00) {}
111 Processor(C029, 0x29, 0x00000000, 0x00) {}
112 Processor(C02A, 0x2A, 0x00000000, 0x00) {}
113 Processor(C02B, 0x2B, 0x00000000, 0x00) {}
114 Processor(C02C, 0x2C, 0x00000000, 0x00) {}
115 Processor(C02D, 0x2D, 0x00000000, 0x00) {}
116 Processor(C02E, 0x2E, 0x00000000, 0x00) {}
117 Processor(C02F, 0x2F, 0x00000000, 0x00) {}
127 } /* End _PR scope */
129 /* PIC IRQ mapping registers, C00h-C01h */
130 OperationRegion(PRQM, SystemIO, 0x00000C00, 0x00000002)
131 Field(PRQM, ByteAcc, NoLock, Preserve) {
133 PRQD, 0x00000008, /* Offset: 1h */
135 IndexField(PRQI, PRQD, ByteAcc, NoLock, Preserve) {
136 PINA, 0x00000008, /* Index 0 */
137 PINB, 0x00000008, /* Index 1 */
138 PINC, 0x00000008, /* Index 2 */
139 PIND, 0x00000008, /* Index 3 */
140 AINT, 0x00000008, /* Index 4 */
141 SINT, 0x00000008, /* Index 5 */
142 , 0x00000008, /* Index 6 */
143 AAUD, 0x00000008, /* Index 7 */
144 AMOD, 0x00000008, /* Index 8 */
145 PINE, 0x00000008, /* Index 9 */
146 PINF, 0x00000008, /* Index A */
147 PING, 0x00000008, /* Index B */
148 PINH, 0x00000008, /* Index C */
151 /* PCI Error control register */
152 OperationRegion(PERC, SystemIO, 0x00000C14, 0x00000001)
153 Field(PERC, ByteAcc, NoLock, Preserve) {
160 /* Client Management index/data registers */
161 OperationRegion(CMT, SystemIO, 0x00000C50, 0x00000002)
162 Field(CMT, ByteAcc, NoLock, Preserve) {
164 /* Client Management Data register */
172 /* GPM Port register */
173 OperationRegion(GPT, SystemIO, 0x00000C52, 0x00000001)
174 Field(GPT, ByteAcc, NoLock, Preserve) {
185 /* Flash ROM program enable register */
186 OperationRegion(FRE, SystemIO, 0x00000C6F, 0x00000001)
187 Field(FRE, ByteAcc, NoLock, Preserve) {
192 /* PM2 index/data registers */
193 OperationRegion(PM2R, SystemIO, 0x00000CD0, 0x00000002)
194 Field(PM2R, ByteAcc, NoLock, Preserve) {
199 /* Power Management I/O registers */
200 OperationRegion(PIOR, SystemIO, 0x00000CD6, 0x00000002)
201 Field(PIOR, ByteAcc, NoLock, Preserve) {
205 IndexField (PIOI, PIOD, ByteAcc, NoLock, Preserve) {
206 Offset(0x00), /* MiscControl */
210 Offset(0x01), /* MiscStatus */
214 Offset(0x04), /* SmiWakeUpEventEnable3 */
217 Offset(0x07), /* SmiWakeUpEventStatus3 */
220 Offset(0x10), /* AcpiEnable */
223 Offset(0x1C), /* ProgramIoEnable */
230 Offset(0x1D), /* IOMonitorStatus */
237 Offset(0x20), /* AcpiPmEvtBlk */
239 Offset(0x36), /* GEvtLevelConfig */
243 Offset(0x37), /* GPMLevelConfig0 */
250 Offset(0x38), /* GPMLevelConfig1 */
257 Offset(0x3B), /* PMEStatus1 */
266 Offset(0x55), /* SoftPciRst */
274 /* Offset(0x61), */ /* Options_1 */
278 Offset(0x65), /* UsbPMControl */
281 Offset(0x68), /* MiscEnable68 */
285 Offset(0x92), /* GEVENTIN */
288 Offset(0x96), /* GPM98IN */
291 Offset(0x9A), /* EnhanceControl */
294 Offset(0xA8), /* PIO7654Enable */
299 Offset(0xA9), /* PIO7654Status */
307 * First word is PM1_Status, Second word is PM1_Enable
309 OperationRegion(P1EB, SystemIO, APEB, 0x04)
310 Field(P1EB, ByteAcc, NoLock, Preserve) {
334 OperationRegion (GRAM, SystemMemory, 0x0400, 0x0100)
335 Field (GRAM, ByteAcc, Lock, Preserve)
342 /* PCIe Configuration Space for CONFIG_MMCONF_BUS_NUMBER busses */
343 OperationRegion(PCFG, SystemMemory, PCBA, PCLN)
344 Field(PCFG, ByteAcc, NoLock, Preserve) {
345 /* Byte offsets are computed using the following technique:
346 * ((bus number + 1) * ((device number * 8) * 4096)) + register offset
347 * The 8 comes from 8 functions per device, and 4096 bytes per function config space
349 Offset(0x00088024), /* Byte offset to SATA register 24h - Bus 0, Device 17, Function 0 */
351 Offset(0x00098042), /* Byte offset to OHCI0 register 42h - Bus 0, Device 19, Function 0 */
362 Offset(0x000A0004), /* Byte offset to SMBUS register 4h - Bus 0, Device 20, Function 0 */
365 Offset(0x000A0008), /* Byte offset to SMBUS register 8h - Bus 0, Device 20, Function 0 */
367 Offset(0x000A0014), /* Byte offset to SMBUS register 14h - Bus 0, Device 20, Function 0 */
369 Offset(0x000A0078), /* Byte offset to SMBUS register 78h - Bus 0, Device 20, Function 0 */
371 P92E, 1, /* Port92 decode enable */
374 OperationRegion(SB5, SystemMemory, STB5, 0x1000)
375 Field(SB5, AnyAcc, NoLock, Preserve){
377 Offset(0x120), /* Port 0 Task file status */
383 Offset(0x128), /* Port 0 Serial ATA status */
387 Offset(0x12C), /* Port 0 Serial ATA control */
389 Offset(0x130), /* Port 0 Serial ATA error */
394 offset(0x1A0), /* Port 1 Task file status */
400 Offset(0x1A8), /* Port 1 Serial ATA status */
404 Offset(0x1AC), /* Port 1 Serial ATA control */
406 Offset(0x1B0), /* Port 1 Serial ATA error */
411 Offset(0x220), /* Port 2 Task file status */
417 Offset(0x228), /* Port 2 Serial ATA status */
421 Offset(0x22C), /* Port 2 Serial ATA control */
423 Offset(0x230), /* Port 2 Serial ATA error */
428 Offset(0x2A0), /* Port 3 Task file status */
434 Offset(0x2A8), /* Port 3 Serial ATA status */
438 Offset(0x2AC), /* Port 3 Serial ATA control */
440 Offset(0x2B0), /* Port 3 Serial ATA error */
446 #include "acpi/routing.asl"
450 if(LNotEqual(OSVR, Ones)) {Return(OSVR)} /* OS version was already detected */
451 if(CondRefOf(\_OSI,Local1))
453 Store(1, OSVR) /* Assume some form of XP */
454 if (\_OSI("Windows 2006")) /* Vista */
459 If(WCMP(\_OS,"Linux")) {
460 Store(3, OSVR) /* Linux */
462 Store(4, OSVR) /* Gotta be WinCE */
468 Method(_PIC, 0x01, NotSerialized)
476 Method(CIRQ, 0x00, NotSerialized){
487 Name(IRQB, ResourceTemplate(){
488 IRQ(Level,ActiveLow,Shared){15}
491 Name(IRQP, ResourceTemplate(){
492 IRQ(Level,ActiveLow,Exclusive){3, 4, 5, 7, 10, 11, 12, 15}
495 Name(PITF, ResourceTemplate(){
496 IRQ(Level,ActiveLow,Exclusive){9}
500 Name(_HID, EISAID("PNP0C0F"))
505 Return(0x0B) /* sata is invisible */
507 Return(0x09) /* sata is disabled */
509 } /* End Method(_SB.INTA._STA) */
512 /* DBGO("\\_SB\\LNKA\\_DIS\n") */
514 } /* End Method(_SB.INTA._DIS) */
517 /* DBGO("\\_SB\\LNKA\\_PRS\n") */
519 } /* Method(_SB.INTA._PRS) */
522 /* DBGO("\\_SB\\LNKA\\_CRS\n") */
523 CreateWordField(IRQB, 0x1, IRQN)
524 ShiftLeft(1, PINA, IRQN)
526 } /* Method(_SB.INTA._CRS) */
529 /* DBGO("\\_SB\\LNKA\\_CRS\n") */
530 CreateWordField(ARG0, 1, IRQM)
532 /* Use lowest available IRQ */
533 FindSetRightBit(IRQM, Local0)
538 } /* End Method(_SB.INTA._SRS) */
539 } /* End Device(INTA) */
542 Name(_HID, EISAID("PNP0C0F"))
547 Return(0x0B) /* sata is invisible */
549 Return(0x09) /* sata is disabled */
551 } /* End Method(_SB.INTB._STA) */
554 /* DBGO("\\_SB\\LNKB\\_DIS\n") */
556 } /* End Method(_SB.INTB._DIS) */
559 /* DBGO("\\_SB\\LNKB\\_PRS\n") */
561 } /* Method(_SB.INTB._PRS) */
564 /* DBGO("\\_SB\\LNKB\\_CRS\n") */
565 CreateWordField(IRQB, 0x1, IRQN)
566 ShiftLeft(1, PINB, IRQN)
568 } /* Method(_SB.INTB._CRS) */
571 /* DBGO("\\_SB\\LNKB\\_CRS\n") */
572 CreateWordField(ARG0, 1, IRQM)
574 /* Use lowest available IRQ */
575 FindSetRightBit(IRQM, Local0)
580 } /* End Method(_SB.INTB._SRS) */
581 } /* End Device(INTB) */
584 Name(_HID, EISAID("PNP0C0F"))
589 Return(0x0B) /* sata is invisible */
591 Return(0x09) /* sata is disabled */
593 } /* End Method(_SB.INTC._STA) */
596 /* DBGO("\\_SB\\LNKC\\_DIS\n") */
598 } /* End Method(_SB.INTC._DIS) */
601 /* DBGO("\\_SB\\LNKC\\_PRS\n") */
603 } /* Method(_SB.INTC._PRS) */
606 /* DBGO("\\_SB\\LNKC\\_CRS\n") */
607 CreateWordField(IRQB, 0x1, IRQN)
608 ShiftLeft(1, PINC, IRQN)
610 } /* Method(_SB.INTC._CRS) */
613 /* DBGO("\\_SB\\LNKC\\_CRS\n") */
614 CreateWordField(ARG0, 1, IRQM)
616 /* Use lowest available IRQ */
617 FindSetRightBit(IRQM, Local0)
622 } /* End Method(_SB.INTC._SRS) */
623 } /* End Device(INTC) */
626 Name(_HID, EISAID("PNP0C0F"))
631 Return(0x0B) /* sata is invisible */
633 Return(0x09) /* sata is disabled */
635 } /* End Method(_SB.INTD._STA) */
638 /* DBGO("\\_SB\\LNKD\\_DIS\n") */
640 } /* End Method(_SB.INTD._DIS) */
643 /* DBGO("\\_SB\\LNKD\\_PRS\n") */
645 } /* Method(_SB.INTD._PRS) */
648 /* DBGO("\\_SB\\LNKD\\_CRS\n") */
649 CreateWordField(IRQB, 0x1, IRQN)
650 ShiftLeft(1, PIND, IRQN)
652 } /* Method(_SB.INTD._CRS) */
655 /* DBGO("\\_SB\\LNKD\\_CRS\n") */
656 CreateWordField(ARG0, 1, IRQM)
658 /* Use lowest available IRQ */
659 FindSetRightBit(IRQM, Local0)
664 } /* End Method(_SB.INTD._SRS) */
665 } /* End Device(INTD) */
668 Name(_HID, EISAID("PNP0C0F"))
673 Return(0x0B) /* sata is invisible */
675 Return(0x09) /* sata is disabled */
677 } /* End Method(_SB.INTE._STA) */
680 /* DBGO("\\_SB\\LNKE\\_DIS\n") */
682 } /* End Method(_SB.INTE._DIS) */
685 /* DBGO("\\_SB\\LNKE\\_PRS\n") */
687 } /* Method(_SB.INTE._PRS) */
690 /* DBGO("\\_SB\\LNKE\\_CRS\n") */
691 CreateWordField(IRQB, 0x1, IRQN)
692 ShiftLeft(1, PINE, IRQN)
694 } /* Method(_SB.INTE._CRS) */
697 /* DBGO("\\_SB\\LNKE\\_CRS\n") */
698 CreateWordField(ARG0, 1, IRQM)
700 /* Use lowest available IRQ */
701 FindSetRightBit(IRQM, Local0)
706 } /* End Method(_SB.INTE._SRS) */
707 } /* End Device(INTE) */
710 Name(_HID, EISAID("PNP0C0F"))
715 Return(0x0B) /* sata is invisible */
717 Return(0x09) /* sata is disabled */
719 } /* End Method(_SB.INTF._STA) */
722 /* DBGO("\\_SB\\LNKF\\_DIS\n") */
724 } /* End Method(_SB.INTF._DIS) */
727 /* DBGO("\\_SB\\LNKF\\_PRS\n") */
729 } /* Method(_SB.INTF._PRS) */
732 /* DBGO("\\_SB\\LNKF\\_CRS\n") */
733 CreateWordField(IRQB, 0x1, IRQN)
734 ShiftLeft(1, PINF, IRQN)
736 } /* Method(_SB.INTF._CRS) */
739 /* DBGO("\\_SB\\LNKF\\_CRS\n") */
740 CreateWordField(ARG0, 1, IRQM)
742 /* Use lowest available IRQ */
743 FindSetRightBit(IRQM, Local0)
748 } /* End Method(_SB.INTF._SRS) */
749 } /* End Device(INTF) */
752 Name(_HID, EISAID("PNP0C0F"))
757 Return(0x0B) /* sata is invisible */
759 Return(0x09) /* sata is disabled */
761 } /* End Method(_SB.INTG._STA) */
764 /* DBGO("\\_SB\\LNKG\\_DIS\n") */
766 } /* End Method(_SB.INTG._DIS) */
769 /* DBGO("\\_SB\\LNKG\\_PRS\n") */
771 } /* Method(_SB.INTG._CRS) */
774 /* DBGO("\\_SB\\LNKG\\_CRS\n") */
775 CreateWordField(IRQB, 0x1, IRQN)
776 ShiftLeft(1, PING, IRQN)
778 } /* Method(_SB.INTG._CRS) */
781 /* DBGO("\\_SB\\LNKG\\_CRS\n") */
782 CreateWordField(ARG0, 1, IRQM)
784 /* Use lowest available IRQ */
785 FindSetRightBit(IRQM, Local0)
790 } /* End Method(_SB.INTG._SRS) */
791 } /* End Device(INTG) */
794 Name(_HID, EISAID("PNP0C0F"))
799 Return(0x0B) /* sata is invisible */
801 Return(0x09) /* sata is disabled */
803 } /* End Method(_SB.INTH._STA) */
806 /* DBGO("\\_SB\\LNKH\\_DIS\n") */
808 } /* End Method(_SB.INTH._DIS) */
811 /* DBGO("\\_SB\\LNKH\\_PRS\n") */
813 } /* Method(_SB.INTH._CRS) */
816 /* DBGO("\\_SB\\LNKH\\_CRS\n") */
817 CreateWordField(IRQB, 0x1, IRQN)
818 ShiftLeft(1, PINH, IRQN)
820 } /* Method(_SB.INTH._CRS) */
823 /* DBGO("\\_SB\\LNKH\\_CRS\n") */
824 CreateWordField(ARG0, 1, IRQM)
826 /* Use lowest available IRQ */
827 FindSetRightBit(IRQM, Local0)
832 } /* End Method(_SB.INTH._SRS) */
833 } /* End Device(INTH) */
835 } /* End Scope(_SB) */
838 /* Supported sleep states: */
839 Name(\_S0, Package () {0x00, 0x00, 0x00, 0x00} ) /* (S0) - working state */
841 If (LAnd(SSFG, 0x01)) {
842 Name(\_S1, Package () {0x01, 0x01, 0x00, 0x00} ) /* (S1) - sleeping w/CPU context */
844 If (LAnd(SSFG, 0x02)) {
845 Name(\_S2, Package () {0x02, 0x02, 0x00, 0x00} ) /* (S2) - "light" Suspend to RAM */
847 If (LAnd(SSFG, 0x04)) {
848 Name(\_S3, Package () {0x03, 0x03, 0x00, 0x00} ) /* (S3) - Suspend to RAM */
850 If (LAnd(SSFG, 0x08)) {
851 Name(\_S4, Package () {0x04, 0x04, 0x00, 0x00} ) /* (S4) - Suspend to Disk */
854 Name(\_S5, Package () {0x05, 0x05, 0x00, 0x00} ) /* (S5) - Soft Off */
856 Name(\_SB.CSPS ,0) /* Current Sleep State (S0, S1, S2, S3, S4, S5) */
857 Name(CSMS, 0) /* Current System State */
859 /* Wake status package */
860 Name(WKST,Package(){Zero, Zero})
863 * \_PTS - Prepare to Sleep method
866 * Arg0=The value of the sleeping state S1=1, S2=2, etc
871 * The _PTS control method is executed at the beginning of the sleep process
872 * for S1-S5. The sleeping value is passed to the _PTS control method. This
873 * control method may be executed a relatively long time before entering the
874 * sleep state and the OS may abort the operation without notification to
875 * the ACPI driver. This method cannot modify the configuration or power
876 * state of any device in the system.
879 /* DBGO("\\_PTS\n") */
880 /* DBGO("From S0 to S") */
884 /* Don't allow PCIRST# to reset USB */
889 /* Clear sleep SMI status flag and enable sleep SMI trap. */
893 /* On older chips, clear PciExpWakeDisEn */
894 /*if (LLessEqual(\_SB.SBRI, 0x13)) {
899 /* Clear wake status structure. */
900 Store(0, Index(WKST,0))
901 Store(0, Index(WKST,1))
902 \_SB.PCI0.SIOS (Arg0)
903 } /* End Method(\_PTS) */
906 * The following method results in a "not a valid reserved NameSeg"
907 * warning so I have commented it out for the duration. It isn't
908 * used, so it could be removed.
911 * \_GTS OEM Going To Sleep method
914 * Arg0=The value of the sleeping state S1=1, S2=2
921 * DBGO("From S0 to S")
928 * \_BFS OEM Back From Sleep method
931 * Arg0=The value of the sleeping state S1=1, S2=2
937 /* DBGO("\\_BFS\n") */
940 /* DBGO(" to S0\n") */
944 * \_WAK System Wake method
947 * Arg0=The value of the sleeping state S1=1, S2=2
950 * Return package of 2 DWords
952 * 0x00000000 wake succeeded
953 * 0x00000001 Wake was signaled but failed due to lack of power
954 * 0x00000002 Wake was signaled but failed due to thermal condition
955 * Dword 2 - Power Supply state
956 * if non-zero the effective S-state the power supply entered
959 /* DBGO("\\_WAK\n") */
962 /* DBGO(" to S0\n") */
967 /* Restore PCIRST# so it resets USB */
972 /* Arbitrarily clear PciExpWakeStatus */
975 /* if(DeRefOf(Index(WKST,0))) {
976 * Store(0, Index(WKST,1))
978 * Store(Arg0, Index(WKST,1))
981 \_SB.PCI0.SIOW (Arg0)
983 } /* End Method(\_WAK) */
985 Scope(\_GPE) { /* Start Scope GPE */
986 /* General event 0 */
988 //DBGO("\\_GPE\\_L00\n")
991 /* General event 1 */
993 //DBGO("\\_GPE\\_L01\n")
996 /* General event 2 */
998 //DBGO("\\_GPE\\_L02\n")
1001 /* General event 3 */
1003 //DBGO("\\_GPE\\_L00\n")
1004 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1007 /* General event 4 */
1009 //DBGO("\\_GPE\\_L04\n")
1012 /* General event 5 */
1014 //DBGO("\\_GPE\\_L05\n")
1017 /* _L06 General event 6 - Used for GPM6, moved to USB.asl */
1018 /* _L07 General event 7 - Used for GPM7, moved to USB.asl */
1020 /* Legacy PM event */
1022 //DBGO("\\_GPE\\_L08\n")
1025 /* Temp warning (TWarn) event */
1027 //DBGO("\\_GPE\\_L09\n")
1028 Notify (\_TZ.TZ00, 0x80)
1033 //DBGO("\\_GPE\\_L0A\n")
1036 /* USB controller PME# */
1038 //DBGO("\\_GPE\\_L0B\n")
1039 Notify(\_SB.PCI0.UOH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1040 Notify(\_SB.PCI0.UOH2, 0x02) /* NOTIFY_DEVICE_WAKE */
1041 Notify(\_SB.PCI0.UOH3, 0x02) /* NOTIFY_DEVICE_WAKE */
1042 Notify(\_SB.PCI0.UOH4, 0x02) /* NOTIFY_DEVICE_WAKE */
1043 Notify(\_SB.PCI0.UOH5, 0x02) /* NOTIFY_DEVICE_WAKE */
1044 Notify(\_SB.PCI0.UEH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1045 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1048 /* AC97 controller PME# */
1050 //DBGO("\\_GPE\\_L0C\n")
1053 /* OtherTherm PME# */
1055 //DBGO("\\_GPE\\_L0D\n")
1058 /* _L0E GPM9 SCI event - Moved to USB.asl */
1060 /* PCIe HotPlug event */
1062 //DBGO("\\_GPE\\_L0F\n")
1065 /* ExtEvent0 SCI event */
1067 //DBGO("\\_GPE\\_L10\n")
1071 /* ExtEvent1 SCI event */
1073 //DBGO("\\_GPE\\_L11\n")
1076 /* PCIe PME# event */
1078 //DBGO("\\_GPE\\_L12\n")
1081 /* _L13 GPM0 SCI event - Moved to USB.asl */
1082 /* _L14 GPM1 SCI event - Moved to USB.asl */
1083 /* _L15 GPM2 SCI event - Moved to USB.asl */
1084 /* _L16 GPM3 SCI event - Moved to USB.asl */
1085 /* _L17 GPM8 SCI event - Moved to USB.asl */
1087 /* GPIO0 or GEvent8 event */
1089 //DBGO("\\_GPE\\_L18\n")
1090 Notify(\_SB.PCI0.PBR2, 0x02) /* NOTIFY_DEVICE_WAKE */
1091 Notify(\_SB.PCI0.PBR4, 0x02) /* NOTIFY_DEVICE_WAKE */
1092 Notify(\_SB.PCI0.PBRb, 0x02) /* NOTIFY_DEVICE_WAKE */
1093 Notify(\_SB.PCI0.PBRc, 0x02) /* NOTIFY_DEVICE_WAKE */
1094 Notify(\_SB.PCI0.PBRd, 0x02) /* NOTIFY_DEVICE_WAKE */
1095 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1098 /* _L19 GPM4 SCI event - Moved to USB.asl */
1099 /* _L1A GPM5 SCI event - Moved to USB.asl */
1101 /* Azalia SCI event */
1103 //DBGO("\\_GPE\\_L1B\n")
1104 Notify(\_SB.PCI0.AZHD, 0x02) /* NOTIFY_DEVICE_WAKE */
1105 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1108 /* GPM6 SCI event - Reassigned to _L06 */
1110 //DBGO("\\_GPE\\_L1C\n")
1113 /* GPM7 SCI event - Reassigned to _L07 */
1115 //DBGO("\\_GPE\\_L1D\n")
1118 /* GPIO2 or GPIO66 SCI event */
1120 //DBGO("\\_GPE\\_L1E\n")
1123 /* _L1F SATA SCI event - Moved to sata.asl */
1125 } /* End Scope GPE */
1127 #include "acpi/usb.asl"
1130 Scope(\_SB) { /* Start \_SB scope */
1131 #include <arch/x86/acpi/globutil.asl> /* global utility methods expected within the \_SB scope */
1134 /* Note: Only need HID on Primary Bus */
1136 External (TOM1) //assigned when update_ssdt()
1137 External (TOM2) /* (<real tom2> >> 20) to make it fit into 32 bit for XP */
1139 Name(_HID, EISAID("PNP0A03"))
1140 Name(_ADR, 0x00180000) /* Dev# = BSP Dev#, Func# = 0 */
1141 Method(_BBN, 0) { /* Bus number = 0 */
1145 /* DBGO("\\_SB\\PCI0\\_STA\n") */
1146 Return(0x0B) /* Status is visible */
1150 If(PMOD){ Return(APR0) } /* APIC mode */
1151 Return (PR0) /* PIC Mode */
1154 /* Describe the Northbridge devices */
1156 Name(_ADR, 0x00000000)
1159 /* The external GFX bridge */
1161 Name(_ADR, 0x00020000)
1162 Name(_PRW, Package() {0x18, 4})
1164 If(PMOD){ Return(APS2) } /* APIC mode */
1165 Return (PS2) /* PIC Mode */
1169 /* Dev3 is also an external GFX bridge */
1172 Name(_ADR, 0x00040000)
1173 Name(_PRW, Package() {0x18, 4})
1175 If(PMOD){ Return(APS4) } /* APIC mode */
1176 Return (PS4) /* PIC Mode */
1181 Name(_ADR, 0x000b0000)
1182 Name(_PRW, Package() {0x18, 4})
1184 If(PMOD){ Return(APSb) } /* APIC mode */
1185 Return (PSb) /* PIC Mode */
1190 Name(_ADR, 0x000c0000)
1191 Name(_PRW, Package() {0x18, 4})
1193 If(PMOD){ Return(APSc) } /* APIC mode */
1194 Return (PSc) /* PIC Mode */
1199 Name(_ADR, 0x000d0000)
1200 Name(_PRW, Package() {0x18, 4})
1202 If(PMOD){ Return(APSd) } /* APIC mode */
1203 Return (PSd) /* PIC Mode */
1207 /* PCI slot 1, 2, 3 */
1209 Name(_ADR, 0x00140004)
1210 Name(_PRW, Package() {0x18, 4})
1217 /* Describe the Southbridge devices */
1219 Name(_ADR, 0x00110000)
1220 #include "acpi/sata.asl"
1224 Name(_ADR, 0x00130000)
1225 Name(_PRW, Package() {0x0B, 3})
1229 Name(_ADR, 0x00130001)
1230 Name(_PRW, Package() {0x0B, 3})
1234 Name(_ADR, 0x00130002)
1235 Name(_PRW, Package() {0x0B, 3})
1239 Name(_ADR, 0x00130003)
1240 Name(_PRW, Package() {0x0B, 3})
1244 Name(_ADR, 0x00130004)
1245 Name(_PRW, Package() {0x0B, 3})
1249 Name(_ADR, 0x00130005)
1250 Name(_PRW, Package() {0x0B, 3})
1254 Name(_ADR, 0x00140000)
1257 /* Primary (and only) IDE channel */
1259 Name(_ADR, 0x00140001)
1260 #include "acpi/ide.asl"
1264 Name(_ADR, 0x00140002)
1265 OperationRegion(AZPD, PCI_Config, 0x00, 0x100)
1266 Field(AZPD, AnyAcc, NoLock, Preserve) {
1290 If(LEqual(OSVR,3)){ /* If we are running Linux */
1299 Name(_ADR, 0x00140003)
1301 * DBGO("\\_SB\\PCI0\\LpcIsaBr\\_INI\n")
1302 } */ /* End Method(_SB.SBRDG._INI) */
1304 /* Real Time Clock Device */
1306 Name(_HID, EISAID("PNP0B00")) /* AT Real Time Clock (not PIIX4 compatible) */
1307 Name(_CRS, ResourceTemplate() {
1309 IO(Decode16,0x0070, 0x0070, 0, 2)
1310 /* IO(Decode16,0x0070, 0x0070, 0, 4) */
1312 } /* End Device(_SB.PCI0.LpcIsaBr.RTC0) */
1314 Device(TMR) { /* Timer */
1315 Name(_HID,EISAID("PNP0100")) /* System Timer */
1316 Name(_CRS, ResourceTemplate() {
1318 IO(Decode16, 0x0040, 0x0040, 0, 4)
1319 /* IO(Decode16, 0x0048, 0x0048, 0, 4) */
1321 } /* End Device(_SB.PCI0.LpcIsaBr.TMR) */
1323 Device(SPKR) { /* Speaker */
1324 Name(_HID,EISAID("PNP0800")) /* AT style speaker */
1325 Name(_CRS, ResourceTemplate() {
1326 IO(Decode16, 0x0061, 0x0061, 0, 1)
1328 } /* End Device(_SB.PCI0.LpcIsaBr.SPKR) */
1331 Name(_HID,EISAID("PNP0000")) /* AT Interrupt Controller */
1332 Name(_CRS, ResourceTemplate() {
1334 IO(Decode16,0x0020, 0x0020, 0, 2)
1335 IO(Decode16,0x00A0, 0x00A0, 0, 2)
1336 /* IO(Decode16, 0x00D0, 0x00D0, 0x10, 0x02) */
1337 /* IO(Decode16, 0x04D0, 0x04D0, 0x10, 0x02) */
1339 } /* End Device(_SB.PCI0.LpcIsaBr.PIC) */
1341 Device(MAD) { /* 8257 DMA */
1342 Name(_HID,EISAID("PNP0200")) /* Hardware Device ID */
1343 Name(_CRS, ResourceTemplate() {
1344 DMA(Compatibility,BusMaster,Transfer8){4}
1345 IO(Decode16, 0x0000, 0x0000, 0x10, 0x10)
1346 IO(Decode16, 0x0081, 0x0081, 0x01, 0x03)
1347 IO(Decode16, 0x0087, 0x0087, 0x01, 0x01)
1348 IO(Decode16, 0x0089, 0x0089, 0x01, 0x03)
1349 IO(Decode16, 0x008F, 0x008F, 0x01, 0x01)
1350 IO(Decode16, 0x00C0, 0x00C0, 0x10, 0x20)
1351 }) /* End Name(_SB.PCI0.LpcIsaBr.MAD._CRS) */
1352 } /* End Device(_SB.PCI0.LpcIsaBr.MAD) */
1355 Name(_HID,EISAID("PNP0C04")) /* Math Coprocessor */
1356 Name(_CRS, ResourceTemplate() {
1357 IO(Decode16, 0x00F0, 0x00F0, 0, 0x10)
1360 } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */
1363 Name (_HID, EisaId ("PNP0F13"))
1364 Name (_CRS, ResourceTemplate () {
1365 IO (Decode16, 0x0060, 0x0060, 0x00, 0x01)
1366 IO (Decode16, 0x0064, 0x0064, 0x00, 0x01)
1369 Method (_STA, 0, NotSerialized) {
1370 And (FLG0, 0x04, Local0)
1371 If (LEqual (Local0, 0x04)) {
1380 Name (_HID, EisaId ("PNP0303"))
1381 Method (_STA, 0, NotSerialized) {
1382 And (FLG0, 0x04, Local0)
1383 If (LEqual (Local0, 0x04)) {
1389 Name (_CRS, ResourceTemplate () {
1390 IO (Decode16, 0x0060, 0x0060, 0x00, 0x01)
1391 IO (Decode16, 0x0064, 0x0064, 0x00, 0x01)
1396 #if 0 //acpi_create_hpet
1398 Name(_HID,EISAID("PNP0103"))
1399 Name(CRS, ResourceTemplate() {
1403 Memory32Fixed(ReadOnly,0xFED00000, 0x00000400, MNT) /* 1kb reserved space */
1405 Method(_STA, 0, NotSerialized) {
1406 Return(0x0F) /* sata is visible */
1408 Method(_CRS, 0, NotSerialized) {
1409 CreateDwordField(CRS, ^MNT._BAS, HPT)
1413 } /* End Device(_SB.PCI0.LIBR.HPET) */
1418 Name(_ADR, 0x00140004)
1419 } /* end HostPciBr */
1422 Name(_ADR, 0x00140005)
1423 } /* end Ac97audio */
1426 Name(_ADR, 0x00140006)
1427 } /* end Ac97modem */
1429 /* ITE8718 Support */
1430 OperationRegion (IOID, SystemIO, 0x2E, 0x02) /* sometimes it is 0x4E */
1431 Field (IOID, ByteAcc, NoLock, Preserve)
1433 SIOI, 8, SIOD, 8 /* 0x2E and 0x2F */
1436 IndexField (SIOI, SIOD, ByteAcc, NoLock, Preserve)
1439 LDN, 8, /* Logical Device Number */
1441 CID1, 8, /* Chip ID Byte 1, 0x87 */
1442 CID2, 8, /* Chip ID Byte 2, 0x12 */
1444 ACTR, 8, /* Function activate */
1446 APC0, 8, /* APC/PME Event Enable Register */
1447 APC1, 8, /* APC/PME Status Register */
1448 APC2, 8, /* APC/PME Control Register 1 */
1449 APC3, 8, /* Environment Controller Special Configuration Register */
1450 APC4, 8 /* APC/PME Control Register 2 */
1453 /* Enter the 8718 MB PnP Mode */
1459 Store(0x55, SIOI) /* 8718 magic number */
1461 /* Exit the 8718 MB PnP Mode */
1468 * Keyboard PME is routed to SB700 Gevent3. We can wake
1469 * up the system by pressing the key.
1473 /* We only enable KBD PME for S5. */
1474 If (LLess (Arg0, 0x05))
1477 /* DBGO("8718F\n") */
1480 Store (One, ACTR) /* Enable EC */
1484 */ /* falling edge. which mode? Not sure. */
1487 Store (0x08, APC1) /* clear PME status, Use 0x18 for mouse & KBD */
1489 Store (0x08, APC0) /* enable PME, Use 0x18 for mouse & KBD */
1498 Store (Zero, APC0) /* disable keyboard PME */
1500 Store (0xFF, APC1) /* clear keyboard PME status */
1504 Name (CRS, ResourceTemplate ()
1506 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
1507 0x0000, // Granularity
1508 0x0000, // Range Minimum
1509 0x00FF, // Range Maximum
1510 0x0000, // Translation Offset
1514 0x0CF8, // Range Minimum
1515 0x0CF8, // Range Maximum
1520 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1521 0x0000, // Granularity
1522 0x0000, // Range Minimum
1523 0x03AF, // Range Maximum
1524 0x0000, // Translation Offset
1527 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1528 0x0000, // Granularity
1529 0x03E0, // Range Minimum
1530 0x0CF7, // Range Maximum
1531 0x0000, // Translation Offset
1535 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1536 0x0000, // Granularity
1537 0x03B0, // Range Minimum
1538 0x03BB, // Range Maximum
1539 0x0000, // Translation Offset
1542 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1543 0x0000, // Granularity
1544 0x03C0, // Range Minimum
1545 0x03DF, // Range Maximum
1546 0x0000, // Translation Offset
1549 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1550 0x0000, // Granularity
1551 0x0D00, // Range Minimum
1552 0xFFFF, // Range Maximum
1553 0x0000, // Translation Offset
1556 Memory32Fixed(READONLY, 0x000A0000, 0x00020000, VGAM) // VGA memory space
1558 Memory32Fixed (ReadOnly,
1559 0xE0000000, // Address Base
1560 0x10000000, // Address Length, (1MB each Bus, 256 Buses by default)
1564 Method (_CRS, 0, NotSerialized)
1566 CreateDWordField (CRS, \_SB.PCI0.MMIO._BAS, BAS1)
1567 CreateDWordField (CRS, \_SB.PCI0.MMIO._LEN, LEN1)
1570 * Declare memory between TOM1 and 4GB as available
1572 * Use ShiftLeft to avoid 64bit constant (for XP).
1573 * This will work even if the OS does 32bit arithmetic, as
1574 * 32bit (0x00000000 - TOM1) will wrap and give the same
1575 * result as 64bit (0x100000000 - TOM1).
1578 ShiftLeft(0x10000000, 4, Local0)
1579 Subtract(Local0, TOM1, Local0)
1588 * FIRST METHOD CALLED UPON BOOT
1590 * 1. If debugging, print current OS and ACPI interpreter.
1591 * 2. Get PCI Interrupt routing from ACPI VSM, this
1592 * value is based on user choice in BIOS setup.
1595 /* DBGO("\\_SB\\_INI\n") */
1596 /* DBGO(" DSDT.ASL code from ") */
1597 /* DBGO(__DATE__) */
1599 /* DBGO(__TIME__) */
1600 /* DBGO("\n Sleep states supported: ") */
1602 /* DBGO(" \\_OS=") */
1604 /* DBGO("\n \\_REV=") */
1608 /* Determine the OS we're running on */
1610 /* On older chips, clear PciExpWakeDisEn */
1611 /*if (LLessEqual(\SBRI, 0x13)) {
1615 } /* End Method(_SB._INI) */
1616 } /* End Device(PCI0) */
1618 Device(PWRB) { /* Start Power button device */
1619 Name(_HID, EISAID("PNP0C0C"))
1621 Name(_PRW, Package () {3, 0x04}) /* wake from S1-S4 */
1622 Name(_STA, 0x0B) /* sata is invisible */
1624 } /* End \_SB scope */
1628 /* DBGO("\\_SI\\_SST\n") */
1629 /* DBGO(" New Indicator state: ") */
1633 } /* End Scope SI */
1635 #include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
1644 Method(_AC0,0) { /* Active Cooling 0 (0=highest fan speed) */
1645 /* DBGO("\\_TZ\\TZ00\\_AC0\n") */
1646 Return(Add(0, 2730))
1648 Method(_AL0,0) { /* Returns package of cooling device to turn on */
1649 /* DBGO("\\_TZ\\TZ00\\_AL0\n") */
1650 Return(Package() {\_TZ.TZ00.FAN0})
1653 Name(_HID, EISAID("PNP0C0B"))
1654 Name(_PR0, Package() {PFN0})
1657 PowerResource(PFN0,0,0) {
1663 /* DBGO("\\_TZ\\TZ00\\FAN0 _ON\n") */
1666 /* DBGO("\\_TZ\\TZ00\\FAN0 _OFF\n") */
1670 Method(_HOT,0) { /* return hot temp in tenths degree Kelvin */
1671 /* DBGO("\\_TZ\\TZ00\\_HOT\n") */
1672 Return (Add (THOT, KELV))
1674 Method(_CRT,0) { /* return critical temp in tenths degree Kelvin */
1675 /* DBGO("\\_TZ\\TZ00\\_CRT\n") */
1676 Return (Add (TCRT, KELV))
1678 Method(_TMP,0) { /* return current temp of this zone */
1679 Store (SMBR (0x07, 0x4C,, 0x00), Local0)
1680 If (LGreater (Local0, 0x10)) {
1681 Store (Local0, Local1)
1684 Add (Local0, THOT, Local0)
1685 Return (Add (400, KELV))
1688 Store (SMBR (0x07, 0x4C, 0x01), Local0)
1689 /* only the two MSBs in the external temperature low byte are used, resolution 0.25. We ignore it */
1690 /* Store (SMBR (0x07, 0x4C, 0x10), Local2) */
1691 If (LGreater (Local0, 0x10)) {
1692 If (LGreater (Local0, Local1)) {
1693 Store (Local0, Local1)
1696 Multiply (Local1, 10, Local1)
1697 Return (Add (Local1, KELV))
1700 Add (Local0, THOT, Local0)
1701 Return (Add (400 , KELV))
1707 /* End of ASL file */