Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2011 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. |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | /* DefinitionBlock Statement */ |
| 17 | DefinitionBlock ( |
| 18 | "DSDT.AML", /* Output filename */ |
| 19 | "DSDT", /* Signature */ |
| 20 | 0x02, /* DSDT Revision, needs to be 2 for 64bit */ |
| 21 | "AMD ", /* OEMID */ |
| 22 | "COREBOOT", /* TABLE ID */ |
| 23 | 0x00010001 /* OEM Revision */ |
| 24 | ) |
| 25 | { /* Start of ASL file */ |
| 26 | /* #include <arch/i386/acpi/debug.asl> */ /* Include global debug methods if needed */ |
| 27 | |
| 28 | /* Data to be patched by the BIOS during POST */ |
| 29 | /* FIXME the patching is not done yet! */ |
| 30 | /* Memory related values */ |
| 31 | Name(LOMH, 0x0) /* Start of unused memory in C0000-E0000 range */ |
| 32 | Name(PBAD, 0x0) /* Address of BIOS area (If TOM2 != 0, Addr >> 16) */ |
| 33 | Name(PBLN, 0x0) /* Length of BIOS area */ |
| 34 | |
| 35 | Name(PCBA, CONFIG_MMCONF_BASE_ADDRESS) /* Base address of PCIe config space */ |
| 36 | Name(HPBA, 0xFED00000) /* Base address of HPET table */ |
| 37 | |
| 38 | Name(SSFG, 0x0D) /* S1 support: bit 0, S2 Support: bit 1, etc. S0 & S5 assumed */ |
| 39 | |
| 40 | /* USB overcurrent mapping pins. */ |
| 41 | Name(UOM0, 0) |
| 42 | Name(UOM1, 2) |
| 43 | Name(UOM2, 0) |
| 44 | Name(UOM3, 7) |
| 45 | Name(UOM4, 2) |
| 46 | Name(UOM5, 2) |
| 47 | Name(UOM6, 6) |
| 48 | Name(UOM7, 2) |
| 49 | Name(UOM8, 6) |
| 50 | Name(UOM9, 6) |
| 51 | |
| 52 | /* Some global data */ |
Edward O'Callaghan | f7d8f09 | 2014-05-31 13:57:52 +1000 | [diff] [blame] | 53 | Name(OSVR, 3) /* Assume nothing. WinXp = 1, Vista = 2, Linux = 3, WinCE = 4 */ |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 54 | Name(OSV, Ones) /* Assume nothing */ |
| 55 | Name(PMOD, One) /* Assume APIC */ |
| 56 | |
| 57 | /* |
| 58 | * Processor Object |
| 59 | * |
| 60 | */ |
| 61 | Scope (\_PR) { /* define processor scope */ |
| 62 | Processor( |
| 63 | C000, /* name space name, align with BLDCFG_PROCESSOR_SCOPE_NAME[01] */ |
| 64 | 0, /* Unique number for this processor */ |
| 65 | 0x810, /* PBLK system I/O address !hardcoded! */ |
| 66 | 0x06 /* PBLKLEN for boot processor */ |
| 67 | ) { |
| 68 | } |
| 69 | |
| 70 | Processor( |
| 71 | C001, /* name space name */ |
| 72 | 1, /* Unique number for this processor */ |
| 73 | 0x810, /* PBLK system I/O address !hardcoded! */ |
| 74 | 0x06 /* PBLKLEN for boot processor */ |
| 75 | ) { |
| 76 | } |
| 77 | Processor( |
| 78 | C002, /* name space name */ |
| 79 | 2, /* Unique number for this processor */ |
| 80 | 0x810, /* PBLK system I/O address !hardcoded! */ |
| 81 | 0x06 /* PBLKLEN for boot processor */ |
| 82 | ) { |
| 83 | } |
| 84 | Processor( |
| 85 | C003, /* name space name */ |
| 86 | 3, /* Unique number for this processor */ |
| 87 | 0x810, /* PBLK system I/O address !hardcoded! */ |
| 88 | 0x06 /* PBLKLEN for boot processor */ |
| 89 | ) { |
| 90 | } |
| 91 | } /* End _PR scope */ |
| 92 | |
| 93 | /* PIC IRQ mapping registers, C00h-C01h. */ |
| 94 | OperationRegion(PRQM, SystemIO, 0x00000C00, 0x00000002) |
| 95 | Field(PRQM, ByteAcc, NoLock, Preserve) { |
| 96 | PRQI, 0x00000008, |
| 97 | PRQD, 0x00000008, /* Offset: 1h */ |
| 98 | } |
| 99 | IndexField(PRQI, PRQD, ByteAcc, NoLock, Preserve) { |
| 100 | PIRA, 0x00000008, /* Index 0 */ |
| 101 | PIRB, 0x00000008, /* Index 1 */ |
| 102 | PIRC, 0x00000008, /* Index 2 */ |
| 103 | PIRD, 0x00000008, /* Index 3 */ |
| 104 | PIRE, 0x00000008, /* Index 4 */ |
| 105 | PIRF, 0x00000008, /* Index 5 */ |
| 106 | PIRG, 0x00000008, /* Index 6 */ |
| 107 | PIRH, 0x00000008, /* Index 7 */ |
| 108 | } |
| 109 | |
| 110 | /* PCI Error control register */ |
| 111 | OperationRegion(PERC, SystemIO, 0x00000C14, 0x00000001) |
| 112 | Field(PERC, ByteAcc, NoLock, Preserve) { |
| 113 | SENS, 0x00000001, |
| 114 | PENS, 0x00000001, |
| 115 | SENE, 0x00000001, |
| 116 | PENE, 0x00000001, |
| 117 | } |
| 118 | |
| 119 | /* Client Management index/data registers */ |
| 120 | OperationRegion(CMT, SystemIO, 0x00000C50, 0x00000002) |
| 121 | Field(CMT, ByteAcc, NoLock, Preserve) { |
| 122 | CMTI, 8, |
| 123 | /* Client Management Data register */ |
| 124 | G64E, 1, |
| 125 | G64O, 1, |
| 126 | G32O, 2, |
| 127 | , 2, |
| 128 | GPSL, 2, |
| 129 | } |
| 130 | |
| 131 | /* GPM Port register */ |
| 132 | OperationRegion(GPT, SystemIO, 0x00000C52, 0x00000001) |
| 133 | Field(GPT, ByteAcc, NoLock, Preserve) { |
| 134 | GPB0,1, |
| 135 | GPB1,1, |
| 136 | GPB2,1, |
| 137 | GPB3,1, |
| 138 | GPB4,1, |
| 139 | GPB5,1, |
| 140 | GPB6,1, |
| 141 | GPB7,1, |
| 142 | } |
| 143 | |
| 144 | /* Flash ROM program enable register */ |
| 145 | OperationRegion(FRE, SystemIO, 0x00000C6F, 0x00000001) |
| 146 | Field(FRE, ByteAcc, NoLock, Preserve) { |
| 147 | , 0x00000006, |
| 148 | FLRE, 0x00000001, |
| 149 | } |
| 150 | |
| 151 | /* PM2 index/data registers */ |
| 152 | OperationRegion(PM2R, SystemIO, 0x00000CD0, 0x00000002) |
| 153 | Field(PM2R, ByteAcc, NoLock, Preserve) { |
| 154 | PM2I, 0x00000008, |
| 155 | PM2D, 0x00000008, |
| 156 | } |
| 157 | |
| 158 | /* Power Management I/O registers, TODO:PMIO is quite different in SB800. */ |
| 159 | OperationRegion(PIOR, SystemIO, 0x00000CD6, 0x00000002) |
| 160 | Field(PIOR, ByteAcc, NoLock, Preserve) { |
| 161 | PIOI, 0x00000008, |
| 162 | PIOD, 0x00000008, |
| 163 | } |
| 164 | IndexField (PIOI, PIOD, ByteAcc, NoLock, Preserve) { |
| 165 | Offset(0x00), /* MiscControl */ |
| 166 | , 1, |
| 167 | T1EE, 1, |
| 168 | T2EE, 1, |
| 169 | Offset(0x01), /* MiscStatus */ |
| 170 | , 1, |
| 171 | T1E, 1, |
| 172 | T2E, 1, |
| 173 | Offset(0x04), /* SmiWakeUpEventEnable3 */ |
| 174 | , 7, |
| 175 | SSEN, 1, |
| 176 | Offset(0x07), /* SmiWakeUpEventStatus3 */ |
| 177 | , 7, |
| 178 | CSSM, 1, |
| 179 | Offset(0x10), /* AcpiEnable */ |
| 180 | , 6, |
| 181 | PWDE, 1, |
| 182 | Offset(0x1C), /* ProgramIoEnable */ |
| 183 | , 3, |
| 184 | MKME, 1, |
| 185 | IO3E, 1, |
| 186 | IO2E, 1, |
| 187 | IO1E, 1, |
| 188 | IO0E, 1, |
| 189 | Offset(0x1D), /* IOMonitorStatus */ |
| 190 | , 3, |
| 191 | MKMS, 1, |
| 192 | IO3S, 1, |
| 193 | IO2S, 1, |
| 194 | IO1S, 1, |
| 195 | IO0S,1, |
| 196 | Offset(0x20), /* AcpiPmEvtBlk. TODO: should be 0x60 */ |
| 197 | APEB, 16, |
| 198 | Offset(0x36), /* GEvtLevelConfig */ |
| 199 | , 6, |
| 200 | ELC6, 1, |
| 201 | ELC7, 1, |
| 202 | Offset(0x37), /* GPMLevelConfig0 */ |
| 203 | , 3, |
| 204 | PLC0, 1, |
| 205 | PLC1, 1, |
| 206 | PLC2, 1, |
| 207 | PLC3, 1, |
| 208 | PLC8, 1, |
| 209 | Offset(0x38), /* GPMLevelConfig1 */ |
| 210 | , 1, |
| 211 | PLC4, 1, |
| 212 | PLC5, 1, |
| 213 | , 1, |
| 214 | PLC6, 1, |
| 215 | PLC7, 1, |
| 216 | Offset(0x3B), /* PMEStatus1 */ |
| 217 | GP0S, 1, |
| 218 | GM4S, 1, |
| 219 | GM5S, 1, |
| 220 | APS, 1, |
| 221 | GM6S, 1, |
| 222 | GM7S, 1, |
| 223 | GP2S, 1, |
| 224 | STSS, 1, |
| 225 | Offset(0x55), /* SoftPciRst */ |
| 226 | SPRE, 1, |
| 227 | , 1, |
| 228 | , 1, |
| 229 | PNAT, 1, |
| 230 | PWMK, 1, |
| 231 | PWNS, 1, |
| 232 | |
| 233 | /* Offset(0x61), */ /* Options_1 */ |
| 234 | /* ,7, */ |
| 235 | /* R617,1, */ |
| 236 | |
| 237 | Offset(0x65), /* UsbPMControl */ |
| 238 | , 4, |
| 239 | URRE, 1, |
| 240 | Offset(0x68), /* MiscEnable68 */ |
| 241 | , 3, |
| 242 | TMTE, 1, |
| 243 | , 1, |
| 244 | Offset(0x92), /* GEVENTIN */ |
| 245 | , 7, |
| 246 | E7IS, 1, |
| 247 | Offset(0x96), /* GPM98IN */ |
| 248 | G8IS, 1, |
| 249 | G9IS, 1, |
| 250 | Offset(0x9A), /* EnhanceControl */ |
| 251 | ,7, |
| 252 | HPDE, 1, |
| 253 | Offset(0xA8), /* PIO7654Enable */ |
| 254 | IO4E, 1, |
| 255 | IO5E, 1, |
| 256 | IO6E, 1, |
| 257 | IO7E, 1, |
| 258 | Offset(0xA9), /* PIO7654Status */ |
| 259 | IO4S, 1, |
| 260 | IO5S, 1, |
| 261 | IO6S, 1, |
| 262 | IO7S, 1, |
| 263 | } |
| 264 | |
| 265 | /* PM1 Event Block |
| 266 | * First word is PM1_Status, Second word is PM1_Enable |
| 267 | */ |
| 268 | OperationRegion(P1EB, SystemIO, APEB, 0x04) |
| 269 | Field(P1EB, ByteAcc, NoLock, Preserve) { |
| 270 | TMST, 1, |
| 271 | , 3, |
| 272 | BMST, 1, |
| 273 | GBST, 1, |
| 274 | Offset(0x01), |
| 275 | PBST, 1, |
| 276 | , 1, |
| 277 | RTST, 1, |
| 278 | , 3, |
| 279 | PWST, 1, |
| 280 | SPWS, 1, |
| 281 | Offset(0x02), |
| 282 | TMEN, 1, |
| 283 | , 4, |
| 284 | GBEN, 1, |
| 285 | Offset(0x03), |
| 286 | PBEN, 1, |
| 287 | , 1, |
| 288 | RTEN, 1, |
| 289 | , 3, |
| 290 | PWDA, 1, |
| 291 | } |
| 292 | |
| 293 | Scope(\_SB) { |
| 294 | /* PCIe Configuration Space for 16 busses */ |
| 295 | OperationRegion(PCFG, SystemMemory, PCBA, 0x01000000) /* Each bus consumes 1MB */ |
| 296 | Field(PCFG, ByteAcc, NoLock, Preserve) { |
| 297 | /* Byte offsets are computed using the following technique: |
| 298 | * ((bus number + 1) * ((device number * 8) * 4096)) + register offset |
| 299 | * The 8 comes from 8 functions per device, and 4096 bytes per function config space |
| 300 | */ |
| 301 | Offset(0x00088024), /* Byte offset to SATA register 24h - Bus 0, Device 17, Function 0 */ |
| 302 | STB5, 32, |
| 303 | Offset(0x00098042), /* Byte offset to OHCI0 register 42h - Bus 0, Device 19, Function 0 */ |
| 304 | PT0D, 1, |
| 305 | PT1D, 1, |
| 306 | PT2D, 1, |
| 307 | PT3D, 1, |
| 308 | PT4D, 1, |
| 309 | PT5D, 1, |
| 310 | PT6D, 1, |
| 311 | PT7D, 1, |
| 312 | PT8D, 1, |
| 313 | PT9D, 1, |
| 314 | Offset(0x000A0004), /* Byte offset to SMBUS register 4h - Bus 0, Device 20, Function 0 */ |
| 315 | SBIE, 1, |
| 316 | SBME, 1, |
| 317 | Offset(0x000A0008), /* Byte offset to SMBUS register 8h - Bus 0, Device 20, Function 0 */ |
| 318 | SBRI, 8, |
| 319 | Offset(0x000A0014), /* Byte offset to SMBUS register 14h - Bus 0, Device 20, Function 0 */ |
| 320 | SBB1, 32, |
| 321 | Offset(0x000A0078), /* Byte offset to SMBUS register 78h - Bus 0, Device 20, Function 0 */ |
| 322 | ,14, |
| 323 | P92E, 1, /* Port92 decode enable */ |
| 324 | } |
| 325 | |
| 326 | OperationRegion(SB5, SystemMemory, STB5, 0x1000) |
| 327 | Field(SB5, AnyAcc, NoLock, Preserve){ |
| 328 | /* Port 0 */ |
| 329 | Offset(0x120), /* Port 0 Task file status */ |
| 330 | P0ER, 1, |
| 331 | , 2, |
| 332 | P0DQ, 1, |
| 333 | , 3, |
| 334 | P0BY, 1, |
| 335 | Offset(0x128), /* Port 0 Serial ATA status */ |
| 336 | P0DD, 4, |
| 337 | , 4, |
| 338 | P0IS, 4, |
| 339 | Offset(0x12C), /* Port 0 Serial ATA control */ |
| 340 | P0DI, 4, |
| 341 | Offset(0x130), /* Port 0 Serial ATA error */ |
| 342 | , 16, |
| 343 | P0PR, 1, |
| 344 | |
| 345 | /* Port 1 */ |
| 346 | offset(0x1A0), /* Port 1 Task file status */ |
| 347 | P1ER, 1, |
| 348 | , 2, |
| 349 | P1DQ, 1, |
| 350 | , 3, |
| 351 | P1BY, 1, |
| 352 | Offset(0x1A8), /* Port 1 Serial ATA status */ |
| 353 | P1DD, 4, |
| 354 | , 4, |
| 355 | P1IS, 4, |
| 356 | Offset(0x1AC), /* Port 1 Serial ATA control */ |
| 357 | P1DI, 4, |
| 358 | Offset(0x1B0), /* Port 1 Serial ATA error */ |
| 359 | , 16, |
| 360 | P1PR, 1, |
| 361 | |
| 362 | /* Port 2 */ |
| 363 | Offset(0x220), /* Port 2 Task file status */ |
| 364 | P2ER, 1, |
| 365 | , 2, |
| 366 | P2DQ, 1, |
| 367 | , 3, |
| 368 | P2BY, 1, |
| 369 | Offset(0x228), /* Port 2 Serial ATA status */ |
| 370 | P2DD, 4, |
| 371 | , 4, |
| 372 | P2IS, 4, |
| 373 | Offset(0x22C), /* Port 2 Serial ATA control */ |
| 374 | P2DI, 4, |
| 375 | Offset(0x230), /* Port 2 Serial ATA error */ |
| 376 | , 16, |
| 377 | P2PR, 1, |
| 378 | |
| 379 | /* Port 3 */ |
| 380 | Offset(0x2A0), /* Port 3 Task file status */ |
| 381 | P3ER, 1, |
| 382 | , 2, |
| 383 | P3DQ, 1, |
| 384 | , 3, |
| 385 | P3BY, 1, |
| 386 | Offset(0x2A8), /* Port 3 Serial ATA status */ |
| 387 | P3DD, 4, |
| 388 | , 4, |
| 389 | P3IS, 4, |
| 390 | Offset(0x2AC), /* Port 3 Serial ATA control */ |
| 391 | P3DI, 4, |
| 392 | Offset(0x2B0), /* Port 3 Serial ATA error */ |
| 393 | , 16, |
| 394 | P3PR, 1, |
| 395 | } |
| 396 | } |
| 397 | |
| 398 | |
| 399 | #include "acpi/routing.asl" |
| 400 | |
| 401 | Scope(\_SB) { |
| 402 | |
Edward O'Callaghan | f7d8f09 | 2014-05-31 13:57:52 +1000 | [diff] [blame] | 403 | Method(OSFL, 0){ |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 404 | |
Edward O'Callaghan | f7d8f09 | 2014-05-31 13:57:52 +1000 | [diff] [blame] | 405 | if(LNotEqual(OSVR, Ones)) {Return(OSVR)} /* OS version was already detected */ |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 406 | |
Martin Roth | 91d9cbc | 2015-12-08 15:04:23 -0700 | [diff] [blame] | 407 | if(CondRefOf(\_OSI)) |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 408 | { |
Edward O'Callaghan | f7d8f09 | 2014-05-31 13:57:52 +1000 | [diff] [blame] | 409 | Store(1, OSVR) /* Assume some form of XP */ |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 410 | if (\_OSI("Windows 2006")) /* Vista */ |
| 411 | { |
Edward O'Callaghan | f7d8f09 | 2014-05-31 13:57:52 +1000 | [diff] [blame] | 412 | Store(2, OSVR) |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 413 | } |
| 414 | } else { |
| 415 | If(WCMP(\_OS,"Linux")) { |
Edward O'Callaghan | f7d8f09 | 2014-05-31 13:57:52 +1000 | [diff] [blame] | 416 | Store(3, OSVR) /* Linux */ |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 417 | } Else { |
Edward O'Callaghan | f7d8f09 | 2014-05-31 13:57:52 +1000 | [diff] [blame] | 418 | Store(4, OSVR) /* Gotta be WinCE */ |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 419 | } |
| 420 | } |
Edward O'Callaghan | f7d8f09 | 2014-05-31 13:57:52 +1000 | [diff] [blame] | 421 | Return(OSVR) |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 422 | } |
| 423 | |
| 424 | Method(_PIC, 0x01, NotSerialized) |
| 425 | { |
| 426 | If (Arg0) |
| 427 | { |
| 428 | \_SB.CIRQ() |
| 429 | } |
| 430 | Store(Arg0, PMOD) |
| 431 | } |
| 432 | Method(CIRQ, 0x00, NotSerialized){ |
| 433 | Store(0, PIRA) |
| 434 | Store(0, PIRB) |
| 435 | Store(0, PIRC) |
| 436 | Store(0, PIRD) |
| 437 | Store(0, PIRE) |
| 438 | Store(0, PIRF) |
| 439 | Store(0, PIRG) |
| 440 | Store(0, PIRH) |
| 441 | } |
| 442 | |
| 443 | Name(IRQB, ResourceTemplate(){ |
| 444 | IRQ(Level,ActiveLow,Shared){15} |
| 445 | }) |
| 446 | |
| 447 | Name(IRQP, ResourceTemplate(){ |
| 448 | IRQ(Level,ActiveLow,Exclusive){3, 4, 5, 7, 10, 11, 12, 15} |
| 449 | }) |
| 450 | |
| 451 | Name(PITF, ResourceTemplate(){ |
| 452 | IRQ(Level,ActiveLow,Exclusive){9} |
| 453 | }) |
| 454 | |
| 455 | Device(INTA) { |
| 456 | Name(_HID, EISAID("PNP0C0F")) |
| 457 | Name(_UID, 1) |
| 458 | |
| 459 | Method(_STA, 0) { |
| 460 | if (PIRA) { |
| 461 | Return(0x0B) /* sata is invisible */ |
| 462 | } else { |
| 463 | Return(0x09) /* sata is disabled */ |
| 464 | } |
| 465 | } /* End Method(_SB.INTA._STA) */ |
| 466 | |
| 467 | Method(_DIS ,0) { |
| 468 | /* DBGO("\\_SB\\LNKA\\_DIS\n") */ |
| 469 | Store(0, PIRA) |
| 470 | } /* End Method(_SB.INTA._DIS) */ |
| 471 | |
| 472 | Method(_PRS ,0) { |
| 473 | /* DBGO("\\_SB\\LNKA\\_PRS\n") */ |
| 474 | Return(IRQP) |
| 475 | } /* Method(_SB.INTA._PRS) */ |
| 476 | |
| 477 | Method(_CRS ,0) { |
| 478 | /* DBGO("\\_SB\\LNKA\\_CRS\n") */ |
| 479 | CreateWordField(IRQB, 0x1, IRQN) |
| 480 | ShiftLeft(1, PIRA, IRQN) |
| 481 | Return(IRQB) |
| 482 | } /* Method(_SB.INTA._CRS) */ |
| 483 | |
| 484 | Method(_SRS, 1) { |
| 485 | /* DBGO("\\_SB\\LNKA\\_CRS\n") */ |
| 486 | CreateWordField(ARG0, 1, IRQM) |
| 487 | |
| 488 | /* Use lowest available IRQ */ |
| 489 | FindSetRightBit(IRQM, Local0) |
| 490 | if (Local0) { |
| 491 | Decrement(Local0) |
| 492 | } |
| 493 | Store(Local0, PIRA) |
| 494 | } /* End Method(_SB.INTA._SRS) */ |
| 495 | } /* End Device(INTA) */ |
| 496 | |
| 497 | Device(INTB) { |
| 498 | Name(_HID, EISAID("PNP0C0F")) |
| 499 | Name(_UID, 2) |
| 500 | |
| 501 | Method(_STA, 0) { |
| 502 | if (PIRB) { |
| 503 | Return(0x0B) /* sata is invisible */ |
| 504 | } else { |
| 505 | Return(0x09) /* sata is disabled */ |
| 506 | } |
| 507 | } /* End Method(_SB.INTB._STA) */ |
| 508 | |
| 509 | Method(_DIS ,0) { |
| 510 | /* DBGO("\\_SB\\LNKB\\_DIS\n") */ |
| 511 | Store(0, PIRB) |
| 512 | } /* End Method(_SB.INTB._DIS) */ |
| 513 | |
| 514 | Method(_PRS ,0) { |
| 515 | /* DBGO("\\_SB\\LNKB\\_PRS\n") */ |
| 516 | Return(IRQP) |
| 517 | } /* Method(_SB.INTB._PRS) */ |
| 518 | |
| 519 | Method(_CRS ,0) { |
| 520 | /* DBGO("\\_SB\\LNKB\\_CRS\n") */ |
| 521 | CreateWordField(IRQB, 0x1, IRQN) |
| 522 | ShiftLeft(1, PIRB, IRQN) |
| 523 | Return(IRQB) |
| 524 | } /* Method(_SB.INTB._CRS) */ |
| 525 | |
| 526 | Method(_SRS, 1) { |
| 527 | /* DBGO("\\_SB\\LNKB\\_CRS\n") */ |
| 528 | CreateWordField(ARG0, 1, IRQM) |
| 529 | |
| 530 | /* Use lowest available IRQ */ |
| 531 | FindSetRightBit(IRQM, Local0) |
| 532 | if (Local0) { |
| 533 | Decrement(Local0) |
| 534 | } |
| 535 | Store(Local0, PIRB) |
| 536 | } /* End Method(_SB.INTB._SRS) */ |
| 537 | } /* End Device(INTB) */ |
| 538 | |
| 539 | Device(INTC) { |
| 540 | Name(_HID, EISAID("PNP0C0F")) |
| 541 | Name(_UID, 3) |
| 542 | |
| 543 | Method(_STA, 0) { |
| 544 | if (PIRC) { |
| 545 | Return(0x0B) /* sata is invisible */ |
| 546 | } else { |
| 547 | Return(0x09) /* sata is disabled */ |
| 548 | } |
| 549 | } /* End Method(_SB.INTC._STA) */ |
| 550 | |
| 551 | Method(_DIS ,0) { |
| 552 | /* DBGO("\\_SB\\LNKC\\_DIS\n") */ |
| 553 | Store(0, PIRC) |
| 554 | } /* End Method(_SB.INTC._DIS) */ |
| 555 | |
| 556 | Method(_PRS ,0) { |
| 557 | /* DBGO("\\_SB\\LNKC\\_PRS\n") */ |
| 558 | Return(IRQP) |
| 559 | } /* Method(_SB.INTC._PRS) */ |
| 560 | |
| 561 | Method(_CRS ,0) { |
| 562 | /* DBGO("\\_SB\\LNKC\\_CRS\n") */ |
| 563 | CreateWordField(IRQB, 0x1, IRQN) |
| 564 | ShiftLeft(1, PIRC, IRQN) |
| 565 | Return(IRQB) |
| 566 | } /* Method(_SB.INTC._CRS) */ |
| 567 | |
| 568 | Method(_SRS, 1) { |
| 569 | /* DBGO("\\_SB\\LNKC\\_CRS\n") */ |
| 570 | CreateWordField(ARG0, 1, IRQM) |
| 571 | |
| 572 | /* Use lowest available IRQ */ |
| 573 | FindSetRightBit(IRQM, Local0) |
| 574 | if (Local0) { |
| 575 | Decrement(Local0) |
| 576 | } |
| 577 | Store(Local0, PIRC) |
| 578 | } /* End Method(_SB.INTC._SRS) */ |
| 579 | } /* End Device(INTC) */ |
| 580 | |
| 581 | Device(INTD) { |
| 582 | Name(_HID, EISAID("PNP0C0F")) |
| 583 | Name(_UID, 4) |
| 584 | |
| 585 | Method(_STA, 0) { |
| 586 | if (PIRD) { |
| 587 | Return(0x0B) /* sata is invisible */ |
| 588 | } else { |
| 589 | Return(0x09) /* sata is disabled */ |
| 590 | } |
| 591 | } /* End Method(_SB.INTD._STA) */ |
| 592 | |
| 593 | Method(_DIS ,0) { |
| 594 | /* DBGO("\\_SB\\LNKD\\_DIS\n") */ |
| 595 | Store(0, PIRD) |
| 596 | } /* End Method(_SB.INTD._DIS) */ |
| 597 | |
| 598 | Method(_PRS ,0) { |
| 599 | /* DBGO("\\_SB\\LNKD\\_PRS\n") */ |
| 600 | Return(IRQP) |
| 601 | } /* Method(_SB.INTD._PRS) */ |
| 602 | |
| 603 | Method(_CRS ,0) { |
| 604 | /* DBGO("\\_SB\\LNKD\\_CRS\n") */ |
| 605 | CreateWordField(IRQB, 0x1, IRQN) |
| 606 | ShiftLeft(1, PIRD, IRQN) |
| 607 | Return(IRQB) |
| 608 | } /* Method(_SB.INTD._CRS) */ |
| 609 | |
| 610 | Method(_SRS, 1) { |
| 611 | /* DBGO("\\_SB\\LNKD\\_CRS\n") */ |
| 612 | CreateWordField(ARG0, 1, IRQM) |
| 613 | |
| 614 | /* Use lowest available IRQ */ |
| 615 | FindSetRightBit(IRQM, Local0) |
| 616 | if (Local0) { |
| 617 | Decrement(Local0) |
| 618 | } |
| 619 | Store(Local0, PIRD) |
| 620 | } /* End Method(_SB.INTD._SRS) */ |
| 621 | } /* End Device(INTD) */ |
| 622 | |
| 623 | Device(INTE) { |
| 624 | Name(_HID, EISAID("PNP0C0F")) |
| 625 | Name(_UID, 5) |
| 626 | |
| 627 | Method(_STA, 0) { |
| 628 | if (PIRE) { |
| 629 | Return(0x0B) /* sata is invisible */ |
| 630 | } else { |
| 631 | Return(0x09) /* sata is disabled */ |
| 632 | } |
| 633 | } /* End Method(_SB.INTE._STA) */ |
| 634 | |
| 635 | Method(_DIS ,0) { |
| 636 | /* DBGO("\\_SB\\LNKE\\_DIS\n") */ |
| 637 | Store(0, PIRE) |
| 638 | } /* End Method(_SB.INTE._DIS) */ |
| 639 | |
| 640 | Method(_PRS ,0) { |
| 641 | /* DBGO("\\_SB\\LNKE\\_PRS\n") */ |
| 642 | Return(IRQP) |
| 643 | } /* Method(_SB.INTE._PRS) */ |
| 644 | |
| 645 | Method(_CRS ,0) { |
| 646 | /* DBGO("\\_SB\\LNKE\\_CRS\n") */ |
| 647 | CreateWordField(IRQB, 0x1, IRQN) |
| 648 | ShiftLeft(1, PIRE, IRQN) |
| 649 | Return(IRQB) |
| 650 | } /* Method(_SB.INTE._CRS) */ |
| 651 | |
| 652 | Method(_SRS, 1) { |
| 653 | /* DBGO("\\_SB\\LNKE\\_CRS\n") */ |
| 654 | CreateWordField(ARG0, 1, IRQM) |
| 655 | |
| 656 | /* Use lowest available IRQ */ |
| 657 | FindSetRightBit(IRQM, Local0) |
| 658 | if (Local0) { |
| 659 | Decrement(Local0) |
| 660 | } |
| 661 | Store(Local0, PIRE) |
| 662 | } /* End Method(_SB.INTE._SRS) */ |
| 663 | } /* End Device(INTE) */ |
| 664 | |
| 665 | Device(INTF) { |
| 666 | Name(_HID, EISAID("PNP0C0F")) |
| 667 | Name(_UID, 6) |
| 668 | |
| 669 | Method(_STA, 0) { |
| 670 | if (PIRF) { |
| 671 | Return(0x0B) /* sata is invisible */ |
| 672 | } else { |
| 673 | Return(0x09) /* sata is disabled */ |
| 674 | } |
| 675 | } /* End Method(_SB.INTF._STA) */ |
| 676 | |
| 677 | Method(_DIS ,0) { |
| 678 | /* DBGO("\\_SB\\LNKF\\_DIS\n") */ |
| 679 | Store(0, PIRF) |
| 680 | } /* End Method(_SB.INTF._DIS) */ |
| 681 | |
| 682 | Method(_PRS ,0) { |
| 683 | /* DBGO("\\_SB\\LNKF\\_PRS\n") */ |
| 684 | Return(PITF) |
| 685 | } /* Method(_SB.INTF._PRS) */ |
| 686 | |
| 687 | Method(_CRS ,0) { |
| 688 | /* DBGO("\\_SB\\LNKF\\_CRS\n") */ |
| 689 | CreateWordField(IRQB, 0x1, IRQN) |
| 690 | ShiftLeft(1, PIRF, IRQN) |
| 691 | Return(IRQB) |
| 692 | } /* Method(_SB.INTF._CRS) */ |
| 693 | |
| 694 | Method(_SRS, 1) { |
| 695 | /* DBGO("\\_SB\\LNKF\\_CRS\n") */ |
| 696 | CreateWordField(ARG0, 1, IRQM) |
| 697 | |
| 698 | /* Use lowest available IRQ */ |
| 699 | FindSetRightBit(IRQM, Local0) |
| 700 | if (Local0) { |
| 701 | Decrement(Local0) |
| 702 | } |
| 703 | Store(Local0, PIRF) |
| 704 | } /* End Method(_SB.INTF._SRS) */ |
| 705 | } /* End Device(INTF) */ |
| 706 | |
| 707 | Device(INTG) { |
| 708 | Name(_HID, EISAID("PNP0C0F")) |
| 709 | Name(_UID, 7) |
| 710 | |
| 711 | Method(_STA, 0) { |
| 712 | if (PIRG) { |
| 713 | Return(0x0B) /* sata is invisible */ |
| 714 | } else { |
| 715 | Return(0x09) /* sata is disabled */ |
| 716 | } |
| 717 | } /* End Method(_SB.INTG._STA) */ |
| 718 | |
| 719 | Method(_DIS ,0) { |
| 720 | /* DBGO("\\_SB\\LNKG\\_DIS\n") */ |
| 721 | Store(0, PIRG) |
| 722 | } /* End Method(_SB.INTG._DIS) */ |
| 723 | |
| 724 | Method(_PRS ,0) { |
| 725 | /* DBGO("\\_SB\\LNKG\\_PRS\n") */ |
| 726 | Return(IRQP) |
| 727 | } /* Method(_SB.INTG._CRS) */ |
| 728 | |
| 729 | Method(_CRS ,0) { |
| 730 | /* DBGO("\\_SB\\LNKG\\_CRS\n") */ |
| 731 | CreateWordField(IRQB, 0x1, IRQN) |
| 732 | ShiftLeft(1, PIRG, IRQN) |
| 733 | Return(IRQB) |
| 734 | } /* Method(_SB.INTG._CRS) */ |
| 735 | |
| 736 | Method(_SRS, 1) { |
| 737 | /* DBGO("\\_SB\\LNKG\\_CRS\n") */ |
| 738 | CreateWordField(ARG0, 1, IRQM) |
| 739 | |
| 740 | /* Use lowest available IRQ */ |
| 741 | FindSetRightBit(IRQM, Local0) |
| 742 | if (Local0) { |
| 743 | Decrement(Local0) |
| 744 | } |
| 745 | Store(Local0, PIRG) |
| 746 | } /* End Method(_SB.INTG._SRS) */ |
| 747 | } /* End Device(INTG) */ |
| 748 | |
| 749 | Device(INTH) { |
| 750 | Name(_HID, EISAID("PNP0C0F")) |
| 751 | Name(_UID, 8) |
| 752 | |
| 753 | Method(_STA, 0) { |
| 754 | if (PIRH) { |
| 755 | Return(0x0B) /* sata is invisible */ |
| 756 | } else { |
| 757 | Return(0x09) /* sata is disabled */ |
| 758 | } |
| 759 | } /* End Method(_SB.INTH._STA) */ |
| 760 | |
| 761 | Method(_DIS ,0) { |
| 762 | /* DBGO("\\_SB\\LNKH\\_DIS\n") */ |
| 763 | Store(0, PIRH) |
| 764 | } /* End Method(_SB.INTH._DIS) */ |
| 765 | |
| 766 | Method(_PRS ,0) { |
| 767 | /* DBGO("\\_SB\\LNKH\\_PRS\n") */ |
| 768 | Return(IRQP) |
| 769 | } /* Method(_SB.INTH._CRS) */ |
| 770 | |
| 771 | Method(_CRS ,0) { |
| 772 | /* DBGO("\\_SB\\LNKH\\_CRS\n") */ |
| 773 | CreateWordField(IRQB, 0x1, IRQN) |
| 774 | ShiftLeft(1, PIRH, IRQN) |
| 775 | Return(IRQB) |
| 776 | } /* Method(_SB.INTH._CRS) */ |
| 777 | |
| 778 | Method(_SRS, 1) { |
| 779 | /* DBGO("\\_SB\\LNKH\\_CRS\n") */ |
| 780 | CreateWordField(ARG0, 1, IRQM) |
| 781 | |
| 782 | /* Use lowest available IRQ */ |
| 783 | FindSetRightBit(IRQM, Local0) |
| 784 | if (Local0) { |
| 785 | Decrement(Local0) |
| 786 | } |
| 787 | Store(Local0, PIRH) |
| 788 | } /* End Method(_SB.INTH._SRS) */ |
| 789 | } /* End Device(INTH) */ |
| 790 | |
| 791 | } /* End Scope(_SB) */ |
| 792 | |
| 793 | |
| 794 | /* Supported sleep states: */ |
| 795 | Name(\_S0, Package () {0x00, 0x00, 0x00, 0x00} ) /* (S0) - working state */ |
| 796 | |
| 797 | If (LAnd(SSFG, 0x01)) { |
| 798 | Name(\_S1, Package () {0x01, 0x01, 0x00, 0x00} ) /* (S1) - sleeping w/CPU context */ |
| 799 | } |
| 800 | If (LAnd(SSFG, 0x02)) { |
| 801 | Name(\_S2, Package () {0x02, 0x02, 0x00, 0x00} ) /* (S2) - "light" Suspend to RAM */ |
| 802 | } |
| 803 | If (LAnd(SSFG, 0x04)) { |
| 804 | Name(\_S3, Package () {0x03, 0x03, 0x00, 0x00} ) /* (S3) - Suspend to RAM */ |
| 805 | } |
| 806 | If (LAnd(SSFG, 0x08)) { |
| 807 | Name(\_S4, Package () {0x04, 0x04, 0x00, 0x00} ) /* (S4) - Suspend to Disk */ |
| 808 | } |
| 809 | |
| 810 | Name(\_S5, Package () {0x05, 0x05, 0x00, 0x00} ) /* (S5) - Soft Off */ |
| 811 | |
| 812 | Name(\_SB.CSPS ,0) /* Current Sleep State (S0, S1, S2, S3, S4, S5) */ |
| 813 | Name(CSMS, 0) /* Current System State */ |
| 814 | |
| 815 | /* Wake status package */ |
| 816 | Name(WKST,Package(){Zero, Zero}) |
| 817 | |
| 818 | /* |
| 819 | * \_PTS - Prepare to Sleep method |
| 820 | * |
| 821 | * Entry: |
| 822 | * Arg0=The value of the sleeping state S1=1, S2=2, etc |
| 823 | * |
| 824 | * Exit: |
| 825 | * -none- |
| 826 | * |
| 827 | * The _PTS control method is executed at the beginning of the sleep process |
| 828 | * for S1-S5. The sleeping value is passed to the _PTS control method. This |
| 829 | * control method may be executed a relatively long time before entering the |
| 830 | * sleep state and the OS may abort the operation without notification to |
| 831 | * the ACPI driver. This method cannot modify the configuration or power |
| 832 | * state of any device in the system. |
| 833 | */ |
| 834 | Method(\_PTS, 1) { |
| 835 | /* DBGO("\\_PTS\n") */ |
| 836 | /* DBGO("From S0 to S") */ |
| 837 | /* DBGO(Arg0) */ |
| 838 | /* DBGO("\n") */ |
| 839 | |
| 840 | /* Don't allow PCIRST# to reset USB */ |
| 841 | if (LEqual(Arg0,3)){ |
| 842 | Store(0,URRE) |
| 843 | } |
| 844 | |
| 845 | /* Clear sleep SMI status flag and enable sleep SMI trap. */ |
| 846 | /*Store(One, CSSM) |
| 847 | Store(One, SSEN)*/ |
| 848 | |
| 849 | /* On older chips, clear PciExpWakeDisEn */ |
| 850 | /*if (LLessEqual(\_SB.SBRI, 0x13)) { |
| 851 | * Store(0,\_SB.PWDE) |
| 852 | *} |
| 853 | */ |
| 854 | |
| 855 | /* Clear wake status structure. */ |
| 856 | Store(0, Index(WKST,0)) |
| 857 | Store(0, Index(WKST,1)) |
| 858 | } /* End Method(\_PTS) */ |
| 859 | |
| 860 | /* |
| 861 | * The following method results in a "not a valid reserved NameSeg" |
| 862 | * warning so I have commented it out for the duration. It isn't |
| 863 | * used, so it could be removed. |
| 864 | * |
| 865 | * |
| 866 | * \_GTS OEM Going To Sleep method |
| 867 | * |
| 868 | * Entry: |
| 869 | * Arg0=The value of the sleeping state S1=1, S2=2 |
| 870 | * |
| 871 | * Exit: |
| 872 | * -none- |
| 873 | * |
| 874 | * Method(\_GTS, 1) { |
| 875 | * DBGO("\\_GTS\n") |
| 876 | * DBGO("From S0 to S") |
| 877 | * DBGO(Arg0) |
| 878 | * DBGO("\n") |
| 879 | * } |
| 880 | */ |
| 881 | |
| 882 | /* |
| 883 | * \_BFS OEM Back From Sleep method |
| 884 | * |
| 885 | * Entry: |
| 886 | * Arg0=The value of the sleeping state S1=1, S2=2 |
| 887 | * |
| 888 | * Exit: |
| 889 | * -none- |
| 890 | */ |
| 891 | Method(\_BFS, 1) { |
| 892 | /* DBGO("\\_BFS\n") */ |
| 893 | /* DBGO("From S") */ |
| 894 | /* DBGO(Arg0) */ |
| 895 | /* DBGO(" to S0\n") */ |
| 896 | } |
| 897 | |
| 898 | /* |
| 899 | * \_WAK System Wake method |
| 900 | * |
| 901 | * Entry: |
| 902 | * Arg0=The value of the sleeping state S1=1, S2=2 |
| 903 | * |
| 904 | * Exit: |
| 905 | * Return package of 2 DWords |
| 906 | * Dword 1 - Status |
| 907 | * 0x00000000 wake succeeded |
| 908 | * 0x00000001 Wake was signaled but failed due to lack of power |
| 909 | * 0x00000002 Wake was signaled but failed due to thermal condition |
| 910 | * Dword 2 - Power Supply state |
| 911 | * if non-zero the effective S-state the power supply entered |
| 912 | */ |
| 913 | Method(\_WAK, 1) { |
| 914 | /* DBGO("\\_WAK\n") */ |
| 915 | /* DBGO("From S") */ |
| 916 | /* DBGO(Arg0) */ |
| 917 | /* DBGO(" to S0\n") */ |
| 918 | |
| 919 | /* Re-enable HPET */ |
| 920 | Store(1,HPDE) |
| 921 | |
| 922 | /* Restore PCIRST# so it resets USB */ |
| 923 | if (LEqual(Arg0,3)){ |
| 924 | Store(1,URRE) |
| 925 | } |
| 926 | |
| 927 | /* Arbitrarily clear PciExpWakeStatus */ |
Martin Roth | f77516c | 2015-12-08 14:00:07 -0700 | [diff] [blame] | 928 | Store(PWST, Local1) |
| 929 | Store(Local1, PWST) |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 930 | |
| 931 | /* if(DeRefOf(Index(WKST,0))) { |
| 932 | * Store(0, Index(WKST,1)) |
| 933 | * } else { |
| 934 | * Store(Arg0, Index(WKST,1)) |
| 935 | * } |
| 936 | */ |
| 937 | Return(WKST) |
| 938 | } /* End Method(\_WAK) */ |
| 939 | |
| 940 | Scope(\_GPE) { /* Start Scope GPE */ |
| 941 | /* General event 0 */ |
| 942 | /* Method(_L00) { |
| 943 | * DBGO("\\_GPE\\_L00\n") |
| 944 | * } |
| 945 | */ |
| 946 | |
| 947 | /* General event 1 */ |
| 948 | /* Method(_L01) { |
| 949 | * DBGO("\\_GPE\\_L00\n") |
| 950 | * } |
| 951 | */ |
| 952 | |
| 953 | /* General event 2 */ |
| 954 | /* Method(_L02) { |
| 955 | * DBGO("\\_GPE\\_L00\n") |
| 956 | * } |
| 957 | */ |
| 958 | |
| 959 | /* General event 3 */ |
| 960 | Method(_L03) { |
| 961 | /* DBGO("\\_GPE\\_L00\n") */ |
| 962 | Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */ |
| 963 | } |
| 964 | |
| 965 | /* General event 4 */ |
| 966 | /* Method(_L04) { |
| 967 | * DBGO("\\_GPE\\_L00\n") |
| 968 | * } |
| 969 | */ |
| 970 | |
| 971 | /* General event 5 */ |
| 972 | /* Method(_L05) { |
| 973 | * DBGO("\\_GPE\\_L00\n") |
| 974 | * } |
| 975 | */ |
| 976 | |
| 977 | /* General event 6 - Used for GPM6, moved to USB.asl */ |
| 978 | /* Method(_L06) { |
| 979 | * DBGO("\\_GPE\\_L00\n") |
| 980 | * } |
| 981 | */ |
| 982 | |
| 983 | /* General event 7 - Used for GPM7, moved to USB.asl */ |
| 984 | /* Method(_L07) { |
| 985 | * DBGO("\\_GPE\\_L07\n") |
| 986 | * } |
| 987 | */ |
| 988 | |
| 989 | /* Legacy PM event */ |
| 990 | Method(_L08) { |
| 991 | /* DBGO("\\_GPE\\_L08\n") */ |
| 992 | } |
| 993 | |
| 994 | /* Temp warning (TWarn) event */ |
| 995 | Method(_L09) { |
| 996 | /* DBGO("\\_GPE\\_L09\n") */ |
| 997 | /* Notify (\_TZ.TZ00, 0x80) */ |
| 998 | } |
| 999 | |
| 1000 | /* Reserved */ |
| 1001 | /* Method(_L0A) { |
| 1002 | * DBGO("\\_GPE\\_L0A\n") |
| 1003 | * } |
| 1004 | */ |
| 1005 | |
| 1006 | /* USB controller PME# */ |
| 1007 | Method(_L0B) { |
| 1008 | /* DBGO("\\_GPE\\_L0B\n") */ |
| 1009 | Notify(\_SB.PCI0.UOH1, 0x02) /* NOTIFY_DEVICE_WAKE */ |
| 1010 | Notify(\_SB.PCI0.UOH2, 0x02) /* NOTIFY_DEVICE_WAKE */ |
| 1011 | Notify(\_SB.PCI0.UOH3, 0x02) /* NOTIFY_DEVICE_WAKE */ |
| 1012 | Notify(\_SB.PCI0.UOH4, 0x02) /* NOTIFY_DEVICE_WAKE */ |
| 1013 | Notify(\_SB.PCI0.UOH5, 0x02) /* NOTIFY_DEVICE_WAKE */ |
| 1014 | Notify(\_SB.PCI0.UOH6, 0x02) /* NOTIFY_DEVICE_WAKE */ |
| 1015 | Notify(\_SB.PCI0.UEH1, 0x02) /* NOTIFY_DEVICE_WAKE */ |
| 1016 | Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */ |
| 1017 | } |
| 1018 | |
| 1019 | /* AC97 controller PME# */ |
| 1020 | /* Method(_L0C) { |
| 1021 | * DBGO("\\_GPE\\_L0C\n") |
| 1022 | * } |
| 1023 | */ |
| 1024 | |
| 1025 | /* OtherTherm PME# */ |
| 1026 | /* Method(_L0D) { |
| 1027 | * DBGO("\\_GPE\\_L0D\n") |
| 1028 | * } |
| 1029 | */ |
| 1030 | |
| 1031 | /* GPM9 SCI event - Moved to USB.asl */ |
| 1032 | /* Method(_L0E) { |
| 1033 | * DBGO("\\_GPE\\_L0E\n") |
| 1034 | * } |
| 1035 | */ |
| 1036 | |
| 1037 | /* PCIe HotPlug event */ |
| 1038 | /* Method(_L0F) { |
| 1039 | * DBGO("\\_GPE\\_L0F\n") |
| 1040 | * } |
| 1041 | */ |
| 1042 | |
| 1043 | /* ExtEvent0 SCI event */ |
| 1044 | Method(_L10) { |
| 1045 | /* DBGO("\\_GPE\\_L10\n") */ |
| 1046 | } |
| 1047 | |
| 1048 | |
| 1049 | /* ExtEvent1 SCI event */ |
| 1050 | Method(_L11) { |
| 1051 | /* DBGO("\\_GPE\\_L11\n") */ |
| 1052 | } |
| 1053 | |
| 1054 | /* PCIe PME# event */ |
| 1055 | /* Method(_L12) { |
| 1056 | * DBGO("\\_GPE\\_L12\n") |
| 1057 | * } |
| 1058 | */ |
| 1059 | |
| 1060 | /* GPM0 SCI event - Moved to USB.asl */ |
| 1061 | /* Method(_L13) { |
| 1062 | * DBGO("\\_GPE\\_L13\n") |
| 1063 | * } |
| 1064 | */ |
| 1065 | |
| 1066 | /* GPM1 SCI event - Moved to USB.asl */ |
| 1067 | /* Method(_L14) { |
| 1068 | * DBGO("\\_GPE\\_L14\n") |
| 1069 | * } |
| 1070 | */ |
| 1071 | |
| 1072 | /* GPM2 SCI event - Moved to USB.asl */ |
| 1073 | /* Method(_L15) { |
| 1074 | * DBGO("\\_GPE\\_L15\n") |
| 1075 | * } |
| 1076 | */ |
| 1077 | |
| 1078 | /* GPM3 SCI event - Moved to USB.asl */ |
| 1079 | /* Method(_L16) { |
| 1080 | * DBGO("\\_GPE\\_L16\n") |
| 1081 | * } |
| 1082 | */ |
| 1083 | |
| 1084 | /* GPM8 SCI event - Moved to USB.asl */ |
| 1085 | /* Method(_L17) { |
| 1086 | * DBGO("\\_GPE\\_L17\n") |
| 1087 | * } |
| 1088 | */ |
| 1089 | |
| 1090 | /* GPIO0 or GEvent8 event */ |
| 1091 | Method(_L18) { |
| 1092 | /* DBGO("\\_GPE\\_L18\n") */ |
| 1093 | Notify(\_SB.PCI0.PBR2, 0x02) /* NOTIFY_DEVICE_WAKE */ |
| 1094 | Notify(\_SB.PCI0.PBR4, 0x02) /* NOTIFY_DEVICE_WAKE */ |
| 1095 | Notify(\_SB.PCI0.PBR5, 0x02) /* NOTIFY_DEVICE_WAKE */ |
| 1096 | Notify(\_SB.PCI0.PBR6, 0x02) /* NOTIFY_DEVICE_WAKE */ |
| 1097 | Notify(\_SB.PCI0.PBR7, 0x02) /* NOTIFY_DEVICE_WAKE */ |
| 1098 | Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */ |
| 1099 | } |
| 1100 | |
| 1101 | /* GPM4 SCI event - Moved to USB.asl */ |
| 1102 | /* Method(_L19) { |
| 1103 | * DBGO("\\_GPE\\_L19\n") |
| 1104 | * } |
| 1105 | */ |
| 1106 | |
| 1107 | /* GPM5 SCI event - Moved to USB.asl */ |
| 1108 | /* Method(_L1A) { |
| 1109 | * DBGO("\\_GPE\\_L1A\n") |
| 1110 | * } |
| 1111 | */ |
| 1112 | |
| 1113 | /* Azalia SCI event */ |
| 1114 | Method(_L1B) { |
| 1115 | /* DBGO("\\_GPE\\_L1B\n") */ |
| 1116 | Notify(\_SB.PCI0.AZHD, 0x02) /* NOTIFY_DEVICE_WAKE */ |
| 1117 | Notify(\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */ |
| 1118 | } |
| 1119 | |
| 1120 | /* GPM6 SCI event - Reassigned to _L06 */ |
| 1121 | /* Method(_L1C) { |
| 1122 | * DBGO("\\_GPE\\_L1C\n") |
| 1123 | * } |
| 1124 | */ |
| 1125 | |
| 1126 | /* GPM7 SCI event - Reassigned to _L07 */ |
| 1127 | /* Method(_L1D) { |
| 1128 | * DBGO("\\_GPE\\_L1D\n") |
| 1129 | * } |
| 1130 | */ |
| 1131 | |
| 1132 | /* GPIO2 or GPIO66 SCI event */ |
| 1133 | /* Method(_L1E) { |
| 1134 | * DBGO("\\_GPE\\_L1E\n") |
| 1135 | * } |
| 1136 | */ |
| 1137 | |
| 1138 | /* SATA SCI event - Moved to sata.asl */ |
| 1139 | /* Method(_L1F) { |
| 1140 | * DBGO("\\_GPE\\_L1F\n") |
| 1141 | * } |
| 1142 | */ |
| 1143 | |
| 1144 | } /* End Scope GPE */ |
| 1145 | |
| 1146 | #include "acpi/usb.asl" |
| 1147 | |
| 1148 | /* South Bridge */ |
| 1149 | Scope(\_SB) { /* Start \_SB scope */ |
| 1150 | #include <arch/x86/acpi/globutil.asl> /* global utility methods expected within the \_SB scope */ |
| 1151 | |
| 1152 | /* _SB.PCI0 */ |
| 1153 | /* Note: Only need HID on Primary Bus */ |
| 1154 | Device(PCI0) { |
| 1155 | External (TOM1) |
| 1156 | External (TOM2) |
Mike Loptien | 061c664 | 2013-03-15 13:24:53 -0600 | [diff] [blame] | 1157 | Name(_HID, EISAID("PNP0A08")) /* PCI Express Root Bridge */ |
| 1158 | Name(_CID, EISAID("PNP0A03")) /* PCI Root Bridge */ |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 1159 | Name(_ADR, 0x00180000) /* Dev# = BSP Dev#, Func# = 0 */ |
Mike Loptien | 061c664 | 2013-03-15 13:24:53 -0600 | [diff] [blame] | 1160 | |
| 1161 | /* Operating System Capabilities Method */ |
Martin Roth | c7b26c3 | 2015-11-24 16:17:11 -0700 | [diff] [blame] | 1162 | Method (_OSC, 4) |
| 1163 | { |
| 1164 | /* Check for PCI/PCI-X/PCIe GUID */ |
| 1165 | If (LEqual (Arg0, ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) |
Mike Loptien | 061c664 | 2013-03-15 13:24:53 -0600 | [diff] [blame] | 1166 | { |
| 1167 | /* Let OS control everything */ |
| 1168 | Return (Arg3) |
| 1169 | } |
Martin Roth | c7b26c3 | 2015-11-24 16:17:11 -0700 | [diff] [blame] | 1170 | Else |
| 1171 | { |
| 1172 | /* Unrecognized UUID, so set bit 2 of Arg3 to 1 */ |
| 1173 | CreateDWordField (Arg3, 0, CDW1) |
| 1174 | Or (CDW1, 4, CDW1) |
| 1175 | Return (Arg3) |
| 1176 | } |
| 1177 | } /* End _OSC */ |
Mike Loptien | 061c664 | 2013-03-15 13:24:53 -0600 | [diff] [blame] | 1178 | |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 1179 | Method(_BBN, 0) { /* Bus number = 0 */ |
| 1180 | Return(0) |
| 1181 | } |
| 1182 | Method(_STA, 0) { |
| 1183 | /* DBGO("\\_SB\\PCI0\\_STA\n") */ |
| 1184 | Return(0x0B) /* Status is visible */ |
| 1185 | } |
| 1186 | |
| 1187 | Method(_PRT,0) { |
| 1188 | If(PMOD){ Return(APR0) } /* APIC mode */ |
| 1189 | Return (PR0) /* PIC Mode */ |
| 1190 | } /* end _PRT */ |
| 1191 | |
| 1192 | /* Describe the Northbridge devices */ |
| 1193 | Device(AMRT) { |
| 1194 | Name(_ADR, 0x00000000) |
| 1195 | } /* end AMRT */ |
| 1196 | |
| 1197 | /* The internal GFX bridge */ |
| 1198 | Device(AGPB) { |
| 1199 | Name(_ADR, 0x00010000) |
| 1200 | Name(_PRW, Package() {0x18, 4}) |
| 1201 | Method(_PRT,0) { |
| 1202 | Return (APR1) |
| 1203 | } |
| 1204 | } /* end AGPB */ |
| 1205 | |
| 1206 | /* The external GFX bridge */ |
| 1207 | Device(PBR2) { |
| 1208 | Name(_ADR, 0x00020000) |
| 1209 | Name(_PRW, Package() {0x18, 4}) |
| 1210 | Method(_PRT,0) { |
| 1211 | If(PMOD){ Return(APS2) } /* APIC mode */ |
| 1212 | Return (PS2) /* PIC Mode */ |
| 1213 | } /* end _PRT */ |
| 1214 | } /* end PBR2 */ |
| 1215 | |
| 1216 | /* Dev3 is also an external GFX bridge, not used in Herring */ |
| 1217 | |
| 1218 | Device(PBR4) { |
| 1219 | Name(_ADR, 0x00040000) |
| 1220 | Name(_PRW, Package() {0x18, 4}) |
| 1221 | Method(_PRT,0) { |
| 1222 | If(PMOD){ Return(APS4) } /* APIC mode */ |
| 1223 | Return (PS4) /* PIC Mode */ |
| 1224 | } /* end _PRT */ |
| 1225 | } /* end PBR4 */ |
| 1226 | |
| 1227 | Device(PBR5) { |
| 1228 | Name(_ADR, 0x00050000) |
| 1229 | Name(_PRW, Package() {0x18, 4}) |
| 1230 | Method(_PRT,0) { |
| 1231 | If(PMOD){ Return(APS5) } /* APIC mode */ |
| 1232 | Return (PS5) /* PIC Mode */ |
| 1233 | } /* end _PRT */ |
| 1234 | } /* end PBR5 */ |
| 1235 | |
| 1236 | Device(PBR6) { |
| 1237 | Name(_ADR, 0x00060000) |
| 1238 | Name(_PRW, Package() {0x18, 4}) |
| 1239 | Method(_PRT,0) { |
| 1240 | If(PMOD){ Return(APS6) } /* APIC mode */ |
| 1241 | Return (PS6) /* PIC Mode */ |
| 1242 | } /* end _PRT */ |
| 1243 | } /* end PBR6 */ |
| 1244 | |
| 1245 | /* The onboard EtherNet chip */ |
| 1246 | Device(PBR7) { |
| 1247 | Name(_ADR, 0x00070000) |
| 1248 | Name(_PRW, Package() {0x18, 4}) |
| 1249 | Method(_PRT,0) { |
| 1250 | If(PMOD){ Return(APS7) } /* APIC mode */ |
| 1251 | Return (PS7) /* PIC Mode */ |
| 1252 | } /* end _PRT */ |
| 1253 | } /* end PBR7 */ |
| 1254 | |
| 1255 | /* GPP */ |
| 1256 | Device(PBR9) { |
| 1257 | Name(_ADR, 0x00090000) |
| 1258 | Name(_PRW, Package() {0x18, 4}) |
| 1259 | Method(_PRT,0) { |
| 1260 | If(PMOD){ Return(APS9) } /* APIC mode */ |
| 1261 | Return (PS9) /* PIC Mode */ |
| 1262 | } /* end _PRT */ |
| 1263 | } /* end PBR9 */ |
| 1264 | |
| 1265 | Device(PBRa) { |
| 1266 | Name(_ADR, 0x000A0000) |
| 1267 | Name(_PRW, Package() {0x18, 4}) |
| 1268 | Method(_PRT,0) { |
| 1269 | If(PMOD){ Return(APSa) } /* APIC mode */ |
| 1270 | Return (PSa) /* PIC Mode */ |
| 1271 | } /* end _PRT */ |
| 1272 | } /* end PBRa */ |
| 1273 | |
| 1274 | Device(PE20) { |
| 1275 | Name(_ADR, 0x00150000) |
| 1276 | Name(_PRW, Package() {0x18, 4}) |
| 1277 | Method(_PRT,0) { |
| 1278 | If(PMOD){ Return(APE0) } /* APIC mode */ |
| 1279 | Return (PE0) /* PIC Mode */ |
| 1280 | } /* end _PRT */ |
| 1281 | } /* end PE20 */ |
| 1282 | Device(PE21) { |
| 1283 | Name(_ADR, 0x00150001) |
| 1284 | Name(_PRW, Package() {0x18, 4}) |
| 1285 | Method(_PRT,0) { |
| 1286 | If(PMOD){ Return(APE1) } /* APIC mode */ |
| 1287 | Return (PE1) /* PIC Mode */ |
| 1288 | } /* end _PRT */ |
| 1289 | } /* end PE21 */ |
| 1290 | Device(PE22) { |
| 1291 | Name(_ADR, 0x00150002) |
| 1292 | Name(_PRW, Package() {0x18, 4}) |
| 1293 | Method(_PRT,0) { |
| 1294 | If(PMOD){ Return(APE2) } /* APIC mode */ |
| 1295 | Return (APE2) /* PIC Mode */ |
| 1296 | } /* end _PRT */ |
| 1297 | } /* end PE22 */ |
| 1298 | Device(PE23) { |
| 1299 | Name(_ADR, 0x00150003) |
| 1300 | Name(_PRW, Package() {0x18, 4}) |
| 1301 | Method(_PRT,0) { |
| 1302 | If(PMOD){ Return(APE3) } /* APIC mode */ |
| 1303 | Return (PE3) /* PIC Mode */ |
| 1304 | } /* end _PRT */ |
| 1305 | } /* end PE23 */ |
| 1306 | |
| 1307 | /* PCI slot 1, 2, 3 */ |
| 1308 | Device(PIBR) { |
| 1309 | Name(_ADR, 0x00140004) |
| 1310 | Name(_PRW, Package() {0x18, 4}) |
| 1311 | |
| 1312 | Method(_PRT, 0) { |
| 1313 | Return (PCIB) |
| 1314 | } |
| 1315 | } |
| 1316 | |
| 1317 | /* Describe the Southbridge devices */ |
| 1318 | Device(STCR) { |
| 1319 | Name(_ADR, 0x00110000) |
| 1320 | #include "acpi/sata.asl" |
| 1321 | } /* end STCR */ |
| 1322 | |
| 1323 | Device(UOH1) { |
| 1324 | Name(_ADR, 0x00120000) |
| 1325 | Name(_PRW, Package() {0x0B, 3}) |
| 1326 | } /* end UOH1 */ |
| 1327 | |
| 1328 | Device(UOH2) { |
| 1329 | Name(_ADR, 0x00120002) |
| 1330 | Name(_PRW, Package() {0x0B, 3}) |
| 1331 | } /* end UOH2 */ |
| 1332 | |
| 1333 | Device(UOH3) { |
| 1334 | Name(_ADR, 0x00130000) |
| 1335 | Name(_PRW, Package() {0x0B, 3}) |
| 1336 | } /* end UOH3 */ |
| 1337 | |
| 1338 | Device(UOH4) { |
| 1339 | Name(_ADR, 0x00130002) |
| 1340 | Name(_PRW, Package() {0x0B, 3}) |
| 1341 | } /* end UOH4 */ |
| 1342 | |
| 1343 | Device(UOH5) { |
| 1344 | Name(_ADR, 0x00160000) |
| 1345 | Name(_PRW, Package() {0x0B, 3}) |
| 1346 | } /* end UOH5 */ |
| 1347 | |
| 1348 | Device(UOH6) { |
| 1349 | Name(_ADR, 0x00160002) |
| 1350 | Name(_PRW, Package() {0x0B, 3}) |
| 1351 | } /* end UOH5 */ |
| 1352 | |
| 1353 | Device(UEH1) { |
| 1354 | Name(_ADR, 0x00140005) |
| 1355 | Name(_PRW, Package() {0x0B, 3}) |
| 1356 | } /* end UEH1 */ |
| 1357 | |
| 1358 | Device(SBUS) { |
| 1359 | Name(_ADR, 0x00140000) |
| 1360 | } /* end SBUS */ |
| 1361 | |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 1362 | Device(AZHD) { |
| 1363 | Name(_ADR, 0x00140002) |
| 1364 | OperationRegion(AZPD, PCI_Config, 0x00, 0x100) |
| 1365 | Field(AZPD, AnyAcc, NoLock, Preserve) { |
| 1366 | offset (0x42), |
| 1367 | NSDI, 1, |
| 1368 | NSDO, 1, |
| 1369 | NSEN, 1, |
| 1370 | offset (0x44), |
| 1371 | IPCR, 4, |
| 1372 | offset (0x54), |
| 1373 | PWST, 2, |
| 1374 | , 6, |
| 1375 | PMEB, 1, |
| 1376 | , 6, |
| 1377 | PMST, 1, |
| 1378 | offset (0x62), |
| 1379 | MMCR, 1, |
| 1380 | offset (0x64), |
| 1381 | MMLA, 32, |
| 1382 | offset (0x68), |
| 1383 | MMHA, 32, |
| 1384 | offset (0x6C), |
| 1385 | MMDT, 16, |
| 1386 | } |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 1387 | } /* end AZHD */ |
| 1388 | |
| 1389 | Device(LIBR) { |
| 1390 | Name(_ADR, 0x00140003) |
| 1391 | /* Method(_INI) { |
| 1392 | * DBGO("\\_SB\\PCI0\\LpcIsaBr\\_INI\n") |
| 1393 | } */ /* End Method(_SB.SBRDG._INI) */ |
| 1394 | |
| 1395 | /* Real Time Clock Device */ |
| 1396 | Device(RTC0) { |
| 1397 | Name(_HID, EISAID("PNP0B00")) /* AT Real Time Clock (not PIIX4 compatible) */ |
| 1398 | Name(_CRS, ResourceTemplate() { |
| 1399 | IRQNoFlags(){8} |
| 1400 | IO(Decode16,0x0070, 0x0070, 0, 2) |
| 1401 | /* IO(Decode16,0x0070, 0x0070, 0, 4) */ |
| 1402 | }) |
| 1403 | } /* End Device(_SB.PCI0.LpcIsaBr.RTC0) */ |
| 1404 | |
| 1405 | Device(TMR) { /* Timer */ |
| 1406 | Name(_HID,EISAID("PNP0100")) /* System Timer */ |
| 1407 | Name(_CRS, ResourceTemplate() { |
| 1408 | IRQNoFlags(){0} |
| 1409 | IO(Decode16, 0x0040, 0x0040, 0, 4) |
| 1410 | /* IO(Decode16, 0x0048, 0x0048, 0, 4) */ |
| 1411 | }) |
| 1412 | } /* End Device(_SB.PCI0.LpcIsaBr.TMR) */ |
| 1413 | |
| 1414 | Device(SPKR) { /* Speaker */ |
| 1415 | Name(_HID,EISAID("PNP0800")) /* AT style speaker */ |
| 1416 | Name(_CRS, ResourceTemplate() { |
| 1417 | IO(Decode16, 0x0061, 0x0061, 0, 1) |
| 1418 | }) |
| 1419 | } /* End Device(_SB.PCI0.LpcIsaBr.SPKR) */ |
| 1420 | |
| 1421 | Device(PIC) { |
| 1422 | Name(_HID,EISAID("PNP0000")) /* AT Interrupt Controller */ |
| 1423 | Name(_CRS, ResourceTemplate() { |
| 1424 | IRQNoFlags(){2} |
| 1425 | IO(Decode16,0x0020, 0x0020, 0, 2) |
| 1426 | IO(Decode16,0x00A0, 0x00A0, 0, 2) |
| 1427 | /* IO(Decode16, 0x00D0, 0x00D0, 0x10, 0x02) */ |
| 1428 | /* IO(Decode16, 0x04D0, 0x04D0, 0x10, 0x02) */ |
| 1429 | }) |
| 1430 | } /* End Device(_SB.PCI0.LpcIsaBr.PIC) */ |
| 1431 | |
| 1432 | Device(MAD) { /* 8257 DMA */ |
| 1433 | Name(_HID,EISAID("PNP0200")) /* Hardware Device ID */ |
| 1434 | Name(_CRS, ResourceTemplate() { |
| 1435 | DMA(Compatibility,BusMaster,Transfer8){4} |
| 1436 | IO(Decode16, 0x0000, 0x0000, 0x10, 0x10) |
| 1437 | IO(Decode16, 0x0081, 0x0081, 0x01, 0x03) |
| 1438 | IO(Decode16, 0x0087, 0x0087, 0x01, 0x01) |
| 1439 | IO(Decode16, 0x0089, 0x0089, 0x01, 0x03) |
| 1440 | IO(Decode16, 0x008F, 0x008F, 0x01, 0x01) |
| 1441 | IO(Decode16, 0x00C0, 0x00C0, 0x10, 0x20) |
| 1442 | }) /* End Name(_SB.PCI0.LpcIsaBr.MAD._CRS) */ |
| 1443 | } /* End Device(_SB.PCI0.LpcIsaBr.MAD) */ |
| 1444 | |
| 1445 | Device(COPR) { |
| 1446 | Name(_HID,EISAID("PNP0C04")) /* Math Coprocessor */ |
| 1447 | Name(_CRS, ResourceTemplate() { |
| 1448 | IO(Decode16, 0x00F0, 0x00F0, 0, 0x10) |
| 1449 | IRQNoFlags(){13} |
| 1450 | }) |
| 1451 | } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */ |
| 1452 | #if 0 |
| 1453 | Device(HPTM) { |
| 1454 | Name(_HID,EISAID("PNP0103")) |
| 1455 | Name(CRS,ResourceTemplate() { |
| 1456 | Memory32Fixed(ReadOnly,0xFED00000, 0x00000400, HPT) /* 1kb reserved space */ |
| 1457 | }) |
| 1458 | Method(_STA, 0) { |
| 1459 | Return(0x0F) /* sata is visible */ |
| 1460 | } |
| 1461 | Method(_CRS, 0) { |
Vladimir Serbinenko | 0158606 | 2016-02-08 00:08:49 +0100 | [diff] [blame] | 1462 | CreateDwordField(CRS, ^HPT._BAS, HPBX) |
| 1463 | Store(HPBA, HPBX) |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 1464 | Return(CRS) |
| 1465 | } |
| 1466 | } /* End Device(_SB.PCI0.LpcIsaBr.COPR) */ |
| 1467 | #endif |
Jens Rottmann | 23d13b1 | 2013-02-28 10:24:20 +0100 | [diff] [blame] | 1468 | #include "acpi/superio.asl" |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 1469 | } /* end LIBR */ |
| 1470 | |
| 1471 | Device(HPBR) { |
| 1472 | Name(_ADR, 0x00140004) |
| 1473 | } /* end HostPciBr */ |
| 1474 | |
| 1475 | Device(ACAD) { |
| 1476 | Name(_ADR, 0x00140005) |
| 1477 | } /* end Ac97audio */ |
| 1478 | |
| 1479 | Device(ACMD) { |
| 1480 | Name(_ADR, 0x00140006) |
| 1481 | } /* end Ac97modem */ |
| 1482 | |
| 1483 | Name(CRES, ResourceTemplate() { |
Mike Loptien | 42ad200 | 2013-03-15 13:05:59 -0600 | [diff] [blame] | 1484 | /* Set the Bus number and Secondary Bus number for the PCI0 device |
| 1485 | * The Secondary bus range for PCI0 lets the system |
| 1486 | * know what bus values are allowed on the downstream |
| 1487 | * side of this PCI bus if there is a PCI-PCI bridge. |
| 1488 | * PCI busses can have 256 secondary busses which |
| 1489 | * range from [0-0xFF] but they do not need to be |
| 1490 | * sequential. |
| 1491 | */ |
| 1492 | WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, |
| 1493 | 0x0000, /* address granularity */ |
| 1494 | 0x0000, /* range minimum */ |
| 1495 | 0x00FF, /* range maximum */ |
| 1496 | 0x0000, /* translation */ |
| 1497 | 0x0100, /* length */ |
| 1498 | ,, PSB0) /* ResourceSourceIndex, ResourceSource, DescriptorName */ |
| 1499 | |
Jens Rottmann | 23d13b1 | 2013-02-28 10:24:20 +0100 | [diff] [blame] | 1500 | IO(Decode16, 0x004E, 0x004E, 1, 2) /* SIO config regs */ |
| 1501 | IO(Decode16, 0x0E00, 0x0E00, 1, 0x80) /* SIO runtime regs */ |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 1502 | IO(Decode16, 0x0CF8, 0x0CF8, 1, 8) |
| 1503 | |
| 1504 | WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, |
| 1505 | 0x0000, /* address granularity */ |
| 1506 | 0x0000, /* range minimum */ |
| 1507 | 0x0CF7, /* range maximum */ |
| 1508 | 0x0000, /* translation */ |
| 1509 | 0x0CF8 /* length */ |
| 1510 | ) |
| 1511 | |
| 1512 | WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, |
| 1513 | 0x0000, /* address granularity */ |
| 1514 | 0x0D00, /* range minimum */ |
| 1515 | 0xFFFF, /* range maximum */ |
| 1516 | 0x0000, /* translation */ |
| 1517 | 0xF300 /* length */ |
| 1518 | ) |
| 1519 | |
| 1520 | Memory32Fixed(READONLY, 0x000A0000, 0x00020000, VGAM) /* VGA memory space */ |
| 1521 | #if 0 |
| 1522 | Memory32Fixed(READONLY, 0x000C0000, 0x00020000, EMM1) /* Assume C0000-E0000 empty */ |
| 1523 | Memory32Fixed(READONLY, 0x000E0000, 0x00020000, RDBS) /* BIOS ROM area */ |
| 1524 | |
| 1525 | /* DRAM Memory from 1MB to TopMem */ |
| 1526 | Memory32Fixed(READWRITE, 0x00100000, 0, DMLO) /* 1MB to TopMem */ |
| 1527 | |
| 1528 | /* BIOS space just below 4GB */ |
| 1529 | DWORDMemory( |
| 1530 | ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, |
| 1531 | 0x00, /* Granularity */ |
| 1532 | 0x00000000, /* Min */ |
| 1533 | 0x00000000, /* Max */ |
| 1534 | 0x00000000, /* Translation */ |
| 1535 | 0x00000001, /* Max-Min, RLEN */ |
| 1536 | ,, |
| 1537 | PCBM |
| 1538 | ) |
| 1539 | |
| 1540 | /* DRAM memory from 4GB to TopMem2 */ |
| 1541 | QWORDMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, |
| 1542 | 0x00000000, /* Granularity */ |
| 1543 | 0x00000000, /* Min */ |
| 1544 | 0x00000000, /* Max */ |
| 1545 | 0x00000000, /* Translation */ |
| 1546 | 0x00000001, /* Max-Min, RLEN */ |
| 1547 | ,, |
| 1548 | DMHI |
| 1549 | ) |
| 1550 | |
| 1551 | /* BIOS space just below 16EB */ |
| 1552 | QWORDMemory(ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, |
| 1553 | 0x00000000, /* Granularity */ |
| 1554 | 0x00000000, /* Min */ |
| 1555 | 0x00000000, /* Max */ |
| 1556 | 0x00000000, /* Translation */ |
| 1557 | 0x00000001, /* Max-Min, RLEN */ |
| 1558 | ,, |
| 1559 | PEBM |
| 1560 | ) |
| 1561 | #endif |
Elyes HAOUAS | d4c89e4 | 2016-09-21 21:07:42 +0200 | [diff] [blame^] | 1562 | /* memory space for PCI BARs below 4GB */ |
| 1563 | Memory32Fixed(ReadOnly, 0x00000000, 0x00000000, MMIO) |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 1564 | }) /* End Name(_SB.PCI0.CRES) */ |
| 1565 | |
| 1566 | Method(_CRS, 0) { |
| 1567 | /* DBGO("\\_SB\\PCI0\\_CRS\n") */ |
| 1568 | #if 0 |
| 1569 | CreateDWordField(CRES, ^EMM1._BAS, EM1B) |
| 1570 | CreateDWordField(CRES, ^EMM1._LEN, EM1L) |
| 1571 | CreateDWordField(CRES, ^DMLO._BAS, DMLB) |
| 1572 | CreateDWordField(CRES, ^DMLO._LEN, DMLL) |
| 1573 | CreateDWordField(CRES, ^PCBM._MIN, PBMB) |
| 1574 | CreateDWordField(CRES, ^PCBM._LEN, PBML) |
| 1575 | |
| 1576 | CreateQWordField(CRES, ^DMHI._MIN, DMHB) |
| 1577 | CreateQWordField(CRES, ^DMHI._LEN, DMHL) |
| 1578 | CreateQWordField(CRES, ^PEBM._MIN, EBMB) |
| 1579 | CreateQWordField(CRES, ^PEBM._LEN, EBML) |
| 1580 | |
| 1581 | If(LGreater(LOMH, 0xC0000)){ |
| 1582 | Store(0xC0000, EM1B) /* Hole above C0000 and below E0000 */ |
| 1583 | Subtract(LOMH, 0xC0000, EM1L) /* subtract start, assumes allocation from C0000 going up */ |
| 1584 | } |
| 1585 | |
| 1586 | /* Set size of memory from 1MB to TopMem */ |
| 1587 | Subtract(TOM1, 0x100000, DMLL) |
| 1588 | |
| 1589 | /* |
| 1590 | * If(LNotEqual(TOM2, 0x00000000)){ |
| 1591 | * Store(0x100000000,DMHB) DRAM from 4GB to TopMem2 |
| 1592 | * Subtract(TOM2, 0x100000000, DMHL) |
| 1593 | * } |
| 1594 | */ |
| 1595 | |
| 1596 | /* If there is no memory above 4GB, put the BIOS just below 4GB */ |
| 1597 | If(LEqual(TOM2, 0x00000000)){ |
| 1598 | Store(PBAD,PBMB) /* Reserve the "BIOS" space */ |
| 1599 | Store(PBLN,PBML) |
| 1600 | } |
| 1601 | Else { /* Otherwise, put the BIOS just below 16EB */ |
| 1602 | ShiftLeft(PBAD,16,EBMB) /* Reserve the "BIOS" space */ |
| 1603 | Store(PBLN,EBML) |
| 1604 | } |
| 1605 | #endif |
| 1606 | CreateDWordField(CRES, ^MMIO._BAS, MM1B) |
Elyes HAOUAS | d4c89e4 | 2016-09-21 21:07:42 +0200 | [diff] [blame^] | 1607 | CreateDWordField(CRES, ^MMIO._LEN, MM1L) |
| 1608 | /* |
| 1609 | * Declare memory between TOM1 and 4GB as available |
| 1610 | * for PCI MMIO. |
| 1611 | * Use ShiftLeft to avoid 64bit constant (for XP). |
| 1612 | * This will work even if the OS does 32bit arithmetic, as |
| 1613 | * 32bit (0x00000000 - TOM1) will wrap and give the same |
| 1614 | * result as 64bit (0x100000000 - TOM1). |
| 1615 | */ |
| 1616 | Store(TOM1, MM1B) |
| 1617 | ShiftLeft(0x10000000, 4, Local0) |
| 1618 | Subtract(Local0, TOM1, Local0) |
| 1619 | Store(Local0, MM1L) |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 1620 | |
| 1621 | Return(CRES) /* note to change the Name buffer */ |
| 1622 | } /* end of Method(_SB.PCI0._CRS) */ |
| 1623 | |
| 1624 | /* |
| 1625 | * |
| 1626 | * FIRST METHOD CALLED UPON BOOT |
| 1627 | * |
| 1628 | * 1. If debugging, print current OS and ACPI interpreter. |
| 1629 | * 2. Get PCI Interrupt routing from ACPI VSM, this |
| 1630 | * value is based on user choice in BIOS setup. |
| 1631 | */ |
| 1632 | Method(_INI, 0) { |
| 1633 | /* DBGO("\\_SB\\_INI\n") */ |
| 1634 | /* DBGO(" DSDT.ASL code from ") */ |
| 1635 | /* DBGO(__DATE__) */ |
| 1636 | /* DBGO(" ") */ |
| 1637 | /* DBGO(__TIME__) */ |
| 1638 | /* DBGO("\n Sleep states supported: ") */ |
| 1639 | /* DBGO("\n") */ |
| 1640 | /* DBGO(" \\_OS=") */ |
| 1641 | /* DBGO(\_OS) */ |
| 1642 | /* DBGO("\n \\_REV=") */ |
| 1643 | /* DBGO(\_REV) */ |
| 1644 | /* DBGO("\n") */ |
| 1645 | |
| 1646 | /* Determine the OS we're running on */ |
Edward O'Callaghan | f7d8f09 | 2014-05-31 13:57:52 +1000 | [diff] [blame] | 1647 | OSFL() |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 1648 | |
| 1649 | /* On older chips, clear PciExpWakeDisEn */ |
| 1650 | /*if (LLessEqual(\SBRI, 0x13)) { |
Elyes HAOUAS | d4c89e4 | 2016-09-21 21:07:42 +0200 | [diff] [blame^] | 1651 | * Store(0,\PWDE) |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 1652 | * } |
| 1653 | */ |
| 1654 | } /* End Method(_SB._INI) */ |
| 1655 | } /* End Device(PCI0) */ |
| 1656 | |
| 1657 | Device(PWRB) { /* Start Power button device */ |
| 1658 | Name(_HID, EISAID("PNP0C0C")) |
| 1659 | Name(_UID, 0xAA) |
| 1660 | Name(_PRW, Package () {3, 0x04}) /* wake from S1-S4 */ |
| 1661 | Name(_STA, 0x0B) /* sata is invisible */ |
| 1662 | } |
| 1663 | } /* End \_SB scope */ |
| 1664 | |
| 1665 | Scope(\_SI) { |
| 1666 | Method(_SST, 1) { |
| 1667 | /* DBGO("\\_SI\\_SST\n") */ |
| 1668 | /* DBGO(" New Indicator state: ") */ |
| 1669 | /* DBGO(Arg0) */ |
| 1670 | /* DBGO("\n") */ |
| 1671 | } |
| 1672 | } /* End Scope SI */ |
Jens Rottmann | 73d4965 | 2013-02-28 09:56:20 +0100 | [diff] [blame] | 1673 | } |
| 1674 | /* End of ASL file */ |