Contribute
Register

SSDT generation script (Ivybridge PM)

Status
Not open for further replies.
Tested the latest version of the script (1.5) for my i7-3770 like this:

Code:
./bash-3.2$ ./ssdtPRGen.sh 77 3900 1

Got this message: Warning: cpu-type may be set improperly (0x0701 instead of 0x0704)
No ACST errors like the SSDT from this post, but my CPU stuck at x8.
 
Tested the latest version of the script (1.5) for my i7-3770 like this:

Code:
./bash-3.2$ ./ssdtPRGen.sh 77 3900 1

Got this message: Warning: cpu-type may be set improperly (0x0701 instead of 0x0704)
No ACST errors like the SSDT from this post, but my CPU stuck at x8.
No errors is good. Thank you for this confirmation. And the warning you got is explained below:

0x0N01 is used by first generation Intel Core Technology processors
0x0N02 is used by the second generation Intel Core Technology processors
0x0N04 is used by the third generation Intel Core Technology processors

This kind of checks were added to make people aware of possible setup/configuration errors.

About being stuck at 800 MHz. That is most likely some stupid index error. One that we have to locate/solve a.s.a.p.
 
Tested script on Ivy-Bridge mobile platform i3-3110M. Adjusted baseFrequency first to 1100. Also was getting stuck at 800MHz. After removing "plugin-type" patch from DSDT (CPU0), it started working. Getting only 3 P-States 12 22 and 24. IORegistryExplorer shows 17 P-States.
 
Interesting. Can you use Name (APLF, 0x05) without lowering the max turbo speed? That should give you 1100MHz, but when you need to lower the max turbo multiplier in the BIOS first, then there may be a range limit defined somewhere in the source code.

Seems like APLF works the other way.
With APLF 0x04 I got lowest freq of 1200 MHz
With APLF 0x05 I got 1300 MHz
With APLF 0x03 I got 1100 MHz
With APLF 0x02 I got 1000 MHz
With APLF 0x01 I got 900 MHz
APLF 0x00 should give 800 MHz but kernel panics

I haven't to change anything in the BIOS, but as I set max multiplicator for 1 or 2 Core activation to 42x, 3 Core activation to 41x and 4 Core activation to 40x,
I ran your script with ./ssdtPRGen.sh 77 4200 1

Without duplicating an entry, I tested with lowest and highest only, CPU is stuck at 800 MHz.

{
Package (0x06)
{
0x1068,
0x00012CC8,
0x0A,
0x0A,
0x2A00,
0x2A00
},

Package (0x06)
{
0x1004,
0x00012CC8,
0x0A,
0x0A,
0x2900,
0x2900
},

...

{
Package (0x06)
{
0x1068,
0x00012CC8,
0x0A,
0x0A,
0x2A00,
0x2A00
},
Package (0x06)
{
0x1068,
0x00012CC8,
0x0A,
0x0A,
0x2A00,
0x2A00
},

Package (0x06)
{
0x1004,
0x00012CC8,
0x0A,
0x0A,
0x2900,
0x2900
},
...

or


Package (0x06)
{
0x0384,
Zero,
0x0A,
0x0A,
0x0900,
0x0900
},

Package (0x06)
{
0x0320,
Zero,
0x0A,
0x0A,
0x0800,
0x0800
}
})

….

Package (0x06)
{
0x0384,
Zero,
0x0A,
0x0A,
0x0900,
0x0900
},
Package (0x06)
{
0x0320,
Zero,
0x0A,
0x0A,
0x0800,
0x0800
},
Package (0x06)
{
0x0320,
Zero,
0x0A,
0x0A,
0x0800,
0x0800
}
})

With duplicated entry everything works.
Jan 25 12:53:31 localhost kernel[0]: MSRDumper CoreMulti(9)
Jan 25 12:53:31 localhost kernel[0]: MSRDumper PStatesReached: 9 16 22 29 35 39 40 41 42
 
Seems like APLF works the other way.With APLF 0x04 I got lowest freq of 1200 MHz
With APLF 0x05 I got 1300 MHz
With APLF 0x03 I got 1100 MHz
With APLF 0x02 I got 1000 MHz
With APLF 0x01 I got 900 MHz
APLF 0x00 should give 800 MHz but kernel panics
Sorry. It was rather late when I wrote that. Was tired and got confused. But you basically confirmed that 0x08 gives you, or should give you 1600 MHz. Meaning that the script is right. And since you are using a desktop processor, that is exactly what you should see (16) with MSRDumper. Anything lower than 1600 is simply not supported. MSRDumper only lists the register value, but that doesn't mean that the actual transition did take place. Not going to happen when (MSR_PLATFORM_INFO) >> 40) gives the driver 0x1000 (1600 MHz).

Take a look at the value of property CPUMaxEfficientPState in IORegistryExplorer and you'll find it pointing to the P-State with the lowest possible P-State (read frequency) that your processor supports (again, 1600 MHz). And this logic is true for every single Ivybridge based Mac dump I have seen so far. Sure. The frequency may be lower for some processors, but CPUMaxEfficientPState will point to the lowest possible P-State it can reach.

Now look at CPUMaxNonTurboPState. This value points to the P-State with the normal operating clock speed (frequency) of the installed processor. In your case, with your Intel i7-3770K that should be 3500 MHz.

The problem with the required extra/duplicated P-State may be caused by an index problem, or that the driver expect some other value which it isn't getting. My suggestion for now would be to try Name (APLF, 0x09) to see if that helps. Or maybe to not inject APLF at all.

I'm also looking at this:

Code:
[FONT=Menlo]        OperationRegion (PPMT, SystemMemory, <0xnnnnnnn>, 0x0029)[/FONT]
[FONT=Menlo]        Field (PPMT, AnyAcc, Lock, Preserve)[/FONT]
[FONT=Menlo]        {[/FONT]
[FONT=Menlo]            PGRV,   8, [/FONT]
[FONT=Menlo]                    Offset (0x06), [/FONT]
[FONT=Menlo]            ACRT,   8, [/FONT]
[FONT=Menlo]            APSV,   8, [/FONT]
[FONT=Menlo]            AAC0,   8, [/FONT]
[FONT=Menlo]            CPID,   32, [/FONT]
[FONT=Menlo]            CPPC,   8, [/FONT]
[FONT=Menlo]            CCTP,   8, [/FONT]
[FONT=Menlo]            CLVL,   8, [/FONT]
[FONT=Menlo]            CBMI,   8, [/FONT]
[FONT=Menlo]            PL10,   16, [/FONT]
[FONT=Menlo]            PL20,   16, [/FONT]
[FONT=Menlo]            PLW0,   8, [/FONT]
[FONT=Menlo]            CTC0,   8, [/FONT]
[FONT=Menlo]            TAR0,   8, [/FONT]
[FONT=Menlo]            PPC0,   8, [/FONT]
[FONT=Menlo]            PL11,   16, [/FONT]
[FONT=Menlo]            PL21,   16, [/FONT]
[FONT=Menlo]            PLW1,   8, [/FONT]
[FONT=Menlo]            CTC1,   8, [/FONT]
[FONT=Menlo]            TAR1,   8, [/FONT]
[FONT=Menlo]            PPC1,   8, [/FONT]
[FONT=Menlo]            PL12,   16, [/FONT]
[FONT=Menlo]            PL22,   16, [/FONT]
[FONT=Menlo]            PLW2,   8, [/FONT]
[FONT=Menlo]            CTC2,   8, [/FONT]
[FONT=Menlo]            TAR2,   8, [/FONT]
[FONT=Menlo]            PPC2,   8[/FONT]
[FONT=Menlo]        }[/FONT]

For example: CPPC is a number representing the turbo ratio's.
 
According to Intel's technical documentation or from looking at officially supported configurations (Ivy Bridge Macs, Ivy Bridge PCs running Windows or Linux)
Desktop Ivy Bridge parts are meant running frequencies 1600 MHz upwards, going as low as 800 MHz is reserved for Mobile parts.

With "missing" P-State entry I can lock the CPU at 800 MHz, via BIOS Settings I can lock the CPU at the lowest multiplicator x16, 1600 MHz.
According to Geekbench, Novabench CPU is at 1600 MHz roughly twice as fast as at 800 MHz.

As I haven't found a way to lock the CPU at frequencies from 900 to 1500 MHz, I can't say whether Desktop Ivy Bridge parts can have working SpeedStep/TurboBoost and lower idle frequencies than those official 1600 MHz.

For my part I've everything like I want with small modifications to your generated SSDT table.
(APLF 0x08 for idle speed of 1600 MHz, APSN 0x04 for four turbo states and duplicated entry for not being stucj at 800 MHz)
 
First of all thx for the updated script, here is my feedback.
I am trying it on a mobile ivy bridge i5-3220m that should have 12x as the min p-state 26x as max not turbo and 33x as max turbo.
With the script ./ssdtPRGen.sh 35 3300 1, i get the lowest p-state set at 16x if i set the APFL to "0x04" i get the following p-states according to MSRDumper: 12 22 26 28 30 31 33, there is a big gap between 12-22x and it looks like my cpu is treated as a desktop variant. Any ideas why?
 
Can someone explain this process to compile a SSDT using the executable script? I don't understand how to run it, where do I insert ./ssdtPRGen.sh 77 4200 1

Or do I need to run something in terminal to direct it to the shell commands. I am new to this. Sorry for the simple questions.
 
First of all thx for the updated script, here is my feedback.I am trying it on a mobile ivy bridge i5-3220m that should have 12x as the min p-state 26x as max not turbo and 33x as max turbo.
With the script ./ssdtPRGen.sh 35 3300 1, i get the lowest p-state set at 16x if i set the APFL to "0x04" i get the following p-states according to MSRDumper: 12 22 26 28 30 31 33, there is a big gap between 12-22x and it looks like my cpu is treated as a desktop variant. Any ideas why?
First of. You don't have to duplicate a P-State? And there is this line at the top of the script:

baseFrequency=1500

Change that to 1100 (like it says, 1200-100) and try again.

I have to figure out where I can get this value from, or at least add another optional argument to override this value.
 
Status
Not open for further replies.
Back
Top