Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/arch/i386 Apply patch (requested by thorpej):
details: https://anonhg.NetBSD.org/src/rev/1a64299e6ef9
branches: netbsd-1-4
changeset: 470385:1a64299e6ef9
user: he <he%NetBSD.org@localhost>
date: Sat Feb 19 00:20:18 2000 +0000
description:
Apply patch (requested by thorpej):
Move KERNBASE to 0xc0000000, giving the kernel a more-or-less
full 1GB of virtual address space, leaving userland with 3GB,
and update comments to match the new reality.
diffstat:
sys/arch/i386/conf/Makefile.i386 | 4 +-
sys/arch/i386/include/param.h | 6 ++--
sys/arch/i386/include/pmap.h | 14 ++++++------
sys/arch/i386/include/pmap.new.h | 42 ++++++++++++++++++++--------------------
sys/arch/i386/include/vmparam.h | 16 +++++++-------
5 files changed, 41 insertions(+), 41 deletions(-)
diffs (197 lines):
diff -r 384a0bf2167b -r 1a64299e6ef9 sys/arch/i386/conf/Makefile.i386
--- a/sys/arch/i386/conf/Makefile.i386 Fri Feb 18 22:22:46 2000 +0000
+++ b/sys/arch/i386/conf/Makefile.i386 Sat Feb 19 00:20:18 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.i386,v 1.97 1999/01/28 20:04:54 christos Exp $
+# $NetBSD: Makefile.i386,v 1.97.2.1 2000/02/19 00:20:18 he Exp $
# Makefile for NetBSD
#
@@ -54,7 +54,7 @@
.endif
CFLAGS= ${DEBUG} ${COPTS} ${CWARNFLAGS}
AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
-LINKFLAGS= -Ttext F0100000 -e start
+LINKFLAGS= -Ttext c0100000 -e start
.if (${OBJECT_FMT} == "ELF")
#LINKFLAGS+= -N
.else
diff -r 384a0bf2167b -r 1a64299e6ef9 sys/arch/i386/include/param.h
--- a/sys/arch/i386/include/param.h Fri Feb 18 22:22:46 2000 +0000
+++ b/sys/arch/i386/include/param.h Sat Feb 19 00:20:18 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.37 1999/03/10 18:02:22 sommerfe Exp $ */
+/* $NetBSD: param.h,v 1.37.2.1 2000/02/19 00:20:47 he Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -76,8 +76,8 @@
#define PGOFSET (NBPG-1) /* byte offset into page */
#define NPTEPG (NBPG/(sizeof (pt_entry_t)))
-#define KERNBASE 0xf0000000 /* start of kernel virtual space */
-#define KERNTEXTOFF 0xf0100000 /* start of kernel text */
+#define KERNBASE 0xc0000000 /* start of kernel virtual space */
+#define KERNTEXTOFF 0xc0100000 /* start of kernel text */
#define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT)
#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
diff -r 384a0bf2167b -r 1a64299e6ef9 sys/arch/i386/include/pmap.h
--- a/sys/arch/i386/include/pmap.h Fri Feb 18 22:22:46 2000 +0000
+++ b/sys/arch/i386/include/pmap.h Sat Feb 19 00:20:18 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.38 1998/08/15 05:10:25 mycroft Exp $ */
+/* $NetBSD: pmap.h,v 1.38.6.1 2000/02/19 00:20:48 he Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -114,12 +114,12 @@
* One page directory, shared between
* kernel and user modes.
*/
-#define PTDPTDI 0x3bf /* ptd entry that points to ptd! */
-#define KPTDI 0x3c0 /* start of kernel virtual pde's */
-#define NKPDE_BASE 4 /* min. # of kernel PDEs */
-#define NKPDE_MAX 63 /* max. # of kernel PDEs */
-#define NKPDE_SCALE 1 /* # of kernel PDEs to add per meg. */
-#define APTDPTDI 0x3ff /* start of alternate page directory */
+#define PTDPTDI ((KERNBASE/NBPD)-1) /* ptd entry that points to ptd! */
+#define KPTDI (KERNBASE/NBPD) /* start of kernel virtual pde's */
+#define NKPDE_BASE 4 /* min. # of kernel PDEs */
+#define NKPDE_MAX 255 /* max. # of kernel PDEs */
+#define NKPDE_SCALE 1 /* # of kernel PDEs to add per meg. */
+#define APTDPTDI ((unsigned)1023) /* start of alternate page directory */
#define UPT_MIN_ADDRESS (PTDPTDI<<PDSHIFT)
#define UPT_MAX_ADDRESS (UPT_MIN_ADDRESS + (PTDPTDI<<PGSHIFT))
diff -r 384a0bf2167b -r 1a64299e6ef9 sys/arch/i386/include/pmap.new.h
--- a/sys/arch/i386/include/pmap.new.h Fri Feb 18 22:22:46 2000 +0000
+++ b/sys/arch/i386/include/pmap.new.h Sat Feb 19 00:20:18 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.new.h,v 1.7.6.1 1999/05/05 17:02:34 perry Exp $ */
+/* $NetBSD: pmap.new.h,v 1.7.6.2 2000/02/19 00:20:48 he Exp $ */
/*
*
@@ -52,17 +52,17 @@
* are described by PDEs in the PDP. the PDEs are defined as follows:
*
* (ranges are inclusive -> exclusive, just like vm_map_entry start/end)
- * (the following assumes that KERNBASE is 0xf0000000)
+ * (the following assumes that KERNBASE is 0xc0000000)
*
* PDE#s VA range usage
- * 0->959 0x0 -> 0xefc00000 user address space, note that the
- * max user address is 0xefbfe000
+ * 0->767 0x0 -> 0xbfc00000 user address space, note that the
+ * max user address is 0xbfbfe000
* the final two pages in the last 4MB
* used to be reserved for the UAREA
* but now are no longer used
- * 959 0xefc00000-> recursive mapping of PDP (used for
- * 0xf0000000 linear mapping of PTPs)
- * 960->1023 0xf0000000-> kernel address space (constant
+ * 768 0xbfc00000-> recursive mapping of PDP (used for
+ * 0xc0000000 linear mapping of PTPs)
+ * 768->1023 0xc0000000-> kernel address space (constant
* 0xffc00000 across all pmap's/processes)
* 1023 0xffc00000-> "alternate" recursive PDP mapping
* <end> (for other pmaps)
@@ -75,18 +75,18 @@
* 4MB range is the PTE that maps VA 0xffffe000 (the last page in a 4GB
* address).
*
- * all pmap's PD's must have the same values in slots 960->1023 so that
+ * all pmap's PD's must have the same values in slots 768->1023 so that
* the kernel is always mapped in every process. these values are loaded
* into the PD at pmap creation time.
*
* at any one time only one pmap can be active on a processor. this is
* the pmap whose PDP is pointed to by processor register %cr3. this pmap
* will have all its PTEs mapped into memory at the recursive mapping
- * point (slot #959 as show above). when the pmap code wants to find the
+ * point (slot #767 as show above). when the pmap code wants to find the
* PTE for a virtual address, all it has to do is the following:
*
- * address of PTE = (959 * 4MB) + (VA / NBPG) * sizeof(pt_entry_t)
- * = 0xefc00000 + (VA /4096) * 4
+ * address of PTE = (767 * 4MB) + (VA / NBPG) * sizeof(pt_entry_t)
+ * = 0xbfc00000 + (VA / 4096) * 4
*
* what happens if the pmap layer is asked to perform an operation
* on a pmap that is not the one which is currently active? in that
@@ -102,25 +102,25 @@
* | 0| -> PTP#0 that maps VA 0x0 -> 0x400000
* | |
* | |
- * | 959| -> points back to PDP (%cr3) mapping VA 0xefc00000 -> 0xf0000000
- * | 960| -> first kernel PTP (maps 0xf0000000 -> 0xf0400000)
+ * | 767| -> points back to PDP (%cr3) mapping VA 0xbfc00000 -> 0xc0000000
+ * | 768| -> first kernel PTP (maps 0xc0000000 -> 0xf0400000)
* | |
* |1023| -> points to alternate pmap's PDP (maps 0xffc00000 -> end)
* +----+
*
- * note that the PDE#959 VA (0xefc00000) is defined as "PTE_BASE"
+ * note that the PDE#767 VA (0xbfc00000) is defined as "PTE_BASE"
* note that the PDE#1023 VA (0xffc00000) is defined as "APTE_BASE"
*
- * starting at VA 0xefc00000 the current active PDP (%cr3) acts as a
+ * starting at VA 0xbfc00000 the current active PDP (%cr3) acts as a
* PTP:
*
- * PTP#959 == PDP(%cr3) => maps VA 0xefc00000 -> 0xf0000000
+ * PTP#767 == PDP(%cr3) => maps VA 0xbfc00000 -> 0xc0000000
* +----+
- * | 0| -> maps the contents of PTP#0 at VA 0xefc00000->0xefc01000
+ * | 0| -> maps the contents of PTP#0 at VA 0xbfc00000->0xbfc01000
* | |
* | |
- * | 959| -> maps contents of PTP#959 (the PDP) at VA 0xeffbf000
- * | 960| -> maps contents of first kernel PTP
+ * | 767| -> maps contents of PTP#767 (the PDP) at VA 0xbffbf000
+ * | 768| -> maps contents of first kernel PTP
* | |
* |1023|
* +----+
@@ -143,8 +143,8 @@
* the following defines identify the slots used as described above.
*/
-#define PDSLOT_PTE ((KERNBASE/NBPD)-1) /* 959: for recursive PDP map */
-#define PDSLOT_KERN (KERNBASE/NBPD) /* 960: start of kernel space */
+#define PDSLOT_PTE ((KERNBASE/NBPD)-1) /* 767: for recursive PDP map */
+#define PDSLOT_KERN (KERNBASE/NBPD) /* 768: start of kernel space */
#define PDSLOT_APTE ((unsigned)1023) /* 1023: alternative recursive slot */
/*
diff -r 384a0bf2167b -r 1a64299e6ef9 sys/arch/i386/include/vmparam.h
--- a/sys/arch/i386/include/vmparam.h Fri Feb 18 22:22:46 2000 +0000
+++ b/sys/arch/i386/include/vmparam.h Sat Feb 19 00:20:18 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmparam.h,v 1.30 1999/01/16 20:30:35 chuck Exp $ */
+/* $NetBSD: vmparam.h,v 1.30.2.1 2000/02/19 00:20:48 he Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -131,13 +131,13 @@
/* user/kernel map constants */
#define VM_MIN_ADDRESS ((vaddr_t)0)
-/* PTDPTDI<<PDSHIFT - UPAGES*NBPG */
-#define VM_MAXUSER_ADDRESS ((vaddr_t)0xefbfe000)
-/* PTDPTDI<<PDSHIFT + PTDPTDI<<PGSHIFT */
-#define VM_MAX_ADDRESS ((vaddr_t)0xeffbf000)
-/* KPTDI<<PDSHIFT */
-#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0xf0000000)
-/* APTDPTDI<<PDSHIFT */
+/* (PDSLOT_PTE << PDSHIFT) - UPAGES*NBPG */
+#define VM_MAXUSER_ADDRESS ((vaddr_t)0xbfbfe000)
+/* (PDSLOT_PTE << PDSHIFT) + (PDSLOT_PTE << PGSHIFT) */
+#define VM_MAX_ADDRESS ((vaddr_t)0xbfeff000)
+/* PDSLOT_KERN << PDSHIFT */
+#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0xc0000000)
+/* PDSLOT_APTE << PDSHIFT */
#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xffc00000)
/* XXX max. amount of KVM to be used by buffers. */
Home |
Main Index |
Thread Index |
Old Index