提交 8e90a2f0 编写于 作者: V vit9696

OcCpuLib: Fixed showing core count for some AMD CPUs

上级 e2f219e0
......@@ -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
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册