Move allocsys() back to cpu_startup(). We're no longer allocating it from
the locked 4MB TLB entry, but it solves the problem where large memory machines overflow the 4MB TLB entry.
This commit is contained in:
parent
cecf78e09d
commit
4cf9a921c9
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: machdep.c,v 1.22 1998/11/16 06:51:36 eeh Exp $ */
|
/* $NetBSD: machdep.c,v 1.23 1998/11/22 23:38:53 eeh Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||||
@ -192,7 +192,9 @@ void stackdump __P((void));
|
|||||||
void
|
void
|
||||||
cpu_startup()
|
cpu_startup()
|
||||||
{
|
{
|
||||||
register unsigned i;
|
unsigned i;
|
||||||
|
caddr_t v;
|
||||||
|
int sz;
|
||||||
int base, residual;
|
int base, residual;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
extern int pmapdebug;
|
extern int pmapdebug;
|
||||||
@ -218,6 +220,22 @@ cpu_startup()
|
|||||||
#endif
|
#endif
|
||||||
printf("real mem = %ld\n", (long)ctob(physmem));
|
printf("real mem = %ld\n", (long)ctob(physmem));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Find out how much space we need, allocate it,
|
||||||
|
* and then give everything true virtual addresses.
|
||||||
|
*/
|
||||||
|
sz = (int)allocsys((caddr_t)0);
|
||||||
|
|
||||||
|
#if defined(UVM)
|
||||||
|
if ((v = (caddr_t)uvm_km_alloc(kernel_map, round_page(sz))) == 0)
|
||||||
|
panic("startup: no room for tables");
|
||||||
|
#else
|
||||||
|
if ((v = (caddr_t)kmem_alloc(kernel_map, round_page(sz))) == 0)
|
||||||
|
panic("startup: no room for tables");
|
||||||
|
#endif
|
||||||
|
if (allocsys(v) - v != sz)
|
||||||
|
panic("startup: table size inconsistency");
|
||||||
|
|
||||||
#if defined(UVM)
|
#if defined(UVM)
|
||||||
/*
|
/*
|
||||||
* allocate virtual and physical memory for the buffers.
|
* allocate virtual and physical memory for the buffers.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: pmap.c,v 1.17 1998/11/22 17:22:50 eeh Exp $ */
|
/* $NetBSD: pmap.c,v 1.18 1998/11/22 23:38:53 eeh Exp $ */
|
||||||
/* #define NO_VCACHE /* Don't forget the locked TLB in dostart */
|
/* #define NO_VCACHE /* Don't forget the locked TLB in dostart */
|
||||||
#define HWREF
|
#define HWREF
|
||||||
/* #define BOOT_DEBUG */
|
/* #define BOOT_DEBUG */
|
||||||
@ -658,34 +658,6 @@ pmap_bootstrap(kernelstart, kernelend, maxctx)
|
|||||||
valloc(ctxbusy, paddr_t, CTXSIZE);
|
valloc(ctxbusy, paddr_t, CTXSIZE);
|
||||||
bzero((caddr_t)ctxbusy, CTXSIZE);
|
bzero((caddr_t)ctxbusy, CTXSIZE);
|
||||||
|
|
||||||
{
|
|
||||||
caddr_t v;
|
|
||||||
extern caddr_t allocsys __P((caddr_t));
|
|
||||||
|
|
||||||
/*
|
|
||||||
* from cpu_startup():
|
|
||||||
*
|
|
||||||
* Find out how much space we need, allocate it,
|
|
||||||
* and then give everything true virtual addresses.
|
|
||||||
*/
|
|
||||||
sz = (size_t)allocsys((caddr_t)0);
|
|
||||||
|
|
||||||
#ifdef BOOT1_DEBUG
|
|
||||||
prom_printf("allocsys needs %08lx bytes RAM...", (u_long)sz);
|
|
||||||
#endif
|
|
||||||
valloc(v, void, sz);
|
|
||||||
|
|
||||||
if (allocsys(v) - v != sz) {
|
|
||||||
prom_printf("startup: table size inconsistency");
|
|
||||||
OF_exit();
|
|
||||||
}
|
|
||||||
/* Need to zero this out or we have problems w/swbufs and physio hangs */
|
|
||||||
bzero(v, sz);
|
|
||||||
#ifdef BOOT1_DEBUG
|
|
||||||
prom_printf("got it\r\n");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allocate our TSB.
|
* Allocate our TSB.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user