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. The printcpuinfo() is executed late enough so that XSAVE is already enabled. There is no known to me off the shelf hardware that implements any feature bits except XSAVEOPT, the list is taken from SDM rev. 50. The banner printing will allow us to note the hardware arrival. Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
985da6db1c
commit
dc7c2b07da
@ -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
|
||||
|
@ -932,6 +932,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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user