Please bear with me - another rename checkin. This qualifies as trivial, no
[coreboot.git] / src / mainboard / amd / serengeti_cheetah_fam10 / dx / dsdt_lb.dsl
1 //
2 // This file is part of the coreboot project.
3 //
4 // Copyright (C) 2007 Advanced Micro Devices, Inc.
5 //
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.
9 //
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.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
18 //
19 DefinitionBlock ("DSDT.aml", "DSDT", 1, "AMD-FAM10", "AMDACPI", 100925440)
20 {
21
22 //      Scope (_PR)
23 //      {
24 //              Processor (CPU0, 0x00, 0x0000C010, 0x06) {}
25 //              Processor (CPU1, 0x01, 0x00000000, 0x00) {}
26 //              Processor (CPU2, 0x02, 0x00000000, 0x00) {}
27 //              Processor (CPU3, 0x03, 0x00000000, 0x00) {}
28 //      }
29
30         Method (FWSO, 0, NotSerialized) { }
31
32         Name (_S0, Package (0x04) { 0x00, 0x00, 0x00, 0x00 })
33         Name (_S1, Package (0x04) { 0x01, 0x01, 0x01, 0x01 })
34         Name (_S3, Package (0x04) { 0x05, 0x05, 0x05, 0x05 })
35         Name (_S5, Package (0x04) { 0x07, 0x07, 0x07, 0x07 })
36
37         Scope (_SB)
38         {
39                 Device (PCI0)
40                 {
41                         // BUS0 root bus
42                         External (BUSN)
43                         External (MMIO)
44                         External (PCIO)
45                         External (SBLK)
46                         External (TOM1)
47                         External (HCLK)
48                         External (SBDN)
49                         External (HCDN)
50                         External (CBST)
51                         External (CBB)
52                         External (CBS2)
53                         External (CBB2)
54
55                         Name (_HID, EisaId ("PNP0A03"))
56                         Name (_ADR, 0x00000000)
57                         Name (_UID, 0x01)
58
59                         Name (HCIN, 0x00)  // HC1
60
61                         Method (_BBN, 0, NotSerialized)
62                         {
63                                 Return (GBUS (GHCN(HCIN), GHCL(HCIN)))
64                         }
65
66                         Method (_CRS, 0, NotSerialized)
67                         {
68                                 Name (BUF0, ResourceTemplate ()
69                                 {
70                                         IO (Decode16, 0x0CF8, 0x0CF8, 0x01, 0x08) //CF8-CFFh
71                                         IO (Decode16, 0xC000, 0xC000, 0x01, 0x80) //8000h
72                                         IO (Decode16, 0xC080, 0xC080, 0x01, 0x80) //8080h
73
74                                         WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
75                                                 0x0000, // Address Space Granularity
76                                                 0x8100, // Address Range Minimum
77                                                 0xFFFF, // Address Range Maximum
78                                                 0x0000, // Address Translation Offset
79                                                 0x7F00,,,
80                                                 , TypeStatic)     //8100h-FFFFh
81
82                                         DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
83                                                 0x00000000, // Address Space Granularity
84                                                 0x000C0000, // Address Range Minimum
85                                                 0x00000000, // Address Range Maximum
86                                                 0x00000000, // Address Translation Offset
87                                                 0x00000000,,,
88                                                 , AddressRangeMemory, TypeStatic)   //Video BIOS A0000h-C7FFFh
89
90                                         Memory32Fixed (ReadWrite, 0x000D8000, 0x00004000)//USB HC D8000-DBFFF
91
92                                         WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
93                                                 0x0000, // Address Space Granularity
94                                                 0x0000, // Address Range Minimum
95                                                 0x03AF, // Address Range Maximum
96                                                 0x0000, // Address Translation Offset
97                                                 0x03B0,,,
98                                                 , TypeStatic)   //0-CF7h
99
100                                         WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
101                                                 0x0000, // Address Space Granularity
102                                                 0x03E0, // Address Range Minimum
103                                                 0x0CF7, // Address Range Maximum
104                                                 0x0000, // Address Translation Offset
105                                                 0x0918,,,
106                                                 , TypeStatic)   //0-CF7h
107                                 })
108                                 \_SB.OSTP ()
109                                 CreateDWordField (BUF0, 0x3E, VLEN)
110                                 CreateDWordField (BUF0, 0x36, VMAX)
111                                 CreateDWordField (BUF0, 0x32, VMIN)
112                                 ShiftLeft (VGA1, 0x09, Local0)
113                                 Add (VMIN, Local0, VMAX)
114                                 Decrement (VMAX)
115                                 Store (Local0, VLEN)
116                                 Concatenate (\_SB.GMEM (0x00, \_SB.PCI0.SBLK), BUF0, Local1)
117                                 Concatenate (\_SB.GIOR (0x00, \_SB.PCI0.SBLK), Local1, Local2)
118                                 Concatenate (\_SB.GWBN (0x00, \_SB.PCI0.SBLK), Local2, Local3)
119                                 Return (Local3)
120                         }
121
122                         Include ("pci0_hc.asl")
123
124                 }
125                 Device (PCI1)
126                 {
127                         Name (_HID, "PNP0A03")
128                         Name (_ADR, 0x00000000)
129                         Name (_UID, 0x02)
130                         Method (_STA, 0, NotSerialized)
131                         {
132                                 Return (\_SB.PCI0.CBST)
133                         }
134                         Method (_BBN, 0, NotSerialized)
135                         {
136                                 Return (\_SB.PCI0.CBB) // 0 or 0xff
137                         }
138
139                 }
140                 Device (PCI2)
141                 {
142                         Name (_HID, "PNP0A03")
143                         Name (_ADR, 0x00000000)
144                         Name (_UID, 0x02)
145                         Method (_STA, 0, NotSerialized)
146                         {
147                                 Return (\_SB.PCI0.CBS2)
148                         }
149                         Method (_BBN, 0, NotSerialized)
150                         {
151                                 Return (\_SB.PCI0.CBB2)// 0xfe
152                         }
153                 }
154         }
155
156         Scope (_GPE)
157         {
158                 Method (_L08, 0, NotSerialized)
159                 {
160                         Notify (\_SB.PCI0, 0x02) //PME# Wakeup
161                 }
162
163                 Method (_L0F, 0, NotSerialized)
164                 {
165                         Notify (\_SB.PCI0.TP2P.USB0, 0x02)       //USB Wakeup
166                 }
167
168                 Method (_L22, 0, NotSerialized) // GPIO18 (LID) - Pogo 0 Bridge B
169                 {
170                         Notify (\_SB.PCI0.PG0B, 0x02)
171                 }
172
173                 Method (_L29, 0, NotSerialized) // GPIO25 (Suspend) - Pogo 0 Bridge A
174                 {
175                         Notify (\_SB.PCI0.PG0A, 0x02)
176                 }
177         }
178
179         Method (_PTS, 1, NotSerialized)
180         {
181                 Or (Arg0, 0xF0, Local0)
182                 Store (Local0, DBG1)
183         }
184 //
185 //      Method (_WAK, 1, NotSerialized)
186 //      {
187 //              Or (Arg0, 0xE0, Local0)
188 //              Store (Local0, DBG1)
189 //      }
190
191         Name (PICF, 0x00) //Flag Variable for PIC vs. I/O APIC Mode
192         Method (_PIC, 1, NotSerialized) //PIC Flag and Interface Method
193         {
194                 Store (Arg0, PICF)
195         }
196
197         OperationRegion (DEBG, SystemIO, 0x80, 0x01)
198         Field (DEBG, ByteAcc, Lock, Preserve)
199         {
200                 DBG1, 8
201         }
202
203         OperationRegion (EXTM, SystemMemory, 0x000FF83C, 0x04)
204         Field (EXTM, WordAcc, Lock, Preserve)
205         {
206                 AMEM, 32
207         }
208
209         OperationRegion (VGAM, SystemMemory, 0x000C0002, 0x01)
210         Field (VGAM, ByteAcc, Lock, Preserve)
211         {
212                 VGA1, 8
213         }
214
215         OperationRegion (GRAM, SystemMemory, 0x0400, 0x0100)
216         Field (GRAM, ByteAcc, Lock, Preserve)
217         {
218                 Offset (0x10),
219                 FLG0, 8
220         }
221
222         OperationRegion (GSTS, SystemIO, 0xC028, 0x02)
223         Field (GSTS, ByteAcc, NoLock, Preserve)
224         {
225                 , 4,
226                 IRQR, 1
227         }
228
229         OperationRegion (Z007, SystemIO, 0x21, 0x01)
230         Field (Z007, ByteAcc, NoLock, Preserve)
231         {
232                 Z008, 8
233         }
234
235         OperationRegion (Z009, SystemIO, 0xA1, 0x01)
236         Field (Z009, ByteAcc, NoLock, Preserve)
237         {
238                 Z00A, 8
239         }
240
241         Include ("amdfam10_util.asl")
242 }