diff --git a/Changelog.md b/Changelog.md index b1c50a6c98716aa7783ed7d9710dee11860a6832..a5b9009884f2324eb803f41095790d93f7ea21e9 100644 --- a/Changelog.md +++ b/Changelog.md @@ -18,6 +18,7 @@ OpenCore Changelog - Removed `KeyMergeThreshold` as it never functioned anyway - Added `acdtinfo` utility to lookup certain products - Fixed `FSBFrequency` calculation with fractional multiplier +- Fixed showing core count for some AMD CPUs #### v0.6.6 - Added keyboard and pointer entry scroll support in OpenCanopy diff --git a/Library/OcCpuLib/OcCpuLib.c b/Library/OcCpuLib/OcCpuLib.c index b4cc62848e54ae10b8bd40a4ab937da4f7ae7342..513507447c674eb2d7dcc3b472524f64c2a2d65d 100755 --- a/Library/OcCpuLib/OcCpuLib.c +++ b/Library/OcCpuLib/OcCpuLib.c @@ -525,13 +525,6 @@ ScanAmdProcessor ( Recalculate = TRUE; DEBUG_CODE_END (); - // - // Faking an Intel Core i5 Processor. - // This value is purely cosmetic, but it makes sense to fake something - // that is somewhat representative of the kind of Processor that's actually - // in the system - // - Cpu->AppleProcessorType = AppleProcessorTypeCorei5Type5; // // get TSC Frequency calculated in OcTimerLib, unless we got it already from virtualization extensions. // FIXME(1): This code assumes the CPU operates in P0. Either ensure it does @@ -551,6 +544,18 @@ ScanAmdProcessor ( Cpu->ThreadCount = (UINT16) (BitFieldRead32 (CpuidEcx, 0, 7) + 1); } + // + // Faking an Intel processor with matching core count if possible. + // This value is purely cosmetic, but it makes sense to fake something + // that is somewhat representative of the kind of Processor that's actually + // in the system + // + if (Cpu->ThreadCount >= 8) { + Cpu->AppleProcessorType = AppleProcessorTypeXeonW; + } else { + Cpu->AppleProcessorType = AppleProcessorTypeCorei5Type5; + } + if (Cpu->Family == AMD_CPU_FAMILY) { Divisor = 0; CoreFrequencyID = 0;