Annotation of qemu/roms/seabios/src/acpi-dsdt.dsl, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Bochs/QEMU ACPI DSDT ASL definition
                      3:  *
                      4:  * Copyright (c) 2006 Fabrice Bellard
                      5:  *
                      6:  * This library is free software; you can redistribute it and/or
                      7:  * modify it under the terms of the GNU Lesser General Public
                      8:  * License version 2 as published by the Free Software Foundation.
                      9:  *
                     10:  * This library 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 GNU
                     13:  * Lesser General Public License for more details.
                     14:  *
                     15:  * You should have received a copy of the GNU Lesser General Public
                     16:  * License along with this library; if not, write to the Free Software
                     17:  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
                     18:  */
                     19: DefinitionBlock (
                     20:     "acpi-dsdt.aml",    // Output Filename
                     21:     "DSDT",             // Signature
                     22:     0x01,               // DSDT Compliance Revision
                     23:     "BXPC",             // OEMID
                     24:     "BXDSDT",           // TABLE ID
                     25:     0x1                 // OEM Revision
                     26:     )
                     27: {
                     28:     Scope (\)
                     29:     {
                     30:         /* Debug Output */
                     31:         OperationRegion (DBG, SystemIO, 0xb044, 0x04)
                     32:         Field (DBG, DWordAcc, NoLock, Preserve)
                     33:         {
                     34:             DBGL,   32,
                     35:         }
                     36:     }
                     37: 
                     38: 
                     39:     /* PCI Bus definition */
                     40:     Scope(\_SB) {
                     41:         Device(PCI0) {
                     42:             Name (_HID, EisaId ("PNP0A03"))
                     43:             Name (_ADR, 0x00)
                     44:             Name (_UID, 1)
                     45:             Name(_PRT, Package() {
                     46:                 /* PCI IRQ routing table, example from ACPI 2.0a specification,
                     47:                    section 6.2.8.1 */
                     48:                 /* Note: we provide the same info as the PCI routing
                     49:                    table of the Bochs BIOS */
                     50: #define prt_slot(nr, lnk0, lnk1, lnk2, lnk3) \
                     51:        Package() { nr##ffff, 0, lnk0, 0 }, \
                     52:        Package() { nr##ffff, 1, lnk1, 0 }, \
                     53:        Package() { nr##ffff, 2, lnk2, 0 }, \
                     54:        Package() { nr##ffff, 3, lnk3, 0 }
                     55: 
                     56: #define prt_slot0(nr) prt_slot(nr, LNKD, LNKA, LNKB, LNKC)
                     57: #define prt_slot1(nr) prt_slot(nr, LNKA, LNKB, LNKC, LNKD)
                     58: #define prt_slot2(nr) prt_slot(nr, LNKB, LNKC, LNKD, LNKA)
                     59: #define prt_slot3(nr) prt_slot(nr, LNKC, LNKD, LNKA, LNKB)
                     60:                prt_slot0(0x0000),
                     61:                prt_slot1(0x0001),
                     62:                prt_slot2(0x0002),
                     63:                prt_slot3(0x0003),
                     64:                prt_slot0(0x0004),
                     65:                prt_slot1(0x0005),
                     66:                prt_slot2(0x0006),
                     67:                prt_slot3(0x0007),
                     68:                prt_slot0(0x0008),
                     69:                prt_slot1(0x0009),
                     70:                prt_slot2(0x000a),
                     71:                prt_slot3(0x000b),
                     72:                prt_slot0(0x000c),
                     73:                prt_slot1(0x000d),
                     74:                prt_slot2(0x000e),
                     75:                prt_slot3(0x000f),
                     76:                prt_slot0(0x0010),
                     77:                prt_slot1(0x0011),
                     78:                prt_slot2(0x0012),
                     79:                prt_slot3(0x0013),
                     80:                prt_slot0(0x0014),
                     81:                prt_slot1(0x0015),
                     82:                prt_slot2(0x0016),
                     83:                prt_slot3(0x0017),
                     84:                prt_slot0(0x0018),
                     85:                prt_slot1(0x0019),
                     86:                prt_slot2(0x001a),
                     87:                prt_slot3(0x001b),
                     88:                prt_slot0(0x001c),
                     89:                prt_slot1(0x001d),
                     90:                prt_slot2(0x001e),
                     91:                prt_slot3(0x001f),
                     92:             })
                     93: 
                     94:             OperationRegion(PCST, SystemIO, 0xae00, 0x08)
                     95:             Field (PCST, DWordAcc, NoLock, WriteAsZeros)
                     96:             {
                     97:                 PCIU, 32,
                     98:                 PCID, 32,
                     99:             }
                    100: 
                    101:             OperationRegion(SEJ, SystemIO, 0xae08, 0x04)
                    102:             Field (SEJ, DWordAcc, NoLock, WriteAsZeros)
                    103:             {
                    104:                 B0EJ, 32,
                    105:             }
                    106: 
                    107: #define hotplug_slot(name, nr) \
                    108:             Device (S##name) {                    \
                    109:                Name (_ADR, nr##0000)              \
                    110:                Method (_EJ0,1) {                  \
                    111:                     Store(ShiftLeft(1, nr), B0EJ) \
                    112:                     Return (0x0)                  \
                    113:                }                                  \
                    114:                Name (_SUN, name)                  \
                    115:             }
                    116: 
                    117:            hotplug_slot(1, 0x0001)
                    118:            hotplug_slot(2, 0x0002)
                    119:            hotplug_slot(3, 0x0003)
                    120:            hotplug_slot(4, 0x0004)
                    121:            hotplug_slot(5, 0x0005)
                    122:            hotplug_slot(6, 0x0006)
                    123:            hotplug_slot(7, 0x0007)
                    124:            hotplug_slot(8, 0x0008)
                    125:            hotplug_slot(9, 0x0009)
                    126:            hotplug_slot(10, 0x000a)
                    127:            hotplug_slot(11, 0x000b)
                    128:            hotplug_slot(12, 0x000c)
                    129:            hotplug_slot(13, 0x000d)
                    130:            hotplug_slot(14, 0x000e)
                    131:            hotplug_slot(15, 0x000f)
                    132:            hotplug_slot(16, 0x0010)
                    133:            hotplug_slot(17, 0x0011)
                    134:            hotplug_slot(18, 0x0012)
                    135:            hotplug_slot(19, 0x0013)
                    136:            hotplug_slot(20, 0x0014)
                    137:            hotplug_slot(21, 0x0015)
                    138:            hotplug_slot(22, 0x0016)
                    139:            hotplug_slot(23, 0x0017)
                    140:            hotplug_slot(24, 0x0018)
                    141:            hotplug_slot(25, 0x0019)
                    142:            hotplug_slot(26, 0x001a)
                    143:            hotplug_slot(27, 0x001b)
                    144:            hotplug_slot(28, 0x001c)
                    145:            hotplug_slot(29, 0x001d)
                    146:            hotplug_slot(30, 0x001e)
                    147:            hotplug_slot(31, 0x001f)
                    148: 
                    149:             Name (_CRS, ResourceTemplate ()
                    150:             {
                    151:                 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
                    152:                     0x0000,             // Address Space Granularity
                    153:                     0x0000,             // Address Range Minimum
                    154:                     0x00FF,             // Address Range Maximum
                    155:                     0x0000,             // Address Translation Offset
                    156:                     0x0100,             // Address Length
                    157:                     ,, )
                    158:                 IO (Decode16,
                    159:                     0x0CF8,             // Address Range Minimum
                    160:                     0x0CF8,             // Address Range Maximum
                    161:                     0x01,               // Address Alignment
                    162:                     0x08,               // Address Length
                    163:                     )
                    164:                 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                    165:                     0x0000,             // Address Space Granularity
                    166:                     0x0000,             // Address Range Minimum
                    167:                     0x0CF7,             // Address Range Maximum
                    168:                     0x0000,             // Address Translation Offset
                    169:                     0x0CF8,             // Address Length
                    170:                     ,, , TypeStatic)
                    171:                 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                    172:                     0x0000,             // Address Space Granularity
                    173:                     0x0D00,             // Address Range Minimum
                    174:                     0xFFFF,             // Address Range Maximum
                    175:                     0x0000,             // Address Translation Offset
                    176:                     0xF300,             // Address Length
                    177:                     ,, , TypeStatic)
                    178:                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    179:                     0x00000000,         // Address Space Granularity
                    180:                     0x000A0000,         // Address Range Minimum
                    181:                     0x000BFFFF,         // Address Range Maximum
                    182:                     0x00000000,         // Address Translation Offset
                    183:                     0x00020000,         // Address Length
                    184:                     ,, , AddressRangeMemory, TypeStatic)
                    185:                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
                    186:                     0x00000000,         // Address Space Granularity
                    187:                     0xE0000000,         // Address Range Minimum
                    188:                     0xFEBFFFFF,         // Address Range Maximum
                    189:                     0x00000000,         // Address Translation Offset
                    190:                     0x1EC00000,         // Address Length
                    191:                     ,, , AddressRangeMemory, TypeStatic)
                    192:             })
                    193:         }
                    194: 
                    195:         Device(HPET) {
                    196:             Name(_HID,  EISAID("PNP0103"))
                    197:             Name(_UID, 0)
                    198:             Method (_STA, 0, NotSerialized) {
                    199:                     Return(0x0F)
                    200:             }
                    201:             Name(_CRS, ResourceTemplate() {
                    202:                 DWordMemory(
                    203:                     ResourceConsumer, PosDecode, MinFixed, MaxFixed,
                    204:                     NonCacheable, ReadWrite,
                    205:                     0x00000000,
                    206:                     0xFED00000,
                    207:                     0xFED003FF,
                    208:                     0x00000000,
                    209:                     0x00000400 /* 1K memory: FED00000 - FED003FF */
                    210:                 )
                    211:             })
                    212:         }
                    213:     }
                    214: 
                    215:     Scope(\_SB.PCI0) {
                    216:         Device (VGA) {
                    217:                  Name (_ADR, 0x00020000)
                    218:                  Method (_S1D, 0, NotSerialized)
                    219:                  {
                    220:                          Return (0x00)
                    221:                  }
                    222:                  Method (_S2D, 0, NotSerialized)
                    223:                  {
                    224:                          Return (0x00)
                    225:                  }
                    226:                  Method (_S3D, 0, NotSerialized)
                    227:                  {
                    228:                          Return (0x00)
                    229:                  }
                    230:         }
                    231: 
                    232:        /* PIIX3 ISA bridge */
                    233:         Device (ISA) {
                    234:             Name (_ADR, 0x00010000)
                    235: 
                    236:             /* PIIX PCI to ISA irq remapping */
                    237:             OperationRegion (P40C, PCI_Config, 0x60, 0x04)
                    238: 
                    239:             /* Real-time clock */
                    240:             Device (RTC)
                    241:             {
                    242:                 Name (_HID, EisaId ("PNP0B00"))
                    243:                 Name (_CRS, ResourceTemplate ()
                    244:                 {
                    245:                     IO (Decode16, 0x0070, 0x0070, 0x10, 0x02)
                    246:                     IRQNoFlags () {8}
                    247:                     IO (Decode16, 0x0072, 0x0072, 0x02, 0x06)
                    248:                 })
                    249:             }
                    250: 
                    251:             /* Keyboard seems to be important for WinXP install */
                    252:             Device (KBD)
                    253:             {
                    254:                 Name (_HID, EisaId ("PNP0303"))
                    255:                 Method (_STA, 0, NotSerialized)
                    256:                 {
                    257:                     Return (0x0f)
                    258:                 }
                    259: 
                    260:                 Method (_CRS, 0, NotSerialized)
                    261:                 {
                    262:                      Name (TMP, ResourceTemplate ()
                    263:                      {
                    264:                     IO (Decode16,
                    265:                         0x0060,             // Address Range Minimum
                    266:                         0x0060,             // Address Range Maximum
                    267:                         0x01,               // Address Alignment
                    268:                         0x01,               // Address Length
                    269:                         )
                    270:                     IO (Decode16,
                    271:                         0x0064,             // Address Range Minimum
                    272:                         0x0064,             // Address Range Maximum
                    273:                         0x01,               // Address Alignment
                    274:                         0x01,               // Address Length
                    275:                         )
                    276:                     IRQNoFlags ()
                    277:                         {1}
                    278:                     })
                    279:                     Return (TMP)
                    280:                 }
                    281:             }
                    282: 
                    283:            /* PS/2 mouse */
                    284:             Device (MOU)
                    285:             {
                    286:                 Name (_HID, EisaId ("PNP0F13"))
                    287:                 Method (_STA, 0, NotSerialized)
                    288:                 {
                    289:                     Return (0x0f)
                    290:                 }
                    291: 
                    292:                 Method (_CRS, 0, NotSerialized)
                    293:                 {
                    294:                     Name (TMP, ResourceTemplate ()
                    295:                     {
                    296:                          IRQNoFlags () {12}
                    297:                     })
                    298:                     Return (TMP)
                    299:                 }
                    300:             }
                    301: 
                    302:            /* PS/2 floppy controller */
                    303:            Device (FDC0)
                    304:            {
                    305:                Name (_HID, EisaId ("PNP0700"))
                    306:                Method (_STA, 0, NotSerialized)
                    307:                {
                    308:                    Return (0x0F)
                    309:                }
                    310:                Method (_CRS, 0, NotSerialized)
                    311:                {
                    312:                    Name (BUF0, ResourceTemplate ()
                    313:                     {
                    314:                         IO (Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
                    315:                         IO (Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
                    316:                         IRQNoFlags () {6}
                    317:                         DMA (Compatibility, NotBusMaster, Transfer8) {2}
                    318:                     })
                    319:                    Return (BUF0)
                    320:                }
                    321:            }
                    322: 
                    323:            /* Parallel port */
                    324:            Device (LPT)
                    325:            {
                    326:                Name (_HID, EisaId ("PNP0400"))
                    327:                Method (_STA, 0, NotSerialized)
                    328:                {
                    329:                    Store (\_SB.PCI0.PX13.DRSA, Local0)
                    330:                    And (Local0, 0x80000000, Local0)
                    331:                    If (LEqual (Local0, 0))
                    332:                    {
                    333:                        Return (0x00)
                    334:                    }
                    335:                    Else
                    336:                    {
                    337:                        Return (0x0F)
                    338:                    }
                    339:                }
                    340:                Method (_CRS, 0, NotSerialized)
                    341:                {
                    342:                    Name (BUF0, ResourceTemplate ()
                    343:                     {
                    344:                        IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
                    345:                        IRQNoFlags () {7}
                    346:                    })
                    347:                    Return (BUF0)
                    348:                }
                    349:            }
                    350: 
                    351:            /* Serial Ports */
                    352:            Device (COM1)
                    353:            {
                    354:                Name (_HID, EisaId ("PNP0501"))
                    355:                Name (_UID, 0x01)
                    356:                Method (_STA, 0, NotSerialized)
                    357:                {
                    358:                    Store (\_SB.PCI0.PX13.DRSC, Local0)
                    359:                    And (Local0, 0x08000000, Local0)
                    360:                    If (LEqual (Local0, 0))
                    361:                    {
                    362:                        Return (0x00)
                    363:                    }
                    364:                    Else
                    365:                    {
                    366:                        Return (0x0F)
                    367:                    }
                    368:                }
                    369:                Method (_CRS, 0, NotSerialized)
                    370:                {
                    371:                    Name (BUF0, ResourceTemplate ()
                    372:                     {
                    373:                        IO (Decode16, 0x03F8, 0x03F8, 0x00, 0x08)
                    374:                        IRQNoFlags () {4}
                    375:                    })
                    376:                    Return (BUF0)
                    377:                }
                    378:            }
                    379: 
                    380:            Device (COM2)
                    381:            {
                    382:                Name (_HID, EisaId ("PNP0501"))
                    383:                Name (_UID, 0x02)
                    384:                Method (_STA, 0, NotSerialized)
                    385:                {
                    386:                    Store (\_SB.PCI0.PX13.DRSC, Local0)
                    387:                    And (Local0, 0x80000000, Local0)
                    388:                    If (LEqual (Local0, 0))
                    389:                    {
                    390:                        Return (0x00)
                    391:                    }
                    392:                    Else
                    393:                    {
                    394:                        Return (0x0F)
                    395:                    }
                    396:                }
                    397:                Method (_CRS, 0, NotSerialized)
                    398:                {
                    399:                    Name (BUF0, ResourceTemplate ()
                    400:                     {
                    401:                        IO (Decode16, 0x02F8, 0x02F8, 0x00, 0x08)
                    402:                        IRQNoFlags () {3}
                    403:                    })
                    404:                    Return (BUF0)
                    405:                }
                    406:            }
                    407:         }
                    408: 
                    409:        /* PIIX4 PM */
                    410:         Device (PX13) {
                    411:            Name (_ADR, 0x00010003)
                    412: 
                    413:            OperationRegion (P13C, PCI_Config, 0x5c, 0x24)
                    414:            Field (P13C, DWordAcc, NoLock, Preserve)
                    415:            {
                    416:                DRSA, 32,
                    417:                DRSB, 32,
                    418:                DRSC, 32,
                    419:                DRSE, 32,
                    420:                DRSF, 32,
                    421:                DRSG, 32,
                    422:                DRSH, 32,
                    423:                DRSI, 32,
                    424:                DRSJ, 32
                    425:            }
                    426:        }
                    427:     }
                    428: 
                    429:     /* PCI IRQs */
                    430:     Scope(\_SB) {
                    431:          Field (\_SB.PCI0.ISA.P40C, ByteAcc, NoLock, Preserve)
                    432:          {
                    433:              PRQ0,   8,
                    434:              PRQ1,   8,
                    435:              PRQ2,   8,
                    436:              PRQ3,   8
                    437:          }
                    438: 
                    439:         Device(LNKA){
                    440:                 Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
                    441:                 Name(_UID, 1)
                    442:                 Name(_PRS, ResourceTemplate(){
                    443:                     Interrupt (, Level, ActiveHigh, Shared)
                    444:                         { 5, 10, 11 }
                    445:                 })
                    446:                 Method (_STA, 0, NotSerialized)
                    447:                 {
                    448:                     Store (0x0B, Local0)
                    449:                     If (And (0x80, PRQ0, Local1))
                    450:                     {
                    451:                          Store (0x09, Local0)
                    452:                     }
                    453:                     Return (Local0)
                    454:                 }
                    455:                 Method (_DIS, 0, NotSerialized)
                    456:                 {
                    457:                     Or (PRQ0, 0x80, PRQ0)
                    458:                 }
                    459:                 Method (_CRS, 0, NotSerialized)
                    460:                 {
                    461:                     Name (PRR0, ResourceTemplate ()
                    462:                     {
                    463:                         Interrupt (, Level, ActiveHigh, Shared)
                    464:                             {1}
                    465:                     })
                    466:                     CreateDWordField (PRR0, 0x05, TMP)
                    467:                     Store (PRQ0, Local0)
                    468:                     If (LLess (Local0, 0x80))
                    469:                     {
                    470:                         Store (Local0, TMP)
                    471:                     }
                    472:                     Else
                    473:                     {
                    474:                         Store (Zero, TMP)
                    475:                     }
                    476:                     Return (PRR0)
                    477:                 }
                    478:                 Method (_SRS, 1, NotSerialized)
                    479:                 {
                    480:                     CreateDWordField (Arg0, 0x05, TMP)
                    481:                     Store (TMP, PRQ0)
                    482:                 }
                    483:         }
                    484:         Device(LNKB){
                    485:                 Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
                    486:                 Name(_UID, 2)
                    487:                 Name(_PRS, ResourceTemplate(){
                    488:                     Interrupt (, Level, ActiveHigh, Shared)
                    489:                         { 5, 10, 11 }
                    490:                 })
                    491:                 Method (_STA, 0, NotSerialized)
                    492:                 {
                    493:                     Store (0x0B, Local0)
                    494:                     If (And (0x80, PRQ1, Local1))
                    495:                     {
                    496:                          Store (0x09, Local0)
                    497:                     }
                    498:                     Return (Local0)
                    499:                 }
                    500:                 Method (_DIS, 0, NotSerialized)
                    501:                 {
                    502:                     Or (PRQ1, 0x80, PRQ1)
                    503:                 }
                    504:                 Method (_CRS, 0, NotSerialized)
                    505:                 {
                    506:                     Name (PRR0, ResourceTemplate ()
                    507:                     {
                    508:                         Interrupt (, Level, ActiveHigh, Shared)
                    509:                             {1}
                    510:                     })
                    511:                     CreateDWordField (PRR0, 0x05, TMP)
                    512:                     Store (PRQ1, Local0)
                    513:                     If (LLess (Local0, 0x80))
                    514:                     {
                    515:                         Store (Local0, TMP)
                    516:                     }
                    517:                     Else
                    518:                     {
                    519:                         Store (Zero, TMP)
                    520:                     }
                    521:                     Return (PRR0)
                    522:                 }
                    523:                 Method (_SRS, 1, NotSerialized)
                    524:                 {
                    525:                     CreateDWordField (Arg0, 0x05, TMP)
                    526:                     Store (TMP, PRQ1)
                    527:                 }
                    528:         }
                    529:         Device(LNKC){
                    530:                 Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
                    531:                 Name(_UID, 3)
                    532:                 Name(_PRS, ResourceTemplate(){
                    533:                     Interrupt (, Level, ActiveHigh, Shared)
                    534:                         { 5, 10, 11 }
                    535:                 })
                    536:                 Method (_STA, 0, NotSerialized)
                    537:                 {
                    538:                     Store (0x0B, Local0)
                    539:                     If (And (0x80, PRQ2, Local1))
                    540:                     {
                    541:                          Store (0x09, Local0)
                    542:                     }
                    543:                     Return (Local0)
                    544:                 }
                    545:                 Method (_DIS, 0, NotSerialized)
                    546:                 {
                    547:                     Or (PRQ2, 0x80, PRQ2)
                    548:                 }
                    549:                 Method (_CRS, 0, NotSerialized)
                    550:                 {
                    551:                     Name (PRR0, ResourceTemplate ()
                    552:                     {
                    553:                         Interrupt (, Level, ActiveHigh, Shared)
                    554:                             {1}
                    555:                     })
                    556:                     CreateDWordField (PRR0, 0x05, TMP)
                    557:                     Store (PRQ2, Local0)
                    558:                     If (LLess (Local0, 0x80))
                    559:                     {
                    560:                         Store (Local0, TMP)
                    561:                     }
                    562:                     Else
                    563:                     {
                    564:                         Store (Zero, TMP)
                    565:                     }
                    566:                     Return (PRR0)
                    567:                 }
                    568:                 Method (_SRS, 1, NotSerialized)
                    569:                 {
                    570:                     CreateDWordField (Arg0, 0x05, TMP)
                    571:                     Store (TMP, PRQ2)
                    572:                 }
                    573:         }
                    574:         Device(LNKD){
                    575:                 Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
                    576:                 Name(_UID, 4)
                    577:                 Name(_PRS, ResourceTemplate(){
                    578:                     Interrupt (, Level, ActiveHigh, Shared)
                    579:                         { 5, 10, 11 }
                    580:                 })
                    581:                 Method (_STA, 0, NotSerialized)
                    582:                 {
                    583:                     Store (0x0B, Local0)
                    584:                     If (And (0x80, PRQ3, Local1))
                    585:                     {
                    586:                          Store (0x09, Local0)
                    587:                     }
                    588:                     Return (Local0)
                    589:                 }
                    590:                 Method (_DIS, 0, NotSerialized)
                    591:                 {
                    592:                     Or (PRQ3, 0x80, PRQ3)
                    593:                 }
                    594:                 Method (_CRS, 0, NotSerialized)
                    595:                 {
                    596:                     Name (PRR0, ResourceTemplate ()
                    597:                     {
                    598:                         Interrupt (, Level, ActiveHigh, Shared)
                    599:                             {1}
                    600:                     })
                    601:                     CreateDWordField (PRR0, 0x05, TMP)
                    602:                     Store (PRQ3, Local0)
                    603:                     If (LLess (Local0, 0x80))
                    604:                     {
                    605:                         Store (Local0, TMP)
                    606:                     }
                    607:                     Else
                    608:                     {
                    609:                         Store (Zero, TMP)
                    610:                     }
                    611:                     Return (PRR0)
                    612:                 }
                    613:                 Method (_SRS, 1, NotSerialized)
                    614:                 {
                    615:                     CreateDWordField (Arg0, 0x05, TMP)
                    616:                     Store (TMP, PRQ3)
                    617:                 }
                    618:         }
                    619:     }
                    620: 
                    621:     /*
                    622:      * S3 (suspend-to-ram), S4 (suspend-to-disk) and S5 (power-off) type codes:
                    623:      * must match piix4 emulation.
                    624:      */
                    625:     Name (\_S3, Package (0x04)
                    626:     {
                    627:         0x01,  /* PM1a_CNT.SLP_TYP */
                    628:         0x01,  /* PM1b_CNT.SLP_TYP */
                    629:         Zero,  /* reserved */
                    630:         Zero   /* reserved */
                    631:     })
                    632:     Name (\_S4, Package (0x04)
                    633:     {
                    634:         Zero,  /* PM1a_CNT.SLP_TYP */
                    635:         Zero,  /* PM1b_CNT.SLP_TYP */
                    636:         Zero,  /* reserved */
                    637:         Zero   /* reserved */
                    638:     })
                    639:     Name (\_S5, Package (0x04)
                    640:     {
                    641:         Zero,  /* PM1a_CNT.SLP_TYP */
                    642:         Zero,  /* PM1b_CNT.SLP_TYP */
                    643:         Zero,  /* reserved */
                    644:         Zero   /* reserved */
                    645:     })
                    646: 
                    647:     Scope (\_GPE)
                    648:     {
                    649:         Name(_HID, "ACPI0006")
                    650: 
                    651:         Method(_L00) {
                    652:             Return(0x01)
                    653:         }
                    654: 
                    655: #define gen_pci_hotplug(nr)                                       \
                    656:             If (And(\_SB.PCI0.PCIU, ShiftLeft(1, nr))) {          \
                    657:                 Notify(\_SB.PCI0.S##nr, 1)                        \
                    658:             }                                                     \
                    659:             If (And(\_SB.PCI0.PCID, ShiftLeft(1, nr))) {          \
                    660:                 Notify(\_SB.PCI0.S##nr, 3)                        \
                    661:             }
                    662: 
                    663:         Method(_L01) {
                    664:             gen_pci_hotplug(1)
                    665:             gen_pci_hotplug(2)
                    666:             gen_pci_hotplug(3)
                    667:             gen_pci_hotplug(4)
                    668:             gen_pci_hotplug(5)
                    669:             gen_pci_hotplug(6)
                    670:             gen_pci_hotplug(7)
                    671:             gen_pci_hotplug(8)
                    672:             gen_pci_hotplug(9)
                    673:             gen_pci_hotplug(10)
                    674:             gen_pci_hotplug(11)
                    675:             gen_pci_hotplug(12)
                    676:             gen_pci_hotplug(13)
                    677:             gen_pci_hotplug(14)
                    678:             gen_pci_hotplug(15)
                    679:             gen_pci_hotplug(16)
                    680:             gen_pci_hotplug(17)
                    681:             gen_pci_hotplug(18)
                    682:             gen_pci_hotplug(19)
                    683:             gen_pci_hotplug(20)
                    684:             gen_pci_hotplug(21)
                    685:             gen_pci_hotplug(22)
                    686:             gen_pci_hotplug(23)
                    687:             gen_pci_hotplug(24)
                    688:             gen_pci_hotplug(25)
                    689:             gen_pci_hotplug(26)
                    690:             gen_pci_hotplug(27)
                    691:             gen_pci_hotplug(28)
                    692:             gen_pci_hotplug(29)
                    693:             gen_pci_hotplug(30)
                    694:             gen_pci_hotplug(31)
                    695: 
                    696:             Return (0x01)
                    697: 
                    698:         }
                    699:         Method(_L02) {
                    700:             Return(0x01)
                    701:         }
                    702:         Method(_L03) {
                    703:             Return(0x01)
                    704:         }
                    705:         Method(_L04) {
                    706:             Return(0x01)
                    707:         }
                    708:         Method(_L05) {
                    709:             Return(0x01)
                    710:         }
                    711:         Method(_L06) {
                    712:             Return(0x01)
                    713:         }
                    714:         Method(_L07) {
                    715:             Return(0x01)
                    716:         }
                    717:         Method(_L08) {
                    718:             Return(0x01)
                    719:         }
                    720:         Method(_L09) {
                    721:             Return(0x01)
                    722:         }
                    723:         Method(_L0A) {
                    724:             Return(0x01)
                    725:         }
                    726:         Method(_L0B) {
                    727:             Return(0x01)
                    728:         }
                    729:         Method(_L0C) {
                    730:             Return(0x01)
                    731:         }
                    732:         Method(_L0D) {
                    733:             Return(0x01)
                    734:         }
                    735:         Method(_L0E) {
                    736:             Return(0x01)
                    737:         }
                    738:         Method(_L0F) {
                    739:             Return(0x01)
                    740:         }
                    741:     }
                    742: 
                    743: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.