Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Device (EC0)
- {
- Name (_HID, EisaId ("PNP0C09"))
- Name (_UID, One)
- Name (_CRS, ResourceTemplate ()
- {
- IO (Decode16,
- 0x0062, // Range Minimum
- 0x0062, // Range Maximum
- 0x00, // Alignment
- 0x01, // Length
- )
- IO (Decode16,
- 0x0066, // Range Minimum
- 0x0066, // Range Maximum
- 0x00, // Alignment
- 0x01, // Length
- )
- })
- OperationRegion (ERAM, EmbeddedControl, Zero, 0xFF)
- Field (ERAM, ByteAcc, Lock, Preserve)
- {
- SMPR, 8,
- SMST, 8,
- SMAD, 8,
- SMCM, 8,
- SMD0, 256,
- BCNT, 8,
- SMAA, 8,
- BATD, 16,
- Offset (0x40),
- SW2S, 1,
- , 2,
- ADPP, 1,
- TAPM, 1,
- Offset (0x41),
- WIN7, 1,
- , 2,
- WINP, 1,
- RFLG, 1,
- PFN2, 1,
- WOLF, 1,
- PFLG, 1,
- , 4,
- QWOS, 1,
- , 1,
- BTON, 1,
- Offset (0x43),
- BBDA, 1,
- , 2,
- ACKY, 1,
- Offset (0x44),
- , 2,
- FASO, 1,
- Offset (0x4E),
- LIDE, 1,
- , 2,
- TLDP, 1,
- Offset (0x52),
- LIDS, 1,
- , 1,
- , 1,
- TLID, 1,
- Offset (0x58),
- RTMP, 8,
- ECT1, 8,
- ECT2, 8,
- RG5B, 8,
- Offset (0x5F),
- SBVO, 1,
- Offset (0x68),
- , 3,
- PLGS, 1,
- Offset (0x69),
- , 6,
- BDSO, 1,
- Offset (0x70),
- BADC, 16,
- BFCC, 16,
- BADV, 16,
- BDVO, 8,
- Offset (0x7E),
- BATP, 8,
- Offset (0x82),
- MBST, 8,
- MCUR, 16,
- MBRM, 16,
- MBCV, 16,
- Offset (0x8D),
- , 5,
- MBFC, 1,
- Offset (0x94),
- GSSU, 1,
- GSMS, 1,
- CS2S, 1,
- Offset (0x95),
- MMST, 4,
- DMST, 4,
- MBPG, 8,
- Offset (0xA0),
- QBHK, 8,
- Offset (0xA2),
- QBBB, 8,
- Offset (0xA4),
- MBTS, 1,
- MBTF, 1,
- , 5,
- LLBW, 1,
- MBTC, 1,
- , 2,
- MBNH, 1,
- Offset (0xA6),
- MBDC, 8,
- , 1,
- CPBT, 1,
- Offset (0xAA),
- , 1,
- MMBC, 1,
- , 5,
- RCDS, 1,
- Offset (0xAD),
- SARS, 8,
- Offset (0xAF),
- MCER, 8,
- Offset (0xB2),
- RPM1, 8,
- RPM2, 8,
- OCPL, 4,
- OCPH, 4,
- Offset (0xBC),
- MCEA, 8,
- Offset (0xCF),
- , 3,
- B47W, 1,
- Offset (0xD0),
- EBPL, 1,
- Offset (0xD2),
- , 7,
- DLYE, 1,
- Offset (0xD4),
- PSDH, 8,
- PSDL, 8,
- DBPL, 8,
- Offset (0xDA),
- PSIX, 8,
- PSKB, 1,
- PSTP, 1,
- PSBA, 1,
- LANP, 1,
- , 1,
- UPWR, 1,
- LIDW, 1,
- Offset (0xE0),
- DLTH, 8,
- DLTL, 8,
- EBRL, 8,
- Offset (0xE6),
- SFHK, 8,
- Offset (0xF0),
- , 3,
- WPWR, 1,
- Offset (0xF2),
- , 5,
- WANL, 1,
- Offset (0xF4),
- SFAN, 8,
- Offset (0xF9),
- FTCF, 1
- }
- Name (Q22L, Zero)
- Name (Q22C, Zero)
- Name (BATN, Zero)
- Name (BATF, 0xC0)
- Method (_REG, 2, NotSerialized)
- {
- If (LAnd (LEqual (Arg0, 0x03), LEqual (Arg1, One)))
- {
- Store (Arg1, ECON)
- If (ECON)
- {
- Store (SW2S, PWRS)
- W7RF ()
- Store (PPCM, OCPH)
- UTAS ()
- Sleep (0x03E8)
- ^^^ACEL.INIT ()
- }
- }
- }
- Method (BPOL, 1, NotSerialized)
- {
- Store (Arg0, DBPL)
- Store (One, EBPL)
- }
- Method (BPOM, 0, NotSerialized)
- {
- Store (Zero, DBPL)
- Store (Zero, EBPL)
- }
- Name (_GPE, 0x05)
- Method (_Q09, 0, NotSerialized)
- {
- Store (0x09, DBFE)
- Store (Add (DBFF, One), DBFF)
- Notify (BAT0, 0x80)
- Notify (ACAD, 0x80)
- If (LNotEqual (^^^^LID.FLID, Zero))
- {
- Notify (LID, 0x80)
- Store (Zero, ^^^^LID.FLID)
- If (LEqual (LIDS, Zero))
- {
- _Q8A ()
- Sleep (0x64)
- }
- }
- Notify (BAT0, 0x80)
- Store (Zero, ^^^^ACAD.FACS)
- Notify (ACAD, 0x80)
- If (LEqual (^^^^WMID.WMI5, 0x05))
- {
- ^^^^WMID.GWEV (0x05, Zero)
- Store (Zero, ^^^^WMID.WMI5)
- }
- }
- Method (_Q20, 0, NotSerialized)
- {
- Store (0x20, DBFE)
- Store (Add (DBFF, One), DBFF)
- CPUS ()
- GBAS ()
- If (And (0x40, BATF))
- {
- Notify (BAT0, 0x81)
- }
- If (And (0x02, BATF))
- {
- Notify (ACAD, 0x80)
- If (SW2S)
- {
- CBCD ()
- ^^^^WMID.GWEV (0x03, Zero)
- }
- }
- Notify (BAT0, 0x80)
- BPOL (0x05)
- If (SW2S)
- {
- ^^^^WMID.GWEV (0x03, Zero)
- }
- }
- Method (GBAS, 0, NotSerialized)
- {
- Store (Zero, BATF)
- If (MBTS)
- {
- If (LNotEqual (^^^^BAT0.B1ST, 0x1F))
- {
- Or (BATF, 0x40, BATF)
- }
- }
- Else
- {
- If (LEqual (^^^^BAT0.B1ST, 0x1F))
- {
- Or (BATF, 0x40, BATF)
- }
- }
- If (SW2S)
- {
- If (LEqual (^^^^ACAD.ACWT, Zero))
- {
- Or (BATF, 0x02, BATF)
- }
- }
- Else
- {
- If (LNotEqual (^^^^ACAD.ACWT, Zero))
- {
- Or (BATF, 0x02, BATF)
- }
- }
- }
- Method (_Q2A, 0, NotSerialized)
- {
- Notify (BAT0, 0x81)
- Notify (BAT0, 0x80)
- }
- Method (_Q22, 0, NotSerialized)
- {
- Store (0x22, DBFE)
- Store (Add (DBFF, One), DBFF)
- Notify (BAT0, 0x80)
- Sleep (0x03E8)
- Store (0x22, Q22L)
- Store (Zero, Q22C)
- Store (Zero, LLBW)
- Notify (BAT0, 0x80)
- }
- Method (_Q80, 0, NotSerialized)
- {
- Store ("_Q80 : Temperature Up/Down", Debug)
- If (LAnd (LEqual (\_TZ.HOTF, One), W8OS))
- {
- Return (Zero)
- }
- Notify (\_TZ.THRM, 0x80)
- }
- Method (_Q8A, 0, NotSerialized)
- {
- Store (0x8A, DBFE)
- Store (Add (DBFF, One), DBFF)
- Store ("_Q8A : LID Switch Event", Debug)
- Store (Zero, LIDE)
- Notify (LID, 0x80)
- ^^^ACEL.ADJT ()
- }
- Method (_Q11, 0, Serialized)
- {
- Store (0x11, DBFE)
- Store (Add (DBFF, One), DBFF)
- If (LOr (LEqual (TPOS, 0x40), LEqual (TPOS, 0x50)))
- {
- Notify (^^^VGA.LCD, 0x86)
- }
- Else
- {
- Acquire (PSMX, 0xFFFF)
- Store (0x05, BRB1)
- Store (0x8A, BCMD)
- BSMI (Zero)
- Release (PSMX)
- }
- Stall (0xFF)
- Stall (0xFF)
- Stall (0xFF)
- Stall (0xFF)
- }
- Method (_Q10, 0, Serialized)
- {
- Store (0x10, DBFE)
- Store (Add (DBFF, One), DBFF)
- If (LOr (LEqual (TPOS, 0x40), LEqual (TPOS, 0x50)))
- {
- Notify (^^^VGA.LCD, 0x87)
- }
- Else
- {
- Acquire (PSMX, 0xFFFF)
- Store (0x0A, BRTL)
- Store (0x8A, BCMD)
- BSMI (Zero)
- Release (PSMX)
- }
- Stall (0xFF)
- Stall (0xFF)
- Stall (0xFF)
- Stall (0xFF)
- }
- Method (_Q15, 0, NotSerialized)
- {
- Store (0x15, DBFE)
- Store (Add (DBFF, One), DBFF)
- Store ("!!! Wireless Button pressed !!!", Debug)
- If (W8OS)
- {
- Notify (WLBU, 0x80)
- }
- Else
- {
- Acquire (MUT2, 0xFFFF)
- If (WWBS)
- {
- Store (Zero, WWBS)
- }
- Else
- {
- Store (One, WWBS)
- }
- UPWS ()
- ^^^^WMID.GWEV (0x05, Zero)
- }
- Sleep (0x12C0)
- Release (MUT2)
- }
- Method (UPWS, 0, NotSerialized)
- {
- If (WWBS)
- {
- If (LNotEqual (^^^^WMID.WMIF, Zero))
- {
- If (LAnd (WWLE, WWLS))
- {
- Store (One, ^^^SMBS.O052)
- }
- Else
- {
- Store (Zero, ^^^SMBS.O052)
- }
- If (LAnd (WCME, WCMS))
- {
- Store (One, ^^^SMBS.O189)
- }
- Else
- {
- Store (Zero, ^^^SMBS.O189)
- }
- }
- Else
- {
- If (WWLE)
- {
- Store (One, ^^^SMBS.O052)
- }
- If (WCME)
- {
- Store (One, ^^^SMBS.O189)
- }
- }
- }
- Else
- {
- Store (Zero, ^^^SMBS.O052)
- Store (Zero, ^^^SMBS.O189)
- }
- }
- Method (_Q33, 0, NotSerialized)
- {
- Store (0x33, DBFE)
- Store (Add (DBFF, One), DBFF)
- Store ("!!! Peak Shift Timer sync up !!!", Debug)
- If (ECON)
- {
- Store (0xFF, PSIX)
- Sleep (One)
- FromBCD (^^RTC.RTMN, PSDL)
- FromBCD (^^RTC.RTHR, PSDH)
- Store (0x1C, PSIX)
- Sleep (One)
- FromBCD (^^RTC.RTDY, PSDL)
- FromBCD (^^RTC.RTSE, PSDH)
- Store (0x1D, PSIX)
- Sleep (One)
- }
- }
- Method (_Q8E, 0, NotSerialized)
- {
- Store (0x8E, DBFE)
- Store (Add (DBFF, One), DBFF)
- Store ("!!! Down CPU speed. !!!", Debug)
- If (ECON)
- {
- Store (\_PR.C000._PPC, Local0)
- Store (PPCM, Local1)
- If (LLess (Local0, Local1))
- {
- Add (Local0, One, Local0)
- }
- Store (Local0, \_PR.C000._PPC)
- Notify (\_PR.C000, 0x80)
- If (LGreater (ECPU, One))
- {
- Store (Local0, \_PR.C001._PPC)
- Notify (\_PR.C001, 0x80)
- }
- If (LGreater (ECPU, 0x02))
- {
- Store (Local0, \_PR.C002._PPC)
- Notify (\_PR.C002, 0x80)
- }
- If (LGreater (ECPU, 0x03))
- {
- Store (Local0, \_PR.C003._PPC)
- Notify (\_PR.C003, 0x80)
- }
- Store (Local0, OCPL)
- }
- }
- Method (_Q8F, 0, NotSerialized)
- {
- Store (0x8F, DBFE)
- Store (Add (DBFF, One), DBFF)
- Store ("!!! Up CPU speed !!!", Debug)
- If (ECON)
- {
- Store (\_PR.C000._PPC, Local0)
- If (Local0)
- {
- Subtract (Local0, One, Local0)
- Store (Local0, \_PR.C000._PPC)
- Notify (\_PR.C000, 0x80)
- If (LGreater (ECPU, One))
- {
- Store (Local0, \_PR.C001._PPC)
- Notify (\_PR.C001, 0x80)
- }
- If (LGreater (ECPU, 0x02))
- {
- Store (Local0, \_PR.C002._PPC)
- Notify (\_PR.C002, 0x80)
- }
- If (LGreater (ECPU, 0x03))
- {
- Store (Local0, \_PR.C003._PPC)
- Notify (\_PR.C003, 0x80)
- }
- }
- Store (Local0, OCPL)
- }
- }
- Method (_Q92, 0, NotSerialized)
- {
- UTAS ()
- }
- Method (_Q96, 0, NotSerialized)
- {
- Store (Zero, \_TZ.PSVD)
- Notify (\_TZ.THRM, 0x81)
- }
- Method (_Q99, 0, NotSerialized)
- {
- Store (0x99, DBFE)
- Store (Add (DBFF, One), DBFF)
- TSMI (0xD5, One)
- }
- Field (ERAM, ByteAcc, Lock, Preserve)
- {
- Offset (0x04),
- SMW0, 16
- }
- Field (ERAM, ByteAcc, Lock, Preserve)
- {
- Offset (0x04),
- SMB0, 8
- }
- Field (ERAM, ByteAcc, Lock, Preserve)
- {
- Offset (0x04),
- FLD0, 64
- }
- Field (ERAM, ByteAcc, Lock, Preserve)
- {
- Offset (0x04),
- FLD1, 128
- }
- Field (ERAM, ByteAcc, Lock, Preserve)
- {
- Offset (0x04),
- FLD2, 192
- }
- Field (ERAM, ByteAcc, Lock, Preserve)
- {
- Offset (0x04),
- FLD3, 256
- }
- Mutex (MUT0, 0x00)
- Mutex (MUT1, 0x00)
- Mutex (MUT2, 0x00)
- Method (SMRD, 4, NotSerialized)
- {
- If (LNot (ECON))
- {
- Return (0xFF)
- }
- If (LNotEqual (Arg0, 0x07))
- {
- If (LNotEqual (Arg0, 0x09))
- {
- If (LNotEqual (Arg0, 0x0B))
- {
- If (LNotEqual (Arg0, 0x47))
- {
- Return (0x19)
- }
- }
- }
- }
- Acquire (MUT0, 0xFFFF)
- Store (0x04, Local0)
- While (LGreater (Local0, One))
- {
- And (SMST, 0x40, SMST)
- Store (Arg2, SMCM)
- Store (Arg1, SMAD)
- Store (Arg0, SMPR)
- Store (Zero, Local3)
- While (LNot (And (SMST, 0xBF, Local1)))
- {
- Sleep (0x02)
- Increment (Local3)
- If (LEqual (Local3, 0x32))
- {
- And (SMST, 0x40, SMST)
- Store (Arg2, SMCM)
- Store (Arg1, SMAD)
- Store (Arg0, SMPR)
- Store (Zero, Local3)
- }
- }
- If (LEqual (Local1, 0x80))
- {
- Store (Zero, Local0)
- }
- Else
- {
- Decrement (Local0)
- }
- }
- If (Local0)
- {
- Store (And (Local1, 0x1F), Local0)
- }
- Else
- {
- If (LEqual (Arg0, 0x07))
- {
- Store (SMB0, Arg3)
- }
- If (LEqual (Arg0, 0x47))
- {
- Store (SMB0, Arg3)
- }
- If (LEqual (Arg0, 0x09))
- {
- Store (SMW0, Arg3)
- }
- If (LEqual (Arg0, 0x0B))
- {
- Store (BCNT, Local3)
- ShiftRight (0x0100, 0x03, Local2)
- If (LGreater (Local3, Local2))
- {
- Store (Local2, Local3)
- }
- If (LLess (Local3, 0x09))
- {
- Store (FLD0, Local2)
- }
- Else
- {
- If (LLess (Local3, 0x11))
- {
- Store (FLD1, Local2)
- }
- Else
- {
- If (LLess (Local3, 0x19))
- {
- Store (FLD2, Local2)
- }
- Else
- {
- Store (FLD3, Local2)
- }
- }
- }
- Increment (Local3)
- Store (Buffer (Local3) {}, Local4)
- Decrement (Local3)
- Store (Zero, Local5)
- While (LGreater (Local3, Local5))
- {
- GBFE (Local2, Local5, RefOf (Local6))
- PBFE (Local4, Local5, Local6)
- Increment (Local5)
- }
- PBFE (Local4, Local5, Zero)
- Store (Local4, Arg3)
- }
- }
- Release (MUT0)
- Return (Local0)
- }
- Method (SMWR, 4, NotSerialized)
- {
- If (LNot (ECON))
- {
- Return (0xFF)
- }
- If (LNotEqual (Arg0, 0x06))
- {
- If (LNotEqual (Arg0, 0x08))
- {
- If (LNotEqual (Arg0, 0x0A))
- {
- If (LNotEqual (Arg0, 0x46))
- {
- Return (0x19)
- }
- }
- }
- }
- Acquire (MUT0, 0xFFFF)
- Store (0x04, Local0)
- While (LGreater (Local0, One))
- {
- If (LEqual (Arg0, 0x06))
- {
- Store (Arg3, SMB0)
- }
- If (LEqual (Arg0, 0x46))
- {
- Store (Arg3, SMB0)
- }
- If (LEqual (Arg0, 0x08))
- {
- Store (Arg3, SMW0)
- }
- If (LEqual (Arg0, 0x0A))
- {
- Store (Arg3, SMD0)
- }
- And (SMST, 0x40, SMST)
- Store (Arg2, SMCM)
- Store (Arg1, SMAD)
- Store (Arg0, SMPR)
- Store (Zero, Local3)
- While (LNot (And (SMST, 0xBF, Local1)))
- {
- Sleep (0x02)
- Increment (Local3)
- If (LEqual (Local3, 0x32))
- {
- And (SMST, 0x40, SMST)
- Store (Arg2, SMCM)
- Store (Arg1, SMAD)
- Store (Arg0, SMPR)
- Store (Zero, Local3)
- }
- }
- If (LEqual (Local1, 0x80))
- {
- Store (Zero, Local0)
- }
- Else
- {
- Decrement (Local0)
- }
- }
- If (Local0)
- {
- Store (And (Local1, 0x1F), Local0)
- }
- Release (MUT0)
- Return (Local0)
- }
- Method (GSHK, 0, Serialized)
- {
- If (ECON)
- {
- Store (SFHK, Local0)
- }
- Return (Local0)
- }
- Method (SSHK, 1, Serialized)
- {
- If (ECON)
- {
- Store (Arg0, SFHK)
- }
- }
- Name (DISS, Buffer (0x0A)
- {
- /* 0000 */ 0x01, 0x02, 0x10, 0x04, 0x20, 0x03, 0x11, 0x05,
- /* 0008 */ 0x21, 0x01
- })
- Name (SWII, 0x0A)
- Method (GNSD, 0, Serialized)
- {
- Store (Zero, Local0)
- Store (CSTE, Local1)
- Store (ADDL, Local2)
- While (LLess (Local0, SWII))
- {
- Store (DerefOf (Index (DISS, Local0)), Local3)
- If (LEqual (Local3, Local1))
- {
- While (LLess (Local0, SWII))
- {
- Store (Local0, Local4)
- Increment (Local4)
- Store (DerefOf (Index (DISS, Local4)), Local5)
- If (LEqual (And (Local2, Local5), Local5))
- {
- Store (Local5, NSTE)
- Store (SWII, Local0)
- }
- Else
- {
- Increment (Local0)
- }
- }
- }
- Else
- {
- Increment (Local0)
- }
- }
- }
- Method (CPUS, 0, NotSerialized)
- {
- Store (Zero, Local0)
- Store (Local0, \_PR.C000._PPC)
- Notify (\_PR.C000, 0x80)
- If (LGreater (ECPU, One))
- {
- Store (Local0, \_PR.C001._PPC)
- Notify (\_PR.C001, 0x80)
- }
- If (LGreater (ECPU, 0x02))
- {
- Store (Local0, \_PR.C002._PPC)
- Notify (\_PR.C002, 0x80)
- }
- If (LGreater (ECPU, 0x03))
- {
- Store (Local0, \_PR.C003._PPC)
- Notify (\_PR.C003, 0x80)
- }
- If (ECON)
- {
- Store (Local0, OCPL)
- }
- }
- Method (KTWU, 0, NotSerialized)
- {
- If (ECON)
- {
- Store (KBWU, PSKB)
- Store (TPWU, PSTP)
- }
- }
- Method (W7RF, 0, NotSerialized)
- {
- If (ECON)
- {
- Store (Zero, WIN7)
- Store (Zero, RFLG)
- If (LEqual (OSTB, 0x50))
- {
- Store (One, WIN7)
- }
- If (LEqual (OSTB, 0x80))
- {
- Store (One, RFLG)
- }
- If (LEqual (SSOS, One))
- {
- Store (One, WINP)
- }
- }
- }
- Method (CBCD, 0, NotSerialized)
- {
- If (ECON)
- {
- Store (MBDC, Local0)
- And (Local0, 0xE4, Local0)
- Store (Local0, MBDC)
- }
- }
- Method (UTAS, 0, NotSerialized)
- {
- If (ECON)
- {
- If (LEqual (GSMS, One))
- {
- Store (MMST, Local0)
- }
- Else
- {
- Store (DMST, Local0)
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement