More merged MIPS1/MIPS3 support for DECstations.

This commit is contained in:
mhitch 1997-06-15 18:02:20 +00:00
parent 74245805bb
commit 76f5c2a6c6
5 changed files with 88 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: psl.h,v 1.4 1994/10/26 21:09:54 cgd Exp $ */
/* $NetBSD: psl.h,v 1.5 1997/06/15 18:02:22 mhitch Exp $ */
/*
* Copyright (c) 1992, 1993
@ -40,6 +40,37 @@
#include <machine/machConst.h>
#ifdef MIPS3 /* OUCH! */
#define PSL_LOWIPL (MACH_INT_MASK | MACH_SR_INT_ENAB)
#define PSL_USERSET ( \
MACH_SR_KSU_USER | \
MACH_SR_INT_ENAB | \
MACH_SR_EXL | \
MACH_INT_MASK)
#define PSL_USERCLR ( \
MACH_SR_COP_USABILITY | \
MACH_SR_BOOT_EXC_VEC | \
MACH_SR_TLB_SHUTDOWN | \
MACH_SR_PARITY_ERR | \
MACH_SR_CACHE_MISS | \
MACH_SR_PARITY_ZERO | \
MACH_SR_SWAP_CACHES | \
MACH_SR_ISOL_CACHES | \
MACH_SR_KU_CUR | \
MACH_SR_INT_ENA_CUR | \
MACH_SR_MBZ)
/*
* Macros to decode processor status word.
*/
#define USERMODE(ps) (((ps) & MACH_SR_KSU_MASK) == MACH_SR_KSU_USER)
#define BASEPRI(ps) (((ps) & (MACH_INT_MASK | MACH_SR_INT_ENA_PREV)) \
== (MACH_INT_MASK | MACH_SR_INT_ENA_PREV))
#else
#define PSL_LOWIPL (MACH_INT_MASK | MACH_SR_INT_ENA_CUR)
#define PSL_USERSET ( \
@ -68,3 +99,4 @@
#define USERMODE(ps) ((ps) & MACH_SR_KU_PREV)
#define BASEPRI(ps) (((ps) & (MACH_INT_MASK | MACH_SR_INT_ENA_PREV)) \
== (MACH_INT_MASK | MACH_SR_INT_ENA_PREV))
#endif

View File

@ -1,16 +1,29 @@
/* $NetBSD: cpu.h,v 1.15 1996/05/19 01:28:47 jonathan Exp $ */
/* $NetBSD: cpu.h,v 1.16 1997/06/15 18:02:20 mhitch Exp $ */
#include <mips/cpu.h>
#include <mips/cpuregs.h> /* XXX */
#ifdef MIPS3
#define CLKF_USERMODE(framep) CLKF_USERMODE_R4K(framep)
#define CLKF_BASEPRI(framep) CLKF_BASEPRI_R4K(framep)
#else
#define CLKF_USERMODE(framep) CLKF_USERMODE_R3K(framep)
#define CLKF_BASEPRI(framep) CLKF_BASEPRI_R3K(framep)
#endif
#ifdef _KERNEL
union cpuprid cpu_id;
union cpuprid fpu_id;
int cpu_arch;
u_int machDataCacheSize;
u_int machInstCacheSize;
u_int machPrimaryDataCacheSize;
u_int machPrimaryInstCacheSize;
u_int machPrimaryDataCacheLSize;
u_int machPrimaryInstCacheLSize;
u_int machCacheAliasMask;
u_int machSecondaryCacheSize;
u_int machSecondaryCacheLSize;
extern struct intr_tab intr_tab[];
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: param.h,v 1.19 1997/06/08 10:46:01 jonathan Exp $ */
/* $NetBSD: param.h,v 1.20 1997/06/15 18:02:20 mhitch Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -73,7 +73,7 @@
#define SINCR 1 /* increment of stack/NBPG */
#define UPAGES 2 /* pages of u-area */
#define UADDR 0xffffd000 /* address of u */
#define UADDR 0xffffc000 /* address of u */
#define USPACE (UPAGES*NBPG) /* size of u-area in bytes */
#define UVPN (UADDR>>PGSHIFT)/* virtual page number of u */
#define KERNELSTACK (UADDR+UPAGES*NBPG) /* top of kernel stack */

View File

@ -1,10 +1,15 @@
/* $NetBSD: pmap.h,v 1.11 1997/05/25 05:04:03 jonathan Exp $ */
/* $NetBSD: pmap.h,v 1.12 1997/06/15 18:02:22 mhitch Exp $ */
#include <mips/pmap.h>
#define pmax_trunc_seg(a) mips_trunc_seg(a)
#define pmax_round_seg(a) mips_round_seg(a)
#ifdef MIPS3
#define PMAP_PREFER(pa, va) pmap_prefer((pa), (va))
void pmap_prefer __P((vm_offset_t, vm_offset_t *));
#endif
/*
* Bootstrap the system enough to run with virtual memory.
* firstaddr is the first unused kseg0 address (not page aligned).

View File

@ -1,4 +1,4 @@
/* $NetBSD: psl.h,v 1.4 1994/10/26 21:09:54 cgd Exp $ */
/* $NetBSD: psl.h,v 1.5 1997/06/15 18:02:22 mhitch Exp $ */
/*
* Copyright (c) 1992, 1993
@ -40,6 +40,37 @@
#include <machine/machConst.h>
#ifdef MIPS3 /* OUCH! */
#define PSL_LOWIPL (MACH_INT_MASK | MACH_SR_INT_ENAB)
#define PSL_USERSET ( \
MACH_SR_KSU_USER | \
MACH_SR_INT_ENAB | \
MACH_SR_EXL | \
MACH_INT_MASK)
#define PSL_USERCLR ( \
MACH_SR_COP_USABILITY | \
MACH_SR_BOOT_EXC_VEC | \
MACH_SR_TLB_SHUTDOWN | \
MACH_SR_PARITY_ERR | \
MACH_SR_CACHE_MISS | \
MACH_SR_PARITY_ZERO | \
MACH_SR_SWAP_CACHES | \
MACH_SR_ISOL_CACHES | \
MACH_SR_KU_CUR | \
MACH_SR_INT_ENA_CUR | \
MACH_SR_MBZ)
/*
* Macros to decode processor status word.
*/
#define USERMODE(ps) (((ps) & MACH_SR_KSU_MASK) == MACH_SR_KSU_USER)
#define BASEPRI(ps) (((ps) & (MACH_INT_MASK | MACH_SR_INT_ENA_PREV)) \
== (MACH_INT_MASK | MACH_SR_INT_ENA_PREV))
#else
#define PSL_LOWIPL (MACH_INT_MASK | MACH_SR_INT_ENA_CUR)
#define PSL_USERSET ( \
@ -68,3 +99,4 @@
#define USERMODE(ps) ((ps) & MACH_SR_KU_PREV)
#define BASEPRI(ps) (((ps) & (MACH_INT_MASK | MACH_SR_INT_ENA_PREV)) \
== (MACH_INT_MASK | MACH_SR_INT_ENA_PREV))
#endif