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 "ADVANSUS", /* 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 */
413 if(CondRefOf(\_OSI,Local1))
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 */
936 /* if(DeRefOf(Index(WKST,0))) {
937 * Store(0, Index(WKST,1))
939 * Store(Arg0, Index(WKST,1))
943 } /* End Method(\_WAK) */
945 Scope(\_GPE) { /* Start Scope GPE */
946 /* General event 0 */
948 * DBGO("\\_GPE\\_L00\n")
952 /* General event 1 */
954 * DBGO("\\_GPE\\_L00\n")
958 /* General event 2 */
960 * DBGO("\\_GPE\\_L00\n")
964 /* General event 3 */
966 /* DBGO("\\_GPE\\_L00\n") */
967 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
970 /* General event 4 */
972 * DBGO("\\_GPE\\_L00\n")
976 /* General event 5 */
978 * DBGO("\\_GPE\\_L00\n")
982 /* General event 6 - Used for GPM6, moved to USB.asl */
984 * DBGO("\\_GPE\\_L00\n")
988 /* General event 7 - Used for GPM7, moved to USB.asl */
990 * DBGO("\\_GPE\\_L07\n")
994 /* Legacy PM event */
996 /* DBGO("\\_GPE\\_L08\n") */
999 /* Temp warning (TWarn) event */
1001 /* DBGO("\\_GPE\\_L09\n") */
1002 /* Notify (\_TZ.TZ00, 0x80) */
1007 * DBGO("\\_GPE\\_L0A\n")
1011 /* USB controller PME# */
1013 /* DBGO("\\_GPE\\_L0B\n") */
1014 Notify(\_SB.PCI0.UOH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1015 Notify(\_SB.PCI0.UOH2, 0x02) /* NOTIFY_DEVICE_WAKE */
1016 Notify(\_SB.PCI0.UOH3, 0x02) /* NOTIFY_DEVICE_WAKE */
1017 Notify(\_SB.PCI0.UOH4, 0x02) /* NOTIFY_DEVICE_WAKE */
1018 Notify(\_SB.PCI0.UOH5, 0x02) /* NOTIFY_DEVICE_WAKE */
1019 Notify(\_SB.PCI0.UOH6, 0x02) /* NOTIFY_DEVICE_WAKE */
1020 Notify(\_SB.PCI0.UEH1, 0x02) /* NOTIFY_DEVICE_WAKE */
1021 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1024 /* AC97 controller PME# */
1026 * DBGO("\\_GPE\\_L0C\n")
1030 /* OtherTherm PME# */
1032 * DBGO("\\_GPE\\_L0D\n")
1036 /* GPM9 SCI event - Moved to USB.asl */
1038 * DBGO("\\_GPE\\_L0E\n")
1042 /* PCIe HotPlug event */
1044 * DBGO("\\_GPE\\_L0F\n")
1048 /* ExtEvent0 SCI event */
1050 /* DBGO("\\_GPE\\_L10\n") */
1054 /* ExtEvent1 SCI event */
1056 /* DBGO("\\_GPE\\_L11\n") */
1059 /* PCIe PME# event */
1061 * DBGO("\\_GPE\\_L12\n")
1065 /* GPM0 SCI event - Moved to USB.asl */
1067 * DBGO("\\_GPE\\_L13\n")
1071 /* GPM1 SCI event - Moved to USB.asl */
1073 * DBGO("\\_GPE\\_L14\n")
1077 /* GPM2 SCI event - Moved to USB.asl */
1079 * DBGO("\\_GPE\\_L15\n")
1083 /* GPM3 SCI event - Moved to USB.asl */
1085 * DBGO("\\_GPE\\_L16\n")
1089 /* GPM8 SCI event - Moved to USB.asl */
1091 * DBGO("\\_GPE\\_L17\n")
1095 /* GPIO0 or GEvent8 event */
1097 /* DBGO("\\_GPE\\_L18\n") */
1098 Notify(\_SB.PCI0.PBR2, 0x02) /* NOTIFY_DEVICE_WAKE */
1099 Notify(\_SB.PCI0.PBR4, 0x02) /* NOTIFY_DEVICE_WAKE */
1100 Notify(\_SB.PCI0.PBR5, 0x02) /* NOTIFY_DEVICE_WAKE */
1101 Notify(\_SB.PCI0.PBR6, 0x02) /* NOTIFY_DEVICE_WAKE */
1102 Notify(\_SB.PCI0.PBR7, 0x02) /* NOTIFY_DEVICE_WAKE */
1103 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1106 /* GPM4 SCI event - Moved to USB.asl */
1108 * DBGO("\\_GPE\\_L19\n")
1112 /* GPM5 SCI event - Moved to USB.asl */
1114 * DBGO("\\_GPE\\_L1A\n")
1118 /* Azalia SCI event */
1120 /* DBGO("\\_GPE\\_L1B\n") */
1121 Notify(\_SB.PCI0.AZHD, 0x02) /* NOTIFY_DEVICE_WAKE */
1122 Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */
1125 /* GPM6 SCI event - Reassigned to _L06 */
1127 * DBGO("\\_GPE\\_L1C\n")
1131 /* GPM7 SCI event - Reassigned to _L07 */
1133 * DBGO("\\_GPE\\_L1D\n")
1137 /* GPIO2 or GPIO66 SCI event */
1139 * DBGO("\\_GPE\\_L1E\n")
1143 /* SATA SCI event - Moved to sata.asl */
1145 * DBGO("\\_GPE\\_L1F\n")
1149 } /* End Scope GPE */
1151 #include "acpi/usb.asl"
1154 Scope(\_SB) { /* Start \_SB scope */
1155 #include <arch/x86/acpi/globutil.asl> /* global utility methods expected within the \_SB scope */
1158 /* Note: Only need HID on Primary Bus */
1162 Name(_HID, EISAID("PNP0A03"))
1163 Name(_ADR, 0x00180000) /* Dev# = BSP Dev#, Func# = 0 */
1164 Method(_BBN, 0) { /* Bus number = 0 */
1168 /* DBGO("\\_SB\\PCI0\\_STA\n") */
1169 Return(0x0B) /* Status is visible */
1173 If(PMOD){ Return(APR0) } /* APIC mode */
1174 Return (PR0) /* PIC Mode */
1177 /* Describe the Northbridge devices */
1179 Name(_ADR, 0x00000000)
1182 /* The internal GFX bridge */
1184 Name(_ADR, 0x00010000)
1185 Name(_PRW, Package() {0x18, 4})
1191 /* The external GFX bridge */
1193 Name(_ADR, 0x00020000)
1194 Name(_PRW, Package() {0x18, 4})
1196 If(PMOD){ Return(APS2) } /* APIC mode */
1197 Return (PS2) /* PIC Mode */
1201 /* Dev3 is also an external GFX bridge, not used in Herring */
1204 Name(_ADR, 0x00040000)
1205 Name(_PRW, Package() {0x18, 4})
1207 If(PMOD){ Return(APS4) } /* APIC mode */
1208 Return (PS4) /* PIC Mode */
1213 Name(_ADR, 0x00050000)
1214 Name(_PRW, Package() {0x18, 4})
1216 If(PMOD){ Return(APS5) } /* APIC mode */
1217 Return (PS5) /* PIC Mode */
1222 Name(_ADR, 0x00060000)
1223 Name(_PRW, Package() {0x18, 4})
1225 If(PMOD){ Return(APS6) } /* APIC mode */
1226 Return (PS6) /* PIC Mode */
1230 /* The onboard EtherNet chip */
1232 Name(_ADR, 0x00070000)
1233 Name(_PRW, Package() {0x18, 4})
1235 If(PMOD){ Return(APS7) } /* APIC mode */
1236 Return (PS7) /* PIC Mode */
1242 Name(_ADR, 0x00090000)
1243 Name(_PRW, Package() {0x18, 4})
1245 If(PMOD){ Return(APS9) } /* APIC mode */
1246 Return (PS9) /* PIC Mode */
1251 Name(_ADR, 0x000A0000)
1252 Name(_PRW, Package() {0x18, 4})
1254 If(PMOD){ Return(APSa) } /* APIC mode */
1255 Return (PSa) /* PIC Mode */
1260 Name(_ADR, 0x00150000)
1261 Name(_PRW, Package() {0x18, 4})
1263 If(PMOD){ Return(APE0) } /* APIC mode */
1264 Return (PE0) /* PIC Mode */
1268 Name(_ADR, 0x00150001)
1269 Name(_PRW, Package() {0x18, 4})
1271 If(PMOD){ Return(APE1) } /* APIC mode */
1272 Return (PE1) /* PIC Mode */
1276 Name(_ADR, 0x00150002)
1277 Name(_PRW, Package() {0x18, 4})
1279 If(PMOD){ Return(APE2) } /* APIC mode */
1280 Return (APE2) /* PIC Mode */
1284 Name(_ADR, 0x00150003)
1285 Name(_PRW, Package() {0x18, 4})
1287 If(PMOD){ Return(APE3) } /* APIC mode */
1288 Return (PE3) /* PIC Mode */
1292 /* PCI slot 1, 2, 3 */
1294 Name(_ADR, 0x00140004)
1295 Name(_PRW, Package() {0x18, 4})
1302 /* Describe the Southbridge devices */
1304 Name(_ADR, 0x00110000)
1305 #include "acpi/sata.asl"
1309 Name(_ADR, 0x00120000)
1310 Name(_PRW, Package() {0x0B, 3})
1314 Name(_ADR, 0x00120002)
1315 Name(_PRW, Package() {0x0B, 3})
1319 Name(_ADR, 0x00130000)
1320 Name(_PRW, Package() {0x0B, 3})
1324 Name(_ADR, 0x00130002)
1325 Name(_PRW, Package() {0x0B, 3})
1329 Name(_ADR, 0x00160000)
1330 Name(_PRW, Package() {0x0B, 3})
1334 Name(_ADR, 0x00160002)
1335 Name(_PRW, Package() {0x0B, 3})
1339 Name(_ADR, 0x00140005)
1340 Name(_PRW, Package() {0x0B, 3})
1344 Name(_ADR, 0x00140000)
1348 Name(_ADR, 0x00140002)
1349 OperationRegion(AZPD, PCI_Config, 0x00, 0x100)
1350 Field(AZPD, AnyAcc, NoLock, Preserve) {
1374 If(LEqual(OSVR,3)){ /* If we are running Linux */
1383 Name(_ADR, 0x00140003)
1385 * DBGO("\\_SB\\PCI0\\LpcIsaBr\\_INI\n")
1386 } */ /* End Method(_SB.SBRDG._INI) */
1388 /* Real Time Clock Device */
1390 Name(_HID, EISAID("PNP0B01")) /* AT Real Time Clock */
1391 Name(_CRS, ResourceTemplate() {
1393 IO(Decode16,0x0070, 0x0070, 0, 2)
1394 /* IO(Decode16,0x0070, 0x0070, 0, 4) */
1396 } /* End Device(_SB.PCI0.LpcIsaBr.RTC0) */
1398 Device(TMR) { /* Timer */
1399 Name(_HID,EISAID("PNP0100")) /* System Timer */
1400 Name(_CRS, ResourceTemplate() {
1402 IO(Decode16, 0x0040, 0x0040, 0, 4)
1403 /* IO(Decode16, 0x0048, 0x0048, 0, 4) */
1405 } /* End Device(_SB.PCI0.LpcIsaBr.TMR) */
1407 Device(SPKR) { /* Speaker */
1408 Name(_HID,EISAID("PNP0800")) /* AT style speaker */
1409 Name(_CRS, ResourceTemplate() {
1410 IO(Decode16, 0x0061, 0x0061, 0, 1)
1412 } /* End Device(_SB.PCI0.LpcIsaBr.SPKR) */
1415 Name(_HID,EISAID("PNP0000")) /* AT Interrupt Controller */
1416 Name(_CRS, ResourceTemplate() {
1418 IO(Decode16,0x0020, 0x0020, 0, 2)
1419 IO(Decode16,0x00A0, 0x00A0, 0, 2)
1420 /* IO(Decode16, 0x00D0, 0x00D0, 0x10, 0x02) */
1421 /* IO(Decode16, 0x04D0, 0x04D0, 0x10, 0x02) */
1423 } /* End Device(_SB.PCI0.LpcIsaBr.PIC) */
1425 Device(MAD) { /* 8257 DMA */
1426 Name(_HID,EISAID("PNP0200")) /* Hardware Device ID */
1427 Name(_CRS, ResourceTemplate() {
1428 DMA(Compatibility,BusMaster,Transfer8){4}
1429 IO(Decode16, 0x0000, 0x0000, 0x10, 0x10)
1430 IO(Decode16, 0x0081, 0x0081, 0x00, 0x03)
1431 IO(Decode16, 0x0087, 0x0087, 0x00, 0x01)
1432 IO(Decode16, 0x0089, 0x0089, 0x00, 0x03)
1433 IO(Decode16, 0x008F, 0x008F, 0x00, 0x01)
1434 IO(Decode16, 0x00C0, 0x00C0, 0x10, 0x20)
1435 }) /* End Name(_SB.PCI0.LpcIsaBr.MAD._CRS) */
1436 } /* End Device(_SB.PCI0.LpcIsaBr.MAD) */
1439 Name(_HID,EISAID("PNP0C04")) /* Math Coprocessor */
1440 Name(_CRS, ResourceTemplate() {
1441 IO(Decode16, 0x00F0, 0x00F0, 0, 0x10)
1444 } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */
1447 Name(_HID,EISAID("PNP0103"))
1448 Name(CRS,ResourceTemplate() {
1449 Memory32Fixed(ReadOnly,0xFED00000, 0x00000400, HPT) /* 1kb reserved space */
1452 Return(0x0F) /* sata is visible */
1455 CreateDwordField(CRS, ^HPT._BAS, HPBA)
1459 } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */
1464 Name(_ADR, 0x00140004)
1465 } /* end HostPciBr */
1468 Name(_ADR, 0x00140005)
1469 } /* end Ac97audio */
1472 Name(_ADR, 0x00140006)
1473 } /* end Ac97modem */
1475 Name(CRES, ResourceTemplate() {
1476 IO(Decode16, 0x0CF8, 0x0CF8, 1, 8)
1478 WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1479 0x0000, /* address granularity */
1480 0x0000, /* range minimum */
1481 0x0CF7, /* range maximum */
1482 0x0000, /* translation */
1486 WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
1487 0x0000, /* address granularity */
1488 0x0D00, /* range minimum */
1489 0xFFFF, /* range maximum */
1490 0x0000, /* translation */
1494 Memory32Fixed(READWRITE, 0, 0xA0000, BSMM)
1495 Memory32Fixed(READONLY, 0x000A0000, 0x00020000, VGAM) /* VGA memory space */
1496 Memory32Fixed(READONLY, 0x000C0000, 0x00020000, EMM1) /* Assume C0000-E0000 empty */
1497 Memory32Fixed(READONLY, 0x000E0000, 0x00020000, RDBS) /* BIOS ROM area */
1499 /* DRAM Memory from 1MB to TopMem */
1500 Memory32Fixed(READWRITE, 0x00100000, 0, DMLO) /* 1MB to TopMem */
1502 /* BIOS space just below 4GB */
1504 ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1505 0x00, /* Granularity */
1506 0x00000000, /* Min */
1507 0x00000000, /* Max */
1508 0x00000000, /* Translation */
1509 0x00000000, /* Max-Min, RLEN */
1514 /* DRAM memory from 4GB to TopMem2 */
1515 QWORDMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1516 0xFFFFFFFF, /* Granularity */
1517 0x00000000, /* Min */
1518 0x00000000, /* Max */
1519 0x00000000, /* Translation */
1520 0x00000000, /* Max-Min, RLEN */
1525 /* BIOS space just below 16EB */
1526 QWORDMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
1527 0xFFFFFFFF, /* Granularity */
1528 0x00000000, /* Min */
1529 0x00000000, /* Max */
1530 0x00000000, /* Translation */
1531 0x00000000, /* Max-Min, RLEN */
1536 /* memory space for PCI BARs below 4GB */
1537 Memory32Fixed(ReadOnly, 0x00000000, 0x00000000, MMIO)
1538 }) /* End Name(_SB.PCI0.CRES) */
1541 /* DBGO("\\_SB\\PCI0\\_CRS\n") */
1543 CreateDWordField(CRES, ^EMM1._BAS, EM1B)
1544 CreateDWordField(CRES, ^EMM1._LEN, EM1L)
1545 CreateDWordField(CRES, ^DMLO._BAS, DMLB)
1546 CreateDWordField(CRES, ^DMLO._LEN, DMLL)
1547 CreateDWordField(CRES, ^PCBM._MIN, PBMB)
1548 CreateDWordField(CRES, ^PCBM._LEN, PBML)
1550 CreateQWordField(CRES, ^DMHI._MIN, DMHB)
1551 CreateQWordField(CRES, ^DMHI._LEN, DMHL)
1552 CreateQWordField(CRES, ^PEBM._MIN, EBMB)
1553 CreateQWordField(CRES, ^PEBM._LEN, EBML)
1555 If(LGreater(LOMH, 0xC0000)){
1556 Store(0xC0000, EM1B) /* Hole above C0000 and below E0000 */
1557 Subtract(LOMH, 0xC0000, EM1L) /* subtract start, assumes allocation from C0000 going up */
1560 /* Set size of memory from 1MB to TopMem */
1561 Subtract(TOM1, 0x100000, DMLL)
1564 * If(LNotEqual(TOM2, 0x00000000)){
1565 * Store(0x100000000,DMHB) DRAM from 4GB to TopMem2
1566 * Subtract(TOM2, 0x100000000, DMHL)
1570 /* If there is no memory above 4GB, put the BIOS just below 4GB */
1571 If(LEqual(TOM2, 0x00000000)){
1572 Store(PBAD,PBMB) /* Reserve the "BIOS" space */
1575 Else { /* Otherwise, put the BIOS just below 16EB */
1576 ShiftLeft(PBAD,16,EBMB) /* Reserve the "BIOS" space */
1580 CreateDWordField(CRES, ^MMIO._BAS, MM1B)
1581 CreateDWordField(CRES, ^MMIO._LEN, MM1L)
1583 * Declare memory between TOM1 and 4GB as available
1585 * Use ShiftLeft to avoid 64bit constant (for XP).
1586 * This will work even if the OS does 32bit arithmetic, as
1587 * 32bit (0x00000000 - TOM1) will wrap and give the same
1588 * result as 64bit (0x100000000 - TOM1).
1591 ShiftLeft(0x10000000, 4, Local0)
1592 Subtract(Local0, TOM1, Local0)
1595 Return(CRES) /* note to change the Name buffer */
1596 } /* end of Method(_SB.PCI0._CRS) */
1600 * FIRST METHOD CALLED UPON BOOT
1602 * 1. If debugging, print current OS and ACPI interpreter.
1603 * 2. Get PCI Interrupt routing from ACPI VSM, this
1604 * value is based on user choice in BIOS setup.
1607 /* DBGO("\\_SB\\_INI\n") */
1608 /* DBGO(" DSDT.ASL code from ") */
1609 /* DBGO(__DATE__) */
1611 /* DBGO(__TIME__) */
1612 /* DBGO("\n Sleep states supported: ") */
1614 /* DBGO(" \\_OS=") */
1616 /* DBGO("\n \\_REV=") */
1620 /* Determine the OS we're running on */
1623 /* On older chips, clear PciExpWakeDisEn */
1624 /*if (LLessEqual(\SBRI, 0x13)) {
1628 } /* End Method(_SB._INI) */
1629 } /* End Device(PCI0) */
1631 Device(PWRB) { /* Start Power button device */
1632 Name(_HID, EISAID("PNP0C0C"))
1634 Name(_PRW, Package () {3, 0x04}) /* wake from S1-S4 */
1635 Name(_STA, 0x0B) /* sata is invisible */
1637 } /* End \_SB scope */
1641 /* DBGO("\\_SI\\_SST\n") */
1642 /* DBGO(" New Indicator state: ") */
1646 } /* End Scope SI */
1648 /* End of ASL file */