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 Use the correct (L1_S_PROT, not L2_S_PROT...



details:   https://anonhg.NetBSD.org/src/rev/65674f79e25f
branches:  trunk
changeset: 781214:65674f79e25f
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Aug 27 12:05:30 2012 +0000

description:
Use the correct (L1_S_PROT, not L2_S_PROT) macro for setting the protection
of the vector page.  This fixes a nasty little bug that shows up on armv7
systems when the vector page physical address changes (bit 12 of the address
is cleared) and then any exception causes the system to hang.

diffstat:

 sys/arch/arm/arm32/pmap.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r bee26b63264b -r 65674f79e25f sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Mon Aug 27 11:35:13 2012 +0000
+++ b/sys/arch/arm/arm32/pmap.c Mon Aug 27 12:05:30 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.230 2012/08/20 13:03:41 matt Exp $  */
+/*     $NetBSD: pmap.c,v 1.231 2012/08/27 12:05:30 matt Exp $  */
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -211,7 +211,7 @@
 #include <machine/param.h>
 #include <arm/arm32/katelib.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.230 2012/08/20 13:03:41 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.231 2012/08/27 12:05:30 matt Exp $");
 
 #ifdef PMAP_DEBUG
 
@@ -4976,7 +4976,7 @@
 
        ptep = &l2b->l2b_kva[l2pte_index(vector_page)];
 
-       *ptep = (*ptep & ~L1_S_PROT_MASK) | L2_S_PROT(PTE_KERNEL, prot);
+       *ptep = (*ptep & ~L1_S_PROT_MASK) | L1_S_PROT(PTE_KERNEL, prot);
        PTE_SYNC(ptep);
        cpu_tlb_flushD_SE(vector_page);
        cpu_cpwait();



Home | Main Index | Thread Index | Old Index