Voodooprojects

Chameleon => Bug Reports => Topic started by: Memorial on August 17, 2009, 08:17:11 AM

Title: CPU Frequency improperly computed by RC2
Post by: Memorial on August 17, 2009, 08:17:11 AM
I have a Mobile DualCore Intel Core 2 Duo T5250, 1500 MHz (9 x 167). I have RC2 computing the CPU frequency at 1560, which is just odd. The external clock is being computed correctly (667 MHz). Superhai's SMBIOSResolver used to compute the CPU frequency properly, so it seems like this is an issue in the code (freq_detect.c). I currently override it in smbios.plist, but I just wanted to report the error.

Great work guys. Thank you so much.
Title: Re: CPU Frequency improperly computed by RC2
Post by: Kabyl on August 17, 2009, 10:30:48 AM
Please run this in Terminal window and post the output:
Code: [Select]
ioreg -lw0 -p IODeviceTree | grep -A3 platform
Title: Re: CPU Frequency improperly computed by RC2
Post by: Memorial on August 17, 2009, 12:56:23 PM
Here it is

Code: [Select]
  | +-o platform  <class IOService, !registered, !matched, active, busy 0, retain 4>
    | |   {
    | |     "CPUFrequency" = <d9132f5900000000>
    | |     "name" = <"platform">
    | |     "FSBFrequency" = <51c9e80900000000>
    | |     "TSCFrequency" = <dc132f5900000000>
    | |   }
--
          "platform-uuid" = <00000000000010008000001d7274099b>
        }

I hope this helps.

Thanks a lot for looking into this.
Title: Re: CPU Frequency improperly computed by RC2
Post by: Kabyl on August 17, 2009, 01:36:20 PM
That gives us the following values:

TSCFrequency = 1496257500 Hz (~1496 MHz)
CPUFrequency = 1496257497 Hz (~1496 MHz)
FSBFrequency = 166250833 Hz (~166 MHz)

So the values read and calculated are correct, except SMBIOS related values which are purely cosmetic and you did set them in the smbios.plist.
Title: Re: CPU Frequency improperly computed by RC2
Post by: Memorial on August 17, 2009, 03:02:13 PM
Then are the sysctl cpu frequencies also cosmetic in that sense?

Thanks again.
Title: Re: CPU Frequency improperly computed by RC2
Post by: Kabyl on August 17, 2009, 05:05:12 PM
No, I believe some apps use that (if not drivers too).
Title: Re: CPU Frequency improperly computed by RC2
Post by: Gringo Vermelho on August 18, 2009, 02:08:41 AM
post the contents of your /Extra/smbios.plist.
Title: Re: CPU Frequency improperly computed by RC2
Post by: Memorial on August 18, 2009, 02:32:27 AM
@Grindo Vermelho
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SMbiosversion</key>
<string>MBP41.88Z.0073.B00.0809221748</string>
<key>SMbiosdate</key>
<string>04/01/2008</string>
<key>SMmanufacter</key>
<string>Apple Inc.</string>
<key>SMproductname</key>
<string>MacBookPro4,1</string>
<key>SMsystemversion</key>
<string>1.0</string>
<key>SMserial</key>
<string>SECRETSERIAL</string>
<key>SMfamily</key>
<string>MacBookPro</string>
<key>SMboardmanufacter</key>
<string>Apple Inc.</string>
<key>SMboardproduct</key>
<string>Mac-F42D89C8</string>
<key>SMmaximalclock</key>
<string>1503</string>
</dict>
</plist>

@Kabyl

The sysctl values (hw.cpufrequency and others) seem to be set by the smbios.plist override, if I don't override, then I get hw.cpufrequency = 1560000000 but with the override I get hw.cpufrequency = 1503000000.



Title: Re: CPU Frequency improperly computed by RC2
Post by: Kabyl on August 18, 2009, 06:37:11 AM
Yes, I just forgot about that part, and it should be fixed in the next release.