All of lore.kernel.org
 help / color / mirror / Atom feed
From: lxl <sidneyli at yeah.net>
To: devel@acpica.org
Subject: Re: [Devel] Reserved method has too many arguments (_OSC requires 4)
Date: Tue, 08 Feb 2011 18:38:38 +0800	[thread overview]
Message-ID: <1297161518.19502.0.camel@evan> (raw)
In-Reply-To: 4911F71203A09E4D9981D27F9D83085859FF9F81@orsmsx503.amr.corp.intel.com

[-- Attachment #1: Type: text/plain, Size: 2 bytes --]



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: dsdt.dsl --]
[-- Type: text/x-dsl, Size: 189118 bytes --]

/*
 * Intel ACPI Component Architecture
 * AML Disassembler version 20090521
 *
 * Disassembly of dsdt.dat, Tue Feb  8 18:38:17 2011
 *
 *
 * Original Table Header:
 *     Signature        "DSDT"
 *     Length           0x00004F05 (20229)
 *     Revision         0x01 **** ACPI 1.0, no 64-bit math support
 *     Checksum         0x31
 *     OEM ID           "BenQ  "
 *     OEM Table ID     "Joybook "
 *     OEM Revision     0x00000001 (1)
 *     Compiler ID      "MSFT"
 *     Compiler Version 0x01000013 (16777235)
 */
DefinitionBlock ("dsdt.aml", "DSDT", 1, "BenQ  ", "Joybook ", 0x00000001)
{
    External (PDC0)

    Name (REGS, Buffer (0x05)
    {
        0x00, 0x00, 0x00, 0x00, 0x00
    })
    OperationRegion (ECPO, SystemIO, 0x66, One)
    Field (ECPO, ByteAcc, NoLock, Preserve)
    {
        P66H,   8
    }

    OperationRegion (ECP1, SystemIO, 0x62, One)
    Field (ECP1, ByteAcc, NoLock, Preserve)
    {
        P62H,   8
    }

    OperationRegion (PORT, SystemIO, 0x80, One)
    Field (PORT, ByteAcc, NoLock, Preserve)
    {
        P80H,   8
    }

    OperationRegion (POR1, SystemIO, 0x0378, One)
    Field (POR1, ByteAcc, NoLock, Preserve)
    {
        P378,   8
    }

    OperationRegion (GPIO, SystemIO, 0x0500, 0x3C)
    Field (GPIO, ByteAcc, NoLock, Preserve)
    {
                Offset (0x0E), 
        GP16,   1, 
        GP17,   1, 
        GP18,   1, 
        GP19,   1, 
            ,   3, 
        GP23,   1, 
        GP24,   1, 
        GP25,   1, 
        GP26,   1, 
        GP27,   1, 
        GP28,   1, 
                Offset (0x10), 
                Offset (0x38), 
            ,   1, 
        GP33,   1, 
        CPEN,   1, 
                Offset (0x39)
    }

    OperationRegion (RCRB, SystemMemory, 0xFED1C000, 0x4000)
    Field (RCRB, DWordAcc, Lock, Preserve)
    {
                Offset (0x1000), 
                Offset (0x3000), 
                Offset (0x3404), 
        HPAS,   2, 
            ,   5, 
        HPAE,   1, 
                Offset (0x3418), 
            ,   1, 
        PATD,   1, 
        SATD,   1, 
        SMBD,   1, 
        AZAD,   1, 
        A97D,   1, 
                Offset (0x341A), 
        RP1D,   1, 
        RP2D,   1, 
        RP3D,   1, 
        RP4D,   1
    }

    OperationRegion (MBOX, SystemMemory, 0x5FEBCF10, 0x0000009C)
    Field (MBOX, AnyAcc, NoLock, Preserve)
    {
        PCI1,   8, 
        PCI2,   8, 
        PCI3,   8, 
        PCI4,   8, 
        PCI5,   8, 
        PCI6,   8, 
        PCI7,   8, 
        PCI8,   8, 
        NLCK,   8, 
        ZIPE,   8, 
        COMA,   8, 
        CAIO,   8, 
        CAIP,   8, 
        CAMD,   8, 
        CADA,   8, 
        COMB,   8, 
        CBIO,   8, 
        CBIP,   8, 
        CBMD,   8, 
        CBDA,   8, 
        COMC,   8, 
        CCIO,   8, 
        CCIP,   8, 
        CCMD,   8, 
        CCDA,   8, 
        COMD,   8, 
        CDIO,   8, 
        CDIP,   8, 
        CDMD,   8, 
        CDDA,   8, 
        LPT1,   8, 
        L1IO,   8, 
        L1IP,   8, 
        L1MD,   8, 
        L1DA,   8, 
        LPT2,   8, 
        L2IO,   8, 
        L2IP,   8, 
        L2MD,   8, 
        L2DA,   8, 
        LPT3,   8, 
        L3IO,   8, 
        L3IP,   8, 
        L3MD,   8, 
        L3DA,   8, 
        FDDC,   8, 
        FDWP,   8, 
        HGMP,   8, 
        LGMP,   8, 
        MIDI,   8, 
        AZLA,   8, 
        AUDO,   8, 
        MODM,   8, 
        IDEC,   8, 
        SSED,   8, 
        PACT,   8, 
        SCFG,   8, 
        AIBT,   8, 
        AMOD,   8, 
        IMOD,   8, 
        LCFG,   8, 
        IDLY,   8, 
        PMTP,   8, 
        PMIO,   8, 
        PMBM,   8, 
        PMTM,   8, 
        PSTP,   8, 
        PSIO,   8, 
        PSBM,   8, 
        PSTM,   8, 
        IDE0,   8, 
        IDE1,   8, 
        IDE2,   8, 
        IDE3,   8, 
        IDE4,   8, 
        IDE5,   8, 
        IDE6,   8, 
        IDE7,   8, 
        PEGS,   8, 
        D2F1,   8, 
        IGMT,   8, 
        DTSZ,   8, 
        CLKC,   8, 
        CKSC,   8, 
        BOTT,   8, 
        PANT,   8, 
        TVTP,   8, 
        HIUB,   8, 
        LUBS,   8, 
        PLYT,   8, 
        EDCG,   8, 
        SDFY,   8, 
        SDTC,   8, 
        SDRP,   8, 
        SDCL,   8, 
        SDRC,   8, 
        SDRE,   8, 
        FC2L,   8, 
        FC3L,   8, 
        FCS4,   8, 
        APIM,   8, 
        HPTS,   8, 
        HPTA,   8, 
        EMAS,   8, 
        ISTC,   8, 
        TRML,   8, 
        FNON,   8, 
        TRON,   8, 
        NXMD,   8, 
        PCRR,   8, 
        C4EN,   8, 
        C43D,   8, 
        DAS1,   8, 
        DAS3,   8, 
        WKPM,   8, 
        WKMD,   8, 
        WKS5,   8, 
        HOUR,   8, 
        MINS,   8, 
        SECS,   8, 
        DOFM,   8, 
        NXFE,   8, 
        VTST,   8, 
        VTFE,   8, 
        S5FG,   8, 
        CSTS,   8, 
        ENCS,   8, 
        CSTR,   8, 
        CMPE,   8, 
        CSMD,   8, 
        QBOT,   8, 
        PBOT,   8
    }

    OperationRegion (CMS1, SystemIO, 0x72, 0x02)
    Field (CMS1, ByteAcc, NoLock, Preserve)
    {
        CMSI,   8, 
        CMSD,   8
    }

    Method (CMSW, 2, NotSerialized)
    {
        Store (Arg0, CMSI)
        Store (Arg1, CMSD)
    }

    OperationRegion (BTT0, SystemMemory, 0x04C0, 0x30)
    Field (BTT0, ByteAcc, NoLock, Preserve)
    {
                Offset (0x15), 
        OSFG,   4, 
        RTCF,   1, 
                Offset (0x16), 
                Offset (0x25), 
        POST,   1, 
        SCUA,   1, 
        LDIM,   1, 
        DOFF,   1, 
        HOFF,   1, 
                Offset (0x26)
    }

    OperationRegion (BTT1, SystemMemory, 0x04F0, 0x0F)
    Field (BTT1, ByteAcc, NoLock, Preserve)
    {
        LCDO,   1, 
        CRTO,   1, 
        TVON,   1, 
        DFPO,   1, 
        LCAT,   1, 
        CRTA,   1, 
        TVAT,   1, 
        DFPA,   1, 
        SWTF,   1, 
                Offset (0x02)
    }

    OperationRegion (IO_T, SystemIO, 0x0800, 0x10)
    Field (IO_T, ByteAcc, NoLock, Preserve)
    {
                Offset (0x02), 
                Offset (0x04), 
                Offset (0x06), 
                Offset (0x08), 
        TRP0,   8, 
                Offset (0x0A), 
                Offset (0x0B), 
                Offset (0x0C), 
                Offset (0x0D), 
                Offset (0x0E), 
                Offset (0x0F), 
                Offset (0x10)
    }

    OperationRegion (NVST, SystemMemory, 0x5FEBCFAC, 0x0000002D)
    Field (NVST, AnyAcc, Lock, Preserve)
    {
        SMIF,   8, 
        PRM0,   8, 
        PRM1,   8, 
        BRTL,   8, 
                Offset (0x05), 
        IGDS,   8, 
        LCDA,   16, 
                Offset (0x0A), 
                Offset (0x0C), 
        CADL,   16, 
        PADL,   16, 
        LIDS,   8, 
        PWRS,   8, 
        BVAL,   32, 
        CMPF,   8, 
        CSTF,   8, 
        GTF0,   56, 
        GTF2,   56, 
        IDEM,   8, 
        NIST,   8, 
        ECID,   8, 
        ECDA,   8
    }

    Method (SMIR, 2, Serialized)
    {
        Store (Arg1, APMD)
        Store (Arg0, APMC)
        Stall (0xFF)
        Stall (0xFF)
        Stall (0xFF)
        Stall (0xFF)
        Store (APMD, Local0)
        Return (Local0)
    }

    Scope (\_PR)
    {
        Processor (CPU0, 0x01, 0x00000410, 0x06)
        {
            Method (_CST, 0, NotSerialized)
            {
                If (LEqual (And (PDC0, 0x10), 0x10))
                {
                    If (CSMD) {}
                    Else
                    {
                        If (CSTS)
                        {
                            If (LOr (PWRS, LNot (C4EN)))
                            {
                                Return (Package (0x04)
                                {
                                    0x03, 
                                    Package (0x04)
                                    {
                                        ResourceTemplate ()
                                        {
                                            Register (FFixedHW, 
                                                0x00,               // Bit Width
                                                0x00,               // Bit Offset
                                                0x0000000000000000, // Address
                                                ,)
                                        }, 

                                        One, 
                                        0x14, 
                                        0x03E8
                                    }, 

                                    Package (0x04)
                                    {
                                        ResourceTemplate ()
                                        {
                                            Register (SystemIO, 
                                                0x08,               // Bit Width
                                                0x00,               // Bit Offset
                                                0x0000000000000414, // Address
                                                ,)
                                        }, 

                                        0x02, 
                                        0x28, 
                                        0x02EE
                                    }, 

                                    Package (0x04)
                                    {
                                        ResourceTemplate ()
                                        {
                                            Register (SystemIO, 
                                                0x08,               // Bit Width
                                                0x00,               // Bit Offset
                                                0x0000000000000415, // Address
                                                ,)
                                        }, 

                                        0x03, 
                                        0x3C, 
                                        0x01F4
                                    }
                                })
                            }
                            Else
                            {
                                Return (Package (0x05)
                                {
                                    0x04, 
                                    Package (0x04)
                                    {
                                        ResourceTemplate ()
                                        {
                                            Register (FFixedHW, 
                                                0x00,               // Bit Width
                                                0x00,               // Bit Offset
                                                0x0000000000000000, // Address
                                                ,)
                                        }, 

                                        One, 
                                        0x14, 
                                        0x03E8
                                    }, 

                                    Package (0x04)
                                    {
                                        ResourceTemplate ()
                                        {
                                            Register (SystemIO, 
                                                0x08,               // Bit Width
                                                0x00,               // Bit Offset
                                                0x0000000000000414, // Address
                                                ,)
                                        }, 

                                        0x02, 
                                        0x28, 
                                        0x02EE
                                    }, 

                                    Package (0x04)
                                    {
                                        ResourceTemplate ()
                                        {
                                            Register (SystemIO, 
                                                0x08,               // Bit Width
                                                0x00,               // Bit Offset
                                                0x0000000000000415, // Address
                                                ,)
                                        }, 

                                        0x03, 
                                        0x3C, 
                                        0x01F4
                                    }, 

                                    Package (0x04)
                                    {
                                        ResourceTemplate ()
                                        {
                                            Register (SystemIO, 
                                                0x08,               // Bit Width
                                                0x00,               // Bit Offset
                                                0x0000000000000416, // Address
                                                ,)
                                        }, 

                                        0x03, 
                                        0x64, 
                                        0xFA
                                    }
                                })
                            }
                        }
                        Else
                        {
                            Return (Package (0x02)
                            {
                                One, 
                                Package (0x04)
                                {
                                    ResourceTemplate ()
                                    {
                                        Register (FFixedHW, 
                                            0x00,               // Bit Width
                                            0x00,               // Bit Offset
                                            0x0000000000000000, // Address
                                            ,)
                                    }, 

                                    One, 
                                    0x14, 
                                    0x03E8
                                }
                            })
                        }
                    }
                }
            }
        }

        Processor (CPU1, 0x02, 0x00000410, 0x06)
        {
            Method (_CST, 0, NotSerialized)
            {
                If (CSMD) {}
                Else
                {
                    Return (\_PR.CPU0._CST ())
                }
            }
        }
    }

    Name (ECON, Zero)
    Name (CTYP, Zero)
    Name (DSEN, One)
    Name (ACFG, Zero)
    Name (REC, Zero)
    Name (NIMH, "NiMH")
    Name (LION, "Lion")
    Method (_PTS, 1, NotSerialized)
    {
        Store (One, GP27)
        Sleep (0x01F4)
        Store (Zero, ACFG)
        If (LEqual (Arg0, One))
        {
            Store (0x51, P80H)
        }

        If (LEqual (Arg0, 0x03))
        {
            Store (0x53, P80H)
        }

        If (LEqual (Arg0, 0x04))
        {
            CMSW (0x3F, 0x3F)
            SMIR (0xB0, 0x64)
        }

        Return (Zero)
    }

    Method (_WAK, 1, NotSerialized)
    {
        If (LEqual (RTCF, Zero))
        {
            Store (Zero, GP27)
            Sleep (0x01F4)
            Notify (\_SB.PCI0.EXP1, Zero)
            Notify (\_SB.SLPB, 0x02)
        }

        If (LEqual (Arg0, One))
        {
            Store (0xE1, P80H)
            If (LEqual (HIUB, One))
            {
                Notify (\_SB.PCI0.ECHI, One)
            }
        }

        If (LEqual (Arg0, 0x03))
        {
            Store (0xE3, P80H)
        }

        If (LEqual (Arg0, 0x04))
        {
            Store (0xE4, P80H)
            If (REC)
            {
                If (LNot (\_SB.PCI0.LPC.EC0.BAT))
                {
                    Notify (\_SB.BAT0, One)
                }
            }
        }

        Return (Zero)
    }

    Name (\_S0, Package (0x04)
    {
        Zero, 
        Zero, 
        Zero, 
        Zero
    })
    If (LEqual (DAS1, One))
    {
        Name (\_S1, Package (0x04)
        {
            One, 
            One, 
            Zero, 
            Zero
        })
    }

    If (LEqual (DAS3, One))
    {
        Name (\_S3, Package (0x04)
        {
            0x05, 
            0x05, 
            Zero, 
            Zero
        })
    }

    Name (\_S4, Package (0x04)
    {
        0x06, 
        0x06, 
        Zero, 
        Zero
    })
    Name (\_S5, Package (0x04)
    {
        0x07, 
        0x07, 
        Zero, 
        Zero
    })
    Name (OSSD, Zero)
    Scope (_GPE)
    {
        Method (_L01, 0, NotSerialized)
        {
            Sleep (0x80)
            If (LNotEqual (\_SB.PCI0.EXP4.HPCS, Zero))
            {
                Store (One, \_SB.PCI0.EXP4.HPCS)
                Store (One, \_SB.PCI0.EXP4.PDC4)
                Notify (\_SB.PCI0.EXP4, Zero)
            }

            If (LNotEqual (\_SB.PCI0.EXP1.HPCS, Zero))
            {
                Store (One, \_SB.PCI0.EXP1.HPCS)
                Store (One, \_SB.PCI0.EXP1.PDC1)
                Notify (\_SB.PCI0.EXP1, Zero)
            }
        }

        Method (_L03, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.UHC1, 0x02)
        }

        Method (_L04, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.UHC2, 0x02)
        }

        Method (_L05, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.AZAL, 0x02)
            Notify (\_SB.PCI0.MODM, 0x02)
        }

        Method (_L09, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.EXP1, 0x02)
            Notify (\_SB.PCI0.EXP2, 0x02)
            Notify (\_SB.PCI0.EXP3, 0x02)
            Notify (\_SB.PCI0.EXP4, 0x02)
        }

        Method (_L0B, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.P32.LANC, 0x02)
        }

        Method (_L0C, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.UHC3, 0x02)
        }

        Method (_L0D, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.ECHI, 0x02)
        }

        Method (_L0E, 0, NotSerialized)
        {
            Notify (\_SB.PCI0.UHC4, 0x02)
        }
    }

    Name (\GPIC, Zero)
    Method (\_PIC, 1, NotSerialized)
    {
        Store (Arg0, \GPIC)
    }

    Scope (\_TZ)
    {
        ThermalZone (TZ0)
        {
            Method (_TMP, 0, NotSerialized)
            {
                Store (0x32, Local0)
                If (REC)
                {
                    Store (\_SB.PCI0.LPC.EC0.CTMP, Local0)
                }

                Store (KELV (Local0), Local0)
                Return (Local0)
            }

            Method (_CRT, 0, NotSerialized)
            {
                Store (0x64, Local0)
                If (REC)
                {
                    Store (\_SB.PCI0.LPC.EC0.CRTT, Local0)
                }

                Store (KELV (Local0), Local0)
                Return (Local0)
            }

            Name (_PSL, Package (0x01)
            {
                \_PR.CPU0
            })
            Name (_TSP, 0x32)
        }

        Method (KELV, 1, NotSerialized)
        {
            Store (Arg0, Local0)
            Multiply (Local0, 0x0A, Local0)
            Add (Local0, 0x0AAC, Local0)
            Return (Local0)
        }
    }

    Method (SCMP, 2, NotSerialized)
    {
        Name (STG1, Buffer (0x50) {})
        Name (STG2, Buffer (0x50) {})
        Store (Arg0, STG1)
        Store (Arg1, STG2)
        If (LNotEqual (SizeOf (Arg0), SizeOf (Arg1)))
        {
            Return (Zero)
        }

        Store (Zero, Local0)
        While (LLess (Local0, SizeOf (Arg0)))
        {
            If (LNotEqual (DerefOf (Index (STG1, Local0)), DerefOf (Index (
                STG2, Local0))))
            {
                Return (Zero)
            }

            Increment (Local0)
        }

        Return (One)
    }

    Name (WNOS, Zero)
    Method (CKOS, 0, NotSerialized)
    {
        If (LEqual (WNOS, Zero))
        {
            If (SCMP (\_OS, "Microsoft Windows"))
            {
                Store (One, WNOS)
            }

            If (SCMP (\_OS, "Microsoft Windows NT"))
            {
                Store (0x02, WNOS)
            }

            If (SCMP (\_OS, "Microsoft WindowsME: Millennium Edition"))
            {
                Store (0x03, WNOS)
            }

            If (CondRefOf (\_OSI, Local0))
            {
                Store (0x04, WNOS)
            }
        }

        Return (WNOS)
    }

    Method (GETP, 1, Serialized)
    {
        If (LEqual (And (Arg0, 0x09), Zero))
        {
            Return (Ones)
        }

        If (LEqual (And (Arg0, 0x09), 0x08))
        {
            Return (0x0384)
        }

        ShiftRight (And (Arg0, 0x0300), 0x08, Local0)
        ShiftRight (And (Arg0, 0x3000), 0x0C, Local1)
        Return (Multiply (0x1E, Subtract (0x09, Add (Local0, Local1))
            ))
    }

    Method (GDMA, 5, Serialized)
    {
        If (Arg0)
        {
            If (LAnd (Arg1, Arg4))
            {
                Return (0x14)
            }

            If (LAnd (Arg2, Arg4))
            {
                Return (Multiply (Subtract (0x04, Arg3), 0x0F))
            }

            Return (Multiply (Subtract (0x04, Arg3), 0x1E))
        }

        Return (Ones)
    }

    Method (GETT, 1, Serialized)
    {
        Return (Multiply (0x1E, Subtract (0x09, Add (And (ShiftRight (Arg0, 0x02
            ), 0x03), And (Arg0, 0x03)))))
    }

    Method (GETF, 3, Serialized)
    {
        Name (TMPF, Zero)
        If (Arg0)
        {
            Or (TMPF, One, TMPF)
        }

        If (And (Arg2, 0x02))
        {
            Or (TMPF, 0x02, TMPF)
        }

        If (Arg1)
        {
            Or (TMPF, 0x04, TMPF)
        }

        If (And (Arg2, 0x20))
        {
            Or (TMPF, 0x08, TMPF)
        }

        If (And (Arg2, 0x4000))
        {
            Or (TMPF, 0x10, TMPF)
        }

        Return (TMPF)
    }

    Method (SETP, 3, Serialized)
    {
        If (LGreater (Arg0, 0xF0))
        {
            Return (0x08)
        }
        Else
        {
            If (And (Arg1, 0x02))
            {
                If (LAnd (LLessEqual (Arg0, 0x78), And (Arg2, 0x02)))
                {
                    Return (0x2301)
                }

                If (LAnd (LLessEqual (Arg0, 0xB4), And (Arg2, One)))
                {
                    Return (0x2101)
                }
            }

            Return (0x1001)
        }
    }

    Method (SDMA, 1, Serialized)
    {
        If (LLessEqual (Arg0, 0x14))
        {
            Return (One)
        }

        If (LLessEqual (Arg0, 0x1E))
        {
            Return (0x02)
        }

        If (LLessEqual (Arg0, 0x2D))
        {
            Return (One)
        }

        If (LLessEqual (Arg0, 0x3C))
        {
            Return (0x02)
        }

        If (LLessEqual (Arg0, 0x5A))
        {
            Return (One)
        }

        Return (Zero)
    }

    Method (SETT, 3, Serialized)
    {
        If (And (Arg1, 0x02))
        {
            If (LAnd (LLessEqual (Arg0, 0x78), And (Arg2, 0x02)))
            {
                Return (0x0B)
            }

            If (LAnd (LLessEqual (Arg0, 0xB4), And (Arg2, One)))
            {
                Return (0x09)
            }
        }

        Return (0x04)
    }

    OperationRegion (SMIO, SystemIO, 0xB2, 0x02)
    Field (SMIO, ByteAcc, NoLock, Preserve)
    {
        APMC,   8, 
        APMD,   8
    }

    Scope (\_SB)
    {
        Method (SMIR, 2, Serialized)
        {
            Store (Arg1, APMD)
            Store (Arg0, APMC)
            Stall (0xFF)
            Stall (0xFF)
            Stall (0xFF)
            Stall (0xFF)
            Store (APMD, Local0)
            Return (Local0)
        }

        Name (OSOW, Zero)
        Device (LID0)
        {
            Name (_HID, EisaId ("PNP0C0D"))
            Method (_LID, 0, NotSerialized)
            {
                Store (One, Local0)
                If (REC)
                {
                    XOr (\_SB.PCI0.LPC.EC0.LIDS, One, Local0)
                }

                Return (Local0)
            }
        }

        Device (SLPB)
        {
            Name (_HID, EisaId ("PNP0C0E"))
        }

        Device (BAT0)
        {
            Name (_HID, EisaId ("PNP0C0A"))
            Name (_PCL, Package (0x01)
            {
                \_SB
            })
            Method (_STA, 0, NotSerialized)
            {
                If (REC)
                {
                    Sleep (0x78)
                    If (\_SB.PCI0.LPC.EC0.BAT)
                    {
                        Store (0x1F, Local0)
                    }
                    Else
                    {
                        Store (0x0F, Local0)
                    }

                    And (Local0, 0x1F, Local0)
                    Store (Local0, Debug)
                    Return (Local0)
                }
                Else
                {
                    Return (0x0F)
                }
            }

            Method (_BIF, 0, NotSerialized)
            {
                Name (BIFP, Package (0x0D)
                {
                    One, 
                    0x0FA0, 
                    0x0FA0, 
                    One, 
                    0x2EE0, 
                    0x012C, 
                    0x96, 
                    One, 
                    One, 
                    "Battery", 
                    "", 
                    "LIon", 
                    "BenQ"
                })
                Store (\_SB.BAT0._STA (), Local0)
                And (Local0, 0x10, Local0)
                If (LNot (Local0))
                {
                    Return (BIFP)
                }

                If (REC)
                {
                    Store (\_SB.PCI0.LPC.EC0.BDC0, Index (BIFP, One))
                    Store (\_SB.PCI0.LPC.EC0.BDV0, Index (BIFP, 0x04))
                    Store (\_SB.PCI0.LPC.EC0.BFC0, Local0)
                    Store (Local0, Index (BIFP, 0x02))
                    Divide (Local0, 0x0A, Local1, Local2)
                    Store (Local2, Index (BIFP, 0x05))
                    Divide (Local0, 0x21, Local1, Local2)
                    Store (Local2, Index (BIFP, 0x06))
                    If (\_SB.PCI0.LPC.EC0.BTYP)
                    {
                        Store (NIMH, Index (BIFP, 0x0B))
                    }
                    Else
                    {
                        Store (LION, Index (BIFP, 0x0B))
                    }
                }

                Store (BIFP, Debug)
                Return (BIFP)
            }

            Name (BSTP, Package (0x04)
            {
                Zero, 
                0x04B0, 
                0x0BB8, 
                0x03E8
            })
            Method (_BST, 0, Serialized)
            {
                If (REC)
                {
                    If (\_SB.PCI0.LPC.EC0.BAT)
                    {
                        Store (\_SB.PCI0.LPC.EC0.BPV0, Index (BSTP, 0x03))
                        Multiply (\_SB.PCI0.LPC.EC0.BRC0, 0x64, Local3)
                        Divide (Local3, \_SB.PCI0.LPC.EC0.BFC0, Local3, Local0)
                        Multiply (\_SB.PCI0.LPC.EC0.BFC0, Local0, Local3)
                        Divide (Local3, 0x64, Local3, Local0)
                        Increment (Local0)
                        Store (Local0, Index (BSTP, 0x02))
                        Store (\_SB.PCI0.LPC.EC0.BRC0, Local3)
                        Store (\_SB.PCI0.LPC.EC0.BPR0, Local0)
                        If (LGreaterEqual (Local0, 0x8000))
                        {
                            And (Not (Local0), 0xFFFF, Local0)
                        }

                        Store (Local0, Index (BSTP, One))
                        If (\_SB.PCI0.LPC.EC0.ADP)
                        {
                            If (\_SB.PCI0.LPC.EC0.CHRG)
                            {
                                Store (0x02, Index (BSTP, Zero))
                            }
                            Else
                            {
                                Store (Zero, Index (BSTP, Zero))
                            }
                        }
                        Else
                        {
                            If (LLess (Local3, 0x19))
                            {
                                Store (0x05, Index (BSTP, Zero))
                            }
                            Else
                            {
                                Store (One, Index (BSTP, Zero))
                            }
                        }
                    }
                }

                Store (BSTP, Debug)
                Return (BSTP)
            }
        }

        Device (AC)
        {
            Name (_HID, "ACPI0003")
            Name (ACST, Zero)
            Name (_PCL, Package (0x02)
            {
                \_SB, 
                BAT0
            })
            Method (_PSR, 0, NotSerialized)
            {
                If (REC)
                {
                    If (ACFG)
                    {
                        Store (ACST, Local0)
                    }
                    Else
                    {
                        Store (\_SB.PCI0.LPC.EC0.ADP, Local0)
                        Store (Local0, ACST)
                        Store (One, ACFG)
                    }
                }
                Else
                {
                    Store (One, Local0)
                }

                Sleep (0x78)
                Store (Local0, Debug)
                Return (Local0)
            }
        }

        Device (PCI0)
        {
            Name (_HID, EisaId ("PNP0A08"))
            Name (_CID, EisaId ("PNP0A03"))
            Name (_ADR, Zero)
            Method (_OSC, 5, NotSerialized)
            {
                Store (Arg3, Local0)
                Multiply (Local0, 0x04, Local1)
                Name (BUF1, Buffer (Local1) {})
                Store (Arg4, BUF1)
                Store (Zero, Local1)
                Store (Zero, Local2)
                While (Local0)
                {
                    Multiply (Local1, 0x04, Local2)
                    CreateDWordField (BUF1, Local2, CAPB)
                    If (Arg2)
                    {
                        If (LEqual (Local1, Zero))
                        {
                            And (CAPB, 0xFFFFFFFC)
                        }
                    }
                    Else
                    {
                    }

                    Increment (Local1)
                    Decrement (Local0)
                }

                Return (BUF1)
            }

            Name (_BBN, Zero)
            OperationRegion (HBUS, PCI_Config, 0x40, 0xC0)
            Field (HBUS, DWordAcc, NoLock, Preserve)
            {
                        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 (0x5C), 
                    ,   3, 
                TOUD,   5
            }

            Name (BUF0, ResourceTemplate ()
            {
                WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
                    0x0000,             // Granularity
                    0x0000,             // Range Minimum
                    0x00FF,             // Range Maximum
                    0x0000,             // Translation Offset
                    0x0100,             // Length
                    0x00,, )
                DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                    0x00000000,         // Granularity
                    0x00000000,         // Range Minimum
                    0x00000CF7,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x00000CF8,         // Length
                    0x00,, , TypeStatic)
                IO (Decode16,
                    0x0CF8,             // Range Minimum
                    0x0CF8,             // Range Maximum
                    0x01,               // Alignment
                    0x08,               // Length
                    )
                DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
                    0x00000000,         // Granularity
                    0x00000D00,         // Range Minimum
                    0x0000FFFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x0000F300,         // Length
                    0x00,, , TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x000A0000,         // Range Minimum
                    0x000BFFFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x00020000,         // Length
                    0x00,, , AddressRangeMemory, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x000C0000,         // Range Minimum
                    0x000C3FFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x00004000,         // Length
                    0x00,, _Y00, AddressRangeMemory, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x000C4000,         // Range Minimum
                    0x000C7FFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x00004000,         // Length
                    0x00,, _Y01, AddressRangeMemory, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x000C8000,         // Range Minimum
                    0x000CBFFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x00004000,         // Length
                    0x00,, _Y02, AddressRangeMemory, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x000CC000,         // Range Minimum
                    0x000CFFFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x00004000,         // Length
                    0x00,, _Y03, AddressRangeMemory, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x000D0000,         // Range Minimum
                    0x000D3FFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x00004000,         // Length
                    0x00,, _Y04, AddressRangeMemory, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x000D4000,         // Range Minimum
                    0x000D7FFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x00004000,         // Length
                    0x00,, _Y05, AddressRangeMemory, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x000D8000,         // Range Minimum
                    0x000DBFFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x00004000,         // Length
                    0x00,, _Y06, AddressRangeMemory, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x000DC000,         // Range Minimum
                    0x000DFFFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x00004000,         // Length
                    0x00,, _Y07, AddressRangeMemory, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x000E0000,         // Range Minimum
                    0x000E3FFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x00004000,         // Length
                    0x00,, _Y08, AddressRangeMemory, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x000E4000,         // Range Minimum
                    0x000E7FFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x00004000,         // Length
                    0x00,, _Y09, AddressRangeMemory, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x000E8000,         // Range Minimum
                    0x000EBFFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x00004000,         // Length
                    0x00,, _Y0A, AddressRangeMemory, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x000EC000,         // Range Minimum
                    0x000EFFFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x00004000,         // Length
                    0x00,, _Y0B, AddressRangeMemory, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x000F0000,         // Range Minimum
                    0x000FFFFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x00010000,         // Length
                    0x00,, _Y0C, AddressRangeMemory, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x00000000,         // Range Minimum
                    0xFEBFFFFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x00000000,         // Length
                    0x00,, _Y0D, AddressRangeMemory, TypeStatic)
            })
            Method (_CRS, 0, Serialized)
            {
                If (PM1L)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y00._LEN, C0LN)
                    Store (Zero, C0LN)
                }

                If (LEqual (PM1L, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y00._RW, C0RW)
                    Store (Zero, C0RW)
                }

                If (PM1H)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y01._LEN, C4LN)
                    Store (Zero, C4LN)
                }

                If (LEqual (PM1H, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y01._RW, C4RW)
                    Store (Zero, C4RW)
                }

                If (PM2L)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y02._LEN, C8LN)
                    Store (Zero, C8LN)
                }

                If (LEqual (PM2L, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y02._RW, C8RW)
                    Store (Zero, C8RW)
                }

                If (PM2H)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y03._LEN, CCLN)
                    Store (Zero, CCLN)
                }

                If (LEqual (PM2H, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y03._RW, CCRW)
                    Store (Zero, CCRW)
                }

                If (PM3L)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y04._LEN, D0LN)
                    Store (Zero, D0LN)
                }

                If (LEqual (PM3L, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y04._RW, D0RW)
                    Store (Zero, D0RW)
                }

                If (PM3H)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y05._LEN, D4LN)
                    Store (Zero, D4LN)
                }

                If (LEqual (PM3H, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y05._RW, D4RW)
                    Store (Zero, D4RW)
                }

                If (PM4L)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y06._LEN, D8LN)
                    Store (Zero, D8LN)
                }

                If (LEqual (PM4L, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y06._RW, D8RW)
                    Store (Zero, D8RW)
                }

                If (PM4H)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y07._LEN, DCLN)
                    Store (Zero, DCLN)
                }

                If (LEqual (PM4H, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y07._RW, DCRW)
                    Store (Zero, DCRW)
                }

                If (PM5L)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y08._LEN, E0LN)
                    Store (Zero, E0LN)
                }

                If (LEqual (PM5L, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y08._RW, E0RW)
                    Store (Zero, E0RW)
                }

                If (PM5H)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y09._LEN, E4LN)
                    Store (Zero, E4LN)
                }

                If (LEqual (PM5H, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y09._RW, E4RW)
                    Store (Zero, E4RW)
                }

                If (PM6L)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y0A._LEN, E8LN)
                    Store (Zero, E8LN)
                }

                If (LEqual (PM6L, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y0A._RW, E8RW)
                    Store (Zero, E8RW)
                }

                If (PM6H)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y0B._LEN, ECLN)
                    Store (Zero, ECLN)
                }

                If (LEqual (PM6H, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y0B._RW, ECRW)
                    Store (Zero, ECRW)
                }

                If (PM0H)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y0C._LEN, F0LN)
                    Store (Zero, F0LN)
                }

                If (LEqual (PM0H, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y0C._RW, F0RW)
                    Store (Zero, F0RW)
                }

                CreateDWordField (BUF0, \_SB.PCI0._Y0D._MIN, M1MN)
                CreateDWordField (BUF0, \_SB.PCI0._Y0D._MAX, M1MX)
                CreateDWordField (BUF0, \_SB.PCI0._Y0D._LEN, M1LN)
                ShiftLeft (TOUD, 0x1B, M1MN)
                Add (Subtract (M1MX, M1MN), One, M1LN)
                Return (BUF0)
            }

            Method (_PRT, 0, NotSerialized)
            {
                If (LEqual (\GPIC, Zero))
                {
                    Return (Package (0x0F)
                    {
                        Package (0x04)
                        {
                            0x0001FFFF, 
                            Zero, 
                            \_SB.PCI0.LPC.LNKA, 
                            Zero
                        }, 

                        Package (0x04)
                        {
                            0x0002FFFF, 
                            Zero, 
                            \_SB.PCI0.LPC.LNKA, 
                            Zero
                        }, 

                        Package (0x04)
                        {
                            0x001BFFFF, 
                            Zero, 
                            \_SB.PCI0.LPC.LNKH, 
                            Zero
                        }, 

                        Package (0x04)
                        {
                            0x001CFFFF, 
                            Zero, 
                            \_SB.PCI0.LPC.LNKA, 
                            Zero
                        }, 

                        Package (0x04)
                        {
                            0x001CFFFF, 
                            One, 
                            \_SB.PCI0.LPC.LNKB, 
                            Zero
                        }, 

                        Package (0x04)
                        {
                            0x001CFFFF, 
                            0x02, 
                            \_SB.PCI0.LPC.LNKC, 
                            Zero
                        }, 

                        Package (0x04)
                        {
                            0x001CFFFF, 
                            0x03, 
                            \_SB.PCI0.LPC.LNKD, 
                            Zero
                        }, 

                        Package (0x04)
                        {
                            0x001DFFFF, 
                            Zero, 
                            \_SB.PCI0.LPC.LNKG, 
                            Zero
                        }, 

                        Package (0x04)
                        {
                            0x001DFFFF, 
                            One, 
                            \_SB.PCI0.LPC.LNKB, 
                            Zero
                        }, 

                        Package (0x04)
                        {
                            0x001DFFFF, 
                            0x02, 
                            \_SB.PCI0.LPC.LNKC, 
                            Zero
                        }, 

                        Package (0x04)
                        {
                            0x001DFFFF, 
                            0x03, 
                            \_SB.PCI0.LPC.LNKD, 
                            Zero
                        }, 

                        Package (0x04)
                        {
                            0x001EFFFF, 
                            Zero, 
                            \_SB.PCI0.LPC.LNKA, 
                            Zero
                        }, 

                        Package (0x04)
                        {
                            0x001EFFFF, 
                            One, 
                            \_SB.PCI0.LPC.LNKB, 
                            Zero
                        }, 

                        Package (0x04)
                        {
                            0x001FFFFF, 
                            Zero, 
                            \_SB.PCI0.LPC.LNKA, 
                            Zero
                        }, 

                        Package (0x04)
                        {
                            0x001FFFFF, 
                            One, 
                            \_SB.PCI0.LPC.LNKB, 
                            Zero
                        }
                    })
                }
                Else
                {
                    Return (Package (0x0F)
                    {
                        Package (0x04)
                        {
                            0x0001FFFF, 
                            Zero, 
                            Zero, 
                            0x10
                        }, 

                        Package (0x04)
                        {
                            0x0002FFFF, 
                            Zero, 
                            Zero, 
                            0x10
                        }, 

                        Package (0x04)
                        {
                            0x001BFFFF, 
                            Zero, 
                            Zero, 
                            0x17
                        }, 

                        Package (0x04)
                        {
                            0x001CFFFF, 
                            Zero, 
                            Zero, 
                            0x10
                        }, 

                        Package (0x04)
                        {
                            0x001CFFFF, 
                            One, 
                            Zero, 
                            0x11
                        }, 

                        Package (0x04)
                        {
                            0x001CFFFF, 
                            0x02, 
                            Zero, 
                            0x12
                        }, 

                        Package (0x04)
                        {
                            0x001CFFFF, 
                            0x03, 
                            Zero, 
                            0x13
                        }, 

                        Package (0x04)
                        {
                            0x001DFFFF, 
                            Zero, 
                            Zero, 
                            0x16
                        }, 

                        Package (0x04)
                        {
                            0x001DFFFF, 
                            One, 
                            Zero, 
                            0x11
                        }, 

                        Package (0x04)
                        {
                            0x001DFFFF, 
                            0x02, 
                            Zero, 
                            0x12
                        }, 

                        Package (0x04)
                        {
                            0x001DFFFF, 
                            0x03, 
                            Zero, 
                            0x13
                        }, 

                        Package (0x04)
                        {
                            0x001EFFFF, 
                            Zero, 
                            Zero, 
                            0x10
                        }, 

                        Package (0x04)
                        {
                            0x001EFFFF, 
                            One, 
                            Zero, 
                            0x11
                        }, 

                        Package (0x04)
                        {
                            0x001FFFFF, 
                            Zero, 
                            Zero, 
                            0x10
                        }, 

                        Package (0x04)
                        {
                            0x001FFFFF, 
                            One, 
                            Zero, 
                            0x11
                        }
                    })
                }
            }

            Device (PEGP)
            {
                Name (_ADR, 0x00010000)
                Device (VGA0)
                {
                    Name (_ADR, Zero)
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }

                    Device (LCD)
                    {
                        Name (_ADR, 0x0110)
                        Method (_PS0, 0, NotSerialized)
                        {
                            Store (Zero, DOFF)
                            Store (Zero, HOFF)
                        }

                        Method (_PS3, 0, NotSerialized)
                        {
                            Store (One, DOFF)
                        }

                        Name (_DCS, 0x1F)
                        Name (_DGS, One)
                        Method (_DSS, 1, NotSerialized)
                        {
                            If (And (Arg0, 0x40000000))
                            {
                                If (And (Arg0, One))
                                {
                                    Store (0x1F, _DCS)
                                }
                                Else
                                {
                                    Store (0x1F, _DCS)
                                }
                            }
                            Else
                            {
                            }

                            ^^NEXT ()
                        }

                        Name (BRIG, Package (0x10)
                        {
                            0x64, 
                            0x07, 
                            0x5A, 
                            0x06, 
                            0x50, 
                            0x05, 
                            0x46, 
                            0x04, 
                            0x3C, 
                            0x03, 
                            0x32, 
                            0x02, 
                            0x1E, 
                            One, 
                            Zero, 
                            Zero
                        })
                        Name (BLST, Zero)
                        Method (_BCL, 0, NotSerialized)
                        {
                            Return (Package (0x0A)
                            {
                                0x64, 
                                0x50, 
                                Zero, 
                                0x1E, 
                                0x32, 
                                0x3C, 
                                0x46, 
                                0x50, 
                                0x5A, 
                                0x64
                            })
                        }

                        Method (_BCM, 1, NotSerialized)
                        {
                            Store (Zero, Local1)
                            While (LNotEqual (DerefOf (Index (BRIG, Local1)), Arg0))
                            {
                                Increment (Local1)
                            }

                            Add (Local1, One, Local1)
                            Store (DerefOf (Index (BRIG, Local1)), Local1)
                            Store (P66H, Local0)
                            While (LEqual (And (Local0, 0x02), 0x02))
                            {
                                Sleep (0x05)
                                Store (P66H, Local0)
                            }

                            Store (0x22, P66H)
                            Store (P66H, Local0)
                            While (LEqual (And (Local0, 0x02), 0x02))
                            {
                                Stall (One)
                                Store (P66H, Local0)
                            }

                            Store (Local1, P62H)
                            Store (Local1, BLST)
                            Notify (VGA0, 0x85)
                        }

                        Method (_BQC, 0, NotSerialized)
                        {
                            Return (BLST)
                        }
                    }

                    Device (CRT)
                    {
                        Name (_ADR, 0x0100)
                        Name (_DCS, 0x1F)
                        Name (_DGS, One)
                        Method (_DSS, 1, NotSerialized)
                        {
                            If (And (Arg0, 0x40000000))
                            {
                                If (And (Arg0, One))
                                {
                                    Store (0x1F, _DCS)
                                }
                                Else
                                {
                                    Store (0x1D, _DCS)
                                }
                            }
                            Else
                            {
                            }

                            ^^NEXT ()
                        }
                    }

                    Device (TV)
                    {
                        Name (_ADR, 0x0200)
                        Name (_DCS, 0x0D)
                        Name (_DGS, Zero)
                        Method (_DSS, 1, NotSerialized)
                        {
                            If (And (Arg0, 0x40000000))
                            {
                                If (And (Arg0, One))
                                {
                                    Store (0x1F, _DCS)
                                }
                                Else
                                {
                                    Store (0x1D, _DCS)
                                }
                            }
                            Else
                            {
                            }

                            ^^NEXT ()
                        }
                    }

                    Device (DFP1)
                    {
                        Name (_ADR, 0x0210)
                        Name (_DCS, 0x1F)
                        Name (_DGS, One)
                        Method (_DSS, 1, NotSerialized)
                        {
                            If (And (Arg0, 0x40000000))
                            {
                                If (And (Arg0, One))
                                {
                                    Store (0x1F, _DCS)
                                }
                                Else
                                {
                                    Store (0x1D, _DCS)
                                }
                            }
                            Else
                            {
                            }

                            ^^NEXT ()
                        }
                    }

                    Name (SWIT, One)
                    Name (GDGS, One)
                    Name (BGDS, One)
                    Method (INCS, 1, NotSerialized)
                    {
                        If (LEqual (Arg0, One))
                        {
                            Store (0x03, Local0)
                            Return (Local0)
                        }

                        If (LEqual (Arg0, 0x03))
                        {
                            Store (0x02, Local0)
                            Return (Local0)
                        }

                        If (LEqual (Arg0, 0x02))
                        {
                            Store (0x05, Local0)
                            Return (Local0)
                        }

                        If (LEqual (Arg0, 0x05))
                        {
                            Store (0x04, Local0)
                            Return (Local0)
                        }

                        If (LEqual (Arg0, 0x04))
                        {
                            Store (0x09, Local0)
                            Return (Local0)
                        }

                        If (LEqual (Arg0, 0x09))
                        {
                            Store (0x08, Local0)
                            Return (Local0)
                        }

                        Store (One, Local0)
                        Return (Local0)
                    }

                    Method (NEXT, 0, NotSerialized)
                    {
                        Store (GDGS, Local1)
                        Or (ShiftLeft (CRTA, One), ShiftLeft (TVAT, 0x02), Local0)
                        Or (Local0, ShiftLeft (DFPA, 0x03), Local0)
                        Or (Local0, One, Local0)
                        Store (Zero, Local2)
                        While (LNot (Local2))
                        {
                            Store (INCS (Local1), Local1)
                            Store (LGreater (And (Local1, Local0), One), Local2)
                            Or (Local2, LEqual (Local1, One), Local2)
                        }

                        Store (Local1, GDGS)
                        And (GDGS, One, ^LCD._DGS)
                        ShiftRight (And (GDGS, 0x02), One, ^CRT._DGS)
                        ShiftRight (And (GDGS, 0x04), 0x02, ^TV._DGS)
                        ShiftRight (And (GDGS, 0x08), 0x03, ^DFP1._DGS)
                    }

                    Method (PCHG, 0, NotSerialized)
                    {
                        If (HOFF)
                        {
                            Store (GDGS, BGDS)
                            Store (One, GDGS)
                        }
                        Else
                        {
                            Store (BGDS, GDGS)
                        }

                        Store (0x0D, Local0)
                        Or (Local0, 0x02, Local0)
                        Or (Local0, ShiftLeft (LCAT, 0x04), Local0)
                        Store (Local0, ^LCD._DCS)
                        Store (0x0D, Local0)
                        Or (Local0, ShiftRight (And (GDGS, 0x02), Zero), Local0)
                        Or (Local0, ShiftLeft (CRTA, 0x04), Local0)
                        Store (Local0, ^CRT._DCS)
                        Store (0x0D, Local0)
                        Or (Local0, ShiftRight (And (GDGS, 0x04), One), Local0)
                        Or (Local0, ShiftLeft (TVAT, 0x04), Local0)
                        Store (Local0, ^TV._DCS)
                        Store (0x0D, Local0)
                        Or (Local0, ShiftRight (And (GDGS, 0x08), 0x02), Local0)
                        Or (Local0, ShiftLeft (DFPA, 0x04), Local0)
                        Store (Local0, ^DFP1._DCS)
                        And (GDGS, One, ^LCD._DGS)
                        ShiftRight (And (GDGS, 0x02), One, ^CRT._DGS)
                        ShiftRight (And (GDGS, 0x04), 0x02, ^TV._DGS)
                        ShiftRight (And (GDGS, 0x08), 0x03, ^DFP1._DGS)
                    }

                    Method (GDCS, 0, NotSerialized)
                    {
                        Store (0x0D, Local0)
                        Or (Local0, ShiftLeft (LCDO, One), Local0)
                        Or (Local0, ShiftLeft (LCAT, 0x04), Local0)
                        Store (Local0, ^LCD._DCS)
                        Store (0x0D, Local0)
                        Or (Local0, ShiftLeft (CRTO, One), Local0)
                        Or (Local0, ShiftLeft (CRTA, 0x04), Local0)
                        Store (Local0, ^CRT._DCS)
                        Store (0x0D, Local0)
                        Or (Local0, ShiftLeft (TVON, One), Local0)
                        Or (Local0, ShiftLeft (TVAT, 0x04), Local0)
                        Store (Local0, ^TV._DCS)
                        Store (0x0D, Local0)
                        Or (Local0, ShiftLeft (DFPO, One), Local0)
                        Or (Local0, ShiftLeft (DFPA, 0x04), Local0)
                        Store (Local0, ^DFP1._DCS)
                    }

                    Method (_DOS, 1, NotSerialized)
                    {
                        And (Arg0, 0x03, SWIT)
                        If (LEqual (SWIT, One))
                        {
                            Store (Zero, SWTF)
                        }
                        Else
                        {
                            Store (One, SWTF)
                        }
                    }

                    Name (_DOD, Package (0x04)
                    {
                        0x00010100, 
                        0x00010110, 
                        0x00010200, 
                        0x00010210
                    })
                }

                Method (_PRT, 0, NotSerialized)
                {
                    If (LEqual (\GPIC, Zero))
                    {
                        Return (Package (0x01)
                        {
                            Package (0x04)
                            {
                                0xFFFF, 
                                Zero, 
                                \_SB.PCI0.LPC.LNKA, 
                                Zero
                            }
                        })
                    }
                    Else
                    {
                        Return (Package (0x01)
                        {
                            Package (0x04)
                            {
                                0xFFFF, 
                                Zero, 
                                Zero, 
                                0x10
                            }
                        })
                    }
                }
            }

            Device (P32)
            {
                Name (_ADR, 0x001E0000)
                Device (LANC)
                {
                    Name (_ADR, 0x00080000)
                    Name (_PRW, Package (0x02)
                    {
                        0x0B, 
                        0x03
                    })
                }

                Device (CRDR)
                {
                    Name (_ADR, 0x00050000)
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x1B)
                    }
                }

                Method (_PRT, 0, NotSerialized)
                {
                    If (LEqual (\GPIC, Zero))
                    {
                        Return (Package (0x06)
                        {
                            Package (0x04)
                            {
                                0x0002FFFF, 
                                Zero, 
                                \_SB.PCI0.LPC.LNKA, 
                                Zero
                            }, 

                            Package (0x04)
                            {
                                0x0002FFFF, 
                                One, 
                                \_SB.PCI0.LPC.LNKB, 
                                Zero
                            }, 

                            Package (0x04)
                            {
                                0x0005FFFF, 
                                Zero, 
                                \_SB.PCI0.LPC.LNKA, 
                                Zero
                            }, 

                            Package (0x04)
                            {
                                0x0005FFFF, 
                                One, 
                                \_SB.PCI0.LPC.LNKB, 
                                Zero
                            }, 

                            Package (0x04)
                            {
                                0x0005FFFF, 
                                0x02, 
                                \_SB.PCI0.LPC.LNKC, 
                                Zero
                            }, 

                            Package (0x04)
                            {
                                0x0008FFFF, 
                                Zero, 
                                \_SB.PCI0.LPC.LNKE, 
                                Zero
                            }
                        })
                    }
                    Else
                    {
                        Return (Package (0x07)
                        {
                            Package (0x04)
                            {
                                0x0002FFFF, 
                                Zero, 
                                Zero, 
                                0x10
                            }, 

                            Package (0x04)
                            {
                                0x0002FFFF, 
                                One, 
                                Zero, 
                                0x10
                            }, 

                            Package (0x04)
                            {
                                0x0005FFFF, 
                                Zero, 
                                Zero, 
                                0x10
                            }, 

                            Package (0x04)
                            {
                                0x0005FFFF, 
                                One, 
                                Zero, 
                                0x11
                            }, 

                            Package (0x04)
                            {
                                0x0005FFFF, 
                                0x02, 
                                Zero, 
                                0x12
                            }, 

                            Package (0x04)
                            {
                                0x0005FFFF, 
                                0x03, 
                                Zero, 
                                0x13
                            }, 

                            Package (0x04)
                            {
                                0x0008FFFF, 
                                Zero, 
                                Zero, 
                                0x14
                            }
                        })
                    }
                }
            }

            Device (LPC)
            {
                Name (_ADR, 0x001F0000)
                OperationRegion (PRR0, PCI_Config, 0x60, 0x04)
                Field (PRR0, AnyAcc, NoLock, Preserve)
                {
                    PIRA,   8, 
                    PIRB,   8, 
                    PIRC,   8, 
                    PIRD,   8
                }

                OperationRegion (PRR1, PCI_Config, 0x68, 0x04)
                Field (PRR1, AnyAcc, NoLock, Preserve)
                {
                    PIRE,   8, 
                    PIRF,   8, 
                    PIRG,   8, 
                    PIRH,   8
                }

                OperationRegion (PRR2, PCI_Config, 0x80, 0x02)
                Field (PRR2, AnyAcc, NoLock, Preserve)
                {
                    IODL,   8, 
                    IODH,   8
                }

                Device (LNKA)
                {
                    Name (_HID, EisaId ("PNP0C0F"))
                    Name (_UID, One)
                    Method (_STA, 0, NotSerialized)
                    {
                        If (And (PIRA, 0x80))
                        {
                            Return (0x09)
                        }
                        Else
                        {
                            Return (0x0B)
                        }
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        Or (PIRA, 0x80, PIRA)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Name (BUF0, ResourceTemplate ()
                        {
                            IRQ (Level, ActiveLow, Shared, )
                                {0}
                        })
                        CreateWordField (BUF0, One, IRQW)
                        If (And (PIRA, 0x80))
                        {
                            Store (Zero, Local0)
                        }
                        Else
                        {
                            Store (One, Local0)
                        }

                        ShiftLeft (Local0, And (PIRA, 0x0F), IRQW)
                        Return (BUF0)
                    }

                    Name (_PRS, ResourceTemplate ()
                    {
                        IRQ (Level, ActiveLow, Shared, )
                            {3,4,5,7,9,10,11,12}
                    })
                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, One, IRQW)
                        FindSetRightBit (IRQW, Local0)
                        If (LNotEqual (IRQW, Zero))
                        {
                            And (Local0, 0x7F, Local0)
                            Decrement (Local0)
                        }
                        Else
                        {
                            Or (Local0, 0x80, Local0)
                        }

                        Store (Local0, PIRA)
                    }
                }

                Device (LNKB)
                {
                    Name (_HID, EisaId ("PNP0C0F"))
                    Name (_UID, 0x02)
                    Method (_STA, 0, NotSerialized)
                    {
                        If (And (PIRB, 0x80))
                        {
                            Return (0x09)
                        }
                        Else
                        {
                            Return (0x0B)
                        }
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        Or (PIRB, 0x80, PIRB)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Name (BUF0, ResourceTemplate ()
                        {
                            IRQ (Level, ActiveLow, Shared, )
                                {0}
                        })
                        CreateWordField (BUF0, One, IRQW)
                        If (And (PIRB, 0x80))
                        {
                            Store (Zero, Local0)
                        }
                        Else
                        {
                            Store (One, Local0)
                        }

                        ShiftLeft (Local0, And (PIRB, 0x0F), IRQW)
                        Return (BUF0)
                    }

                    Name (_PRS, ResourceTemplate ()
                    {
                        IRQ (Level, ActiveLow, Shared, )
                            {3,4,5,7,9,10,11,12}
                    })
                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, One, IRQW)
                        FindSetRightBit (IRQW, Local0)
                        If (LNotEqual (IRQW, Zero))
                        {
                            And (Local0, 0x7F, Local0)
                            Decrement (Local0)
                        }
                        Else
                        {
                            Or (Local0, 0x80, Local0)
                        }

                        Store (Local0, PIRB)
                    }
                }

                Device (LNKC)
                {
                    Name (_HID, EisaId ("PNP0C0F"))
                    Name (_UID, 0x03)
                    Method (_STA, 0, NotSerialized)
                    {
                        If (And (PIRC, 0x80))
                        {
                            Return (0x09)
                        }
                        Else
                        {
                            Return (0x0B)
                        }
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        Or (PIRC, 0x80, PIRC)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Name (BUF0, ResourceTemplate ()
                        {
                            IRQ (Level, ActiveLow, Shared, )
                                {0}
                        })
                        CreateWordField (BUF0, One, IRQW)
                        If (And (PIRC, 0x80))
                        {
                            Store (Zero, Local0)
                        }
                        Else
                        {
                            Store (One, Local0)
                        }

                        ShiftLeft (Local0, And (PIRC, 0x0F), IRQW)
                        Return (BUF0)
                    }

                    Name (_PRS, ResourceTemplate ()
                    {
                        IRQ (Level, ActiveLow, Shared, )
                            {3,4,5,7,9,10,11,12}
                    })
                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, One, IRQW)
                        FindSetRightBit (IRQW, Local0)
                        If (LNotEqual (IRQW, Zero))
                        {
                            And (Local0, 0x7F, Local0)
                            Decrement (Local0)
                        }
                        Else
                        {
                            Or (Local0, 0x80, Local0)
                        }

                        Store (Local0, PIRC)
                    }
                }

                Device (LNKD)
                {
                    Name (_HID, EisaId ("PNP0C0F"))
                    Name (_UID, 0x04)
                    Method (_STA, 0, NotSerialized)
                    {
                        If (And (PIRD, 0x80))
                        {
                            Return (0x09)
                        }
                        Else
                        {
                            Return (0x0B)
                        }
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        Or (PIRD, 0x80, PIRD)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Name (BUF0, ResourceTemplate ()
                        {
                            IRQ (Level, ActiveLow, Shared, )
                                {0}
                        })
                        CreateWordField (BUF0, One, IRQW)
                        If (And (PIRD, 0x80))
                        {
                            Store (Zero, Local0)
                        }
                        Else
                        {
                            Store (One, Local0)
                        }

                        ShiftLeft (Local0, And (PIRD, 0x0F), IRQW)
                        Return (BUF0)
                    }

                    Name (_PRS, ResourceTemplate ()
                    {
                        IRQ (Level, ActiveLow, Shared, )
                            {3,4,5,7,9,10,11,12}
                    })
                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, One, IRQW)
                        FindSetRightBit (IRQW, Local0)
                        If (LNotEqual (IRQW, Zero))
                        {
                            And (Local0, 0x7F, Local0)
                            Decrement (Local0)
                        }
                        Else
                        {
                            Or (Local0, 0x80, Local0)
                        }

                        Store (Local0, PIRD)
                    }
                }

                Device (LNKE)
                {
                    Name (_HID, EisaId ("PNP0C0F"))
                    Name (_UID, 0x05)
                    Method (_STA, 0, NotSerialized)
                    {
                        If (And (PIRE, 0x80))
                        {
                            Return (0x09)
                        }
                        Else
                        {
                            Return (0x0B)
                        }
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        Or (PIRE, 0x80, PIRE)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Name (BUF0, ResourceTemplate ()
                        {
                            IRQ (Level, ActiveLow, Shared, )
                                {0}
                        })
                        CreateWordField (BUF0, One, IRQW)
                        If (And (PIRE, 0x80))
                        {
                            Store (Zero, Local0)
                        }
                        Else
                        {
                            Store (One, Local0)
                        }

                        ShiftLeft (Local0, And (PIRE, 0x0F), IRQW)
                        Return (BUF0)
                    }

                    Name (_PRS, ResourceTemplate ()
                    {
                        IRQ (Level, ActiveLow, Shared, )
                            {3,4,5,7,9,10,11,12}
                    })
                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, One, IRQW)
                        FindSetRightBit (IRQW, Local0)
                        If (LNotEqual (IRQW, Zero))
                        {
                            And (Local0, 0x7F, Local0)
                            Decrement (Local0)
                        }
                        Else
                        {
                            Or (Local0, 0x80, Local0)
                        }

                        Store (Local0, PIRE)
                    }
                }

                Device (LNKF)
                {
                    Name (_HID, EisaId ("PNP0C0F"))
                    Name (_UID, 0x06)
                    Method (_STA, 0, NotSerialized)
                    {
                        If (And (PIRF, 0x80))
                        {
                            Return (0x09)
                        }
                        Else
                        {
                            Return (0x0B)
                        }
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        Or (PIRF, 0x80, PIRF)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Name (BUF0, ResourceTemplate ()
                        {
                            IRQ (Level, ActiveLow, Shared, )
                                {0}
                        })
                        CreateWordField (BUF0, One, IRQW)
                        If (And (PIRF, 0x80))
                        {
                            Store (Zero, Local0)
                        }
                        Else
                        {
                            Store (One, Local0)
                        }

                        ShiftLeft (Local0, And (PIRF, 0x0F), IRQW)
                        Return (BUF0)
                    }

                    Name (_PRS, ResourceTemplate ()
                    {
                        IRQ (Level, ActiveLow, Shared, )
                            {3,4,5,7,9,10,11,12}
                    })
                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, One, IRQW)
                        FindSetRightBit (IRQW, Local0)
                        If (LNotEqual (IRQW, Zero))
                        {
                            And (Local0, 0x7F, Local0)
                            Decrement (Local0)
                        }
                        Else
                        {
                            Or (Local0, 0x80, Local0)
                        }

                        Store (Local0, PIRF)
                    }
                }

                Device (LNKG)
                {
                    Name (_HID, EisaId ("PNP0C0F"))
                    Name (_UID, 0x07)
                    Method (_STA, 0, NotSerialized)
                    {
                        If (And (PIRG, 0x80))
                        {
                            Return (0x09)
                        }
                        Else
                        {
                            Return (0x0B)
                        }
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        Or (PIRG, 0x80, PIRG)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Name (BUF0, ResourceTemplate ()
                        {
                            IRQ (Level, ActiveLow, Shared, )
                                {0}
                        })
                        CreateWordField (BUF0, One, IRQW)
                        If (And (PIRG, 0x80))
                        {
                            Store (Zero, Local0)
                        }
                        Else
                        {
                            Store (One, Local0)
                        }

                        ShiftLeft (Local0, And (PIRG, 0x0F), IRQW)
                        Return (BUF0)
                    }

                    Name (_PRS, ResourceTemplate ()
                    {
                        IRQ (Level, ActiveLow, Shared, )
                            {3,4,5,7,9,10,11,12}
                    })
                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, One, IRQW)
                        FindSetRightBit (IRQW, Local0)
                        If (LNotEqual (IRQW, Zero))
                        {
                            And (Local0, 0x7F, Local0)
                            Decrement (Local0)
                        }
                        Else
                        {
                            Or (Local0, 0x80, Local0)
                        }

                        Store (Local0, PIRG)
                    }
                }

                Device (LNKH)
                {
                    Name (_HID, EisaId ("PNP0C0F"))
                    Name (_UID, 0x08)
                    Method (_STA, 0, NotSerialized)
                    {
                        If (And (PIRH, 0x80))
                        {
                            Return (0x09)
                        }
                        Else
                        {
                            Return (0x0B)
                        }
                    }

                    Method (_DIS, 0, NotSerialized)
                    {
                        Or (PIRH, 0x80, PIRH)
                    }

                    Method (_CRS, 0, NotSerialized)
                    {
                        Name (BUF0, ResourceTemplate ()
                        {
                            IRQ (Level, ActiveLow, Shared, )
                                {0}
                        })
                        CreateWordField (BUF0, One, IRQW)
                        If (And (PIRH, 0x80))
                        {
                            Store (Zero, Local0)
                        }
                        Else
                        {
                            Store (One, Local0)
                        }

                        ShiftLeft (Local0, And (PIRH, 0x0F), IRQW)
                        Return (BUF0)
                    }

                    Name (_PRS, ResourceTemplate ()
                    {
                        IRQ (Level, ActiveLow, Shared, )
                            {3,4,5,7,9,10,11,12}
                    })
                    Method (_SRS, 1, NotSerialized)
                    {
                        CreateWordField (Arg0, One, IRQW)
                        FindSetRightBit (IRQW, Local0)
                        If (LNotEqual (IRQW, Zero))
                        {
                            And (Local0, 0x7F, Local0)
                            Decrement (Local0)
                        }
                        Else
                        {
                            Or (Local0, 0x80, Local0)
                        }

                        Store (Local0, PIRH)
                    }
                }

                Device (SYSR)
                {
                    Name (_HID, EisaId ("PNP0C02"))
                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x164E,             // Range Minimum
                            0x164E,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x002E,             // Range Minimum
                            0x002E,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x004E,             // Range Minimum
                            0x004E,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x0061,             // Range Minimum
                            0x0061,             // Range Maximum
                            0x01,               // Alignment
                            0x01,               // Length
                            )
                        IO (Decode16,
                            0x0070,             // Range Minimum
                            0x0070,             // Range Maximum
                            0x01,               // Alignment
                            0x01,               // Length
                            )
                        IO (Decode16,
                            0x0080,             // Range Minimum
                            0x0080,             // Range Maximum
                            0x01,               // Alignment
                            0x01,               // Length
                            )
                        IO (Decode16,
                            0x0092,             // Range Minimum
                            0x0092,             // Range Maximum
                            0x01,               // Alignment
                            0x01,               // Length
                            )
                        IO (Decode16,
                            0x00B2,             // Range Minimum
                            0x00B2,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x0063,             // Range Minimum
                            0x0063,             // Range Maximum
                            0x01,               // Alignment
                            0x01,               // Length
                            )
                        IO (Decode16,
                            0x0065,             // Range Minimum
                            0x0065,             // Range Maximum
                            0x01,               // Alignment
                            0x01,               // Length
                            )
                        IO (Decode16,
                            0x0067,             // Range Minimum
                            0x0067,             // Range Maximum
                            0x01,               // Alignment
                            0x01,               // Length
                            )
                        IO (Decode16,
                            0x0600,             // Range Minimum
                            0x0600,             // Range Maximum
                            0x01,               // Alignment
                            0x10,               // Length
                            )
                        IO (Decode16,
                            0x0610,             // Range Minimum
                            0x0610,             // Range Maximum
                            0x01,               // Alignment
                            0x01,               // Length
                            )
                        IO (Decode16,
                            0x0800,             // Range Minimum
                            0x0800,             // Range Maximum
                            0x01,               // Alignment
                            0x10,               // Length
                            )
                        IO (Decode16,
                            0x0400,             // Range Minimum
                            0x0400,             // Range Maximum
                            0x01,               // Alignment
                            0x80,               // Length
                            )
                        IO (Decode16,
                            0x0500,             // Range Minimum
                            0x0500,             // Range Maximum
                            0x01,               // Alignment
                            0x40,               // Length
                            )
                        IO (Decode16,
                            0x0378,             // Range Minimum
                            0x0378,             // Range Maximum
                            0x01,               // Alignment
                            0x08,               // Length
                            )
                        IO (Decode16,
                            0x0778,             // Range Minimum
                            0x0778,             // Range Maximum
                            0x01,               // Alignment
                            0x08,               // Length
                            )
                        Memory32Fixed (ReadWrite,
                            0xE0000000,         // Address Base
                            0x10000000,         // Address Length
                            )
                        Memory32Fixed (ReadWrite,
                            0xFED1C000,         // Address Base
                            0x00004000,         // Address Length
                            )
                        Memory32Fixed (ReadWrite,
                            0xFED14000,         // Address Base
                            0x00004000,         // Address Length
                            )
                        Memory32Fixed (ReadWrite,
                            0xFED18000,         // Address Base
                            0x00001000,         // Address Length
                            )
                        Memory32Fixed (ReadWrite,
                            0xFED19000,         // Address Base
                            0x00001000,         // Address Length
                            )
                        Memory32Fixed (ReadWrite,
                            0xFEC00000,         // Address Base
                            0x00001000,         // Address Length
                            )
                        Memory32Fixed (ReadWrite,
                            0xFEE00000,         // Address Base
                            0x00001000,         // Address Length
                            )
                    })
                }

                Device (DMAC)
                {
                    Name (_HID, EisaId ("PNP0200"))
                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0000,             // Range Minimum
                            0x0000,             // Range Maximum
                            0x01,               // Alignment
                            0x20,               // Length
                            )
                        IO (Decode16,
                            0x0081,             // Range Minimum
                            0x0081,             // Range Maximum
                            0x01,               // Alignment
                            0x11,               // Length
                            )
                        IO (Decode16,
                            0x0093,             // Range Minimum
                            0x0093,             // Range Maximum
                            0x01,               // Alignment
                            0x0D,               // Length
                            )
                        IO (Decode16,
                            0x00C0,             // Range Minimum
                            0x00C0,             // Range Maximum
                            0x01,               // Alignment
                            0x20,               // Length
                            )
                        DMA (Compatibility, NotBusMaster, Transfer8_16, )
                            {4}
                    })
                }

                Device (RTC)
                {
                    Name (_HID, EisaId ("PNP0B00"))
                    Name (BUF0, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0070,             // Range Minimum
                            0x0070,             // Range Maximum
                            0x01,               // Alignment
                            0x08,               // Length
                            )
                    })
                    Name (BUF1, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0070,             // Range Minimum
                            0x0070,             // Range Maximum
                            0x01,               // Alignment
                            0x08,               // Length
                            )
                        IRQNoFlags ()
                            {8}
                    })
                    Method (_CRS, 0, Serialized)
                    {
                        If (LEqual (HPTS, One))
                        {
                            Return (BUF0)
                        }
                        Else
                        {
                            Return (BUF1)
                        }
                    }
                }

                Device (HPET)
                {
                    Name (_HID, EisaId ("PNP0103"))
                    Name (BUF0, ResourceTemplate ()
                    {
                        IRQNoFlags ()
                            {0}
                        IRQNoFlags ()
                            {8}
                        Memory32Fixed (ReadOnly,
                            0xFED00000,         // Address Base
                            0x00000400,         // Address Length
                            _Y0E)
                    })
                    Method (_STA, 0, NotSerialized)
                    {
                        If (LEqual (CKOS (), 0x04))
                        {
                            If (LEqual (HPTS, One))
                            {
                                Return (0x0F)
                            }
                            Else
                            {
                                Return (Zero)
                            }
                        }
                        Else
                        {
                            If (HPTS)
                            {
                                Return (0x0B)
                            }
                            Else
                            {
                                Return (Zero)
                            }
                        }
                    }

                    Method (_CRS, 0, Serialized)
                    {
                        If (LEqual (HPTS, One))
                        {
                            CreateDWordField (BUF0, \_SB.PCI0.LPC.HPET._Y0E._BAS, HPT0)
                            If (LEqual (HPTA, One))
                            {
                                Store (0xFED01000, HPT0)
                            }

                            If (LEqual (HPTA, 0x02))
                            {
                                Store (0xFED02000, HPT0)
                            }

                            If (LEqual (HPTA, 0x03))
                            {
                                Store (0xFED03000, HPT0)
                            }
                        }

                        Return (BUF0)
                    }
                }

                Device (PIC)
                {
                    Name (_HID, EisaId ("PNP0000"))
                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0020,             // Range Minimum
                            0x0020,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x0024,             // Range Minimum
                            0x0024,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x0028,             // Range Minimum
                            0x0028,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x002C,             // Range Minimum
                            0x002C,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x0030,             // Range Minimum
                            0x0030,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x0034,             // Range Minimum
                            0x0034,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x0038,             // Range Minimum
                            0x0038,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x003C,             // Range Minimum
                            0x003C,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x00A0,             // Range Minimum
                            0x00A0,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x00A4,             // Range Minimum
                            0x00A4,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x00A8,             // Range Minimum
                            0x00A8,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x00AC,             // Range Minimum
                            0x00AC,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x00B0,             // Range Minimum
                            0x00B0,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x00B4,             // Range Minimum
                            0x00B4,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x00B8,             // Range Minimum
                            0x00B8,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x00BC,             // Range Minimum
                            0x00BC,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x04D0,             // Range Minimum
                            0x04D0,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IRQNoFlags ()
                            {2}
                    })
                }

                Device (FPU)
                {
                    Name (_HID, EisaId ("PNP0C04"))
                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x00F0,             // Range Minimum
                            0x00F0,             // Range Maximum
                            0x01,               // Alignment
                            0x01,               // Length
                            )
                        IRQNoFlags ()
                            {13}
                    })
                }

                Device (TIMR)
                {
                    Name (_HID, EisaId ("PNP0100"))
                    Name (BUF0, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0040,             // Range Minimum
                            0x0040,             // Range Maximum
                            0x01,               // Alignment
                            0x04,               // Length
                            )
                        IO (Decode16,
                            0x0050,             // Range Minimum
                            0x0050,             // Range Maximum
                            0x10,               // Alignment
                            0x04,               // Length
                            )
                    })
                    Name (BUF1, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0040,             // Range Minimum
                            0x0040,             // Range Maximum
                            0x01,               // Alignment
                            0x04,               // Length
                            )
                        IO (Decode16,
                            0x0050,             // Range Minimum
                            0x0050,             // Range Maximum
                            0x10,               // Alignment
                            0x04,               // Length
                            )
                        IRQNoFlags ()
                            {0}
                    })
                    Method (_CRS, 0, Serialized)
                    {
                        If (HPTS)
                        {
                            Return (BUF0)
                        }

                        Return (BUF1)
                    }
                }

                Device (FWHD)
                {
                    Name (_HID, EisaId ("INT0800"))
                    Name (_CRS, ResourceTemplate ()
                    {
                        Memory32Fixed (ReadOnly,
                            0xFF800000,         // Address Base
                            0x00800000,         // Address Length
                            )
                    })
                }

                Device (KBC)
                {
                    Name (_HID, EisaId ("PNP0303"))
                    Name (_CRS, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0060,             // Range Minimum
                            0x0060,             // Range Maximum
                            0x01,               // Alignment
                            0x01,               // Length
                            )
                        IO (Decode16,
                            0x0064,             // Range Minimum
                            0x0064,             // Range Maximum
                            0x01,               // Alignment
                            0x01,               // Length
                            )
                        IRQ (Edge, ActiveHigh, Exclusive, )
                            {1}
                    })
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }
                }

                Device (MCIR)
                {
                    Name (_HID, EisaId ("MTC0301"))
                }

                Device (MOUE)
                {
                    Name (_CID, Package (0x02)
                    {
                        EisaId ("SYN0C00"), 
                        EisaId ("PNP0F13")
                    })
                    Name (_HID, EisaId ("SYN0C0A"))
                    Name (_CRS, ResourceTemplate ()
                    {
                        IRQ (Edge, ActiveHigh, Exclusive, )
                            {12}
                    })
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }
                }

                Device (EC0)
                {
                    Name (_HID, EisaId ("PNP0C09"))
                    Name (_UID, One)
                    Method (_CRS, 0, NotSerialized)
                    {
                        Name (BFFR, ResourceTemplate ()
                        {
                            IO (Decode16,
                                0x0062,             // Range Minimum
                                0x0062,             // Range Maximum
                                0x00,               // Alignment
                                0x01,               // Length
                                )
                            IO (Decode16,
                                0x0066,             // Range Minimum
                                0x0066,             // Range Maximum
                                0x00,               // Alignment
                                0x01,               // Length
                                )
                        })
                        Store (One, REC)
                        Return (BFFR)
                    }

                    Name (_GPE, 0x17)
                    Method (_STA, 0, NotSerialized)
                    {
                        Return (0x0F)
                    }

                    OperationRegion (RAM, EmbeddedControl, Zero, 0x37)
                    Field (RAM, ByteAcc, NoLock, Preserve)
                    {
                        MODE,   1, 
                        FAN,    1, 
                        LIDS,   1, 
                        LSW0,   1, 
                        BTYP,   1, 
                        MWKE,   1, 
                        ADP,    1, 
                        BAT,    1, 
                        SLPT,   3, 
                        CHRG,   1, 
                        RI_W,   1, 
                        KB_W,   1, 
                        BATW,   1, 
                        PMEW,   1, 
                        BDC0,   16, 
                        BFC0,   16, 
                        BDV0,   16, 
                        BPR0,   16, 
                        BRC0,   16, 
                        BPV0,   16, 
                        BTP0,   16, 
                                Offset (0x31), 
                        CTMP,   8, 
                                Offset (0x36), 
                        CRTT,   8
                    }

                    Method (_Q01, 0, NotSerialized)
                    {
                        Notify (\_PR.CPU0, 0x80)
                        If (\_SB.PCI0.LPC.EC0.ADP)
                        {
                            Store (One, \_SB.AC.ACST)
                            Notify (\_SB.AC, Zero)
                        }
                        Else
                        {
                            Store (Zero, \_SB.AC.ACST)
                            Notify (\_SB.AC, 0x80)
                            Notify (\_SB.BAT0, 0x80)
                        }
                    }

                    Method (_Q02, 0, NotSerialized)
                    {
                        If (\_SB.PCI0.LPC.EC0.BAT)
                        {
                            Notify (\_SB.BAT0, Zero)
                            Notify (\_SB.AC, 0x80)
                        }
                        Else
                        {
                            Notify (\_SB.AC, 0x80)
                            Notify (\_SB.BAT0, One)
                        }
                    }

                    Method (_Q05, 0, NotSerialized)
                    {
                        Notify (\_SB.SLPB, 0x80)
                    }

                    Method (_Q07, 0, NotSerialized)
                    {
                        Notify (\_SB.LID0, 0x80)
                    }

                    Method (_Q09, 0, NotSerialized)
                    {
                        Notify (\_SB.BAT0, 0x80)
                    }

                    Method (_Q0A, 0, NotSerialized)
                    {
                        Store (0x0100, OSSD)
                        Notify (\_TZ.TZ0, 0x80)
                    }

                    Method (_Q23, 0, NotSerialized)
                    {
                        Notify (\_SB.PCI0.PEGP.VGA0.LCD, 0x87)
                    }

                    Method (_Q24, 0, NotSerialized)
                    {
                        Notify (\_SB.PCI0.PEGP.VGA0.LCD, 0x86)
                    }

                    Name (DFLG, Zero)
                    Method (_Q30, 0, NotSerialized)
                    {
                        SMIR (0xB0, 0x61)
                        If (LEqual (\_SB.PCI0.PEGP.VGA0.SWIT, Zero))
                        {
                            If (And (DFLG, One))
                            {
                                Store (One, CRTA)
                            }

                            If (And (DFLG, 0x04))
                            {
                                Store (One, DFPA)
                            }

                            \_SB.PCI0.PEGP.VGA0.GDCS ()
                            Or (ShiftLeft (CRTO, One), ShiftLeft (TVON, 0x02), Local0)
                            Or (Local0, ShiftLeft (DFPO, 0x03), Local0)
                            Or (Local0, ShiftLeft (LCDO, Zero), \_SB.PCI0.PEGP.VGA0.GDGS)
                            Store (\_SB.PCI0.PEGP.VGA0.GDGS, Local0)
                            \_SB.PCI0.PEGP.VGA0.NEXT ()
                            If (LNotEqual (Local0, \_SB.PCI0.PEGP.VGA0.GDGS))
                            {
                                Notify (\_SB.PCI0.PEGP.VGA0, 0x80)
                            }
                        }
                    }

                    Method (_Q31, 0, NotSerialized)
                    {
                        Or (One, DFLG, DFLG)
                        Sleep (0x0100)
                        Store (One, CRTA)
                        Store (One, CRTO)
                        Store (0x1F, \_SB.PCI0.PEGP.VGA0.CRT._DCS)
                        Store (One, \_SB.PCI0.PEGP.VGA0.CRT._DGS)
                        Store (One, \_SB.PCI0.PEGP.VGA0.LCD._DGS)
                        Store (Zero, \_SB.PCI0.PEGP.VGA0.DFP1._DGS)
                        Notify (\_SB.PCI0.PEGP.VGA0, 0x80)
                    }

                    Method (_Q32, 0, NotSerialized)
                    {
                        And (0x0E, DFLG, DFLG)
                        Sleep (0x0100)
                        Store (Zero, CRTA)
                        Store (Zero, CRTO)
                        Store (Zero, \_SB.PCI0.PEGP.VGA0.CRT._DCS)
                        If (LEqual (DFPA, One))
                        {
                            Store (One, \_SB.PCI0.PEGP.VGA0.DFP1._DGS)
                            Store (0x1F, \_SB.PCI0.PEGP.VGA0.CRT._DCS)
                        }

                        Store (One, \_SB.PCI0.PEGP.VGA0.LCD._DGS)
                        Store (0x1F, \_SB.PCI0.PEGP.VGA0.LCD._DCS)
                        Notify (\_SB.PCI0.PEGP.VGA0, 0x80)
                    }

                    Method (_Q33, 0, NotSerialized)
                    {
                        Or (0x04, DFLG, DFLG)
                        Sleep (0x0100)
                        Store (One, DFPA)
                        Store (One, DFPO)
                        Store (0x1F, \_SB.PCI0.PEGP.VGA0.DFP1._DCS)
                        Store (One, \_SB.PCI0.PEGP.VGA0.DFP1._DGS)
                        Store (One, \_SB.PCI0.PEGP.VGA0.LCD._DGS)
                        Store (Zero, \_SB.PCI0.PEGP.VGA0.CRT._DGS)
                        Notify (\_SB.PCI0.PEGP.VGA0, 0x80)
                    }

                    Method (_Q34, 0, NotSerialized)
                    {
                        And (0x0B, DFLG, DFLG)
                        Sleep (0x0100)
                        Store (Zero, DFPA)
                        Store (Zero, DFPO)
                        Store (Zero, \_SB.PCI0.PEGP.VGA0.DFP1._DCS)
                        If (LEqual (CRTA, One))
                        {
                            Store (One, \_SB.PCI0.PEGP.VGA0.CRT._DGS)
                            Store (0x1F, \_SB.PCI0.PEGP.VGA0.CRT._DCS)
                        }

                        Store (One, \_SB.PCI0.PEGP.VGA0.LCD._DGS)
                        Store (0x1F, \_SB.PCI0.PEGP.VGA0.LCD._DCS)
                        Notify (\_SB.PCI0.PEGP.VGA0, 0x80)
                    }
                }
            }

            Device (UHC1)
            {
                Name (_ADR, 0x001D0000)
                Name (_PRW, Package (0x02)
                {
                    0x03, 
                    0x03
                })
                OperationRegion (USBR, PCI_Config, 0xC4, One)
                Field (USBR, AnyAcc, NoLock, Preserve)
                {
                    URES,   8
                }

                Method (_PSW, 1, NotSerialized)
                {
                    If (LEqual (Arg0, Zero))
                    {
                        Store (Zero, URES)
                    }

                    If (LEqual (Arg0, One))
                    {
                        Store (0x03, URES)
                    }
                }
            }

            Device (UHC2)
            {
                Name (_ADR, 0x001D0001)
                Name (_PRW, Package (0x02)
                {
                    0x04, 
                    0x03
                })
                OperationRegion (USBR, PCI_Config, 0xC4, One)
                Field (USBR, AnyAcc, NoLock, Preserve)
                {
                    URES,   8
                }

                Method (_PSW, 1, NotSerialized)
                {
                    If (LEqual (Arg0, Zero))
                    {
                        Store (Zero, URES)
                    }

                    If (LEqual (Arg0, One))
                    {
                        Store (0x03, URES)
                    }
                }
            }

            Device (UHC3)
            {
                Name (_ADR, 0x001D0002)
                Name (_PRW, Package (0x02)
                {
                    0x0C, 
                    0x03
                })
                OperationRegion (USBR, PCI_Config, 0xC4, One)
                Field (USBR, AnyAcc, NoLock, Preserve)
                {
                    URES,   8
                }

                Method (_PSW, 1, NotSerialized)
                {
                    If (LEqual (Arg0, Zero))
                    {
                        Store (Zero, URES)
                    }

                    If (LEqual (Arg0, One))
                    {
                        Store (0x03, URES)
                    }
                }
            }

            Device (UHC4)
            {
                Name (_ADR, 0x001D0003)
                Name (_PRW, Package (0x02)
                {
                    0x0E, 
                    0x03
                })
                OperationRegion (USBR, PCI_Config, 0xC4, One)
                Field (USBR, AnyAcc, NoLock, Preserve)
                {
                    URES,   8
                }

                Method (_PSW, 1, NotSerialized)
                {
                    If (LEqual (Arg0, Zero))
                    {
                        Store (Zero, URES)
                    }

                    If (LEqual (Arg0, One))
                    {
                        Store (0x03, URES)
                    }
                }
            }

            Device (ECHI)
            {
                Name (_ADR, 0x001D0007)
                Name (_PRW, Package (0x02)
                {
                    0x0D, 
                    0x03
                })
                OperationRegion (USBR, PCI_Config, 0xC4, One)
                Field (USBR, AnyAcc, NoLock, Preserve)
                {
                    URES,   8
                }

                Method (_PSW, 1, NotSerialized)
                {
                    If (LEqual (Arg0, Zero))
                    {
                        Store (Zero, URES)
                    }

                    If (LEqual (Arg0, One))
                    {
                        Store (0x03, URES)
                    }
                }
            }

            Device (EXP1)
            {
                Name (_ADR, 0x001C0000)
                OperationRegion (P1CS, PCI_Config, 0x40, 0x0100)
                Field (P1CS, AnyAcc, NoLock, Preserve)
                {
                            Offset (0x10), 
                        ,   4, 
                    LKD1,   1, 
                            Offset (0x1A), 
                    ABP1,   1, 
                        ,   2, 
                    PDC1,   1, 
                        ,   2, 
                    PDS1,   1, 
                            Offset (0x20), 
                    RID1,   16, 
                    PSP1,   1, 
                    PPP1,   1, 
                            Offset (0x9C), 
                        ,   30, 
                    HPCS,   1, 
                    PMCS,   1
                }

                Device (PXS1)
                {
                    Name (_ADR, Zero)
                    Method (_RMV, 0, NotSerialized)
                    {
                        Return (One)
                    }
                }

                Name (_PRW, Package (0x02)
                {
                    0x09, 
                    0x04
                })
                Method (_PRT, 0, NotSerialized)
                {
                    If (LEqual (\GPIC, Zero))
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0xFFFF, 
                                Zero, 
                                \_SB.PCI0.LPC.LNKA, 
                                Zero
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                One, 
                                \_SB.PCI0.LPC.LNKB, 
                                Zero
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                0x02, 
                                \_SB.PCI0.LPC.LNKC, 
                                Zero
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                0x03, 
                                \_SB.PCI0.LPC.LNKD, 
                                Zero
                            }
                        })
                    }
                    Else
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0xFFFF, 
                                Zero, 
                                Zero, 
                                0x10
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                One, 
                                Zero, 
                                0x11
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                0x02, 
                                Zero, 
                                0x12
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                0x03, 
                                Zero, 
                                0x13
                            }
                        })
                    }
                }
            }

            Device (EXP2)
            {
                Name (_ADR, 0x001C0001)
                OperationRegion (P2CS, PCI_Config, 0x40, 0x0100)
                Field (P2CS, AnyAcc, NoLock, Preserve)
                {
                            Offset (0x10), 
                        ,   4, 
                    LKD2,   1, 
                            Offset (0x1A), 
                    ABP2,   1, 
                        ,   2, 
                    PDC2,   1, 
                        ,   2, 
                    PDS2,   1, 
                            Offset (0x20), 
                    RID2,   16, 
                    PSP2,   1, 
                    PPP2,   1, 
                            Offset (0x9C), 
                        ,   30, 
                    HPCS,   1, 
                    PMCS,   1
                }

                Device (PXS2)
                {
                    Name (_ADR, Zero)
                }

                Method (_PRT, 0, NotSerialized)
                {
                    If (LEqual (\GPIC, Zero))
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0xFFFF, 
                                Zero, 
                                \_SB.PCI0.LPC.LNKB, 
                                Zero
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                One, 
                                \_SB.PCI0.LPC.LNKC, 
                                Zero
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                0x02, 
                                \_SB.PCI0.LPC.LNKD, 
                                Zero
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                0x03, 
                                \_SB.PCI0.LPC.LNKA, 
                                Zero
                            }
                        })
                    }
                    Else
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0xFFFF, 
                                Zero, 
                                Zero, 
                                0x11
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                One, 
                                Zero, 
                                0x12
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                0x02, 
                                Zero, 
                                0x13
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                0x03, 
                                Zero, 
                                0x10
                            }
                        })
                    }
                }
            }

            Device (EXP3)
            {
                Name (_ADR, 0x001C0002)
                OperationRegion (P3CS, PCI_Config, 0x40, 0x0100)
                Field (P3CS, AnyAcc, NoLock, Preserve)
                {
                            Offset (0x10), 
                        ,   4, 
                    LKD3,   1, 
                            Offset (0x1A), 
                    ABP3,   1, 
                        ,   2, 
                    PDC3,   1, 
                        ,   2, 
                    PDS3,   1, 
                            Offset (0x20), 
                    RID3,   16, 
                    PSP3,   1, 
                    PPP3,   1, 
                            Offset (0x9C), 
                        ,   30, 
                    HPCS,   1, 
                    PMCS,   1
                }

                Device (PXS3)
                {
                    Name (_ADR, Zero)
                }

                Name (_PRW, Package (0x02)
                {
                    0x09, 
                    0x04
                })
                Method (_PRT, 0, NotSerialized)
                {
                    If (LEqual (\GPIC, Zero))
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0xFFFF, 
                                Zero, 
                                \_SB.PCI0.LPC.LNKC, 
                                Zero
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                One, 
                                \_SB.PCI0.LPC.LNKD, 
                                Zero
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                0x02, 
                                \_SB.PCI0.LPC.LNKA, 
                                Zero
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                0x03, 
                                \_SB.PCI0.LPC.LNKB, 
                                Zero
                            }
                        })
                    }
                    Else
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0xFFFF, 
                                Zero, 
                                Zero, 
                                0x12
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                One, 
                                Zero, 
                                0x13
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                0x02, 
                                Zero, 
                                0x10
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                0x03, 
                                Zero, 
                                0x11
                            }
                        })
                    }
                }
            }

            Device (EXP4)
            {
                Name (_ADR, 0x001C0003)
                OperationRegion (P4CS, PCI_Config, 0x40, 0x0100)
                Field (P4CS, AnyAcc, NoLock, Preserve)
                {
                            Offset (0x10), 
                        ,   4, 
                    LKD4,   1, 
                            Offset (0x1A), 
                    ABP4,   1, 
                        ,   2, 
                    PDC4,   1, 
                        ,   2, 
                    PDS4,   1, 
                            Offset (0x20), 
                    RID4,   16, 
                    PSP4,   1, 
                    PPP4,   1, 
                            Offset (0x9C), 
                        ,   30, 
                    HPCS,   1, 
                    PMCS,   1
                }

                Device (PXS4)
                {
                    Name (_ADR, Zero)
                }

                Name (_PRW, Package (0x02)
                {
                    0x09, 
                    0x04
                })
                Method (_PRT, 0, NotSerialized)
                {
                    If (LEqual (\GPIC, Zero))
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0xFFFF, 
                                Zero, 
                                \_SB.PCI0.LPC.LNKD, 
                                Zero
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                One, 
                                \_SB.PCI0.LPC.LNKA, 
                                Zero
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                0x02, 
                                \_SB.PCI0.LPC.LNKB, 
                                Zero
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                0x03, 
                                \_SB.PCI0.LPC.LNKC, 
                                Zero
                            }
                        })
                    }
                    Else
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0xFFFF, 
                                Zero, 
                                Zero, 
                                0x13
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                One, 
                                Zero, 
                                0x10
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                0x02, 
                                Zero, 
                                0x11
                            }, 

                            Package (0x04)
                            {
                                0xFFFF, 
                                0x03, 
                                Zero, 
                                0x12
                            }
                        })
                    }
                }
            }

            Device (AZAL)
            {
                Name (_ADR, 0x001B0000)
                Name (_PRW, Package (0x02)
                {
                    0x05, 
                    0x04
                })
                Method (_PS0, 0, NotSerialized)
                {
                    Store (Zero, GP27)
                    Store (0x43, P66H)
                    Store (P66H, Local0)
                    While (LEqual (And (Local0, 0x02), 0x02))
                    {
                        Store (P66H, Local0)
                    }

                    Store (0xFF, P62H)
                }

                Method (_PS3, 0, NotSerialized)
                {
                    Store (One, GP27)
                    Sleep (0x01F4)
                    Store (0x43, P66H)
                    Store (P66H, Local0)
                    While (LEqual (And (Local0, 0x02), 0x02))
                    {
                        Stall (One)
                        Store (P66H, Local0)
                    }

                    Store (Zero, P62H)
                }
            }

            Device (AUDO)
            {
                Name (_ADR, 0x001E0002)
            }

            Device (MODM)
            {
                Name (_ADR, 0x001E0003)
                Method (_PRW, 0, NotSerialized)
                {
                    If (LEqual (WKMD, One))
                    {
                        Return (Package (0x02)
                        {
                            0x05, 
                            0x04
                        })
                    }
                    Else
                    {
                        Return (Package (0x02)
                        {
                            0x05, 
                            Zero
                        })
                    }
                }
            }

            Device (IDEC)
            {
                Name (_ADR, 0x001F0001)
                OperationRegion (PACS, PCI_Config, 0x40, 0xC0)
                Field (PACS, DWordAcc, NoLock, Preserve)
                {
                    PRIT,   16, 
                            Offset (0x04), 
                    PSIT,   4, 
                            Offset (0x08), 
                    SYNC,   4, 
                            Offset (0x0A), 
                    SDT0,   2, 
                        ,   2, 
                    SDT1,   2, 
                            Offset (0x14), 
                    ICR0,   4, 
                    ICR1,   4, 
                    ICR2,   4, 
                    ICR3,   4, 
                    ICR4,   4, 
                    ICR5,   4
                }

                Device (PRID)
                {
                    Name (_ADR, Zero)
                    Method (_GTM, 0, NotSerialized)
                    {
                        Name (PBUF, Buffer (0x14)
                        {
                            /* 0000 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                            /* 0008 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                            /* 0010 */    0x00, 0x00, 0x00, 0x00
                        })
                        CreateDWordField (PBUF, Zero, PIO0)
                        CreateDWordField (PBUF, 0x04, DMA0)
                        CreateDWordField (PBUF, 0x08, PIO1)
                        CreateDWordField (PBUF, 0x0C, DMA1)
                        CreateDWordField (PBUF, 0x10, FLAG)
                        Store (GETP (PRIT), PIO0)
                        Store (GDMA (And (SYNC, One), And (ICR3, One), 
                            And (ICR0, One), SDT0, And (ICR1, One)), DMA0)
                        If (LEqual (DMA0, Ones))
                        {
                            Store (PIO0, DMA0)
                        }

                        If (And (PRIT, 0x4000))
                        {
                            If (LEqual (And (PRIT, 0x90), 0x80))
                            {
                                Store (0x0384, PIO1)
                            }
                            Else
                            {
                                Store (GETT (PSIT), PIO1)
                            }
                        }
                        Else
                        {
                            Store (Ones, PIO1)
                        }

                        Store (GDMA (And (SYNC, 0x02), And (ICR3, 0x02), 
                            And (ICR0, 0x02), SDT1, And (ICR1, 0x02)), DMA1)
                        If (LEqual (DMA1, Ones))
                        {
                            Store (PIO1, DMA1)
                        }

                        Store (GETF (And (SYNC, One), And (SYNC, 0x02), 
                            PRIT), FLAG)
                        If (And (LEqual (PIO0, Ones), LEqual (DMA0, Ones)))
                        {
                            Store (0x78, PIO0)
                            Store (0x14, DMA0)
                            Store (0x03, FLAG)
                        }

                        Return (PBUF)
                    }

                    Method (_STM, 3, NotSerialized)
                    {
                        CreateDWordField (Arg0, Zero, PIO0)
                        CreateDWordField (Arg0, 0x04, DMA0)
                        CreateDWordField (Arg0, 0x08, PIO1)
                        CreateDWordField (Arg0, 0x0C, DMA1)
                        CreateDWordField (Arg0, 0x10, FLAG)
                        If (LEqual (SizeOf (Arg1), 0x0200))
                        {
                            And (PRIT, 0x40F0, PRIT)
                            And (SYNC, 0x02, SYNC)
                            Store (Zero, SDT0)
                            And (ICR0, 0x02, ICR0)
                            And (ICR1, 0x02, ICR1)
                            And (ICR3, 0x02, ICR3)
                            And (ICR5, 0x02, ICR5)
                            CreateWordField (Arg1, 0x62, W490)
                            CreateWordField (Arg1, 0x6A, W530)
                            CreateWordField (Arg1, 0x7E, W630)
                            CreateWordField (Arg1, 0x80, W640)
                            CreateWordField (Arg1, 0xB0, W880)
                            CreateWordField (Arg1, 0xBA, W930)
                            Or (PRIT, 0x8004, PRIT)
                            If (LAnd (And (FLAG, 0x02), And (W490, 0x0800)))
                            {
                                Or (PRIT, 0x02, PRIT)
                            }

                            Or (PRIT, SETP (PIO0, W530, W640), PRIT)
                            If (And (FLAG, One))
                            {
                                Or (SYNC, One, SYNC)
                                Store (SDMA (DMA0), SDT0)
                                If (LLess (DMA0, 0x1E))
                                {
                                    Or (ICR3, One, ICR3)
                                }

                                If (LLess (DMA0, 0x3C))
                                {
                                    Or (ICR0, One, ICR0)
                                }

                                If (And (W930, 0x2000))
                                {
                                    Or (ICR1, One, ICR1)
                                }
                            }
                        }

                        If (LEqual (SizeOf (Arg2), 0x0200))
                        {
                            And (PRIT, 0x3F0F, PRIT)
                            Store (Zero, PSIT)
                            And (SYNC, One, SYNC)
                            Store (Zero, SDT1)
                            And (ICR0, One, ICR0)
                            And (ICR1, One, ICR1)
                            And (ICR3, One, ICR3)
                            And (ICR5, One, ICR5)
                            CreateWordField (Arg2, 0x62, W491)
                            CreateWordField (Arg2, 0x6A, W531)
                            CreateWordField (Arg2, 0x7E, W631)
                            CreateWordField (Arg2, 0x80, W641)
                            CreateWordField (Arg2, 0xB0, W881)
                            CreateWordField (Arg2, 0xBA, W931)
                            Or (PRIT, 0x8040, PRIT)
                            If (LAnd (And (FLAG, 0x08), And (W491, 0x0800)))
                            {
                                Or (PRIT, 0x20, PRIT)
                            }

                            If (And (FLAG, 0x10))
                            {
                                Or (PRIT, 0x4000, PRIT)
                                If (LGreater (PIO1, 0xF0))
                                {
                                    Or (PRIT, 0x80, PRIT)
                                }
                                Else
                                {
                                    Or (PRIT, 0x10, PRIT)
                                    Store (SETT (PIO1, W531, W641), PSIT)
                                }
                            }

                            If (And (FLAG, 0x04))
                            {
                                Or (SYNC, 0x02, SYNC)
                                Store (SDMA (DMA1), SDT1)
                                If (LLess (DMA1, 0x1E))
                                {
                                    Or (ICR3, 0x02, ICR3)
                                }

                                If (LLess (DMA1, 0x3C))
                                {
                                    Or (ICR0, 0x02, ICR0)
                                }

                                If (And (W931, 0x2000))
                                {
                                    Or (ICR1, 0x02, ICR1)
                                }
                            }
                        }
                    }

                    Device (P_D0)
                    {
                        Name (_ADR, Zero)
                        Method (_GTF, 0, NotSerialized)
                        {
                            Name (PIB0, Buffer (0x0E)
                            {
                                /* 0000 */    0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF, 0x03, 
                                /* 0008 */    0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF
                            })
                            CreateByteField (PIB0, One, PMD0)
                            CreateByteField (PIB0, 0x08, DMD0)
                            If (And (PRIT, 0x02))
                            {
                                If (LEqual (And (PRIT, 0x09), 0x08))
                                {
                                    Store (0x08, PMD0)
                                }
                                Else
                                {
                                    Store (0x0A, PMD0)
                                    ShiftRight (And (PRIT, 0x0300), 0x08, Local0)
                                    ShiftRight (And (PRIT, 0x3000), 0x0C, Local1)
                                    Add (Local0, Local1, Local2)
                                    If (LEqual (0x03, Local2))
                                    {
                                        Store (0x0B, PMD0)
                                    }

                                    If (LEqual (0x05, Local2))
                                    {
                                        Store (0x0C, PMD0)
                                    }
                                }
                            }
                            Else
                            {
                                Store (One, PMD0)
                            }

                            If (And (SYNC, One))
                            {
                                Store (Or (SDT0, 0x40), DMD0)
                                If (And (ICR1, One))
                                {
                                    If (And (ICR0, One))
                                    {
                                        Add (DMD0, 0x02, DMD0)
                                    }

                                    If (And (ICR3, One))
                                    {
                                        Store (0x45, DMD0)
                                    }
                                }
                            }
                            Else
                            {
                                Or (Subtract (And (PMD0, 0x07), 0x02), 0x20, DMD0)
                            }

                            Return (PIB0)
                        }
                    }

                    Device (P_D1)
                    {
                        Name (_ADR, One)
                        Method (_GTF, 0, NotSerialized)
                        {
                            Name (PIB1, Buffer (0x0E)
                            {
                                /* 0000 */    0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF, 0x03, 
                                /* 0008 */    0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF
                            })
                            CreateByteField (PIB1, One, PMD1)
                            CreateByteField (PIB1, 0x08, DMD1)
                            If (And (PRIT, 0x20))
                            {
                                If (LEqual (And (PRIT, 0x90), 0x80))
                                {
                                    Store (0x08, PMD1)
                                }
                                Else
                                {
                                    Add (And (PSIT, 0x03), ShiftRight (And (PSIT, 0x0C), 
                                        0x02), Local0)
                                    If (LEqual (0x05, Local0))
                                    {
                                        Store (0x0C, PMD1)
                                    }
                                    Else
                                    {
                                        If (LEqual (0x03, Local0))
                                        {
                                            Store (0x0B, PMD1)
                                        }
                                        Else
                                        {
                                            Store (0x0A, PMD1)
                                        }
                                    }
                                }
                            }
                            Else
                            {
                                Store (One, PMD1)
                            }

                            If (And (SYNC, 0x02))
                            {
                                Store (Or (SDT1, 0x40), DMD1)
                                If (And (ICR1, 0x02))
                                {
                                    If (And (ICR0, 0x02))
                                    {
                                        Add (DMD1, 0x02, DMD1)
                                    }

                                    If (And (ICR3, 0x02))
                                    {
                                        Store (0x45, DMD1)
                                    }
                                }
                            }
                            Else
                            {
                                Or (Subtract (And (PMD1, 0x07), 0x02), 0x20, DMD1)
                            }

                            Return (PIB1)
                        }
                    }
                }
            }

            Device (SATA)
            {
                Name (_ADR, 0x001F0002)
                OperationRegion (SACS, PCI_Config, 0x40, 0xC0)
                Field (SACS, DWordAcc, NoLock, Preserve)
                {
                    PRIT,   16, 
                    SECT,   16, 
                    PSIT,   4, 
                    SSIT,   4, 
                            Offset (0x08), 
                    SYNC,   4, 
                            Offset (0x0A), 
                    SDT0,   2, 
                        ,   2, 
                    SDT1,   2, 
                            Offset (0x0B), 
                    SDT2,   2, 
                        ,   2, 
                    SDT3,   2, 
                            Offset (0x14), 
                    ICR0,   4, 
                    ICR1,   4, 
                    ICR2,   4, 
                    ICR3,   4, 
                    ICR4,   4, 
                    ICR5,   4, 
                            Offset (0x50), 
                    MAPV,   2
                }

                Device (PRID)
                {
                    Name (_ADR, Zero)
                    Method (_GTM, 0, NotSerialized)
                    {
                        If (LNotEqual (SCFG, 0x02))
                        {
                            Name (PBUF, Buffer (0x14)
                            {
                                /* 0000 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                /* 0008 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                /* 0010 */    0x00, 0x00, 0x00, 0x00
                            })
                            CreateDWordField (PBUF, Zero, PIO0)
                            CreateDWordField (PBUF, 0x04, DMA0)
                            CreateDWordField (PBUF, 0x08, PIO1)
                            CreateDWordField (PBUF, 0x0C, DMA1)
                            CreateDWordField (PBUF, 0x10, FLAG)
                            Store (GETP (PRIT), PIO0)
                            Store (GDMA (And (SYNC, One), And (ICR3, One), 
                                And (ICR0, One), SDT0, And (ICR1, One)), DMA0)
                            If (LEqual (DMA0, Ones))
                            {
                                Store (PIO0, DMA0)
                            }

                            If (And (PRIT, 0x4000))
                            {
                                If (LEqual (And (PRIT, 0x90), 0x80))
                                {
                                    Store (0x0384, PIO1)
                                }
                                Else
                                {
                                    Store (GETT (PSIT), PIO1)
                                }
                            }
                            Else
                            {
                                Store (Ones, PIO1)
                            }

                            Store (GDMA (And (SYNC, 0x02), And (ICR3, 0x02), 
                                And (ICR0, 0x02), SDT1, And (ICR1, 0x02)), DMA1)
                            If (LEqual (DMA1, Ones))
                            {
                                Store (PIO1, DMA1)
                            }

                            Store (GETF (And (SYNC, One), And (SYNC, 0x02), 
                                PRIT), FLAG)
                            Return (PBUF)
                        }
                    }

                    Method (_STM, 3, NotSerialized)
                    {
                        If (LNotEqual (SCFG, 0x02))
                        {
                            CreateDWordField (Arg0, Zero, PIO0)
                            CreateDWordField (Arg0, 0x04, DMA0)
                            CreateDWordField (Arg0, 0x08, PIO1)
                            CreateDWordField (Arg0, 0x0C, DMA1)
                            CreateDWordField (Arg0, 0x10, FLAG)
                            If (LEqual (SizeOf (Arg1), 0x0200))
                            {
                                And (PRIT, 0x40F0, PRIT)
                                And (SYNC, 0x0E, SYNC)
                                Store (Zero, SDT0)
                                And (ICR0, 0x0E, ICR0)
                                And (ICR1, 0x0E, ICR1)
                                And (ICR3, 0x0E, ICR3)
                                And (ICR5, 0x0E, ICR5)
                                CreateWordField (Arg1, 0x62, W490)
                                CreateWordField (Arg1, 0x6A, W530)
                                CreateWordField (Arg1, 0x7E, W630)
                                CreateWordField (Arg1, 0x80, W640)
                                CreateWordField (Arg1, 0xB0, W880)
                                CreateWordField (Arg1, 0xBA, W930)
                                Or (PRIT, 0x8004, PRIT)
                                If (LAnd (And (FLAG, 0x02), And (W490, 0x0800)))
                                {
                                    Or (PRIT, 0x02, PRIT)
                                }

                                Or (PRIT, SETP (PIO0, W530, W640), PRIT)
                                If (And (FLAG, One))
                                {
                                    Or (SYNC, One, SYNC)
                                    Store (SDMA (DMA0), SDT0)
                                    If (LLess (DMA0, 0x1E))
                                    {
                                        Or (ICR3, One, ICR3)
                                    }

                                    If (LLess (DMA0, 0x3C))
                                    {
                                        Or (ICR0, One, ICR0)
                                    }

                                    Or (ICR1, One, ICR1)
                                }
                            }

                            If (LEqual (SizeOf (Arg2), 0x0200))
                            {
                                And (PRIT, 0x3F0F, PRIT)
                                Store (Zero, PSIT)
                                And (SYNC, 0x0D, SYNC)
                                Store (Zero, SDT1)
                                And (ICR0, 0x0D, ICR0)
                                And (ICR1, 0x0D, ICR1)
                                And (ICR3, 0x0D, ICR3)
                                And (ICR5, 0x0D, ICR5)
                                CreateWordField (Arg2, 0x62, W491)
                                CreateWordField (Arg2, 0x6A, W531)
                                CreateWordField (Arg2, 0x7E, W631)
                                CreateWordField (Arg2, 0x80, W641)
                                CreateWordField (Arg2, 0xB0, W881)
                                CreateWordField (Arg2, 0xBA, W931)
                                Or (PRIT, 0x8040, PRIT)
                                If (LAnd (And (FLAG, 0x08), And (W491, 0x0800)))
                                {
                                    Or (PRIT, 0x20, PRIT)
                                }

                                If (And (FLAG, 0x10))
                                {
                                    Or (PRIT, 0x4000, PRIT)
                                    If (LGreater (PIO1, 0xF0))
                                    {
                                        Or (PRIT, 0x80, PRIT)
                                    }
                                    Else
                                    {
                                        Or (PRIT, 0x10, PRIT)
                                        Store (SETT (PIO1, W531, W641), PSIT)
                                    }
                                }

                                If (And (FLAG, 0x04))
                                {
                                    Or (SYNC, 0x02, SYNC)
                                    Store (SDMA (DMA1), SDT1)
                                    If (LLess (DMA1, 0x1E))
                                    {
                                        Or (ICR3, 0x02, ICR3)
                                    }

                                    If (LLess (DMA1, 0x3C))
                                    {
                                        Or (ICR0, 0x02, ICR0)
                                    }

                                    Or (ICR1, 0x02, ICR1)
                                }
                            }
                        }
                    }

                    Device (P_D0)
                    {
                        Name (_ADR, Zero)
                        Method (_GTF, 0, NotSerialized)
                        {
                            If (LNotEqual (SCFG, 0x02))
                            {
                                Name (PIB0, Buffer (0x0E)
                                {
                                    /* 0000 */    0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF, 0x03, 
                                    /* 0008 */    0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF
                                })
                                CreateByteField (PIB0, One, PMD0)
                                CreateByteField (PIB0, 0x08, DMD0)
                                If (And (PRIT, 0x02))
                                {
                                    If (LEqual (And (PRIT, 0x09), 0x08))
                                    {
                                        Store (0x08, PMD0)
                                    }
                                    Else
                                    {
                                        Store (0x0A, PMD0)
                                        ShiftRight (And (PRIT, 0x0300), 0x08, Local0)
                                        ShiftRight (And (PRIT, 0x3000), 0x0C, Local1)
                                        Add (Local0, Local1, Local2)
                                        If (LEqual (0x03, Local2))
                                        {
                                            Store (0x0B, PMD0)
                                        }

                                        If (LEqual (0x05, Local2))
                                        {
                                            Store (0x0C, PMD0)
                                        }
                                    }
                                }
                                Else
                                {
                                    Store (One, PMD0)
                                }

                                If (And (SYNC, One))
                                {
                                    Store (Or (SDT0, 0x40), DMD0)
                                    If (And (ICR1, One))
                                    {
                                        If (And (ICR0, One))
                                        {
                                            Add (DMD0, 0x02, DMD0)
                                        }

                                        If (And (ICR3, One))
                                        {
                                            Store (0x45, DMD0)
                                        }
                                    }
                                }
                                Else
                                {
                                    Or (Subtract (And (PMD0, 0x07), 0x02), 0x20, DMD0)
                                }

                                Return (PIB0)
                            }
                        }
                    }

                    Device (P_D1)
                    {
                        Name (_ADR, One)
                        Method (_GTF, 0, NotSerialized)
                        {
                            If (LNotEqual (SCFG, 0x02))
                            {
                                Name (PIB1, Buffer (0x0E)
                                {
                                    /* 0000 */    0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF, 0x03, 
                                    /* 0008 */    0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF
                                })
                                CreateByteField (PIB1, One, PMD1)
                                CreateByteField (PIB1, 0x08, DMD1)
                                If (And (PRIT, 0x20))
                                {
                                    If (LEqual (And (PRIT, 0x90), 0x80))
                                    {
                                        Store (0x08, PMD1)
                                    }
                                    Else
                                    {
                                        Add (And (PSIT, 0x03), ShiftRight (And (PSIT, 0x0C), 
                                            0x02), Local0)
                                        If (LEqual (0x05, Local0))
                                        {
                                            Store (0x0C, PMD1)
                                        }
                                        Else
                                        {
                                            If (LEqual (0x03, Local0))
                                            {
                                                Store (0x0B, PMD1)
                                            }
                                            Else
                                            {
                                                Store (0x0A, PMD1)
                                            }
                                        }
                                    }
                                }
                                Else
                                {
                                    Store (One, PMD1)
                                }

                                If (And (SYNC, 0x02))
                                {
                                    Store (Or (SDT1, 0x40), DMD1)
                                    If (And (ICR1, 0x02))
                                    {
                                        If (And (ICR0, 0x02))
                                        {
                                            Add (DMD1, 0x02, DMD1)
                                        }

                                        If (And (ICR3, 0x02))
                                        {
                                            Store (0x45, DMD1)
                                        }
                                    }
                                }
                                Else
                                {
                                    Or (Subtract (And (PMD1, 0x07), 0x02), 0x20, DMD1)
                                }

                                Return (PIB1)
                            }
                        }
                    }
                }

                Device (SECD)
                {
                    Name (_ADR, One)
                    Method (_GTM, 0, NotSerialized)
                    {
                        If (LNotEqual (SCFG, 0x02))
                        {
                            Name (SBUF, Buffer (0x14)
                            {
                                /* 0000 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                /* 0008 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                /* 0010 */    0x00, 0x00, 0x00, 0x00
                            })
                            CreateDWordField (SBUF, Zero, PIO0)
                            CreateDWordField (SBUF, 0x04, DMA0)
                            CreateDWordField (SBUF, 0x08, PIO1)
                            CreateDWordField (SBUF, 0x0C, DMA1)
                            CreateDWordField (SBUF, 0x10, FLAG)
                            Store (GETP (SECT), PIO0)
                            Store (GDMA (And (SYNC, 0x04), And (ICR3, 0x04), 
                                And (ICR0, 0x04), SDT2, And (ICR1, 0x04)), DMA0)
                            If (LEqual (DMA0, Ones))
                            {
                                Store (PIO0, DMA0)
                            }

                            If (And (SECT, 0x4000))
                            {
                                If (LEqual (And (SECT, 0x90), 0x80))
                                {
                                    Store (0x0384, PIO1)
                                }
                                Else
                                {
                                    Store (GETT (SSIT), PIO1)
                                }
                            }
                            Else
                            {
                                Store (Ones, PIO1)
                            }

                            Store (GDMA (And (SYNC, 0x08), And (ICR3, 0x08), 
                                And (ICR0, 0x08), SDT3, And (ICR1, 0x08)), DMA1)
                            If (LEqual (DMA1, Ones))
                            {
                                Store (PIO1, DMA1)
                            }

                            Store (GETF (And (SYNC, 0x04), And (SYNC, 0x08), 
                                SECT), FLAG)
                            If (And (LEqual (PIO0, Ones), LEqual (DMA0, Ones)))
                            {
                                Store (0x78, PIO0)
                                Store (0x14, DMA0)
                                Store (0x03, FLAG)
                            }

                            Return (SBUF)
                        }
                    }

                    Method (_STM, 3, NotSerialized)
                    {
                        If (LNotEqual (SCFG, 0x02))
                        {
                            CreateDWordField (Arg0, Zero, PIO0)
                            CreateDWordField (Arg0, 0x04, DMA0)
                            CreateDWordField (Arg0, 0x08, PIO1)
                            CreateDWordField (Arg0, 0x0C, DMA1)
                            CreateDWordField (Arg0, 0x10, FLAG)
                            If (LEqual (SizeOf (Arg1), 0x0200))
                            {
                                And (SECT, 0x40F0, SECT)
                                And (SYNC, 0x0B, SYNC)
                                Store (Zero, SDT2)
                                And (ICR0, 0x0B, ICR0)
                                And (ICR1, 0x0B, ICR1)
                                And (ICR3, 0x0B, ICR3)
                                And (ICR5, 0x0B, ICR5)
                                CreateWordField (Arg1, 0x62, W490)
                                CreateWordField (Arg1, 0x6A, W530)
                                CreateWordField (Arg1, 0x7E, W630)
                                CreateWordField (Arg1, 0x80, W640)
                                CreateWordField (Arg1, 0xB0, W880)
                                CreateWordField (Arg1, 0xBA, W930)
                                Or (SECT, 0x8004, SECT)
                                If (LAnd (And (FLAG, 0x02), And (W490, 0x0800)))
                                {
                                    Or (SECT, 0x02, SECT)
                                }

                                Or (SECT, SETP (PIO0, W530, W640), SECT)
                                If (And (FLAG, One))
                                {
                                    Or (SYNC, 0x04, SYNC)
                                    Store (SDMA (DMA0), SDT2)
                                    If (LLess (DMA0, 0x1E))
                                    {
                                        Or (ICR3, 0x04, ICR3)
                                    }

                                    If (LLess (DMA0, 0x3C))
                                    {
                                        Or (ICR0, 0x04, ICR0)
                                    }

                                    If (And (W930, 0x2000))
                                    {
                                        Or (ICR1, 0x04, ICR1)
                                    }
                                }
                            }

                            If (LEqual (SizeOf (Arg2), 0x0200))
                            {
                                And (SECT, 0x3F0F, SECT)
                                Store (Zero, SSIT)
                                And (SYNC, 0x07, SYNC)
                                Store (Zero, SDT3)
                                And (ICR0, 0x07, ICR0)
                                And (ICR1, 0x07, ICR1)
                                And (ICR3, 0x07, ICR3)
                                And (ICR5, 0x07, ICR5)
                                CreateWordField (Arg2, 0x62, W491)
                                CreateWordField (Arg2, 0x6A, W531)
                                CreateWordField (Arg2, 0x7E, W631)
                                CreateWordField (Arg2, 0x80, W641)
                                CreateWordField (Arg2, 0xB0, W881)
                                CreateWordField (Arg2, 0xBA, W931)
                                Or (SECT, 0x8040, SECT)
                                If (LAnd (And (FLAG, 0x08), And (W491, 0x0800)))
                                {
                                    Or (SECT, 0x20, SECT)
                                }

                                If (And (FLAG, 0x10))
                                {
                                    Or (SECT, 0x4000, SECT)
                                    If (LGreater (PIO1, 0xF0))
                                    {
                                        Or (SECT, 0x80, SECT)
                                    }
                                    Else
                                    {
                                        Or (SECT, 0x10, SECT)
                                        Store (SETT (PIO1, W531, W641), SSIT)
                                    }
                                }

                                If (And (FLAG, 0x04))
                                {
                                    Or (SYNC, 0x08, SYNC)
                                    Store (SDMA (DMA1), SDT3)
                                    If (LLess (DMA1, 0x1E))
                                    {
                                        Or (ICR3, 0x08, ICR3)
                                    }

                                    If (LLess (DMA1, 0x3C))
                                    {
                                        Or (ICR0, 0x08, ICR0)
                                    }

                                    If (And (W931, 0x2000))
                                    {
                                        Or (ICR1, 0x08, ICR1)
                                    }
                                }
                            }
                        }
                    }

                    Device (S_D0)
                    {
                        Name (_ADR, Zero)
                        Method (_GTF, 0, NotSerialized)
                        {
                            If (LNotEqual (SCFG, 0x02))
                            {
                                Name (SIB0, Buffer (0x0E)
                                {
                                    /* 0000 */    0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF, 0x03, 
                                    /* 0008 */    0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF
                                })
                                CreateByteField (SIB0, One, PMD0)
                                CreateByteField (SIB0, 0x08, DMD0)
                                If (And (SECT, 0x02))
                                {
                                    If (LEqual (And (SECT, 0x09), 0x08))
                                    {
                                        Store (0x08, PMD0)
                                    }
                                    Else
                                    {
                                        Store (0x0A, PMD0)
                                        ShiftRight (And (SECT, 0x0300), 0x08, Local0)
                                        ShiftRight (And (SECT, 0x3000), 0x0C, Local1)
                                        Add (Local0, Local1, Local2)
                                        If (LEqual (0x03, Local2))
                                        {
                                            Store (0x0B, PMD0)
                                        }

                                        If (LEqual (0x05, Local2))
                                        {
                                            Store (0x0C, PMD0)
                                        }
                                    }
                                }
                                Else
                                {
                                    Store (One, PMD0)
                                }

                                If (And (SYNC, 0x04))
                                {
                                    Store (Or (SDT2, 0x40), DMD0)
                                    If (And (ICR1, 0x04))
                                    {
                                        If (And (ICR0, 0x04))
                                        {
                                            Add (DMD0, 0x02, DMD0)
                                        }

                                        If (And (ICR3, 0x04))
                                        {
                                            Store (0x45, DMD0)
                                        }
                                    }
                                }
                                Else
                                {
                                    Or (Subtract (And (PMD0, 0x07), 0x02), 0x20, DMD0)
                                }

                                Return (SIB0)
                            }
                        }
                    }

                    Device (S_D1)
                    {
                        Name (_ADR, One)
                        Method (_GTF, 0, NotSerialized)
                        {
                            If (LNotEqual (SCFG, 0x02))
                            {
                                Name (SIB1, Buffer (0x0E)
                                {
                                    /* 0000 */    0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF, 0x03, 
                                    /* 0008 */    0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF
                                })
                                CreateByteField (SIB1, One, PMD1)
                                CreateByteField (SIB1, 0x08, DMD1)
                                If (And (SECT, 0x20))
                                {
                                    If (LEqual (And (SECT, 0x90), 0x80))
                                    {
                                        Store (0x08, PMD1)
                                    }
                                    Else
                                    {
                                        Add (And (SSIT, 0x03), ShiftRight (And (SSIT, 0x0C), 
                                            0x02), Local0)
                                        If (LEqual (0x05, Local0))
                                        {
                                            Store (0x0C, PMD1)
                                        }
                                        Else
                                        {
                                            If (LEqual (0x03, Local0))
                                            {
                                                Store (0x0B, PMD1)
                                            }
                                            Else
                                            {
                                                Store (0x0A, PMD1)
                                            }
                                        }
                                    }
                                }
                                Else
                                {
                                    Store (One, PMD1)
                                }

                                If (And (SYNC, 0x08))
                                {
                                    Store (Or (SDT3, 0x40), DMD1)
                                    If (And (ICR1, 0x08))
                                    {
                                        If (And (ICR0, 0x08))
                                        {
                                            Add (DMD1, 0x02, DMD1)
                                        }

                                        If (And (ICR3, 0x08))
                                        {
                                            Store (0x45, DMD1)
                                        }
                                    }
                                }
                                Else
                                {
                                    Or (Subtract (And (PMD1, 0x07), 0x02), 0x20, DMD1)
                                }

                                Return (SIB1)
                            }
                        }
                    }
                }

                Device (PRT0)
                {
                    Name (_ADR, 0xFFFF)
                    Method (_SDD, 1, NotSerialized)
                    {
                        If (LEqual (SCFG, 0x02))
                        {
                            Name (GBU0, Buffer (0x07)
                            {
                                0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x00
                            })
                            CreateByteField (GBU0, Zero, GB00)
                            CreateByteField (GBU0, One, GB01)
                            CreateByteField (GBU0, 0x02, GB02)
                            CreateByteField (GBU0, 0x03, GB03)
                            CreateByteField (GBU0, 0x04, GB04)
                            CreateByteField (GBU0, 0x05, GB05)
                            CreateByteField (GBU0, 0x06, GB06)
                            If (LEqual (SizeOf (Arg0), 0x0200))
                            {
                                CreateWordField (Arg0, 0x9C, W780)
                                CreateWordField (Arg0, 0x9E, W790)
                                If (LAnd (W780, 0x04))
                                {
                                    If (LEqual (And (W790, 0x04), Zero))
                                    {
                                        Store (0x10, GB00)
                                        Store (0x03, GB01)
                                        Store (0xEF, GB06)
                                    }
                                }
                            }

                            Store (GBU0, GTF0)
                        }
                    }

                    Method (_GTF, 0, NotSerialized)
                    {
                        If (LAnd (LEqual (SCFG, 0x02), LEqual (AIBT, Zero)))
                        {
                            Return (GTF0)
                        }
                    }
                }

                Device (PRT2)
                {
                    Name (_ADR, 0x0002FFFF)
                    Method (_SDD, 1, NotSerialized)
                    {
                        If (LEqual (SCFG, 0x02))
                        {
                            Name (GBU2, Buffer (0x07)
                            {
                                0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x00
                            })
                            CreateByteField (GBU2, Zero, GB20)
                            CreateByteField (GBU2, One, GB21)
                            CreateByteField (GBU2, 0x02, GB22)
                            CreateByteField (GBU2, 0x03, GB23)
                            CreateByteField (GBU2, 0x04, GB24)
                            CreateByteField (GBU2, 0x05, GB25)
                            CreateByteField (GBU2, 0x06, GB26)
                            If (LEqual (SizeOf (Arg0), 0x0200))
                            {
                                CreateWordField (Arg0, 0x9C, W782)
                                CreateWordField (Arg0, 0x9E, W792)
                                If (LAnd (W782, 0x04))
                                {
                                    If (LEqual (And (W792, 0x04), Zero))
                                    {
                                        Store (0x10, GB20)
                                        Store (0x03, GB21)
                                        Store (0xEF, GB26)
                                    }
                                }
                            }

                            Store (GBU2, GTF2)
                        }
                    }

                    Method (_GTF, 0, NotSerialized)
                    {
                        If (LAnd (LEqual (SCFG, 0x02), LEqual (AIBT, Zero)))
                        {
                            Return (GTF2)
                        }
                    }
                }
            }
        }
    }
}


             reply	other threads:[~2011-02-08 10:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-08 10:38 lxl [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-03-15 17:28 [Devel] Reserved method has too many arguments (_OSC requires 4) Moore, Robert
2010-03-15 17:28 ` Moore, Robert
2010-03-15 16:59 Moore, Robert
2010-03-15 16:59 ` Moore, Robert
2010-03-15  9:30 Thomas Renninger
2010-03-15  9:30 ` Thomas Renninger
2010-03-12 15:58 Moore, Robert
2010-03-12 15:58 ` Moore, Robert
2010-03-12 14:00 Thomas Renninger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1297161518.19502.0.camel@evan \
    --to=devel@acpica.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.