diff --git a/README.md b/README.md index 3a6470f..8f7b37c 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,8 @@ cpufetch is a command-line tool written in C that displays the CPU information i - [4.2 Specifying the colors in RGB format](#42-specifying-the-colors-in-rgb-format) - [5. Implementation](#5-implementation) - [6. Bugs or improvements](#6-bugs-or-improvements) + - [6.1 Unknown microarchitecture error](#61-unknown-microarchitecture-error) + - [6.2 Other situations](#62-other-situations) - [7. Acknowledgements](#7-acknowledgements) - [8. cpufetch for GPUs (gpufetch)](#8-cpufetch-for-gpus-gpufetch) @@ -147,6 +149,21 @@ By default, `cpufetch` will print the CPU logo with the system colorscheme. Howe See [cpufetch programming documentation](https://github.com/Dr-Noob/cpufetch/tree/master/doc). ## 6. Bugs or improvements +### 6.1 Unknown microarchitecture error +If you get the `Unknown microarchitecture detected` error when running cpufetch, it might be caused by two possible reasons: + +1. You are running an old release of cpufetch (most likely) +2. Your microarchitecture is not yet supported + +Download and compile the latest version (see https://github.com/Dr-Noob/cpufetch#22-building-from-source for instructions) +and verify if the error persists. + +* __If the error dissapears__: It means that this is the first situation. In this case, just use the +latest version of cpufetch which already has support for your hardware. +* __If the error does not dissapear__: It means that this is the +second situation. In this case, please create a new issue with the error message and the output of 'cpufetch --debug' on https://github.com/Dr-Noob/cpufetch/issues + +### 6.2 Other situations See [cpufetch contributing guidelines](https://github.com/Dr-Noob/cpufetch/blob/master/CONTRIBUTING.md). ## 7. Acknowledgements diff --git a/src/arm/uarch.c b/src/arm/uarch.c index 8b22614..4f73eb6 100644 --- a/src/arm/uarch.c +++ b/src/arm/uarch.c @@ -198,7 +198,9 @@ static char* isas_string[] = { #define UARCH_START if (false) {} #define CHECK_UARCH(arch, cpu, im_, p_, v_, r_, str, uarch, vendor) \ else if (im_ == im && p_ == p && (v_ == NA || v_ == v) && (r_ == NA || r_ == r)) fill_uarch(arch, cpu, str, uarch, vendor); -#define UARCH_END else { printBug("Unknown microarchitecture detected: IM=0x%.8X P=0x%.8X V=0x%.8X R=0x%.8X", im, p, v, r); fill_uarch(arch, cpu, "Unknown", UARCH_UNKNOWN, CPU_VENDOR_UNKNOWN); } +#define UARCH_END else { printErr("Unknown microarchitecture detected: IM=0x%X P=0x%X V=0x%X R=0x%X", im, p, v, r); \ +fprintf(stderr, "Please see https://github.com/Dr-Noob/cpufetch#61-unknown-microarchitecture-error to know how to report this error\n"); \ +fill_uarch(arch, cpu, "Unknown", UARCH_UNKNOWN, CPU_VENDOR_UNKNOWN); } void fill_uarch(struct uarch* arch, struct cpuInfo* cpu, char* str, MICROARCH u, VENDOR vendor) { arch->uarch = u; diff --git a/src/x86/uarch.c b/src/x86/uarch.c index 238f981..b7449c2 100644 --- a/src/x86/uarch.c +++ b/src/x86/uarch.c @@ -125,7 +125,9 @@ struct uarch { #define UARCH_START if (false) {} #define CHECK_UARCH(arch, ef_, f_, em_, m_, s_, str, uarch, process) \ else if (ef_ == ef && f_ == f && (em_ == NA || em_ == em) && (m_ == NA || m_ == m) && (s_ == NA || s_ == s)) fill_uarch(arch, str, uarch, process); -#define UARCH_END else { printBug("Unknown microarchitecture detected: M=0x%.8X EM=0x%.8X F=0x%.8X EF=0x%.8X S=0x%.8X", m, em, f, ef, s); fill_uarch(arch, STRING_UNKNOWN, UARCH_UNKNOWN, 0); } +#define UARCH_END else { printErr("Unknown microarchitecture detected: M=0x%X EM=0x%X F=0x%X EF=0x%X S=0x%X", m, em, f, ef, s); \ +fprintf(stderr, "Please see https://github.com/Dr-Noob/cpufetch#61-unknown-microarchitecture-error to know how to report this error\n"); \ +fill_uarch(arch, STRING_UNKNOWN, UARCH_UNKNOWN, UNK); } void fill_uarch(struct uarch* arch, char* str, MICROARCH u, uint32_t process) { arch->uarch_str = emalloc(sizeof(char) * (strlen(str)+1));