Contribute
Register

[GUIDE] Extract and Edit SSDT

Status
Not open for further replies.
Joined
May 17, 2011
Messages
519
Motherboard
GIGABYTE GA-Z68X-UD3P Rev1.3 (F7)
CPU
i5-2500K OC 4.2GHz
Graphics
HD 6850
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
How to extract /edit SSDT for your Intel's Core K CPUs for proper stepping in 10.7.4 (for n00bs):

Let me get a couple things across. I myself knew nothing about this before 10.7.4 brought it to my doorstep. The only reason I am writing this is because this is a process that is not very hard despite it taking me a long time to figure out what to do. All the information is already out there I'm just doing my best to bring it to one place to save others some time. Hope it helps.

Things you will need:

DSDT Editor
Ubuntu or Aida 64 in Windows
USB drive

EXTRACT YOUR SSDT WITH UBUNTU (this is what i did)
In Ubuntu open up terminal and enter the following commands:
cd /home/ubuntu/Desktop
sudo cat /sys/firmware/acpi/tables/SSDT > SSDT.aml

This will place the SSDT.aml on you desktop. Move this to a USB drive and then reboot into OSX.

EXTRACT YOUR SSDT WITH WINDOWS
Download AIDA64 Extreme Edition from the link above.

Click on the bottom left of the window where is says the version number and click on ACPI tool on the drop down screen.
2akfv2s.jpg


Now click on save table and select SSDT from the drop down.
34erm9f.jpg

This will save a copy of the SSDT with a bin extension.
Move to USB then reboot into OSX.
In OSX delete the .bin extension and replace with .aml


FIX YOUR SSDT Errors
Download DSDT Editor and open your SSDT.aml using the application.
2rf3nlh.jpg


There are a few errors that need to be fixed before moving forwards... (found ZERO, required package). Allow the application to find the errors by compiling the SSDT by pressing F5.
35mjpt0.jpg


Now starting from the bottom of the list fix the lines that reveal an error.
For the "found ZERO, requires Package" error change to "Return (Package (Zero) {})"
Ignore the warnings for now.
Compile again make sure that there are no more errors.
snpcvc.jpg


You can now save the SSDT.aml and it should be useable, although you are missing a few P steps: 1100MHz to 1600MHz.


ADD MISSING P-STATES TO SSDT
There are many repeated sections for each of your CPUs cores. The one we will be dealing with is the PSS section. Depending on your CPU and your overclock if you have one this section will vary.

If you scroll to the bottom of this section you will notice that the first number is 1000 and then goes right to 1700.
Code:
 Method (_PSS, 0, NotSerialized)
        {
            If (PSEN)
            {
                Return (Package (0x13)
                {
                    Package (0x06)
                    {
                        0x0F3D, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x2800, 
                        0x2800
                    }, 
                    Package (0x06)
                    {
                        0x0F3C, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x2700, 
                        0x2700
                    }, 
                    Package (0x06)
                    {
                        0x0ED8, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x2600, 
                        0x2600
                    }, 
                    Package (0x06)
                    {
                        0x0E74, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x2500, 
                        0x2500
                    }, 
                    Package (0x06)
                    {
                        0x0E10, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x2400, 
                        0x2400
                    }, 
                    Package (0x06)
                    {
                        0x0DAC, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x2300, 
                        0x2300
                    }, 
                    Package (0x06)
                    {
                        0x0D48, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x2200, 
                        0x2200
                    }, 
                    Package (0x06)
                    {
                        0x0CE4, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x2100, 
                        0x2100
                    }, 
                    Package (0x06)
                    {
                        0x0C80, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x2000, 
                        0x2000
                    }, 
                    Package (0x06)
                    {
                        0x0C1C, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x1F00, 
                        0x1F00
                    }, 
                    Package (0x06)
                    {
                        0x0BB8, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x1E00, 
                        0x1E00
                    }, 
                    Package (0x06)
                    {
                        0x0B54, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x1D00, 
                        0x1D00
                    }, 
                    Package (0x06)
                    {
                        0x0AF0, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x1C00, 
                        0x1C00
                    }, 
                    Package (0x06)
                    {
                        0x0A8C, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x1B00, 
                        0x1B00
                    }, 
                    Package (0x06)
                    {
                        0x0A28, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x1A00, 
                        0x1A00
                    }, 
                    Package (0x06)
                    {
                        0x09C4, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x1900, 
                        0x1900
                    }, 
                    Package (0x06)
                    {
                        0x0960, 
                        0x0003C4D8, 
                        0x0A, 
                        0x0A, 
                        0x1800, 
                        0x1800
                    }, 
                    Package (0x06)
                    {
                        0x08FC, 
                        0x00036B00, 
                        0x0A, 
                        0x0A, 
                        0x1700, 
                        0x1700
                    }, 
                    Package (0x06)
                    {
                        0x0640, 
                        0x00016378, 
                        0x0A, 
                        0x0A, 
                        0x1000, 
                        0x1000
                    }
                })
            }
        }
So the plan is to add the numbers (1100-1600) which are the p states in MHz.

Here are the lines I added to my SSDT:
Code:
Package (0x06)
                    {
                        0x0898, 
                        0x00031510, 
                        0x0A, 
                        0x0A, 
                        0x1600, 
                        0x1600
                    }, 
                    Package (0x06)
                    {
                        0x0834, 
                        0x0002C6F0, 
                        0x0A, 
                        0x0A, 
                        0x1500, 
                        0x1500
                    }, 
                    Package (0x06)
                    {
                        0x07D0, 
                        0x00027CB8, 
                        0x0A, 
                        0x0A, 
                        0x1400, 
                        0x1400
                    }, 
                    Package (0x06)
                    {
                        0x076C, 
                        0x00016378, 
                        0x0A, 
                        0x0A, 
                        0x1300, 
                        0x1300
                    }, 
                    Package (0x06)
                    {
                        0x0708, 
                        0x00016378, 
                        0x0A, 
                        0x0A, 
                        0x1200, 
                        0x1200
                    }, 
                    Package (0x06)
                    {
                        0x06A4, 
                        0x00016378, 
                        0x0A, 
                        0x0A, 
                        0x1100, 
                        0x1100
                    },

Near the begging of each PSS section there is a line of code that sates the total amount of P-states in hexadecimal numbering which will as i said earlier will vary.
e.g. "Return (Package (0x13)"

We will need to increase this number depending on how many P-states we added.

So if you are not familiar with hexadecimal numbering then open you calculator application and set to Programmer Mode, by pressing ?3.

Press the 16 button on the calculator and enter the Return package number.
0x13
Then press the 10 button to convert it to the common numbering system.
19
Add the amount of P states you added to that number
19+6=25
Then Press 16 to convert back to hexadecimal
0x19

This is what ms PSS section looked like after adding the missing packages:
Code:
Method (_PSS, 0, NotSerialized)
        {
            If (PSEN)
            {
                Return (Package (0x19)
                {
                    Package (0x06)
                    {
                        0x0FA0, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x2800, 
                        0x2800
                    }, 
                    Package (0x06)
                    {
                        0x0F3C, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x2700, 
                        0x2700
                    }, 
                    Package (0x06)
                    {
                        0x0ED8, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x2600, 
                        0x2600
                    }, 
                    Package (0x06)
                    {
                        0x0E74, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x2500, 
                        0x2500
                    }, 
                    Package (0x06)
                    {
                        0x0E10, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x2400, 
                        0x2400
                    }, 
                    Package (0x06)
                    {
                        0x0DAC, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x2300, 
                        0x2300
                    }, 
                    Package (0x06)
                    {
                        0x0D48, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x2200, 
                        0x2200
                    }, 
                    Package (0x06)
                    {
                        0x0CE4, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x2100, 
                        0x2100
                    }, 
                    Package (0x06)
                    {
                        0x0C80, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x2000, 
                        0x2000
                    }, 
                    Package (0x06)
                    {
                        0x0C1C, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x1F00, 
                        0x1F00
                    }, 
                    Package (0x06)
                    {
                        0x0BB8, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x1E00, 
                        0x1E00
                    }, 
                    Package (0x06)
                    {
                        0x0B54, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x1D00, 
                        0x1D00
                    }, 
                    Package (0x06)
                    {
                        0x0AF0, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x1C00, 
                        0x1C00
                    }, 
                    Package (0x06)
                    {
                        0x0A8C, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x1B00, 
                        0x1B00
                    }, 
                    Package (0x06)
                    {
                        0x0A28, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x1A00, 
                        0x1A00
                    }, 
                    Package (0x06)
                    {
                        0x09C4, 
                        0x000493E0, 
                        0x0A, 
                        0x0A, 
                        0x1900, 
                        0x1900
                    }, 
                    Package (0x06)
                    {
                        0x0960, 
                        0x0003C4D8, 
                        0x0A, 
                        0x0A, 
                        0x1800, 
                        0x1800
                    }, 
                    Package (0x06)
                    {
                        0x08FC, 
                        0x00036B00, 
                        0x0A, 
                        0x0A, 
                        0x1700, 
                        0x1700
                    }, 
                    Package (0x06)
                    {
                        0x0898, 
                        0x00031510, 
                        0x0A, 
                        0x0A, 
                        0x1600, 
                        0x1600
                    }, 
                    Package (0x06)
                    {
                        0x0834, 
                        0x0002C6F0, 
                        0x0A, 
                        0x0A, 
                        0x1500, 
                        0x1500
                    }, 
                    Package (0x06)
                    {
                        0x07D0, 
                        0x00027CB8, 
                        0x0A, 
                        0x0A, 
                        0x1400, 
                        0x1400
                    }, 
                    Package (0x06)
                    {
                        0x076C, 
                        0x00016378, 
                        0x0A, 
                        0x0A, 
                        0x1300, 
                        0x1300
                    }, 
                    Package (0x06)
                    {
                        0x0708, 
                        0x00016378, 
                        0x0A, 
                        0x0A, 
                        0x1200, 
                        0x1200
                    }, 
                    Package (0x06)
                    {
                        0x06A4, 
                        0x00016378, 
                        0x0A, 
                        0x0A, 
                        0x1100, 
                        0x1100
                    }, 
                    Package (0x06)
                    {
                        0x0640, 
                        0x00016378, 
                        0x0A, 
                        0x0A, 
                        0x1000, 
                        0x1000
                    }
                })
            }
        }

Now you are done for one core. You must repeat this for all the cores. So 3 more times as in the case of my 2500K.

After completing this for each section compile again and save.

Drop your SSDT.aml into your Extra folder and you should have proper P-stepping in 10.7.4 :thumbup: :D :thumbup:
 
Joined
Aug 26, 2011
Messages
7
Motherboard
GA-Z68MX-UD2H-B3 rev. 1.0 UEFI U1c
CPU
Core i7 2600
Graphics
Sapphire Radeon HD 6850
Mac
  1. MacBook
Classic Mac
Mobile Phone
  1. iOS
Very nice guide, thanks!

For those who would like to dump all ACPI tables from Ubuntu, here is a little snippet that does the trick with the latest Ubuntu live CD (12.04).

Prerequisites: You need the package 'acpidump'. To install this, proceed as follows:
Open Terminal (e.g. from the Dash shell by typing Terminal)
Become root:
Code:
sudo -s
Enable the 'universe' repository by running
Code:
software-properties-gtk
and ticking the check box and then clicking 'Close'.
Now install 'acpidump' by running
Code:
apt-get update && apt-get install acpidump
Finally, copy and paste the following snippet into the Terminal window and run it.
Code:
ID="ACPI-`dmidecode | sed -n s'/.*Product Name: *\(.*\)/\1/p'|head -1`"; mkdir -p /tmp/ACPI && cd /tmp/ACPI && dmesg | perl -we '$n=0; while (<>) { if (($t,$a,$l,$o) = (/^[^a-zA-Za-z]*ACPI: ([-._A-Za-z0-9]{4,4}) +([0-9A-Fa-f]{8,16})[^(]* ([0-9A-Fa-f]{4,8})+(?:\s*\(([^)]+))?/)) { $o && $o=~s/[^-._a-zA-Za-z0-9]+/-/g; ($cmd="acpidump -a $a -l $l > \"${t}".($o?"_$o":"").".aml\""); system($cmd); ++$n; } } die("No match") unless $n;'; [ -f DSDT*.aml ] && zip -r "$HOME/$ID".zip *
After this, you should find a file called 'ACPI-<NAME OF YOUR BOARD>.zip' in the home directory of the current user ('ubuntu').
 
Joined
Apr 9, 2011
Messages
87
Motherboard
Asus P8Z68 Deluxe
CPU
2600K
Graphics
GTX480
Mac
Classic Mac
Mobile Phone
What if Aida64 finds multiple SSDT files? I have six of them? Which one or all do you choose?

Thanks
 
Joined
May 17, 2011
Messages
519
Motherboard
GIGABYTE GA-Z68X-UD3P Rev1.3 (F7)
CPU
i5-2500K OC 4.2GHz
Graphics
HD 6850
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
davidm71 said:
What if Aida64 finds multiple SSDT files?

SSDT1 works for most people with your situation
 
Joined
Apr 9, 2011
Messages
87
Motherboard
Asus P8Z68 Deluxe
CPU
2600K
Graphics
GTX480
Mac
Classic Mac
Mobile Phone
My ssdt cpu section is close to your example but strangely unfamilar. Does this look right or did I pull the wrong ssdt?

Code:
Scope (\_PR.CPU0)
    {
        Name (C1LM, Package (0x04)
        {
            ResourceTemplate ()
            {
                Register (FFixedHW, 
                    0x01,               // Bit Width
                    0x02,               // Bit Offset
                    0x0000000000000000, // Address
                    0x01,               // Access Size
                    )
            }, 

            One, 
            One, 
            0x03E8
        })
 
Joined
Dec 11, 2010
Messages
170
Motherboard
Z170X Gaming 5
CPU
i7 6700k
Graphics
RX580
Mac
  1. iMac
Mobile Phone
  1. iOS
:?
I booted into Windows and extracted with AIDA64
Mine looks like this:

Code:
DefinitionBlock ("SSDT.aml", "SSDT", 1, "AMICPU", "PROC", 0x00000001)
{
    External (\_PR_.OSC_, IntObj)
    External (\_PR_.PDC_, MethodObj)    // 1 Arguments
    Scope (\_PR)
    {
        Processor (P000, 0x01, 0x00000410, 0x06)
        {
            Method (_PDC, 1, NotSerialized)
            {
                \_PR.PDC (Arg0)
            }
            Method (_OSC, 4, NotSerialized)
            {
                Return (\_PR.OSC)
                Arg0
                Arg1
                Arg2
                Arg3
            }
        }
        Processor (P001, 0x02, 0x00000410, 0x06)
        {
            Method (_PDC, 1, NotSerialized)
            {
                \_PR.PDC (Arg0)
            }
            Method (_OSC, 4, NotSerialized)
            {
                Return (\_PR.OSC)
                Arg0
                Arg1
                Arg2
                Arg3
            }
        }
        Processor (P002, 0x03, 0x00000410, 0x06)
        {
            Method (_PDC, 1, NotSerialized)
            {
                \_PR.PDC (Arg0)
            }
            Method (_OSC, 4, NotSerialized)
            {
                Return (\_PR.OSC)
                Arg0
                Arg1
                Arg2
                Arg3
            }
        }
        Processor (P003, 0x04, 0x00000410, 0x06)
        {
            Method (_PDC, 1, NotSerialized)
            {
                \_PR.PDC (Arg0)
            }
            Method (_OSC, 4, NotSerialized)
            {
                Return (\_PR.OSC)
                Arg0
                Arg1
                Arg2
                Arg3
            }
        }
        Processor (P004, 0x05, 0x00000410, 0x06)
        {
            Method (_PDC, 1, NotSerialized)
            {
                \_PR.PDC (Arg0)
            }
            Method (_OSC, 4, NotSerialized)
            {
                Return (\_PR.OSC)
                Arg0
                Arg1
                Arg2
                Arg3
            }
        }
        Processor (P005, 0x06, 0x00000410, 0x06)
        {
            Method (_PDC, 1, NotSerialized)
            {
                \_PR.PDC (Arg0)
            }
            Method (_OSC, 4, NotSerialized)
            {
                Return (\_PR.OSC)
                Arg0
                Arg1
                Arg2
                Arg3
            }
        }
        Processor (P006, 0x07, 0x00000410, 0x06)
        {
            Method (_PDC, 1, NotSerialized)
            {
                \_PR.PDC (Arg0)
            }
            Method (_OSC, 4, NotSerialized)
            {
                Return (\_PR.OSC)
                Arg0
                Arg1
                Arg2
                Arg3
            }
        }
        Processor (P007, 0x08, 0x00000410, 0x06)
        {
            Method (_PDC, 1, NotSerialized)
            {
                \_PR.PDC (Arg0)
            }
            Method (_OSC, 4, NotSerialized)
            {
                Return (\_PR.OSC)
                Arg0
                Arg1
                Arg2
                Arg3
            }
        }
    }
}
By default The extracted table has 8 syntax errors and 8 warnings.
Deleting the errors causes 8 more errors lol and so on until there's nothing left.
I don't know what I'm looking at, so I can't contribute any wisdom here.
 
Joined
Feb 26, 2011
Messages
365
CPU
i7 2600K @ 4.8ghz
Graphics
560 Ti
Mac
  1. MacBook Air
Classic Mac
  1. PowerBook
Mobile Phone
  1. iOS
Titsmgee,

Thanks for the guide (never noticed the SSDT button in Aida64, though ubuntu was 3 SSDT's rather than 6 from Aida64...). Good to have clear info on this!

Regardless, mind taking a look at mine, it makes no sense compared to every SSDT.aml I've seen on this board, it's almost as if it's malformed to begin with? The P-States are only defined for CPU0 in SSDT2 but it seemingly has other definitions shoved in the middle of it and not in any order at all.

I know it takes a lot of time–not looking for edits per-say just what the heck to do lol. Seriously it's a strange SSDT!
 

Attachments

  • SSDTs.zip
    2.3 KB · Views: 244
Joined
May 17, 2011
Messages
519
Motherboard
GIGABYTE GA-Z68X-UD3P Rev1.3 (F7)
CPU
i5-2500K OC 4.2GHz
Graphics
HD 6850
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
philz said:
Titsmgee,

Thanks for the guide (never noticed the SSDT button in Aida64, though ubuntu was 3 SSDT's rather than 6 from Aida64...). Good to have clear info on this!

Regardless, mind taking a look at mine, it makes no sense compared to every SSDT.aml I've seen on this board, it's almost as if it's malformed to begin with? The P-States are only defined for CPU0 in SSDT2 but it seemingly has other definitions shoved in the middle of it and not in any order at all.

I know it takes a lot of time–not looking for edits per-say just what the heck to do lol. Seriously it's a strange SSDT!

your SSDT 2 has the PSS section in it with all your stepping information and that is really all you need to worry about in most cases

EDIT: i should not say ALL your stepping information because you are missing a few p-states such as 1700. so the section does need to be patched but i would work with that one for sure
 
Status
Not open for further replies.
Top