Jump to content

Getting Snow Leopard to recognize your CPU


DigitalDJ
 Share

227 posts in this topic

Recommended Posts

Hi,

 

Recently I've been trying to make my hackintosh as Mac-like as possible. One thing that always bugged me was the OSX would detect my CPU as Unknown, even though I had an Intel processor. There are several "hacks" out there on the web that tell you to edit the About This Mac strings or the System Profiler strings, however, these are purely cosmetic, the actual operating system still thinks your CPU is Unknown. Proof of this is the Microsoft Silverlight installer. Without hacking the installer, the installer will not detect your CPU and will fail to install. This cures such problems by injecting a "cpu-type" into IORegistry.

 

The geeky stuff: I originally did this by adapting the NVinject source and injecting values into the IORegistry. The exact value is a property called "cpu-type" under "IOService:/AppleACPIPlatformExpert/cpus". From my research, I believed this can actually be done by injecting values into the SMBIOS, so I went ahead and modified the Chameleon RC3 bootloader. This is done by patching a "ProcessorType" SMWORD into Table Structure 131, OSX picks up on this value and automatically inserts it into the IORegistry. See: http://opensource.apple.com/source/AppleSM...AppleSMBIOS.cpp for details (search for cpuType and cpu-type)

 

The PC_EFI 10.4 bootloader by netkas now INCLUDES THIS PATCH. Future versions of Chameleon will also include this patch :) My bootloader is essentially out of date, I have removed links to it.

 

CHECK HERE TO GET PC_EFI 10.4 (with included CPU detection)

 

OK, so you've got it installed. Great. Theoretically, with the auto-detection I provided, OSX should now detect your CPU (only works for Core 2 Solo/Duo, Core i7/i5 and Core 2 Quad/Quad Exteme).

 

The autodetection algorithm works as follows:

If you have 4 cores or more (Core i7/Core i5/Core2 Quads), the bootloader will inject a "Quad-Core Intel Xeon" cpu-type

If you have 2 cores, the bootloader will inject a "Intel Core 2 Duo" cpu-type

If you have 1 core, the bootloader will inject a "Intel Core 2 Solo" cpu-type

If you don't meet the above conditions, the default type is "Intel Core 2 Duo".

 

Keep in mind that Chameleon/PC_EFI sometimes fails to detect your number of cores. In this case, the default "Core 2 Duo" will be injected. If this happens and you have a Core 2 Quad/i7/i5 your CPU will still show as UNKNOWN.

 

You can however, attempt to manually specify your CPU type by editing smbios.plist. Here is what you should put in for each CPU:

 

Core 2 Quad & Quad Extreme & Core i7 & Core i5:

 

<key>SMcputype</key>

<string>1281</string>

 

Core 2 Duo:

 

<key>SMcputype</key>

<string>769</string>

 

Core 2 Solo:

 

<key>SMcputype</key>

<string>257</string>

 

There are other values available for a Core (1) Solo and Core (1) Duo, however I do not know the values as these CPUs are rare and I don't have an ioreg output from them. Processors that Apple do not support (i.e. Pentium 4, AMD, Pentium D) are NOT SUPPORTED

 

IF you have a Core i7 or Core i5 you can get System Profiler to show your Interconnect Speed. This is done by editing your smbios.plist with an additional value (not this is not injected automatically at boot):

 

<key>SMbusspeed</key>

<string>4800</string>

 

Where 4800 will show 4.8GT/s, your interconnect speed (or something like that). If you use the value 0, your Inter Connect speed will show up as Bus Speed. If you have a Core 2 Duo or Quad...and you have this value in your smbios.plist, you should either remove it or set it to 0.

 

OK, I think that'll do it. Try it out, have fun :)

 

There is an old kext injector that I used to test this. However, it is now unsupported. The only reason to use this kext injector is if you use a different bootloader, such as BootThink. See details below:

 

----------------------OLD KEXT INFORMATION----------------------

To get this to work you will need to modify the Info.plist inside the kext.

 

You will need to open/edit Info.plist and look for the following block

 

<key>entriesToAdd</key>

<dict>

<key>cpu-type</key>

<data>AQU=</data>

</dict>

 

You need to modify the text in between the <data></data> tags depending on which processor you have.

These values are as follows (The table is incomplete, they might not work, please experiment)

CPU String	<data></data>
Intel Core 2 Solo	AQE=
Intel Core 2 Duo	AQM=
Intel Core 2 Quad	AQU=
Intel Core 2 Quad Extreme 	AQU=
Intel Core i7 	AQU=
Intel Core i5 	AQU=

 

If you have a Core i7 or Core i5 machine..you can also add:

<key>interconnect-speed</key>

<data>gA6kXQEAAAA=</data>

 

This will show the Interconnect Speed in System Profiler.

 

Examples:

Core2 Duo CPUs

<dict>

<key>cpu-type</key>

<data>AQM=</data>

</dict>

 

Core2 Quad/Quad Extreme CPUs (Will show as Quad Core Xeon, Apple don't sell Core2 Quad CPUs!)

<dict>

<key>cpu-type</key>

<data>AQU=</data>

</dict>

 

Core i5/i7 CPUs (Will show as Quad Core Xeon, Apple don't sell i7 CPUs!)

<dict>

<key>cpu-type</key>

<data>AQU=</data>

<key>interconnect-speed</key>

<data>gA6kXQEAAAA=</data>

</dict>

 

Core 2 Solo CPUs

<dict>

<key>cpu-type</key>

<data>AQE=</data>

</dict>

 

DOWNLOAD 1.1

 

SOURCE 1.1

 

PROOF PIC

post-44975-1254249388_thumb.png

Link to comment
Share on other sites

I'm pretty psyched about this. Hopefully it will not make FCP tell me that it needs Rosetta anymore.

 

I'm a little confused about using the CPU codes. Do you need to put in the base64 encoded hex value by itself? Or do you put in the base64 and the hex value together? For example, C2D is 0103, the xlate page on that web site translates that to the base64 version, AQM=.

 

UPDATE:

I used AQM=0103 and it says the processor name is Intel Core 2 Duo. Installed Silverlight fine.

 

;)

Link to comment
Share on other sites

It's very interesting, thanks for job! How do I calculate the exact string for my Intel core 2 quad q6600? Thanks a lot

 

I just used the code he posted but if I have to guess go to terminal type ioreg -l and search for cpu-type goto the link he provided for the converter put the first 4 numbers found in the hex window e.g.. 0103 you result would be AQM= in the BASE64 window then enter the rest d35d37 that's 0103.

I'm a rookie with this stuff, its just a hunch it may not work.

Link to comment
Share on other sites

Anyone who's got this working already, would you mind doing me a favor? If you could go to terminal and do ioreg -l and see if you've got something similar to this:

 

	
| +-o cpus  <class IOPlatformDevice, id 0x100000112, registered, matched, a$
| |   {
| |	 "name" = <"cpus">
| |   }

 

Alternatively, if you search for cpu-type, mind copy and pasting that snippet here so I can see what I have to look for to get the i7 working? Thanks! :)

  • Like 1
Link to comment
Share on other sites

UPDATE:

I used AQM=0103 and it says the processor name is Intel Core 2 Duo. Installed Silverlight fine.

 

:)

 

The equals sign ends a Base64 string...so 0103 will be ignored. You should only use the Base64 string (AQM=) though).

 

 

This didn't work for me when loaded from the EFI partition (I've got a Q9550 and left the cpu-type string at default).

 

Interesting. Would you mind trying "ioreg -l" at Terminal and posting the output here (as a text file)...Or take a look at tweak41's post and find that section.

 

 

Alternatively, if you search for cpu-type, mind copy and pasting that snippet here so I can see what I have to look for to get the i7 working? Thanks! :D

 

Did you try the default one? The default code I have in the injector is for a MacPro4,1...which uses the new Intel Xeons (should be exactly like a Core i7) Use the default code and add the interconnect bit too. That doesn't work?

Link to comment
Share on other sites

I ran ioreg -l in the terminal and this is the closes thing to cpu-type that I can find.

 

  |   "OSKernelCPUType" = 16777223

 

Is that the value I need to use or am I on the wrong track? Also, is this kext 64 bit compatible?

 

Sorry, you won't have a CPU type till the injector runs. Look for "cpus".

Link to comment
Share on other sites

Thanks for the heads up. I wasn't able to get the system to recognize my Q6700, but I'm not really surprised since that isn't a cpu that Apple actually uses. Instead I used the code for the Quad Core Xeon and everything is working great.

 

Yes, quad cores will be recognized as Xeons. There is no string in System Profiler for a Core 2 Quad, only Duo.

Link to comment
Share on other sites

@DijitalDJ: thanks for the info. It works great on About This Mac.

 

I am now comparing the dsdt from the Apple MacPro4,1.

The dsdt from a typical Asus board is as follows:

   (_PR)
   {
       Processor (P001, 0x01, 0x00000810, 0x06) {}
       Processor (P002, 0x02, 0x00000000, 0x00) {}
       Processor (P003, 0x03, 0x00000000, 0x00) {}
       Processor (P004, 0x04, 0x00000000, 0x00) {}
       Processor (P005, 0x05, 0x00000000, 0x00) {}
       Processor (P006, 0x06, 0x00000000, 0x00) {}
       Processor (P007, 0x07, 0x00000000, 0x00) {}
       Processor (P008, 0x08, 0x00000000, 0x00) {}
       Processor (P009, 0x09, 0x00000000, 0x00) {}
       Processor (P010, 0x0A, 0x00000000, 0x00) {}
       Processor (P011, 0x0B, 0x00000000, 0x00) {}
       Processor (P012, 0x0C, 0x00000000, 0x00) {}
       Processor (P013, 0x0D, 0x00000000, 0x00) {}
       Processor (P014, 0x0E, 0x00000000, 0x00) {}
       Processor (P015, 0x0F, 0x00000000, 0x00) {}
       Processor (P016, 0x10, 0x00000000, 0x00) {}
   }

...But comparing the above Asus dsdt with the Apple MacPro4,1

that is clearly different

   (\_PR)
   {
       Processor (CPU0, 0x00, 0x00000410, 0x06) {}
       Processor (CPU1, 0x01, 0x00000410, 0x06) {}
       Processor (CPU2, 0x02, 0x00000410, 0x06) {}
       Processor (CPU3, 0x03, 0x00000410, 0x06) {}
       Processor (CPU4, 0x04, 0x00000410, 0x06) {}
       Processor (CPU5, 0x05, 0x00000410, 0x06) {}
       Processor (CPU6, 0x06, 0x00000410, 0x06) {}
       Processor (CPU7, 0x07, 0x00000410, 0x06) {}
       Processor (CPU8, 0x08, 0x00000410, 0x06) {}
       Processor (CPU9, 0x09, 0x00000410, 0x06) {}
       Processor (CPUA, 0x0A, 0x00000410, 0x06) {}
       Processor (CPUB, 0x0B, 0x00000410, 0x06) {}
       Processor (CPUC, 0x0C, 0x00000410, 0x06) {}
       Processor (CPUD, 0x0D, 0x00000410, 0x06) {}
       Processor (CPUE, 0x0E, 0x00000410, 0x06) {}
       Processor (CPUF, 0x0F, 0x00000410, 0x06) {}
   }

Observing the two dsdts above I have replaced all P00x to CPUx and added to each line the 0x00000810, 0x06

  
Scope (_PR)
   {
       Processor (CPU0, 0x01, 0x00000810, 0x06) {}
       Processor (CPU1, 0x02, 0x00000810, 0x06) {}
       Processor (CPU2, 0x03, 0x00000810, 0x06) {}
       Processor (CPU3, 0x04, 0x00000810, 0x06) {}
       Processor (CPU4, 0x05, 0x00000810, 0x06) {}
       Processor (CPU5, 0x06, 0x00000810, 0x06) {}
       Processor (CPU6, 0x07, 0x00000810, 0x06) {}
       Processor (CPU7, 0x08, 0x00000810, 0x06) {}
       Processor (CPU8, 0x09, 0x00000810, 0x06) {}
       Processor (CPU9, 0x0A, 0x00000810, 0x06) {}
       Processor (CPUA, 0x0B, 0x00000810, 0x06) {}
       Processor (CPUB, 0x0C, 0x00000810, 0x06) {}
       Processor (CPUC, 0x0D, 0x00000810, 0x06) {}
       Processor (CPUD, 0x0E, 0x00000810, 0x06) {}
       Processor (CPUE, 0x0F, 0x00000810, 0x06) {}
       Processor (CPUF, 0x10, 0x00000810, 0x06) {}
   }

 

As I have guessed all the CPUs are listed correctly as my MacPro on the IORegistryExplorer both at 10.5.8 and at 10.6.

I have also tried all the other combinations of the above format by replacing for example only the CPUx and let all the other with their initial values:

So Processor (P001, 0x01, 0x00000810, 0x06) {}...becomes

1st combination : Processor (CPU0, 0x01, 0x00000810, 0x06) {}

having as 2nd line: Processor (CPU1, 0x02, 0x00000000, 0x00) {}... etc

 

2nd combination : Processor (CPU0, 0x00, 0x00000810, 0x06) {}

having as 2nd line: Processor (CPU1, 0x01, 0x00000000, 0x00) {}... etc

 

Then I repeat the above with and I add to each line the 0x00000810, 0x06

3rd combination : Processor (CPU0, 0x01, 0x00000810, 0x06) {}

having as 2nd line: Processor (CPU1, 0x02, 0x00000810, 0x06) {}... etc

 

4th combination : Processor (CPU0, 0x00, 0x00000810, 0x06) {}

having as 2nd line: Processor (CPU1, 0x01, 0x00000810, 0x06) {}... etc

 

All the possible CPUx combinations are having the same result.

But looking closer at the IORegistryExplorer using 10.5.8 I did have noticed something very interesting... there was one tiny difference: the ACPI_SMC_PlatformPlugin is having the PerformaceStateArray (with 10 values) only while the dsdt is on P00x format(!) Any ideas why is this so? Why the P00x vs CPUx etc notation makes such difference ? Nevertheless, the system works at its best and the IORegistryExplorer looks now the same with the macpro4,1.

Link to comment
Share on other sites

Doesn't work in /Extra/Extensions, works only in /System/Library/Extensions. Here you go ...

 

post-1162-1254299170_thumb.png

Thanks, it now works. Well done guys.

 

Only thing is my Q6600 is seen as Quad Core Xeon - is the the best it'll get? (Maybe, I guess as per post from Digital DJ above.)

 

Also, in 10.5, I get the following:

Processor Name: Intel® Core™2 Quad CPU Q6600 @

Processor Speed: 3 GHz

Total Number Of Cores: 4

L2 Cache (per processor): 4 MB

CPU Features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM SSE3 MON DSCPL VMX EST TM2 SSSE3 CX16 TPR PDCM.

 

Does that matter?

Link to comment
Share on other sites

On my Q6600, it didn't work with AQU=0105.

Maybe I put it in the wrong place. Does it go to S/L/E or Chameleon/E/E?

 

The string is simply AQU= not AQU=0105.

 

I personally put mine in /E/E, seemed to work fine. I will investigate though. Those having trouble, are you on Snow Leopard or Leopard?

 

 

I am now comparing the dsdt file from the Apple MacPro4,1

The dsdt has the typical Asus board format is as follows:

 

But looking closer at the IORegistryExplorer using 10.5.8 I did have noticed something very interesting... there was one tiny difference: the ACPI_SMC_PlatformPlugin is having the PerformaceStateArray (with 10 values) only while the dsdt is on P00x format(!) Any ideas why is this so? Why the P00x vs CPUx etc notation makes such difference ? Nevertheless, the system works at its best and the IORegistryExplorer looks now the same with the macpro4,1.

 

Not too sure on the P00 thing. Have never tried with an ASUS board. I tested it with a Gigabyte EP45-EXTREME, however, I don't think you should need to edit the DSDT for this to work as the "/cpus" path exists no matter what the CPUs are labled as.

 

Doesn't work in /Extra/Extensions, works only in /System/Library/Extensions. Here you go ...

 

I'll take a look into this. I might need to add some sort of dependency.

 

Thanks, it now works. Well done guys.

 

Only thing is my Q6600 is seen as Quad Core Xeon - is the the best it'll get? (Maybe, I guess as per post from Digital DJ above.)

 

Also, in 10.5, I get the following:

Processor Name: Intel® Coreâ„¢2 Quad CPU Q6600 @

Processor Speed: 3 GHz

Total Number Of Cores: 4

L2 Cache (per processor): 4 MB

CPU Features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM SSE3 MON DSCPL VMX EST TM2 SSSE3 CX16 TPR PDCM.

 

Does that matter?

 

Yes, for the Q6600 the best you'll get is Quad Core Xeon, but don't worry, that's a GOOD thing. System Profiler does not support Intel Core2 Quads. Apple don't sell them!

 

As for your 10.5 output...are you running any AppleSMBIOS/SMBIOS Extensions? They will likely conflict with this injector. It is mainly for use with Chameleon SMBIOS patching (and no SMBIOS injectors).

Link to comment
Share on other sites

The string is simply AQU= not AQU=0105.

 

I personally put mine in /E/E, seemed to work fine. I will investigate though. Those having trouble, are you on Snow Leopard or Leopard?

 

Thanks. I'm on SL 10.6

 

Do you have a real MacPro 4,1 ? Mind posting the Hardware Overview screen from System Profiler ?

 

Actually does anyone here have a Nehalem MacPro ? Would they mind posting the Hardware Overview screen ?

 

 

I am now comparing the dsdt file from the Apple MacPro4,1

The dsdt has the typical Asus board format is as follows:

   (_PR)
   {
       Processor (P001, 0x01, 0x00000810, 0x06) {}
       Processor (P002, 0x02, 0x00000000, 0x00) {}
       Processor (P003, 0x03, 0x00000000, 0x00) {}
       Processor (P004, 0x04, 0x00000000, 0x00) {}
       Processor (P005, 0x05, 0x00000000, 0x00) {}
       Processor (P006, 0x06, 0x00000000, 0x00) {}
       Processor (P007, 0x07, 0x00000000, 0x00) {}
       Processor (P008, 0x08, 0x00000000, 0x00) {}
       Processor (P009, 0x09, 0x00000000, 0x00) {}
       Processor (P010, 0x0A, 0x00000000, 0x00) {}
       Processor (P011, 0x0B, 0x00000000, 0x00) {}
       Processor (P012, 0x0C, 0x00000000, 0x00) {}
       Processor (P013, 0x0D, 0x00000000, 0x00) {}
       Processor (P014, 0x0E, 0x00000000, 0x00) {}
       Processor (P015, 0x0F, 0x00000000, 0x00) {}
       Processor (P016, 0x10, 0x00000000, 0x00) {}
   }

...But comparing the above Asus dsdt with the Apple MacPro4,1

that is clearly different

   (\_PR)
   {
       Processor (CPU0, 0x00, 0x00000410, 0x06) {}
       Processor (CPU1, 0x01, 0x00000410, 0x06) {}
       Processor (CPU2, 0x02, 0x00000410, 0x06) {}
       Processor (CPU3, 0x03, 0x00000410, 0x06) {}
       Processor (CPU4, 0x04, 0x00000410, 0x06) {}
       Processor (CPU5, 0x05, 0x00000410, 0x06) {}
       Processor (CPU6, 0x06, 0x00000410, 0x06) {}
       Processor (CPU7, 0x07, 0x00000410, 0x06) {}
       Processor (CPU8, 0x08, 0x00000410, 0x06) {}
       Processor (CPU9, 0x09, 0x00000410, 0x06) {}
       Processor (CPUA, 0x0A, 0x00000410, 0x06) {}
       Processor (CPUB, 0x0B, 0x00000410, 0x06) {}
       Processor (CPUC, 0x0C, 0x00000410, 0x06) {}
       Processor (CPUD, 0x0D, 0x00000410, 0x06) {}
       Processor (CPUE, 0x0E, 0x00000410, 0x06) {}
       Processor (CPUF, 0x0F, 0x00000410, 0x06) {}
   }

 

 

 

Interesting

 

On my ASUS P6T SE I get

{

Scope (_PR)

{

Processor (P001, 0x01, 0x00000810, 0x06) {}

Alias (P001, CPU1)

Processor (P002, 0x02, 0x00000000, 0x00) {}

Alias (P002, CPU2)

Processor (P003, 0x03, 0x00000000, 0x00) {}

Alias (P003, CPU3)

Processor (P004, 0x04, 0x00000000, 0x00) {}

Alias (P004, CPU4)

Processor (P005, 0x05, 0x00000000, 0x00) {}

Alias (P005, CPU5)

Processor (P006, 0x06, 0x00000000, 0x00) {}

Alias (P006, CPU6)

Processor (P007, 0x07, 0x00000000, 0x00) {}

Alias (P007, CPU7)

Processor (P008, 0x08, 0x00000000, 0x00) {}

Alias (P008, CPU8)

Processor (P009, 0x09, 0x00000000, 0x00) {}

Alias (P009, CPU9)

 

Notice the 'alias' to 'CPU'

Link to comment
Share on other sites

I had this added to an old version of SMBIOSResolver, but people complained about wrong cpu info so I removed it. Anyway I have talked about adding the proprietary Apple SMBIOS tables to chameleon, but not much interest and I have no time or need to work on it.

Link to comment
Share on other sites

Do you have a real MacPro 4,1 ? Mind posting the Hardware Overview screen from System Profiler ?

 

I don't own one, but here's an ioreg and DSDT of a real MacPro4,1

 

I had this added to an old version of SMBIOSResolver, but people complained about wrong cpu info so I removed it. Anyway I have talked about adding the proprietary Apple SMBIOS tables to chameleon, but not much interest and I have no time or need to work on it.

 

Do you happen to have the source for this laying around? Or any idea on the other cpu-types for other CPUs?

MacPro4_1.zip

Link to comment
Share on other sites

I don't use this injector on 10.5 as it already reports correctly the CPU info. I was only wondering why there was more complete into there.

 

It isn't complete info.

 

You have some sort of custom patched System Profiler. No actual Mac reports on CPU features or uses the full string of the CPU for the Processor Name. You're either using a patched System Profiler or some sort of extra injector. Either way, not vanilla ;)

 

Weird, putting AQU=0105 produced the right result!

 

It probably still works, but the data you entered is invalid. It's a Base64 encoded string, 0105 would be invalid, so it is probably ignored. It will work as simply AQU=

Link to comment
Share on other sites

The string is simply AQU= not AQU=0105.

Weird, putting AQU=0105 produced the right result!

 

I personally put mine in /E/E, seemed to work fine. I will investigate though. Those having trouble, are you on Snow Leopard or Leopard?

Didn't work for me in E/E. Had to be S/L/E with Kext Utility.

 

As for your 10.5 output...are you running any AppleSMBIOS/SMBIOS Extensions? They will likely conflict with this injector. It is mainly for use with Chameleon SMBIOS patching (and no SMBIOS injectors).

I don't use this injector on 10.5 as it already reports correctly the CPU info. I was only wondering why there was more complete into there.

Link to comment
Share on other sites

But looking closer at the IORegistryExplorer using 10.5.8 I did have noticed something very interesting... there was one tiny difference: the ACPI_SMC_PlatformPlugin is having the PerformaceStateArray (with 10 values) only while the dsdt is on P00x format(!) Any ideas why is this so? Why the P00x vs CPUx etc notation makes such difference ? Nevertheless, the system works at its best and the IORegistryExplorer looks now the same with the macpro4,1.

 

you need to change every instance of Pxx to CPU. otherwise you will miss a lot of "features" like PerformanceStateArray (speedstep!!). this particular problem maybe because your SSDT table maybe referencing your Pxx objects rather than the CPU object. you have lot of readin to do :thumbsup_anim:

 

@DijitalDJ: thanks for the tip. and nice to see you active here!

Link to comment
Share on other sites

And processors like Pentium D's? How they should be recognized?

 

Unfortunately, probably still Unknown. You can't force a different CPU type, the type needs to be valid for your CPU as far as I know. However, experiment with it. System Profiler does not have a string for Pentium Ds or Pentium 4s, maybe they'll show up as Core Solo/Duos? However, I'm not sure of that CPU type yet.

Link to comment
Share on other sites

 Share

×
×
  • Create New...