2 * This file is part of the coreboot project.
4 * Copyright (C) 2011 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.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 /* DefinitionBlock Statement */
22 "DSDT.AML", /* Output filename */
23 "DSDT", /* Signature */
24 0x02, /* DSDT Revision, needs to be 2 for 64bit */
26 "M5A99 ", /* TABLE ID */
27 0x00010001 /* OEM Revision */
29 { /* Start of ASL file */
30 /* #include "../../../arch/x86/acpi/debug.asl" */ /* Include global debug methods if needed */
32 /* Data to be patched by the BIOS during POST */
33 /* FIXME the patching is not done yet! */
34 /* Memory related values */
35 Name(LOMH, 0x0) /* Start of unused memory in C0000-E0000 range */
36 Name(PBAD, 0x0) /* Address of BIOS area (If TOM2 != 0, Addr >> 16) */
37 Name(PBLN, 0x0) /* Length of BIOS area */
39 Name(PCBA, 0xE0000000) /* Base address of PCIe config space */
40 Name(HPBA, 0xFED00000) /* Base address of HPET table */
42 Name(SSFG, 0x0D) /* S1 support: bit 0, S2 Support: bit 1, etc. S0 & S5 assumed */
44 /* USB overcurrent mapping pins. */
56 /* Some global data */
57 Name(OSTP, 3) /* Assume nothing. WinXp = 1, Vista = 2, Linux = 3, WinCE = 4 */
58 Name(OSV, Ones) /* Assume nothing */
59 Name(PMOD, One) /* Assume APIC */
65 Scope (\_PR) { /* define processor scope */
67 CPU0, /* name space name */
68 0, /* Unique number for this processor */
69 0x808, /* PBLK system I/O address !hardcoded! */
70 0x06 /* PBLKLEN for boot processor */
72 #include "acpi/cpstate.asl"
76 CPU1, /* name space name */
77 1, /* Unique number for this processor */
78 0x0000, /* PBLK system I/O address !hardcoded! */
79 0x00 /* PBLKLEN for boot processor */
81 #include "acpi/cpstate.asl"
85 CPU2, /* name space name */
86 2, /* Unique number for this processor */
87 0x0000, /* PBLK system I/O address !hardcoded! */
88 0x00 /* PBLKLEN for boot processor */
90 #include "acpi/cpstate.asl"
94 CPU3, /* name space name */
95 3, /* Unique number for this processor */
96 0x0000, /* PBLK system I/O address !hardcoded! */
97 0x00 /* PBLKLEN for boot processor */
99 #include "acpi/cpstate.asl"
103 CPU4, /* name space name */
104 4, /* Unique number for this processor */
105 0x0000, /* PBLK system I/O address !hardcoded! */
106 0x00 /* PBLKLEN for boot processor */
108 #include "acpi/cpstate.asl"
112 CPU5, /* name space name */
113 5, /* Unique number for this processor */
114 0x0000, /* PBLK system I/O address !hardcoded! */
115 0x00 /* PBLKLEN for boot processor */
117 #include "acpi/cpstate.asl"
119 } /* End _PR scope */
121 /* PIC IRQ mapping registers, C00h-C01h. */
122 OperationRegion(PRQM, SystemIO, 0x00000C00, 0x00000002)
123 Field(PRQM, ByteAcc, NoLock, Preserve) {
125 PRQD, 0x00000008, /* Offset: 1h */
127 IndexField(PRQI, PRQD, ByteAcc, NoLock, Preserve) {
128 PIRA, 0x00000008, /* Index 0 */
129 PIRB, 0x00000008, /* Index 1 */
130 PIRC, 0x00000008, /* Index 2 */
131 PIRD, 0x00000008, /* Index 3 */
132 PIRE, 0x00000008, /* Index 4 */
133 PIRF, 0x00000008, /* Index 5 */
134 PIRG, 0x00000008, /* Index 6 */
135 PIRH, 0x00000008, /* Index 7 */
138 /* PCI Error control register */
139 OperationRegion(PERC, SystemIO, 0x00000C14, 0x00000001)
140 Field(PERC, ByteAcc, NoLock, Preserve) {
147 /* Client Management index/data registers */
148 OperationRegion(CMT, SystemIO, 0x00000C50, 0x00000002)
149 Field(CMT, ByteAcc, NoLock, Preserve) {
151 /* Client Management Data register */
159 /* GPM Port register */
160 OperationRegion(GPT, SystemIO, 0x00000C52, 0x00000001)
161 Field(GPT, ByteAcc, NoLock, Preserve) {
172 /* Flash ROM program enable register */
173 OperationRegion(FRE, SystemIO, 0x00000C6F, 0x00000001)
174 Field(FRE, ByteAcc, NoLock, Preserve) {
179 /* PM2 index/data registers */
180 OperationRegion(PM2R, SystemIO, 0x00000CD0, 0x00000002)
181 Field(PM2R, ByteAcc, NoLock, Preserve) {
186 /* Power Management I/O registers, TODO:PMIO is quite different in SB800. */
187 OperationRegion(PIOR, SystemIO, 0x00000CD6, 0x00000002)
188 Field(PIOR, ByteAcc, NoLock, Preserve) {
192 IndexField (PIOI, PIOD, ByteAcc, NoLock, Preserve) {
193 Offset(0x00), /* MiscControl */
197 Offset(0x01), /* MiscStatus */
201 Offset(0x04), /* SmiWakeUpEventEnable3 */
204 Offset(0x07), /* SmiWakeUpEventStatus3 */
207 Offset(0x10), /* AcpiEnable */
210 Offset(0x1C), /* ProgramIoEnable */
217 Offset(0x1D), /* IOMonitorStatus */
224 Offset(0x20), /* AcpiPmEvtBlk. TODO: should be 0x60 */
226 Offset(0x36), /* GEvtLevelConfig */
230 Offset(0x37), /* GPMLevelConfig0 */
237 Offset(0x38), /* GPMLevelConfig1 */
244 Offset(0x3B), /* PMEStatus1 */
253 Offset(0x55), /* SoftPciRst */
261 /* Offset(0x61), */ /* Options_1 */
265 Offset(0x65), /* UsbPMControl */
268 Offset(0x68), /* MiscEnable68 */
272 Offset(0x92), /* GEVENTIN */
275 Offset(0x96), /* GPM98IN */
278 Offset(0x9A), /* EnhanceControl */
281 Offset(0xA8), /* PIO7654Enable */
286 Offset(0xA9), /* PIO7654Status */
294 * First word is PM1_Status, Second word is PM1_Enable
296 OperationRegion(P1EB, SystemIO, APEB, 0x04)
297 Field(P1EB, ByteAcc, NoLock, Preserve) {
322 /* PCIe Configuration Space for 16 busses */
323 OperationRegion(PCFG, SystemMemory, PCBA, 0x01000000) /* Each bus consumes 1MB */
324 Field(PCFG, ByteAcc, NoLock, Preserve) {
325 /* Byte offsets are computed using the following technique:
326 * ((bus number + 1) * ((device number * 8) * 4096)) + register offset
327 * The 8 comes from 8 functions per device, and 4096 bytes per function config space
329 Offset(0x00088024), /* Byte offset to SATA register 24h - Bus 0, Device 17, Function 0 */
331 Offset(0x00098042), /* Byte offset to OHCI0 register 42h - Bus 0, Device 19, Function 0 */
342 Offset(0x000A0004), /* Byte offset to SMBUS register 4h - Bus 0, Device 20, Function 0 */
345 Offset(0x000A0008), /* Byte offset to SMBUS register 8h - Bus 0, Device 20, Function 0 */
347 Offset(0x000A0014), /* Byte offset to SMBUS register 14h - Bus 0, Device 20, Function 0 */
349 Offset(0x000A0078), /* Byte offset to SMBUS register 78h - Bus 0, Device 20, Function 0 */
351 P92E, 1, /* Port92 decode enable */
354 OperationRegion(SB5, SystemMemory, STB5, 0x1000)
355 Field(SB5, AnyAcc, NoLock, Preserve){
357 Offset(0x120), /* Port 0 Task file status */
363 Offset(0x128), /* Port 0 Serial ATA status */
367 Offset(0x12C), /* Port 0 Serial ATA control */
369 Offset(0x130), /* Port 0 Serial ATA error */
374 offset(0x1A0), /* Port 1 Task file status */
380 Offset(0x1A8), /* Port 1 Serial ATA status */
384 Offset(0x1AC), /* Port 1 Serial ATA control */
386 Offset(0x1B0), /* Port 1 Serial ATA error */
391 Offset(0x220), /* Port 2 Task file status */
397 Offset(0x228), /* Port 2 Serial ATA status */
401 Offset(0x22C), /* Port 2 Serial ATA control */
403 Offset(0x230), /* Port 2 Serial ATA error */
408 Offset(0x2A0), /* Port 3 Task file status */
414 Offset(0x2A8), /* Port 3 Serial ATA status */
418 Offset(0x2AC), /* Port 3 Serial ATA control */
420 Offset(0x2B0), /* Port 3 Serial ATA error */
427 #include "acpi/routing.asl"
433 if(LNotEqual(OSTP, Ones)) {Return(OSTP)} /* OS version was already detected */
435 if(CondRefOf(\_OSI,Local1))
437 Store(1, OSTP) /* Assume some form of XP */
438 if (\_OSI("Windows 2006")) /* Vista */
443 If(WCMP(\_OS,"Linux")) {
444 Store(3, OSTP) /* Linux */
446 Store(4, OSTP) /* Gotta be WinCE */
452 Method(_PIC, 0x01, NotSerialized)
460 Method(CIRQ, 0x00, NotSerialized){
471 Name(IRQB, ResourceTemplate(){
472 IRQ(Level,ActiveLow,Shared){15}
475 Name(IRQP, ResourceTemplate(){
476 IRQ(Level,ActiveLow,Exclusive){3, 4, 5, 7, 10, 11, 12, 15}
479 Name(PITF, ResourceTemplate(){
480 IRQ(Level,ActiveLow,Exclusive){9}
484 Name(_HID, EISAID("PNP0C0F"))
489 Return(0x0B) /* sata is invisible */
491 Return(0x09) /* sata is disabled */
493 } /* End Method(_SB.INTA._STA) */
496 /* DBGO("\\_SB\\LNKA\\_DIS\n") */
498 } /* End Method(_SB.INTA._DIS) */
501 /* DBGO("\\_SB\\LNKA\\_PRS\n") */
503 } /* Method(_SB.INTA._PRS) */
506 /* DBGO("\\_SB\\LNKA\\_CRS\n") */
507 CreateWordField(IRQB, 0x1, IRQN)
508 ShiftLeft(1, PIRA, IRQN)
510 } /* Method(_SB.INTA._CRS) */
513 /* DBGO("\\_SB\\LNKA\\_CRS\n") */
514 CreateWordField(ARG0, 1, IRQM)
516 /* Use lowest available IRQ */
517 FindSetRightBit(IRQM, Local0)
522 } /* End Method(_SB.INTA._SRS) */
523 } /* End Device(INTA) */
526 Name(_HID, EISAID("PNP0C0F"))
531 Return(0x0B) /* sata is invisible */
533 Return(0x09) /* sata is disabled */
535 } /* End Method(_SB.INTB._STA) */
538 /* DBGO("\\_SB\\LNKB\\_DIS\n") */
540 } /* End Method(_SB.INTB._DIS) */
543 /* DBGO("\\_SB\\LNKB\\_PRS\n") */
545 } /* Method(_SB.INTB._PRS) */
548 /* DBGO("\\_SB\\LNKB\\_CRS\n") */
549 CreateWordField(IRQB, 0x1, IRQN)
550 ShiftLeft(1, PIRB, IRQN)
552 } /* Method(_SB.INTB._CRS) */
555 /* DBGO("\\_SB\\LNKB\\_CRS\n") */
556 CreateWordField(ARG0, 1, IRQM)
558 /* Use lowest available IRQ */
559 FindSetRightBit(IRQM, Local0)
564 } /* End Method(_SB.INTB._SRS) */
565 } /* End Device(INTB) */
568 Name(_HID, EISAID("PNP0C0F"))
573 Return(0x0B) /* sata is invisible */
575 Return(0x09) /* sata is disabled */
577 } /* End Method(_SB.INTC._STA) */
580 /* DBGO("\\_SB\\LNKC\\_DIS\n") */
582 } /* End Method(_SB.INTC._DIS) */
585 /* DBGO("\\_SB\\LNKC\\_PRS\n") */
587 } /* Method(_SB.INTC._PRS) */
590 /* DBGO("\\_SB\\LNKC\\_CRS\n") */
591 CreateWordField(IRQB, 0x1, IRQN)
592 ShiftLeft(1, PIRC, IRQN)
594 } /* Method(_SB.INTC._CRS) */
597 /* DBGO("\\_SB\\LNKC\\_CRS\n") */
598 CreateWordField(ARG0, 1, IRQM)
600 /* Use lowest available IRQ */
601 FindSetRightBit(IRQM, Local0)
606 } /* End Method(_SB.INTC._SRS) */
607 } /* End Device(INTC) */
610 Name(_HID, EISAID("PNP0C0F"))
615 Return(0x0B) /* sata is invisible */
617 Return(0x09) /* sata is disabled */
619 } /* End Method(_SB.INTD._STA) */
622 /* DBGO("\\_SB\\LNKD\\_DIS\n") */
624 } /* End Method(_SB.INTD._DIS) */
627 /* DBGO("\\_SB\\LNKD\\_PRS\n") */
629 } /* Method(_SB.INTD._PRS) */
632 /* DBGO("\\_SB\\LNKD\\_CRS\n") */
633 CreateWordField(IRQB, 0x1, IRQN)
634 ShiftLeft(1, PIRD, IRQN)
636 } /* Method(_SB.INTD._CRS) */
639 /* DBGO("\\_SB\\LNKD\\_CRS\n") */
640 CreateWordField(ARG0, 1, IRQM)
642 /* Use lowest available IRQ */
643 FindSetRightBit(IRQM, Local0)
648 } /* End Method(_SB.INTD._SRS) */
649 } /* End Device(INTD) */
652 Name(_HID, EISAID("PNP0C0F"))
657 Return(0x0B) /* sata is invisible */
659 Return(0x09) /* sata is disabled */
661 } /* End Method(_SB.INTE._STA) */
664 /* DBGO("\\_SB\\LNKE\\_DIS\n") */
666 } /* End Method(_SB.INTE._DIS) */
669 /* DBGO("\\_SB\\LNKE\\_PRS\n") */
671 } /* Method(_SB.INTE._PRS) */
674 /* DBGO("\\_SB\\LNKE\\_CRS\n") */
675 CreateWordField(IRQB, 0x1, IRQN)
676 ShiftLeft(1, PIRE, IRQN)
678 } /* Method(_SB.INTE._CRS) */
681 /* DBGO("\\_SB\\LNKE\\_CRS\n") */
682 CreateWordField(ARG0, 1, IRQM)
684 /* Use lowest available IRQ */
685 FindSetRightBit(IRQM, Local0)
690 } /* End Method(_SB.INTE._SRS) */
691 } /* End Device(INTE) */
694 Name(_HID, EISAID("PNP0C0F"))
699 Return(0x0B) /* sata is invisible */
701 Return(0x09) /* sata is disabled */
703 } /* End Method(_SB.INTF._STA) */
706 /* DBGO("\\_SB\\LNKF\\_DIS\n") */
708 } /* End Method(_SB.INTF._DIS) */
711 /* DBGO("\\_SB\\LNKF\\_PRS\n") */
713 } /* Method(_SB.INTF._PRS) */
716 /* DBGO("\\_SB\\LNKF\\_CRS\n") */
717 CreateWordField(IRQB, 0x1, IRQN)
718 ShiftLeft(1, PIRF, IRQN)
720 } /* Method(_SB.INTF._CRS) */
723 /* DBGO("\\_SB\\LNKF\\_CRS\n") */
724 CreateWordField(ARG0, 1, IRQM)
726 /* Use lowest available IRQ */
727 FindSetRightBit(IRQM, Local0)
732 } /* End Method(_SB.INTF._SRS) */
733 } /* End Device(INTF) */
736 Name(_HID, EISAID("PNP0C0F"))
741 Return(0x0B) /* sata is invisible */
743 Return(0x09) /* sata is disabled */
745 } /* End Method(_SB.INTG._STA) */
748 /* DBGO("\\_SB\\LNKG\\_DIS\n") */
750 } /* End Method(_SB.INTG._DIS) */
753 /* DBGO("\\_SB\\LNKG\\_PRS\n") */
755 } /* Method(_SB.INTG._CRS) */
758 /* DBGO("\\_SB\\LNKG\\_CRS\n") */
759 CreateWordField(IRQB, 0x1, IRQN)
760 ShiftLeft(1, PIRG, IRQN)
762 } /* Method(_SB.INTG._CRS) */
765 /* DBGO("\\_SB\\LNKG\\_CRS\n") */
766 CreateWordField(ARG0, 1, IRQM)
768 /* Use lowest available IRQ */
769 FindSetRightBit(IRQM, Local0)
774 } /* End Method(_SB.INTG._SRS) */
775 } /* End Device(INTG) */
778 Name(_HID, EISAID("PNP0C0F"))
783 Return(0x0B) /* sata is invisible */
785 Return(0x09) /* sata is disabled */
787 } /* End Method(_SB.INTH._STA) */
790 /* DBGO("\\_SB\\LNKH\\_DIS\n") */
792 } /* End Method(_SB.INTH._DIS) */
795 /* DBGO("\\_SB\\LNKH\\_PRS\n") */
797 } /* Method(_SB.INTH._CRS) */
800 /* DBGO("\\_SB\\LNKH\\_CRS\n") */
801 CreateWordField(IRQB, 0x1, IRQN)
802 ShiftLeft(1, PIRH, IRQN)
804 } /* Method(_SB.INTH._CRS) */
807 /* DBGO("\\_SB\\LNKH\\_CRS\n") */
808 CreateWordField(ARG0, 1, IRQM)
810 /* Use lowest available IRQ */
811 FindSetRightBit(IRQM, Local0)
816 } /* End Method(_SB.INTH._SRS) */
817 } /* End Device(INTH) */
819 } /* End Scope(_SB) */
822 /* Supported sleep states: */
823 Name(\_S0, Package () {0x00, 0x00, 0x00, 0x00} ) /* (S0) - working state */
825 If (LAnd(SSFG, 0x01)) {
826 Name(\_S1, Package () {0x01, 0x01, 0x00, 0x00} ) /* (S1) - sleeping w/CPU context */
828 If (LAnd(SSFG, 0x02)) {
829 Name(\_S2, Package () {0x02, 0x02, 0x00, 0x00} ) /* (S2) - "light" Suspend to RAM */
831 If (LAnd(SSFG, 0x04)) {
832 Name(\_S3, Package () {0x03, 0x03, 0x00, 0x00} ) /* (S3) - Suspend to RAM */
834 If (LAnd(SSFG, 0x08)) {
835 Name(\_S4, Package () {0x04, 0x04, 0x00, 0x00} ) /* (S4) - Suspend to Disk */
838 Name(\_S5, Package () {0x05, 0x05, 0x00, 0x00} ) /* (S5) - Soft Off */
840 Name(\_SB.CSPS ,0) /* Current Sleep State (S0, S1, S2, S3, S4, S5) */
841 Name(CSMS, 0) /* Current System State */
843 /* Wake status package */
844 Name(WKST,Package(){Zero, Zero})
847 * \_PTS - Prepare to Sleep method
850 * Arg0=The value of the sleeping state S1=1, S2=2, etc
855 * The _PTS control method is executed at the beginning of the sleep process
856 * for S1-S5. The sleeping value is passed to the _PTS control method. This
857 * control method may be executed a relatively long time before entering the
858 * sleep state and the OS may abort the operation without notification to
859 * the ACPI driver. This method cannot modify the configuration or power
860 * state of any device in the system.
863 /* DBGO("\\_PTS\n") */
864 /* DBGO("From S0 to S") */
868 /* Don't allow PCIRST# to reset USB */
873 /* Clear sleep SMI status flag and enable sleep SMI trap. */
877 /* On older chips, clear PciExpWakeDisEn */
878 /*if (LLessEqual(\_SB.SBRI, 0x13)) {
883 /* Clear wake status structure. */
884 Store(0, Index(WKST,0))
885 Store(0, Index(WKST,1))
886 } /* End Method(\_PTS) */
889 * The following method results in a "not a valid reserved NameSeg"
890 * warning so I have commented it out for the duration. It isn't
891 * used, so it could be removed.
894 * \_GTS OEM Going To Sleep method
897 * Arg0=The value of the sleeping state S1=1, S2=2
904 * DBGO("From S0 to S")
911 * \_BFS OEM Back From Sleep method
914 * Arg0=The value of the sleeping state S1=1, S2=2
920 /* DBGO("\\_BFS\n") */
923 /* DBGO(" to S0\n") */
927 * \_WAK System Wake method
930 * Arg0=The value of the sleeping state S1=1, S2=2
933 * Return package of 2 DWords
935 * 0x00000000 wake succeeded
936 * 0x00000001 Wake was signaled but failed due to lack of power
937 * 0x00000002 Wake was signaled but failed due to thermal condition
938 * Dword 2 - Power Supply state
939 * if non-zero the effective S-state the power supply entered
942 /* DBGO("\\_WAK\n") */
945 /* DBGO(" to S0\n") */
950 /* Restore PCIRST# so it resets USB */
955 /* Arbitrarily clear PciExpWakeStatus */
958 /* if(DeRefOf(Index(WKST,0))) {
959 * Store(0, Index(WKST,1))
961 * Store(Arg0, Index(WKST,1))
965 } /* End Method(\_WAK) */
967 Scope(\_GPE) { /* Start Scope GPE */
968 /* General event 0 */
970 * DBGO("\\_GPE\\_L00\n")
974 /* General event 1 */
976 * DBGO("\\_GPE\\_L00\n")
980 /* General event 2 */
982 * DBGO("\\_GPE\\_L00\n")
986 /* General event 3 */
988 /* DBGO("\\_GPE\\_L00\n") */
989 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
992 /* General event 4 */
994 * DBGO("\\_GPE\\_L00\n")
998 /* General event 5 */
1000 * DBGO("\\_GPE\\_L00\n")
1004 /* General event 6 - Used for GPM6, moved to USB.asl */
1006 * DBGO("\\_GPE\\_L00\n")
1010 /* General event 7 - Used for GPM7, moved to USB.asl */
1012 * DBGO("\\_GPE\\_L07\n")
1016 /* Legacy PM event */
1018 /* DBGO("\\_GPE\\_L08\n") */
1021 /* Temp warning (TWarn) event */
1023 /* DBGO("\\_GPE\\_L09\n") */
1024 /* Notify (\_TZ.TZ00, 0x80) */
1029 * DBGO("\\_GPE\\_L0A\n")
1033 /* USB controller PME# */
1035 /* DBGO("\\_GPE\\_L0B\n") */
1036 Notify(\_SB.PCI0.UOH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1037 Notify(\_SB.PCI0.UOH2, 0x02) /* NOTIFY_DEVICE_WAKE */
1038 Notify(\_SB.PCI0.UOH3, 0x02) /* NOTIFY_DEVICE_WAKE */
1039 Notify(\_SB.PCI0.UOH4, 0x02) /* NOTIFY_DEVICE_WAKE */
1040 Notify(\_SB.PCI0.UOH5, 0x02) /* NOTIFY_DEVICE_WAKE */
1041 Notify(\_SB.PCI0.UOH6, 0x02) /* NOTIFY_DEVICE_WAKE */
1042 Notify(\_SB.PCI0.UEH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1043 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1046 /* AC97 controller PME# */
1048 * DBGO("\\_GPE\\_L0C\n")
1052 /* OtherTherm PME# */
1054 * DBGO("\\_GPE\\_L0D\n")
1058 /* GPM9 SCI event - Moved to USB.asl */
1060 * DBGO("\\_GPE\\_L0E\n")
1064 /* PCIe HotPlug event */
1066 * DBGO("\\_GPE\\_L0F\n")
1070 /* ExtEvent0 SCI event */
1072 /* DBGO("\\_GPE\\_L10\n") */
1076 /* ExtEvent1 SCI event */
1078 /* DBGO("\\_GPE\\_L11\n") */
1081 /* PCIe PME# event */
1083 * DBGO("\\_GPE\\_L12\n")
1087 /* GPM0 SCI event - Moved to USB.asl */
1089 * DBGO("\\_GPE\\_L13\n")
1093 /* GPM1 SCI event - Moved to USB.asl */
1095 * DBGO("\\_GPE\\_L14\n")
1099 /* GPM2 SCI event - Moved to USB.asl */
1101 * DBGO("\\_GPE\\_L15\n")
1105 /* GPM3 SCI event - Moved to USB.asl */
1107 * DBGO("\\_GPE\\_L16\n")
1111 /* GPM8 SCI event - Moved to USB.asl */
1113 * DBGO("\\_GPE\\_L17\n")
1117 /* GPIO0 or GEvent8 event */
1119 /* DBGO("\\_GPE\\_L18\n") */
1120 Notify(\_SB.PCI0.PBR2, 0x02) /* NOTIFY_DEVICE_WAKE */
1121 Notify(\_SB.PCI0.PBR4, 0x02) /* NOTIFY_DEVICE_WAKE */
1122 Notify(\_SB.PCI0.PBR5, 0x02) /* NOTIFY_DEVICE_WAKE */
1123 Notify(\_SB.PCI0.PBR6, 0x02) /* NOTIFY_DEVICE_WAKE */
1124 Notify(\_SB.PCI0.PBR7, 0x02) /* NOTIFY_DEVICE_WAKE */
1125 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1128 /* GPM4 SCI event - Moved to USB.asl */
1130 * DBGO("\\_GPE\\_L19\n")
1134 /* GPM5 SCI event - Moved to USB.asl */
1136 * DBGO("\\_GPE\\_L1A\n")
1140 /* Azalia SCI event */
1142 /* DBGO("\\_GPE\\_L1B\n") */
1143 Notify(\_SB.PCI0.AZHD, 0x02) /* NOTIFY_DEVICE_WAKE */
1144 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1147 /* GPM6 SCI event - Reassigned to _L06 */
1149 * DBGO("\\_GPE\\_L1C\n")
1153 /* GPM7 SCI event - Reassigned to _L07 */
1155 * DBGO("\\_GPE\\_L1D\n")
1159 /* GPIO2 or GPIO66 SCI event */
1161 * DBGO("\\_GPE\\_L1E\n")
1165 /* SATA SCI event - Moved to sata.asl */
1167 * DBGO("\\_GPE\\_L1F\n")
1171 } /* End Scope GPE */
1173 #include "acpi/usb.asl"
1176 Scope(\_SB) { /* Start \_SB scope */
1177 #include "../../../arch/x86/acpi/globutil.asl" /* global utility methods expected within the \_SB scope */
1180 /* Note: Only need HID on Primary Bus */
1184 Name(_HID, EISAID("PNP0A03"))
1185 Name(_ADR, 0x00180000) /* Dev# = BSP Dev#, Func# = 0 */
1186 Method(_BBN, 0) { /* Bus number = 0 */
1190 /* DBGO("\\_SB\\PCI0\\_STA\n") */
1191 Return(0x0B) /* Status is visible */
1195 If(PMOD){ Return(APR0) } /* APIC mode */
1196 Return (PR0) /* PIC Mode */
1199 /* Describe the Northbridge devices */
1201 Name(_ADR, 0x00000000)
1204 /* The internal GFX bridge */
1206 Name(_ADR, 0x00010000)
1207 Name(_PRW, Package() {0x18, 4})
1213 /* The external GFX bridge */
1215 Name(_ADR, 0x00020000)
1216 Name(_PRW, Package() {0x18, 4})
1218 If(PMOD){ Return(APS2) } /* APIC mode */
1219 Return (PS2) /* PIC Mode */
1223 /* Dev3 is also an external GFX bridge, not used in Herring */
1226 Name(_ADR, 0x00040000)
1227 Name(_PRW, Package() {0x18, 4})
1229 If(PMOD){ Return(APS4) } /* APIC mode */
1230 Return (PS4) /* PIC Mode */
1235 Name(_ADR, 0x00050000)
1236 Name(_PRW, Package() {0x18, 4})
1238 If(PMOD){ Return(APS5) } /* APIC mode */
1239 Return (PS5) /* PIC Mode */
1244 Name(_ADR, 0x00060000)
1245 Name(_PRW, Package() {0x18, 4})
1247 If(PMOD){ Return(APS6) } /* APIC mode */
1248 Return (PS6) /* PIC Mode */
1252 /* The onboard EtherNet chip */
1254 Name(_ADR, 0x00070000)
1255 Name(_PRW, Package() {0x18, 4})
1257 If(PMOD){ Return(APS7) } /* APIC mode */
1258 Return (PS7) /* PIC Mode */
1264 Name(_ADR, 0x00090000)
1265 Name(_PRW, Package() {0x18, 4})
1267 If(PMOD){ Return(APS9) } /* APIC mode */
1268 Return (PS9) /* PIC Mode */
1273 Name(_ADR, 0x000A0000)
1274 Name(_PRW, Package() {0x18, 4})
1276 If(PMOD){ Return(APSa) } /* APIC mode */
1277 Return (PSa) /* PIC Mode */
1282 Name(_ADR, 0x00150000)
1283 Name(_PRW, Package() {0x18, 4})
1285 If(PMOD){ Return(APE0) } /* APIC mode */
1286 Return (PE0) /* PIC Mode */
1290 Name(_ADR, 0x00150001)
1291 Name(_PRW, Package() {0x18, 4})
1293 If(PMOD){ Return(APE1) } /* APIC mode */
1294 Return (PE1) /* PIC Mode */
1298 Name(_ADR, 0x00150002)
1299 Name(_PRW, Package() {0x18, 4})
1301 If(PMOD){ Return(APE2) } /* APIC mode */
1302 Return (APE2) /* PIC Mode */
1306 Name(_ADR, 0x00150003)
1307 Name(_PRW, Package() {0x18, 4})
1309 If(PMOD){ Return(APE3) } /* APIC mode */
1310 Return (PE3) /* PIC Mode */
1314 /* PCI slot 1, 2, 3 */
1316 Name(_ADR, 0x00140004)
1317 Name(_PRW, Package() {0x18, 4})
1324 /* Describe the Southbridge devices */
1326 Name(_ADR, 0x00110000)
1327 #include "acpi/sata.asl"
1331 Name(_ADR, 0x00120000)
1332 Name(_PRW, Package() {0x0B, 3})
1336 Name(_ADR, 0x00120002)
1337 Name(_PRW, Package() {0x0B, 3})
1341 Name(_ADR, 0x00130000)
1342 Name(_PRW, Package() {0x0B, 3})
1346 Name(_ADR, 0x00130002)
1347 Name(_PRW, Package() {0x0B, 3})
1351 Name(_ADR, 0x00160000)
1352 Name(_PRW, Package() {0x0B, 3})
1356 Name(_ADR, 0x00160002)
1357 Name(_PRW, Package() {0x0B, 3})
1361 Name(_ADR, 0x00140005)
1362 Name(_PRW, Package() {0x0B, 3})
1366 Name(_ADR, 0x00140000)
1369 /* Primary (and only) IDE channel */
1371 Name(_ADR, 0x00140001)
1372 #include "acpi/ide.asl"
1376 Name(_ADR, 0x00140002)
1377 OperationRegion(AZPD, PCI_Config, 0x00, 0x100)
1378 Field(AZPD, AnyAcc, NoLock, Preserve) {
1402 If(LEqual(OSTP,3)){ /* If we are running Linux */
1411 Name(_ADR, 0x00140003)
1413 * DBGO("\\_SB\\PCI0\\LpcIsaBr\\_INI\n")
1414 } */ /* End Method(_SB.SBRDG._INI) */
1416 /* Real Time Clock Device */
1418 Name(_HID, EISAID("PNP0B01")) /* AT Real Time Clock */
1419 Name(_CRS, ResourceTemplate() {
1421 IO(Decode16,0x0070, 0x0070, 0, 2)
1422 /* IO(Decode16,0x0070, 0x0070, 0, 4) */
1424 } /* End Device(_SB.PCI0.LpcIsaBr.RTC0) */
1426 Device(TMR) { /* Timer */
1427 Name(_HID,EISAID("PNP0100")) /* System Timer */
1428 Name(_CRS, ResourceTemplate() {
1430 IO(Decode16, 0x0040, 0x0040, 0, 4)
1431 /* IO(Decode16, 0x0048, 0x0048, 0, 4) */
1433 } /* End Device(_SB.PCI0.LpcIsaBr.TMR) */
1435 Device(SPKR) { /* Speaker */
1436 Name(_HID,EISAID("PNP0800")) /* AT style speaker */
1437 Name(_CRS, ResourceTemplate() {
1438 IO(Decode16, 0x0061, 0x0061, 0, 1)
1440 } /* End Device(_SB.PCI0.LpcIsaBr.SPKR) */
1443 Name(_HID,EISAID("PNP0000")) /* AT Interrupt Controller */
1444 Name(_CRS, ResourceTemplate() {
1446 IO(Decode16,0x0020, 0x0020, 0, 2)
1447 IO(Decode16,0x00A0, 0x00A0, 0, 2)
1448 /* IO(Decode16, 0x00D0, 0x00D0, 0x10, 0x02) */
1449 /* IO(Decode16, 0x04D0, 0x04D0, 0x10, 0x02) */
1451 } /* End Device(_SB.PCI0.LpcIsaBr.PIC) */
1453 Device(MAD) { /* 8257 DMA */
1454 Name(_HID,EISAID("PNP0200")) /* Hardware Device ID */
1455 Name(_CRS, ResourceTemplate() {
1456 DMA(Compatibility,BusMaster,Transfer8){4}
1457 IO(Decode16, 0x0000, 0x0000, 0x10, 0x10)
1458 IO(Decode16, 0x0081, 0x0081, 0x00, 0x03)
1459 IO(Decode16, 0x0087, 0x0087, 0x00, 0x01)
1460 IO(Decode16, 0x0089, 0x0089, 0x00, 0x03)
1461 IO(Decode16, 0x008F, 0x008F, 0x00, 0x01)
1462 IO(Decode16, 0x00C0, 0x00C0, 0x10, 0x20)
1463 }) /* End Name(_SB.PCI0.LpcIsaBr.MAD._CRS) */
1464 } /* End Device(_SB.PCI0.LpcIsaBr.MAD) */
1467 Name(_HID,EISAID("PNP0C04")) /* Math Coprocessor */
1468 Name(_CRS, ResourceTemplate() {
1469 IO(Decode16, 0x00F0, 0x00F0, 0, 0x10)
1472 } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */
1475 Name(_HID,EISAID("PNP0103"))
1476 Name(CRS,ResourceTemplate() {
1477 Memory32Fixed(ReadOnly,0xFED00000, 0x00000400, HPT) /* 1kb reserved space */
1480 Return(0x0F) /* sata is visible */
1483 CreateDwordField(CRS, ^HPT._BAS, HPBA)
1487 } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */
1492 Name(_ADR, 0x00140004)
1493 } /* end HostPciBr */
1496 Name(_ADR, 0x00140005)
1497 } /* end Ac97audio */
1500 Name(_ADR, 0x00140006)
1501 } /* end Ac97modem */
1503 Name(CRES, ResourceTemplate() {
1504 IO(Decode16, 0x0CF8, 0x0CF8, 1, 8)
1506 WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1507 0x0000, /* address granularity */
1508 0x0000, /* range minimum */
1509 0x0CF7, /* range maximum */
1510 0x0000, /* translation */
1514 WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1515 0x0000, /* address granularity */
1516 0x0D00, /* range minimum */
1517 0xFFFF, /* range maximum */
1518 0x0000, /* translation */
1522 Memory32Fixed(READWRITE, 0, 0xA0000, BSMM)
1523 Memory32Fixed(READONLY, 0x000A0000, 0x00020000, VGAM) /* VGA memory space */
1524 Memory32Fixed(READONLY, 0x000C0000, 0x00020000, EMM1) /* Assume C0000-E0000 empty */
1525 Memory32Fixed(READONLY, 0x000E0000, 0x00020000, RDBS) /* BIOS ROM area */
1527 /* DRAM Memory from 1MB to TopMem */
1528 Memory32Fixed(READWRITE, 0x00100000, 0, DMLO) /* 1MB to TopMem */
1530 /* BIOS space just below 4GB */
1532 ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1533 0x00, /* Granularity */
1534 0x00000000, /* Min */
1535 0x00000000, /* Max */
1536 0x00000000, /* Translation */
1537 0x00000000, /* Max-Min, RLEN */
1542 /* DRAM memory from 4GB to TopMem2 */
1543 QWORDMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1544 0xFFFFFFFF, /* Granularity */
1545 0x00000000, /* Min */
1546 0x00000000, /* Max */
1547 0x00000000, /* Translation */
1548 0x00000000, /* Max-Min, RLEN */
1553 /* BIOS space just below 16EB */
1554 QWORDMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1555 0xFFFFFFFF, /* Granularity */
1556 0x00000000, /* Min */
1557 0x00000000, /* Max */
1558 0x00000000, /* Translation */
1559 0x00000000, /* Max-Min, RLEN */
1564 /* memory space for PCI BARs below 4GB */
1565 Memory32Fixed(ReadOnly, 0x00000000, 0x00000000, MMIO)
1566 }) /* End Name(_SB.PCI0.CRES) */
1569 /* DBGO("\\_SB\\PCI0\\_CRS\n") */
1571 CreateDWordField(CRES, ^EMM1._BAS, EM1B)
1572 CreateDWordField(CRES, ^EMM1._LEN, EM1L)
1573 CreateDWordField(CRES, ^DMLO._BAS, DMLB)
1574 CreateDWordField(CRES, ^DMLO._LEN, DMLL)
1575 CreateDWordField(CRES, ^PCBM._MIN, PBMB)
1576 CreateDWordField(CRES, ^PCBM._LEN, PBML)
1578 CreateQWordField(CRES, ^DMHI._MIN, DMHB)
1579 CreateQWordField(CRES, ^DMHI._LEN, DMHL)
1580 CreateQWordField(CRES, ^PEBM._MIN, EBMB)
1581 CreateQWordField(CRES, ^PEBM._LEN, EBML)
1583 If(LGreater(LOMH, 0xC0000)){
1584 Store(0xC0000, EM1B) /* Hole above C0000 and below E0000 */
1585 Subtract(LOMH, 0xC0000, EM1L) /* subtract start, assumes allocation from C0000 going up */
1588 /* Set size of memory from 1MB to TopMem */
1589 Subtract(TOM1, 0x100000, DMLL)
1592 * If(LNotEqual(TOM2, 0x00000000)){
1593 * Store(0x100000000,DMHB) DRAM from 4GB to TopMem2
1594 * Subtract(TOM2, 0x100000000, DMHL)
1598 /* If there is no memory above 4GB, put the BIOS just below 4GB */
1599 If(LEqual(TOM2, 0x00000000)){
1600 Store(PBAD,PBMB) /* Reserve the "BIOS" space */
1603 Else { /* Otherwise, put the BIOS just below 16EB */
1604 ShiftLeft(PBAD,16,EBMB) /* Reserve the "BIOS" space */
1608 CreateDWordField(CRES, ^MMIO._BAS, MM1B)
1609 CreateDWordField(CRES, ^MMIO._LEN, MM1L)
1611 * Declare memory between TOM1 and 4GB as available
1613 * Use ShiftLeft to avoid 64bit constant (for XP).
1614 * This will work even if the OS does 32bit arithmetic, as
1615 * 32bit (0x00000000 - TOM1) will wrap and give the same
1616 * result as 64bit (0x100000000 - TOM1).
1619 ShiftLeft(0x10000000, 4, Local0)
1620 Subtract(Local0, TOM1, Local0)
1623 Return(CRES) /* note to change the Name buffer */
1624 } /* end of Method(_SB.PCI0._CRS) */
1628 * FIRST METHOD CALLED UPON BOOT
1630 * 1. If debugging, print current OS and ACPI interpreter.
1631 * 2. Get PCI Interrupt routing from ACPI VSM, this
1632 * value is based on user choice in BIOS setup.
1635 /* DBGO("\\_SB\\_INI\n") */
1636 /* DBGO(" DSDT.ASL code from ") */
1637 /* DBGO(__DATE__) */
1639 /* DBGO(__TIME__) */
1640 /* DBGO("\n Sleep states supported: ") */
1642 /* DBGO(" \\_OS=") */
1644 /* DBGO("\n \\_REV=") */
1648 /* Determine the OS we're running on */
1651 /* On older chips, clear PciExpWakeDisEn */
1652 /*if (LLessEqual(\SBRI, 0x13)) {
1656 } /* End Method(_SB._INI) */
1657 } /* End Device(PCI0) */
1659 Device(PWRB) { /* Start Power button device */
1660 Name(_HID, EISAID("PNP0C0C"))
1662 Name(_PRW, Package () {3, 0x04}) /* wake from S1-S4 */
1663 Name(_STA, 0x0B) /* sata is invisible */
1665 } /* End \_SB scope */
1669 /* DBGO("\\_SI\\_SST\n") */
1670 /* DBGO(" New Indicator state: ") */
1674 } /* End Scope SI */
1678 OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
1679 Field (SMB0, ByteAcc, NoLock, Preserve) {
1680 HSTS, 8, /* SMBUS status */
1681 SSTS, 8, /* SMBUS slave status */
1682 HCNT, 8, /* SMBUS control */
1683 HCMD, 8, /* SMBUS host cmd */
1684 HADD, 8, /* SMBUS address */
1685 DAT0, 8, /* SMBUS data0 */
1686 DAT1, 8, /* SMBUS data1 */
1687 BLKD, 8, /* SMBUS block data */
1688 SCNT, 8, /* SMBUS slave control */
1689 SCMD, 8, /* SMBUS shaow cmd */
1690 SEVT, 8, /* SMBUS slave event */
1691 SDAT, 8 /* SMBUS slave data */
1694 Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
1696 Store (0xFA, Local0)
1697 While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
1705 Method (SWTC, 1, NotSerialized) {
1706 Store (Arg0, Local0)
1707 Store (0x07, Local2)
1709 While (LEqual (Local1, One)) {
1710 Store (And (HSTS, 0x1E), Local3)
1711 If (LNotEqual (Local3, Zero)) { /* read sucess */
1712 If (LEqual (Local3, 0x02)) {
1713 Store (Zero, Local2)
1716 Store (Zero, Local1)
1719 If (LLess (Local0, 0x0A)) { /* read failure */
1720 Store (0x10, Local2)
1721 Store (Zero, Local1)
1724 Sleep (0x0A) /* 10 ms, try again */
1725 Subtract (Local0, 0x0A, Local0)
1733 Method (SMBR, 3, NotSerialized) {
1734 Store (0x07, Local0)
1735 If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
1736 Store (WCLR (), Local0) /* clear SMBUS status register before read data */
1737 If (LEqual (Local0, Zero)) {
1743 Store (Or (ShiftLeft (Arg1, One), One), HADD)
1745 If (LEqual (Arg0, 0x07)) {
1746 Store (0x48, HCNT) /* read byte */
1749 Store (SWTC (0x03E8), Local1) /* 1000 ms */
1750 If (LEqual (Local1, Zero)) {
1751 If (LEqual (Arg0, 0x07)) {
1752 Store (DAT0, Local0)
1756 Store (Local1, Local0)
1762 /* DBGO("the value of SMBusData0 register ") */
1778 Method(_AC0,0) { /* Active Cooling 0 (0=highest fan speed) */
1779 /* DBGO("\\_TZ\\TZ00\\_AC0\n") */
1780 Return(Add(0, 2730))
1782 Method(_AL0,0) { /* Returns package of cooling device to turn on */
1783 /* DBGO("\\_TZ\\TZ00\\_AL0\n") */
1784 Return(Package() {\_TZ.TZ00.FAN0})
1787 Name(_HID, EISAID("PNP0C0B"))
1788 Name(_PR0, Package() {PFN0})
1791 PowerResource(PFN0,0,0) {
1797 /* DBGO("\\_TZ\\TZ00\\FAN0 _ON\n") */
1800 /* DBGO("\\_TZ\\TZ00\\FAN0 _OFF\n") */
1804 Method(_HOT,0) { /* return hot temp in tenths degree Kelvin */
1805 /* DBGO("\\_TZ\\TZ00\\_HOT\n") */
1806 Return (Add (THOT, KELV))
1808 Method(_CRT,0) { /* return critical temp in tenths degree Kelvin */
1809 /* DBGO("\\_TZ\\TZ00\\_CRT\n") */
1810 Return (Add (TCRT, KELV))
1812 Method(_TMP,0) { /* return current temp of this zone */
1813 Store (SMBR (0x07, 0x4C,, 0x00), Local0)
1814 If (LGreater (Local0, 0x10)) {
1815 Store (Local0, Local1)
1818 Add (Local0, THOT, Local0)
1819 Return (Add (400, KELV))
1822 Store (SMBR (0x07, 0x4C, 0x01), Local0)
1823 /* only the two MSBs in the external temperature low byte are used, resolution 0.25. We ignore it */
1824 /* Store (SMBR (0x07, 0x4C, 0x10), Local2) */
1825 If (LGreater (Local0, 0x10)) {
1826 If (LGreater (Local0, Local1)) {
1827 Store (Local0, Local1)
1830 Multiply (Local1, 10, Local1)
1831 Return (Add (Local1, KELV))
1834 Add (Local0, THOT, Local0)
1835 Return (Add (400 , KELV))
1842 /* End of ASL file */