[v0.90][ARM] Print right number of cores and frequency for each CPU

This commit is contained in:
Dr-Noob
2020-11-24 16:17:53 +01:00
parent 233565c052
commit 37e849978a
5 changed files with 39 additions and 39 deletions

View File

@@ -26,14 +26,15 @@ VENDOR get_cpu_vendor(struct cpuInfo* cpu) {
return cpu->cpu_vendor;
}
uint32_t get_nsockets(struct topology* topo) {
return topo->sockets;
}
int64_t get_freq(struct frequency* freq) {
return freq->max;
}
#ifdef ARCH_X86
char* get_str_cpu_name(struct cpuInfo* cpu) {
return cpu->cpu_name;
}
char* get_str_sockets(struct topology* topo) {
char* string = malloc(sizeof(char) * 2);
int32_t sanity_ret = snprintf(string, 2, "%d", topo->sockets);
@@ -44,9 +45,8 @@ char* get_str_sockets(struct topology* topo) {
return string;
}
#ifdef ARCH_X86
char* get_str_cpu_name(struct cpuInfo* cpu) {
return cpu->cpu_name;
uint32_t get_nsockets(struct topology* topo) {
return topo->sockets;
}
#endif