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