Harald Gutmann | 62cfe16 | 2009-06-19 12:03:40 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * (C) Copyright 2004 Nick Barker <Nick.Barker9@btinternet.com> |
| 5 | * (C) Copyright 2007, 2008 Rudolf Marek <r.marek@assembler.cz> |
| 6 | * (C) Copyright 2009 Harald Gutmann <harald.gutmann@gmx.net> |
| 7 | * |
| 8 | * ISA portions taken from QEMU acpi-dsdt.dsl. |
| 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License v2 as published by |
| 12 | * the Free Software Foundation. |
| 13 | * |
| 14 | * This program is distributed in the hope that it will be useful, |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | * GNU General Public License for more details. |
| 18 | * |
| 19 | * You should have received a copy of the GNU General Public License |
| 20 | * along with this program; if not, write to the Free Software |
| 21 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 22 | */ |
| 23 | |
| 24 | DefinitionBlock ("DSDT.aml", "DSDT", 1, "LXBIOS", "LXB-DSDT", 1) |
| 25 | { |
| 26 | Include ("../../../../src/northbridge/amd/amdk8/amdk8_util.asl") |
| 27 | |
| 28 | /* For now only define 2 power states: |
| 29 | * - S0 which is fully on |
| 30 | * - S5 which is soft off |
| 31 | */ |
| 32 | Name (\_S0, Package () { 0x00, 0x00, 0x00, 0x00 }) |
| 33 | Name (\_S5, Package () { 0x07, 0x00, 0x00, 0x00 }) |
| 34 | |
| 35 | /* Root of the bus hierarchy */ |
| 36 | Scope (\_SB) |
| 37 | { |
| 38 | /* Top PCI device */ |
| 39 | Device (PCI0) |
| 40 | { |
| 41 | Name (_HID, EisaId ("PNP0A03")) |
| 42 | Name (_ADR, 0x00) |
| 43 | Name (_UID, 0x00) |
| 44 | Name (_BBN, 0x00) |
| 45 | |
| 46 | External (BUSN) |
| 47 | External (MMIO) |
| 48 | External (PCIO) |
| 49 | External (SBLK) |
| 50 | External (TOM1) |
| 51 | External (HCLK) |
| 52 | External (SBDN) |
| 53 | External (HCDN) |
| 54 | |
| 55 | Method (_CRS, 0, NotSerialized) |
| 56 | { |
| 57 | Name (BUF0, ResourceTemplate () |
| 58 | { |
| 59 | IO (Decode16, |
| 60 | 0x0CF8, // Address Range Minimum |
| 61 | 0x0CF8, // Address Range Maximum |
| 62 | 0x01, // Address Alignment |
| 63 | 0x08, // Address Length |
| 64 | ) |
| 65 | WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, |
| 66 | 0x0000, // Address Space Granularity |
| 67 | 0x0000, // Address Range Minimum |
| 68 | 0x0CF7, // Address Range Maximum |
| 69 | 0x0000, // Address Translation Offset |
| 70 | 0x0CF8, // Address Length |
| 71 | ,, , TypeStatic) |
| 72 | }) |
| 73 | /* Methods bellow use SSDT to get actual MMIO regs |
| 74 | The IO ports are from 0xd00, optionally an VGA, |
| 75 | otherwise the info from MMIO is used. |
| 76 | */ |
| 77 | Concatenate (\_SB.GMEM (0x00, \_SB.PCI0.SBLK), BUF0, Local1) |
| 78 | Concatenate (\_SB.GIOR (0x00, \_SB.PCI0.SBLK), Local1, Local2) |
| 79 | Concatenate (\_SB.GWBN (0x00, \_SB.PCI0.SBLK), Local2, Local3) |
| 80 | Return (Local3) |
| 81 | } |
| 82 | |
| 83 | /* PCI Routing Table */ |
| 84 | Name (_PRT, Package () { |
| 85 | Package (0x04) { 0x0001FFFF, 0x01, 0x00, 0x0A }, /* 0x1 - 00:01.1 - IRQ 10 - SMBus */ |
| 86 | Package (0x04) { 0x0002FFFF, 0x00, 0x00, 0x16 }, /* 0x2 - 00:02.0 - IRQ 22 - USB */ |
| 87 | Package (0x04) { 0x0002FFFF, 0x01, 0x00, 0x17 }, /* 0x2 - 00:01.1 - IRQ 23 - USB */ |
| 88 | Package (0x04) { 0x0004FFFF, 0x00, 0x00, 0x15 }, /* 0x4 - 00:04.0 - IRQ 21 - IDE */ |
| 89 | Package (0x04) { 0x0005FFFF, 0x00, 0x00, 0x14 }, /* 0x5 - 00:05.0 - IRQ 20 - SATA */ |
| 90 | Package (0x04) { 0x0005FFFF, 0x01, 0x00, 0x15 }, /* 0x5 - 00:05.1 - IRQ 21 - SATA */ |
| 91 | Package (0x04) { 0x0005FFFF, 0x02, 0x00, 0x16 }, /* 0x5 - 00:05.2 - IRQ 22 - SATA */ |
| 92 | Package (0x04) { 0x0006FFFF, 0x01, 0x00, 0x17 }, /* 0x6 - 00:06.1 - IRQ 23 - HD Audio */ |
| 93 | Package (0x04) { 0x0008FFFF, 0x00, 0x00, 0x14 }, /* 0x8 - 00:08.0 - IRQ 20 - GBit Ethernet */ |
| 94 | }) |
| 95 | |
| 96 | Device (PEBF) /* PCI-E Bridge F */ |
| 97 | { |
| 98 | Name (_ADR, 0x000F0000) |
| 99 | Name (_UID, 0x00) |
| 100 | Name (_BBN, 0x07) |
| 101 | Name (_PRT, Package () { |
| 102 | Package (0x04) { 0x0000FFFF, 0x00, 0x00, 0x11 }, |
| 103 | Package (0x04) { 0x0000FFFF, 0x01, 0x00, 0x12 }, |
| 104 | Package (0x04) { 0x0000FFFF, 0x02, 0x00, 0x13 }, |
| 105 | Package (0x04) { 0x0000FFFF, 0x03, 0x00, 0x10 }, |
| 106 | }) |
| 107 | } |
| 108 | |
| 109 | Device (PEBE) /* PCI-E Bridge E */ |
| 110 | { |
| 111 | Name (_ADR, 0x000E0000) |
| 112 | Name (_UID, 0x00) |
| 113 | Name (_BBN, 0x06) |
| 114 | Name (_PRT, Package () { |
| 115 | Package (0x04) { 0x0000FFFF, 0x00, 0x00, 0x12 }, |
| 116 | Package (0x04) { 0x0000FFFF, 0x01, 0x00, 0x13 }, |
| 117 | Package (0x04) { 0x0000FFFF, 0x02, 0x00, 0x10 }, |
| 118 | Package (0x04) { 0x0000FFFF, 0x03, 0x00, 0x11 }, |
| 119 | }) |
| 120 | } |
| 121 | |
| 122 | Device (PEBD) /* PCI-E Bridge D */ |
| 123 | { |
| 124 | Name (_ADR, 0x000D0000) |
| 125 | Name (_UID, 0x00) |
| 126 | Name (_BBN, 0x05) |
| 127 | Name (_PRT, Package () { |
| 128 | Package (0x04) { 0x0000FFFF, 0x00, 0x00, 0x13 }, |
| 129 | Package (0x04) { 0x0000FFFF, 0x01, 0x00, 0x10 }, |
| 130 | Package (0x04) { 0x0000FFFF, 0x02, 0x00, 0x11 }, |
| 131 | Package (0x04) { 0x0000FFFF, 0x03, 0x00, 0x12 }, |
| 132 | }) |
| 133 | } |
| 134 | |
| 135 | Device (PEBC) /* PCI-E Bridge C */ |
| 136 | { |
| 137 | Name (_ADR, 0x000C0000) |
| 138 | Name (_UID, 0x00) |
| 139 | Name (_BBN, 0x04) |
| 140 | Name (_PRT, Package () { |
| 141 | Package (0x04) { 0x0000FFFF, 0x00, 0x00, 0x10 }, |
| 142 | Package (0x04) { 0x0000FFFF, 0x01, 0x00, 0x11 }, |
| 143 | Package (0x04) { 0x0000FFFF, 0x02, 0x00, 0x12 }, |
| 144 | Package (0x04) { 0x0000FFFF, 0x03, 0x00, 0x13 }, |
| 145 | }) |
| 146 | } |
| 147 | |
| 148 | Device (PEBB) /* PCI-E Bridge B */ |
| 149 | { |
| 150 | Name (_ADR, 0x000B0000) |
| 151 | Name (_UID, 0x00) |
| 152 | Name (_BBN, 0x03) |
| 153 | Name (_PRT, Package () { |
| 154 | Package (0x04) { 0x0000FFFF, 0x00, 0x00, 0x11 }, |
| 155 | Package (0x04) { 0x0000FFFF, 0x01, 0x00, 0x12 }, |
| 156 | Package (0x04) { 0x0000FFFF, 0x02, 0x00, 0x13 }, |
| 157 | Package (0x04) { 0x0000FFFF, 0x03, 0x00, 0x10 }, |
| 158 | }) |
| 159 | } |
| 160 | |
| 161 | Device (PEBA) /* PCI-E Bridge A */ |
| 162 | { |
| 163 | Name (_ADR, 0x000A0000) |
| 164 | Name (_UID, 0x00) |
| 165 | Name (_BBN, 0x02) |
| 166 | Name (_PRT, Package () { |
| 167 | Package (0x04) { 0x0000FFFF, 0x00, 0x00, 0x12 }, |
| 168 | Package (0x04) { 0x0000FFFF, 0x01, 0x00, 0x13 }, |
| 169 | Package (0x04) { 0x0000FFFF, 0x02, 0x00, 0x10 }, |
| 170 | Package (0x04) { 0x0000FFFF, 0x03, 0x00, 0x11 }, |
| 171 | }) |
| 172 | } |
| 173 | |
| 174 | Device (PCID) /* PCI Device */ |
| 175 | { |
| 176 | Name (_ADR, 0x00060000) |
| 177 | Name (_UID, 0x00) |
| 178 | Name (_BBN, 0x01) |
| 179 | Name (_PRT, Package () { |
| 180 | Package (0x04) { 0x0006FFFF, 0x00, 0x00, 0x12 }, |
| 181 | Package (0x04) { 0x0006FFFF, 0x01, 0x00, 0x13 }, |
| 182 | Package (0x04) { 0x0006FFFF, 0x02, 0x00, 0x10 }, |
| 183 | Package (0x04) { 0x0006FFFF, 0x03, 0x00, 0x11 }, |
| 184 | Package (0x04) { 0x0007FFFF, 0x00, 0x00, 0x13 }, /* PCI slot 1 */ |
| 185 | Package (0x04) { 0x0007FFFF, 0x01, 0x00, 0x10 }, |
| 186 | Package (0x04) { 0x0007FFFF, 0x02, 0x00, 0x11 }, |
| 187 | Package (0x04) { 0x0007FFFF, 0x03, 0x00, 0x12 }, |
| 188 | Package (0x04) { 0x0008FFFF, 0x00, 0x00, 0x10 }, /* PCI slot 2 */ |
| 189 | Package (0x04) { 0x0008FFFF, 0x01, 0x00, 0x11 }, |
| 190 | Package (0x04) { 0x0008FFFF, 0x02, 0x00, 0x12 }, |
| 191 | Package (0x04) { 0x0008FFFF, 0x03, 0x00, 0x13 }, |
| 192 | Package (0x04) { 0x0009FFFF, 0x00, 0x00, 0x11 }, |
| 193 | Package (0x04) { 0x0009FFFF, 0x01, 0x00, 0x12 }, |
| 194 | Package (0x04) { 0x0009FFFF, 0x02, 0x00, 0x13 }, |
| 195 | Package (0x04) { 0x0009FFFF, 0x03, 0x00, 0x10 }, |
| 196 | Package (0x04) { 0x000AFFFF, 0x00, 0x00, 0x12 }, /* FireWire */ |
| 197 | Package (0x04) { 0x000AFFFF, 0x01, 0x00, 0x13 }, |
| 198 | Package (0x04) { 0x000AFFFF, 0x02, 0x00, 0x10 }, |
| 199 | Package (0x04) { 0x000AFFFF, 0x03, 0x00, 0x11 }, |
| 200 | }) |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | Device (ISA) { |
| 205 | Name (_ADR, 0x000010000) |
| 206 | |
| 207 | /* PS/2 keyboard (seems to be important for WinXP install) */ |
| 208 | Device (KBD) |
| 209 | { |
| 210 | Name (_HID, EisaId ("PNP0303")) |
| 211 | Method (_STA, 0, NotSerialized) |
| 212 | { |
| 213 | Return (0x0f) |
| 214 | } |
| 215 | Method (_CRS, 0, NotSerialized) |
| 216 | { |
Harald Gutmann | bf12dda | 2009-07-07 16:15:43 +0000 | [diff] [blame^] | 217 | Name (TMP0, ResourceTemplate () { |
Harald Gutmann | 62cfe16 | 2009-06-19 12:03:40 +0000 | [diff] [blame] | 218 | IO (Decode16, 0x0060, 0x0060, 0x01, 0x01) |
| 219 | IO (Decode16, 0x0064, 0x0064, 0x01, 0x01) |
| 220 | IRQNoFlags () {1} |
| 221 | }) |
Harald Gutmann | bf12dda | 2009-07-07 16:15:43 +0000 | [diff] [blame^] | 222 | Return (TMP0) |
Harald Gutmann | 62cfe16 | 2009-06-19 12:03:40 +0000 | [diff] [blame] | 223 | } |
| 224 | } |
| 225 | |
| 226 | /* PS/2 mouse */ |
| 227 | Device (MOU) |
| 228 | { |
| 229 | Name (_HID, EisaId ("PNP0F13")) |
| 230 | Method (_STA, 0, NotSerialized) |
| 231 | { |
| 232 | Return (0x0f) |
| 233 | } |
| 234 | Method (_CRS, 0, NotSerialized) |
| 235 | { |
Harald Gutmann | bf12dda | 2009-07-07 16:15:43 +0000 | [diff] [blame^] | 236 | Name (TMP1, ResourceTemplate () { |
Harald Gutmann | 62cfe16 | 2009-06-19 12:03:40 +0000 | [diff] [blame] | 237 | IO (Decode16, 0x0060, 0x0060, 0x01, 0x01) |
| 238 | IO (Decode16, 0x0064, 0x0064, 0x01, 0x01) |
| 239 | IRQNoFlags () {12} |
| 240 | }) |
Harald Gutmann | bf12dda | 2009-07-07 16:15:43 +0000 | [diff] [blame^] | 241 | Return (TMP1) |
Harald Gutmann | 62cfe16 | 2009-06-19 12:03:40 +0000 | [diff] [blame] | 242 | } |
| 243 | } |
| 244 | |
| 245 | /* PS/2 floppy controller */ |
| 246 | Device (FDC0) |
| 247 | { |
| 248 | Name (_HID, EisaId ("PNP0700")) |
| 249 | Method (_STA, 0, NotSerialized) |
| 250 | { |
| 251 | Return (0x0f) |
| 252 | } |
| 253 | Method (_CRS, 0, NotSerialized) |
| 254 | { |
| 255 | Name (BUF0, ResourceTemplate () { |
| 256 | IO (Decode16, 0x03F0, 0x03F0, 0x01, 0x06) |
Harald Gutmann | bf12dda | 2009-07-07 16:15:43 +0000 | [diff] [blame^] | 257 | IO (Decode16, 0x03F7, 0x03F7, 0x01, 0x01) |
Harald Gutmann | 62cfe16 | 2009-06-19 12:03:40 +0000 | [diff] [blame] | 258 | IRQNoFlags () {6} |
| 259 | DMA (Compatibility, NotBusMaster, Transfer8) {2} |
| 260 | }) |
| 261 | Return (BUF0) |
| 262 | } |
| 263 | } |
Harald Gutmann | bf12dda | 2009-07-07 16:15:43 +0000 | [diff] [blame^] | 264 | /* Parallel Port */ |
| 265 | Device (LPT1) |
| 266 | { |
| 267 | Name (_HID, EisaId ("PNP0400")) |
| 268 | Method (_STA, 0, NotSerialized) |
| 269 | { |
| 270 | Return (0x0f) |
| 271 | } |
| 272 | Method (_CRS, 0, NotSerialized) |
| 273 | { |
| 274 | Name (BUF1, ResourceTemplate () { |
| 275 | IO (Decode16, 0x0378, 0x0378, 0x01, 0x08) |
| 276 | IRQNoFlags () {7} |
| 277 | }) |
| 278 | Return (BUF1) |
| 279 | } |
| 280 | } |
| 281 | /* Parallel Port ECP */ |
| 282 | Device (ECP1) |
| 283 | { |
| 284 | Name (_HID, EisaId ("PNP0401")) |
| 285 | Method (_STA, 0, NotSerialized) |
| 286 | { |
| 287 | Return (0x0f) |
| 288 | } |
| 289 | Method (_CRS, 0, NotSerialized) |
| 290 | { |
| 291 | Name (BUF1, ResourceTemplate () { |
| 292 | IO (Decode16, 0x0378, 0x0378, 0x01, 0x04) |
| 293 | IO (Decode16, 0x0778, 0x0778, 0x01, 0x04) |
| 294 | IRQNoFlags() {7} |
| 295 | DMA (Compatibility, NotBusMaster, Transfer8) {0,1,3} |
| 296 | }) |
| 297 | Return (BUF1) |
| 298 | } |
| 299 | } |
Harald Gutmann | 62cfe16 | 2009-06-19 12:03:40 +0000 | [diff] [blame] | 300 | } |
| 301 | } |
| 302 | } |