[v0.98][PPC] Add part number detection using linux device tree

This commit is contained in:
Dr-Noob
2021-08-05 10:06:16 +02:00
parent bcdd5267b2
commit 921e815470
5 changed files with 18 additions and 10 deletions

View File

@@ -32,13 +32,11 @@ int64_t get_freq(struct frequency* freq) {
return freq->max;
}
#ifdef ARCH_X86
#if defined(ARCH_X86) || defined(ARCH_PPC)
char* get_str_cpu_name(struct cpuInfo* cpu) {
return cpu->cpu_name;
}
#endif
#if defined(ARCH_X86) || defined(ARCH_PPC)
char* get_str_sockets(struct topology* topo) {
char* string = emalloc(sizeof(char) * 2);
int32_t sanity_ret = snprintf(string, 2, "%d", topo->sockets);