2 * This file is part of the coreboot project.
4 * Copyright (C) 2010 Advanced Micro Devices, Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
16 /* DefinitionBlock Statement */
18 "DSDT.AML", /* Output filename */
19 "DSDT", /* Signature */
20 0x02, /* DSDT Revision, needs to be 2 for 64bit */
22 "COREBOOT", /* TABLE ID */
23 0x00010001 /* OEM Revision */
25 { /* Start of ASL file */
26 /* #include <arch/x86/acpi/debug.asl> */ /* Include global debug methods if needed */
28 /* Data to be patched by the BIOS during POST */
29 /* FIXME the patching is not done yet! */
30 /* Memory related values */
31 Name(LOMH, 0x0) /* Start of unused memory in C0000-E0000 range */
32 Name(PBAD, 0x0) /* Address of BIOS area (If TOM2 != 0, Addr >> 16) */
33 Name(PBLN, 0x0) /* Length of BIOS area */
35 Name(PCBA, CONFIG_MMCONF_BASE_ADDRESS) /* Base address of PCIe config space */
36 Name(HPBA, 0xFED00000) /* Base address of HPET table */
38 Name(SSFG, 0x0D) /* S1 support: bit 0, S2 Support: bit 1, etc. S0 & S5 assumed */
40 /* USB overcurrent mapping pins. */
52 /* Some global data */
53 Name(OSVR, 3) /* Assume nothing. WinXp = 1, Vista = 2, Linux = 3, WinCE = 4 */
54 Name(OSV, Ones) /* Assume nothing */
55 Name(PMOD, One) /* Assume APIC */
61 Scope (\_PR) { /* define processor scope */
63 CPU0, /* name space name */
64 0, /* Unique number for this processor */
65 0x808, /* PBLK system I/O address !hardcoded! */
66 0x06 /* PBLKLEN for boot processor */
68 #include "acpi/cpstate.asl"
72 CPU1, /* name space name */
73 1, /* Unique number for this processor */
74 0x0000, /* PBLK system I/O address !hardcoded! */
75 0x00 /* PBLKLEN for boot processor */
77 #include "acpi/cpstate.asl"
81 CPU2, /* name space name */
82 2, /* Unique number for this processor */
83 0x0000, /* PBLK system I/O address !hardcoded! */
84 0x00 /* PBLKLEN for boot processor */
86 #include "acpi/cpstate.asl"
90 CPU3, /* name space name */
91 3, /* Unique number for this processor */
92 0x0000, /* PBLK system I/O address !hardcoded! */
93 0x00 /* PBLKLEN for boot processor */
95 #include "acpi/cpstate.asl"
99 /* PIC IRQ mapping registers, C00h-C01h */
100 OperationRegion(PRQM, SystemIO, 0x00000C00, 0x00000002)
101 Field(PRQM, ByteAcc, NoLock, Preserve) {
103 PRQD, 0x00000008, /* Offset: 1h */
105 IndexField(PRQI, PRQD, ByteAcc, NoLock, Preserve) {
106 PINA, 0x00000008, /* Index 0 */
107 PINB, 0x00000008, /* Index 1 */
108 PINC, 0x00000008, /* Index 2 */
109 PIND, 0x00000008, /* Index 3 */
110 AINT, 0x00000008, /* Index 4 */
111 SINT, 0x00000008, /* Index 5 */
112 , 0x00000008, /* Index 6 */
113 AAUD, 0x00000008, /* Index 7 */
114 AMOD, 0x00000008, /* Index 8 */
115 PINE, 0x00000008, /* Index 9 */
116 PINF, 0x00000008, /* Index A */
117 PING, 0x00000008, /* Index B */
118 PINH, 0x00000008, /* Index C */
121 /* PCI Error control register */
122 OperationRegion(PERC, SystemIO, 0x00000C14, 0x00000001)
123 Field(PERC, ByteAcc, NoLock, Preserve) {
130 /* Client Management index/data registers */
131 OperationRegion(CMT, SystemIO, 0x00000C50, 0x00000002)
132 Field(CMT, ByteAcc, NoLock, Preserve) {
134 /* Client Management Data register */
142 /* GPM Port register */
143 OperationRegion(GPT, SystemIO, 0x00000C52, 0x00000001)
144 Field(GPT, ByteAcc, NoLock, Preserve) {
155 /* Flash ROM program enable register */
156 OperationRegion(FRE, SystemIO, 0x00000C6F, 0x00000001)
157 Field(FRE, ByteAcc, NoLock, Preserve) {
162 /* PM2 index/data registers */
163 OperationRegion(PM2R, SystemIO, 0x00000CD0, 0x00000002)
164 Field(PM2R, ByteAcc, NoLock, Preserve) {
169 /* Power Management I/O registers */
170 OperationRegion(PIOR, SystemIO, 0x00000CD6, 0x00000002)
171 Field(PIOR, ByteAcc, NoLock, Preserve) {
175 IndexField (PIOI, PIOD, ByteAcc, NoLock, Preserve) {
176 Offset(0x00), /* MiscControl */
180 Offset(0x01), /* MiscStatus */
184 Offset(0x04), /* SmiWakeUpEventEnable3 */
187 Offset(0x07), /* SmiWakeUpEventStatus3 */
190 Offset(0x10), /* AcpiEnable */
193 Offset(0x1C), /* ProgramIoEnable */
200 Offset(0x1D), /* IOMonitorStatus */
207 Offset(0x20), /* AcpiPmEvtBlk */
209 Offset(0x36), /* GEvtLevelConfig */
213 Offset(0x37), /* GPMLevelConfig0 */
220 Offset(0x38), /* GPMLevelConfig1 */
227 Offset(0x3B), /* PMEStatus1 */
236 Offset(0x55), /* SoftPciRst */
244 /* Offset(0x61), */ /* Options_1 */
248 Offset(0x65), /* UsbPMControl */
251 Offset(0x68), /* MiscEnable68 */
255 Offset(0x92), /* GEVENTIN */
258 Offset(0x96), /* GPM98IN */
261 Offset(0x9A), /* EnhanceControl */
264 Offset(0xA8), /* PIO7654Enable */
269 Offset(0xA9), /* PIO7654Status */
277 * First word is PM1_Status, Second word is PM1_Enable
279 OperationRegion(P1EB, SystemIO, APEB, 0x04)
280 Field(P1EB, ByteAcc, NoLock, Preserve) {
305 /* PCIe Configuration Space for 16 busses */
306 OperationRegion(PCFG, SystemMemory, PCBA, 0x01000000) /* Each bus consumes 1MB */
307 Field(PCFG, ByteAcc, NoLock, Preserve) {
308 /* Byte offsets are computed using the following technique:
309 * ((bus number + 1) * ((device number * 8) * 4096)) + register offset
310 * The 8 comes from 8 functions per device, and 4096 bytes per function config space
312 Offset(0x00088024), /* Byte offset to SATA register 24h - Bus 0, Device 17, Function 0 */
314 Offset(0x00098042), /* Byte offset to OHCI0 register 42h - Bus 0, Device 19, Function 0 */
325 Offset(0x000A0004), /* Byte offset to SMBUS register 4h - Bus 0, Device 20, Function 0 */
328 Offset(0x000A0008), /* Byte offset to SMBUS register 8h - Bus 0, Device 20, Function 0 */
330 Offset(0x000A0014), /* Byte offset to SMBUS register 14h - Bus 0, Device 20, Function 0 */
332 Offset(0x000A0078), /* Byte offset to SMBUS register 78h - Bus 0, Device 20, Function 0 */
334 P92E, 1, /* Port92 decode enable */
337 OperationRegion(SB5, SystemMemory, STB5, 0x1000)
338 Field(SB5, AnyAcc, NoLock, Preserve){
340 Offset(0x120), /* Port 0 Task file status */
346 Offset(0x128), /* Port 0 Serial ATA status */
350 Offset(0x12C), /* Port 0 Serial ATA control */
352 Offset(0x130), /* Port 0 Serial ATA error */
357 offset(0x1A0), /* Port 1 Task file status */
363 Offset(0x1A8), /* Port 1 Serial ATA status */
367 Offset(0x1AC), /* Port 1 Serial ATA control */
369 Offset(0x1B0), /* Port 1 Serial ATA error */
374 Offset(0x220), /* Port 2 Task file status */
380 Offset(0x228), /* Port 2 Serial ATA status */
384 Offset(0x22C), /* Port 2 Serial ATA control */
386 Offset(0x230), /* Port 2 Serial ATA error */
391 Offset(0x2A0), /* Port 3 Task file status */
397 Offset(0x2A8), /* Port 3 Serial ATA status */
401 Offset(0x2AC), /* Port 3 Serial ATA control */
403 Offset(0x2B0), /* Port 3 Serial ATA error */
410 #include "acpi/routing.asl"
416 if(LNotEqual(OSVR, Ones)) {Return(OSVR)} /* OS version was already detected */
418 if(CondRefOf(\_OSI,Local1))
420 Store(1, OSVR) /* Assume some form of XP */
421 if (\_OSI("Windows 2006")) /* Vista */
426 If(WCMP(\_OS,"Linux")) {
427 Store(3, OSVR) /* Linux */
429 Store(4, OSVR) /* Gotta be WinCE */
435 Method(_PIC, 0x01, NotSerialized)
443 Method(CIRQ, 0x00, NotSerialized){
454 Name(IRQB, ResourceTemplate(){
455 IRQ(Level,ActiveLow,Shared){15}
458 Name(IRQP, ResourceTemplate(){
459 IRQ(Level,ActiveLow,Exclusive){3, 4, 5, 7, 10, 11, 12, 15}
462 Name(PITF, ResourceTemplate(){
463 IRQ(Level,ActiveLow,Exclusive){9}
467 Name(_HID, EISAID("PNP0C0F"))
472 Return(0x0B) /* sata is invisible */
474 Return(0x09) /* sata is disabled */
476 } /* End Method(_SB.INTA._STA) */
479 /* DBGO("\\_SB\\LNKA\\_DIS\n") */
481 } /* End Method(_SB.INTA._DIS) */
484 /* DBGO("\\_SB\\LNKA\\_PRS\n") */
486 } /* Method(_SB.INTA._PRS) */
489 /* DBGO("\\_SB\\LNKA\\_CRS\n") */
490 CreateWordField(IRQB, 0x1, IRQN)
491 ShiftLeft(1, PINA, IRQN)
493 } /* Method(_SB.INTA._CRS) */
496 /* DBGO("\\_SB\\LNKA\\_CRS\n") */
497 CreateWordField(ARG0, 1, IRQM)
499 /* Use lowest available IRQ */
500 FindSetRightBit(IRQM, Local0)
505 } /* End Method(_SB.INTA._SRS) */
506 } /* End Device(INTA) */
509 Name(_HID, EISAID("PNP0C0F"))
514 Return(0x0B) /* sata is invisible */
516 Return(0x09) /* sata is disabled */
518 } /* End Method(_SB.INTB._STA) */
521 /* DBGO("\\_SB\\LNKB\\_DIS\n") */
523 } /* End Method(_SB.INTB._DIS) */
526 /* DBGO("\\_SB\\LNKB\\_PRS\n") */
528 } /* Method(_SB.INTB._PRS) */
531 /* DBGO("\\_SB\\LNKB\\_CRS\n") */
532 CreateWordField(IRQB, 0x1, IRQN)
533 ShiftLeft(1, PINB, IRQN)
535 } /* Method(_SB.INTB._CRS) */
538 /* DBGO("\\_SB\\LNKB\\_CRS\n") */
539 CreateWordField(ARG0, 1, IRQM)
541 /* Use lowest available IRQ */
542 FindSetRightBit(IRQM, Local0)
547 } /* End Method(_SB.INTB._SRS) */
548 } /* End Device(INTB) */
551 Name(_HID, EISAID("PNP0C0F"))
556 Return(0x0B) /* sata is invisible */
558 Return(0x09) /* sata is disabled */
560 } /* End Method(_SB.INTC._STA) */
563 /* DBGO("\\_SB\\LNKC\\_DIS\n") */
565 } /* End Method(_SB.INTC._DIS) */
568 /* DBGO("\\_SB\\LNKC\\_PRS\n") */
570 } /* Method(_SB.INTC._PRS) */
573 /* DBGO("\\_SB\\LNKC\\_CRS\n") */
574 CreateWordField(IRQB, 0x1, IRQN)
575 ShiftLeft(1, PINC, IRQN)
577 } /* Method(_SB.INTC._CRS) */
580 /* DBGO("\\_SB\\LNKC\\_CRS\n") */
581 CreateWordField(ARG0, 1, IRQM)
583 /* Use lowest available IRQ */
584 FindSetRightBit(IRQM, Local0)
589 } /* End Method(_SB.INTC._SRS) */
590 } /* End Device(INTC) */
593 Name(_HID, EISAID("PNP0C0F"))
598 Return(0x0B) /* sata is invisible */
600 Return(0x09) /* sata is disabled */
602 } /* End Method(_SB.INTD._STA) */
605 /* DBGO("\\_SB\\LNKD\\_DIS\n") */
607 } /* End Method(_SB.INTD._DIS) */
610 /* DBGO("\\_SB\\LNKD\\_PRS\n") */
612 } /* Method(_SB.INTD._PRS) */
615 /* DBGO("\\_SB\\LNKD\\_CRS\n") */
616 CreateWordField(IRQB, 0x1, IRQN)
617 ShiftLeft(1, PIND, IRQN)
619 } /* Method(_SB.INTD._CRS) */
622 /* DBGO("\\_SB\\LNKD\\_CRS\n") */
623 CreateWordField(ARG0, 1, IRQM)
625 /* Use lowest available IRQ */
626 FindSetRightBit(IRQM, Local0)
631 } /* End Method(_SB.INTD._SRS) */
632 } /* End Device(INTD) */
635 Name(_HID, EISAID("PNP0C0F"))
640 Return(0x0B) /* sata is invisible */
642 Return(0x09) /* sata is disabled */
644 } /* End Method(_SB.INTE._STA) */
647 /* DBGO("\\_SB\\LNKE\\_DIS\n") */
649 } /* End Method(_SB.INTE._DIS) */
652 /* DBGO("\\_SB\\LNKE\\_PRS\n") */
654 } /* Method(_SB.INTE._PRS) */
657 /* DBGO("\\_SB\\LNKE\\_CRS\n") */
658 CreateWordField(IRQB, 0x1, IRQN)
659 ShiftLeft(1, PINE, IRQN)
661 } /* Method(_SB.INTE._CRS) */
664 /* DBGO("\\_SB\\LNKE\\_CRS\n") */
665 CreateWordField(ARG0, 1, IRQM)
667 /* Use lowest available IRQ */
668 FindSetRightBit(IRQM, Local0)
673 } /* End Method(_SB.INTE._SRS) */
674 } /* End Device(INTE) */
677 Name(_HID, EISAID("PNP0C0F"))
682 Return(0x0B) /* sata is invisible */
684 Return(0x09) /* sata is disabled */
686 } /* End Method(_SB.INTF._STA) */
689 /* DBGO("\\_SB\\LNKF\\_DIS\n") */
691 } /* End Method(_SB.INTF._DIS) */
694 /* DBGO("\\_SB\\LNKF\\_PRS\n") */
696 } /* Method(_SB.INTF._PRS) */
699 /* DBGO("\\_SB\\LNKF\\_CRS\n") */
700 CreateWordField(IRQB, 0x1, IRQN)
701 ShiftLeft(1, PINF, IRQN)
703 } /* Method(_SB.INTF._CRS) */
706 /* DBGO("\\_SB\\LNKF\\_CRS\n") */
707 CreateWordField(ARG0, 1, IRQM)
709 /* Use lowest available IRQ */
710 FindSetRightBit(IRQM, Local0)
715 } /* End Method(_SB.INTF._SRS) */
716 } /* End Device(INTF) */
719 Name(_HID, EISAID("PNP0C0F"))
724 Return(0x0B) /* sata is invisible */
726 Return(0x09) /* sata is disabled */
728 } /* End Method(_SB.INTG._STA) */
731 /* DBGO("\\_SB\\LNKG\\_DIS\n") */
733 } /* End Method(_SB.INTG._DIS) */
736 /* DBGO("\\_SB\\LNKG\\_PRS\n") */
738 } /* Method(_SB.INTG._CRS) */
741 /* DBGO("\\_SB\\LNKG\\_CRS\n") */
742 CreateWordField(IRQB, 0x1, IRQN)
743 ShiftLeft(1, PING, IRQN)
745 } /* Method(_SB.INTG._CRS) */
748 /* DBGO("\\_SB\\LNKG\\_CRS\n") */
749 CreateWordField(ARG0, 1, IRQM)
751 /* Use lowest available IRQ */
752 FindSetRightBit(IRQM, Local0)
757 } /* End Method(_SB.INTG._SRS) */
758 } /* End Device(INTG) */
761 Name(_HID, EISAID("PNP0C0F"))
766 Return(0x0B) /* sata is invisible */
768 Return(0x09) /* sata is disabled */
770 } /* End Method(_SB.INTH._STA) */
773 /* DBGO("\\_SB\\LNKH\\_DIS\n") */
775 } /* End Method(_SB.INTH._DIS) */
778 /* DBGO("\\_SB\\LNKH\\_PRS\n") */
780 } /* Method(_SB.INTH._CRS) */
783 /* DBGO("\\_SB\\LNKH\\_CRS\n") */
784 CreateWordField(IRQB, 0x1, IRQN)
785 ShiftLeft(1, PINH, IRQN)
787 } /* Method(_SB.INTH._CRS) */
790 /* DBGO("\\_SB\\LNKH\\_CRS\n") */
791 CreateWordField(ARG0, 1, IRQM)
793 /* Use lowest available IRQ */
794 FindSetRightBit(IRQM, Local0)
799 } /* End Method(_SB.INTH._SRS) */
800 } /* End Device(INTH) */
802 } /* End Scope(_SB) */
805 /* Supported sleep states: */
806 Name(\_S0, Package () {0x00, 0x00, 0x00, 0x00} ) /* (S0) - working state */
808 If (LAnd(SSFG, 0x01)) {
809 Name(\_S1, Package () {0x01, 0x01, 0x00, 0x00} ) /* (S1) - sleeping w/CPU context */
811 If (LAnd(SSFG, 0x02)) {
812 Name(\_S2, Package () {0x02, 0x02, 0x00, 0x00} ) /* (S2) - "light" Suspend to RAM */
814 If (LAnd(SSFG, 0x04)) {
815 Name(\_S3, Package () {0x03, 0x03, 0x00, 0x00} ) /* (S3) - Suspend to RAM */
817 If (LAnd(SSFG, 0x08)) {
818 Name(\_S4, Package () {0x04, 0x04, 0x00, 0x00} ) /* (S4) - Suspend to Disk */
821 Name(\_S5, Package () {0x05, 0x05, 0x00, 0x00} ) /* (S5) - Soft Off */
823 Name(\_SB.CSPS ,0) /* Current Sleep State (S0, S1, S2, S3, S4, S5) */
824 Name(CSMS, 0) /* Current System State */
826 /* Wake status package */
827 Name(WKST,Package(){Zero, Zero})
830 * \_PTS - Prepare to Sleep method
833 * Arg0=The value of the sleeping state S1=1, S2=2, etc
838 * The _PTS control method is executed at the beginning of the sleep process
839 * for S1-S5. The sleeping value is passed to the _PTS control method. This
840 * control method may be executed a relatively long time before entering the
841 * sleep state and the OS may abort the operation without notification to
842 * the ACPI driver. This method cannot modify the configuration or power
843 * state of any device in the system.
846 /* DBGO("\\_PTS\n") */
847 /* DBGO("From S0 to S") */
851 /* Don't allow PCIRST# to reset USB */
856 /* Clear sleep SMI status flag and enable sleep SMI trap. */
860 /* On older chips, clear PciExpWakeDisEn */
861 /*if (LLessEqual(\_SB.SBRI, 0x13)) {
866 /* Clear wake status structure. */
867 Store(0, Index(WKST,0))
868 Store(0, Index(WKST,1))
869 \_SB.PCI0.SIOS (Arg0)
870 } /* End Method(\_PTS) */
873 * The following method results in a "not a valid reserved NameSeg"
874 * warning so I have commented it out for the duration. It isn't
875 * used, so it could be removed.
878 * \_GTS OEM Going To Sleep method
881 * Arg0=The value of the sleeping state S1=1, S2=2
888 * DBGO("From S0 to S")
895 * \_BFS OEM Back From Sleep method
898 * Arg0=The value of the sleeping state S1=1, S2=2
904 /* DBGO("\\_BFS\n") */
907 /* DBGO(" to S0\n") */
911 * \_WAK System Wake method
914 * Arg0=The value of the sleeping state S1=1, S2=2
917 * Return package of 2 DWords
919 * 0x00000000 wake succeeded
920 * 0x00000001 Wake was signaled but failed due to lack of power
921 * 0x00000002 Wake was signaled but failed due to thermal condition
922 * Dword 2 - Power Supply state
923 * if non-zero the effective S-state the power supply entered
926 /* DBGO("\\_WAK\n") */
929 /* DBGO(" to S0\n") */
934 /* Restore PCIRST# so it resets USB */
939 /* Arbitrarily clear PciExpWakeStatus */
942 /* if(DeRefOf(Index(WKST,0))) {
943 * Store(0, Index(WKST,1))
945 * Store(Arg0, Index(WKST,1))
948 \_SB.PCI0.SIOW (Arg0)
950 } /* End Method(\_WAK) */
952 Scope(\_GPE) { /* Start Scope GPE */
953 /* General event 0 */
955 * DBGO("\\_GPE\\_L00\n")
959 /* General event 1 */
961 * DBGO("\\_GPE\\_L00\n")
965 /* General event 2 */
967 * DBGO("\\_GPE\\_L00\n")
971 /* General event 3 */
973 /* DBGO("\\_GPE\\_L00\n") */
974 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
977 /* General event 4 */
979 * DBGO("\\_GPE\\_L00\n")
983 /* General event 5 */
985 * DBGO("\\_GPE\\_L00\n")
989 /* General event 6 - Used for GPM6, moved to USB.asl */
991 * DBGO("\\_GPE\\_L00\n")
995 /* General event 7 - Used for GPM7, moved to USB.asl */
997 * DBGO("\\_GPE\\_L07\n")
1001 /* Legacy PM event */
1003 /* DBGO("\\_GPE\\_L08\n") */
1006 /* Temp warning (TWarn) event */
1008 /* DBGO("\\_GPE\\_L09\n") */
1009 Notify (\_TZ.TZ00, 0x80)
1014 * DBGO("\\_GPE\\_L0A\n")
1018 /* USB controller PME# */
1020 /* DBGO("\\_GPE\\_L0B\n") */
1021 Notify(\_SB.PCI0.UOH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1022 Notify(\_SB.PCI0.UOH2, 0x02) /* NOTIFY_DEVICE_WAKE */
1023 Notify(\_SB.PCI0.UOH3, 0x02) /* NOTIFY_DEVICE_WAKE */
1024 Notify(\_SB.PCI0.UOH4, 0x02) /* NOTIFY_DEVICE_WAKE */
1025 Notify(\_SB.PCI0.UOH5, 0x02) /* NOTIFY_DEVICE_WAKE */
1026 Notify(\_SB.PCI0.UEH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1027 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1030 /* AC97 controller PME# */
1032 * DBGO("\\_GPE\\_L0C\n")
1036 /* OtherTherm PME# */
1038 * DBGO("\\_GPE\\_L0D\n")
1042 /* GPM9 SCI event - Moved to USB.asl */
1044 * DBGO("\\_GPE\\_L0E\n")
1048 /* PCIe HotPlug event */
1050 * DBGO("\\_GPE\\_L0F\n")
1054 /* ExtEvent0 SCI event */
1056 /* DBGO("\\_GPE\\_L10\n") */
1060 /* ExtEvent1 SCI event */
1062 /* DBGO("\\_GPE\\_L11\n") */
1065 /* PCIe PME# event */
1067 * DBGO("\\_GPE\\_L12\n")
1071 /* GPM0 SCI event - Moved to USB.asl */
1073 * DBGO("\\_GPE\\_L13\n")
1077 /* GPM1 SCI event - Moved to USB.asl */
1079 * DBGO("\\_GPE\\_L14\n")
1083 /* GPM2 SCI event - Moved to USB.asl */
1085 * DBGO("\\_GPE\\_L15\n")
1089 /* GPM3 SCI event - Moved to USB.asl */
1091 * DBGO("\\_GPE\\_L16\n")
1095 /* GPM8 SCI event - Moved to USB.asl */
1097 * DBGO("\\_GPE\\_L17\n")
1101 /* GPIO0 or GEvent8 event */
1103 /* DBGO("\\_GPE\\_L18\n") */
1104 Notify(\_SB.PCI0.PBR2, 0x02) /* NOTIFY_DEVICE_WAKE */
1105 Notify(\_SB.PCI0.PBR4, 0x02) /* NOTIFY_DEVICE_WAKE */
1106 Notify(\_SB.PCI0.PBR5, 0x02) /* NOTIFY_DEVICE_WAKE */
1107 Notify(\_SB.PCI0.PBR6, 0x02) /* NOTIFY_DEVICE_WAKE */
1108 Notify(\_SB.PCI0.PBR7, 0x02) /* NOTIFY_DEVICE_WAKE */
1109 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1112 /* GPM4 SCI event - Moved to USB.asl */
1114 * DBGO("\\_GPE\\_L19\n")
1118 /* GPM5 SCI event - Moved to USB.asl */
1120 * DBGO("\\_GPE\\_L1A\n")
1124 /* Azalia SCI event */
1126 /* DBGO("\\_GPE\\_L1B\n") */
1127 Notify(\_SB.PCI0.AZHD, 0x02) /* NOTIFY_DEVICE_WAKE */
1128 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1131 /* GPM6 SCI event - Reassigned to _L06 */
1133 * DBGO("\\_GPE\\_L1C\n")
1137 /* GPM7 SCI event - Reassigned to _L07 */
1139 * DBGO("\\_GPE\\_L1D\n")
1143 /* GPIO2 or GPIO66 SCI event */
1145 * DBGO("\\_GPE\\_L1E\n")
1149 /* SATA SCI event - Moved to sata.asl */
1151 * DBGO("\\_GPE\\_L1F\n")
1155 } /* End Scope GPE */
1157 #include "acpi/usb.asl"
1160 Scope(\_SB) { /* Start \_SB scope */
1161 #include <arch/x86/acpi/globutil.asl> /* global utility methods expected within the \_SB scope */
1164 /* Note: Only need HID on Primary Bus */
1168 Name(_HID, EISAID("PNP0A03"))
1169 Name(_ADR, 0x00180000) /* Dev# = BSP Dev#, Func# = 0 */
1170 Method(_BBN, 0) { /* Bus number = 0 */
1174 /* DBGO("\\_SB\\PCI0\\_STA\n") */
1175 Return(0x0B) /* Status is visible */
1179 If(PMOD){ Return(APR0) } /* APIC mode */
1180 Return (PR0) /* PIC Mode */
1183 /* Describe the Northbridge devices */
1185 Name(_ADR, 0x00000000)
1188 /* The internal GFX bridge */
1190 Name(_ADR, 0x00010000)
1191 Name(_PRW, Package() {0x18, 4})
1197 /* The external GFX bridge */
1199 Name(_ADR, 0x00020000)
1200 Name(_PRW, Package() {0x18, 4})
1202 If(PMOD){ Return(APS2) } /* APIC mode */
1203 Return (PS2) /* PIC Mode */
1207 /* Dev3 is also an external GFX bridge, not used in Herring */
1210 Name(_ADR, 0x00040000)
1211 Name(_PRW, Package() {0x18, 4})
1213 If(PMOD){ Return(APS4) } /* APIC mode */
1214 Return (PS4) /* PIC Mode */
1219 Name(_ADR, 0x00050000)
1220 Name(_PRW, Package() {0x18, 4})
1222 If(PMOD){ Return(APS5) } /* APIC mode */
1223 Return (PS5) /* PIC Mode */
1228 Name(_ADR, 0x00060000)
1229 Name(_PRW, Package() {0x18, 4})
1231 If(PMOD){ Return(APS6) } /* APIC mode */
1232 Return (PS6) /* PIC Mode */
1236 /* The onboard EtherNet chip */
1238 Name(_ADR, 0x00070000)
1239 Name(_PRW, Package() {0x18, 4})
1241 If(PMOD){ Return(APS7) } /* APIC mode */
1242 Return (PS7) /* PIC Mode */
1248 Name(_ADR, 0x00090000)
1249 Name(_PRW, Package() {0x18, 4})
1251 If(PMOD){ Return(APS9) } /* APIC mode */
1252 Return (PS9) /* PIC Mode */
1257 Name(_ADR, 0x000A0000)
1258 Name(_PRW, Package() {0x18, 4})
1260 If(PMOD){ Return(APSa) } /* APIC mode */
1261 Return (PSa) /* PIC Mode */
1266 /* PCI slot 1, 2, 3 */
1268 Name(_ADR, 0x00140004)
1269 Name(_PRW, Package() {0x18, 4})
1276 /* Describe the Southbridge devices */
1278 Name(_ADR, 0x00110000)
1279 #include "acpi/sata.asl"
1283 Name(_ADR, 0x00130000)
1284 Name(_PRW, Package() {0x0B, 3})
1288 Name(_ADR, 0x00130001)
1289 Name(_PRW, Package() {0x0B, 3})
1293 Name(_ADR, 0x00130002)
1294 Name(_PRW, Package() {0x0B, 3})
1298 Name(_ADR, 0x00130003)
1299 Name(_PRW, Package() {0x0B, 3})
1303 Name(_ADR, 0x00130004)
1304 Name(_PRW, Package() {0x0B, 3})
1308 Name(_ADR, 0x00130005)
1309 Name(_PRW, Package() {0x0B, 3})
1313 Name(_ADR, 0x00140000)
1316 /* Primary (and only) IDE channel */
1318 Name(_ADR, 0x00140001)
1319 #include "acpi/ide.asl"
1323 Name(_ADR, 0x00140002)
1324 OperationRegion(AZPD, PCI_Config, 0x00, 0x100)
1325 Field(AZPD, AnyAcc, NoLock, Preserve) {
1349 If(LEqual(OSVR,3)){ /* If we are running Linux */
1358 Name(_ADR, 0x00140003)
1360 * DBGO("\\_SB\\PCI0\\LpcIsaBr\\_INI\n")
1361 } */ /* End Method(_SB.SBRDG._INI) */
1363 /* Real Time Clock Device */
1365 Name(_HID, EISAID("PNP0B00")) /* AT Real Time Clock (not PIIX4 compatible) */
1366 Name(_CRS, ResourceTemplate() {
1368 IO(Decode16,0x0070, 0x0070, 0, 2)
1369 /* IO(Decode16,0x0070, 0x0070, 0, 4) */
1371 } /* End Device(_SB.PCI0.LpcIsaBr.RTC0) */
1373 Device(TMR) { /* Timer */
1374 Name(_HID,EISAID("PNP0100")) /* System Timer */
1375 Name(_CRS, ResourceTemplate() {
1377 IO(Decode16, 0x0040, 0x0040, 0, 4)
1378 /* IO(Decode16, 0x0048, 0x0048, 0, 4) */
1380 } /* End Device(_SB.PCI0.LpcIsaBr.TMR) */
1382 Device(SPKR) { /* Speaker */
1383 Name(_HID,EISAID("PNP0800")) /* AT style speaker */
1384 Name(_CRS, ResourceTemplate() {
1385 IO(Decode16, 0x0061, 0x0061, 0, 1)
1387 } /* End Device(_SB.PCI0.LpcIsaBr.SPKR) */
1390 Name(_HID,EISAID("PNP0000")) /* AT Interrupt Controller */
1391 Name(_CRS, ResourceTemplate() {
1393 IO(Decode16,0x0020, 0x0020, 0, 2)
1394 IO(Decode16,0x00A0, 0x00A0, 0, 2)
1395 /* IO(Decode16, 0x00D0, 0x00D0, 0x10, 0x02) */
1396 /* IO(Decode16, 0x04D0, 0x04D0, 0x10, 0x02) */
1398 } /* End Device(_SB.PCI0.LpcIsaBr.PIC) */
1400 Device(MAD) { /* 8257 DMA */
1401 Name(_HID,EISAID("PNP0200")) /* Hardware Device ID */
1402 Name(_CRS, ResourceTemplate() {
1403 DMA(Compatibility,BusMaster,Transfer8){4}
1404 IO(Decode16, 0x0000, 0x0000, 0x10, 0x10)
1405 IO(Decode16, 0x0081, 0x0081, 0x01, 0x03)
1406 IO(Decode16, 0x0087, 0x0087, 0x01, 0x01)
1407 IO(Decode16, 0x0089, 0x0089, 0x01, 0x03)
1408 IO(Decode16, 0x008F, 0x008F, 0x01, 0x01)
1409 IO(Decode16, 0x00C0, 0x00C0, 0x10, 0x20)
1410 }) /* End Name(_SB.PCI0.LpcIsaBr.MAD._CRS) */
1411 } /* End Device(_SB.PCI0.LpcIsaBr.MAD) */
1414 Name(_HID,EISAID("PNP0C04")) /* Math Coprocessor */
1415 Name(_CRS, ResourceTemplate() {
1416 IO(Decode16, 0x00F0, 0x00F0, 0, 0x10)
1419 } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */
1420 #if 0 /* defined by HPET table? */
1422 Name(_HID,EISAID("PNP0103"))
1423 Name(CRS,ResourceTemplate() {
1424 Memory32Fixed(ReadOnly,0xFED00000, 0x00000400, HPT) /* 1kb reserved space */
1427 Return(0x0F) /* sata is visible */
1430 CreateDwordField(CRS, ^HPT._BAS, HPBA)
1434 } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */
1439 Name(_ADR, 0x00140004)
1440 } /* end HostPciBr */
1443 Name(_ADR, 0x00140005)
1444 } /* end Ac97audio */
1447 Name(_ADR, 0x00140006)
1448 } /* end Ac97modem */
1450 /* ITE8718 Support */
1451 OperationRegion (IOID, SystemIO, 0x2E, 0x02) /* sometimes it is 0x4E */
1452 Field (IOID, ByteAcc, NoLock, Preserve)
1454 SIOI, 8, SIOD, 8 /* 0x2E and 0x2F */
1457 IndexField (SIOI, SIOD, ByteAcc, NoLock, Preserve)
1460 LDN, 8, /* Logical Device Number */
1462 CID1, 8, /* Chip ID Byte 1, 0x87 */
1463 CID2, 8, /* Chip ID Byte 2, 0x12 */
1465 ACTR, 8, /* Function activate */
1467 APC0, 8, /* APC/PME Event Enable Register */
1468 APC1, 8, /* APC/PME Status Register */
1469 APC2, 8, /* APC/PME Control Register 1 */
1470 APC3, 8, /* Environment Controller Special Configuration Register */
1471 APC4, 8 /* APC/PME Control Register 2 */
1474 /* Enter the 8718 MB PnP Mode */
1480 Store(0x55, SIOI) /* 8718 magic number */
1482 /* Exit the 8718 MB PnP Mode */
1489 * Keyboard PME is routed to SB700 Gevent3. We can wake
1490 * up the system by pressing the key.
1494 /* We only enable KBD PME for S5. */
1495 If (LLess (Arg0, 0x05))
1498 /* DBGO("8718F\n") */
1501 Store (One, ACTR) /* Enable EC */
1505 */ /* falling edge. which mode? Not sure. */
1508 Store (0x08, APC1) /* clear PME status, Use 0x18 for mouse & KBD */
1510 Store (0x08, APC0) /* enable PME, Use 0x18 for mouse & KBD */
1519 Store (Zero, APC0) /* disable keyboard PME */
1521 Store (0xFF, APC1) /* clear keyboard PME status */
1525 Name(CRES, ResourceTemplate() {
1526 IO(Decode16, 0x0CF8, 0x0CF8, 1, 8)
1528 WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1529 0x0000, /* address granularity */
1530 0x0000, /* range minimum */
1531 0x0CF7, /* range maximum */
1532 0x0000, /* translation */
1536 WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1537 0x0000, /* address granularity */
1538 0x0D00, /* range minimum */
1539 0xFFFF, /* range maximum */
1540 0x0000, /* translation */
1544 Memory32Fixed(READONLY, 0x000A0000, 0x00020000, VGAM) /* VGA memory space */
1546 Memory32Fixed(READWRITE, 0, 0xA0000, BSMM)
1547 Memory32Fixed(READONLY, 0x000C0000, 0x00020000, EMM1) /* Assume C0000-E0000 empty */
1548 Memory32Fixed(READONLY, 0x000E0000, 0x00020000, RDBS) /* BIOS ROM area */
1550 /* DRAM Memory from 1MB to TopMem */
1551 Memory32Fixed(READWRITE, 0x00100000, 0, DMLO) /* 1MB to TopMem */
1553 /* BIOS space just below 4GB */
1555 ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1556 0x00, /* Granularity */
1557 0x00000000, /* Min */
1558 0x00000000, /* Max */
1559 0x00000000, /* Translation */
1560 0x00000001, /* Max-Min, RLEN */
1565 /* DRAM memory from 4GB to TopMem2 */
1566 QWORDMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1567 0x00000000, /* Granularity */
1568 0x00000000, /* Min */
1569 0x00000000, /* Max */
1570 0x00000000, /* Translation */
1571 0x00000001, /* Max-Min, RLEN */
1576 /* BIOS space just below 16EB */
1577 QWORDMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1578 0x00000000, /* Granularity */
1579 0x00000000, /* Min */
1580 0x00000000, /* Max */
1581 0x00000000, /* Translation */
1582 0x00000001, /* Max-Min, RLEN */
1587 /* memory space for PCI BARs below 4GB */
1588 Memory32Fixed(ReadOnly, 0x00000000, 0x00000000, MMIO)
1589 }) /* End Name(_SB.PCI0.CRES) */
1592 /* DBGO("\\_SB\\PCI0\\_CRS\n") */
1594 CreateDWordField(CRES, ^EMM1._BAS, EM1B)
1595 CreateDWordField(CRES, ^EMM1._LEN, EM1L)
1596 CreateDWordField(CRES, ^DMLO._BAS, DMLB)
1597 CreateDWordField(CRES, ^DMLO._LEN, DMLL)
1598 CreateDWordField(CRES, ^PCBM._MIN, PBMB)
1599 CreateDWordField(CRES, ^PCBM._LEN, PBML)
1601 CreateQWordField(CRES, ^DMHI._MIN, DMHB)
1602 CreateQWordField(CRES, ^DMHI._LEN, DMHL)
1603 CreateQWordField(CRES, ^PEBM._MIN, EBMB)
1604 CreateQWordField(CRES, ^PEBM._LEN, EBML)
1606 If(LGreater(LOMH, 0xC0000)){
1607 Store(0xC0000, EM1B) /* Hole above C0000 and below E0000 */
1608 Subtract(LOMH, 0xC0000, EM1L) /* subtract start, assumes allocation from C0000 going up */
1611 /* Set size of memory from 1MB to TopMem */
1612 Subtract(TOM1, 0x100000, DMLL)
1615 * If(LNotEqual(TOM2, 0x00000000)){
1616 * Store(0x100000000,DMHB) DRAM from 4GB to TopMem2
1617 * Subtract(TOM2, 0x100000000, DMHL)
1621 /* If there is no memory above 4GB, put the BIOS just below 4GB */
1622 If(LEqual(TOM2, 0x00000000)){
1623 Store(PBAD,PBMB) /* Reserve the "BIOS" space */
1626 Else { /* Otherwise, put the BIOS just below 16EB */
1627 ShiftLeft(PBAD,16,EBMB) /* Reserve the "BIOS" space */
1631 CreateDWordField(CRES, ^MMIO._BAS, MM1B)
1632 CreateDWordField(CRES, ^MMIO._LEN, MM1L)
1634 * Declare memory between TOM1 and 4GB as available
1636 * Use ShiftLeft to avoid 64bit constant (for XP).
1637 * This will work even if the OS does 32bit arithmetic, as
1638 * 32bit (0x00000000 - TOM1) will wrap and give the same
1639 * result as 64bit (0x100000000 - TOM1).
1642 ShiftLeft(0x10000000, 4, Local0)
1643 Subtract(Local0, TOM1, Local0)
1646 Return(CRES) /* note to change the Name buffer */
1647 } /* end of Method(_SB.PCI0._CRS) */
1651 * FIRST METHOD CALLED UPON BOOT
1653 * 1. If debugging, print current OS and ACPI interpreter.
1654 * 2. Get PCI Interrupt routing from ACPI VSM, this
1655 * value is based on user choice in BIOS setup.
1658 /* DBGO("\\_SB\\_INI\n") */
1659 /* DBGO(" DSDT.ASL code from ") */
1660 /* DBGO(__DATE__) */
1662 /* DBGO(__TIME__) */
1663 /* DBGO("\n Sleep states supported: ") */
1665 /* DBGO(" \\_OS=") */
1667 /* DBGO("\n \\_REV=") */
1671 /* Determine the OS we're running on */
1674 /* On older chips, clear PciExpWakeDisEn */
1675 /*if (LLessEqual(\SBRI, 0x13)) {
1679 } /* End Method(_SB._INI) */
1680 } /* End Device(PCI0) */
1682 Device(PWRB) { /* Start Power button device */
1683 Name(_HID, EISAID("PNP0C0C"))
1685 Name(_PRW, Package () {3, 0x04}) /* wake from S1-S4 */
1686 Name(_STA, 0x0B) /* sata is invisible */
1688 } /* End \_SB scope */
1692 /* DBGO("\\_SI\\_SST\n") */
1693 /* DBGO(" New Indicator state: ") */
1697 } /* End Scope SI */
1699 #include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
1708 Method(_AC0,0) { /* Active Cooling 0 (0=highest fan speed) */
1709 /* DBGO("\\_TZ\\TZ00\\_AC0\n") */
1710 Return(Add(0, 2730))
1712 Method(_AL0,0) { /* Returns package of cooling device to turn on */
1713 /* DBGO("\\_TZ\\TZ00\\_AL0\n") */
1714 Return(Package() {\_TZ.TZ00.FAN0})
1717 Name(_HID, EISAID("PNP0C0B"))
1718 Name(_PR0, Package() {PFN0})
1721 PowerResource(PFN0,0,0) {
1727 /* DBGO("\\_TZ\\TZ00\\FAN0 _ON\n") */
1730 /* DBGO("\\_TZ\\TZ00\\FAN0 _OFF\n") */
1734 Method(_HOT,0) { /* return hot temp in tenths degree Kelvin */
1735 /* DBGO("\\_TZ\\TZ00\\_HOT\n") */
1736 Return (Add (THOT, KELV))
1738 Method(_CRT,0) { /* return critical temp in tenths degree Kelvin */
1739 /* DBGO("\\_TZ\\TZ00\\_CRT\n") */
1740 Return (Add (TCRT, KELV))
1742 Method(_TMP,0) { /* return current temp of this zone */
1743 Store (SMBR (0x07, 0x4C,, 0x00), Local0)
1744 If (LGreater (Local0, 0x10)) {
1745 Store (Local0, Local1)
1748 Add (Local0, THOT, Local0)
1749 Return (Add (400, KELV))
1752 Store (SMBR (0x07, 0x4C, 0x01), Local0)
1753 /* only the two MSBs in the external temperature low byte are used, resolution 0.25. We ignore it */
1754 /* Store (SMBR (0x07, 0x4C, 0x10), Local2) */
1755 If (LGreater (Local0, 0x10)) {
1756 If (LGreater (Local0, Local1)) {
1757 Store (Local0, Local1)
1760 Multiply (Local1, 10, Local1)
1761 Return (Add (Local1, KELV))
1764 Add (Local0, THOT, Local0)
1765 Return (Add (400 , KELV))
1771 /* End of ASL file */