Contribute
Register

[Guide] How to patch DSDT for working battery status

Read post #1, "Problem Reporting".
Hi Rehabman,
I send you the problem reporting zip with all requeriments.
In this moment the battery manager show always 0%.
Thanks for all.
Konakan
 

Attachments

  • problemReportKonakan.zip
    2 MB · Views: 106
Hi Rehabman,
I send you the problem reporting zip with all requeriments.
In this moment the battery manager show always 0%.
Thanks for all.
Konakan

RefOf(B1B2(...)) not valid.

For code like this:
Code:
Store (Divide (Multiply (Arg0, 0x64), Divide (Multiply (ECRD (RefOf (B1FC)), ECRD (RefOf (B1FV))), 0x03E8, ), ), Local0)

Remove unnecessary ECRD(RefOf(X)) to just X.

eg.
Code:
Store (Divide (Multiply (Arg0, 0x64), Divide (Multiply (B1FC, B1FV), 0x03E8, ), ), Local0)

Then do normal B1B2 translation...
 
Last edited:
RefOf(B1B2(...)) not valid.

For code like this:
Code:
Store (Divide (Multiply (Arg0, 0x64), Divide (Multiply (ECRD (RefOf (B1FC)), ECRD (RefOf (B1FV))), 0x03E8, ), ), Local0)

Remove unnecessary ECRD(RefOf(X)) to just X.

eg.
Code:
Store (Divide (Multiply (Arg0, 0x64), Divide (Multiply (B1FC), ECRD (B1FV)), 0x03E8, ), ), Local0)

Then do normal B1B2 translation...

Hello Rehabman. Thank you very much again.
I do what you suggest me in the section of DSDT referred to the battery manager. But continue with 0%.
I attach the dsdt (aml and dsl).


There are a situation that maybe can explain the error (?):
In the method label _BTP i change two parametres ( B1FC and B1FV) and I have to do it manually because the patch:

"into method label _BTP code_regex \(B1FC, replaceall_matched begin (B1B2(BFC0,BFC1), end;" and
"into method label _BTP code_regex \(B1FV, replaceall_matched begin (B1B2(BFV0,BFV1), end;"

don't do nothing.
Also B1FC are in two differents lines, with two methods differents. _BIF and _BTP



Best Regards
 

Attachments

  • DSDT_error.zip
    59.1 KB · Views: 119
Hello Rehabman. Thank you very much again.
I do what you suggest me in the section of DSDT referred to the battery manager. But continue with 0%.
I attach the dsdt (aml and dsl).


There are a situation that maybe can explain the error (?):
In the method label _BTP i change two parametres ( B1FC and B1FV) and I have to do it manually because the patch:

"into method label _BTP code_regex \(B1FC, replaceall_matched begin (B1B2(BFC0,BFC1), end;" and
"into method label _BTP code_regex \(B1FV, replaceall_matched begin (B1B2(BFV0,BFV1), end;"

don't do nothing.
Also B1FC are in two differents lines, with two methods differents. _BIF and _BTP



Best Regards

You still have incorrect uses of ECRD...

Code:
Store (Divide (Multiply (Arg0, 0x64), Divide (Multiply (ECRD (B1B2(BFC0,BFC1)), ECRD (B1B2(BFV0,BFV1))), 0x03E8, ), ), Local0)

You cannot use ECRD with the result from B1B2.
 
Last edited:
You still have incorrect uses of ECRD...

Code:
Store (Divide (Multiply (Arg0, 0x64), Divide (Multiply (ECRD (B1B2(BFC0,BFC1)), ECRD (B1B2(BFV0,BFV1))), 0x03E8, ), ), Local0)

You cannot use ECRD with the result from B1B2.
It's true. I need more attention at you write exactly.
I do it, and continue with 0%.
In this case, I can apply without problems the patch, but the last one, only change one item. The green do it ok, but the red i have to write it manually... I don't know if this are or not important....
Thanks again

If (LAnd (LNotEqual (B1B2(BFC0,BFC1), Zero), LNotEqual (B1B2(BFV0,BFV1), Zero)))
Store (Divide (Multiply (Arg0, 0x64), Divide (Multiply (B1B2(BFC0,BFC1),B1B2(BFV0,BFV1)), 0x03E8, ), ), Local0)
 

Attachments

  • DSDT3.zip
    59.1 KB · Views: 109
It's true. I need more attention at you write exactly.
I do it, and continue with 0%.
In this case, I can apply without problems the patch, but the last one, only change one item. The green do it ok, but the red i have to write it manually... I don't know if this are or not important....
Thanks again

If (LAnd (LNotEqual (B1B2(BFC0,BFC1), Zero), LNotEqual (B1B2(BFV0,BFV1), Zero)))
Store (Divide (Multiply (Arg0, 0x64), Divide (Multiply (B1B2(BFC0,BFC1),B1B2(BFV0,BFV1)), 0x03E8, ), ), Local0)

Your regex in your patch must match the text in the code you're trying to change.
 
Your regex in your patch must match the text in the code you're trying to change.
... Here send the DSDT without this line to apply:

into method label _BTP code_regex \(B1FV, replaceall_matched begin (B1B2(BFV0,BFV1), end;

If I patch it, only find 1, but there are two!!!
I don't know the reason...
 

Attachments

  • DSDT.dsl.zip
    38.9 KB · Views: 95
... Here send the DSDT without this line to apply:

into method label _BTP code_regex \(B1FV, replaceall_matched begin (B1B2(BFV0,BFV1), end;

If I patch it, only find 1, but there are two!!!
I don't know the reason...

There is only one (B1FV to be found in _BTP. You can use Edit->Find '(B1FV'... and see for yourself).
The other B1FV is not preceded by an open paren. It is preceded by a comma.
 
There is only one (B1FV to be found in _BTP. You can use Edit->Find '(B1FV'... and see for yourself).
The other B1FV is not preceded by an open paren. It is preceded by a comma.
Yes, it's true.
But if i only change the first one '(F1FV', maciasl give me an error:
Objet does ont exist (F1FV).
So, i have to change it manually?
And, this is the reason why continue 0%?
Thanks
Konakan
 
Yes, it's true.
But if i only change the first one '(F1FV', maciasl give me an error:
Objet does ont exist (F1FV).

As you should expect given the fact that F1FV needs to be broken into two separate fields.

So, i have to change it manually?

Construct a patch that changes both instances.

And, this is the reason why continue 0%?

Read post #1, "Problem Reporting".
 
Back
Top