Method (_WAK, 1, NotSerialized) // _WAK: Wake
{
If (LOr (LEqual (Arg0, Zero), LGreaterEqual (Arg0, 0x05)))
{
Return (WAKI)
}
Store (Zero, SPS)
Store (Zero, \_SB.PCI0.LPC.EC.HCMU)
\_SB.PCI0.LPC.EC.EVNT (One)
\_SB.PCI0.LPC.EC.HKEY.MHKE (One)
\_SB.PCI0.LPC.EC.FNST ()
UCMS (0x0D)
Store (Zero, LIDB)
If (LEqual (Arg0, One))
{
Store (\_SB.PCI0.LPC.EC.HFNI, FNID)
}
If (LEqual (Arg0, 0x03))
{
NVSS (Zero)
\_SB.PCI0.LPC.EC.LED (Zero, 0x80)
\_SB.PCI0.LPC.EC.LED (0x0A, 0x80)
Store (\_SB.PCI0.LPC.EC.AC._PSR (), PWRS)
If (OSC4)
{
PNTF (0x81)
}
If (LNotEqual (ACST, \_SB.PCI0.LPC.EC.AC._PSR ()))
{
\_SB.PCI0.LPC.EC.ATMC ()
}
If (SCRM)
{
Store (0x07, \_SB.PCI0.LPC.EC.HFSP)
If (MTAU)
{
Store (0x03E8, Local2)
While (LAnd (\_SB.PCI0.LPC.EC.PIBS, Local2))
{
Sleep (One)
Decrement (Local2)
}
If (Local2)
{
Store (One, \_SB.PCI0.LPC.EC.PLSL)
Store (MTAU, \_SB.PCI0.LPC.EC.PLTU)
Store (PL1L, \_SB.PCI0.LPC.EC.PLLS)
Store (PL1M, \_SB.PCI0.LPC.EC.PLMS)
}
}
}
Store (Zero, IOEN)
Store (Zero, IOST)
If (LEqual (ISWK, One))
{
If (\_SB.PCI0.LPC.EC.HKEY.DHKC)
{
\_SB.PCI0.LPC.EC.HKEY.MHKQ (0x6070)
}
}
If (VIGD)
{
\_SB.PCI0.VID.GLIS (\_SB.LID._LID ())
If (WVIS)
{
VBTD ()
}
}
ElseIf (WVIS)
{
\_SB.PCI0.VID.GLIS (\_SB.LID._LID ())
VBTD ()
}
VCMS (One, \_SB.LID._LID ())
AWON (Zero)
If (CMPR)
{
Notify (\_SB.SLPB, 0x02)
Store (Zero, CMPR)
}
If (LOr (USBR, \_SB.PCI0.XHCI.XRST))
{
If (LOr (LEqual (XHCI, 0x02), LEqual (XHCI, 0x03)))
{
Store (Zero, Local0)
And (\_SB.PCI0.XHCI.PR3, 0xFFFFFFC0, Local0)
Or (Local0, \_SB.PCI0.XHCI.PR3M, \_SB.PCI0.XHCI.PR3)
Store (Zero, Local0)
And (\_SB.PCI0.XHCI.PR2, 0xFFFF8000, Local0)
Or (Local0, \_SB.PCI0.XHCI.PR2M, \_SB.PCI0.XHCI.PR2)
}
}
If (VIGD)
{
If (And (\_SB.PCI0.VID.TCHE, 0x0100))
{
If (And (\_SB.IAOE.GAOS (), One))
{
If (And (\_SB.IAOE.GSWR (), 0x02))
{
Store (Or (And (\_SB.PCI0.VID.STAT, 0xFFFFFFFC), One), \_SB.PCI0.VID.STAT)
Store (One, \_SB.PCI0.LPC.EC.SKEM)
}
}
}
}
}
If (LEqual (Arg0, 0x04))
{
NVSS (Zero)
Store (Zero, \_SB.PCI0.LPC.EC.HSPA)
Store (\_SB.PCI0.LPC.EC.AC._PSR (), PWRS)
If (OSC4)
{
PNTF (0x81)
}
\_SB.PCI0.LPC.EC.ATMC ()
If (SCRM)
{
Store (0x07, \_SB.PCI0.LPC.EC.HFSP)
If (MTAU)
{
Store (0x03E8, Local2)
While (LAnd (\_SB.PCI0.LPC.EC.PIBS, Local2))
{
Sleep (One)
Decrement (Local2)
}
If (Local2)
{
Store (One, \_SB.PCI0.LPC.EC.PLSL)
Store (MTAU, \_SB.PCI0.LPC.EC.PLTU)
Store (PL1L, \_SB.PCI0.LPC.EC.PLLS)
Store (PL1M, \_SB.PCI0.LPC.EC.PLMS)
}
}
}
If (LNot (NBCF))
{
If (VIGD)
{
\_SB.PCI0.LPC.EC.BRNS ()
}
Else
{
VBRC (BRLV)
}
}
Store (Zero, IOEN)
Store (Zero, IOST)
If (LEqual (ISWK, 0x02))
{
If (\_SB.PCI0.LPC.EC.HKEY.DHKC)
{
\_SB.PCI0.LPC.EC.HKEY.MHKQ (0x6080)
}
}
If (\_SB.PCI0.XHCI.XRST)
{
If (LOr (LEqual (XHCI, 0x02), LEqual (XHCI, 0x03)))
{
Store (Zero, Local0)
And (\_SB.PCI0.XHCI.PR3, 0xFFFFFFC0, Local0)
Or (Local0, \_SB.PCI0.XHCI.PR3M, \_SB.PCI0.XHCI.PR3)
Store (Zero, Local0)
And (\_SB.PCI0.XHCI.PR2, 0xFFFF8000, Local0)
Or (Local0, \_SB.PCI0.XHCI.PR2M, \_SB.PCI0.XHCI.PR2)
}
}
}
If (XOr (\_SB.PCI0.EXP6.PDS, \_SB.PCI0.EXP6.PDSF))
{
Store (\_SB.PCI0.EXP6.PDS, \_SB.PCI0.EXP6.PDSF)
Notify (\_SB.PCI0.EXP6, Zero)
}
\_SB.PCI0.LPC.EC.BATW (Arg0)
\_SB.PCI0.LPC.EC.BWAK (Arg0)
\_SB.PCI0.LPC.EC.HKEY.WGWK (Arg0)
Notify (\_TZ.THM0, 0x80)
VSLD (\_SB.LID._LID ())
If (VIGD)
{
\_SB.PCI0.VID.GLIS (\_SB.LID._LID ())
}
ElseIf (WVIS)
{
\_SB.PCI0.VID.GLIS (\_SB.LID._LID ())
}
If (LLess (Arg0, 0x04))
{
If (LOr (And (RRBF, 0x02), And (\_SB.PCI0.LPC.EC.HWAC, 0x02)))
{
ShiftLeft (Arg0, 0x08, Local0)
Store (Or (0x2013, Local0), Local0)
\_SB.PCI0.LPC.EC.HKEY.MHKQ (Local0)
}
}
If (LEqual (Arg0, 0x04))
{
Store (Zero, Local0)
Store (CSUM (Zero), Local1)
If (LNotEqual (Local1, CHKC))
{
Store (One, Local0)
Store (Local1, CHKC)
}
Store (CSUM (One), Local1)
If (LNotEqual (Local1, CHKE))
{
Store (One, Local0)
Store (Local1, CHKE)
}
If (Local0)
{
Notify (_SB, Zero)
}
}
Store (Zero, RRBF)
Return (WAKI)
}