Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm32 If the vector_page is not ARM_VECTORS_{LO...
details: https://anonhg.NetBSD.org/src/rev/1ce83d89d1fe
branches: trunk
changeset: 787352:1ce83d89d1fe
user: matt <matt%NetBSD.org@localhost>
date: Wed Jun 12 07:13:18 2013 +0000
description:
If the vector_page is not ARM_VECTORS_{LOW,HIGH}, assume it's in kernel
text and don't do anything special to map it.
diffstat:
sys/arch/arm/arm32/pmap.c | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diffs (47 lines):
diff -r ba418e570ce9 -r 1ce83d89d1fe sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Wed Jun 12 07:12:10 2013 +0000
+++ b/sys/arch/arm/arm32/pmap.c Wed Jun 12 07:13:18 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.255 2013/05/11 10:15:43 skrll Exp $ */
+/* $NetBSD: pmap.c,v 1.256 2013/06/12 07:13:18 matt Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@@ -162,8 +162,8 @@
* the active domain on that cpu). I guess there are lots more tlb
* shootdown issues too...
*
- * o If the vector_page is at 0x00000000 instead of 0xffff0000, then
- * MP systems will lose big-time because of the MMU domain hack.
+ * o If the vector_page is at 0x00000000 instead of in kernel VA space,
+ * then MP systems will lose big-time because of the MMU domain hack.
* The only way this can be solved (apart from moving the vector
* page to 0xffff0000) is to reserve the first 1MB of user address
* space for kernel use only. This would require re-linking all
@@ -212,7 +212,7 @@
#include <arm/cpuconf.h>
#include <arm/arm32/katelib.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.255 2013/05/11 10:15:43 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.256 2013/06/12 07:13:18 matt Exp $");
#ifdef PMAP_DEBUG
@@ -5135,6 +5135,17 @@
struct l2_bucket *l2b;
pt_entry_t *ptep;
+#if defined(CPU_ARMV7) || defined(CPU_ARM11)
+ /*
+ * If we are using VBAR to use the vectors in the kernel, then it's
+ * already mapped in the kernel text so no need to anything here.
+ */
+ if (vector_page != ARM_VECTORS_LOW && vector_page != ARM_VECTORS_HIGH) {
+ KASSERT((armreg_pfr1_read() & ARM_PFR1_SEC_MASK) != 0);
+ return;
+ }
+#endif
+
l2b = pmap_get_l2_bucket(pmap_kernel(), vector_page);
KDASSERT(l2b != NULL);
Home |
Main Index |
Thread Index |
Old Index