diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-06-14 04:18:00 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-06-14 04:18:00 +0000 |
commit | fa52af93425ee1979f354db4cad05c64b4ebd0ae (patch) | |
tree | 37194d15e15546cc0dbba4cd1fd208f4fb5e814e /sys/arch | |
parent | 715b6cce0bac61bc48f2c95e518eef1d3dca22d3 (diff) |
support for getting the cpu type through sysctl, same as on sparc.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc64/include/cpu.h | 5 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/machdep.c | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/sparc64/include/cpu.h b/sys/arch/sparc64/include/cpu.h index 9347a7c338e..ba65918f23d 100644 --- a/sys/arch/sparc64/include/cpu.h +++ b/sys/arch/sparc64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.12 2002/06/11 10:57:51 art Exp $ */ +/* $OpenBSD: cpu.h,v 1.13 2002/06/14 04:17:59 art Exp $ */ /* $NetBSD: cpu.h,v 1.28 2001/06/14 22:56:58 thorpej Exp $ */ /* @@ -54,7 +54,8 @@ #define CPU_BOOTED_KERNEL 1 /* string: booted kernel name */ #define CPU_LED_BLINK 2 /* int: blink leds? */ #define CPU_ALLOWAPERTURE 3 /* allow xf86 operations */ -#define CPU_MAXID 4 /* number of valid machdep ids */ +#define CPU_CPUTYPE 4 /* cpu type */ +#define CPU_MAXID 5 /* number of valid machdep ids */ #define CTL_MACHDEP_NAMES { \ { 0, 0 }, \ diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c index fd97bc20753..ac9a1de0fe1 100644 --- a/sys/arch/sparc64/sparc64/machdep.c +++ b/sys/arch/sparc64/sparc64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.41 2002/03/27 15:12:22 jason Exp $ */ +/* $OpenBSD: machdep.c,v 1.42 2002/06/14 04:17:59 art Exp $ */ /* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */ /*- @@ -612,6 +612,8 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) #else return (sysctl_rdint(oldp, oldlenp, newp, 0)); #endif + case CPU_CPUTYPE: + return (sysctl_rdint(oldp, oldlenp, newp, CPU_SUN4U)); default: return (EOPNOTSUPP); } |