From: Billy Laws blaws05@gmail.com
--- configure.ac | 1 + dlls/ntdll/unix/system.c | 11 +++++++++++ 2 files changed, 12 insertions(+)
diff --git a/configure.ac b/configure.ac index 6596f653fb1..97746ef5565 100644 --- a/configure.ac +++ b/configure.ac @@ -370,6 +370,7 @@ AC_CHECK_HEADERS(\ OpenCL/opencl.h \ arpa/inet.h \ arpa/nameser.h \ + asm/hwcap.h \ asm/termbits.h \ asm/types.h \ asm/user.h \ diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c index 13f37ee8a9a..2e1ee850e3d 100644 --- a/dlls/ntdll/unix/system.c +++ b/dlls/ntdll/unix/system.c @@ -54,6 +54,12 @@ #ifdef HAVE_SYS_RESOURCE_H # include <sys/resource.h> #endif +#ifdef HAVE_ASM_HWCAP_H +# include <asm/hwcap.h> +#endif +#ifdef HAVE_SYS_AUXV_H +# include <sys/auxv.h> +#endif #ifdef __APPLE__ # include <CoreFoundation/CoreFoundation.h> # include <IOKit/IOKitLib.h> @@ -1709,6 +1715,11 @@ static DWORD get_core_id_regs_arm64( struct smbios_wine_id_reg_value_arm64 *regs regs[regidx++] = (struct smbios_wine_id_reg_value_arm64){ 0x4000, value }; }
+ if (!(getauxval(AT_HWCAP) & HWCAP_CPUID)) { + FIXME("Skipping ID register population as kernel is missing emulation support.\n"); + return regidx; + } + #define STR(a) #a #define READ_ID_REG(reg_id) \ /* mrs x0, #reg_id */ \