mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 16:00:39 +01:00
[v1.04][ARM] Fix SoC detection
This commit is contained in:
@@ -886,27 +886,21 @@ struct system_on_chip* guess_soc_apple(struct system_on_chip* soc) {
|
||||
soc->soc_vendor = SOC_VENDOR_UNKNOWN;
|
||||
}
|
||||
}
|
||||
else if(cpu_family == CPUFAMILY_ARM_EVEREST_SAWTOOTH) {
|
||||
else if(cpu_family == CPUFAMILY_ARM_EVEREST_SAWTOOTH ||
|
||||
cpu_family == CPUFAMILY_ARM_EVEREST_SAWTOOTH_PRO ||
|
||||
cpu_family == CPUFAMILY_ARM_EVEREST_SAWTOOTH_MAX) {
|
||||
// Check M3 version
|
||||
if(cpu_subfamily == CPUSUBFAMILY_ARM_HG) {
|
||||
if(cpu_family == CPUFAMILY_ARM_EVEREST_SAWTOOTH) {
|
||||
fill_soc(soc, "M3", SOC_APPLE_M3, 3);
|
||||
}
|
||||
else if(cpu_subfamily == CPUSUBFAMILY_ARM_HS) {
|
||||
else if(cpu_family == CPUFAMILY_ARM_EVEREST_SAWTOOTH_PRO) {
|
||||
fill_soc(soc, "M3 Pro", SOC_APPLE_M3_PRO, 3);
|
||||
}
|
||||
else if(cpu_subfamily == CPUSUBFAMILY_ARM_HC_HD) {
|
||||
// Should be M3 Max
|
||||
uint32_t physicalcpu = get_sys_info_by_name("hw.physicalcpu");
|
||||
if(physicalcpu >= 14 && physicalcpu <= 16) {
|
||||
fill_soc(soc, "M3 Ultra", SOC_APPLE_M3_MAX, 3);
|
||||
else if(cpu_family == CPUFAMILY_ARM_EVEREST_SAWTOOTH_MAX) {
|
||||
fill_soc(soc, "M3 Max", SOC_APPLE_M3_MAX, 3);
|
||||
}
|
||||
else {
|
||||
printBug("Found invalid physical cpu number: %d", physicalcpu);
|
||||
soc->soc_vendor = SOC_VENDOR_UNKNOWN;
|
||||
}
|
||||
}
|
||||
else {
|
||||
printBug("Found invalid cpu_subfamily: 0x%.8X", cpu_subfamily);
|
||||
printBug("Found invalid cpu_family: 0x%.8X", cpu_family);
|
||||
soc->soc_vendor = SOC_VENDOR_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user