Skip to content

Commit 07d1e56

Browse files
committed
[v1.01] Merge bugfix branch
2 parents 0ea0754 + a426f23 commit 07d1e56

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

src/arm/uarch.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ enum {
103103
UARCH_BRAHMA_B15,
104104
UARCH_BRAHMA_B53,
105105
UARCH_XGENE, // Applied Micro X-Gene.
106-
UARCH_TAISHAN_V110 // HiSilicon TaiShan v110 (Huawei Kunpeng 920 series processors).
106+
UARCH_TAISHAN_V110, // HiSilicon TaiShan v110 (Huawei Kunpeng 920 series processors).
107+
// PHYTIUM
108+
UARCH_XIAOMI, // Not to be confused with Xiaomi Inc
107109
};
108110

109111
static const ISA isas_uarch[] = {
@@ -156,6 +158,7 @@ static const ISA isas_uarch[] = {
156158
[UARCH_ICESTORM] = ISA_ARMv8_4_A,
157159
[UARCH_FIRESTORM] = ISA_ARMv8_4_A,
158160
[UARCH_PJ4] = ISA_ARMv7_A,
161+
[UARCH_XIAOMI] = ISA_ARMv8_A,
159162
};
160163

161164
static char* isas_string[] = {
@@ -289,6 +292,9 @@ struct uarch* get_uarch_from_midr(uint32_t midr, struct cpuInfo* cpu) {
289292
CHECK_UARCH(arch, cpu, 'S', 0x003, 1, NA, "Exynos M4", UARCH_EXYNOS_M4, CPU_VENDOR_SAMSUNG) // Exynos 9820
290293
CHECK_UARCH(arch, cpu, 'S', 0x004, 1, NA, "Exynos M5", UARCH_EXYNOS_M5, CPU_VENDOR_SAMSUNG) // Exynos 9820 (this one looks wrong at uarch.c ...)
291294

295+
CHECK_UARCH(arch, cpu, 'p', 0x663, 1, NA, "Xiaomi", UARCH_XIAOMI, CPU_VENDOR_PHYTIUM) // From a fellow contributor (https://github.com/Dr-Noob/cpufetch/issues/125)
296+
// Also interesting: https://en.wikipedia.org/wiki/FeiTeng_(processor)
297+
292298
CHECK_UARCH(arch, cpu, 'a', 0x022, NA, NA, "Icestorm", UARCH_ICESTORM, CPU_VENDOR_APPLE)
293299
CHECK_UARCH(arch, cpu, 'a', 0x023, NA, NA, "Firestorm", UARCH_FIRESTORM, CPU_VENDOR_APPLE)
294300

src/common/cpu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ enum {
1919
CPU_VENDOR_HUAWUEI,
2020
CPU_VENDOR_SAMSUNG,
2121
CPU_VENDOR_MARVELL,
22+
CPU_VENDOR_PHYTIUM,
2223
// OTHERS
2324
CPU_VENDOR_UNKNOWN,
2425
CPU_VENDOR_INVALID

src/common/global.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void printBug(const char *fmt, ...) {
6060
#if defined(ARCH_X86) || defined(ARCH_PPC)
6161
fprintf(stderr, "Please, create a new issue with this error message, the output of 'cpufetch' and 'cpufetch --debug' on https://github.com/Dr-Noob/cpufetch/issues\n");
6262
#elif ARCH_ARM
63-
fprintf(stderr, "Please, create a new issue with this error message, your smartphone/computer model, the output of 'cpufetch' and 'cpufetch --debug' on https://github.com/Dr-Noob/cpufetch/issues\n");
63+
fprintf(stderr, "Please, create a new issue with this error message, your smartphone/computer model, the output of 'cpufetch --verbose' and 'cpufetch --debug' on https://github.com/Dr-Noob/cpufetch/issues\n");
6464
#endif
6565
}
6666

0 commit comments

Comments
 (0)