aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2026-07-01 23:29:04 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2026-07-01 23:37:40 +0000
commitcf851111b02fae7425f9642460762d644983fdca (patch)
tree2c8e1728cecbc718998eb5d2f66938e11925a56b
parent6d9bc46cd7fc48ece597162d3ca413fc9d67b5f0 (diff)
x86: add CPUID bits for SHA512/SM3/SM4
Reviewed by: mav Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D58003
-rw-r--r--sys/x86/include/specialreg.h3
-rw-r--r--sys/x86/x86/identcpu.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/specialreg.h
index edf281225180..66ae3ed581f4 100644
--- a/sys/x86/include/specialreg.h
+++ b/sys/x86/include/specialreg.h
@@ -549,6 +549,9 @@
/*
* CPUID instruction 7 Structured Extended Features, leaf 1 eax info
*/
+#define CPUID_STDEXT4_SHA512 0x00000001
+#define CPUID_STDEXT4_SM3 0x00000002
+#define CPUID_STDEXT4_SM4 0x00000004
#define CPUID_STDEXT4_LASS 0x00000040
#define CPUID_STDEXT4_FRED 0x00020000
#define CPUID_STDEXT4_LKGS 0x00040000
diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c
index 75144ccae8bc..3060b444cb0d 100644
--- a/sys/x86/x86/identcpu.c
+++ b/sys/x86/x86/identcpu.c
@@ -1052,6 +1052,9 @@ printcpuinfo(void)
printf("\n Structured Extended Features4=0x%b",
cpu_stdext_feature4,
"\020"
+ "\001SHA512"
+ "\002SM3"
+ "\003SM4"
"\007LASS"
"\022FRED"
"\023LKGS"