Jump to content

DSDT - Vanilla Speedstep - Generic Scope (_PR)


  • Please log in to reply
1945 replies to this topic

#21
FKA

FKA

    are we there yet?

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,626 posts
  • Gender:Male

I don't have Leopard anymore... Odd thing is, there are only 2 P-States in my SSDT, CPU-I reports three. I guess these tools need to be adapted to Snow Leopard.
Do you know other Tools than CPU-I, CPU-X or MSR which report the ACTUAL CPU frequency?


I think you have the sum total of CPU tools (bar coolbook but that didn't work at all for me.)

Have you edited the PSS values found in your SSDT table - This is where you need to do some research!

You need to find how many p-states your CPU supports, you then have to calculate or work out by trail and error suitable vCore vlaues for each multi setting. This way you can then calculate you fid and vid values. These values then need to be converted into Hex and added to the tables

Read my first post - read the links in the post!

D.

#22
ApexDE

ApexDE

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 217 posts
You are right. I had two Sets of PSS Tables. One named SPSS and another named NPSS. One had the right Values in the last two lines, the other one didn't. The Two sets NPSS and SPSS differ in busmaster latency.
After adapting the last two lines, CPU-I is showing frequency switching depending on CPU load.

Thanks, dumb error. But after reading so many assembler code, your eyes fool you :->

#23
FKA

FKA

    are we there yet?

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,626 posts
  • Gender:Male

You are right. I had two Sets of PSS Tables. One named SPSS and another named NPSS. One had the right Values in the last two lines, the other one didn't. The Two sets NPSS and SPSS differ in busmaster latency.
After adapting the last two lines, CPU-I is showing frequency switching depending on CPU load.

Thanks, dumb error. But after reading so many assembler code, your eyes fool you :->


Tell me about it!
And yes the Npss and SPSS got me at first too.

Glad you got it sorted ;)
D

#24
ApexDE

ApexDE

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 217 posts
Yes, vanilla speedstepping at last :)

What about that Windows Tool Everest? Maybe we can get the CST Memory Values using that Tool? I'll try that out later this evening.

#25
FKA

FKA

    are we there yet?

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,626 posts
  • Gender:Male

Yes, vanilla speedstepping at last :)

What about that Windows Tool Everest? Maybe we can get the CST Memory Values using that Tool? I'll try that out later this evening.


I get the same tables with Everest as I do with Ubuntu Live and acpidump but let me know how you go.

Tip - If you are going to add more p-states remember to increase the 'package' value accordingly.
0x03, ...0x04 etc etc ..

D.

#26
jinnggoff

jinnggoff

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 133 posts
  • Gender:Male
  • Location:hackintosh
Hi just for info....
If AppleLPC.kext is loading, can reduce cpu temperature.....
if is not loading, you can check in lspci for example
00:1f.0 ISA bridge [0601]: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge [8086:27b8] (rev 01)
and add device id and vendor id in applelpc.kext/contents/info.plist for example
<string>AppleLPC</string>
			<key>IONameMatch</key>
			<array>
				<string>pci8086,27b8</string> //--this add vendor id
				<string>pci8086,2811</string>
				<string>pci8086,2815</string>
				<string>pci8086,27b9</string>
				<string>pci8086,27bd</string>
				<string>pci8086,2670</string>
				<string>pci8086,8119</string>
				<string>pci8086,2916</string>
				<string>pci8086,3a18</string>
				<string>pci10de,aac</string>
				<string>pci10de,aae</string>
				<string>pci10de,aaf</string>
			</array>
after Applelpc.kext is loading, you can check by ioregestryexplorer.app in ACPI_SMC_Platformplugin section, there is new info for CSTinfo for example CSTinfo 0x1140105

#27
FKA

FKA

    are we there yet?

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,626 posts
  • Gender:Male

Hi just for info....
If AppleLPC.kext is loading, can reduce cpu temperature.....
if is not loading, you can check in lspci for example

00:1f.0 ISA bridge [0601]: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge [8086:27b8] (rev 01)
and add device id and vendor id in applelpc.kext/contents/info.plist for example
<string>AppleLPC</string>
			 <key>IONameMatch</key>
			 <array>
				 <string>pci8086,27b8</string> //--this add vendor id
				 <string>pci8086,2811</string>
				 <string>pci8086,2815</string>
				 <string>pci8086,27b9</string>
				 <string>pci8086,27bd</string>
				 <string>pci8086,2670</string>
				 <string>pci8086,8119</string>
				 <string>pci8086,2916</string>
				 <string>pci8086,3a18</string>
				 <string>pci10de,aac</string>
				 <string>pci10de,aae</string>
				 <string>pci10de,aaf</string>
			 </array>
after Applelpc.kext is loading, you can check by ioregestryexplorer.app in ACPI_SMC_Platformplugin section, there is new info for CSTinfo for example CSTinfo 0x1140105


Hi jinnggoff

Thanks for this. It looks like Applelpc.kext is already loading for me and I have this > CSTinfo 0x1140105 in ioreg under ACPI_SMC.

I don't have any cst errors at boot ...

Cheers
D.

#28
Beerkex'd

Beerkex'd

    Content Provider

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 3,000 posts
  • Gender:Male
  • Location:Belo Horizonte - Brazil
wow, nice find. Thanks. AppleLPC.kext didn't have 3a16 (ICH10R on ASUS P5Q-E):
00:1f.0 ISA bridge [0601]: Intel Corporation 82801JIR (ICH10R) LPC Interface Controller [8086:3a16]
My E8500 @ stock 3.16GHz is now at 38 degrees Celsius with the cooler running at slowest possible RPM while writing this post.
(Still using VoodooPowerMini.kext though).

I really need to learn how to make plist-only "fake" kexts.

/EDIT

I've patched the LPC device ID in my DSDT using zhell's method. Vanilla AppleLPC.kext loads!

#29
Beerkex'd

Beerkex'd

    Content Provider

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 3,000 posts
  • Gender:Male
  • Location:Belo Horizonte - Brazil
Modifying AppleLPC.kext gave me the mythical "Automatically restart after power failure" checkbox in energy saver, that you're supposed to tick to fix sleep (AKA "Jan Bird fix" - http://www.insanelym...p...t&p=1004881 ). I've been chasing that one for more than six months, so seeing that checkbox is like finding lost treasure.

However, as Murphy's Law dictates, S3 sleep broke after doing this no matter if the box is ticked or not! :wacko:

On the other hand, I can now shut down properly without OpenHaltRestart.kext.

It will be interesting to see if sleep works again if I undo the modification to AppleLPC.kext.

/EDIT, yes, S3 sleep came back

Searching for AppleLPC.kext comes up with lots of good stuff, I never knew about this. Interesting. Oh and sorry about the minor threadjack.

/EDIT
S3 sleep is working now with AppleLPC.kext loaded. See this post and this.

#30
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male
Very interesting, because my CPU is running pretty hot, but how do I enter 7.5 (example) as my Core Multiplier? That doesn't seem to work for me (:

BTW: AppleLPC.kext appears to be loading fine here:
00:1f.0 ISA bridge [0601]: Intel Corporation 82801IR (ICH9R) LPC Interface Controller [8086:2916] (rev 02)

Edit: I also found these two in kernel.log:
ACPI_SMC_PlatformPlugin::pushCPU_CSTData - _CST evaluation failed
ACPI_SMC_PlatformPlugin::registerLPCDriver - WARNING - LPC device initialization failed: C-state power management not initialized
Not good – booting Ubuntu Linux to gt the info I need. Update in my next post.

#31
hackcat

hackcat

    InsanelyMac Protégé

  • Members
  • PipPip
  • 62 posts
Thanks FormerlyKnownAs for the tutorial. I got to input the proper p-states for my overclocked E6750 and use the smbios.plist w Chameleon to inject the MacPro3,1 value. CPU-i did show my setup throttling through my 3 p-states. I kept the ssdt tables unchanged as they seemed to be the same as for your mobo (I had fewer because only using a dual core cpu but did not remove those for the other cores). This is on a P35-DS4 rev 2.0 with an all vanilla OS X 10.5.8 + fakesmsc.kext, AHCIPortInjector, IOAHCIBlockStorageInjector and UUID.kext.

Unfortunately it brought in more problems then it solved:
For one I got a serious audio stutter
My dock animations and window dragging are less fluid
I lost the ability to sleep

Before tackling the c-states p-state stuff I had the uhci/ehci fix in my dsdt and also fixed my hdef audio using id 66 on an alc889a, + nic fix and gfx fix. The stutter for both audio and the dock animations seem related as moving my mouse wildly would lessen the amount of stutter. Is this the mouse lag problem? (It isn't my mouse that seems unresponsive). Sleep and wake from keyboard were working before adding the ssdt tables and p-states in my dsdt.

#32
FKA

FKA

    are we there yet?

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,626 posts
  • Gender:Male

Thanks FormerlyKnownAs for the tutorial. I got to input the proper p-states for my overclocked E6750 and use the smbios.plist w Chameleon to inject the MacPro3,1 value. CPU-i did show my setup throttling through my 3 p-states. I kept the ssdt tables unchanged as they seemed to be the same as for your mobo (I had fewer because only using a dual core cpu but did not remove those for the other cores). This is on a P35-DS4 rev 2.0 with an all vanilla OS X 10.5.8 + fakesmsc.kext, AHCIPortInjector, IOAHCIBlockStorageInjector and UUID.kext.

Unfortunately it brought in more problems then it solved:
For one I got a serious audio stutter
My dock animations and window dragging are less fluid
I lost the ability to sleep

Before tackling the c-states p-state stuff I had the uhci/ehci fix in my dsdt and also fixed my hdef audio using id 66 on an alc889a, + nic fix and gfx fix. The stutter for both audio and the dock animations seem related as moving my mouse wildly would lessen the amount of stutter. Is this the mouse lag problem? (It isn't my mouse that seems unresponsive). Sleep and wake from keyboard were working before adding the ssdt tables and p-states in my dsdt.



Hi

I'm not too sure what you've done here?
Have you just used my DSDT or have you copied bits from it?

You really need to use your own SSDT and you must adjust the PSS part to suite your CPU. Copying my p-states from a 4 core cpu and using on your 2 core is bound to cause problems.

D

Very interesting, because my CPU is running pretty hot, but how do I enter 7.5 (example) as my Core Multiplier? That doesn't seem to work for me (:


have to admit I've not tried fractions of mutil's yet I just know they are supported on my system.

can you enter fractions into BIOS?

D.

#33
hackcat

hackcat

    InsanelyMac Protégé

  • Members
  • PipPip
  • 62 posts

Hi

I'm not too sure what you've done here?
Have you just used my DSDT or have you copied bits from it?

You really need to use your own SSDT and you must adjust the PSS part to suite your CPU. Copying my p-states from a 4 core cpu and using on your 2 core is bound to cause problems.

D

I only copied the scope part and modified SPSS and NPSS. I also checked in Everest what my ssdt tables were, and well they matched for the first 2 cores. I see we have the same mobo (P35-DS4). The only tables available to me in windows via Everest were the first 2 cores. I didn't see the need to remove those for the other cores.

Following is based on the p-states I got from my mobo via cpu-i, not the best voltages but I can figure that out later.
x8 3200 @ 1.372v
x7 2800 @ 1.308v
x6 2400 @ 1.212v

Is that right that the bus latency between NPSS and SPSS are different, 0xA0 and 0x0A?
The funny part is if I move my mouse fast I get rid of the audio stutter issue.

Name (SPSS, Package (0x03)        {           	Package (0x06)  // P-state 1                {                     0x0C80,                     0x0135BA,                     0xA0,                     0x0A,                     0x082A,                     0x082A                },                Package (0x06) // P-state 2                {                    0x0AF0,                     0x01025F,                     0xA0,                     0x0A,                     0x0726,                     0x0726                },                 Package (0x06) // P-state 3                {                    0x0960,                     0x00CD35,                     0xA0,                     0x0A,                     0x0620,                     0x0620                }        })        Name (NPSS, Package (0x03)        {            	Package (0x06)  // P-state 1                {                     0x0C80,                     0x0135BA,                     0x0A,                     0x0A,                     0x082A,                     0x082A                },                Package (0x06) // P-state 2                {                    0x0AF0,                     0x01025F,                     0x0A,                     0x0A,                     0x0726,                     0x0726                },                 Package (0x06) // P-state 3                {                    0x0960,                     0x00CD35,                     0x0A,                     0x0A,                     0x0620,                     0x0620                }        })


#34
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male

...
have to admit I've not tried fractions of mutil's yet I just know they are supported on my system.
can you enter fractions into BIOS?

But of course! And the ratio can be anything from 6 to 9 on my Asus P5K PRO. I personally use a CPU ratio of 7.5 with a FSB speed of 400 (3GHz) so I have to figure out what to use (how to calculate) since the Intel documentation is anything but helpful (requires NDA). I can't be the only one having this problem, and in fact I got four PM's �€“ this week alone �€“ from other P5K PRO users asking for my help.

And here's a first update:

I booted into Ubuntu Linux and ran dmesg | grep ACPI which returned this (the most important bits only):
ACPI: SSDT CFF8E0D0, 01D2 (r1	AMI   CPU1PM		1 INTL 20060113)
ACPI: SSDT CFF8E2B0, 0143 (r1	AMI   CPU2PM		1 INTL 20060113)
ACPI: SSDT CFF8E400, 0143 (r1	AMI   CPU3PM		1 INTL 20060113)
ACPI: SSDT CFF8E550, 0143 (r1	AMI   CPU4PM		1 INTL 20060113)
Then I used acpidump like this:
acpidump -a 0xCFF8E0D0 -l 0x01D2 > cpu1pm
acpidump -a 0xCFF8E2B0 -l 0x0143 > cpu2pm
acpidump -a 0xCFF8E400 -l 0x0143 > cpu3pm
acpidump -a 0xCFF8E550 -l 0x0143 > cpu4pm
Then I decompiled the files with:
iasl -d cpu1pm
iasl -d cpu2pm
iasl -d cpu3pm
iasl -d cpu4pm
Giving me four files (see attachment) named cpuNpm.dsl – where N is a number from 1 to 4. Which is great, but there is no _CST in the ACPI 2.0 Object Table:
_PCT  Identifies location of I/O mapped MSRs for status and control
_PSS  Lists the possible processor frequency and voltage operating states
_PPC  Reflects the capabilities of the platform
And I have two different sets (SPSS and NPSS) in _PSS (see CPUxPM.zip) which I think can be of later use, if I only knew which one to use. There's also Method (_PSD, 0, NotSerialized) which I am still looking into; to see what it does.

Update: I found _PDC (Processor Driver Capabilities) on page 280 of ACPIspec30a.pdf – deprecated in ACPI 3.0 in favor of _OSC.

Then I tried to run CPU-I, which unfortunately failed to work (startup errors) and thus I recompiled both the kext and the application for Snow Leopard. It starts but doesn't show any P-State changes, making me wonder why not as it is already part of my BIOS. OS X needs C-States the get P-States working?

Update: We 'only' need a _CST() object to get the temperatures down, but the temperatures go sky high without _PDC so you should not remove it!

Attached Files



#35
FKA

FKA

    are we there yet?

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,626 posts
  • Gender:Male

I only copied the scope part and modified SPSS and NPSS. I also checked in Everest what my ssdt tables were, and well they matched for the first 2 cores. I see we have the same mobo (P35-DS4). The only tables available to me in windows via Everest were the first 2 cores. I didn't see the need to remove those for the other cores.


I'd remove the entried for the 2cores that you dont have.

And I have two different sets (SPSS and NPSS) in _PSS (see CPUxPM.zip) which I think can be of later use, if I only knew which one to use. There's also Method (_PSD, 0, NotSerialized) which I am still looking into; to see what it does.

Then I tried to run CPU-I, which unfortunately failed to work (startup errors) and thus I recompiled both the kext and the application for Snow Leopard. It starts but doesn't show any P-State changes, making me wonder why not as it is already part of my BIOS. OS X needs C-States the get P-States working?


Use the p-state calculator (in the first post!) to calculate vCore, freqency, power for each of your p-states (varying multi's - i.e. 7.5, 6, 5.5 etc .)

Have a look at the example on ZTEX (also linked in the first post.) Using the method decribed and the information gathered from p-state calculator you can get fid and vid data for each p-state.

Add this data to the SPSS and NPSS tables (only difference betwen NPSS and SPSS is the latancy value.)

As decribed IN THE FIRST POST - if you don't find c-states you can take them from MacPro3,1 or any other model you may be emulating in SMBIOS - This shouldn't affect speedstep though.

Read the guide and read through the links provided - the answer to most of what you are asking is already there.

D.

#36
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male

Use the p-state calculator (in the first post!) to calculate vCore, freqency, power for each of your p-states (varying multi's - i.e. 7.5, 6, 5.5 etc .)

Since when is (400 * 7.5) 2800? Give it a go and enter 400 * 7.5 which results in 2800 instead of 3000 As in you have to change the CPU speed yourself when you use fractions, or people here (might) end up with the wrong values!!! That is what I was trying to address in my previous post. And you are aware that, according to Intel documentation, you can toast your CPU (no disclaimer) with the wrong values?

And I am not asking anything, but summing up what I did so that other P5K PRO users, like the four that PM'ed me this week, can reproduce it – other people might also find the information helpful. Now you say, but you asked: "OS X needs C-States the get P-States working?" And I did, but as in: "It works with Microsoft Windows and (Ubuntu) Linux, without any modifications, so why did Apple have to add something (again) that is not part of the specification?".

Update: _CST is part of the ACPI specification, but not wildly used – not in Windows or Ubuntu Linux anyway.

Also, would you mind changing acpi_smc_platformplugin.kext into ACPI_SMC_PlatformPlugin.kext because I just got another e-mail asking me where to locate it. Thanks.

Tip: Chameleon with DSDT override (link in first post) does not work with Snow Leopard!

#37
hackcat

hackcat

    InsanelyMac Protégé

  • Members
  • PipPip
  • 62 posts
Well pruning the scope segment for just 2 cores didn't change anything, I still get the audio stutter. I'm going to reread what you have done as I found out some interesting stuff such as I can't just define one x8 pstate in NPSS and SPSS segments, I still get a x6 step at x8 voltages. Thanks for the suggestions so far, I think I'll table this for a bit as I have everything I want working without trying to enable vanilla speedstep.

#38
FKA

FKA

    are we there yet?

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,626 posts
  • Gender:Male

Since when is (400 * 7.5) 2800? Give it a go and enter 400 * 7.5 which results in 2800 instead of 3000 As in you have to change the CPU speed yourself when you use fractions, or people here (might) end up with the wrong values!!! That is what I was trying to address in my previous post. And you are aware that, according to Intel documentation, you can toast your CPU (no disclaimer) with the wrong values?


Somebody please correct me if I'm wrong but as far as I can tell only multiplier and and voltage values are taken from _PSS.
I have tried changing the power value up ad down and there is no increase/decrease in CPU temp as you would expect!
Also changing cpu freq value in _PSS has no effect.

I would hope people using this guide are smart enough not to over volt thier CPU!
NB - max vCore set in BIOS can ##EDIT## NOT ##EDIT## be increased on with a value entered in _PSS

Also, would you mind changing acpi_smc_platformplugin.kext into ACPI_SMC_PlatformPlugin.kext because I just got another e-mail asking me where to locate it. Thanks.


You should tell the people PMing you to use google http://www.google.co...6de100c80649ef3

D.

#39
Master Chief

Master Chief

    Just Chief

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,176 posts
  • Gender:Male

Somebody please correct me if I'm wrong but as far as I can tell only multiplier and and voltage values are taken from _PSS.

Are you talking about the P-States calculator or the _PSS values used by the OS? I haven't looked into what this tool does, but _PSS lists the frequency and voltage (among others). Not the multiplier. And that is exactly why I added the ACPI object table in a previous post, which you seem to have missed.

Update: I just checked the P-States Calculator and it does not use the multiplier, other than to calculate the "Core Clock (MHz)".

I have tried changing the power value up ad down and there is no increase/decrease in CPU temp as you would expect!
Also changing cpu freq value in _PSS has no effect.

So why do you need these values, if it doesn't change anything? Let's have a look at the specification, which said what again? And yes I am asking you, because you – with your use of UPPERCASE – obviously thought that I can't read. Ha!

#40
FKA

FKA

    are we there yet?

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,626 posts
  • Gender:Male

No, it lists the frequency and voltage. Not the multiplier. And that is exactly why I added the ACPI object table in a previous post, which you seem to have missed.


So why do you need these values, if it doesn't change anything? Let's have a look at the specification, which said what again? And yes I am asking you, because you �" with your use of UPPERCASE �" obviously thought that I can't read. Ha!


Dude have you read and understood any of the thread?

Name (_PSS, Package (0x03)        {            Package (0x06)// P-State 0            {                3104, // f in MHz                75000, // P in mW                10, // Transition latency in us                10, // Bus Master latency in us                0x00000820, // value written to PERF_CTL; fid=8, vid=32                0x00000820// value of PERF_STATE after successful transition; fid=8, vid=32

The important values being fid (mutiplier value i.e 7.5) and vid
UCpu = 800 mV + vid*12.5 mV
ergo vid = [vCore -800mV]/12.5mV

;)





28 user(s) are reading this topic

0 members, 28 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy