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 "H8QGI ", /* 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, CONFIG_MMCONF_BASE_ADDRESS) /* Base address of PCIe config space */
40 Name(PCLN, Multiply(0x100000, CONFIG_MMCONF_BUS_NUMBER)) /* Length of PCIe config space, 1MB each bus */
42 Name(HPBA, 0xFED00000) /* Base address of HPET table */
43 Name(SSFG, 0x0D) /* S1 support: bit 0, S2 Support: bit 1, etc. S0 & S5 assumed */
45 /* USB overcurrent mapping pins. */
57 /* Some global data */
58 Name(OSTP, 3) /* Assume nothing. WinXp = 1, Vista = 2, Linux = 3, WinCE = 4 */
59 Name(OSV, Ones) /* Assume nothing */
60 Name(PMOD, One) /* Assume APIC */
66 Scope (\_PR) { /* define processor scope */
68 P000, /* name space name */
69 0x00, /* Unique number for this processor */
70 0x810, /* PBLK system I/O address !hardcoded! */
71 0x06 /* PBLKLEN for boot processor */
73 //#include "acpi/cpstate.asl"
75 Processor(P001, 0x01, 0x00000000, 0x00) {}
76 Processor(P002, 0x02, 0x00000000, 0x00) {}
77 Processor(P003, 0x03, 0x00000000, 0x00) {}
78 Processor(P004, 0x04, 0x00000000, 0x00) {}
79 Processor(P005, 0x05, 0x00000000, 0x00) {}
80 Processor(P006, 0x06, 0x00000000, 0x00) {}
81 Processor(P007, 0x07, 0x00000000, 0x00) {}
82 Processor(P008, 0x08, 0x00000000, 0x00) {}
83 Processor(P009, 0x09, 0x00000000, 0x00) {}
84 Processor(P00A, 0x0A, 0x00000000, 0x00) {}
85 Processor(P00B, 0x0B, 0x00000000, 0x00) {}
86 Processor(P00C, 0x0C, 0x00000000, 0x00) {}
87 Processor(P00D, 0x0D, 0x00000000, 0x00) {}
88 Processor(P00E, 0x0E, 0x00000000, 0x00) {}
89 Processor(P00F, 0x0F, 0x00000000, 0x00) {}
90 Processor(P010, 0x10, 0x00000000, 0x00) {}
91 Processor(P011, 0x11, 0x00000000, 0x00) {}
92 Processor(P012, 0x12, 0x00000000, 0x00) {}
93 Processor(P013, 0x13, 0x00000000, 0x00) {}
94 Processor(P014, 0x14, 0x00000000, 0x00) {}
95 Processor(P015, 0x15, 0x00000000, 0x00) {}
96 Processor(P016, 0x16, 0x00000000, 0x00) {}
97 Processor(P017, 0x17, 0x00000000, 0x00) {}
98 Processor(P018, 0x18, 0x00000000, 0x00) {}
99 Processor(P019, 0x19, 0x00000000, 0x00) {}
100 Processor(P01A, 0x1A, 0x00000000, 0x00) {}
101 Processor(P01B, 0x1B, 0x00000000, 0x00) {}
102 Processor(P01C, 0x1C, 0x00000000, 0x00) {}
103 Processor(P01D, 0x1D, 0x00000000, 0x00) {}
104 Processor(P01E, 0x1E, 0x00000000, 0x00) {}
105 Processor(P01F, 0x1F, 0x00000000, 0x00) {}
106 Processor(P020, 0x20, 0x00000000, 0x00) {}
107 Processor(P021, 0x21, 0x00000000, 0x00) {}
108 Processor(P022, 0x22, 0x00000000, 0x00) {}
109 Processor(P023, 0x23, 0x00000000, 0x00) {}
110 Processor(P024, 0x24, 0x00000000, 0x00) {}
111 Processor(P025, 0x25, 0x00000000, 0x00) {}
112 Processor(P026, 0x26, 0x00000000, 0x00) {}
113 Processor(P027, 0x27, 0x00000000, 0x00) {}
114 Processor(P028, 0x28, 0x00000000, 0x00) {}
115 Processor(P029, 0x29, 0x00000000, 0x00) {}
116 Processor(P02A, 0x2A, 0x00000000, 0x00) {}
117 Processor(P02B, 0x2B, 0x00000000, 0x00) {}
118 Processor(P02C, 0x2C, 0x00000000, 0x00) {}
119 Processor(P02D, 0x2D, 0x00000000, 0x00) {}
120 Processor(P02E, 0x2E, 0x00000000, 0x00) {}
121 Processor(P02F, 0x2F, 0x00000000, 0x00) {}
131 } /* End _PR scope */
133 /* PIC IRQ mapping registers, C00h-C01h */
134 OperationRegion(PRQM, SystemIO, 0x00000C00, 0x00000002)
135 Field(PRQM, ByteAcc, NoLock, Preserve) {
137 PRQD, 0x00000008, /* Offset: 1h */
139 IndexField(PRQI, PRQD, ByteAcc, NoLock, Preserve) {
140 PINA, 0x00000008, /* Index 0 */
141 PINB, 0x00000008, /* Index 1 */
142 PINC, 0x00000008, /* Index 2 */
143 PIND, 0x00000008, /* Index 3 */
144 AINT, 0x00000008, /* Index 4 */
145 SINT, 0x00000008, /* Index 5 */
146 , 0x00000008, /* Index 6 */
147 AAUD, 0x00000008, /* Index 7 */
148 AMOD, 0x00000008, /* Index 8 */
149 PINE, 0x00000008, /* Index 9 */
150 PINF, 0x00000008, /* Index A */
151 PING, 0x00000008, /* Index B */
152 PINH, 0x00000008, /* Index C */
155 /* PCI Error control register */
156 OperationRegion(PERC, SystemIO, 0x00000C14, 0x00000001)
157 Field(PERC, ByteAcc, NoLock, Preserve) {
164 /* Client Management index/data registers */
165 OperationRegion(CMT, SystemIO, 0x00000C50, 0x00000002)
166 Field(CMT, ByteAcc, NoLock, Preserve) {
168 /* Client Management Data register */
176 /* GPM Port register */
177 OperationRegion(GPT, SystemIO, 0x00000C52, 0x00000001)
178 Field(GPT, ByteAcc, NoLock, Preserve) {
189 /* Flash ROM program enable register */
190 OperationRegion(FRE, SystemIO, 0x00000C6F, 0x00000001)
191 Field(FRE, ByteAcc, NoLock, Preserve) {
196 /* PM2 index/data registers */
197 OperationRegion(PM2R, SystemIO, 0x00000CD0, 0x00000002)
198 Field(PM2R, ByteAcc, NoLock, Preserve) {
203 /* Power Management I/O registers */
204 OperationRegion(PIOR, SystemIO, 0x00000CD6, 0x00000002)
205 Field(PIOR, ByteAcc, NoLock, Preserve) {
209 IndexField (PIOI, PIOD, ByteAcc, NoLock, Preserve) {
210 Offset(0x00), /* MiscControl */
214 Offset(0x01), /* MiscStatus */
218 Offset(0x04), /* SmiWakeUpEventEnable3 */
221 Offset(0x07), /* SmiWakeUpEventStatus3 */
224 Offset(0x10), /* AcpiEnable */
227 Offset(0x1C), /* ProgramIoEnable */
234 Offset(0x1D), /* IOMonitorStatus */
241 Offset(0x20), /* AcpiPmEvtBlk */
243 Offset(0x36), /* GEvtLevelConfig */
247 Offset(0x37), /* GPMLevelConfig0 */
254 Offset(0x38), /* GPMLevelConfig1 */
261 Offset(0x3B), /* PMEStatus1 */
270 Offset(0x55), /* SoftPciRst */
278 /* Offset(0x61), */ /* Options_1 */
282 Offset(0x65), /* UsbPMControl */
285 Offset(0x68), /* MiscEnable68 */
289 Offset(0x92), /* GEVENTIN */
292 Offset(0x96), /* GPM98IN */
295 Offset(0x9A), /* EnhanceControl */
298 Offset(0xA8), /* PIO7654Enable */
303 Offset(0xA9), /* PIO7654Status */
311 * First word is PM1_Status, Second word is PM1_Enable
313 OperationRegion(P1EB, SystemIO, APEB, 0x04)
314 Field(P1EB, ByteAcc, NoLock, Preserve) {
338 OperationRegion (GRAM, SystemMemory, 0x0400, 0x0100)
339 Field (GRAM, ByteAcc, Lock, Preserve)
346 /* PCIe Configuration Space for CONFIG_MMCONF_BUS_NUMBER busses */
347 OperationRegion(PCFG, SystemMemory, PCBA, PCLN)
348 Field(PCFG, ByteAcc, NoLock, Preserve) {
349 /* Byte offsets are computed using the following technique:
350 * ((bus number + 1) * ((device number * 8) * 4096)) + register offset
351 * The 8 comes from 8 functions per device, and 4096 bytes per function config space
353 Offset(0x00088024), /* Byte offset to SATA register 24h - Bus 0, Device 17, Function 0 */
355 Offset(0x00098042), /* Byte offset to OHCI0 register 42h - Bus 0, Device 19, Function 0 */
366 Offset(0x000A0004), /* Byte offset to SMBUS register 4h - Bus 0, Device 20, Function 0 */
369 Offset(0x000A0008), /* Byte offset to SMBUS register 8h - Bus 0, Device 20, Function 0 */
371 Offset(0x000A0014), /* Byte offset to SMBUS register 14h - Bus 0, Device 20, Function 0 */
373 Offset(0x000A0078), /* Byte offset to SMBUS register 78h - Bus 0, Device 20, Function 0 */
375 P92E, 1, /* Port92 decode enable */
378 OperationRegion(SB5, SystemMemory, STB5, 0x1000)
379 Field(SB5, AnyAcc, NoLock, Preserve){
381 Offset(0x120), /* Port 0 Task file status */
387 Offset(0x128), /* Port 0 Serial ATA status */
391 Offset(0x12C), /* Port 0 Serial ATA control */
393 Offset(0x130), /* Port 0 Serial ATA error */
398 offset(0x1A0), /* Port 1 Task file status */
404 Offset(0x1A8), /* Port 1 Serial ATA status */
408 Offset(0x1AC), /* Port 1 Serial ATA control */
410 Offset(0x1B0), /* Port 1 Serial ATA error */
415 Offset(0x220), /* Port 2 Task file status */
421 Offset(0x228), /* Port 2 Serial ATA status */
425 Offset(0x22C), /* Port 2 Serial ATA control */
427 Offset(0x230), /* Port 2 Serial ATA error */
432 Offset(0x2A0), /* Port 3 Task file status */
438 Offset(0x2A8), /* Port 3 Serial ATA status */
442 Offset(0x2AC), /* Port 3 Serial ATA control */
444 Offset(0x2B0), /* Port 3 Serial ATA error */
450 #include "acpi/routing.asl"
454 if(LNotEqual(OSTP, Ones)) {Return(OSTP)} /* OS version was already detected */
455 if(CondRefOf(\_OSI,Local1))
457 Store(1, OSTP) /* Assume some form of XP */
458 if (\_OSI("Windows 2006")) /* Vista */
463 If(WCMP(\_OS,"Linux")) {
464 Store(3, OSTP) /* Linux */
466 Store(4, OSTP) /* Gotta be WinCE */
472 Method(_PIC, 0x01, NotSerialized)
480 Method(CIRQ, 0x00, NotSerialized){
491 Name(IRQB, ResourceTemplate(){
492 IRQ(Level,ActiveLow,Shared){15}
495 Name(IRQP, ResourceTemplate(){
496 IRQ(Level,ActiveLow,Exclusive){3, 4, 5, 7, 10, 11, 12, 15}
499 Name(PITF, ResourceTemplate(){
500 IRQ(Level,ActiveLow,Exclusive){9}
504 Name(_HID, EISAID("PNP0C0F"))
509 Return(0x0B) /* sata is invisible */
511 Return(0x09) /* sata is disabled */
513 } /* End Method(_SB.INTA._STA) */
516 /* DBGO("\\_SB\\LNKA\\_DIS\n") */
518 } /* End Method(_SB.INTA._DIS) */
521 /* DBGO("\\_SB\\LNKA\\_PRS\n") */
523 } /* Method(_SB.INTA._PRS) */
526 /* DBGO("\\_SB\\LNKA\\_CRS\n") */
527 CreateWordField(IRQB, 0x1, IRQN)
528 ShiftLeft(1, PINA, IRQN)
530 } /* Method(_SB.INTA._CRS) */
533 /* DBGO("\\_SB\\LNKA\\_CRS\n") */
534 CreateWordField(ARG0, 1, IRQM)
536 /* Use lowest available IRQ */
537 FindSetRightBit(IRQM, Local0)
542 } /* End Method(_SB.INTA._SRS) */
543 } /* End Device(INTA) */
546 Name(_HID, EISAID("PNP0C0F"))
551 Return(0x0B) /* sata is invisible */
553 Return(0x09) /* sata is disabled */
555 } /* End Method(_SB.INTB._STA) */
558 /* DBGO("\\_SB\\LNKB\\_DIS\n") */
560 } /* End Method(_SB.INTB._DIS) */
563 /* DBGO("\\_SB\\LNKB\\_PRS\n") */
565 } /* Method(_SB.INTB._PRS) */
568 /* DBGO("\\_SB\\LNKB\\_CRS\n") */
569 CreateWordField(IRQB, 0x1, IRQN)
570 ShiftLeft(1, PINB, IRQN)
572 } /* Method(_SB.INTB._CRS) */
575 /* DBGO("\\_SB\\LNKB\\_CRS\n") */
576 CreateWordField(ARG0, 1, IRQM)
578 /* Use lowest available IRQ */
579 FindSetRightBit(IRQM, Local0)
584 } /* End Method(_SB.INTB._SRS) */
585 } /* End Device(INTB) */
588 Name(_HID, EISAID("PNP0C0F"))
593 Return(0x0B) /* sata is invisible */
595 Return(0x09) /* sata is disabled */
597 } /* End Method(_SB.INTC._STA) */
600 /* DBGO("\\_SB\\LNKC\\_DIS\n") */
602 } /* End Method(_SB.INTC._DIS) */
605 /* DBGO("\\_SB\\LNKC\\_PRS\n") */
607 } /* Method(_SB.INTC._PRS) */
610 /* DBGO("\\_SB\\LNKC\\_CRS\n") */
611 CreateWordField(IRQB, 0x1, IRQN)
612 ShiftLeft(1, PINC, IRQN)
614 } /* Method(_SB.INTC._CRS) */
617 /* DBGO("\\_SB\\LNKC\\_CRS\n") */
618 CreateWordField(ARG0, 1, IRQM)
620 /* Use lowest available IRQ */
621 FindSetRightBit(IRQM, Local0)
626 } /* End Method(_SB.INTC._SRS) */
627 } /* End Device(INTC) */
630 Name(_HID, EISAID("PNP0C0F"))
635 Return(0x0B) /* sata is invisible */
637 Return(0x09) /* sata is disabled */
639 } /* End Method(_SB.INTD._STA) */
642 /* DBGO("\\_SB\\LNKD\\_DIS\n") */
644 } /* End Method(_SB.INTD._DIS) */
647 /* DBGO("\\_SB\\LNKD\\_PRS\n") */
649 } /* Method(_SB.INTD._PRS) */
652 /* DBGO("\\_SB\\LNKD\\_CRS\n") */
653 CreateWordField(IRQB, 0x1, IRQN)
654 ShiftLeft(1, PIND, IRQN)
656 } /* Method(_SB.INTD._CRS) */
659 /* DBGO("\\_SB\\LNKD\\_CRS\n") */
660 CreateWordField(ARG0, 1, IRQM)
662 /* Use lowest available IRQ */
663 FindSetRightBit(IRQM, Local0)
668 } /* End Method(_SB.INTD._SRS) */
669 } /* End Device(INTD) */
672 Name(_HID, EISAID("PNP0C0F"))
677 Return(0x0B) /* sata is invisible */
679 Return(0x09) /* sata is disabled */
681 } /* End Method(_SB.INTE._STA) */
684 /* DBGO("\\_SB\\LNKE\\_DIS\n") */
686 } /* End Method(_SB.INTE._DIS) */
689 /* DBGO("\\_SB\\LNKE\\_PRS\n") */
691 } /* Method(_SB.INTE._PRS) */
694 /* DBGO("\\_SB\\LNKE\\_CRS\n") */
695 CreateWordField(IRQB, 0x1, IRQN)
696 ShiftLeft(1, PINE, IRQN)
698 } /* Method(_SB.INTE._CRS) */
701 /* DBGO("\\_SB\\LNKE\\_CRS\n") */
702 CreateWordField(ARG0, 1, IRQM)
704 /* Use lowest available IRQ */
705 FindSetRightBit(IRQM, Local0)
710 } /* End Method(_SB.INTE._SRS) */
711 } /* End Device(INTE) */
714 Name(_HID, EISAID("PNP0C0F"))
719 Return(0x0B) /* sata is invisible */
721 Return(0x09) /* sata is disabled */
723 } /* End Method(_SB.INTF._STA) */
726 /* DBGO("\\_SB\\LNKF\\_DIS\n") */
728 } /* End Method(_SB.INTF._DIS) */
731 /* DBGO("\\_SB\\LNKF\\_PRS\n") */
733 } /* Method(_SB.INTF._PRS) */
736 /* DBGO("\\_SB\\LNKF\\_CRS\n") */
737 CreateWordField(IRQB, 0x1, IRQN)
738 ShiftLeft(1, PINF, IRQN)
740 } /* Method(_SB.INTF._CRS) */
743 /* DBGO("\\_SB\\LNKF\\_CRS\n") */
744 CreateWordField(ARG0, 1, IRQM)
746 /* Use lowest available IRQ */
747 FindSetRightBit(IRQM, Local0)
752 } /* End Method(_SB.INTF._SRS) */
753 } /* End Device(INTF) */
756 Name(_HID, EISAID("PNP0C0F"))
761 Return(0x0B) /* sata is invisible */
763 Return(0x09) /* sata is disabled */
765 } /* End Method(_SB.INTG._STA) */
768 /* DBGO("\\_SB\\LNKG\\_DIS\n") */
770 } /* End Method(_SB.INTG._DIS) */
773 /* DBGO("\\_SB\\LNKG\\_PRS\n") */
775 } /* Method(_SB.INTG._CRS) */
778 /* DBGO("\\_SB\\LNKG\\_CRS\n") */
779 CreateWordField(IRQB, 0x1, IRQN)
780 ShiftLeft(1, PING, IRQN)
782 } /* Method(_SB.INTG._CRS) */
785 /* DBGO("\\_SB\\LNKG\\_CRS\n") */
786 CreateWordField(ARG0, 1, IRQM)
788 /* Use lowest available IRQ */
789 FindSetRightBit(IRQM, Local0)
794 } /* End Method(_SB.INTG._SRS) */
795 } /* End Device(INTG) */
798 Name(_HID, EISAID("PNP0C0F"))
803 Return(0x0B) /* sata is invisible */
805 Return(0x09) /* sata is disabled */
807 } /* End Method(_SB.INTH._STA) */
810 /* DBGO("\\_SB\\LNKH\\_DIS\n") */
812 } /* End Method(_SB.INTH._DIS) */
815 /* DBGO("\\_SB\\LNKH\\_PRS\n") */
817 } /* Method(_SB.INTH._CRS) */
820 /* DBGO("\\_SB\\LNKH\\_CRS\n") */
821 CreateWordField(IRQB, 0x1, IRQN)
822 ShiftLeft(1, PINH, IRQN)
824 } /* Method(_SB.INTH._CRS) */
827 /* DBGO("\\_SB\\LNKH\\_CRS\n") */
828 CreateWordField(ARG0, 1, IRQM)
830 /* Use lowest available IRQ */
831 FindSetRightBit(IRQM, Local0)
836 } /* End Method(_SB.INTH._SRS) */
837 } /* End Device(INTH) */
839 } /* End Scope(_SB) */
842 /* Supported sleep states: */
843 Name(\_S0, Package () {0x00, 0x00, 0x00, 0x00} ) /* (S0) - working state */
845 If (LAnd(SSFG, 0x01)) {
846 Name(\_S1, Package () {0x01, 0x01, 0x00, 0x00} ) /* (S1) - sleeping w/CPU context */
848 If (LAnd(SSFG, 0x02)) {
849 Name(\_S2, Package () {0x02, 0x02, 0x00, 0x00} ) /* (S2) - "light" Suspend to RAM */
851 If (LAnd(SSFG, 0x04)) {
852 Name(\_S3, Package () {0x03, 0x03, 0x00, 0x00} ) /* (S3) - Suspend to RAM */
854 If (LAnd(SSFG, 0x08)) {
855 Name(\_S4, Package () {0x04, 0x04, 0x00, 0x00} ) /* (S4) - Suspend to Disk */
858 Name(\_S5, Package () {0x05, 0x05, 0x00, 0x00} ) /* (S5) - Soft Off */
860 Name(\_SB.CSPS ,0) /* Current Sleep State (S0, S1, S2, S3, S4, S5) */
861 Name(CSMS, 0) /* Current System State */
863 /* Wake status package */
864 Name(WKST,Package(){Zero, Zero})
867 * \_PTS - Prepare to Sleep method
870 * Arg0=The value of the sleeping state S1=1, S2=2, etc
875 * The _PTS control method is executed at the beginning of the sleep process
876 * for S1-S5. The sleeping value is passed to the _PTS control method. This
877 * control method may be executed a relatively long time before entering the
878 * sleep state and the OS may abort the operation without notification to
879 * the ACPI driver. This method cannot modify the configuration or power
880 * state of any device in the system.
883 /* DBGO("\\_PTS\n") */
884 /* DBGO("From S0 to S") */
888 /* Don't allow PCIRST# to reset USB */
893 /* Clear sleep SMI status flag and enable sleep SMI trap. */
897 /* On older chips, clear PciExpWakeDisEn */
898 /*if (LLessEqual(\_SB.SBRI, 0x13)) {
903 /* Clear wake status structure. */
904 Store(0, Index(WKST,0))
905 Store(0, Index(WKST,1))
906 \_SB.PCI0.SIOS (Arg0)
907 } /* End Method(\_PTS) */
910 * The following method results in a "not a valid reserved NameSeg"
911 * warning so I have commented it out for the duration. It isn't
912 * used, so it could be removed.
915 * \_GTS OEM Going To Sleep method
918 * Arg0=The value of the sleeping state S1=1, S2=2
925 * DBGO("From S0 to S")
932 * \_BFS OEM Back From Sleep method
935 * Arg0=The value of the sleeping state S1=1, S2=2
941 /* DBGO("\\_BFS\n") */
944 /* DBGO(" to S0\n") */
948 * \_WAK System Wake method
951 * Arg0=The value of the sleeping state S1=1, S2=2
954 * Return package of 2 DWords
956 * 0x00000000 wake succeeded
957 * 0x00000001 Wake was signaled but failed due to lack of power
958 * 0x00000002 Wake was signaled but failed due to thermal condition
959 * Dword 2 - Power Supply state
960 * if non-zero the effective S-state the power supply entered
963 /* DBGO("\\_WAK\n") */
966 /* DBGO(" to S0\n") */
971 /* Restore PCIRST# so it resets USB */
976 /* Arbitrarily clear PciExpWakeStatus */
979 /* if(DeRefOf(Index(WKST,0))) {
980 * Store(0, Index(WKST,1))
982 * Store(Arg0, Index(WKST,1))
985 \_SB.PCI0.SIOW (Arg0)
987 } /* End Method(\_WAK) */
989 Scope(\_GPE) { /* Start Scope GPE */
990 /* General event 0 */
992 * DBGO("\\_GPE\\_L00\n")
996 /* General event 1 */
998 * DBGO("\\_GPE\\_L00\n")
1002 /* General event 2 */
1004 * DBGO("\\_GPE\\_L00\n")
1008 /* General event 3 */
1010 /* DBGO("\\_GPE\\_L00\n") */
1011 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1014 /* General event 4 */
1016 * DBGO("\\_GPE\\_L00\n")
1020 /* General event 5 */
1022 * DBGO("\\_GPE\\_L00\n")
1026 /* General event 6 - Used for GPM6, moved to USB.asl */
1028 * DBGO("\\_GPE\\_L00\n")
1032 /* General event 7 - Used for GPM7, moved to USB.asl */
1034 * DBGO("\\_GPE\\_L07\n")
1038 /* Legacy PM event */
1040 /* DBGO("\\_GPE\\_L08\n") */
1043 /* Temp warning (TWarn) event */
1045 /* DBGO("\\_GPE\\_L09\n") */
1046 Notify (\_TZ.TZ00, 0x80)
1051 * DBGO("\\_GPE\\_L0A\n")
1055 /* USB controller PME# */
1057 /* DBGO("\\_GPE\\_L0B\n") */
1058 Notify(\_SB.PCI0.UOH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1059 Notify(\_SB.PCI0.UOH2, 0x02) /* NOTIFY_DEVICE_WAKE */
1060 Notify(\_SB.PCI0.UOH3, 0x02) /* NOTIFY_DEVICE_WAKE */
1061 Notify(\_SB.PCI0.UOH4, 0x02) /* NOTIFY_DEVICE_WAKE */
1062 Notify(\_SB.PCI0.UOH5, 0x02) /* NOTIFY_DEVICE_WAKE */
1063 Notify(\_SB.PCI0.UEH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1064 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1067 /* AC97 controller PME# */
1069 * DBGO("\\_GPE\\_L0C\n")
1073 /* OtherTherm PME# */
1075 * DBGO("\\_GPE\\_L0D\n")
1079 /* GPM9 SCI event - Moved to USB.asl */
1081 * DBGO("\\_GPE\\_L0E\n")
1085 /* PCIe HotPlug event */
1087 * DBGO("\\_GPE\\_L0F\n")
1091 /* ExtEvent0 SCI event */
1093 /* DBGO("\\_GPE\\_L10\n") */
1097 /* ExtEvent1 SCI event */
1099 /* DBGO("\\_GPE\\_L11\n") */
1102 /* PCIe PME# event */
1104 * DBGO("\\_GPE\\_L12\n")
1108 /* GPM0 SCI event - Moved to USB.asl */
1110 * DBGO("\\_GPE\\_L13\n")
1114 /* GPM1 SCI event - Moved to USB.asl */
1116 * DBGO("\\_GPE\\_L14\n")
1120 /* GPM2 SCI event - Moved to USB.asl */
1122 * DBGO("\\_GPE\\_L15\n")
1126 /* GPM3 SCI event - Moved to USB.asl */
1128 * DBGO("\\_GPE\\_L16\n")
1132 /* GPM8 SCI event - Moved to USB.asl */
1134 * DBGO("\\_GPE\\_L17\n")
1138 /* GPIO0 or GEvent8 event */
1140 /* DBGO("\\_GPE\\_L18\n") */
1141 Notify(\_SB.PCI0.PBR2, 0x02) /* NOTIFY_DEVICE_WAKE */
1142 Notify(\_SB.PCI0.PBR4, 0x02) /* NOTIFY_DEVICE_WAKE */
1143 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1146 /* GPM4 SCI event - Moved to USB.asl */
1148 * DBGO("\\_GPE\\_L19\n")
1152 /* GPM5 SCI event - Moved to USB.asl */
1154 * DBGO("\\_GPE\\_L1A\n")
1158 /* Azalia SCI event */
1160 /* DBGO("\\_GPE\\_L1B\n") */
1161 Notify(\_SB.PCI0.AZHD, 0x02) /* NOTIFY_DEVICE_WAKE */
1162 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1165 /* GPM6 SCI event - Reassigned to _L06 */
1167 * DBGO("\\_GPE\\_L1C\n")
1171 /* GPM7 SCI event - Reassigned to _L07 */
1173 * DBGO("\\_GPE\\_L1D\n")
1177 /* GPIO2 or GPIO66 SCI event */
1179 * DBGO("\\_GPE\\_L1E\n")
1183 /* SATA SCI event - Moved to sata.asl */
1185 * DBGO("\\_GPE\\_L1F\n")
1189 } /* End Scope GPE */
1191 #include "acpi/usb.asl"
1194 Scope(\_SB) { /* Start \_SB scope */
1195 #include "../../../arch/x86/acpi/globutil.asl" /* global utility methods expected within the \_SB scope */
1198 /* Note: Only need HID on Primary Bus */
1200 External (TOM1) //assigned when update_ssdt()
1201 External (TOM2) /* (<real tom2> >> 20) to make it fit into 32 bit for XP */
1203 Name(_HID, EISAID("PNP0A03"))
1204 Name(_ADR, 0x00180000) /* Dev# = BSP Dev#, Func# = 0 */
1205 Method(_BBN, 0) { /* Bus number = 0 */
1209 /* DBGO("\\_SB\\PCI0\\_STA\n") */
1210 Return(0x0B) /* Status is visible */
1214 If(PMOD){ Return(APR0) } /* APIC mode */
1215 Return (PR0) /* PIC Mode */
1218 /* Describe the Northbridge devices */
1220 Name(_ADR, 0x00000000)
1223 /* The external GFX bridge */
1225 Name(_ADR, 0x00020000)
1226 Name(_PRW, Package() {0x18, 4})
1228 If(PMOD){ Return(APS2) } /* APIC mode */
1229 Return (PS2) /* PIC Mode */
1233 /* Dev3 is also an external GFX bridge */
1236 Name(_ADR, 0x00040000)
1237 Name(_PRW, Package() {0x18, 4})
1239 If(PMOD){ Return(APS4) } /* APIC mode */
1240 Return (PS4) /* PIC Mode */
1245 Name(_ADR, 0x000b0000)
1246 Name(_PRW, Package() {0x18, 4})
1248 If(PMOD){ Return(APSb) } /* APIC mode */
1249 Return (PSb) /* PIC Mode */
1254 Name(_ADR, 0x000c0000)
1255 Name(_PRW, Package() {0x18, 4})
1257 If(PMOD){ Return(APSc) } /* APIC mode */
1258 Return (PSc) /* PIC Mode */
1263 Name(_ADR, 0x000d0000)
1264 Name(_PRW, Package() {0x18, 4})
1266 If(PMOD){ Return(APSd) } /* APIC mode */
1267 Return (PSd) /* PIC Mode */
1271 /* Describe the Southbridge devices */
1273 Name(_ADR, 0x00110000)
1274 #include "acpi/sata.asl"
1278 Name(_ADR, 0x00130000)
1279 Name(_PRW, Package() {0x0B, 3})
1283 Name(_ADR, 0x00130001)
1284 Name(_PRW, Package() {0x0B, 3})
1288 Name(_ADR, 0x00130002)
1289 Name(_PRW, Package() {0x0B, 3})
1293 Name(_ADR, 0x00130003)
1294 Name(_PRW, Package() {0x0B, 3})
1298 Name(_ADR, 0x00130004)
1299 Name(_PRW, Package() {0x0B, 3})
1303 Name(_ADR, 0x00130005)
1304 Name(_PRW, Package() {0x0B, 3})
1308 Name(_ADR, 0x00140000)
1311 /* Primary (and only) IDE channel */
1313 Name(_ADR, 0x00140001)
1314 #include "acpi/ide.asl"
1318 Name(_ADR, 0x00140002)
1319 OperationRegion(AZPD, PCI_Config, 0x00, 0x100)
1320 Field(AZPD, AnyAcc, NoLock, Preserve) {
1344 If(LEqual(OSTP,3)){ /* If we are running Linux */
1353 Name(_ADR, 0x00140003)
1355 * DBGO("\\_SB\\PCI0\\LpcIsaBr\\_INI\n")
1356 } */ /* End Method(_SB.SBRDG._INI) */
1358 /* Real Time Clock Device */
1360 Name(_HID, EISAID("PNP0B00")) /* AT Real Time Clock (not PIIX4 compatible) */
1361 Name(_CRS, ResourceTemplate() {
1363 IO(Decode16,0x0070, 0x0070, 0, 2)
1364 /* IO(Decode16,0x0070, 0x0070, 0, 4) */
1366 } /* End Device(_SB.PCI0.LpcIsaBr.RTC0) */
1368 Device(TMR) { /* Timer */
1369 Name(_HID,EISAID("PNP0100")) /* System Timer */
1370 Name(_CRS, ResourceTemplate() {
1372 IO(Decode16, 0x0040, 0x0040, 0, 4)
1373 /* IO(Decode16, 0x0048, 0x0048, 0, 4) */
1375 } /* End Device(_SB.PCI0.LpcIsaBr.TMR) */
1377 Device(SPKR) { /* Speaker */
1378 Name(_HID,EISAID("PNP0800")) /* AT style speaker */
1379 Name(_CRS, ResourceTemplate() {
1380 IO(Decode16, 0x0061, 0x0061, 0, 1)
1382 } /* End Device(_SB.PCI0.LpcIsaBr.SPKR) */
1385 Name(_HID,EISAID("PNP0000")) /* AT Interrupt Controller */
1386 Name(_CRS, ResourceTemplate() {
1388 IO(Decode16,0x0020, 0x0020, 0, 2)
1389 IO(Decode16,0x00A0, 0x00A0, 0, 2)
1390 /* IO(Decode16, 0x00D0, 0x00D0, 0x10, 0x02) */
1391 /* IO(Decode16, 0x04D0, 0x04D0, 0x10, 0x02) */
1393 } /* End Device(_SB.PCI0.LpcIsaBr.PIC) */
1395 Device(MAD) { /* 8257 DMA */
1396 Name(_HID,EISAID("PNP0200")) /* Hardware Device ID */
1397 Name(_CRS, ResourceTemplate() {
1398 DMA(Compatibility,BusMaster,Transfer8){4}
1399 IO(Decode16, 0x0000, 0x0000, 0x10, 0x10)
1400 IO(Decode16, 0x0081, 0x0081, 0x01, 0x03)
1401 IO(Decode16, 0x0087, 0x0087, 0x01, 0x01)
1402 IO(Decode16, 0x0089, 0x0089, 0x01, 0x03)
1403 IO(Decode16, 0x008F, 0x008F, 0x01, 0x01)
1404 IO(Decode16, 0x00C0, 0x00C0, 0x10, 0x20)
1405 }) /* End Name(_SB.PCI0.LpcIsaBr.MAD._CRS) */
1406 } /* End Device(_SB.PCI0.LpcIsaBr.MAD) */
1409 Name(_HID,EISAID("PNP0C04")) /* Math Coprocessor */
1410 Name(_CRS, ResourceTemplate() {
1411 IO(Decode16, 0x00F0, 0x00F0, 0, 0x10)
1414 } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */
1417 Name (_HID, EisaId ("PNP0F13"))
1418 Name (_CRS, ResourceTemplate () {
1419 IO (Decode16, 0x0060, 0x0060, 0x00, 0x01)
1420 IO (Decode16, 0x0064, 0x0064, 0x00, 0x01)
1423 Method (_STA, 0, NotSerialized) {
1424 And (FLG0, 0x04, Local0)
1425 If (LEqual (Local0, 0x04)) {
1434 Name (_HID, EisaId ("PNP0303"))
1435 Method (_STA, 0, NotSerialized) {
1436 And (FLG0, 0x04, Local0)
1437 If (LEqual (Local0, 0x04)) {
1443 Name (_CRS, ResourceTemplate () {
1444 IO (Decode16, 0x0060, 0x0060, 0x00, 0x01)
1445 IO (Decode16, 0x0064, 0x0064, 0x00, 0x01)
1450 #if 0 //acpi_create_hpet
1452 Name(_HID,EISAID("PNP0103"))
1453 Name(CRS, ResourceTemplate() {
1457 Memory32Fixed(ReadOnly,0xFED00000, 0x00000400, MNT) /* 1kb reserved space */
1459 Method(_STA, 0, NotSerialized) {
1460 Return(0x0F) /* sata is visible */
1462 Method(_CRS, 0, NotSerialized) {
1463 CreateDwordField(CRS, ^MNT._BAS, HPT)
1467 } /* End Device(_SB.PCI0.LIBR.HPET) */
1472 Name(_ADR, 0x00140004)
1473 } /* end HostPciBr */
1476 Name(_ADR, 0x00140005)
1477 } /* end Ac97audio */
1480 Name(_ADR, 0x00140006)
1481 } /* end Ac97modem */
1483 /* ITE8718 Support */
1484 OperationRegion (IOID, SystemIO, 0x2E, 0x02) /* sometimes it is 0x4E */
1485 Field (IOID, ByteAcc, NoLock, Preserve)
1487 SIOI, 8, SIOD, 8 /* 0x2E and 0x2F */
1490 IndexField (SIOI, SIOD, ByteAcc, NoLock, Preserve)
1493 LDN, 8, /* Logical Device Number */
1495 CID1, 8, /* Chip ID Byte 1, 0x87 */
1496 CID2, 8, /* Chip ID Byte 2, 0x12 */
1498 ACTR, 8, /* Function activate */
1500 APC0, 8, /* APC/PME Event Enable Register */
1501 APC1, 8, /* APC/PME Status Register */
1502 APC2, 8, /* APC/PME Control Register 1 */
1503 APC3, 8, /* Environment Controller Special Configuration Register */
1504 APC4, 8 /* APC/PME Control Register 2 */
1507 /* Enter the 8718 MB PnP Mode */
1513 Store(0x55, SIOI) /* 8718 magic number */
1515 /* Exit the 8718 MB PnP Mode */
1522 * Keyboard PME is routed to SB700 Gevent3. We can wake
1523 * up the system by pressing the key.
1527 /* We only enable KBD PME for S5. */
1528 If (LLess (Arg0, 0x05))
1531 /* DBGO("8718F\n") */
1534 Store (One, ACTR) /* Enable EC */
1538 */ /* falling edge. which mode? Not sure. */
1541 Store (0x08, APC1) /* clear PME status, Use 0x18 for mouse & KBD */
1543 Store (0x08, APC0) /* enable PME, Use 0x18 for mouse & KBD */
1552 Store (Zero, APC0) /* disable keyboard PME */
1554 Store (0xFF, APC1) /* clear keyboard PME status */
1558 Name (CRS, ResourceTemplate ()
1560 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
1561 0x0000, // Granularity
1562 0x0000, // Range Minimum
1563 0x00FF, // Range Maximum
1564 0x0000, // Translation Offset
1568 0x0CF8, // Range Minimum
1569 0x0CF8, // Range Maximum
1574 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1575 0x0000, // Granularity
1576 0x0000, // Range Minimum
1577 0x03AF, // Range Maximum
1578 0x0000, // Translation Offset
1581 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1582 0x0000, // Granularity
1583 0x03E0, // Range Minimum
1584 0x0CF7, // Range Maximum
1585 0x0000, // Translation Offset
1589 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1590 0x0000, // Granularity
1591 0x03B0, // Range Minimum
1592 0x03BB, // Range Maximum
1593 0x0000, // Translation Offset
1596 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1597 0x0000, // Granularity
1598 0x03C0, // Range Minimum
1599 0x03DF, // Range Maximum
1600 0x0000, // Translation Offset
1603 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1604 0x0000, // Granularity
1605 0x9000, // Range Minimum
1606 0xefff, // Range Maximum
1607 0x0000, // Translation Offset
1610 Memory32Fixed(READONLY, 0x000A0000, 0x00020000, VGAM) // VGA memory space
1612 Memory32Fixed (ReadOnly,
1613 0xE0000000, // Address Base
1614 0x10000000, // Address Length, (1MB each Bus, 256 Buses by default)
1616 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1617 0x00000000, // Granularity
1618 0xF0000000, // Range Minimum
1619 0xFFFFFFFF, // Range Maximum
1620 0x00000000, // Translation Offset
1621 0x10000000, // Length
1622 ,, , AddressRangeMemory, TypeStatic)
1625 Method (_CRS, 0, NotSerialized)
1627 CreateDWordField (CRS, \_SB.PCI0.MMIO._BAS, BAS1)
1628 CreateDWordField (CRS, \_SB.PCI0.MMIO._LEN, LEN1)
1637 * FIRST METHOD CALLED UPON BOOT
1639 * 1. If debugging, print current OS and ACPI interpreter.
1640 * 2. Get PCI Interrupt routing from ACPI VSM, this
1641 * value is based on user choice in BIOS setup.
1644 /* DBGO("\\_SB\\_INI\n") */
1645 /* DBGO(" DSDT.ASL code from ") */
1646 /* DBGO(__DATE__) */
1648 /* DBGO(__TIME__) */
1649 /* DBGO("\n Sleep states supported: ") */
1651 /* DBGO(" \\_OS=") */
1653 /* DBGO("\n \\_REV=") */
1657 /* Determine the OS we're running on */
1659 /* On older chips, clear PciExpWakeDisEn */
1660 /*if (LLessEqual(\SBRI, 0x13)) {
1664 } /* End Method(_SB._INI) */
1665 } /* End Device(PCI0) */
1667 Device(PWRB) { /* Start Power button device */
1668 Name(_HID, EISAID("PNP0C0C"))
1670 Name(_PRW, Package () {3, 0x04}) /* wake from S1-S4 */
1671 Name(_STA, 0x0B) /* sata is invisible */
1673 } /* End \_SB scope */
1677 /* DBGO("\\_SI\\_SST\n") */
1678 /* DBGO(" New Indicator state: ") */
1682 } /* End Scope SI */
1686 OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
1687 Field (SMB0, ByteAcc, NoLock, Preserve) {
1688 HSTS, 8, /* SMBUS status */
1689 SSTS, 8, /* SMBUS slave status */
1690 HCNT, 8, /* SMBUS control */
1691 HCMD, 8, /* SMBUS host cmd */
1692 HADD, 8, /* SMBUS address */
1693 DAT0, 8, /* SMBUS data0 */
1694 DAT1, 8, /* SMBUS data1 */
1695 BLKD, 8, /* SMBUS block data */
1696 SCNT, 8, /* SMBUS slave control */
1697 SCMD, 8, /* SMBUS shaow cmd */
1698 SEVT, 8, /* SMBUS slave event */
1699 SDAT, 8 /* SMBUS slave data */
1702 Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
1704 Store (0xFA, Local0)
1705 While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
1713 Method (SWTC, 1, NotSerialized) {
1714 Store (Arg0, Local0)
1715 Store (0x07, Local2)
1717 While (LEqual (Local1, One)) {
1718 Store (And (HSTS, 0x1E), Local3)
1719 If (LNotEqual (Local3, Zero)) { /* read sucess */
1720 If (LEqual (Local3, 0x02)) {
1721 Store (Zero, Local2)
1724 Store (Zero, Local1)
1727 If (LLess (Local0, 0x0A)) { /* read failure */
1728 Store (0x10, Local2)
1729 Store (Zero, Local1)
1732 Sleep (0x0A) /* 10 ms, try again */
1733 Subtract (Local0, 0x0A, Local0)
1741 Method (SMBR, 3, NotSerialized) {
1742 Store (0x07, Local0)
1743 If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
1744 Store (WCLR (), Local0) /* clear SMBUS status register before read data */
1745 If (LEqual (Local0, Zero)) {
1751 Store (Or (ShiftLeft (Arg1, One), One), HADD)
1753 If (LEqual (Arg0, 0x07)) {
1754 Store (0x48, HCNT) /* read byte */
1757 Store (SWTC (0x03E8), Local1) /* 1000 ms */
1758 If (LEqual (Local1, Zero)) {
1759 If (LEqual (Arg0, 0x07)) {
1760 Store (DAT0, Local0)
1764 Store (Local1, Local0)
1770 /* DBGO("the value of SMBusData0 register ") */
1786 Method(_AC0,0) { /* Active Cooling 0 (0=highest fan speed) */
1787 /* DBGO("\\_TZ\\TZ00\\_AC0\n") */
1788 Return(Add(0, 2730))
1790 Method(_AL0,0) { /* Returns package of cooling device to turn on */
1791 /* DBGO("\\_TZ\\TZ00\\_AL0\n") */
1792 Return(Package() {\_TZ.TZ00.FAN0})
1795 Name(_HID, EISAID("PNP0C0B"))
1796 Name(_PR0, Package() {PFN0})
1799 PowerResource(PFN0,0,0) {
1805 /* DBGO("\\_TZ\\TZ00\\FAN0 _ON\n") */
1808 /* DBGO("\\_TZ\\TZ00\\FAN0 _OFF\n") */
1812 Method(_HOT,0) { /* return hot temp in tenths degree Kelvin */
1813 /* DBGO("\\_TZ\\TZ00\\_HOT\n") */
1814 Return (Add (THOT, KELV))
1816 Method(_CRT,0) { /* return critical temp in tenths degree Kelvin */
1817 /* DBGO("\\_TZ\\TZ00\\_CRT\n") */
1818 Return (Add (TCRT, KELV))
1820 Method(_TMP,0) { /* return current temp of this zone */
1821 Store (SMBR (0x07, 0x4C,, 0x00), Local0)
1822 If (LGreater (Local0, 0x10)) {
1823 Store (Local0, Local1)
1826 Add (Local0, THOT, Local0)
1827 Return (Add (400, KELV))
1830 Store (SMBR (0x07, 0x4C, 0x01), Local0)
1831 /* only the two MSBs in the external temperature low byte are used, resolution 0.25. We ignore it */
1832 /* Store (SMBR (0x07, 0x4C, 0x10), Local2) */
1833 If (LGreater (Local0, 0x10)) {
1834 If (LGreater (Local0, Local1)) {
1835 Store (Local0, Local1)
1838 Multiply (Local1, 10, Local1)
1839 Return (Add (Local1, KELV))
1842 Add (Local0, THOT, Local0)
1843 Return (Add (400 , KELV))
1849 /* End of ASL file */