diff options
author | kib <kib@FreeBSD.org> | 2014-12-23 11:55:53 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-12-23 11:55:53 +0000 |
commit | 5a03dd693d913ad7976ea26432589000f96f3dba (patch) | |
tree | 2dd17b9aeccb18d598927ffa91ff8a7cfba54630 /sys/x86 | |
parent | 8ae47063b124267405ecc2e0afb72edb1657690d (diff) | |
download | FreeBSD-src-5a03dd693d913ad7976ea26432589000f96f3dba.zip FreeBSD-src-5a03dd693d913ad7976ea26432589000f96f3dba.tar.gz |
MFC r271197:
Add more bits for the XSAVE features from CPUID 0xd, sub-function 1
%eax report. Print the XSAVE features 0xd/1 in the boot banner.
Diffstat (limited to 'sys/x86')
-rw-r--r-- | sys/x86/include/specialreg.h | 3 | ||||
-rw-r--r-- | sys/x86/x86/identcpu.c | 13 |
2 files changed, 16 insertions, 0 deletions
diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/specialreg.h index 8610684..5ac1075 100644 --- a/sys/x86/include/specialreg.h +++ b/sys/x86/include/specialreg.h @@ -296,6 +296,9 @@ * CPUID instruction 0xd Processor Extended State Enumeration Sub-leaf 1 */ #define CPUID_EXTSTATE_XSAVEOPT 0x00000001 +#define CPUID_EXTSTATE_XSAVEC 0x00000002 +#define CPUID_EXTSTATE_XINUSE 0x00000004 +#define CPUID_EXTSTATE_XSAVES 0x00000008 /* * AMD extended function 8000_0007h edx info diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index da24761..8d4b5d7 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -913,6 +913,19 @@ printcpuinfo(void) ); } + if ((cpu_feature2 & CPUID2_XSAVE) != 0) { + cpuid_count(0xd, 0x1, regs); + if (regs[0] != 0) { + printf("\n XSAVE Features=0x%b", + regs[0], + "\020" + "\001XSAVEOPT" + "\002XSAVEC" + "\003XINUSE" + "\004XSAVES"); + } + } + if (via_feature_rng != 0 || via_feature_xcrypt != 0) print_via_padlock_info(); |