diff options
author | 2009-07-22 20:33:12 +0000 | |
---|---|---|
committer | 2009-07-22 20:33:12 +0000 | |
commit | edefdba87b46f12c02e072a8d03da3a99a81a7ad (patch) | |
tree | 940d0cdbbc7175520ba31cd4cdbc98b14c15c5e4 /sys | |
parent | Overhaul resource handling and mapping in macepcibr(4): (diff) | |
download | wireguard-openbsd-edefdba87b46f12c02e072a8d03da3a99a81a7ad.tar.xz wireguard-openbsd-edefdba87b46f12c02e072a8d03da3a99a81a7ad.zip |
via nano cpus are amd64, and so we need machdep.xcrypt
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/amd64/identcpu.c | 4 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/machdep.c | 5 | ||||
-rw-r--r-- | sys/arch/amd64/include/cpu.h | 6 |
3 files changed, 9 insertions, 6 deletions
diff --git a/sys/arch/amd64/amd64/identcpu.c b/sys/arch/amd64/amd64/identcpu.c index ec3f32e4032..922d1c13f27 100644 --- a/sys/arch/amd64/amd64/identcpu.c +++ b/sys/arch/amd64/amd64/identcpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: identcpu.c,v 1.20 2009/06/01 03:50:57 gwk Exp $ */ +/* $OpenBSD: identcpu.c,v 1.21 2009/07/22 20:33:12 deraadt Exp $ */ /* $NetBSD: identcpu.c,v 1.1 2003/04/26 18:39:28 fvdl Exp $ */ /* @@ -48,9 +48,7 @@ /* sysctl wants this. */ char cpu_model[48]; int cpuspeed; -#ifdef CRYPTO int amd64_has_xcrypt; -#endif const struct { u_int32_t bit; diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index bb3c8e97c59..14d257736fb 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.96 2009/06/15 17:01:25 beck Exp $ */ +/* $OpenBSD: machdep.c,v 1.97 2009/07/22 20:33:12 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */ /*- @@ -529,6 +529,7 @@ int cpu_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, size_t newlen, struct proc *p) { + extern int amd64_has_xcrypt; dev_t consdev; dev_t dev; @@ -576,6 +577,8 @@ cpu_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, #else return (sysctl_rdint(oldp, oldlenp, newp, 0)); #endif + case CPU_XCRYPT: + return (sysctl_rdint(oldp, oldlenp, newp, amd64_has_xcrypt)); default: return (EOPNOTSUPP); } diff --git a/sys/arch/amd64/include/cpu.h b/sys/arch/amd64/include/cpu.h index 33094933870..42da47be83d 100644 --- a/sys/arch/amd64/include/cpu.h +++ b/sys/arch/amd64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.48 2009/06/09 02:56:38 krw Exp $ */ +/* $OpenBSD: cpu.h,v 1.49 2009/07/22 20:33:13 deraadt Exp $ */ /* $NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */ /*- @@ -340,7 +340,8 @@ void mp_setperf_init(void); #define CPU_APMWARN 9 /* APM battery warning percentage */ #define CPU_KBDRESET 10 /* keyboard reset under pcvt */ #define CPU_APMHALT 11 /* halt -p hack */ -#define CPU_MAXID 12 /* number of valid machdep ids */ +#define CPU_XCRYPT 12 /* supports VIA xcrypt in userland */ +#define CPU_MAXID 13 /* number of valid machdep ids */ #define CTL_MACHDEP_NAMES { \ { 0, 0 }, \ @@ -355,6 +356,7 @@ void mp_setperf_init(void); { "apmwarn", CTLTYPE_INT }, \ { "kbdreset", CTLTYPE_INT }, \ { "apmhalt", CTLTYPE_INT }, \ + { "xcrypt", CTLTYPE_INT }, \ } /* |