diff options
author | 2016-06-28 05:37:50 +0000 | |
---|---|---|
committer | 2016-06-28 05:37:50 +0000 | |
commit | 2f4e497e249bea4b96f995b1c0564bb8d367685a (patch) | |
tree | cf2e950dda02822e3f2316e99376b2188798de0c /sys | |
parent | enable ure(4) where we already have url(4) (diff) | |
download | wireguard-openbsd-2f4e497e249bea4b96f995b1c0564bb8d367685a.tar.xz wireguard-openbsd-2f4e497e249bea4b96f995b1c0564bb8d367685a.zip |
Enable UMIP feature if present. miod originally pointed this out to me.
ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/amd64/cpu.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/i386/cpu.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/cpu.c b/sys/arch/amd64/amd64/cpu.c index 92a548d84dc..c1dedf9115d 100644 --- a/sys/arch/amd64/amd64/cpu.c +++ b/sys/arch/amd64/amd64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.100 2016/06/08 01:00:18 tedu Exp $ */ +/* $OpenBSD: cpu.c,v 1.101 2016/06/28 05:37:50 mlarkin Exp $ */ /* $NetBSD: cpu.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */ /*- @@ -500,6 +500,8 @@ cpu_init(struct cpu_info *ci) cr4 |= CR4_SMAP; if (ci->ci_feature_sefflags_ebx & SEFF0EBX_FSGSBASE) cr4 |= CR4_FSGSBASE; + if (ci->ci_feature_sefflags_ecx & SEFF0ECX_UMIP) + cr4 |= CR4_UMIP; #endif if (cpu_ecxfeature & CPUIDECX_XSAVE) cr4 |= CR4_OSXSAVE; diff --git a/sys/arch/i386/i386/cpu.c b/sys/arch/i386/i386/cpu.c index 1e9147c3900..acc1f6a73a4 100644 --- a/sys/arch/i386/i386/cpu.c +++ b/sys/arch/i386/i386/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.77 2016/05/18 03:45:11 mlarkin Exp $ */ +/* $OpenBSD: cpu.c,v 1.78 2016/06/28 05:37:50 mlarkin Exp $ */ /* $NetBSD: cpu.c,v 1.1.2.7 2000/06/26 02:04:05 sommerfeld Exp $ */ /*- @@ -379,6 +379,8 @@ cpu_init(struct cpu_info *ci) #ifndef SMALL_KERNEL if (ci->ci_feature_sefflags_ebx & SEFF0EBX_SMAP) cr4 |= CR4_SMAP; + if (ci->ci_feature_sefflags_ecx & SEFF0ECX_UMIP) + cr4 |= CR4_UMIP; #endif /* |