* Enlarge kernel virtual memory space. The pc532 kernel now runs at

0xf8000000. When the kernel was running at 0xfe000000, the INSTALL
  kernel would not run on a 32mb machine.
This commit is contained in:
matthias 1996-12-07 09:24:37 +00:00
parent b1e0c7d657
commit 781cd59dd4
6 changed files with 35 additions and 27 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.pc532,v 1.32 1996/12/01 06:12:34 jonathan Exp $
# $NetBSD: Makefile.pc532,v 1.33 1996/12/07 09:24:37 matthias Exp $
# Makefile for NetBSD
#
@ -38,7 +38,7 @@ CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL
CWARNFLAGS= -Werror
CFLAGS= ${DEBUG} ${COPT} ${CWARNFLAGS}
AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
LINKFLAGS= -z -Ttext FE002000 -e start
LINKFLAGS= -z -Ttext F8002000 -e start
STRIPFLAGS= -d
HOSTED_CC= ${CC}

View File

@ -1,4 +1,4 @@
/* $NetBSD: param.h,v 1.16 1996/10/09 07:28:50 matthias Exp $ */
/* $NetBSD: param.h,v 1.17 1996/12/07 09:24:59 matthias Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -71,7 +71,7 @@
#define PGOFSET (NBPG-1) /* byte offset into page */
#define NPTEPG (NBPG/(sizeof (pt_entry_t)))
#define KERNBASE 0xFE000000 /* start of kernel virtual */
#define KERNBASE 0xF8000000 /* start of kernel virtual */
#define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT)
#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.h,v 1.11 1996/10/23 07:30:57 matthias Exp $ */
/* $NetBSD: pmap.h,v 1.12 1996/12/07 09:25:01 matthias Exp $ */
/*
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
@ -65,9 +65,9 @@
* One page directory, shared between
* kernel and user modes.
*/
#define PTDPTDI 0x3f7 /* ptd entry that points to ptd! */
#define KPTDI 0x3f8 /* start of kernel virtual pde's */
#define NKPDE 8
#define PTDPTDI 0x3df /* ptd entry that points to ptd! */
#define KPTDI 0x3e0 /* start of kernel virtual pde's */
#define NKPDE 12
#define APTDPTDI 0x3fe /* start of alternate page directory */
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: vmparam.h,v 1.7 1996/02/01 00:03:43 phil Exp $ */
/* $NetBSD: vmparam.h,v 1.8 1996/12/07 09:25:00 matthias Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -141,9 +141,13 @@
/* user/kernel map constants */
#define VM_MIN_ADDRESS ((vm_offset_t)0)
#define VM_MAXUSER_ADDRESS ((vm_offset_t)0xFDC00000)
#define VM_MAX_ADDRESS ((vm_offset_t)0xFDFF7000)
#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0xFE000000)
/* PTDPTDI << PDSHIFT */
#define VM_MAXUSER_ADDRESS ((vm_offset_t)0xF7C00000)
/* PTDPTDI << PDSHIFT + PTDPTDI << PGSHIFT */
#define VM_MAX_ADDRESS ((vm_offset_t)0xF7FDF000)
/* KPTDI << PDSHIFT */
#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0xF8000000)
/* APTDPTDI << PDSHIFT */
#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xFF800000)
/* virtual sizes (bytes) for various kernel submaps */

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.53 1996/11/24 13:35:18 matthias Exp $ */
/* $NetBSD: machdep.c,v 1.54 1996/12/07 09:24:56 matthias Exp $ */
/*-
* Copyright (c) 1996 Matthias Pfaller.
@ -842,10 +842,9 @@ map(pd, virtual, physical, protection, size)
*
* Level one and level two page tables are initialized to create
* the following mapping:
* 0xfdbfe000-0xfdbfffff: UAREA of process 0
* 0xfdc00000-0xfdffefff: Kernel level two page tables
* 0xfdfff000-0xfdffffff: Kernel level one page table
* 0xfe000000-0xff7fffff: Kernel code and data
* 0xf7c00000-0xf7ffefff: Kernel level two page tables
* 0xf7fff000-0xf7ffffff: Kernel level one page table
* 0xf8000000-0xff7fffff: Kernel code and data
* 0xffc00000-0xffc00fff: Kernel temporary stack
* 0xffc80000-0xffc80fff: Duarts and Parity control
* 0xffd00000-0xffdfffff: SCSI polled
@ -879,7 +878,6 @@ init532()
extern char etext[], edata[], end[], *esym;
pd_entry_t *pd;
#if VERYLOWDEBUG
umprintf ("Starting init532\n");
#endif
@ -963,9 +961,7 @@ init532()
proc0.p_addr = proc0paddr;
/* Allocate second level page tables for kernel virtual address space */
map(pd, VM_MIN_KERNEL_ADDRESS, (vm_offset_t)-1, 0,
VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS);
map(pd, VM_MIN_KERNEL_ADDRESS, (vm_offset_t)-1, 0, NKPDE << PDSHIFT);
/* Map monitor scratch area R/W. */
map(pd, KERNBASE, 0x00000000, PG_KW, 0x2000);
/* Map kernel text R/O. */
@ -976,10 +972,20 @@ init532()
/* Alias the mapping at KERNBASE to 0 */
pd[pdei(0)] = pd[pdei(KERNBASE)];
#if VERYLOWDEBUG
umprintf ("enabling mapping\n");
#endif
/* Load the ptb registers and start mapping. */
load_ptb(pd);
lmr(mcr, 3);
#if VERYLOWDEBUG
/* Let scncnputc know which form to use. */
_mapped = 1;
umprintf ("done\n");
#endif
#if VERYLOWDEBUG
umprintf ("Just before jump to high memory.\n");
#endif
@ -987,11 +993,6 @@ init532()
/* Jump to high memory */
__asm __volatile("jump @1f; 1:");
#if VERYLOWDEBUG
/* Let scncnputc know which form to use. */
_mapped = 1;
#endif
/* Set up the ICU. */
icu_init();
intr_init();

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.16 1996/10/23 07:46:07 matthias Exp $ */
/* $NetBSD: pmap.c,v 1.17 1996/12/07 09:24:58 matthias Exp $ */
/*
* Copyright (c) 1993, 1994, 1995 Charles M. Hannum. All rights reserved.
@ -645,6 +645,9 @@ pmap_pinit(pmap)
pmap->pm_pdir[PTDPTDI] =
pmap_extract(pmap_kernel(), (vm_offset_t)pmap->pm_pdir) | PG_V | PG_KW;
/* wire in i/o page */
pmap->pm_pdir[APTDPTDI + 1] = PTD[APTDPTDI + 1];
pmap->pm_count = 1;
simple_lock_init(&pmap->pm_lock);
}