2 * This file is part of the coreboot project.
4 * Copyright (C) 2009 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, 0xE0000000) /* Base address of PCIe config space */
36 Name(HPBA, 0xFED00000) /* Base address of HPET table */
38 Name(SSFG, 0x0D) /* S1 support: bit 0, S2 Support: bit 1, etc. S0 & S5 assumed */
40 /* USB overcurrent mapping pins. */
52 /* Some global data */
53 Name(OSVR, 3) /* Assume nothing. WinXp = 1, Vista = 2, Linux = 3, WinCE = 4 */
54 Name(OSV, Ones) /* Assume nothing */
55 Name(PMOD, One) /* Assume APIC */
61 Scope (\_PR) { /* define processor scope */
63 CPU0, /* name space name */
64 0, /* Unique number for this processor */
65 0x808, /* PBLK system I/O address !hardcoded! */
66 0x06 /* PBLKLEN for boot processor */
68 #include "acpi/cpstate.asl"
72 CPU1, /* name space name */
73 1, /* Unique number for this processor */
74 0x0000, /* PBLK system I/O address !hardcoded! */
75 0x00 /* PBLKLEN for boot processor */
77 #include "acpi/cpstate.asl"
81 CPU2, /* name space name */
82 2, /* Unique number for this processor */
83 0x0000, /* PBLK system I/O address !hardcoded! */
84 0x00 /* PBLKLEN for boot processor */
86 #include "acpi/cpstate.asl"
90 CPU3, /* name space name */
91 3, /* Unique number for this processor */
92 0x0000, /* PBLK system I/O address !hardcoded! */
93 0x00 /* PBLKLEN for boot processor */
95 #include "acpi/cpstate.asl"
99 CPU4, /* name space name */
100 4, /* Unique number for this processor */
101 0x0000, /* PBLK system I/O address !hardcoded! */
102 0x00 /* PBLKLEN for boot processor */
104 #include "acpi/cpstate.asl"
108 CPU5, /* name space name */
109 5, /* Unique number for this processor */
110 0x0000, /* PBLK system I/O address !hardcoded! */
111 0x00 /* PBLKLEN for boot processor */
113 #include "acpi/cpstate.asl"
115 } /* End _PR scope */
117 /* PIC IRQ mapping registers, C00h-C01h */
118 OperationRegion(PRQM, SystemIO, 0x00000C00, 0x00000002)
119 Field(PRQM, ByteAcc, NoLock, Preserve) {
121 PRQD, 0x00000008, /* Offset: 1h */
123 IndexField(PRQI, PRQD, ByteAcc, NoLock, Preserve) {
124 PINA, 0x00000008, /* Index 0 */
125 PINB, 0x00000008, /* Index 1 */
126 PINC, 0x00000008, /* Index 2 */
127 PIND, 0x00000008, /* Index 3 */
128 AINT, 0x00000008, /* Index 4 */
129 SINT, 0x00000008, /* Index 5 */
130 , 0x00000008, /* Index 6 */
131 AAUD, 0x00000008, /* Index 7 */
132 AMOD, 0x00000008, /* Index 8 */
133 PINE, 0x00000008, /* Index 9 */
134 PINF, 0x00000008, /* Index A */
135 PING, 0x00000008, /* Index B */
136 PINH, 0x00000008, /* Index C */
139 /* PCI Error control register */
140 OperationRegion(PERC, SystemIO, 0x00000C14, 0x00000001)
141 Field(PERC, ByteAcc, NoLock, Preserve) {
148 /* Client Management index/data registers */
149 OperationRegion(CMT, SystemIO, 0x00000C50, 0x00000002)
150 Field(CMT, ByteAcc, NoLock, Preserve) {
152 /* Client Management Data register */
160 /* GPM Port register */
161 OperationRegion(GPT, SystemIO, 0x00000C52, 0x00000001)
162 Field(GPT, ByteAcc, NoLock, Preserve) {
173 /* Flash ROM program enable register */
174 OperationRegion(FRE, SystemIO, 0x00000C6F, 0x00000001)
175 Field(FRE, ByteAcc, NoLock, Preserve) {
180 /* PM2 index/data registers */
181 OperationRegion(PM2R, SystemIO, 0x00000CD0, 0x00000002)
182 Field(PM2R, ByteAcc, NoLock, Preserve) {
187 /* Power Management I/O registers */
188 OperationRegion(PIOR, SystemIO, 0x00000CD6, 0x00000002)
189 Field(PIOR, ByteAcc, NoLock, Preserve) {
193 IndexField (PIOI, PIOD, ByteAcc, NoLock, Preserve) {
194 Offset(0x00), /* MiscControl */
198 Offset(0x01), /* MiscStatus */
202 Offset(0x04), /* SmiWakeUpEventEnable3 */
205 Offset(0x07), /* SmiWakeUpEventStatus3 */
208 Offset(0x10), /* AcpiEnable */
211 Offset(0x1C), /* ProgramIoEnable */
218 Offset(0x1D), /* IOMonitorStatus */
225 Offset(0x20), /* AcpiPmEvtBlk */
227 Offset(0x36), /* GEvtLevelConfig */
231 Offset(0x37), /* GPMLevelConfig0 */
238 Offset(0x38), /* GPMLevelConfig1 */
245 Offset(0x3B), /* PMEStatus1 */
254 Offset(0x55), /* SoftPciRst */
262 /* Offset(0x61), */ /* Options_1 */
266 Offset(0x65), /* UsbPMControl */
269 Offset(0x68), /* MiscEnable68 */
273 Offset(0x92), /* GEVENTIN */
276 Offset(0x96), /* GPM98IN */
279 Offset(0x9A), /* EnhanceControl */
282 Offset(0xA8), /* PIO7654Enable */
287 Offset(0xA9), /* PIO7654Status */
295 * First word is PM1_Status, Second word is PM1_Enable
297 OperationRegion(P1EB, SystemIO, APEB, 0x04)
298 Field(P1EB, ByteAcc, NoLock, Preserve) {
323 /* PCIe Configuration Space for 16 busses */
324 OperationRegion(PCFG, SystemMemory, PCBA, 0x01000000) /* Each bus consumes 1MB */
325 Field(PCFG, ByteAcc, NoLock, Preserve) {
326 /* Byte offsets are computed using the following technique:
327 * ((bus number + 1) * ((device number * 8) * 4096)) + register offset
328 * The 8 comes from 8 functions per device, and 4096 bytes per function config space
330 Offset(0x00088024), /* Byte offset to SATA register 24h - Bus 0, Device 17, Function 0 */
332 Offset(0x00098042), /* Byte offset to OHCI0 register 42h - Bus 0, Device 19, Function 0 */
343 Offset(0x000A0004), /* Byte offset to SMBUS register 4h - Bus 0, Device 20, Function 0 */
346 Offset(0x000A0008), /* Byte offset to SMBUS register 8h - Bus 0, Device 20, Function 0 */
348 Offset(0x000A0014), /* Byte offset to SMBUS register 14h - Bus 0, Device 20, Function 0 */
350 Offset(0x000A0078), /* Byte offset to SMBUS register 78h - Bus 0, Device 20, Function 0 */
352 P92E, 1, /* Port92 decode enable */
355 OperationRegion(SB5, SystemMemory, STB5, 0x1000)
356 Field(SB5, AnyAcc, NoLock, Preserve){
358 Offset(0x120), /* Port 0 Task file status */
364 Offset(0x128), /* Port 0 Serial ATA status */
368 Offset(0x12C), /* Port 0 Serial ATA control */
370 Offset(0x130), /* Port 0 Serial ATA error */
375 offset(0x1A0), /* Port 1 Task file status */
381 Offset(0x1A8), /* Port 1 Serial ATA status */
385 Offset(0x1AC), /* Port 1 Serial ATA control */
387 Offset(0x1B0), /* Port 1 Serial ATA error */
392 Offset(0x220), /* Port 2 Task file status */
398 Offset(0x228), /* Port 2 Serial ATA status */
402 Offset(0x22C), /* Port 2 Serial ATA control */
404 Offset(0x230), /* Port 2 Serial ATA error */
409 Offset(0x2A0), /* Port 3 Task file status */
415 Offset(0x2A8), /* Port 3 Serial ATA status */
419 Offset(0x2AC), /* Port 3 Serial ATA control */
421 Offset(0x2B0), /* Port 3 Serial ATA error */
428 #include "acpi/routing.asl"
434 if(LNotEqual(OSVR, Ones)) {Return(OSVR)} /* OS version was already detected */
438 Store(1, OSVR) /* Assume some form of XP */
439 if (\_OSI("Windows 2006")) /* Vista */
444 If(WCMP(\_OS,"Linux")) {
445 Store(3, OSVR) /* Linux */
447 Store(4, OSVR) /* Gotta be WinCE */
453 Method(_PIC, 0x01, NotSerialized)
461 Method(CIRQ, 0x00, NotSerialized){
472 Name(IRQB, ResourceTemplate(){
473 IRQ(Level,ActiveLow,Shared){15}
476 Name(IRQP, ResourceTemplate(){
477 IRQ(Level,ActiveLow,Exclusive){3, 4, 5, 7, 10, 11, 12, 15}
480 Name(PITF, ResourceTemplate(){
481 IRQ(Level,ActiveLow,Exclusive){9}
485 Name(_HID, EISAID("PNP0C0F"))
490 Return(0x0B) /* sata is invisible */
492 Return(0x09) /* sata is disabled */
494 } /* End Method(_SB.INTA._STA) */
497 /* DBGO("\\_SB\\LNKA\\_DIS\n") */
499 } /* End Method(_SB.INTA._DIS) */
502 /* DBGO("\\_SB\\LNKA\\_PRS\n") */
504 } /* Method(_SB.INTA._PRS) */
507 /* DBGO("\\_SB\\LNKA\\_CRS\n") */
508 CreateWordField(IRQB, 0x1, IRQN)
509 ShiftLeft(1, PINA, IRQN)
511 } /* Method(_SB.INTA._CRS) */
514 /* DBGO("\\_SB\\LNKA\\_CRS\n") */
515 CreateWordField(ARG0, 1, IRQM)
517 /* Use lowest available IRQ */
518 FindSetRightBit(IRQM, Local0)
523 } /* End Method(_SB.INTA._SRS) */
524 } /* End Device(INTA) */
527 Name(_HID, EISAID("PNP0C0F"))
532 Return(0x0B) /* sata is invisible */
534 Return(0x09) /* sata is disabled */
536 } /* End Method(_SB.INTB._STA) */
539 /* DBGO("\\_SB\\LNKB\\_DIS\n") */
541 } /* End Method(_SB.INTB._DIS) */
544 /* DBGO("\\_SB\\LNKB\\_PRS\n") */
546 } /* Method(_SB.INTB._PRS) */
549 /* DBGO("\\_SB\\LNKB\\_CRS\n") */
550 CreateWordField(IRQB, 0x1, IRQN)
551 ShiftLeft(1, PINB, IRQN)
553 } /* Method(_SB.INTB._CRS) */
556 /* DBGO("\\_SB\\LNKB\\_CRS\n") */
557 CreateWordField(ARG0, 1, IRQM)
559 /* Use lowest available IRQ */
560 FindSetRightBit(IRQM, Local0)
565 } /* End Method(_SB.INTB._SRS) */
566 } /* End Device(INTB) */
569 Name(_HID, EISAID("PNP0C0F"))
574 Return(0x0B) /* sata is invisible */
576 Return(0x09) /* sata is disabled */
578 } /* End Method(_SB.INTC._STA) */
581 /* DBGO("\\_SB\\LNKC\\_DIS\n") */
583 } /* End Method(_SB.INTC._DIS) */
586 /* DBGO("\\_SB\\LNKC\\_PRS\n") */
588 } /* Method(_SB.INTC._PRS) */
591 /* DBGO("\\_SB\\LNKC\\_CRS\n") */
592 CreateWordField(IRQB, 0x1, IRQN)
593 ShiftLeft(1, PINC, IRQN)
595 } /* Method(_SB.INTC._CRS) */
598 /* DBGO("\\_SB\\LNKC\\_CRS\n") */
599 CreateWordField(ARG0, 1, IRQM)
601 /* Use lowest available IRQ */
602 FindSetRightBit(IRQM, Local0)
607 } /* End Method(_SB.INTC._SRS) */
608 } /* End Device(INTC) */
611 Name(_HID, EISAID("PNP0C0F"))
616 Return(0x0B) /* sata is invisible */
618 Return(0x09) /* sata is disabled */
620 } /* End Method(_SB.INTD._STA) */
623 /* DBGO("\\_SB\\LNKD\\_DIS\n") */
625 } /* End Method(_SB.INTD._DIS) */
628 /* DBGO("\\_SB\\LNKD\\_PRS\n") */
630 } /* Method(_SB.INTD._PRS) */
633 /* DBGO("\\_SB\\LNKD\\_CRS\n") */
634 CreateWordField(IRQB, 0x1, IRQN)
635 ShiftLeft(1, PIND, IRQN)
637 } /* Method(_SB.INTD._CRS) */
640 /* DBGO("\\_SB\\LNKD\\_CRS\n") */
641 CreateWordField(ARG0, 1, IRQM)
643 /* Use lowest available IRQ */
644 FindSetRightBit(IRQM, Local0)
649 } /* End Method(_SB.INTD._SRS) */
650 } /* End Device(INTD) */
653 Name(_HID, EISAID("PNP0C0F"))
658 Return(0x0B) /* sata is invisible */
660 Return(0x09) /* sata is disabled */
662 } /* End Method(_SB.INTE._STA) */
665 /* DBGO("\\_SB\\LNKE\\_DIS\n") */
667 } /* End Method(_SB.INTE._DIS) */
670 /* DBGO("\\_SB\\LNKE\\_PRS\n") */
672 } /* Method(_SB.INTE._PRS) */
675 /* DBGO("\\_SB\\LNKE\\_CRS\n") */
676 CreateWordField(IRQB, 0x1, IRQN)
677 ShiftLeft(1, PINE, IRQN)
679 } /* Method(_SB.INTE._CRS) */
682 /* DBGO("\\_SB\\LNKE\\_CRS\n") */
683 CreateWordField(ARG0, 1, IRQM)
685 /* Use lowest available IRQ */
686 FindSetRightBit(IRQM, Local0)
691 } /* End Method(_SB.INTE._SRS) */
692 } /* End Device(INTE) */
695 Name(_HID, EISAID("PNP0C0F"))
700 Return(0x0B) /* sata is invisible */
702 Return(0x09) /* sata is disabled */
704 } /* End Method(_SB.INTF._STA) */
707 /* DBGO("\\_SB\\LNKF\\_DIS\n") */
709 } /* End Method(_SB.INTF._DIS) */
712 /* DBGO("\\_SB\\LNKF\\_PRS\n") */
714 } /* Method(_SB.INTF._PRS) */
717 /* DBGO("\\_SB\\LNKF\\_CRS\n") */
718 CreateWordField(IRQB, 0x1, IRQN)
719 ShiftLeft(1, PINF, IRQN)
721 } /* Method(_SB.INTF._CRS) */
724 /* DBGO("\\_SB\\LNKF\\_CRS\n") */
725 CreateWordField(ARG0, 1, IRQM)
727 /* Use lowest available IRQ */
728 FindSetRightBit(IRQM, Local0)
733 } /* End Method(_SB.INTF._SRS) */
734 } /* End Device(INTF) */
737 Name(_HID, EISAID("PNP0C0F"))
742 Return(0x0B) /* sata is invisible */
744 Return(0x09) /* sata is disabled */
746 } /* End Method(_SB.INTG._STA) */
749 /* DBGO("\\_SB\\LNKG\\_DIS\n") */
751 } /* End Method(_SB.INTG._DIS) */
754 /* DBGO("\\_SB\\LNKG\\_PRS\n") */
756 } /* Method(_SB.INTG._CRS) */
759 /* DBGO("\\_SB\\LNKG\\_CRS\n") */
760 CreateWordField(IRQB, 0x1, IRQN)
761 ShiftLeft(1, PING, IRQN)
763 } /* Method(_SB.INTG._CRS) */
766 /* DBGO("\\_SB\\LNKG\\_CRS\n") */
767 CreateWordField(ARG0, 1, IRQM)
769 /* Use lowest available IRQ */
770 FindSetRightBit(IRQM, Local0)
775 } /* End Method(_SB.INTG._SRS) */
776 } /* End Device(INTG) */
779 Name(_HID, EISAID("PNP0C0F"))
784 Return(0x0B) /* sata is invisible */
786 Return(0x09) /* sata is disabled */
788 } /* End Method(_SB.INTH._STA) */
791 /* DBGO("\\_SB\\LNKH\\_DIS\n") */
793 } /* End Method(_SB.INTH._DIS) */
796 /* DBGO("\\_SB\\LNKH\\_PRS\n") */
798 } /* Method(_SB.INTH._CRS) */
801 /* DBGO("\\_SB\\LNKH\\_CRS\n") */
802 CreateWordField(IRQB, 0x1, IRQN)
803 ShiftLeft(1, PINH, IRQN)
805 } /* Method(_SB.INTH._CRS) */
808 /* DBGO("\\_SB\\LNKH\\_CRS\n") */
809 CreateWordField(ARG0, 1, IRQM)
811 /* Use lowest available IRQ */
812 FindSetRightBit(IRQM, Local0)
817 } /* End Method(_SB.INTH._SRS) */
818 } /* End Device(INTH) */
820 } /* End Scope(_SB) */
823 /* Supported sleep states: */
824 Name(\_S0, Package () {0x00, 0x00, 0x00, 0x00} ) /* (S0) - working state */
826 If (LAnd(SSFG, 0x01)) {
827 Name(\_S1, Package () {0x01, 0x01, 0x00, 0x00} ) /* (S1) - sleeping w/CPU context */
829 If (LAnd(SSFG, 0x02)) {
830 Name(\_S2, Package () {0x02, 0x02, 0x00, 0x00} ) /* (S2) - "light" Suspend to RAM */
832 If (LAnd(SSFG, 0x04)) {
833 Name(\_S3, Package () {0x03, 0x03, 0x00, 0x00} ) /* (S3) - Suspend to RAM */
835 If (LAnd(SSFG, 0x08)) {
836 Name(\_S4, Package () {0x04, 0x04, 0x00, 0x00} ) /* (S4) - Suspend to Disk */
839 Name(\_S5, Package () {0x05, 0x05, 0x00, 0x00} ) /* (S5) - Soft Off */
841 Name(\_SB.CSPS ,0) /* Current Sleep State (S0, S1, S2, S3, S4, S5) */
842 Name(CSMS, 0) /* Current System State */
844 /* Wake status package */
845 Name(WKST,Package(){Zero, Zero})
848 * \_PTS - Prepare to Sleep method
851 * Arg0=The value of the sleeping state S1=1, S2=2, etc
856 * The _PTS control method is executed at the beginning of the sleep process
857 * for S1-S5. The sleeping value is passed to the _PTS control method. This
858 * control method may be executed a relatively long time before entering the
859 * sleep state and the OS may abort the operation without notification to
860 * the ACPI driver. This method cannot modify the configuration or power
861 * state of any device in the system.
864 /* DBGO("\\_PTS\n") */
865 /* DBGO("From S0 to S") */
869 /* Don't allow PCIRST# to reset USB */
874 /* Clear sleep SMI status flag and enable sleep SMI trap. */
878 /* On older chips, clear PciExpWakeDisEn */
879 /*if (LLessEqual(\_SB.SBRI, 0x13)) {
884 /* Clear wake status structure. */
885 Store(0, Index(WKST,0))
886 Store(0, Index(WKST,1))
887 \_SB.PCI0.SIOS (Arg0)
888 } /* End Method(\_PTS) */
891 * The following method results in a "not a valid reserved NameSeg"
892 * warning so I have commented it out for the duration. It isn't
893 * used, so it could be removed.
896 * \_GTS OEM Going To Sleep method
899 * Arg0=The value of the sleeping state S1=1, S2=2
906 * DBGO("From S0 to S")
913 * \_BFS OEM Back From Sleep method
916 * Arg0=The value of the sleeping state S1=1, S2=2
922 /* DBGO("\\_BFS\n") */
925 /* DBGO(" to S0\n") */
929 * \_WAK System Wake method
932 * Arg0=The value of the sleeping state S1=1, S2=2
935 * Return package of 2 DWords
937 * 0x00000000 wake succeeded
938 * 0x00000001 Wake was signaled but failed due to lack of power
939 * 0x00000002 Wake was signaled but failed due to thermal condition
940 * Dword 2 - Power Supply state
941 * if non-zero the effective S-state the power supply entered
944 /* DBGO("\\_WAK\n") */
947 /* DBGO(" to S0\n") */
952 /* Restore PCIRST# so it resets USB */
957 /* Arbitrarily clear PciExpWakeStatus */
961 /* if(DeRefOf(Index(WKST,0))) {
962 * Store(0, Index(WKST,1))
964 * Store(Arg0, Index(WKST,1))
967 \_SB.PCI0.SIOW (Arg0)
969 } /* End Method(\_WAK) */
971 Scope(\_GPE) { /* Start Scope GPE */
972 /* General event 0 */
974 * DBGO("\\_GPE\\_L00\n")
978 /* General event 1 */
980 * DBGO("\\_GPE\\_L00\n")
984 /* General event 2 */
986 * DBGO("\\_GPE\\_L00\n")
990 /* General event 3 */
992 /* DBGO("\\_GPE\\_L00\n") */
993 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
996 /* General event 4 */
998 * DBGO("\\_GPE\\_L00\n")
1002 /* General event 5 */
1004 * DBGO("\\_GPE\\_L00\n")
1008 /* General event 6 - Used for GPM6, moved to USB.asl */
1010 * DBGO("\\_GPE\\_L00\n")
1014 /* General event 7 - Used for GPM7, moved to USB.asl */
1016 * DBGO("\\_GPE\\_L07\n")
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")
1037 /* USB controller PME# */
1039 /* DBGO("\\_GPE\\_L0B\n") */
1040 Notify(\_SB.PCI0.UOH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1041 Notify(\_SB.PCI0.UOH2, 0x02) /* NOTIFY_DEVICE_WAKE */
1042 Notify(\_SB.PCI0.UOH3, 0x02) /* NOTIFY_DEVICE_WAKE */
1043 Notify(\_SB.PCI0.UOH4, 0x02) /* NOTIFY_DEVICE_WAKE */
1044 Notify(\_SB.PCI0.UOH5, 0x02) /* NOTIFY_DEVICE_WAKE */
1045 Notify(\_SB.PCI0.UEH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1046 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1049 /* AC97 controller PME# */
1051 * DBGO("\\_GPE\\_L0C\n")
1055 /* OtherTherm PME# */
1057 * DBGO("\\_GPE\\_L0D\n")
1061 /* GPM9 SCI event - Moved to USB.asl */
1063 * DBGO("\\_GPE\\_L0E\n")
1067 /* PCIe HotPlug event */
1069 * DBGO("\\_GPE\\_L0F\n")
1073 /* ExtEvent0 SCI event */
1075 /* DBGO("\\_GPE\\_L10\n") */
1079 /* ExtEvent1 SCI event */
1081 /* DBGO("\\_GPE\\_L11\n") */
1084 /* PCIe PME# event */
1086 * DBGO("\\_GPE\\_L12\n")
1090 /* GPM0 SCI event - Moved to USB.asl */
1092 * DBGO("\\_GPE\\_L13\n")
1096 /* GPM1 SCI event - Moved to USB.asl */
1098 * DBGO("\\_GPE\\_L14\n")
1102 /* GPM2 SCI event - Moved to USB.asl */
1104 * DBGO("\\_GPE\\_L15\n")
1108 /* GPM3 SCI event - Moved to USB.asl */
1110 * DBGO("\\_GPE\\_L16\n")
1114 /* GPM8 SCI event - Moved to USB.asl */
1116 * DBGO("\\_GPE\\_L17\n")
1120 /* GPIO0 or GEvent8 event */
1122 /* DBGO("\\_GPE\\_L18\n") */
1123 Notify(\_SB.PCI0.PBR2, 0x02) /* NOTIFY_DEVICE_WAKE */
1124 Notify(\_SB.PCI0.PBR4, 0x02) /* NOTIFY_DEVICE_WAKE */
1125 Notify(\_SB.PCI0.PBR5, 0x02) /* NOTIFY_DEVICE_WAKE */
1126 Notify(\_SB.PCI0.PBR6, 0x02) /* NOTIFY_DEVICE_WAKE */
1127 Notify(\_SB.PCI0.PBR7, 0x02) /* NOTIFY_DEVICE_WAKE */
1128 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1131 /* GPM4 SCI event - Moved to USB.asl */
1133 * DBGO("\\_GPE\\_L19\n")
1137 /* GPM5 SCI event - Moved to USB.asl */
1139 * DBGO("\\_GPE\\_L1A\n")
1143 /* Azalia SCI event */
1145 /* DBGO("\\_GPE\\_L1B\n") */
1146 Notify(\_SB.PCI0.AZHD, 0x02) /* NOTIFY_DEVICE_WAKE */
1147 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1150 /* GPM6 SCI event - Reassigned to _L06 */
1152 * DBGO("\\_GPE\\_L1C\n")
1156 /* GPM7 SCI event - Reassigned to _L07 */
1158 * DBGO("\\_GPE\\_L1D\n")
1162 /* GPIO2 or GPIO66 SCI event */
1164 * DBGO("\\_GPE\\_L1E\n")
1168 /* SATA SCI event - Moved to sata.asl */
1170 * DBGO("\\_GPE\\_L1F\n")
1174 } /* End Scope GPE */
1176 #include "acpi/usb.asl"
1179 Scope(\_SB) { /* Start \_SB scope */
1180 #include <arch/x86/acpi/globutil.asl> /* global utility methods expected within the \_SB scope */
1183 /* Note: Only need HID on Primary Bus */
1186 External (TOM2) /* (<real tom2> >> 20) to make it fit into 32 bit for XP */
1187 Name(_HID, EISAID("PNP0A03"))
1188 Name(_ADR, 0x00180000) /* Dev# = BSP Dev#, Func# = 0 */
1189 Method(_BBN, 0) { /* Bus number = 0 */
1193 /* DBGO("\\_SB\\PCI0\\_STA\n") */
1194 Return(0x0B) /* Status is visible */
1198 If(PMOD){ Return(APR0) } /* APIC mode */
1199 Return (PR0) /* PIC Mode */
1202 /* Describe the Northbridge devices */
1204 Name(_ADR, 0x00000000)
1207 /* The internal GFX bridge */
1209 Name(_ADR, 0x00010000)
1210 Name(_PRW, Package() {0x18, 4})
1216 /* The external GFX bridge */
1218 Name(_ADR, 0x00020000)
1219 Name(_PRW, Package() {0x18, 4})
1221 If(PMOD){ Return(APS2) } /* APIC mode */
1222 Return (PS2) /* PIC Mode */
1226 /* Dev3 is also an external GFX bridge, not used in Herring */
1229 Name(_ADR, 0x00040000)
1230 Name(_PRW, Package() {0x18, 4})
1232 If(PMOD){ Return(APS4) } /* APIC mode */
1233 Return (PS4) /* PIC Mode */
1238 Name(_ADR, 0x00050000)
1239 Name(_PRW, Package() {0x18, 4})
1241 If(PMOD){ Return(APS5) } /* APIC mode */
1242 Return (PS5) /* PIC Mode */
1247 Name(_ADR, 0x00060000)
1248 Name(_PRW, Package() {0x18, 4})
1250 If(PMOD){ Return(APS6) } /* APIC mode */
1251 Return (PS6) /* PIC Mode */
1255 /* The onboard EtherNet chip */
1257 Name(_ADR, 0x00070000)
1258 Name(_PRW, Package() {0x18, 4})
1260 If(PMOD){ Return(APS7) } /* APIC mode */
1261 Return (PS7) /* PIC Mode */
1267 Name(_ADR, 0x00090000)
1268 Name(_PRW, Package() {0x18, 4})
1270 If(PMOD){ Return(APS9) } /* APIC mode */
1271 Return (PS9) /* PIC Mode */
1276 Name(_ADR, 0x000A0000)
1277 Name(_PRW, Package() {0x18, 4})
1279 If(PMOD){ Return(APSa) } /* APIC mode */
1280 Return (PSa) /* PIC Mode */
1285 Name(_ADR, 0x000b0000)
1286 Name(_PRW, Package() {0x18, 4})
1288 If(PMOD){ Return(APSb) } /* APIC mode */
1289 Return (PSb) /* PIC Mode */
1294 Name(_ADR, 0x000c0000)
1295 Name(_PRW, Package() {0x18, 4})
1297 If(PMOD){ Return(APSc) } /* APIC mode */
1298 Return (PSc) /* PIC Mode */
1303 /* PCI slot 1, 2, 3 */
1305 Name(_ADR, 0x00140004)
1306 Name(_PRW, Package() {0x18, 4})
1313 /* Describe the Southbridge devices */
1315 Name(_ADR, 0x00110000)
1316 #include "acpi/sata.asl"
1320 Name(_ADR, 0x00130000)
1321 Name(_PRW, Package() {0x0B, 3})
1325 Name(_ADR, 0x00130001)
1326 Name(_PRW, Package() {0x0B, 3})
1330 Name(_ADR, 0x00130002)
1331 Name(_PRW, Package() {0x0B, 3})
1335 Name(_ADR, 0x00130003)
1336 Name(_PRW, Package() {0x0B, 3})
1340 Name(_ADR, 0x00130004)
1341 Name(_PRW, Package() {0x0B, 3})
1345 Name(_ADR, 0x00130005)
1346 Name(_PRW, Package() {0x0B, 3})
1350 Name(_ADR, 0x00140000)
1353 /* Primary (and only) IDE channel */
1355 Name(_ADR, 0x00140001)
1356 #include "acpi/ide.asl"
1360 Name(_ADR, 0x00140002)
1361 OperationRegion(AZPD, PCI_Config, 0x00, 0x100)
1362 Field(AZPD, AnyAcc, NoLock, Preserve) {
1386 If(LEqual(OSVR,3)){ /* If we are running Linux */
1395 Name(_ADR, 0x00140003)
1397 * DBGO("\\_SB\\PCI0\\LpcIsaBr\\_INI\n")
1398 } */ /* End Method(_SB.SBRDG._INI) */
1400 /* Real Time Clock Device */
1402 Name(_HID, EISAID("PNP0B00")) /* AT Real Time Clock (not PIIX4 compatible) */
1403 Name(_CRS, ResourceTemplate() {
1405 IO(Decode16,0x0070, 0x0070, 0, 2)
1406 /* IO(Decode16,0x0070, 0x0070, 0, 4) */
1408 } /* End Device(_SB.PCI0.LpcIsaBr.RTC0) */
1410 Device(TMR) { /* Timer */
1411 Name(_HID,EISAID("PNP0100")) /* System Timer */
1412 Name(_CRS, ResourceTemplate() {
1414 IO(Decode16, 0x0040, 0x0040, 0, 4)
1415 /* IO(Decode16, 0x0048, 0x0048, 0, 4) */
1417 } /* End Device(_SB.PCI0.LpcIsaBr.TMR) */
1419 Device(SPKR) { /* Speaker */
1420 Name(_HID,EISAID("PNP0800")) /* AT style speaker */
1421 Name(_CRS, ResourceTemplate() {
1422 IO(Decode16, 0x0061, 0x0061, 0, 1)
1424 } /* End Device(_SB.PCI0.LpcIsaBr.SPKR) */
1427 Name(_HID,EISAID("PNP0000")) /* AT Interrupt Controller */
1428 Name(_CRS, ResourceTemplate() {
1430 IO(Decode16,0x0020, 0x0020, 0, 2)
1431 IO(Decode16,0x00A0, 0x00A0, 0, 2)
1432 /* IO(Decode16, 0x00D0, 0x00D0, 0x10, 0x02) */
1433 /* IO(Decode16, 0x04D0, 0x04D0, 0x10, 0x02) */
1435 } /* End Device(_SB.PCI0.LpcIsaBr.PIC) */
1437 Device(MAD) { /* 8257 DMA */
1438 Name(_HID,EISAID("PNP0200")) /* Hardware Device ID */
1439 Name(_CRS, ResourceTemplate() {
1440 DMA(Compatibility,BusMaster,Transfer8){4}
1441 IO(Decode16, 0x0000, 0x0000, 0x10, 0x10)
1442 IO(Decode16, 0x0081, 0x0081, 0x01, 0x03)
1443 IO(Decode16, 0x0087, 0x0087, 0x01, 0x01)
1444 IO(Decode16, 0x0089, 0x0089, 0x01, 0x03)
1445 IO(Decode16, 0x008F, 0x008F, 0x01, 0x01)
1446 IO(Decode16, 0x00C0, 0x00C0, 0x10, 0x20)
1447 }) /* End Name(_SB.PCI0.LpcIsaBr.MAD._CRS) */
1448 } /* End Device(_SB.PCI0.LpcIsaBr.MAD) */
1451 Name(_HID,EISAID("PNP0C04")) /* Math Coprocessor */
1452 Name(_CRS, ResourceTemplate() {
1453 IO(Decode16, 0x00F0, 0x00F0, 0, 0x10)
1456 } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */
1459 Name(_HID,EISAID("PNP0103"))
1460 Name(CRS,ResourceTemplate() {
1461 Memory32Fixed(ReadOnly,0xFED00000, 0x00000400, HPT) /* 1kb reserved space */
1464 Return(0x0F) /* sata is visible */
1467 CreateDwordField(CRS, ^HPT._BAS, HPBA)
1471 } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */
1475 Name(_ADR, 0x00140004)
1476 } /* end HostPciBr */
1479 Name(_ADR, 0x00140005)
1480 } /* end Ac97audio */
1483 Name(_ADR, 0x00140006)
1484 } /* end Ac97modem */
1486 /* ITE8718 Support */
1487 OperationRegion (IOID, SystemIO, 0x2E, 0x02) /* sometimes it is 0x4E */
1488 Field (IOID, ByteAcc, NoLock, Preserve)
1490 SIOI, 8, SIOD, 8 /* 0x2E and 0x2F */
1493 IndexField (SIOI, SIOD, ByteAcc, NoLock, Preserve)
1496 LDN, 8, /* Logical Device Number */
1498 CID1, 8, /* Chip ID Byte 1, 0x87 */
1499 CID2, 8, /* Chip ID Byte 2, 0x12 */
1501 ACTR, 8, /* Function activate */
1503 APC0, 8, /* APC/PME Event Enable Register */
1504 APC1, 8, /* APC/PME Status Register */
1505 APC2, 8, /* APC/PME Control Register 1 */
1506 APC3, 8, /* Environment Controller Special Configuration Register */
1507 APC4, 8 /* APC/PME Control Register 2 */
1510 /* Enter the 8718 MB PnP Mode */
1516 Store(0x55, SIOI) /* 8718 magic number */
1518 /* Exit the 8718 MB PnP Mode */
1525 * Keyboard PME is routed to SB700 Gevent3. We can wake
1526 * up the system by pressing the key.
1530 /* We only enable KBD PME for S5. */
1531 If (LLess (Arg0, 0x05))
1534 /* DBGO("8718F\n") */
1537 Store (One, ACTR) /* Enable EC */
1541 */ /* falling edge. which mode? Not sure. */
1544 Store (0x08, APC1) /* clear PME status, Use 0x18 for mouse & KBD */
1546 Store (0x08, APC0) /* enable PME, Use 0x18 for mouse & KBD */
1555 Store (Zero, APC0) /* disable keyboard PME */
1557 Store (0xFF, APC1) /* clear keyboard PME status */
1561 Name(CRES, ResourceTemplate() {
1562 IO(Decode16, 0x0CF8, 0x0CF8, 1, 8)
1564 WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1565 0x0000, /* address granularity */
1566 0x0000, /* range minimum */
1567 0x0CF7, /* range maximum */
1568 0x0000, /* translation */
1572 WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1573 0x0000, /* address granularity */
1574 0x0D00, /* range minimum */
1575 0xFFFF, /* range maximum */
1576 0x0000, /* translation */
1581 Memory32Fixed(READWRITE, 0, 0xA0000, BSMM)
1582 Memory32Fixed(READONLY, 0x000A0000, 0x00020000, VGAM) /* VGA memory space */
1583 Memory32Fixed(READONLY, 0x000C0000, 0x00020000, EMM1) /* Assume C0000-E0000 empty */
1584 Memory32Fixed(READONLY, 0x000E0000, 0x00020000, RDBS) /* BIOS ROM area */
1586 /* DRAM Memory from 1MB to TopMem */
1587 Memory32Fixed(READWRITE, 0x00100000, 0, DMLO) /* 1MB to TopMem */
1589 /* BIOS space just below 4GB */
1591 ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1592 0x00, /* Granularity */
1593 0x00000000, /* Min */
1594 0x00000000, /* Max */
1595 0x00000000, /* Translation */
1596 0x00000001, /* Max-Min, RLEN */
1601 /* DRAM memory from 4GB to TopMem2 */
1602 QWORDMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1603 0x00000000, /* Granularity */
1604 0x00000000, /* Min */
1605 0x00000000, /* Max */
1606 0x00000000, /* Translation */
1607 0x00000001, /* Max-Min, RLEN */
1612 /* BIOS space just below 16EB */
1613 QWORDMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1614 0x00000000, /* Granularity */
1615 0x00000000, /* Min */
1616 0x00000000, /* Max */
1617 0x00000000, /* Translation */
1618 0x00000001, /* Max-Min, RLEN */
1624 /* memory space for PCI BARs below 4GB */
1625 Memory32Fixed(ReadOnly, 0x00000000, 0x00000000, MMIO)
1626 }) /* End Name(_SB.PCI0.CRES) */
1629 /* DBGO("\\_SB\\PCI0\\_CRS\n") */
1632 CreateDWordField(CRES, ^EMM1._BAS, EM1B)
1633 CreateDWordField(CRES, ^EMM1._LEN, EM1L)
1634 CreateDWordField(CRES, ^DMLO._BAS, DMLB)
1635 CreateDWordField(CRES, ^DMLO._LEN, DMLL)
1636 CreateDWordField(CRES, ^PCBM._MIN, PBMB)
1637 CreateDWordField(CRES, ^PCBM._LEN, PBML)
1639 CreateQWordField(CRES, ^DMHI._MIN, DMHB)
1640 CreateQWordField(CRES, ^DMHI._LEN, DMHL)
1641 CreateQWordField(CRES, ^PEBM._MIN, EBMB)
1642 CreateQWordField(CRES, ^PEBM._LEN, EBML)
1644 If(LGreater(LOMH, 0xC0000)){
1645 Store(0xC0000, EM1B) /* Hole above C0000 and below E0000 */
1646 Subtract(LOMH, 0xC0000, EM1L) /* subtract start, assumes allocation from C0000 going up */
1649 /* Set size of memory from 1MB to TopMem */
1650 Subtract(TOM1, 0x100000, DMLL)
1653 * If(LNotEqual(TOM2, 0x00000000)){
1654 * Store(0x100000000,DMHB) DRAM from 4GB to TopMem2
1655 * Subtract(TOM2, 0x100000000, DMHL)
1659 /* If there is no memory above 4GB, put the BIOS just below 4GB */
1660 If(LEqual(TOM2, 0x00000000)){
1661 Store(PBAD,PBMB) /* Reserve the "BIOS" space */
1664 Else { /* Otherwise, put the BIOS just below 16EB */
1665 ShiftLeft(PBAD,16,EBMB) /* Reserve the "BIOS" space */
1670 CreateDWordField(CRES, ^MMIO._BAS, MM1B)
1671 CreateDWordField(CRES, ^MMIO._LEN, MM1L)
1673 * Declare memory between TOM1 and 4GB as available
1675 * Use ShiftLeft to avoid 64bit constant (for XP).
1676 * This will work even if the OS does 32bit arithmetic, as
1677 * 32bit (0x00000000 - TOM1) will wrap and give the same
1678 * result as 64bit (0x100000000 - TOM1).
1681 ShiftLeft(0x10000000, 4, Local0)
1682 Subtract(Local0, TOM1, Local0)
1685 Return(CRES) /* note to change the Name buffer */
1686 } /* end of Method(_SB.PCI0._CRS) */
1690 * FIRST METHOD CALLED UPON BOOT
1692 * 1. If debugging, print current OS and ACPI interpreter.
1693 * 2. Get PCI Interrupt routing from ACPI VSM, this
1694 * value is based on user choice in BIOS setup.
1697 /* DBGO("\\_SB\\_INI\n") */
1698 /* DBGO(" DSDT.ASL code from ") */
1699 /* DBGO(__DATE__) */
1701 /* DBGO(__TIME__) */
1702 /* DBGO("\n Sleep states supported: ") */
1704 /* DBGO(" \\_OS=") */
1706 /* DBGO("\n \\_REV=") */
1710 /* Determine the OS we're running on */
1713 /* On older chips, clear PciExpWakeDisEn */
1714 /*if (LLessEqual(\SBRI, 0x13)) {
1718 } /* End Method(_SB._INI) */
1719 } /* End Device(PCI0) */
1721 Device(PWRB) { /* Start Power button device */
1722 Name(_HID, EISAID("PNP0C0C"))
1724 Name(_PRW, Package () {3, 0x04}) /* wake from S1-S4 */
1725 Name(_STA, 0x0B) /* sata is invisible */
1727 } /* End \_SB scope */
1731 /* DBGO("\\_SI\\_SST\n") */
1732 /* DBGO(" New Indicator state: ") */
1736 } /* End Scope SI */
1738 #include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
1747 Method(_AC0,0) { /* Active Cooling 0 (0=highest fan speed) */
1748 /* DBGO("\\_TZ\\TZ00\\_AC0\n") */
1749 Return(Add(0, 2730))
1751 Method(_AL0,0) { /* Returns package of cooling device to turn on */
1752 /* DBGO("\\_TZ\\TZ00\\_AL0\n") */
1753 Return(Package() {\_TZ.TZ00.FAN0})
1756 Name(_HID, EISAID("PNP0C0B"))
1757 Name(_PR0, Package() {PFN0})
1760 PowerResource(PFN0,0,0) {
1766 /* DBGO("\\_TZ\\TZ00\\FAN0 _ON\n") */
1769 /* DBGO("\\_TZ\\TZ00\\FAN0 _OFF\n") */
1773 Method(_HOT,0) { /* return hot temp in tenths degree Kelvin */
1774 /* DBGO("\\_TZ\\TZ00\\_HOT\n") */
1775 Return (Add (THOT, KELV))
1777 Method(_CRT,0) { /* return critical temp in tenths degree Kelvin */
1778 /* DBGO("\\_TZ\\TZ00\\_CRT\n") */
1779 Return (Add (TCRT, KELV))
1781 Method(_TMP,0) { /* return current temp of this zone */
1782 Store (SMBR (0x07, 0x4C,, 0x00), Local0)
1783 If (LGreater (Local0, 0x10)) {
1784 Store (Local0, Local1)
1787 Add (Local0, THOT, Local0)
1788 Return (Add (400, KELV))
1791 Store (SMBR (0x07, 0x4C, 0x01), Local0)
1792 /* only the two MSBs in the external temperature low byte are used, resolution 0.25. We ignore it */
1793 /* Store (SMBR (0x07, 0x4C, 0x10), Local2) */
1794 If (LGreater (Local0, 0x10)) {
1795 If (LGreater (Local0, Local1)) {
1796 Store (Local0, Local1)
1799 Multiply (Local1, 10, Local1)
1800 Return (Add (Local1, KELV))
1803 Add (Local0, THOT, Local0)
1804 Return (Add (400 , KELV))
1810 /* End of ASL file */