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

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),
1.1.1.2   root       61:                /* Device 1 is power mgmt device, and can only use irq 9 */
1.1.1.3 ! root       62:                Package() { 0x0001ffff, 0, LNKS, 0 },
1.1.1.2   root       63:                Package() { 0x0001ffff, 1, LNKB, 0 },
                     64:                Package() { 0x0001ffff, 2, LNKC, 0 },
                     65:                Package() { 0x0001ffff, 3, LNKD, 0 },
1.1       root       66:                prt_slot2(0x0002),
                     67:                prt_slot3(0x0003),
                     68:                prt_slot0(0x0004),
                     69:                prt_slot1(0x0005),
                     70:                prt_slot2(0x0006),
                     71:                prt_slot3(0x0007),
                     72:                prt_slot0(0x0008),
                     73:                prt_slot1(0x0009),
                     74:                prt_slot2(0x000a),
                     75:                prt_slot3(0x000b),
                     76:                prt_slot0(0x000c),
                     77:                prt_slot1(0x000d),
                     78:                prt_slot2(0x000e),
                     79:                prt_slot3(0x000f),
                     80:                prt_slot0(0x0010),
                     81:                prt_slot1(0x0011),
                     82:                prt_slot2(0x0012),
                     83:                prt_slot3(0x0013),
                     84:                prt_slot0(0x0014),
                     85:                prt_slot1(0x0015),
                     86:                prt_slot2(0x0016),
                     87:                prt_slot3(0x0017),
                     88:                prt_slot0(0x0018),
                     89:                prt_slot1(0x0019),
                     90:                prt_slot2(0x001a),
                     91:                prt_slot3(0x001b),
                     92:                prt_slot0(0x001c),
                     93:                prt_slot1(0x001d),
                     94:                prt_slot2(0x001e),
                     95:                prt_slot3(0x001f),
                     96:             })
                     97: 
                     98:             OperationRegion(PCST, SystemIO, 0xae00, 0x08)
                     99:             Field (PCST, DWordAcc, NoLock, WriteAsZeros)
                    100:             {
                    101:                 PCIU, 32,
                    102:                 PCID, 32,
                    103:             }
                    104: 
                    105:             OperationRegion(SEJ, SystemIO, 0xae08, 0x04)
                    106:             Field (SEJ, DWordAcc, NoLock, WriteAsZeros)
                    107:             {
                    108:                 B0EJ, 32,
                    109:             }
                    110: 
                    111: #define hotplug_slot(name, nr) \
                    112:             Device (S##name) {                    \
                    113:                Name (_ADR, nr##0000)              \
                    114:                Method (_EJ0,1) {                  \
                    115:                     Store(ShiftLeft(1, nr), B0EJ) \
                    116:                     Return (0x0)                  \
                    117:                }                                  \
                    118:                Name (_SUN, name)                  \
                    119:             }
                    120: 
                    121:            hotplug_slot(1, 0x0001)
                    122:            hotplug_slot(2, 0x0002)
                    123:            hotplug_slot(3, 0x0003)
                    124:            hotplug_slot(4, 0x0004)
                    125:            hotplug_slot(5, 0x0005)
                    126:            hotplug_slot(6, 0x0006)
                    127:            hotplug_slot(7, 0x0007)
                    128:            hotplug_slot(8, 0x0008)
                    129:            hotplug_slot(9, 0x0009)
                    130:            hotplug_slot(10, 0x000a)
                    131:            hotplug_slot(11, 0x000b)
                    132:            hotplug_slot(12, 0x000c)
                    133:            hotplug_slot(13, 0x000d)
                    134:            hotplug_slot(14, 0x000e)
                    135:            hotplug_slot(15, 0x000f)
                    136:            hotplug_slot(16, 0x0010)
                    137:            hotplug_slot(17, 0x0011)
                    138:            hotplug_slot(18, 0x0012)
                    139:            hotplug_slot(19, 0x0013)
                    140:            hotplug_slot(20, 0x0014)
                    141:            hotplug_slot(21, 0x0015)
                    142:            hotplug_slot(22, 0x0016)
                    143:            hotplug_slot(23, 0x0017)
                    144:            hotplug_slot(24, 0x0018)
                    145:            hotplug_slot(25, 0x0019)
                    146:            hotplug_slot(26, 0x001a)
                    147:            hotplug_slot(27, 0x001b)
                    148:            hotplug_slot(28, 0x001c)
                    149:            hotplug_slot(29, 0x001d)
                    150:            hotplug_slot(30, 0x001e)
                    151:            hotplug_slot(31, 0x001f)
                    152: 
                    153:             Name (_CRS, ResourceTemplate ()
                    154:             {
                    155:                 WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
                    156:                     0x0000,             // Address Space Granularity
                    157:                     0x0000,             // Address Range Minimum
                    158:                     0x00FF,             // Address Range Maximum
                    159:                     0x0000,             // Address Translation Offset
                    160:                     0x0100,             // Address Length
                    161:                     ,, )
                    162:                 IO (Decode16,
                    163:                     0x0CF8,             // Address Range Minimum
                    164:                     0x0CF8,             // Address Range Maximum
                    165:                     0x01,               // Address Alignment
                    166:                     0x08,               // Address Length
                    167:                     )
                    168:                 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                    169:                     0x0000,             // Address Space Granularity
                    170:                     0x0000,             // Address Range Minimum
                    171:                     0x0CF7,             // Address Range Maximum
                    172:                     0x0000,             // Address Translation Offset
                    173:                     0x0CF8,             // Address Length
                    174:                     ,, , TypeStatic)
                    175:                 WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                    176:                     0x0000,             // Address Space Granularity
                    177:                     0x0D00,             // Address Range Minimum
                    178:                     0xFFFF,             // Address Range Maximum
                    179:                     0x0000,             // Address Translation Offset
                    180:                     0xF300,             // Address Length
                    181:                     ,, , TypeStatic)
                    182:                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    183:                     0x00000000,         // Address Space Granularity
                    184:                     0x000A0000,         // Address Range Minimum
                    185:                     0x000BFFFF,         // Address Range Maximum
                    186:                     0x00000000,         // Address Translation Offset
                    187:                     0x00020000,         // Address Length
                    188:                     ,, , AddressRangeMemory, TypeStatic)
                    189:                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
                    190:                     0x00000000,         // Address Space Granularity
                    191:                     0xE0000000,         // Address Range Minimum
                    192:                     0xFEBFFFFF,         // Address Range Maximum
                    193:                     0x00000000,         // Address Translation Offset
                    194:                     0x1EC00000,         // Address Length
                    195:                     ,, , AddressRangeMemory, TypeStatic)
                    196:             })
                    197:         }
                    198: 
                    199:         Device(HPET) {
                    200:             Name(_HID,  EISAID("PNP0103"))
                    201:             Name(_UID, 0)
                    202:             Method (_STA, 0, NotSerialized) {
                    203:                     Return(0x0F)
                    204:             }
                    205:             Name(_CRS, ResourceTemplate() {
                    206:                 DWordMemory(
                    207:                     ResourceConsumer, PosDecode, MinFixed, MaxFixed,
                    208:                     NonCacheable, ReadWrite,
                    209:                     0x00000000,
                    210:                     0xFED00000,
                    211:                     0xFED003FF,
                    212:                     0x00000000,
                    213:                     0x00000400 /* 1K memory: FED00000 - FED003FF */
                    214:                 )
                    215:             })
                    216:         }
                    217:     }
                    218: 
                    219:     Scope(\_SB.PCI0) {
                    220:         Device (VGA) {
                    221:                  Name (_ADR, 0x00020000)
                    222:                  Method (_S1D, 0, NotSerialized)
                    223:                  {
                    224:                          Return (0x00)
                    225:                  }
                    226:                  Method (_S2D, 0, NotSerialized)
                    227:                  {
                    228:                          Return (0x00)
                    229:                  }
                    230:                  Method (_S3D, 0, NotSerialized)
                    231:                  {
                    232:                          Return (0x00)
                    233:                  }
                    234:         }
                    235: 
                    236:        /* PIIX3 ISA bridge */
                    237:         Device (ISA) {
                    238:             Name (_ADR, 0x00010000)
                    239: 
                    240:             /* PIIX PCI to ISA irq remapping */
                    241:             OperationRegion (P40C, PCI_Config, 0x60, 0x04)
                    242: 
                    243:             /* Real-time clock */
                    244:             Device (RTC)
                    245:             {
                    246:                 Name (_HID, EisaId ("PNP0B00"))
                    247:                 Name (_CRS, ResourceTemplate ()
                    248:                 {
                    249:                     IO (Decode16, 0x0070, 0x0070, 0x10, 0x02)
                    250:                     IRQNoFlags () {8}
                    251:                     IO (Decode16, 0x0072, 0x0072, 0x02, 0x06)
                    252:                 })
                    253:             }
                    254: 
                    255:             /* Keyboard seems to be important for WinXP install */
                    256:             Device (KBD)
                    257:             {
                    258:                 Name (_HID, EisaId ("PNP0303"))
                    259:                 Method (_STA, 0, NotSerialized)
                    260:                 {
                    261:                     Return (0x0f)
                    262:                 }
                    263: 
                    264:                 Method (_CRS, 0, NotSerialized)
                    265:                 {
                    266:                      Name (TMP, ResourceTemplate ()
                    267:                      {
                    268:                     IO (Decode16,
                    269:                         0x0060,             // Address Range Minimum
                    270:                         0x0060,             // Address Range Maximum
                    271:                         0x01,               // Address Alignment
                    272:                         0x01,               // Address Length
                    273:                         )
                    274:                     IO (Decode16,
                    275:                         0x0064,             // Address Range Minimum
                    276:                         0x0064,             // Address Range Maximum
                    277:                         0x01,               // Address Alignment
                    278:                         0x01,               // Address Length
                    279:                         )
                    280:                     IRQNoFlags ()
                    281:                         {1}
                    282:                     })
                    283:                     Return (TMP)
                    284:                 }
                    285:             }
                    286: 
                    287:            /* PS/2 mouse */
                    288:             Device (MOU)
                    289:             {
                    290:                 Name (_HID, EisaId ("PNP0F13"))
                    291:                 Method (_STA, 0, NotSerialized)
                    292:                 {
                    293:                     Return (0x0f)
                    294:                 }
                    295: 
                    296:                 Method (_CRS, 0, NotSerialized)
                    297:                 {
                    298:                     Name (TMP, ResourceTemplate ()
                    299:                     {
                    300:                          IRQNoFlags () {12}
                    301:                     })
                    302:                     Return (TMP)
                    303:                 }
                    304:             }
                    305: 
                    306:            /* PS/2 floppy controller */
                    307:            Device (FDC0)
                    308:            {
                    309:                Name (_HID, EisaId ("PNP0700"))
                    310:                Method (_STA, 0, NotSerialized)
                    311:                {
                    312:                    Return (0x0F)
                    313:                }
                    314:                Method (_CRS, 0, NotSerialized)
                    315:                {
                    316:                    Name (BUF0, ResourceTemplate ()
                    317:                     {
                    318:                         IO (Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
                    319:                         IO (Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
                    320:                         IRQNoFlags () {6}
                    321:                         DMA (Compatibility, NotBusMaster, Transfer8) {2}
                    322:                     })
                    323:                    Return (BUF0)
                    324:                }
                    325:            }
                    326: 
                    327:            /* Parallel port */
                    328:            Device (LPT)
                    329:            {
                    330:                Name (_HID, EisaId ("PNP0400"))
                    331:                Method (_STA, 0, NotSerialized)
                    332:                {
                    333:                    Store (\_SB.PCI0.PX13.DRSA, Local0)
                    334:                    And (Local0, 0x80000000, Local0)
                    335:                    If (LEqual (Local0, 0))
                    336:                    {
                    337:                        Return (0x00)
                    338:                    }
                    339:                    Else
                    340:                    {
                    341:                        Return (0x0F)
                    342:                    }
                    343:                }
                    344:                Method (_CRS, 0, NotSerialized)
                    345:                {
                    346:                    Name (BUF0, ResourceTemplate ()
                    347:                     {
                    348:                        IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
                    349:                        IRQNoFlags () {7}
                    350:                    })
                    351:                    Return (BUF0)
                    352:                }
                    353:            }
                    354: 
                    355:            /* Serial Ports */
                    356:            Device (COM1)
                    357:            {
                    358:                Name (_HID, EisaId ("PNP0501"))
                    359:                Name (_UID, 0x01)
                    360:                Method (_STA, 0, NotSerialized)
                    361:                {
                    362:                    Store (\_SB.PCI0.PX13.DRSC, Local0)
                    363:                    And (Local0, 0x08000000, Local0)
                    364:                    If (LEqual (Local0, 0))
                    365:                    {
                    366:                        Return (0x00)
                    367:                    }
                    368:                    Else
                    369:                    {
                    370:                        Return (0x0F)
                    371:                    }
                    372:                }
                    373:                Method (_CRS, 0, NotSerialized)
                    374:                {
                    375:                    Name (BUF0, ResourceTemplate ()
                    376:                     {
                    377:                        IO (Decode16, 0x03F8, 0x03F8, 0x00, 0x08)
                    378:                        IRQNoFlags () {4}
                    379:                    })
                    380:                    Return (BUF0)
                    381:                }
                    382:            }
                    383: 
                    384:            Device (COM2)
                    385:            {
                    386:                Name (_HID, EisaId ("PNP0501"))
                    387:                Name (_UID, 0x02)
                    388:                Method (_STA, 0, NotSerialized)
                    389:                {
                    390:                    Store (\_SB.PCI0.PX13.DRSC, Local0)
                    391:                    And (Local0, 0x80000000, Local0)
                    392:                    If (LEqual (Local0, 0))
                    393:                    {
                    394:                        Return (0x00)
                    395:                    }
                    396:                    Else
                    397:                    {
                    398:                        Return (0x0F)
                    399:                    }
                    400:                }
                    401:                Method (_CRS, 0, NotSerialized)
                    402:                {
                    403:                    Name (BUF0, ResourceTemplate ()
                    404:                     {
                    405:                        IO (Decode16, 0x02F8, 0x02F8, 0x00, 0x08)
                    406:                        IRQNoFlags () {3}
                    407:                    })
                    408:                    Return (BUF0)
                    409:                }
                    410:            }
                    411:         }
                    412: 
                    413:        /* PIIX4 PM */
                    414:         Device (PX13) {
                    415:            Name (_ADR, 0x00010003)
                    416: 
                    417:            OperationRegion (P13C, PCI_Config, 0x5c, 0x24)
                    418:            Field (P13C, DWordAcc, NoLock, Preserve)
                    419:            {
                    420:                DRSA, 32,
                    421:                DRSB, 32,
                    422:                DRSC, 32,
                    423:                DRSE, 32,
                    424:                DRSF, 32,
                    425:                DRSG, 32,
                    426:                DRSH, 32,
                    427:                DRSI, 32,
                    428:                DRSJ, 32
                    429:            }
                    430:        }
                    431:     }
                    432: 
                    433:     /* PCI IRQs */
                    434:     Scope(\_SB) {
                    435:          Field (\_SB.PCI0.ISA.P40C, ByteAcc, NoLock, Preserve)
                    436:          {
                    437:              PRQ0,   8,
                    438:              PRQ1,   8,
                    439:              PRQ2,   8,
                    440:              PRQ3,   8
                    441:          }
                    442: 
                    443:         Device(LNKA){
                    444:                 Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
                    445:                 Name(_UID, 1)
                    446:                 Name(_PRS, ResourceTemplate(){
                    447:                     Interrupt (, Level, ActiveHigh, Shared)
                    448:                         { 5, 10, 11 }
                    449:                 })
                    450:                 Method (_STA, 0, NotSerialized)
                    451:                 {
                    452:                     Store (0x0B, Local0)
                    453:                     If (And (0x80, PRQ0, Local1))
                    454:                     {
                    455:                          Store (0x09, Local0)
                    456:                     }
                    457:                     Return (Local0)
                    458:                 }
                    459:                 Method (_DIS, 0, NotSerialized)
                    460:                 {
                    461:                     Or (PRQ0, 0x80, PRQ0)
                    462:                 }
                    463:                 Method (_CRS, 0, NotSerialized)
                    464:                 {
                    465:                     Name (PRR0, ResourceTemplate ()
                    466:                     {
                    467:                         Interrupt (, Level, ActiveHigh, Shared)
                    468:                             {1}
                    469:                     })
                    470:                     CreateDWordField (PRR0, 0x05, TMP)
                    471:                     Store (PRQ0, Local0)
                    472:                     If (LLess (Local0, 0x80))
                    473:                     {
                    474:                         Store (Local0, TMP)
                    475:                     }
                    476:                     Else
                    477:                     {
                    478:                         Store (Zero, TMP)
                    479:                     }
                    480:                     Return (PRR0)
                    481:                 }
                    482:                 Method (_SRS, 1, NotSerialized)
                    483:                 {
                    484:                     CreateDWordField (Arg0, 0x05, TMP)
                    485:                     Store (TMP, PRQ0)
                    486:                 }
                    487:         }
                    488:         Device(LNKB){
                    489:                 Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
                    490:                 Name(_UID, 2)
                    491:                 Name(_PRS, ResourceTemplate(){
                    492:                     Interrupt (, Level, ActiveHigh, Shared)
                    493:                         { 5, 10, 11 }
                    494:                 })
                    495:                 Method (_STA, 0, NotSerialized)
                    496:                 {
                    497:                     Store (0x0B, Local0)
                    498:                     If (And (0x80, PRQ1, Local1))
                    499:                     {
                    500:                          Store (0x09, Local0)
                    501:                     }
                    502:                     Return (Local0)
                    503:                 }
                    504:                 Method (_DIS, 0, NotSerialized)
                    505:                 {
                    506:                     Or (PRQ1, 0x80, PRQ1)
                    507:                 }
                    508:                 Method (_CRS, 0, NotSerialized)
                    509:                 {
                    510:                     Name (PRR0, ResourceTemplate ()
                    511:                     {
                    512:                         Interrupt (, Level, ActiveHigh, Shared)
                    513:                             {1}
                    514:                     })
                    515:                     CreateDWordField (PRR0, 0x05, TMP)
                    516:                     Store (PRQ1, Local0)
                    517:                     If (LLess (Local0, 0x80))
                    518:                     {
                    519:                         Store (Local0, TMP)
                    520:                     }
                    521:                     Else
                    522:                     {
                    523:                         Store (Zero, TMP)
                    524:                     }
                    525:                     Return (PRR0)
                    526:                 }
                    527:                 Method (_SRS, 1, NotSerialized)
                    528:                 {
                    529:                     CreateDWordField (Arg0, 0x05, TMP)
                    530:                     Store (TMP, PRQ1)
                    531:                 }
                    532:         }
                    533:         Device(LNKC){
                    534:                 Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
                    535:                 Name(_UID, 3)
                    536:                 Name(_PRS, ResourceTemplate(){
                    537:                     Interrupt (, Level, ActiveHigh, Shared)
                    538:                         { 5, 10, 11 }
                    539:                 })
                    540:                 Method (_STA, 0, NotSerialized)
                    541:                 {
                    542:                     Store (0x0B, Local0)
                    543:                     If (And (0x80, PRQ2, Local1))
                    544:                     {
                    545:                          Store (0x09, Local0)
                    546:                     }
                    547:                     Return (Local0)
                    548:                 }
                    549:                 Method (_DIS, 0, NotSerialized)
                    550:                 {
                    551:                     Or (PRQ2, 0x80, PRQ2)
                    552:                 }
                    553:                 Method (_CRS, 0, NotSerialized)
                    554:                 {
                    555:                     Name (PRR0, ResourceTemplate ()
                    556:                     {
                    557:                         Interrupt (, Level, ActiveHigh, Shared)
                    558:                             {1}
                    559:                     })
                    560:                     CreateDWordField (PRR0, 0x05, TMP)
                    561:                     Store (PRQ2, Local0)
                    562:                     If (LLess (Local0, 0x80))
                    563:                     {
                    564:                         Store (Local0, TMP)
                    565:                     }
                    566:                     Else
                    567:                     {
                    568:                         Store (Zero, TMP)
                    569:                     }
                    570:                     Return (PRR0)
                    571:                 }
                    572:                 Method (_SRS, 1, NotSerialized)
                    573:                 {
                    574:                     CreateDWordField (Arg0, 0x05, TMP)
                    575:                     Store (TMP, PRQ2)
                    576:                 }
                    577:         }
                    578:         Device(LNKD){
                    579:                 Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
                    580:                 Name(_UID, 4)
                    581:                 Name(_PRS, ResourceTemplate(){
                    582:                     Interrupt (, Level, ActiveHigh, Shared)
                    583:                         { 5, 10, 11 }
                    584:                 })
                    585:                 Method (_STA, 0, NotSerialized)
                    586:                 {
                    587:                     Store (0x0B, Local0)
                    588:                     If (And (0x80, PRQ3, Local1))
                    589:                     {
                    590:                          Store (0x09, Local0)
                    591:                     }
                    592:                     Return (Local0)
                    593:                 }
                    594:                 Method (_DIS, 0, NotSerialized)
                    595:                 {
                    596:                     Or (PRQ3, 0x80, PRQ3)
                    597:                 }
                    598:                 Method (_CRS, 0, NotSerialized)
                    599:                 {
                    600:                     Name (PRR0, ResourceTemplate ()
                    601:                     {
                    602:                         Interrupt (, Level, ActiveHigh, Shared)
                    603:                             {1}
                    604:                     })
                    605:                     CreateDWordField (PRR0, 0x05, TMP)
                    606:                     Store (PRQ3, Local0)
                    607:                     If (LLess (Local0, 0x80))
                    608:                     {
                    609:                         Store (Local0, TMP)
                    610:                     }
                    611:                     Else
                    612:                     {
                    613:                         Store (Zero, TMP)
                    614:                     }
                    615:                     Return (PRR0)
                    616:                 }
                    617:                 Method (_SRS, 1, NotSerialized)
                    618:                 {
                    619:                     CreateDWordField (Arg0, 0x05, TMP)
                    620:                     Store (TMP, PRQ3)
                    621:                 }
                    622:         }
1.1.1.3 ! root      623:         Device(LNKS){
        !           624:                 Name(_HID, EISAID("PNP0C0F"))     // PCI interrupt link
        !           625:                 Name(_UID, 5)
        !           626:                 Name(_PRS, ResourceTemplate(){
        !           627:                     Interrupt (, Level, ActiveHigh, Shared)
        !           628:                         { 9 }
        !           629:                 })
        !           630:                 Method (_STA, 0, NotSerialized)
        !           631:                 {
        !           632:                     Store (0x0B, Local0)
        !           633:                     If (And (0x80, PRQ0, Local1))
        !           634:                     {
        !           635:                          Store (0x09, Local0)
        !           636:                     }
        !           637:                     Return (Local0)
        !           638:                 }
        !           639:                 Method (_DIS, 0, NotSerialized)
        !           640:                 {
        !           641:                     Or (PRQ0, 0x80, PRQ0)
        !           642:                 }
        !           643:                 Method (_CRS, 0, NotSerialized)
        !           644:                 {
        !           645:                     Name (PRR0, ResourceTemplate ()
        !           646:                     {
        !           647:                         Interrupt (, Level, ActiveHigh, Shared)
        !           648:                             {9}
        !           649:                     })
        !           650:                     CreateDWordField (PRR0, 0x05, TMP)
        !           651:                     Store (PRQ0, Local0)
        !           652:                     If (LLess (Local0, 0x80))
        !           653:                     {
        !           654:                         Store (Local0, TMP)
        !           655:                     }
        !           656:                     Else
        !           657:                     {
        !           658:                         Store (Zero, TMP)
        !           659:                     }
        !           660:                     Return (PRR0)
        !           661:                 }
        !           662:         }
1.1       root      663:     }
                    664: 
                    665:     /*
                    666:      * S3 (suspend-to-ram), S4 (suspend-to-disk) and S5 (power-off) type codes:
                    667:      * must match piix4 emulation.
                    668:      */
                    669:     Name (\_S3, Package (0x04)
                    670:     {
                    671:         0x01,  /* PM1a_CNT.SLP_TYP */
                    672:         0x01,  /* PM1b_CNT.SLP_TYP */
                    673:         Zero,  /* reserved */
                    674:         Zero   /* reserved */
                    675:     })
                    676:     Name (\_S4, Package (0x04)
                    677:     {
                    678:         Zero,  /* PM1a_CNT.SLP_TYP */
                    679:         Zero,  /* PM1b_CNT.SLP_TYP */
                    680:         Zero,  /* reserved */
                    681:         Zero   /* reserved */
                    682:     })
                    683:     Name (\_S5, Package (0x04)
                    684:     {
                    685:         Zero,  /* PM1a_CNT.SLP_TYP */
                    686:         Zero,  /* PM1b_CNT.SLP_TYP */
                    687:         Zero,  /* reserved */
                    688:         Zero   /* reserved */
                    689:     })
                    690: 
1.1.1.3 ! root      691:     /* CPU hotplug */
        !           692:     Scope(\_SB) {
        !           693:         /* Objects filled in by run-time generated SSDT */
        !           694:         External(NTFY, MethodObj)
        !           695:         External(CPON, PkgObj)
        !           696: 
        !           697:         /* Methods called by run-time generated SSDT Processor objects */
        !           698:         Method (CPMA, 1, NotSerialized) {
        !           699:             // _MAT method - create an madt apic buffer
        !           700:             // Local0 = CPON flag for this cpu
        !           701:             Store(DerefOf(Index(CPON, Arg0)), Local0)
        !           702:             // Local1 = Buffer (in madt apic form) to return
        !           703:             Store(Buffer(8) {0x00, 0x08, 0x00, 0x00, 0x00, 0, 0, 0}, Local1)
        !           704:             // Update the processor id, lapic id, and enable/disable status
        !           705:             Store(Arg0, Index(Local1, 2))
        !           706:             Store(Arg0, Index(Local1, 3))
        !           707:             Store(Local0, Index(Local1, 4))
        !           708:             Return (Local1)
        !           709:         }
        !           710:         Method (CPST, 1, NotSerialized) {
        !           711:             // _STA method - return ON status of cpu
        !           712:             // Local0 = CPON flag for this cpu
        !           713:             Store(DerefOf(Index(CPON, Arg0)), Local0)
        !           714:             If (Local0) { Return(0xF) } Else { Return(0x0) }
        !           715:         }
        !           716:         Method (CPEJ, 2, NotSerialized) {
        !           717:             // _EJ0 method - eject callback
        !           718:             Sleep(200)
        !           719:         }
        !           720: 
        !           721:         /* CPU hotplug notify method */
        !           722:         OperationRegion(PRST, SystemIO, 0xaf00, 32)
        !           723:         Field (PRST, ByteAcc, NoLock, Preserve)
        !           724:         {
        !           725:             PRS, 256
        !           726:         }
        !           727:         Method(PRSC, 0) {
        !           728:             // Local5 = active cpu bitmap
        !           729:             Store (PRS, Local5)
        !           730:             // Local2 = last read byte from bitmap
        !           731:             Store (Zero, Local2)
        !           732:             // Local0 = cpuid iterator
        !           733:             Store (Zero, Local0)
        !           734:             While (LLess(Local0, SizeOf(CPON))) {
        !           735:                 // Local1 = CPON flag for this cpu
        !           736:                 Store(DerefOf(Index(CPON, Local0)), Local1)
        !           737:                 If (And(Local0, 0x07)) {
        !           738:                     // Shift down previously read bitmap byte
        !           739:                     ShiftRight(Local2, 1, Local2)
        !           740:                 } Else {
        !           741:                     // Read next byte from cpu bitmap
        !           742:                     Store(DerefOf(Index(Local5, ShiftRight(Local0, 3))), Local2)
        !           743:                 }
        !           744:                 // Local3 = active state for this cpu
        !           745:                 Store(And(Local2, 1), Local3)
        !           746: 
        !           747:                 If (LNotEqual(Local1, Local3)) {
        !           748:                     // State change - update CPON with new state
        !           749:                     Store(Local3, Index(CPON, Local0))
        !           750:                     // Do CPU notify
        !           751:                     If (LEqual(Local3, 1)) {
        !           752:                         NTFY(Local0, 1)
        !           753:                     } Else {
        !           754:                         NTFY(Local0, 3)
        !           755:                     }
        !           756:                 }
        !           757:                 Increment(Local0)
        !           758:             }
        !           759:             Return(One)
        !           760:         }
        !           761:     }
        !           762: 
1.1       root      763:     Scope (\_GPE)
                    764:     {
                    765:         Name(_HID, "ACPI0006")
                    766: 
                    767:         Method(_L00) {
                    768:             Return(0x01)
                    769:         }
                    770: 
                    771: #define gen_pci_hotplug(nr)                                       \
                    772:             If (And(\_SB.PCI0.PCIU, ShiftLeft(1, nr))) {          \
                    773:                 Notify(\_SB.PCI0.S##nr, 1)                        \
                    774:             }                                                     \
                    775:             If (And(\_SB.PCI0.PCID, ShiftLeft(1, nr))) {          \
                    776:                 Notify(\_SB.PCI0.S##nr, 3)                        \
                    777:             }
                    778: 
                    779:         Method(_L01) {
                    780:             gen_pci_hotplug(1)
                    781:             gen_pci_hotplug(2)
                    782:             gen_pci_hotplug(3)
                    783:             gen_pci_hotplug(4)
                    784:             gen_pci_hotplug(5)
                    785:             gen_pci_hotplug(6)
                    786:             gen_pci_hotplug(7)
                    787:             gen_pci_hotplug(8)
                    788:             gen_pci_hotplug(9)
                    789:             gen_pci_hotplug(10)
                    790:             gen_pci_hotplug(11)
                    791:             gen_pci_hotplug(12)
                    792:             gen_pci_hotplug(13)
                    793:             gen_pci_hotplug(14)
                    794:             gen_pci_hotplug(15)
                    795:             gen_pci_hotplug(16)
                    796:             gen_pci_hotplug(17)
                    797:             gen_pci_hotplug(18)
                    798:             gen_pci_hotplug(19)
                    799:             gen_pci_hotplug(20)
                    800:             gen_pci_hotplug(21)
                    801:             gen_pci_hotplug(22)
                    802:             gen_pci_hotplug(23)
                    803:             gen_pci_hotplug(24)
                    804:             gen_pci_hotplug(25)
                    805:             gen_pci_hotplug(26)
                    806:             gen_pci_hotplug(27)
                    807:             gen_pci_hotplug(28)
                    808:             gen_pci_hotplug(29)
                    809:             gen_pci_hotplug(30)
                    810:             gen_pci_hotplug(31)
                    811: 
                    812:             Return (0x01)
                    813: 
                    814:         }
                    815:         Method(_L02) {
1.1.1.3 ! root      816:             // CPU hotplug event
        !           817:             Return(\_SB.PRSC())
1.1       root      818:         }
                    819:         Method(_L03) {
                    820:             Return(0x01)
                    821:         }
                    822:         Method(_L04) {
                    823:             Return(0x01)
                    824:         }
                    825:         Method(_L05) {
                    826:             Return(0x01)
                    827:         }
                    828:         Method(_L06) {
                    829:             Return(0x01)
                    830:         }
                    831:         Method(_L07) {
                    832:             Return(0x01)
                    833:         }
                    834:         Method(_L08) {
                    835:             Return(0x01)
                    836:         }
                    837:         Method(_L09) {
                    838:             Return(0x01)
                    839:         }
                    840:         Method(_L0A) {
                    841:             Return(0x01)
                    842:         }
                    843:         Method(_L0B) {
                    844:             Return(0x01)
                    845:         }
                    846:         Method(_L0C) {
                    847:             Return(0x01)
                    848:         }
                    849:         Method(_L0D) {
                    850:             Return(0x01)
                    851:         }
                    852:         Method(_L0E) {
                    853:             Return(0x01)
                    854:         }
                    855:         Method(_L0F) {
                    856:             Return(0x01)
                    857:         }
                    858:     }
                    859: 
                    860: }

unix.superglobalmegacorp.com

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