ntdll: Get available CPU info from FreeBSD on ARM.

This commit is contained in:
André Hentschel 2015-03-26 23:17:53 +01:00 committed by Alexandre Julliard
parent 2b5deddc05
commit 472340052a
1 changed files with 13 additions and 0 deletions

View File

@ -1123,6 +1123,19 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
}
fclose(f);
}
#elif defined(__FreeBSD__)
size_t valsize;
char buf[8];
int value;
valsize = sizeof(buf);
if (!sysctlbyname("hw.machine_arch", &buf, &valsize, NULL, 0) &&
sscanf(buf, "armv%i", &value) == 1)
info->Level = value;
valsize = sizeof(value);
if (!sysctlbyname("hw.floatingpoint", &value, &valsize, NULL, 0))
user_shared_data->ProcessorFeatures[PF_ARM_VFP_32_REGISTERS_AVAILABLE] = value;
#else
FIXME("CPU Feature detection not implemented.\n");
#endif