Contribute
Register

[Guide] How to patch DSDT for working battery status

[Guide] Native Power Management for Laptops

Umm, what fields sir RehabMan? By the way this is my DSDT and I did a screenshot on the EmbeddedControl part. Is it normal?

You have more than one EmbeddedControl. Look at all of them.

I will move these off-topic posts (done).
 
You have more than one EmbeddedControl. Look at all of them.

I will move these off-topic posts (done).

I owe you so much thanks Sir RehabMan.. but I think I'll need one more last tiny request if you may.. Could you help me eliminate the ec..? I'm really lost with your tutorial on patching the battery stats.. I can't seem to follow it.. will you?
 

Attachments

  • DSDT.aml
    38.1 KB · Views: 74
I owe you so much thanks Sir RehabMan.. but I think I'll need one more last tiny request if you may.. Could you help me eliminate the ec..? I'm really lost with your tutorial on patching the battery stats.. I can't seem to follow it.. will you?

Did you work through the example DSDT? I wrote the guide so that you could do it yourself. It is not that difficult if you've worked through the example first. Don't expect to jump right into your own DSDT.
 
please have a look at these patched fields, and I have some questions
-----------------------------------------------------------
Field (ECOR, ByteAcc, NoLock, Preserve)
{
Offset (0xA0),
BRC0,8,BRC1,8,
BFC0,8,BFC1,8,
BAE0,8,BAE1,8,
BRS0,8,BRS1,8,
BAC0,8,BAC1,8,
BVO0,8,BVO1,8,
BAF0,8,BAF1,8,
SBBS, 16
}


Field (ECOR, ByteAcc, NoLock, Preserve)
{
Offset (0xA0),
BBM0,8,BBM1,8,
BMD0,8,BMD1,8,
SBCC, 16
}


Field (ECOR, ByteAcc, NoLock, Preserve)
{
Offset (0xA0),
BDC0,8,BDC1,8,
BDV0,8,BDV1,8,
BOM0,8,BOM1,8,
BSI0,8,BSI1,8,
BDT0,8,BDT1,8,
SBSN, 16
}


Field (ECOR, ByteAcc, NoLock, Preserve)
{
Offset (0xA0),
BCH0,8,BCH1,8,BCH2,8,BCH3,8
}


Field (ECOR, ByteAcc, NoLock, Preserve)
{
Offset (0xA0),
BMNX,128,//SBMN,128
}


Field (ECOR, ByteAcc, NoLock, Preserve)
{
Offset (0xA0),
BDNX,128,//SBDN,128
}
------------------------------------------------------------
After use my patch, if the field has more than one variables, the last one won't change.


Another question is all of these fields' offsets start at 0xA0, so which offset should I use to stands for BMNX and BDNX?

And here is my test patch
Thanks.

View attachment Test.txt
 
...
After use my patch, if the field has more than one variables, the last one won't change.

What, specifically, are you referring to?

Another question is all of these fields' offsets start at 0xA0, so which offset should I use to stands for BMNX and BDNX?

0xA0.
 
What, specifically, are you referring to?

For example :
Field (ECOR, ByteAcc, NoLock, Preserve)
{
Offset (0xA0),
BRC0,8,BRC1,8,
BFC0,8,BFC1,8,
BAE0,8,BAE1,8,
BRS0,8,BRS1,8,
BAC0,8,BAC1,8,
BVO0,8,BVO1,8,
BAF0,8,BAF1,8,
SBBS, 16
}

In this case, SBBS won't change after patching.


Both 0xA0?
 
For example :
Field (ECOR, ByteAcc, NoLock, Preserve)
{
Offset (0xA0),
BRC0,8,BRC1,8,
BFC0,8,BFC1,8,
BAE0,8,BAE1,8,
BRS0,8,BRS1,8,
BAC0,8,BAC1,8,
BVO0,8,BVO1,8,
BAF0,8,BAF1,8,
SBBS, 16
}

In this case, SBBS won't change after patching.

You have no patch for SBBS in Test.txt. Closest you have is:
Code:
into device label EC code_regex SBBS,\s+16, replace_matched begin BBS0,8,BBS1,8, end;

But the SBBS declaration has no comma ',' after '16'.

Perhaps you meant to write:
Code:
into device label EC code_regex SBBS,\s+16 replace_matched begin BBS0,8,BBS1,8 end;

Both 0xA0?

That's where they are at. They are different names for the same area in the EC.
 
Back
Top