Checking CPU capabilities

Mayuresh Kathe mayuresh at kathe.in
Sat Feb 2 17:58:13 UTC 2019


On 2019-02-02 11:06 PM, Arthur Chance wrote:
> On 02/02/2019 17:14, Mayuresh Kathe wrote:
>> I am not on a FreeBSD system at the moment, and don't have access to 
>> one
>> either.
>> 
>> On 2019-02-02 10:26 PM, Herbert Laubner wrote:
>>> You could try
>>> 
>>> $ grep Features /var/run/dmesg.boot  | grep --colour -e AVX
>>> 
>>> Am 02.02.19 um 22:09 schrieb Mayuresh Kathe:
>>>> On 2019-02-02 09:46 PM, Chris Hill wrote:
>>>>> On Sat, 2 Feb 2019, Mayuresh Kathe wrote:
>>>>> 
>>>>>> Under Linux it is `cat /proc/cpuinfo`
>>>>>> Under Solaris it is `isainfo -v`
>>>>>> What is it under FreeBSD 12?
>>>>> 
>>>>> Something like
>>>>>   $ grep Features /var/run/dmesg.boot
>>>>> ...or am I missing something?
>>>> 
>>>> I need to know if my processor supports AVX, AVX2, AVX-512, SIMD, 
>>>> etc.
>>>> Would your approach give me that sort of information?
>>>> 
> 
> As an example, here's what happens on my desktop machine, which is an
> Intel i7-4790K
> 
> root at arthur:5# grep Features /var/run/dmesg.boot
> Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
> Features2=0x7ffafbbf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,SDBG,FMA,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
>   AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
>   AMD Features2=0x21<LAHF,ABM>
>   Structured Extended
> Features=0x2fbb<FSGSBASE,TSCADJ,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,NFPUSG>
>   XSAVE Features=0x1<XSAVEOPT>

Thanks for that Arthur.


More information about the freebsd-questions mailing list