mirror of
https://github.com/memtest86plus/memtest86plus.git
synced 2025-02-25 18:55:23 -06:00
cpuinfo: Add support for Vortex86 (#290)
* cpuinfo: Add support for Vortex86 Hardcode cache for family 5, use CPUID cache info for family 6. * cpuinfo: Add support for Vortex86EX The EX does not have brand string so hardcode name and cache. * In determine_cache_size(), add an additional test to ensure that only Vortex86 CPUs are handled, allowing Zhaoxin CPUs to fall through.
This commit is contained in:
@@ -86,6 +86,13 @@ static void determine_cache_size()
|
||||
}
|
||||
// Zhaoxin CPU only
|
||||
/* fall through */
|
||||
case 'V':
|
||||
// Vortex86
|
||||
if (cpuid_info.vendor_id.str[0] == 'V' && cpuid_info.version.family < 6) {
|
||||
// Only family 6 have cache info
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
case 'G':
|
||||
if (cpuid_info.vendor_id.str[9] == 'N') {
|
||||
// National Semiconductor
|
||||
@@ -846,6 +853,37 @@ static void determine_cpu_model(void)
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'V':
|
||||
// Vortex86 SoC
|
||||
switch (cpuid_info.version.family) {
|
||||
case 5:
|
||||
switch (cpuid_info.version.model) {
|
||||
case 2:
|
||||
cpu_model = "Vortex86DX";
|
||||
l1_cache = 16;
|
||||
l2_cache = 256;
|
||||
break;
|
||||
case 8:
|
||||
cpu_model = "Vortex86MX/DX2";
|
||||
l1_cache = 16;
|
||||
l2_cache = 256;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
// Other family 6 models have brand string
|
||||
cpu_model = "Vortex86EX";
|
||||
l1_cache = 16;
|
||||
l2_cache = 128;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// Unknown processor - make a guess at the family.
|
||||
switch (cpuid_info.version.family) {
|
||||
|
||||
Reference in New Issue
Block a user