make this compile and work with MIPS3_5900.

This commit is contained in:
uch 2002-03-11 16:39:39 +00:00
parent 7e8becd64d
commit 552fdb7e1b
6 changed files with 39 additions and 17 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.h,v 1.59 2002/03/05 15:36:51 simonb Exp $ */
/* $NetBSD: locore.h,v 1.60 2002/03/11 16:39:39 uch Exp $ */
/*
* Copyright 1996 The Board of Trustees of The Leland Stanford
@ -219,7 +219,7 @@ extern long *mips_locoresw[];
#define MachTLBUpdate mips1_TLBUpdate
#define wbflush() mips1_wbflush()
#define proc_trampoline mips1_proc_trampoline
#elif !defined(MIPS1) && defined(MIPS3) && !defined(MIPS32) && !defined(MIPS64)
#elif !defined(MIPS1) && defined(MIPS3) && !defined(MIPS32) && !defined(MIPS64) && !defined(MIPS3_5900)
#define MachSetPID mips3_SetPID
#define MIPS_TBIAP() mips3_TBIAP(mips_num_tlb_entries)
#define MIPS_TBIS mips3_TBIS
@ -241,6 +241,13 @@ extern long *mips_locoresw[];
#define MachTLBUpdate mips64_TLBUpdate
#define proc_trampoline mips64_proc_trampoline
#define wbflush() mips64_wbflush()
#elif !defined(MIPS1) && defined(MIPS3) && !defined(MIPS32) && !defined(MIPS64) && defined(MIPS3_5900)
#define MachSetPID mips5900_SetPID
#define MIPS_TBIAP() mips5900_TBIAP(mips_num_tlb_entries)
#define MIPS_TBIS mips5900_TBIS
#define MachTLBUpdate mips5900_TLBUpdate
#define proc_trampoline mips5900_proc_trampoline
#define wbflush() mips5900_wbflush()
#else
#define MachSetPID (*(mips_locore_jumpvec.setTLBpid))
#define MIPS_TBIAP() (*(mips_locore_jumpvec.TBIAP))(mips_num_tlb_entries)

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_interface.c,v 1.41 2002/03/05 15:43:25 simonb Exp $ */
/* $NetBSD: db_interface.c,v 1.42 2002/03/11 16:39:40 uch Exp $ */
/*
* Mach Operating System
@ -350,7 +350,11 @@ db_tlbdump_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
for (i = 0; i < mips_num_tlb_entries; i++) {
#if defined(MIPS3)
#if defined(MIPS3_5900)
mips5900_TLBRead(i, &tlb);
#else
mips3_TLBRead(i, &tlb);
#endif
#elif defined(MIPS32)
mips32_TLBRead(i, &tlb);
#elif defined(MIPS64)

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore_mips3.S,v 1.76 2002/03/05 15:50:59 simonb Exp $ */
/* $NetBSD: locore_mips3.S,v 1.77 2002/03/11 16:39:40 uch Exp $ */
/*
* Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author)
@ -150,6 +150,7 @@
*----------------------------------------------------------------------------
*/
LEAF(mips3_wbflush)
XLEAF(mips5900_wbflush)
XLEAF(mips32_wbflush)
XLEAF(mips64_wbflush)
nop

View File

@ -1,4 +1,4 @@
/* $NetBSD: mipsX_subr.S,v 1.1 2002/03/05 15:51:00 simonb Exp $ */
/* $NetBSD: mipsX_subr.S,v 1.2 2002/03/11 16:39:40 uch Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@ -242,6 +242,11 @@
#define MIPSX(name) mips3_/**/name
#endif
#if defined(MIPS3_5900)
#undef MIPSX
#define MIPSX(name) mips5900_/**/name
#endif
#if defined(MIPS32)
#define MIPSX(name) mips32_/**/name
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: mips_machdep.c,v 1.123 2002/03/06 13:10:22 tsutsui Exp $ */
/* $NetBSD: mips_machdep.c,v 1.124 2002/03/11 16:39:40 uch Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@ -120,7 +120,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.123 2002/03/06 13:10:22 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.124 2002/03/11 16:39:40 uch Exp $");
#include "opt_cputype.h"
#include "opt_compat_netbsd.h"
@ -170,11 +170,12 @@ extern long *mips1_locoresw[];
#if defined(MIPS3)
#if defined(MIPS3_5900)
static void r5900_vector_init(void);
extern long *mips5900_locoresw[];
#else
static void mips3_vector_init(void);
#endif
extern long *mips3_locoresw[];
#endif
#endif
#if defined(MIPS32)
static void mips32_vector_init(void);
@ -436,6 +437,7 @@ mips1_vector_init(void)
#endif /* MIPS1 */
#if defined(MIPS3)
#ifndef MIPS3_5900 /* XXX */
/*
* MIPS III locore function vector
*/
@ -448,7 +450,6 @@ static const mips_locore_jumpvec_t mips3_locore_vec =
mips3_wbflush,
};
#ifndef MIPS3_5900 /* XXX */
static void
mips3_vector_init(void)
{
@ -827,15 +828,19 @@ mips_vector_init(void)
#if defined(MIPS3)
case CPU_ARCH_MIPS3:
case CPU_ARCH_MIPS4:
#ifdef MIPS3_5900 /* XXX */
mips3_cp0_wired_write(0);
mips5900_TBIA(mips_num_tlb_entries);
mips3_cp0_wired_write(MIPS3_TLB_WIRED_UPAGES);
r5900_vector_init();
memcpy(mips_locoresw, mips5900_locoresw, sizeof(mips_locoresw));
#else /* MIPS3_5900 */
mips3_cp0_wired_write(0);
mips3_TBIA(mips_num_tlb_entries);
mips3_cp0_wired_write(MIPS3_TLB_WIRED_UPAGES);
#ifdef MIPS3_5900 /* XXX */
r5900_vector_init();
#else
mips3_vector_init();
#endif /* MIPS3_5900 */
memcpy(mips_locoresw, mips3_locoresw, sizeof(mips_locoresw));
#endif /* MIPS3_5900 */
break;
#endif
#ifdef MIPS32

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.168 2002/03/05 15:55:41 simonb Exp $ */
/* $NetBSD: trap.c,v 1.169 2002/03/11 16:39:40 uch Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -44,7 +44,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.168 2002/03/05 15:55:41 simonb Exp $");
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.169 2002/03/11 16:39:40 uch Exp $");
#include "opt_cputype.h" /* which mips CPU levels do we support? */
#include "opt_ktrace.h"
@ -1036,13 +1036,13 @@ static struct { void *addr; char *name;} names[] = {
#endif /* MIPS1 */
/* XXX simonb: need mips32 and mips64 checks here too */
#ifdef MIPS3 /* r4000 family (mips-III cpu) */
#if defined(MIPS3) && !defined(MIPS3_5900) /* r4000 family (mips-III cpu) */
Name(mips3_KernGenException),
Name(mips3_UserGenException),
Name(mips3_SystemCall),
Name(mips3_KernIntr),
Name(mips3_UserIntr),
#endif /* MIPS3 */
#endif /* MIPS3 && !MIPS3_5900 */
Name(mips_idle),
Name(cpu_switch),