summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2019-06-14 18:13:55 +0000
committerkettenis <kettenis@openbsd.org>2019-06-14 18:13:55 +0000
commit608f1e2f5f100af2d9643dc76da33962239bd85e (patch)
tree9428a26e1e7edfde4d20ce04cc11475a71f510be
parenttimeout_add(9)+hz(9) -> timeout_add_sec(9); ok patrick@ (diff)
downloadwireguard-openbsd-608f1e2f5f100af2d9643dc76da33962239bd85e.tar.xz
wireguard-openbsd-608f1e2f5f100af2d9643dc76da33962239bd85e.zip
Add TSC_ADJUST CPUID flag.
ok deraadt@, mlarkin@
-rw-r--r--sys/arch/amd64/amd64/identcpu.c3
-rw-r--r--sys/arch/amd64/include/specialreg.h3
-rw-r--r--sys/arch/i386/i386/machdep.c3
-rw-r--r--sys/arch/i386/include/specialreg.h3
4 files changed, 8 insertions, 4 deletions
diff --git a/sys/arch/amd64/amd64/identcpu.c b/sys/arch/amd64/amd64/identcpu.c
index 11fa3323d5e..459fd0a6ac4 100644
--- a/sys/arch/amd64/amd64/identcpu.c
+++ b/sys/arch/amd64/amd64/identcpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: identcpu.c,v 1.112 2019/05/28 18:20:01 guenther Exp $ */
+/* $OpenBSD: identcpu.c,v 1.113 2019/06/14 18:13:55 kettenis Exp $ */
/* $NetBSD: identcpu.c,v 1.1 2003/04/26 18:39:28 fvdl Exp $ */
/*
@@ -172,6 +172,7 @@ const struct {
{ CPUIDECX_MWAITX, "MWAITX" },
}, cpu_seff0_ebxfeatures[] = {
{ SEFF0EBX_FSGSBASE, "FSGSBASE" },
+ { SEFF0EBX_TSC_ADJUST, "TSC_ADJUST" },
{ SEFF0EBX_SGX, "SGX" },
{ SEFF0EBX_BMI1, "BMI1" },
{ SEFF0EBX_HLE, "HLE" },
diff --git a/sys/arch/amd64/include/specialreg.h b/sys/arch/amd64/include/specialreg.h
index a34d39e14d5..bb8c1539bde 100644
--- a/sys/arch/amd64/include/specialreg.h
+++ b/sys/arch/amd64/include/specialreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: specialreg.h,v 1.84 2019/05/17 19:07:16 guenther Exp $ */
+/* $OpenBSD: specialreg.h,v 1.85 2019/06/14 18:13:55 kettenis Exp $ */
/* $NetBSD: specialreg.h,v 1.1 2003/04/26 18:39:48 fvdl Exp $ */
/* $NetBSD: x86/specialreg.h,v 1.2 2003/04/25 21:54:30 fvdl Exp $ */
@@ -185,6 +185,7 @@
* EBX bits
*/
#define SEFF0EBX_FSGSBASE 0x00000001 /* {RD,WR}[FG]SBASE instructions */
+#define SEFF0EBX_TSC_ADJUST 0x00000002 /* Has IA32_TSC_ADJUST MSR */
#define SEFF0EBX_SGX 0x00000004 /* Software Guard Extensions */
#define SEFF0EBX_BMI1 0x00000008 /* advanced bit manipulation */
#define SEFF0EBX_HLE 0x00000010 /* Hardware Lock Elision */
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 6519d8823e1..765d8dd57ab 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.630 2019/04/01 07:00:51 tedu Exp $ */
+/* $OpenBSD: machdep.c,v 1.631 2019/06/14 18:13:55 kettenis Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -1059,6 +1059,7 @@ const struct cpu_cpuid_feature i386_ecpuid_ecxfeatures[] = {
const struct cpu_cpuid_feature cpu_seff0_ebxfeatures[] = {
{ SEFF0EBX_FSGSBASE, "FSGSBASE" },
+ { SEFF0EBX_TSC_ADJUST, "TSC_ADJUST" },
{ SEFF0EBX_SGX, "SGX" },
{ SEFF0EBX_BMI1, "BMI1" },
{ SEFF0EBX_HLE, "HLE" },
diff --git a/sys/arch/i386/include/specialreg.h b/sys/arch/i386/include/specialreg.h
index 094acfff322..8b1e398a93e 100644
--- a/sys/arch/i386/include/specialreg.h
+++ b/sys/arch/i386/include/specialreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: specialreg.h,v 1.73 2019/01/18 01:34:50 pd Exp $ */
+/* $OpenBSD: specialreg.h,v 1.74 2019/06/14 18:13:55 kettenis Exp $ */
/* $NetBSD: specialreg.h,v 1.7 1994/10/27 04:16:26 cgd Exp $ */
/*-
@@ -174,6 +174,7 @@
* EBX bits
*/
#define SEFF0EBX_FSGSBASE 0x00000001 /* {RD,WR}[FG]SBASE instructions */
+#define SEFF0EBX_TSC_ADJUST 0x00000002 /* Has IA32_TSC_ADJUST MSR */
#define SEFF0EBX_SGX 0x00000004 /* Software Guard Extensions */
#define SEFF0EBX_BMI1 0x00000008 /* advanced bit manipulation */
#define SEFF0EBX_HLE 0x00000010 /* Hardware Lock Elision */