2 * This file is part of the coreboot project.
4 * Copyright (C) 2008 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 0x01, /* DSDT Revision */
26 "DBM690T ", /* TABLE ID */
27 0x00010001 /* OEM Revision */
29 { /* Start of ASL file */
30 /* Include ("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(TOM2, 0x0) /* Top of RAM memory above 4GB (>> 16) */
36 Name(LOMH, 0x0) /* Start of unused memory in C0000-E0000 range */
37 Name(PBAD, 0x0) /* Address of BIOS area (If TOM2 != 0, Addr >> 16) */
38 Name(PBLN, 0x0) /* Length of BIOS area */
40 Name(PCBA, 0xE0000000) /* Base address of PCIe config space */
41 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. */
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 ("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 ("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 ("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 ("cpstate.asl")
99 /* Some global data */
100 Name(OSTP, 3) /* Assume nothing. WinXp = 1, Vista = 2, Linux = 3, WinCE = 4 */
101 Name(OSV, Ones) /* Assume nothing */
102 Name(PMOD, One) /* Assume APIC */
104 /* PIC IRQ mapping registers, C00h-C01h */
105 OperationRegion(PRQM, SystemIO, 0x00000C00, 0x00000002)
106 Field(PRQM, ByteAcc, NoLock, Preserve) {
108 PRQD, 0x00000008, /* Offset: 1h */
110 IndexField(PRQI, PRQD, ByteAcc, NoLock, Preserve) {
111 PINA, 0x00000008, /* Index 0 */
112 PINB, 0x00000008, /* Index 1 */
113 PINC, 0x00000008, /* Index 2 */
114 PIND, 0x00000008, /* Index 3 */
115 AINT, 0x00000008, /* Index 4 */
116 SINT, 0x00000008, /* Index 5 */
117 , 0x00000008, /* Index 6 */
118 AAUD, 0x00000008, /* Index 7 */
119 AMOD, 0x00000008, /* Index 8 */
120 PINE, 0x00000008, /* Index 9 */
121 PINF, 0x00000008, /* Index A */
122 PING, 0x00000008, /* Index B */
123 PINH, 0x00000008, /* Index C */
126 /* PCI Error control register */
127 OperationRegion(PERC, SystemIO, 0x00000C14, 0x00000001)
128 Field(PERC, ByteAcc, NoLock, Preserve) {
135 /* Client Management index/data registers */
136 OperationRegion(CMT, SystemIO, 0x00000C50, 0x00000002)
137 Field(CMT, ByteAcc, NoLock, Preserve) {
139 /* Client Management Data register */
147 /* GPM Port register */
148 OperationRegion(GPT, SystemIO, 0x00000C52, 0x00000001)
149 Field(GPT, ByteAcc, NoLock, Preserve) {
160 /* Flash ROM program enable register */
161 OperationRegion(FRE, SystemIO, 0x00000C6F, 0x00000001)
162 Field(FRE, ByteAcc, NoLock, Preserve) {
167 /* PM2 index/data registers */
168 OperationRegion(PM2R, SystemIO, 0x00000CD0, 0x00000002)
169 Field(PM2R, ByteAcc, NoLock, Preserve) {
174 /* Power Management I/O registers */
175 OperationRegion(PIOR, SystemIO, 0x00000CD6, 0x00000002)
176 Field(PIOR, ByteAcc, NoLock, Preserve) {
180 IndexField (PIOI, PIOD, ByteAcc, NoLock, Preserve) {
181 Offset(0x00), /* MiscControl */
185 Offset(0x01), /* MiscStatus */
189 Offset(0x04), /* SmiWakeUpEventEnable3 */
192 Offset(0x07), /* SmiWakeUpEventStatus3 */
195 Offset(0x10), /* AcpiEnable */
198 Offset(0x1C), /* ProgramIoEnable */
205 Offset(0x1D), /* IOMonitorStatus */
212 Offset(0x20), /* AcpiPmEvtBlk */
214 Offset(0x36), /* GEvtLevelConfig */
218 Offset(0x37), /* GPMLevelConfig0 */
225 Offset(0x38), /* GPMLevelConfig1 */
232 Offset(0x3B), /* PMEStatus1 */
241 Offset(0x55), /* SoftPciRst */
249 /* Offset(0x61), */ /* Options_1 */
253 Offset(0x65), /* UsbPMControl */
256 Offset(0x68), /* MiscEnable68 */
260 Offset(0x92), /* GEVENTIN */
263 Offset(0x96), /* GPM98IN */
266 Offset(0x9A), /* EnhanceControl */
269 Offset(0xA8), /* PIO7654Enable */
274 Offset(0xA9), /* PIO7654Status */
282 * First word is PM1_Status, Second word is PM1_Enable
284 OperationRegion(P1EB, SystemIO, APEB, 0x04)
285 Field(P1EB, ByteAcc, NoLock, Preserve) {
311 /* PCIe Configuration Space for 16 busses */
312 OperationRegion(PCFG, SystemMemory, PCBA, 0x01000000) /* Each bus consumes 1MB */
313 Field(PCFG, ByteAcc, NoLock, Preserve) {
314 /* Byte offsets are computed using the following technique:
315 * ((bus number + 1) * ((device number * 8) * 4096)) + register offset
316 * The 8 comes from 8 functions per device, and 4096 bytes per function config space
318 Offset(0x00090024), /* Byte offset to SATA register 24h - Bus 0, Device 18, Function 0 */
320 Offset(0x00098042), /* Byte offset to OHCI0 register 42h - Bus 0, Device 19, Function 0 */
331 Offset(0x000A0004), /* Byte offset to SMBUS register 4h - Bus 0, Device 20, Function 0 */
334 Offset(0x000A0008), /* Byte offset to SMBUS register 8h - Bus 0, Device 20, Function 0 */
336 Offset(0x000A0014), /* Byte offset to SMBUS register 14h - Bus 0, Device 20, Function 0 */
338 Offset(0x000A0078), /* Byte offset to SMBUS register 78h - Bus 0, Device 20, Function 0 */
340 P92E, 1, /* Port92 decode enable */
343 OperationRegion(SB5, SystemMemory, STB5, 0x1000)
344 Field(SB5, AnyAcc, NoLock, Preserve)
347 Offset(0x120), /* Port 0 Task file status */
353 Offset(0x128), /* Port 0 Serial ATA status */
357 Offset(0x12C), /* Port 0 Serial ATA control */
359 Offset(0x130), /* Port 0 Serial ATA error */
364 offset(0x1A0), /* Port 1 Task file status */
370 Offset(0x1A8), /* Port 1 Serial ATA status */
374 Offset(0x1AC), /* Port 1 Serial ATA control */
376 Offset(0x1B0), /* Port 1 Serial ATA error */
381 Offset(0x220), /* Port 2 Task file status */
387 Offset(0x228), /* Port 2 Serial ATA status */
391 Offset(0x22C), /* Port 2 Serial ATA control */
393 Offset(0x230), /* Port 2 Serial ATA error */
398 Offset(0x2A0), /* Port 3 Task file status */
404 Offset(0x2A8), /* Port 3 Serial ATA status */
408 Offset(0x2AC), /* Port 3 Serial ATA control */
410 Offset(0x2B0), /* Port 3 Serial ATA error */
416 Include ("routing.asl")
422 if(LNotEqual(OSTP, Ones)) {Return(OSTP)} /* OS version was already detected */
424 if(CondRefOf(\_OSI,Local1))
426 Store(1, OSTP) /* Assume some form of XP */
427 if (\_OSI("Windows 2006")) /* Vista */
432 If(WCMP(\_OS,"Linux")) {
433 Store(3, OSTP) /* Linux */
435 Store(4, OSTP) /* Gotta be WinCE */
441 Method(_PIC, 0x01, NotSerialized)
450 Method(CIRQ, 0x00, NotSerialized)
462 Name(IRQB, ResourceTemplate(){
463 IRQ(Level,ActiveLow,Shared){15}
466 Name(IRQP, ResourceTemplate(){
467 IRQ(Level,ActiveLow,Exclusive){3, 4, 5, 7, 10, 11, 12, 15}
470 Name(PITF, ResourceTemplate(){
471 IRQ(Level,ActiveLow,Exclusive){9}
475 Name(_HID, EISAID("PNP0C0F"))
480 Return(0x0B) /* sata is invisible */
482 Return(0x09) /* sata is disabled */
484 } /* End Method(_SB.INTA._STA) */
487 /* DBGO("\\_SB\\LNKA\\_DIS\n") */
489 } /* End Method(_SB.INTA._DIS) */
492 /* DBGO("\\_SB\\LNKA\\_PRS\n") */
494 } /* Method(_SB.INTA._PRS) */
497 /* DBGO("\\_SB\\LNKA\\_CRS\n") */
498 CreateWordField(IRQB, 0x1, IRQN)
499 ShiftLeft(1, PINA, IRQN)
501 } /* Method(_SB.INTA._CRS) */
504 /* DBGO("\\_SB\\LNKA\\_CRS\n") */
505 CreateWordField(ARG0, 1, IRQM)
507 /* Use lowest available IRQ */
508 FindSetRightBit(IRQM, Local0)
513 } /* End Method(_SB.INTA._SRS) */
514 } /* End Device(INTA) */
517 Name(_HID, EISAID("PNP0C0F"))
522 Return(0x0B) /* sata is invisible */
524 Return(0x09) /* sata is disabled */
526 } /* End Method(_SB.INTB._STA) */
529 /* DBGO("\\_SB\\LNKB\\_DIS\n") */
531 } /* End Method(_SB.INTB._DIS) */
534 /* DBGO("\\_SB\\LNKB\\_PRS\n") */
536 } /* Method(_SB.INTB._PRS) */
539 /* DBGO("\\_SB\\LNKB\\_CRS\n") */
540 CreateWordField(IRQB, 0x1, IRQN)
541 ShiftLeft(1, PINB, IRQN)
543 } /* Method(_SB.INTB._CRS) */
546 /* DBGO("\\_SB\\LNKB\\_CRS\n") */
547 CreateWordField(ARG0, 1, IRQM)
549 /* Use lowest available IRQ */
550 FindSetRightBit(IRQM, Local0)
555 } /* End Method(_SB.INTB._SRS) */
556 } /* End Device(INTB) */
559 Name(_HID, EISAID("PNP0C0F"))
564 Return(0x0B) /* sata is invisible */
566 Return(0x09) /* sata is disabled */
568 } /* End Method(_SB.INTC._STA) */
571 /* DBGO("\\_SB\\LNKC\\_DIS\n") */
573 } /* End Method(_SB.INTC._DIS) */
576 /* DBGO("\\_SB\\LNKC\\_PRS\n") */
578 } /* Method(_SB.INTC._PRS) */
581 /* DBGO("\\_SB\\LNKC\\_CRS\n") */
582 CreateWordField(IRQB, 0x1, IRQN)
583 ShiftLeft(1, PINC, IRQN)
585 } /* Method(_SB.INTC._CRS) */
588 /* DBGO("\\_SB\\LNKC\\_CRS\n") */
589 CreateWordField(ARG0, 1, IRQM)
591 /* Use lowest available IRQ */
592 FindSetRightBit(IRQM, Local0)
597 } /* End Method(_SB.INTC._SRS) */
598 } /* End Device(INTC) */
601 Name(_HID, EISAID("PNP0C0F"))
606 Return(0x0B) /* sata is invisible */
608 Return(0x09) /* sata is disabled */
610 } /* End Method(_SB.INTD._STA) */
613 /* DBGO("\\_SB\\LNKD\\_DIS\n") */
615 } /* End Method(_SB.INTD._DIS) */
618 /* DBGO("\\_SB\\LNKD\\_PRS\n") */
620 } /* Method(_SB.INTD._PRS) */
623 /* DBGO("\\_SB\\LNKD\\_CRS\n") */
624 CreateWordField(IRQB, 0x1, IRQN)
625 ShiftLeft(1, PIND, IRQN)
627 } /* Method(_SB.INTD._CRS) */
630 /* DBGO("\\_SB\\LNKD\\_CRS\n") */
631 CreateWordField(ARG0, 1, IRQM)
633 /* Use lowest available IRQ */
634 FindSetRightBit(IRQM, Local0)
639 } /* End Method(_SB.INTD._SRS) */
640 } /* End Device(INTD) */
643 Name(_HID, EISAID("PNP0C0F"))
648 Return(0x0B) /* sata is invisible */
650 Return(0x09) /* sata is disabled */
652 } /* End Method(_SB.INTE._STA) */
655 /* DBGO("\\_SB\\LNKE\\_DIS\n") */
657 } /* End Method(_SB.INTE._DIS) */
660 /* DBGO("\\_SB\\LNKE\\_PRS\n") */
662 } /* Method(_SB.INTE._PRS) */
665 /* DBGO("\\_SB\\LNKE\\_CRS\n") */
666 CreateWordField(IRQB, 0x1, IRQN)
667 ShiftLeft(1, PINE, IRQN)
669 } /* Method(_SB.INTE._CRS) */
672 /* DBGO("\\_SB\\LNKE\\_CRS\n") */
673 CreateWordField(ARG0, 1, IRQM)
675 /* Use lowest available IRQ */
676 FindSetRightBit(IRQM, Local0)
681 } /* End Method(_SB.INTE._SRS) */
682 } /* End Device(INTE) */
685 Name(_HID, EISAID("PNP0C0F"))
690 Return(0x0B) /* sata is invisible */
692 Return(0x09) /* sata is disabled */
694 } /* End Method(_SB.INTF._STA) */
697 /* DBGO("\\_SB\\LNKF\\_DIS\n") */
699 } /* End Method(_SB.INTF._DIS) */
702 /* DBGO("\\_SB\\LNKF\\_PRS\n") */
704 } /* Method(_SB.INTF._PRS) */
707 /* DBGO("\\_SB\\LNKF\\_CRS\n") */
708 CreateWordField(IRQB, 0x1, IRQN)
709 ShiftLeft(1, PINF, IRQN)
711 } /* Method(_SB.INTF._CRS) */
714 /* DBGO("\\_SB\\LNKF\\_CRS\n") */
715 CreateWordField(ARG0, 1, IRQM)
717 /* Use lowest available IRQ */
718 FindSetRightBit(IRQM, Local0)
723 } /* End Method(_SB.INTF._SRS) */
724 } /* End Device(INTF) */
727 Name(_HID, EISAID("PNP0C0F"))
732 Return(0x0B) /* sata is invisible */
734 Return(0x09) /* sata is disabled */
736 } /* End Method(_SB.INTG._STA) */
739 /* DBGO("\\_SB\\LNKG\\_DIS\n") */
741 } /* End Method(_SB.INTG._DIS) */
744 /* DBGO("\\_SB\\LNKG\\_PRS\n") */
746 } /* Method(_SB.INTG._CRS) */
749 /* DBGO("\\_SB\\LNKG\\_CRS\n") */
750 CreateWordField(IRQB, 0x1, IRQN)
751 ShiftLeft(1, PING, IRQN)
753 } /* Method(_SB.INTG._CRS) */
756 /* DBGO("\\_SB\\LNKG\\_CRS\n") */
757 CreateWordField(ARG0, 1, IRQM)
759 /* Use lowest available IRQ */
760 FindSetRightBit(IRQM, Local0)
765 } /* End Method(_SB.INTG._SRS) */
766 } /* End Device(INTG) */
769 Name(_HID, EISAID("PNP0C0F"))
774 Return(0x0B) /* sata is invisible */
776 Return(0x09) /* sata is disabled */
778 } /* End Method(_SB.INTH._STA) */
781 /* DBGO("\\_SB\\LNKH\\_DIS\n") */
783 } /* End Method(_SB.INTH._DIS) */
786 /* DBGO("\\_SB\\LNKH\\_PRS\n") */
788 } /* Method(_SB.INTH._CRS) */
791 /* DBGO("\\_SB\\LNKH\\_CRS\n") */
792 CreateWordField(IRQB, 0x1, IRQN)
793 ShiftLeft(1, PINH, IRQN)
795 } /* Method(_SB.INTH._CRS) */
798 /* DBGO("\\_SB\\LNKH\\_CRS\n") */
799 CreateWordField(ARG0, 1, IRQM)
801 /* Use lowest available IRQ */
802 FindSetRightBit(IRQM, Local0)
807 } /* End Method(_SB.INTH._SRS) */
808 } /* End Device(INTH) */
810 } /* End Scope(_SB) */
813 /* Supported sleep states: */
814 Name(\_S0, Package () {0x00, 0x00, 0x00, 0x00} ) /* (S0) - working state */
816 If (LAnd(SSFG, 0x01)) {
817 Name(\_S1, Package () {0x01, 0x01, 0x00, 0x00} ) /* (S1) - sleeping w/CPU context */
819 If (LAnd(SSFG, 0x02)) {
820 Name(\_S2, Package () {0x02, 0x02, 0x00, 0x00} ) /* (S2) - "light" Suspend to RAM */
822 If (LAnd(SSFG, 0x04)) {
823 Name(\_S3, Package () {0x03, 0x03, 0x00, 0x00} ) /* (S3) - Suspend to RAM */
825 If (LAnd(SSFG, 0x08)) {
826 Name(\_S4, Package () {0x04, 0x04, 0x00, 0x00} ) /* (S4) - Suspend to Disk */
829 Name(\_S5, Package () {0x05, 0x05, 0x00, 0x00} ) /* (S5) - Soft Off */
831 Name(\_SB.CSPS ,0) /* Current Sleep State (S0, S1, S2, S3, S4, S5) */
832 Name(CSMS, 0) /* Current System State */
834 /* Wake status package */
835 Name(WKST,Package(){Zero, Zero})
838 * \_PTS - Prepare to Sleep method
841 * Arg0=The value of the sleeping state S1=1, S2=2, etc
846 * The _PTS control method is executed at the beginning of the sleep process
847 * for S1-S5. The sleeping value is passed to the _PTS control method. This
848 * control method may be executed a relatively long time before entering the
849 * sleep state and the OS may abort the operation without notification to
850 * the ACPI driver. This method cannot modify the configuration or power
851 * state of any device in the system.
854 /* DBGO("\\_PTS\n") */
855 /* DBGO("From S0 to S") */
859 /* Don't allow PCIRST# to reset USB */
864 /* Clear sleep SMI status flag and enable sleep SMI trap. */
868 /* On older chips, clear PciExpWakeDisEn */
869 /*if (LLessEqual(\_SB.SBRI, 0x13)) {
874 /* Clear wake status structure. */
875 Store(0, Index(WKST,0))
876 Store(0, Index(WKST,1))
877 \_SB.PCI0.SIOS (Arg0)
878 } /* End Method(\_PTS) */
881 * The following method results in a "not a valid reserved NameSeg"
882 * warning so I have commented it out for the duration. It isn't
883 * used, so it could be removed.
886 * \_GTS OEM Going To Sleep method
889 * Arg0=The value of the sleeping state S1=1, S2=2
896 * DBGO("From S0 to S")
903 * \_BFS OEM Back From Sleep method
906 * Arg0=The value of the sleeping state S1=1, S2=2
912 /* DBGO("\\_BFS\n") */
915 /* DBGO(" to S0\n") */
919 * \_WAK System Wake method
922 * Arg0=The value of the sleeping state S1=1, S2=2
925 * Return package of 2 DWords
927 * 0x00000000 wake succeeded
928 * 0x00000001 Wake was signaled but failed due to lack of power
929 * 0x00000002 Wake was signaled but failed due to thermal condition
930 * Dword 2 - Power Supply state
931 * if non-zero the effective S-state the power supply entered
934 /* DBGO("\\_WAK\n") */
937 /* DBGO(" to S0\n") */
942 /* Restore PCIRST# so it resets USB */
947 /* Arbitrarily clear PciExpWakeStatus */
950 /* if(DeRefOf(Index(WKST,0))) {
951 * Store(0, Index(WKST,1))
953 * Store(Arg0, Index(WKST,1))
956 \_SB.PCI0.SIOW (Arg0)
958 } /* End Method(\_WAK) */
960 Scope(\_GPE) { /* Start Scope GPE */
961 /* General event 0 */
963 * DBGO("\\_GPE\\_L00\n")
967 /* General event 1 */
969 * DBGO("\\_GPE\\_L00\n")
973 /* General event 2 */
975 * DBGO("\\_GPE\\_L00\n")
979 /* General event 3 */
981 /* DBGO("\\_GPE\\_L00\n") */
982 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
985 /* General event 4 */
987 * DBGO("\\_GPE\\_L00\n")
991 /* General event 5 */
993 * DBGO("\\_GPE\\_L00\n")
997 /* General event 6 - Used for GPM6, moved to USB.asl */
999 * DBGO("\\_GPE\\_L00\n")
1003 /* General event 7 - Used for GPM7, moved to USB.asl */
1005 * DBGO("\\_GPE\\_L07\n")
1009 /* Legacy PM event */
1011 /* DBGO("\\_GPE\\_L08\n") */
1014 /* Temp warning (TWarn) event */
1016 /* DBGO("\\_GPE\\_L09\n") */
1017 Notify (\_TZ.TZ00, 0x80)
1022 * DBGO("\\_GPE\\_L0A\n")
1026 /* USB controller PME# */
1028 /* DBGO("\\_GPE\\_L0B\n") */
1029 Notify(\_SB.PCI0.UOH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1030 Notify(\_SB.PCI0.UOH2, 0x02) /* NOTIFY_DEVICE_WAKE */
1031 Notify(\_SB.PCI0.UOH3, 0x02) /* NOTIFY_DEVICE_WAKE */
1032 Notify(\_SB.PCI0.UOH4, 0x02) /* NOTIFY_DEVICE_WAKE */
1033 Notify(\_SB.PCI0.UOH5, 0x02) /* NOTIFY_DEVICE_WAKE */
1034 Notify(\_SB.PCI0.UEH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1035 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1038 /* AC97 controller PME# */
1040 * DBGO("\\_GPE\\_L0C\n")
1044 /* OtherTherm PME# */
1046 * DBGO("\\_GPE\\_L0D\n")
1050 /* GPM9 SCI event - Moved to USB.asl */
1052 * DBGO("\\_GPE\\_L0E\n")
1056 /* PCIe HotPlug event */
1058 * DBGO("\\_GPE\\_L0F\n")
1062 /* ExtEvent0 SCI event */
1064 /* DBGO("\\_GPE\\_L10\n") */
1068 /* ExtEvent1 SCI event */
1070 /* DBGO("\\_GPE\\_L11\n") */
1073 /* PCIe PME# event */
1075 * DBGO("\\_GPE\\_L12\n")
1079 /* GPM0 SCI event - Moved to USB.asl */
1081 * DBGO("\\_GPE\\_L13\n")
1085 /* GPM1 SCI event - Moved to USB.asl */
1087 * DBGO("\\_GPE\\_L14\n")
1091 /* GPM2 SCI event - Moved to USB.asl */
1093 * DBGO("\\_GPE\\_L15\n")
1097 /* GPM3 SCI event - Moved to USB.asl */
1099 * DBGO("\\_GPE\\_L16\n")
1103 /* GPM8 SCI event - Moved to USB.asl */
1105 * DBGO("\\_GPE\\_L17\n")
1109 /* GPIO0 or GEvent8 event */
1111 /* DBGO("\\_GPE\\_L18\n") */
1112 Notify(\_SB.PCI0.PBR2, 0x02) /* NOTIFY_DEVICE_WAKE */
1113 Notify(\_SB.PCI0.PBR4, 0x02) /* NOTIFY_DEVICE_WAKE */
1114 Notify(\_SB.PCI0.PBR5, 0x02) /* NOTIFY_DEVICE_WAKE */
1115 Notify(\_SB.PCI0.PBR6, 0x02) /* NOTIFY_DEVICE_WAKE */
1116 Notify(\_SB.PCI0.PBR7, 0x02) /* NOTIFY_DEVICE_WAKE */
1117 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1120 /* GPM4 SCI event - Moved to USB.asl */
1122 * DBGO("\\_GPE\\_L19\n")
1126 /* GPM5 SCI event - Moved to USB.asl */
1128 * DBGO("\\_GPE\\_L1A\n")
1132 /* Azalia SCI event */
1134 /* DBGO("\\_GPE\\_L1B\n") */
1135 Notify(\_SB.PCI0.AZHD, 0x02) /* NOTIFY_DEVICE_WAKE */
1136 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1139 /* GPM6 SCI event - Reassigned to _L06 */
1141 * DBGO("\\_GPE\\_L1C\n")
1145 /* GPM7 SCI event - Reassigned to _L07 */
1147 * DBGO("\\_GPE\\_L1D\n")
1151 /* GPIO2 or GPIO66 SCI event */
1153 * DBGO("\\_GPE\\_L1E\n")
1157 /* SATA SCI event - Moved to sata.asl */
1159 * DBGO("\\_GPE\\_L1F\n")
1163 } /* End Scope GPE */
1168 Scope(\_SB) { /* Start \_SB scope */
1169 Include ("globutil.asl") /* global utility methods expected within the \_SB scope */
1172 /* Note: Only need HID on Primary Bus */
1175 Name(_HID, EISAID("PNP0A03"))
1176 Name(_ADR, 0x00180000) /* Dev# = BSP Dev#, Func# = 0 */
1177 Method(_BBN, 0) { /* Bus number = 0 */
1181 /* DBGO("\\_SB\\PCI0\\_STA\n") */
1182 Return(0x0B) /* Status is visible */
1186 If(PMOD){ Return(APR0) } /* APIC mode */
1187 Return (PR0) /* PIC Mode */
1190 /* Describe the Northbridge devices */
1192 Name(_ADR, 0x00000000)
1195 /* The internal GFX bridge */
1197 Name(_ADR, 0x00010000)
1198 Name(_PRW, Package() {0x18, 4})
1204 /* The external GFX bridge */
1206 Name(_ADR, 0x00020000)
1207 Name(_PRW, Package() {0x18, 4})
1209 If(PMOD){ Return(APS2) } /* APIC mode */
1210 Return (PS2) /* PIC Mode */
1214 /* Dev3 is also an external GFX bridge, not used in Herring */
1217 Name(_ADR, 0x00040000)
1218 Name(_PRW, Package() {0x18, 4})
1220 If(PMOD){ Return(APS4) } /* APIC mode */
1221 Return (PS4) /* PIC Mode */
1226 Name(_ADR, 0x00050000)
1227 Name(_PRW, Package() {0x18, 4})
1229 If(PMOD){ Return(APS5) } /* APIC mode */
1230 Return (PS5) /* PIC Mode */
1235 Name(_ADR, 0x00060000)
1236 Name(_PRW, Package() {0x18, 4})
1238 If(PMOD){ Return(APS6) } /* APIC mode */
1239 Return (PS6) /* PIC Mode */
1243 /* The onboard EtherNet chip */
1245 Name(_ADR, 0x00070000)
1246 Name(_PRW, Package() {0x18, 4})
1248 If(PMOD){ Return(APS7) } /* APIC mode */
1249 Return (PS7) /* PIC Mode */
1254 /* PCI slot 1, 2, 3 */
1256 Name(_ADR, 0x00140004)
1257 Name(_PRW, Package() {0x18, 4})
1264 /* Describe the Southbridge devices */
1266 Name(_ADR, 0x00120000)
1267 Include ("sata.asl")
1271 Name(_ADR, 0x00130000)
1272 Name(_PRW, Package() {0x0B, 3})
1276 Name(_ADR, 0x00130001)
1277 Name(_PRW, Package() {0x0B, 3})
1281 Name(_ADR, 0x00130002)
1282 Name(_PRW, Package() {0x0B, 3})
1286 Name(_ADR, 0x00130003)
1287 Name(_PRW, Package() {0x0B, 3})
1291 Name(_ADR, 0x00130004)
1292 Name(_PRW, Package() {0x0B, 3})
1296 Name(_ADR, 0x00130005)
1297 Name(_PRW, Package() {0x0B, 3})
1301 Name(_ADR, 0x00140000)
1304 /* Primary (and only) IDE channel */
1306 Name(_ADR, 0x00140001)
1311 Name(_ADR, 0x00140002)
1312 OperationRegion(AZPD, PCI_Config, 0x00, 0x100)
1313 Field(AZPD, AnyAcc, NoLock, Preserve) {
1337 If(LEqual(OSTP,3)){ /* If we are running Linux */
1346 Name(_ADR, 0x00140003)
1348 * DBGO("\\_SB\\PCI0\\LpcIsaBr\\_INI\n")
1349 } */ /* End Method(_SB.SBRDG._INI) */
1351 /* Real Time Clock Device */
1353 Name(_HID, EISAID("PNP0B01")) /* AT Real Time Clock */
1354 Name(_CRS, ResourceTemplate() {
1356 IO(Decode16,0x0070, 0x0070, 0, 2)
1357 /* IO(Decode16,0x0070, 0x0070, 0, 4) */
1359 } /* End Device(_SB.PCI0.LpcIsaBr.RTC0) */
1361 Device(TMR) { /* Timer */
1362 Name(_HID,EISAID("PNP0100")) /* System Timer */
1363 Name(_CRS, ResourceTemplate() {
1365 IO(Decode16, 0x0040, 0x0040, 0, 4)
1366 /* IO(Decode16, 0x0048, 0x0048, 0, 4) */
1368 } /* End Device(_SB.PCI0.LpcIsaBr.TMR) */
1370 Device(SPKR) { /* Speaker */
1371 Name(_HID,EISAID("PNP0800")) /* AT style speaker */
1372 Name(_CRS, ResourceTemplate() {
1373 IO(Decode16, 0x0061, 0x0061, 0, 1)
1375 } /* End Device(_SB.PCI0.LpcIsaBr.SPKR) */
1378 Name(_HID,EISAID("PNP0000")) /* AT Interrupt Controller */
1379 Name(_CRS, ResourceTemplate() {
1381 IO(Decode16,0x0020, 0x0020, 0, 2)
1382 IO(Decode16,0x00A0, 0x00A0, 0, 2)
1383 /* IO(Decode16, 0x00D0, 0x00D0, 0x10, 0x02) */
1384 /* IO(Decode16, 0x04D0, 0x04D0, 0x10, 0x02) */
1386 } /* End Device(_SB.PCI0.LpcIsaBr.PIC) */
1388 Device(MAD) { /* 8257 DMA */
1389 Name(_HID,EISAID("PNP0200")) /* Hardware Device ID */
1390 Name(_CRS, ResourceTemplate() {
1391 DMA(Compatibility,BusMaster,Transfer8){4}
1392 IO(Decode16, 0x0000, 0x0000, 0x10, 0x10)
1393 IO(Decode16, 0x0081, 0x0081, 0x10, 0x03)
1394 IO(Decode16, 0x0087, 0x0087, 0x10, 0x01)
1395 IO(Decode16, 0x0089, 0x0089, 0x10, 0x03)
1396 IO(Decode16, 0x008F, 0x008F, 0x10, 0x01)
1397 IO(Decode16, 0x00C0, 0x00C0, 0x10, 0x20)
1398 }) /* End Name(_SB.PCI0.LpcIsaBr.MAD._CRS) */
1399 } /* End Device(_SB.PCI0.LpcIsaBr.MAD) */
1402 Name(_HID,EISAID("PNP0C04")) /* Math Coprocessor */
1403 Name(_CRS, ResourceTemplate() {
1404 IO(Decode16, 0x00F0, 0x00F0, 0, 0x10)
1407 } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */
1410 Name(_HID,EISAID("PNP0103"))
1411 Name(CRS,ResourceTemplate() {
1412 Memory32Fixed(ReadOnly,0xFED00000, 0x00000400, HPT) /* 1kb reserved space */
1415 Return(0x0F) /* sata is visible */
1418 CreateDwordField(CRS, ^HPT._BAS, HPBA)
1422 } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */
1426 Name(_ADR, 0x00140004)
1427 } /* end HostPciBr */
1430 Name(_ADR, 0x00140005)
1431 } /* end Ac97audio */
1434 Name(_ADR, 0x00140006)
1435 } /* end Ac97modem */
1437 /* ITE IT8712F Support */
1438 OperationRegion (IOID, SystemIO, 0x2E, 0x02) /* sometimes it is 0x4E */
1439 Field (IOID, ByteAcc, NoLock, Preserve)
1441 SIOI, 8, SIOD, 8 /* 0x2E and 0x2F */
1444 IndexField (SIOI, SIOD, ByteAcc, NoLock, Preserve)
1447 LDN, 8, /* Logical Device Number */
1449 CID1, 8, /* Chip ID Byte 1, 0x87 */
1450 CID2, 8, /* Chip ID Byte 2, 0x12 */
1452 ACTR, 8, /* Function activate */
1454 APC0, 8, /* APC/PME Event Enable Register */
1455 APC1, 8, /* APC/PME Status Register */
1456 APC2, 8, /* APC/PME Control Register 1 */
1457 APC3, 8, /* Environment Controller Special Configuration Register */
1458 APC4, 8 /* APC/PME Control Register 2 */
1461 /* Enter the IT8712F MB PnP Mode */
1467 Store(0x55, SIOI) /* IT8712F magic number */
1469 /* Exit the IT8712F MB PnP Mode */
1477 * Keyboard PME is routed to SB600 Gevent3. We can wake
1478 * up the system by pressing the key.
1482 /* We only enable KBD PME for S5. */
1483 If (LLess (Arg0, 0x05))
1486 /* DBGO("IT8712F\n") */
1489 Store (One, ACTR) /* Enable EC */
1493 */ /* falling edge. which mode? Not sure. */
1496 Store (0x08, APC1) /* clear PME status, Use 0x18 for mouse & KBD */
1498 Store (0x08, APC0) /* enable PME, Use 0x18 for mouse & KBD */
1507 Store (Zero, APC0) /* disable keyboard PME */
1509 Store (0xFF, APC1) /* clear keyboard PME status */
1513 Name(CRES, ResourceTemplate() {
1514 IO(Decode16, 0x0CF8, 0x0CF8, 1, 8)
1516 WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1517 0x0000, /* address granularity */
1518 0x0000, /* range minimum */
1519 0x0CF7, /* range maximum */
1520 0x0000, /* translation */
1521 0x0CF8 /* Resource source index */
1524 WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1525 0x0000, /* address granularity */
1526 0x0D00, /* range minimum */
1527 0xFFFF, /* range maximum */
1528 0x0000, /* translation */
1532 Memory32Fixed(READWRITE, 0, 0xA0000, BSMM)
1533 Memory32Fixed(READONLY, 0x000A0000, 0x00020000, VGAM) /* VGA memory space */
1534 Memory32Fixed(READONLY, 0x000C0000, 0x00020000, EMM1) /* Assume C0000-E0000 empty */
1535 Memory32Fixed(READONLY, 0x000E0000, 0x00020000, RDBS) /* BIOS ROM area */
1537 /* DRAM Memory from 1MB to TopMem */
1538 Memory32Fixed(READWRITE, 0x00100000, 0, DMLO) /* 1MB to TopMem */
1540 /* BIOS space just below 4GB */
1542 ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1543 0x00, /* Granularity */
1544 0x00000000, /* Min */
1545 0x00000000, /* Max */
1546 0x00000000, /* Translation */
1547 0x00000000, /* Max-Min, RLEN */
1552 /* DRAM memory from 4GB to TopMem2 */
1553 QWORDMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1554 0xFFFFFFFF, /* Granularity */
1555 0x00000000, /* Min */
1556 0x00000000, /* Max */
1557 0x00000000, /* Translation */
1558 0x00000000, /* Max-Min, RLEN */
1563 /* BIOS space just below 16EB */
1564 QWORDMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1565 0xFFFFFFFF, /* Granularity */
1566 0x00000000, /* Min */
1567 0x00000000, /* Max */
1568 0x00000000, /* Translation */
1569 0x00000000, /* Max-Min, RLEN */
1574 }) /* End Name(_SB.PCI0.CRES) */
1577 /* DBGO("\\_SB\\PCI0\\_CRS\n") */
1579 CreateDWordField(CRES, ^EMM1._BAS, EM1B)
1580 CreateDWordField(CRES, ^EMM1._LEN, EM1L)
1581 CreateDWordField(CRES, ^DMLO._BAS, DMLB)
1582 CreateDWordField(CRES, ^DMLO._LEN, DMLL)
1583 CreateDWordField(CRES, ^PCBM._MIN, PBMB)
1584 CreateDWordField(CRES, ^PCBM._LEN, PBML)
1586 CreateQWordField(CRES, ^DMHI._MIN, DMHB)
1587 CreateQWordField(CRES, ^DMHI._LEN, DMHL)
1588 CreateQWordField(CRES, ^PEBM._MIN, EBMB)
1589 CreateQWordField(CRES, ^PEBM._LEN, EBML)
1591 If(LGreater(LOMH, 0xC0000)){
1592 Store(0xC0000, EM1B) /* Hole above C0000 and below E0000 */
1593 Subtract(LOMH, 0xC0000, EM1L) /* subtract start, assumes allocation from C0000 going up */
1596 /* Set size of memory from 1MB to TopMem */
1597 Subtract(TOM1, 0x100000, DMLL)
1600 * If(LNotEqual(TOM2, 0x00000000)){
1601 * Store(0x100000000,DMHB) DRAM from 4GB to TopMem2
1602 * Subtract(TOM2, 0x100000000, DMHL)
1606 /* If there is no memory above 4GB, put the BIOS just below 4GB */
1607 If(LEqual(TOM2, 0x00000000)){
1608 Store(PBAD,PBMB) /* Reserve the "BIOS" space */
1611 Else { /* Otherwise, put the BIOS just below 16EB */
1612 ShiftLeft(PBAD,16,EBMB) /* Reserve the "BIOS" space */
1616 Return(CRES) /* note to change the Name buffer */
1617 } /* end of Method(_SB.PCI0._CRS) */
1621 * FIRST METHOD CALLED UPON BOOT
1623 * 1. If debugging, print current OS and ACPI interpreter.
1624 * 2. Get PCI Interrupt routing from ACPI VSM, this
1625 * value is based on user choice in BIOS setup.
1628 /* DBGO("\\_SB\\_INI\n") */
1629 /* DBGO(" DSDT.ASL code from ") */
1630 /* DBGO(__DATE__) */
1632 /* DBGO(__TIME__) */
1633 /* DBGO("\n Sleep states supported: ") */
1635 /* DBGO(" \\_OS=") */
1637 /* DBGO("\n \\_REV=") */
1641 /* Determine the OS we're running on */
1644 /* On older chips, clear PciExpWakeDisEn */
1645 /*if (LLessEqual(\SBRI, 0x13)) {
1649 } /* End Method(_SB._INI) */
1650 } /* End Device(PCI0) */
1652 Device(PWRB) { /* Start Power button device */
1653 Name(_HID, EISAID("PNP0C0C"))
1655 Name(_PRW, Package () {3, 0x04}) /* wake from S1-S4 */
1656 Name(_STA, 0x0B) /* sata is invisible */
1658 } /* End \_SB scope */
1662 /* DBGO("\\_SI\\_SST\n") */
1663 /* DBGO(" New Indicator state: ") */
1667 } /* End Scope SI */
1670 OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
1671 Field (SMB0, ByteAcc, NoLock, Preserve) {
1672 HSTS, 8, /* SMBUS status */
1673 SSTS, 8, /* SMBUS slave status */
1674 HCNT, 8, /* SMBUS control */
1675 HCMD, 8, /* SMBUS host cmd */
1676 HADD, 8, /* SMBUS address */
1677 DAT0, 8, /* SMBUS data0 */
1678 DAT1, 8, /* SMBUS data1 */
1679 BLKD, 8, /* SMBUS block data */
1680 SCNT, 8, /* SMBUS slave control */
1681 SCMD, 8, /* SMBUS shaow cmd */
1682 SEVT, 8, /* SMBUS slave event */
1683 SDAT, 8 /* SMBUS slave data */
1686 Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
1688 Store (0xFA, Local0)
1689 While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
1697 Method (SWTC, 1, NotSerialized) {
1698 Store (Arg0, Local0)
1699 Store (0x07, Local2)
1701 While (LEqual (Local1, One)) {
1702 Store (And (HSTS, 0x1E), Local3)
1703 If (LNotEqual (Local3, Zero)) { /* read sucess */
1704 If (LEqual (Local3, 0x02)) {
1705 Store (Zero, Local2)
1708 Store (Zero, Local1)
1711 If (LLess (Local0, 0x0A)) { /* read failure */
1712 Store (0x10, Local2)
1713 Store (Zero, Local1)
1716 Sleep (0x0A) /* 10 ms, try again */
1717 Subtract (Local0, 0x0A, Local0)
1725 Method (SMBR, 3, NotSerialized) {
1726 Store (0x07, Local0)
1727 If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
1728 Store (WCLR (), Local0) /* clear SMBUS status register before read data */
1729 If (LEqual (Local0, Zero)) {
1735 Store (Or (ShiftLeft (Arg1, One), One), HADD)
1737 If (LEqual (Arg0, 0x07)) {
1738 Store (0x48, HCNT) /* read byte */
1741 Store (SWTC (0x03E8), Local1) /* 1000 ms */
1742 If (LEqual (Local1, Zero)) {
1743 If (LEqual (Arg0, 0x07)) {
1744 Store (DAT0, Local0)
1748 Store (Local1, Local0)
1754 /* DBGO("the value of SMBusData0 register ") */
1770 Method(_AC0,0) { /* Active Cooling 0 (0=highest fan speed) */
1771 /* DBGO("\\_TZ\\TZ00\\_AC0\n") */
1772 Return(Add(0, 2730))
1774 Method(_AL0,0) { /* Returns package of cooling device to turn on */
1775 /* DBGO("\\_TZ\\TZ00\\_AL0\n") */
1776 Return(Package() {\_TZ.TZ00.FAN0})
1779 Name(_HID, EISAID("PNP0C0B"))
1780 Name(_PR0, Package() {PFN0})
1783 PowerResource(PFN0,0,0) {
1789 /* DBGO("\\_TZ\\TZ00\\FAN0 _ON\n") */
1792 /* DBGO("\\_TZ\\TZ00\\FAN0 _OFF\n") */
1796 Method(_HOT,0) { /* return hot temp in tenths degree Kelvin */
1797 /* DBGO("\\_TZ\\TZ00\\_HOT\n") */
1798 Return (Add (THOT, KELV))
1800 Method(_CRT,0) { /* return critical temp in tenths degree Kelvin */
1801 /* DBGO("\\_TZ\\TZ00\\_CRT\n") */
1802 Return (Add (TCRT, KELV))
1804 Method(_TMP,0) { /* return current temp of this zone */
1805 Store (SMBR (0x07, 0x4C,, 0x00), Local0)
1806 If (LGreater (Local0, 0x10)) {
1807 Store (Local0, Local1)
1810 Add (Local0, THOT, Local0)
1811 Return (Add (400, KELV))
1814 Store (SMBR (0x07, 0x4C, 0x01), Local0)
1815 /* only the two MSBs in the external temperature low byte are used, resolution 0.25. We ignore it */
1816 /* Store (SMBR (0x07, 0x4C, 0x10), Local2) */
1817 If (LGreater (Local0, 0x10)) {
1818 If (LGreater (Local0, Local1)) {
1819 Store (Local0, Local1)
1822 Multiply (Local1, 10, Local1)
1823 Return (Add (Local1, KELV))
1826 Add (Local0, THOT, Local0)
1827 Return (Add (400 , KELV))
1833 /* End of ASL file */