NetBSD-Bugs archive

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

Re: install/58932: NetBSD-10.99.12-i386-install.img ACPI problems Compal DL-75 laptop



El 23/12/24 a las 22:58, Taylor R Campbell escribió:
Date: Mon, 23 Dec 2024 09:10:01 +0000 (UTC)
From: ea1abz%gmail.com@localhost

I would also be curious to see output of `acpidump -dt' on this system
(whether from NetBSD, if you can get it that way, or even from Linux
if you can't, with the caveat I'm not 100% sure the command-line
options are the same).


Hello Taylor,

acpidump -dt from a FreeBSD installer. Please, let me know what is the prefered policy in this cases, pasting the contents of files as text or attaching them as files.


Regards


$ cat acpidump_from_freebsd.txt
/*
  RSD PTR: OEM=INSYDE, ACPI_Rev=1.0x (0)
    RSDT=0x7f7fb2bb, cksum=170
 */
/*
  RSDT: Length=52, Revision=1, Checksum=238,
    OEMID=INSYDE, OEM Table ID=RSDT_000, OEM Revision=0x100,
    Creator ID=ABCD, Creator Revision=0x10200
    Entries={ 0x7f7ffb00, 0x7f7ffb90, 0x7f7fb4c7, 0x7f7fb2ef }
 */
/*
  FACP: Length=116, Revision=1, Checksum=231,
    OEMID=INSYDE, OEM Table ID=FACP_000, OEM Revision=0x100,
    Creator ID=0000, Creator Revision=0x10200
     FACS=0x7f7fffc0, DSDT=0x7f7fb920
    INT_MODEL=PIC
    Preferred_PM_Profile=Unspecified (0)
    SCI_INT=9
    SMI_CMD=0xb2, ACPI_ENABLE=0xe0, ACPI_DISABLE=0xe1, S4BIOS_REQ=0xe2
    PSTATE_CNT=0x80
    PM1a_EVT_BLK=0x1000-0x1003
    PM1a_CNT_BLK=0x1004-0x1005
    PM2_CNT_BLK=0x1020-0x1020
    PM_TMR_BLK=0x1008-0x100b
    GPE0_BLK=0x1028-0x102f
    CST_CNT=0x85
    P_LVL2_LAT=1 us, P_LVL3_LAT=85 us
    FLUSH_SIZE=0, FLUSH_STRIDE=0
    DUTY_OFFSET=1, DUTY_WIDTH=3
    DAY_ALRM=13, MON_ALRM=0, CENTURY=50
    IAPC_BOOT_ARCH={LEGACY_DEVICES,8042}
Flags={WBINVD,C1_SUPPORTED,SLEEP_BUTTON,S4_RTC_WAKE,DOCKING_SUPPORTED}
 */
/*
  FACS:    Length=64, HwSig=0x00000000, Firm_Wake_Vec=0x00000000
    Global_Lock=
    Flags=
    Version=0
 */
/*
  DSDT: Length=16862, Revision=1, Checksum=214,
    OEMID=COMPAL, OEM Table ID=DL7x, OEM Revision=0x1,
    Creator ID=INTL, Creator Revision=0x2002036
 */
/*
  APIC: Length=104, Revision=1, Checksum=75,
    OEMID=STUPID, OEM Table ID=MAPIC_00, OEM Revision=0x30307830,
    Creator ID=ABCD, Creator Revision=0x10200
    Local APIC ADDR=0xfee00000
    Flags={PC-AT}

    Type=Local APIC
    ACPI CPU=0
    Flags={ENABLED}
    APIC ID=0

    Type=Local APIC
    ACPI CPU=1
    Flags={DISABLED}
    APIC ID=1

    Type=IO APIC
    APIC ID=1
    INT BASE=0
    ADDR=0x00000000fec00000

    Type=INT Override
    BUS=0
    IRQ=0
    INTR=2
    Flags={Polarity=conforming, Trigger=conforming}

    Type=INT Override
    BUS=0
    IRQ=9
    INTR=9
    Flags={Polarity=active-hi, Trigger=level}

    Type=Local APIC NMI
    ACPI CPU=0
    LINT Pin=1
    Flags={Polarity=active-hi, Trigger=edge}

    Type=Local APIC NMI
    ACPI CPU=1
    LINT Pin=1
    Flags={Polarity=active-hi, Trigger=edge}
 */
/*
  SSDT: Length=631, Revision=1, Checksum=246,
    OEMID=PmRef, OEM Table ID=Cpu0Ist, OEM Revision=0x3000,
    Creator ID=INTL, Creator Revision=0x20030522
 */
/*
  SSDT: Length=472, Revision=1, Checksum=246,
    OEMID=PmRef, OEM Table ID=Cpu0Cst, OEM Revision=0x3001,
    Creator ID=INTL, Creator Revision=0x20030522
 */
/*
 * Intel ACPI Component Architecture
 * AML/ASL+ Disassembler version 20221020 (32-bit version)
 * Copyright (c) 2000 - 2022 Intel Corporation
 *
 * Disassembling to symbolic ASL+ operators
 *
 * Disassembly of /tmp/acpidump.axb81y/acpdump.din, Thu Dec 26 08:37:15 2024
 *
 * Original Table Header:
 *     Signature        "DSDT"
 *     Length           0x000045E5 (17893)
 *     Revision         0x01 **** 32-bit table (V1), no 64-bit math support
 *     Checksum         0xA8
 *     OEM ID           "COMPAL"
 *     OEM Table ID     "DL7x    "
 *     OEM Revision     0x00000001 (1)
 *     Compiler ID      "INTL"
 *     Compiler Version 0x02002036 (33562678)
 */
DefinitionBlock ("", "DSDT", 1, "COMPAL", "DL7x    ", 0x00000001)
{
    External (_SB_.PCI0.LPCB.EC0_.ECOK, IntObj)

    OperationRegion (PRT0, SystemIO, 0x80, 0x04)
    Field (PRT0, DWordAcc, Lock, Preserve)
    {
        P80H,   32
    }

    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 (S_IO, SystemIO, 0x0680, 0x11)
    Field (S_IO, ByteAcc, NoLock, Preserve)
    {
        PMS0,   8,
        PME0,   8,
        PMS1,   8,
        PMS2,   8,
        PMS3,   8,
        PME1,   8,
        PME2,   8,
        PME3,   8,
        SMS1,   8,
        SMS2,   8,
        SME1,   8,
        SME2,   8,
        RT10,   1,
        RT11,   1,
            ,   1,
        RT13,   1,
        Offset (0x0E),
        RT30,   1,
        RT31,   1,
        RT32,   1,
        RT33,   1,
        RT34,   1,
        RT35,   1,
        RT36,   1,
        RT37,   1,
        Offset (0x10),
        DLPC,   1,
        CK33,   1,
        CK14,   1
    }

    OperationRegion (GPIO, SystemIO, 0x1300, 0x3C)
    Field (GPIO, ByteAcc, NoLock, Preserve)
    {
        GU00,   8,
        GU01,   8,
        GU02,   8,
        GU03,   8,
        GIO0,   8,
        GIO1,   8,
        GIO2,   8,
        GIO3,   8,
        Offset (0x0C),
        GL00,   8,
        GL01,   8,
            ,   5,
        GP21,   1,
            ,   1,
        GP23,   1,
            ,   1,
        GP25,   1,
        Offset (0x10),
        Offset (0x18),
        GB00,   8,
        GB01,   8,
        GB02,   8,
        GB03,   8,
        Offset (0x2C),
        GIV0,   8,
            ,   4,
        LPOL,   1,
        Offset (0x2E),
        GIV2,   8,
        GIV3,   8,
        GU04,   8,
        GU05,   8,
        GU06,   8,
        GU07,   8,
        GIO4,   8,
        GIO5,   8,
        GIO6,   8,
        GIO7,   8,
            ,   1,
        GP33,   1,
        Offset (0x39),
        GL05,   8,
        GL06,   8,
        GL07,   8
    }

    OperationRegion (MBOX, SystemMemory, 0x7F7FFC00, 0x0100)
    Field (MBOX, AnyAcc, Lock, Preserve)
    {
        MYOS,   16,
        SMIF,   8,
        PRM0,   8,
        PRM1,   8,
        SCIF,   8,
        PRM2,   8,
        PRM3,   8,
        LCKF,   8,
        PRM4,   8,
        PRM5,   8,
        P80D,   32,
        LIDS,   8,
        PWRS,   8,
        DBGS,   8,
        Offset (0x14),
        ACTT,   8,
        PSVT,   8,
        TC1V,   8,
        TC2V,   8,
        TSPV,   8,
        CRTT,   8,
        Offset (0x1E),
        BNUM,   8,
        B0SC,   8,
        B1SC,   8,
        B2SC,   8,
        B0SS,   8,
        B1SS,   8,
        B2SS,   8,
        Offset (0x28),
        WTHT,   8,
        Offset (0x3C),
        IGDS,   8,
        TLST,   8,
        CADL,   8,
        PADL,   8,
        CSTE,   16,
        NSTE,   16,
        SSTE,   16,
        NDID,   8,
        DID1,   32,
        DID2,   32,
        DID3,   32,
        DID4,   32,
        DID5,   32,
        Offset (0x67),
        BLCS,   8,
        BRTL,   8,
        Offset (0x82),
        UTYP,   2,
            ,   2,
            ,   3,
        Offset (0x83),
        CMAD,   3,
            ,   1,
        CMBD,   3,
        Offset (0x84),
        PTYP,   2,
            ,   2,
        LPTE,   2,
            ,   1,
        EPP9,   1,
            ,   6,
        AUEN,   1,
        AU97,   1,
        EHT,    8,
        PCT,    1,
        ALSS,   1,
        EMAS,   1,
        Offset (0x88),
        Offset (0x8C),
        CFGD,   16,
        Offset (0x96),
        ALSE,   8,
        ALAF,   8,
        LLOW,   8,
        LHIH,   8,
        Offset (0x9B),
        EMAE,   8,
        EMAP,   16,
        EMAL,   16,
        Offset (0xAA),
        D400,   8,
        Offset (0xB4),
        GTF0,   56,
        GTF2,   56,
        IDEM,   8
    }

    OperationRegion (RCRB, SystemMemory, 0xF0008000, 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
    }

    Mutex (MUTX, 0x00)
    Name (_S0, Package (0x03)  // _S0_: S0 System State
    {
        0x00,
        0x00,
        0x00
    })
    Name (_S3, Package (0x03)  // _S3_: S3 System State
    {
        0x05,
        0x05,
        0x00
    })
    Name (_S4, Package (0x03)  // _S4_: S4 System State
    {
        0x06,
        0x06,
        0x00
    })
    Name (_S5, Package (0x03)  // _S5_: S5 System State
    {
        0x07,
        0x07,
        0x00
    })
    Name (\PDC0, 0x80000000)
    Name (\PDC1, 0x80000000)
    Scope (\_PR)
    {
        Processor (CPU0, 0x00, 0x00001010, 0x06){}
        Processor (CPU1, 0x01, 0x00001010, 0x06){}
    }

    Name (\DSEN, 0x01)
    Name (\ECON, 0x00)
    Name (\GPIC, 0x00)
    Name (\CTYP, 0x00)
    Name (ECDY, 0x05)
    Name (\L01C, 0x00)
    Method (\_PIC, 1, NotSerialized)  // _PIC: Interrupt Model
    {
        GPIC = Arg0
    }

    Method (\_PTS, 1, NotSerialized)  // _PTS: Prepare To Sleep
    {
        PBST = 0x01
        While (PBST)
        {
            PBST = 0x01
        }

        If ((DBGS == 0x00))
        {
            RT10 = 0x00
        }

        If ((Arg0 == 0x01))
        {
            P80H = 0x51
        }
        ElseIf ((Arg0 == 0x02))
        {
            P80H = 0x52
        }
        ElseIf ((Arg0 == 0x03))
        {
            P80H = 0x53
            \_SB.GSMI (0x0A)
        }
        ElseIf ((Arg0 == 0x04))
        {
            P80H = 0x54
            \_SB.GSMI (0x03)
        }
        Else
        {
            P80H = 0x55
        }
    }

    Method (\_WAK, 1, NotSerialized)  // _WAK: Wake
    {
        If ((Arg0 == 0x01))
        {
            P80H = 0xE1
            Return (0x00)
        }
        ElseIf ((Arg0 == 0x02))
        {
            P80H = 0xE2
            Return (0x00)
        }
        ElseIf ((Arg0 == 0x03))
        {
            \_SB.GSMI (0x00)
            P80H = 0xE3
            Return (0x00)
        }
        ElseIf ((Arg0 == 0x04))
        {
            \_SB.GSMI (0x04)
            Notify (\_SB.PWRB, 0x02) // Device Wake
            P80H = 0xE4
            Return (0x00)
        }
        Else
        {
            P80H = 0xE5
            Return (0x00)
        }
    }

    Scope (\_GPE)
    {
        Method (_L01, 0, NotSerialized)  // _Lxx: Level-Triggered GPE, xx=0x00-0xFF
        {
            L01C += 0x01
            If (\_SB.PCI0.RP01.HPCS)
            {
                If (\_SB.PCI0.RP01.PDC1)
                {
                    \_SB.PCI0.RP01.PDC1 = 0x01
                }

                \_SB.PCI0.RP01.HPCS = 0x01
            }

            If (\_SB.PCI0.RP02.HPCS)
            {
                If (\_SB.PCI0.RP02.PDC2)
                {
                    \_SB.PCI0.RP02.PDC2 = 0x01
                }

                \_SB.PCI0.RP02.HPCS = 0x01
            }

            If (\_SB.PCI0.RP03.HPCS)
            {
                If (\_SB.PCI0.RP03.PDC3)
                {
                    \_SB.PCI0.RP03.PDC3 = 0x01
                }

                \_SB.PCI0.RP03.HPCS = 0x01
            }

            If (\_SB.PCI0.RP04.HPCS)
            {
                If (\_SB.PCI0.RP04.PDC4)
                {
                    \_SB.PCI0.RP04.PDC4 = 0x01
                }

                \_SB.PCI0.RP04.HPCS = 0x01
            }

            If (D400)
            {
                Name (TBF3, Buffer (0x05)
                {
                     0x07, 0x66, 0x66, 0x40, 0x01                     // .ff@.
                })
                CreateByteField (TBF3, 0x01, CLCK)
                If ((\_SB.PCI0.RP01.PDS1 == 0x00))
                {
                    CLCK &= 0xFB
                }

                If ((\_SB.PCI0.RP02.PDS2 == 0x00))
                {
                    CLCK &= 0xBF
                }

                If ((\_SB.PCI0.RP03.PDS3 == 0x00))
                {
                    CLCK &= 0xFD
                }

                If ((\_SB.PCI0.RP04.PDS4 == 0x00))
                {
                    CLCK &= 0xDF
                }

                \_SB.PCI0.SBUS.SBLW (0xDC, 0x00, TBF3, 0x00)
                Stall (0x64)
            }

            Local0 = GP23 /* \GP23 */
            Local1 = GP33 /* \GP33 */
            Local2 = GP25 /* \GP25 */
            GP23 = \_SB.PCI0.RP01.PDS1
            GP33 = \_SB.PCI0.RP02.PDS2
            GP25 = \_SB.PCI0.RP03.PDS3
            Sleep (0x64)
            If ((GP23 != Local0))
            {
                Notify (\_SB.PCI0.RP01, 0x00) // Bus Check
            }

            If ((GP33 != Local1))
            {
                Notify (\_SB.PCI0.RP02, 0x00) // Bus Check
            }

            If ((GP25 != Local2))
            {
                Notify (\_SB.PCI0.RP03, 0x00) // Bus Check
            }
        }

        Method (_L03, 0, NotSerialized)  // _Lxx: Level-Triggered GPE, xx=0x00-0xFF
        {
            Notify (\_SB.PCI0.USB1, 0x02) // Device Wake
        }

        Method (_L04, 0, NotSerialized)  // _Lxx: Level-Triggered GPE, xx=0x00-0xFF
        {
            Notify (\_SB.PCI0.USB2, 0x02) // Device Wake
        }

        Method (_L05, 0, NotSerialized)  // _Lxx: Level-Triggered GPE, xx=0x00-0xFF
        {
            If (AZAD)
            {
                Notify (\_SB.PCI0.MODM, 0x02) // Device Wake
            }
            Else
            {
                Notify (\_SB.PCI0.AZAL, 0x02) // Device Wake
            }
        }

        Method (_L07, 0, NotSerialized)  // _Lxx: Level-Triggered GPE, xx=0x00-0xFF
        {
            \_SB.PCI0.SBUS.HSTS = 0x20
        }

        Method (_L08, 0, NotSerialized)  // _Lxx: Level-Triggered GPE, xx=0x00-0xFF
        {
        }

        Method (_L09, 0, NotSerialized)  // _Lxx: Level-Triggered GPE, xx=0x00-0xFF
        {
            If (\_SB.PCI0.RP01.PSP1)
            {
                \_SB.PCI0.RP01.PSP1 = 0x01
                \_SB.PCI0.RP01.PMCS = 0x01
                Notify (\_SB.PCI0.RP01, 0x02) // Device Wake
            }

            If (\_SB.PCI0.RP02.PSP2)
            {
                \_SB.PCI0.RP02.PSP2 = 0x01
                \_SB.PCI0.RP02.PMCS = 0x01
                Notify (\_SB.PCI0.RP02, 0x02) // Device Wake
            }

            If (\_SB.PCI0.RP03.PSP3)
            {
                \_SB.PCI0.RP03.PSP3 = 0x01
                \_SB.PCI0.RP03.PMCS = 0x01
                Notify (\_SB.PCI0.RP03, 0x02) // Device Wake
            }

            If (\_SB.PCI0.RP04.PSP4)
            {
                \_SB.PCI0.RP04.PSP4 = 0x01
                \_SB.PCI0.RP04.PMCS = 0x01
                Notify (\_SB.PCI0.RP04, 0x02) // Device Wake
            }
        }

        Method (_L0B, 0, NotSerialized)  // _Lxx: Level-Triggered GPE, xx=0x00-0xFF
        {
            Notify (\_SB.PCI0.PCIB, 0x02) // Device Wake
        }

        Method (_L0C, 0, NotSerialized)  // _Lxx: Level-Triggered GPE, xx=0x00-0xFF
        {
            Notify (\_SB.PCI0.USB3, 0x02) // Device Wake
        }

        Method (_L0D, 0, NotSerialized)  // _Lxx: Level-Triggered GPE, xx=0x00-0xFF
        {
            Notify (\_SB.PCI0.USB7, 0x02) // Device Wake
        }

        Method (_L0E, 0, NotSerialized)  // _Lxx: Level-Triggered GPE, xx=0x00-0xFF
        {
            Notify (\_SB.PCI0.USB4, 0x02) // Device Wake
        }

        Method (_L1C, 0, NotSerialized)  // _Lxx: Level-Triggered GPE, xx=0x00-0xFF
        {
            LPOL = ~LPOL /* \LPOL */
            Notify (\_SB.LID0, 0x80) // Status Change
        }
    }

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

    OperationRegion (PMIO, SystemIO, 0x1000, 0x80)
    Field (PMIO, DWordAcc, NoLock, Preserve)
    {
        Offset (0x01),
        PBST,   1,
        Offset (0x02)
    }

    Method (GETP, 1, Serialized)
    {
        If (((Arg0 & 0x09) == 0x00))
        {
            Return (0xFFFFFFFF)
        }

        If (((Arg0 & 0x09) == 0x08))
        {
            Return (0x0384)
        }

        Local0 = ((Arg0 & 0x0300) >> 0x08)
        Local1 = ((Arg0 & 0x3000) >> 0x0C)
        Return ((0x1E * (0x09 - (Local0 + Local1))))
    }

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

            If ((Arg2 && Arg4))
            {
                Return (((0x04 - Arg3) * 0x0F))
            }

            Return (((0x04 - Arg3) * 0x1E))
        }

        Return (0xFFFFFFFF)
    }

    Method (GETT, 1, Serialized)
    {
        Return ((0x1E * (0x09 - (((Arg0 >> 0x02) & 0x03
            ) + (Arg0 & 0x03)))))
    }

    Method (GETF, 3, Serialized)
    {
        Name (TMPF, 0x00)
        If (Arg0)
        {
            TMPF |= 0x01
        }

        If ((Arg2 & 0x02))
        {
            TMPF |= 0x02
        }

        If (Arg1)
        {
            TMPF |= 0x04
        }

        If ((Arg2 & 0x20))
        {
            TMPF |= 0x08
        }

        If ((Arg2 & 0x4000))
        {
            TMPF |= 0x10
        }

        Return (TMPF) /* \GETF.TMPF */
    }

    Method (SETP, 3, Serialized)
    {
        If ((Arg0 > 0xF0))
        {
            Return (0x08)
        }
        Else
        {
            If ((Arg1 & 0x02))
            {
                If (((Arg0 <= 0x78) && (Arg2 & 0x02)))
                {
                    Return (0x2301)
                }

                If (((Arg0 <= 0xB4) && (Arg2 & 0x01)))
                {
                    Return (0x2101)
                }
            }

            Return (0x1001)
        }
    }

    Method (SDMA, 1, Serialized)
    {
        If ((Arg0 <= 0x14))
        {
            Return (0x01)
        }

        If ((Arg0 <= 0x1E))
        {
            Return (0x02)
        }

        If ((Arg0 <= 0x2D))
        {
            Return (0x01)
        }

        If ((Arg0 <= 0x3C))
        {
            Return (0x02)
        }

        If ((Arg0 <= 0x5A))
        {
            Return (0x01)
        }

        Return (0x00)
    }

    Method (SETT, 3, Serialized)
    {
        If ((Arg1 & 0x02))
        {
            If (((Arg0 <= 0x78) && (Arg2 & 0x02)))
            {
                Return (0x0B)
            }

            If (((Arg0 <= 0xB4) && (Arg2 & 0x01)))
            {
                Return (0x09)
            }
        }

        Return (0x04)
    }

    Scope (\_SB)
    {
        Device (LID0)
        {
            Name (_HID, EisaId ("PNP0C0D") /* Lid Device */)  // _HID: Hardware ID
            Method (_LID, 0, NotSerialized)  // _LID: Lid Status
            {
                Return (LPOL) /* \LPOL */
            }
        }

        Device (PWRB)
        {
            Name (_HID, EisaId ("PNP0C0C") /* Power Button Device */)  // _HID: Hardware ID
        }

        Device (SLPB)
        {
            Name (_HID, EisaId ("PNP0C0E") /* Sleep Button Device */)  // _HID: Hardware ID
        }

        Device (PCI0)
        {
            Method (_INI, 0, NotSerialized)  // _INI: Initialize
            {
                If (CondRefOf (_OSI, Local0))
                {
                    MYOS = 0x00
                    If ((CFGD && 0x4000))
                    {
                        SMIF = 0x32
                        TRP0 = 0x00
                    }
                }
                ElseIf ((SizeOf (_OS) == 0x14))
                {
                    MYOS = 0x01
                }
                ElseIf ((SizeOf (_OS) == 0x27))
                {
                    MYOS = 0x02
                }
                Else
                {
                    MYOS = 0x03
                }
            }

            Method (_S1D, 0, NotSerialized)  // _S1D: S1 Device State
            {
                If ((MYOS == 0x02))
                {
                    Return (0x02)
                }

                Return (0x01)
            }

            Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
            {
                Return (0x02)
            }

            Method (_S4D, 0, NotSerialized)  // _S4D: S4 Device State
            {
                Return (0x02)
            }

            Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */) // _HID: Hardware ID             Name (_CID, EisaId ("PNP0A03") /* PCI Bus */)  // _CID: Compatible ID
            Name (_ADR, 0x00)  // _ADR: Address
            Name (_BBN, 0x00)  // _BBN: BIOS Bus Number
            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, DenseTranslation)
                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, DenseTranslation)
                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)  // _CRS: Current Resource Settings
            {
                If (PM1L)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y00._LEN, C0LN)  // _LEN: Length
                    C0LN = Zero
                }

                If ((PM1L == 0x01))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y00._RW, C0RW)  // _RW_: Read-Write Status
                    C0RW = Zero
                }

                If (PM1H)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y01._LEN, C4LN)  // _LEN: Length
                    C4LN = Zero
                }

                If ((PM1H == 0x01))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y01._RW, C4RW)  // _RW_: Read-Write Status
                    C4RW = Zero
                }

                If (PM2L)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y02._LEN, C8LN)  // _LEN: Length
                    C8LN = Zero
                }

                If ((PM2L == 0x01))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y02._RW, C8RW)  // _RW_: Read-Write Status
                    C8RW = Zero
                }

                If (PM2H)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y03._LEN, CCLN)  // _LEN: Length
                    CCLN = Zero
                }

                If ((PM2H == 0x01))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y03._RW, CCRW)  // _RW_: Read-Write Status
                    CCRW = Zero
                }

                If (PM3L)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y04._LEN, D0LN)  // _LEN: Length
                    D0LN = Zero
                }

                If ((PM3L == 0x01))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y04._RW, D0RW)  // _RW_: Read-Write Status
                    D0RW = Zero
                }

                If (PM3H)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y05._LEN, D4LN)  // _LEN: Length
                    D4LN = Zero
                }

                If ((PM3H == 0x01))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y05._RW, D4RW)  // _RW_: Read-Write Status
                    D4RW = Zero
                }

                If (PM4L)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y06._LEN, D8LN)  // _LEN: Length
                    D8LN = Zero
                }

                If ((PM4L == 0x01))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y06._RW, D8RW)  // _RW_: Read-Write Status
                    D8RW = Zero
                }

                If (PM4H)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y07._LEN, DCLN)  // _LEN: Length
                    DCLN = Zero
                }

                If ((PM4H == 0x01))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y07._RW, DCRW)  // _RW_: Read-Write Status
                    DCRW = Zero
                }

                If (PM5L)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y08._LEN, E0LN)  // _LEN: Length
                    E0LN = Zero
                }

                If ((PM5L == 0x01))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y08._RW, E0RW)  // _RW_: Read-Write Status
                    E0RW = Zero
                }

                If (PM5H)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y09._LEN, E4LN)  // _LEN: Length
                    E4LN = Zero
                }

                If ((PM5H == 0x01))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y09._RW, E4RW)  // _RW_: Read-Write Status
                    E4RW = Zero
                }

                If (PM6L)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y0A._LEN, E8LN)  // _LEN: Length
                    E8LN = Zero
                }

                If ((PM6L == 0x01))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y0A._RW, E8RW)  // _RW_: Read-Write Status
                    E8RW = Zero
                }

                If (PM6H)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y0B._LEN, ECLN)  // _LEN: Length
                    ECLN = Zero
                }

                If ((PM6H == 0x01))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y0B._RW, ECRW)  // _RW_: Read-Write Status
                    ECRW = Zero
                }

                If (PM0H)
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y0C._LEN, F0LN)  // _LEN: Length
                    F0LN = Zero
                }

                If ((PM0H == 0x01))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y0C._RW, F0RW)  // _RW_: Read-Write Status
                    F0RW = Zero
                }

                CreateDWordField (BUF0, \_SB.PCI0._Y0D._MIN, M1MN)  // _MIN: Minimum Base Address                 CreateDWordField (BUF0, \_SB.PCI0._Y0D._MAX, M1MX)  // _MAX: Maximum Base Address                 CreateDWordField (BUF0, \_SB.PCI0._Y0D._LEN, M1LN)  // _LEN: Length
                M1MN = (TOUD << 0x1B)
                M1LN = ((M1MX - M1MN) + 0x01)
                Return (BUF0) /* \_SB_.PCI0.BUF0 */
            }

            Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
            {
                If (GPIC)
                {
                    Return (Package (0x10)
                    {
                        Package (0x04)
                        {
                            0x0001FFFF,
                            0x00,
                            0x00,
                            0x10
                        },

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

                        Package (0x04)
                        {
                            0x001BFFFF,
                            0x00,
                            0x00,
                            0x10
                        },

                        Package (0x04)
                        {
                            0x001CFFFF,
                            0x00,
                            0x00,
                            0x11
                        },

                        Package (0x04)
                        {
                            0x001CFFFF,
                            0x01,
                            0x00,
                            0x10
                        },

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

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

                        Package (0x04)
                        {
                            0x001DFFFF,
                            0x00,
                            0x00,
                            0x17
                        },

                        Package (0x04)
                        {
                            0x001DFFFF,
                            0x01,
                            0x00,
                            0x13
                        },

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

                        Package (0x04)
                        {
                            0x001DFFFF,
                            0x03,
                            0x00,
                            0x10
                        },

                        Package (0x04)
                        {
                            0x001EFFFF,
                            0x00,
                            0x00,
                            0x11
                        },

                        Package (0x04)
                        {
                            0x001EFFFF,
                            0x01,
                            0x00,
                            0x14
                        },

                        Package (0x04)
                        {
                            0x001FFFFF,
                            0x00,
                            0x00,
                            0x12
                        },

                        Package (0x04)
                        {
                            0x001FFFFF,
                            0x01,
                            0x00,
                            0x13
                        },

                        Package (0x04)
                        {
                            0x001FFFFF,
                            0x03,
                            0x00,
                            0x10
                        }
                    })
                }
                Else
                {
                    Return (Package (0x10)
                    {
                        Package (0x04)
                        {
                            0x0001FFFF,
                            0x00,
                            \_SB.PCI0.LPCB.LNKA,
                            0x00
                        },

                        Package (0x04)
                        {
                            0x0002FFFF,
                            0x00,
                            \_SB.PCI0.LPCB.LNKA,
                            0x00
                        },

                        Package (0x04)
                        {
                            0x001BFFFF,
                            0x00,
                            \_SB.PCI0.LPCB.LNKA,
                            0x00
                        },

                        Package (0x04)
                        {
                            0x001CFFFF,
                            0x00,
                            \_SB.PCI0.LPCB.LNKB,
                            0x00
                        },

                        Package (0x04)
                        {
                            0x001CFFFF,
                            0x01,
                            \_SB.PCI0.LPCB.LNKA,
                            0x00
                        },

                        Package (0x04)
                        {
                            0x001CFFFF,
                            0x02,
                            \_SB.PCI0.LPCB.LNKC,
                            0x00
                        },

                        Package (0x04)
                        {
                            0x001CFFFF,
                            0x03,
                            \_SB.PCI0.LPCB.LNKD,
                            0x00
                        },

                        Package (0x04)
                        {
                            0x001DFFFF,
                            0x00,
                            \_SB.PCI0.LPCB.LNKH,
                            0x00
                        },

                        Package (0x04)
                        {
                            0x001DFFFF,
                            0x01,
                            \_SB.PCI0.LPCB.LNKD,
                            0x00
                        },

                        Package (0x04)
                        {
                            0x001DFFFF,
                            0x02,
                            \_SB.PCI0.LPCB.LNKC,
                            0x00
                        },

                        Package (0x04)
                        {
                            0x001DFFFF,
                            0x03,
                            \_SB.PCI0.LPCB.LNKA,
                            0x00
                        },

                        Package (0x04)
                        {
                            0x001EFFFF,
                            0x00,
                            \_SB.PCI0.LPCB.LNKB,
                            0x00
                        },

                        Package (0x04)
                        {
                            0x001EFFFF,
                            0x01,
                            \_SB.PCI0.LPCB.LNKE,
                            0x00
                        },

                        Package (0x04)
                        {
                            0x001FFFFF,
                            0x00,
                            \_SB.PCI0.LPCB.LNKC,
                            0x00
                        },

                        Package (0x04)
                        {
                            0x001FFFFF,
                            0x01,
                            \_SB.PCI0.LPCB.LNKD,
                            0x00
                        },

                        Package (0x04)
                        {
                            0x001FFFFF,
                            0x03,
                            \_SB.PCI0.LPCB.LNKA,
                            0x00
                        }
                    })
                }
            }

            Device (PDRC)
            {
                Name (_HID, EisaId ("PNP0C02") /* PNP Motherboard Resources */)  // _HID: Hardware ID
                Name (_UID, 0x01)  // _UID: Unique ID
                Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
                {
                    Memory32Fixed (ReadWrite,
                        0xE0000000,         // Address Base
                        0x10000000,         // 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,
                        0xF0008000,         // Address Base
                        0x00004000,         // Address Length
                        )
                    Memory32Fixed (ReadWrite,
                        0xFEC00000,         // Address Base
                        0x00001000,         // Address Length
                        )
                    Memory32Fixed (ReadWrite,
                        0xFEE00000,         // Address Base
                        0x00001000,         // Address Length
                        )
                    Memory32Fixed (ReadWrite,
                        0xFED20000,         // Address Base
                        0x00070000,         // Address Length
                        )
                })
            }

            Device (PEGP)
            {
                Name (_ADR, 0x00010000)  // _ADR: Address
                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    If (GPIC)
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0xFFFF,
                                0x00,
                                0x00,
                                0x10
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x01,
                                0x00,
                                0x11
                            },

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

                            Package (0x04)
                            {
                                0xFFFF,
                                0x03,
                                0x00,
                                0x13
                            }
                        })
                    }
                    Else
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0xFFFF,
                                0x00,
                                \_SB.PCI0.LPCB.LNKA,
                                0x00
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x01,
                                \_SB.PCI0.LPCB.LNKB,
                                0x00
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x02,
                                \_SB.PCI0.LPCB.LNKC,
                                0x00
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x03,
                                \_SB.PCI0.LPCB.LNKD,
                                0x00
                            }
                        })
                    }
                }
            }

            Device (GFX0)
            {
                Name (_ADR, 0x00020000)  // _ADR: Address
                Method (_DOS, 1, NotSerialized)  // _DOS: Disable Output Switching
                {
                    DSEN = (Arg0 & 0x03)
                }

                Method (_DOD, 0, NotSerialized)  // _DOD: Display Output Devices
                {
                    Return (Package (0x03)
                    {
                        0x00010100,
                        0x00010400,
                        0x00010200
                    })
                }

                Device (LCD)
                {
                    Name (_ADR, 0x0400)  // _ADR: Address
                    Method (_DCS, 0, NotSerialized)  // _DCS: Display Current Status
                    {
                        \_SB.GSMI (0x09)
                        If ((CSTE & 0x01))
                        {
                            Return (0x1F)
                        }
                        Else
                        {
                            Return (0x1D)
                        }
                    }

                    Method (_DGS, 0, NotSerialized)  // _DGS: Display Graphics State
                    {
                        If ((NSTE & 0x01))
                        {
                            Return (0x01)
                        }
                        Else
                        {
                            Return (0x00)
                        }
                    }

                    Method (_DSS, 1, NotSerialized)  // _DSS: Device Set State
                    {
                        If (((Arg0 & 0xC0000000) == 0xC0000000))
                        {
                            CSTE = NSTE /* \NSTE */
                        }
                    }
                }

                Device (CRT1)
                {
                    Name (_ADR, 0x0100)  // _ADR: Address
                    Method (_DCS, 0, NotSerialized)  // _DCS: Display Current Status
                    {
                        \_SB.GSMI (0x09)
                        If ((CSTE & 0x02))
                        {
                            Return (0x1F)
                        }
                        Else
                        {
                            Return (0x1D)
                        }
                    }

                    Method (_DGS, 0, NotSerialized)  // _DGS: Display Graphics State
                    {
                        If ((NSTE & 0x02))
                        {
                            Return (0x01)
                        }
                        Else
                        {
                            Return (0x00)
                        }
                    }

                    Method (_DSS, 1, NotSerialized)  // _DSS: Device Set State
                    {
                        If (((Arg0 & 0xC0000000) == 0xC0000000))
                        {
                            CSTE = NSTE /* \NSTE */
                        }
                    }
                }

                Device (DTV1)
                {
                    Name (_ADR, 0x0200)  // _ADR: Address
                    Method (_DCS, 0, NotSerialized)  // _DCS: Display Current Status
                    {
                        \_SB.GSMI (0x09)
                        If ((CSTE & 0x04))
                        {
                            Return (0x1F)
                        }
                        Else
                        {
                            Return (0x1D)
                        }
                    }

                    Method (_DGS, 0, NotSerialized)  // _DGS: Display Graphics State
                    {
                        If ((NSTE & 0x04))
                        {
                            Return (0x01)
                        }
                        Else
                        {
                            Return (0x00)
                        }
                    }

                    Method (_DSS, 1, NotSerialized)  // _DSS: Device Set State
                    {
                        If (((Arg0 & 0xC0000000) == 0xC0000000))
                        {
                            CSTE = NSTE /* \NSTE */
                        }
                    }
                }

                Method (DSSW, 0, NotSerialized)
                {
                    \_SB.GSMI (0x09)
                    If ((0x00 == DSEN))
                    {
                        PADL = CADL /* \CADL */
                        If ((CADL == 0x01))
                        {
                            NSTE = 0x01
                        }

                        If ((CADL == 0x03))
                        {
                            If ((CSTE == 0x04))
                            {
                                NSTE = 0x01
                            }

                            If ((CSTE == 0x01))
                            {
                                NSTE = 0x02
                            }

                            If ((CSTE == 0x02))
                            {
                                NSTE = 0x03
                            }

                            If ((CSTE == 0x03))
                            {
                                NSTE = 0x01
                            }
                        }

                        If ((CADL == 0x05))
                        {
                            If ((CSTE == 0x02))
                            {
                                NSTE = 0x01
                            }

                            If ((CSTE == 0x01))
                            {
                                NSTE = 0x04
                            }

                            If ((CSTE == 0x04))
                            {
                                NSTE = 0x05
                            }

                            If ((CSTE == 0x05))
                            {
                                NSTE = 0x01
                            }
                        }

                        If ((CADL == 0x07))
                        {
                            If ((CSTE == 0x01))
                            {
                                NSTE = 0x03
                            }

                            If ((CSTE == 0x03))
                            {
                                NSTE = 0x02
                            }

                            If ((CSTE == 0x02))
                            {
                                NSTE = 0x05
                            }

                            If ((CSTE == 0x05))
                            {
                                NSTE = 0x04
                            }

                            If ((CSTE == 0x04))
                            {
                                NSTE = 0x01
                            }
                        }

                        Notify (\_SB.PCI0.GFX0, 0x80) // Status Change
                    }

                    If ((0x01 == DSEN))
                    {
                        \_SB.GSMI (0x08)
                        Notify (\_SB.PCI0.GFX0, 0x81) // Information Change
                    }
                }
            }

            Device (AZAL)
            {
                Name (_ADR, 0x001B0000)  // _ADR: Address
                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x05,
                    0x04
                })
            }

            Device (RP01)
            {
                Name (_ADR, 0x001C0000)  // _ADR: Address
                OperationRegion (P1CS, PCI_Config, 0x40, 0x0100)
                Field (P1CS, AnyAcc, NoLock, WriteAsZeros)
                {
                    Offset (0x1A),
                    ABP1,   1,
                        ,   2,
                    PDC1,   1,
                        ,   2,
                    PDS1,   1,
                    Offset (0x20),
                    Offset (0x22),
                    PSP1,   1,
                    Offset (0x9C),
                        ,   30,
                    HPCS,   1,
                    PMCS,   1
                }

                Device (PXS1)
                {
                    Name (_ADR, 0x00)  // _ADR: Address
                    Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                    {
                        Return (0x01)
                    }
                }

                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x09,
                    0x04
                })
                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    If (\GPIC)
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0xFFFF,
                                0x00,
                                0x00,
                                0x10
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x01,
                                0x00,
                                0x11
                            },

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

                            Package (0x04)
                            {
                                0xFFFF,
                                0x03,
                                0x00,
                                0x13
                            }
                        })
                    }
                    Else
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0xFFFF,
                                0x00,
                                \_SB.PCI0.LPCB.LNKA,
                                0x00
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x01,
                                \_SB.PCI0.LPCB.LNKB,
                                0x00
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x02,
                                \_SB.PCI0.LPCB.LNKC,
                                0x00
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x03,
                                \_SB.PCI0.LPCB.LNKD,
                                0x00
                            }
                        })
                    }
                }
            }

            Device (RP02)
            {
                Name (_ADR, 0x001C0001)  // _ADR: Address
                OperationRegion (P2CS, PCI_Config, 0x40, 0x0100)
                Field (P2CS, AnyAcc, NoLock, WriteAsZeros)
                {
                    Offset (0x1A),
                    ABP2,   1,
                        ,   2,
                    PDC2,   1,
                        ,   2,
                    PDS2,   1,
                    Offset (0x20),
                    Offset (0x22),
                    PSP2,   1,
                    Offset (0x9C),
                        ,   30,
                    HPCS,   1,
                    PMCS,   1
                }

                Device (PXS2)
                {
                    Name (_ADR, 0x00)  // _ADR: Address
                    Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                    {
                        Return (0x01)
                    }
                }

                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x09,
                    0x04
                })
                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    If (\GPIC)
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0xFFFF,
                                0x00,
                                0x00,
                                0x11
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x01,
                                0x00,
                                0x12
                            },

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

                            Package (0x04)
                            {
                                0xFFFF,
                                0x03,
                                0x00,
                                0x10
                            }
                        })
                    }
                    Else
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0xFFFF,
                                0x00,
                                \_SB.PCI0.LPCB.LNKB,
                                0x00
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x01,
                                \_SB.PCI0.LPCB.LNKC,
                                0x00
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x02,
                                \_SB.PCI0.LPCB.LNKD,
                                0x00
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x03,
                                \_SB.PCI0.LPCB.LNKA,
                                0x00
                            }
                        })
                    }
                }
            }

            Device (RP03)
            {
                Name (_ADR, 0x001C0002)  // _ADR: Address
                OperationRegion (P3CS, PCI_Config, 0x40, 0x0100)
                Field (P3CS, AnyAcc, NoLock, WriteAsZeros)
                {
                    Offset (0x1A),
                    ABP3,   1,
                        ,   2,
                    PDC3,   1,
                        ,   2,
                    PDS3,   1,
                    Offset (0x20),
                    Offset (0x22),
                    PSP3,   1,
                    Offset (0x9C),
                        ,   30,
                    HPCS,   1,
                    PMCS,   1
                }

                Device (PXS0)
                {
                    Name (_ADR, 0x00)  // _ADR: Address
                    Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                    {
                        Return (0x01)
                    }
                }

                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x09,
                    0x04
                })
                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    If (\GPIC)
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0xFFFF,
                                0x00,
                                0x00,
                                0x12
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x01,
                                0x00,
                                0x13
                            },

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

                            Package (0x04)
                            {
                                0xFFFF,
                                0x03,
                                0x00,
                                0x11
                            }
                        })
                    }
                    Else
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0xFFFF,
                                0x00,
                                \_SB.PCI0.LPCB.LNKC,
                                0x00
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x01,
                                \_SB.PCI0.LPCB.LNKD,
                                0x00
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x02,
                                \_SB.PCI0.LPCB.LNKA,
                                0x00
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x03,
                                \_SB.PCI0.LPCB.LNKB,
                                0x00
                            }
                        })
                    }
                }
            }

            Device (RP04)
            {
                Name (_ADR, 0x001C0003)  // _ADR: Address
                OperationRegion (P4CS, PCI_Config, 0x40, 0x0100)
                Field (P4CS, AnyAcc, NoLock, WriteAsZeros)
                {
                    Offset (0x1A),
                    ABP4,   1,
                        ,   2,
                    PDC4,   1,
                        ,   2,
                    PDS4,   1,
                    Offset (0x20),
                    Offset (0x22),
                    PSP4,   1,
                    Offset (0x9C),
                        ,   30,
                    HPCS,   1,
                    PMCS,   1
                }

                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x09,
                    0x04
                })
                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    If (\GPIC)
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0xFFFF,
                                0x00,
                                0x00,
                                0x13
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x01,
                                0x00,
                                0x10
                            },

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

                            Package (0x04)
                            {
                                0xFFFF,
                                0x03,
                                0x00,
                                0x12
                            }
                        })
                    }
                    Else
                    {
                        Return (Package (0x04)
                        {
                            Package (0x04)
                            {
                                0xFFFF,
                                0x00,
                                \_SB.PCI0.LPCB.LNKD,
                                0x00
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x01,
                                \_SB.PCI0.LPCB.LNKA,
                                0x00
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x02,
                                \_SB.PCI0.LPCB.LNKB,
                                0x00
                            },

                            Package (0x04)
                            {
                                0xFFFF,
                                0x03,
                                \_SB.PCI0.LPCB.LNKC,
                                0x00
                            }
                        })
                    }
                }
            }

            Device (USB1)
            {
                Name (_ADR, 0x001D0000)  // _ADR: Address
                OperationRegion (U1CS, PCI_Config, 0xC4, 0x04)
                Field (U1CS, DWordAcc, NoLock, Preserve)
                {
                    U1EN,   2
                }

                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x03,
                    0x03
                })
                Method (_PSW, 1, NotSerialized)  // _PSW: Power State Wake
                {
                    If (Arg0)
                    {
                        U1EN = 0x03
                    }
                    Else
                    {
                        U1EN = 0x00
                    }
                }

                Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                {
                    Return (0x02)
                }

                Method (_S4D, 0, NotSerialized)  // _S4D: S4 Device State
                {
                    Return (0x02)
                }
            }

            Device (USB2)
            {
                Name (_ADR, 0x001D0001)  // _ADR: Address
                OperationRegion (U2CS, PCI_Config, 0xC4, 0x04)
                Field (U2CS, DWordAcc, NoLock, Preserve)
                {
                    U2EN,   2
                }

                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x04,
                    0x03
                })
                Method (_PSW, 1, NotSerialized)  // _PSW: Power State Wake
                {
                    If (Arg0)
                    {
                        U2EN = 0x03
                    }
                    Else
                    {
                        U2EN = 0x00
                    }
                }

                Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                {
                    Return (0x02)
                }

                Method (_S4D, 0, NotSerialized)  // _S4D: S4 Device State
                {
                    Return (0x02)
                }
            }

            Device (USB3)
            {
                Name (_ADR, 0x001D0002)  // _ADR: Address
                OperationRegion (U3CS, PCI_Config, 0xC4, 0x04)
                Field (U3CS, DWordAcc, NoLock, Preserve)
                {
                    U3EN,   2
                }

                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x0C,
                    0x03
                })
                Method (_PSW, 1, NotSerialized)  // _PSW: Power State Wake
                {
                    If (Arg0)
                    {
                        U3EN = 0x03
                    }
                    Else
                    {
                        U3EN = 0x00
                    }
                }

                Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                {
                    Return (0x02)
                }

                Method (_S4D, 0, NotSerialized)  // _S4D: S4 Device State
                {
                    Return (0x02)
                }
            }

            Device (USB4)
            {
                Name (_ADR, 0x001D0003)  // _ADR: Address
                OperationRegion (U4CS, PCI_Config, 0xC4, 0x04)
                Field (U4CS, DWordAcc, NoLock, Preserve)
                {
                    U4EN,   2
                }

                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x0E,
                    0x03
                })
                Method (_PSW, 1, NotSerialized)  // _PSW: Power State Wake
                {
                    If (Arg0)
                    {
                        U4EN = 0x03
                    }
                    Else
                    {
                        U4EN = 0x00
                    }
                }

                Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                {
                    Return (0x02)
                }

                Method (_S4D, 0, NotSerialized)  // _S4D: S4 Device State
                {
                    Return (0x02)
                }
            }

            Device (USB7)
            {
                Name (_ADR, 0x001D0007)  // _ADR: Address
                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x0D,
                    0x03
                })
            }

            Device (PCIB)
            {
                Name (_ADR, 0x001E0000)  // _ADR: Address
                Device (ELAN)
                {
                    Name (_ADR, 0x00010000)  // _ADR: Address
                    Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                    {
                        0x0B,
                        0x03
                    })
                }

                Method (_PRT, 0, NotSerialized)  // _PRT: PCI Routing Table
                {
                    If (GPIC)
                    {
                        Return (Package (0x08)
                        {
                            Package (0x04)
                            {
                                0xFFFF,
                                0x00,
                                0x00,
                                0x14
                            },

                            Package (0x04)
                            {
                                0x0001FFFF,
                                0x00,
                                0x00,
                                0x15
                            },

                            Package (0x04)
                            {
                                0x0002FFFF,
                                0x00,
                                0x00,
                                0x16
                            },

                            Package (0x04)
                            {
                                0x0002FFFF,
                                0x01,
                                0x00,
                                0x17
                            },

                            Package (0x04)
                            {
                                0x0003FFFF,
                                0x00,
                                0x00,
                                0x17
                            },

                            Package (0x04)
                            {
                                0x0003FFFF,
                                0x01,
                                0x00,
                                0x16
                            },

                            Package (0x04)
                            {
                                0x0004FFFF,
                                0x00,
                                0x00,
                                0x10
                            },

                            Package (0x04)
                            {
                                0x0004FFFF,
                                0x01,
                                0x00,
                                0x11
                            }
                        })
                    }
                    Else
                    {
                        Return (Package (0x08)
                        {
                            Package (0x04)
                            {
                                0xFFFF,
                                0x00,
                                \_SB.PCI0.LPCB.LNKE,
                                0x00
                            },

                            Package (0x04)
                            {
                                0x0001FFFF,
                                0x00,
                                \_SB.PCI0.LPCB.LNKF,
                                0x00
                            },

                            Package (0x04)
                            {
                                0x0002FFFF,
                                0x00,
                                \_SB.PCI0.LPCB.LNKG,
                                0x00
                            },

                            Package (0x04)
                            {
                                0x0002FFFF,
                                0x01,
                                \_SB.PCI0.LPCB.LNKH,
                                0x00
                            },

                            Package (0x04)
                            {
                                0x0003FFFF,
                                0x00,
                                \_SB.PCI0.LPCB.LNKH,
                                0x00
                            },

                            Package (0x04)
                            {
                                0x0003FFFF,
                                0x01,
                                \_SB.PCI0.LPCB.LNKG,
                                0x00
                            },

                            Package (0x04)
                            {
                                0x0004FFFF,
                                0x00,
                                \_SB.PCI0.LPCB.LNKA,
                                0x00
                            },

                            Package (0x04)
                            {
                                0x0004FFFF,
                                0x01,
                                \_SB.PCI0.LPCB.LNKB,
                                0x00
                            }
                        })
                    }
                }
            }

            Device (AUD0)
            {
                Name (_ADR, 0x001E0002)  // _ADR: Address
            }

            Device (MODM)
            {
                Name (_ADR, 0x001E0003)  // _ADR: Address
                Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
                {
                    0x05,
                    0x04
                })
            }

            Device (LPCB)
            {
                Name (_ADR, 0x001F0000)  // _ADR: Address
                OperationRegion (LPC0, PCI_Config, 0x40, 0xC0)
                Field (LPC0, AnyAcc, NoLock, Preserve)
                {
                    Offset (0x20),
                    PARC,   8,
                    PBRC,   8,
                    PCRC,   8,
                    PDRC,   8,
                    Offset (0x28),
                    PERC,   8,
                    PFRC,   8,
                    PGRC,   8,
                    PHRC,   8,
                    Offset (0x40),
                    IOD0,   8,
                    IOD1,   8,
                    SIOE,   8,
                    Offset (0x48),
                    IOR2,   16
                }

                Device (DMAC)
                {
                    Name (_HID, EisaId ("PNP0200") /* PC-class DMA Controller */)  // _HID: Hardware ID                     Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
                    {
                        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 (FWHD)
                {
                    Name (_HID, EisaId ("INT0800") /* Intel 82802 Firmware Hub Device */)  // _HID: Hardware ID                     Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
                    {
                        Memory32Fixed (ReadOnly,
                            0xFF800000,         // Address Base
                            0x00800000,         // Address Length
                            )
                    })
                }

                Device (HPET)
                {
                    Name (_HID, EisaId ("PNP0103") /* HPET System Timer */)  // _HID: Hardware ID
                    Name (BUF0, ResourceTemplate ()
                    {
                        IRQNoFlags ()
                            {0}
                        IRQNoFlags ()
                            {8}
                        Memory32Fixed (ReadOnly,
                            0xFED00000,         // Address Base
                            0x00000400,         // Address Length
                            _Y0E)
                    })
                    Method (_STA, 0, NotSerialized)  // _STA: Status
                    {
                        If ((MYOS == 0x00))
                        {
                            If (HPAE)
                            {
                                Return (0x0F)
                            }
                        }
                        ElseIf (HPAE)
                        {
                            Return (0x0B)
                        }

                        Return (0x00)
                    }

                    Method (_CRS, 0, Serialized)  // _CRS: Current Resource Settings
                    {
                        If (HPAE)
                        {
                            CreateDWordField (BUF0, \_SB.PCI0.LPCB.HPET._Y0E._BAS, HPT0)  // _BAS: Base Address
                            If ((HPAS == 0x01))
                            {
                                HPT0 = 0xFED01000
                            }

                            If ((HPAS == 0x02))
                            {
                                HPT0 = 0xFED02000
                            }

                            If ((HPAS == 0x03))
                            {
                                HPT0 = 0xFED03000
                            }
                        }

                        Return (BUF0) /* \_SB_.PCI0.LPCB.HPET.BUF0 */
                    }
                }

                Device (IPIC)
                {
                    Name (_HID, EisaId ("PNP0000") /* 8259-compatible Programmable Interrupt Controller */)  // _HID: Hardware ID                     Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
                    {
                        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 (MATH)
                {
                    Name (_HID, EisaId ("PNP0C04") /* x87-compatible Floating Point Processing Unit */)  // _HID: Hardware ID                     Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
                    {
                        IO (Decode16,
                            0x00F0,             // Range Minimum
                            0x00F0,             // Range Maximum
                            0x01,               // Alignment
                            0x01,               // Length
                            )
                        IRQNoFlags ()
                            {13}
                    })
                }

                Device (LDRC)
                {
                    Name (_HID, EisaId ("PNP0C02") /* PNP Motherboard Resources */)  // _HID: Hardware ID
                    Name (_UID, 0x02)  // _UID: Unique ID
                    Name (BUF0, ResourceTemplate ()
                    {
                        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,
                            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,
                            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,
                            0x0600,             // Range Minimum
                            0x0600,             // Range Maximum
                            0x01,               // Alignment
                            0x10,               // Length
                            )
                        IO (Decode16,
                            0x0680,             // Range Minimum
                            0x0680,             // Range Maximum
                            0x01,               // Alignment
                            0x80,               // Length
                            )
                        IO (Decode16,
                            0x0800,             // Range Minimum
                            0x0800,             // Range Maximum
                            0x01,               // Alignment
                            0x10,               // Length
                            )
                        IO (Decode16,
                            0x1000,             // Range Minimum
                            0x1000,             // Range Maximum
                            0x01,               // Alignment
                            0x80,               // Length
                            )
                        IO (Decode16,
                            0x1180,             // Range Minimum
                            0x1180,             // Range Maximum
                            0x01,               // Alignment
                            0x40,               // Length
                            )
                        IO (Decode16,
                            0x1640,             // Range Minimum
                            0x1640,             // Range Maximum
                            0x01,               // Alignment
                            0x10,               // Length
                            )
                        Memory32Fixed (ReadWrite,
                            0xE0000000,         // Address Base
                            0x10000000,         // Address Length
                            )
                        Memory32Fixed (ReadWrite,
                            0xF0008000,         // 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
                            )
                    })
                    Name (BUF1, ResourceTemplate ()
                    {
                        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,
                            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,
                            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,
                            0x0680,             // Range Minimum
                            0x0680,             // Range Maximum
                            0x01,               // Alignment
                            0x80,               // Length
                            )
                        IO (Decode16,
                            0x0800,             // Range Minimum
                            0x0800,             // Range Maximum
                            0x01,               // Alignment
                            0x10,               // Length
                            )
                        IO (Decode16,
                            0x1000,             // Range Minimum
                            0x1000,             // Range Maximum
                            0x01,               // Alignment
                            0x80,               // Length
                            )
                        IO (Decode16,
                            0x1180,             // Range Minimum
                            0x1180,             // Range Maximum
                            0x01,               // Alignment
                            0x40,               // Length
                            )
                        IO (Decode16,
                            0x1640,             // Range Minimum
                            0x1640,             // Range Maximum
                            0x01,               // Alignment
                            0x10,               // Length
                            )
                    })
                    Method (_CRS, 0, Serialized)  // _CRS: Current Resource Settings
                    {
                        If (0x01)
                        {
                            Return (BUF0) /* \_SB_.PCI0.LPCB.LDRC.BUF0 */
                        }

                        Return (BUF1) /* \_SB_.PCI0.LPCB.LDRC.BUF1 */
                    }
                }

                Device (RTC)
                {
                    Name (_HID, EisaId ("PNP0B00") /* AT Real-Time Clock */)  // _HID: Hardware ID
                    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)  // _CRS: Current Resource Settings
                    {
                        If (HPAE)
                        {
                            Return (BUF0) /* \_SB_.PCI0.LPCB.RTC_.BUF0 */
                        }

                        Return (BUF1) /* \_SB_.PCI0.LPCB.RTC_.BUF1 */
                    }
                }

                Device (TIMR)
                {
                    Name (_HID, EisaId ("PNP0100") /* PC-class System Timer */)  // _HID: Hardware ID
                    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)  // _CRS: Current Resource Settings
                    {
                        If (HPAE)
                        {
                            Return (BUF0) /* \_SB_.PCI0.LPCB.TIMR.BUF0 */
                        }

                        Return (BUF1) /* \_SB_.PCI0.LPCB.TIMR.BUF1 */
                    }
                }

                Device (LNKA)
                {
                    Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */)  // _HID: Hardware ID
                    Name (_UID, 0x01)  // _UID: Unique ID
                    Method (_DIS, 0, Serialized)  // _DIS: Disable Device
                    {
                        PARC = 0x80
                    }

                    Name (_PRS, ResourceTemplate ()  // _PRS: Possible Resource Settings
                    {
                        IRQ (Level, ActiveLow, Shared, )
                            {1,3,4,5,6,7,10,12,14,15}
                    })
                    Method (_CRS, 0, Serialized)  // _CRS: Current Resource Settings
                    {
                        Name (RTLA, ResourceTemplate ()
                        {
                            IRQ (Level, ActiveLow, Shared, _Y0F)
                                {}
                        })
                        CreateWordField (RTLA, \_SB.PCI0.LPCB.LNKA._CRS._Y0F._INT, IRQ0)  // _INT: Interrupts
                        IRQ0 = Zero
                        IRQ0 = (0x01 << (PARC & 0x0F))
                        Return (RTLA) /* \_SB_.PCI0.LPCB.LNKA._CRS.RTLA */
                    }

                    Method (_SRS, 1, Serialized)  // _SRS: Set Resource Settings
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Local0--
                        PARC = Local0
                    }

                    Method (_STA, 0, Serialized)  // _STA: Status
                    {
                        If ((PARC & 0x80))
                        {
                            Return (0x09)
                        }
                        Else
                        {
                            Return (0x0B)
                        }
                    }
                }

                Device (LNKB)
                {
                    Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */)  // _HID: Hardware ID
                    Name (_UID, 0x02)  // _UID: Unique ID
                    Method (_DIS, 0, Serialized)  // _DIS: Disable Device
                    {
                        PBRC = 0x80
                    }

                    Name (_PRS, ResourceTemplate ()  // _PRS: Possible Resource Settings
                    {
                        IRQ (Level, ActiveLow, Shared, )
                            {1,3,4,5,6,7,11,12,14,15}
                    })
                    Method (_CRS, 0, Serialized)  // _CRS: Current Resource Settings
                    {
                        Name (RTLB, ResourceTemplate ()
                        {
                            IRQ (Level, ActiveLow, Shared, _Y10)
                                {}
                        })
                        CreateWordField (RTLB, \_SB.PCI0.LPCB.LNKB._CRS._Y10._INT, IRQ0)  // _INT: Interrupts
                        IRQ0 = Zero
                        IRQ0 = (0x01 << (PBRC & 0x0F))
                        Return (RTLB) /* \_SB_.PCI0.LPCB.LNKB._CRS.RTLB */
                    }

                    Method (_SRS, 1, Serialized)  // _SRS: Set Resource Settings
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Local0--
                        PBRC = Local0
                    }

                    Method (_STA, 0, Serialized)  // _STA: Status
                    {
                        If ((PBRC & 0x80))
                        {
                            Return (0x09)
                        }
                        Else
                        {
                            Return (0x0B)
                        }
                    }
                }

                Device (LNKC)
                {
                    Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */)  // _HID: Hardware ID
                    Name (_UID, 0x03)  // _UID: Unique ID
                    Method (_DIS, 0, Serialized)  // _DIS: Disable Device
                    {
                        PCRC = 0x80
                    }

                    Name (_PRS, ResourceTemplate ()  // _PRS: Possible Resource Settings
                    {
                        IRQ (Level, ActiveLow, Shared, )
                            {1,3,4,5,6,7,10,12,14,15}
                    })
                    Method (_CRS, 0, Serialized)  // _CRS: Current Resource Settings
                    {
                        Name (RTLC, ResourceTemplate ()
                        {
                            IRQ (Level, ActiveLow, Shared, _Y11)
                                {}
                        })
                        CreateWordField (RTLC, \_SB.PCI0.LPCB.LNKC._CRS._Y11._INT, IRQ0)  // _INT: Interrupts
                        IRQ0 = Zero
                        IRQ0 = (0x01 << (PCRC & 0x0F))
                        Return (RTLC) /* \_SB_.PCI0.LPCB.LNKC._CRS.RTLC */
                    }

                    Method (_SRS, 1, Serialized)  // _SRS: Set Resource Settings
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Local0--
                        PCRC = Local0
                    }

                    Method (_STA, 0, Serialized)  // _STA: Status
                    {
                        If ((PCRC & 0x80))
                        {
                            Return (0x09)
                        }
                        Else
                        {
                            Return (0x0B)
                        }
                    }
                }

                Device (LNKD)
                {
                    Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */)  // _HID: Hardware ID
                    Name (_UID, 0x04)  // _UID: Unique ID
                    Method (_DIS, 0, Serialized)  // _DIS: Disable Device
                    {
                        PDRC = 0x80
                    }

                    Name (_PRS, ResourceTemplate ()  // _PRS: Possible Resource Settings
                    {
                        IRQ (Level, ActiveLow, Shared, )
                            {1,3,4,5,6,7,11,12,14,15}
                    })
                    Method (_CRS, 0, Serialized)  // _CRS: Current Resource Settings
                    {
                        Name (RTLD, ResourceTemplate ()
                        {
                            IRQ (Level, ActiveLow, Shared, _Y12)
                                {}
                        })
                        CreateWordField (RTLD, \_SB.PCI0.LPCB.LNKD._CRS._Y12._INT, IRQ0)  // _INT: Interrupts
                        IRQ0 = Zero
                        IRQ0 = (0x01 << (PDRC & 0x0F))
                        Return (RTLD) /* \_SB_.PCI0.LPCB.LNKD._CRS.RTLD */
                    }

                    Method (_SRS, 1, Serialized)  // _SRS: Set Resource Settings
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Local0--
                        PDRC = Local0
                    }

                    Method (_STA, 0, Serialized)  // _STA: Status
                    {
                        If ((PDRC & 0x80))
                        {
                            Return (0x09)
                        }
                        Else
                        {
                            Return (0x0B)
                        }
                    }
                }

                Device (LNKE)
                {
                    Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */)  // _HID: Hardware ID
                    Name (_UID, 0x05)  // _UID: Unique ID
                    Method (_DIS, 0, Serialized)  // _DIS: Disable Device
                    {
                        PERC = 0x80
                    }

                    Name (_PRS, ResourceTemplate ()  // _PRS: Possible Resource Settings
                    {
                        IRQ (Level, ActiveLow, Shared, )
                            {1,3,4,5,6,7,10,12,14,15}
                    })
                    Method (_CRS, 0, Serialized)  // _CRS: Current Resource Settings
                    {
                        Name (RTLE, ResourceTemplate ()
                        {
                            IRQ (Level, ActiveLow, Shared, _Y13)
                                {}
                        })
                        CreateWordField (RTLE, \_SB.PCI0.LPCB.LNKE._CRS._Y13._INT, IRQ0)  // _INT: Interrupts
                        IRQ0 = Zero
                        IRQ0 = (0x01 << (PERC & 0x0F))
                        Return (RTLE) /* \_SB_.PCI0.LPCB.LNKE._CRS.RTLE */
                    }

                    Method (_SRS, 1, Serialized)  // _SRS: Set Resource Settings
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Local0--
                        PERC = Local0
                    }

                    Method (_STA, 0, Serialized)  // _STA: Status
                    {
                        If ((PERC & 0x80))
                        {
                            Return (0x09)
                        }
                        Else
                        {
                            Return (0x0B)
                        }
                    }
                }

                Device (LNKF)
                {
                    Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */)  // _HID: Hardware ID
                    Name (_UID, 0x06)  // _UID: Unique ID
                    Method (_DIS, 0, Serialized)  // _DIS: Disable Device
                    {
                        PFRC = 0x80
                    }

                    Name (_PRS, ResourceTemplate ()  // _PRS: Possible Resource Settings
                    {
                        IRQ (Level, ActiveLow, Shared, )
                            {1,3,4,5,6,7,11,12,14,15}
                    })
                    Method (_CRS, 0, Serialized)  // _CRS: Current Resource Settings
                    {
                        Name (RTLF, ResourceTemplate ()
                        {
                            IRQ (Level, ActiveLow, Shared, _Y14)
                                {}
                        })
                        CreateWordField (RTLF, \_SB.PCI0.LPCB.LNKF._CRS._Y14._INT, IRQ0)  // _INT: Interrupts
                        IRQ0 = Zero
                        IRQ0 = (0x01 << (PFRC & 0x0F))
                        Return (RTLF) /* \_SB_.PCI0.LPCB.LNKF._CRS.RTLF */
                    }

                    Method (_SRS, 1, Serialized)  // _SRS: Set Resource Settings
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Local0--
                        PFRC = Local0
                    }

                    Method (_STA, 0, Serialized)  // _STA: Status
                    {
                        If ((PFRC & 0x80))
                        {
                            Return (0x09)
                        }
                        Else
                        {
                            Return (0x0B)
                        }
                    }
                }

                Device (LNKG)
                {
                    Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */)  // _HID: Hardware ID
                    Name (_UID, 0x07)  // _UID: Unique ID
                    Method (_DIS, 0, Serialized)  // _DIS: Disable Device
                    {
                        PGRC = 0x80
                    }

                    Name (_PRS, ResourceTemplate ()  // _PRS: Possible Resource Settings
                    {
                        IRQ (Level, ActiveLow, Shared, )
                            {1,3,4,5,6,7,10,12,14,15}
                    })
                    Method (_CRS, 0, Serialized)  // _CRS: Current Resource Settings
                    {
                        Name (RTLG, ResourceTemplate ()
                        {
                            IRQ (Level, ActiveLow, Shared, _Y15)
                                {}
                        })
                        CreateWordField (RTLG, \_SB.PCI0.LPCB.LNKG._CRS._Y15._INT, IRQ0)  // _INT: Interrupts
                        IRQ0 = Zero
                        IRQ0 = (0x01 << (PGRC & 0x0F))
                        Return (RTLG) /* \_SB_.PCI0.LPCB.LNKG._CRS.RTLG */
                    }

                    Method (_SRS, 1, Serialized)  // _SRS: Set Resource Settings
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Local0--
                        PGRC = Local0
                    }

                    Method (_STA, 0, Serialized)  // _STA: Status
                    {
                        If ((PGRC & 0x80))
                        {
                            Return (0x09)
                        }
                        Else
                        {
                            Return (0x0B)
                        }
                    }
                }

                Device (LNKH)
                {
                    Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */)  // _HID: Hardware ID
                    Name (_UID, 0x08)  // _UID: Unique ID
                    Method (_DIS, 0, Serialized)  // _DIS: Disable Device
                    {
                        PHRC = 0x80
                    }

                    Name (_PRS, ResourceTemplate ()  // _PRS: Possible Resource Settings
                    {
                        IRQ (Level, ActiveLow, Shared, )
                            {1,3,4,5,6,7,11,12,14,15}
                    })
                    Method (_CRS, 0, Serialized)  // _CRS: Current Resource Settings
                    {
                        Name (RTLH, ResourceTemplate ()
                        {
                            IRQ (Level, ActiveLow, Shared, _Y16)
                                {}
                        })
                        CreateWordField (RTLH, \_SB.PCI0.LPCB.LNKH._CRS._Y16._INT, IRQ0)  // _INT: Interrupts
                        IRQ0 = Zero
                        IRQ0 = (0x01 << (PHRC & 0x0F))
                        Return (RTLH) /* \_SB_.PCI0.LPCB.LNKH._CRS.RTLH */
                    }

                    Method (_SRS, 1, Serialized)  // _SRS: Set Resource Settings
                    {
                        CreateWordField (Arg0, 0x01, IRQ0)
                        FindSetRightBit (IRQ0, Local0)
                        Local0--
                        PHRC = Local0
                    }

                    Method (_STA, 0, Serialized)  // _STA: Status
                    {
                        If ((PHRC & 0x80))
                        {
                            Return (0x09)
                        }
                        Else
                        {
                            Return (0x0B)
                        }
                    }
                }

                Method (ECOK, 0, NotSerialized)
                {
                    If ((\_SB.PCI0.LPCB.EC0.OKEC == 0x01))
                    {
                        Return (0x01)
                    }
                    Else
                    {
                        Return (0x00)
                    }
                }

                Device (EC0)
                {
                    Name (_HID, EisaId ("PNP0C09") /* Embedded Controller Device */)  // _HID: Hardware ID
                    Name (_GPE, 0x1D)  // _GPE: General Purpose Events
                    Name (OKEC, Zero)
                    Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
                    {
                        IO (Decode16,
                            0x0062,             // Range Minimum
                            0x0062,             // Range Maximum
                            0x01,               // Alignment
                            0x01,               // Length
                            )
                        IO (Decode16,
                            0x0066,             // Range Minimum
                            0x0066,             // Range Maximum
                            0x01,               // Alignment
                            0x01,               // Length
                            )
                    })
                    Method (_REG, 2, NotSerialized)  // _REG: Region Availability
                    {
                        If ((Arg0 == 0x03))
                        {
                            OKEC = Arg1
                        }
                    }

                    OperationRegion (ERAM, EmbeddedControl, 0x00, 0xFF)
                    Field (ERAM, ByteAcc, Lock, Preserve)
                    {
                        Offset (0x60),
                        SMPR,   8,
                        SMST,   8,
                        SMAD,   8,
                        SMCM,   8,
                        SMD0,   256,
                        BCNT,   8,
                        SMAA,   24,
                        Offset (0x90),
                        CHGM,   16,
                        CHGS,   16,
                        ENID,   8,
                        ENIB,   8,
                        ENDD,   8,
                        CHGV,   8,
                        CHGA,   16,
                        BAL0,   1,
                        BAL1,   1,
                        BAL2,   1,
                        BAL3,   1,
                        BBC0,   1,
                        BBC1,   1,
                        BBC2,   1,
                        BBC3,   1,
                        Offset (0x9C),
                        PHDD,   1,
                        IFDD,   1,
                        IODD,   1,
                        SHDD,   1,
                        S120,   1,
                        EFDD,   1,
                        CRTD,   1,
                        Offset (0x9D),
                        SBTN,   1,
                        VIDO,   1,
                        VOLD,   1,
                        VOLU,   1,
                        MUTE,   1,
                        CONT,   1,
                        BRGT,   1,
                        HBTN,   1,
                        S4ST,   1,
                        SKEY,   1,
                        BKEY,   1,
                        TOUP,   1,
                        FNBN,   1,
                        LIDF,   1,
                        DIGM,   1,
                        CDLK,   1,
                        Offset (0xA2),
                        BTNS,   8,
                        S1LD,   1,
                        S3LD,   1,
                        VGAQ,   1,
                        PCMQ,   1,
                        PCMR,   1,
                        ADPT,   1,
                        SLLS,   1,
                        SYS7,   1,
                        PWAK,   1,
                        MWAK,   1,
                        LWAK,   1,
                        Offset (0xA5),
                        Offset (0xAA),
                        TCNL,   8,
                        TMPI,   8,
                        TMSD,   8,
                        FASN,   4,
                        FASU,   4,
                        PCVL,   4,
                            ,   2,
                        SWTO,   1,
                        HWTO,   1,
                        MODE,   1,
                        FANS,   2,
                        INIT,   1,
                        FAN1,   1,
                        FAN2,   1,
                        FANT,   1,
                        TACK,   1,
                        CTMP,   8,
                        LIDE,   1,
                        PMEE,   1,
                        PWBE,   1,
                        RNGE,   1,
                        BTWE,   1,
                        DCKE,   1,
                        Offset (0xB2),
                        SK90,   8,
                        SK92,   8,
                        Offset (0xB8),
                        BTDT,   1,
                        BTPW,   1,
                        BTDS,   1,
                        BTPS,   1,
                        BTSW,   1,
                        BTWK,   1,
                        BTLD,   1,
                        Offset (0xB9),
                        BRTS,   8,
                        CNTS,   8,
                        WLAT,   1,
                        BTAT,   1,
                        WLEX,   1,
                        BTEX,   1,
                        KLSW,   1,
                        WLOK,   1,
                        Offset (0xBC),
                        PTID,   8,
                        CPUT,   8,
                        EPKT,   8,
                        Offset (0xC0),
                            ,   4,
                        BMF0,   3,
                        BTY0,   1,
                        BST0,   8,
                        BRC0,   16,
                        BSN0,   16,
                        BPV0,   16,
                        BDV0,   16,
                        BDC0,   16,
                        BFC0,   16,
                        GAU0,   8,
                        CYC0,   8,
                        BPC0,   16,
                        BAC0,   16,
                        BAT0,   8,
                        BTW0,   16,
                        BDN0,   8,
                        Offset (0xE0),
                            ,   4,
                        BMF1,   3,
                        BTY1,   1,
                        BST1,   8,
                        BRC1,   16,
                        BSN1,   16,
                        BPV1,   16,
                        BDV1,   16,
                        BDC1,   16,
                        BFC1,   16,
                        GAU1,   8,
                        CYC1,   8,
                        BPC1,   16,
                        BAC1,   16,
                        BAT1,   8,
                        BTW1,   16
                    }

                    Method (_Q15, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
                    {
                        Debug = "====QUERY_16===="
                        Notify (\_SB.LID0, 0x80) // Status Change
                    }

                    Method (_Q16, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
                    {
                        Debug = "====QUERY_16===="
                        Notify (\_SB.LID0, 0x80) // Status Change
                    }

                    Method (_Q19, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
                    {
                        Debug = "====QUERY_19===="
                        \_SB.GSMI (0x0C)
                    }

                    Method (_Q1A, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
                    {
                        Debug = "====QUERY_1A===="
                        \_SB.GSMI (0x0B)
                    }

                    Method (_Q1C, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
                    {
                        Debug = "====QUERY_1C===="
                        \_SB.PCI0.GFX0.DSSW ()
                    }

                    Method (_Q1E, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
                    {
                        Debug = "=====QUERY_1E====="
                        P80H = 0x1E
                        Sleep (0x07D0)
                        PCLK ()
                    }

                    Method (_Q22, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
                    {
                        Debug = "====QUERY_22===="
                        Notify (\_SB.PCI0.LPCB.BAT1, 0x80) // Status Change
                    }

                    Method (_Q23, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
                    {
                        Debug = "====QUERY_23===="
                        Notify (\_SB.PCI0.LPCB.BAT1, 0x80) // Status Change
                    }

                    Method (_Q24, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
                    {
                        Debug = "====QUERY_24===="
                        Notify (\_SB.PCI0.LPCB.BAT1, 0x81) // Information Change
                        Notify (\_SB.PCI0.LPCB.BAT1, 0x80) // Status Change
                    }

                    Method (_Q25, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
                    {
                        Debug = "====QUERY_25===="
                        Notify (\_SB.PCI0.LPCB.BAT1, 0x81) // Information Change
                        Notify (\_SB.PCI0.LPCB.BAT1, 0x80) // Status Change
                    }

                    Method (_Q37, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
                    {
                        Debug = "====QUERY_37===="
                        Notify (\_SB.PCI0.LPCB.ACAD, 0x80) // Status Change
                        Notify (\_SB.PCI0.LPCB.BAT1, 0x80) // Status Change
                    }

                    Method (_Q38, 0, NotSerialized)  // _Qxx: EC Query, xx=0x00-0xFF
                    {
                        Debug = "====QUERY_38===="
                        Notify (\_SB.PCI0.LPCB.ACAD, 0x80) // Status Change
                        Notify (\_SB.PCI0.LPCB.BAT1, 0x80) // Status Change
                    }

                    OperationRegion (CCLK, SystemIO, 0x1010, 0x04)
                    Field (CCLK, DWordAcc, NoLock, Preserve)
                    {
                            ,   1,
                        DUTY,   3,
                        THEN,   1,
                        Offset (0x01),
                            ,   9,
                        TSTS,   1
                    }

                    OperationRegion (ECRM, EmbeddedControl, 0x00, 0xFF)
                    Field (ECRM, ByteAcc, Lock, Preserve)
                    {
                        Offset (0x94),
                        ERIB,   16,
                        ERBD,   8,
                        Offset (0xAC),
                        SDTM,   8,
                        FSSN,   4,
                        FANU,   4,
                        PTVL,   3,
                            ,   4,
                        TTHR,   1,
                        Offset (0xBC),
                        PJID,   8,
                        Offset (0xBE),
                        Offset (0xF9),
                        RFRD,   16
                    }

                    Mutex (FAMX, 0x00)
                    Method (FANG, 1, NotSerialized)
                    {
                        Acquire (FAMX, 0xFFFF)
                        ERIB = Arg0
                        Local0 = ERBD /* \_SB_.PCI0.LPCB.EC0_.ERBD */
                        Release (FAMX)
                        Return (Local0)
                    }

                    Method (FANW, 2, NotSerialized)
                    {
                        Acquire (FAMX, 0xFFFF)
                        ERIB = Arg0
                        ERBD = Arg1
                        Release (FAMX)
                        Return (Arg1)
                    }

                    Method (TUVR, 1, NotSerialized)
                    {
                        Return (0x03)
                    }

                    Method (THRO, 1, NotSerialized)
                    {
                        If ((Arg0 == 0x00))
                        {
                            Return (THEN) /* \_SB_.PCI0.LPCB.EC0_.THEN */
                        }
                        ElseIf ((Arg0 == 0x01))
                        {
                            Return (DUTY) /* \_SB_.PCI0.LPCB.EC0_.DUTY */
                        }
                        ElseIf ((Arg0 == 0x02))
                        {
                            Return (TTHR) /* \_SB_.PCI0.LPCB.EC0_.TTHR */
                        }
                        Else
                        {
                            Return (0xFF)
                        }
                    }

                    Method (CLCK, 1, NotSerialized)
                    {
                        If ((Arg0 == 0x00))
                        {
                            THEN = 0x00
                        }
                        Else
                        {
                            DUTY = Arg0
                            THEN = 0x01
                        }

                        Return (THEN) /* \_SB_.PCI0.LPCB.EC0_.THEN */
                    }

                    Method (PCLK, 0, NotSerialized)
                    {
                        If ((PCVL == 0x00))
                        {
                            THEN = 0x00
                        }
                        Else
                        {
                            P80H = PCVL /* \_SB_.PCI0.LPCB.EC0_.PCVL */
                            Local0 = PCVL /* \_SB_.PCI0.LPCB.EC0_.PCVL */
                            Local0 = ~Local0
                            Local0 += 0x01
                            Local0 &= 0x07
                            DUTY = Local0
                            THEN = 0x01
                            If (\_SB.PCI0.LPCB.EC0.ECOK)
                            {
                                If (\_SB.PCI0.LPCB.EC0.HWTO)
                                {
                                    TACK = 0x01
                                }
                            }
                        }
                    }
                }

                Device (ACAD)
                {
                    Name (_HID, "ACPI0003" /* Power Source Device */)  // _HID: Hardware ID                     Name (_PCL, Package (0x01)  // _PCL: Power Consumer List
                    {
                        \_SB
                    })
                    Method (_PSR, 0, NotSerialized)  // _PSR: Power Source
                    {
                        If (ECOK ())
                        {
                            PWRS = \_SB.PCI0.LPCB.EC0.ADPT
                            Return (PWRS) /* \PWRS */
                        }
                        Else
                        {
                            PWRS = 0x01
                            Return (0x01)
                        }
                    }
                }

                Device (BAT1)
                {
                    Name (_HID, EisaId ("PNP0C0A") /* Control Method Battery */)  // _HID: Hardware ID
                    Name (_UID, 0x01)  // _UID: Unique ID
                    Name (_PCL, Package (0x01)  // _PCL: Power Consumer List
                    {
                        \_SB
                    })
                    Name (PBIF, Package (0x0D)
                    {
                        0x01,
                        0x10CC,
                        0x10CC,
                        0x01,
                        0x39D0,
                        0x01AE,
                        0x81,
                        0x012D,
                        0x0F1E,
                        "SMARTBAT",
                        "SMBAT ",
                        "LiON",
                        "COMPAL "
                    })
                    Name (BSTP, Package (0x04)
                    {
                        0x01,
                        0xFFFFFFFF,
                        0xFFFFFFFF,
                        0x39D0
                    })
                    Method (_STA, 0, NotSerialized)  // _STA: Status
                    {
                        If (ECOK ())
                        {
                            Sleep (0x14)
                            If (\_SB.PCI0.LPCB.EC0.BAL0)
                            {
                                Return (0x1F)
                            }
                            Else
                            {
                                Return (0x0F)
                            }
                        }
                        Else
                        {
                            Sleep (0x14)
                            Return (0x1F)
                        }
                    }

                    Method (_BIF, 0, NotSerialized)  // _BIF: Battery Information
                    {
                        If (ECOK ())
                        {
                            Sleep (0x14)
                            PBIF [0x01] = \_SB.PCI0.LPCB.EC0.BDC0
                            Sleep (0x14)
                            PBIF [0x02] = \_SB.PCI0.LPCB.EC0.BFC0
                            Sleep (0x14)
                            Local1 = \_SB.PCI0.LPCB.EC0.BMF0
                            Sleep (0x14)
                            If ((Local1 == 0x01))
                            {
                                PBIF [0x09] = "BATCL50L "
                                PBIF [0x0C] = "SANYO "
                            }
                            ElseIf ((Local1 == 0x02))
                            {
                                PBIF [0x09] = "BATCL50L "
                                PBIF [0x0C] = "SONY "
                            }
                            ElseIf ((Local1 == 0x04))
                            {
                                PBIF [0x09] = "BATCL50L "
                                PBIF [0x0C] = "PANASONIC "
                            }
                            Else
                            {
                                PBIF [0x09] = "BATCL50L "
                                PBIF [0x0C] = "COMPAL "
                            }
                        }

                        Return (PBIF) /* \_SB_.PCI0.LPCB.BAT1.PBIF */
                    }

                    Method (_BST, 0, NotSerialized)  // _BST: Battery Status
                    {
                        If (ECOK ())
                        {
                            Sleep (0x14)
                            Local0 = \_SB.PCI0.LPCB.EC0.BST0
                            Local0 &= 0x07
                            Sleep (0x14)
                            Local1 = \_SB.PCI0.LPCB.EC0.BPC0
                            Sleep (0x14)
                            Local2 = \_SB.PCI0.LPCB.EC0.BRC0
                            Sleep (0x14)
                            Local3 = \_SB.PCI0.LPCB.EC0.BPV0
                            BSTP [0x00] = Local0
                            BSTP [0x01] = 0x00
                            BSTP [0x02] = Local2
                            BSTP [0x03] = Local3
                        }

                        Return (BSTP) /* \_SB_.PCI0.LPCB.BAT1.BSTP */
                    }
                }

                Device (PS2K)
                {
                    Name (_HID, EisaId ("PNP0303") /* IBM Enhanced Keyboard (101/102-key, PS/2 Mouse) */)  // _HID: Hardware ID                     Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
                    {
                        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}
                    })
                }

                Device (PS2M)
                {
                    Name (_HID, EisaId ("PNP0F13") /* PS/2 Mouse */)  // _HID: Hardware ID                     Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
                    {
                        IRQ (Edge, ActiveHigh, Exclusive, )
                            {12}
                    })
                }
            }

            Device (PATA)
            {
                Name (_ADR, 0x001F0001)  // _ADR: Address
                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, 0x00)  // _ADR: Address
                    Method (_GTM, 0, NotSerialized)  // _GTM: Get Timing Mode
                    {
                        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, 0x00, PIO0)
                        CreateDWordField (PBUF, 0x04, DMA0)
                        CreateDWordField (PBUF, 0x08, PIO1)
                        CreateDWordField (PBUF, 0x0C, DMA1)
                        CreateDWordField (PBUF, 0x10, FLAG)
                        PIO0 = GETP (PRIT)
                        DMA0 = GDMA ((SYNC & 0x01), (ICR3 & 0x01), (
                            ICR0 & 0x01), SDT0, (ICR1 & 0x01))
                        If ((DMA0 == 0xFFFFFFFF))
                        {
                            DMA0 = PIO0 /* \_SB_.PCI0.PATA.PRID._GTM.PIO0 */
                        }

                        If ((PRIT & 0x4000))
                        {
                            If (((PRIT & 0x90) == 0x80))
                            {
                                PIO1 = 0x0384
                            }
                            Else
                            {
                                PIO1 = GETT (PSIT)
                            }
                        }
                        Else
                        {
                            PIO1 = 0xFFFFFFFF
                        }

                        DMA1 = GDMA ((SYNC & 0x02), (ICR3 & 0x02), (
                            ICR0 & 0x02), SDT1, (ICR1 & 0x02))
                        If ((DMA1 == 0xFFFFFFFF))
                        {
                            DMA1 = PIO1 /* \_SB_.PCI0.PATA.PRID._GTM.PIO1 */
                        }

                        FLAG = GETF ((SYNC & 0x01), (SYNC & 0x02), PRIT)
                        If (((PIO0 == 0xFFFFFFFF) & (DMA0 == 0xFFFFFFFF)))
                        {
                            PIO0 = 0x78
                            DMA0 = 0x14
                            FLAG = 0x03
                        }

                        Return (PBUF) /* \_SB_.PCI0.PATA.PRID._GTM.PBUF */
                    }

                    Method (_STM, 3, NotSerialized)  // _STM: Set Timing Mode
                    {
                        CreateDWordField (Arg0, 0x00, PIO0)
                        CreateDWordField (Arg0, 0x04, DMA0)
                        CreateDWordField (Arg0, 0x08, PIO1)
                        CreateDWordField (Arg0, 0x0C, DMA1)
                        CreateDWordField (Arg0, 0x10, FLAG)
                        If ((SizeOf (Arg1) == 0x0200))
                        {
                            PRIT &= 0x40F0
                            SYNC &= 0x02
                            SDT0 = 0x00
                            ICR0 &= 0x02
                            ICR1 &= 0x02
                            ICR3 &= 0x02
                            ICR5 &= 0x02
                            CreateWordField (Arg1, 0x62, W490)
                            CreateWordField (Arg1, 0x6A, W530)
                            CreateWordField (Arg1, 0x7E, W630)
                            CreateWordField (Arg1, 0x80, W640)
                            CreateWordField (Arg1, 0xB0, W880)
                            CreateWordField (Arg1, 0xBA, W930)
                            PRIT |= 0x8004
                            If (((FLAG & 0x02) && (W490 & 0x0800)))
                            {
                                PRIT |= 0x02
                            }

                            PRIT |= SETP (PIO0, W530, W640)
                            If ((FLAG & 0x01))
                            {
                                SYNC |= 0x01
                                SDT0 = SDMA (DMA0)
                                If ((DMA0 < 0x1E))
                                {
                                    ICR3 |= 0x01
                                }

                                If ((DMA0 < 0x3C))
                                {
                                    ICR0 |= 0x01
                                }

                                If ((W930 & 0x2000))
                                {
                                    ICR1 |= 0x01
                                }
                            }
                        }

                        If ((SizeOf (Arg2) == 0x0200))
                        {
                            PRIT &= 0x3F0F
                            PSIT = 0x00
                            SYNC &= 0x01
                            SDT1 = 0x00
                            ICR0 &= 0x01
                            ICR1 &= 0x01
                            ICR3 &= 0x01
                            ICR5 &= 0x01
                            CreateWordField (Arg2, 0x62, W491)
                            CreateWordField (Arg2, 0x6A, W531)
                            CreateWordField (Arg2, 0x7E, W631)
                            CreateWordField (Arg2, 0x80, W641)
                            CreateWordField (Arg2, 0xB0, W881)
                            CreateWordField (Arg2, 0xBA, W931)
                            PRIT |= 0x8040
                            If (((FLAG & 0x08) && (W491 & 0x0800)))
                            {
                                PRIT |= 0x20
                            }

                            If ((FLAG & 0x10))
                            {
                                PRIT |= 0x4000
                                If ((PIO1 > 0xF0))
                                {
                                    PRIT |= 0x80
                                }
                                Else
                                {
                                    PRIT |= 0x10
                                    PSIT = SETT (PIO1, W531, W641)
                                }
                            }

                            If ((FLAG & 0x04))
                            {
                                SYNC |= 0x02
                                SDT1 = SDMA (DMA1)
                                If ((DMA1 < 0x1E))
                                {
                                    ICR3 |= 0x02
                                }

                                If ((DMA1 < 0x3C))
                                {
                                    ICR0 |= 0x02
                                }

                                If ((W931 & 0x2000))
                                {
                                    ICR1 |= 0x02
                                }
                            }
                        }
                    }

                    Device (P_D0)
                    {
                        Name (_ADR, 0x00)  // _ADR: Address
                        Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                        {
                            Return ((SATD ^ 0x01))
                        }

                        Method (_GTF, 0, NotSerialized)  // _GTF: Get Task File
                        {
                            Name (PIB0, Buffer (0x0E)
                            {
                                /* 0000 */  0x03, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF, 0x03,  // ........                                 /* 0008 */  0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF               // ......
                            })
                            CreateByteField (PIB0, 0x01, PMD0)
                            CreateByteField (PIB0, 0x08, DMD0)
                            If ((PRIT & 0x02))
                            {
                                If (((PRIT & 0x09) == 0x08))
                                {
                                    PMD0 = 0x08
                                }
                                Else
                                {
                                    PMD0 = 0x0A
                                    Local0 = ((PRIT & 0x0300) >> 0x08)
                                    Local1 = ((PRIT & 0x3000) >> 0x0C)
                                    Local2 = (Local0 + Local1)
                                    If ((0x03 == Local2))
                                    {
                                        PMD0 = 0x0B
                                    }

                                    If ((0x05 == Local2))
                                    {
                                        PMD0 = 0x0C
                                    }
                                }
                            }
                            Else
                            {
                                PMD0 = 0x01
                            }

                            If ((SYNC & 0x01))
                            {
                                DMD0 = (SDT0 | 0x40)
                                If ((ICR1 & 0x01))
                                {
                                    If ((ICR0 & 0x01))
                                    {
                                        DMD0 += 0x02
                                    }

                                    If ((ICR3 & 0x01))
                                    {
                                        DMD0 = 0x45
                                    }
                                }
                            }
                            Else
                            {
                                DMD0 = (((PMD0 & 0x07) - 0x02) | 0x20)
                            }

                            Return (PIB0) /* \_SB_.PCI0.PATA.PRID.P_D0._GTF.PIB0 */
                        }
                    }

                    Device (P_D1)
                    {
                        Name (_ADR, 0x01)  // _ADR: Address
                        Method (_GTF, 0, NotSerialized)  // _GTF: Get Task File
                        {
                            Name (PIB1, Buffer (0x0E)
                            {
                                /* 0000 */  0x03, 0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF, 0x03,  // ........                                 /* 0008 */  0x00, 0x00, 0x00, 0x00, 0xB0, 0xEF               // ......
                            })
                            CreateByteField (PIB1, 0x01, PMD1)
                            CreateByteField (PIB1, 0x08, DMD1)
                            If ((PRIT & 0x20))
                            {
                                If (((PRIT & 0x90) == 0x80))
                                {
                                    PMD1 = 0x08
                                }
                                Else
                                {
                                    Local0 = ((PSIT & 0x03) + ((PSIT & 0x0C) >> 0x02
                                        ))
                                    If ((0x05 == Local0))
                                    {
                                        PMD1 = 0x0C
                                    }
                                    ElseIf ((0x03 == Local0))
                                    {
                                        PMD1 = 0x0B
                                    }
                                    Else
                                    {
                                        PMD1 = 0x0A
                                    }
                                }
                            }
                            Else
                            {
                                PMD1 = 0x01
                            }

                            If ((SYNC & 0x02))
                            {
                                DMD1 = (SDT1 | 0x40)
                                If ((ICR1 & 0x02))
                                {
                                    If ((ICR0 & 0x02))
                                    {
                                        DMD1 += 0x02
                                    }

                                    If ((ICR3 & 0x02))
                                    {
                                        DMD1 = 0x45
                                    }
                                }
                            }
                            Else
                            {
                                DMD1 = (((PMD1 & 0x07) - 0x02) | 0x20)
                            }

                            Return (PIB1) /* \_SB_.PCI0.PATA.PRID.P_D1._GTF.PIB1 */
                        }
                    }
                }
            }

            Device (SBUS)
            {
                Name (_ADR, 0x001F0003)  // _ADR: Address
                OperationRegion (SMBP, PCI_Config, 0x40, 0xC0)
                Field (SMBP, DWordAcc, NoLock, Preserve)
                {
                        ,   2,
                    I2CE,   1
                }

                OperationRegion (SMBI, SystemIO, 0x1400, 0x10)
                Field (SMBI, ByteAcc, NoLock, Preserve)
                {
                    HSTS,   8,
                    Offset (0x02),
                    HCON,   8,
                    HCOM,   8,
                    TXSA,   8,
                    DAT0,   8,
                    DAT1,   8,
                    HBDR,   8,
                    PECR,   8,
                    RXSA,   8,
                    SDAT,   16
                }

                Method (SSXB, 2, Serialized)
                {
                    If (STRT ())
                    {
                        Return (0x00)
                    }

                    I2CE = 0x00
                    HSTS = 0xBF
                    TXSA = Arg0
                    HCOM = Arg1
                    HCON = 0x48
                    If (COMP ())
                    {
                        HSTS |= 0xFF
                        Return (0x01)
                    }

                    Return (0x00)
                }

                Method (SRXB, 1, Serialized)
                {
                    If (STRT ())
                    {
                        Return (0xFFFF)
                    }

                    I2CE = 0x00
                    HSTS = 0xBF
                    TXSA = (Arg0 | 0x01)
                    HCON = 0x44
                    If (COMP ())
                    {
                        HSTS |= 0xFF
                        Return (DAT0) /* \_SB_.PCI0.SBUS.DAT0 */
                    }

                    Return (0xFFFF)
                }

                Method (SWRB, 3, Serialized)
                {
                    If (STRT ())
                    {
                        Return (0x00)
                    }

                    I2CE = 0x00
                    HSTS = 0xBF
                    TXSA = Arg0
                    HCOM = Arg1
                    DAT0 = Arg2
                    HCON = 0x48
                    If (COMP ())
                    {
                        HSTS |= 0xFF
                        Return (0x01)
                    }

                    Return (0x00)
                }

                Method (SRDB, 2, Serialized)
                {
                    If (STRT ())
                    {
                        Return (0xFFFF)
                    }

                    I2CE = 0x00
                    HSTS = 0xBF
                    TXSA = (Arg0 | 0x01)
                    HCOM = Arg1
                    HCON = 0x48
                    If (COMP ())
                    {
                        HSTS |= 0xFF
                        Return (DAT0) /* \_SB_.PCI0.SBUS.DAT0 */
                    }

                    Return (0xFFFF)
                }

                Method (SBLW, 4, Serialized)
                {
                    If (STRT ())
                    {
                        Return (0x00)
                    }

                    I2CE = Arg3
                    HSTS = 0xBF
                    TXSA = Arg0
                    HCOM = Arg1
                    DAT0 = SizeOf (Arg2)
                    Local1 = 0x00
                    HBDR = DerefOf (Arg2 [0x00])
                    HCON = 0x54
                    While ((SizeOf (Arg2) > Local1))
                    {
                        Local0 = 0x0FA0
                        While ((!(HSTS & 0x80) && Local0))
                        {
                            Local0--
                            Stall (0x32)
                        }

                        If (!Local0)
                        {
                            KILL ()
                            Return (0x00)
                        }

                        HSTS = 0x80
                        Local1++
                        If ((SizeOf (Arg2) > Local1))
                        {
                            HBDR = DerefOf (Arg2 [Local1])
                        }
                    }

                    If (COMP ())
                    {
                        HSTS |= 0xFF
                        Return (0x01)
                    }

                    Return (0x00)
                }

                Method (SBLR, 3, Serialized)
                {
                    Name (TBUF, Buffer (0x0100){})
                    If (STRT ())
                    {
                        Return (0x00)
                    }

                    I2CE = Arg2
                    HSTS = 0xBF
                    TXSA = (Arg0 | 0x01)
                    HCOM = Arg1
                    HCON = 0x54
                    Local0 = 0x0FA0
                    While ((!(HSTS & 0x80) && Local0))
                    {
                        Local0--
                        Stall (0x32)
                    }

                    If (!Local0)
                    {
                        KILL ()
                        Return (0x00)
                    }

                    TBUF [0x00] = DAT0 /* \_SB_.PCI0.SBUS.DAT0 */
                    HSTS = 0x80
                    Local1 = 0x01
                    While ((Local1 < DerefOf (TBUF [0x00])))
                    {
                        Local0 = 0x0FA0
                        While ((!(HSTS & 0x80) && Local0))
                        {
                            Local0--
                            Stall (0x32)
                        }

                        If (!Local0)
                        {
                            KILL ()
                            Return (0x00)
                        }

                        TBUF [Local1] = HBDR /* \_SB_.PCI0.SBUS.HBDR */
                        HSTS = 0x80
                        Local1++
                    }

                    If (COMP ())
                    {
                        HSTS |= 0xFF
                        Return (TBUF) /* \_SB_.PCI0.SBUS.SBLR.TBUF */
                    }

                    Return (0x00)
                }

                Method (STRT, 0, Serialized)
                {
                    Local0 = 0xC8
                    While (Local0)
                    {
                        If ((HSTS & 0x40))
                        {
                            Local0--
                            Sleep (0x01)
                            If ((Local0 == 0x00))
                            {
                                Return (0x01)
                            }
                        }
                        Else
                        {
                            Local0 = 0x00
                        }
                    }

                    Local0 = 0x0FA0
                    While (Local0)
                    {
                        If ((HSTS & 0x01))
                        {
                            Local0--
                            Stall (0x32)
                            If ((Local0 == 0x00))
                            {
                                KILL ()
                            }
                        }
                        Else
                        {
                            Return (0x00)
                        }
                    }

                    Return (0x01)
                }

                Method (COMP, 0, Serialized)
                {
                    Local0 = 0x0FA0
                    While (Local0)
                    {
                        If ((HSTS & 0x02))
                        {
                            Return (0x01)
                        }
                        Else
                        {
                            Local0--
                            Stall (0x32)
                            If ((Local0 == 0x00))
                            {
                                KILL ()
                            }
                        }
                    }

                    Return (0x00)
                }

                Method (KILL, 0, Serialized)
                {
                    HCON |= 0x02
                    HSTS |= 0xFF
                }
            }
        }

        Method (GSMI, 1, NotSerialized)
        {
            APMD = Arg0
            APMC = 0xE3
            Stall (0xFF)
            Stall (0xFF)
            Stall (0xFF)
            Stall (0xFF)
            Stall (0xFF)
            Stall (0xFF)
        }
    }

    Scope (\_PR.CPU0)
    {
        Method (_PPC, 0, NotSerialized)  // _PPC: Performance Present Capabilities
        {
            Return (0x00)
        }

        Method (_PCT, 0, NotSerialized)  // _PCT: Performance Control
        {
            If ((CFGD & 0x4000))
            {
                Return (Package (0x02)
                {
                    ResourceTemplate ()
                    {
                        Register (SystemIO,
                            0x08,               // Bit Width
                            0x00,               // Bit Offset
                            0x0000000000000800, // Address
                            ,)
                    },

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

            If (((CFGD & 0x02) && (PDC0 & 0x01)))
            {
                Return (Package (0x02)
                {
                    ResourceTemplate ()
                    {
                        Register (FFixedHW,
                            0x00,               // Bit Width
                            0x00,               // Bit Offset
                            0x0000000000000000, // Address
                            ,)
                    },

                    ResourceTemplate ()
                    {
                        Register (FFixedHW,
                            0x00,               // Bit Width
                            0x00,               // Bit Offset
                            0x0000000000000000, // Address
                            ,)
                    }
                })
            }

            Return (Package (0x02)
            {
                ResourceTemplate ()
                {
                    Register (SystemIO,
                        0x10,               // Bit Width
                        0x00,               // Bit Offset
                        0x00000000000000B2, // Address
                        ,)
                },

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

        Method (_PSS, 0, NotSerialized)  // _PSS: Performance Supported States
        {
            If ((!(CFGD & 0x4000) && ((CFGD & 0x02) &&
                (PDC0 & 0x01))))
            {
                Return (NPSS) /* \_PR_.CPU0.NPSS */
            }

            Return (SPSS) /* \_PR_.CPU0.SPSS */
        }

        Name (SPSS, Package (0x05)
        {
            Package (0x06)
            {
                0x0000074B,
                0x00006978,
                0x0000006E,
                0x0000000A,
                0x00000083,
                0x00000000
            },

            Package (0x06)
            {
                0x00000640,
                0x000059D8,
                0x0000006E,
                0x0000000A,
                0x00000183,
                0x00000001
            },

            Package (0x06)
            {
                0x00000535,
                0x00004E20,
                0x0000006E,
                0x0000000A,
                0x00000283,
                0x00000002
            },

            Package (0x06)
            {
                0x0000042B,
                0x00004268,
                0x0000006E,
                0x0000000A,
                0x00000383,
                0x00000003
            },

            Package (0x06)
            {
                0x00000320,
                0x000032C8,
                0x0000006E,
                0x0000000A,
                0x00000483,
                0x00000004
            }
        })
        Name (NPSS, Package (0x05)
        {
            Package (0x06)
            {
                0x0000074B,
                0x00006978,
                0x0000000A,
                0x0000000A,
                0x00000E29,
                0x00000E29
            },

            Package (0x06)
            {
                0x00000640,
                0x000059D8,
                0x0000000A,
                0x0000000A,
                0x00000C24,
                0x00000C24
            },

            Package (0x06)
            {
                0x00000535,
                0x00004E20,
                0x0000000A,
                0x0000000A,
                0x00000A1E,
                0x00000A1E
            },

            Package (0x06)
            {
                0x0000042B,
                0x00004268,
                0x0000000A,
                0x0000000A,
                0x00000818,
                0x00000818
            },

            Package (0x06)
            {
                0x00000320,
                0x000032C8,
                0x0000000A,
                0x0000000A,
                0x00000612,
                0x00000612
            }
        })
    }

    Scope (\_PR.CPU0)
    {
        Method (_CST, 0, NotSerialized)  // _CST: C-States
        {
            If ((CFGD & 0x4000))
            {
                Return (Package (0x02)
                {
                    0x01,
                    Package (0x04)
                    {
                        ResourceTemplate ()
                        {
                            Register (FFixedHW,
                                0x01,               // Bit Width
                                0x01,               // Bit Offset
                                0x0000000000000809, // Address
                                ,)
                        },

                        0x01,
                        0x01,
                        0x03E8
                    }
                })
            }

            If ((CFGD & 0x80))
            {
                Return (Package (0x05)
                {
                    0x04,
                    Package (0x04)
                    {
                        ResourceTemplate ()
                        {
                            Register (FFixedHW,
                                0x00,               // Bit Width
                                0x00,               // Bit Offset
                                0x0000000000000000, // Address
                                ,)
                        },

                        0x01,
                        0x01,
                        0x03E8
                    },

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

                        0x02,
                        0x01,
                        0x01F4
                    },

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

                        0x03,
                        0x55,
                        0xFA
                    },

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

                        0x03,
                        0xB9,
                        0x64
                    }
                })
            }

            If ((CFGD & 0x40))
            {
                Return (Package (0x04)
                {
                    0x03,
                    Package (0x04)
                    {
                        ResourceTemplate ()
                        {
                            Register (FFixedHW,
                                0x00,               // Bit Width
                                0x00,               // Bit Offset
                                0x0000000000000000, // Address
                                ,)
                        },

                        0x01,
                        0x01,
                        0x03E8
                    },

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

                        0x02,
                        0x01,
                        0x01F4
                    },

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

                        0x03,
                        0x55,
                        0xFA
                    }
                })
            }

            If ((CFGD & 0x20))
            {
                Return (Package (0x03)
                {
                    0x02,
                    Package (0x04)
                    {
                        ResourceTemplate ()
                        {
                            Register (FFixedHW,
                                0x00,               // Bit Width
                                0x00,               // Bit Offset
                                0x0000000000000000, // Address
                                ,)
                        },

                        0x01,
                        0x01,
                        0x03E8
                    },

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

                        0x02,
                        0x01,
                        0x01F4
                    }
                })
            }

            Return (Package (0x02)
            {
                0x01,
                Package (0x04)
                {
                    ResourceTemplate ()
                    {
                        Register (FFixedHW,
                            0x00,               // Bit Width
                            0x00,               // Bit Offset
                            0x0000000000000000, // Address
                            ,)
                    },

                    0x01,
                    0x01,
                    0x03E8
                }
            })
        }
    }
}

ramiro@debian-nuc8i7:~$






























































































































































Home | Main Index | Thread Index | Old Index