Fix page size initialisation.

This commit is contained in:
ragge 1998-01-18 22:07:50 +00:00
parent 37f6125fdd
commit afb1a37379
3 changed files with 10 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.h,v 1.23 1998/01/03 01:13:12 thorpej Exp $ */
/* $NetBSD: pmap.h,v 1.24 1998/01/18 22:07:50 ragge Exp $ */
/*
* Copyright (c) 1987 Carnegie-Mellon University
@ -75,8 +75,8 @@ typedef struct pv_entry {
} *pv_entry_t;
/* ROUND_PAGE used before vm system is initialized */
#define ROUND_PAGE(x) (((uint)(x) + PAGE_SIZE-1)& ~(PAGE_SIZE - 1))
#define TRUNC_PAGE(x) ((uint)(x) & ~(PAGE_SIZE - 1))
#define ROUND_PAGE(x) (((uint)(x) + CLOFSET)& ~CLOFSET)
#define TRUNC_PAGE(x) ((uint)(x) & ~CLOFSET)
/* Mapping macros used when allocating SPT */
#define MAPVIRT(ptr, count) \
@ -119,7 +119,6 @@ extern struct pmap kernel_pmap_store;
/* Prototypes */
void pmap_bootstrap __P((void));
void pmap_pinit __P((pmap_t));
#endif PMAP_H

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.c,v 1.22 1997/11/02 14:07:25 ragge Exp $ */
/* $NetBSD: locore.c,v 1.23 1998/01/18 22:07:51 ragge Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
* All rights reserved.
@ -117,7 +117,6 @@ start()
* FIRST we must set up kernel stack, directly after end.
* This is the only thing we have to setup here, rest in pmap.
*/
PAGE_SIZE = NBPG * 2; /* Set logical page size */
#ifdef DDB
if ((boothowto & RB_KDB) != 0)
proc0paddr = ROUND_PAGE(esym);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.42 1998/01/03 00:34:02 thorpej Exp $ */
/* $NetBSD: pmap.c,v 1.43 1998/01/18 22:07:52 ragge Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
* All rights reserved.
@ -136,6 +136,7 @@ pmap_bootstrap()
virtual_avail = avail_end + KERNBASE;
virtual_end = KERNBASE + sysptsize * NBPG;
blkclr(Sysmap, sysptsize * 4); /* clear SPT before using it */
/*
* The first part of Kernel Virtual memory is the physical
* memory mapped in. This makes some mm routines both simpler
@ -176,6 +177,10 @@ pmap_bootstrap()
/* zero all mapped physical memory from Sysmap to here */
blkclr((void *)istack, (avail_start + KERNBASE) - istack);
/* Set logical page size */
PAGE_SIZE = CLBYTES;
vm_set_page_size();
/*
* We move SCB here from physical address 0 to an address
* somewhere else, so that we can dynamically allocate