Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2008 Advanced Micro Devices, Inc. |
| 5 | * Copyright (C) 2010 Siemens AG, Inc. |
| 6 | * (Written by Josef Kellermann <joseph.kellermann@heitec.de> for Siemens AG, Inc.) |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; version 2 of the License. |
| 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 |
Patrick Georgi | b890a12 | 2015-03-26 15:17:45 +0100 | [diff] [blame] | 19 | * Foundation, Inc. |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 20 | */ |
Patrick Georgi | c8feedd | 2012-02-16 18:43:25 +0100 | [diff] [blame] | 21 | #include <arch/ioapic.h> |
| 22 | #include <cpu/x86/lapic_def.h> |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 23 | |
| 24 | DefinitionBlock ("DSDT.aml", "DSDT", 2, "SIEMENS", "SITEMP ", 0x20101005) |
| 25 | { |
| 26 | /* Data to be patched by the BIOS during POST */ |
| 27 | /* Memory related values */ |
| 28 | Name(LOMH, 0x0) /* Start of unused memory in C0000-E0000 range */ |
| 29 | Name(HPBA, 0xFED00000) /* Base address of HPET table */ |
| 30 | |
| 31 | /* USB overcurrent mapping pins. */ |
| 32 | Name(UOM0, 0) |
| 33 | Name(UOM1, 2) |
| 34 | Name(UOM2, 0) |
| 35 | Name(UOM3, 7) |
| 36 | Name(UOM4, 2) |
| 37 | Name(UOM5, 2) |
| 38 | Name(UOM6, 6) |
| 39 | Name(UOM7, 2) |
| 40 | Name(UOM8, 6) |
| 41 | Name(UOM9, 6) |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 42 | |
| 43 | Name(DSEN, 1) // Display Output Switching Enable |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 44 | // Power notification |
| 45 | |
| 46 | /* PIC IRQ mapping registers, C00h-C01h */ |
| 47 | OperationRegion(PRQM, SystemIO, 0x00000C00, 0x00000002) |
| 48 | Field(PRQM, ByteAcc, NoLock, Preserve) { |
| 49 | PRQI, 0x00000008, |
| 50 | PRQD, 0x00000008, /* Offset: 1h */ |
| 51 | } |
| 52 | IndexField(PRQI, PRQD, ByteAcc, NoLock, Preserve) { |
| 53 | PINA, 0x00000008, /* Index 0 */ |
| 54 | PINB, 0x00000008, /* Index 1 */ |
| 55 | PINC, 0x00000008, /* Index 2 */ |
| 56 | PIND, 0x00000008, /* Index 3 */ |
| 57 | SINT, 0x00000008, /* Index 4 */ |
| 58 | Offset(0x09), |
| 59 | PINE, 0x00000008, /* Index 9 */ |
| 60 | PINF, 0x00000008, /* Index A */ |
| 61 | PING, 0x00000008, /* Index B */ |
| 62 | PINH, 0x00000008, /* Index C */ |
| 63 | } |
| 64 | |
| 65 | /* PCI Error control register */ |
| 66 | OperationRegion(PERC, SystemIO, 0x00000C14, 0x00000001) |
| 67 | Field(PERC, ByteAcc, NoLock, Preserve) { |
| 68 | SENS, 0x00000001, |
| 69 | PENS, 0x00000001, |
| 70 | SENE, 0x00000001, |
| 71 | PENE, 0x00000001, |
| 72 | } |
| 73 | |
| 74 | /* Client Management index/data registers */ |
| 75 | OperationRegion(CMT, SystemIO, 0x00000C50, 0x00000002) |
| 76 | Field(CMT, ByteAcc, NoLock, Preserve) { |
| 77 | CMTI, 8, |
| 78 | /* Client Management Data register */ |
| 79 | G64E, 1, |
| 80 | G64O, 1, |
| 81 | G32O, 2, |
| 82 | , 2, |
| 83 | GPSL, 2, |
| 84 | } |
| 85 | |
| 86 | /* GPM Port register */ |
| 87 | OperationRegion(GPT, SystemIO, 0x00000C52, 0x00000001) |
| 88 | Field(GPT, ByteAcc, NoLock, Preserve) { |
| 89 | GPB0,1, |
| 90 | GPB1,1, |
| 91 | GPB2,1, |
| 92 | GPB3,1, |
| 93 | GPB4,1, |
| 94 | GPB5,1, |
| 95 | GPB6,1, |
| 96 | GPB7,1, |
| 97 | } |
| 98 | |
| 99 | /* Flash ROM program enable register */ |
| 100 | OperationRegion(FRE, SystemIO, 0x00000C6F, 0x00000001) |
| 101 | Field(FRE, ByteAcc, NoLock, Preserve) { |
| 102 | , 0x00000006, |
| 103 | FLRE, 0x00000001, |
| 104 | } |
| 105 | |
| 106 | /* PM2 index/data registers */ |
| 107 | OperationRegion(PM2R, SystemIO, 0x00000CD0, 0x00000002) |
| 108 | Field(PM2R, ByteAcc, NoLock, Preserve) { |
| 109 | PM2I, 0x00000008, |
| 110 | PM2D, 0x00000008, |
| 111 | } |
| 112 | |
| 113 | /* Power Management I/O registers */ |
| 114 | OperationRegion(PIOR, SystemIO, 0x00000CD6, 0x00000002) |
| 115 | Field(PIOR, ByteAcc, NoLock, Preserve) { |
| 116 | PIOI, 0x00000008, |
| 117 | PIOD, 0x00000008, |
| 118 | } |
| 119 | IndexField (PIOI, PIOD, ByteAcc, NoLock, Preserve) { |
| 120 | Offset(0x00), /* MiscControl */ |
| 121 | , 1, |
| 122 | T1EE, 1, |
| 123 | T2EE, 1, |
| 124 | Offset(0x01), /* MiscStatus */ |
| 125 | , 1, |
| 126 | T1E, 1, |
| 127 | T2E, 1, |
| 128 | Offset(0x04), /* SmiWakeUpEventEnable3 */ |
| 129 | , 7, |
| 130 | SSEN, 1, |
| 131 | Offset(0x07), /* SmiWakeUpEventStatus3 */ |
| 132 | , 7, |
| 133 | CSSM, 1, |
| 134 | Offset(0x10), /* AcpiEnable */ |
| 135 | , 6, |
| 136 | PWDE, 1, |
| 137 | Offset(0x1C), /* ProgramIoEnable */ |
| 138 | , 3, |
| 139 | MKME, 1, |
| 140 | IO3E, 1, |
| 141 | IO2E, 1, |
| 142 | IO1E, 1, |
| 143 | IO0E, 1, |
| 144 | Offset(0x1D), /* IOMonitorStatus */ |
| 145 | , 3, |
| 146 | MKMS, 1, |
| 147 | IO3S, 1, |
| 148 | IO2S, 1, |
| 149 | IO1S, 1, |
| 150 | IO0S,1, |
| 151 | Offset(0x20), /* AcpiPmEvtBlk */ |
| 152 | APEB, 16, |
| 153 | Offset(0x36), /* GEvtLevelConfig */ |
| 154 | , 6, |
| 155 | ELC6, 1, |
| 156 | ELC7, 1, |
| 157 | Offset(0x37), /* GPMLevelConfig0 */ |
| 158 | , 3, |
| 159 | PLC0, 1, |
| 160 | PLC1, 1, |
| 161 | PLC2, 1, |
| 162 | PLC3, 1, |
| 163 | PLC8, 1, |
| 164 | Offset(0x38), /* GPMLevelConfig1 */ |
| 165 | , 1, |
| 166 | PLC4, 1, |
| 167 | PLC5, 1, |
| 168 | , 1, |
| 169 | PLC6, 1, |
| 170 | PLC7, 1, |
| 171 | Offset(0x3B), /* PMEStatus1 */ |
| 172 | GP0S, 1, |
| 173 | GM4S, 1, |
| 174 | GM5S, 1, |
| 175 | APS, 1, |
| 176 | GM6S, 1, |
| 177 | GM7S, 1, |
| 178 | GP2S, 1, |
| 179 | STSS, 1, |
| 180 | Offset(0x55), /* SoftPciRst */ |
| 181 | SPRE, 1, |
| 182 | , 1, |
| 183 | , 1, |
| 184 | PNAT, 1, |
| 185 | PWMK, 1, |
| 186 | PWNS, 1, |
| 187 | |
| 188 | /* Offset(0x61), */ /* Options_1 */ |
| 189 | /* ,7, */ |
| 190 | /* R617,1, */ |
| 191 | |
| 192 | Offset(0x65), /* UsbPMControl */ |
| 193 | , 4, |
| 194 | URRE, 1, |
| 195 | Offset(0x68), /* MiscEnable68 */ |
| 196 | , 3, |
| 197 | TMTE, 1, |
| 198 | , 1, |
| 199 | Offset(0x92), /* GEVENTIN */ |
| 200 | , 7, |
| 201 | E7IS, 1, |
| 202 | Offset(0x96), /* GPM98IN */ |
| 203 | G8IS, 1, |
| 204 | G9IS, 1, |
| 205 | Offset(0x9A), /* EnhanceControl */ |
| 206 | ,7, |
| 207 | HPDE, 1, |
| 208 | Offset(0xA8), /* PIO7654Enable */ |
| 209 | IO4E, 1, |
| 210 | IO5E, 1, |
| 211 | IO6E, 1, |
| 212 | IO7E, 1, |
| 213 | Offset(0xA9), /* PIO7654Status */ |
| 214 | IO4S, 1, |
| 215 | IO5S, 1, |
| 216 | IO6S, 1, |
| 217 | IO7S, 1, |
| 218 | } |
| 219 | |
| 220 | /* PM1 Event Block |
| 221 | * First word is PM1_Status, Second word is PM1_Enable |
| 222 | */ |
| 223 | OperationRegion(P1EB, SystemIO, APEB, 0x04) |
| 224 | Field(P1EB, ByteAcc, NoLock, Preserve) { |
| 225 | TMST, 1, |
| 226 | , 3, |
| 227 | BMST, 1, |
| 228 | GBST, 1, |
| 229 | Offset(0x01), |
| 230 | PBST, 1, |
| 231 | , 1, |
| 232 | RTST, 1, |
| 233 | , 3, |
| 234 | PWST, 1, |
| 235 | SPWS, 1, |
| 236 | Offset(0x02), |
| 237 | TMEN, 1, |
| 238 | , 4, |
| 239 | GBEN, 1, |
| 240 | Offset(0x03), |
| 241 | PBEN, 1, |
| 242 | , 1, |
| 243 | RTEN, 1, |
| 244 | , 3, |
| 245 | PWDA, 1, |
| 246 | } |
| 247 | |
Vladimir Serbinenko | 6985d4e | 2014-09-21 14:31:19 +0200 | [diff] [blame] | 248 | External(\NVSA) |
| 249 | |
| 250 | OperationRegion (GVAR, SystemMemory, \NVSA, 0x100) |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 251 | Field (GVAR, ByteAcc, NoLock, Preserve) |
| 252 | { |
| 253 | Offset (0x00), |
| 254 | OSYS, 16, |
| 255 | LINX, 16, |
| 256 | PCBA, 32, |
| 257 | MPEN, 8 |
| 258 | } |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 259 | |
Nico Huber | 8ecec21 | 2013-04-10 19:14:41 +0200 | [diff] [blame] | 260 | Name (IOLM,0xe0000000) |
| 261 | |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 262 | #include "acpi/platform.asl" |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 263 | |
| 264 | Scope(\_SB) { |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 265 | |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 266 | /* PCIe Configuration Space for 16 busses */ |
| 267 | OperationRegion(PCFG, SystemMemory, PCBA, 0x2000000) /* PCIe reserved space for 31 busses */ |
| 268 | Field(PCFG, ByteAcc, NoLock, Preserve) { |
| 269 | Offset(0x00090024), /* Byte offset to SATA BAR5 register 24h - Bus 0, Device 18, Function 0 */ |
| 270 | STB5, 32, |
| 271 | Offset(0x00098042), /* Byte offset to OHCI0 register 42h - Bus 0, Device 19, Function 0 */ |
| 272 | PT0D, 1, |
| 273 | PT1D, 1, |
| 274 | PT2D, 1, |
| 275 | PT3D, 1, |
| 276 | PT4D, 1, |
| 277 | PT5D, 1, |
| 278 | PT6D, 1, |
| 279 | PT7D, 1, |
| 280 | PT8D, 1, |
| 281 | PT9D, 1, |
| 282 | Offset(0x000A0004), /* Byte offset to SMBUS register 4h - Bus 0, Device 20, Function 0 */ |
| 283 | SBIE, 1, |
| 284 | SBME, 1, |
| 285 | Offset(0x000A0008), /* Byte offset to SMBUS register 8h - Bus 0, Device 20, Function 0 */ |
| 286 | SBRI, 8, |
| 287 | Offset(0x000A0014), /* Byte offset to SMBUS register 14h - Bus 0, Device 20, Function 0 */ |
| 288 | SBB1, 32, |
| 289 | Offset(0x000A0078), /* Byte offset to SMBUS register 78h - Bus 0, Device 20, Function 0 */ |
| 290 | ,14, |
| 291 | P92E, 1, /* Port92 decode enable */ |
| 292 | } |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 293 | |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 294 | OperationRegion(BAR5, SystemMemory, STB5, 0x1000) |
| 295 | Field(BAR5, AnyAcc, NoLock, Preserve) |
| 296 | { |
| 297 | /* Port 0 */ |
| 298 | Offset(0x120), /* Port 0 Task file status */ |
| 299 | P0ER, 1, |
| 300 | , 2, |
| 301 | P0DQ, 1, |
| 302 | , 3, |
| 303 | P0BY, 1, |
| 304 | Offset(0x128), /* Port 0 Serial ATA status */ |
| 305 | P0DD, 4, |
| 306 | , 4, |
| 307 | P0IS, 4, |
| 308 | Offset(0x12C), /* Port 0 Serial ATA control */ |
| 309 | P0DI, 4, |
| 310 | Offset(0x130), /* Port 0 Serial ATA error */ |
| 311 | , 16, |
| 312 | P0PR, 1, |
| 313 | |
| 314 | /* Port 1 */ |
| 315 | offset(0x1A0), /* Port 1 Task file status */ |
| 316 | P1ER, 1, |
| 317 | , 2, |
| 318 | P1DQ, 1, |
| 319 | , 3, |
| 320 | P1BY, 1, |
| 321 | Offset(0x1A8), /* Port 1 Serial ATA status */ |
| 322 | P1DD, 4, |
| 323 | , 4, |
| 324 | P1IS, 4, |
| 325 | Offset(0x1AC), /* Port 1 Serial ATA control */ |
| 326 | P1DI, 4, |
| 327 | Offset(0x1B0), /* Port 1 Serial ATA error */ |
| 328 | , 16, |
| 329 | P1PR, 1, |
| 330 | |
| 331 | /* Port 2 */ |
| 332 | Offset(0x220), /* Port 2 Task file status */ |
| 333 | P2ER, 1, |
| 334 | , 2, |
| 335 | P2DQ, 1, |
| 336 | , 3, |
| 337 | P2BY, 1, |
| 338 | Offset(0x228), /* Port 2 Serial ATA status */ |
| 339 | P2DD, 4, |
| 340 | , 4, |
| 341 | P2IS, 4, |
| 342 | Offset(0x22C), /* Port 2 Serial ATA control */ |
| 343 | P2DI, 4, |
| 344 | Offset(0x230), /* Port 2 Serial ATA error */ |
| 345 | , 16, |
| 346 | P2PR, 1, |
| 347 | |
| 348 | /* Port 3 */ |
| 349 | Offset(0x2A0), /* Port 3 Task file status */ |
| 350 | P3ER, 1, |
| 351 | , 2, |
| 352 | P3DQ, 1, |
| 353 | , 3, |
| 354 | P3BY, 1, |
| 355 | Offset(0x2A8), /* Port 3 Serial ATA status */ |
| 356 | P3DD, 4, |
| 357 | , 4, |
| 358 | P3IS, 4, |
| 359 | Offset(0x2AC), /* Port 3 Serial ATA control */ |
| 360 | P3DI, 4, |
| 361 | Offset(0x2B0), /* Port 3 Serial ATA error */ |
| 362 | , 16, |
| 363 | P3PR, 1, |
| 364 | } |
| 365 | } |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 366 | #include "acpi/event.asl" |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 367 | #include "acpi/routing.asl" |
| 368 | #include "acpi/usb.asl" |
| 369 | |
| 370 | /* South Bridge */ |
| 371 | Scope(\_SB) |
| 372 | { |
| 373 | /* Start \_SB scope */ |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 374 | |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 375 | #include "acpi/globutil.asl" |
| 376 | |
| 377 | Device(PWRB) { /* Start Power button device */ |
| 378 | Name(_HID, EISAID("PNP0C0C")) |
| 379 | Name(_UID, 0xAA) |
| 380 | Name(_PRW, Package () {3, 0x04}) /* wake from S1-S4 */ |
| 381 | Name(_STA, 0x0B) /* sata is invisible */ |
| 382 | } |
| 383 | /* _SB.PCI0 */ |
| 384 | /* Note: Only need HID on Primary Bus */ |
| 385 | Device(PCI0) |
| 386 | { |
| 387 | External (MMIO) |
| 388 | External (TOM1) |
| 389 | External (TOM2) |
| 390 | |
| 391 | Name(_HID, EISAID("PNP0A03")) |
| 392 | Name(_ADR, 0x00180000) /* Dev# = BSP Dev#, Func# = 0 */ |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 393 | |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 394 | Method(_BBN, 0) { /* Bus number = 0 */ |
| 395 | Return(0) |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 396 | } |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 397 | |
| 398 | Method(_STA, 0) { |
| 399 | /* DBGO("\\_SB\\PCI0\\_STA\n") */ |
| 400 | Return(0x0B) /* Status is visible */ |
| 401 | } |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 402 | |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 403 | Device (MEMR) |
| 404 | { |
| 405 | Name (_HID, EisaId ("PNP0C02")) |
| 406 | Name (MEM1, ResourceTemplate () |
| 407 | { |
| 408 | Memory32Fixed (ReadWrite, |
| 409 | 0x00000000, // Address Base |
| 410 | 0x00000000, // Address Length |
| 411 | _Y1A) |
| 412 | Memory32Fixed (ReadWrite, |
| 413 | 0x00000000, // Address Base |
| 414 | 0x00000000, // Address Length |
| 415 | _Y1B) |
| 416 | }) |
| 417 | Method (_CRS, 0, NotSerialized) |
| 418 | { |
| 419 | CreateDWordField (MEM1, \_SB.PCI0.MEMR._Y1A._BAS, MB01) |
| 420 | CreateDWordField (MEM1, \_SB.PCI0.MEMR._Y1A._LEN, ML01) |
| 421 | CreateDWordField (MEM1, \_SB.PCI0.MEMR._Y1B._BAS, MB02) |
| 422 | CreateDWordField (MEM1, \_SB.PCI0.MEMR._Y1B._LEN, ML02) |
| 423 | If (PCIF) |
| 424 | { |
Patrick Georgi | c8feedd | 2012-02-16 18:43:25 +0100 | [diff] [blame] | 425 | Store (IO_APIC_ADDR, MB01) |
| 426 | Store (LOCAL_APIC_ADDR, MB02) |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 427 | Store (0x1000, ML01) |
| 428 | Store (0x1000, ML02) |
| 429 | } |
| 430 | |
| 431 | Return (MEM1) |
| 432 | } |
| 433 | } |
| 434 | |
| 435 | Method(_PRT,0) { |
| 436 | If(PCIF){ Return(APR0) } /* APIC mode */ |
| 437 | Return (PR0) /* PIC Mode */ |
| 438 | } /* end _PRT */ |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 439 | |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 440 | OperationRegion (BAR1, PCI_Config, 0x14, 0x04) |
| 441 | Field (BAR1, ByteAcc, NoLock, Preserve) |
| 442 | { |
| 443 | Z009, 32 |
| 444 | } |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 445 | |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 446 | /* Describe the Northbridge devices */ |
| 447 | Device(AMRT) { |
| 448 | Name(_ADR, 0x00000000) |
| 449 | } /* end AMRT */ |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 450 | |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 451 | /* The internal GFX bridge */ |
| 452 | Device(AGPB) { |
| 453 | Name(_ADR, 0x00010000) |
| 454 | Name(_PRW, Package() {0x18, 4}) |
| 455 | Method(_PRT,0) { Return (APR1) } |
| 456 | |
| 457 | Device (VGA) |
| 458 | { |
| 459 | Name (_ADR, 0x00050000) |
| 460 | Method (_DOS, 1) |
| 461 | { |
| 462 | /* Windows 2000 and Windows XP call _DOS to enable/disable |
| 463 | * Display Output Switching during init and while a switch |
| 464 | * is already active |
| 465 | */ |
| 466 | Store (And(Arg0, 7), DSEN) |
| 467 | } |
| 468 | Method (_STA, 0, NotSerialized) |
| 469 | { |
| 470 | Return (0x0F) |
| 471 | } |
| 472 | } |
| 473 | } /* end AGPB */ |
| 474 | |
| 475 | /* The external GFX bridge */ |
| 476 | Device(PBR2) { |
| 477 | Name(_ADR, 0x00020000) |
| 478 | Name(_PRW, Package() {0x18, 4}) |
| 479 | Method(_PRT,0) { |
| 480 | If(PCIF){ Return(APS2) } /* APIC mode */ |
| 481 | Return (PS2) /* PIC Mode */ |
| 482 | } /* end _PRT */ |
| 483 | } /* end PBR2 */ |
| 484 | |
| 485 | /* Dev3 is also an external GFX bridge */ |
| 486 | |
| 487 | Device(PBR4) { |
| 488 | Name(_ADR, 0x00040000) |
| 489 | Name(_PRW, Package() {0x18, 4}) |
| 490 | Method(_PRT,0) { |
| 491 | If(PCIF){ Return(APS4) } /* APIC mode */ |
| 492 | Return (PS4) /* PIC Mode */ |
| 493 | } /* end _PRT */ |
| 494 | } /* end PBR4 */ |
| 495 | |
| 496 | Device(PBR5) { |
| 497 | Name(_ADR, 0x00050000) |
| 498 | Name(_PRW, Package() {0x18, 4}) |
| 499 | Method(_PRT,0) { |
| 500 | If(PCIF){ Return(APS5) } /* APIC mode */ |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 501 | Return (PS5) /* PIC Mode */ |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 502 | } /* end _PRT */ |
| 503 | } /* end PBR5 */ |
| 504 | |
| 505 | Device(PBR6) { |
| 506 | Name(_ADR, 0x00060000) |
| 507 | Name(_PRW, Package() {0x18, 4}) |
| 508 | Method(_PRT,0) { |
| 509 | If(PCIF){ Return(APS6) } /* APIC mode */ |
| 510 | Return (PS6) /* PIC Mode */ |
| 511 | } /* end _PRT */ |
| 512 | } /* end PBR6 */ |
| 513 | |
| 514 | /* The onboard EtherNet chip */ |
| 515 | Device(PBR7) { |
| 516 | Name(_ADR, 0x00070000) |
| 517 | Name(_PRW, Package() {0x18, 4}) |
| 518 | Method(_PRT,0) { |
| 519 | If(PCIF){ Return(APS7) } /* APIC mode */ |
| 520 | Return (PS7) /* PIC Mode */ |
| 521 | } /* end _PRT */ |
| 522 | } /* end PBR7 */ |
| 523 | |
| 524 | /* PCI slot 1 */ |
| 525 | Device(PIBR) { |
| 526 | Name(_ADR, 0x00140004) |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 527 | Name(_PRW, Package() {4, 5}) // Phoenix doeas it so |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 528 | Method(_PRT, 0) { |
| 529 | If(PCIF){ Return(AP2P) } /* APIC Mode */ |
| 530 | Return (PCIB) /* PIC Mode */ |
| 531 | } |
| 532 | } |
| 533 | |
| 534 | /* Describe the Southbridge devices */ |
| 535 | Device(SATA) { |
| 536 | Name(_ADR, 0x00120000) |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 537 | #include "acpi/sata.asl" |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 538 | } /* end SATA */ |
| 539 | |
| 540 | Device(UOH1) { |
| 541 | Name(_ADR, 0x00130000) |
| 542 | Name(_PRW, Package() {0x0B, 3}) |
| 543 | } /* end UOH1 */ |
| 544 | |
| 545 | Device(UOH2) { |
| 546 | Name(_ADR, 0x00130001) |
| 547 | Name(_PRW, Package() {0x0B, 3}) |
| 548 | } /* end UOH2 */ |
| 549 | |
| 550 | Device(UOH3) { |
| 551 | Name(_ADR, 0x00130002) |
| 552 | Name(_PRW, Package() {0x0B, 3}) |
| 553 | } /* end UOH3 */ |
| 554 | |
| 555 | Device(UOH4) { |
| 556 | Name(_ADR, 0x00130003) |
| 557 | Name(_PRW, Package() {0x0B, 3}) |
| 558 | } /* end UOH4 */ |
| 559 | |
| 560 | Device(UOH5) { |
| 561 | Name(_ADR, 0x00130004) |
| 562 | Name(_PRW, Package() {0x0B, 3}) |
| 563 | } /* end UOH5 */ |
| 564 | |
| 565 | Device(UEH1) { |
| 566 | Name(_ADR, 0x00130005) |
| 567 | Name(_PRW, Package() {0x0B, 3}) |
| 568 | } /* end UEH1 */ |
| 569 | |
| 570 | Device(SBUS) { |
| 571 | Name(_ADR, 0x00140000) |
| 572 | } /* end SBUS */ |
| 573 | |
| 574 | /* Primary (and only) IDE channel */ |
| 575 | Device(IDEC) { |
| 576 | Name(_ADR, 0x00140001) |
| 577 | #include "acpi/ide.asl" |
| 578 | } /* end IDEC */ |
| 579 | |
| 580 | Device(AZHD) { |
| 581 | Name(_ADR, 0x00140002) |
| 582 | OperationRegion(AZPD, PCI_Config, 0x00, 0x100) |
| 583 | Field(AZPD, AnyAcc, NoLock, Preserve) { |
| 584 | offset (0x42), |
| 585 | NSDI, 1, |
| 586 | NSDO, 1, |
| 587 | NSEN, 1, |
| 588 | offset (0x44), |
| 589 | IPCR, 4, |
| 590 | offset (0x54), |
| 591 | PWST, 2, |
| 592 | , 6, |
| 593 | PMEB, 1, |
| 594 | , 6, |
| 595 | PMST, 1, |
| 596 | offset (0x62), |
| 597 | MMCR, 1, |
| 598 | offset (0x64), |
| 599 | MMLA, 32, |
| 600 | offset (0x68), |
| 601 | MMHA, 32, |
| 602 | offset (0x6C), |
| 603 | MMDT, 16, |
| 604 | } |
| 605 | |
| 606 | Method(_INI) { |
| 607 | If(LEqual(LINX,1)){ /* If we are running Linux */ |
| 608 | Store(zero, NSEN) |
| 609 | Store(one, NSDO) |
| 610 | Store(one, NSDI) |
| 611 | } |
| 612 | } |
| 613 | } /* end AZHD */ |
| 614 | |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 615 | Device(LPC0) |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 616 | { |
| 617 | Name (_ADR, 0x00140003) |
| 618 | Mutex (PSMX, 0x00) |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 619 | |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 620 | /* PIC IRQ mapping registers, C00h-C01h */ |
| 621 | OperationRegion(PRQM, SystemIO, 0x00000C00, 0x00000002) |
| 622 | Field(PRQM, ByteAcc, NoLock, Preserve) { |
| 623 | PRQI, 0x00000008, |
| 624 | PRQD, 0x00000008, /* Offset: 1h */ |
| 625 | } |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 626 | |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 627 | IndexField(PRQI, PRQD, ByteAcc, NoLock, Preserve) { |
| 628 | PINA, 0x00000008, /* Index 0 */ |
| 629 | PINB, 0x00000008, /* Index 1 */ |
| 630 | PINC, 0x00000008, /* Index 2 */ |
| 631 | PIND, 0x00000008, /* Index 3 */ |
| 632 | SINT, 0x00000008, /* Index 4 */ |
| 633 | Offset(0x09), |
| 634 | PINE, 0x00000008, /* Index 9 */ |
| 635 | PINF, 0x00000008, /* Index A */ |
| 636 | PING, 0x00000008, /* Index B */ |
| 637 | PINH, 0x00000008, /* Index C */ |
| 638 | } |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 639 | |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 640 | Method(CIRQ, 0x00, NotSerialized) |
| 641 | { |
| 642 | Store(0, PINA) |
| 643 | Store(0, PINB) |
| 644 | Store(0, PINC) |
| 645 | Store(0, PIND) |
| 646 | Store(0, SINT) |
| 647 | Store(0, PINE) |
| 648 | Store(0, PINF) |
| 649 | Store(0, PING) |
| 650 | Store(0, PINH) |
| 651 | } |
| 652 | |
| 653 | Name(IRQB, ResourceTemplate(){ |
| 654 | IRQ(Level,ActiveLow,Shared){10,11} |
| 655 | }) |
| 656 | |
| 657 | Name(IRQP, ResourceTemplate(){ |
| 658 | IRQ(Level,ActiveLow,Exclusive){3, 4, 5, 7} |
| 659 | }) |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 660 | |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 661 | Name(PITF, ResourceTemplate(){ |
| 662 | IRQ(Level,ActiveLow,Exclusive){9} |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 663 | }) |
| 664 | |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 665 | Device(INTA) { |
| 666 | Name(_HID, EISAID("PNP0C0F")) |
| 667 | Name(_UID, 1) |
| 668 | |
| 669 | Method(_STA, 0) { |
| 670 | if (PINA) { |
| 671 | Return(0x0B) /* sata is invisible */ |
| 672 | } else { |
| 673 | Return(0x09) /* sata is disabled */ |
| 674 | } |
| 675 | } /* End Method(_SB.INTA._STA) */ |
| 676 | |
| 677 | Method(_DIS ,0) { |
| 678 | Store(0, PINA) |
| 679 | } /* End Method(_SB.INTA._DIS) */ |
| 680 | |
| 681 | Method(_PRS ,0) { |
| 682 | Return(IRQB) // Return(IRQP) |
| 683 | } /* Method(_SB.INTA._PRS) */ |
| 684 | |
| 685 | Method(_CRS ,0) { |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 686 | Store (IRQB, Local0) // |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 687 | CreateWordField(Local0, 0x1, IRQ0) |
| 688 | ShiftLeft(1, PINA, IRQ0) |
| 689 | Return(Local0) |
| 690 | } /* Method(_SB.INTA._CRS) */ |
| 691 | Method(_SRS, 1) { |
| 692 | CreateWordField(ARG0, 1, IRQ0) |
| 693 | /* Use lowest available IRQ */ |
| 694 | FindSetRightBit(IRQ0, Local0) |
| 695 | Decrement (Local0) |
| 696 | Store(Local0, PINA) |
| 697 | } /* End Method(_SB.INTA._SRS) */ |
| 698 | } /* End Device(INTA) */ |
| 699 | |
| 700 | Device(INTB) { |
| 701 | Name(_HID, EISAID("PNP0C0F")) |
| 702 | Name(_UID, 2) |
| 703 | |
| 704 | Method(_STA, 0) { |
| 705 | if (PINB) { |
| 706 | Return(0x0B) /* sata is invisible */ |
| 707 | } else { |
| 708 | Return(0x09) /* sata is disabled */ |
| 709 | } |
| 710 | } /* End Method(_SB.INTB._STA) */ |
| 711 | |
| 712 | Method(_DIS ,0) { |
| 713 | Store(0, PINB) |
| 714 | } /* End Method(_SB.INTB._DIS) */ |
| 715 | |
| 716 | Method(_PRS ,0) { |
| 717 | Return(IRQB) // Return(IRQP) |
| 718 | } /* Method(_SB.INTB._PRS) */ |
| 719 | |
| 720 | Method(_CRS ,0) { |
| 721 | Store (IRQB, Local0) // {10,11} |
| 722 | CreateWordField(Local0, 0x1, IRQ0) |
| 723 | ShiftLeft(1, PINB, IRQ0) |
| 724 | Return(Local0) |
| 725 | } /* Method(_SB.INTB._CRS) */ |
| 726 | |
| 727 | Method(_SRS, 1) { |
| 728 | CreateWordField(ARG0, 1, IRQ0) |
| 729 | /* Use lowest available IRQ */ |
| 730 | FindSetRightBit(IRQ0, Local0) |
| 731 | Decrement(Local0) |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 732 | Store(Local0, PINB) |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 733 | } /* End Method(_SB.INTB._SRS) */ |
| 734 | } /* End Device(INTB) */ |
| 735 | |
| 736 | Device(INTC) { |
| 737 | Name(_HID, EISAID("PNP0C0F")) |
| 738 | Name(_UID, 3) |
| 739 | |
| 740 | Method(_STA, 0) { |
| 741 | if (PINC) { |
| 742 | Return(0x0B) /* sata is invisible */ |
| 743 | } else { |
| 744 | Return(0x09) /* sata is disabled */ |
| 745 | } |
| 746 | } /* End Method(_SB.INTC._STA) */ |
| 747 | |
| 748 | Method(_DIS ,0) { |
| 749 | Store(0, PINC) |
| 750 | } /* End Method(_SB.INTC._DIS) */ |
| 751 | |
| 752 | Method(_PRS ,0) { |
| 753 | Return(IRQB) // Return(IRQP) |
| 754 | } /* Method(_SB.INTC._PRS) */ |
| 755 | |
| 756 | Method(_CRS ,0) { |
| 757 | Store (IRQB, Local0) // {10,11} |
| 758 | CreateWordField(Local0, 0x1, IRQ0) |
| 759 | ShiftLeft(1, PINC, IRQ0) |
| 760 | Return(Local0) |
| 761 | } /* Method(_SB.INTC._CRS) */ |
| 762 | |
| 763 | Method(_SRS, 1) { |
| 764 | CreateWordField(ARG0, 1, IRQ0) |
| 765 | /* Use lowest available IRQ */ |
| 766 | FindSetRightBit(IRQ0, Local0) |
| 767 | Decrement(Local0) |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 768 | Store(Local0, PINC) |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 769 | } /* End Method(_SB.INTC._SRS) */ |
| 770 | } /* End Device(INTC) */ |
| 771 | |
| 772 | Device(INTD) { |
| 773 | Name(_HID, EISAID("PNP0C0F")) |
| 774 | Name(_UID, 4) |
| 775 | |
| 776 | Method(_STA, 0) { |
| 777 | if (PIND) { |
| 778 | Return(0x0B) /* sata is invisible */ |
| 779 | } else { |
| 780 | Return(0x09) /* sata is disabled */ |
| 781 | } |
| 782 | } /* End Method(_SB.INTD._STA) */ |
| 783 | |
| 784 | Method(_DIS ,0) { |
| 785 | Store(0, PIND) |
| 786 | } /* End Method(_SB.INTD._DIS) */ |
| 787 | |
| 788 | Method(_PRS ,0) { |
| 789 | Return(IRQB) // Return(IRQP) |
| 790 | } /* Method(_SB.INTD._PRS) */ |
| 791 | |
| 792 | Method(_CRS ,0) { |
| 793 | Store (IRQB, Local0) // {10,11} |
| 794 | CreateWordField(Local0, 0x1, IRQ0) |
| 795 | ShiftLeft(1, PIND, IRQ0) |
| 796 | Return(Local0) |
| 797 | } /* Method(_SB.INTD._CRS) */ |
| 798 | |
| 799 | Method(_SRS, 1) { |
| 800 | CreateWordField(ARG0, 1, IRQ0) |
| 801 | /* Use lowest available IRQ */ |
| 802 | FindSetRightBit(IRQ0, Local0) |
| 803 | Decrement(Local0) |
| 804 | Store(Local0, PIND) |
| 805 | } /* End Method(_SB.INTD._SRS) */ |
| 806 | } /* End Device(INTD) */ |
| 807 | |
| 808 | Device(INTE) { |
| 809 | Name(_HID, EISAID("PNP0C0F")) |
| 810 | Name(_UID, 5) |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 811 | |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 812 | Method(_STA, 0) { |
| 813 | if (PINE) { |
| 814 | Return(0x0B) /* sata is invisible */ |
| 815 | } else { |
| 816 | Return(0x09) /* sata is disabled */ |
| 817 | } |
| 818 | } /* End Method(_SB.INTE._STA) */ |
| 819 | |
| 820 | Method(_DIS ,0) { |
| 821 | Store(0, PINE) |
| 822 | } /* End Method(_SB.INTE._DIS) */ |
| 823 | |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 824 | Method(_PRS ,0) { |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 825 | Return(IRQB) // Return(IRQP) |
| 826 | } |
| 827 | |
| 828 | Method(_CRS ,0) { |
| 829 | Store (IRQB, Local0) // {10,11} |
| 830 | CreateWordField(Local0, 0x1, IRQ0) |
| 831 | ShiftLeft(1, PINE, IRQ0) |
| 832 | Return(Local0) |
| 833 | } /* Method(_SB.INTE._CRS) */ |
| 834 | |
| 835 | Method(_SRS, 1) { |
| 836 | CreateWordField(ARG0, 1, IRQ0) |
| 837 | /* Use lowest available IRQ */ |
| 838 | FindSetRightBit(IRQ0, Local0) |
| 839 | Decrement(Local0) |
| 840 | Store(Local0, PINE) |
| 841 | } /* End Method(_SB.INTE._SRS) */ |
| 842 | } /* End Device(INTE) */ |
| 843 | |
| 844 | Device(INTF) { |
| 845 | Name(_HID, EISAID("PNP0C0F")) |
| 846 | Name(_UID, 6) |
| 847 | |
| 848 | Method(_STA, 0) { |
| 849 | if (PINF) { |
| 850 | Return(0x0B) /* sata is invisible */ |
| 851 | } else { |
| 852 | Return(0x09) /* sata is disabled */ |
| 853 | } |
| 854 | } /* End Method(_SB.INTF._STA) */ |
| 855 | |
| 856 | Method(_DIS ,0) { |
| 857 | Store(0, PINF) |
| 858 | } /* End Method(_SB.INTF._DIS) */ |
| 859 | |
| 860 | Method(_PRS ,0) { |
| 861 | Return(IRQB) // Return(PITF) |
| 862 | } /* Method(_SB.INTF._PRS) */ |
| 863 | |
| 864 | Method(_CRS ,0) { |
| 865 | Store (IRQB, Local0) // {10,11} |
| 866 | CreateWordField(Local0, 0x1, IRQ0) |
| 867 | ShiftLeft(1, PINF, IRQ0) |
| 868 | Return(Local0) |
| 869 | } /* Method(_SB.INTF._CRS) */ |
| 870 | |
| 871 | Method(_SRS, 1) { |
| 872 | CreateWordField(ARG0, 1, IRQ0) |
| 873 | /* Use lowest available IRQ */ |
| 874 | FindSetRightBit(IRQ0, Local0) |
| 875 | Decrement(Local0) |
| 876 | Store(Local0, PINF) |
| 877 | } /* End Method(_SB.INTF._SRS) */ |
| 878 | } /* End Device(INTF) */ |
| 879 | |
| 880 | Device(INTG) { |
| 881 | Name(_HID, EISAID("PNP0C0F")) |
| 882 | Name(_UID, 7) |
| 883 | |
| 884 | Method(_STA, 0) { |
| 885 | if (PING) { |
| 886 | Return(0x0B) /* sata is invisible */ |
| 887 | } else { |
| 888 | Return(0x09) /* sata is disabled */ |
| 889 | } |
| 890 | } /* End Method(_SB.INTG._STA) */ |
| 891 | |
| 892 | Method(_DIS ,0) { |
| 893 | Store(0, PING) |
| 894 | } /* End Method(_SB.INTG._DIS) */ |
| 895 | |
| 896 | Method(_PRS ,0) { |
| 897 | Return(IRQB) // Return(IRQP) |
| 898 | } /* Method(_SB.INTG._CRS) */ |
| 899 | |
| 900 | Method(_CRS ,0) { |
| 901 | Store (IRQB, Local0) // {10,11} |
| 902 | CreateWordField(Local0, 0x1, IRQ0) |
| 903 | ShiftLeft(1, PING, IRQ0) |
| 904 | Return(Local0) |
| 905 | } /* Method(_SB.INTG._CRS) */ |
| 906 | |
| 907 | Method(_SRS, 1) { |
| 908 | CreateWordField(ARG0, 1, IRQ0) |
| 909 | /* Use lowest available IRQ */ |
| 910 | FindSetRightBit(IRQ0, Local0) |
| 911 | Decrement(Local0) |
| 912 | Store(Local0, PING) |
| 913 | } /* End Method(_SB.INTG._SRS) */ |
| 914 | } /* End Device(INTG) */ |
| 915 | |
| 916 | Device(INTH) { |
| 917 | Name(_HID, EISAID("PNP0C0F")) |
| 918 | Name(_UID, 8) |
| 919 | |
| 920 | Method(_STA, 0) { |
| 921 | if (PINH) { |
| 922 | Return(0x0B) /* sata is invisible */ |
| 923 | } else { |
| 924 | Return(0x09) /* sata is disabled */ |
| 925 | } |
| 926 | } /* End Method(_SB.INTH._STA) */ |
| 927 | |
| 928 | Method(_DIS ,0) { |
| 929 | Store(0, PINH) |
| 930 | } /* End Method(_SB.INTH._DIS) */ |
| 931 | |
| 932 | Method(_PRS ,0) { |
| 933 | Return(IRQB) // Return(IRQP) |
| 934 | } /* Method(_SB.INTH._CRS) */ |
| 935 | |
| 936 | Method(_CRS ,0) { |
| 937 | Store (IRQB, Local0) // {10,11} |
| 938 | CreateWordField(Local0, 0x1, IRQ0) |
| 939 | ShiftLeft(1, PINH, IRQ0) |
| 940 | Return(Local0) |
| 941 | } /* Method(_SB.INTH._CRS) */ |
| 942 | |
| 943 | Method(_SRS, 1) { |
| 944 | CreateWordField(ARG0, 1, IRQ0) |
| 945 | /* Use lowest available IRQ */ |
| 946 | FindSetRightBit(IRQ0, Local0) |
| 947 | Decrement(Local0) |
| 948 | Store(Local0, PINH) |
| 949 | } /* End Method(_SB.INTH._SRS) */ |
| 950 | } /* End Device(INTH) */ |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 951 | |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 952 | |
| 953 | /* Real Time Clock Device */ |
| 954 | Device(RTC0) { |
| 955 | Name(_HID, EISAID("PNP0B00")) /* AT Real Time Clock (not PIIX4 compatible)*/ |
| 956 | Name(_CRS, ResourceTemplate() { |
| 957 | IRQ (Edge, ActiveHigh, Exclusive, ) {8} |
| 958 | IO(Decode16,0x0070, 0x0070, 1, 2) |
| 959 | /* IO(Decode16,0x0070, 0x0070, 0, 4) */ |
| 960 | }) |
| 961 | } /* End Device(_SB.PCI0.LpcIsaBr.RTC0) */ |
| 962 | |
| 963 | Device(TMR) { /* Timer */ |
| 964 | Name(_HID,EISAID("PNP0100")) /* System Timer */ |
| 965 | Name(_CRS, ResourceTemplate() { |
| 966 | IRQ (Edge, ActiveHigh, Exclusive, ) {0} |
| 967 | IO(Decode16, 0x0040, 0x0040, 1, 4) |
| 968 | /* IO(Decode16, 0x0048, 0x0048, 0, 4) */ |
| 969 | }) |
| 970 | } /* End Device(_SB.PCI0.LpcIsaBr.TMR) */ |
| 971 | |
| 972 | Device(SPKR) { /* Speaker */ |
| 973 | Name(_HID,EISAID("PNP0800")) /* AT style speaker */ |
| 974 | Name(_CRS, ResourceTemplate() { |
| 975 | IO(Decode16, 0x0061, 0x0061, 1, 1) |
| 976 | }) |
| 977 | } /* End Device(_SB.PCI0.LpcIsaBr.SPKR) */ |
| 978 | |
| 979 | Device(PIC) { |
| 980 | Name(_HID,EISAID("PNP0000")) /* AT Interrupt Controller */ |
| 981 | Name(_CRS, ResourceTemplate() { |
| 982 | IRQ (Edge, ActiveHigh, Exclusive, ) {2} |
| 983 | IO(Decode16,0x0020, 0x0020, 1, 2) |
| 984 | IO(Decode16,0x00A0, 0x00A0, 0, 2) |
| 985 | /* IO(Decode16, 0x00D0, 0x00D0, 0x10, 0x02) */ |
| 986 | /* IO(Decode16, 0x04D0, 0x04D0, 0x10, 0x02) */ |
| 987 | }) |
| 988 | } /* End Device(_SB.PCI0.LpcIsaBr.PIC) */ |
| 989 | |
| 990 | Device(MAD) { /* 8257 DMA */ |
| 991 | Name(_HID,EISAID("PNP0200")) /* Hardware Device ID */ |
| 992 | Name(_CRS, ResourceTemplate() { |
| 993 | DMA(Compatibility,NotBusMaster,Transfer8_16){4} |
| 994 | IO(Decode16, 0x0000, 0x0000, 0x10, 0x10) |
| 995 | IO(Decode16, 0x0081, 0x0081, 0x01, 0x03) |
| 996 | IO(Decode16, 0x0087, 0x0087, 0x01, 0x01) |
| 997 | IO(Decode16, 0x0089, 0x0089, 0x01, 0x03) |
| 998 | IO(Decode16, 0x008F, 0x008F, 0x01, 0x01) |
| 999 | IO(Decode16, 0x00C0, 0x00C0, 0x10, 0x20) |
| 1000 | }) /* End Name(_SB.PCI0.LpcIsaBr.MAD._CRS) */ |
| 1001 | } /* End Device(_SB.PCI0.LpcIsaBr.MAD) */ |
| 1002 | |
| 1003 | Device(COPR) { |
| 1004 | Name(_HID,EISAID("PNP0C04")) /* Math Coprocessor */ |
| 1005 | Name(_CRS, ResourceTemplate() { |
| 1006 | IO(Decode16, 0x00F0, 0x00F0, 1, 0x10) |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 1007 | IRQ (Edge, ActiveHigh, Exclusive, ) {13} |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 1008 | }) |
| 1009 | } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */ |
| 1010 | |
| 1011 | Device(HPET) { |
| 1012 | Name(_HID,EISAID("PNP0103")) |
| 1013 | Name(CRS,ResourceTemplate() { |
| 1014 | Memory32Fixed(ReadOnly,0xFED00000, 0x00000400, HPT) /* 1kb reserved space */ |
| 1015 | }) |
| 1016 | Method(_STA, 0) { |
| 1017 | Return(0x0F) /* sata is visible */ |
| 1018 | } |
| 1019 | Method(_CRS, 0) { |
| 1020 | CreateDwordField(CRS, ^HPT._BAS, HPBA) |
| 1021 | Store(HPBA, HPBA) |
| 1022 | Return(CRS) |
| 1023 | } |
| 1024 | } |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 1025 | |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 1026 | Device (KBC0) |
| 1027 | { |
| 1028 | Name (_HID, EisaId ("PNP0303")) |
| 1029 | Name (_CRS, ResourceTemplate () |
| 1030 | { |
| 1031 | IO (Decode16, |
| 1032 | 0x0060, // Range Minimum |
| 1033 | 0x0060, // Range Maximum |
| 1034 | 0x01, // Alignment |
| 1035 | 0x01, // Length |
| 1036 | ) |
| 1037 | IO (Decode16, |
| 1038 | 0x0064, // Range Minimum |
| 1039 | 0x0064, // Range Maximum |
| 1040 | 0x01, // Alignment |
| 1041 | 0x01, // Length |
| 1042 | ) |
| 1043 | IRQ (Edge, ActiveHigh, Exclusive, ) {1} |
| 1044 | }) |
| 1045 | } |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 1046 | |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 1047 | Device (MSE0) |
| 1048 | { |
| 1049 | Name (_HID, EisaId ("PNP0F13")) |
| 1050 | Name (_CRS, ResourceTemplate () |
| 1051 | { |
| 1052 | IRQ (Edge, ActiveHigh, Exclusive, ) {12} |
| 1053 | }) |
| 1054 | } |
| 1055 | } /* end LPC0 */ |
| 1056 | |
| 1057 | Device(ACAD) { |
| 1058 | Name(_ADR, 0x00140005) |
| 1059 | Name (_PRW, Package (0x02) |
| 1060 | { |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 1061 | 0x0C, |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 1062 | 0x04 |
| 1063 | }) |
| 1064 | } /* end Ac97audio */ |
| 1065 | |
| 1066 | Device(ACMD) { |
| 1067 | Name(_ADR, 0x00140006) |
| 1068 | Name (_PRW, Package (0x02) |
| 1069 | { |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 1070 | 0x0C, |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 1071 | 0x04 |
| 1072 | }) |
| 1073 | } /* end Ac97modem */ |
| 1074 | |
| 1075 | /* ITE IT8712F Support */ |
| 1076 | OperationRegion (IOID, SystemIO, 0x2E, 0x02) /* sometimes it is 0x4E */ |
| 1077 | Field (IOID, ByteAcc, NoLock, Preserve) |
| 1078 | { |
| 1079 | SIOI, 8, SIOD, 8 /* 0x2E and 0x2F */ |
| 1080 | } |
| 1081 | |
| 1082 | IndexField (SIOI, SIOD, ByteAcc, NoLock, Preserve) |
| 1083 | { |
| 1084 | Offset (0x07), |
| 1085 | LDN, 8, /* Logical Device Number */ |
| 1086 | Offset (0x20), |
| 1087 | CID1, 8, /* Chip ID Byte 1, 0x87 */ |
| 1088 | CID2, 8, /* Chip ID Byte 2, 0x12 */ |
| 1089 | Offset (0x30), |
| 1090 | ACTR, 8, /* Function activate */ |
| 1091 | Offset (0xF0), |
| 1092 | APC0, 8, /* APC/PME Event Enable Register */ |
| 1093 | APC1, 8, /* APC/PME Status Register */ |
| 1094 | APC2, 8, /* APC/PME Control Register 1 */ |
| 1095 | APC3, 8, /* Environment Controller Special Configuration Register */ |
| 1096 | APC4, 8 /* APC/PME Control Register 2 */ |
| 1097 | } |
| 1098 | |
| 1099 | /* Enter the IT8712F MB PnP Mode */ |
| 1100 | Method (EPNP) |
| 1101 | { |
| 1102 | Store(0x87, SIOI) |
| 1103 | Store(0x01, SIOI) |
| 1104 | Store(0x55, SIOI) |
| 1105 | Store(0x55, SIOI) /* IT8712F magic number */ |
| 1106 | } |
| 1107 | /* Exit the IT8712F MB PnP Mode */ |
| 1108 | Method (XPNP) |
| 1109 | { |
| 1110 | Store (0x02, SIOI) |
| 1111 | Store (0x02, SIOD) |
| 1112 | } |
| 1113 | |
| 1114 | /* |
| 1115 | * Keyboard PME is routed to SB600 Gevent3. We can wake |
| 1116 | * up the system by pressing the key. |
| 1117 | */ |
| 1118 | Method (SIOS, 1) |
| 1119 | { |
| 1120 | /* We only enable KBD PME for S5. */ |
| 1121 | If (LLess (Arg0, 0x05)) |
| 1122 | { |
| 1123 | EPNP() |
| 1124 | /* DBGO("IT8712F\n") */ |
| 1125 | |
| 1126 | Store (0x4, LDN) |
| 1127 | Store (One, ACTR) /* Enable EC */ |
| 1128 | /* |
| 1129 | Store (0x4, LDN) |
| 1130 | Store (0x04, APC4) |
| 1131 | */ /* falling edge. which mode? Not sure. */ |
| 1132 | |
| 1133 | Store (0x4, LDN) |
| 1134 | Store (0x08, APC1) /* clear PME status, Use 0x18 for mouse & KBD */ |
| 1135 | Store (0x4, LDN) |
| 1136 | Store (0x08, APC0) /* enable PME, Use 0x18 for mouse & KBD */ |
| 1137 | |
| 1138 | XPNP() |
| 1139 | } |
| 1140 | } |
| 1141 | Method (SIOW, 1) |
| 1142 | { |
| 1143 | EPNP() |
| 1144 | Store (0x4, LDN) |
| 1145 | Store (Zero, APC0) /* disable keyboard PME */ |
| 1146 | Store (0x4, LDN) |
| 1147 | Store (0xFF, APC1) /* clear keyboard PME status */ |
| 1148 | XPNP() |
| 1149 | } |
| 1150 | |
| 1151 | /* ############################################################################################### */ |
| 1152 | Name(CRES, ResourceTemplate() { |
| 1153 | IO(Decode16, 0x0CF8, 0x0CF8, 1, 8) |
| 1154 | |
| 1155 | WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, |
| 1156 | 0x0000, /* address granularity */ |
| 1157 | 0x0000, /* range minimum */ |
| 1158 | 0x0CF7, /* range maximum */ |
| 1159 | 0x0000, /* translation */ |
| 1160 | 0x0CF8 /* length */ |
| 1161 | ) |
| 1162 | |
| 1163 | WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, |
| 1164 | 0x0000, /* address granularity */ |
| 1165 | 0x0D00, /* range minimum */ |
| 1166 | 0xFFFF, /* range maximum */ |
| 1167 | 0x0000, /* translation */ |
| 1168 | 0xF300 /* length */ |
| 1169 | ) |
| 1170 | |
| 1171 | Memory32Fixed(READONLY, 0x000A0000, 0x00020000, VGAM) /* VGA memory space */ |
| 1172 | Memory32Fixed(READONLY, 0x000C0000, 0x00020000, EMM1) /* Assume C0000-E0000 empty */ |
| 1173 | Memory32Fixed(READONLY, 0x000E0000, 0x00020000, RDBS) /* BIOS ROM area */ |
| 1174 | |
| 1175 | /* DRAM Memory from 1MB to TopMem */ |
| 1176 | DWORDMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, 0, 0, 0, 0x00, 1, ,, EMM2) |
| 1177 | WORDIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, 0x00, 0x0D00, 0xffff, 0x00, 0xf300) |
| 1178 | }) /* End Name(_SB.PCI0.CRES) */ |
| 1179 | |
| 1180 | Method(_CRS, 0) { |
| 1181 | |
| 1182 | /* DBGO("\\_SB\\PCI0\\_CRS\n") */ |
| 1183 | |
| 1184 | CreateDWordField(CRES, ^EMM1._BAS, EM1B) |
| 1185 | CreateDWordField(CRES, ^EMM1._LEN, EM1L) |
| 1186 | |
| 1187 | CreateDWordField(CRES, ^EMM2._MIN, EM2B) |
| 1188 | CreateDWordField(CRES, ^EMM2._MAX, EM2E) |
| 1189 | CreateDWordField(CRES, ^EMM2._LEN, EM2L) |
Patrick Georgi | 472efa6 | 2012-02-16 20:44:20 +0100 | [diff] [blame] | 1190 | |
Nico Huber | 8ecec21 | 2013-04-10 19:14:41 +0200 | [diff] [blame] | 1191 | Store(TOM1, EM2B) |
| 1192 | Subtract(IOLM, 1, EM2E) |
| 1193 | Subtract(IOLM, TOM1, EM2L) |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 1194 | |
| 1195 | If(LGreater(LOMH, 0xC0000)){ |
| 1196 | Store(0xC0000, EM1B) /* Hole above C0000 and below E0000 */ |
| 1197 | Subtract(LOMH, 0xC0000, EM1L) /* subtract start, assumes allocation from C0000 going up */ |
| 1198 | } |
| 1199 | |
| 1200 | Return(CRES) /* note to change the Name buffer */ |
| 1201 | } |
| 1202 | /* ########################################################################################## */ |
| 1203 | } /* End Device(PCI0) */ |
| 1204 | } /* End \_SB scope */ |
| 1205 | |
| 1206 | Scope(\_SI) { |
| 1207 | Method(_SST, 1) { |
| 1208 | /* DBGO("\\_SI\\_SST\n") */ |
| 1209 | /* DBGO(" New Indicator state: ") */ |
| 1210 | /* DBGO(Arg0) */ |
| 1211 | /* DBGO("\n") */ |
| 1212 | } |
| 1213 | } /* End Scope SI */ |
| 1214 | |
Tobias Diedrich | a4d179a | 2015-06-21 18:58:30 +0200 | [diff] [blame^] | 1215 | #include <southbridge/amd/cimx/sb800/acpi/smbus.asl> |
Josef Kellermann | bfa7ee5 | 2011-05-11 07:47:43 +0000 | [diff] [blame] | 1216 | #include "acpi/thermal.asl" |
| 1217 | } |