More patches for ARC from Noriyuki Soda:
* commit isapnpvar.h changes required for ARC to support plain isa. * fixup mistake over mips/include/cpuregs.h. * mips/mips_machdep.c: set L2 cache-size for arc, cleanup use of L2cache present vs L2 cache-size variables. check for no L2 cache on kernels configured to require one. misc cleanups. * mips/mpis/trap.c: more locore stack-traceback label cleanup. XXX Locore callbacks for mips3, mips4, r4600 cacheflush need more work.
This commit is contained in:
parent
948d228b24
commit
379c9be4a8
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpuregs.h,v 1.15 1998/09/11 16:46:31 jonathan Exp $ */
|
||||
/* $NetBSD: cpuregs.h,v 1.16 1998/10/01 00:42:37 jonathan Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -502,7 +502,8 @@
|
|||
|
||||
#define MIPS3_TLB_PHYS_PAGE_SHIFT 6
|
||||
#define MIPS3_TLB_PF_NUM 0x3fffffc0
|
||||
|
||||
#define MIPS3_TLB_ATTR_MASK 0x00000038
|
||||
#define MIPS3_TLB_ATTR_SHIFT 3
|
||||
#define MIPS3_TLB_MOD_BIT 0x00000004
|
||||
#define MIPS3_TLB_VALID_BIT 0x00000002
|
||||
#define MIPS3_TLB_GLOBAL_BIT 0x00000001
|
||||
|
@ -516,7 +517,7 @@
|
|||
* 4: cacheable, coherent, write-back, exclusive (exclusive)
|
||||
* 5: cacheable, coherent, write-back, exclusive on write (sharable)
|
||||
* 6: cacheable, coherent, write-back, update on write (update)
|
||||
* 7: cacheable, ?, ?, ?, ?
|
||||
* 7: uncached, accelerated (gather STORE operations)
|
||||
*/
|
||||
#define MIPS3_TLB_ATTR_WT 0 /* IDT */
|
||||
#define MIPS3_TLB_ATTR_WT_WRITEALLOCATE 1 /* IDT */
|
||||
|
@ -524,7 +525,7 @@
|
|||
#define MIPS3_TLB_ATTR_WB_NONCOHERENT 3 /* R4000/R4400, IDT */
|
||||
#define MIPS3_TLB_ATTR_WB_EXCLUSIVE 4 /* R4000/R4400 */
|
||||
#define MIPS3_TLB_ATTR_WB_SHARABLE 5 /* R4000/R4400 */
|
||||
#define MIPS3_TLB_ATTR_WB_UPDATE 6 /* R4000/R4400 */
|
||||
#define MIPS4_TLB_ATTR_UNCACHED_ACCELERATED 7 /* R10000 */
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: trap.h,v 1.8 1998/05/19 04:11:50 simonb Exp $ */
|
||||
/* $NetBSD: trap.h,v 1.9 1998/10/01 00:42:37 jonathan Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -85,3 +85,13 @@ extern int kdbpeek __P((vm_offset_t addr));
|
|||
#define T_VCED 31 /* Virtual coherency data */
|
||||
|
||||
#define T_USER 0x20 /* user-mode flag or'ed with type */
|
||||
|
||||
#ifdef _KERNEL
|
||||
extern int (*mips_hardware_intr) __P((u_int mask, u_int pc, u_int statusReg,
|
||||
u_int causeReg));
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#ifdef _KERNEL
|
||||
extern int (*mips_hardware_intr) __P((u_int mask, u_int pc, u_int statusReg,
|
||||
u_int causeReg));
|
||||
#endif /* _KERNEL */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mips_machdep.c,v 1.33 1998/09/14 07:04:06 jonathan Exp $ */
|
||||
/* $NetBSD: mips_machdep.c,v 1.34 1998/10/01 00:42:38 jonathan Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -52,7 +52,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.33 1998/09/14 07:04:06 jonathan Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.34 1998/10/01 00:42:38 jonathan Exp $");
|
||||
|
||||
#include "opt_compat_netbsd.h"
|
||||
#include "opt_uvm.h"
|
||||
|
@ -277,7 +277,7 @@ mips3_ConfigCache()
|
|||
/*
|
||||
* Clear out the I and D caches.
|
||||
*/
|
||||
mips_L2CachePresent = 0; /* kluge to skip L2 cache flush */
|
||||
mips_L2CacheSize = 0; /* kluge to skip L2 cache flush */
|
||||
mips3_FlushCache();
|
||||
|
||||
i = *(volatile int *)&snoop_check; /* Read and cache */
|
||||
|
@ -332,6 +332,9 @@ mips3_vector_init()
|
|||
mips_L2CachePresent = 1;
|
||||
mips_L2CacheSize = 1024 * 1024;
|
||||
#endif
|
||||
#ifdef arc
|
||||
mips_L2CacheSize = mips_L2CachePresent ? 1024 * 1024 : 0;
|
||||
#endif
|
||||
|
||||
mips3_FlushCache();
|
||||
}
|
||||
|
@ -386,7 +389,9 @@ mips_vector_init()
|
|||
mips_num_tlb_entries = MIPS3_TLB_NUM_TLB_ENTRIES;
|
||||
mips3_L1TwoWayCache = 0;
|
||||
mips3_cacheflush_bug = 0;
|
||||
mips3_cacheflush_bug = 1; /* XXX FIXME: probably not needed */
|
||||
#if 1 /* XXX FIXME: avoid hangs in mips3_vector_init() */
|
||||
mips3_cacheflush_bug = 1;
|
||||
#endif
|
||||
break;
|
||||
case MIPS_R4300:
|
||||
cpu_arch = 3;
|
||||
|
@ -436,7 +441,6 @@ mips_vector_init()
|
|||
#endif
|
||||
#ifdef MIPS3
|
||||
case 3:
|
||||
case 4:
|
||||
mips3_SetWIRED(0);
|
||||
mips3_TLBFlush(mips_num_tlb_entries);
|
||||
mips3_SetWIRED(MIPS3_TLB_WIRED_ENTRIES);
|
||||
|
@ -532,7 +536,6 @@ cpu_identify()
|
|||
printf("QED R4700 Orion CPU");
|
||||
#endif
|
||||
break;
|
||||
break;
|
||||
case MIPS_R3TOSH:
|
||||
printf("Toshiba R3000 based CPU");
|
||||
break;
|
||||
|
@ -663,6 +666,14 @@ cpu_identify()
|
|||
* good place to do this is mips_vector_init(),
|
||||
* but printf() doesn't work in it.
|
||||
*/
|
||||
#if !defined(MIPS3_FLUSH)
|
||||
if (!mips_L2CachePresent) {
|
||||
printf("This kernel doesn't work without L2 cache.\n"
|
||||
"Please add \"options MIPS3_FLUSH\""
|
||||
"to the kernel config file.\n");
|
||||
cpu_reboot(RB_HALT, NULL);
|
||||
}
|
||||
#endif
|
||||
if (mips3_L1TwoWayCache &&
|
||||
(mips_L1ICacheLSize < 32 || mips_L1DCacheLSize < 32)) {
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: trap.c,v 1.92 1998/09/11 16:46:34 jonathan Exp $ */
|
||||
/* $NetBSD: trap.c,v 1.93 1998/10/01 00:42:38 jonathan Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -43,7 +43,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.92 1998/09/11 16:46:34 jonathan Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.93 1998/10/01 00:42:38 jonathan Exp $");
|
||||
|
||||
#include "opt_cputype.h" /* which mips CPU levels do we support? */
|
||||
#include "opt_inet.h"
|
||||
|
@ -1649,7 +1649,7 @@ specialframe:
|
|||
subr = (unsigned) splx;
|
||||
else if (pcBetween(cpu_switch, cpu_switch_end))
|
||||
subr = (unsigned) cpu_switch;
|
||||
else if (pcBetween(idle, cpu_switch)) {
|
||||
else if (pcBetween(idle, idle_end)) {
|
||||
subr = (unsigned) idle;
|
||||
ra = 0;
|
||||
goto done;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: isapnpvar.h,v 1.16 1998/09/05 14:15:26 christos Exp $ */
|
||||
/* $NetBSD: isapnpvar.h,v 1.17 1998/10/01 00:42:37 jonathan Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -49,12 +49,15 @@
|
|||
*/
|
||||
struct isapnp_softc;
|
||||
|
||||
#if (alpha + arm32 + atari + bebox + i386 != 1)
|
||||
#if (alpha + arc + arm32 + atari + bebox + i386 != 1)
|
||||
ERROR: COMPILING FOR UNSUPPORTED MACHINE, OR MORE THAN ONE.
|
||||
#endif
|
||||
#if alpha
|
||||
#include <alpha/isa/isapnp_machdep.h>
|
||||
#endif
|
||||
#if arc
|
||||
#include <arc/isa/isapnp_machdep.h>
|
||||
#endif
|
||||
#if arm32
|
||||
#include <arm32/isa/isapnp_machdep.h>
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue