daxuexinsheng 发表于 2014-3-5 09:10
你需要找Device (BAT0)最后的一个 Return (名字)。
再找那个 Method (名字),在它的前面,应该会有那些要 ...
你好啊 打扰你了,这是我的DSDT电池那段的代码,我看了不知道要拆分哪段的,请指教,谢谢这是我发的求助帖:https://bbs.pcbeta.com/viewthread-1484928-1-1.html
Scope (_SB.PCI0) { Device (BAT0) { Name (_HID, EisaId("PNP0C0A")) Name (_UID, Zero) Name (_PCL,Package (0x01) { PCI0 }) Method (_STA, 0,NotSerialized) { If(^^SBRG.EC0.BATP (Zero)) { Return(0x1F) } Else { Return(0x0F) } } Name (LOW2,0x012C) Name (DVOT, 0x0E) Name (PUNT, One) Name (LFCC,0x1770) Name (NBIF,Package (0x0D) { Zero, Ones, Ones, One, Ones, Ones, Ones, Ones, Ones, "", "", "", "" }) Name (PBIF,Package (0x0D) { One, 0x1770, 0x1770, One, 0x39D0, 0x0258, 0x012C, 0x3C, 0x3C, "M3N", " ", "LIon", "ASUSTek" }) Name (PBST,Package (0x04) { Zero, Ones, Ones, Ones }) Method (FBIF, 5,NotSerialized) { Store (Arg0,PUNT) Store (Arg1,Local1) Store (Arg2,Local2) If (LEqual(PUNT, Zero)) { Multiply(Local1, 0x0A, Local1) Multiply(Local2, 0x0A, Local2) } Store (Arg0,Index (PBIF, Zero)) Store (Local1,Index (PBIF, One)) Store (Local2,Index (PBIF, 0x02)) Store (Local2,LFCC) Store (Arg3,Index (PBIF, 0x03)) Store (Arg4,Index (PBIF, 0x04)) Divide(Local1, 0x0A, Local3, Local5) Store (Local5,Index (PBIF, 0x05)) Divide(Local1, 0x64, Local3, Local6) Store (Local6,Index (PBIF, 0x06)) Store (Local6,LOW2) Divide(Local1, 0x64, Local3, Local7) Store (Local7,Index (PBIF, 0x07)) Store (Local7,Index (PBIF, 0x08)) } Method (CBIF, 0,NotSerialized) { If (PUNT) { Store(DerefOf (Index (PBIF, 0x04)), Local0) Add(Local0, 0x01F4, Local0) Divide(Local0, 0x03E8, Local1, DVOT) Store(Zero, Index (PBIF, Zero)) Multiply(DerefOf (Index (PBIF, One)), DVOT, Index (PBIF, One )) Multiply(DerefOf (Index (PBIF, 0x02)), DVOT, Index (PBIF, 0x02 )) Multiply(DerefOf (Index (PBIF, 0x05)), DVOT, Index (PBIF, 0x05 )) Multiply(DerefOf (Index (PBIF, 0x06)), DVOT, Index (PBIF, 0x06 )) Multiply(DerefOf (Index (PBIF, 0x07)), DVOT, Index (PBIF, 0x07 )) Multiply(DerefOf (Index (PBIF, 0x08)), DVOT, Index (PBIF, 0x08 )) } } Method (_BIF, 0,NotSerialized) { If (LNot(^^SBRG.EC0.BATP (Zero))) { Return(NBIF) } If (LEqual(^^SBRG.EC0.GBTT (Zero), 0xFF)) { Return(NBIF) } BATO () BATS (Zero) Store(^^SBRG.EC0.BIF9 (), Index (PBIF, 0x09)) Store (ONAM,Index (PBIF, 0x0C)) Store(^^SBRG.EC0.BIF0 (), Local0) Store(^^SBRG.EC0.BIF1 (), Local1) Store(^^SBRG.EC0.BIF2 (), Local2) Store(^^SBRG.EC0.BIF3 (), Local3) Store(^^SBRG.EC0.BIF4 (), Local4) If (LNotEqual(Local0, Ones)) { If(LNotEqual (Local1, Ones)) { If(LNotEqual (Local2, Ones)) { If(LNotEqual (Local3, Ones)) { If (LNotEqual (Local4, Ones)) { FBIF (Local0, Local1, Local2, Local3, Local4) CBIF () } } } } } If (LEqual(PUNT, Zero)) { Multiply(Local2, 0x0A, Local2) } Store (Local2, LFCC) BATR () Return (PBIF) } |