Contribute
Register

Help on dropping SSDTs

Status
Not open for further replies.
Guide To Install Mavericks with Clover Bootloader

Ok, I did as you told me and added some debug statements at the beginning and the end of those 2 methods accessing the External variable declared on the DSDT. After some testing I discovered that dropping SSDT-1 (Cpu0Ist) made these to abort before finishing. So right now I am dropping all SSDTs and using only Pike's SSDT + SSDT-1 in the Clover's patched folder.

But I don't know if this was an optimal solution. Maybe I should have dropped Cpu0Ist to avoid conflicts with Pike's SSDT, or copy "what matters" so that I avoid the DSDT methods abortion. Another possibility might be to erase on the DSDT whatever involves that external variable.

What do you think?

Attaching here original SSDT-1 and custom SSDT, just in case.

If it were me, I'd probably edit the _WAK/_PTS methods such that they don't access that SSDT...
 
Guide To Install Mavericks with Clover Bootloader

If it were me, I'd probably edit the _WAK/_PTS methods such that they don't access that SSDT...

How about delete all External lines, then fixes (remove) all the errors?
 
Guide To Install Mavericks with Clover Bootloader

How about delete all External lines, then fixes (remove) all the errors?

Probably not wise to delete all Externals. Newer computers have lots of Externals to the graphics SSDTs and in those cases you want to include the SSDTs in your ACPI/patched.

Once you determine that a specific External reference is to an SSDT that you'd like to remove, then yes, remove the External and let the compiler find the code that needs attention via the error report.
 
Guide To Install Mavericks with Clover Bootloader

If it were me, I'd probably edit the _WAK/_PTS methods such that they don't access that SSDT...
Actually the _WAK method successfully completes without the SSDT, there's only a part of it (inside an If statement) that would access that External and it doesn't seem to even get into that part. I've put statements on the beginning and the end of _WAK, and also the beginning and end of the part containing the External, but only the _WAK ones are called. So I'd say it's safe to remove it, as it's useless.

The other method that accesses that External is called SPPC, and this is the one that begins but doesn't finish without the SSDT. This method seems to get loaded when the CPU is running at a higher frequency... It always loads during boot, and if I don't do anything "heavy", it won't get called anymore. However, after running Geekbench for example, it does get called a few times. So right now I'm not very comfortable about just removing it. Anyway, I got nearly the same score on Geekbench with and without the SSDT (i.e. finishing and not finishing SPPC Method).

Do you still believe it's better to remove it?
 
Guide To Install Mavericks with Clover Bootloader

Actually the _WAK method successfully completes without the SSDT, there's only a part of it (inside an If statement) that would access that External and it doesn't seem to even get into that part. I've put statements on the beginning and the end of _WAK, and also the beginning and end of the part containing the External, but only the _WAK ones are called. So I'd say it's safe to remove it, as it's useless.

The other method that accesses that External is called SPPC, and this is the one that begins but doesn't finish without the SSDT. This method seems to get loaded when the CPU is running at a higher frequency... It always loads during boot, and if I don't do anything "heavy", it won't get called anymore. However, after running Geekbench for example, it does get called a few times. So right now I'm not very comfortable about just removing it. Anyway, I got nearly the same score on Geekbench with and without the SSDT (i.e. finishing and not finishing SPPC Method).

Do you still believe it's better to remove it?

I can't tell from here, as I'm not looking at your DSDT...

I expect the references in _WAK were protected by a test of CondRefOf.
 
Guide To Install Mavericks with Clover Bootloader

I can't tell from here, as I'm not looking at your DSDT...

I expect the references in _WAK were protected by a test of CondRefOf.
This is the part in _WAK using the External \_PR.CPU0._PPC. It doesn't get past the first If. (CFGD is also External but it doesn't get there anyway)
Code:
        If (LOr (LEqual (Arg0, 0x03), LEqual (Arg0, 0x04)))        {
            Store (Arg0, \_SB.RTYP)
            If (LAnd (DTSE, LGreater (TCNT, One)))
            {
                TRAP (TRTD, 0x14)
            }


            If (LEqual (OSYS, 0x07D2))
            {
                If (And ([B]CFGD[/B], One))
                {
                    If (LGreater (\_PR.CPU0._PPC, Zero))
                    {
                        Subtract (\_PR.CPU0._PPC, One, \_PR.CPU0._PPC)
                        PNOT ()
                        Add (\_PR.CPU0._PPC, One, \_PR.CPU0._PPC)
                        PNOT ()
                    }
                    Else
                    {
                        Add (\_PR.CPU0._PPC, One, \_PR.CPU0._PPC)
                        PNOT ()
                        Subtract (\_PR.CPU0._PPC, One, \_PR.CPU0._PPC)
                        PNOT ()
                    }
                }
            }
And this is the SPPC Method:
Code:
    Method (SPPC, 0, NotSerialized)
    {
        Add (\_SB.PPCM, One, \_SB.NIST)
        Store (Zero, \_SB.PPCS)
        Store (\_SB.PPCS, \_PR.CPU0._PPC)
        If (LEqual (\_SB.GSSR, One))
        {
            If (LEqual (\_SB.TZON, One))
            {
                Store (One, \_SB.PPCS)
                Subtract (\_SB.PPCM, \_SB.PPCS, \_SB.NIST)
                Increment (\_SB.NIST)
                Store (\_SB.PPCS, \_PR.CPU0._PPC)
            }


            If (LEqual (\_SB.TZON, 0x02))
            {
                Divide (\_SB.PPCM, 0x02, Local1, Local2)
                If (LNotEqual (Local1, Zero))
                {
                    Increment (Local2)
                }


                Store (Local2, \_SB.PPCS)
                Subtract (\_SB.PPCM, \_SB.PPCS, \_SB.NIST)
                Increment (\_SB.NIST)
                Store (\_SB.PPCS, \_PR.CPU0._PPC)
            }


            If (LEqual (\_SB.TZON, 0x03))
            {
                Store (\_SB.PPCM, \_SB.PPCS)
                Store (One, \_SB.NIST)
                Store (\_SB.PPCS, \_PR.CPU0._PPC)
            }
        }


        If (LEqual (\_SB.GSSR, 0x02))
        {
            Subtract (\_SB.PPCM, \_SB.RIST, \_SB.PPCS)
            Store (\_SB.PPCS, \_PR.CPU0._PPC)
        }
    }
I don't know if that tells you anything though... So I'm attaching the DSDT I use in the patched folder, just in case. The compiler warnings and remarks are all fixed by Clover.
 

Attachments

  • DSDT_mgbt2.zip
    13.7 KB · Views: 64
Guide To Install Mavericks with Clover Bootloader

This is the part in _WAK using the External \_PR.CPU0._PPC. It doesn't get past the first If. (CFGD is also External but it doesn't get there anyway)
Code:
        If (LOr (LEqual (Arg0, 0x03), LEqual (Arg0, 0x04)))        {
            Store (Arg0, \_SB.RTYP)
            If (LAnd (DTSE, LGreater (TCNT, One)))
            {
                TRAP (TRTD, 0x14)
            }


            If (LEqual (OSYS, 0x07D2))
            {
                If (And ([B]CFGD[/B], One))
                {
                    If (LGreater (\_PR.CPU0._PPC, Zero))
                    {
                        Subtract (\_PR.CPU0._PPC, One, \_PR.CPU0._PPC)
                        PNOT ()
                        Add (\_PR.CPU0._PPC, One, \_PR.CPU0._PPC)
                        PNOT ()
                    }
                    Else
                    {
                        Add (\_PR.CPU0._PPC, One, \_PR.CPU0._PPC)
                        PNOT ()
                        Subtract (\_PR.CPU0._PPC, One, \_PR.CPU0._PPC)
                        PNOT ()
                    }
                }
            }

If it doesn't get past the first if:
Code:
If (LOr (LEqual (Arg0, 0x03), LEqual (Arg0, 0x04)))        {

... then Arg0 is never 3 or 4, which probably indicates you're lacking this the "Fix _WAK Arg0 v2" patch: https://github.com/RehabMan/Laptop-DSDT-Patch. You can read about the patch in the comments.

And this is the SPPC Method:
Code:
    Method (SPPC, 0, NotSerialized)
    {
        Add (\_SB.PPCM, One, \_SB.NIST)
        Store (Zero, \_SB.PPCS)
        Store (\_SB.PPCS, \_PR.CPU0._PPC)
        If (LEqual (\_SB.GSSR, One))
        {
            If (LEqual (\_SB.TZON, One))
            {
                Store (One, \_SB.PPCS)
                Subtract (\_SB.PPCM, \_SB.PPCS, \_SB.NIST)
                Increment (\_SB.NIST)
                Store (\_SB.PPCS, \_PR.CPU0._PPC)
            }


            If (LEqual (\_SB.TZON, 0x02))
            {
                Divide (\_SB.PPCM, 0x02, Local1, Local2)
                If (LNotEqual (Local1, Zero))
                {
                    Increment (Local2)
                }


                Store (Local2, \_SB.PPCS)
                Subtract (\_SB.PPCM, \_SB.PPCS, \_SB.NIST)
                Increment (\_SB.NIST)
                Store (\_SB.PPCS, \_PR.CPU0._PPC)
            }


            If (LEqual (\_SB.TZON, 0x03))
            {
                Store (\_SB.PPCM, \_SB.PPCS)
                Store (One, \_SB.NIST)
                Store (\_SB.PPCS, \_PR.CPU0._PPC)
            }
        }


        If (LEqual (\_SB.GSSR, 0x02))
        {
            Subtract (\_SB.PPCM, \_SB.RIST, \_SB.PPCS)
            Store (\_SB.PPCS, \_PR.CPU0._PPC)
        }
    }
I don't know if that tells you anything though... So I'm attaching the DSDT I use in the patched folder, just in case. The compiler warnings and remarks are all fixed by Clover.

Search the rest of the DSDT to see where that method may be called from...
 
Guide To Install Mavericks with Clover Bootloader

which probably indicates you're lacking this the "Fix _WAK Arg0 v2" patch: https://github.com/RehabMan/Laptop-DSDT-Patch. You can read about the patch in the comments.
Nice one! But even after patching, the behavior is the same:
Code:
ACPIDebug: "Enter _WAK"
ACPIDebug: "Exit _WAK"
(it should print other statements in between, as you can see from my debug DSDT)

Search the rest of the DSDT to see where that method may be called from...
Yeah I had done that but this time I was smarter and added debug statements to see where it was definitely being called from. During boot:
Code:
ACPIDebug: "_REG (1) calling SPPC"
ACPIDebug: "Enter SPPC"
ACPIDebug: "Exit SPPC"
And when it gets too hot like while running Geekbench:
Code:
ACPIDebug: "CPRN calling SPPC"
ACPIDebug: "Enter SPPC"
ACPIDebug: "Exit SPPC"
Attaching my new debug DSDT (with your _WAK patch) so that you can see where these statements are.
 

Attachments

  • DSDT_mgbt2.zip
    13.8 KB · Views: 85
Guide To Install Mavericks with Clover Bootloader

Nice one! But even after patching, the behavior is the same:
Code:
ACPIDebug: "Enter _WAK"
ACPIDebug: "Exit _WAK"
(it should print other statements in between, as you can see from my debug DSDT)

Your _WAK only prints something if OSYS==0x7D2:
Code:
            If (LEqual (OSYS, 0x07D2))
            {
                \RMDT.P1 ("Enter _WAK : CFGD")

There is no debug trace just for the "If (LOr (LEqual (Arg0, 0x03), LEqual (Arg0, 0x04)))"

Yeah I had done that but this time I was smarter and added debug statements to see where it was definitely being called from. During boot:
Code:
ACPIDebug: "_REG (1) calling SPPC"
ACPIDebug: "Enter SPPC"
ACPIDebug: "Exit SPPC"
And when it gets too hot like while running Geekbench:
Code:
ACPIDebug: "CPRN calling SPPC"
ACPIDebug: "Enter SPPC"
ACPIDebug: "Exit SPPC"
Attaching my new debug DSDT (with your _WAK patch) so that you can see where these statements are.

See... now you need to know what calls CPRN... And it goes on on and on...

Note: this is way off-topic... Time for me to move these to a new thread. Got a preference on title?
 
Guide To Install Mavericks with Clover Bootloader

Note: this is way off-topic... Time for me to move these to a new thread. Got a preference on title?
Can you select posts and move them to a new thread?
Hmm maybe: Help on dropping SSDTs
 
Status
Not open for further replies.
Back
Top