Contribute
Register

[Guide] How to patch DSDT for working battery status

How to patch DSDT for working battery status

OK i'll do it all

And the section PBIF... should i edit it with my battery specs values??? or leave like it is now?


thanks

Make only changes that are required. Especially when you don't know what you're doing :)
 
How to patch DSDT for working battery status

Please use a code block for large code snippets. It would be helpful if you could go back and edit your prior posts with large code/log blocks. Also, filter your log results so as not to expose private items such as your email address, etc...
Even large code snippets will cause a a post to be "moderated" as there is line limit for posts. I concur with RehabMan's suggestion and would even recommend putting the information in a text file & attaching the text file to the post.:thumbup:
 
How to patch DSDT for working battery status

Make only changes that are required. Especially when you don't know what you're doing :)

Yes, you're right :)

So, did erase that section and now it appears to be working

there are some snapshots
Captura de pantalla 2014-06-24 a la(s) 12.41.24.pngCaptura de pantalla 2014-06-24 a la(s) 12.42.16.jpgCaptura de pantalla 2014-06-24 a la(s) 12.42.29.jpg

now is time to confirm and then erase all debug code and make a patch for my battery so i can share it with the community

i want to thank you very much

this forum is the bomb!

bye
 
How to patch DSDT for working battery status

Okay the BDAT Field looks like it is 0x2A if I count using bytes

PHP:
OperationRegion (SMBX, EmbeddedControl, 0x18, 0x28)            Field (SMBX, ByteAcc, NoLock, Preserve)
            {
                
                PRTC,   8, 
                SSTS,   5, 
                    ,   1, 
                ALFG,   1, 
                CDFG,   1, 
                ADDR,   8, 
                CMDB,   8, 
                /*BDAT*/
                
                BDAX,256,//BDAT,256, 
                BCNT,   8, 
                    ,   1, 
                ALAD,   7, 
                ALD0,   8, 
                ALD1,   8
            }


Here however the start count is 0x40 and the lowest is 0x28???????

How do I figure this one out?

PHP:
OperationRegion (SMB2, EmbeddedControl, 0x40, 0x28)            Field (SMB2, ByteAcc, NoLock, Preserve)
            {
                
                PRT2,   8, 
                SST2,   5, 
                    ,   1, 
                ALF2,   1, 
                CDF2,   1, 
                ADD2,   8, 
                CMD2,   8, 
                /*BDA2*/
                                
                BDAY,256,//BDA2,256, 
                BCN2,   8, 
                    ,   1, 
                ALA2,   7, 
                ALR0,   8, 
                ALR1,   8
            }
 
How to patch DSDT for working battery status

Okay the BDAT Field looks like it is 0x2A if I count using bytes

PHP:
OperationRegion (SMBX, EmbeddedControl, 0x18, 0x28)            Field (SMBX, ByteAcc, NoLock, Preserve)
            {
                
                PRTC,   8, 
                SSTS,   5, 
                    ,   1, 
                ALFG,   1, 
                CDFG,   1, 
                ADDR,   8, 
                CMDB,   8, 
                /*BDAT*/
                
                BDAX,256,//BDAT,256, 
                BCNT,   8, 
                    ,   1, 
                ALAD,   7, 
                ALD0,   8, 
                ALD1,   8
            }

I see it at 0x1C:
Code:
OperationRegion (SMBX, EmbeddedControl, 0x18, 0x28)            Field (SMBX, ByteAcc, NoLock, Preserve)
            {
                
                PRTC,   8,  //18 
                SSTS,   5,  //19
                    ,   1, 
                ALFG,   1, 
                CDFG,   1, 
                ADDR,   8, //1a
                CMDB,   8, //1b
                /*BDAT*/
                
                BDAX,256,//BDAT,256, //1c

Here however the start count is 0x40 and the lowest is 0x28???????

How do I figure this one out?

PHP:
OperationRegion (SMB2, EmbeddedControl, 0x40, 0x28)            Field (SMB2, ByteAcc, NoLock, Preserve)
            {
                
                PRT2,   8, 
                SST2,   5, 
                    ,   1, 
                ALF2,   1, 
                CDF2,   1, 
                ADD2,   8, 
                CMD2,   8, 
                /*BDA2*/
                                
                BDAY,256,//BDA2,256, 
                BCN2,   8, 
                    ,   1, 
                ALA2,   7, 
                ALR0,   8, 
                ALR1,   8
            }

Same way. You count:
Code:
OperationRegion (SMB2, EmbeddedControl, 0x40, 0x28)            Field (SMB2, ByteAcc, NoLock, Preserve)
            {
                
                PRT2,   8,//40 
                SST2,   5, //41
                    ,   1, 
                ALF2,   1, 
                CDF2,   1, 
                ADD2,   8, //42
                CMD2,   8, //43
                /*BDA2*/
                                
                BDAY,256,//BDA2,256, //44
 
How to patch DSDT for working battery status

Bix keeps failing.

that is exactly how I counted it
 
How to patch DSDT for working battery status

Bix keeps failing.

Use ACPIDebug to instrument it so you know specifically where. Or post your native DSDT + patches.

that is exactly how I counted it

Except you came up with a different answer: 0x2A !? as stated in post #670.
 
How to patch DSDT for working battery status

Use ACPIDebug to instrument it so you know specifically where. Or post your native DSDT + patches.



Except you came up with a different answer: 0x2A !? as stated in post #670.

I counted it originally that, but I kept doubting myself because when Bix fails, it says the object at 0x2abc was the culprit .


View attachment dsdt.aml.zip

View attachment patched dsdt.zip

View attachment log.txt


edit : don't give me a final solution please, tell me what I did wrong if you ever have time or at all look at it :) :beachball::beachball::beachball::beachball::beachball::beachball::beachball::beachball:
 
How to patch DSDT for working battery status

I counted it originally that, but I kept doubting myself because when Bix fails, it says the object at 0x2abc was the culprit .


View attachment 97062

View attachment 97063

View attachment 97064


edit : don't give me a final solution please, tell me what I did wrong if you ever have time or at all look at it :) :beachball::beachball::beachball::beachball::beachball::beachball::beachball::beachball:

Why did you remove all Offset directives within ECOR in the patched DSDT?

And B1B2 can be used only for reads (eg. first param of Store). B1B2 is helper for reading two 8-bit EC fields and combining them into a 16-bit return. For writing, you need to use two separate Store operations. Read the last few pages of this thread for details.

Same goes for RECB. Can only be used for reading. When you see writes, use WECB to accomplish the same.
 
How to patch DSDT for working battery status

What about for a Store ( Add ( buffer , buffer) , LocalX)

Is the second buffer argument supposed to be a write?
 
Back
Top