Do the first allocsys() pass (the pass that computes sizes) before

calling pmap_bootstrap(); pmap_bootstrap() needs some of the size
information computed by allocsys().
This commit is contained in:
thorpej 2001-04-24 15:41:38 +00:00
parent 17a51bfa67
commit e553a6caf0
7 changed files with 53 additions and 18 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.56 2001/04/24 04:30:53 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.57 2001/04/24 15:41:38 thorpej Exp $ */
/* $OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $ */
/*
@ -732,6 +732,12 @@ mach_init(argc, argv, envv)
*/
mips_init_msgbuf();
/*
* Compute the size of system data structures. pmap_bootstrap()
* needs some of this information.
*/
size = (vsize_t)allocsys(NULL, NULL);
/*
* Initialize the virtual memory system.
*/
@ -752,7 +758,6 @@ mach_init(argc, argv, envv)
* memory is directly addressable. We don't have to map these into
* virtual address space.
*/
size = (vsize_t)allocsys(NULL, NULL);
v = (caddr_t)uvm_pageboot_alloc(size);
if ((allocsys(v, NULL) - v) != size)
panic("mach_init: table size inconsistency");

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.30 2001/04/24 04:30:56 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.31 2001/04/24 15:41:39 thorpej Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang. All rights reserved.
@ -202,6 +202,12 @@ mach_init(memsize)
*/
mips_init_msgbuf();
/*
* Compute the size of system data structures. pmap_bootstrap()
* needs some of this information.
*/
size = (vsize_t)allocsys(NULL, NULL);
pmap_bootstrap();
/*
@ -219,7 +225,6 @@ mach_init(memsize)
* memory is directly addressable. We don't have to map these into
* virtual address space.
*/
size = (vsize_t)allocsys(NULL, NULL);
v = (caddr_t)uvm_pageboot_alloc(size);
if ((allocsys(v, NULL) - v) != size)
panic("mach_init: table size inconsistency");

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.52 2001/04/24 04:30:58 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.53 2001/04/24 15:41:39 thorpej Exp $ */
/*-
* Copyright (c) 1999 Shin Takemura, All rights reserved.
@ -72,7 +72,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.52 2001/04/24 04:30:58 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.53 2001/04/24 15:41:39 thorpej Exp $");
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
#include "opt_vr41xx.h"
@ -494,6 +494,12 @@ mach_init(argc, argv, bi)
*/
mips_init_msgbuf();
/*
* Compute the size of system data structures. pmap_bootstrap()
* needs some of this information.
*/
size = (unsigned)allocsys(NULL, NULL);
/*
* Initialize the virtual memory system.
*/
@ -505,7 +511,6 @@ mach_init(argc, argv, bi)
* memory is directly addressable. We don't have to map these into
* virtual address space.
*/
size = (unsigned)allocsys(NULL, NULL);
v = (caddr_t)uvm_pageboot_alloc(size);
if ((allocsys(v, NULL) - v) != size)
panic("mach_init: table size inconsistency");

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.23 2001/04/24 04:31:03 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.24 2001/04/24 15:41:40 thorpej 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.23 2001/04/24 04:31:03 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.24 2001/04/24 15:41:40 thorpej Exp $");
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
@ -346,6 +346,12 @@ mach_init(argc, argv, envp, bim, bip)
*/
pmap_bootstrap();
/*
* Compute the size of system data structures. pmap_bootstrap()
* needs some of this information.
*/
size = (vsize_t)allocsys(NULL, NULL);
/*
* Allocate space for proc0's USPACE.
*/
@ -361,7 +367,6 @@ mach_init(argc, argv, envp, bim, bip)
* memory is directly addressable. We don't have to map these into
* virtual address space.
*/
size = (vsize_t)allocsys(NULL, NULL);
v = (caddr_t)uvm_pageboot_alloc(size);
if ((allocsys(v, NULL) - v) != size)
panic("mach_init: table size inconsistency");

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.56 2001/04/24 04:31:05 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.57 2001/04/24 15:41:40 thorpej 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.56 2001/04/24 04:31:05 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.57 2001/04/24 15:41:40 thorpej Exp $");
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
@ -318,6 +318,12 @@ mach_init(x_boothowto, x_bootdev, x_bootname, x_maxmem)
*/
mips_init_msgbuf();
/*
* Compute the size of system data structures. pmap_bootstrap()
* needs some of this information.
*/
size = (vsize_t)allocsys(NULL, NULL);
/*
* Initialize the virtual memory system.
*/
@ -338,7 +344,6 @@ mach_init(x_boothowto, x_bootdev, x_bootname, x_maxmem)
* memory is directly addressable. We don't have to map these into
* virtual address space.
*/
size = (vsize_t)allocsys(NULL, NULL);
v = (caddr_t)uvm_pageboot_alloc(size);
if ((allocsys(v, NULL) - v) != size)
panic("mach_init: table size inconsistency");

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.190 2001/04/24 04:31:07 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.191 2001/04/24 15:41:40 thorpej 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.190 2001/04/24 04:31:07 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.191 2001/04/24 15:41:40 thorpej Exp $");
#include "fs_mfs.h"
#include "opt_ddb.h"
@ -364,6 +364,12 @@ mach_init(argc, argv, code, cv, bim, bip)
*/
mips_init_msgbuf();
/*
* Compute the size of system data structures. pmap_bootstrap()
* needs some of this information.
*/
size = (unsigned)allocsys(NULL, NULL);
/*
* Initialize the virtual memory system.
*/
@ -375,7 +381,6 @@ mach_init(argc, argv, code, cv, bim, bip)
* is directly addressable. We don't have to map these into virtual
* address space.
*/
size = (unsigned)allocsys(NULL, NULL);
v = (caddr_t)uvm_pageboot_alloc(size);
if ((allocsys(v, NULL) - v) != size)
panic("mach_init: table size inconsistency");

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.13 2001/04/24 04:31:09 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.14 2001/04/24 15:41:41 thorpej Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang
@ -263,6 +263,12 @@ printf("memory 0x%lx 0x%lx\n", first, last);
*/
mips_init_msgbuf();
/*
* Compute the size of system data structures. pmap_bootstrap()
* needs some of this information.
*/
size = (vsize_t)allocsys(NULL, NULL);
pmap_bootstrap();
/*
@ -280,7 +286,6 @@ printf("memory 0x%lx 0x%lx\n", first, last);
* memory is directly addressable. We don't have to map these into
* virtual address space.
*/
size = (vsize_t)allocsys(NULL, NULL);
v = (caddr_t)uvm_pageboot_alloc(size);
if ((allocsys(v, NULL) - v) != size)
panic("mach_init: table size inconsistency");