View Single Post
 
Old 06-04-2010, 10:08 AM
blackknight blackknight is offline
Jaguar
 
Join Date: Aug 2009
Location: Charlotte, NC
Posts: 62
Quote:
Originally Posted by andyvand View Post
I am working on full 32 + 64 bit amd xnu
@blackknight: can you post a diff (your patch only, diff between my patch and yours)
At the moment, the graphics card on my system has died, so all I can do is paste the part of the full diff I posted in the first post that applies.

Code:
-    busFreq = EFI_FSB_frequency();
-
+     if (!PE_parse_boot_argn("fsb", &busFreq, sizeof(busFreq))) {
+         // blackknight; added for corrected FSB detection for Phenoms and Shanghais
+        switch (cpuid_family()) {
+            case CPU_FAMILY_AMD_PHENOM:
+            case CPU_FAMILY_AMD_SHANGHAI: {
+                busFreq = 2 * EFI_FSB_frequency();
+            }
+            break;
+             default:
+                busFreq = EFI_FSB_frequency();
+        }
+    }
+    
     switch (cpuid_cpufamily()) {
Look for this code in the tsc.c file. It shouldn't be hard to find. As you can see, it's just a check to see if it's an AMD Phenom or Shanghai or not and doubles the detected EFI_FSB_frequency if it is.

Hackintosh 1: OS X 10.6.8 / Antec P180B / Gigabyte GA-MA790FX-DS5 / Phenom II x2 550 @ 3.4 GHz / 2x1GB Corsair Dominator DDR2 1066 MHz / Gigabyte Radeon 4550 512MB / ASUS EAH4870X2 2GB@ 800/950 / 2x150GB Velociraptors RAID 0
Hackintosh 2: OS X 10.6.8 / Full-ATX Mac Pro case / Gigabyte GA-MA790FX-UD5P / Phenom x4 9950 @3.2GHz / 4x2GB Corsair Dominator DDR2 1066 MHz / HIS Radeon HD 6950 u/l to 6970 / 2x300GB Velociraptors RAID 0 / 4x2TB WD20EARS Pictures
Reply With Quote