Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2010 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. |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | /* DefinitionBlock Statement */ |
| 17 | DefinitionBlock ( |
Paul Menzel | cb54f31 | 2013-02-04 12:05:46 +0100 | [diff] [blame] | 18 | "DSDT.AML", /* Output filename */ |
| 19 | "DSDT", /* Signature */ |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 20 | 0x02, /* DSDT Revision, needs to be 2 for 64bit */ |
Paul Menzel | cb54f31 | 2013-02-04 12:05:46 +0100 | [diff] [blame] | 21 | "ASROCK", /* OEMID */ |
Paul Menzel | 12d6024 | 2013-02-21 15:54:50 +0100 | [diff] [blame] | 22 | "COREBOOT", /* TABLE ID */ |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 23 | 0x00010001 /* OEM Revision */ |
| 24 | ) |
| 25 | { /* Start of ASL file */ |
Patrick Georgi | 91bd306 | 2012-02-16 19:16:14 +0100 | [diff] [blame] | 26 | /* #include <arch/x86/acpi/debug.asl> */ /* Include global debug methods if needed */ |
stepan | 8301d83 | 2010-12-08 07:07:33 +0000 | [diff] [blame] | 27 | #include "northbridge/amd/amdk8/util.asl" |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 28 | |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 29 | Name(HPBA, 0xFED00000) /* Base address of HPET table */ |
| 30 | |
| 31 | Name(SSFG, 0x0D) /* S1 support: bit 0, S2 Support: bit 1, etc. S0 & S5 assumed */ |
| 32 | |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 33 | Name(PMOD, One) /* Assume APIC */ |
| 34 | |
| 35 | /* PIC IRQ mapping registers, C00h-C01h */ |
| 36 | OperationRegion(PRQM, SystemIO, 0x00000C00, 0x00000002) |
| 37 | Field(PRQM, ByteAcc, NoLock, Preserve) { |
| 38 | PRQI, 0x00000008, |
| 39 | PRQD, 0x00000008, /* Offset: 1h */ |
| 40 | } |
| 41 | IndexField(PRQI, PRQD, ByteAcc, NoLock, Preserve) { |
Paul Menzel | 17aed02 | 2013-02-04 10:46:33 +0100 | [diff] [blame] | 42 | PINA, 0x00000008, /* Index 0 */ |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 43 | PINB, 0x00000008, /* Index 1 */ |
| 44 | PINC, 0x00000008, /* Index 2 */ |
| 45 | PIND, 0x00000008, /* Index 3 */ |
| 46 | AINT, 0x00000008, /* Index 4 */ |
Paul Menzel | 17aed02 | 2013-02-04 10:46:33 +0100 | [diff] [blame] | 47 | SINT, 0x00000008, /* Index 5 */ |
| 48 | , 0x00000008, /* Index 6 */ |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 49 | AAUD, 0x00000008, /* Index 7 */ |
| 50 | AMOD, 0x00000008, /* Index 8 */ |
| 51 | PINE, 0x00000008, /* Index 9 */ |
| 52 | PINF, 0x00000008, /* Index A */ |
| 53 | PING, 0x00000008, /* Index B */ |
| 54 | PINH, 0x00000008, /* Index C */ |
| 55 | } |
| 56 | |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 57 | #include "acpi/routing.asl" |
| 58 | |
| 59 | Scope(\_SB) { |
| 60 | |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 61 | Method(_PIC, 0x01, NotSerialized) |
| 62 | { |
| 63 | If (Arg0) |
| 64 | { |
| 65 | \_SB.CIRQ() |
| 66 | } |
| 67 | Store(Arg0, PMOD) |
| 68 | } |
Rudolf Marek | 0bafd96 | 2010-12-04 10:08:55 +0000 | [diff] [blame] | 69 | |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 70 | Method(CIRQ, 0x00, NotSerialized){ |
| 71 | Store(0, PINA) |
| 72 | Store(0, PINB) |
| 73 | Store(0, PINC) |
| 74 | Store(0, PIND) |
| 75 | Store(0, PINE) |
| 76 | Store(0, PINF) |
| 77 | Store(0, PING) |
| 78 | Store(0, PINH) |
| 79 | } |
| 80 | |
| 81 | Name(IRQB, ResourceTemplate(){ |
| 82 | IRQ(Level,ActiveLow,Shared){15} |
| 83 | }) |
| 84 | |
| 85 | Name(IRQP, ResourceTemplate(){ |
| 86 | IRQ(Level,ActiveLow,Exclusive){3, 4, 5, 7, 10, 11, 12, 15} |
| 87 | }) |
| 88 | |
| 89 | Name(PITF, ResourceTemplate(){ |
| 90 | IRQ(Level,ActiveLow,Exclusive){9} |
| 91 | }) |
| 92 | |
| 93 | Device(INTA) { |
| 94 | Name(_HID, EISAID("PNP0C0F")) |
| 95 | Name(_UID, 1) |
| 96 | |
| 97 | Method(_STA, 0) { |
| 98 | if (PINA) { |
| 99 | Return(0x0B) /* sata is invisible */ |
| 100 | } else { |
| 101 | Return(0x09) /* sata is disabled */ |
| 102 | } |
| 103 | } /* End Method(_SB.INTA._STA) */ |
| 104 | |
| 105 | Method(_DIS ,0) { |
| 106 | /* DBGO("\\_SB\\LNKA\\_DIS\n") */ |
| 107 | Store(0, PINA) |
| 108 | } /* End Method(_SB.INTA._DIS) */ |
| 109 | |
| 110 | Method(_PRS ,0) { |
| 111 | /* DBGO("\\_SB\\LNKA\\_PRS\n") */ |
| 112 | Return(IRQP) |
| 113 | } /* Method(_SB.INTA._PRS) */ |
| 114 | |
| 115 | Method(_CRS ,0) { |
| 116 | /* DBGO("\\_SB\\LNKA\\_CRS\n") */ |
| 117 | CreateWordField(IRQB, 0x1, IRQN) |
| 118 | ShiftLeft(1, PINA, IRQN) |
| 119 | Return(IRQB) |
| 120 | } /* Method(_SB.INTA._CRS) */ |
| 121 | |
| 122 | Method(_SRS, 1) { |
| 123 | /* DBGO("\\_SB\\LNKA\\_CRS\n") */ |
| 124 | CreateWordField(ARG0, 1, IRQM) |
| 125 | |
| 126 | /* Use lowest available IRQ */ |
| 127 | FindSetRightBit(IRQM, Local0) |
| 128 | if (Local0) { |
| 129 | Decrement(Local0) |
| 130 | } |
| 131 | Store(Local0, PINA) |
| 132 | } /* End Method(_SB.INTA._SRS) */ |
| 133 | } /* End Device(INTA) */ |
| 134 | |
| 135 | Device(INTB) { |
| 136 | Name(_HID, EISAID("PNP0C0F")) |
| 137 | Name(_UID, 2) |
| 138 | |
| 139 | Method(_STA, 0) { |
| 140 | if (PINB) { |
| 141 | Return(0x0B) /* sata is invisible */ |
| 142 | } else { |
| 143 | Return(0x09) /* sata is disabled */ |
| 144 | } |
| 145 | } /* End Method(_SB.INTB._STA) */ |
| 146 | |
| 147 | Method(_DIS ,0) { |
| 148 | /* DBGO("\\_SB\\LNKB\\_DIS\n") */ |
| 149 | Store(0, PINB) |
| 150 | } /* End Method(_SB.INTB._DIS) */ |
| 151 | |
| 152 | Method(_PRS ,0) { |
| 153 | /* DBGO("\\_SB\\LNKB\\_PRS\n") */ |
| 154 | Return(IRQP) |
| 155 | } /* Method(_SB.INTB._PRS) */ |
| 156 | |
| 157 | Method(_CRS ,0) { |
| 158 | /* DBGO("\\_SB\\LNKB\\_CRS\n") */ |
| 159 | CreateWordField(IRQB, 0x1, IRQN) |
| 160 | ShiftLeft(1, PINB, IRQN) |
| 161 | Return(IRQB) |
| 162 | } /* Method(_SB.INTB._CRS) */ |
| 163 | |
| 164 | Method(_SRS, 1) { |
| 165 | /* DBGO("\\_SB\\LNKB\\_CRS\n") */ |
| 166 | CreateWordField(ARG0, 1, IRQM) |
| 167 | |
| 168 | /* Use lowest available IRQ */ |
| 169 | FindSetRightBit(IRQM, Local0) |
| 170 | if (Local0) { |
| 171 | Decrement(Local0) |
| 172 | } |
| 173 | Store(Local0, PINB) |
| 174 | } /* End Method(_SB.INTB._SRS) */ |
| 175 | } /* End Device(INTB) */ |
| 176 | |
| 177 | Device(INTC) { |
| 178 | Name(_HID, EISAID("PNP0C0F")) |
| 179 | Name(_UID, 3) |
| 180 | |
| 181 | Method(_STA, 0) { |
| 182 | if (PINC) { |
| 183 | Return(0x0B) /* sata is invisible */ |
| 184 | } else { |
| 185 | Return(0x09) /* sata is disabled */ |
| 186 | } |
| 187 | } /* End Method(_SB.INTC._STA) */ |
| 188 | |
| 189 | Method(_DIS ,0) { |
| 190 | /* DBGO("\\_SB\\LNKC\\_DIS\n") */ |
| 191 | Store(0, PINC) |
| 192 | } /* End Method(_SB.INTC._DIS) */ |
| 193 | |
| 194 | Method(_PRS ,0) { |
| 195 | /* DBGO("\\_SB\\LNKC\\_PRS\n") */ |
| 196 | Return(IRQP) |
| 197 | } /* Method(_SB.INTC._PRS) */ |
| 198 | |
| 199 | Method(_CRS ,0) { |
| 200 | /* DBGO("\\_SB\\LNKC\\_CRS\n") */ |
| 201 | CreateWordField(IRQB, 0x1, IRQN) |
| 202 | ShiftLeft(1, PINC, IRQN) |
| 203 | Return(IRQB) |
| 204 | } /* Method(_SB.INTC._CRS) */ |
| 205 | |
| 206 | Method(_SRS, 1) { |
| 207 | /* DBGO("\\_SB\\LNKC\\_CRS\n") */ |
| 208 | CreateWordField(ARG0, 1, IRQM) |
| 209 | |
| 210 | /* Use lowest available IRQ */ |
| 211 | FindSetRightBit(IRQM, Local0) |
| 212 | if (Local0) { |
| 213 | Decrement(Local0) |
| 214 | } |
| 215 | Store(Local0, PINC) |
| 216 | } /* End Method(_SB.INTC._SRS) */ |
| 217 | } /* End Device(INTC) */ |
| 218 | |
| 219 | Device(INTD) { |
| 220 | Name(_HID, EISAID("PNP0C0F")) |
| 221 | Name(_UID, 4) |
| 222 | |
| 223 | Method(_STA, 0) { |
| 224 | if (PIND) { |
| 225 | Return(0x0B) /* sata is invisible */ |
| 226 | } else { |
| 227 | Return(0x09) /* sata is disabled */ |
| 228 | } |
| 229 | } /* End Method(_SB.INTD._STA) */ |
| 230 | |
| 231 | Method(_DIS ,0) { |
| 232 | /* DBGO("\\_SB\\LNKD\\_DIS\n") */ |
| 233 | Store(0, PIND) |
| 234 | } /* End Method(_SB.INTD._DIS) */ |
| 235 | |
| 236 | Method(_PRS ,0) { |
| 237 | /* DBGO("\\_SB\\LNKD\\_PRS\n") */ |
| 238 | Return(IRQP) |
| 239 | } /* Method(_SB.INTD._PRS) */ |
| 240 | |
| 241 | Method(_CRS ,0) { |
| 242 | /* DBGO("\\_SB\\LNKD\\_CRS\n") */ |
| 243 | CreateWordField(IRQB, 0x1, IRQN) |
| 244 | ShiftLeft(1, PIND, IRQN) |
| 245 | Return(IRQB) |
| 246 | } /* Method(_SB.INTD._CRS) */ |
| 247 | |
| 248 | Method(_SRS, 1) { |
| 249 | /* DBGO("\\_SB\\LNKD\\_CRS\n") */ |
| 250 | CreateWordField(ARG0, 1, IRQM) |
| 251 | |
| 252 | /* Use lowest available IRQ */ |
| 253 | FindSetRightBit(IRQM, Local0) |
| 254 | if (Local0) { |
| 255 | Decrement(Local0) |
| 256 | } |
| 257 | Store(Local0, PIND) |
| 258 | } /* End Method(_SB.INTD._SRS) */ |
| 259 | } /* End Device(INTD) */ |
| 260 | |
| 261 | Device(INTE) { |
| 262 | Name(_HID, EISAID("PNP0C0F")) |
| 263 | Name(_UID, 5) |
| 264 | |
| 265 | Method(_STA, 0) { |
| 266 | if (PINE) { |
| 267 | Return(0x0B) /* sata is invisible */ |
| 268 | } else { |
| 269 | Return(0x09) /* sata is disabled */ |
| 270 | } |
| 271 | } /* End Method(_SB.INTE._STA) */ |
| 272 | |
| 273 | Method(_DIS ,0) { |
| 274 | /* DBGO("\\_SB\\LNKE\\_DIS\n") */ |
| 275 | Store(0, PINE) |
| 276 | } /* End Method(_SB.INTE._DIS) */ |
| 277 | |
| 278 | Method(_PRS ,0) { |
| 279 | /* DBGO("\\_SB\\LNKE\\_PRS\n") */ |
| 280 | Return(IRQP) |
| 281 | } /* Method(_SB.INTE._PRS) */ |
| 282 | |
| 283 | Method(_CRS ,0) { |
| 284 | /* DBGO("\\_SB\\LNKE\\_CRS\n") */ |
| 285 | CreateWordField(IRQB, 0x1, IRQN) |
| 286 | ShiftLeft(1, PINE, IRQN) |
| 287 | Return(IRQB) |
| 288 | } /* Method(_SB.INTE._CRS) */ |
| 289 | |
| 290 | Method(_SRS, 1) { |
| 291 | /* DBGO("\\_SB\\LNKE\\_CRS\n") */ |
| 292 | CreateWordField(ARG0, 1, IRQM) |
| 293 | |
| 294 | /* Use lowest available IRQ */ |
| 295 | FindSetRightBit(IRQM, Local0) |
| 296 | if (Local0) { |
| 297 | Decrement(Local0) |
| 298 | } |
| 299 | Store(Local0, PINE) |
| 300 | } /* End Method(_SB.INTE._SRS) */ |
| 301 | } /* End Device(INTE) */ |
| 302 | |
| 303 | Device(INTF) { |
| 304 | Name(_HID, EISAID("PNP0C0F")) |
| 305 | Name(_UID, 6) |
| 306 | |
| 307 | Method(_STA, 0) { |
| 308 | if (PINF) { |
| 309 | Return(0x0B) /* sata is invisible */ |
| 310 | } else { |
| 311 | Return(0x09) /* sata is disabled */ |
| 312 | } |
| 313 | } /* End Method(_SB.INTF._STA) */ |
| 314 | |
| 315 | Method(_DIS ,0) { |
| 316 | /* DBGO("\\_SB\\LNKF\\_DIS\n") */ |
| 317 | Store(0, PINF) |
| 318 | } /* End Method(_SB.INTF._DIS) */ |
| 319 | |
| 320 | Method(_PRS ,0) { |
| 321 | /* DBGO("\\_SB\\LNKF\\_PRS\n") */ |
| 322 | Return(PITF) |
| 323 | } /* Method(_SB.INTF._PRS) */ |
| 324 | |
| 325 | Method(_CRS ,0) { |
| 326 | /* DBGO("\\_SB\\LNKF\\_CRS\n") */ |
| 327 | CreateWordField(IRQB, 0x1, IRQN) |
| 328 | ShiftLeft(1, PINF, IRQN) |
| 329 | Return(IRQB) |
| 330 | } /* Method(_SB.INTF._CRS) */ |
| 331 | |
| 332 | Method(_SRS, 1) { |
| 333 | /* DBGO("\\_SB\\LNKF\\_CRS\n") */ |
| 334 | CreateWordField(ARG0, 1, IRQM) |
| 335 | |
| 336 | /* Use lowest available IRQ */ |
| 337 | FindSetRightBit(IRQM, Local0) |
| 338 | if (Local0) { |
| 339 | Decrement(Local0) |
| 340 | } |
| 341 | Store(Local0, PINF) |
| 342 | } /* End Method(_SB.INTF._SRS) */ |
| 343 | } /* End Device(INTF) */ |
| 344 | |
| 345 | Device(INTG) { |
| 346 | Name(_HID, EISAID("PNP0C0F")) |
| 347 | Name(_UID, 7) |
| 348 | |
| 349 | Method(_STA, 0) { |
| 350 | if (PING) { |
| 351 | Return(0x0B) /* sata is invisible */ |
| 352 | } else { |
| 353 | Return(0x09) /* sata is disabled */ |
| 354 | } |
| 355 | } /* End Method(_SB.INTG._STA) */ |
| 356 | |
| 357 | Method(_DIS ,0) { |
| 358 | /* DBGO("\\_SB\\LNKG\\_DIS\n") */ |
| 359 | Store(0, PING) |
| 360 | } /* End Method(_SB.INTG._DIS) */ |
| 361 | |
| 362 | Method(_PRS ,0) { |
| 363 | /* DBGO("\\_SB\\LNKG\\_PRS\n") */ |
| 364 | Return(IRQP) |
| 365 | } /* Method(_SB.INTG._CRS) */ |
| 366 | |
| 367 | Method(_CRS ,0) { |
| 368 | /* DBGO("\\_SB\\LNKG\\_CRS\n") */ |
| 369 | CreateWordField(IRQB, 0x1, IRQN) |
| 370 | ShiftLeft(1, PING, IRQN) |
| 371 | Return(IRQB) |
| 372 | } /* Method(_SB.INTG._CRS) */ |
| 373 | |
| 374 | Method(_SRS, 1) { |
| 375 | /* DBGO("\\_SB\\LNKG\\_CRS\n") */ |
| 376 | CreateWordField(ARG0, 1, IRQM) |
| 377 | |
| 378 | /* Use lowest available IRQ */ |
| 379 | FindSetRightBit(IRQM, Local0) |
| 380 | if (Local0) { |
| 381 | Decrement(Local0) |
| 382 | } |
| 383 | Store(Local0, PING) |
| 384 | } /* End Method(_SB.INTG._SRS) */ |
| 385 | } /* End Device(INTG) */ |
| 386 | |
| 387 | Device(INTH) { |
| 388 | Name(_HID, EISAID("PNP0C0F")) |
| 389 | Name(_UID, 8) |
| 390 | |
| 391 | Method(_STA, 0) { |
| 392 | if (PINH) { |
| 393 | Return(0x0B) /* sata is invisible */ |
| 394 | } else { |
| 395 | Return(0x09) /* sata is disabled */ |
| 396 | } |
| 397 | } /* End Method(_SB.INTH._STA) */ |
| 398 | |
| 399 | Method(_DIS ,0) { |
| 400 | /* DBGO("\\_SB\\LNKH\\_DIS\n") */ |
| 401 | Store(0, PINH) |
| 402 | } /* End Method(_SB.INTH._DIS) */ |
| 403 | |
| 404 | Method(_PRS ,0) { |
| 405 | /* DBGO("\\_SB\\LNKH\\_PRS\n") */ |
| 406 | Return(IRQP) |
| 407 | } /* Method(_SB.INTH._CRS) */ |
| 408 | |
| 409 | Method(_CRS ,0) { |
| 410 | /* DBGO("\\_SB\\LNKH\\_CRS\n") */ |
| 411 | CreateWordField(IRQB, 0x1, IRQN) |
| 412 | ShiftLeft(1, PINH, IRQN) |
| 413 | Return(IRQB) |
| 414 | } /* Method(_SB.INTH._CRS) */ |
| 415 | |
| 416 | Method(_SRS, 1) { |
| 417 | /* DBGO("\\_SB\\LNKH\\_CRS\n") */ |
| 418 | CreateWordField(ARG0, 1, IRQM) |
| 419 | |
| 420 | /* Use lowest available IRQ */ |
| 421 | FindSetRightBit(IRQM, Local0) |
| 422 | if (Local0) { |
| 423 | Decrement(Local0) |
| 424 | } |
| 425 | Store(Local0, PINH) |
| 426 | } /* End Method(_SB.INTH._SRS) */ |
| 427 | } /* End Device(INTH) */ |
| 428 | |
| 429 | } /* End Scope(_SB) */ |
| 430 | |
| 431 | |
| 432 | /* Supported sleep states: */ |
| 433 | Name(\_S0, Package () {0x00, 0x00, 0x00, 0x00} ) /* (S0) - working state */ |
| 434 | |
| 435 | If (LAnd(SSFG, 0x01)) { |
| 436 | Name(\_S1, Package () {0x01, 0x01, 0x00, 0x00} ) /* (S1) - sleeping w/CPU context */ |
| 437 | } |
| 438 | If (LAnd(SSFG, 0x02)) { |
| 439 | Name(\_S2, Package () {0x02, 0x02, 0x00, 0x00} ) /* (S2) - "light" Suspend to RAM */ |
| 440 | } |
| 441 | If (LAnd(SSFG, 0x04)) { |
| 442 | Name(\_S3, Package () {0x03, 0x03, 0x00, 0x00} ) /* (S3) - Suspend to RAM */ |
| 443 | } |
| 444 | If (LAnd(SSFG, 0x08)) { |
| 445 | Name(\_S4, Package () {0x04, 0x04, 0x00, 0x00} ) /* (S4) - Suspend to Disk */ |
| 446 | } |
| 447 | |
| 448 | Name(\_S5, Package () {0x05, 0x05, 0x00, 0x00} ) /* (S5) - Soft Off */ |
| 449 | |
| 450 | Name(\_SB.CSPS ,0) /* Current Sleep State (S0, S1, S2, S3, S4, S5) */ |
| 451 | Name(CSMS, 0) /* Current System State */ |
| 452 | |
| 453 | /* Wake status package */ |
Rudolf Marek | 0bafd96 | 2010-12-04 10:08:55 +0000 | [diff] [blame] | 454 | |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 455 | Name(WKST,Package(){Zero, Zero}) |
| 456 | |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 457 | /* South Bridge */ |
| 458 | Scope(\_SB) { /* Start \_SB scope */ |
Patrick Georgi | 91bd306 | 2012-02-16 19:16:14 +0100 | [diff] [blame] | 459 | #include <arch/x86/acpi/globutil.asl> /* global utility methods expected within the \_SB scope */ |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 460 | |
| 461 | /* _SB.PCI0 */ |
| 462 | /* Note: Only need HID on Primary Bus */ |
| 463 | Device(PCI0) { |
Rudolf Marek | 0bafd96 | 2010-12-04 10:08:55 +0000 | [diff] [blame] | 464 | |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 465 | Name(_HID, EISAID("PNP0A03")) |
| 466 | Name(_ADR, 0x00180000) /* Dev# = BSP Dev#, Func# = 0 */ |
| 467 | Method(_BBN, 0) { /* Bus number = 0 */ |
| 468 | Return(0) |
| 469 | } |
| 470 | Method(_STA, 0) { |
| 471 | /* DBGO("\\_SB\\PCI0\\_STA\n") */ |
| 472 | Return(0x0B) /* Status is visible */ |
| 473 | } |
| 474 | |
| 475 | Method(_PRT,0) { |
| 476 | If(PMOD){ Return(APR0) } /* APIC mode */ |
| 477 | Return (PR0) /* PIC Mode */ |
| 478 | } /* end _PRT */ |
| 479 | |
| 480 | /* Describe the Northbridge devices */ |
| 481 | Device(AMRT) { |
| 482 | Name(_ADR, 0x00000000) |
| 483 | } /* end AMRT */ |
| 484 | |
| 485 | /* The internal GFX bridge */ |
| 486 | Device(AGPB) { |
| 487 | Name(_ADR, 0x00010000) |
| 488 | Name(_PRW, Package() {0x18, 4}) |
| 489 | Method(_PRT,0) { |
| 490 | Return (APR1) |
| 491 | } |
| 492 | } /* end AGPB */ |
| 493 | |
| 494 | /* The external GFX bridge */ |
| 495 | Device(PBR2) { |
| 496 | Name(_ADR, 0x00020000) |
| 497 | Name(_PRW, Package() {0x18, 4}) |
| 498 | Method(_PRT,0) { |
| 499 | If(PMOD){ Return(APS2) } /* APIC mode */ |
| 500 | Return (PS2) /* PIC Mode */ |
| 501 | } /* end _PRT */ |
| 502 | } /* end PBR2 */ |
| 503 | |
Rudolf Marek | c7d2773 | 2010-08-17 21:03:17 +0000 | [diff] [blame] | 504 | /* GPP x1 */ |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 505 | Device(PBR9) { |
| 506 | Name(_ADR, 0x00090000) |
| 507 | Name(_PRW, Package() {0x18, 4}) |
| 508 | Method(_PRT,0) { |
| 509 | If(PMOD){ Return(APS9) } /* APIC mode */ |
| 510 | Return (PS9) /* PIC Mode */ |
| 511 | } /* end _PRT */ |
| 512 | } /* end PBR9 */ |
| 513 | |
Rudolf Marek | c7d2773 | 2010-08-17 21:03:17 +0000 | [diff] [blame] | 514 | /* ethernet */ |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 515 | Device(PBRa) { |
| 516 | Name(_ADR, 0x000A0000) |
| 517 | Name(_PRW, Package() {0x18, 4}) |
| 518 | Method(_PRT,0) { |
| 519 | If(PMOD){ Return(APSa) } /* APIC mode */ |
| 520 | Return (PSa) /* PIC Mode */ |
| 521 | } /* end _PRT */ |
| 522 | } /* end PBRa */ |
| 523 | |
| 524 | |
| 525 | /* PCI slot 1, 2, 3 */ |
| 526 | Device(PIBR) { |
| 527 | Name(_ADR, 0x00140004) |
| 528 | Name(_PRW, Package() {0x18, 4}) |
| 529 | |
| 530 | Method(_PRT, 0) { |
| 531 | Return (PCIB) |
| 532 | } |
| 533 | } |
| 534 | |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 535 | Device(LIBR) { |
| 536 | Name(_ADR, 0x00140003) |
| 537 | /* Method(_INI) { |
| 538 | * DBGO("\\_SB\\PCI0\\LpcIsaBr\\_INI\n") |
| 539 | } */ /* End Method(_SB.SBRDG._INI) */ |
| 540 | |
| 541 | /* Real Time Clock Device */ |
| 542 | Device(RTC0) { |
Scott Duplichan | 6018e1b | 2010-11-07 20:11:39 +0000 | [diff] [blame] | 543 | Name(_HID, EISAID("PNP0B00")) /* AT Real Time Clock (not PIIX4 compatible) */ |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 544 | Name(_CRS, ResourceTemplate() { |
| 545 | IRQNoFlags(){8} |
| 546 | IO(Decode16,0x0070, 0x0070, 0, 2) |
| 547 | /* IO(Decode16,0x0070, 0x0070, 0, 4) */ |
| 548 | }) |
| 549 | } /* End Device(_SB.PCI0.LpcIsaBr.RTC0) */ |
| 550 | |
| 551 | Device(TMR) { /* Timer */ |
| 552 | Name(_HID,EISAID("PNP0100")) /* System Timer */ |
| 553 | Name(_CRS, ResourceTemplate() { |
| 554 | IRQNoFlags(){0} |
| 555 | IO(Decode16, 0x0040, 0x0040, 0, 4) |
| 556 | /* IO(Decode16, 0x0048, 0x0048, 0, 4) */ |
| 557 | }) |
| 558 | } /* End Device(_SB.PCI0.LpcIsaBr.TMR) */ |
| 559 | |
| 560 | Device(SPKR) { /* Speaker */ |
| 561 | Name(_HID,EISAID("PNP0800")) /* AT style speaker */ |
| 562 | Name(_CRS, ResourceTemplate() { |
| 563 | IO(Decode16, 0x0061, 0x0061, 0, 1) |
| 564 | }) |
| 565 | } /* End Device(_SB.PCI0.LpcIsaBr.SPKR) */ |
| 566 | |
| 567 | Device(PIC) { |
| 568 | Name(_HID,EISAID("PNP0000")) /* AT Interrupt Controller */ |
| 569 | Name(_CRS, ResourceTemplate() { |
| 570 | IRQNoFlags(){2} |
| 571 | IO(Decode16,0x0020, 0x0020, 0, 2) |
| 572 | IO(Decode16,0x00A0, 0x00A0, 0, 2) |
| 573 | /* IO(Decode16, 0x00D0, 0x00D0, 0x10, 0x02) */ |
| 574 | /* IO(Decode16, 0x04D0, 0x04D0, 0x10, 0x02) */ |
| 575 | }) |
| 576 | } /* End Device(_SB.PCI0.LpcIsaBr.PIC) */ |
| 577 | |
| 578 | Device(MAD) { /* 8257 DMA */ |
| 579 | Name(_HID,EISAID("PNP0200")) /* Hardware Device ID */ |
| 580 | Name(_CRS, ResourceTemplate() { |
| 581 | DMA(Compatibility,BusMaster,Transfer8){4} |
| 582 | IO(Decode16, 0x0000, 0x0000, 0x10, 0x10) |
Stefan Reinauer | 36de042 | 2010-05-21 20:40:38 +0000 | [diff] [blame] | 583 | IO(Decode16, 0x0081, 0x0081, 0x01, 0x03) |
| 584 | IO(Decode16, 0x0087, 0x0087, 0x01, 0x01) |
| 585 | IO(Decode16, 0x0089, 0x0089, 0x01, 0x03) |
| 586 | IO(Decode16, 0x008F, 0x008F, 0x01, 0x01) |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 587 | IO(Decode16, 0x00C0, 0x00C0, 0x10, 0x20) |
| 588 | }) /* End Name(_SB.PCI0.LpcIsaBr.MAD._CRS) */ |
| 589 | } /* End Device(_SB.PCI0.LpcIsaBr.MAD) */ |
| 590 | |
| 591 | Device(COPR) { |
| 592 | Name(_HID,EISAID("PNP0C04")) /* Math Coprocessor */ |
| 593 | Name(_CRS, ResourceTemplate() { |
| 594 | IO(Decode16, 0x00F0, 0x00F0, 0, 0x10) |
| 595 | IRQNoFlags(){13} |
| 596 | }) |
| 597 | } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */ |
| 598 | |
| 599 | Device(HPTM) { |
| 600 | Name(_HID,EISAID("PNP0103")) |
| 601 | Name(CRS,ResourceTemplate() { |
| 602 | Memory32Fixed(ReadOnly,0xFED00000, 0x00000400, HPT) /* 1kb reserved space */ |
| 603 | }) |
| 604 | Method(_STA, 0) { |
| 605 | Return(0x0F) /* sata is visible */ |
| 606 | } |
| 607 | Method(_CRS, 0) { |
| 608 | CreateDwordField(CRS, ^HPT._BAS, HPBA) |
| 609 | Store(HPBA, HPBA) |
| 610 | Return(CRS) |
| 611 | } |
| 612 | } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */ |
| 613 | } /* end LIBR */ |
| 614 | |
Rudolf Marek | 0bafd96 | 2010-12-04 10:08:55 +0000 | [diff] [blame] | 615 | External (BUSN) |
| 616 | External (MMIO) |
| 617 | External (PCIO) |
| 618 | External (SBLK) |
| 619 | External (TOM1) |
| 620 | External (HCLK) |
| 621 | External (SBDN) |
| 622 | External (HCDN) |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 623 | |
Rudolf Marek | 0bafd96 | 2010-12-04 10:08:55 +0000 | [diff] [blame] | 624 | Method (_CRS, 0, NotSerialized) |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 625 | { |
Rudolf Marek | 0bafd96 | 2010-12-04 10:08:55 +0000 | [diff] [blame] | 626 | Name (BUF0, ResourceTemplate () |
| 627 | { |
| 628 | IO (Decode16, |
| 629 | 0x0CF8, // Address Range Minimum |
| 630 | 0x0CF8, // Address Range Maximum |
| 631 | 0x01, // Address Alignment |
| 632 | 0x08, // Address Length |
| 633 | ) |
| 634 | WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, |
| 635 | 0x0000, // Address Space Granularity |
| 636 | 0x0000, // Address Range Minimum |
| 637 | 0x0CF7, // Address Range Maximum |
| 638 | 0x0000, // Address Translation Offset |
| 639 | 0x0CF8, // Address Length |
| 640 | ,, , TypeStatic) |
| 641 | }) |
| 642 | /* Methods bellow use SSDT to get actual MMIO regs |
| 643 | The IO ports are from 0xd00, optionally an VGA, |
| 644 | otherwise the info from MMIO is used. |
| 645 | */ |
| 646 | Concatenate (\_SB.GMEM (0x00, \_SB.PCI0.SBLK), BUF0, Local1) |
| 647 | Concatenate (\_SB.GIOR (0x00, \_SB.PCI0.SBLK), Local1, Local2) |
| 648 | Concatenate (\_SB.GWBN (0x00, \_SB.PCI0.SBLK), Local2, Local3) |
| 649 | Return (Local3) |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 650 | } |
| 651 | |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 652 | } /* End Device(PCI0) */ |
| 653 | |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 654 | } /* End \_SB scope */ |
Rudolf Marek | 133647a | 2010-04-05 19:47:34 +0000 | [diff] [blame] | 655 | } |
| 656 | /* End of ASL file */ |