Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/luna68k/luna68k This file is a replicant of hp300. ...
details: https://anonhg.NetBSD.org/src/rev/b1f350e6f960
branches: trunk
changeset: 500438:b1f350e6f960
user: nisimura <nisimura%NetBSD.org@localhost>
date: Tue Dec 12 04:06:08 2000 +0000
description:
This file is a replicant of hp300. The following is peculair to
the original HPBSD implementation and HP hardware design.
* Portions of the last segment of KVA space (0xFFF00000 -
* 0xFFFFFFFF) are mapped for a couple of purposes. 0xFFF00000
* for UPAGES is used for mapping the current process u-area
* (u + kernel stack). The very last page (0xFFFFF000) is mapped
* to the last physical page of RAM to give us a region in which
* PA == VA. We use the first part of this page for enabling
* and disabling mapping. The last part of this page also contains
* info left by the boot ROM.
Nuke lptpa because that is irrelavant for LUNA.
Put #if defined(M68040) for consistency postponing efforts of LUNA-2.
diffstat:
sys/arch/luna68k/luna68k/pmap_bootstrap.c | 49 +++++-------------------------
1 files changed, 8 insertions(+), 41 deletions(-)
diffs (115 lines):
diff -r b6a81ff1c8a5 -r b1f350e6f960 sys/arch/luna68k/luna68k/pmap_bootstrap.c
--- a/sys/arch/luna68k/luna68k/pmap_bootstrap.c Tue Dec 12 04:04:29 2000 +0000
+++ b/sys/arch/luna68k/luna68k/pmap_bootstrap.c Tue Dec 12 04:06:08 2000 +0000
@@ -1,5 +1,4 @@
-/* $NetBSD: pmap_bootstrap.c,v 1.2 2000/06/29 08:17:26 mrg Exp $ */
-/* $NetBSD: pmap_bootstrap.c,v 1.2 2000/06/29 08:17:26 mrg Exp $ */
+/* $NetBSD: pmap_bootstrap.c,v 1.3 2000/12/12 04:06:08 nisimura Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -93,7 +92,7 @@
paddr_t nextpa;
paddr_t firstpa;
{
- paddr_t kstpa, kptpa, eiiopa, iiopa, kptmpa, lkptpa, p0upa;
+ paddr_t kstpa, kptpa, eiiopa, iiopa, kptmpa, p0upa;
u_int nptpages, kstsize;
st_entry_t protoste, *ste;
pt_entry_t protopte, *pte, *epte;
@@ -120,8 +119,6 @@
*
* kptmpa kernel PT map 1 page
*
- * lkptpa last kernel PT page 1 page
- *
* p0upa proc 0 u-area UPAGES pages
*
* The KVA corresponding to any of these PAs is:
@@ -144,18 +141,10 @@
iiopa = nextpa - iiomapsize * sizeof(pt_entry_t);
kptmpa = nextpa;
nextpa += NBPG;
- lkptpa = nextpa;
- nextpa += NBPG;
p0upa = nextpa;
nextpa += USPACE;
/*
- * Clear all PTEs to zero
- */
- for (pte = (pt_entry_t *)kstpa; pte < (pt_entry_t *)nextpa; pte++)
- *pte = 0;
-
- /*
* Initialize segment table and kernel page table map.
*
* On 68030s and earlier MMUs the two are identical except for
@@ -169,20 +158,12 @@
* each mapping 256kb. Note that there may be additional "segment
* table" pages depending on how large MAXKL2SIZE is.
*
- * Portions of the last segment of KVA space (0xFFF00000 -
- * 0xFFFFFFFF) are mapped for a couple of purposes. 0xFFF00000
- * for UPAGES is used for mapping the current process u-area
- * (u + kernel stack). The very last page (0xFFFFF000) is mapped
- * to the last physical page of RAM to give us a region in which
- * PA == VA. We use the first part of this page for enabling
- * and disabling mapping. The last part of this page also contains
- * info left by the boot ROM.
- *
* XXX cramming two levels of mapping into the single "segment"
* table on the 68040 is intended as a temporary hack to get things
* working. The 224mb of address space that this allows will most
* likely be insufficient in the future (at least for the kernel).
*/
+#if defined(M68040)
if (RELOC(mmutype, int) == MMU_68040) {
int num;
@@ -253,12 +234,13 @@
/*
* Invalidate all but the last remaining entry.
*/
- epte = &((u_int *)kptmpa)[NPTEPG-1];
+ epte = &((u_int *)kptmpa)[NPTEPG];
while (pte < epte) {
*pte++ = PG_NV;
}
- *pte = lkptpa | PG_RW | PG_CI | PG_V;
- } else {
+ } else
+#endif
+ {
/*
* Map the page table pages in both the HW segment table
* and the software Sysptmap. Note that Sysptmap is also
@@ -278,27 +260,12 @@
/*
* Invalidate all but the last remaining entries in both.
*/
- epte = &((u_int *)kptmpa)[NPTEPG-1];
+ epte = &((u_int *)kptmpa)[NPTEPG];
while (pte < epte) {
*ste++ = SG_NV;
*pte++ = PG_NV;
}
- /*
- * Initialize the last to point to point to the page
- * table page allocated earlier.
- */
- *ste = lkptpa | SG_RW | SG_V;
- *pte = lkptpa | PG_RW | PG_CI | PG_V;
}
- /*
- * Invalidate all but the final entry in the last kernel PT page
- * (u-area PTEs will be validated later). The final entry maps
- * the last page of physical memory.
- */
- pte = (u_int *)lkptpa;
- epte = &pte[NPTEPG-1];
- while (pte < epte)
- *pte++ = PG_NV;
/*
* Initialize kernel page table.
Home |
Main Index |
Thread Index |
Old Index