Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch/x86/x86



# Joerg Sonnenberger 2008-06-02:
> On Mon, Jun 02, 2008 at 06:16:04PM +0200, Jachym Holecek wrote:
> > I have no clue about ACPI, but this breaks on my Fujitsu S6410 (amd64):
> > '_BBN' reads as zero so the code tries to look at '_ADR' and fails

Actually, I think attempt to read '_BBN' failed too, but I've since
removed the debug printfs.

> > resulting in the "broken _BBN" panic. Booting with ACPI disabled
> > (from bootloader) hangs the machine hard halfway through configure().
> 
> Can you provide me with the DSDT? A PCI bridge certainly should have a
> _ADR field.

Sure, see below.

        -- Jachym

DefinitionBlock ("acpi_dst.aml", "DSDT", 0x1, "FUJ", "FJNB1D3", 0x1230000)
{
Name(BIDT, Buffer(0x10) {0x0, 0x1, 0x2, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
0x0, 0x0, 0x0, 0x4, 0x0 })
Name(BMNT, Package(0x05) {
    "CP345705",
    "CP345713",
    "CP345721",
    "CP345729",
    "CP245392",
})
Name(BMST, Package(0x05) {
    "CP345705",
    "CP345713",
    "CP345721",
    "CP345729",
    "CP245392",
})
Scope(\_SB) {
    Name(OSTB, Ones)
    OperationRegion(OSTY, SystemMemory, 0x7f6e2ee6, 0x00000001)
    Field(OSTY, AnyAcc, NoLock, Preserve) {
        TPOS,   8
    }
    Method(OSTP) {
        If(LEqual(^OSTB, Ones)) {
            If(CondRefOf(\_OSI, Local0)) {
                If(\_OSI("Windows\x202006")) {
                    Store(0x40, ^OSTB)
                    Store(0x40, ^TPOS)
                }
                Else {
                    If(\_OSI("Windows\x202001.1")) {
                        Store(0x20, ^OSTB)
                        Store(0x20, ^TPOS)
                    }
                    Else {
                        If(\_OSI("Windows\x202001\x20SP1")) {
                            Store(0x10, ^OSTB)
                            Store(0x10, ^TPOS)
                        }
                        Else {
                            If(\_OSI("Windows\x202001")) {
                                Store(0x08, ^OSTB)
                                Store(0x08, ^TPOS)
                            }
                            Else {
                                Store(0x00, ^OSTB)
                                Store(0x00, ^TPOS)
                            }
                        }
                    }
                }
            }
            Else {
                If(CondRefOf(\_OS, Local0)) {
                    If(^SEQL(\_OS, "Microsoft\x20Windows")) {
                        Store(0x01, ^OSTB)
                        Store(0x01, ^TPOS)
                    }
                    Else {
                        If(^SEQL(\_OS, 
"Microsoft\x20WindowsME\x3a\x20Millennium\x20Edition")) {
                            Store(0x02, ^OSTB)
                            Store(0x02, ^TPOS)
                        }
                        Else {
                            If(^SEQL(\_OS, "Microsoft\x20Windows\x20NT")) {
                                Store(0x04, ^OSTB)
                                Store(0x04, ^TPOS)
                            }
                            Else {
                                Store(0x00, ^OSTB)
                                Store(0x00, ^TPOS)
                            }
                        }
                    }
                }
                Else {
                    Store(0x00, ^OSTB)
                    Store(0x00, ^TPOS)
                }
            }
        }
        Return(^OSTB)
    }
    Method(SEQL, 2, Serialized) {
        Store(SizeOf(Arg0), Local0)
        Store(SizeOf(Arg1), Local1)
        If(LNot(LEqual(Local0, Local1))) {
            Return(Zero)
        }
        Name(BUF0, Buffer(Local0) { })
        Store(Arg0, BUF0)
        Name(BUF1, Buffer(Local0) { })
        Store(Arg1, BUF1)
        Store(Zero, Local2)
        While(LLess(Local2, Local0)) {
            Store(DerefOf(Index(BUF0, Local2, )), Local3)
            Store(DerefOf(Index(BUF1, Local2, )), Local4)
            If(LNot(LEqual(Local3, Local4))) {
                Return(Zero)
            }
            Increment(Local2)
        }
        Return(One)
    }
}
Scope(\_SB) {
    OperationRegion(SMI0, SystemIO, 0x00000f40, 0x00000002)
    OperationRegion(SMI1, SystemMemory, 0x7f6e2e56, 0x00000090)
    OperationRegion(IO80, SystemIO, 0x80, 0x01)
    Scope(\) {
        Field(\_SB.SMI0, AnyAcc, NoLock, Preserve) {
            SMIC,       8
        }
        Field(\_SB.SMI1, AnyAcc, NoLock, Preserve) {
            BCMD,       8,
            DID,        32,
            INFO,       1024
        }
        Field(\_SB.SMI1, AnyAcc, NoLock, Preserve) {
            AccessAs(ByteAcc, 0),
            Offset(0x5),
            INF,        8
        }
        Field(\_SB.SMI1, ByteAcc, NoLock, Preserve) {
            Offset(0x5),
            PIID,       320
        }
        Field(\_SB.IO80, ByteAcc, NoLock, Preserve) {
            PO80,       8
        }
    }
    OperationRegion(OEMT, SystemMemory, 0x7f6e2f8c, 0x00000020)
    OperationRegion(SYSC, SystemMemory, 0x7f6e2f66, 0x0000000a)
    OperationRegion(VDEX, SystemMemory, 0x7f6e2f56, 0x00000010)
    OperationRegion(BTNC, SystemMemory, 0x7f6e2fac, 0x00000010)
    OperationRegion(THZN, SystemMemory, 0x7f6e2f70, 0x00000010)
    OperationRegion(VIST, SystemMemory, 0x7f6e2a9f, 0x000003b7)
    OperationRegion(QBC, SystemMemory, 0x7f6e2f80, 0x0000000c)
    Scope(\) {
        Field(\_SB.OEMT, ByteAcc, NoLock, Preserve) {
            SPAF,       2,
            SPBF,       2,
            PPF,        3,
            FDCF,       1,
            SIDF,       2,
            IMTF,       1,
            BLEN,       1,
            WLEN,       1,
            BTEX,       1,
            Offset(0x4),
            WAPB,       1,
            ,   1,
            INTV,       1,
            ,   1,
            PSNM,       4,
            FPEF,       1,
            CPSF,       1,
            FPMN,       1,
            Offset(0x8),
            FWHM,       1,
            NOE1,       1,
            TPMF,       2,
            CPBL,       1,
            FSCM,       1,
            RPCP,       1,
            MNC0,       1,
            MNC1,       1,
            UMT0,       1,
            HWPM,       1,
            TBPC,       1,
            AS34,       1,
            DGEX,       1,
            BMEN,       1,
            RBSN,       1,
            BIFL,       8,
            DCLW,       7,
            Offset(0xc),
            LCDL,       8,
            CUOV,       8,
            CDOV,       8,
            TCOV,       1,
            FCCT,       1,
            FDLT,       2,
            TJ85,       1,
            LEDF,       1,
            IDEC,       1,
            FCC2,       1,
            FDS0,       4,
            FDS1,       4,
            TOFF,       8,
            MFST,       8,
            RPPC,       3,
            CMIN,       3,
            Offset(0x14),
            RSV1,       8,
            DNC4,       1,
            DNCR,       1
        }
        Field(\_SB.SYSC, ByteAcc, NoLock, Preserve) {
            BHKF,       1,
            ,   2,
            MHKF,       1,
            ,   3,
            VHKF,       1,
            BLLM,       8,
            BLLT,       64
        }
        Field(\_SB.SYSC, ByteAcc, NoLock, Preserve) {
            AHKF,       8
        }
        Field(\_SB.VDEX, ByteAcc, NoLock, Preserve) {
            ADOS,       3,
            CLCD,       1,
            ALCD,       1,
            CCRT,       1,
            ACRT,       1,
            CTV,        1,
            ATV,        1,
            CDVI,       1,
            ADVI,       1,
            DSWF,       2,
            BSWF,       2,
            LSWF,       1
        }
        Field(\_SB.BTNC, ByteAcc, NoLock, Preserve) {
            IRBF,       1,
            ,   4,
            SEKF,       1,
            SCKF,       1,
            NGTF,       1,
            Offset(0x4),
            IRBC,       16
        }
        Field(\_SB.THZN, ByteAcc, NoLock, Preserve) {
            DTS1,       8,
            DTS2,       8,
            CRTT,       8,
            PSVT,       8,
            TC1V,       4,
            TC2V,       4,
            TSPV,       4,
            MPEN,       1,
            DTSE,       1,
            PTCE,       1
        }
        Field(\_SB.QBC, ByteAcc, NoLock, Preserve) {
            QAG1,       32,
            QAG2,       32,
            QAG3,       32
        }
    }
}
Name(FWSO, 0x00)
Name(RPEN, Zero)
Name(RPDS, Zero)
Name(SSTA, Zero)
Name(VSTH, Zero)
Name(LEDI, Zero)
Name(BTNI, Zero)
Name(NGTI, 0x06)
Name(ECCI, 0x76)
Name(GINT, Zero)
Name(FCCI, 0x02)
Name(FNUM, 0x02)
Name(PLWM, Zero)
Name(PTAL, Zero)
Name(DPCI, One)
Name(DPCS, Zero)
Name(HDWA, Zero)
Name(TMIF, Zero)
Name(F5HF, Zero)
Scope(\_PR) {
    Processor(CPU0, 0, 0x1010, 0x6) {
    }
    Processor(CPU1, 1, 0x1010, 0x6) {
    }
    Method(CSTC) {
        If(LNot(And(And(PDC0, PDC1, ), 0x80000000, ))) {
            If(And(CFGD, 0x01000000, )) {
                If(And(PDC0, 0x18, )) {
                    Notify(\_PR.CPU0, 0x81)
                }
                If(And(PDC1, 0x18, )) {
                    Notify(\_PR.CPU1, 0x81)
                }
            }
            Else {
                Notify(\_PR.CPU0, 0x81)
            }
        }
    }
}
Name(\GPIC, 0x00)
Method(\_PIC, 1) {
    Store(Arg0, GPIC)
}
Scope(\_SB) {
    OperationRegion(TCG1, SystemMemory, 0x7f6e0a8c, 0x00000007)
    Field(TCG1, AnyAcc, NoLock, Preserve) {
        PPRQ,   8,
        PPLO,   8,
        PPRP,   8,
        PPOR,   8,
        TPRS,   8,
        TPMV,   8,
        MOR,    8
    }
    Method(PHSR, 1, Serialized) {
        Store(Arg0, BCMD)
        Store(Zero, DID)
        Store(Zero, SMIC)
        If(LEqual(BCMD, Arg0)) {
        }
        Store(Zero, BCMD)
        Store(Zero, DID)
        Return(0x00)
    }
    Method(_INI) {
        \_SB.OSTP()
        If(LNot(LLess(\_SB.OSTP(), 0x40))) {
            Load(VIST, VSTH)
        }
        \_SB.FEXT.BINI()
        \_SB.PCI0.LPCB.TINI()
    }
    Device(PCI0) {
        Method(_S3D) {
            Return(0x02)
        }
        Method(_S4D) {
            Return(0x02)
        }
        Name(_HID, 0x080ad041)
        Name(_CID, 0x030ad041)
        Device(MCHC) {
            Name(_ADR, 0x00)
            OperationRegion(HBUS, PCI_Config, 0x40, 0xc0)
            Field(HBUS, DWordAcc, NoLock, Preserve) {
                EPEN,   1,
                ,       11,
                EPBR,   20,
                Offset(0x8),
                MHEN,   1,
                ,       13,
                MHBR,   18,
                Offset(0x20),
                PXEN,   1,
                PXSZ,   2,
                ,       23,
                PXBR,   6,
                Offset(0x28),
                DIEN,   1,
                ,       11,
                DIBR,   20,
                Offset(0x30),
                IPEN,   1,
                ,       11,
                IPBR,   20,
                Offset(0x50),
                ,       4,
                PM0H,   2,
                Offset(0x51),
                PM1L,   2,
                ,       2,
                PM1H,   2,
                Offset(0x52),
                PM2L,   2,
                ,       2,
                PM2H,   2,
                Offset(0x53),
                PM3L,   2,
                ,       2,
                PM3H,   2,
                Offset(0x54),
                PM4L,   2,
                ,       2,
                PM4H,   2,
                Offset(0x55),
                PM5L,   2,
                ,       2,
                PM5H,   2,
                Offset(0x56),
                PM6L,   2,
                ,       2,
                PM6H,   2,
                Offset(0x57),
                ,       7,
                HENA,   1,
                Offset(0x62),
                TUUD,   16,
                Offset(0x70),
                ,       4,
                TLUD,   12
            }
        }
        Name(BUF0, Buffer(0x01ee) {0x88, 0xd, 0x0, 0x2, 0xc, 0x0, 0x0, 0x0, 
0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x1, 0x87, 0x17, 0x0, 0x1, 0xc, 0x3, 0x0, 
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf7, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
0xf8, 0xc, 0x0, 0x0, 0x47, 0x1, 0xf8, 0xc, 0xf8, 0xc, 0x1, 0x8, 0x87, 0x17, 
0x0, 0x1, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0xd, 0x0, 0x0, 0xff, 0xff, 0x0, 
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf3, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0x0, 0xff, 0xff, 0xb, 0x0, 0x0, 0x0, 0x0, 
0x0, 0x0, 0x0, 0x2, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0, 
0x0, 0x0, 0xc, 0x0, 0xff, 0x3f, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0x0, 
0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0xc, 0x0, 
0xff, 0x7f, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 
0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0xc, 0x0, 0xff, 0xbf, 0xc, 0x0, 
0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 
0x0, 0x0, 0x0, 0x0, 0xc0, 0xc, 0x0, 0xff, 0xff, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0, 
0x0, 0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 
0x0, 0xd, 0x0, 0xff, 0x3f, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 
0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0xd, 0x0, 0xff, 
0x7f, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 
0xc, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0xd, 0x0, 0xff, 0xbf, 0xd, 0x0, 0x0, 
0x0, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 
0x0, 0x0, 0x0, 0xc0, 0xd, 0x0, 0xff, 0xff, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
0xe, 0x0, 0xff, 0x3f, 0xe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x87, 
0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0xe, 0x0, 0xff, 0x7f, 
0xe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 
0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0xe, 0x0, 0xff, 0xbf, 0xe, 0x0, 0x0, 0x0, 
0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 
0x0, 0x0, 0xc0, 0xe, 0x0, 0xff, 0xff, 0xe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 
0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 
0x0, 0xff, 0xff, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x87, 0x17, 
0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xbf, 
0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xd4, 0xfe, 0xff, 0x4f, 0xd4, 0xfe, 0x0, 0x0, 
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x79, 0x0 })
        Method(_CRS, 0, Serialized) {
            If(^MCHC.PM1L) {
                CreateDWordField(BUF0, 0x7c, C0LN)
                Store(Zero, C0LN)
            }
            If(LEqual(^MCHC.PM1L, 0x01)) {
                CreateBitField(BUF0, 0x0358, C0RW)
                Store(Zero, C0RW)
            }
            If(^MCHC.PM1H) {
                CreateDWordField(BUF0, 0x96, C4LN)
                Store(Zero, C4LN)
            }
            If(LEqual(^MCHC.PM1H, 0x01)) {
                CreateBitField(BUF0, 0x0428, C4RW)
                Store(Zero, C4RW)
            }
            If(^MCHC.PM2L) {
                CreateDWordField(BUF0, 0xb0, C8LN)
                Store(Zero, C8LN)
            }
            If(LEqual(^MCHC.PM2L, 0x01)) {
                CreateBitField(BUF0, 0x04f8, C8RW)
                Store(Zero, C8RW)
            }
            If(^MCHC.PM2H) {
                CreateDWordField(BUF0, 0xca, CCLN)
                Store(Zero, CCLN)
            }
            If(LEqual(^MCHC.PM2H, 0x01)) {
                CreateBitField(BUF0, 0x05c8, CCRW)
                Store(Zero, CCRW)
            }
            If(^MCHC.PM3L) {
                CreateDWordField(BUF0, 0xe4, D0LN)
                Store(Zero, D0LN)
            }
            If(LEqual(^MCHC.PM3L, 0x01)) {
                CreateBitField(BUF0, 0x0698, D0RW)
                Store(Zero, D0RW)
            }
            If(^MCHC.PM3H) {
                CreateDWordField(BUF0, 0xfe, D4LN)
                Store(Zero, D4LN)
            }
            If(LEqual(^MCHC.PM3H, 0x01)) {
                CreateBitField(BUF0, 0x0768, D4RW)
                Store(Zero, D4RW)
            }
            If(^MCHC.PM4L) {
                CreateDWordField(BUF0, 0x0118, D8LN)
                Store(Zero, D8LN)
            }
            If(LEqual(^MCHC.PM4L, 0x01)) {
                CreateBitField(BUF0, 0x0838, D8RW)
                Store(Zero, D8RW)
            }
            If(^MCHC.PM4H) {
                CreateDWordField(BUF0, 0x0132, DCLN)
                Store(Zero, DCLN)
            }
            If(LEqual(^MCHC.PM4H, 0x01)) {
                CreateBitField(BUF0, 0x0908, DCRW)
                Store(Zero, DCRW)
            }
            If(^MCHC.PM5L) {
                CreateDWordField(BUF0, 0x014c, E0LN)
                Store(Zero, E0LN)
            }
            If(LEqual(^MCHC.PM5L, 0x01)) {
                CreateBitField(BUF0, 0x09d8, E0RW)
                Store(Zero, E0RW)
            }
            If(^MCHC.PM5H) {
                CreateDWordField(BUF0, 0x0166, E4LN)
                Store(Zero, E4LN)
            }
            If(LEqual(^MCHC.PM5H, 0x01)) {
                CreateBitField(BUF0, 0x0aa8, E4RW)
                Store(Zero, E4RW)
            }
            If(^MCHC.PM6L) {
                CreateDWordField(BUF0, 0x0180, E8LN)
                Store(Zero, E8LN)
            }
            If(LEqual(^MCHC.PM6L, 0x01)) {
                CreateBitField(BUF0, 0x0b78, E8RW)
                Store(Zero, E8RW)
            }
            If(^MCHC.PM6H) {
                CreateDWordField(BUF0, 0x019a, ECLN)
                Store(Zero, ECLN)
            }
            If(LEqual(^MCHC.PM6H, 0x01)) {
                CreateBitField(BUF0, 0x0c48, ECRW)
                Store(Zero, ECRW)
            }
            If(^MCHC.PM0H) {
                CreateDWordField(BUF0, 0x01b4, F0LN)
                Store(Zero, F0LN)
            }
            If(LEqual(^MCHC.PM0H, 0x01)) {
                CreateBitField(BUF0, 0x0d18, F0RW)
                Store(Zero, F0RW)
            }
            If(TPRS) {
                CreateDWordField(BUF0, 0x01e8, TPML)
                Store(0x5000, TPML)
            }
            CreateDWordField(BUF0, 0x01c2, M1MN)
            CreateDWordField(BUF0, 0x01c6, M1MX)
            CreateDWordField(BUF0, 0x01ce, M1LN)
            ShiftLeft(^MCHC.TLUD, 0x14, M1MN)
            Add(Subtract(M1MX, M1MN, ), 0x01, M1LN)
            Return(BUF0)
        }
        Method(_PRT) {
            If(GPIC) {
                Return(Package(0x12) {
                    Package(0x04) {
                        0x0001ffff,
                        0x00,
                        0x00,
                        0x10,
                    },
                    Package(0x04) {
                        0x0002ffff,
                        0x00,
                        0x00,
                        0x10,
                    },
                    Package(0x04) {
                        0x0003ffff,
                        0x00,
                        0x00,
                        0x10,
                    },
                    Package(0x04) {
                        0x0003ffff,
                        0x01,
                        0x00,
                        0x11,
                    },
                    Package(0x04) {
                        0x0003ffff,
                        0x02,
                        0x00,
                        0x12,
                    },
                    Package(0x04) {
                        0x0003ffff,
                        0x03,
                        0x00,
                        0x13,
                    },
                    Package(0x04) {
                        0x0019ffff,
                        0x00,
                        0x00,
                        0x10,
                    },
                    Package(0x04) {
                        0x001affff,
                        0x00,
                        0x00,
                        0x16,
                    },
                    Package(0x04) {
                        0x001affff,
                        0x01,
                        0x00,
                        0x17,
                    },
                    Package(0x04) {
                        0x001bffff,
                        0x00,
                        0x00,
                        0x15,
                    },
                    Package(0x04) {
                        0x001cffff,
                        0x00,
                        0x00,
                        0x10,
                    },
                    Package(0x04) {
                        0x001cffff,
                        0x01,
                        0x00,
                        0x11,
                    },
                    Package(0x04) {
                        0x001cffff,
                        0x02,
                        0x00,
                        0x12,
                    },
                    Package(0x04) {
                        0x001cffff,
                        0x03,
                        0x00,
                        0x13,
                    },
                    Package(0x04) {
                        0x001dffff,
                        0x00,
                        0x00,
                        0x16,
                    },
                    Package(0x04) {
                        0x001dffff,
                        0x01,
                        0x00,
                        0x17,
                    },
                    Package(0x04) {
                        0x001fffff,
                        0x00,
                        0x00,
                        0x14,
                    },
                    Package(0x04) {
                        0x001fffff,
                        0x01,
                        0x00,
                        0x15,
                    },
                })
            }
            Else {
                Return(Package(0x12) {
                    Package(0x04) {
                        0x0001ffff,
                        0x00,
                        \_SB.PCI0.LPCB.LNKA,
                        0x00,
                    },
                    Package(0x04) {
                        0x0002ffff,
                        0x00,
                        \_SB.PCI0.LPCB.LNKA,
                        0x00,
                    },
                    Package(0x04) {
                        0x0003ffff,
                        0x00,
                        \_SB.PCI0.LPCB.LNKA,
                        0x00,
                    },
                    Package(0x04) {
                        0x0003ffff,
                        0x01,
                        \_SB.PCI0.LPCB.LNKB,
                        0x00,
                    },
                    Package(0x04) {
                        0x0003ffff,
                        0x02,
                        \_SB.PCI0.LPCB.LNKC,
                        0x00,
                    },
                    Package(0x04) {
                        0x0003ffff,
                        0x03,
                        \_SB.PCI0.LPCB.LNKD,
                        0x00,
                    },
                    Package(0x04) {
                        0x0019ffff,
                        0x00,
                        \_SB.PCI0.LPCB.LNKA,
                        0x00,
                    },
                    Package(0x04) {
                        0x001affff,
                        0x00,
                        \_SB.PCI0.LPCB.LNKG,
                        0x00,
                    },
                    Package(0x04) {
                        0x001affff,
                        0x01,
                        \_SB.PCI0.LPCB.LNKH,
                        0x00,
                    },
                    Package(0x04) {
                        0x001bffff,
                        0x00,
                        \_SB.PCI0.LPCB.LNKF,
                        0x00,
                    },
                    Package(0x04) {
                        0x001cffff,
                        0x00,
                        \_SB.PCI0.LPCB.LNKA,
                        0x00,
                    },
                    Package(0x04) {
                        0x001cffff,
                        0x01,
                        \_SB.PCI0.LPCB.LNKB,
                        0x00,
                    },
                    Package(0x04) {
                        0x001cffff,
                        0x02,
                        \_SB.PCI0.LPCB.LNKC,
                        0x00,
                    },
                    Package(0x04) {
                        0x001cffff,
                        0x03,
                        \_SB.PCI0.LPCB.LNKD,
                        0x00,
                    },
                    Package(0x04) {
                        0x001dffff,
                        0x00,
                        \_SB.PCI0.LPCB.LNKG,
                        0x00,
                    },
                    Package(0x04) {
                        0x001dffff,
                        0x01,
                        \_SB.PCI0.LPCB.LNKH,
                        0x00,
                    },
                    Package(0x04) {
                        0x001fffff,
                        0x00,
                        \_SB.PCI0.LPCB.LNKE,
                        0x00,
                    },
                    Package(0x04) {
                        0x001fffff,
                        0x01,
                        \_SB.PCI0.LPCB.LNKF,
                        0x00,
                    },
                })
            }
        }
        Device(MBIO) {
            Name(_HID, 0x020cd041)
            Name(_UID, 0x02)
            Name(RSRC, Buffer(0x014a) {0x47, 0x1, 0x10, 0x0, 0x10, 0x0, 0x1, 
0x10, 0x47, 0x1, 0x24, 0x0, 0x24, 0x0, 0x1, 0x2, 0x47, 0x1, 0x28, 0x0, 0x28, 
0x0, 0x1, 0x2, 0x47, 0x1, 0x2c, 0x0, 0x2c, 0x0, 0x1, 0x2, 0x47, 0x1, 0x2e, 0x0, 
0x2e, 0x0, 0x1, 0x2, 0x47, 0x1, 0x30, 0x0, 0x30, 0x0, 0x1, 0x2, 0x47, 0x1, 
0x34, 0x0, 0x34, 0x0, 0x1, 0x2, 0x47, 0x1, 0x38, 0x0, 0x38, 0x0, 0x1, 0x2, 
0x47, 0x1, 0x3c, 0x0, 0x3c, 0x0, 0x1, 0x2, 0x47, 0x1, 0x4e, 0x0, 0x4e, 0x0, 
0x1, 0x2, 0x47, 0x1, 0x50, 0x0, 0x50, 0x0, 0x1, 0x4, 0x47, 0x1, 0x61, 0x0, 
0x61, 0x0, 0x1, 0x1, 0x47, 0x1, 0x63, 0x0, 0x63, 0x0, 0x1, 0x1, 0x47, 0x1, 
0x65, 0x0, 0x65, 0x0, 0x1, 0x1, 0x47, 0x1, 0x67, 0x0, 0x67, 0x0, 0x1, 0x1, 
0x47, 0x1, 0x72, 0x0, 0x72, 0x0, 0x1, 0x6, 0x47, 0x1, 0x80, 0x0, 0x80, 0x0, 
0x1, 0x1, 0x47, 0x1, 0x90, 0x0, 0x90, 0x0, 0x1, 0x10, 0x47, 0x1, 0x92, 0x0, 
0x92, 0x0, 0x1, 0x1, 0x47, 0x1, 0xa4, 0x0, 0xa4, 0x0, 0x1, 0x2, 0x47, 0x1, 
0xa8, 0x0, 0xa8, 0x0, 0x1, 0x2, 0x47, 0x1, 0xac, 0x0, 0xac, 0x0, 0x1, 0x2, 
0x47, 0x1, 0xb0, 0x0, 0xb0, 0x0, 0x1, 0x2, 0x47, 0x1, 0xb2, 0x0, 0xb2, 0x0, 
0x1, 0x2, 0x47, 0x1, 0xb4, 0x0, 0xb4, 0x0, 0x1, 0x2, 0x47, 0x1, 0xb8, 0x0, 
0xb8, 0x0, 0x1, 0x2, 0x47, 0x1, 0xbc, 0x0, 0xbc, 0x0, 0x1, 0x2, 0x47, 0x1, 
0xd0, 0x4, 0xd0, 0x4, 0x1, 0x2, 0x47, 0x1, 0x80, 0x6, 0x80, 0x6, 0x1, 0x20, 
0x47, 0x1, 0x0, 0x8, 0x0, 0x8, 0x1, 0x10, 0x47, 0x1, 0x0, 0x10, 0x0, 0x10, 0x1, 
0x80, 0x47, 0x1, 0x80, 0x10, 0x80, 0x10, 0x1, 0x80, 0x47, 0x1, 0x0, 0x11, 0x0, 
0x11, 0x1, 0x20, 0x47, 0x1, 0x80, 0x11, 0x80, 0x11, 0x1, 0x40, 0x47, 0x1, 0x40, 
0x16, 0x40, 0x16, 0x1, 0x10, 0x47, 0x1, 0x0, 0xf8, 0x0, 0xf8, 0x1, 0x80, 0x47, 
0x1, 0x80, 0xf8, 0x80, 0xf8, 0x1, 0x80, 0x47, 0x1, 0x0, 0xfc, 0x0, 0xfc, 0x1, 
0x80, 0x47, 0x1, 0x80, 0xfc, 0x80, 0xfc, 0x1, 0x80, 0x47, 0x1, 0x0, 0xfd, 0x0, 
0xfd, 0x1, 0x80, 0x47, 0x1, 0x0, 0xfe, 0x0, 0xfe, 0x1, 0x4, 0x79, 0x0 })
            Method(_CRS) {
                CreateWordField(RSRC, 0x013a, LPCB)
                CreateWordField(RSRC, 0x013c, LPCM)
                CreateByteField(RSRC, 0x013f, LPCL)
                CreateWordField(RSRC, 0x4a, TPMB)
                CreateWordField(RSRC, 0x4c, TPMM)
                CreateByteField(RSRC, 0x4f, TPML)
                If(TPRS) {
                    Store(0xfd0c, LPCB)
                    Store(0xfd0c, LPCM)
                    Store(0x74, LPCL)
                    Store(Zero, TPMB)
                    Store(Zero, TPMM)
                    Store(Zero, TPML)
                }
                Return(RSRC)
            }
        }
        Device(PDRC) {
            Name(_HID, 0x020cd041)
            Name(_UID, 0x01)
            Name(BUF0, Buffer(0x6e) {0x86, 0x9, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 
0x0, 0x40, 0x0, 0x0, 0x86, 0x9, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0x0, 
0x0, 0x86, 0x9, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x86, 0x9, 
0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x86, 0x9, 0x0, 0x1, 0x0, 
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x86, 0x9, 0x0, 0x1, 0x0, 0x0, 0xd2, 0xfe, 
0x0, 0x0, 0x2, 0x0, 0x86, 0x9, 0x0, 0x1, 0x0, 0x0, 0xd4, 0xfe, 0x0, 0x50, 0x0, 
0x0, 0x86, 0x9, 0x0, 0x1, 0x0, 0x50, 0xd4, 0xfe, 0x0, 0xb0, 0x4, 0x0, 0x86, 
0x9, 0x0, 0x1, 0x0, 0x0, 0xf0, 0xfe, 0x0, 0x0, 0x10, 0x0, 0x79, 0x0 })
            Method(_CRS, 0, Serialized) {
                CreateDWordField(BUF0, 0x04, RBR0)
                ShiftLeft(\_SB.PCI0.LPCB.RCBA, 0x0e, RBR0)
                CreateDWordField(BUF0, 0x10, MBR0)
                ShiftLeft(\_SB.PCI0.MCHC.MHBR, 0x0e, MBR0)
                CreateDWordField(BUF0, 0x1c, DBR0)
                ShiftLeft(\_SB.PCI0.MCHC.DIBR, 0x0c, DBR0)
                CreateDWordField(BUF0, 0x28, EBR0)
                ShiftLeft(\_SB.PCI0.MCHC.EPBR, 0x0c, EBR0)
                CreateDWordField(BUF0, 0x34, XBR0)
                ShiftLeft(\_SB.PCI0.MCHC.PXBR, 0x1a, XBR0)
                CreateDWordField(BUF0, 0x38, XSZ0)
                ShiftRight(0x10000000, \_SB.PCI0.MCHC.PXSZ, XSZ0)
                If(TPRS) {
                    CreateDWordField(BUF0, 0x50, TPML)
                    Store(0x00, TPML)
                }
                Return(BUF0)
            }
        }
        Device(PEGP) {
            Name(_ADR, 0x00010000)
            Method(_PRT) {
                If(GPIC) {
                    Return(Package(0x04) {
                        Package(0x04) {
                            0xffff,
                            0x00,
                            0x00,
                            0x10,
                        },
                        Package(0x04) {
                            0xffff,
                            0x01,
                            0x00,
                            0x11,
                        },
                        Package(0x04) {
                            0xffff,
                            0x02,
                            0x00,
                            0x12,
                        },
                        Package(0x04) {
                            0xffff,
                            0x03,
                            0x00,
                            0x13,
                        },
                    })
                }
                Else {
                    Return(Package(0x04) {
                        Package(0x04) {
                            0xffff,
                            0x00,
                            \_SB.PCI0.LPCB.LNKA,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x01,
                            \_SB.PCI0.LPCB.LNKB,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x02,
                            \_SB.PCI0.LPCB.LNKC,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x03,
                            \_SB.PCI0.LPCB.LNKD,
                            0x00,
                        },
                    })
                }
            }
        }
        Device(GFX0) {
            Name(_ADR, 0x00020000)
            Method(XLCD) {
                Return(One)
            }
            Method(XCRT) {
                Return(One)
            }
            Method(XTV) {
                Return(One)
            }
            Method(XDVI) {
                Return(BY2O)
            }
            Scope(\) {
                Name(WLCD, Zero)
                Name(WCRT, Zero)
                Name(WTV, Zero)
                Name(WDVI, Zero)
            }
            Method(PHTK) {
                Store(Zero, DSWF)
            }
            Name(F10T, Package(0x0a) {
                0x01,
                0x02,
                0x03,
                0x04,
                0x05,
                0x01,
                0x02,
                0x03,
                0x04,
                0x05,
            })
            Name(NDID, Zero)
            Name(PKID, Zero)
            Name(DID1, 0x80000100)
            Name(DID2, 0x80000400)
            Name(DID3, 0x80000200)
            Name(DID4, 0x80000300)
            Method(AHTK) {
                If(LAnd(LEqual(And(ADOS, 0x03, ), Zero), DSWF)) {
                    GHDS(0x00)
                }
            }
            Method(_DOS, 1) {
                And(Arg0, 0x07, ADOS)
            }
            Method(_DOD) {
                Store(0x04, NDID)
                Store(SDDL(DID1), DID1)
                Store(SDDL(DID2), DID2)
                Store(SDDL(DID3), DID3)
                Store(SDDL(DID4), DID4)
                Store(0x00, PKID)
                If(LEqual(NDID, 0x01)) {
                    Name(TMP1, Package(0x01) {
                        0xffffffff,
                    })
                    If(DID1) {
                        Store(Or(0x00010000, DID1, ), Index(TMP1, 0x00, ))
                        Return(TMP1)
                    }
                    If(DID2) {
                        Store(Or(0x00010000, DID2, ), Index(TMP1, 0x00, ))
                        Return(TMP1)
                    }
                    If(DID3) {
                        Store(Or(0x00010000, DID3, ), Index(TMP1, 0x00, ))
                        Return(TMP1)
                    }
                    If(DID4) {
                        Store(Or(0x00010000, DID4, ), Index(TMP1, 0x00, ))
                        Return(TMP1)
                    }
                }
                If(LEqual(NDID, 0x02)) {
                    Name(TMP2, Package(0x02) {
                        0xffffffff,
                        0xffffffff,
                    })
                    If(DID1) {
                        Store(Or(0x00010000, DID1, ), Index(TMP2, PKID, ))
                        Increment(PKID)
                    }
                    If(DID2) {
                        Store(Or(0x00010000, DID2, ), Index(TMP2, PKID, ))
                        Increment(PKID)
                    }
                    If(DID3) {
                        Store(Or(0x00010000, DID3, ), Index(TMP2, PKID, ))
                        Increment(PKID)
                    }
                    If(DID4) {
                        Store(Or(0x00010000, DID4, ), Index(TMP2, PKID, ))
                    }
                    Return(TMP2)
                }
                If(LEqual(NDID, 0x03)) {
                    Name(TMP3, Package(0x03) {
                        0xffffffff,
                        0xffffffff,
                        0xffffffff,
                    })
                    If(DID1) {
                        Store(Or(0x00010000, DID1, ), Index(TMP3, PKID, ))
                        Increment(PKID)
                    }
                    If(DID2) {
                        Store(Or(0x00010000, DID2, ), Index(TMP3, PKID, ))
                        Increment(PKID)
                    }
                    If(DID3) {
                        Store(Or(0x00010000, DID3, ), Index(TMP3, PKID, ))
                        Increment(PKID)
                    }
                    If(DID4) {
                        Store(Or(0x00010000, DID4, ), Index(TMP3, PKID, ))
                    }
                    Return(TMP3)
                }
                If(LEqual(NDID, 0x04)) {
                    Name(TMP4, Package(0x04) {
                        0xffffffff,
                        0xffffffff,
                        0xffffffff,
                        0xffffffff,
                    })
                    If(DID1) {
                        Store(Or(0x00010000, DID1, ), Index(TMP4, PKID, ))
                        Increment(PKID)
                    }
                    If(DID2) {
                        Store(Or(0x00010000, DID2, ), Index(TMP4, PKID, ))
                        Increment(PKID)
                    }
                    If(DID3) {
                        Store(Or(0x00010000, DID3, ), Index(TMP4, PKID, ))
                        Increment(PKID)
                    }
                    If(DID4) {
                        Store(Or(0x00010000, DID4, ), Index(TMP4, PKID, ))
                    }
                    Return(TMP4)
                }
                Return(Package(0x01) {
                    0x0400,
                })
            }
            Device(CRT) {
                Method(_ADR) {
                    Return(0x0100)
                }
                Method(_DCS) {
                    If(XCRT()) {
                        Return(CDDS(DID1))
                    }
                    Else {
                        Return(Zero)
                    }
                }
                Method(_DGS) {
                    NDDS()
                    Return(WCRT)
                }
                Method(_DSS, 1) {
                    Noop
                }
            }
            Device(LCD) {
                Method(_ADR) {
                    Return(0x0400)
                }
                Method(_DCS) {
                    If(XLCD()) {
                        Return(CDDS(DID2))
                    }
                    Else {
                        Return(Zero)
                    }
                }
                Method(_DGS) {
                    NDDS()
                    Return(WLCD)
                }
                Method(_DSS, 1) {
                    Noop
                }
            }
            Device(TV) {
                Method(_ADR) {
                    Return(0x0200)
                }
                Method(_DCS) {
                    If(XTV()) {
                        Return(CDDS(DID3))
                    }
                    Else {
                        Return(Zero)
                    }
                }
                Method(_DGS) {
                    NDDS()
                    Return(WTV)
                }
                Method(_DSS, 1) {
                    Noop
                }
            }
            Device(DVI) {
                Method(_ADR) {
                    Return(0x0300)
                }
                Method(_DCS) {
                    If(XDVI()) {
                        Return(CDDS(DID4))
                    }
                    Else {
                        Return(Zero)
                    }
                }
                Method(_DGS) {
                    NDDS()
                    Return(WDVI)
                }
                Method(_DSS, 1) {
                    Noop
                }
            }
            Method(SDDL, 1) {
                If(LNot(Arg0)) {
                    Decrement(NDID)
                    Return(0x00)
                }
                Store(And(Arg0, 0x0f0f, ), Local0)
                Store(And(Arg0, 0xffff, ), Local3)
                Or(0x80000000, Local3, Local1)
                If(LEqual(DIDL, Local0)) {
                    Return(Local1)
                }
                If(LEqual(DDL2, Local0)) {
                    Return(Local1)
                }
                If(LEqual(DDL3, Local0)) {
                    Return(Local1)
                }
                If(LEqual(DDL4, Local0)) {
                    Return(Local1)
                }
                If(LEqual(DDL5, Local0)) {
                    Return(Local1)
                }
                If(LEqual(DDL6, Local0)) {
                    Return(Local1)
                }
                If(LEqual(DDL7, Local0)) {
                    Return(Local1)
                }
                If(LEqual(DDL8, Local0)) {
                    Return(Local1)
                }
                Decrement(NDID)
                Return(0x00)
            }
            Method(CDDS, 1) {
                If(LNot(Arg0)) {
                    Return(0x00)
                }
                If(LEqual(CADL, And(Arg0, 0x0f0f, ))) {
                    Return(0x1f)
                }
                If(LEqual(CAL2, And(Arg0, 0x0f0f, ))) {
                    Return(0x1f)
                }
                If(LEqual(CAL3, And(Arg0, 0x0f0f, ))) {
                    Return(0x1f)
                }
                If(LEqual(CAL4, And(Arg0, 0x0f0f, ))) {
                    Return(0x1f)
                }
                If(LEqual(CAL5, And(Arg0, 0x0f0f, ))) {
                    Return(0x1f)
                }
                If(LEqual(CAL6, And(Arg0, 0x0f0f, ))) {
                    Return(0x1f)
                }
                If(LEqual(CAL7, And(Arg0, 0x0f0f, ))) {
                    Return(0x1f)
                }
                If(LEqual(CAL8, And(Arg0, 0x0f0f, ))) {
                    Return(0x1f)
                }
                Return(0x1d)
            }
            Method(CPDS, 1) {
                If(LNot(Arg0)) {
                    Return(0x00)
                }
                If(LEqual(CPDL, And(Arg0, 0x0f0f, ))) {
                    Return(0x01)
                }
                If(LEqual(CPL2, And(Arg0, 0x0f0f, ))) {
                    Return(0x01)
                }
                If(LEqual(CPL3, And(Arg0, 0x0f0f, ))) {
                    Return(0x01)
                }
                If(LEqual(CPL4, And(Arg0, 0x0f0f, ))) {
                    Return(0x01)
                }
                If(LEqual(CPL5, And(Arg0, 0x0f0f, ))) {
                    Return(0x01)
                }
                If(LEqual(CPL6, And(Arg0, 0x0f0f, ))) {
                    Return(0x01)
                }
                If(LEqual(CPL7, And(Arg0, 0x0f0f, ))) {
                    Return(0x01)
                }
                If(LEqual(CPL8, And(Arg0, 0x0f0f, ))) {
                    Return(0x01)
                }
                Return(0x00)
            }
            Method(NDDS) {
                If(LEqual(DSWF, 0x01)) {
                    If(CPDS(DID1)) {
                        Store(0x01, ACRT)
                    }
                    Else {
                        Store(0x00, ACRT)
                    }
                    If(CPDS(DID2)) {
                        Store(0x01, ALCD)
                    }
                    Else {
                        Store(0x00, ALCD)
                    }
                    If(CPDS(DID3)) {
                        Store(0x01, ATV)
                    }
                    Else {
                        Store(0x00, ATV)
                    }
                    If(CPDS(DID4)) {
                        Store(0x01, ADVI)
                    }
                    Else {
                        Store(0x00, ADVI)
                    }
                    If(LEqual(CDDS(DID1), 0x1f)) {
                        Store(0x01, CCRT)
                    }
                    Else {
                        Store(0x00, CCRT)
                    }
                    If(LEqual(CDDS(DID2), 0x1f)) {
                        Store(0x01, CLCD)
                    }
                    Else {
                        Store(0x00, CLCD)
                    }
                    If(LEqual(CDDS(DID3), 0x1f)) {
                        Store(0x01, CTV)
                    }
                    Else {
                        Store(0x00, CTV)
                    }
                    If(LEqual(CDDS(DID4), 0x1f)) {
                        Store(0x01, CDVI)
                    }
                    Else {
                        Store(0x00, CDVI)
                    }
                    Or(ShiftLeft(CDVI, 0x02, ), Or(ShiftLeft(CCRT, 0x01, ), 
CLCD, ), Local0)
                    Or(ShiftLeft(ADVI, 0x02, ), Or(ShiftLeft(ACRT, 0x01, ), 
ALCD, ), Local1)
                    Store(Zero, Local2)
                    Store(0xff, Local3)
                    While(LAnd(LLess(Local2, 0x0a), LEqual(Local3, 0xff))) {
                        If(LEqual(DerefOf(Index(F10T, Local2, )), Local0)) {
                            If(LAnd(CTV, ATV)) {
                                Store(Local2, Local3)
                            }
                            Else {
                                Add(Local2, 0x01, Local3)
                            }
                        }
                        Increment(Local2)
                    }
                    Store(0xff, Local2)
                    If(LNot(LEqual(Local3, 0xff))) {
                        While(LAnd(LLess(Local3, 0x0a), LEqual(Local2, 0xff))) {
                            If(LEqual(And(DerefOf(Index(F10T, Local3, )), 
Local1, ), DerefOf(Index(F10T, Local3, )))) {
                                Store(DerefOf(Index(F10T, Local3, )), Local2)
                            }
                            Increment(Local3)
                        }
                    }
                    If(LEqual(Local2, 0xff)) {
                        If(ALCD) {
                            Store(0x01, Local2)
                        }
                        Else {
                            If(ACRT) {
                                Store(0x02, Local2)
                            }
                            Else {
                                If(ADVI) {
                                    Store(0x04, Local2)
                                }
                                Else {
                                    Store(0x02, Local2)
                                }
                            }
                        }
                    }
                    And(Local2, 0x01, WLCD)
                    ShiftRight(And(Local2, 0x02, ), 0x01, WCRT)
                    ShiftRight(And(Local2, 0x04, ), 0x02, WDVI)
                    Store(Zero, WTV)
                }
                And(DSWF, 0x02, DSWF)
            }
            Scope(\_SB.PCI0) {
                OperationRegion(MCHP, PCI_Config, 0x40, 0xc0)
                Field(MCHP, AnyAcc, NoLock, Preserve) {
                    Offset(0x60),
                    TASM,       10,
                    Offset(0x62)
                }
            }
            OperationRegion(IGDP, PCI_Config, 0x40, 0xc0)
            Field(IGDP, AnyAcc, NoLock, Preserve) {
                Offset(0x12),
                ,       1,
                GIVD,   1,
                ,       2,
                GUMA,   3,
                Offset(0x14),
                ,       4,
                GMFN,   1,
                Offset(0x18),
                Offset(0xa4),
                ASLE,   8,
                Offset(0xa8),
                GSSE,   1,
                GSSB,   14,
                GSES,   1,
                Offset(0xb0),
                Offset(0xb1),
                CDVL,   5,
                Offset(0xb2),
                Offset(0xb5),
                LBPC,   8,
                Offset(0xbc),
                ASLS,   32
            }
            OperationRegion(IGDM, SystemMemory, 0x7f6e0a93, 0x0000200c)
            Field(IGDM, AnyAcc, NoLock, Preserve) {
                SIGN,   128,
                SIZE,   32,
                OVER,   32,
                SVER,   256,
                VVER,   128,
                GVER,   128,
                MBOX,   32,
                Offset(0x100),
                DRDY,   32,
                CSTS,   32,
                CEVT,   32,
                Offset(0x120),
                DIDL,   32,
                DDL2,   32,
                DDL3,   32,
                DDL4,   32,
                DDL5,   32,
                DDL6,   32,
                DDL7,   32,
                DDL8,   32,
                CPDL,   32,
                CPL2,   32,
                CPL3,   32,
                CPL4,   32,
                CPL5,   32,
                CPL6,   32,
                CPL7,   32,
                CPL8,   32,
                CADL,   32,
                CAL2,   32,
                CAL3,   32,
                CAL4,   32,
                CAL5,   32,
                CAL6,   32,
                CAL7,   32,
                CAL8,   32,
                NADL,   32,
                NDL2,   32,
                NDL3,   32,
                NDL4,   32,
                NDL5,   32,
                NDL6,   32,
                NDL7,   32,
                NDL8,   32,
                ASLP,   32,
                TIDX,   32,
                CHPD,   32,
                CLID,   32,
                CDCK,   32,
                SXSW,   32,
                EVTS,   32,
                CNOT,   32,
                NRDY,   32,
                Offset(0x200),
                SCIE,   1,
                GEFC,   4,
                GXFC,   3,
                GESF,   8,
                Offset(0x204),
                PARM,   32,
                DSLP,   32,
                Offset(0x300),
                ARDY,   32,
                ASLC,   32,
                TCHE,   32,
                ALSI,   32,
                BCLP,   32,
                PFIT,   32,
                CBLV,   32,
                BCLM,   320,
                CPFM,   32,
                EPFM,   32,
                Offset(0x400),
                GVD1,   57344,
                IBTT,   8,
                IPAT,   8,
                ITVF,   8,
                ITVM,   8,
                IPSC,   8,
                IBLC,   8,
                IBIA,   8,
                ISSC,   8,
                IDMM,   8,
                IDMS,   8,
                IF1E,   8,
                HVCO,   8
            }
            Name(DBTB, Package(0x15) {
                0x00,
                0x07,
                0x38,
                0x01c0,
                0x0e00,
                0x3f,
                0x01c7,
                0x0e07,
                0x01f8,
                0x0e38,
                0x0fc0,
                0x00,
                0x00,
                0x00,
                0x00,
                0x00,
                0x7000,
                0x7007,
                0x7038,
                0x71c0,
                0x7e00,
            })
            Name(CDCT, Package(0x03) {
                Package(0x03) {
                    0xc8,
                    0x0140,
                    0x0190,
                },
                Package(0x03) {
                    0xc8,
                    0x014d,
                    0x0190,
                },
                Package(0x03) {
                    0xde,
                    0x014d,
                    0x017d,
                },
            })
            Name(SUCC, 0x01)
            Name(NVLD, 0x02)
            Name(CRIT, 0x04)
            Name(NCRT, 0x06)
            Method(GSCI, 0, Serialized) {
                Method(GBDA, 0, Serialized) {
                    If(LEqual(GESF, 0x00)) {
                        Store(0x0279, PARM)
                        Store(Zero, GESF)
                        Return(SUCC)
                    }
                    If(LEqual(GESF, 0x01)) {
                        Store(0x00, PARM)
                        Store(Zero, GESF)
                        Return(SUCC)
                    }
                    If(LEqual(GESF, 0x04)) {
                        And(PARM, 0xefff0000, PARM)
                        And(PARM, ShiftLeft(DerefOf(Index(DBTB, IBTT, )), 0x10, 
), PARM)
                        Or(IBTT, PARM, PARM)
                        Store(Zero, GESF)
                        Return(SUCC)
                    }
                    If(LEqual(GESF, 0x05)) {
                        Store(IPSC, PARM)
                        Or(PARM, ShiftLeft(IPAT, 0x08, ), PARM)
                        Add(PARM, 0x0100, PARM)
                        Or(PARM, ShiftLeft(LPOL, 0x10, ), PARM)
                        Add(PARM, 0x00010000, PARM)
                        Or(PARM, ShiftLeft(IBIA, 0x14, ), PARM)
                        Store(Zero, GESF)
                        Return(SUCC)
                    }
                    If(LEqual(GESF, 0x06)) {
                        Store(ITVF, PARM)
                        Or(PARM, ShiftLeft(ITVM, 0x04, ), PARM)
                        Store(Zero, GESF)
                        Return(SUCC)
                    }
                    If(LEqual(GESF, 0x07)) {
                        Store(GIVD, PARM)
                        XOr(PARM, 0x01, PARM)
                        Or(PARM, ShiftLeft(GMFN, 0x01, ), PARM)
                        Or(PARM, ShiftLeft(0x02, 0x0b, ), PARM)
                        If(IDMM) {
                            Or(PARM, ShiftLeft(IDMS, 0x11, ), PARM)
                        }
                        Else {
                            Or(PARM, ShiftLeft(IDMS, 0x0d, ), PARM)
                        }
                        Or(ShiftLeft(DerefOf(Index(DerefOf(Index(CDCT, HVCO, 
)), Subtract(CDVL, 0x01, ), )), 0x15, ), PARM, PARM)
                        Store(0x01, GESF)
                        Return(SUCC)
                    }
                    If(LEqual(GESF, 0x0a)) {
                        Store(0x00, PARM)
                        If(ISSC) {
                            Or(PARM, 0x03, PARM)
                        }
                        Store(0x00, GESF)
                        Return(SUCC)
                    }
                    Store(Zero, GESF)
                    Return(CRIT)
                }
                Method(SBCB, 0, Serialized) {
                    If(LEqual(GESF, 0x00)) {
                        Store(0x00, PARM)
                        Store(Zero, GESF)
                        Return(SUCC)
                    }
                    Store(Zero, GESF)
                    Return(SUCC)
                }
                If(LEqual(GEFC, 0x04)) {
                    Store(GBDA, GXFC)
                }
                If(LEqual(GEFC, 0x06)) {
                    Store(SBCB, GXFC)
                }
                Store(0x00, GEFC)
                Store(0x01, SCIS)
                Store(0x00, GSSE)
                Store(0x00, SCIE)
                Return(Zero)
            }
            Method(PDRD) {
                If(LNot(DRDY)) {
                    Sleep(ASLP)
                }
                Return(LNot(DRDY))
            }
            Method(PSTS) {
                If(LGreater(CSTS, 0x02)) {
                    Sleep(ASLP)
                }
                Return(LEqual(CSTS, 0x03))
            }
            Method(GNOT, 2) {
                If(PDRD()) {
                    Return(0x01)
                }
                If(PSTS()) {
                    Return(0x01)
                }
                Store(Arg0, CEVT)
                Store(0x03, CSTS)
                If(LAnd(LEqual(CHPD, 0x00), LEqual(Arg1, 0x00))) {
                    If(LAnd(LNot(LLess(\_SB.OSTP(), 0x08)), LLess(\_SB.OSTP(), 
0x40))) {
                        Notify(\_SB.PCI0, Arg1)
                    }
                    Else {
                        Notify(\_SB.PCI0.GFX0, Arg1)
                    }
                }
                Sleep(0x02ee)
                Notify(\_SB.PCI0.GFX0, 0x80)
                If(LNot(PSTS())) {
                    Store(0x00, CEVT)
                }
                Return(0x00)
            }
            Method(GHDS, 1) {
                Store(Arg0, TIDX)
                Return(GNOT(0x01, 0x00))
            }
            Method(GLID, 1) {
                Store(Arg0, CLID)
                Return(GNOT(0x02, 0x00))
            }
            Method(GDCK, 1) {
                Store(Arg0, CDCK)
                Return(GNOT(0x04, 0x00))
            }
            Method(PARD) {
                If(LNot(ARDY)) {
                    Sleep(ASLP)
                }
                Return(LNot(ARDY))
            }
            Method(AINT, 2) {
                If(LNot(And(TCHE, ShiftLeft(0x01, Arg0, ), ))) {
                    Return(0x01)
                }
                If(PARD()) {
                    Return(0x01)
                }
                If(LEqual(Arg0, 0x02)) {
                    If(CPFM) {
                        And(CPFM, 0x0f, Local0)
                        And(EPFM, 0x0f, Local1)
                        If(LEqual(Local0, 0x01)) {
                            If(And(Local1, 0x06, )) {
                                Store(0x06, PFIT)
                            }
                            Else {
                                Store(0x01, PFIT)
                            }
                        }
                        If(LEqual(Local0, 0x06)) {
                            If(And(Local1, 0x01, )) {
                                Store(0x01, PFIT)
                            }
                            Else {
                                Store(0x06, PFIT)
                            }
                        }
                        If(LEqual(Local0, 0x08)) {
                            If(And(Local1, 0x01, )) {
                                Store(0x01, PFIT)
                            }
                            Else {
                                If(And(Local1, 0x06, )) {
                                    Store(0x06, PFIT)
                                }
                                Else {
                                    Store(0x08, PFIT)
                                }
                            }
                        }
                    }
                    Else {
                        XOr(PFIT, 0x07, PFIT)
                    }
                    Or(PFIT, 0x80000000, PFIT)
                    Store(0x04, ASLC)
                }
                Else {
                    If(LEqual(Arg0, 0x01)) {
                        Store(Arg1, BCLP)
                        Or(BCLP, 0x80000000, BCLP)
                        Store(0x02, ASLC)
                    }
                    Else {
                        If(LEqual(Arg0, 0x00)) {
                            Store(Arg1, ALSI)
                            Store(0x01, ASLC)
                        }
                        Else {
                            Return(0x01)
                        }
                    }
                }
                Store(0x00, LBPC)
                If(LEqual(ASLC, 0x02)) {
                    Sleep(0x0f)
                    Store(Zero, Local2)
                    While(LAnd(LLess(Local2, 0x04), LEqual(ASLC, 0x02))) {
                        Store(0x00, LBPC)
                        Increment(Local2)
                        Sleep(0x0f)
                    }
                }
                Return(0x00)
            }
        }
        Device(LANC) {
            Name(_ADR, 0x00190000)
            OperationRegion(LANF, PCI_Config, 0xcc, 0x04)
            Field(LANF, DWordAcc, NoLock, Preserve) {
                ,       15,
                PMES,   1
            }
            Name(_PRW, Package(0x02) {
                0x0d,
                0x05,
            })
        }
        Device(HDEF) {
            Name(_ADR, 0x001b0000)
            OperationRegion(HDCS, PCI_Config, 0x54, 0x04)
            Field(HDCS, DWordAcc, NoLock, Preserve) {
                ,       15,
                PMES,   1
            }
            Name(_PRW, Package(0x02) {
                0x0d,
                0x03,
            })
            Name(_PSC, 0x00)
            Method(_PS0) {
                Store(0x00, _PSC)
                If(LAnd(HDWA, LNot(LLess(\_SB.OSTP(), 0x40)))) {
                    Store(Zero, HDWA)
                    Sleep(0x01f4)
                }
            }
            Method(_PS3) {
                Store(0x03, _PSC)
            }
        }
        Device(RP01) {
            Name(_ADR, 0x001c0000)
            OperationRegion(P1CS, PCI_Config, 0x40, 0xc0)
            Field(P1CS, AnyAcc, NoLock, WriteAsZeros) {
                Offset(0x12),
                ,       13,
                LAS1,   1,
                Offset(0x1a),
                ABP1,   1,
                ,       2,
                PDC1,   1,
                ,       2,
                PDS1,   1,
                LSC1,   1,
                Offset(0x20),
                Offset(0x22),
                PSP1,   1,
                Offset(0x9c),
                ,       30,
                HPS1,   1,
                PMS1,   1
            }
            Device(PXS1) {
                Name(_ADR, 0x00)
            }
            Method(_PRT) {
                If(\GPIC) {
                    Return(Package(0x04) {
                        Package(0x04) {
                            0xffff,
                            0x00,
                            0x00,
                            0x10,
                        },
                        Package(0x04) {
                            0xffff,
                            0x01,
                            0x00,
                            0x11,
                        },
                        Package(0x04) {
                            0xffff,
                            0x02,
                            0x00,
                            0x12,
                        },
                        Package(0x04) {
                            0xffff,
                            0x03,
                            0x00,
                            0x13,
                        },
                    })
                }
                Else {
                    Return(Package(0x04) {
                        Package(0x04) {
                            0xffff,
                            0x00,
                            \_SB.PCI0.LPCB.LNKA,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x01,
                            \_SB.PCI0.LPCB.LNKB,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x02,
                            \_SB.PCI0.LPCB.LNKC,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x03,
                            \_SB.PCI0.LPCB.LNKD,
                            0x00,
                        },
                    })
                }
            }
        }
        Device(RP02) {
            Name(_ADR, 0x001c0001)
            OperationRegion(P2CS, PCI_Config, 0x40, 0xc0)
            Field(P2CS, AnyAcc, NoLock, WriteAsZeros) {
                Offset(0x12),
                ,       13,
                LAS2,   1,
                Offset(0x1a),
                ABP2,   1,
                ,       2,
                PDC2,   1,
                ,       2,
                PDS2,   1,
                Offset(0x1b),
                LSC2,   1,
                Offset(0x20),
                Offset(0x22),
                PSP2,   1,
                Offset(0x9c),
                ,       30,
                HPS2,   1,
                PMS2,   1
            }
            Device(PXS2) {
                Name(_ADR, 0x00)
            }
            Method(_PRT) {
                If(\GPIC) {
                    Return(Package(0x04) {
                        Package(0x04) {
                            0xffff,
                            0x00,
                            0x00,
                            0x11,
                        },
                        Package(0x04) {
                            0xffff,
                            0x01,
                            0x00,
                            0x12,
                        },
                        Package(0x04) {
                            0xffff,
                            0x02,
                            0x00,
                            0x13,
                        },
                        Package(0x04) {
                            0xffff,
                            0x03,
                            0x00,
                            0x10,
                        },
                    })
                }
                Else {
                    Return(Package(0x04) {
                        Package(0x04) {
                            0xffff,
                            0x00,
                            \_SB.PCI0.LPCB.LNKB,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x01,
                            \_SB.PCI0.LPCB.LNKC,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x02,
                            \_SB.PCI0.LPCB.LNKD,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x03,
                            \_SB.PCI0.LPCB.LNKA,
                            0x00,
                        },
                    })
                }
            }
        }
        Device(RP03) {
            Name(_ADR, 0x001c0002)
            OperationRegion(P3CS, PCI_Config, 0x40, 0x0100)
            Field(P3CS, AnyAcc, NoLock, WriteAsZeros) {
                Offset(0x12),
                ,       13,
                LAS3,   1,
                Offset(0x1a),
                ABP3,   1,
                ,       2,
                PDC3,   1,
                ,       2,
                PDS3,   1,
                Offset(0x1b),
                LSC3,   1,
                Offset(0x20),
                Offset(0x22),
                PSP3,   1,
                Offset(0x9c),
                ,       30,
                HPS3,   1,
                PMS3,   1
            }
            Device(PXS3) {
                Name(_ADR, 0x00)
            }
            Method(_PRT) {
                If(\GPIC) {
                    Return(Package(0x04) {
                        Package(0x04) {
                            0xffff,
                            0x00,
                            0x00,
                            0x12,
                        },
                        Package(0x04) {
                            0xffff,
                            0x01,
                            0x00,
                            0x13,
                        },
                        Package(0x04) {
                            0xffff,
                            0x02,
                            0x00,
                            0x10,
                        },
                        Package(0x04) {
                            0xffff,
                            0x03,
                            0x00,
                            0x11,
                        },
                    })
                }
                Else {
                    Return(Package(0x04) {
                        Package(0x04) {
                            0xffff,
                            0x00,
                            \_SB.PCI0.LPCB.LNKC,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x01,
                            \_SB.PCI0.LPCB.LNKD,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x02,
                            \_SB.PCI0.LPCB.LNKA,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x03,
                            \_SB.PCI0.LPCB.LNKB,
                            0x00,
                        },
                    })
                }
            }
        }
        Device(RP04) {
            Name(_ADR, 0x001c0003)
            OperationRegion(P4CS, PCI_Config, 0x40, 0xc0)
            Field(P4CS, AnyAcc, NoLock, WriteAsZeros) {
                Offset(0x12),
                ,       13,
                LAS4,   1,
                Offset(0x1a),
                ABP4,   1,
                ,       2,
                PDC4,   1,
                ,       2,
                PDS4,   1,
                Offset(0x1b),
                LSC4,   1,
                Offset(0x20),
                Offset(0x22),
                PSP4,   1,
                Offset(0x9c),
                ,       30,
                HPS4,   1,
                PMS4,   1
            }
            Device(PXS4) {
                Name(_ADR, 0x00)
            }
            Method(_PRT) {
                If(\GPIC) {
                    Return(Package(0x04) {
                        Package(0x04) {
                            0xffff,
                            0x00,
                            0x00,
                            0x13,
                        },
                        Package(0x04) {
                            0xffff,
                            0x01,
                            0x00,
                            0x10,
                        },
                        Package(0x04) {
                            0xffff,
                            0x02,
                            0x00,
                            0x11,
                        },
                        Package(0x04) {
                            0xffff,
                            0x03,
                            0x00,
                            0x12,
                        },
                    })
                }
                Else {
                    Return(Package(0x04) {
                        Package(0x04) {
                            0xffff,
                            0x00,
                            \_SB.PCI0.LPCB.LNKD,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x01,
                            \_SB.PCI0.LPCB.LNKA,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x02,
                            \_SB.PCI0.LPCB.LNKB,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x03,
                            \_SB.PCI0.LPCB.LNKC,
                            0x00,
                        },
                    })
                }
            }
        }
        Device(RP05) {
            Name(_ADR, 0x001c0004)
            OperationRegion(P5CS, PCI_Config, 0x40, 0x0100)
            Field(P5CS, AnyAcc, NoLock, WriteAsZeros) {
                SBSR,   1,
                Offset(0x12),
                ,       13,
                LAS5,   1,
                Offset(0x1a),
                ABP5,   1,
                ,       2,
                PDC5,   1,
                ,       2,
                PDS5,   1,
                Offset(0x1b),
                LSC5,   1,
                Offset(0x20),
                Offset(0x22),
                PSP5,   1,
                Offset(0x9c),
                ,       30,
                HPS5,   1,
                PMS5,   1
            }
            Device(PXS5) {
                Name(_ADR, 0x00)
            }
            Method(_PRT) {
                If(\GPIC) {
                    Return(Package(0x04) {
                        Package(0x04) {
                            0xffff,
                            0x00,
                            0x00,
                            0x10,
                        },
                        Package(0x04) {
                            0xffff,
                            0x01,
                            0x00,
                            0x11,
                        },
                        Package(0x04) {
                            0xffff,
                            0x02,
                            0x00,
                            0x12,
                        },
                        Package(0x04) {
                            0xffff,
                            0x03,
                            0x00,
                            0x13,
                        },
                    })
                }
                Else {
                    Return(Package(0x04) {
                        Package(0x04) {
                            0xffff,
                            0x00,
                            \_SB.PCI0.LPCB.LNKA,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x01,
                            \_SB.PCI0.LPCB.LNKB,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x02,
                            \_SB.PCI0.LPCB.LNKC,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x03,
                            \_SB.PCI0.LPCB.LNKD,
                            0x00,
                        },
                    })
                }
            }
        }
        Device(RP06) {
            Name(_ADR, 0x001c0005)
            OperationRegion(P6CS, PCI_Config, 0x40, 0x0100)
            Field(P6CS, AnyAcc, NoLock, WriteAsZeros) {
                Offset(0x12),
                ,       13,
                LAS6,   1,
                Offset(0x1a),
                ABP6,   1,
                ,       2,
                PDC6,   1,
                ,       2,
                PDS6,   1,
                Offset(0x1b),
                LSC6,   1,
                Offset(0x20),
                Offset(0x22),
                PSP6,   1,
                Offset(0x9c),
                ,       30,
                HPS6,   1,
                PMS6,   1
            }
            Device(PXS6) {
                Name(_ADR, 0x00)
            }
            Method(_PRT) {
                If(\GPIC) {
                    Return(Package(0x04) {
                        Package(0x04) {
                            0xffff,
                            0x00,
                            0x00,
                            0x11,
                        },
                        Package(0x04) {
                            0xffff,
                            0x01,
                            0x00,
                            0x12,
                        },
                        Package(0x04) {
                            0xffff,
                            0x02,
                            0x00,
                            0x13,
                        },
                        Package(0x04) {
                            0xffff,
                            0x03,
                            0x00,
                            0x10,
                        },
                    })
                }
                Else {
                    Return(Package(0x04) {
                        Package(0x04) {
                            0xffff,
                            0x00,
                            \_SB.PCI0.LPCB.LNKB,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x01,
                            \_SB.PCI0.LPCB.LNKC,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x02,
                            \_SB.PCI0.LPCB.LNKD,
                            0x00,
                        },
                        Package(0x04) {
                            0xffff,
                            0x03,
                            \_SB.PCI0.LPCB.LNKA,
                            0x00,
                        },
                    })
                }
            }
        }
        Scope(\_SB.PCI0.RP01.PXS1) {
            Name(_PRW, Package(0x02) {
                0x09,
                0x04,
            })
            OperationRegion(MVLN, PCI_Config, 0x4c, 0x08)
            Field(MVLN, AnyAcc, NoLock, Preserve) {
                Offset(0x1),
                PMEN,   1
            }
            Method(_PSW, 1) {
                If(Arg0) {
                    Store(Ones, PMEN)
                }
                Else {
                    Store(Zero, PMEN)
                }
            }
        }
        Device(USB1) {
            Name(_ADR, 0x001d0000)
        }
        Device(USB2) {
            Name(_ADR, 0x001d0001)
        }
        Device(USB3) {
            Name(_ADR, 0x001d0002)
        }
        Device(USB4) {
            Name(_ADR, 0x001a0000)
        }
        Device(USB5) {
            Name(_ADR, 0x001a0001)
            Device(HUB5) {
                Name(_ADR, 0x00)
                Device(PRT2) {
                    Name(_EJD, "\\\x5fSB.PCI0.RP02.PXS2")
                    Name(_ADR, 0x02)
                }
            }
        }
        Device(EHC1) {
            Name(_ADR, 0x001d0007)
            OperationRegion(U7CS, PCI_Config, 0x54, 0x04)
            Field(U7CS, DWordAcc, NoLock, Preserve) {
                ,       15,
                PMES,   1
            }
            Device(HUB7) {
                Name(_ADR, 0x00)
            }
        }
        Device(EHC2) {
            Name(_ADR, 0x001a0007)
            OperationRegion(UFCS, PCI_Config, 0x54, 0x04)
            Field(UFCS, DWordAcc, NoLock, Preserve) {
                ,       15,
                PMES,   1
            }
            Device(HUB7) {
                Name(_ADR, 0x00)
                Device(PRT4) {
                    Name(_ADR, 0x04)
                    Name(_EJD, "\\\x5fSB.PCI0.RP02.PXS2")
                }
            }
        }
        Device(PCIB) {
            Name(_ADR, 0x001e0000)
            Method(_PRT) {
                If(GPIC) {
                    Return(Package(0x01) {
                        Package(0x04) {
                            0x0003ffff,
                            0x00,
                            0x00,
                            0x10,
                        },
                    })
                }
                Else {
                    Return(Package(0x01) {
                        Package(0x04) {
                            0x0003ffff,
                            0x00,
                            \_SB.PCI0.LPCB.LNKA,
                            0x00,
                        },
                    })
                }
            }
            Name(_PRW, Package(0x02) {
                0x0b,
                0x04,
            })
        }
        Device(LPCB) {
            Name(_ADR, 0x001f0000)
            OperationRegion(LPC0, PCI_Config, 0x40, 0xc0)
            Field(LPC0, AnyAcc, NoLock, Preserve) {
                Offset(0x20),
                PARC,   8,
                PBRC,   8,
                PCRC,   8,
                PDRC,   8,
                Offset(0x28),
                PERC,   8,
                PFRC,   8,
                PGRC,   8,
                PHRC,   8,
                Offset(0x40),
                IOD0,   8,
                IOD1,   8,
                Offset(0x60),
                ,       2,
                CLKR,   1,
                Offset(0xb0),
                RAEN,   1,
                ,       13,
                RCBA,   18
            }
            OperationRegion(SIO, SystemIO, 0x2e, 0x02)
            OperationRegion(FJIO, SystemIO, 0xfd60, 0x15)
            Scope(\) {
                Field(\_SB.PCI0.LPCB.FJIO, ByteAcc, NoLock, Preserve) {
                    AIDC,       8,
                    ADTC,       8,
                    AIDB,       8,
                    ADTB,       8,
                    AIDA,       8,
                    ADTA,       8,
                    AIDD,       8,
                    ADTD,       8,
                    Offset(0x10),
                    PMID,       8,
                    Offset(0x14),
                    PMDT,       8
                }
            }
            OperationRegion(PMIO, SystemIO, 0x1000, 0x80)
            OperationRegion(OGIO, SystemIO, 0x1180, 0x3c)
            Scope(\) {
                Field(\_SB.PCI0.LPCB.PMIO, ByteAcc, NoLock, Preserve) {
                    Offset(0x10),
                    Offset(0x11),
                    FOCT,       1,
                    Offset(0x2a),
                    Offset(0x2b),
                    G8ST,       1,
                    Offset(0x42),
                    ,   1,
                    GPEC,       1,
                    Offset(0x64),
                    ,   9,
                    SCIS,       1
                }
                Field(\_SB.PCI0.LPCB.OGIO, ByteAcc, NoLock, Preserve) {
                    Offset(0xc),
                    Offset(0xd),
                    LLVL,       1,
                    Offset(0xe),
                    ,   4,
                    SMDP,       1,
                    Offset(0x2c),
                    Offset(0x2d),
                    LPOL,       1,
                    ,   4,
                    EXPL,       1,
                    Offset(0x38),
                    ,   1,
                    PXRS,       1,
                    PXCL,       1
                }
            }
            Scope(\) {
                Name(TCDT, 0x69)
                Name(TCUT, 0x64)
                Name(TCOR, Zero)
                Name(LPDT, Zero)
                Name(TCPF, Zero)
            }
            Method(TINI) {
                If(TCOV) {
                    Store(CUOV, TCUT)
                    Store(CDOV, TCDT)
                }
                Else {
                    If(TJ85) {
                        Store(0x55, TCUT)
                        Store(0x5a, TCDT)
                    }
                }
                If(And(TOFF, 0x80, )) {
                    Subtract(TOFF, 0x01, Local0)
                    And(Not(Local0, ), 0xff, Local0)
                    Store(Divide(Local0, 0x02, , ), Local0)
                    Subtract(TCUT, Local0, TCUT)
                    Subtract(TCDT, Local0, TCDT)
                }
                Else {
                    Store(Divide(TOFF, 0x02, , ), Local0)
                    Add(TCUT, Local0, TCUT)
                    Add(TCDT, Local0, TCDT)
                }
                If(PTCE) {
                    Store(One, TCPF)
                }
            }
            Method(TCTR) {
                If(TCPF) {
                    If(LNot(PERR)) {
                        And(PDAT, 0xfc, Local4)
                        If(LNot(LEqual(Local4, LPDT))) {
                            Store(0x9c, BCMD)
                            Store(Zero, SMIC)
                            If(DTS1) {
                                Subtract(PDAT, DTS1, Local5)
                                Subtract(Local5, TCOR, Local6)
                                If(LAnd(LGreater(Local6, 0x08), LLess(Local6, 
0x80000000))) {
                                    Store(0x08, Local6)
                                }
                                If(LAnd(LNot(LLess(Local6, 0x80000000)), 
LLess(Local6, 0xf8))) {
                                    Store(0xf8, Local6)
                                }
                                If(Local6) {
                                    Add(TCOR, Local6, Local6)
                                    Store(Zero, Local7)
                                    While(LLess(Local7, 0x0a)) {
                                        If(LNot(LOr(ABSY, TSMP))) {
                                            If(LNot(And(\_SB.FEXT.FUNC(0x1006, 
0x11, 0x0105, Add(And(Add(MFST, Local6, ), 0xff, ), 0x2800, )), 0x80000000, ))) 
{
                                                Store(Local6, TCOR)
                                                Store(Local4, LPDT)
                                                Break
                                            }
                                        }
                                        Sleep(0x32)
                                        Increment(Local7)
                                    }
                                    If(LNot(LLess(Local7, 0x0a))) {
                                        Store(Zero, TSMP)
                                    }
                                }
                            }
                        }
                    }
                }
                If(LNot(LAnd(FPEF, FPMN))) {
                    If(LNot(LLess(PDAT, Add(TCDT, TCOR, )))) {
                        If(CondRefOf(\_PR.CPU0._PPC, Local0)) {
                            If(LLess(\_PR.CPU0._PPC, Subtract(PSNM, 0x01, ))) {
                                Increment(\_PR.CPU0._PPC)
                                Notify(\_PR.CPU0, 0x80)
                            }
                        }
                        If(MPEN) {
                            If(CondRefOf(\_PR.CPU1._PPC, Local1)) {
                                If(LLess(\_PR.CPU1._PPC, Subtract(PSNM, 0x01, 
))) {
                                    Increment(\_PR.CPU1._PPC)
                                    Notify(\_PR.CPU1, 0x80)
                                }
                            }
                        }
                    }
                    If(LNot(LGreater(PDAT, Add(TCUT, TCOR, )))) {
                        If(CondRefOf(\_PR.CPU0._PPC, Local2)) {
                            If(\_PR.CPU0._PPC) {
                                Decrement(\_PR.CPU0._PPC)
                                Notify(\_PR.CPU0, 0x80)
                            }
                        }
                        If(MPEN) {
                            If(CondRefOf(\_PR.CPU1._PPC, Local3)) {
                                If(\_PR.CPU1._PPC) {
                                    Decrement(\_PR.CPU1._PPC)
                                    Notify(\_PR.CPU1, 0x80)
                                }
                            }
                        }
                    }
                }
            }
            Method(TPTS) {
                If(CondRefOf(\_PR.CPU0._PPC, Local0)) {
                    Store(Zero, \_PR.CPU0._PPC)
                    Notify(\_PR.CPU0, 0x80)
                }
                If(MPEN) {
                    If(CondRefOf(\_PR.CPU1._PPC, Local1)) {
                        Store(Zero, \_PR.CPU1._PPC)
                        Notify(\_PR.CPU1, 0x80)
                    }
                }
                Store(Zero, LPDT)
                Store(Zero, TCOR)
                Store(Zero, TCPF)
                Store(Zero, TSMP)
            }
            Method(TWAK) {
                If(LNot(LLess(PDAT, TCDT))) {
                    If(CondRefOf(\_PR.CPU0._PPC, Local0)) {
                        If(LLess(\_PR.CPU0._PPC, Subtract(PSNM, 0x01, ))) {
                            Increment(\_PR.CPU0._PPC)
                            Notify(\_PR.CPU0, 0x80)
                        }
                    }
                    If(MPEN) {
                        If(CondRefOf(\_PR.CPU1._PPC, Local1)) {
                            If(LLess(\_PR.CPU1._PPC, Subtract(PSNM, 0x01, ))) {
                                Increment(\_PR.CPU1._PPC)
                                Notify(\_PR.CPU1, 0x80)
                            }
                        }
                    }
                }
                If(PTCE) {
                    Store(One, TCPF)
                }
            }
            Device(LNKA) {
                Name(_HID, 0x0f0cd041)
                Name(_UID, 0x01)
                Method(_DIS, 0, Serialized) {
                    Store(0x80, PARC)
                }
                Name(_PRS, Buffer(0x06) {0x23, 0xfa, 0xd4, 0x18, 0x79, 0x0 })
                Method(_CRS, 0, Serialized) {
                    Name(RTLA, Buffer(0x06) {0x23, 0x0, 0x0, 0x18, 0x79, 0x0 })
                    CreateWordField(RTLA, 0x01, IRQ0)
                    Store(Zero, IRQ0)
                    ShiftLeft(0x01, And(PARC, 0x0f, ), IRQ0)
                    Return(RTLA)
                }
                Method(_SRS, 1, Serialized) {
                    CreateWordField(Arg0, 0x01, IRQ0)
                    FindSetRightBit(IRQ0, Local0)
                    Decrement(Local0)
                    Store(Local0, PARC)
                }
                Method(_STA, 0, Serialized) {
                    If(And(PARC, 0x80, )) {
                        Return(0x09)
                    }
                    Else {
                        Return(0x0b)
                    }
                }
            }
            Device(LNKB) {
                Name(_HID, 0x0f0cd041)
                Name(_UID, 0x02)
                Method(_DIS, 0, Serialized) {
                    Store(0x80, PBRC)
                }
                Name(_PRS, Buffer(0x06) {0x23, 0xfa, 0xd8, 0x18, 0x79, 0x0 })
                Method(_CRS, 0, Serialized) {
                    Name(RTLB, Buffer(0x06) {0x23, 0x0, 0x0, 0x18, 0x79, 0x0 })
                    CreateWordField(RTLB, 0x01, IRQ0)
                    Store(Zero, IRQ0)
                    ShiftLeft(0x01, And(PBRC, 0x0f, ), IRQ0)
                    Return(RTLB)
                }
                Method(_SRS, 1, Serialized) {
                    CreateWordField(Arg0, 0x01, IRQ0)
                    FindSetRightBit(IRQ0, Local0)
                    Decrement(Local0)
                    Store(Local0, PBRC)
                }
                Method(_STA, 0, Serialized) {
                    If(And(PBRC, 0x80, )) {
                        Return(0x09)
                    }
                    Else {
                        Return(0x0b)
                    }
                }
            }
            Device(LNKC) {
                Name(_HID, 0x0f0cd041)
                Name(_UID, 0x03)
                Method(_DIS, 0, Serialized) {
                    Store(0x80, PCRC)
                }
                Name(_PRS, Buffer(0x06) {0x23, 0xfa, 0xd4, 0x18, 0x79, 0x0 })
                Method(_CRS, 0, Serialized) {
                    Name(RTLC, Buffer(0x06) {0x23, 0x0, 0x0, 0x18, 0x79, 0x0 })
                    CreateWordField(RTLC, 0x01, IRQ0)
                    Store(Zero, IRQ0)
                    ShiftLeft(0x01, And(PCRC, 0x0f, ), IRQ0)
                    Return(RTLC)
                }
                Method(_SRS, 1, Serialized) {
                    CreateWordField(Arg0, 0x01, IRQ0)
                    FindSetRightBit(IRQ0, Local0)
                    Decrement(Local0)
                    Store(Local0, PCRC)
                }
                Method(_STA, 0, Serialized) {
                    If(And(PCRC, 0x80, )) {
                        Return(0x09)
                    }
                    Else {
                        Return(0x0b)
                    }
                }
            }
            Device(LNKD) {
                Name(_HID, 0x0f0cd041)
                Name(_UID, 0x04)
                Method(_DIS, 0, Serialized) {
                    Store(0x80, PDRC)
                }
                Name(_PRS, Buffer(0x06) {0x23, 0xfa, 0xd8, 0x18, 0x79, 0x0 })
                Method(_CRS, 0, Serialized) {
                    Name(RTLD, Buffer(0x06) {0x23, 0x0, 0x0, 0x18, 0x79, 0x0 })
                    CreateWordField(RTLD, 0x01, IRQ0)
                    Store(Zero, IRQ0)
                    ShiftLeft(0x01, And(PDRC, 0x0f, ), IRQ0)
                    Return(RTLD)
                }
                Method(_SRS, 1, Serialized) {
                    CreateWordField(Arg0, 0x01, IRQ0)
                    FindSetRightBit(IRQ0, Local0)
                    Decrement(Local0)
                    Store(Local0, PDRC)
                }
                Method(_STA, 0, Serialized) {
                    If(And(PDRC, 0x80, )) {
                        Return(0x09)
                    }
                    Else {
                        Return(0x0b)
                    }
                }
            }
            Device(LNKE) {
                Name(_HID, 0x0f0cd041)
                Name(_UID, 0x05)
                Method(_DIS, 0, Serialized) {
                    Store(0x80, PERC)
                }
                Name(_PRS, Buffer(0x06) {0x23, 0xfa, 0xd4, 0x18, 0x79, 0x0 })
                Method(_CRS, 0, Serialized) {
                    Name(RTLE, Buffer(0x06) {0x23, 0x0, 0x0, 0x18, 0x79, 0x0 })
                    CreateWordField(RTLE, 0x01, IRQ0)
                    Store(Zero, IRQ0)
                    ShiftLeft(0x01, And(PERC, 0x0f, ), IRQ0)
                    Return(RTLE)
                }
                Method(_SRS, 1, Serialized) {
                    CreateWordField(Arg0, 0x01, IRQ0)
                    FindSetRightBit(IRQ0, Local0)
                    Decrement(Local0)
                    Store(Local0, PERC)
                }
                Method(_STA, 0, Serialized) {
                    If(And(PERC, 0x80, )) {
                        Return(0x09)
                    }
                    Else {
                        Return(0x0b)
                    }
                }
            }
            Device(LNKF) {
                Name(_HID, 0x0f0cd041)
                Name(_UID, 0x06)
                Method(_DIS, 0, Serialized) {
                    Store(0x80, PFRC)
                }
                Name(_PRS, Buffer(0x06) {0x23, 0xfa, 0xd8, 0x18, 0x79, 0x0 })
                Method(_CRS, 0, Serialized) {
                    Name(RTLF, Buffer(0x06) {0x23, 0x0, 0x0, 0x18, 0x79, 0x0 })
                    CreateWordField(RTLF, 0x01, IRQ0)
                    Store(Zero, IRQ0)
                    ShiftLeft(0x01, And(PFRC, 0x0f, ), IRQ0)
                    Return(RTLF)
                }
                Method(_SRS, 1, Serialized) {
                    CreateWordField(Arg0, 0x01, IRQ0)
                    FindSetRightBit(IRQ0, Local0)
                    Decrement(Local0)
                    Store(Local0, PFRC)
                }
                Method(_STA, 0, Serialized) {
                    If(And(PFRC, 0x80, )) {
                        Return(0x09)
                    }
                    Else {
                        Return(0x0b)
                    }
                }
            }
            Device(LNKG) {
                Name(_HID, 0x0f0cd041)
                Name(_UID, 0x07)
                Method(_DIS, 0, Serialized) {
                    Store(0x80, PGRC)
                }
                Name(_PRS, Buffer(0x06) {0x23, 0xfa, 0xd4, 0x18, 0x79, 0x0 })
                Method(_CRS, 0, Serialized) {
                    Name(RTLG, Buffer(0x06) {0x23, 0x0, 0x0, 0x18, 0x79, 0x0 })
                    CreateWordField(RTLG, 0x01, IRQ0)
                    Store(Zero, IRQ0)
                    ShiftLeft(0x01, And(PGRC, 0x0f, ), IRQ0)
                    Return(RTLG)
                }
                Method(_SRS, 1, Serialized) {
                    CreateWordField(Arg0, 0x01, IRQ0)
                    FindSetRightBit(IRQ0, Local0)
                    Decrement(Local0)
                    Store(Local0, PGRC)
                }
                Method(_STA, 0, Serialized) {
                    If(And(PGRC, 0x80, )) {
                        Return(0x09)
                    }
                    Else {
                        Return(0x0b)
                    }
                }
            }
            Device(LNKH) {
                Name(_HID, 0x0f0cd041)
                Name(_UID, 0x08)
                Method(_DIS, 0, Serialized) {
                    Store(0x80, PHRC)
                }
                Name(_PRS, Buffer(0x06) {0x23, 0xfa, 0xd8, 0x18, 0x79, 0x0 })
                Method(_CRS, 0, Serialized) {
                    Name(RTLH, Buffer(0x06) {0x23, 0x0, 0x0, 0x18, 0x79, 0x0 })
                    CreateWordField(RTLH, 0x01, IRQ0)
                    Store(Zero, IRQ0)
                    ShiftLeft(0x01, And(PHRC, 0x0f, ), IRQ0)
                    Return(RTLH)
                }
                Method(_SRS, 1, Serialized) {
                    CreateWordField(Arg0, 0x01, IRQ0)
                    FindSetRightBit(IRQ0, Local0)
                    Decrement(Local0)
                    Store(Local0, PHRC)
                }
                Method(_STA, 0, Serialized) {
                    If(And(PHRC, 0x80, )) {
                        Return(0x09)
                    }
                    Else {
                        Return(0x0b)
                    }
                }
            }
            Method(_INI) {
                \_SB.PCI0.LPCB.CMBT.SWCF()
                AINI()
                PRCF()
                If(RPCP) {
                    Store(One, RPEN)
                    Store(B2TC, RPDS)
                }
            }
            Device(TPM) {
                Method(_HID) {
                    If(LEqual(TPMV, 0x01)) {
                        Return(0x0201d824)
                    }
                    If(LEqual(TPMV, 0x02)) {
                        Return(0x0435cf4d)
                    }
                    If(LEqual(TPMV, 0x03)) {
                        Return(0x01016d08)
                    }
                    Return(0x310cd041)
                }
                Name(_CID, 0x310cd041)
                Name(_UID, 0x01)
                Method(_STA) {
                    If(TPRS) {
                        Return(0x0f)
                    }
                    Return(0x00)
                }
                Name(_CRS, Buffer(0x1e) {0x47, 0x1, 0x4e, 0x0, 0x4e, 0x0, 0x1, 
0x2, 0x47, 0x1, 0x0, 0xfd, 0x0, 0xfd, 0x1, 0xc, 0x86, 0x9, 0x0, 0x1, 0x0, 0x0, 
0xd4, 0xfe, 0x0, 0x50, 0x0, 0x0, 0x79, 0x0 })
            }
            Scope(\) {
                IndexField(AIDA, ADTA, ByteAcc, NoLock, Preserve) {
                    Offset(0x9),
                    RI1M,       1,
                    RI2M,       1,
                    RI3M,       1,
                    RI4M,       1,
                    RI1,        1,
                    RI2,        1,
                    RI3,        1,
                    RI4,        1,
                    ,   2,
                    CVCL,       1,
                    ,   3,
                    BLCT,       2,
                    Offset(0x20),
                    G5P0,       8,
                    G5C0,       8,
                    G3P0,       8,
                    G3C0,       8,
                    Offset(0x40),
                    SSF0,       8,
                    SSF1,       8,
                    SSM0,       8,
                    SSM1,       8,
                    SSI0,       8,
                    SSTM,       8,
                    SSF2,       8,
                    SSM2,       8,
                    SSI1,       8,
                    Offset(0x52),
                    G3P1,       8,
                    G3C1,       8,
                    G3P2,       8,
                    G3C2,       8,
                    QSWC,       8,
                    Offset(0x60),
                    SSS0,       8,
                    SSS1,       8
                }
                IndexField(AIDB, ADTB, ByteAcc, NoLock, Preserve) {
                    Offset(0x29),
                    BRCL,       8,
                    LCDB,       8,
                    Offset(0x30),
                    LCDC,       8
                }
                IndexField(AIDC, ADTC, ByteAcc, NoLock, Preserve) {
                    TASF,       1,
                    TBSF,       1,
                    B1SU,       1,
                    B1SD,       1,
                    B2SU,       1,
                    B2SD,       1,
                    Offset(0x2),
                    ,   4,
                    VSTB,       1,
                    Offset(0x5),
                    ,   6,
                    ACPW,       1,
                    Offset(0x20),
                    BCTL,       8,
                    Offset(0x23),
                    TAF,        1,
                    TASM,       1,
                    ,   2,
                    TBF,        1,
                    TBSM,       1,
                    Offset(0x24),
                    TIMA,       8,
                    TIMB,       8,
                    Offset(0x28),
                    CDLP,       8,
                    HDLP,       8,
                    FDLP,       8,
                    Offset(0x4e),
                    B1UM,       1,
                    B1DM,       1,
                    ,   1,
                    B1TC,       1,
                    B2UM,       1,
                    B2DM,       1,
                    ,   1,
                    B2TC,       1,
                    BAPC,       6
                }
                IndexField(AIDC, ADTC, ByteAcc, NoLock, Preserve) {
                    STAE,       8
                }
                IndexField(AIDD, ADTD, ByteAcc, NoLock, Preserve) {
                    Offset(0x80),
                    GIDI,       8,
                    GIDC,       8,
                    GIDO,       8,
                    Offset(0x90),
                    G3SI,       8,
                    G3SC,       8,
                    G3SO,       8,
                    G3SM,       8,
                    Offset(0xa0),
                    WOXF,       8,
                    Offset(0xa2),
                    WOXE,       8,
                    WOXD,       8,
                    WOXS,       8,
                    ,   7,
                    WOXT,       1,
                    WOXL,       8,
                    Offset(0xb0),
                    AMPV,       6
                }
            }
            Scope(\) {
                IndexField(PMID, PMDT, ByteAcc, NoLock, Preserve) {
                    Offset(0xa0),
                    UPPR,       1,
                    ERRO,       1,
                    PASS,       1,
                    PSOK,       1,
                    PSNG,       1,
                    TOUT,       1,
                    SIRN,       1,
                    STSC,       1,
                    OVFL,       1,
                    LWMD,       1,
                    TALM,       1,
                    EMGC,       1,
                    OCNT,       4,
                    TDTC,       1,
                    ,   4,
                    AERR,       1,
                    PERR,       1,
                    ABSY,       1,
                    Offset(0xa4),
                    PDAT,       8,
                    Offset(0xc0),
                    Offset(0xc1),
                    B1P,        1,
                    B2P,        1,
                    B1C,        1,
                    B2C,        1,
                    B1ER,       1,
                    B2ER,       1,
                    PKSH,       1,
                    CMB,        1,
                    B1CP,       8,
                    B2CP,       8,
                    BAVG,       8,
                    B1VH,       8,
                    B1VL,       8,
                    B2VH,       8,
                    B2VL,       8,
                    B1TM,       8,
                    B2TM,       8,
                    B1CH,       8,
                    B1CL,       8,
                    B2CH,       8,
                    B2CL,       8,
                    BTMH,       8,
                    BTML,       8,
                    B1LH,       8,
                    B1LL,       8,
                    B2LH,       8,
                    B2LL,       8,
                    B1ID,       4,
                    B1NO,       4,
                    B2ID,       4,
                    B2NO,       4,
                    B1DV,       8,
                    B2DV,       8,
                    B1DH,       8,
                    B1DL,       8,
                    B2DH,       8,
                    B2DL,       8,
                    TBSI,       8,
                    TBSH,       8,
                    TBSL,       8,
                    BHDD,       1,
                    BOPT,       1,
                    ,   5,
                    ABLC,       1,
                    Offset(0xe8),
                    TBCM,       8,
                    TBMD,       8,
                    TBIN,       8,
                    DCOL,       7,
                    S3EN,       1
                }
                IndexField(PMID, PMDT, ByteAcc, NoLock, Preserve) {
                    Offset(0xa2),
                    TCST,       8
                }
            }
            Scope(\) {
                IndexField(AIDA, ADTA, ByteAcc, NoLock, Preserve) {
                    Offset(0x52),
                    BRST,       1,
                    ,   1,
                    BY1C,       2
                }
                IndexField(AIDC, ADTC, ByteAcc, NoLock, Preserve) {
                    Offset(0x4f),
                    BY1O,       1,
                    BY2O,       1
                }
                IndexField(AIDD, ADTD, ByteAcc, NoLock, Preserve) {
                    Offset(0x80),
                    BY1I,       4,
                    ,   1,
                    SID0,       1,
                    Offset(0x92),
                    ,   6,
                    UMPW,       1
                }
            }
            Method(AINI) {
                And(SSM1, 0xcf, SSM1)
                Store(LWMD, PLWM)
                Store(TALM, PTAL)
                Store(0x95, BCMD)
                Or(PLWM, ShiftLeft(PTAL, 0x01, ), DID)
                Store(Zero, SMIC)
                If(LAnd(TALM, LNot(ACPW))) {
                    Store(One, FOCT)
                }
                Else {
                    Store(Zero, FOCT)
                }
                \_SB.FEXT.GINI()
                If(LNot(LLess(\_SB.OSTP(), 0x40))) {
                    If(AS34) {
                        Store(0x01, S3EN)
                    }
                    If(LEqual(DCLW, 0x7f)) {
                        Store(0x08, DCOL)
                    }
                    Else {
                        Store(DCLW, DCOL)
                    }
                }
                SLED()
            }
            Method(SLED) {
                If(LNot(FSCM)) {
                    Store(0x50, BRCL)
                    If(ACPW) {
                        If(SID0) {
                            Store(0xff, LCDB)
                        }
                        Else {
                            Store(0x40, LCDB)
                        }
                    }
                    Else {
                        If(SID0) {
                            Store(0x7f, LCDB)
                        }
                        Else {
                            Store(0x20, LCDB)
                        }
                    }
                }
            }
            Name(RGSI, 0x19)
            Device(FJEX) {
                Name(_HID, "FUJ02B1")
                Method(_STA) {
                    Return(0x0f)
                }
                Method(RBLL) {
                    Return(BLLM)
                }
                Scope(\) {
                    Name(LBLL, 0x00)
                    Name(LLCD, Ones)
                }
                Method(GBLL) {
                    Store(LBLL, Local2)
                    Store(LCDL, Local1)
                    If(LNot(LEqual(LLCD, Local1))) {
                        Store(Local1, LLCD)
                        Name(BBCT, Buffer(BLLM) { })
                        Store(BLLT, BBCT)
                        Store(BLLM, Local0)
                        While(Local0) {
                            Decrement(Local0)
                            If(LEqual(GBUF(BBCT, Local0), Local1)) {
                                Store(Local0, Local2)
                                Store(Local0, LBLL)
                                Store(Zero, Local0)
                            }
                        }
                    }
                    If(BHKF) {
                        Store(Zero, BHKF)
                        Or(Local2, 0x80000000, Local2)
                    }
                    Return(Local2)
                }
                Method(GBLS) {
                    Store(LBLL, Local2)
                    Store(LCDL, Local1)
                    If(LNot(LEqual(LLCD, Local1))) {
                        Store(Local1, LLCD)
                        Name(BBCT, Buffer(BLLM) { })
                        Store(BLLT, BBCT)
                        Store(BLLM, Local0)
                        While(Local0) {
                            Decrement(Local0)
                            If(LEqual(GBUF(BBCT, Local0), Local1)) {
                                Store(Local0, Local2)
                                Store(Local0, LBLL)
                                Store(Zero, Local0)
                            }
                        }
                    }
                    If(BHKF) {
                        Or(Local2, 0x80000000, Local2)
                    }
                    Return(Local2)
                }
                Method(SBLL, 1) {
                    If(NGTF) {
                        Store(Arg0, LSBL)
                        Return(Zero)
                    }
                    If(LLess(Arg0, BLLM)) {
                        Name(BBCT, Buffer(BLLM) { })
                        Store(BLLT, BBCT)
                        CreateByteField(BBCT, Arg0, BLL0)
                        Store(BLL0, LCDL)
                        Store(LCDL, PO80)
                        \_SB.PCI0.GFX0.AINT(0x01, Subtract(0xff, BLL0, ))
                        Store(0x02000000, DID)
                        Or(DID, Arg0, DID)
                        Store(0x82, BCMD)
                        Store(Zero, SMIC)
                    }
                }
                Method(SBL2, 1) {
                    If(LLess(Arg0, BLLM)) {
                        Name(BBCT, Buffer(BLLM) { })
                        Store(BLLT, BBCT)
                        CreateByteField(BBCT, Arg0, BLL0)
                        Store(BLL0, LCDL)
                        Or(0x03000000, Arg0, DID)
                        Store(0x82, BCMD)
                        Store(Zero, SMIC)
                    }
                }
                Method(GBUF, 2) {
                    CreateByteField(Arg0, Arg1, BLL0)
                    Return(BLL0)
                }
                Method(GMOU) {
                    Store(0x02, DID)
                    Store(0x91, BCMD)
                    Store(Zero, SMIC)
                    Store(DID, Local0)
                    If(MHKF) {
                        Store(Zero, MHKF)
                        Or(Local0, 0x80000000, Local0)
                    }
                    Return(Local0)
                }
                Method(SMOU, 1) {
                    If(LNot(LGreater(Arg0, One))) {
                        Store(Arg0, DID)
                        Store(0x91, BCMD)
                        Store(Zero, SMIC)
                    }
                }
                Method(GHKS) {
                    Return(AHKF)
                }
                Method(GSIF) {
                    If(IMTF) {
                        Or(RGSI, 0x08, RGSI)
                    }
                    Else {
                        And(RGSI, 0xfffffff7, RGSI)
                    }
                    Return(RGSI)
                }
            }
            Name(BTF1, 0x9a)
            Name(BTF2, 0x98)
            Scope(\) {
                Name(BTBL, Zero)
                Name(BTST, Zero)
                IndexField(AIDA, ADTA, ByteAcc, NoLock, Preserve) {
                    Offset(0x44),
                    ,   2,
                    WLSW,       1
                }
                IndexField(AIDD, ADTD, ByteAcc, NoLock, Preserve) {
                    Offset(0x92),
                    ,   2,
                    WLRF,       1,
                    ABON,       1
                }
            }
            Device(CMBT) {
                Name(_HID, "FUJ02E1")
                Method(_STA) {
                    Return(0x00)
                }
                Method(_INI) {
                    Store(Zero, BTBL)
                }
                Method(INFO) {
                    If(LEqual(_STA(), 0x0f)) {
                        Store(BTF1, Local0)
                    }
                    Else {
                        Store(BTF2, Local0)
                    }
                    Or(Local0, 0x08, Local0)
                    Return(Local0)
                }
                Method(STAT) {
                    Store(0x00, Local0)
                    Or(Local0, 0x01, Local0)
                    If(ABON) {
                        Or(Local0, 0x02, Local0)
                    }
                    If(WLRF) {
                        Or(Local0, 0x08, Local0)
                    }
                    If(ABON) {
                        Or(Local0, 0x10, Local0)
                    }
                    If(BTBL) {
                        Or(Local0, 0x80, Local0)
                    }
                    Return(Local0)
                }
                Method(CNTL, 2) {
                    If(And(Arg0, 0x02, )) {
                        If(LEqual(_STA(), 0x0f)) {
                            If(And(Arg1, 0x02, )) {
                                Store(One, ABON)
                            }
                            Else {
                                Store(Zero, ABON)
                            }
                        }
                    }
                    If(LAnd(And(Arg0, 0x08, ), WLEN)) {
                        ShiftRight(And(Arg1, 0x08, ), 0x03, WLRF)
                    }
                    If(And(Arg0, 0x80, )) {
                        ShiftRight(And(Arg1, 0x80, ), 0x07, BTBL)
                        If(BTBL) {
                            If(WLSW) {
                                Notify(CMBT, 0x81)
                            }
                            Else {
                                Notify(CMBT, 0x82)
                            }
                        }
                    }
                }
                Method(SWCF) {
                    If(BTBL) {
                        If(WLSW) {
                            Notify(CMBT, 0x81)
                        }
                        Else {
                            Notify(CMBT, 0x82)
                        }
                    }
                    Else {
                        If(WLSW) {
                            If(BLEN) {
                                Store(One, ABON)
                                Store(One, ABLC)
                                If(WLEN) {
                                    Store(One, WLRF)
                                }
                                Else {
                                    If(LNot(RBSN)) {
                                        Store(Zero, WLRF)
                                    }
                                }
                            }
                            Else {
                                Store(Zero, ABON)
                                If(WLEN) {
                                    Store(One, WLRF)
                                    Store(One, ABLC)
                                }
                                Else {
                                    If(LNot(RBSN)) {
                                        Store(Zero, WLRF)
                                    }
                                    Store(Zero, ABLC)
                                }
                            }
                        }
                        Else {
                            Store(Zero, ABON)
                            If(LNot(RBSN)) {
                                Store(Zero, WLRF)
                            }
                            Store(Zero, ABLC)
                        }
                    }
                }
                Method(BPTS, 1) {
                    If(LOr(LEqual(Arg0, 0x03), LEqual(Arg0, 0x04))) {
                        Store(WLRF, BTST)
                        Or(ShiftLeft(WLSW, 0x01, ), BTST, BTST)
                        Or(ShiftLeft(ABON, 0x02, ), BTST, BTST)
                    }
                    Store(Zero, ABLC)
                    Store(Zero, ABON)
                }
                Method(BWAK, 1) {
                    If(LOr(LEqual(Arg0, 0x03), LEqual(Arg0, 0x04))) {
                        Store(And(BTST, 0x01, ), WLRF)
                        ShiftRight(And(BTST, 0x04, ), 0x02, ABON)
                        If(LAnd(WLSW, LOr(WLRF, ABON))) {
                            Store(One, ABLC)
                        }
                        If(LNot(LEqual(ShiftRight(And(BTST, 0x02, ), 0x01, ), 
WLSW))) {
                            SWCF()
                        }
                    }
                }
            }
            Device(EC) {
                Name(_HID, 0x090cd041)
                Name(_CRS, Buffer(0x12) {0x47, 0x1, 0x62, 0x0, 0x62, 0x0, 0x1, 
0x1, 0x47, 0x1, 0x66, 0x0, 0x66, 0x0, 0x1, 0x1, 0x79, 0x0 })
                Name(_GPE, 0x17)
                Scope(\) {
                    Name(ECOK, Zero)
                }
                Method(_REG, 2) {
                    If(LEqual(Arg0, 0x03)) {
                        Store(Arg1, ECOK)
                    }
                }
                OperationRegion(SMB, EmbeddedControl, 0x00, 0xff)
                Scope(\) {
                    Field(\_SB.PCI0.LPCB.EC.SMB, ByteAcc, Lock, Preserve) {
                        Offset(0x4),
                        ECCM,   8,
                        ECD1,   8,
                        ECD2,   8,
                        ECD3,   8,
                        Offset(0xe0),
                        ECBM,   8,
                        ECB1,   8,
                        ECB2,   8,
                        ECB3,   8,
                        ECB4,   8,
                        ECB5,   8,
                        ECB6,   8,
                        ECB7,   8,
                        ECB8,   8,
                        ECB9,   8,
                        ECBA,   8,
                        ECBB,   8,
                        Offset(0xf8),
                        ECGM,   8,
                        ECG1,   8,
                        ECG2,   8,
                        ECG3,   8
                    }
                }
            }
            Device(DMAC) {
                Name(_HID, 0x0002d041)
                Method(_STA) {
                    Return(0x0f)
                }
                Name(_CRS, Buffer(0x1d) {0x47, 0x1, 0x0, 0x0, 0x0, 0x0, 0x1, 
0x10, 0x47, 0x1, 0x81, 0x0, 0x81, 0x0, 0x1, 0xf, 0x47, 0x1, 0xc0, 0x0, 0xc0, 
0x0, 0x1, 0x20, 0x2a, 0x10, 0x2, 0x79, 0x0 })
            }
            Device(KBC) {
                Name(R101, 0x0303d041)
                Name(R106, 0x2003d041)
                Method(_HID) {
                    If(SIDF) {
                        Return(R101)
                    }
                    Else {
                        Return(R106)
                    }
                }
                Method(_STA) {
                    Return(0x0f)
                }
                Name(_CRS, Buffer(0x15) {0x47, 0x1, 0x60, 0x0, 0x60, 0x0, 0x1, 
0x1, 0x47, 0x1, 0x64, 0x0, 0x64, 0x0, 0x1, 0x1, 0x22, 0x2, 0x0, 0x79, 0x0 })
            }
            Device(MATH) {
                Name(_HID, 0x040cd041)
                Method(_STA) {
                    Return(0x0f)
                }
                Name(_CRS, Buffer(0x0d) {0x47, 0x1, 0xf0, 0x0, 0xf0, 0x0, 0x1, 
0xf, 0x22, 0x0, 0x20, 0x79, 0x0 })
            }
            Device(PIC) {
                Name(_HID, 0xd041)
                Method(_STA) {
                    Return(0x0f)
                }
                Name(_CRS, Buffer(0x15) {0x47, 0x1, 0x20, 0x0, 0x20, 0x0, 0x1, 
0x2, 0x47, 0x1, 0xa0, 0x0, 0xa0, 0x0, 0x1, 0x2, 0x22, 0x4, 0x0, 0x79, 0x0 })
            }
            Device(PS2M) {
                Name(_HID, 0x130fd041)
                Method(_STA) {
                    Return(0x0f)
                }
                Name(_CRS, Buffer(0x05) {0x22, 0x0, 0x10, 0x79, 0x0 })
            }
            Device(RTC) {
                Name(_HID, 0x000bd041)
                Method(_STA) {
                    Return(0x0f)
                }
                Name(_CRS, Buffer(0x0d) {0x47, 0x1, 0x70, 0x0, 0x70, 0x0, 0x1, 
0x2, 0x22, 0x0, 0x1, 0x79, 0x0 })
            }
            Device(SPKR) {
                Name(_HID, 0x0008d041)
                Method(_STA) {
                    Return(0x0f)
                }
                Name(_CRS, Buffer(0x0a) {0x47, 0x1, 0x61, 0x0, 0x61, 0x0, 0x1, 
0x1, 0x79, 0x0 })
            }
            Device(TIME) {
                Name(_HID, 0x0001d041)
                Method(_STA) {
                    Return(0x0f)
                }
                Name(_CRS, Buffer(0x0d) {0x47, 0x1, 0x40, 0x0, 0x40, 0x0, 0x1, 
0x4, 0x22, 0x1, 0x0, 0x79, 0x0 })
            }
            Scope(\_SB.PCI0.LPCB) {
                OperationRegion(LIOD, PCI_Config, 0x80, 0x14)
            }
            Field(LIOD, AnyAcc, NoLock, Preserve) {
                CADR,   3,
                ,       1,
                CBDR,   3,
                Offset(0x1),
                LPDR,   2,
                ,       2,
                FDDR,   1,
                Offset(0x2),
                CALE,   1,
                CBLE,   1,
                LPLE,   1,
                FDLE,   1,
                Offset(0xc),
                GD3E,   1,
                ,       3,
                GD3B,   12
            }
            Name(TCOM, Package(0x08) {
                0x03f8,
                0x02f8,
                0x0220,
                0x0228,
                0x0238,
                0x02e8,
                0x0338,
                0x03e8,
            })
            Name(TLPT, Package(0x03) {
                0x0378,
                0x0278,
                0x03bc,
            })
            Name(TFDD, Package(0x02) {
                0x03f0,
                0x0370,
            })
            Method(DENA, 3, Serialized) {
                If(LEqual(Arg0, 0x00)) {
                    Store(Match(TCOM, MEQ, Arg1, MTR, 0x00, 0x00), Local0)
                    If(LNot(LEqual(Local0, Ones))) {
                        Store(Local0, CADR)
                        Store(One, CALE)
                    }
                }
                Else {
                    If(LOr(LEqual(Arg0, 0x01), LEqual(Arg0, 0x02))) {
                        Store(Match(TCOM, MEQ, Arg1, MTR, 0x00, 0x00), Local0)
                        If(LNot(LEqual(Local0, Ones))) {
                            Store(Local0, CBDR)
                            Store(One, CBLE)
                        }
                    }
                    Else {
                        If(LEqual(Arg0, 0x03)) {
                            Store(Match(TCOM, MEQ, Arg1, MTR, 0x00, 0x00), 
Local0)
                            If(LNot(LEqual(Local0, Ones))) {
                                Store(Local0, CBDR)
                                Store(One, CBLE)
                                ShiftRight(Arg2, 0x04, GD3B)
                                Store(One, GD3E)
                            }
                        }
                        Else {
                            If(LOr(LEqual(Arg0, 0x04), LEqual(Arg0, 0x05))) {
                                Store(Match(TLPT, MEQ, Arg1, MTR, 0x00, 0x00), 
Local0)
                                If(LNot(LEqual(Local0, Ones))) {
                                    Store(Local0, LPDR)
                                    Store(One, LPLE)
                                }
                            }
                            Else {
                                If(LEqual(Arg0, 0x07)) {
                                    Store(Match(TFDD, MEQ, Arg1, MTR, 0x00, 
0x00), Local0)
                                    If(LNot(LEqual(Local0, Ones))) {
                                        Store(Local0, FDDR)
                                        Store(One, FDLE)
                                    }
                                }
                            }
                        }
                    }
                }
            }
            Method(DDIS, 1, Serialized) {
                If(LEqual(Arg0, 0x00)) {
                    Store(Zero, CALE)
                }
                Else {
                    If(LOr(LEqual(Arg0, 0x01), LEqual(Arg0, 0x02))) {
                        Store(Zero, CBLE)
                    }
                    Else {
                        If(LEqual(Arg0, 0x03)) {
                            Store(Zero, CBLE)
                            Store(Zero, GD3E)
                        }
                        Else {
                            If(LOr(LEqual(Arg0, 0x04), LEqual(Arg0, 0x05))) {
                                Store(Zero, LPLE)
                            }
                            Else {
                                If(LEqual(Arg0, 0x07)) {
                                    Store(Zero, FDLE)
                                }
                            }
                        }
                    }
                }
            }
            Field(SIO, ByteAcc, NoLock, Preserve) {
                SIID,   8,
                SIDT,   8
            }
            IndexField(SIID, SIDT, ByteAcc, NoLock, Preserve) {
                ,       3,
                FDCP,   1,
                Offset(0x1),
                ,       2,
                PPP,    1,
                PPM,    1,
                Offset(0x2),
                ,       3,
                U1P,    1,
                ,       3,
                U2P,    1,
                Offset(0x4),
                PPEM,   2,
                Offset(0xc),
                U2MD,   6,
                Offset(0x20),
                FDA,    8,
                ,       2,
                ETOS,   1,
                Offset(0x23),
                PPA,    8,
                U1A,    8,
                U2A,    8,
                PPD,    4,
                FDD,    4,
                PPI,    4,
                FDI,    4,
                U2I,    4,
                U1I,    4,
                Offset(0x2b),
                IRA,    8,
                IRD,    4
            }
            Mutex(MTXS, 0)
            Method(ENTR) {
                Acquire(MTXS, 0xffff)
                Store(0x55, SIID)
            }
            Method(EXIT) {
                Store(0xaa, SIID)
                Release(MTXS)
            }
            Method(SETR, 5) {
                ENTR()
                If(Arg3) {
                    Subtract(FindSetRightBit(Arg3, Zero), One, Local0)
                }
                Else {
                    Store(Zero, Local0)
                }
                If(Arg4) {
                    Subtract(FindSetRightBit(Arg4, Zero), One, Local1)
                }
                Else {
                    Store(0x0f, Local1)
                }
                If(LEqual(Arg0, 0x00)) {
                    ShiftRight(Arg1, 0x02, U1A)
                    Store(Local0, U1I)
                }
                Else {
                    If(LEqual(Arg0, 0x01)) {
                        ShiftRight(Arg1, 0x02, U2A)
                        Store(Local0, U2I)
                    }
                    Else {
                        If(LEqual(Arg0, 0x02)) {
                            ShiftRight(Arg1, 0x02, U2A)
                            Store(Local0, U2I)
                        }
                        Else {
                            If(LEqual(Arg0, 0x03)) {
                                ShiftRight(Arg1, 0x02, U2A)
                                ShiftRight(Arg2, 0x03, IRA)
                                Store(Local0, U2I)
                                Store(Local1, IRD)
                            }
                            Else {
                                If(LEqual(Arg0, 0x04)) {
                                    ShiftRight(Arg1, 0x02, PPA)
                                    Store(Local0, PPI)
                                }
                                Else {
                                    If(LEqual(Arg0, 0x05)) {
                                        ShiftRight(Arg1, 0x02, PPA)
                                        Store(Local0, PPI)
                                        Store(Local1, PPD)
                                    }
                                    Else {
                                        If(LEqual(Arg0, 0x07)) {
                                            ShiftRight(Arg1, 0x02, FDA)
                                            Store(Local0, FDI)
                                            Store(Local1, FDD)
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                EXIT()
                If(Arg1) {
                    If(CondRefOf(DENA, Local0)) {
                        DENA(Arg0, Arg1, Arg2)
                    }
                    SETM(Arg0)
                }
                Else {
                    If(CondRefOf(DDIS, Local0)) {
                        DDIS(Arg0)
                    }
                }
            }
            Method(GETR, 5) {
                ENTR()
                Store(Zero, Local0)
                Store(0x0f, Local1)
                If(LEqual(Arg0, 0x00)) {
                    ShiftLeft(U1A, 0x02, Arg1)
                    Store(U1I, Local0)
                }
                Else {
                    If(LEqual(Arg0, 0x01)) {
                        ShiftLeft(U2A, 0x02, Arg1)
                        Store(U2I, Local0)
                    }
                    Else {
                        If(LEqual(Arg0, 0x02)) {
                            ShiftLeft(U2A, 0x02, Arg1)
                            Store(U2I, Local0)
                        }
                        Else {
                            If(LEqual(Arg0, 0x03)) {
                                ShiftLeft(U2A, 0x02, Arg1)
                                ShiftLeft(IRA, 0x03, Arg2)
                                Store(U2I, Local0)
                                Store(IRD, Local1)
                            }
                            Else {
                                If(LEqual(Arg0, 0x04)) {
                                    ShiftLeft(PPA, 0x02, Arg1)
                                    Store(PPI, Local0)
                                }
                                Else {
                                    If(LEqual(Arg0, 0x05)) {
                                        ShiftLeft(PPA, 0x02, Arg1)
                                        Store(PPI, Local0)
                                        Store(PPD, Local1)
                                    }
                                    Else {
                                        If(LEqual(Arg0, 0x07)) {
                                            ShiftLeft(FDA, 0x02, Arg1)
                                            Store(FDI, Local0)
                                            Store(FDD, Local1)
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                If(Local0) {
                    ShiftLeft(One, Local0, Arg3)
                }
                Else {
                    Store(Zero, Arg3)
                }
                If(LNot(LEqual(Local1, 0x0f))) {
                    ShiftLeft(One, Local1, Arg4)
                }
                Else {
                    Store(Zero, Arg4)
                }
                EXIT()
            }
            Method(SETM, 1) {
                ENTR()
                If(LEqual(Arg0, 0x00)) {
                    Store(One, U1P)
                }
                Else {
                    If(LEqual(Arg0, 0x01)) {
                        Store(0x06, U2MD)
                        Store(One, U2P)
                    }
                    Else {
                        If(LEqual(Arg0, 0x02)) {
                            Store(0x0e, U2MD)
                            Store(One, U2P)
                        }
                        Else {
                            If(LEqual(Arg0, 0x03)) {
                                Store(0x0e, U2MD)
                                Store(One, U2P)
                            }
                            Else {
                                If(LEqual(Arg0, 0x04)) {
                                    If(LEqual(PPF, One)) {
                                        Store(One, PPM)
                                    }
                                    Else {
                                        Store(Zero, PPM)
                                        Store(Zero, PPEM)
                                    }
                                    Store(One, PPP)
                                }
                                Else {
                                    If(LEqual(Arg0, 0x05)) {
                                        Store(Zero, PPM)
                                        Store(0x02, PPEM)
                                        Store(One, PPP)
                                    }
                                }
                            }
                        }
                    }
                }
                EXIT()
            }
            Method(SETP, 2) {
                ENTR()
                If(LEqual(Arg0, 0x00)) {
                    Store(Arg1, U1P)
                }
                Else {
                    If(LEqual(Arg0, 0x01)) {
                        Store(Arg1, U2P)
                    }
                    Else {
                        If(LEqual(Arg0, 0x02)) {
                            Store(Arg1, U2P)
                        }
                        Else {
                            If(LEqual(Arg0, 0x03)) {
                                Store(Arg1, U2P)
                            }
                            Else {
                                If(LEqual(Arg0, 0x04)) {
                                    Store(Arg1, PPP)
                                }
                                Else {
                                    If(LEqual(Arg0, 0x05)) {
                                        Store(Arg1, PPP)
                                    }
                                }
                            }
                        }
                    }
                }
                EXIT()
            }
            Method(GETP, 1) {
                Store(Zero, Local0)
                ENTR()
                If(LEqual(Arg0, 0x00)) {
                    Store(U1P, Local0)
                }
                Else {
                    If(LEqual(Arg0, 0x01)) {
                        Store(U2P, Local0)
                    }
                    Else {
                        If(LEqual(Arg0, 0x02)) {
                            Store(U2P, Local0)
                        }
                        Else {
                            If(LEqual(Arg0, 0x03)) {
                                Store(U2P, Local0)
                            }
                            Else {
                                If(LEqual(Arg0, 0x04)) {
                                    Store(PPP, Local0)
                                }
                                Else {
                                    If(LEqual(Arg0, 0x05)) {
                                        Store(PPP, Local0)
                                    }
                                }
                            }
                        }
                    }
                }
                EXIT()
                Return(Local0)
            }
            Method(CHKM, 1) {
                If(LEqual(Arg0, 0x00)) {
                    If(SPAF) {
                        Return(One)
                    }
                }
                Else {
                    If(LEqual(Arg0, 0x01)) {
                        If(LEqual(SPBF, 0x03)) {
                            Return(One)
                        }
                    }
                    Else {
                        If(LEqual(Arg0, 0x02)) {
                            If(LEqual(SPBF, One)) {
                                Return(One)
                            }
                        }
                        Else {
                            If(LEqual(Arg0, 0x03)) {
                                If(LEqual(SPBF, 0x02)) {
                                    Return(One)
                                }
                            }
                            Else {
                                If(LEqual(Arg0, 0x04)) {
                                    If(LOr(LEqual(PPF, One), LEqual(PPF, 
0x02))) {
                                        Return(One)
                                    }
                                }
                                Else {
                                    If(LEqual(Arg0, 0x05)) {
                                        If(LEqual(PPF, 0x03)) {
                                            Return(One)
                                        }
                                    }
                                    Else {
                                        If(LEqual(Arg0, 0x07)) {
                                            If(FDCF) {
                                                Return(One)
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                Return(Zero)
            }
            Device(UAR1) {
                Name(_HID, 0x0105d041)
                Name(_UID, 0x01)
                Name(RSRC, Buffer(0x0d) {0x47, 0x1, 0xf8, 0x3, 0xf8, 0x3, 0x1, 
0x8, 0x22, 0x10, 0x0, 0x79, 0x0 })
                Name(_PRS, Buffer(0x34) {0x31, 0x4, 0x47, 0x1, 0xf8, 0x3, 0xf8, 
0x3, 0x1, 0x8, 0x22, 0x10, 0x0, 0x30, 0x47, 0x1, 0xf8, 0x2, 0xf8, 0x2, 0x1, 
0x8, 0x22, 0x8, 0x0, 0x30, 0x47, 0x1, 0xe8, 0x3, 0xe8, 0x3, 0x1, 0x8, 0x22, 
0x10, 0x0, 0x30, 0x47, 0x1, 0xe8, 0x2, 0xe8, 0x2, 0x1, 0x8, 0x22, 0x8, 0x0, 
0x38, 0x79, 0x0 })
                Method(_STA) {
                    If(CHKM(0x00)) {
                        GETR(0x00, RefOf(Local0), RefOf(Local1), RefOf(Local2), 
RefOf(Local3))
                        If(Local0) {
                            Return(0x0f)
                        }
                        Else {
                            Return(0x0d)
                        }
                    }
                    Else {
                        Return(0x00)
                    }
                }
                Method(_CRS) {
                    CreateWordField(RSRC, 0x02, IO11)
                    CreateWordField(RSRC, 0x04, IO12)
                    CreateWordField(RSRC, 0x09, IRQ1)
                    GETR(0x00, RefOf(Local0), RefOf(Local1), RefOf(Local2), 
RefOf(Local3))
                    Store(Local0, IO11)
                    Store(Local0, IO12)
                    Store(Local2, IRQ1)
                    Return(RSRC)
                }
                Method(_SRS, 1) {
                    CreateWordField(Arg0, 0x04, IO11)
                    CreateWordField(Arg0, 0x09, IRQ1)
                    SETR(0x00, IO11, Zero, IRQ1, Zero)
                }
                Method(_DIS) {
                    SETR(0x00, Zero, Zero, Zero, Zero)
                }
                Method(_INI) {
                    If(CHKM(0x00)) {
                        SETM(0x00)
                    }
                }
            }
            Device(UAR2) {
                Name(_HID, 0x0105d041)
                Name(_UID, 0x02)
                Name(RSRC, Buffer(0x0d) {0x47, 0x1, 0xf8, 0x2, 0xf8, 0x2, 0x1, 
0x8, 0x22, 0x8, 0x0, 0x79, 0x0 })
                Name(_PRS, Buffer(0x34) {0x30, 0x47, 0x1, 0xf8, 0x3, 0xf8, 0x3, 
0x1, 0x8, 0x22, 0x10, 0x0, 0x31, 0x4, 0x47, 0x1, 0xf8, 0x2, 0xf8, 0x2, 0x1, 
0x8, 0x22, 0x8, 0x0, 0x30, 0x47, 0x1, 0xe8, 0x3, 0xe8, 0x3, 0x1, 0x8, 0x22, 
0x10, 0x0, 0x30, 0x47, 0x1, 0xe8, 0x2, 0xe8, 0x2, 0x1, 0x8, 0x22, 0x8, 0x0, 
0x38, 0x79, 0x0 })
                Method(_STA) {
                    If(CHKM(0x01)) {
                        GETR(0x01, RefOf(Local0), RefOf(Local1), RefOf(Local2), 
RefOf(Local3))
                        If(Local0) {
                            Return(0x0f)
                        }
                        Else {
                            Return(0x0d)
                        }
                    }
                    Else {
                        Return(0x00)
                    }
                }
                Method(_CRS) {
                    CreateWordField(RSRC, 0x02, IO11)
                    CreateWordField(RSRC, 0x04, IO12)
                    CreateWordField(RSRC, 0x09, IRQ1)
                    GETR(0x01, RefOf(Local0), RefOf(Local1), RefOf(Local2), 
RefOf(Local3))
                    Store(Local0, IO11)
                    Store(Local0, IO12)
                    Store(Local2, IRQ1)
                    Return(RSRC)
                }
                Method(_SRS, 1) {
                    CreateWordField(Arg0, 0x04, IO11)
                    CreateWordField(Arg0, 0x09, IRQ1)
                    SETR(0x01, IO11, Zero, IRQ1, Zero)
                }
                Method(_DIS) {
                    SETR(0x01, Zero, Zero, Zero, Zero)
                }
                Method(_INI) {
                    If(CHKM(0x01)) {
                        SETM(0x01)
                    }
                }
            }
            Device(IRDA) {
                Name(_HID, 0x1005d041)
                Name(RSRC, Buffer(0x0d) {0x47, 0x1, 0xf8, 0x2, 0xf8, 0x2, 0x1, 
0x8, 0x22, 0x8, 0x0, 0x79, 0x0 })
                Name(_PRS, Buffer(0x34) {0x30, 0x47, 0x1, 0xf8, 0x3, 0xf8, 0x3, 
0x1, 0x8, 0x22, 0x10, 0x0, 0x31, 0x4, 0x47, 0x1, 0xf8, 0x2, 0xf8, 0x2, 0x1, 
0x8, 0x22, 0x8, 0x0, 0x30, 0x47, 0x1, 0xe8, 0x3, 0xe8, 0x3, 0x1, 0x8, 0x22, 
0x10, 0x0, 0x30, 0x47, 0x1, 0xe8, 0x2, 0xe8, 0x2, 0x1, 0x8, 0x22, 0x8, 0x0, 
0x38, 0x79, 0x0 })
                Method(_STA) {
                    If(CHKM(0x02)) {
                        GETR(0x02, RefOf(Local0), RefOf(Local1), RefOf(Local2), 
RefOf(Local3))
                        If(Local0) {
                            Return(0x0f)
                        }
                        Else {
                            Return(0x0d)
                        }
                    }
                    Else {
                        Return(0x00)
                    }
                }
                Method(_CRS) {
                    CreateWordField(RSRC, 0x02, IO11)
                    CreateWordField(RSRC, 0x04, IO12)
                    CreateWordField(RSRC, 0x09, IRQ1)
                    GETR(0x02, RefOf(Local0), RefOf(Local1), RefOf(Local2), 
RefOf(Local3))
                    Store(Local0, IO11)
                    Store(Local0, IO12)
                    Store(Local2, IRQ1)
                    Return(RSRC)
                }
                Method(_SRS, 1) {
                    CreateWordField(Arg0, 0x04, IO11)
                    CreateWordField(Arg0, 0x09, IRQ1)
                    SETR(0x02, IO11, Zero, IRQ1, Zero)
                }
                Method(_DIS) {
                    SETR(0x02, Zero, Zero, Zero, Zero)
                }
                Method(_INI) {
                    If(CHKM(0x02)) {
                        SETM(0x02)
                    }
                }
                Method(_PSC) {
                    If(GETP(0x02)) {
                        Return(Zero)
                    }
                    Else {
                        Return(0x03)
                    }
                }
                Method(_PS0) {
                    SETP(0x02, One)
                }
                Method(_PS3) {
                    SETR(0x02, Zero, Zero, Zero, Zero)
                    SETP(0x02, Zero)
                }
            }
            Device(FIR) {
                Name(_HID, 0x10f0a34d)
                Name(RSRC, Buffer(0x18) {0x47, 0x1, 0xf8, 0x2, 0xf8, 0x2, 0x1, 
0x8, 0x47, 0x1, 0xf8, 0x6, 0xf8, 0x6, 0x1, 0x8, 0x22, 0x8, 0x0, 0x2a, 0x0, 0x0, 
0x79, 0x0 })
                Name(_PRS, Buffer(0x57) {0x30, 0x47, 0x1, 0xf8, 0x3, 0xf8, 0x3, 
0x1, 0x8, 0x47, 0x1, 0xf8, 0x7, 0xf8, 0x7, 0x1, 0x8, 0x22, 0x10, 0x0, 0x31, 
0x4, 0x47, 0x1, 0xf8, 0x2, 0xf8, 0x2, 0x1, 0x8, 0x47, 0x1, 0xf8, 0x6, 0xf8, 
0x6, 0x1, 0x8, 0x22, 0x8, 0x0, 0x30, 0x47, 0x1, 0xe8, 0x3, 0xe8, 0x3, 0x1, 0x8, 
0x47, 0x1, 0xe8, 0x7, 0xe8, 0x7, 0x1, 0x8, 0x22, 0x10, 0x0, 0x30, 0x47, 0x1, 
0xe8, 0x2, 0xe8, 0x2, 0x1, 0x8, 0x47, 0x1, 0xe8, 0x6, 0xe8, 0x6, 0x1, 0x8, 
0x22, 0x8, 0x0, 0x38, 0x2a, 0xa, 0x0, 0x79, 0x0 })
                Method(_STA) {
                    If(CHKM(0x03)) {
                        GETR(0x03, RefOf(Local0), RefOf(Local1), RefOf(Local2), 
RefOf(Local3))
                        If(Local0) {
                            Return(0x0f)
                        }
                        Else {
                            Return(0x0d)
                        }
                    }
                    Else {
                        Return(0x00)
                    }
                }
                Method(_CRS) {
                    CreateWordField(RSRC, 0x02, IO11)
                    CreateWordField(RSRC, 0x04, IO12)
                    CreateWordField(RSRC, 0x0a, IO21)
                    CreateWordField(RSRC, 0x0c, IO22)
                    CreateWordField(RSRC, 0x11, IRQ1)
                    CreateByteField(RSRC, 0x14, DMA1)
                    GETR(0x03, RefOf(Local0), RefOf(Local1), RefOf(Local2), 
RefOf(Local3))
                    Store(Local0, IO11)
                    Store(Local0, IO12)
                    Store(Local1, IO21)
                    Store(Local1, IO22)
                    Store(Local2, IRQ1)
                    Store(Local3, DMA1)
                    Return(RSRC)
                }
                Method(_SRS, 1) {
                    CreateWordField(Arg0, 0x04, IO11)
                    CreateWordField(Arg0, 0x0c, IO21)
                    CreateWordField(Arg0, 0x11, IRQ1)
                    CreateByteField(Arg0, 0x14, DMA1)
                    SETR(0x03, IO11, IO21, IRQ1, DMA1)
                }
                Method(_DIS) {
                    SETR(0x03, Zero, Zero, Zero, Zero)
                }
                Method(_INI) {
                    If(CHKM(0x03)) {
                        SETM(0x03)
                    }
                }
                Method(_PSC) {
                    If(GETP(0x03)) {
                        Return(Zero)
                    }
                    Else {
                        Return(0x03)
                    }
                }
                Method(_PS0) {
                    SETP(0x03, One)
                }
                Method(_PS3) {
                    SETR(0x03, Zero, Zero, Zero, Zero)
                    SETP(0x03, Zero)
                }
            }
            Device(LPT) {
                Name(_HID, 0x0004d041)
                Name(RSRC, Buffer(0x15) {0x47, 0x1, 0x78, 0x3, 0x78, 0x3, 0x1, 
0x8, 0x47, 0x1, 0x78, 0x7, 0x78, 0x7, 0x1, 0x4, 0x22, 0x80, 0x0, 0x79, 0x0 })
                Name(_PRS, Buffer(0x7d) {0x31, 0x4, 0x47, 0x1, 0x78, 0x3, 0x78, 
0x3, 0x1, 0x8, 0x47, 0x1, 0x78, 0x7, 0x78, 0x7, 0x1, 0x4, 0x22, 0x80, 0x0, 
0x30, 0x47, 0x1, 0x78, 0x2, 0x78, 0x2, 0x1, 0x8, 0x47, 0x1, 0x78, 0x6, 0x78, 
0x6, 0x1, 0x4, 0x22, 0x80, 0x0, 0x30, 0x47, 0x1, 0xbc, 0x3, 0xbc, 0x3, 0x1, 
0x4, 0x47, 0x1, 0xbc, 0x7, 0xbc, 0x7, 0x1, 0x4, 0x22, 0x80, 0x0, 0x31, 0x4, 
0x47, 0x1, 0x78, 0x3, 0x78, 0x3, 0x1, 0x8, 0x47, 0x1, 0x78, 0x7, 0x78, 0x7, 
0x1, 0x4, 0x22, 0x20, 0x0, 0x30, 0x47, 0x1, 0x78, 0x2, 0x78, 0x2, 0x1, 0x8, 
0x47, 0x1, 0x78, 0x6, 0x78, 0x6, 0x1, 0x4, 0x22, 0x20, 0x0, 0x30, 0x47, 0x1, 
0xbc, 0x3, 0xbc, 0x3, 0x1, 0x4, 0x47, 0x1, 0xbc, 0x7, 0xbc, 0x7, 0x1, 0x4, 
0x22, 0x20, 0x0, 0x38, 0x79, 0x0 })
                Method(_STA) {
                    If(CHKM(0x04)) {
                        GETR(0x04, RefOf(Local0), RefOf(Local1), RefOf(Local2), 
RefOf(Local3))
                        If(Local0) {
                            Return(0x0f)
                        }
                        Else {
                            Return(0x0d)
                        }
                    }
                    Else {
                        Return(0x00)
                    }
                }
                Method(_CRS) {
                    CreateWordField(RSRC, 0x02, IO11)
                    CreateWordField(RSRC, 0x04, IO12)
                    CreateByteField(RSRC, 0x07, IO1L)
                    CreateWordField(RSRC, 0x0a, IO21)
                    CreateWordField(RSRC, 0x0c, IO22)
                    CreateWordField(RSRC, 0x11, IRQ1)
                    GETR(0x04, RefOf(Local0), RefOf(Local1), RefOf(Local2), 
RefOf(Local3))
                    Store(Local0, IO11)
                    Store(Local0, IO12)
                    If(LEqual(Local0, 0x03bc)) {
                        Store(0x04, IO1L)
                    }
                    Else {
                        Store(0x08, IO1L)
                    }
                    Add(Local0, 0x0400, IO21)
                    Store(IO21, IO22)
                    Store(Local2, IRQ1)
                    Return(RSRC)
                }
                Method(_SRS, 1) {
                    CreateWordField(Arg0, 0x04, IO11)
                    CreateWordField(Arg0, 0x11, IRQ1)
                    SETR(0x04, IO11, Zero, IRQ1, Zero)
                }
                Method(_DIS) {
                    SETR(0x04, Zero, Zero, Zero, Zero)
                }
                Method(_INI) {
                    If(CHKM(0x04)) {
                        SETM(0x04)
                    }
                }
            }
            Device(ECP) {
                Name(_HID, 0x0104d041)
                Name(RSRC, Buffer(0x18) {0x47, 0x1, 0x78, 0x3, 0x78, 0x3, 0x1, 
0x8, 0x47, 0x1, 0x78, 0x7, 0x78, 0x7, 0x1, 0x4, 0x22, 0x80, 0x0, 0x2a, 0x0, 
0x0, 0x79, 0x0 })
                Name(_PRS, Buffer(0x80) {0x31, 0x4, 0x47, 0x1, 0x78, 0x3, 0x78, 
0x3, 0x1, 0x8, 0x47, 0x1, 0x78, 0x7, 0x78, 0x7, 0x1, 0x4, 0x22, 0x80, 0x0, 
0x30, 0x47, 0x1, 0x78, 0x2, 0x78, 0x2, 0x1, 0x8, 0x47, 0x1, 0x78, 0x6, 0x78, 
0x6, 0x1, 0x4, 0x22, 0x80, 0x0, 0x30, 0x47, 0x1, 0xbc, 0x3, 0xbc, 0x3, 0x1, 
0x4, 0x47, 0x1, 0xbc, 0x7, 0xbc, 0x7, 0x1, 0x4, 0x22, 0x80, 0x0, 0x31, 0x4, 
0x47, 0x1, 0x78, 0x3, 0x78, 0x3, 0x1, 0x8, 0x47, 0x1, 0x78, 0x7, 0x78, 0x7, 
0x1, 0x4, 0x22, 0x20, 0x0, 0x30, 0x47, 0x1, 0x78, 0x2, 0x78, 0x2, 0x1, 0x8, 
0x47, 0x1, 0x78, 0x6, 0x78, 0x6, 0x1, 0x4, 0x22, 0x20, 0x0, 0x30, 0x47, 0x1, 
0xbc, 0x3, 0xbc, 0x3, 0x1, 0x4, 0x47, 0x1, 0xbc, 0x7, 0xbc, 0x7, 0x1, 0x4, 
0x22, 0x20, 0x0, 0x38, 0x2a, 0xa, 0x0, 0x79, 0x0 })
                Method(_STA) {
                    If(CHKM(0x05)) {
                        GETR(0x05, RefOf(Local0), RefOf(Local1), RefOf(Local2), 
RefOf(Local3))
                        If(Local0) {
                            Return(0x0f)
                        }
                        Else {
                            Return(0x0d)
                        }
                    }
                    Else {
                        Return(0x00)
                    }
                }
                Method(_CRS) {
                    CreateWordField(RSRC, 0x02, IO11)
                    CreateWordField(RSRC, 0x04, IO12)
                    CreateByteField(RSRC, 0x07, IO1L)
                    CreateWordField(RSRC, 0x0a, IO21)
                    CreateWordField(RSRC, 0x0c, IO22)
                    CreateWordField(RSRC, 0x11, IRQ1)
                    CreateByteField(RSRC, 0x14, DMA1)
                    GETR(0x05, RefOf(Local0), RefOf(Local1), RefOf(Local2), 
RefOf(Local3))
                    Store(Local0, IO11)
                    Store(Local0, IO12)
                    If(LEqual(Local0, 0x03bc)) {
                        Store(0x04, IO1L)
                    }
                    Else {
                        Store(0x08, IO1L)
                    }
                    Add(Local0, 0x0400, IO21)
                    Store(IO21, IO22)
                    Store(Local2, IRQ1)
                    Store(Local3, DMA1)
                    Return(RSRC)
                }
                Method(_SRS, 1) {
                    CreateWordField(Arg0, 0x04, IO11)
                    CreateWordField(Arg0, 0x11, IRQ1)
                    CreateByteField(Arg0, 0x14, DMA1)
                    SETR(0x05, IO11, Zero, IRQ1, DMA1)
                }
                Method(_DIS) {
                    SETR(0x05, Zero, Zero, Zero, Zero)
                }
                Method(_INI) {
                    If(CHKM(0x05)) {
                        SETM(0x05)
                    }
                }
            }
            Device(FDC) {
                Name(_HID, 0x0007d041)
                Name(RSRC, Buffer(0x18) {0x47, 0x1, 0xf0, 0x3, 0xf0, 0x3, 0x1, 
0x6, 0x47, 0x1, 0xf7, 0x3, 0xf7, 0x3, 0x1, 0x1, 0x22, 0x40, 0x0, 0x2a, 0x4, 
0x0, 0x79, 0x0 })
                Name(_PRS, Buffer(0x18) {0x47, 0x1, 0xf0, 0x3, 0xf0, 0x3, 0x1, 
0x6, 0x47, 0x1, 0xf7, 0x3, 0xf7, 0x3, 0x1, 0x1, 0x22, 0x40, 0x0, 0x2a, 0x4, 
0x0, 0x79, 0x0 })
                Method(_STA) {
                    If(CHKM(0x07)) {
                        GETR(0x07, RefOf(Local0), RefOf(Local1), RefOf(Local2), 
RefOf(Local3))
                        If(Local0) {
                            Return(0x0f)
                        }
                        Else {
                            Return(0x0d)
                        }
                    }
                    Else {
                        Return(0x00)
                    }
                }
                Method(_CRS) {
                    CreateWordField(RSRC, 0x02, IO11)
                    CreateWordField(RSRC, 0x04, IO12)
                    CreateWordField(RSRC, 0x0a, IO21)
                    CreateWordField(RSRC, 0x0c, IO22)
                    CreateWordField(RSRC, 0x11, IRQ1)
                    CreateByteField(RSRC, 0x14, DMA1)
                    GETR(0x07, RefOf(Local0), RefOf(Local1), RefOf(Local2), 
RefOf(Local3))
                    Store(Local0, IO11)
                    Store(Local0, IO12)
                    Add(Local0, 0x07, IO21)
                    Store(IO21, IO22)
                    Store(Local2, IRQ1)
                    Store(Local3, DMA1)
                    Return(RSRC)
                }
                Method(_SRS, 1) {
                    CreateWordField(Arg0, 0x04, IO11)
                    CreateWordField(Arg0, 0x11, IRQ1)
                    CreateByteField(Arg0, 0x14, DMA1)
                    SETR(0x07, IO11, Zero, IRQ1, DMA1)
                }
                Method(_DIS) {
                    SETR(0x07, Zero, Zero, Zero, Zero)
                }
                Method(_FDE) {
                    If(FDS0) {
                        Store(0x01, Index(FDEB, 0x00, ))
                    }
                    If(FDS1) {
                        Store(0x01, Index(FDEB, 0x04, ))
                    }
                    Return(FDEB)
                }
                Name(FDEB, Buffer(0x14) {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 })
                Device(DRV0) {
                    Name(_ADR, 0x00)
                    Method(_STA) {
                        If(FDS0) {
                            Store(0x0f, Local7)
                        }
                        Else {
                            Store(0x00, Local7)
                        }
                        Return(Local7)
                    }
                    Method(_FDI) {
                        If(LOr(FDS1, LNot(LEqual(FDS0, 0x04)))) {
                            MKFP(FDS0)
                        }
                        Return(FPPK)
                    }
                }
                Device(DRV1) {
                    Name(_ADR, 0x01)
                    Method(_STA) {
                        If(FDS1) {
                            Store(0x0f, Local7)
                        }
                        Else {
                            Store(0x00, Local7)
                        }
                        Return(Local7)
                    }
                    Method(_FDI) {
                        MKFP(FDS1)
                        Return(FPPK)
                    }
                }
                Method(MKFP, 1) {
                    If(LEqual(Arg0, 0x01)) {
                        Store(FP5D, FPBF)
                    }
                    Else {
                        If(LEqual(Arg0, 0x02)) {
                            Store(FP5H, FPBF)
                        }
                        Else {
                            If(LEqual(Arg0, 0x03)) {
                                Store(FP3D, FPBF)
                            }
                            Else {
                                If(LEqual(Arg0, 0x04)) {
                                    Store(FP3H, FPBF)
                                }
                                Else {
                                    If(LEqual(Arg0, 0x06)) {
                                        Store(FP3E, FPBF)
                                    }
                                }
                            }
                        }
                    }
                    If(FDS1) {
                        Store(0x02, Index(FPBF, 0x00, ))
                    }
                    Store(0x00, Local0)
                    While(LGreater(0x10, Local0)) {
                        Store(DerefOf(Index(FPBF, Local0, )), Index(FPPK, 
Local0, ))
                        Increment(Local0)
                    }
                }
                Name(FPPK, Package(0x10) {
                    0x01,
                    0x04,
                    0x4f,
                    0x12,
                    0x01,
                    0xdf,
                    0x02,
                    0x25,
                    0x02,
                    0x12,
                    0x1b,
                    0xff,
                    0x6c,
                    0xf6,
                    0x0f,
                    0x05,
                })
                Name(FPBF, Buffer(0x10) { })
                Name(FP5D, Buffer(0x10) {0x1, 0x1, 0x27, 0x9, 0x1, 0xdf, 0x2, 
0x25, 0x2, 0x9, 0x2a, 0xff, 0x50, 0xf6, 0xf, 0x6 })
                Name(FP5H, Buffer(0x10) {0x1, 0x2, 0x4f, 0xf, 0x1, 0xdf, 0x4, 
0x25, 0x2, 0xf, 0x1b, 0xff, 0x54, 0xf6, 0xf, 0x6 })
                Name(FP3D, Buffer(0x10) {0x1, 0x3, 0x4f, 0x9, 0x1, 0xef, 0x2, 
0x25, 0x2, 0x9, 0x1b, 0xff, 0x50, 0xf6, 0xf, 0x5 })
                Name(FP3H, Buffer(0x10) {0x1, 0x4, 0x4f, 0x12, 0x1, 0xdf, 0x2, 
0x25, 0x2, 0x12, 0x1b, 0xff, 0x6c, 0xf6, 0xf, 0x5 })
                Name(FP3E, Buffer(0x10) {0x1, 0x6, 0x4f, 0x24, 0x1, 0xaa, 0x8, 
0x25, 0x2, 0x24, 0x1b, 0xff, 0x54, 0xf6, 0xf, 0x5 })
            }
            Scope(\_SB.PCI0.LPCB.UAR1) {
                Name(_PRW, Package(0x02) {
                    0x08,
                    0x03,
                })
                Method(_PSW, 1) {
                    If(Arg0) {
                        Store(Zero, RI1M)
                    }
                    Else {
                        Store(One, RI1M)
                    }
                }
            }
            Method(PRCF) {
                If(B2TC) {
                    Store(One, BY2O)
                }
                Else {
                    Store(Zero, BY2O)
                }
            }
        }
        Device(SATA) {
            Name(_ADR, 0x001f0002)
        }
        Device(SBUS) {
            Name(_ADR, 0x001f0003)
        }
    }
    Scope(\) {
        Name(WBTN, Zero)
        Name(NGTM, Zero)
        Name(LSBL, Zero)
        Name(BNBF, Buffer(0x20) { })
        Name(BNSP, Zero)
        Name(BNGP, Zero)
        Name(BNCT, Zero)
        Name(WSEF, Zero)
        Name(LIDF, Zero)
        Name(PREF, Zero)
        Name(TSMP, Zero)
    }
    Device(FEXT) {
        Name(_HID, "FUJ02E3")
        Method(_STA) {
            Return(0x0f)
        }
        Method(_INI) {
            Store(Zero, BNSP)
            Store(Zero, BNGP)
            Store(Zero, BNCT)
            Store(Zero, IRBC)
            Store(Zero, IRBF)
            If(LEqual(FCCT, Zero)) {
                And(FCCI, 0xfd, FCCI)
            }
        }
        Method(FUNC, 4, Serialized) {
            Store(0x80000000, Local0)
            If(LEqual(Arg0, 0x1000)) {
                Store(S000(Arg1, Arg2, Arg3), Local0)
            }
            If(LEqual(Arg0, 0x1001)) {
                Store(S001(Arg1, Arg2, Arg3), Local0)
            }
            Else {
                If(LEqual(Arg0, 0x1002)) {
                    Store(S002(Arg1, Arg2, Arg3), Local0)
                }
                Else {
                    If(LEqual(Arg0, 0x1004)) {
                        Store(S004(Arg1, Arg2, Arg3), Local0)
                    }
                }
            }
            If(LEqual(Arg0, 0x1005)) {
                Store(S005(Arg1, Arg2, Arg3), Local0)
            }
            If(LEqual(Arg0, 0x1006)) {
                Store(S006(Arg1, Arg2, Arg3), Local0)
            }
            If(LEqual(Arg0, 0x80001006)) {
                If(LEqual(Arg1, 0x21)) {
                    If(LEqual(Arg2, 0x01)) {
                        \_SB.CMB1.EBIF()
                    }
                    Else {
                        If(LEqual(Arg2, 0x02)) {
                            \_SB.CMB2.EBIF()
                        }
                    }
                }
            }
            If(LEqual(Arg0, 0x1007)) {
                Store(S007(Arg1, Arg2, Arg3), Local0)
            }
            If(LEqual(Arg0, 0x1008)) {
                Store(S008(Arg1, Arg2, Arg3), Local0)
            }
            Return(Local0)
        }
        Method(S000, 3) {
            Store(0x80000000, Local0)
            If(LEqual(Arg0, 0x00)) {
                Store(Zero, Local0)
                Or(Local0, 0x20, Local0)
                Or(Local0, 0x0100, Local0)
                Or(Local0, 0x0200, Local0)
            }
            Else {
                If(LEqual(Arg0, 0x01)) {
                    Store(Zero, Local0)
                    Or(Local0, ShiftLeft(WSEF, 0x05, ), Local0)
                    Store(Zero, WSEF)
                    Or(Local0, ShiftLeft(LIDF, 0x08, ), Local0)
                    Store(Zero, LIDF)
                    Or(Local0, ShiftLeft(PREF, 0x09, ), Local0)
                    Store(Zero, PREF)
                }
                Else {
                    If(LEqual(Arg0, 0x04)) {
                        Store(Zero, Local0)
                        Or(Local0, ShiftLeft(WLSW, 0x05, ), Local0)
                        Or(Local0, ShiftLeft(\_SB.LID._LID(), 0x08, ), Local0)
                        Or(Local0, ShiftLeft(BY2O, 0x09, ), Local0)
                    }
                }
            }
            Return(Local0)
        }
        Method(S001, 3) {
            Store(0x80000000, Local0)
            If(LEqual(Arg0, Zero)) {
                Store(LEDI, Local0)
            }
            Else {
                If(LNot(And(Arg1, LEDI, ))) {
                    Store(Zero, Local0)
                }
                Else {
                    If(LEqual(Arg0, One)) {
                        ShiftRight(And(Arg2, 0x00030000, ), 0x08, Local1)
                        Store(0x9b, BCMD)
                        If(LEqual(Arg1, 0x0100)) {
                            Store(Local1, DID)
                            Store(Zero, SMIC)
                        }
                        Else {
                            If(LEqual(Arg1, 0x2000)) {
                                Add(Local1, 0x06, DID)
                                Store(Zero, SMIC)
                            }
                            Else {
                                If(LEqual(Arg1, 0x4000)) {
                                    Add(Local1, 0x08, DID)
                                    Store(Zero, SMIC)
                                }
                            }
                        }
                        Store(Zero, Local0)
                    }
                    Else {
                        If(LEqual(Arg0, 0x02)) {
                            Store(0x9b, BCMD)
                            If(LEqual(Arg1, 0x0100)) {
                                Store(One, DID)
                                Store(Zero, SMIC)
                            }
                            Else {
                                If(LEqual(Arg1, 0x2000)) {
                                    Store(0x05, DID)
                                    Store(Zero, SMIC)
                                }
                                Else {
                                    If(LEqual(Arg1, 0x4000)) {
                                        Store(0x07, DID)
                                        Store(Zero, SMIC)
                                    }
                                }
                            }
                            Or(ShiftLeft(DID, 0x10, ), One, Local0)
                        }
                    }
                }
            }
            Return(Local0)
        }
        Method(S002, 3) {
            Store(0x80000000, Local0)
            If(LEqual(Arg0, Zero)) {
                Store(BTNI, Local0)
            }
            Else {
                If(LEqual(Arg0, One)) {
                    Store(GIRB(), Local0)
                }
                Else {
                    If(LEqual(Arg0, 0x02)) {
                        Store(0x9b, BCMD)
                        Store(0x02, DID)
                        Store(Zero, SMIC)
                        Store(DID, Local0)
                    }
                    Else {
                        If(LEqual(Arg0, 0x03)) {
                            If(Arg1) {
                                Not(Arg1, Local1)
                                And(Arg2, Arg1, Local2)
                                Or(And(WBTN, Local1, ), Local2, WBTN)
                                Store(0x9b, BCMD)
                                Or(ShiftLeft(WBTN, 0x08, ), 0x03, DID)
                                Store(Zero, SMIC)
                            }
                            Store(WBTN, Local0)
                        }
                    }
                }
            }
            Return(Local0)
        }
        Method(SIRB, 1) {
            If(LLess(BNCT, 0x10)) {
                CreateWordField(BNBF, BNSP, BNP1)
                Store(Arg0, BNP1)
                Increment(BNCT)
                Add(BNSP, 0x02, BNSP)
                If(LNot(LLess(BNSP, 0x20))) {
                    Store(Zero, BNSP)
                }
            }
        }
        Method(GIRB) {
            If(BNCT) {
                CreateWordField(BNBF, BNGP, BNP2)
                Store(BNP2, Local0)
                Or(Local0, 0x40000000, Local0)
                Decrement(BNCT)
                Add(BNGP, 0x02, BNGP)
                If(LNot(LLess(BNGP, 0x20))) {
                    Store(Zero, BNGP)
                }
            }
            Else {
                Store(Zero, Local0)
            }
            Return(Local0)
        }
        Method(S004, 3) {
            Store(0x80000000, Local0)
            If(LEqual(Arg0, Zero)) {
                Store(NGTI, Local0)
            }
            Else {
                If(LEqual(Arg0, One)) {
                    If(LAnd(LEqual(Arg1, 0x04), And(NGTI, 0x04, ))) {
                        And(Arg2, 0x03, Local1)
                        If(LOr(LEqual(Local1, 0x03), LEqual(Local1, 0x02))) {
                            If(LNot(NGTF)) {
                                SVBL()
                                Store(One, NGTF)
                            }
                            SBLC(Local1)
                            Store(Local1, NGTM)
                            Store(Zero, Local0)
                        }
                        If(LNot(Local1)) {
                            If(NGTF) {
                                Store(Zero, NGTF)
                                RSBL()
                                SBLC(Zero)
                            }
                            Store(Zero, NGTM)
                            Store(Zero, Local0)
                        }
                    }
                }
                Else {
                    If(LEqual(Arg0, 0x02)) {
                        If(LAnd(LEqual(Arg1, 0x04), And(NGTI, 0x04, ))) {
                            Store(NGTM, Local0)
                        }
                    }
                }
            }
            Return(Local0)
        }
        Method(S006, 3) {
            Store(0x80000000, Local0)
            If(ECOK) {
                If(LEqual(Arg0, Zero)) {
                    Store(ECCI, Local0)
                }
                Else {
                    If(LEqual(Arg0, 0x10)) {
                        If(Arg1) {
                            If(LEqual(Arg1, 0x0180)) {
                                And(TCOR, 0xff, Local0)
                            }
                            If(LNot(LEqual(Arg1, 0x0100))) {
                                And(Arg1, 0xff00, Local2)
                                And(Arg1, 0xff, ECG1)
                                If(LEqual(Local2, 0x00)) {
                                    Store(0x23, ECGM)
                                }
                                Else {
                                    If(LEqual(Local2, 0x0100)) {
                                        Store(0x43, ECGM)
                                    }
                                    Else {
                                        If(LAnd(LNot(LLess(Local2, 0x0400)), 
LNot(LGreater(Local2, 0xff00)))) {
                                            Store(Add(ShiftRight(Local2, 0x08, 
), 0x01, ), ECGM)
                                        }
                                    }
                                }
                                Store(Zero, Local1)
                                While(LAnd(ECGM, LLess(Local1, 0x64))) {
                                    Sleep(0x01)
                                    Increment(Local1)
                                }
                                If(LNot(LLess(Local1, 0x64))) {
                                    Store(0x80000001, Local0)
                                }
                                Else {
                                    Or(ShiftLeft(ECG2, 0x08, ), ECG3, Local0)
                                }
                                If(LEqual(Arg1, 0x0104)) {
                                    Store(Zero, TSMP)
                                }
                            }
                            Else {
                                Or(ShiftLeft(TCST, 0x08, ), PDAT, Local0)
                            }
                        }
                        Else {
                            Store(0xfd70, Local0)
                        }
                    }
                    Else {
                        If(LEqual(Arg0, 0x11)) {
                            If(LAnd(LEqual(Arg1, 0x0105), TSMP)) {
                                Store(0x80000001, Local0)
                            }
                            If(LAnd(PTCE, LEqual(Arg1, 0x0104))) {
                                Store(One, TSMP)
                            }
                            And(Arg1, 0xff00, Local2)
                            And(Arg1, 0xff, ECG1)
                            ShiftRight(And(Arg2, 0xff00, ), 0x08, ECG2)
                            And(Arg2, 0xff, ECG3)
                            If(LEqual(Local2, 0x00)) {
                                Store(0x22, ECGM)
                            }
                            Else {
                                If(LEqual(Local2, 0x0100)) {
                                    Store(0x42, ECGM)
                                }
                                Else {
                                    If(LAnd(LNot(LLess(Local2, 0x0400)), 
LNot(LGreater(Local2, 0xff00)))) {
                                        Store(ShiftRight(Local2, 0x08, ), ECGM)
                                    }
                                }
                            }
                            Store(Zero, Local1)
                            While(LAnd(ECGM, LLess(Local1, 0x64))) {
                                Sleep(0x01)
                                Increment(Local1)
                            }
                            If(LNot(LLess(Local1, 0x64))) {
                                Store(0x80000001, Local0)
                            }
                            Else {
                                Store(Zero, Local0)
                            }
                        }
                        Else {
                            If(LEqual(Arg0, 0x12)) {
                                Store(GINT, Local0)
                                Store(Zero, GINT)
                            }
                            Else {
                                If(LEqual(Arg0, 0x20)) {
                                    ShiftRight(And(Arg1, 0xff000000, ), 0x18, 
ECD3)
                                    ShiftRight(And(Arg1, 0x00ff0000, ), 0x10, 
ECD2)
                                    ShiftRight(And(Arg1, 0xff00, ), 0x08, ECD1)
                                    And(Arg1, 0xff, ECCM)
                                    Store(Zero, Local1)
                                    While(LAnd(ECCM, LLess(Local1, 0x64))) {
                                        Sleep(0x01)
                                        Increment(Local1)
                                    }
                                    If(LNot(LLess(Local1, 0x64))) {
                                        Store(0x80000001, Local0)
                                    }
                                    Else {
                                        Or(Or(ShiftLeft(ECD3, 0x10, ), 
ShiftLeft(ECD2, 0x08, ), ), ECD1, Local0)
                                    }
                                }
                                Else {
                                    If(LEqual(Arg0, 0x21)) {
                                        ShiftRight(And(Arg1, 0xff000000, ), 
0x18, ECB3)
                                        ShiftRight(And(Arg1, 0x00ff0000, ), 
0x10, ECB2)
                                        ShiftRight(And(Arg1, 0xff00, ), 0x08, 
ECB1)
                                        And(Arg1, 0xff, ECBM)
                                        Store(Zero, Local1)
                                        While(LAnd(ECBM, LLess(Local1, 0x64))) {
                                            Sleep(0x01)
                                            Increment(Local1)
                                        }
                                        If(LNot(LLess(Local1, 0x64))) {
                                            Store(0x80000001, Local0)
                                        }
                                        Else {
                                            Or(Or(ShiftLeft(ECB3, 0x10, ), 
ShiftLeft(ECB2, 0x08, ), ), ECB1, Local0)
                                        }
                                    }
                                    Else {
                                        If(LEqual(Arg0, 0x30)) {
                                            Store(0x80000001, Local0)
                                            ShiftRight(And(Arg1, 0xff00, ), 
0x08, Local1)
                                            ShiftRight(And(Arg1, 0xffff0000, ), 
0x10, Local2)
                                            If(LOr(LEqual(Local2, 0xfd64), 
LEqual(Local2, 0xfd65))) {
                                                Store(Local1, AIDA)
                                                Store(ADTA, Local0)
                                            }
                                            If(LOr(LEqual(Local2, 0xfd62), 
LEqual(Local2, 0xfd63))) {
                                                Store(Local1, AIDB)
                                                Store(ADTB, Local0)
                                            }
                                            If(LOr(LEqual(Local2, 0xfd60), 
LEqual(Local2, 0xfd61))) {
                                                Store(Local1, AIDC)
                                                Store(ADTC, Local0)
                                            }
                                            If(LOr(LEqual(Local2, 0xfd66), 
LEqual(Local2, 0xfd67))) {
                                                Store(Local1, AIDD)
                                                Store(ADTD, Local0)
                                            }
                                            If(LOr(LEqual(Local2, 0xfd70), 
LEqual(Local2, 0xfd74))) {
                                                Store(Local1, PMID)
                                                Store(PMDT, Local0)
                                            }
                                        }
                                        Else {
                                            If(LEqual(Arg0, 0x31)) {
                                                Store(0x80000001, Local0)
                                                And(Arg1, 0xff, Local1)
                                                ShiftRight(And(Arg1, 0xff00, ), 
0x08, Local2)
                                                ShiftRight(And(Arg1, 
0xffff0000, ), 0x10, Local3)
                                                If(LEqual(Local3, 0x10)) {
                                                    If(LEqual(Local2, Zero)) {
                                                        
\_SB.PCI0.LPCB.FJEX.SBL2(Local1)
                                                        Store(Zero, Local0)
                                                    }
                                                }
                                                If(LOr(LEqual(Local3, 0xfd64), 
LEqual(Local3, 0xfd65))) {
                                                    Store(Local2, AIDA)
                                                    Store(Local1, ADTA)
                                                    Store(Zero, Local0)
                                                }
                                                If(LOr(LEqual(Local3, 0xfd62), 
LEqual(Local3, 0xfd63))) {
                                                    Store(Local2, AIDB)
                                                    Store(Local1, ADTB)
                                                    Store(Zero, Local0)
                                                }
                                                If(LOr(LEqual(Local3, 0xfd60), 
LEqual(Local3, 0xfd61))) {
                                                    Store(Local2, AIDC)
                                                    Store(Local1, ADTC)
                                                    Store(Zero, Local0)
                                                }
                                                If(LOr(LEqual(Local3, 0xfd66), 
LEqual(Local3, 0xfd67))) {
                                                    Store(Local2, AIDD)
                                                    Store(Local1, ADTD)
                                                    Store(Zero, Local0)
                                                }
                                                If(LOr(LEqual(Local3, 0xfd70), 
LEqual(Local3, 0xfd74))) {
                                                    Store(Local2, PMID)
                                                    Store(Local1, PMDT)
                                                    Store(Zero, Local0)
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            Return(Local0)
        }
        Method(S007, 3) {
            Store(0x80000000, Local0)
            If(LEqual(Arg0, Zero)) {
                If(LEqual(Arg1, Zero)) {
                    Store(FCCI, Local0)
                }
                If(LEqual(Arg1, 0x20)) {
                    Store(Or(FNUM, ShiftLeft(FDLT, 0x04, ), ), Local0)
                }
                If(LEqual(Arg1, 0x30)) {
                    Store(Zero, Local0)
                }
            }
            Else {
                If(LAnd(LEqual(Arg0, 0x02), And(FCCI, 0x02, ))) {
                    If(LOr(LEqual(Arg1, 0x00), LLess(Arg2, FNUM))) {
                        Store(0x9f, BCMD)
                        Store(Arg2, DID)
                        And(DID, 0x0f, DID)
                        Or(DID, ShiftLeft(Arg1, 0x04, ), DID)
                        Store(Zero, SMIC)
                        And(DID, 0x0f, DID)
                        Store(DID, Local0)
                    }
                }
            }
            Return(Local0)
        }
        Method(S008, 3) {
            Store(0x80000000, Local0)
            If(LEqual(Arg0, 0x00)) {
                If(LAnd(LNot(LLess(Arg1, 0x00)), LNot(LGreater(Arg1, 0x05)))) {
                    If(LEqual(Arg1, Zero)) {
                        Store(Zero, Local0)
                    }
                    Else {
                        If(LEqual(Arg1, One)) {
                            If(LNot(LLess(\_SB.OSTP(), 0x40))) {
                                Store(0x02, Local0)
                            }
                            Else {
                                Store(Zero, Local0)
                            }
                        }
                        Else {
                            Store(0xa4, BCMD)
                            Store(Arg0, QAG1)
                            Store(Arg1, QAG2)
                            Store(Arg2, QAG3)
                            Store(Zero, DID)
                            Store(Zero, SMIC)
                            Store(DID, Local0)
                        }
                    }
                }
            }
            Else {
                If(LEqual(Arg0, 0x01)) {
                    If(LAnd(LNot(LLess(Arg1, 0x00)), LNot(LGreater(Arg1, 
0x01)))) {
                        Store(0xa4, BCMD)
                        Store(Arg0, QAG1)
                        Store(Arg1, QAG2)
                        Store(Arg2, QAG3)
                        Store(Zero, DID)
                        Store(Zero, SMIC)
                        Store(DID, Local0)
                    }
                }
                Else {
                    If(LEqual(Arg0, 0x02)) {
                        If(LAnd(LNot(LLess(Arg1, 0x00)), LNot(LGreater(Arg1, 
0x01)))) {
                            Store(0xa4, BCMD)
                            Store(Arg0, QAG1)
                            Store(Arg1, QAG2)
                            Store(Arg2, QAG3)
                            Store(Zero, DID)
                            Store(Zero, SMIC)
                            Store(DID, Local0)
                        }
                    }
                    Else {
                        If(LEqual(Arg0, 0x03)) {
                            If(LEqual(Arg1, 0x00)) {
                                Store(0xa4, BCMD)
                                Store(Arg0, QAG1)
                                Store(Arg1, QAG2)
                                Store(Arg2, QAG3)
                                Store(Zero, DID)
                                Store(Zero, SMIC)
                                Store(DID, Local0)
                            }
                        }
                        Else {
                            If(LEqual(Arg0, 0x04)) {
                                If(LAnd(LNot(LLess(Arg1, 0x00)), 
LNot(LGreater(Arg1, 0x01)))) {
                                    Store(0xa4, BCMD)
                                    Store(Arg0, QAG1)
                                    Store(Arg1, QAG2)
                                    Store(Arg2, QAG3)
                                    Store(Zero, DID)
                                    Store(Zero, SMIC)
                                    Store(DID, Local0)
                                }
                            }
                        }
                    }
                }
            }
            Return(Local0)
        }
    }
    Scope(\_SB.FEXT) {
        Method(SBLC, 1) {
            If(LNot(Arg0)) {
                Store(Zero, BLCT)
            }
            Else {
                If(LEqual(Arg0, 0x03)) {
                    Store(One, BLCT)
                }
                Else {
                    If(LEqual(Arg0, 0x02)) {
                        Name(BBCT, Buffer(BLLM) { })
                        Store(BLLT, BBCT)
                        CreateByteField(BBCT, Zero, BLL0)
                        Store(BLL0, LCDL)
                        \_SB.PCI0.GFX0.AINT(0x01, Subtract(0xff, BLL0, ))
                        Store(Zero, BLCT)
                    }
                }
            }
        }
        Method(SVBL) {
            And(\_SB.PCI0.LPCB.FJEX.GBLL(), 0x7fffffff, LSBL)
        }
        Method(RSBL) {
            \_SB.PCI0.LPCB.FJEX.SBLL(LSBL)
        }
        Method(S005, 3) {
            Store(0x80000000, Local0)
            If(LEqual(Arg0, Zero)) {
                Store(DPCI, Local0)
            }
            Else {
                If(LEqual(Arg0, One)) {
                    If(And(Arg1, One, )) {
                        If(And(Arg2, One, )) {
                            If(\_SB.PCI0.PATA.PRIM.MAST.BIDE) {
                                \_SB.PCI0.PATA.PRIM.MAST.EOFF
                            }
                            Or(DPCS, One, DPCS)
                        }
                        Else {
                            If(\_SB.PCI0.PATA.PRIM.MAST.BIDE) {
                                \_SB.PCI0.PATA.PRIM.MAST.EON
                            }
                            And(DPCS, 0xfffffffe, DPCS)
                        }
                        Notify(\_SB.PCI0.PATA.PRIM.MAST, One)
                    }
                    And(DPCS, DPCI, Local0)
                }
            }
            Return(Local0)
        }
    }
    Device(AC) {
        Name(_HID, "ACPI0003")
        Scope(\) {
            Name(ACPS, Ones)
        }
        Method(_INI) {
            Store(ACPW, ACPS)
        }
        Method(_STA) {
            Return(0x0f)
        }
        Method(_PSR) {
            _INI()
            If(ACPW) {
                Return(One)
            }
            Else {
                Return(Zero)
            }
        }
        Name(_PCL, Package(0x01) {
            \_SB,
        })
        Method(ACHK) {
            Store(ACPW, Local0)
            If(LNot(LEqual(Local0, ACPS))) {
                Sleep(0x28)
                Notify(\_SB.AC, 0x80)
                Store(Zero, DID)
                Store(0x8d, BCMD)
                Store(Zero, SMIC)
                \_PR.CSTC()
                Notify(\_PR.CPU0, 0x80)
                Store(Local0, ACPS)
            }
        }
    }
    Device(CMB1) {
        Name(_HID, 0x0a0cd041)
        Name(_UID, One)
        Name(_PCL, Package(0x01) {
            \_SB,
        })
        Name(BUFF, Buffer(0x0c) { })
        Name(BUF2, Buffer(0x13) { })
        Scope(\) {
            Name(B1PS, Ones)
            Name(B1RS, Ones)
            Name(B1CS, Ones)
            Name(B1LS, Ones)
            Name(B1IS, Ones)
            Name(BIF1, Package(0x0d) {
                0x01,
                0x00,
                0x00,
                0x01,
                0x00,
                0x00,
                0x00,
                0x01,
                0x01,
                "",
                "1",
                "LION",
                "Fujitsu",
            })
            Name(BST1, Package(0x04) {
            })
        }
        Method(MKWD, 2) {
            If(And(Arg1, 0x80, )) {
                Or(0xffff0000, Arg0, Local0)
                Or(Local0, ShiftLeft(Arg1, 0x08, ), Local0)
                Subtract(Zero, Local0, Local0)
            }
            Else {
                Store(Arg0, Local0)
                Or(Local0, ShiftLeft(Arg1, 0x08, ), Local0)
            }
            Return(Local0)
        }
        Method(MBCD, 3) {
            CreateByteField(Arg1, Arg2, BBF1)
            CreateByteField(Arg1, Add(Arg2, One, ), BBF2)
            Add(0x30, ShiftRight(Arg0, 0x04, ), BBF1)
            Add(0x30, And(Arg0, 0x0f, ), BBF2)
        }
        Method(_INI) {
            Store(B1P, B1PS)
            Store(B1CP, B1RS)
            Store(B1C, B1CS)
            Store(MKWD(B1LL, B1LH), B1LS)
            Store(B1ID, B1IS)
        }
        Method(_BIF) {
            Store(B1NO, Local5)
            CreateByteField(BIDT, B1ID, B1IX)
            Store(MKWD(B1DL, B1DH), Index(BIF1, 0x01, ))
            Store(MKWD(B1LL, B1LH), Index(BIF1, 0x02, ))
            Store(Multiply(Add(And(B1DV, 0xef, ), 0x02, ), 0x0e10, ), 
Index(BIF1, 0x04, ))
            If(LNot(LLess(\_SB.OSTP(), 0x40))) {
                Divide(Multiply(Add(Multiply(0x0c, 0x0a, ), 0x04, ), 
DerefOf(Index(BIF1, 0x01, )), ), 0x03e8, Local0, Index(BIF1, 0x05, ))
            }
            If(LNot(LLess(\_SB.OSTP(), 0x40))) {
                If(LEqual(BIFL, 0xff)) {
                    Store(0x0a, Local1)
                }
                Else {
                    Store(BIFL, Local1)
                }
                Divide(Multiply(Add(Multiply(Local1, 0x0a, ), 0x04, ), 
DerefOf(Index(BIF1, 0x01, )), ), 0x03e8, Local0, Index(BIF1, 0x06, ))
            }
            If(Local5) {
                Store(DerefOf(Index(BMST, B1IX, )), BUFF)
                Store(0x07, Local0)
                Store(Local5, Local2)
                While(LAnd(Local2, LNot(LLess(Local0, 0x02)))) {
                    Store(Subtract(DerefOf(Index(BUFF, Local0, )), 0x30, ), 
Local1)
                    Divide(Add(Local1, Local2, ), 0x0a, Local1, Local2)
                    Store(Add(Local1, 0x30, ), Index(BUFF, Local0, ))
                    Decrement(Local0)
                }
                Store(BUFF, Index(BIF1, 0x09, ))
            }
            Else {
                Store(DerefOf(Index(BMNT, B1IX, )), Index(BIF1, 0x09, ))
            }
            Store(0x31, Index(BUF2, 0x00, ))
            Store(Zero, Index(BUF2, 0x01, ))
            \_SB.FEXT.FUNC(0x80001006, 0x21, 0x01, 0x00)
            Store(BUF2, Index(BIF1, 0x0a, ))
            Store(B1P, B1PS)
            Store(MKWD(B1LL, B1LH), B1LS)
            Store(B1ID, B1IS)
            Return(BIF1)
        }
        Method(_BST) {
            Store(B1CP, B1RS)
            Store(B1C, B1CS)
            Store(Zero, Local0)
            If(B1P) {
                If(B1C) {
                    Or(Local0, 0x02, Local0)
                }
                Else {
                    If(LNot(ACPS)) {
                        Or(Local0, One, Local0)
                    }
                }
                If(LNot(LGreater(B1CP, One))) {
                    Or(Local0, 0x04, Local0)
                }
            }
            Store(MKWD(B1CL, B1CH), Local1)
            Divide(Multiply(B1CP, MKWD(B1LL, B1LH), ), 0x03e8, Local4, Local2)
            If(Local4) {
                Increment(Local2)
            }
            Multiply(Local2, 0x0a, Local2)
            Store(MKWD(B1VL, B1VH), Local3)
            Store(Local0, Index(BST1, Zero, ))
            Store(Local1, Index(BST1, One, ))
            Store(Local2, Index(BST1, 0x02, ))
            Store(Local3, Index(BST1, 0x03, ))
            Return(BST1)
        }
        Method(_STA) {
            If(B1P) {
                Return(0x1f)
            }
            Return(0x0f)
        }
        Method(BCHK) {
            If(LNot(LEqual(B1P, B1PS))) {
                Notify(\_SB.CMB1, 0x81)
                Store(B1P, B1PS)
            }
            If(LNot(LEqual(B1ID, B1IS))) {
                Notify(\_SB.CMB1, 0x81)
                Store(B1ID, B1IS)
            }
            If(B1PS) {
                Store(MKWD(B1LL, B1LH), Local0)
                If(LNot(LEqual(Local0, B1LS))) {
                    Notify(\_SB.CMB1, 0x81)
                }
                If(LOr(LNot(LEqual(B1C, B1CS)), LNot(LEqual(B1CP, B1RS)))) {
                    Notify(\_SB.CMB1, 0x80)
                }
                Store(Local0, B1LS)
                Store(B1C, B1CS)
                Store(B1CP, B1RS)
            }
        }
        Method(EBIF) {
            If(ECOK) {
                Store(Zero, ECB1)
                Store(One, ECBM)
                Store(Zero, Local1)
                While(LAnd(ECBM, LLess(Local1, 0x64))) {
                    Sleep(0x01)
                    Increment(Local1)
                }
                If(LLess(Local1, 0x64)) {
                    If(ECB1) {
                        MBCD(ECB2, BUF2, 0x00)
                        Store(ECB3, Index(BUF2, 0x02, ))
                        Store(0x2d, Index(BUF2, 0x03, ))
                        Store(ECB4, Index(BUF2, 0x04, ))
                        MBCD(ECB5, BUF2, 0x05)
                        MBCD(ECB6, BUF2, 0x07)
                        MBCD(ECB7, BUF2, 0x09)
                        MBCD(ECB8, BUF2, 0x0b)
                        MBCD(ECB9, BUF2, 0x0d)
                        MBCD(ECBA, BUF2, 0x0f)
                        Store(ECBB, Index(BUF2, 0x11, ))
                        Store(Zero, Index(BUF2, 0x12, ))
                        Store(Zero, ECB1)
                        Store(0x03, ECBM)
                        Store(Zero, Local1)
                        While(LAnd(ECBM, LLess(Local1, 0x64))) {
                            Sleep(0x01)
                            Increment(Local1)
                        }
                        If(LLess(Local1, 0x64)) {
                            Store(0x43, Index(BUFF, 0x00, ))
                            Store(0x50, Index(BUFF, 0x01, ))
                            MBCD(ECB1, BUFF, 0x02)
                            MBCD(ECB2, BUFF, 0x04)
                            MBCD(ECB3, BUFF, 0x06)
                            Store(0x2d, Index(BUFF, 0x08, ))
                            MBCD(ECB4, BUFF, 0x09)
                            Store(Zero, Index(BUFF, 0x0b, ))
                            Store(BUFF, Index(BIF1, 0x09, ))
                        }
                    }
                }
            }
        }
    }
    Device(CMB2) {
        Name(_HID, 0x0a0cd041)
        Name(_UID, 0x02)
        Name(_PCL, Package(0x01) {
            \_SB,
        })
        Name(BUFF, Buffer(0x0c) { })
        Name(BUF2, Buffer(0x13) { })
        Scope(\) {
            Name(B2PS, Ones)
            Name(B2RS, Ones)
            Name(B2CS, Ones)
            Name(B2LS, Ones)
            Name(B2IS, Ones)
            Name(B2IF, Zero)
            Name(BIF2, Package(0x0d) {
                0x01,
                0x00,
                0x00,
                0x01,
                0x00,
                0x00,
                0x00,
                0x01,
                0x01,
                "",
                "2",
                "LION",
                "Fujitsu",
            })
            Name(BST2, Package(0x04) {
            })
        }
        Method(MKWD, 2) {
            If(And(Arg1, 0x80, )) {
                Or(0xffff0000, Arg0, Local0)
                Or(Local0, ShiftLeft(Arg1, 0x08, ), Local0)
                Subtract(Zero, Local0, Local0)
            }
            Else {
                Store(Arg0, Local0)
                Or(Local0, ShiftLeft(Arg1, 0x08, ), Local0)
            }
            Return(Local0)
        }
        Method(MBCD, 3) {
            CreateByteField(Arg1, Arg2, BBF1)
            CreateByteField(Arg1, Add(Arg2, One, ), BBF2)
            Add(0x30, ShiftRight(Arg0, 0x04, ), BBF1)
            Add(0x30, And(Arg0, 0x0f, ), BBF2)
        }
        Method(_INI) {
            Store(B2P, B2PS)
            Store(B2CP, B2RS)
            Store(B2C, B2CS)
            Store(MKWD(B2LL, B2LH), B2LS)
            Store(B2ID, B2IS)
        }
        Method(_BIF) {
            Store(B2NO, Local5)
            CreateByteField(BIDT, B2ID, B2IX)
            Store(MKWD(B2DL, B2DH), Index(BIF2, 0x01, ))
            Store(MKWD(B2LL, B2LH), Index(BIF2, 0x02, ))
            Store(Multiply(Add(And(B2DV, 0xef, ), 0x02, ), 0x0e10, ), 
Index(BIF2, 0x04, ))
            If(LNot(LLess(\_SB.OSTP(), 0x40))) {
                Divide(Multiply(Add(Multiply(0x0c, 0x0a, ), 0x04, ), 
DerefOf(Index(BIF2, 0x01, )), ), 0x03e8, Local0, Index(BIF2, 0x05, ))
            }
            If(LNot(LLess(\_SB.OSTP(), 0x40))) {
                If(LEqual(BIFL, 0xff)) {
                    Store(0x0a, Local1)
                }
                Else {
                    Store(BIFL, Local1)
                }
                Divide(Multiply(Add(Multiply(Local1, 0x0a, ), 0x04, ), 
DerefOf(Index(BIF2, 0x01, )), ), 0x03e8, Local0, Index(BIF2, 0x06, ))
            }
            If(Local5) {
                Store(DerefOf(Index(BMST, B2IX, )), BUFF)
                Store(0x07, Local0)
                Store(Local5, Local2)
                While(LAnd(Local2, LNot(LLess(Local0, 0x02)))) {
                    Store(Subtract(DerefOf(Index(BUFF, Local0, )), 0x30, ), 
Local1)
                    Divide(Add(Local1, Local2, ), 0x0a, Local1, Local2)
                    Store(Add(Local1, 0x30, ), Index(BUFF, Local0, ))
                    Decrement(Local0)
                }
                Store(BUFF, Index(BIF2, 0x09, ))
            }
            Else {
                Store(DerefOf(Index(BMNT, B2IX, )), Index(BIF2, 0x09, ))
            }
            Store(0x31, Index(BUF2, 0x00, ))
            Store(Zero, Index(BUF2, 0x01, ))
            \_SB.FEXT.FUNC(0x80001006, 0x21, 0x02, 0x00)
            Store(BUF2, Index(BIF2, 0x0a, ))
            Store(B2P, B2PS)
            Store(MKWD(B2LL, B2LH), B2LS)
            Store(B2ID, B2IS)
            Return(BIF2)
        }
        Method(_BST) {
            Store(B2CP, B2RS)
            Store(B2C, B2CS)
            Store(Zero, Local0)
            If(B2P) {
                If(B2C) {
                    Or(Local0, 0x02, Local0)
                }
                Else {
                    If(LNot(ACPS)) {
                        Or(Local0, One, Local0)
                    }
                }
                If(LNot(LGreater(B2CP, One))) {
                    Or(Local0, 0x04, Local0)
                }
            }
            Store(MKWD(B2CL, B2CH), Local1)
            Divide(Multiply(B2CP, MKWD(B2LL, B2LH), ), 0x03e8, Local4, Local2)
            If(Local4) {
                Increment(Local2)
            }
            Multiply(Local2, 0x0a, Local2)
            Store(MKWD(B2VL, B2VH), Local3)
            Store(Local0, Index(BST2, Zero, ))
            Store(Local1, Index(BST2, One, ))
            Store(Local2, Index(BST2, 0x02, ))
            Store(Local3, Index(BST2, 0x03, ))
            Return(BST2)
        }
        Method(_STA) {
            If(B2P) {
                Return(0x1f)
            }
            Return(0x0f)
        }
        Method(BCHK) {
            If(LNot(LEqual(B2P, B2PS))) {
                Notify(\_SB.CMB2, 0x81)
                Store(B2P, B2PS)
            }
            If(LNot(LEqual(B2ID, B2IS))) {
                Notify(\_SB.CMB2, 0x81)
                Store(B2ID, B2IS)
            }
            If(B2PS) {
                Store(MKWD(B2LL, B2LH), Local0)
                If(LNot(LEqual(Local0, B2LS))) {
                    Notify(\_SB.CMB2, 0x81)
                }
                If(LOr(LNot(LEqual(B2C, B2CS)), LNot(LEqual(B2CP, B2RS)))) {
                    Notify(\_SB.CMB2, 0x80)
                }
                Store(Local0, B2LS)
                Store(B2C, B2CS)
                Store(B2CP, B2RS)
            }
        }
        Method(EBIF) {
            If(ECOK) {
                Store(Zero, ECB1)
                Store(0x02, ECBM)
                Store(Zero, Local1)
                While(LAnd(ECBM, LLess(Local1, 0x64))) {
                    Sleep(0x01)
                    Increment(Local1)
                }
                If(LLess(Local1, 0x64)) {
                    If(ECB1) {
                        MBCD(ECB2, BUF2, 0x00)
                        Store(ECB3, Index(BUF2, 0x02, ))
                        Store(0x2d, Index(BUF2, 0x03, ))
                        Store(ECB4, Index(BUF2, 0x04, ))
                        MBCD(ECB5, BUF2, 0x05)
                        MBCD(ECB6, BUF2, 0x07)
                        MBCD(ECB7, BUF2, 0x09)
                        MBCD(ECB8, BUF2, 0x0b)
                        MBCD(ECB9, BUF2, 0x0d)
                        MBCD(ECBA, BUF2, 0x0f)
                        Store(ECBB, Index(BUF2, 0x11, ))
                        Store(Zero, Index(BUF2, 0x12, ))
                        Store(Zero, ECB1)
                        Store(0x04, ECBM)
                        Store(Zero, Local1)
                        While(LAnd(ECBM, LLess(Local1, 0x64))) {
                            Sleep(0x01)
                            Increment(Local1)
                        }
                        If(LLess(Local1, 0x64)) {
                            Store(0x43, Index(BUFF, 0x00, ))
                            Store(0x50, Index(BUFF, 0x01, ))
                            MBCD(ECB1, BUFF, 0x02)
                            MBCD(ECB2, BUFF, 0x04)
                            MBCD(ECB3, BUFF, 0x06)
                            Store(0x2d, Index(BUFF, 0x08, ))
                            MBCD(ECB4, BUFF, 0x09)
                            Store(Zero, Index(BUFF, 0x0b, ))
                            Store(BUFF, Index(BIF2, 0x09, ))
                        }
                    }
                }
            }
        }
    }
    Device(LID) {
        Name(_HID, 0x0d0cd041)
        Method(_LID) {
            If(CVCL) {
                Return(Zero)
            }
            Else {
                Return(One)
            }
        }
        Name(_PRW, Package(0x02) {
            0x18,
            0x04,
        })
        Method(_PSW, 1) {
            Noop
        }
    }
    Device(PWRB) {
        Name(_HID, 0x0c0cd041)
        Method(_STA) {
            Return(0x0f)
        }
    }
    Device(SLPB) {
        Name(_HID, 0x0e0cd041)
        Method(_STA) {
            If(FSCM) {
                Return(0x0f)
            }
            Else {
                Return(0x00)
            }
        }
    }
}
Scope(_TZ) {
    ThermalZone(TZ00) {
        Method(_CRT, 0, Serialized) {
            Return(Add(0x0aac, Multiply(CRTT, 0x0a, ), ))
        }
        Method(_TMP, 0, Serialized) {
            If(DTSE) {
                Store(0x9c, BCMD)
                Store(Zero, SMIC)
                Return(Add(0x0aac, Multiply(DTS1, 0x0a, ), ))
            }
            Else {
                Return(0x0bb8)
            }
        }
        Method(_PSL, 0, Serialized) {
            If(MPEN) {
                Return(Package(0x02) {
                    \_PR.CPU0,
                    \_PR.CPU1,
                })
            }
            Else {
                Return(Package(0x01) {
                    \_PR.CPU0,
                })
            }
        }
        Method(_PSV, 0, Serialized) {
            Return(Add(0x0aac, Multiply(PSVT, 0x0a, ), ))
        }
        Method(_TC1, 0, Serialized) {
            Return(TC1V)
        }
        Method(_TC2, 0, Serialized) {
            Return(TC2V)
        }
        Method(_TSP, 0, Serialized) {
            Return(TSPV)
        }
    }
    ThermalZone(TZ01) {
        Method(_CRT, 0, Serialized) {
            Return(Add(0x0aac, Multiply(CRTT, 0x0a, ), ))
        }
        Method(_TMP, 0, Serialized) {
            If(LAnd(DTSE, MPEN)) {
                Store(0x9c, BCMD)
                Store(Zero, SMIC)
                Return(Add(0x0aac, Multiply(DTS2, 0x0a, ), ))
            }
            Else {
                Return(0x0bb8)
            }
        }
        Method(_PSL, 0, Serialized) {
            If(MPEN) {
                Return(Package(0x02) {
                    \_PR.CPU0,
                    \_PR.CPU1,
                })
            }
            Else {
                Return(Package(0x01) {
                    \_PR.CPU0,
                })
            }
        }
        Method(_PSV, 0, Serialized) {
            Return(Add(0x0aac, Multiply(PSVT, 0x0a, ), ))
        }
        Method(_TC1, 0, Serialized) {
            Return(TC1V)
        }
        Method(_TC2, 0, Serialized) {
            Return(TC2V)
        }
        Method(_TSP, 0, Serialized) {
            Return(TSPV)
        }
    }
}
Scope(\_GPE) {
    Method(_L02) {
        Store(0x00, GPEC)
        If(LAnd(FPEF, CPSF)) {
            If(FPMN) {
                If(CondRefOf(\_PR.CPU0._PPC, Local0)) {
                    Subtract(PSNM, One, \_PR.CPU0._PPC)
                    Notify(\_PR.CPU0, 0x80)
                    Notify(\_PR.CPU0, 0x81)
                }
                If(MPEN) {
                    If(CondRefOf(\_PR.CPU1._PPC, Local1)) {
                        Subtract(PSNM, One, \_PR.CPU1._PPC)
                        Notify(\_PR.CPU1, 0x80)
                        Notify(\_PR.CPU1, 0x81)
                    }
                }
            }
            Else {
                If(CondRefOf(\_PR.CPU0._PPC, Local0)) {
                    Store(Zero, \_PR.CPU0._PPC)
                    Notify(\_PR.CPU0, 0x80)
                    Notify(\_PR.CPU0, 0x81)
                }
                If(MPEN) {
                    If(CondRefOf(\_PR.CPU1._PPC, Local1)) {
                        Store(Zero, \_PR.CPU1._PPC)
                        Notify(\_PR.CPU1, 0x80)
                        Notify(\_PR.CPU1, 0x81)
                    }
                }
            }
        }
        Else {
            Notify(\_TZ.TZ00, 0x80)
            If(MPEN) {
                Notify(\_TZ.TZ01, 0x80)
            }
        }
    }
    Method(_L06) {
        If(\_SB.PCI0.GFX0.GSSE) {
            \_SB.PCI0.GFX0.GSCI()
        }
        Else {
            Store(0x01, SCIS)
        }
    }
    Method(_L08) {
    }
    Method(_L09) {
        If(\_SB.PCI0.RP01.PSP1) {
            Store(0x01, \_SB.PCI0.RP01.PSP1)
            Store(0x01, \_SB.PCI0.RP01.PMS1)
            Notify(\_SB.PCI0.RP01, 0x02)
        }
        If(\_SB.PCI0.RP02.PSP2) {
            Store(0x01, \_SB.PCI0.RP02.PSP2)
            Store(0x01, \_SB.PCI0.RP02.PMS2)
            Notify(\_SB.PCI0.RP02, 0x02)
        }
        If(\_SB.PCI0.RP03.PSP3) {
            Store(0x01, \_SB.PCI0.RP03.PSP3)
            Store(0x01, \_SB.PCI0.RP03.PMS3)
            Notify(\_SB.PCI0.RP03, 0x02)
        }
        If(\_SB.PCI0.RP04.PSP4) {
            Store(0x01, \_SB.PCI0.RP04.PSP4)
            Store(0x01, \_SB.PCI0.RP04.PMS4)
            Notify(\_SB.PCI0.RP04, 0x02)
        }
        If(\_SB.PCI0.RP05.PSP5) {
            Store(0x01, \_SB.PCI0.RP05.PSP5)
            Store(0x01, \_SB.PCI0.RP05.PMS5)
            Notify(\_SB.PCI0.RP05, 0x02)
        }
        If(\_SB.PCI0.RP06.PSP6) {
            Store(0x01, \_SB.PCI0.RP06.PSP6)
            Store(0x01, \_SB.PCI0.RP06.PMS6)
            Notify(\_SB.PCI0.RP06, 0x02)
        }
    }
    Method(_L0B) {
        Notify(\_SB.PCI0.PCIB, 0x02)
    }
    Method(_L0D) {
        If(\_SB.PCI0.EHC1.PMES) {
            Store(0x01, \_SB.PCI0.EHC1.PMES)
            Notify(\_SB.PCI0.EHC1, 0x02)
        }
        If(\_SB.PCI0.EHC2.PMES) {
            Store(0x01, \_SB.PCI0.EHC2.PMES)
            Notify(\_SB.PCI0.EHC2, 0x02)
        }
        If(\_SB.PCI0.HDEF.PMES) {
            Store(0x01, \_SB.PCI0.HDEF.PMES)
            Notify(\_SB.PCI0.HDEF, 0x02)
        }
        If(\_SB.PCI0.LANC.PMES) {
            Store(0x01, \_SB.PCI0.LANC.PMES)
            Notify(\_SB.PCI0.LANC, 0x02)
        }
    }
    Method(_L18) {
        Sleep(0xfa)
        Not(LPOL, LPOL)
        Store(One, LIDF)
        Notify(\_SB.FEXT, 0x80)
        Notify(\_SB.LID, 0x80)
    }
    Method(_L1C) {
        Store(SSF0, Local0)
        Store(Local0, SSF0)
        And(Local0, Not(SSM0, ), Local0)
        Store(SSF1, Local1)
        Store(Local1, SSF1)
        And(Local1, Not(SSM1, ), Local1)
        Store(SSF2, Local2)
        Store(Local2, SSF2)
        And(Local2, Not(SSM2, ), Local2)
        If(And(Local0, 0x01, )) {
            \_SB.PCI0.GFX0.PHTK()
            Store(0x80, BCMD)
            Store(Zero, SMIC)
            \_SB.PCI0.GFX0.AHTK()
            If(BSWF) {
                If(LNot(LLess(\_SB.OSTP(), 0x40))) {
                    \_SB.PCI0.GFX0.LCD.BLNF
                }
                Else {
                    Name(BLTS, Zero)
                    Store(And(\_SB.PCI0.LPCB.FJEX.GBLS(), 0xff, ), BLTS)
                    If(LEqual(BSWF, 0x01)) {
                        If(LGreater(BLTS, 0x00)) {
                            Decrement(BLTS)
                        }
                    }
                    If(LEqual(BSWF, 0x02)) {
                        If(LLess(BLTS, Subtract(BLLM, 0x01, ))) {
                            Increment(BLTS)
                        }
                    }
                    Or(AHKF, 0x01, AHKF)
                    \_SB.PCI0.LPCB.FJEX.SBLL(BLTS)
                    Store(Zero, BSWF)
                }
            }
            If(LSWF) {
                If(LNot(F5HF)) {
                    \_SB.PCI0.GFX0.AINT(0x02, 0x00)
                    If(LNot(TBSM)) {
                        Store(0x01, TBSM)
                        Store(0x00, TBSF)
                        Store(0x0a, TIMB)
                    }
                    Store(0x01, F5HF)
                }
                Store(Zero, LSWF)
            }
            If(AHKF) {
                Notify(\_SB.PCI0.LPCB.FJEX, 0x80)
            }
            If(IRBF) {
                If(LEqual(IRBC, 0xfd00)) {
                    Store(One, GINT)
                }
                Else {
                    \_SB.FEXT.SIRB(IRBC)
                }
                Notify(\_SB.FEXT, 0x80)
                Store(Zero, IRBF)
            }
        }
        If(And(Local1, 0x30, )) {
            Store(0x01, WSEF)
            Notify(\_SB.FEXT, 0x80)
            \_SB.PCI0.LPCB.CMBT.SWCF()
            If(UMT0) {
                If(WLSW) {
                    Store(One, UMPW)
                }
                Else {
                    Store(Zero, UMPW)
                }
            }
        }
        If(And(Local2, 0x08, )) {
            Store(B1SU, Local3)
            Store(B1SD, Local4)
            Store(TBSF, Local5)
            Store(B2SU, Local6)
            Store(B2SD, Local7)
            Store(Zero, STAE)
            If(LAnd(Local3, LNot(B1TC))) {
                If(LNot(CPBL)) {
                    \_SB.PCI0.PATA.PRIM.MAST.EOFF
                }
            }
            If(Local5) {
                Store(Zero, F5HF)
                If(LOr(LEqual(TMIF, 0x01), LEqual(TMIF, 0x03))) {
                    Store(One, BLCT)
                    Sleep(0x64)
                    Store(Zero, BLCT)
                    If(LEqual(TMIF, 0x03)) {
                        Store(Zero, TMIF)
                    }
                }
                If(LEqual(TMIF, 0x01)) {
                    Store(0x01, TBSM)
                    Store(0x00, TBSF)
                    Store(0x10, TIMB)
                    Store(0x02, TMIF)
                    Store(Zero, Local5)
                }
                Else {
                    Store(0x00, TBSM)
                }
            }
            If(LAnd(Local4, B1TC)) {
                If(LNot(CPBL)) {
                    If(LNot(DPCS)) {
                        \_SB.PCI0.PATA.PRIM.MAST.EON
                    }
                }
            }
            If(Local5) {
                If(LEqual(TMIF, 0x02)) {
                    If(LNot(CPBL)) {
                        If(LNot(DPCS)) {
                            \_SB.PCI0.PATA.PRIM.MAST.EON
                        }
                    }
                    Store(Zero, TMIF)
                }
            }
            If(LOr(Local6, Local7)) {
                Sleep(0x03e8)
                Store(Zero, B2SU)
                Store(Zero, B2SD)
                \_SB.PCI0.LPCB.PRCF()
                Store(One, PREF)
                Notify(\_SB.FEXT, 0x80)
                If(RPEN) {
                    If(LNot(LEqual(B2TC, RPDS))) {
                        Store(B2TC, RPDS)
                        If(RPDS) {
                            Notify(\_SB.REPL, Zero)
                        }
                        Else {
                            Sleep(0x0fa0)
                            Notify(\_SB.REPL, One)
                        }
                    }
                }
            }
        }
        If(And(Local2, 0x10, )) {
            \_SB.AC.ACHK()
            \_SB.CMB1.BCHK()
            \_SB.CMB2.BCHK()
            If(LOr(LNot(LEqual(LWMD, PLWM)), LNot(LEqual(TALM, PTAL)))) {
                Store(LWMD, PLWM)
                Store(TALM, PTAL)
                Store(0x95, BCMD)
                Or(PLWM, ShiftLeft(PTAL, 0x01, ), DID)
                Store(Zero, SMIC)
            }
            \_SB.PCI0.LPCB.TCTR()
            If(LAnd(TALM, LNot(ACPW))) {
                Store(One, FOCT)
            }
            Else {
                Store(Zero, FOCT)
            }
            \_SB.PCI0.LPCB.SLED()
            If(HWPM) {
                If(ACPW) {
                    Store(Zero, \_SB.PCI0.LPCB.CLKR)
                }
                Else {
                    Store(One, \_SB.PCI0.LPCB.CLKR)
                }
            }
        }
    }
}
Name(_S0, Package(0x03) {
    0x00,
    0x00,
    0x00,
})
Name(_S3, Package(0x03) {
    0x05,
    0x05,
    0x00,
})
Name(_S4, Package(0x03) {
    0x06,
    0x06,
    0x00,
})
Name(_S5, Package(0x03) {
    0x07,
    0x07,
    0x00,
})
Method(_PTS, 1) {
    Add(0xdd, Arg0, PO80)
    If(LAnd(LNot(LLess(Arg0, One)), LNot(LGreater(Arg0, 0x04)))) {
        If(LNot(CPBL)) {
            \_SB.PCI0.PATA.PRIM.MAST.EPTS
        }
        If(RPEN) {
            Store(RPDS, DC1S)
        }
        Store(WLRF, BTST)
        Or(ShiftLeft(WLSW, 0x01, ), BTST, BTST)
        Or(ShiftLeft(ABON, 0x02, ), BTST, BTST)
        Store(Zero, ABLC)
    }
    Store(Zero, WAPB)
    \_SB.PCI0.LPCB.TPTS()
    If(LAnd(FPEF, FPMN)) {
        Store(Zero, FPMN)
        If(CondRefOf(\_PR.CPU0._PPC, Local0)) {
            Notify(\_PR.CPU0, 0x81)
        }
        If(MPEN) {
            If(CondRefOf(\_PR.CPU1._PPC, Local1)) {
                Notify(\_PR.CPU1, 0x81)
            }
        }
    }
    Store(One, HDWA)
    Store(Zero, TMIF)
    Add(0xe0, Arg0, PO80)
}
Method(_WAK, 1) {
    Add(0xee, Arg0, PO80)
    \_SB.PCI0.LPCB.TWAK()
    \_PR.CSTC()
    \_SB.PCI0.LPCB.AINI()
    \_SB.FEXT._INI()
    If(LEqual(Arg0, 0x03)) {
        Store(0x9b, BCMD)
        Store(0x04, DID)
        Store(Zero, SMIC)
    }
    If(WAPB) {
        Notify(\_SB.PWRB, 0x02)
    }
    If(LEqual(Arg0, 0x04)) {
        \_SB.FEXT.FUNC(0x1002, 0x03, Ones, WBTN)
    }
    \_SB.PCI0.LPCB.CMBT.BWAK(Arg0)
    If(LAnd(LNot(LLess(Arg0, One)), LNot(LGreater(Arg0, 0x04)))) {
        If(LNot(CPBL)) {
            Store(Arg0, SSTA)
            \_SB.PCI0.PATA.PRIM.MAST.EWAK
        }
        \_SB.PCI0.LPCB.PRCF()
        If(RPEN) {
            If(LNot(LEqual(B2TC, DC1S))) {
                Store(B2TC, RPDS)
                If(RPDS) {
                    Notify(\_SB.REPL, Zero)
                }
                Else {
                    Notify(\_SB.REPL, One)
                }
            }
        }
        If(LNot(LEqual(TMIF, 0x01))) {
            Store(0x03, TMIF)
        }
        Store(0x01, TBSM)
        Store(0x00, TBSF)
        Store(0x0e, TIMB)
    }
    If(LAnd(LNot(LLess(Arg0, One)), LNot(LGreater(Arg0, 0x04)))) {
        If(NGTM) {
            \_SB.FEXT.FUNC(0x1004, 0x01, 0x04, 0x00)
        }
    }
    Store(Zero, F5HF)
    \_SB.CMB1.BCHK()
    \_SB.CMB2.BCHK()
    Add(0xf0, Arg0, PO80)
    Return(Package(0x02) {
        0x00,
        0x00,
    })
}
Scope(\_SB.FEXT) {
    Method(BINI) {
        And(G3P1, 0xc0, Local0)
        If(LEqual(Local0, 0xc0)) {
            Store(Zero, LEDI)
            Store(Zero, BTNI)
        }
        Else {
            If(LEqual(Local0, 0x40)) {
                Store(0x0100, LEDI)
                Store(0x00ff0101, BTNI)
            }
            Else {
                Store(Zero, LEDI)
                Store(0x000f0001, BTNI)
                Or(ECCI, 0x08, ECCI)
            }
        }
    }
    Method(GINI) {
        Or(ECCI, 0x01, ECCI)
    }
}

}


Home | Main Index | Thread Index | Old Index