Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mac68k/mac68k Pull code that maps the kernel segmen...
details: https://anonhg.NetBSD.org/src/rev/3172f6a881fe
branches: trunk
changeset: 760324:3172f6a881fe
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sun Jan 02 18:16:59 2011 +0000
description:
Pull code that maps the kernel segment table cache invalidated for 040/060,
to reduce diffs from other m68k ports.
Tested on LC630 (with 68LC040) upto single user.
diffstat:
sys/arch/mac68k/mac68k/pmap_bootstrap.c | 28 ++++++++++++++++++++++++----
1 files changed, 24 insertions(+), 4 deletions(-)
diffs (59 lines):
diff -r 6db428a2b54a -r 3172f6a881fe sys/arch/mac68k/mac68k/pmap_bootstrap.c
--- a/sys/arch/mac68k/mac68k/pmap_bootstrap.c Sun Jan 02 18:13:10 2011 +0000
+++ b/sys/arch/mac68k/mac68k/pmap_bootstrap.c Sun Jan 02 18:16:59 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_bootstrap.c,v 1.90 2011/01/02 08:40:55 tsutsui Exp $ */
+/* $NetBSD: pmap_bootstrap.c,v 1.91 2011/01/02 18:16:59 tsutsui Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.90 2011/01/02 08:40:55 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.91 2011/01/02 18:16:59 tsutsui Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -370,11 +370,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 = PA2VA(kptpa, pt_entry_t *);
- 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
@@ -385,6 +385,26 @@
*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 = PA2VA(kptpa, pt_entry_t *);
+ epte = &epte[m68k_btop(nextpa - firstpa)];
+ protopte = (protopte & ~PG_PROT) | PG_RW;
+ if (mmutype == MMU_68040) {
+ protopte &= ~PG_CCB;
+ protopte |= PG_CIN;
+ }
+ while (pte < epte) {
+ *pte++ = protopte;
+ protopte += PAGE_SIZE;
+ }
+
+ /*
+ * Finally, validate the internal IO space PTEs (RW+CI).
+ */
#define PTE2VA(pte) m68k_ptob(pte - PA2VA(kptpa, pt_entry_t *))
Home |
Main Index |
Thread Index |
Old Index