Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Allocate lwp0upa (PA of lwp0 uarea) right after ker...
details: https://anonhg.NetBSD.org/src/rev/730732d2b0de
branches: trunk
changeset: 749628:730732d2b0de
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Fri Dec 04 18:55:13 2009 +0000
description:
Allocate lwp0upa (PA of lwp0 uarea) right after kernel rather than
between other page tables to use different mappings for ste/pte pages
as well as amiga and atari. Should resolve XXX comments in next68k and x68k.
Tested on hp300 and mac68k.
diffstat:
sys/arch/cesfic/cesfic/pmap_bootstrap.c | 20 ++++++++++----------
sys/arch/hp300/hp300/pmap_bootstrap.c | 20 ++++++++++----------
sys/arch/luna68k/luna68k/pmap_bootstrap.c | 16 ++++++++--------
sys/arch/mac68k/mac68k/pmap_bootstrap.c | 16 ++++++++--------
sys/arch/mvme68k/mvme68k/pmap_bootstrap.c | 16 ++++++++--------
sys/arch/news68k/news68k/pmap_bootstrap.c | 16 ++++++++--------
sys/arch/next68k/next68k/pmap_bootstrap.c | 21 ++++++++++-----------
sys/arch/x68k/x68k/pmap_bootstrap.c | 17 ++++++++---------
8 files changed, 70 insertions(+), 72 deletions(-)
diffs (truncated from 479 to 300 lines):
diff -r b52e09946ef3 -r 730732d2b0de sys/arch/cesfic/cesfic/pmap_bootstrap.c
--- a/sys/arch/cesfic/cesfic/pmap_bootstrap.c Fri Dec 04 18:32:31 2009 +0000
+++ b/sys/arch/cesfic/cesfic/pmap_bootstrap.c Fri Dec 04 18:55:13 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_bootstrap.c,v 1.20 2009/12/04 18:32:31 tsutsui Exp $ */
+/* $NetBSD: pmap_bootstrap.c,v 1.21 2009/12/04 18:55:13 tsutsui Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.20 2009/12/04 18:32:31 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.21 2009/12/04 18:55:13 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -91,9 +91,15 @@
/*
* Calculate important physical addresses:
*
+ * lwp0upa lwp 0 u-area UPAGES pages
+ *
* kstpa kernel segment table 1 page (!040)
* N pages (040)
*
+ * kptmpa kernel PT map 1 page
+ *
+ * lkptpa last kernel PT page 1 page
+ *
* kptpa statically allocated
* kernel PT pages Sysptsize+ pages
*
@@ -101,15 +107,11 @@
* EIOMAPSIZE are the number of PTEs, hence we need to round
* the total to a page boundary with IO maps at the end. ]
*
- * kptmpa kernel PT map 1 page
- *
- * lkptpa last kernel PT page 1 page
- *
- * lwp0upa lwp 0 u-area UPAGES pages
- *
* The KVA corresponding to any of these PAs is:
* (PA - firstpa + KERNBASE).
*/
+ lwp0upa = nextpa;
+ nextpa += USPACE;
if (RELOC(mmutype, int) == MMU_68040)
kstsize = MAXKL2SIZE / (NPTEPG/SG4_LEV2SIZE);
else
@@ -120,8 +122,6 @@
nextpa += PAGE_SIZE;
lkptpa = nextpa;
nextpa += PAGE_SIZE;
- lwp0upa = nextpa;
- nextpa += USPACE;
kptpa = nextpa;
nptpages = RELOC(Sysptsize, int);
nextpa += nptpages * PAGE_SIZE;
diff -r b52e09946ef3 -r 730732d2b0de sys/arch/hp300/hp300/pmap_bootstrap.c
--- a/sys/arch/hp300/hp300/pmap_bootstrap.c Fri Dec 04 18:32:31 2009 +0000
+++ b/sys/arch/hp300/hp300/pmap_bootstrap.c Fri Dec 04 18:55:13 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_bootstrap.c,v 1.41 2009/12/04 18:32:31 tsutsui Exp $ */
+/* $NetBSD: pmap_bootstrap.c,v 1.42 2009/12/04 18:55:14 tsutsui Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.41 2009/12/04 18:32:31 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.42 2009/12/04 18:55:14 tsutsui Exp $");
#include <sys/param.h>
@@ -101,9 +101,15 @@
/*
* Calculate important physical addresses:
*
+ * lwp0upa lwp 0 u-area UPAGES pages
+ *
* kstpa kernel segment table 1 page (!040)
* N pages (040)
*
+ * kptmpa kernel PT map 1 page
+ *
+ * lkptpa last kernel PT page 1 page
+ *
* kptpa statically allocated
* kernel PT pages Sysptsize+ pages
*
@@ -111,15 +117,11 @@
* EIOMAPSIZE are the number of PTEs, hence we need to round
* the total to a page boundary with IO maps at the end. ]
*
- * kptmpa kernel PT map 1 page
- *
- * lkptpa last kernel PT page 1 page
- *
- * lwp0upa lwp 0 u-area UPAGES pages
- *
* The KVA corresponding to any of these PAs is:
* (PA - firstpa + KERNBASE).
*/
+ lwp0upa = nextpa;
+ nextpa += USPACE;
if (RELOC(mmutype, int) == MMU_68040)
kstsize = MAXKL2SIZE / (NPTEPG/SG4_LEV2SIZE);
else
@@ -130,8 +132,6 @@
nextpa += PAGE_SIZE;
lkptpa = nextpa;
nextpa += PAGE_SIZE;
- lwp0upa = nextpa;
- nextpa += USPACE;
kptpa = nextpa;
nptpages = RELOC(Sysptsize, int) +
(IIOMAPSIZE + EIOMAPSIZE + NPTEPG - 1) / NPTEPG;
diff -r b52e09946ef3 -r 730732d2b0de sys/arch/luna68k/luna68k/pmap_bootstrap.c
--- a/sys/arch/luna68k/luna68k/pmap_bootstrap.c Fri Dec 04 18:32:31 2009 +0000
+++ b/sys/arch/luna68k/luna68k/pmap_bootstrap.c Fri Dec 04 18:55:13 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_bootstrap.c,v 1.21 2009/12/04 18:32:31 tsutsui Exp $ */
+/* $NetBSD: pmap_bootstrap.c,v 1.22 2009/12/04 18:55:14 tsutsui Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.21 2009/12/04 18:32:31 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.22 2009/12/04 18:55:14 tsutsui Exp $");
#include <sys/param.h>
@@ -92,9 +92,13 @@
/*
* Calculate important physical addresses:
*
+ * lwp0upa lwp 0 u-area UPAGES pages
+ *
* kstpa kernel segment table 1 page (!040)
* N pages (040)
*
+ * kptmpa kernel PT map 1 page
+ *
* kptpa statically allocated
* kernel PT pages Sysptsize+ pages
*
@@ -102,16 +106,14 @@
* is the number of PTEs, hence we need to round
* the total to a page boundary with IO maps at the end. ]
*
- * kptmpa kernel PT map 1 page
- *
- * lwp0upa lwp 0 u-area UPAGES pages
- *
* The KVA corresponding to any of these PAs is:
* (PA - firstpa + KERNBASE).
*/
iiomapsize = m68k_btop(RELOC(intiotop_phys, u_int) -
RELOC(intiobase_phys, u_int));
+ lwp0upa = nextpa;
+ nextpa += USPACE;
if (RELOC(mmutype, int) == MMU_68040)
kstsize = MAXKL2SIZE / (NPTEPG/SG4_LEV2SIZE);
else
@@ -120,8 +122,6 @@
nextpa += kstsize * PAGE_SIZE;
kptmpa = nextpa;
nextpa += PAGE_SIZE;
- lwp0upa = nextpa;
- nextpa += USPACE;
kptpa = nextpa;
nptpages = RELOC(Sysptsize, int) +
(iiomapsize + NPTEPG - 1) / NPTEPG;
diff -r b52e09946ef3 -r 730732d2b0de sys/arch/mac68k/mac68k/pmap_bootstrap.c
--- a/sys/arch/mac68k/mac68k/pmap_bootstrap.c Fri Dec 04 18:32:31 2009 +0000
+++ b/sys/arch/mac68k/mac68k/pmap_bootstrap.c Fri Dec 04 18:55:13 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_bootstrap.c,v 1.82 2009/12/04 18:32:31 tsutsui Exp $ */
+/* $NetBSD: pmap_bootstrap.c,v 1.83 2009/12/04 18:55:14 tsutsui Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.82 2009/12/04 18:32:31 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.83 2009/12/04 18:55:14 tsutsui Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -126,9 +126,13 @@
/*
* Calculate important physical addresses:
*
+ * lwp0upa lwp 0 u-area UPAGES pages
+ *
* kstpa kernel segment table 1 page (!040)
* N pages (040)
*
+ * kptmpa kernel PT map 1 page
+ *
* kptpa statically allocated
* kernel PT pages Sysptsize+ pages
*
@@ -136,11 +140,9 @@
* NBMAPSIZE are the number of PTEs, hence we need to round
* the total to a page boundary with IO maps at the end. ]
*
- * kptmpa kernel PT map 1 page
- *
- * lwp0upa lwp 0 u-area UPAGES pages
- *
*/
+ lwp0upa = nextpa;
+ nextpa += USPACE;
if (mmutype == MMU_68040)
kstsize = MAXKL2SIZE / (NPTEPG/SG4_LEV2SIZE);
else
@@ -149,8 +151,6 @@
nextpa += kstsize * PAGE_SIZE;
kptmpa = nextpa;
nextpa += PAGE_SIZE;
- lwp0upa = nextpa;
- nextpa += USPACE;
kptpa = nextpa;
nptpages = Sysptsize +
(IIOMAPSIZE + ROMMAPSIZE + VIDMAPSIZE + NPTEPG - 1) / NPTEPG;
diff -r b52e09946ef3 -r 730732d2b0de sys/arch/mvme68k/mvme68k/pmap_bootstrap.c
--- a/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c Fri Dec 04 18:32:31 2009 +0000
+++ b/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c Fri Dec 04 18:55:13 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_bootstrap.c,v 1.35 2009/12/04 18:32:31 tsutsui Exp $ */
+/* $NetBSD: pmap_bootstrap.c,v 1.36 2009/12/04 18:55:14 tsutsui Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.35 2009/12/04 18:32:31 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.36 2009/12/04 18:55:14 tsutsui Exp $");
#include <sys/param.h>
#include <sys/kcore.h>
@@ -99,9 +99,15 @@
/*
* Calculate important physical addresses:
*
+ * lwp0upa lwp0 0 u-area UPAGES pages
+ *
* kstpa kernel segment table 1 page (!040)
* N pages (040)
*
+ * kptmpa kernel PT map 1 page
+ *
+ * lkptpa last kernel PT page 1 page
+ *
* kptpa statically allocated
* kernel PT pages Sysptsize+ pages
*
@@ -109,12 +115,6 @@
* number of PTEs, hence we need to round the total to a page
* boundary with IO maps at the end. ]
*
- * kptmpa kernel PT map 1 page
- *
- * lkptpa last kernel PT page 1 page
- *
- * lwp0upa lwp0 0 u-area UPAGES pages
- *
* The KVA corresponding to any of these PAs is:
* (PA - firstpa + KERNBASE).
*/
diff -r b52e09946ef3 -r 730732d2b0de sys/arch/news68k/news68k/pmap_bootstrap.c
--- a/sys/arch/news68k/news68k/pmap_bootstrap.c Fri Dec 04 18:32:31 2009 +0000
+++ b/sys/arch/news68k/news68k/pmap_bootstrap.c Fri Dec 04 18:55:13 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_bootstrap.c,v 1.25 2009/12/04 18:32:31 tsutsui Exp $ */
+/* $NetBSD: pmap_bootstrap.c,v 1.26 2009/12/04 18:55:14 tsutsui Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.25 2009/12/04 18:32:31 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.26 2009/12/04 18:55:14 tsutsui Exp $");
Home |
Main Index |
Thread Index |
Old Index