Provide a L2 cache configuration function.
This commit is contained in:
parent
713adcd0e8
commit
fd77e40b6b
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.64 2001/11/14 18:15:13 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.65 2002/03/05 16:12:35 simonb Exp $ */
|
||||
/* $OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -167,7 +167,6 @@ int mem_cluster_cnt;
|
|||
/* initialize bss, etc. from kernel start, before main() is called. */
|
||||
extern void mach_init __P((int, char **argv, char **));
|
||||
|
||||
void machine_ConfigCache __P((void));
|
||||
char *firmware_getenv __P((char *env));
|
||||
void arc_sysreset __P((bus_addr_t, bus_size_t));
|
||||
|
||||
|
@ -447,7 +446,7 @@ mach_init(argc, argv, envv)
|
|||
}
|
||||
|
||||
void
|
||||
machine_ConfigCache()
|
||||
mips_machdep_cache_config(void)
|
||||
{
|
||||
mips_sdcache_size = arc_cpu_l2cache_size;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: types.h,v 1.12 2002/02/28 03:17:32 simonb Exp $ */
|
||||
/* $NetBSD: types.h,v 1.13 2002/03/05 16:12:36 simonb Exp $ */
|
||||
/* $OpenBSD: types.h,v 1.2 1997/04/19 17:19:59 pefo Exp $ */
|
||||
/* NetBSD: types.h,v 1.10 1995/07/06 03:39:43 cgd Exp */
|
||||
|
||||
|
@ -8,3 +8,5 @@
|
|||
|
||||
#define __HAVE_DEVICE_REGISTER
|
||||
#define __HAVE_NWSCONS
|
||||
|
||||
#define __HAVE_MIPS_MACHDEP_CACHE_CONFIG
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
/* $NetBSD: types.h,v 1.3 2002/02/28 03:17:29 simonb Exp $ */
|
||||
/* $NetBSD: types.h,v 1.4 2002/03/05 16:13:57 simonb Exp $ */
|
||||
|
||||
#include <mips/types.h>
|
||||
|
||||
#define __BROKEN_CONFIG_UNIT_USAGE
|
||||
|
||||
#define __HAVE_MIPS_MACHDEP_CACHE_CONFIG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.60 2001/11/14 18:15:31 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.61 2002/03/05 16:13:57 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -43,7 +43,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.60 2001/11/14 18:15:31 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.61 2002/03/05 16:13:57 simonb Exp $");
|
||||
|
||||
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
|
||||
|
||||
|
@ -85,7 +85,9 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.60 2001/11/14 18:15:31 thorpej Exp $")
|
|||
#include <machine/bootinfo.h>
|
||||
#include <machine/apbus.h>
|
||||
#include <machine/apcall.h>
|
||||
#include <mips/locore.h> /* wbflush() */
|
||||
|
||||
#include <mips/cache.h>
|
||||
#include <mips/locore.h>
|
||||
|
||||
#define _NEWSMIPS_BUS_DMA_PRIVATE
|
||||
#include <machine/bus.h>
|
||||
|
@ -405,6 +407,14 @@ mach_init(x_boothowto, x_bootdev, x_bootname, x_maxmem)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
mips_machdep_cache_config(void)
|
||||
{
|
||||
/* All r4k news boxen have a 1MB L2 cache. */
|
||||
if (CPUISMIPS3)
|
||||
mips_sdcache_size = 1024 * 1024;
|
||||
}
|
||||
|
||||
/*
|
||||
* cpu_startup: allocate memory for variable-sized tables,
|
||||
* initialize cpu, and do autoconfiguration.
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
/* $NetBSD: types.h,v 1.19 2002/02/28 03:17:30 simonb Exp $ */
|
||||
/* $NetBSD: types.h,v 1.20 2002/03/05 16:14:28 simonb Exp $ */
|
||||
|
||||
#include <mips/types.h>
|
||||
|
||||
#define __HAVE_DEVICE_REGISTER
|
||||
#define __HAVE_GENERIC_SOFT_INTERRUPTS
|
||||
|
||||
#define __HAVE_MIPS_MACHDEP_CACHE_CONFIG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.198 2001/11/30 06:40:52 gmcgarry Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.199 2002/03/05 16:14:28 simonb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -43,7 +43,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.198 2001/11/30 06:40:52 gmcgarry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.199 2002/03/05 16:14:28 simonb Exp $");
|
||||
|
||||
#include "fs_mfs.h"
|
||||
#include "opt_ddb.h"
|
||||
|
@ -66,6 +66,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.198 2001/11/30 06:40:52 gmcgarry Exp $
|
|||
|
||||
#include <ufs/mfs/mfs_extern.h> /* mfs_initminiroot() */
|
||||
|
||||
#include <mips/cache.h>
|
||||
#include <machine/psl.h>
|
||||
#include <machine/autoconf.h>
|
||||
#include <machine/dec_prom.h>
|
||||
|
@ -392,6 +393,14 @@ mach_init(argc, argv, code, cv, bim, bip)
|
|||
panic("mach_init: table size inconsistency");
|
||||
}
|
||||
|
||||
void
|
||||
mips_machdep_cache_config(void)
|
||||
{
|
||||
/* All r4k pmaxen have a 1MB L2 cache. */
|
||||
if (CPUISMIPS3)
|
||||
mips_sdcache_size = 1024 * 1024;
|
||||
}
|
||||
|
||||
void
|
||||
consinit()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue