[v0.85][ARM] Add SoC field in ARM and remove CPU Name field, which is only valid in x86. Fix Makefile for some strict compilers

This commit is contained in:
Dr-Noob
2020-11-18 23:22:26 +01:00
parent 8c11cb2422
commit c44a646cd1
8 changed files with 92 additions and 21 deletions

View File

@@ -87,6 +87,9 @@ struct cpuInfo* get_cpu_info() {
cpu->hv = malloc(sizeof(struct hypervisor));
cpu->hv->present = false;
cpu->soc = SOC_VENDOR_UNKNOWN;
cpu->soc_name = malloc(sizeof(char)*(strlen(STRING_UNKNOWN)+1));
snprintf(cpu->soc_name, strlen(STRING_UNKNOWN)+1, STRING_UNKNOWN);
return cpu;
}
@@ -188,6 +191,10 @@ char* get_str_peak_performance(struct cpuInfo* cpu, struct topology* topo, int64
return string;
}
char* get_soc_name(struct cpuInfo* cpu) {
return cpu->soc_name;
}
void free_topo_struct(struct topology* topo) {
free(topo);
}