Contribute
Register

[Guide] How to patch DSDT for working battery status

How to patch DSDT for working battery status

Hi RehabMan,

I tried to PM you it does not let me do so. I have actually two isses, one with your ACPIBatteryManager and second one is with your version of Macisal!
I am using your ACPIBatteryManager and all is fine; But when I unplug the cable I get a core dump. Here are my dsdt and the console log and a picture my screen with the trace messages.
For compiler question please tell me where to post my problem
Thanks and looking forward to hearing from you.
Artimess
 

Attachments

  • msicx623.zip
    9.6 MB · Views: 102
How to patch DSDT for working battery status

Hi RehabMan,

I tried to PM you it does not let me do so. I have actually two isses, one with your ACPIBatteryManager and second one is with your version of Macisal!
I am using your ACPIBatteryManager and all is fine; But when I unplug the cable I get a core dump. Here are my dsdt and the console log and a picture my screen with the trace messages.
For compiler question please tell me where to post my problem
Thanks and looking forward to hearing from you.
Artimess

Likely a problem in your DSDT. Post ioreg: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html

Post MaciASL question in a separate thread.
 

Attachments

  • miscx623ioreg.zip
    389.2 KB · Views: 53
How to patch DSDT for working battery status

...
What thread should I post Macisal question?
...

Post new thread in this forum.
 
How to patch DSDT for working battery status

Hi here is a dump of my ioreg as you wished.
What thread should I post Macisal question?

Thanks again for your help.
Artimess

Crashing in AppleACPIEC. Could be the fact that all multi-byte EC fields are not patched.
 
How to patch DSDT for working battery status

Crashing in AppleACPIEC. Could be the fact that all multi-byte EC fields are not patched.

I had sent you a zip file with a copy of my DSDT, I looked at it and I do not see any 32 or 16 bit to patch? I do appreciate if you have a look on my dsdt.
Artimess
 
How to patch DSDT for working battery status

I had sent you a zip file with a copy of my DSDT, I looked at it and I do not see any 32 or 16 bit to patch? I do appreciate if you have a look on my dsdt.
Artimess

From the DSDT you uploaded:
Code:
                        OperationRegion (EC, EmbeddedControl, Zero, 0x0100)
                        Field (EC, ByteAcc, NoLock, Preserve)
                        {
                                    Offset (0x2D), 
                            T2D0,   1, 
                            T2D1,   4, 
                            T2D5,   3, 
                            TD2E,   8, 
                            TD2F,   8, 
                            TD30,   8, 
                            TD31,   8, 
                            TD32,   8, 
                            TD33,   8, 
                                    Offset (0x35), 
                            TD35,   8, 
                            TD36,   8, 
                                    Offset (0x38), 
                            TD38,   16, 
                            TD3A,   16, 
                            TD3C,   16, 
                            TD3E,   16, 
                            TD40,   16, 
                            TD42,   16, 
                            TD44,   16, 
                            TD46,   16, 
                            TD48,   16, 
                            TD4A,   16, 
                            TD4C,   16, 
                                    Offset (0x50), 
                            TD50,   16, 
                            TD52,   16, 
                            TD54,   16, 
                            TD56,   16, 
                            TD58,   16, 
                            TD5A,   16, 
                            TD5C,   16, 
                            TD5E,   16, 
                            TD60,   16, 
                            TD62,   16, 
                            TD64,   16,
 
How to patch DSDT for working battery status

From the DSDT you uploaded:
Code:
                        OperationRegion (EC, EmbeddedControl, Zero, 0x0100)
                        Field (EC, ByteAcc, NoLock, Preserve)
                        {
                                    Offset (0x2D), 
                            T2D0,   1, 
                            T2D1,   4, 
                            T2D5,   3, 
                            TD2E,   8, 
                            TD2F,   8, 
                            TD30,   8, 
                            TD31,   8, 
                            TD32,   8, 
                            TD33,   8, 
                                    Offset (0x35), 
                            TD35,   8, 
                            TD36,   8, 
                                    Offset (0x38), 
                            TD38,   16, 
                            TD3A,   16, 
                            TD3C,   16, 
                            TD3E,   16, 
                            TD40,   16, 
                            TD42,   16, 
                            TD44,   16, 
                            TD46,   16, 
                            TD48,   16, 
                            TD4A,   16, 
                            TD4C,   16, 
                                    Offset (0x50), 
                            TD50,   16, 
                            TD52,   16, 
                            TD54,   16, 
                            TD56,   16, 
                            TD58,   16, 
                            TD5A,   16, 
                            TD5C,   16, 
                            TD5E,   16, 
                            TD60,   16, 
                            TD62,   16, 
                            TD64,   16,

I do apologize, I guess I was not looking at the right location. Forgive me. I posted my question on Macisal immediately after the above, but disappread ! I guess you moved it to the right pace, can you give me the pointer?
 
How to patch DSDT for working battery status

I do apologize, I guess I was not looking at the right location. Forgive me. I posted my question on Macisal immediately after the above, but disappread ! I guess you moved it to the right pace, can you give me the pointer?

Ok, please bear with my stupid questions; I am not very educated in dsdt stuff:

original code:
Store (Arg1, TD31)
Return (TD31)

After applying 8 bit change, I have TD31 and TD32 representing the old TD31 of 16 bits:
What is the replacement code for Store(Arg1,TD31) so that Arg1 is being stored in TD31 and TD32, for return I think it is:
Return(B1B2(TD31,TD32))?

Thanks for your help
Artimess
 
How to patch DSDT for working battery status

Ok, please bear with my stupid questions; I am not very educated in dsdt stuff:

original code:
Store (Arg1, TD31)
Return (TD31)

After applying 8 bit change, I have TD31 and TD32 representing the old TD31 of 16 bits:
What is the replacement code for Store(Arg1,TD31) so that Arg1 is being stored in TD31 and TD32, for return I think it is:
Return(B1B2(TD31,TD32))?

Thanks for your help
Artimess

Firstly, TD31 is already 8-bits. No need to patch it.

Let's use TD38 as an example instead.

First of all, don't convert TD38 to TD38 and TD39. Always change the name, such that the compiler can find all places the old name was used. That way you won't inadvertently miss anything.

I would translate TD38,16 to TX38,8,TX39,8.

Assuming you had a Store(Arg1,TD38) somewhere, translation would be:
Store(ShiftRight(Arg1,8), TX39)
Store(Arg1,TX38)
 
Back
Top