Add a second memory free list, which holds the first 8M of RAM. This is
so that devices which must allocate DMA memory in this range (e.g. PixelStamp graphics boards) have a better chance of doing so, without an awful hack.
This commit is contained in:
parent
4c9c896cc8
commit
c7ad933ffa
|
@ -1,14 +1,17 @@
|
||||||
/* $NetBSD: vmparam.h,v 1.8 1998/07/08 04:43:19 thorpej Exp $ */
|
/* $NetBSD: vmparam.h,v 1.9 1999/05/07 18:04:37 thorpej Exp $ */
|
||||||
|
|
||||||
#include <mips/vmparam.h>
|
#include <mips/vmparam.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DECstation has one physical memory segment.
|
* DECstation has one physical memory segment.
|
||||||
*/
|
*/
|
||||||
#define VM_PHYSSEG_MAX 1
|
#define VM_PHYSSEG_MAX 2 /* 2 free lists */
|
||||||
|
#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH
|
||||||
|
#define VM_PHYSSEG_NOADD /* can't add RAM after vm_mem_init */
|
||||||
|
|
||||||
#define VM_NFREELIST 1
|
#define VM_NFREELIST 2
|
||||||
#define VM_FREELIST_DEFAULT 0
|
#define VM_FREELIST_DEFAULT 0
|
||||||
|
#define VM_FREELIST_FIRST8 1
|
||||||
|
|
||||||
/* pcb base */
|
/* pcb base */
|
||||||
/*#define pcbb(p) ((u_int)(p)->p_addr) */
|
/*#define pcbb(p) ((u_int)(p)->p_addr) */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: machdep.c,v 1.139 1999/04/26 09:23:26 nisimura Exp $ */
|
/* $NetBSD: machdep.c,v 1.140 1999/05/07 18:04:36 thorpej Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988 University of Utah.
|
* Copyright (c) 1988 University of Utah.
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||||
|
|
||||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.139 1999/04/26 09:23:26 nisimura Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.140 1999/05/07 18:04:36 thorpej Exp $");
|
||||||
|
|
||||||
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
|
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
|
||||||
|
|
||||||
|
@ -439,11 +439,22 @@ mach_init(argc, argv, code, cv, bim, bip)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Load the rest of the available pages into the VM system.
|
* Load the rest of the available pages into the VM system.
|
||||||
|
* Put the first 8M of RAM onto a lower-priority free list, since
|
||||||
|
* some TC boards (e.g. PixelStamp boards) are only able to DMA
|
||||||
|
* into this region, and we want them to have a fighting chance of
|
||||||
|
* allocating their DMA memory during autoconfiguratoin.
|
||||||
*/
|
*/
|
||||||
first = round_page(MIPS_KSEG0_TO_PHYS(kernend));
|
first = round_page(MIPS_KSEG0_TO_PHYS(kernend));
|
||||||
last = mem_clusters[0].start + mem_clusters[0].size;
|
last = mem_clusters[0].start + mem_clusters[0].size;
|
||||||
uvm_page_physload(atop(first), atop(last), atop(first), atop(last),
|
if (last <= (8 * 1024 * 1024)) {
|
||||||
VM_FREELIST_DEFAULT);
|
uvm_page_physload(atop(first), atop(last), atop(first),
|
||||||
|
atop(last), VM_FREELIST_DEFAULT);
|
||||||
|
} else {
|
||||||
|
uvm_page_physload(atop(first), atop(8 * 1024 * 1024),
|
||||||
|
atop(first), atop(8 * 1024 * 1024), VM_FREELIST_FIRST8);
|
||||||
|
uvm_page_physload(atop(8 * 1024 * 1024), atop(last),
|
||||||
|
atop(8 * 1024 * 1024), atop(last), VM_FREELIST_DEFAULT);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize error message buffer (at end of core).
|
* Initialize error message buffer (at end of core).
|
||||||
|
|
Loading…
Reference in New Issue