Module Name: src
Committed By: tsutsui
Date: Sun Jan 2 05:01:57 UTC 2011
Modified Files:
src/sys/arch/news68k/news68k: pmap_bootstrap.c
Log Message:
Pull code that maps the kernel segment table cache invalidated for 040/060,
to reduce diffs from other m68k ports.
(though news68k doesn't have 040/060 models)
To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/news68k/news68k/pmap_bootstrap.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/news68k/news68k/pmap_bootstrap.c
diff -u src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.32 src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.33
--- src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.32 Sun Jun 6 04:50:07 2010
+++ src/sys/arch/news68k/news68k/pmap_bootstrap.c Sun Jan 2 05:01:57 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_bootstrap.c,v 1.32 2010/06/06 04:50:07 mrg Exp $ */
+/* $NetBSD: pmap_bootstrap.c,v 1.33 2011/01/02 05:01:57 tsutsui Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -41,7 +41,7 @@
#include "opt_m68k_arch.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.32 2010/06/06 04:50:07 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.33 2011/01/02 05:01:57 tsutsui Exp $");
#include <sys/param.h>
@@ -343,11 +343,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
@@ -361,6 +361,25 @@
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;
+#ifdef 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).
*/