diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/hp300/conf/Makefile.hp300 | 38 | ||||
-rw-r--r-- | sys/arch/hp300/include/hp300spu.h | 50 |
2 files changed, 38 insertions, 50 deletions
diff --git a/sys/arch/hp300/conf/Makefile.hp300 b/sys/arch/hp300/conf/Makefile.hp300 index f2e7f128350..104ecd34f4b 100644 --- a/sys/arch/hp300/conf/Makefile.hp300 +++ b/sys/arch/hp300/conf/Makefile.hp300 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.hp300,v 1.22 2001/08/30 22:10:18 miod Exp $ +# $OpenBSD: Makefile.hp300,v 1.23 2001/11/04 02:58:01 miod Exp $ # $NetBSD: Makefile.hp300,v 1.54 1997/04/01 23:16:41 scottr Exp $ # Makefile for OpenBSD @@ -51,6 +51,42 @@ HOSTCC= ${CC} HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//} HOSTED_CFLAGS= ${CFLAGS} +### CPU and MMU configuration + +.if (${IDENT:M-DHP320} != "" || ${IDENT:M-DHP350} != "") +_OPTIONS+= -DM68020 -DM68K_MMU_HP +CPPFLAGS+= -DCACHE_HAVE_VAC +.endif +.if (${IDENT:M-DHP330} != "") +_OPTIONS+= -DM68020 -DM68K_MMU_MOTOROLA +.endif +.if (${IDENT:M-DHP340} != "") +_OPTIONS+= -DM68030 -DM68K_MMU_MOTOROLA +.endif +.if (${IDENT:M-DHP345} != "" || ${IDENT:M-DHP360} != "" || \ + ${IDENT:M-DHP370} != "" || ${IDENT:M-DHP375} != "" || \ + ${IDENT:M-DHP400} != "") +_OPTIONS+= -DM68030 -DM68K_MMU_MOTOROLA +CPPFLAGS+= -DCACHE_HAVE_PAC +.endif +.if (${IDENT:M-DHP380} != "" || ${IDENT:M-DHP385} != "" || \ + ${IDENT:M-DHP425} != "" || ${IDENT:M-DHP433} != "") +_OPTIONS+= -DM68K_MMU_MOTOROLA +CPPFLAGS+= -DM68040 +.endif +.if ${_OPTIONS:M-DM68020} != "" +CPPFLAGS+= -DM68020 +.endif +.if ${_OPTIONS:M-DM68030} != "" +CPPFLAGS+= -DM68030 +.endif +.if ${_OPTIONS:M-DM68K_MMU_HP} != "" +CPPFLAGS+= -DM68K_MMU_HP +.endif +.if ${_OPTIONS:M-DM68K_MMU_MOTOROLA} != "" +CPPFLAGS+= -DM68K_MMU_MOTOROLA +.endif + ### find out what to use for libkern .include "$S/lib/libkern/Makefile.inc" .ifndef PROF diff --git a/sys/arch/hp300/include/hp300spu.h b/sys/arch/hp300/include/hp300spu.h index 5b81e18b1a3..1663f1cd27c 100644 --- a/sys/arch/hp300/include/hp300spu.h +++ b/sys/arch/hp300/include/hp300spu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hp300spu.h,v 1.4 2001/08/26 00:15:37 miod Exp $ */ +/* $OpenBSD: hp300spu.h,v 1.5 2001/11/04 02:58:03 miod Exp $ */ /* $NetBSD: hp300spu.h,v 1.2 1997/05/01 05:26:48 thorpej Exp $ */ /*- @@ -79,52 +79,4 @@ extern int cpuspeed; /* CPU speed, in MHz */ extern int mmuid; /* MMU id */ #endif /* _KERNEL && ! _LOCORE */ -#ifdef _KERNEL - -/* - * This section associates hp300 model configurations with certain - * combinations of CPU, MMU, and cache. - */ - -/* - * CPU configuration. - */ -#if defined(HP320) || defined(HP330) || defined(HP350) -#define M68020 -#endif - -#if defined(HP340) || defined(HP345) || defined(HP360) || defined(HP370) || \ - defined(HP375) || defined(HP400) -#define M68030 -#endif - -#if defined(HP380) || defined(HP385) || defined(HP425) || defined(HP433) -#define M68040 -#endif - -/* - * MMU configuration. - */ -#if defined(HP320) || defined(HP350) -#define M68K_MMU_HP -#endif - -#if defined(HP330) || defined(M68030) || defined(M68040) -#define M68K_MMU_MOTOROLA -#endif - -/* - * Cache configuration. - */ -#if defined(M68K_MMU_HP) -#define CACHE_HAVE_VAC -#endif - -#if defined(HP345) || defined(HP360) || defined(HP370) || \ - defined(HP375) || defined(HP400) -#define CACHE_HAVE_PAC -#endif - -#endif /* _KERNEL */ - #endif /* _HP300_HP300SPU_H_ */ |