2 * This file is part of the coreboot project.
4 * Copyright (C) 2011 Advanced Micro Devices, Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
16 /* DefinitionBlock Statement */
18 "DSDT.AML", /* Output filename */
19 "DSDT", /* Signature */
20 0x02, /* DSDT Revision, needs to be 2 for 64bit */
21 "AVALUE ", /* OEMID */
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 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 PIRA, 0x00000008, /* Index 0 */
107 PIRB, 0x00000008, /* Index 1 */
108 PIRC, 0x00000008, /* Index 2 */
109 PIRD, 0x00000008, /* Index 3 */
110 PIRE, 0x00000008, /* Index 4 */
111 PIRF, 0x00000008, /* Index 5 */
112 PIRG, 0x00000008, /* Index 6 */
113 PIRH, 0x00000008, /* Index 7 */
116 /* PCI Error control register */
117 OperationRegion(PERC, SystemIO, 0x00000C14, 0x00000001)
118 Field(PERC, ByteAcc, NoLock, Preserve) {
125 /* Client Management index/data registers */
126 OperationRegion(CMT, SystemIO, 0x00000C50, 0x00000002)
127 Field(CMT, ByteAcc, NoLock, Preserve) {
129 /* Client Management Data register */
137 /* GPM Port register */
138 OperationRegion(GPT, SystemIO, 0x00000C52, 0x00000001)
139 Field(GPT, ByteAcc, NoLock, Preserve) {
150 /* Flash ROM program enable register */
151 OperationRegion(FRE, SystemIO, 0x00000C6F, 0x00000001)
152 Field(FRE, ByteAcc, NoLock, Preserve) {
157 /* PM2 index/data registers */
158 OperationRegion(PM2R, SystemIO, 0x00000CD0, 0x00000002)
159 Field(PM2R, ByteAcc, NoLock, Preserve) {
164 /* Power Management I/O registers, TODO:PMIO is quite different in SB800. */
165 OperationRegion(PIOR, SystemIO, 0x00000CD6, 0x00000002)
166 Field(PIOR, ByteAcc, NoLock, Preserve) {
170 IndexField (PIOI, PIOD, ByteAcc, NoLock, Preserve) {
171 Offset(0x00), /* MiscControl */
175 Offset(0x01), /* MiscStatus */
179 Offset(0x04), /* SmiWakeUpEventEnable3 */
182 Offset(0x07), /* SmiWakeUpEventStatus3 */
185 Offset(0x10), /* AcpiEnable */
188 Offset(0x1C), /* ProgramIoEnable */
195 Offset(0x1D), /* IOMonitorStatus */
202 Offset(0x20), /* AcpiPmEvtBlk. TODO: should be 0x60 */
204 Offset(0x36), /* GEvtLevelConfig */
208 Offset(0x37), /* GPMLevelConfig0 */
215 Offset(0x38), /* GPMLevelConfig1 */
222 Offset(0x3B), /* PMEStatus1 */
231 Offset(0x55), /* SoftPciRst */
239 /* Offset(0x61), */ /* Options_1 */
243 Offset(0x65), /* UsbPMControl */
246 Offset(0x68), /* MiscEnable68 */
250 Offset(0x92), /* GEVENTIN */
253 Offset(0x96), /* GPM98IN */
256 Offset(0x9A), /* EnhanceControl */
259 Offset(0xA8), /* PIO7654Enable */
264 Offset(0xA9), /* PIO7654Status */
272 * First word is PM1_Status, Second word is PM1_Enable
274 OperationRegion(P1EB, SystemIO, APEB, 0x04)
275 Field(P1EB, ByteAcc, NoLock, Preserve) {
300 /* PCIe Configuration Space for 16 busses */
301 OperationRegion(PCFG, SystemMemory, PCBA, 0x01000000) /* Each bus consumes 1MB */
302 Field(PCFG, ByteAcc, NoLock, Preserve) {
303 /* Byte offsets are computed using the following technique:
304 * ((bus number + 1) * ((device number * 8) * 4096)) + register offset
305 * The 8 comes from 8 functions per device, and 4096 bytes per function config space
307 Offset(0x00088024), /* Byte offset to SATA register 24h - Bus 0, Device 17, Function 0 */
309 Offset(0x00098042), /* Byte offset to OHCI0 register 42h - Bus 0, Device 19, Function 0 */
320 Offset(0x000A0004), /* Byte offset to SMBUS register 4h - Bus 0, Device 20, Function 0 */
323 Offset(0x000A0008), /* Byte offset to SMBUS register 8h - Bus 0, Device 20, Function 0 */
325 Offset(0x000A0014), /* Byte offset to SMBUS register 14h - Bus 0, Device 20, Function 0 */
327 Offset(0x000A0078), /* Byte offset to SMBUS register 78h - Bus 0, Device 20, Function 0 */
329 P92E, 1, /* Port92 decode enable */
332 OperationRegion(SB5, SystemMemory, STB5, 0x1000)
333 Field(SB5, AnyAcc, NoLock, Preserve){
335 Offset(0x120), /* Port 0 Task file status */
341 Offset(0x128), /* Port 0 Serial ATA status */
345 Offset(0x12C), /* Port 0 Serial ATA control */
347 Offset(0x130), /* Port 0 Serial ATA error */
352 offset(0x1A0), /* Port 1 Task file status */
358 Offset(0x1A8), /* Port 1 Serial ATA status */
362 Offset(0x1AC), /* Port 1 Serial ATA control */
364 Offset(0x1B0), /* Port 1 Serial ATA error */
369 Offset(0x220), /* Port 2 Task file status */
375 Offset(0x228), /* Port 2 Serial ATA status */
379 Offset(0x22C), /* Port 2 Serial ATA control */
381 Offset(0x230), /* Port 2 Serial ATA error */
386 Offset(0x2A0), /* Port 3 Task file status */
392 Offset(0x2A8), /* Port 3 Serial ATA status */
396 Offset(0x2AC), /* Port 3 Serial ATA control */
398 Offset(0x2B0), /* Port 3 Serial ATA error */
405 #include "acpi/routing.asl"
411 if(LNotEqual(OSVR, Ones)) {Return(OSVR)} /* OS version was already detected */
415 Store(1, OSVR) /* Assume some form of XP */
416 if (\_OSI("Windows 2006")) /* Vista */
421 If(WCMP(\_OS,"Linux")) {
422 Store(3, OSVR) /* Linux */
424 Store(4, OSVR) /* Gotta be WinCE */
430 Method(_PIC, 0x01, NotSerialized)
438 Method(CIRQ, 0x00, NotSerialized){
449 Name(IRQB, ResourceTemplate(){
450 IRQ(Level,ActiveLow,Shared){15}
453 Name(IRQP, ResourceTemplate(){
454 IRQ(Level,ActiveLow,Exclusive){3, 4, 5, 7, 10, 11, 12, 15}
457 Name(PITF, ResourceTemplate(){
458 IRQ(Level,ActiveLow,Exclusive){9}
462 Name(_HID, EISAID("PNP0C0F"))
467 Return(0x0B) /* sata is invisible */
469 Return(0x09) /* sata is disabled */
471 } /* End Method(_SB.INTA._STA) */
474 /* DBGO("\\_SB\\LNKA\\_DIS\n") */
476 } /* End Method(_SB.INTA._DIS) */
479 /* DBGO("\\_SB\\LNKA\\_PRS\n") */
481 } /* Method(_SB.INTA._PRS) */
484 /* DBGO("\\_SB\\LNKA\\_CRS\n") */
485 CreateWordField(IRQB, 0x1, IRQN)
486 ShiftLeft(1, PIRA, IRQN)
488 } /* Method(_SB.INTA._CRS) */
491 /* DBGO("\\_SB\\LNKA\\_CRS\n") */
492 CreateWordField(ARG0, 1, IRQM)
494 /* Use lowest available IRQ */
495 FindSetRightBit(IRQM, Local0)
500 } /* End Method(_SB.INTA._SRS) */
501 } /* End Device(INTA) */
504 Name(_HID, EISAID("PNP0C0F"))
509 Return(0x0B) /* sata is invisible */
511 Return(0x09) /* sata is disabled */
513 } /* End Method(_SB.INTB._STA) */
516 /* DBGO("\\_SB\\LNKB\\_DIS\n") */
518 } /* End Method(_SB.INTB._DIS) */
521 /* DBGO("\\_SB\\LNKB\\_PRS\n") */
523 } /* Method(_SB.INTB._PRS) */
526 /* DBGO("\\_SB\\LNKB\\_CRS\n") */
527 CreateWordField(IRQB, 0x1, IRQN)
528 ShiftLeft(1, PIRB, IRQN)
530 } /* Method(_SB.INTB._CRS) */
533 /* DBGO("\\_SB\\LNKB\\_CRS\n") */
534 CreateWordField(ARG0, 1, IRQM)
536 /* Use lowest available IRQ */
537 FindSetRightBit(IRQM, Local0)
542 } /* End Method(_SB.INTB._SRS) */
543 } /* End Device(INTB) */
546 Name(_HID, EISAID("PNP0C0F"))
551 Return(0x0B) /* sata is invisible */
553 Return(0x09) /* sata is disabled */
555 } /* End Method(_SB.INTC._STA) */
558 /* DBGO("\\_SB\\LNKC\\_DIS\n") */
560 } /* End Method(_SB.INTC._DIS) */
563 /* DBGO("\\_SB\\LNKC\\_PRS\n") */
565 } /* Method(_SB.INTC._PRS) */
568 /* DBGO("\\_SB\\LNKC\\_CRS\n") */
569 CreateWordField(IRQB, 0x1, IRQN)
570 ShiftLeft(1, PIRC, IRQN)
572 } /* Method(_SB.INTC._CRS) */
575 /* DBGO("\\_SB\\LNKC\\_CRS\n") */
576 CreateWordField(ARG0, 1, IRQM)
578 /* Use lowest available IRQ */
579 FindSetRightBit(IRQM, Local0)
584 } /* End Method(_SB.INTC._SRS) */
585 } /* End Device(INTC) */
588 Name(_HID, EISAID("PNP0C0F"))
593 Return(0x0B) /* sata is invisible */
595 Return(0x09) /* sata is disabled */
597 } /* End Method(_SB.INTD._STA) */
600 /* DBGO("\\_SB\\LNKD\\_DIS\n") */
602 } /* End Method(_SB.INTD._DIS) */
605 /* DBGO("\\_SB\\LNKD\\_PRS\n") */
607 } /* Method(_SB.INTD._PRS) */
610 /* DBGO("\\_SB\\LNKD\\_CRS\n") */
611 CreateWordField(IRQB, 0x1, IRQN)
612 ShiftLeft(1, PIRD, IRQN)
614 } /* Method(_SB.INTD._CRS) */
617 /* DBGO("\\_SB\\LNKD\\_CRS\n") */
618 CreateWordField(ARG0, 1, IRQM)
620 /* Use lowest available IRQ */
621 FindSetRightBit(IRQM, Local0)
626 } /* End Method(_SB.INTD._SRS) */
627 } /* End Device(INTD) */
630 Name(_HID, EISAID("PNP0C0F"))
635 Return(0x0B) /* sata is invisible */
637 Return(0x09) /* sata is disabled */
639 } /* End Method(_SB.INTE._STA) */
642 /* DBGO("\\_SB\\LNKE\\_DIS\n") */
644 } /* End Method(_SB.INTE._DIS) */
647 /* DBGO("\\_SB\\LNKE\\_PRS\n") */
649 } /* Method(_SB.INTE._PRS) */
652 /* DBGO("\\_SB\\LNKE\\_CRS\n") */
653 CreateWordField(IRQB, 0x1, IRQN)
654 ShiftLeft(1, PIRE, IRQN)
656 } /* Method(_SB.INTE._CRS) */
659 /* DBGO("\\_SB\\LNKE\\_CRS\n") */
660 CreateWordField(ARG0, 1, IRQM)
662 /* Use lowest available IRQ */
663 FindSetRightBit(IRQM, Local0)
668 } /* End Method(_SB.INTE._SRS) */
669 } /* End Device(INTE) */
672 Name(_HID, EISAID("PNP0C0F"))
677 Return(0x0B) /* sata is invisible */
679 Return(0x09) /* sata is disabled */
681 } /* End Method(_SB.INTF._STA) */
684 /* DBGO("\\_SB\\LNKF\\_DIS\n") */
686 } /* End Method(_SB.INTF._DIS) */
689 /* DBGO("\\_SB\\LNKF\\_PRS\n") */
691 } /* Method(_SB.INTF._PRS) */
694 /* DBGO("\\_SB\\LNKF\\_CRS\n") */
695 CreateWordField(IRQB, 0x1, IRQN)
696 ShiftLeft(1, PIRF, IRQN)
698 } /* Method(_SB.INTF._CRS) */
701 /* DBGO("\\_SB\\LNKF\\_CRS\n") */
702 CreateWordField(ARG0, 1, IRQM)
704 /* Use lowest available IRQ */
705 FindSetRightBit(IRQM, Local0)
710 } /* End Method(_SB.INTF._SRS) */
711 } /* End Device(INTF) */
714 Name(_HID, EISAID("PNP0C0F"))
719 Return(0x0B) /* sata is invisible */
721 Return(0x09) /* sata is disabled */
723 } /* End Method(_SB.INTG._STA) */
726 /* DBGO("\\_SB\\LNKG\\_DIS\n") */
728 } /* End Method(_SB.INTG._DIS) */
731 /* DBGO("\\_SB\\LNKG\\_PRS\n") */
733 } /* Method(_SB.INTG._CRS) */
736 /* DBGO("\\_SB\\LNKG\\_CRS\n") */
737 CreateWordField(IRQB, 0x1, IRQN)
738 ShiftLeft(1, PIRG, IRQN)
740 } /* Method(_SB.INTG._CRS) */
743 /* DBGO("\\_SB\\LNKG\\_CRS\n") */
744 CreateWordField(ARG0, 1, IRQM)
746 /* Use lowest available IRQ */
747 FindSetRightBit(IRQM, Local0)
752 } /* End Method(_SB.INTG._SRS) */
753 } /* End Device(INTG) */
756 Name(_HID, EISAID("PNP0C0F"))
761 Return(0x0B) /* sata is invisible */
763 Return(0x09) /* sata is disabled */
765 } /* End Method(_SB.INTH._STA) */
768 /* DBGO("\\_SB\\LNKH\\_DIS\n") */
770 } /* End Method(_SB.INTH._DIS) */
773 /* DBGO("\\_SB\\LNKH\\_PRS\n") */
775 } /* Method(_SB.INTH._CRS) */
778 /* DBGO("\\_SB\\LNKH\\_CRS\n") */
779 CreateWordField(IRQB, 0x1, IRQN)
780 ShiftLeft(1, PIRH, IRQN)
782 } /* Method(_SB.INTH._CRS) */
785 /* DBGO("\\_SB\\LNKH\\_CRS\n") */
786 CreateWordField(ARG0, 1, IRQM)
788 /* Use lowest available IRQ */
789 FindSetRightBit(IRQM, Local0)
794 } /* End Method(_SB.INTH._SRS) */
795 } /* End Device(INTH) */
797 } /* End Scope(_SB) */
800 /* Supported sleep states: */
801 Name(\_S0, Package () {0x00, 0x00, 0x00, 0x00} ) /* (S0) - working state */
803 If (LAnd(SSFG, 0x01)) {
804 Name(\_S1, Package () {0x01, 0x01, 0x00, 0x00} ) /* (S1) - sleeping w/CPU context */
806 If (LAnd(SSFG, 0x02)) {
807 Name(\_S2, Package () {0x02, 0x02, 0x00, 0x00} ) /* (S2) - "light" Suspend to RAM */
809 If (LAnd(SSFG, 0x04)) {
810 Name(\_S3, Package () {0x03, 0x03, 0x00, 0x00} ) /* (S3) - Suspend to RAM */
812 If (LAnd(SSFG, 0x08)) {
813 Name(\_S4, Package () {0x04, 0x04, 0x00, 0x00} ) /* (S4) - Suspend to Disk */
816 Name(\_S5, Package () {0x05, 0x05, 0x00, 0x00} ) /* (S5) - Soft Off */
818 Name(\_SB.CSPS ,0) /* Current Sleep State (S0, S1, S2, S3, S4, S5) */
819 Name(CSMS, 0) /* Current System State */
821 /* Wake status package */
822 Name(WKST,Package(){Zero, Zero})
825 * \_PTS - Prepare to Sleep method
828 * Arg0=The value of the sleeping state S1=1, S2=2, etc
833 * The _PTS control method is executed at the beginning of the sleep process
834 * for S1-S5. The sleeping value is passed to the _PTS control method. This
835 * control method may be executed a relatively long time before entering the
836 * sleep state and the OS may abort the operation without notification to
837 * the ACPI driver. This method cannot modify the configuration or power
838 * state of any device in the system.
841 /* DBGO("\\_PTS\n") */
842 /* DBGO("From S0 to S") */
846 /* Don't allow PCIRST# to reset USB */
851 /* Clear sleep SMI status flag and enable sleep SMI trap. */
855 /* On older chips, clear PciExpWakeDisEn */
856 /*if (LLessEqual(\_SB.SBRI, 0x13)) {
861 /* Clear wake status structure. */
862 Store(0, Index(WKST,0))
863 Store(0, Index(WKST,1))
864 } /* End Method(\_PTS) */
867 * The following method results in a "not a valid reserved NameSeg"
868 * warning so I have commented it out for the duration. It isn't
869 * used, so it could be removed.
872 * \_GTS OEM Going To Sleep method
875 * Arg0=The value of the sleeping state S1=1, S2=2
882 * DBGO("From S0 to S")
889 * \_BFS OEM Back From Sleep method
892 * Arg0=The value of the sleeping state S1=1, S2=2
898 /* DBGO("\\_BFS\n") */
901 /* DBGO(" to S0\n") */
905 * \_WAK System Wake method
908 * Arg0=The value of the sleeping state S1=1, S2=2
911 * Return package of 2 DWords
913 * 0x00000000 wake succeeded
914 * 0x00000001 Wake was signaled but failed due to lack of power
915 * 0x00000002 Wake was signaled but failed due to thermal condition
916 * Dword 2 - Power Supply state
917 * if non-zero the effective S-state the power supply entered
920 /* DBGO("\\_WAK\n") */
923 /* DBGO(" to S0\n") */
928 /* Restore PCIRST# so it resets USB */
933 /* Arbitrarily clear PciExpWakeStatus */
937 /* if(DeRefOf(Index(WKST,0))) {
938 * Store(0, Index(WKST,1))
940 * Store(Arg0, Index(WKST,1))
944 } /* End Method(\_WAK) */
946 Scope(\_GPE) { /* Start Scope GPE */
947 /* General event 0 */
949 * DBGO("\\_GPE\\_L00\n")
953 /* General event 1 */
955 * DBGO("\\_GPE\\_L00\n")
959 /* General event 2 */
961 * DBGO("\\_GPE\\_L00\n")
965 /* General event 3 */
967 /* DBGO("\\_GPE\\_L00\n") */
968 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
971 /* General event 4 */
973 * DBGO("\\_GPE\\_L00\n")
977 /* General event 5 */
979 * DBGO("\\_GPE\\_L00\n")
983 /* General event 6 - Used for GPM6, moved to USB.asl */
985 * DBGO("\\_GPE\\_L00\n")
989 /* General event 7 - Used for GPM7, moved to USB.asl */
991 * DBGO("\\_GPE\\_L07\n")
995 /* Legacy PM event */
997 /* DBGO("\\_GPE\\_L08\n") */
1000 /* Temp warning (TWarn) event */
1002 /* DBGO("\\_GPE\\_L09\n") */
1003 /* Notify (\_TZ.TZ00, 0x80) */
1008 * DBGO("\\_GPE\\_L0A\n")
1012 /* USB controller PME# */
1014 /* DBGO("\\_GPE\\_L0B\n") */
1015 Notify(\_SB.PCI0.UOH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1016 Notify(\_SB.PCI0.UOH2, 0x02) /* NOTIFY_DEVICE_WAKE */
1017 Notify(\_SB.PCI0.UOH3, 0x02) /* NOTIFY_DEVICE_WAKE */
1018 Notify(\_SB.PCI0.UOH4, 0x02) /* NOTIFY_DEVICE_WAKE */
1019 Notify(\_SB.PCI0.UOH5, 0x02) /* NOTIFY_DEVICE_WAKE */
1020 Notify(\_SB.PCI0.UOH6, 0x02) /* NOTIFY_DEVICE_WAKE */
1021 Notify(\_SB.PCI0.UEH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1022 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1025 /* AC97 controller PME# */
1027 * DBGO("\\_GPE\\_L0C\n")
1031 /* OtherTherm PME# */
1033 * DBGO("\\_GPE\\_L0D\n")
1037 /* GPM9 SCI event - Moved to USB.asl */
1039 * DBGO("\\_GPE\\_L0E\n")
1043 /* PCIe HotPlug event */
1045 * DBGO("\\_GPE\\_L0F\n")
1049 /* ExtEvent0 SCI event */
1051 /* DBGO("\\_GPE\\_L10\n") */
1055 /* ExtEvent1 SCI event */
1057 /* DBGO("\\_GPE\\_L11\n") */
1060 /* PCIe PME# event */
1062 * DBGO("\\_GPE\\_L12\n")
1066 /* GPM0 SCI event - Moved to USB.asl */
1068 * DBGO("\\_GPE\\_L13\n")
1072 /* GPM1 SCI event - Moved to USB.asl */
1074 * DBGO("\\_GPE\\_L14\n")
1078 /* GPM2 SCI event - Moved to USB.asl */
1080 * DBGO("\\_GPE\\_L15\n")
1084 /* GPM3 SCI event - Moved to USB.asl */
1086 * DBGO("\\_GPE\\_L16\n")
1090 /* GPM8 SCI event - Moved to USB.asl */
1092 * DBGO("\\_GPE\\_L17\n")
1096 /* GPIO0 or GEvent8 event */
1098 /* DBGO("\\_GPE\\_L18\n") */
1099 Notify(\_SB.PCI0.PBR2, 0x02) /* NOTIFY_DEVICE_WAKE */
1100 Notify(\_SB.PCI0.PBR4, 0x02) /* NOTIFY_DEVICE_WAKE */
1101 Notify(\_SB.PCI0.PBR5, 0x02) /* NOTIFY_DEVICE_WAKE */
1102 Notify(\_SB.PCI0.PBR6, 0x02) /* NOTIFY_DEVICE_WAKE */
1103 Notify(\_SB.PCI0.PBR7, 0x02) /* NOTIFY_DEVICE_WAKE */
1104 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1107 /* GPM4 SCI event - Moved to USB.asl */
1109 * DBGO("\\_GPE\\_L19\n")
1113 /* GPM5 SCI event - Moved to USB.asl */
1115 * DBGO("\\_GPE\\_L1A\n")
1119 /* Azalia SCI event */
1121 /* DBGO("\\_GPE\\_L1B\n") */
1122 Notify(\_SB.PCI0.AZHD, 0x02) /* NOTIFY_DEVICE_WAKE */
1123 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1126 /* GPM6 SCI event - Reassigned to _L06 */
1128 * DBGO("\\_GPE\\_L1C\n")
1132 /* GPM7 SCI event - Reassigned to _L07 */
1134 * DBGO("\\_GPE\\_L1D\n")
1138 /* GPIO2 or GPIO66 SCI event */
1140 * DBGO("\\_GPE\\_L1E\n")
1144 /* SATA SCI event - Moved to sata.asl */
1146 * DBGO("\\_GPE\\_L1F\n")
1150 } /* End Scope GPE */
1152 #include "acpi/usb.asl"
1155 Scope(\_SB) { /* Start \_SB scope */
1156 #include <arch/x86/acpi/globutil.asl> /* global utility methods expected within the \_SB scope */
1159 /* Note: Only need HID on Primary Bus */
1163 Name(_HID, EISAID("PNP0A03"))
1164 Name(_ADR, 0x00180000) /* Dev# = BSP Dev#, Func# = 0 */
1165 Method(_BBN, 0) { /* Bus number = 0 */
1169 /* DBGO("\\_SB\\PCI0\\_STA\n") */
1170 Return(0x0B) /* Status is visible */
1174 If(PMOD){ Return(APR0) } /* APIC mode */
1175 Return (PR0) /* PIC Mode */
1178 /* Describe the Northbridge devices */
1180 Name(_ADR, 0x00000000)
1183 /* The internal GFX bridge */
1185 Name(_ADR, 0x00010000)
1186 Name(_PRW, Package() {0x18, 4})
1192 /* The external GFX bridge */
1194 Name(_ADR, 0x00020000)
1195 Name(_PRW, Package() {0x18, 4})
1197 If(PMOD){ Return(APS2) } /* APIC mode */
1198 Return (PS2) /* PIC Mode */
1202 /* Dev3 is also an external GFX bridge, not used in Herring */
1205 Name(_ADR, 0x00040000)
1206 Name(_PRW, Package() {0x18, 4})
1208 If(PMOD){ Return(APS4) } /* APIC mode */
1209 Return (PS4) /* PIC Mode */
1214 Name(_ADR, 0x00050000)
1215 Name(_PRW, Package() {0x18, 4})
1217 If(PMOD){ Return(APS5) } /* APIC mode */
1218 Return (PS5) /* PIC Mode */
1223 Name(_ADR, 0x00060000)
1224 Name(_PRW, Package() {0x18, 4})
1226 If(PMOD){ Return(APS6) } /* APIC mode */
1227 Return (PS6) /* PIC Mode */
1231 /* The onboard EtherNet chip */
1233 Name(_ADR, 0x00070000)
1234 Name(_PRW, Package() {0x18, 4})
1236 If(PMOD){ Return(APS7) } /* APIC mode */
1237 Return (PS7) /* PIC Mode */
1243 Name(_ADR, 0x00090000)
1244 Name(_PRW, Package() {0x18, 4})
1246 If(PMOD){ Return(APS9) } /* APIC mode */
1247 Return (PS9) /* PIC Mode */
1252 Name(_ADR, 0x000A0000)
1253 Name(_PRW, Package() {0x18, 4})
1255 If(PMOD){ Return(APSa) } /* APIC mode */
1256 Return (PSa) /* PIC Mode */
1261 Name(_ADR, 0x00150000)
1262 Name(_PRW, Package() {0x18, 4})
1264 If(PMOD){ Return(APE0) } /* APIC mode */
1265 Return (PE0) /* PIC Mode */
1269 Name(_ADR, 0x00150001)
1270 Name(_PRW, Package() {0x18, 4})
1272 If(PMOD){ Return(APE1) } /* APIC mode */
1273 Return (PE1) /* PIC Mode */
1277 Name(_ADR, 0x00150002)
1278 Name(_PRW, Package() {0x18, 4})
1280 If(PMOD){ Return(APE2) } /* APIC mode */
1281 Return (APE2) /* PIC Mode */
1285 Name(_ADR, 0x00150003)
1286 Name(_PRW, Package() {0x18, 4})
1288 If(PMOD){ Return(APE3) } /* APIC mode */
1289 Return (PE3) /* PIC Mode */
1293 /* PCI slot 1, 2, 3 */
1295 Name(_ADR, 0x00140004)
1296 Name(_PRW, Package() {0x18, 4})
1303 /* Describe the Southbridge devices */
1305 Name(_ADR, 0x00110000)
1306 #include "acpi/sata.asl"
1310 Name(_ADR, 0x00120000)
1311 Name(_PRW, Package() {0x0B, 3})
1315 Name(_ADR, 0x00120002)
1316 Name(_PRW, Package() {0x0B, 3})
1320 Name(_ADR, 0x00130000)
1321 Name(_PRW, Package() {0x0B, 3})
1325 Name(_ADR, 0x00130002)
1326 Name(_PRW, Package() {0x0B, 3})
1330 Name(_ADR, 0x00160000)
1331 Name(_PRW, Package() {0x0B, 3})
1335 Name(_ADR, 0x00160002)
1336 Name(_PRW, Package() {0x0B, 3})
1340 Name(_ADR, 0x00140005)
1341 Name(_PRW, Package() {0x0B, 3})
1345 Name(_ADR, 0x00140000)
1349 Name(_ADR, 0x00140002)
1350 OperationRegion(AZPD, PCI_Config, 0x00, 0x100)
1351 Field(AZPD, AnyAcc, NoLock, Preserve) {
1375 If(LEqual(OSVR,3)){ /* If we are running Linux */
1384 Name(_ADR, 0x00140003)
1386 * DBGO("\\_SB\\PCI0\\LpcIsaBr\\_INI\n")
1387 } */ /* End Method(_SB.SBRDG._INI) */
1389 /* Real Time Clock Device */
1391 Name(_HID, EISAID("PNP0B01")) /* AT Real Time Clock */
1392 Name(_CRS, ResourceTemplate() {
1394 IO(Decode16,0x0070, 0x0070, 0, 2)
1395 /* IO(Decode16,0x0070, 0x0070, 0, 4) */
1397 } /* End Device(_SB.PCI0.LpcIsaBr.RTC0) */
1399 Device(TMR) { /* Timer */
1400 Name(_HID,EISAID("PNP0100")) /* System Timer */
1401 Name(_CRS, ResourceTemplate() {
1403 IO(Decode16, 0x0040, 0x0040, 0, 4)
1404 /* IO(Decode16, 0x0048, 0x0048, 0, 4) */
1406 } /* End Device(_SB.PCI0.LpcIsaBr.TMR) */
1408 Device(SPKR) { /* Speaker */
1409 Name(_HID,EISAID("PNP0800")) /* AT style speaker */
1410 Name(_CRS, ResourceTemplate() {
1411 IO(Decode16, 0x0061, 0x0061, 0, 1)
1413 } /* End Device(_SB.PCI0.LpcIsaBr.SPKR) */
1416 Name(_HID,EISAID("PNP0000")) /* AT Interrupt Controller */
1417 Name(_CRS, ResourceTemplate() {
1419 IO(Decode16,0x0020, 0x0020, 0, 2)
1420 IO(Decode16,0x00A0, 0x00A0, 0, 2)
1421 /* IO(Decode16, 0x00D0, 0x00D0, 0x10, 0x02) */
1422 /* IO(Decode16, 0x04D0, 0x04D0, 0x10, 0x02) */
1424 } /* End Device(_SB.PCI0.LpcIsaBr.PIC) */
1426 Device(MAD) { /* 8257 DMA */
1427 Name(_HID,EISAID("PNP0200")) /* Hardware Device ID */
1428 Name(_CRS, ResourceTemplate() {
1429 DMA(Compatibility,BusMaster,Transfer8){4}
1430 IO(Decode16, 0x0000, 0x0000, 0x10, 0x10)
1431 IO(Decode16, 0x0081, 0x0081, 0x00, 0x03)
1432 IO(Decode16, 0x0087, 0x0087, 0x00, 0x01)
1433 IO(Decode16, 0x0089, 0x0089, 0x00, 0x03)
1434 IO(Decode16, 0x008F, 0x008F, 0x00, 0x01)
1435 IO(Decode16, 0x00C0, 0x00C0, 0x10, 0x20)
1436 }) /* End Name(_SB.PCI0.LpcIsaBr.MAD._CRS) */
1437 } /* End Device(_SB.PCI0.LpcIsaBr.MAD) */
1440 Name(_HID,EISAID("PNP0C04")) /* Math Coprocessor */
1441 Name(_CRS, ResourceTemplate() {
1442 IO(Decode16, 0x00F0, 0x00F0, 0, 0x10)
1445 } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */
1448 Name(_HID,EISAID("PNP0103"))
1449 Name(CRS,ResourceTemplate() {
1450 Memory32Fixed(ReadOnly,0xFED00000, 0x00000400, HPT) /* 1kb reserved space */
1453 Return(0x0F) /* sata is visible */
1456 CreateDwordField(CRS, ^HPT._BAS, HPBA)
1460 } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */
1465 Name(_ADR, 0x00140004)
1466 } /* end HostPciBr */
1469 Name(_ADR, 0x00140005)
1470 } /* end Ac97audio */
1473 Name(_ADR, 0x00140006)
1474 } /* end Ac97modem */
1476 Name(CRES, ResourceTemplate() {
1477 IO(Decode16, 0x0CF8, 0x0CF8, 1, 8)
1479 WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1480 0x0000, /* address granularity */
1481 0x0000, /* range minimum */
1482 0x0CF7, /* range maximum */
1483 0x0000, /* translation */
1487 WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1488 0x0000, /* address granularity */
1489 0x0D00, /* range minimum */
1490 0xFFFF, /* range maximum */
1491 0x0000, /* translation */
1495 Memory32Fixed(READWRITE, 0, 0xA0000, BSMM)
1496 Memory32Fixed(READONLY, 0x000A0000, 0x00020000, VGAM) /* VGA memory space */
1497 Memory32Fixed(READONLY, 0x000C0000, 0x00020000, EMM1) /* Assume C0000-E0000 empty */
1498 Memory32Fixed(READONLY, 0x000E0000, 0x00020000, RDBS) /* BIOS ROM area */
1500 /* DRAM Memory from 1MB to TopMem */
1501 Memory32Fixed(READWRITE, 0x00100000, 0, DMLO) /* 1MB to TopMem */
1503 /* BIOS space just below 4GB */
1505 ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1506 0x00, /* Granularity */
1507 0x00000000, /* Min */
1508 0x00000000, /* Max */
1509 0x00000000, /* Translation */
1510 0x00000000, /* Max-Min, RLEN */
1515 /* DRAM memory from 4GB to TopMem2 */
1516 QWORDMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1517 0xFFFFFFFF, /* Granularity */
1518 0x00000000, /* Min */
1519 0x00000000, /* Max */
1520 0x00000000, /* Translation */
1521 0x00000000, /* Max-Min, RLEN */
1526 /* BIOS space just below 16EB */
1527 QWORDMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1528 0xFFFFFFFF, /* Granularity */
1529 0x00000000, /* Min */
1530 0x00000000, /* Max */
1531 0x00000000, /* Translation */
1532 0x00000000, /* Max-Min, RLEN */
1537 /* memory space for PCI BARs below 4GB */
1538 Memory32Fixed(ReadOnly, 0x00000000, 0x00000000, MMIO)
1539 }) /* End Name(_SB.PCI0.CRES) */
1542 /* DBGO("\\_SB\\PCI0\\_CRS\n") */
1544 CreateDWordField(CRES, ^EMM1._BAS, EM1B)
1545 CreateDWordField(CRES, ^EMM1._LEN, EM1L)
1546 CreateDWordField(CRES, ^DMLO._BAS, DMLB)
1547 CreateDWordField(CRES, ^DMLO._LEN, DMLL)
1548 CreateDWordField(CRES, ^PCBM._MIN, PBMB)
1549 CreateDWordField(CRES, ^PCBM._LEN, PBML)
1551 CreateQWordField(CRES, ^DMHI._MIN, DMHB)
1552 CreateQWordField(CRES, ^DMHI._LEN, DMHL)
1553 CreateQWordField(CRES, ^PEBM._MIN, EBMB)
1554 CreateQWordField(CRES, ^PEBM._LEN, EBML)
1556 If(LGreater(LOMH, 0xC0000)){
1557 Store(0xC0000, EM1B) /* Hole above C0000 and below E0000 */
1558 Subtract(LOMH, 0xC0000, EM1L) /* subtract start, assumes allocation from C0000 going up */
1561 /* Set size of memory from 1MB to TopMem */
1562 Subtract(TOM1, 0x100000, DMLL)
1565 * If(LNotEqual(TOM2, 0x00000000)){
1566 * Store(0x100000000,DMHB) DRAM from 4GB to TopMem2
1567 * Subtract(TOM2, 0x100000000, DMHL)
1571 /* If there is no memory above 4GB, put the BIOS just below 4GB */
1572 If(LEqual(TOM2, 0x00000000)){
1573 Store(PBAD,PBMB) /* Reserve the "BIOS" space */
1576 Else { /* Otherwise, put the BIOS just below 16EB */
1577 ShiftLeft(PBAD,16,EBMB) /* Reserve the "BIOS" space */
1581 CreateDWordField(CRES, ^MMIO._BAS, MM1B)
1582 CreateDWordField(CRES, ^MMIO._LEN, MM1L)
1584 * Declare memory between TOM1 and 4GB as available
1586 * Use ShiftLeft to avoid 64bit constant (for XP).
1587 * This will work even if the OS does 32bit arithmetic, as
1588 * 32bit (0x00000000 - TOM1) will wrap and give the same
1589 * result as 64bit (0x100000000 - TOM1).
1592 ShiftLeft(0x10000000, 4, Local0)
1593 Subtract(Local0, TOM1, Local0)
1596 Return(CRES) /* note to change the Name buffer */
1597 } /* end of Method(_SB.PCI0._CRS) */
1601 * FIRST METHOD CALLED UPON BOOT
1603 * 1. If debugging, print current OS and ACPI interpreter.
1604 * 2. Get PCI Interrupt routing from ACPI VSM, this
1605 * value is based on user choice in BIOS setup.
1608 /* DBGO("\\_SB\\_INI\n") */
1609 /* DBGO(" DSDT.ASL code from ") */
1610 /* DBGO(__DATE__) */
1612 /* DBGO(__TIME__) */
1613 /* DBGO("\n Sleep states supported: ") */
1615 /* DBGO(" \\_OS=") */
1617 /* DBGO("\n \\_REV=") */
1621 /* Determine the OS we're running on */
1624 /* On older chips, clear PciExpWakeDisEn */
1625 /*if (LLessEqual(\SBRI, 0x13)) {
1629 } /* End Method(_SB._INI) */
1630 } /* End Device(PCI0) */
1632 Device(PWRB) { /* Start Power button device */
1633 Name(_HID, EISAID("PNP0C0C"))
1635 Name(_PRW, Package () {3, 0x04}) /* wake from S1-S4 */
1636 Name(_STA, 0x0B) /* sata is invisible */
1638 } /* End \_SB scope */
1642 /* DBGO("\\_SI\\_SST\n") */
1643 /* DBGO(" New Indicator state: ") */
1647 } /* End Scope SI */
1649 /* End of ASL file */