mirror of
https://github.com/memtest86plus/memtest86plus.git
synced 2025-02-25 18:55:23 -06:00
Support cache and temperature info for VIA/Centaur/Zhaoxin CPUs (#259)
* Support cache and temperature info for VIA/Centaur/Zhaoxin CPUs Use extended CPUID for VIA C3/C7/Nano cache information. Use MSR reads for Nano/Zhaoxin and VIA C7 processor temperature. Tested on VIA C7-D 1.5GHz. * Small code conventions fixes * Fix overallocation of cpuid_cache_info_t union (From PR #263) --------- Co-authored-by: Sam Demeulemeester <github@x86-secret.com>
This commit is contained in:
@@ -128,6 +128,26 @@ void cpuid_init(void)
|
||||
);
|
||||
}
|
||||
break;
|
||||
case 'C':
|
||||
if (cpuid_info.vendor_id.str[5] == 'I') break; // Cyrix
|
||||
// VIA / CentaurHauls
|
||||
if (cpuid_info.max_xcpuid >= 0x80000005) {
|
||||
cpuid(0x80000005, 0,
|
||||
®[0],
|
||||
®[1],
|
||||
&cpuid_info.cache_info.raw[0],
|
||||
&cpuid_info.cache_info.raw[1]
|
||||
);
|
||||
}
|
||||
if (cpuid_info.max_xcpuid >= 0x80000006) {
|
||||
cpuid(0x80000006, 0,
|
||||
®[0],
|
||||
®[1],
|
||||
&cpuid_info.cache_info.raw[2],
|
||||
&cpuid_info.cache_info.raw[3]
|
||||
);
|
||||
}
|
||||
break;
|
||||
case 'G':
|
||||
// Intel Processors
|
||||
// No cpuid info to read.
|
||||
|
||||
Reference in New Issue
Block a user