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