acpidump on macbook 3,1

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ted Roby
Date: Saturday, June 19, 2010 - 10:11 am

This is macbook 3,1 running amd64 snapshot. 4 GB RAM.

Dmesg was submitted to dmesg after install.

apmd sleep still does not wake up properly.



acpidump follows:

/*
RSD PTR: Checksum=197, OEMID=APPLE, RsdtAddress=0xbeeee0fc
 */
/*
RSDT: Length=84, Revision=1, Checksum=143,
	OEMID=APPLE, OEM Table ID=Apple00, OEM Revision=0x8e,
	Creator ID=, Creator Revision=0x1000013
 */
/*
	Entries={ 0xbeeec000, 0xbeeeb000, 0xbeeea000, 0xbeee9000, 0xbeee8000,
0xbeee7000, 0xbeee6000, 0xbeec6000, 0xbeec5000, 0xbeec4000,
0xbeee0000, 0xbeedf000 }
 */
/*
	DSDT=0xbeee1000
	INT_MODEL=PIC
	SCI_INT=9
	SMI_CMD=0xb2, ACPI_ENABLE=0xf0, ACPI_DISABLE=0xf1, S4BIOS_REQ=0xf2
	PM1a_EVT_BLK=0x400-0x403
	PM1a_CNT_BLK=0x404-0x405
	PM2_CNT_BLK=0x420-0x420
	PM2_TMR_BLK=0x408-0x40b
	PM2_GPE0_BLK=0x428-0x42f
	P_LVL2_LAT=101ms, P_LVL3_LAT=1001ms
	FLUSH_SIZE=0, FLUSH_STRIDE=0
	DUTY_OFFSET=1, DUTY_WIDTH=3
	DAY_ALRM=13, MON_ALRM=0, CENTURY=50
	Flags={WBINVD,PROC_C1,SLP_BUTTON,RTC_S4}
 */
/*
DSDT: Length=17846, Revision=1, Checksum=59,
	OEMID=APPLE, OEM Table ID=MacBook, OEM Revision=0x30001,
	Creator ID=INTL, Creator Revision=0x20061109
 */
DefinitionBlock (
"acpi_dsdt.aml",	//Output filename
"DSDT",			//Signature
0x1,			//DSDT Revision
"APPLE",			//OEMID
"MacBook",		//TABLE ID
0x30001			//OEM Revision
)

{
OperationRegion(PRT0, SystemIO, 0x80, 0x4)
Field(PRT0, DWordAcc, Lock, Preserve) {
    P80H,	32
}
OperationRegion(SPRT, SystemIO, 0xb2, 0x2)
Field(SPRT, ByteAcc, Lock, Preserve) {
    SSMP,	8
}
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(0xe),
    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(IO_T, SystemIO, 0x1000, 0x10)
Field(IO_T, ByteAcc, NoLock, Preserve) {
    TRPI,	16,
    Offset(0x4),
    Offset(0x6),
    Offset(0x8),
    TRP0,	8,
    TRPC,	8,
    Offset(0xb),
    Offset(0xc),
    Offset(0xd),
    Offset(0xe),
    Offset(0xf),
    Offset(0x10)
}
OperationRegion(IO_D, SystemIO, 0x0810, 0x8)
Field(IO_D, ByteAcc, NoLock, Preserve) {
    TRPD,	8
}
OperationRegion(PMIO, SystemIO, 0x0400, 0x80)
Field(PMIO, ByteAcc, NoLock, Preserve) {
    Offset(0x28),
    ,	2,
    SPST,	1,
    Offset(0x42),
    ,	1,
    GPEC,	1
}
OperationRegion(GNVS, SystemMemory, 0xbeed5a98, 0x0100)
Field(GNVS, AnyAcc, Lock, Preserve) {
    OSYS,	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,
    LINX,	8,
    Offset(0x14),
    ACTT,	8,
    PSVT,	8,
    TC1V,	8,
    TC2V,	8,
    TSPV,	8,
    CRTT,	8,
    DTSE,	8,
    DTS1,	8,
    DTS2,	8,
    DTSF,	8,
    BNUM,	8,
    B0SC,	8,
    B1SC,	8,
    B2SC,	8,
    B0SS,	8,
    B1SS,	8,
    B2SS,	8,
    Offset(0x28),
    APIC,	8,
    MPEN,	8,
    PCP0,	8,
    PCP1,	8,
    PPCM,	8,
    PPMF,	32,
    Offset(0x32),
    NATP,	8,
    CMAP,	8,
    CMBP,	8,
    LPTP,	8,
    FDCP,	8,
    CMCP,	8,
    CIRP,	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,
    BDSP,	8,
    PTY1,	8,
    PTY2,	8,
    PSCL,	8,
    TVF1,	8,
    TVF2,	8,
    Offset(0x63),
    GOPB,	32,
    BLCS,	8,
    BRTL,	8,
    ALSE,	8,
    ALAF,	8,
    LLOW,	8,
    LHIH,	8,
    Offset(0x6e),
    EMAE,	8,
    EMAP,	16,
    EMAL,	16,
    Offset(0x74),
    MEFE,	8,
    Offset(0x82),
    GTF0,	56,
    GTF2,	56,
    IDEM,	8,
    GTF1,	56
}
OperationRegion(RCRB, SystemMemory, 0xfed1c000, 0x4000)
Field(RCRB, DWordAcc, Lock, Preserve) {
    Offset(0x1000),
    Offset(0x3000),
    Offset(0x3404),
    HPAS,	2,
    ,	5,
    HPAE,	1,
    Offset(0x3418),
    ,	1,
    PATD,	1,
    SATD,	1,
    SMBD,	1,
    HDAD,	1,
    Offset(0x341a),
    RP1D,	1,
    RP2D,	1,
    RP3D,	1,
    RP4D,	1,
    RP5D,	1,
    RP6D,	1
}
OperationRegion(GPIO, SystemIO, 0x0500, 0x3c)
Field(GPIO, ByteAcc, NoLock, Preserve) {
    GU00,	8,
    GU01,	8,
    GU02,	8,
    GU03,	8,
    GIO0,	8,
    GIO1,	8,
    GIO2,	8,
    GIO3,	8,
    Offset(0xc),
    ,	4,
    GP4_,	1,
    GP5_,	1,
    Offset(0xd),
    ,	1,
    GP9_,	1,
    ,	7,
    GP17,	1,
    ,	5,
    GP23,	1,
    ,	3,
    GP27,	1,
    ,	1,
    GP29,	1,
    Offset(0x10),
    Offset(0x18),
    GB00,	8,
    GB01,	8,
    GB02,	8,
    GB03,	8,
    Offset(0x2c),
    ,	4,
    GPI4,	1,
    Offset(0x2d),
    GIV1,	8,
    GIV2,	8,
    GIV3,	8,
    GU04,	8,
    GU05,	8,
    GU06,	8,
    GU07,	8,
    GIO4,	8,
    GIO5,	8,
    ,	6,
    GD54,	1,
    Offset(0x37),
    GIO7,	8,
    ,	5,
    GP37,	1,
    Offset(0x39),
    GP40,	1,
    GL05,	7,
    ,	6,
    GP54,	1,
    Offset(0x3b),
    GL07,	8
}
Mutex(MUTX, 0)
Scope(\_PR_) {
    Processor(CPU0, 0, 0x410, 0x6) {
    }
    Processor(CPU1, 1, 0x410, 0x6) {
    }
}
Name(\DSEN, 0x1)
Name(\ECON, 0x0)
Name(\GPIC, 0x0)
Name(\CTYP, 0x0)
Name(\VFN0, 0x0)
Method(OSDW) {
    If(LEqual(OSYS, 0x2710)) {
        Return(0x1)
    }
    Else {
        Return(0x0)
    }
}
Method(PINI) {
    If(CondRefOf(_OSI, Local0)) {
        If(_OSI) {
            "Darwin"
            Store(0x2710, OSYS)
        }
        Else {
            If(_OSI) {
                "Linux"
                Store(0x03e8, OSYS)
            }
            Else {
                If(_OSI) {
                    "Windows 2001"
                    Store(0x07d1, OSYS)
                }
                Else {
                    If(_OSI) {
                        "Windows 2001 SP1"
                        Store(0x07d1, OSYS)
                    }
                    Else {
                        If(_OSI) {
                            "Windows 2001 SP2"
                            Store(0x07d2, OSYS)
                        }
                        Else {
                            If(_OSI) {
                                "Windows 2006"
                                Store(0x07d6, OSYS)
                            }
                        }
                    }
                }
            }
        }
    }
    Else {
        Store(0x07d0, OSYS)
    }
}
Method(\_PIC, 1) {
    Store(Arg0, GPIC)
}
Method(DTGP, 5) {
    If(LEqual(Arg0, Buffer(0x10) {0xc6, 0xb7, 0xb5, 0xa0, 0x18, 0x13,
0x1c, 0x44, 0xb0, 0xc9, 0xfe, 0x69, 0x5e, 0xaf, 0x94, 0x9b })) {
        If(LEqual(Arg1, One)) {
            If(LEqual(Arg2, Zero)) {
                Store(Buffer(0x1) {0x3 }, Arg4)
                Return(One)
            }
            If(LEqual(Arg2, One)) {
                Return(One)
            }
        }
    }
    Store(Buffer(0x1) {0x0 }, Arg4)
    Return(Zero)
}
Name(_S0_, Package(0x3) {
    0x0,
    0x0,
    0x0,
})
Name(_S3_, Package(0x3) {
    0x5,
    0x5,
    0x0,
})
Name(_S4_, Package(0x3) {
    0x6,
    0x6,
    0x0,
})
Name(_S5_, Package(0x3) {
    0x7,
    0x7,
    0x0,
})
Method(_PTS, 1) {
    Store(0x0, P80D)
    P8XH(0x0, Arg0)
    Store(Arg0, \_SB_.PCI0.LPCB.EC__.ECSS)
    And(GD54, 0x0, GD54)
    And(GP54, 0x0, GP54)
    Or(GP5_, 0x1, GP5_)
}
Method(_WAK, 1) {
    P8XH(0x0, 0x0)
    Store(0x0, \_SB_.PCI0.LPCB.EC__.ECSS)
    If(OSDW()) {
        \_SB_.PCI0.SBUS.ENAB()
    }
    Store(\_SB_.PCI0.LPCB.EC__.LSTE, LIDS)
    Store(\_SB_.PCI0.LPCB.EC__.RPWR, PWRS)
    PNOT()
    Return(Package(0x2) {
        0x0,
        0x0,
    })
}
Scope(\_GPE) {
    Method(_L01) {
        If(LAnd(LEqual(RP5D, 0x0), \_SB_.PCI0.RP05.HPS5)) {
            Sleep(0x64)
            If(\_SB_.PCI0.RP05.PDC5) {
                Store(0x1, \_SB_.PCI0.RP05.PDC5)
                Store(0x1, \_SB_.PCI0.RP05.HPS5)
                Notify(\_SB_.PCI0.RP05, 0x0)
            }
            Else {
                Store(0x1, \_SB_.PCI0.RP05.HPS5)
            }
        }
        If(LAnd(LEqual(RP6D, 0x0), \_SB_.PCI0.RP06.HPS6)) {
            Sleep(0x64)
            If(\_SB_.PCI0.RP06.PDC6) {
                Store(0x1, \_SB_.PCI0.RP06.PDC6)
                Store(0x1, \_SB_.PCI0.RP06.HPS6)
                Notify(\_SB_.PCI0.RP06, 0x0)
            }
            Else {
                Store(0x1, \_SB_.PCI0.RP06.HPS6)
            }
        }
    }
    Method(_L02) {
        Store(0x0, GPEC)
    }
    Method(_L03) {
        Notify(\_SB_.PCI0.UHC1, 0x2)
        Notify(\_SB_.PWRB, 0x2)
    }
    Method(_L04) {
        Notify(\_SB_.PCI0.UHC2, 0x2)
        Notify(\_SB_.PWRB, 0x2)
    }
    Method(_L0C) {
        Notify(\_SB_.PCI0.UHC3, 0x2)
        Notify(\_SB_.PWRB, 0x2)
    }
    Method(_L0E) {
        Notify(\_SB_.PCI0.UHC4, 0x2)
        Notify(\_SB_.PWRB, 0x2)
    }
    Method(_L05) {
        Notify(\_SB_.PCI0.UHC5, 0x2)
        Notify(\_SB_.PWRB, 0x2)
    }
    Method(_L07) {
        Store(0x20, \_SB_.PCI0.SBUS.HSTS)
    }
    Method(_L09) {
        If(\_SB_.PCI0.RP05.PSP5) {
            Store(0x1, \_SB_.PCI0.RP05.PSP5)
            Store(0x1, \_SB_.PCI0.RP05.PMS5)
            Notify(\_SB_.PCI0.RP05, 0x2)
        }
        If(\_SB_.PCI0.RP06.PSP6) {
            Store(0x1, \_SB_.PCI0.RP06.PSP6)
            Store(0x1, \_SB_.PCI0.RP06.PMS6)
            Notify(\_SB_.PCI0.RP06, 0x2)
        }
    }
    Method(_L0B) {
        Notify(\_SB_.PCI0.PCIB, 0x2)
    }
    Method(_L0D) {
        If(\_SB_.PCI0.EHC1.PMES) {
            Store(0x1, \_SB_.PCI0.EHC1.PMES)
            Notify(\_SB_.PCI0.EHC1, 0x2)
            Notify(\_SB_.PWRB, 0x2)
        }
        If(\_SB_.PCI0.EHC2.PMES) {
            Store(0x1, \_SB_.PCI0.EHC2.PMES)
            Notify(\_SB_.PCI0.EHC2, 0x2)
            Notify(\_SB_.PWRB, 0x2)
        }
    }
    Method(_L11) {
        Notify(\_SB_.PCI0.PCIB.FRWR, 0x0)
    }
}
Method(P8XH, 2, Serialized) {
    If(LEqual(Arg0, 0x0)) {
        Store(Or(And(P80D, 0xffffff00), Arg1), P80D)
    }
    If(LEqual(Arg0, 0x1)) {
        Store(Or(And(P80D, 0xffff00ff), ShiftLeft(Arg1, 0x8)), P80D)
    }
    If(LEqual(Arg0, 0x2)) {
        Store(Or(And(P80D, 0xff00ffff), ShiftLeft(Arg1, 0x10)), P80D)
    }
    If(LEqual(Arg0, 0x3)) {
        Store(Or(And(P80D, 0x00ffffff), ShiftLeft(Arg1, 0x18)), P80D)
    }
    Store(P80D, P80H)
}
Method(PNOT, 0, Serialized) {
    If(MPEN) {
        If(And(PDC0, 0x8)) {
            Notify(\_PR_.CPU0, 0x80)
            If(And(PDC0, 0x10)) {
                Sleep(0x64)
                Notify(\_PR_.CPU0, 0x81)
            }
        }
        If(And(PDC1, 0x8)) {
            Notify(\_PR_.CPU1, 0x80)
            If(And(PDC1, 0x10)) {
                Sleep(0x64)
                Notify(\_PR_.CPU1, 0x81)
            }
        }
    }
    Else {
        Notify(\_PR_.CPU0, 0x80)
        Sleep(0x64)
        Notify(\_PR_.CPU0, 0x81)
    }
}
Method(TRAP, 2, Serialized) {
    Store(Arg1, SMIF)
    If(LEqual(Arg0, 0x1)) {
        Store(0x0, TRP0)
        Return(SMIF)
    }
    If(LEqual(Arg0, 0x2)) {
        Store(0x0, TRPD)
        Return(SMIF)
    }
    Return(0x1)
}
Method(GETP, 1, Serialized) {
    If(LEqual(And(Arg0, 0x9), 0x0)) {
        Return(0xffffffff)
    }
    If(LEqual(And(Arg0, 0x9), 0x8)) {
        Return(0x0384)
    }
    ShiftRight(And(Arg0, 0x0300), 0x8, Local0)
    ShiftRight(And(Arg0, 0x3000), 0xc, Local1)
    Return(Multiply(0x1e, Subtract(0x9, Add(Local0, Local1))))
}
Method(GDMA, 5, Serialized) {
    If(Arg0) {
        If(LAnd(Arg1, Arg4)) {
            Return(0x14)
        }
        If(LAnd(Arg2, Arg4)) {
            Return(Multiply(Subtract(0x4, Arg3), 0xf))
        }
        Return(Multiply(Subtract(0x4, Arg3), 0x1e))
    }
    Return(0xffffffff)
}
Method(GETT, 1, Serialized) {
    Return(Multiply(0x1e, Subtract(0x9, Add(And(ShiftRight(Arg0, 0x2),
0x3), And(Arg0, 0x3)))))
}
Method(GETF, 3, Serialized) {
    Name(TMPF, 0x0)
    If(Arg0) {
        Or(TMPF, 0x1, TMPF)
    }
    If(And(Arg2, 0x2)) {
        Or(TMPF, 0x2, TMPF)
    }
    If(Arg1) {
        Or(TMPF, 0x4, TMPF)
    }
    If(And(Arg2, 0x20)) {
        Or(TMPF, 0x8, TMPF)
    }
    If(And(Arg2, 0x4000)) {
        Or(TMPF, 0x10, TMPF)
    }
    Return(TMPF)
}
Method(SETP, 3, Serialized) {
    If(LGreater(Arg0, 0xf0)) {
        Return(0x8)
    }
    Else {
        If(And(Arg1, 0x2)) {
            If(LAnd(LNot(LGreater(Arg0, 0x78)), And(Arg2, 0x2))) {
                Return(0x2301)
            }
            If(LAnd(LNot(LGreater(Arg0, 0xb4)), And(Arg2, 0x1))) {
                Return(0x2101)
            }
        }
        Return(0x1001)
    }
}
Method(SDMA, 1, Serialized) {
    If(LNot(LGreater(Arg0, 0x14))) {
        Return(0x1)
    }
    If(LNot(LGreater(Arg0, 0x1e))) {
        Return(0x2)
    }
    If(LNot(LGreater(Arg0, 0x2d))) {
        Return(0x1)
    }
    If(LNot(LGreater(Arg0, 0x3c))) {
        Return(0x2)
    }
    If(LNot(LGreater(Arg0, 0x5a))) {
        Return(0x1)
    }
    Return(0x0)
}
Method(SETT, 3, Serialized) {
    If(And(Arg1, 0x2)) {
        If(LAnd(LNot(LGreater(Arg0, 0x78)), And(Arg2, 0x2))) {
            Return(0xb)
        }
        If(LAnd(LNot(LGreater(Arg0, 0xb4)), And(Arg2, 0x1))) {
            Return(0x9)
        }
    }
    Return(0x4)
}
Scope(\_SB_) {
    Method(_INI) {
        PINI()
    }
    Device(ADP1) {
        Name(_HID, "ACPI0003")
        Name(_PRW, Package(0x2) {
            0x18,
            0x3,
        })
        Method(_PSR) {
            Return(PWRS)
        }
        Method(_PCL) {
            Return(\_SB_)
        }
        Method(_PSW, 1) {
            If(Arg0) {
                Store(0x1, \_SB_.PCI0.LPCB.EC__.ACWK)
            }
            Else {
                Store(0x0, \_SB_.PCI0.LPCB.EC__.ACWK)
            }
        }
    }
    Device(LID0) {
        Name(_HID, 0x0d0cd041)
        Name(_PRW, Package(0x2) {
            0x18,
            0x3,
        })
        Method(_LID) {
            Return(LIDS)
        }
        Method(_PSW, 1) {
            If(Arg0) {
                Store(0x1, \_SB_.PCI0.LPCB.EC__.LWAK)
            }
            Else {
                Store(0x0, \_SB_.PCI0.LPCB.EC__.LWAK)
            }
        }
    }
    Device(PNLF) {
        Name(_HID, 0x02001006)
        Name(_CID, "backlight")
        Name(_UID, 0xc)
        Name(_STA, 0xb)
    }
    Device(PWRB) {
        Name(_HID, 0x0c0cd041)
    }
    Device(SLPB) {
        Name(_HID, 0x0e0cd041)
        Name(_STA, 0xb)
    }
    Device(PCI0) {
        Method(_INI) {
            If(OSDW()) {
                \_SB_.PCI0.SBUS.ENAB()
            }
        }
        Method(_S3D) {
            Return(0x3)
        }
        Method(_S4D) {
            Return(0x3)
        }
        Name(_HID, 0x080ad041)
        Name(_CID, 0x030ad041)
        Device(MCHC) {
            Name(_ADR, 0x0)
            OperationRegion(HBUS, PCI_Config, 0x40, 0xc0)
            Field(HBUS, DWordAcc, NoLock, Preserve) {
                EPEN,	1,
                ,	11,
                EPBR,	20,
                Offset(0x8),
                MHEN,	1,
                ,	13,
                MHBR,	18,
                Offset(0x20),
                PXEN,	1,
                PXSZ,	2,
                ,	23,
                PXBR,	6,
                Offset(0x28),
                DIEN,	1,
                ,	11,
                DIBR,	20,
                Offset(0x30),
                IPEN,	1,
                ,	11,
                IPBR,	20,
                Offset(0x50),
                ,	4,
                PM0H,	2,
                Offset(0x51),
                PM1L,	2,
                ,	2,
                PM1H,	2,
                Offset(0x52),
                PM2L,	2,
                ,	2,
                PM2H,	2,
                Offset(0x53),
                PM3L,	2,
                ,	2,
                PM3H,	2,
                Offset(0x54),
                PM4L,	2,
                ,	2,
                PM4H,	2,
                Offset(0x55),
                PM5L,	2,
                ,	2,
                PM5H,	2,
                Offset(0x56),
                PM6L,	2,
                ,	2,
                PM6H,	2,
                Offset(0x57),
                ,	7,
                HENA,	1,
                Offset(0x62),
                TUUD,	16,
                Offset(0x70),
                ,	4,
                TLUD,	12
            }
        }
        Name(BUF0, Buffer(0x01d4) {0x88, 0xd, 0x0, 0x2, 0xc, 0x0, 0x0,
0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x1, 0x87, 0x17, 0x0, 0x1,
0xc, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf7, 0xc, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0xf8, 0xc, 0x0, 0x0, 0x47, 0x1, 0xf8, 0xc, 0xf8,
0xc, 0x1, 0x8, 0x87, 0x17, 0x0, 0x1, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0,
0x0, 0xd, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0xf3, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0xa, 0x0, 0xff, 0xff, 0xb, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x2, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0xc, 0x0, 0xff, 0x3f, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0,
0x0, 0x40, 0xc, 0x0, 0xff, 0x7f, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0,
0x0, 0x80, 0xc, 0x0, 0xff, 0xbf, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0,
0x0, 0xc0, 0xc, 0x0, 0xff, 0xff, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0xd, 0x0, 0xff, 0x3f, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0,
0x0, 0x40, 0xd, 0x0, 0xff, 0x7f, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0,
0x0, 0x80, 0xd, 0x0, 0xff, 0xbf, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0,
0x0, 0xc0, 0xd, 0x0, 0xff, 0xff, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0xe, 0x0, 0xff, 0x3f, 0xe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0,
0x0, 0x40, 0xe, 0x0, 0xff, 0x7f, 0xe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0,
0x0, 0x80, 0xe, 0x0, 0xff, 0xbf, 0xe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0,
0x0, 0xc0, 0xe, 0x0, 0xff, 0xff, 0xe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x40, 0x0, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x0, 0xff, 0xff, 0xf, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x1, 0x0, 0x87, 0x17, 0x0, 0x0, 0xc, 0x3, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xbf, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x79, 0x0 })
        Method(_CRS, 0, Serialized) {
            If(^MCHC.PM1L) {
                CreateDWordField(BUF0, 0x7c, C0LN)
                Store(Zero, C0LN)
            }
            If(LEqual(^MCHC.PM1L, 0x1)) {
                CreateBitField(BUF0, 0x0358, C0RW)
                Store(Zero, C0RW)
            }
            If(^MCHC.PM1H) {
                CreateDWordField(BUF0, 0x96, C4LN)
                Store(Zero, C4LN)
            }
            If(LEqual(^MCHC.PM1H, 0x1)) {
                CreateBitField(BUF0, 0x0428, C4RW)
                Store(Zero, C4RW)
            }
            If(^MCHC.PM2L) {
                CreateDWordField(BUF0, 0xb0, C8LN)
                Store(Zero, C8LN)
            }
            If(LEqual(^MCHC.PM2L, 0x1)) {
                CreateBitField(BUF0, 0x04f8, C8RW)
                Store(Zero, C8RW)
            }
            If(^MCHC.PM2H) {
                CreateDWordField(BUF0, 0xca, CCLN)
                Store(Zero, CCLN)
            }
            If(LEqual(^MCHC.PM2H, 0x1)) {
                CreateBitField(BUF0, 0x05c8, CCRW)
                Store(Zero, CCRW)
            }
            If(^MCHC.PM3L) {
                CreateDWordField(BUF0, 0xe4, D0LN)
                Store(Zero, D0LN)
            }
            If(LEqual(^MCHC.PM3L, 0x1)) {
                CreateBitField(BUF0, 0x0698, D0RW)
                Store(Zero, D0RW)
            }
            If(^MCHC.PM3H) {
                CreateDWordField(BUF0, 0xfe, D4LN)
                Store(Zero, D4LN)
            }
            If(LEqual(^MCHC.PM3H, 0x1)) {
                CreateBitField(BUF0, 0x0768, D4RW)
                Store(Zero, D4RW)
            }
            If(^MCHC.PM4L) {
                CreateDWordField(BUF0, 0x0118, D8LN)
                Store(Zero, D8LN)
            }
            If(LEqual(^MCHC.PM4L, 0x1)) {
                CreateBitField(BUF0, 0x0838, D8RW)
                Store(Zero, D8RW)
            }
            If(^MCHC.PM4H) {
                CreateDWordField(BUF0, 0x0132, DCLN)
                Store(Zero, DCLN)
            }
            If(LEqual(^MCHC.PM4H, 0x1)) {
                CreateBitField(BUF0, 0x0908, DCRW)
                Store(Zero, DCRW)
            }
            If(^MCHC.PM5L) {
                CreateDWordField(BUF0, 0x014c, E0LN)
                Store(Zero, E0LN)
            }
            If(LEqual(^MCHC.PM5L, 0x1)) {
                CreateBitField(BUF0, 0x09d8, E0RW)
                Store(Zero, E0RW)
            }
            If(^MCHC.PM5H) {
                CreateDWordField(BUF0, 0x0166, E4LN)
                Store(Zero, E4LN)
            }
            If(LEqual(^MCHC.PM5H, 0x1)) {
                CreateBitField(BUF0, 0x0aa8, E4RW)
                Store(Zero, E4RW)
            }
            If(^MCHC.PM6L) {
                CreateDWordField(BUF0, 0x0180, E8LN)
                Store(Zero, E8LN)
            }
            If(LEqual(^MCHC.PM6L, 0x1)) {
                CreateBitField(BUF0, 0x0b78, E8RW)
                Store(Zero, E8RW)
            }
            If(^MCHC.PM6H) {
                CreateDWordField(BUF0, 0x019a, ECLN)
                Store(Zero, ECLN)
            }
            If(LEqual(^MCHC.PM6H, 0x1)) {
                CreateBitField(BUF0, 0x0c48, ECRW)
                Store(Zero, ECRW)
            }
            If(^MCHC.PM0H) {
                CreateDWordField(BUF0, 0x01b4, F0LN)
                Store(Zero, F0LN)
            }
            If(LEqual(^MCHC.PM0H, 0x1)) {
                CreateBitField(BUF0, 0x0d18, F0RW)
                Store(Zero, F0RW)
            }
            CreateDWordField(BUF0, 0x01c2, M1MN)
            CreateDWordField(BUF0, 0x01c6, M1MX)
            CreateDWordField(BUF0, 0x01ce, M1LN)
            ShiftLeft(^MCHC.TLUD, 0x14, M1MN)
            Add(Subtract(M1MX, M1MN), 0x1, M1LN)
            Return(BUF0)
        }
        Method(_OSC, 4) {
            CreateDWordField(Arg3, 0x0, CDW1)
            If(LEqual(Arg0, Buffer(0x10) {0x5b, 0x4d, 0xdb, 0x33,
0xf7, 0x1f, 0x1c, 0x40, 0x96, 0x57, 0x74, 0x41, 0xc0, 0x3d, 0xd7, 0x66
})) {
                If(LNot(LLess(Arg2, 0x3))) {
                    Name(SUPP, 0x0)
                    Name(CTRL, 0x0)
                    Store(0x3, Local0)
                    CreateDWordField(Arg3, 0x4, CDW2)
                    CreateDWordField(Arg3, 0x8, CDW3)
                    Store(CDW2, SUPP)
                    Store(CDW3, CTRL)
                    And(CTRL, 0x1d, CTRL)
                    If(LNot(LEqual(And(SUPP, 0x16), 0x16))) {
                        And(CTRL, 0x1e, CTRL)
                    }
                    If(LNot(And(CDW1, 0x1))) {
                        If(And(CTRL, 0x1)) {
                            And(Local0, 0xe, Local0)
                        }
                        If(And(CTRL, 0x4)) {
                            And(Local0, 0xd, Local0)
                            \_SB_.PCI0.LPCB.GPMD(0x0)
                        }
                        If(And(CTRL, 0x10)) {
                            Store("PCI0._OSC PCI-E cap bit set", Debug)
                        }
                        \_SB_.PCI0.RP05.SMPC(Local0)
                        \_SB_.PCI0.RP06.SMPC(Local0)
                    }
                    If(LNot(LEqual(Arg1, One))) {
                        Or(CDW1, 0x8, CDW1)
                    }
                    If(LNot(LEqual(CDW3, CTRL))) {
                        Or(CDW1, 0x10, CDW1)
                    }
                    Store(CTRL, CDW3)
                }
                Else {
                    Or(CDW1, 0x2, CDW1)
                }
            }
            Else {
                Or(CDW1, 0x4, CDW1)
            }
            Return(Arg3)
        }
        Method(_PRT) {
            If(GPIC) {
                Return(Package(0x13) {
                    Package(0x4) {
                        0x0001ffff,
                        0x0,
                        0x0,
                        0x10,
                    },
                    Package(0x4) {
                        0x0002ffff,
                        0x0,
                        0x0,
                        0x10,
                    },
                    Package(0x4) {
                        0x0007ffff,
                        0x0,
                        0x0,
                        0x10,
                    },
                    Package(0x4) {
                        0x001affff,
                        0x0,
                        0x0,
                        0x14,
                    },
                    Package(0x4) {
                        0x001affff,
                        0x1,
                        0x0,
                        0x10,
                    },
                    Package(0x4) {
                        0x001affff,
                        0x2,
                        0x0,
                        0x15,
                    },
                    Package(0x4) {
                        0x001bffff,
                        0x0,
                        0x0,
                        0x14,
                    },
                    Package(0x4) {
                        0x001cffff,
                        0x0,
                        0x0,
                        0x10,
                    },
                    Package(0x4) {
                        0x001cffff,
                        0x1,
                        0x0,
                        0x11,
                    },
                    Package(0x4) {
                        0x001cffff,
                        0x2,
                        0x0,
                        0x12,
                    },
                    Package(0x4) {
                        0x001cffff,
                        0x3,
                        0x0,
                        0x13,
                    },
                    Package(0x4) {
                        0x001dffff,
                        0x0,
                        0x0,
                        0x10,
                    },
                    Package(0x4) {
                        0x001dffff,
                        0x1,
                        0x0,
                        0x12,
                    },
                    Package(0x4) {
                        0x001dffff,
                        0x2,
                        0x0,
                        0x15,
                    },
                    Package(0x4) {
                        0x001dffff,
                        0x3,
                        0x0,
                        0x14,
                    },
                    Package(0x4) {
                        0x001fffff,
                        0x0,
                        0x0,
                        0x15,
                    },
                    Package(0x4) {
                        0x001fffff,
                        0x1,
                        0x0,
                        0x12,
                    },
                    Package(0x4) {
                        0x001fffff,
                        0x2,
                        0x0,
                        0x14,
                    },
                    Package(0x4) {
                        0x001fffff,
                        0x3,
                        0x0,
                        0x10,
                    },
                })
            }
            Else {
                Return(Package(0x13) {
                    Package(0x4) {
                        0x0001ffff,
                        0x0,
                        \_SB_.PCI0.LPCB.LNKA,
                        0x0,
                    },
                    Package(0x4) {
                        0x0002ffff,
                        0x0,
                        \_SB_.PCI0.LPCB.LNKA,
                        0x0,
                    },
                    Package(0x4) {
                        0x0007ffff,
                        0x0,
                        \_SB_.PCI0.LPCB.LNKA,
                        0x0,
                    },
                    Package(0x4) {
                        0x001affff,
                        0x0,
                        \_SB_.PCI0.LPCB.LNKE,
                        0x0,
                    },
                    Package(0x4) {
                        0x001affff,
                        0x1,
                        \_SB_.PCI0.LPCB.LNKA,
                        0x0,
                    },
                    Package(0x4) {
                        0x001affff,
                        0x2,
                        \_SB_.PCI0.LPCB.LNKF,
                        0x0,
                    },
                    Package(0x4) {
                        0x001bffff,
                        0x0,
                        \_SB_.PCI0.LPCB.LNKE,
                        0x0,
                    },
                    Package(0x4) {
                        0x001cffff,
                        0x0,
                        \_SB_.PCI0.LPCB.LNKA,
                        0x0,
                    },
                    Package(0x4) {
                        0x001cffff,
                        0x1,
                        \_SB_.PCI0.LPCB.LNKB,
                        0x0,
                    },
                    Package(0x4) {
                        0x001cffff,
                        0x2,
                        \_SB_.PCI0.LPCB.LNKC,
                        0x0,
                    },
                    Package(0x4) {
                        0x001cffff,
                        0x3,
                        \_SB_.PCI0.LPCB.LNKD,
                        0x0,
                    },
                    Package(0x4) {
                        0x001dffff,
                        0x0,
                        \_SB_.PCI0.LPCB.LNKA,
                        0x0,
                    },
                    Package(0x4) {
                        0x001dffff,
                        0x1,
                        \_SB_.PCI0.LPCB.LNKC,
                        0x0,
                    },
                    Package(0x4) {
                        0x001dffff,
                        0x2,
                        \_SB_.PCI0.LPCB.LNKF,
                        0x0,
                    },
                    Package(0x4) {
                        0x001dffff,
                        0x3,
                        \_SB_.PCI0.LPCB.LNKE,
                        0x0,
                    },
                    Package(0x4) {
                        0x001fffff,
                        0x0,
                        \_SB_.PCI0.LPCB.LNKF,
                        0x0,
                    },
                    Package(0x4) {
                        0x001fffff,
                        0x1,
                        \_SB_.PCI0.LPCB.LNKC,
                        0x0,
                    },
                    Package(0x4) {
                        0x001fffff,
                        0x2,
                        \_SB_.PCI0.LPCB.LNKE,
                        0x0,
                    },
                    Package(0x4) {
                        0x001fffff,
                        0x3,
                        \_SB_.PCI0.LPCB.LNKA,
                        0x0,
                    },
                })
            }
        }
        Device(PDRC) {
            Name(_HID, 0x020cd041)
            Name(_UID, 0x1)
            Name(BUF0, Buffer(0x56) {0x86, 0x9, 0x0, 0x1, 0x0, 0x0,
0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x86, 0x9, 0x0, 0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0x40, 0x0, 0x0, 0x86, 0x9, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0,
0x0, 0x10, 0x0, 0x0, 0x86, 0x9, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0,
0x10, 0x0, 0x0, 0x86, 0x9, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x86, 0x9, 0x0, 0x1, 0x0, 0x0, 0xd2, 0xfe, 0x0, 0x0, 0x2,
0x0, 0x86, 0x9, 0x0, 0x1, 0x0, 0x50, 0xd4, 0xfe, 0x0, 0xb0, 0x4, 0x0,
0x79, 0x0 })
            Method(_CRS, 0, Serialized) {
                CreateDWordField(BUF0, 0x4, RBR0)
                ShiftLeft(\_SB_.PCI0.LPCB.RCBA, 0xe, RBR0)
                CreateDWordField(BUF0, 0x10, MBR0)
                ShiftLeft(\_SB_.PCI0.MCHC.MHBR, 0xe, MBR0)
                CreateDWordField(BUF0, 0x1c, DBR0)
                ShiftLeft(\_SB_.PCI0.MCHC.DIBR, 0xc, DBR0)
                CreateDWordField(BUF0, 0x28, EBR0)
                ShiftLeft(\_SB_.PCI0.MCHC.EPBR, 0xc, EBR0)
                CreateDWordField(BUF0, 0x34, XBR0)
                ShiftLeft(\_SB_.PCI0.MCHC.PXBR, 0x1a, XBR0)
                CreateDWordField(BUF0, 0x38, XSZ0)
                ShiftRight(0x10000000, \_SB_.PCI0.MCHC.PXSZ, XSZ0)
                Return(BUF0)
            }
        }
        Device(GFX0) {
            Name(_ADR, 0x00020000)
            Method(DHLV) {
                Return(GP4_)
            }
            Method(DHSP, 1) {
                If(LNot(LGreater(Arg0, 0x1))) {
                    Store(Arg0, GPI4)
                }
            }
            Name(DHGP, 0x14)
            Method(_DOS, 1) {
                Store(And(Arg0, 0x3), DSEN)
            }
            Method(_DOD) {
                Return(Package(0x3) {
                    0x80010400,
                    0x80010200,
                    0x80010300,
                })
            }
            Method(DSS_, 1) {
                If(LEqual(And(Arg0, 0xc0000000), 0x80000000)) {
                    If(And(NSTE, 0x3)) {
                        And(0xfffd, NSTE, NSTE)
                    }
                    If(And(NSTE, 0x1)) {
                        Store(0x1, GP37)
                    }
                    Else {
                        Store(0x0, GP37)
                    }
                    Store(NSTE, CSTE)
                }
            }
            Device(LCD_) {
                Method(_ADR, 0, Serialized) {
                    Return(0x0400)
                }
                Method(_DCS) {
                    Return(0x1f)
                }
                Method(_DGS) {
                    Return(0x1)
                }
            }
            Device(VGA_) {
                Method(_ADR, 0, Serialized) {
                    Return(0x0300)
                }
                Method(_DCS) {
                    If(And(CSTE, 0x1)) {
                        Return(0x1f)
                    }
                    Return(0x1d)
                }
                Method(_DGS) {
                    If(And(NSTE, 0x1)) {
                        Return(0x1)
                    }
                    Return(0x0)
                }
                Method(_DSS, 1) {
                    If(And(Arg0, 0x1)) {
                        Or(0x1, NSTE, NSTE)
                    }
                    Else {
                        And(0xfffe, NSTE, NSTE)
                    }
                    DSS_(Arg0)
                }
            }
            Device(TV__) {
                Method(_ADR, 0, Serialized) {
                    Return(0x0200)
                }
                Method(_DCS) {
                    If(And(CSTE, 0x2)) {
                        Return(0x1f)
                    }
                    Return(0x1d)
                }
                Method(_DGS) {
                    If(And(NSTE, 0x2)) {
                        Return(0x1)
                    }
                    Return(0x0)
                }
                Method(_DSS, 1) {
                    If(And(Arg0, 0x1)) {
                        Or(0x2, NSTE, NSTE)
                    }
                    Else {
                        And(0xfffd, NSTE, NSTE)
                    }
                    DSS_(Arg0)
                }
            }
        }
        Device(HDEF) {
            Name(_ADR, 0x001b0000)
        }
        Device(RP05) {
            Name(_ADR, 0x001c0004)
            OperationRegion(P5CS, PCI_Config, 0x40, 0x0100)
            Field(P5CS, AnyAcc, NoLock, WriteAsZeros) {
                SBSR,	1,
                Offset(0x12),
                ,	13,
                LAS5,	1,
                Offset(0x1a),
                ABP5,	1,
                ,	2,
                PDC5,	1,
                ,	2,
                PDS5,	1,
                Offset(0x1b),
                LSC5,	1,
                Offset(0x20),
                Offset(0x22),
                PSP5,	1,
                Offset(0x9c),
                ,	30,
                HPS5,	1,
                PMS5,	1
            }
            OperationRegion(P5CE, PCI_Config, 0xd8, 0x4)
            Field(P5CE, AnyAcc, NoLock, Preserve) {
                ,	30,
                MPCE,	2
            }
            Device(ARPT) {
                Name(_ADR, 0x0)
                Name(_PRW, Package(0x2) {
                    0x9,
                    0x3,
                })
                Name(_SUN, 0x5)
                Name(_EJD, "\_SB.PCI0.EHC1.HUB1.PRT2")
            }
            Method(SMPC, 1) {
                If(LEqual(RP5D, 0x0)) {
                    And(Arg0, 0x3, MPCE)
                    If(LNot(And(Arg0, 0x1))) {
                        Store(One, ABP5)
                        Store(One, PDC5)
                    }
                }
            }
            Method(_PRT) {
                If(\GPIC) {
                    Return(Package(0x4) {
                        Package(0x4) {
                            0xffff,
                            0x0,
                            0x0,
                            0x10,
                        },
                        Package(0x4) {
                            0xffff,
                            0x1,
                            0x0,
                            0x11,
                        },
                        Package(0x4) {
                            0xffff,
                            0x2,
                            0x0,
                            0x12,
                        },
                        Package(0x4) {
                            0xffff,
                            0x3,
                            0x0,
                            0x13,
                        },
                    })
                }
                Else {
                    Return(Package(0x4) {
                        Package(0x4) {
                            0xffff,
                            0x0,
                            \_SB_.PCI0.LPCB.LNKA,
                            0x0,
                        },
                        Package(0x4) {
                            0xffff,
                            0x1,
                            \_SB_.PCI0.LPCB.LNKB,
                            0x0,
                        },
                        Package(0x4) {
                            0xffff,
                            0x2,
                            \_SB_.PCI0.LPCB.LNKC,
                            0x0,
                        },
                        Package(0x4) {
                            0xffff,
                            0x3,
                            \_SB_.PCI0.LPCB.LNKD,
                            0x0,
                        },
                    })
                }
            }
        }
        Device(RP06) {
            Name(_ADR, 0x001c0005)
            OperationRegion(P6CS, PCI_Config, 0x40, 0x0100)
            Field(P6CS, AnyAcc, NoLock, WriteAsZeros) {
                Offset(0x12),
                ,	13,
                LAS6,	1,
                Offset(0x1a),
                ABP6,	1,
                ,	2,
                PDC6,	1,
                ,	2,
                PDS6,	1,
                Offset(0x1b),
                LSC6,	1,
                Offset(0x20),
                Offset(0x22),
                PSP6,	1,
                Offset(0x9c),
                ,	30,
                HPS6,	1,
                PMS6,	1
            }
            OperationRegion(P6CE, PCI_Config, 0xd8, 0x4)
            Field(P6CE, AnyAcc, NoLock, Preserve) {
                ,	30,
                MPCE,	2
            }
            Device(GIGE) {
                Name(_ADR, 0x0)
                Name(_PRW, Package(0x2) {
                    0x9,
                    0x3,
                })
                Method(EWOL, 1) {
                    If(LEqual(Arg0, 0x1)) {
                        Or(GP9_, 0x1, GP9_)
                    }
                    Else {
                        And(GP9_, 0x0, GP9_)
                    }
                    If(LEqual(Arg0, GP9_)) {
                        Return(0x0)
                    }
                    Else {
                        Return(0x1)
                    }
                }
            }
            Method(SMPC, 1) {
                If(LEqual(RP6D, 0x0)) {
                    And(Arg0, 0x3, MPCE)
                    If(LNot(And(Arg0, 0x1))) {
                        Store(One, ABP6)
                        Store(One, PDC6)
                    }
                }
            }
            Method(_PRT) {
                If(\GPIC) {
                    Return(Package(0x4) {
                        Package(0x4) {
                            0xffff,
                            0x0,
                            0x0,
                            0x11,
                        },
                        Package(0x4) {
                            0xffff,
                            0x1,
                            0x0,
                            0x12,
                        },
                        Package(0x4) {
                            0xffff,
                            0x2,
                            0x0,
                            0x13,
                        },
                        Package(0x4) {
                            0xffff,
                            0x3,
                            0x0,
                            0x10,
                        },
                    })
                }
                Else {
                    Return(Package(0x4) {
                        Package(0x4) {
                            0xffff,
                            0x0,
                            \_SB_.PCI0.LPCB.LNKB,
                            0x0,
                        },
                        Package(0x4) {
                            0xffff,
                            0x1,
                            \_SB_.PCI0.LPCB.LNKC,
                            0x0,
                        },
                        Package(0x4) {
                            0xffff,
                            0x2,
                            \_SB_.PCI0.LPCB.LNKD,
                            0x0,
                        },
                        Package(0x4) {
                            0xffff,
                            0x3,
                            \_SB_.PCI0.LPCB.LNKA,
                            0x0,
                        },
                    })
                }
            }
        }
        Device(UHC1) {
            Name(_ADR, 0x001d0000)
            OperationRegion(U1CS, PCI_Config, 0xc4, 0x4)
            Field(U1CS, DWordAcc, NoLock, Preserve) {
                U1EN,	2
            }
            Device(HUB1) {
                Name(_ADR, 0x0)
                Device(PRT1) {
                    Name(_ADR, 0x1)
                }
                Device(PRT2) {
                    Name(_ADR, 0x2)
                    Name(_EJD, "\_SB.PCI0.RP05.ARPT")
                }
            }
            Name(_PRW, Package(0x2) {
                0x3,
                0x3,
            })
            Method(_PSW, 1) {
                If(Arg0) {
                    Store(0x3, U1EN)
                }
                Else {
                    Store(0x0, U1EN)
                }
            }
            Method(_S3D) {
                Return(0x3)
            }
            Method(_S4D) {
                Return(0x3)
            }
        }
        Device(UHC2) {
            Name(_ADR, 0x001d0001)
            OperationRegion(U2CS, PCI_Config, 0xc4, 0x4)
            Field(U2CS, DWordAcc, NoLock, Preserve) {
                U2EN,	2
            }
            Device(HUB2) {
                Name(_ADR, 0x0)
                Device(PRT1) {
                    Name(_ADR, 0x1)
                }
                Device(PRT2) {
                    Name(_ADR, 0x2)
                }
            }
            Name(_PRW, Package(0x2) {
                0x4,
                0x3,
            })
            Method(_PSW, 1) {
                If(Arg0) {
                    Store(0x3, U2EN)
                }
                Else {
                    Store(0x0, U2EN)
                }
            }
            Method(_S3D) {
                Return(0x3)
            }
            Method(_S4D) {
                Return(0x3)
            }
        }
        Device(UHC3) {
            Name(_ADR, 0x001d0002)
            OperationRegion(U2CS, PCI_Config, 0xc4, 0x4)
            Field(U2CS, DWordAcc, NoLock, Preserve) {
                U3EN,	2
            }
            Device(HUB3) {
                Name(_ADR, 0x0)
                Device(PRT1) {
                    Name(_ADR, 0x1)
                }
                Device(PRT2) {
                    Name(_ADR, 0x2)
                }
            }
            Name(_PRW, Package(0x2) {
                0xc,
                0x3,
            })
            Method(_PSW, 1) {
                If(Arg0) {
                    Store(0x3, U3EN)
                }
                Else {
                    Store(0x0, U3EN)
                }
            }
            Method(_S3D) {
                Return(0x3)
            }
            Method(_S4D) {
                Return(0x3)
            }
        }
        Device(UHC4) {
            Name(_ADR, 0x001a0000)
            OperationRegion(U4CS, PCI_Config, 0xc4, 0x4)
            Field(U4CS, DWordAcc, NoLock, Preserve) {
                U4EN,	2
            }
            Device(HUB4) {
                Name(_ADR, 0x0)
                Device(PRT1) {
                    Name(_ADR, 0x1)
                }
                Device(PRT2) {
                    Name(_ADR, 0x2)
                }
            }
            Name(_PRW, Package(0x2) {
                0xe,
                0x3,
            })
            Method(_PSW, 1) {
                If(Arg0) {
                    Store(0x3, U4EN)
                }
                Else {
                    Store(0x0, U4EN)
                }
            }
            Method(_S3D) {
                Return(0x3)
            }
            Method(_S4D) {
                Return(0x3)
            }
        }
        Device(UHC5) {
            Name(_ADR, 0x001a0001)
            OperationRegion(U5CS, PCI_Config, 0xc4, 0x4)
            Field(U5CS, DWordAcc, NoLock, Preserve) {
                U5EN,	2
            }
            Device(HUB5) {
                Name(_ADR, 0x0)
                Device(PRT1) {
                    Name(_ADR, 0x1)
                }
                Device(PRT2) {
                    Name(_ADR, 0x2)
                }
            }
            Name(_PRW, Package(0x2) {
                0x5,
                0x3,
            })
            Method(_PSW, 1) {
                If(Arg0) {
                    Store(0x3, U5EN)
                }
                Else {
                    Store(0x0, U5EN)
                }
            }
            Method(_S3D) {
                Return(0x3)
            }
            Method(_S4D) {
                Return(0x3)
            }
        }
        Device(EHC1) {
            Name(_ADR, 0x001d0007)
            OperationRegion(U7CS, PCI_Config, 0x54, 0x4)
            Field(U7CS, DWordAcc, NoLock, Preserve) {
                ,	15,
                PMES,	1
            }
            Device(HUB1) {
                Name(_ADR, 0x0)
                Device(PRT1) {
                    Name(_ADR, 0x1)
                }
                Device(PRT2) {
                    Name(_ADR, 0x2)
                    Name(_EJD, "\_SB.PCI0.RP05.ARPT")
                }
                Device(PRT3) {
                    Name(_ADR, 0x3)
                }
                Device(PRT4) {
                    Name(_ADR, 0x4)
                }
                Device(PRT5) {
                    Name(_ADR, 0x5)
                }
                Device(PRT6) {
                    Name(_ADR, 0x6)
                }
            }
            Name(_PRW, Package(0x2) {
                0xd,
                0x3,
            })
            Method(_S3D) {
                Return(0x3)
            }
            Method(_S4D) {
                Return(0x3)
            }
            Method(_DSM, 4) {
                Store(Package(0x7) {
                    "AAPL,current-available",
                    0x04b0,
                    "AAPL,current-extra",
                    0x02bc,
                    "AAPL,current-in-sleep",
                    0x03e8,
                    Buffer(0x1) {0x0 },
                }, Local0)
                DTGP(Arg0, Arg1, Arg2, Arg3, RefOf(Local0))
                Return(Local0)
            }
        }
        Device(EHC2) {
            Name(_ADR, 0x001a0007)
            OperationRegion(UFCS, PCI_Config, 0x54, 0x4)
            Field(UFCS, DWordAcc, NoLock, Preserve) {
                ,	15,
                PMES,	1
            }
            Device(HUB2) {
                Name(_ADR, 0x0)
                Device(PRT1) {
                    Name(_ADR, 0x1)
                }
                Device(PRT2) {
                    Name(_ADR, 0x2)
                }
                Device(PRT3) {
                    Name(_ADR, 0x3)
                }
                Device(PRT4) {
                    Name(_ADR, 0x4)
                }
            }
            Name(_PRW, Package(0x2) {
                0xd,
                0x3,
            })
            Method(_S3D) {
                Return(0x3)
            }
            Method(_S4D) {
                Return(0x3)
            }
            Method(_DSM, 4) {
                Store(Package(0x7) {
                    "AAPL,current-available",
                    0x04b0,
                    "AAPL,current-extra",
                    0x02bc,
                    "AAPL,current-in-sleep",
                    0x03e8,
                    Buffer(0x1) {0x0 },
                }, Local0)
                DTGP(Arg0, Arg1, Arg2, Arg3, RefOf(Local0))
                Return(Local0)
            }
        }
        Device(PCIB) {
            Name(_ADR, 0x001e0000)
            OperationRegion(SBRT, PCI_Config, 0x3e, 0x2)
            Field(SBRT, WordAcc, NoLock, Preserve) {
                ,	6,
                PRST,	1,
                Offset(0x2)
            }
            Method(_PS0, 0, Serialized) {
                If(OSDW()) {
                    Store("PCIB D0 Entry", Debug)
                    Store(\_SB_.PCI0.SBUS.SRDB(0xd2, 0x83), Local0)
                    If(LEqual(And(Local0, 0x8), 0x0)) {
                        Store(0x1, PRST)
                        Or(Local0, 0x8, Local0)
                        If(LNot(\_SB_.PCI0.SBUS.SWRB(0xd2, 0x83, Local0))) {
                            Store("PCIB: Setting Clock Failed!", Debug)
                        }
                        Sleep(0xa)
                        Store(0x0, PRST)
                    }
                    Store("PCIB D0 Exit", Debug)
                }
            }
            Method(_PS3, 0, Serialized) {
                If(OSDW()) {
                    Store("PCIB D3 Entry", Debug)
                    Store(\_SB_.PCI0.SBUS.SRDB(0xd2, 0x83), Local0)
                    And(Local0, 0xf7, Local0)
                    If(LNot(\_SB_.PCI0.SBUS.SWRB(0xd2, 0x83, Local0))) {
                        Store("PCIB: Setting Clock Failed!", Debug)
                    }
                    Store("PCIB D3 Exit", Debug)
                }
            }
            Device(FRWR) {
                Name(_ADR, 0x00030000)
                Name(_GPE, 0x11)
            }
            Method(_PRT) {
                If(GPIC) {
                    Return(Package(0x8) {
                        Package(0x4) {
                            0x0003ffff,
                            0x0,
                            0x0,
                            0x13,
                        },
                        Package(0x4) {
                            0x0003ffff,
                            0x1,
                            0x0,
                            0x13,
                        },
                        Package(0x4) {
                            0x0003ffff,
                            0x2,
                            0x0,
                            0x13,
                        },
                        Package(0x4) {
                            0x0003ffff,
                            0x3,
                            0x0,
                            0x13,
                        },
                        Package(0x4) {
                            0x0004ffff,
                            0x0,
                            0x0,
                            0x14,
                        },
                        Package(0x4) {
                            0x0004ffff,
                            0x1,
                            0x0,
                            0x14,
                        },
                        Package(0x4) {
                            0x0004ffff,
                            0x2,
                            0x0,
                            0x14,
                        },
                        Package(0x4) {
                            0x0004ffff,
                            0x3,
                            0x0,
                            0x14,
                        },
                    })
                }
                Else {
                    Return(Package(0x8) {
                        Package(0x4) {
                            0x0003ffff,
                            0x0,
                            \_SB_.PCI0.LPCB.LNKD,
                            0x0,
                        },
                        Package(0x4) {
                            0x0003ffff,
                            0x1,
                            \_SB_.PCI0.LPCB.LNKD,
                            0x0,
                        },
                        Package(0x4) {
                            0x0003ffff,
                            0x2,
                            \_SB_.PCI0.LPCB.LNKD,
                            0x0,
                        },
                        Package(0x4) {
                            0x0003ffff,
                            0x3,
                            \_SB_.PCI0.LPCB.LNKD,
                            0x0,
                        },
                        Package(0x4) {
                            0x0004ffff,
                            0x0,
                            \_SB_.PCI0.LPCB.LNKE,
                            0x0,
                        },
                        Package(0x4) {
                            0x0004ffff,
                            0x1,
                            \_SB_.PCI0.LPCB.LNKE,
                            0x0,
                        },
                        Package(0x4) {
                            0x0004ffff,
                            0x2,
                            \_SB_.PCI0.LPCB.LNKE,
                            0x0,
                        },
                        Package(0x4) {
                            0x0004ffff,
                            0x3,
                            \_SB_.PCI0.LPCB.LNKE,
                            0x0,
                        },
                    })
                }
            }
        }
        Device(LPCB) {
            Name(_ADR, 0x001f0000)
            OperationRegion(LPC0, PCI_Config, 0x40, 0xc0)
            Field(LPC0, AnyAcc, NoLock, Preserve) {
                Offset(0x20),
                PARC,	8,
                PBRC,	8,
                PCRC,	8,
                PDRC,	8,
                Offset(0x28),
                PERC,	8,
                PFRC,	8,
                PGRC,	8,
                PHRC,	8,
                Offset(0x40),
                IOD0,	8,
                IOD1,	8,
                Offset(0x60),
                ,	10,
                XPME,	1,
                Offset(0xb0),
                RAEN,	1,
                ,	13,
                RCBA,	18
            }
            Method(GPMD, 1) {
                Store(Arg0, XPME)
            }
            Device(LNKA) {
                Name(_HID, 0x0f0cd041)
                Name(_UID, 0x1)
                Method(_DIS, 0, Serialized) {
                    Store(0x80, PARC)
                }
                Name(_PRS, Buffer(0x6) {0x23, 0xfa, 0xd4, 0x18, 0x79, 0x0 })
                Method(_CRS, 0, Serialized) {
                    Name(RTLA, Buffer(0x6) {0x23, 0x0, 0x0, 0x18, 0x79, 0x0 })
                    CreateWordField(RTLA, 0x1, IRQ0)
                    Store(Zero, IRQ0)
                    ShiftLeft(0x1, And(PARC, 0xf), IRQ0)
                    Return(RTLA)
                }
                Method(_SRS, 1, Serialized) {
                    CreateWordField(Arg0, 0x1, IRQ0)
                    FindSetRightBit(IRQ0, Local0)
                    Decrement(Local0)
                    Store(Local0, PARC)
                }
                Method(_STA, 0, Serialized) {
                    If(And(PARC, 0x80)) {
                        Return(0x9)
                    }
                    Else {
                        Return(0xb)
                    }
                }
            }
            Device(LNKB) {
                Name(_HID, 0x0f0cd041)
                Name(_UID, 0x2)
                Method(_DIS, 0, Serialized) {
                    Store(0x80, PBRC)
                }
                Name(_PRS, Buffer(0x6) {0x23, 0xfa, 0xd8, 0x18, 0x79, 0x0 })
                Method(_CRS, 0, Serialized) {
                    Name(RTLB, Buffer(0x6) {0x23, 0x0, 0x0, 0x18, 0x79, 0x0 })
                    CreateWordField(RTLB, 0x1, IRQ0)
                    Store(Zero, IRQ0)
                    ShiftLeft(0x1, And(PBRC, 0xf), IRQ0)
                    Return(RTLB)
                }
                Method(_SRS, 1, Serialized) {
                    CreateWordField(Arg0, 0x1, IRQ0)
                    FindSetRightBit(IRQ0, Local0)
                    Decrement(Local0)
                    Store(Local0, PBRC)
                }
                Method(_STA, 0, Serialized) {
                    If(And(PBRC, 0x80)) {
                        Return(0x9)
                    }
                    Else {
                        Return(0xb)
                    }
                }
            }
            Device(LNKC) {
                Name(_HID, 0x0f0cd041)
                Name(_UID, 0x3)
                Method(_DIS, 0, Serialized) {
                    Store(0x80, PCRC)
                }
                Name(_PRS, Buffer(0x6) {0x23, 0xfa, 0xd4, 0x18, 0x79, 0x0 })
                Method(_CRS, 0, Serialized) {
                    Name(RTLC, Buffer(0x6) {0x23, 0x0, 0x0, 0x18, 0x79, 0x0 })
                    CreateWordField(RTLC, 0x1, IRQ0)
                    Store(Zero, IRQ0)
                    ShiftLeft(0x1, And(PCRC, 0xf), IRQ0)
                    Return(RTLC)
                }
                Method(_SRS, 1, Serialized) {
                    CreateWordField(Arg0, 0x1, IRQ0)
                    FindSetRightBit(IRQ0, Local0)
                    Decrement(Local0)
                    Store(Local0, PCRC)
                }
                Method(_STA, 0, Serialized) {
                    If(And(PCRC, 0x80)) {
                        Return(0x9)
                    }
                    Else {
                        Return(0xb)
                    }
                }
            }
            Device(LNKD) {
                Name(_HID, 0x0f0cd041)
                Name(_UID, 0x4)
                Method(_DIS, 0, Serialized) {
                    Store(0x80, PDRC)
                }
                Name(_PRS, Buffer(0x6) {0x23, 0xfa, 0xd8, 0x18, 0x79, 0x0 })
                Method(_CRS, 0, Serialized) {
                    Name(RTLD, Buffer(0x6) {0x23, 0x0, 0x0, 0x18, 0x79, 0x0 })
                    CreateWordField(RTLD, 0x1, IRQ0)
                    Store(Zero, IRQ0)
                    ShiftLeft(0x1, And(PDRC, 0xf), IRQ0)
                    Return(RTLD)
                }
                Method(_SRS, 1, Serialized) {
                    CreateWordField(Arg0, 0x1, IRQ0)
                    FindSetRightBit(IRQ0, Local0)
                    Decrement(Local0)
                    Store(Local0, PDRC)
                }
                Method(_STA, 0, Serialized) {
                    If(And(PDRC, 0x80)) {
                        Return(0x9)
                    }
                    Else {
                        Return(0xb)
                    }
                }
            }
            Device(LNKE) {
                Name(_HID, 0x0f0cd041)
                Name(_UID, 0x5)
                Method(_DIS, 0, Serialized) {
                    Store(0x80, PERC)
                }
                Name(_PRS, Buffer(0x6) {0x23, 0xfa, 0xd4, 0x18, 0x79, 0x0 })
                Method(_CRS, 0, Serialized) {
                    Name(RTLE, Buffer(0x6) {0x23, 0x0, 0x0, 0x18, 0x79, 0x0 })
                    CreateWordField(RTLE, 0x1, IRQ0)
                    Store(Zero, IRQ0)
                    ShiftLeft(0x1, And(PERC, 0xf), IRQ0)
                    Return(RTLE)
                }
                Method(_SRS, 1, Serialized) {
                    CreateWordField(Arg0, 0x1, IRQ0)
                    FindSetRightBit(IRQ0, Local0)
                    Decrement(Local0)
                    Store(Local0, PERC)
                }
                Method(_STA, 0, Serialized) {
                    If(And(PERC, 0x80)) {
                        Return(0x9)
                    }
                    Else {
                        Return(0xb)
                    }
                }
            }
            Device(LNKF) {
                Name(_HID, 0x0f0cd041)
                Name(_UID, 0x6)
                Method(_DIS, 0, Serialized) {
                    Store(0x80, PFRC)
                }
                Name(_PRS, Buffer(0x6) {0x23, 0xfa, 0xd8, 0x18, 0x79, 0x0 })
                Method(_CRS, 0, Serialized) {
                    Name(RTLF, Buffer(0x6) {0x23, 0x0, 0x0, 0x18, 0x79, 0x0 })
                    CreateWordField(RTLF, 0x1, IRQ0)
                    Store(Zero, IRQ0)
                    ShiftLeft(0x1, And(PFRC, 0xf), IRQ0)
                    Return(RTLF)
                }
                Method(_SRS, 1, Serialized) {
                    CreateWordField(Arg0, 0x1, IRQ0)
                    FindSetRightBit(IRQ0, Local0)
                    Decrement(Local0)
                    Store(Local0, PFRC)
                }
                Method(_STA, 0, Serialized) {
                    If(And(PFRC, 0x80)) {
                        Return(0x9)
                    }
                    Else {
                        Return(0xb)
                    }
                }
            }
            Device(LNKG) {
                Name(_HID, 0x0f0cd041)
                Name(_UID, 0x7)
                Method(_DIS, 0, Serialized) {
                    Store(0x80, PGRC)
                }
                Name(_PRS, Buffer(0x6) {0x23, 0xfa, 0xd4, 0x18, 0x79, 0x0 })
                Method(_CRS, 0, Serialized) {
                    Name(RTLG, Buffer(0x6) {0x23, 0x0, 0x0, 0x18, 0x79, 0x0 })
                    CreateWordField(RTLG, 0x1, IRQ0)
                    Store(Zero, IRQ0)
                    ShiftLeft(0x1, And(PGRC, 0xf), IRQ0)
                    Return(RTLG)
                }
                Method(_SRS, 1, Serialized) {
                    CreateWordField(Arg0, 0x1, IRQ0)
                    FindSetRightBit(IRQ0, Local0)
                    Decrement(Local0)
                    Store(Local0, PGRC)
                }
                Method(_STA, 0, Serialized) {
                    If(And(PGRC, 0x80)) {
                        Return(0x9)
                    }
                    Else {
                        Return(0xb)
                    }
                }
            }
            Device(LNKH) {
                Name(_HID, 0x0f0cd041)
                Name(_UID, 0x8)
                Method(_DIS, 0, Serialized) {
                    Store(0x80, PHRC)
                }
                Name(_PRS, Buffer(0x6) {0x23, 0xfa, 0xd8, 0x18, 0x79, 0x0 })
                Method(_CRS, 0, Serialized) {
                    Name(RTLH, Buffer(0x6) {0x23, 0x0, 0x0, 0x18, 0x79, 0x0 })
                    CreateWordField(RTLH, 0x1, IRQ0)
                    Store(Zero, IRQ0)
                    ShiftLeft(0x1, And(PHRC, 0xf), IRQ0)
                    Return(RTLH)
                }
                Method(_SRS, 1, Serialized) {
                    CreateWordField(Arg0, 0x1, IRQ0)
                    FindSetRightBit(IRQ0, Local0)
                    Decrement(Local0)
                    Store(Local0, PHRC)
                }
                Method(_STA, 0, Serialized) {
                    If(And(PHRC, 0x80)) {
                        Return(0x9)
                    }
                    Else {
                        Return(0xb)
                    }
                }
            }
            Device(SMC_) {
                Name(_HID, 0x01001006)
                Name(_CID, "smc-santarosa")
                Name(_STA, 0xb)
                Name(_CRS, Buffer(0xd) {0x47, 0x1, 0x0, 0x3, 0x0, 0x3,
0x1, 0x20, 0x22, 0x40, 0x0, 0x79, 0x0 })
                Device(SMS0) {
                    Name(_HID, 0x03001006)
                    Name(_CID, "smc-sms")
                }
            }
            Device(EC__) {
                Name(_HID, 0x090cd041)
                Name(_CRS, Buffer(0x12) {0x47, 0x1, 0x62, 0x0, 0x62,
0x0, 0x0, 0x1, 0x47, 0x1, 0x66, 0x0, 0x66, 0x0, 0x0, 0x1, 0x79, 0x0 })
                Name(_GPE, 0x17)
                Name(_PRW, Package(0x2) {
                    0x18,
                    0x3,
                })
                Name(ECOK, 0x0)
                OperationRegion(ECOR, EmbeddedControl, 0x0, 0xff)
                Field(ECOR, ByteAcc, Lock, Preserve) {
                    ECVS,	8,
                    LSTE,	1,
                    RPWR,	1,
                    CDIN,	1,
                    Offset(0x2),
                    LWAK,	1,
                    ACWK,	1,
                    CDWK,	1,
                    Offset(0x3),
                    Offset(0x10),
                    ECSS,	8,
                    PLIM,	8,
                    Offset(0x20),
                    SPTR,	8,
                    SSTS,	8,
                    SADR,	8,
                    SCMD,	8,
                    SBFR,	256,
                    SCNT,	8,
                    SAAD,	8,
                    SAD0,	8,
                    SAD1,	8,
                    SMUX,	8
                }
                Field(ECOR, ByteAcc, Lock, Preserve) {
                    Offset(0x24),
                    SBDW,	16,
                    Offset(0x46),
                    SADW,	16
                }
                Device(SMB0) {
                    Name(_HID, "ACPI0001")
                    Name(_EC_, 0x2010)
                    Mutex(SMTX, 0)
                    Method(_STA) {
                        If(OSDW()) {
                            Return(0xf)
                        }
                        Else {
                            Return(0x0)
                        }
                    }
                    Device(SBS0) {
                        Name(_HID, "ACPI0002")
                        Name(_SBS, 0x1)
                    }
                    Method(SBPC, 1) {
                        Store(Arg0, Local0)
                        While(Local0) {
                            If(LEqual(SPTR, 0x0)) {
                                Return(And(SSTS, 0x1f))
                            }
                            Sleep(0x1)
                            Decrement(Local0)
                        }
                        Return(0x18)
                    }
                    Method(SBRW, 3) {
                        Store(One, Local0)

If(LNot(Acquire(\_SB_.PCI0.LPCB.EC__.SMB0.SMTX, 0xffff))) {
                            If(LEqual(SPTR, 0x0)) {
                                Store(ShiftLeft(Arg0, 0x1), SADR)
                                Store(Arg1, SCMD)
                                Store(0x9, SPTR)
                                Store(SBPC(0x03e8), Local0)
                                If(LNot(Local0)) {
                                    Store(SBDW, Arg2)
                                }
                            }
                            Release(\_SB_.PCI0.LPCB.EC__.SMB0.SMTX)
                        }
                        Return(Local0)
                    }
                    Method(SBRB, 3) {
                        Store(One, Local0)
                        Store(Buffer(0x1) {0x0 }, Local1)

If(LNot(Acquire(\_SB_.PCI0.LPCB.EC__.SMB0.SMTX, 0xffff))) {
                            If(LEqual(SPTR, 0x0)) {
                                Store(ShiftLeft(Arg0, 0x1), SADR)
                                Store(Arg1, SCMD)
                                Store(0xb, SPTR)
                                Store(SBPC(0x03e8), Local0)
                                If(LNot(Local0)) {
                                    Store(SBFR, Arg2)
                                }
                            }
                            Release(\_SB_.PCI0.LPCB.EC__.SMB0.SMTX)
                        }
                        Return(Local0)
                    }
                }
                Method(_Q10) {
                    If(OSDW()) {
                        Notify(\_SB_.PCI0.LPCB.EC__.SMB0, 0x80)
                    }
                    Else {
                        If(And(SSTS, 0x40)) {

If(LNot(Acquire(\_SB_.PCI0.LPCB.EC__.SMB0.SMTX, 0xffff))) {
                                Store(ShiftRight(SAAD, 0x1), Local0)
                                If(LEqual(Local0, 0xa)) {
                                    \_SB_.BAT0.BNOT(SADW)
                                }
                                Store(0x0, SSTS)
                                Release(\_SB_.PCI0.LPCB.EC__.SMB0.SMTX)
                            }
                        }
                    }
                }
                Method(_Q20) {
                    Store(LSTE, LIDS)
                    Notify(\_SB_.LID0, 0x80)
                }
                Method(_Q21) {
                    If(RPWR) {
                        Store(0x1, PWRS)
                    }
                    Else {
                        Store(0x0, PWRS)
                    }
                    Notify(\_SB_.ADP1, 0x80)
                    PNOT()
                }
                Method(_Q5A) {
                    Notify(\_SB_.SLPB, 0x80)
                }
                Method(_Q80) {
                    PNOT()
                }
                Method(_QCD) {
                    If(CDIN) {
                        Notify(\_SB_.PCI0.PATA, 0x81)
                    }
                    Else {
                        Notify(\_SB_.PCI0.PATA, 0x82)
                    }
                }
                Method(_REG, 2) {
                    Store(Arg1, ECOK)
                    If(LEqual(Arg1, 0x1)) {
                        Store(LSTE, LIDS)
                        Notify(\_SB_.LID0, 0x80)
                        Store(RPWR, PWRS)
                        Notify(\_SB_.ADP1, 0x80)
                    }
                    Store(0x0, ECSS)
                }
            }
            Scope(\_SB_) {
                Device(BAT0) {
                    Name(_HID, 0x0a0cd041)
                    Name(_UID, 0x0)
                    Name(_PCL, Package(0x1) {
                        \_SB_,
                    })
                    Name(BSSW, 0xffff)
                    Name(PBIF, Package(0xd) {
                        0x0,
                        0xffffffff,
                        0xffffffff,
                        0x1,
                        0xffffffff,
                        0xfa,
                        0x64,
                        0xa,
                        0xa,
                        " ",
                        " ",
                        " ",
                        " ",
                    })
                    Name(PBST, Package(0x4) {
                        0x0,
                        0xffffffff,
                        0xffffffff,
                        0xffffffff,
                    })
                    Method(_STA) {
                        If(OSDW()) {
                            Return(0x0)
                        }
                        If(\_SB_.PCI0.LPCB.EC__.ECOK) {
                            UBSS()
                            If(And(BSSW, 0x1)) {
                                Return(0x1f)
                            }
                            Else {
                                Return(0xf)
                            }
                        }
                        Else {
                            Return(0xf)
                        }
                    }
                    Method(_BST) {
                        If(And(BSSW, 0x1)) {
                            UBST()
                        }
                        Else {
                            Store(0x0, Index(PBST, 0x0))
                            Store(0xffffffff, Index(PBST, 0x1))
                            Store(0xffffffff, Index(PBST, 0x2))
                        }
                        Return(PBST)
                    }
                    Method(_BIF) {
                        If(And(BSSW, 0x1)) {
                            UBIF()
                        }
                        Return(PBIF)
                    }
                    Method(BNOT, 1) {
                        Store(BSSW, Local0)
                        Store(Arg0, BSSW)
                        Notify(\_SB_.BAT0, 0x80)
                        If(And(XOr(Local0, Arg0), 0x1)) {
                            Notify(\_SB_.BAT0, 0x81)
                        }
                    }
                    Method(UBSS) {
                        \_SB_.PCI0.LPCB.EC__.SMB0.SBRW(0xa, 0x1, RefOf(BSSW))
                    }
                    Method(UBIF) {
                        \_SB_.PCI0.LPCB.EC__.SMB0.SBRW(0xb, 0x18, RefOf(Local0))
                        Multiply(Local0, 0xa, Index(PBIF, 0x1))
                        \_SB_.PCI0.LPCB.EC__.SMB0.SBRW(0xb, 0x10, RefOf(Local0))
                        Multiply(Local0, 0xa, Index(PBIF, 0x2))
                        \_SB_.PCI0.LPCB.EC__.SMB0.SBRW(0xb, 0x19, RefOf(Local0))
                        Store(Local0, Index(PBIF, 0x4))
                        \_SB_.PCI0.LPCB.EC__.SMB0.SBRB(0xb, 0x21, RefOf(Local0))
                        Store(Local0, Index(PBIF, 0x9))
                        Store(Buffer(0x1) {0x0 }, Index(PBIF, 0xa))
                        \_SB_.PCI0.LPCB.EC__.SMB0.SBRB(0xb, 0x22, RefOf(Local0))
                        Store(Local0, Index(PBIF, 0xb))
                        \_SB_.PCI0.LPCB.EC__.SMB0.SBRB(0xb, 0x20, RefOf(Local0))
                        Store(Local0, Index(PBIF, 0xc))
                    }
                    Method(UBST) {
                        \_SB_.PCI0.LPCB.EC__.SMB0.SBRW(0xb, 0x9, RefOf(Local2))
                        Store(Local2, Index(PBST, 0x3))
                        \_SB_.PCI0.LPCB.EC__.SMB0.SBRW(0xb, 0xa, RefOf(Local0))
                        If(And(Local0, 0x8000)) {
                            Not(Local0, Local0)
                            And(Increment(Local0), 0xffff, Local0)
                        }
                        Multiply(Local0, Local2, Local0)
                        Divide(Local0, 0x03e8, Index(PBST, 0x1))
                        \_SB_.PCI0.LPCB.EC__.SMB0.SBRW(0xb, 0xf, RefOf(Local0))
                        Multiply(Local0, 0xa, Index(PBST, 0x2))
                        Store(0x0, Local1)
                        If(PWRS) {
                            \_SB_.PCI0.LPCB.EC__.SMB0.SBRW(0xb, 0x16,
RefOf(Local0))
                            If(LNot(And(Local0, 0x40))) {
                                Store(0x2, Local1)
                            }
                        }
                        Else {
                            Store(0x1, Local1)
                        }
                        Store(Local1, Index(PBST, 0x0))
                    }
                }
            }
            Device(DMAC) {
                Name(_HID, 0x0002d041)
                Name(_CRS, Buffer(0x25) {0x47, 0x1, 0x0, 0x0, 0x0,
0x0, 0x1, 0x20, 0x47, 0x1, 0x81, 0x0, 0x81, 0x0, 0x1, 0x11, 0x47, 0x1,
0x93, 0x0, 0x93, 0x0, 0x1, 0xd, 0x47, 0x1, 0xc0, 0x0, 0xc0, 0x0, 0x1,
0x20, 0x2a, 0x10, 0x1, 0x79, 0x0 })
            }
            Device(FWHD) {
                Name(_HID, 0x0008d425)
                Name(_CRS, Buffer(0xe) {0x86, 0x9, 0x0, 0x0, 0x0, 0x0,
0x0, 0xff, 0x0, 0x0, 0x0, 0x1, 0x79, 0x0 })
            }
            Device(HPET) {
                Name(_HID, 0x0301d041)
                Name(_CID, 0x010cd041)
                Name(BUF0, Buffer(0x14) {0x22, 0x1, 0x0, 0x22, 0x0,
0x1, 0x86, 0x9, 0x0, 0x0, 0x0, 0x0, 0xd0, 0xfe, 0x0, 0x4, 0x0, 0x0,
0x79, 0x0 })
                Method(_STA) {
                    If(LNot(LLess(OSYS, 0x07d1))) {
                        If(HPAE) {
                            Return(0xf)
                        }
                    }
                    Else {
                        If(HPAE) {
                            Return(0xb)
                        }
                    }
                    Return(0x0)
                }
                Method(_CRS, 0, Serialized) {
                    If(HPAE) {
                        CreateDWordField(BUF0, 0xa, HPT0)
                        If(LEqual(HPAS, 0x1)) {
                            Store(0xfed01000, HPT0)
                        }
                        If(LEqual(HPAS, 0x2)) {
                            Store(0xfed02000, HPT0)
                        }
                        If(LEqual(HPAS, 0x3)) {
                            Store(0xfed03000, HPT0)
                        }
                    }
                    Return(BUF0)
                }
            }
            Device(IPIC) {
                Name(_HID, 0xd041)
                Name(_CRS, Buffer(0x8d) {0x47, 0x1, 0x20, 0x0, 0x20,
0x0, 0x1, 0x2, 0x47, 0x1, 0x24, 0x0, 0x24, 0x0, 0x1, 0x2, 0x47, 0x1,
0x28, 0x0, 0x28, 0x0, 0x1, 0x2, 0x47, 0x1, 0x2c, 0x0, 0x2c, 0x0, 0x1,
0x2, 0x47, 0x1, 0x30, 0x0, 0x30, 0x0, 0x1, 0x2, 0x47, 0x1, 0x34, 0x0,
0x34, 0x0, 0x1, 0x2, 0x47, 0x1, 0x38, 0x0, 0x38, 0x0, 0x1, 0x2, 0x47,
0x1, 0x3c, 0x0, 0x3c, 0x0, 0x1, 0x2, 0x47, 0x1, 0xa0, 0x0, 0xa0, 0x0,
0x1, 0x2, 0x47, 0x1, 0xa4, 0x0, 0xa4, 0x0, 0x1, 0x2, 0x47, 0x1, 0xa8,
0x0, 0xa8, 0x0, 0x1, 0x2, 0x47, 0x1, 0xac, 0x0, 0xac, 0x0, 0x1, 0x2,
0x47, 0x1, 0xb0, 0x0, 0xb0, 0x0, 0x1, 0x2, 0x47, 0x1, 0xb4, 0x0, 0xb4,
0x0, 0x1, 0x2, 0x47, 0x1, 0xb8, 0x0, 0xb8, 0x0, 0x1, 0x2, 0x47, 0x1,
0xbc, 0x0, 0xbc, 0x0, 0x1, 0x2, 0x47, 0x1, 0xd0, 0x4, 0xd0, 0x4, 0x1,
0x2, 0x22, 0x4, 0x0, 0x79, 0x0 })
            }
            Device(MATH) {
                Name(_HID, 0x040cd041)
                Name(_CRS, Buffer(0xd) {0x47, 0x1, 0xf0, 0x0, 0xf0,
0x0, 0x1, 0x1, 0x22, 0x0, 0x20, 0x79, 0x0 })
            }
            Device(LDRC) {
                Name(_HID, 0x020cd041)
                Name(_UID, 0x2)
                Name(_CRS, Buffer(0x82) {0x47, 0x1, 0x2e, 0x0, 0x2e,
0x0, 0x1, 0x2, 0x47, 0x1, 0x4e, 0x0, 0x4e, 0x0, 0x1, 0x2, 0x47, 0x1,
0x61, 0x0, 0x61, 0x0, 0x1, 0x1, 0x47, 0x1, 0x63, 0x0, 0x63, 0x0, 0x1,
0x1, 0x47, 0x1, 0x65, 0x0, 0x65, 0x0, 0x1, 0x1, 0x47, 0x1, 0x67, 0x0,
0x67, 0x0, 0x1, 0x1, 0x47, 0x1, 0x70, 0x0, 0x70, 0x0, 0x1, 0x1, 0x47,
0x1, 0x80, 0x0, 0x80, 0x0, 0x1, 0x1, 0x47, 0x1, 0x92, 0x0, 0x92, 0x0,
0x1, 0x1, 0x47, 0x1, 0xb2, 0x0, 0xb2, 0x0, 0x1, 0x2, 0x47, 0x1, 0x80,
0x6, 0x80, 0x6, 0x1, 0x20, 0x47, 0x1, 0x0, 0x8, 0x0, 0x8, 0x1, 0x10,
0x47, 0x1, 0x10, 0x8, 0x10, 0x8, 0x1, 0x8, 0x47, 0x1, 0x0, 0x4, 0x0,
0x4, 0x1, 0x80, 0x47, 0x1, 0x0, 0x5, 0x0, 0x5, 0x1, 0x40, 0x47, 0x1,
0x40, 0x16, 0x40, 0x16, 0x1, 0x10, 0x79, 0x0 })
            }
            Device(RTC_) {
                Name(_HID, 0x000bd041)
                Name(_CRS, Buffer(0xa) {0x47, 0x1, 0x70, 0x0, 0x70,
0x0, 0x1, 0x8, 0x79, 0x0 })
            }
            Device(TIMR) {
                Name(_HID, 0x0001d041)
                Name(_CRS, Buffer(0x12) {0x47, 0x1, 0x40, 0x0, 0x40,
0x0, 0x1, 0x4, 0x47, 0x1, 0x50, 0x0, 0x50, 0x0, 0x10, 0x4, 0x79, 0x0
})
            }
        }
        Device(PATA) {
            Name(_ADR, 0x001f0001)
            Name(_CID, "media-notify")
            Method(_PSC, 0, Serialized) {
                If(GP5_) {
                    Return(0x3)
                }
                Else {
                    Return(0x0)
                }
            }
            Method(_PS0, 0, Serialized) {
                If(GP5_) {
                    Store("PATA D0 Entry", Debug)
                    And(GD54, 0x0, GD54)
                    And(GP54, 0x0, GP54)
                    And(GP40, 0x0, GP40)
                    And(GP5_, 0x0, GP5_)
                    Sleep(0x14)
                    Or(GP54, 0x1, GP54)
                    And(GD54, 0x1, GD54)
                    Store("PATA D0 Exit", Debug)
                }
            }
            Method(_PS3, 0, Serialized) {
                Store("PATA D3 Entry", Debug)
                And(GD54, 0x0, GD54)
                And(GP54, 0x0, GP54)
                Or(GP5_, 0x1, GP5_)
                Or(GP40, 0x1, GP40)
                Store("PATA D3 Exit", Debug)
            }
            OperationRegion(PACS, PCI_Config, 0x40, 0xc0)
            Field(PACS, DWordAcc, NoLock, Preserve) {
                PRIT,	16,
                Offset(0x4),
                PSIT,	4,
                Offset(0x8),
                SYNC,	4,
                Offset(0xa),
                SDT0,	2,
                ,	2,
                SDT1,	2,
                Offset(0x14),
                ICR0,	4,
                ICR1,	4,
                ICR2,	4,
                ICR3,	4,
                ICR4,	4,
                ICR5,	4
            }
            Device(PRID) {
                Name(_ADR, 0x0)
                Method(_GTM) {
                    Name(PBUF, Buffer(0x14) {0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0 })
                    CreateDWordField(PBUF, 0x0, PIO0)
                    CreateDWordField(PBUF, 0x4, DMA0)
                    CreateDWordField(PBUF, 0x8, PIO1)
                    CreateDWordField(PBUF, 0xc, DMA1)
                    CreateDWordField(PBUF, 0x10, FLAG)
                    Store(GETP(PRIT), PIO0)
                    Store(GDMA(And(SYNC, 0x1), And(ICR3, 0x1),
And(ICR0, 0x1), SDT0, And(ICR1, 0x1)), DMA0)
                    If(LEqual(DMA0, 0xffffffff)) {
                        Store(PIO0, DMA0)
                    }
                    If(And(PRIT, 0x4000)) {
                        If(LEqual(And(PRIT, 0x90), 0x80)) {
                            Store(0x0384, PIO1)
                        }
                        Else {
                            Store(GETT(PSIT), PIO1)
                        }
                    }
                    Else {
                        Store(0xffffffff, PIO1)
                    }
                    Store(GDMA(And(SYNC, 0x2), And(ICR3, 0x2),
And(ICR0, 0x2), SDT1, And(ICR1, 0x2)), DMA1)
                    If(LEqual(DMA1, 0xffffffff)) {
                        Store(PIO1, DMA1)
                    }
                    Store(GETF(And(SYNC, 0x1), And(SYNC, 0x2), PRIT), FLAG)
                    If(And(LEqual(PIO0, 0xffffffff), LEqual(DMA0,
0xffffffff))) {
                        Store(0x78, PIO0)
                        Store(0x14, DMA0)
                        Store(0x3, FLAG)
                    }
                    Return(PBUF)
                }
                Method(_STM, 3) {
                    CreateDWordField(Arg0, 0x0, PIO0)
                    CreateDWordField(Arg0, 0x4, DMA0)
                    CreateDWordField(Arg0, 0x8, PIO1)
                    CreateDWordField(Arg0, 0xc, DMA1)
                    CreateDWordField(Arg0, 0x10, FLAG)
                    If(LEqual(SizeOf(Arg1), 0x0200)) {
                        And(PRIT, 0xc0f0, PRIT)
                        And(SYNC, 0x2, SYNC)
                        Store(0x0, SDT0)
                        And(ICR0, 0x2, ICR0)
                        And(ICR1, 0x2, ICR1)
                        And(ICR3, 0x2, ICR3)
                        And(ICR5, 0x2, ICR5)
                        CreateWordField(Arg1, 0x62, W490)
                        CreateWordField(Arg1, 0x6a, W530)
                        CreateWordField(Arg1, 0x7e, W630)
                        CreateWordField(Arg1, 0x80, W640)
                        CreateWordField(Arg1, 0xb0, W880)
                        CreateWordField(Arg1, 0xba, W930)
                        Or(PRIT, 0x8004, PRIT)
                        If(LAnd(And(FLAG, 0x2), And(W490, 0x0800))) {
                            Or(PRIT, 0x2, PRIT)
                        }
                        Or(PRIT, SETP(PIO0, W530, W640), PRIT)
                        If(And(FLAG, 0x1)) {
                            Or(SYNC, 0x1, SYNC)
                            Store(SDMA(DMA0), SDT0)
                            If(LLess(DMA0, 0x1e)) {
                                Or(ICR3, 0x1, ICR3)
                            }
                            If(LLess(DMA0, 0x3c)) {
                                Or(ICR0, 0x1, ICR0)
                            }
                            If(And(W930, 0x2000)) {
                                Or(ICR1, 0x1, ICR1)
                            }
                        }
                    }
                    If(LEqual(SizeOf(Arg2), 0x0200)) {
                        And(PRIT, 0xbf0f, PRIT)
                        Store(0x0, PSIT)
                        And(SYNC, 0x1, SYNC)
                        Store(0x0, SDT1)
                        And(ICR0, 0x1, ICR0)
                        And(ICR1, 0x1, ICR1)
                        And(ICR3, 0x1, ICR3)
                        And(ICR5, 0x1, ICR5)
                        CreateWordField(Arg2, 0x62, W491)
                        CreateWordField(Arg2, 0x6a, W531)
                        CreateWordField(Arg2, 0x7e, W631)
                        CreateWordField(Arg2, 0x80, W641)
                        CreateWordField(Arg2, 0xb0, W881)
                        CreateWordField(Arg2, 0xba, W931)
                        Or(PRIT, 0x8040, PRIT)
                        If(LAnd(And(FLAG, 0x8), And(W491, 0x0800))) {
                            Or(PRIT, 0x20, PRIT)
                        }
                        If(And(FLAG, 0x10)) {
                            Or(PRIT, 0x4000, PRIT)
                            If(LGreater(PIO1, 0xf0)) {
                                Or(PRIT, 0x80, PRIT)
                            }
                            Else {
                                Or(PRIT, 0x10, PRIT)
                                Store(SETT(PIO1, W531, W641), PSIT)
                            }
                        }
                        If(And(FLAG, 0x4)) {
                            Or(SYNC, 0x2, SYNC)
                            Store(SDMA(DMA1), SDT1)
                            If(LLess(DMA1, 0x1e)) {
                                Or(ICR3, 0x2, ICR3)
                            }
                            If(LLess(DMA1, 0x3c)) {
                                Or(ICR0, 0x2, ICR0)
                            }
                            If(And(W931, 0x2000)) {
                                Or(ICR1, 0x2, ICR1)
                            }
                        }
                    }
                }
                Device(P_D0) {
                    Name(_ADR, 0x0)
                    Method(_RMV) {
                        Return(XOr(SATD, 0x1))
                    }
                    Method(_GTF) {
                        Name(PIB0, Buffer(0xe) {0x3, 0x0, 0x0, 0x0,
0x0, 0xa0, 0xef, 0x3, 0x0, 0x0, 0x0, 0x0, 0xa0, 0xef })
                        CreateByteField(PIB0, 0x1, PMD0)
                        CreateByteField(PIB0, 0x8, DMD0)
                        If(And(PRIT, 0x2)) {
                            If(LEqual(And(PRIT, 0x9), 0x8)) {
                                Store(0x8, PMD0)
                            }
                            Else {
                                Store(0xa, PMD0)
                                ShiftRight(And(PRIT, 0x0300), 0x8, Local0)
                                ShiftRight(And(PRIT, 0x3000), 0xc, Local1)
                                Add(Local0, Local1, Local2)
                                If(LEqual(0x3, Local2)) {
                                    Store(0xb, PMD0)
                                }
                                If(LEqual(0x5, Local2)) {
                                    Store(0xc, PMD0)
                                }
                            }
                        }
                        Else {
                            Store(0x1, PMD0)
                        }
                        If(And(SYNC, 0x1)) {
                            Store(Or(SDT0, 0x40), DMD0)
                            If(And(ICR1, 0x1)) {
                                If(And(ICR0, 0x1)) {
                                    Add(DMD0, 0x2, DMD0)
                                }
                                If(And(ICR3, 0x1)) {
                                    Store(0x45, DMD0)
                                }
                            }
                        }
                        Else {
                            Or(Subtract(And(PMD0, 0x7), 0x2), 0x20, DMD0)
                        }
                        Return(PIB0)
                    }
                }
                Device(P_D1) {
                    Name(_ADR, 0x1)
                    Method(_GTF) {
                        Name(PIB1, Buffer(0xe) {0x3, 0x0, 0x0, 0x0,
0x0, 0xb0, 0xef, 0x3, 0x0, 0x0, 0x0, 0x0, 0xb0, 0xef })
                        CreateByteField(PIB1, 0x1, PMD1)
                        CreateByteField(PIB1, 0x8, DMD1)
                        If(And(PRIT, 0x20)) {
                            If(LEqual(And(PRIT, 0x90), 0x80)) {
                                Store(0x8, PMD1)
                            }
                            Else {
                                Add(And(PSIT, 0x3),
ShiftRight(And(PSIT, 0xc), 0x2), Local0)
                                If(LEqual(0x5, Local0)) {
                                    Store(0xc, PMD1)
                                }
                                Else {
                                    If(LEqual(0x3, Local0)) {
                                        Store(0xb, PMD1)
                                    }
                                    Else {
                                        Store(0xa, PMD1)
                                    }
                                }
                            }
                        }
                        Else {
                            Store(0x1, PMD1)
                        }
                        If(And(SYNC, 0x2)) {
                            Store(Or(SDT1, 0x40), DMD1)
                            If(And(ICR1, 0x2)) {
                                If(And(ICR0, 0x2)) {
                                    Add(DMD1, 0x2, DMD1)
                                }
                                If(And(ICR3, 0x2)) {
                                    Store(0x45, DMD1)
                                }
                            }
                        }
                        Else {
                            Or(Subtract(And(PMD1, 0x7), 0x2), 0x20, DMD1)
                        }
                        Return(PIB1)
                    }
                }
            }
        }
        Device(SATA) {
            Name(_ADR, 0x001f0002)
            OperationRegion(SACS, PCI_Config, 0x40, 0xc0)
            Field(SACS, DWordAcc, NoLock, Preserve) {
                PRIT,	16,
                SECT,	16,
                PSIT,	4,
                SSIT,	4,
                Offset(0x8),
                SYNC,	4,
                Offset(0xa),
                SDT0,	2,
                ,	2,
                SDT1,	2,
                Offset(0xb),
                SDT2,	2,
                ,	2,
                SDT3,	2,
                Offset(0x14),
                ICR0,	4,
                ICR1,	4,
                ICR2,	4,
                ICR3,	4,
                ICR4,	4,
                ICR5,	4,
                Offset(0x50),
                MAPV,	2
            }
        }
        Device(SBUS) {
            Name(_ADR, 0x001f0003)
            OperationRegion(SMBP, PCI_Config, 0x40, 0xc0)
            Field(SMBP, DWordAcc, NoLock, Preserve) {
                ,	2,
                I2CE,	1
            }
            OperationRegion(SMBE, PCI_Config, 0x4, 0x2)
            Field(SMBE, AnyAcc, NoLock, Preserve) {
                IOSE,	1
            }
            OperationRegion(SMBI, SystemIO, 0xefa0, 0x10)
            Field(SMBI, ByteAcc, NoLock, Preserve) {
                HSTS,	8,
                Offset(0x2),
                HCON,	8,
                HCOM,	8,
                TXSA,	8,
                DAT0,	8,
                DAT1,	8,
                HBDR,	8,
                PECR,	8,
                RXSA,	8,
                SDAT,	16
            }
            Method(ENAB) {
                Store(0x1, IOSE)
            }
            Method(SSXB, 2, Serialized) {
                If(STRT()) {
                    Return(0x0)
                }
                Store(0x0, I2CE)
                Store(0xbf, HSTS)
                Store(Arg0, TXSA)
                Store(Arg1, HCOM)
                Store(0x48, HCON)
                If(COMP()) {
                    Or(HSTS, 0xff, HSTS)
                    Return(0x1)
                }
                Return(0x0)
            }
            Method(SRXB, 1, Serialized) {
                If(STRT()) {
                    Return(0xffff)
                }
                Store(0x0, I2CE)
                Store(0xbf, HSTS)
                Store(Or(Arg0, 0x1), TXSA)
                Store(0x44, HCON)
                If(COMP()) {
                    Or(HSTS, 0xff, HSTS)
                    Return(DAT0)
                }
                Return(0xffff)
            }
            Method(SWRB, 3, Serialized) {
                If(STRT()) {
                    Return(0x0)
                }
                Store(0x0, I2CE)
                Store(0xbf, HSTS)
                Store(Arg0, TXSA)
                Store(Arg1, HCOM)
                Store(Arg2, DAT0)
                Store(0x48, HCON)
                If(COMP()) {
                    Or(HSTS, 0xff, HSTS)
                    Return(0x1)
                }
                Return(0x0)
            }
            Method(SRDB, 2, Serialized) {
                If(STRT()) {
                    Return(0xffff)
                }
                Store(0x0, I2CE)
                Store(0xbf, HSTS)
                Store(Or(Arg0, 0x1), TXSA)
                Store(Arg1, HCOM)
                Store(0x48, HCON)
                If(COMP()) {
                    Or(HSTS, 0xff, HSTS)
                    Return(DAT0)
                }
                Return(0xffff)
            }
            Method(SBLW, 4, Serialized) {
                If(STRT()) {
                    Return(0x0)
                }
                Store(Arg3, I2CE)
                Store(0xbf, HSTS)
                Store(Arg0, TXSA)
                Store(Arg1, HCOM)
                Store(SizeOf(Arg2), DAT0)
                Store(0x0, Local1)
                Store(DerefOf(Index(Arg2, 0x0)), HBDR)
                Store(0x54, HCON)
                While(LGreater(SizeOf(Arg2), Local1)) {
                    Store(0x0fa0, Local0)
                    While(LAnd(LNot(And(HSTS, 0x80)), Local0)) {
                        Decrement(Local0)
                        Stall(0x32)
                    }
                    If(LNot(Local0)) {
                        KILL()
                        Return(0x0)
                    }
                    Store(0x80, HSTS)
                    Increment(Local1)
                    If(LGreater(SizeOf(Arg2), Local1)) {
                        Store(DerefOf(Index(Arg2, Local1)), HBDR)
                    }
                }
                If(COMP()) {
                    Or(HSTS, 0xff, HSTS)
                    Return(0x1)
                }
                Return(0x0)
            }
            Method(SBLR, 3, Serialized) {
                Name(TBUF, Buffer(0x0100) { })
                If(STRT()) {
                    Return(0x0)
                }
                Store(Arg2, I2CE)
                Store(0xbf, HSTS)
                Store(Or(Arg0, 0x1), TXSA)
                Store(Arg1, HCOM)
                Store(0x54, HCON)
                Store(0x0fa0, Local0)
                While(LAnd(LNot(And(HSTS, 0x80)), Local0)) {
                    Decrement(Local0)
                    Stall(0x32)
                }
                If(LNot(Local0)) {
                    KILL()
                    Return(0x0)
                }
                Store(DAT0, Index(TBUF, 0x0))
                Store(0x80, HSTS)
                Store(0x1, Local1)
                While(LLess(Local1, DerefOf(Index(TBUF, 0x0)))) {
                    Store(0x0fa0, Local0)
                    While(LAnd(LNot(And(HSTS, 0x80)), Local0)) {
                        Decrement(Local0)
                        Stall(0x32)
                    }
                    If(LNot(Local0)) {
                        KILL()
                        Return(0x0)
                    }
                    Store(HBDR, Index(TBUF, Local1))
                    Store(0x80, HSTS)
                    Increment(Local1)
                }
                If(COMP()) {
                    Or(HSTS, 0xff, HSTS)
                    Return(TBUF)
                }
                Return(0x0)
            }
            Method(STRT, 0, Serialized) {
                Store(0xc8, Local0)
                While(Local0) {
                    If(And(HSTS, 0x40)) {
                        Decrement(Local0)
                        Sleep(0x1)
                        If(LEqual(Local0, 0x0)) {
                            Return(0x1)
                        }
                    }
                    Else {
                        Store(0x0, Local0)
                    }
                }
                Store(0x0fa0, Local0)
                While(Local0) {
                    If(And(HSTS, 0x1)) {
                        Decrement(Local0)
                        Stall(0x32)
                        If(LEqual(Local0, 0x0)) {
                            KILL()
                        }
                    }
                    Else {
                        Return(0x0)
                    }
                }
                Return(0x1)
            }
            Method(COMP, 0, Serialized) {
                Store(0x0fa0, Local0)
                While(Local0) {
                    If(And(HSTS, 0x2)) {
                        Return(0x1)
                    }
                    Else {
                        Decrement(Local0)
                        Stall(0x32)
                        If(LEqual(Local0, 0x0)) {
                            KILL()
                        }
                    }
                }
                Return(0x0)
            }
            Method(KILL, 0, Serialized) {
                Or(HCON, 0x2, HCON)
                Or(HSTS, 0xff, HSTS)
            }
        }
    }
}

}
/*
HPET: Length=56, Revision=1, Checksum=204,
	OEMID=APPLE, OEM Table ID=Apple00, OEM Revision=0x1,
	Creator ID=Loki, Creator Revision=0x5f
 */
/*
APIC: Length=104, Revision=1, Checksum=142,
	OEMID=APPLE, OEM Table ID=Apple00, OEM Revision=0x1,
	Creator ID=Loki, Creator Revision=0x5f
 */
/*
MCFG: Length=60, Revision=1, Checksum=228,
	OEMID=APPLE, OEM Table ID=Apple00, OEM Revision=0x1,
	Creator ID=Loki, Creator Revision=0x5f
 */
/*
ASF!: Length=165, Revision=32, Checksum=182,
	OEMID=APPLE, OEM Table ID=Apple00, OEM Revision=0x1,
	Creator ID=Loki, Creator Revision=0x5f
 */
/*
SBST: Length=48, Revision=1, Checksum=132,
	OEMID=APPLE, OEM Table ID=Apple00, OEM Revision=0x1,
	Creator ID=Loki, Creator Revision=0x5f
 */
/*
ECDT: Length=83, Revision=1, Checksum=57,
	OEMID=APPLE, OEM Table ID=Apple00, OEM Revision=0x1,
	Creator ID=Loki, Creator Revision=0x5f
 */
/*
SSDT: Length=1244, Revision=1, Checksum=190,
	OEMID=APPLE, OEM Table ID=CpuPm, OEM Revision=0x3000,
	Creator ID=INTL, Creator Revision=0x20061109
 */
/*
SSDT: Length=607, Revision=1, Checksum=87,
	OEMID=APPLE, OEM Table ID=Cpu0Tst, OEM Revision=0x3000,
	Creator ID=INTL, Creator Revision=0x20061109
 */
/*
SSDT: Length=166, Revision=1, Checksum=228,
	OEMID=APPLE, OEM Table ID=Cpu1Tst, OEM Revision=0x3000,
	Creator ID=INTL, Creator Revision=0x20061109
 */
/*
SSDT: Length=1348, Revision=1, Checksum=122,
	OEMID=SataRe, OEM Table ID=SataPri, OEM Revision=0x1000,
	Creator ID=INTL, Creator Revision=0x20061109
 */
/*
SSDT: Length=1143, Revision=1, Checksum=187,
	OEMID=SataRe, OEM Table ID=SataSec, OEM Revision=0x1000,
	Creator ID=INTL, Creator Revision=0x20061109
 */
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
acpidump on macbook 3,1, Ted Roby, (Sat Jun 19, 10:11 am)
Re: acpidump on macbook 3,1, Marco Peereboom, (Mon Jun 21, 12:28 pm)
Re: acpidump on macbook 3,1, Ted Roby, (Mon Jun 21, 12:59 pm)
Re: acpidump on macbook 3,1, Stuart Henderson, (Mon Jun 21, 2:06 pm)
Re: acpidump on macbook 3,1, Ted Roby, (Mon Jun 21, 5:03 pm)