Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Pull code that maps the kernel segment table cache ...
details: https://anonhg.NetBSD.org/src/rev/0749005997d4
branches: trunk
changeset: 760326:0749005997d4
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sun Jan 02 18:39:11 2011 +0000
description:
Pull code that maps the kernel segment table cache invalidated for 040/060,
to reduce diffs from other m68k ports.
Compile test only. (any working machine for these port?)
diffstat:
sys/arch/cesfic/cesfic/pmap_bootstrap.c | 25 ++++++++++++++++++++-----
sys/arch/luna68k/luna68k/pmap_bootstrap.c | 26 ++++++++++++++++++++++----
2 files changed, 42 insertions(+), 9 deletions(-)
diffs (112 lines):
diff -r 728ccf2a0e50 -r 0749005997d4 sys/arch/cesfic/cesfic/pmap_bootstrap.c
--- a/sys/arch/cesfic/cesfic/pmap_bootstrap.c Sun Jan 02 18:28:36 2011 +0000
+++ b/sys/arch/cesfic/cesfic/pmap_bootstrap.c Sun Jan 02 18:39:11 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_bootstrap.c,v 1.29 2011/01/02 08:40:54 tsutsui Exp $ */
+/* $NetBSD: pmap_bootstrap.c,v 1.30 2011/01/02 18:39:11 tsutsui Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.29 2011/01/02 08:40:54 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.30 2011/01/02 18:39:11 tsutsui Exp $");
#include <sys/param.h>
#include <uvm/uvm_extern.h>
@@ -343,18 +343,33 @@
}
/*
* Validate PTEs for kernel data/bss, dynamic data allocated
- * by us so far (nextpa - firstpa bytes), and pages for lwp0
+ * by us so far (kstpa - firstpa bytes), and pages for lwp0
* u-area and page table allocated below (RW).
*/
epte = (pt_entry_t *)kptpa;
- epte = &epte[m68k_btop(KERNBASE + nextpa - firstpa)];
+ epte = &epte[m68k_btop(KERNBASE + kstpa - firstpa)];
protopte = (protopte & ~PG_PROT) | PG_RW;
/*
* Enable copy-back caching of data pages
*/
if (RELOC(mmutype, int) == MMU_68040)
protopte |= PG_CCB;
-
+ while (pte < epte) {
+ *pte++ = protopte;
+ protopte += PAGE_SIZE;
+ }
+ /*
+ * map the kernel segment table cache invalidated for
+ * these machines (for the 68040 not strictly necessary, but
+ * recommended by Motorola; for the 68060 mandatory)
+ */
+ epte = (pt_entry_t *)kptpa;
+ epte = &epte[m68k_btop(KERNBASE + nextpa - firstpa)];
+ protopte = (protopte & ~PG_PROT) | PG_RW;
+ if (RELOC(mmutype, int) == MMU_68040) {
+ protopte &= ~PG_CCB;
+ protopte |= PG_CIN;
+ }
while (pte < epte) {
*pte++ = protopte;
protopte += PAGE_SIZE;
diff -r 728ccf2a0e50 -r 0749005997d4 sys/arch/luna68k/luna68k/pmap_bootstrap.c
--- a/sys/arch/luna68k/luna68k/pmap_bootstrap.c Sun Jan 02 18:28:36 2011 +0000
+++ b/sys/arch/luna68k/luna68k/pmap_bootstrap.c Sun Jan 02 18:39:11 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_bootstrap.c,v 1.30 2011/01/02 08:40:54 tsutsui Exp $ */
+/* $NetBSD: pmap_bootstrap.c,v 1.31 2011/01/02 18:39:11 tsutsui Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.30 2011/01/02 08:40:54 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.31 2011/01/02 18:39:11 tsutsui Exp $");
#include "opt_m68k_arch.h"
@@ -321,11 +321,11 @@
}
/*
* Validate PTEs for kernel data/bss, dynamic data allocated
- * by us so far (nextpa - firstpa bytes), and pages for lwp0
+ * by us so far (kstpa - firstpa bytes), and pages for lwp0
* u-area and page table allocated below (RW).
*/
epte = (pt_entry_t *)kptpa;
- epte = &epte[m68k_btop(nextpa - firstpa)];
+ epte = &epte[m68k_btop(kstpa - firstpa)];
protopte = (protopte & ~PG_PROT) | PG_RW;
/*
* Enable copy-back caching of data pages
@@ -336,6 +336,24 @@
*pte++ = protopte;
protopte += PAGE_SIZE;
}
+ /*
+ * map the kernel segment table cache invalidated for
+ * these machines (for the 68040 not strictly necessary, but
+ * recommended by Motorola; for the 68060 mandatory)
+ */
+ epte = (pt_entry_t *)kptpa;
+ epte = &epte[m68k_btop(nextpa - firstpa)];
+ protopte = (protopte & ~PG_PROT) | PG_RW;
+#if defined(M68040)
+ if (RELOC(mmutype, int) == MMU_68040) {
+ protopte &= ~PG_CCB;
+ protopte |= PG_CIN;
+ }
+#endif
+ while (pte < epte) {
+ *pte++ = protopte;
+ protopte += PAGE_SIZE;
+ }
/*
* Finally, validate the internal IO space PTEs (RW+CI).
Home |
Main Index |
Thread Index |
Old Index