Contribute
Register

[Guide] How to patch DSDT for working battery status

I'm in a similar position on a Dell E6420. Have instrumented using ACPI Debug and it reaches "Entering EISC" but never outputs "Acquired ECSX".

Code:
        Method (EISC, 3, NotSerialized)
        {
            \RMDT.PUSH ("Entering EISC")
            Acquire (ECSX, 0xFFFF)
            \RMDT.PUSH ("Acquired ECSX")

Is Acquire known to be problematic!?

Thanks, Harry.

If ECSX is declared with a non-zero SyncLevel... yes.
 
sorry, you had mentioned that in your very first post. Applied the patch and could narrow down further:

Code:
 Method (SNVC, 1, NotSerialized)
        {
            \RMDT.PUSH ("Entering SNVC")
            OperationRegion (WWPR, SystemMemory, SMIB, 0x04)
            Field (WWPR, DWordAcc, Lock, Preserve)
            {
                SCDW,   32
            }


            Store (Arg0, SCDW)
            \RMDT.PUSH ("Exiting SNVC")
        }

It's entering SNVC but never exiting. Is my assumption correct that this 4-byte access has to be patched along the same lines as the other patches?

Thanks, Harry.
 
sorry, you had mentioned that in your very first post. Applied the patch and could narrow down further:

Code:
 Method (SNVC, 1, NotSerialized)
        {
            \RMDT.PUSH ("Entering SNVC")
            OperationRegion (WWPR, SystemMemory, SMIB, 0x04)
            Field (WWPR, DWordAcc, Lock, Preserve)
            {
                SCDW,   32
            }


            Store (Arg0, SCDW)
            \RMDT.PUSH ("Exiting SNVC")
        }

It's entering SNVC but never exiting. Is my assumption correct that this 4-byte access has to be patched along the same lines as the other patches?

Thanks, Harry.

Check into SMIB. SystemMemory fields do not need patching.
 
The patched DSDT shows a value of 0xCAF67000 but ACPIDebug shows {"SMIB =", 0x0, }. How would you diagnose this situation further?

Thanks, Harry.

Code:
    Scope (\)
    {
        Mutex (SMIX, 0x00)
        Name (SMIB, 0xCAF67000)
        Name (PSMI, 0xB2)
        Method (SNVC, 1, NotSerialized)
        {
            \RMDT.PUSH ("Entering SNVC")
            \RMDT.P2 ("SMIB = ", SMIB)
            OperationRegion (WWPR, SystemMemory, SMIB, 0x04)
            \RMDT.PUSH ("OperationRegion WWPR defined")
            Field (WWPR, DWordAcc, Lock, Preserve)
            {
                SCDW,   32
            }


            \RMDT.P2 ("Current value of SCDW =", SCDW)
            \RMDT.P2 ("Storing Arg0 in SCDW ", Arg0)
            Store (Arg0, SCDW)
            \RMDT.PUSH ("Exiting SNVC")
        }
 
The patched DSDT shows a value of 0xCAF67000 but ACPIDebug shows {"SMIB =", 0x0, }. How would you diagnose this situation further?

Thanks, Harry.

Code:
    Scope (\)
    {
        Mutex (SMIX, 0x00)
        Name (SMIB, 0xCAF67000)
        Name (PSMI, 0xB2)
        Method (SNVC, 1, NotSerialized)
        {
            \RMDT.PUSH ("Entering SNVC")
            \RMDT.P2 ("SMIB = ", SMIB)
            OperationRegion (WWPR, SystemMemory, SMIB, 0x04)
            \RMDT.PUSH ("OperationRegion WWPR defined")
            Field (WWPR, DWordAcc, Lock, Preserve)
            {
                SCDW,   32
            }


            \RMDT.P2 ("Current value of SCDW =", SCDW)
            \RMDT.P2 ("Storing Arg0 in SCDW ", Arg0)
            Store (Arg0, SCDW)
            \RMDT.PUSH ("Exiting SNVC")
        }

Something must have set SMIB to Zero. Any Name is read-write, so it can be the target of a Store.
 
[Guide] Native Power Management for Laptops

Hmm, I see. Well I didn't do your battery patch tutorial since I have battery status. Should I still do the patch?

If your DSDT has multi-byte EC fields that are accessed, they need to be patched. You will likely find an existing patch already in the repo.

What is the output of 'kextstat|grep -y acpiplat'?
 
[Guide] Native Power Management for Laptops

If your DSDT has multi-byte EC fields that are accessed, they need to be patched. You will likely find an existing patch already in the repo.

What is the output of 'kextstat|grep -y acpiplat'?

Here you go sir. Forgot to post this.

13 2 0xffffff7f81e70000 0x65000 0x65000 com.apple.driver.AppleACPIPlatform (3.1) <12 11 7 6 5 4 3 1>

Umm, is this normal?
 

Attachments

  • Screen Shot 2015-04-23 at 9.42.47 PM.png
    Screen Shot 2015-04-23 at 9.42.47 PM.png
    244.6 KB · Views: 151
Last edited:
[Guide] Native Power Management for Laptops

Here you go sir. Forgot to post this.

13 2 0xffffff7f81e70000 0x65000 0x65000 com.apple.driver.AppleACPIPlatform (3.1) <12 11 7 6 5 4 3 1>

Correct...

You have only a few fields that need patching...
 
[Guide] Native Power Management for Laptops

Correct...

You have only a few fields that need patching...

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

Attachments

  • Screen Shot 2015-04-23 at 9.42.47 PM.png
    Screen Shot 2015-04-23 at 9.42.47 PM.png
    244.6 KB · Views: 125
Back
Top