_BST/_BIF would fail outright if there were 16-bit EC fields being accessed.
Hello RehanMan,
Finally I've managed how to show battery cycles.
In my DSDT exist CYC0, searching on internet I've understand that return battery cycles.
I've modify my _BIF from this:
Method (_BIF, 0, NotSerialized)
{
Name (STAT, Package (0x0D)
{
Zero,
0x0FA0,
0x0FA0,
One,
0x2B5C,
0x01A4,
0x9C,
0x0108,
0x0EC4,
"PABAS024",
"3658Q",
"LION",
"COMPAL"
})
If (ECOK ())
{
Store (^^EC0.BDN0, Local0)
If (LEqual (Local0, 0x02))
{
Store ("PA3457U ", Index (STAT, 0x09))
}
If (LEqual (Local0, 0x08))
{
Store ("PA3457U ", Index (STAT, 0x09))
}
Sleep (0x14)
Store (B1B2 (^^EC0.DC00, ^^EC0.DC01), BFC1)
To this:
Method (_BIF, 0, NotSerialized)
{
Name (STAT, Package (0x0E)
{
Zero,
0x0FA0,
0x0FA0,
One,
0x2B5C,
0x01A4,
0x9C,
0x0108,
0x0EC4,
"PABAS024",
"3658Q",
"LION",
"COMPAL",
Zero
})
If (ECOK ())
{
Store (^^EC0.BDN0, Local0)
If (LEqual (Local0, 0x02))
{
Store ("PA3457U ", Index (STAT, 0x09))
}
If (LEqual (Local0, 0x08))
{
Store ("PA3457U ", Index (STAT, 0x09))
}
Sleep (0x14)
Store (^^EC0.CYC0, Index (STAT, 0x0D))
Sleep (0x14)
Store (B1B2 (^^EC0.DC00, ^^EC0.DC01), BFC1)
And now I see that my battery has 154 cycles.
I found something strange before last change in my DSDT. When my battery is discharging, at 7% stop to decrease but obviously the battery still discharging.
What do you think could be the problem?
How calculate this value your kext?
Thanks again!