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