diff --git a/cpuid_arm.c b/cpuid_arm.c index 6485003f3..fe462c04a 100644 --- a/cpuid_arm.c +++ b/cpuid_arm.c @@ -115,6 +115,9 @@ int detect(void) if (strstr(p, "0xc0f")) { return CPU_CORTEXA15; } + if (strstr(p, "0xd07")) { + return CPU_ARMV7; //ARMV8 on 32-bit + } } @@ -158,6 +161,27 @@ int detect(void) } + + p = (char *) NULL ; + infile = fopen("/proc/cpuinfo", "r"); + + while (fgets(buffer, sizeof(buffer), infile)) + { + + if ((!strncmp("CPU architecture", buffer, 16))) + { + p = strchr(buffer, ':') + 2; + break; + } + } + fclose(infile); + if(p != NULL) { + if (strstr(p, "8")) { + return CPU_ARMV7; //ARMV8 on 32-bit + } + + } + #endif return CPU_UNKNOWN;