[v1.05] Implement new approach to infer SoC from the uarch. Add support for Kunpeng SoCs

This commit is contained in:
Dr-Noob
2024-02-08 09:04:51 +00:00
parent b610dc8c7d
commit c01f60fa6c
14 changed files with 171 additions and 97 deletions

View File

@@ -237,7 +237,7 @@ struct cpuInfo* get_cpu_info_linux(struct cpuInfo* cpu) {
cpu->num_cpus = sockets;
cpu->hv = emalloc(sizeof(struct hypervisor));
cpu->hv->present = false;
cpu->soc = get_soc();
cpu->soc = get_soc(cpu);
cpu->peak_performance = get_peak_performance(cpu);
return cpu;
@@ -374,19 +374,19 @@ struct cpuInfo* get_cpu_info_mach(struct cpuInfo* cpu) {
// the CPU is an Apple SoC
if(cpu_family == CPUFAMILY_ARM_FIRESTORM_ICESTORM) {
fill_cpu_info_firestorm_icestorm(cpu, pcores, ecores);
cpu->soc = get_soc();
cpu->soc = get_soc(cpu);
cpu->peak_performance = get_peak_performance(cpu);
}
else if(cpu_family == CPUFAMILY_ARM_AVALANCHE_BLIZZARD) {
fill_cpu_info_avalanche_blizzard(cpu, pcores, ecores);
cpu->soc = get_soc();
cpu->soc = get_soc(cpu);
cpu->peak_performance = get_peak_performance(cpu);
}
else if(cpu_family == CPUFAMILY_ARM_EVEREST_SAWTOOTH ||
cpu_family == CPUFAMILY_ARM_EVEREST_SAWTOOTH_PRO ||
cpu_family == CPUFAMILY_ARM_EVEREST_SAWTOOTH_MAX) {
fill_cpu_info_everest_sawtooth(cpu, pcores, ecores);
cpu->soc = get_soc();
cpu->soc = get_soc(cpu);
cpu->peak_performance = get_peak_performance(cpu);
}
else {