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, 0xE0000000) /* Base address of PCIe config space */
36 Name(HPBA, 0xFED00000) /* Base address of HPET table */
38 /* USB overcurrent mapping pins. */
50 /* Some global data */
51 Name(OSVR, 3) /* Assume nothing. WinXp = 1, Vista = 2, Linux = 3, WinCE = 4 */
52 Name(OSV, Ones) /* Assume nothing */
53 Name(PMOD, One) /* Assume APIC */
59 Scope (\_PR) { /* define processor scope */
61 CPU0, /* name space name */
62 0, /* Unique number for this processor */
63 0x808, /* PBLK system I/O address !hardcoded! */
64 0x06 /* PBLKLEN for boot processor */
66 #include "acpi/cpstate.asl"
70 CPU1, /* name space name */
71 1, /* Unique number for this processor */
72 0x0000, /* PBLK system I/O address !hardcoded! */
73 0x00 /* PBLKLEN for boot processor */
75 #include "acpi/cpstate.asl"
79 CPU2, /* name space name */
80 2, /* Unique number for this processor */
81 0x0000, /* PBLK system I/O address !hardcoded! */
82 0x00 /* PBLKLEN for boot processor */
84 #include "acpi/cpstate.asl"
88 CPU3, /* name space name */
89 3, /* Unique number for this processor */
90 0x0000, /* PBLK system I/O address !hardcoded! */
91 0x00 /* PBLKLEN for boot processor */
93 #include "acpi/cpstate.asl"
97 /* PIC IRQ mapping registers, C00h-C01h */
98 OperationRegion(PRQM, SystemIO, 0x00000C00, 0x00000002)
99 Field(PRQM, ByteAcc, NoLock, Preserve) {
101 PRQD, 0x00000008, /* Offset: 1h */
103 IndexField(PRQI, PRQD, ByteAcc, NoLock, Preserve) {
104 PINA, 0x00000008, /* Index 0 */
105 PINB, 0x00000008, /* Index 1 */
106 PINC, 0x00000008, /* Index 2 */
107 PIND, 0x00000008, /* Index 3 */
108 AINT, 0x00000008, /* Index 4 */
109 SINT, 0x00000008, /* Index 5 */
110 , 0x00000008, /* Index 6 */
111 AAUD, 0x00000008, /* Index 7 */
112 AMOD, 0x00000008, /* Index 8 */
113 PINE, 0x00000008, /* Index 9 */
114 PINF, 0x00000008, /* Index A */
115 PING, 0x00000008, /* Index B */
116 PINH, 0x00000008, /* Index C */
119 /* PCI Error control register */
120 OperationRegion(PERC, SystemIO, 0x00000C14, 0x00000001)
121 Field(PERC, ByteAcc, NoLock, Preserve) {
128 /* Client Management index/data registers */
129 OperationRegion(CMT, SystemIO, 0x00000C50, 0x00000002)
130 Field(CMT, ByteAcc, NoLock, Preserve) {
132 /* Client Management Data register */
140 /* GPM Port register */
141 OperationRegion(GPT, SystemIO, 0x00000C52, 0x00000001)
142 Field(GPT, ByteAcc, NoLock, Preserve) {
153 /* Flash ROM program enable register */
154 OperationRegion(FRE, SystemIO, 0x00000C6F, 0x00000001)
155 Field(FRE, ByteAcc, NoLock, Preserve) {
160 /* PM2 index/data registers */
161 OperationRegion(PM2R, SystemIO, 0x00000CD0, 0x00000002)
162 Field(PM2R, ByteAcc, NoLock, Preserve) {
167 /* Power Management I/O registers */
168 OperationRegion(PIOR, SystemIO, 0x00000CD6, 0x00000002)
169 Field(PIOR, ByteAcc, NoLock, Preserve) {
173 IndexField (PIOI, PIOD, ByteAcc, NoLock, Preserve) {
174 Offset(0x00), /* MiscControl */
178 Offset(0x01), /* MiscStatus */
182 Offset(0x04), /* SmiWakeUpEventEnable3 */
185 Offset(0x07), /* SmiWakeUpEventStatus3 */
188 Offset(0x10), /* AcpiEnable */
191 Offset(0x1C), /* ProgramIoEnable */
198 Offset(0x1D), /* IOMonitorStatus */
205 Offset(0x20), /* AcpiPmEvtBlk */
207 Offset(0x36), /* GEvtLevelConfig */
211 Offset(0x37), /* GPMLevelConfig0 */
218 Offset(0x38), /* GPMLevelConfig1 */
225 Offset(0x3B), /* PMEStatus1 */
234 Offset(0x55), /* SoftPciRst */
242 /* Offset(0x61), */ /* Options_1 */
246 Offset(0x65), /* UsbPMControl */
249 Offset(0x68), /* MiscEnable68 */
253 Offset(0x92), /* GEVENTIN */
256 Offset(0x96), /* GPM98IN */
259 Offset(0x9A), /* EnhanceControl */
262 Offset(0xA8), /* PIO7654Enable */
267 Offset(0xA9), /* PIO7654Status */
275 * First word is PM1_Status, Second word is PM1_Enable
277 OperationRegion(P1EB, SystemIO, APEB, 0x04)
278 Field(P1EB, ByteAcc, NoLock, Preserve) {
303 /* PCIe Configuration Space for 16 busses */
304 OperationRegion(PCFG, SystemMemory, PCBA, 0x01000000) /* Each bus consumes 1MB */
305 Field(PCFG, ByteAcc, NoLock, Preserve) {
306 /* Byte offsets are computed using the following technique:
307 * ((bus number + 1) * ((device number * 8) * 4096)) + register offset
308 * The 8 comes from 8 functions per device, and 4096 bytes per function config space
310 Offset(0x00088024), /* Byte offset to SATA register 24h - Bus 0, Device 17, Function 0 */
312 Offset(0x00098042), /* Byte offset to OHCI0 register 42h - Bus 0, Device 19, Function 0 */
323 Offset(0x000A0004), /* Byte offset to SMBUS register 4h - Bus 0, Device 20, Function 0 */
326 Offset(0x000A0008), /* Byte offset to SMBUS register 8h - Bus 0, Device 20, Function 0 */
328 Offset(0x000A0014), /* Byte offset to SMBUS register 14h - Bus 0, Device 20, Function 0 */
330 Offset(0x000A0078), /* Byte offset to SMBUS register 78h - Bus 0, Device 20, Function 0 */
332 P92E, 1, /* Port92 decode enable */
335 OperationRegion(SB5, SystemMemory, STB5, 0x1000)
336 Field(SB5, AnyAcc, NoLock, Preserve){
338 Offset(0x120), /* Port 0 Task file status */
344 Offset(0x128), /* Port 0 Serial ATA status */
348 Offset(0x12C), /* Port 0 Serial ATA control */
350 Offset(0x130), /* Port 0 Serial ATA error */
355 offset(0x1A0), /* Port 1 Task file status */
361 Offset(0x1A8), /* Port 1 Serial ATA status */
365 Offset(0x1AC), /* Port 1 Serial ATA control */
367 Offset(0x1B0), /* Port 1 Serial ATA error */
372 Offset(0x220), /* Port 2 Task file status */
378 Offset(0x228), /* Port 2 Serial ATA status */
382 Offset(0x22C), /* Port 2 Serial ATA control */
384 Offset(0x230), /* Port 2 Serial ATA error */
389 Offset(0x2A0), /* Port 3 Task file status */
395 Offset(0x2A8), /* Port 3 Serial ATA status */
399 Offset(0x2AC), /* Port 3 Serial ATA control */
401 Offset(0x2B0), /* Port 3 Serial ATA error */
408 #include "acpi/routing.asl"
414 if(LNotEqual(OSVR, Ones)) {Return(OSVR)} /* OS version was already detected */
418 Store(1, OSVR) /* Assume some form of XP */
419 if (\_OSI("Windows 2006")) /* Vista */
424 If(WCMP(\_OS,"Linux")) {
425 Store(3, OSVR) /* Linux */
427 Store(4, OSVR) /* Gotta be WinCE */
433 Method(_PIC, 0x01, NotSerialized)
441 Method(CIRQ, 0x00, NotSerialized){
452 Name(IRQB, ResourceTemplate(){
453 IRQ(Level,ActiveLow,Shared){15}
456 Name(IRQP, ResourceTemplate(){
457 IRQ(Level,ActiveLow,Exclusive){3, 4, 5, 7, 10, 11, 12, 15}
460 Name(PITF, ResourceTemplate(){
461 IRQ(Level,ActiveLow,Exclusive){9}
465 Name(_HID, EISAID("PNP0C0F"))
470 Return(0x0B) /* sata is invisible */
472 Return(0x09) /* sata is disabled */
474 } /* End Method(_SB.INTA._STA) */
477 /* DBGO("\\_SB\\LNKA\\_DIS\n") */
479 } /* End Method(_SB.INTA._DIS) */
482 /* DBGO("\\_SB\\LNKA\\_PRS\n") */
484 } /* Method(_SB.INTA._PRS) */
487 /* DBGO("\\_SB\\LNKA\\_CRS\n") */
488 CreateWordField(IRQB, 0x1, IRQN)
489 ShiftLeft(1, PINA, IRQN)
491 } /* Method(_SB.INTA._CRS) */
494 /* DBGO("\\_SB\\LNKA\\_CRS\n") */
495 CreateWordField(ARG0, 1, IRQM)
497 /* Use lowest available IRQ */
498 FindSetRightBit(IRQM, Local0)
503 } /* End Method(_SB.INTA._SRS) */
504 } /* End Device(INTA) */
507 Name(_HID, EISAID("PNP0C0F"))
512 Return(0x0B) /* sata is invisible */
514 Return(0x09) /* sata is disabled */
516 } /* End Method(_SB.INTB._STA) */
519 /* DBGO("\\_SB\\LNKB\\_DIS\n") */
521 } /* End Method(_SB.INTB._DIS) */
524 /* DBGO("\\_SB\\LNKB\\_PRS\n") */
526 } /* Method(_SB.INTB._PRS) */
529 /* DBGO("\\_SB\\LNKB\\_CRS\n") */
530 CreateWordField(IRQB, 0x1, IRQN)
531 ShiftLeft(1, PINB, IRQN)
533 } /* Method(_SB.INTB._CRS) */
536 /* DBGO("\\_SB\\LNKB\\_CRS\n") */
537 CreateWordField(ARG0, 1, IRQM)
539 /* Use lowest available IRQ */
540 FindSetRightBit(IRQM, Local0)
545 } /* End Method(_SB.INTB._SRS) */
546 } /* End Device(INTB) */
549 Name(_HID, EISAID("PNP0C0F"))
554 Return(0x0B) /* sata is invisible */
556 Return(0x09) /* sata is disabled */
558 } /* End Method(_SB.INTC._STA) */
561 /* DBGO("\\_SB\\LNKC\\_DIS\n") */
563 } /* End Method(_SB.INTC._DIS) */
566 /* DBGO("\\_SB\\LNKC\\_PRS\n") */
568 } /* Method(_SB.INTC._PRS) */
571 /* DBGO("\\_SB\\LNKC\\_CRS\n") */
572 CreateWordField(IRQB, 0x1, IRQN)
573 ShiftLeft(1, PINC, IRQN)
575 } /* Method(_SB.INTC._CRS) */
578 /* DBGO("\\_SB\\LNKC\\_CRS\n") */
579 CreateWordField(ARG0, 1, IRQM)
581 /* Use lowest available IRQ */
582 FindSetRightBit(IRQM, Local0)
587 } /* End Method(_SB.INTC._SRS) */
588 } /* End Device(INTC) */
591 Name(_HID, EISAID("PNP0C0F"))
596 Return(0x0B) /* sata is invisible */
598 Return(0x09) /* sata is disabled */
600 } /* End Method(_SB.INTD._STA) */
603 /* DBGO("\\_SB\\LNKD\\_DIS\n") */
605 } /* End Method(_SB.INTD._DIS) */
608 /* DBGO("\\_SB\\LNKD\\_PRS\n") */
610 } /* Method(_SB.INTD._PRS) */
613 /* DBGO("\\_SB\\LNKD\\_CRS\n") */
614 CreateWordField(IRQB, 0x1, IRQN)
615 ShiftLeft(1, PIND, IRQN)
617 } /* Method(_SB.INTD._CRS) */
620 /* DBGO("\\_SB\\LNKD\\_CRS\n") */
621 CreateWordField(ARG0, 1, IRQM)
623 /* Use lowest available IRQ */
624 FindSetRightBit(IRQM, Local0)
629 } /* End Method(_SB.INTD._SRS) */
630 } /* End Device(INTD) */
633 Name(_HID, EISAID("PNP0C0F"))
638 Return(0x0B) /* sata is invisible */
640 Return(0x09) /* sata is disabled */
642 } /* End Method(_SB.INTE._STA) */
645 /* DBGO("\\_SB\\LNKE\\_DIS\n") */
647 } /* End Method(_SB.INTE._DIS) */
650 /* DBGO("\\_SB\\LNKE\\_PRS\n") */
652 } /* Method(_SB.INTE._PRS) */
655 /* DBGO("\\_SB\\LNKE\\_CRS\n") */
656 CreateWordField(IRQB, 0x1, IRQN)
657 ShiftLeft(1, PINE, IRQN)
659 } /* Method(_SB.INTE._CRS) */
662 /* DBGO("\\_SB\\LNKE\\_CRS\n") */
663 CreateWordField(ARG0, 1, IRQM)
665 /* Use lowest available IRQ */
666 FindSetRightBit(IRQM, Local0)
671 } /* End Method(_SB.INTE._SRS) */
672 } /* End Device(INTE) */
675 Name(_HID, EISAID("PNP0C0F"))
680 Return(0x0B) /* sata is invisible */
682 Return(0x09) /* sata is disabled */
684 } /* End Method(_SB.INTF._STA) */
687 /* DBGO("\\_SB\\LNKF\\_DIS\n") */
689 } /* End Method(_SB.INTF._DIS) */
692 /* DBGO("\\_SB\\LNKF\\_PRS\n") */
694 } /* Method(_SB.INTF._PRS) */
697 /* DBGO("\\_SB\\LNKF\\_CRS\n") */
698 CreateWordField(IRQB, 0x1, IRQN)
699 ShiftLeft(1, PINF, IRQN)
701 } /* Method(_SB.INTF._CRS) */
704 /* DBGO("\\_SB\\LNKF\\_CRS\n") */
705 CreateWordField(ARG0, 1, IRQM)
707 /* Use lowest available IRQ */
708 FindSetRightBit(IRQM, Local0)
713 } /* End Method(_SB.INTF._SRS) */
714 } /* End Device(INTF) */
717 Name(_HID, EISAID("PNP0C0F"))
722 Return(0x0B) /* sata is invisible */
724 Return(0x09) /* sata is disabled */
726 } /* End Method(_SB.INTG._STA) */
729 /* DBGO("\\_SB\\LNKG\\_DIS\n") */
731 } /* End Method(_SB.INTG._DIS) */
734 /* DBGO("\\_SB\\LNKG\\_PRS\n") */
736 } /* Method(_SB.INTG._CRS) */
739 /* DBGO("\\_SB\\LNKG\\_CRS\n") */
740 CreateWordField(IRQB, 0x1, IRQN)
741 ShiftLeft(1, PING, IRQN)
743 } /* Method(_SB.INTG._CRS) */
746 /* DBGO("\\_SB\\LNKG\\_CRS\n") */
747 CreateWordField(ARG0, 1, IRQM)
749 /* Use lowest available IRQ */
750 FindSetRightBit(IRQM, Local0)
755 } /* End Method(_SB.INTG._SRS) */
756 } /* End Device(INTG) */
759 Name(_HID, EISAID("PNP0C0F"))
764 Return(0x0B) /* sata is invisible */
766 Return(0x09) /* sata is disabled */
768 } /* End Method(_SB.INTH._STA) */
771 /* DBGO("\\_SB\\LNKH\\_DIS\n") */
773 } /* End Method(_SB.INTH._DIS) */
776 /* DBGO("\\_SB\\LNKH\\_PRS\n") */
778 } /* Method(_SB.INTH._CRS) */
781 /* DBGO("\\_SB\\LNKH\\_CRS\n") */
782 CreateWordField(IRQB, 0x1, IRQN)
783 ShiftLeft(1, PINH, IRQN)
785 } /* Method(_SB.INTH._CRS) */
788 /* DBGO("\\_SB\\LNKH\\_CRS\n") */
789 CreateWordField(ARG0, 1, IRQM)
791 /* Use lowest available IRQ */
792 FindSetRightBit(IRQM, Local0)
797 } /* End Method(_SB.INTH._SRS) */
798 } /* End Device(INTH) */
800 } /* End Scope(_SB) */
802 #include <southbridge/amd/common/acpi/sleepstates.asl>
804 /* Wake status package */
805 Name(WKST,Package(){Zero, Zero})
808 * \_PTS - Prepare to Sleep method
811 * Arg0=The value of the sleeping state S1=1, S2=2, etc
816 * The _PTS control method is executed at the beginning of the sleep process
817 * for S1-S5. The sleeping value is passed to the _PTS control method. This
818 * control method may be executed a relatively long time before entering the
819 * sleep state and the OS may abort the operation without notification to
820 * the ACPI driver. This method cannot modify the configuration or power
821 * state of any device in the system.
824 /* DBGO("\\_PTS\n") */
825 /* DBGO("From S0 to S") */
829 /* Don't allow PCIRST# to reset USB */
834 /* Clear sleep SMI status flag and enable sleep SMI trap. */
838 /* On older chips, clear PciExpWakeDisEn */
839 /*if (LLessEqual(\_SB.SBRI, 0x13)) {
844 /* Clear wake status structure. */
845 Store(0, Index(WKST,0))
846 Store(0, Index(WKST,1))
847 \_SB.PCI0.SIOS (Arg0)
848 } /* End Method(\_PTS) */
851 * The following method results in a "not a valid reserved NameSeg"
852 * warning so I have commented it out for the duration. It isn't
853 * used, so it could be removed.
856 * \_GTS OEM Going To Sleep method
859 * Arg0=The value of the sleeping state S1=1, S2=2
866 * DBGO("From S0 to S")
873 * \_BFS OEM Back From Sleep method
876 * Arg0=The value of the sleeping state S1=1, S2=2
882 /* DBGO("\\_BFS\n") */
885 /* DBGO(" to S0\n") */
889 * \_WAK System Wake method
892 * Arg0=The value of the sleeping state S1=1, S2=2
895 * Return package of 2 DWords
897 * 0x00000000 wake succeeded
898 * 0x00000001 Wake was signaled but failed due to lack of power
899 * 0x00000002 Wake was signaled but failed due to thermal condition
900 * Dword 2 - Power Supply state
901 * if non-zero the effective S-state the power supply entered
904 /* DBGO("\\_WAK\n") */
907 /* DBGO(" to S0\n") */
912 /* Restore PCIRST# so it resets USB */
917 /* Arbitrarily clear PciExpWakeStatus */
921 /* if (DeRefOf(Index(WKST,0))) {
922 * Store(0, Index(WKST,1))
924 * Store(Arg0, Index(WKST,1))
929 } /* End Method(\_WAK) */
931 Scope(\_GPE) { /* Start Scope GPE */
932 /* General event 0 */
934 * DBGO("\\_GPE\\_L00\n")
938 /* General event 1 */
940 * DBGO("\\_GPE\\_L00\n")
944 /* General event 2 */
946 * DBGO("\\_GPE\\_L00\n")
950 /* General event 3 */
952 /* DBGO("\\_GPE\\_L00\n") */
953 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
956 /* General event 4 */
958 * DBGO("\\_GPE\\_L00\n")
962 /* General event 5 */
964 * DBGO("\\_GPE\\_L00\n")
968 /* General event 6 - Used for GPM6, moved to USB.asl */
970 * DBGO("\\_GPE\\_L00\n")
974 /* General event 7 - Used for GPM7, moved to USB.asl */
976 * DBGO("\\_GPE\\_L07\n")
980 /* Legacy PM event */
982 /* DBGO("\\_GPE\\_L08\n") */
985 /* Temp warning (TWarn) event */
987 /* DBGO("\\_GPE\\_L09\n") */
988 Notify (\_TZ.TZ00, 0x80)
993 * DBGO("\\_GPE\\_L0A\n")
997 /* USB controller PME# */
999 /* DBGO("\\_GPE\\_L0B\n") */
1000 Notify(\_SB.PCI0.UOH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1001 Notify(\_SB.PCI0.UOH2, 0x02) /* NOTIFY_DEVICE_WAKE */
1002 Notify(\_SB.PCI0.UOH3, 0x02) /* NOTIFY_DEVICE_WAKE */
1003 Notify(\_SB.PCI0.UOH4, 0x02) /* NOTIFY_DEVICE_WAKE */
1004 Notify(\_SB.PCI0.UOH5, 0x02) /* NOTIFY_DEVICE_WAKE */
1005 Notify(\_SB.PCI0.UEH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1006 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1009 /* AC97 controller PME# */
1011 * DBGO("\\_GPE\\_L0C\n")
1015 /* OtherTherm PME# */
1017 * DBGO("\\_GPE\\_L0D\n")
1021 /* GPM9 SCI event - Moved to USB.asl */
1023 * DBGO("\\_GPE\\_L0E\n")
1027 /* PCIe HotPlug event */
1029 * DBGO("\\_GPE\\_L0F\n")
1033 /* ExtEvent0 SCI event */
1035 /* DBGO("\\_GPE\\_L10\n") */
1039 /* ExtEvent1 SCI event */
1041 /* DBGO("\\_GPE\\_L11\n") */
1044 /* PCIe PME# event */
1046 * DBGO("\\_GPE\\_L12\n")
1050 /* GPM0 SCI event - Moved to USB.asl */
1052 * DBGO("\\_GPE\\_L13\n")
1056 /* GPM1 SCI event - Moved to USB.asl */
1058 * DBGO("\\_GPE\\_L14\n")
1062 /* GPM2 SCI event - Moved to USB.asl */
1064 * DBGO("\\_GPE\\_L15\n")
1068 /* GPM3 SCI event - Moved to USB.asl */
1070 * DBGO("\\_GPE\\_L16\n")
1074 /* GPM8 SCI event - Moved to USB.asl */
1076 * DBGO("\\_GPE\\_L17\n")
1080 /* GPIO0 or GEvent8 event */
1082 /* DBGO("\\_GPE\\_L18\n") */
1083 Notify(\_SB.PCI0.PBR2, 0x02) /* NOTIFY_DEVICE_WAKE */
1084 Notify(\_SB.PCI0.PBR4, 0x02) /* NOTIFY_DEVICE_WAKE */
1085 Notify(\_SB.PCI0.PBR5, 0x02) /* NOTIFY_DEVICE_WAKE */
1086 Notify(\_SB.PCI0.PBR6, 0x02) /* NOTIFY_DEVICE_WAKE */
1087 Notify(\_SB.PCI0.PBR7, 0x02) /* NOTIFY_DEVICE_WAKE */
1088 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1091 /* GPM4 SCI event - Moved to USB.asl */
1093 * DBGO("\\_GPE\\_L19\n")
1097 /* GPM5 SCI event - Moved to USB.asl */
1099 * DBGO("\\_GPE\\_L1A\n")
1103 /* Azalia SCI event */
1105 /* DBGO("\\_GPE\\_L1B\n") */
1106 Notify(\_SB.PCI0.AZHD, 0x02) /* NOTIFY_DEVICE_WAKE */
1107 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1110 /* GPM6 SCI event - Reassigned to _L06 */
1112 * DBGO("\\_GPE\\_L1C\n")
1116 /* GPM7 SCI event - Reassigned to _L07 */
1118 * DBGO("\\_GPE\\_L1D\n")
1122 /* GPIO2 or GPIO66 SCI event */
1124 * DBGO("\\_GPE\\_L1E\n")
1128 /* SATA SCI event - Moved to sata.asl */
1130 * DBGO("\\_GPE\\_L1F\n")
1134 } /* End Scope GPE */
1136 #include "acpi/usb.asl"
1139 Scope(\_SB) { /* Start \_SB scope */
1140 #include <arch/x86/acpi/globutil.asl> /* global utility methods expected within the \_SB scope */
1143 /* Note: Only need HID on Primary Bus */
1146 External (TOM2) /* (<real tom2> >> 20) to make it fit into 32 bit for XP */
1147 Name(_HID, EISAID("PNP0A03"))
1148 Name(_ADR, 0x00180000) /* Dev# = BSP Dev#, Func# = 0 */
1149 Method(_BBN, 0) { /* Bus number = 0 */
1153 /* DBGO("\\_SB\\PCI0\\_STA\n") */
1154 Return(0x0B) /* Status is visible */
1158 If(PMOD){ Return(APR0) } /* APIC mode */
1159 Return (PR0) /* PIC Mode */
1162 /* Describe the Northbridge devices */
1164 Name(_ADR, 0x00000000)
1167 /* The internal GFX bridge */
1169 Name(_ADR, 0x00010000)
1170 Name(_PRW, Package() {0x18, 4})
1176 /* The external GFX bridge */
1178 Name(_ADR, 0x00020000)
1179 Name(_PRW, Package() {0x18, 4})
1181 If(PMOD){ Return(APS2) } /* APIC mode */
1182 Return (PS2) /* PIC Mode */
1186 /* Dev3 is also an external GFX bridge, not used in Herring */
1189 Name(_ADR, 0x00040000)
1190 Name(_PRW, Package() {0x18, 4})
1192 If(PMOD){ Return(APS4) } /* APIC mode */
1193 Return (PS4) /* PIC Mode */
1198 Name(_ADR, 0x00050000)
1199 Name(_PRW, Package() {0x18, 4})
1201 If(PMOD){ Return(APS5) } /* APIC mode */
1202 Return (PS5) /* PIC Mode */
1207 Name(_ADR, 0x00060000)
1208 Name(_PRW, Package() {0x18, 4})
1210 If(PMOD){ Return(APS6) } /* APIC mode */
1211 Return (PS6) /* PIC Mode */
1215 /* The onboard EtherNet chip */
1217 Name(_ADR, 0x00070000)
1218 Name(_PRW, Package() {0x18, 4})
1220 If(PMOD){ Return(APS7) } /* APIC mode */
1221 Return (PS7) /* PIC Mode */
1227 Name(_ADR, 0x00090000)
1228 Name(_PRW, Package() {0x18, 4})
1230 If(PMOD){ Return(APS9) } /* APIC mode */
1231 Return (PS9) /* PIC Mode */
1236 Name(_ADR, 0x000A0000)
1237 Name(_PRW, Package() {0x18, 4})
1239 If(PMOD){ Return(APSa) } /* APIC mode */
1240 Return (PSa) /* PIC Mode */
1245 /* PCI slot 1, 2, 3 */
1247 Name(_ADR, 0x00140004)
1248 Name(_PRW, Package() {0x18, 4})
1255 /* Describe the Southbridge devices */
1257 Name(_ADR, 0x00110000)
1258 #include "acpi/sata.asl"
1262 Name(_ADR, 0x00130000)
1263 Name(_PRW, Package() {0x0B, 3})
1267 Name(_ADR, 0x00130001)
1268 Name(_PRW, Package() {0x0B, 3})
1272 Name(_ADR, 0x00130002)
1273 Name(_PRW, Package() {0x0B, 3})
1277 Name(_ADR, 0x00130003)
1278 Name(_PRW, Package() {0x0B, 3})
1282 Name(_ADR, 0x00130004)
1283 Name(_PRW, Package() {0x0B, 3})
1287 Name(_ADR, 0x00130005)
1288 Name(_PRW, Package() {0x0B, 3})
1292 Name(_ADR, 0x00140000)
1295 /* Primary (and only) IDE channel */
1297 Name(_ADR, 0x00140001)
1298 #include "acpi/ide.asl"
1302 Name(_ADR, 0x00140002)
1303 OperationRegion(AZPD, PCI_Config, 0x00, 0x100)
1304 Field(AZPD, AnyAcc, NoLock, Preserve) {
1328 If(LEqual(OSVR,3)){ /* If we are running Linux */
1337 Name(_ADR, 0x00140003)
1339 * DBGO("\\_SB\\PCI0\\LpcIsaBr\\_INI\n")
1340 } */ /* End Method(_SB.SBRDG._INI) */
1342 /* Real Time Clock Device */
1344 Name(_HID, EISAID("PNP0B00")) /* AT Real Time Clock (not PIIX4 compatible) */
1345 Name(_CRS, ResourceTemplate() {
1347 IO(Decode16,0x0070, 0x0070, 0, 2)
1348 /* IO(Decode16,0x0070, 0x0070, 0, 4) */
1350 } /* End Device(_SB.PCI0.LpcIsaBr.RTC0) */
1352 Device(TMR) { /* Timer */
1353 Name(_HID,EISAID("PNP0100")) /* System Timer */
1354 Name(_CRS, ResourceTemplate() {
1356 IO(Decode16, 0x0040, 0x0040, 0, 4)
1357 /* IO(Decode16, 0x0048, 0x0048, 0, 4) */
1359 } /* End Device(_SB.PCI0.LpcIsaBr.TMR) */
1361 Device(SPKR) { /* Speaker */
1362 Name(_HID,EISAID("PNP0800")) /* AT style speaker */
1363 Name(_CRS, ResourceTemplate() {
1364 IO(Decode16, 0x0061, 0x0061, 0, 1)
1366 } /* End Device(_SB.PCI0.LpcIsaBr.SPKR) */
1369 Name(_HID,EISAID("PNP0000")) /* AT Interrupt Controller */
1370 Name(_CRS, ResourceTemplate() {
1372 IO(Decode16,0x0020, 0x0020, 0, 2)
1373 IO(Decode16,0x00A0, 0x00A0, 0, 2)
1374 /* IO(Decode16, 0x00D0, 0x00D0, 0x10, 0x02) */
1375 /* IO(Decode16, 0x04D0, 0x04D0, 0x10, 0x02) */
1377 } /* End Device(_SB.PCI0.LpcIsaBr.PIC) */
1379 Device(MAD) { /* 8257 DMA */
1380 Name(_HID,EISAID("PNP0200")) /* Hardware Device ID */
1381 Name(_CRS, ResourceTemplate() {
1382 DMA(Compatibility,BusMaster,Transfer8){4}
1383 IO(Decode16, 0x0000, 0x0000, 0x10, 0x10)
1384 IO(Decode16, 0x0081, 0x0081, 0x01, 0x03)
1385 IO(Decode16, 0x0087, 0x0087, 0x01, 0x01)
1386 IO(Decode16, 0x0089, 0x0089, 0x01, 0x03)
1387 IO(Decode16, 0x008F, 0x008F, 0x01, 0x01)
1388 IO(Decode16, 0x00C0, 0x00C0, 0x10, 0x20)
1389 }) /* End Name(_SB.PCI0.LpcIsaBr.MAD._CRS) */
1390 } /* End Device(_SB.PCI0.LpcIsaBr.MAD) */
1393 Name(_HID,EISAID("PNP0C04")) /* Math Coprocessor */
1394 Name(_CRS, ResourceTemplate() {
1395 IO(Decode16, 0x00F0, 0x00F0, 0, 0x10)
1398 } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */
1401 Name(_HID,EISAID("PNP0103"))
1402 Name(CRS,ResourceTemplate() {
1403 Memory32Fixed(ReadOnly,0xFED00000, 0x00000400, HPT) /* 1kb reserved space */
1406 Return(0x0F) /* sata is visible */
1409 CreateDwordField(CRS, ^HPT._BAS, HPBX)
1413 } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */
1417 Name(_ADR, 0x00140004)
1418 } /* end HostPciBr */
1421 Name(_ADR, 0x00140005)
1422 } /* end Ac97audio */
1425 Name(_ADR, 0x00140006)
1426 } /* end Ac97modem */
1428 /* ITE8718 Support */
1429 OperationRegion (IOID, SystemIO, 0x2E, 0x02) /* sometimes it is 0x4E */
1430 Field (IOID, ByteAcc, NoLock, Preserve)
1432 SIOI, 8, SIOD, 8 /* 0x2E and 0x2F */
1435 IndexField (SIOI, SIOD, ByteAcc, NoLock, Preserve)
1438 LDN, 8, /* Logical Device Number */
1440 CID1, 8, /* Chip ID Byte 1, 0x87 */
1441 CID2, 8, /* Chip ID Byte 2, 0x12 */
1443 ACTR, 8, /* Function activate */
1445 APC0, 8, /* APC/PME Event Enable Register */
1446 APC1, 8, /* APC/PME Status Register */
1447 APC2, 8, /* APC/PME Control Register 1 */
1448 APC3, 8, /* Environment Controller Special Configuration Register */
1449 APC4, 8 /* APC/PME Control Register 2 */
1452 /* Enter the 8718 MB PnP Mode */
1458 Store(0x55, SIOI) /* 8718 magic number */
1460 /* Exit the 8718 MB PnP Mode */
1467 * Keyboard PME is routed to SB700 Gevent3. We can wake
1468 * up the system by pressing the key.
1472 /* We only enable KBD PME for S5. */
1473 If (LLess (Arg0, 0x05))
1476 /* DBGO("8718F\n") */
1479 Store (One, ACTR) /* Enable EC */
1483 */ /* falling edge. which mode? Not sure. */
1486 Store (0x08, APC1) /* clear PME status, Use 0x18 for mouse & KBD */
1488 Store (0x08, APC0) /* enable PME, Use 0x18 for mouse & KBD */
1497 Store (Zero, APC0) /* disable keyboard PME */
1499 Store (0xFF, APC1) /* clear keyboard PME status */
1503 Name(CRES, ResourceTemplate() {
1504 IO(Decode16, 0x0CF8, 0x0CF8, 1, 8)
1506 WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1507 0x0000, /* address granularity */
1508 0x0000, /* range minimum */
1509 0x0CF7, /* range maximum */
1510 0x0000, /* translation */
1514 WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1515 0x0000, /* address granularity */
1516 0x0D00, /* range minimum */
1517 0xFFFF, /* range maximum */
1518 0x0000, /* translation */
1522 Memory32Fixed(READWRITE, 0, 0xA0000, BSMM)
1523 Memory32Fixed(READONLY, 0x000A0000, 0x00020000, VGAM) /* VGA memory space */
1524 Memory32Fixed(READONLY, 0x000C0000, 0x00020000, EMM1) /* Assume C0000-E0000 empty */
1525 Memory32Fixed(READONLY, 0x000E0000, 0x00020000, RDBS) /* BIOS ROM area */
1527 /* DRAM Memory from 1MB to TopMem */
1528 Memory32Fixed(READWRITE, 0x00100000, 0, DMLO) /* 1MB to TopMem */
1530 /* BIOS space just below 4GB */
1532 ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1533 0x00, /* Granularity */
1534 0x00000000, /* Min */
1535 0x00000000, /* Max */
1536 0x00000000, /* Translation */
1537 0x00000001, /* Max-Min, RLEN */
1542 /* DRAM memory from 4GB to TopMem2 */
1543 QWORDMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1544 0x00000000, /* Granularity */
1545 0x00000000, /* Min */
1546 0x00000000, /* Max */
1547 0x00000000, /* Translation */
1548 0x00000001, /* Max-Min, RLEN */
1553 /* BIOS space just below 16EB */
1554 QWORDMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1555 0x00000000, /* Granularity */
1556 0x00000000, /* Min */
1557 0x00000000, /* Max */
1558 0x00000000, /* Translation */
1559 0x00000001, /* Max-Min, RLEN */
1564 }) /* End Name(_SB.PCI0.CRES) */
1567 /* DBGO("\\_SB\\PCI0\\_CRS\n") */
1569 CreateDWordField(CRES, ^EMM1._BAS, EM1B)
1570 CreateDWordField(CRES, ^EMM1._LEN, EM1L)
1571 CreateDWordField(CRES, ^DMLO._BAS, DMLB)
1572 CreateDWordField(CRES, ^DMLO._LEN, DMLL)
1573 CreateDWordField(CRES, ^PCBM._MIN, PBMB)
1574 CreateDWordField(CRES, ^PCBM._LEN, PBML)
1576 CreateQWordField(CRES, ^DMHI._MIN, DMHB)
1577 CreateQWordField(CRES, ^DMHI._LEN, DMHL)
1578 CreateQWordField(CRES, ^PEBM._MIN, EBMB)
1579 CreateQWordField(CRES, ^PEBM._LEN, EBML)
1581 If(LGreater(LOMH, 0xC0000)){
1582 Store(0xC0000, EM1B) /* Hole above C0000 and below E0000 */
1583 Subtract(LOMH, 0xC0000, EM1L) /* subtract start, assumes allocation from C0000 going up */
1586 /* Set size of memory from 1MB to TopMem */
1587 Subtract(TOM1, 0x100000, DMLL)
1590 * If(LNotEqual(TOM2, 0x00000000)){
1591 * Store(0x100000000,DMHB) DRAM from 4GB to TopMem2
1592 * ShiftLeft(TOM2, 20, Local0)
1593 * Subtract(Local0, 0x100000000, DMHL)
1597 /* If there is no memory above 4GB, put the BIOS just below 4GB */
1598 If(LEqual(TOM2, 0x00000000)){
1599 Store(PBAD,PBMB) /* Reserve the "BIOS" space */
1602 Else { /* Otherwise, put the BIOS just below 16EB */
1603 ShiftLeft(PBAD,16,EBMB) /* Reserve the "BIOS" space */
1607 Return(CRES) /* note to change the Name buffer */
1608 } /* end of Method(_SB.PCI0._CRS) */
1612 * FIRST METHOD CALLED UPON BOOT
1614 * 1. If debugging, print current OS and ACPI interpreter.
1615 * 2. Get PCI Interrupt routing from ACPI VSM, this
1616 * value is based on user choice in BIOS setup.
1619 /* DBGO("\\_SB\\_INI\n") */
1620 /* DBGO(" DSDT.ASL code from ") */
1621 /* DBGO(__DATE__) */
1623 /* DBGO(__TIME__) */
1624 /* DBGO("\n Sleep states supported: ") */
1626 /* DBGO(" \\_OS=") */
1628 /* DBGO("\n \\_REV=") */
1632 /* Determine the OS we're running on */
1635 /* On older chips, clear PciExpWakeDisEn */
1636 /*if (LLessEqual(\SBRI, 0x13)) {
1640 } /* End Method(_SB._INI) */
1641 } /* End Device(PCI0) */
1643 Device(PWRB) { /* Start Power button device */
1644 Name(_HID, EISAID("PNP0C0C"))
1646 Name(_PRW, Package () {3, 0x04}) /* wake from S1-S4 */
1647 Name(_STA, 0x0B) /* sata is invisible */
1649 } /* End \_SB scope */
1653 /* DBGO("\\_SI\\_SST\n") */
1654 /* DBGO(" New Indicator state: ") */
1658 } /* End Scope SI */
1660 #include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
1669 Method(_AC0,0) { /* Active Cooling 0 (0=highest fan speed) */
1670 /* DBGO("\\_TZ\\TZ00\\_AC0\n") */
1671 Return(Add(0, 2730))
1673 Method(_AL0,0) { /* Returns package of cooling device to turn on */
1674 /* DBGO("\\_TZ\\TZ00\\_AL0\n") */
1675 Return(Package() {\_TZ.TZ00.FAN0})
1678 Name(_HID, EISAID("PNP0C0B"))
1679 Name(_PR0, Package() {PFN0})
1682 PowerResource(PFN0,0,0) {
1688 /* DBGO("\\_TZ\\TZ00\\FAN0 _ON\n") */
1691 /* DBGO("\\_TZ\\TZ00\\FAN0 _OFF\n") */
1695 Method(_HOT,0) { /* return hot temp in tenths degree Kelvin */
1696 /* DBGO("\\_TZ\\TZ00\\_HOT\n") */
1697 Return (Add (THOT, KELV))
1699 Method(_CRT,0) { /* return critical temp in tenths degree Kelvin */
1700 /* DBGO("\\_TZ\\TZ00\\_CRT\n") */
1701 Return (Add (TCRT, KELV))
1703 Method(_TMP,0) { /* return current temp of this zone */
1704 Store (SMBR (0x07, 0x4C,, 0x00), Local0)
1705 If (LGreater (Local0, 0x10)) {
1706 Store (Local0, Local1)
1709 Add (Local0, THOT, Local0)
1710 Return (Add (400, KELV))
1713 Store (SMBR (0x07, 0x4C, 0x01), Local0)
1714 /* only the two MSBs in the external temperature low byte are used, resolution 0.25. We ignore it */
1715 /* Store (SMBR (0x07, 0x4C, 0x10), Local2) */
1716 If (LGreater (Local0, 0x10)) {
1717 If (LGreater (Local0, Local1)) {
1718 Store (Local0, Local1)
1721 Multiply (Local1, 10, Local1)
1722 Return (Add (Local1, KELV))
1725 Add (Local0, THOT, Local0)
1726 Return (Add (400 , KELV))
1732 /* End of ASL file */