-/* $OpenBSD: machdep.c,v 1.623 2018/08/01 20:33:53 brynet Exp $ */
+/* $OpenBSD: machdep.c,v 1.624 2018/08/21 06:03:34 jsg Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
{ SEFF0ECX_PKU, "PKU" },
};
+const struct cpu_cpuid_feature cpu_seff0_edxfeatures[] = {
+ { SEFF0EDX_AVX512_4FNNIW, "AVX512FNNIW" },
+ { SEFF0EDX_AVX512_4FMAPS, "AVX512FMAPS" },
+ { SEFF0EDX_IBRS, "IBRS,IBPB" },
+ { SEFF0EDX_STIBP, "STIBP" },
+ { SEFF0EDX_L1DF, "L1DF" },
+ /* SEFF0EDX_ARCH_CAP (not printed) */
+ { SEFF0EDX_SSBD, "SSBD" },
+};
+
const struct cpu_cpuid_feature cpu_tpm_eaxfeatures[] = {
{ TPM_SENSOR, "SENSOR" },
{ TPM_ARAT, "ARAT" },
/* "Structured Extended Feature Flags" */
CPUID_LEAF(0x7, 0, dummy,
ci->ci_feature_sefflags_ebx,
- ci->ci_feature_sefflags_ecx, dummy);
+ ci->ci_feature_sefflags_ecx,
+ ci->ci_feature_sefflags_edx);
for (i = 0; i < nitems(cpu_seff0_ebxfeatures); i++)
if (ci->ci_feature_sefflags_ebx &
cpu_seff0_ebxfeatures[i].feature_bit)
printf("%s%s",
(numbits == 0 ? "" : ","),
cpu_seff0_ecxfeatures[i].feature_name);
+ for (i = 0; i < nitems(cpu_seff0_edxfeatures); i++)
+ if (ci->ci_feature_sefflags_edx &
+ cpu_seff0_edxfeatures[i].feature_bit)
+ printf("%s%s",
+ (numbits == 0 ? "" : ","),
+ cpu_seff0_edxfeatures[i].feature_name);
}
if (!strcmp(cpu_vendor, "GenuineIntel") &&
-/* $OpenBSD: cpu.h,v 1.164 2018/07/09 19:20:30 guenther Exp $ */
+/* $OpenBSD: cpu.h,v 1.165 2018/08/21 06:03:34 jsg Exp $ */
/* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */
/*-
u_int32_t ci_feature_flags; /* X86 CPUID feature bits */
u_int32_t ci_feature_sefflags_ebx;/* more CPUID feature bits */
u_int32_t ci_feature_sefflags_ecx;/* more CPUID feature bits */
+ u_int32_t ci_feature_sefflags_edx;/* more CPUID feature bits */
u_int32_t ci_feature_tpmflags; /* thermal & power bits */
u_int32_t cpu_class; /* CPU class */
u_int32_t ci_cflushsz; /* clflush cache-line size */