本帖最后由 haotiangood 于 2014-10-30 13:26 编辑
情况是这样的:ML时代dsdt+ACPIBatteryManager电量显示正常
现在在用Mavericks 10.9.5
dsdt按照rehabman的教程重做了电池部分,现在电池部分是这样的
- Device (H_EC)
- {
- Name (_HID, EisaId ("PNP0C09"))
- Name (_UID, One)
- Method (B1B2, 2, NotSerialized)
- {
- Return (Or (Arg0, ShiftLeft (Arg1, 0x08)))
- }
- Method (B1B3, 0, NotSerialized)
- {
- Return (Or (BDF0, BDF1))
- }
复制代码- OperationRegion (ECR, EmbeddedControl, Zero, 0xFF)
- Field (ECR, ByteAcc, Lock, Preserve)
- {
- Offset (0x18),
- SPTR, 8,
- SSTS, 8,
- SADR, 8,
- SCMD, 8,
- SBFR, 256,
- SCNT, 8,
- Offset (0x80),
- B1EX, 1,
- , 1,
- ACEX, 1,
- Offset (0x81),
- SWBE, 1,
- DCBE, 1,
- Offset (0x82),
- WLST, 1,
- OPST, 1,
- Offset (0x83),
- LIDS, 1,
- Offset (0x84),
- B1ST, 8,
- Offset (0x86),
- BRIT, 8,
- Offset (0xA0),
- BRA0, 8,
- BRA1, 8,
- BPR0, 8,
- BPR1, 8,
- BVO0, 8,
- BVO1, 8,
- Offset (0xB0),
- BDA0, 8,
- BDA1, 8,
- BDF0, 8,
- BDF1, 8,
- BDV0, 8,
- BDV1, 8,
- BDL0, 8,
- BDL1, 8,
- Offset (0xC0),
- CTMP, 8,
- Offset (0xC7),
- TIST, 8,
- Offset (0xD0),
- B1TI, 16,
- B1SE, 16,
- B1CR, 16,
- B1TM, 16
- }
复制代码- Device (BAT1)
- {
- Name (_HID, EisaId ("PNP0C0A"))
- Name (_UID, One)
- Name (BATI, Package (0x0D)
- {
- One,
- 0xFFFFFFFF,
- 0xFFFFFFFF,
- One,
- 0xFFFFFFFF,
- 0x03,
- 0x0A,
- One,
- One,
- "Unknown",
- "Unknown",
- "Unknown",
- "Unknown"
- })
复制代码 后边涉及到已经转换8bit的store的地方已经改成这种形式了:
比如原来是Store(B1DA, Local0)
现在是
- Store (B1B2 (BDA0, BDA1), Local0)
复制代码 B1B2 B1B3两个Method是我自己加进去的,定义B1B3是因为我的DSDT里有这么一段
- Method (_PTS, 1, NotSerialized)
- {
- Store (Zero, P80D)
- P8XH (Zero, Arg0)
- Store (\_SB.PCI0.LPCB.H_EC.B1DF, \_SB.BFCC)
复制代码 B1DF现在已经被拆分成BDF0和BDF1了,但是上边要返回一个值,所以定义了B1B3这个Method,不然编译出错
这是定义了B1B3之后的Method _PTS
- Method (_PTS, 1, NotSerialized)
- {
- Store (Zero, P80D)
- P8XH (Zero, Arg0)
- Store (\_SB.PCI0.LPCB.H_EC.B1B3 (), \_SB.BFCC)
复制代码 我不懂编程,感觉上这样改动也不太对,希望大家给点提示和建议。
现在我的电池电量显示不对,如下图,剩余电量最高100
电池电量
另附完整dsdt
dsdt.aml.zip
(12.86 KB, 下载次数: 1)
求指教
补充一点,我的ACPIBatteryManager是1.53版的,能下到的最新的那个
已解决,去掉B1B3,在这里Store(\_SB.PCI0.LPCP.H_EC.B1DF, \_SB.BFCC),用B1B2决定原来B1DF的值就好了,具体就是
- Store (B1B2 (\_SB.PCI0.LPCB.H_EC.BDF0, \_SB.PCI0.LPCB.H_EC.BDF1), \_SB.BFCC)
复制代码 DSDT附件已经更新,配合最新的ACPIBatteryManager完美显示电量
电量完美
|