This is again that time of the millenium where we have to crank up a few
static limits to meet modern bloat requirements. VM_PHYSSEG_MAX needs it to run on Intel's D946GZIS motherboard, as reported by rix on #NetBSD-code on freenode. This has a consequence on the initial number of possible extent allocations for iomem_ex, so increase that value too. While there, clarify the action to be taken when VM_PHYSSEG_MAX is maxed out. Do that on both amd64 and i386 because the causes, the effects and the code are mostly the same.
This commit is contained in:
parent
5863dc6ef1
commit
4a5ad09e72
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.40 2006/08/19 16:27:57 dsl Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.41 2006/09/27 17:10:34 cube Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc.
|
||||
@ -72,7 +72,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.40 2006/08/19 16:27:57 dsl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.41 2006/09/27 17:10:34 cube Exp $");
|
||||
|
||||
#include "opt_user_ldt.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -1144,7 +1144,8 @@ init_x86_64(paddr_t first_avail)
|
||||
|
||||
/* XXX XXX XXX */
|
||||
if (mem_cluster_cnt >= VM_PHYSSEG_MAX)
|
||||
panic("init386: too many memory segments");
|
||||
panic("init386: too many memory segments "
|
||||
"(increase VM_PHYSSEG_MAX)");
|
||||
|
||||
seg_start = round_page(seg_start);
|
||||
seg_end = trunc_page(seg_end);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.11 2006/01/11 09:30:45 cube Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.12 2006/09/27 17:10:34 cube Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -145,7 +145,7 @@
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE)
|
||||
|
||||
#define VM_PHYSSEG_MAX 5 /* 1 "hole" + 4 free lists */
|
||||
#define VM_PHYSSEG_MAX 10 /* 1 "hole" + 9 free lists */
|
||||
#define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
|
||||
#define VM_PHYSSEG_NOADD /* can't add RAM after vm_mem_init */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.578 2006/09/24 08:35:00 xtraeme Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.579 2006/09/27 17:10:34 cube Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006 The NetBSD Foundation, Inc.
|
||||
@ -72,7 +72,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.578 2006/09/24 08:35:00 xtraeme Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.579 2006/09/27 17:10:34 cube Exp $");
|
||||
|
||||
#include "opt_beep.h"
|
||||
#include "opt_compat_ibcs2.h"
|
||||
@ -1406,7 +1406,8 @@ add_mem_cluster(uint64_t seg_start, uint64_t seg_end, uint32_t type)
|
||||
|
||||
/* XXX XXX XXX */
|
||||
if (mem_cluster_cnt >= VM_PHYSSEG_MAX)
|
||||
panic("init386: too many memory segments");
|
||||
panic("init386: too many memory segments "
|
||||
"(increase VM_PHYSSEG_MAX)");
|
||||
|
||||
seg_start = round_page(seg_start);
|
||||
seg_end = trunc_page(seg_end);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.60 2005/09/20 16:38:58 christos Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.61 2006/09/27 17:10:34 cube Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -126,7 +126,7 @@
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE)
|
||||
|
||||
#define VM_PHYSSEG_MAX 5 /* 1 "hole" + 4 free lists */
|
||||
#define VM_PHYSSEG_MAX 10 /* 1 "hole" + 9 free lists */
|
||||
#define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
|
||||
#define VM_PHYSSEG_NOADD /* can't add RAM after vm_mem_init */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: bus_space.c,v 1.4 2005/11/24 13:08:34 yamt Exp $ */
|
||||
/* $NetBSD: bus_space.c,v 1.5 2006/09/27 17:10:34 cube Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
@ -38,7 +38,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.4 2005/11/24 13:08:34 yamt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.5 2006/09/27 17:10:34 cube Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -64,8 +64,8 @@ __KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.4 2005/11/24 13:08:34 yamt Exp $");
|
||||
* The extent maps are not static! Machine-dependent ISA and EISA
|
||||
* routines need access to them for bus address space allocation.
|
||||
*/
|
||||
static long ioport_ex_storage[EXTENT_FIXED_STORAGE_SIZE(8) / sizeof(long)];
|
||||
static long iomem_ex_storage[EXTENT_FIXED_STORAGE_SIZE(8) / sizeof(long)];
|
||||
static long ioport_ex_storage[EXTENT_FIXED_STORAGE_SIZE(16) / sizeof(long)];
|
||||
static long iomem_ex_storage[EXTENT_FIXED_STORAGE_SIZE(16) / sizeof(long)];
|
||||
struct extent *ioport_ex;
|
||||
struct extent *iomem_ex;
|
||||
static int ioport_malloc_safe;
|
||||
|
Loading…
Reference in New Issue
Block a user