Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/oea Add a KASSERT to pmap_extract so that v...



details:   https://anonhg.NetBSD.org/src/rev/abd591d5d681
branches:  trunk
changeset: 545387:abd591d5d681
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Apr 07 21:42:14 2003 +0000

description:
Add a KASSERT to pmap_extract so that vtophys is never attempted on a
mapped user address.

diffstat:

 sys/arch/powerpc/oea/pmap.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 42f0989fa1b0 -r abd591d5d681 sys/arch/powerpc/oea/pmap.c
--- a/sys/arch/powerpc/oea/pmap.c       Mon Apr 07 21:29:48 2003 +0000
+++ b/sys/arch/powerpc/oea/pmap.c       Mon Apr 07 21:42:14 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.7 2003/04/04 22:38:05 matt Exp $    */
+/*     $NetBSD: pmap.c,v 1.8 2003/04/07 21:42:14 matt Exp $    */
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -1833,6 +1833,7 @@
            (va < VM_MIN_KERNEL_ADDRESS ||
             (KERNEL2_SR < 15 && VM_MAX_KERNEL_ADDRESS <= va))) {
                register_t batu = battable[va >> ADDR_SR_SHFT].batu;
+               KASSERT((va >> ADDR_SR_SHFT) != USER_SR);
                if (BAT_VALID_P(batu,0) && BAT_VA_MATCH_P(batu,va)) {
                        register_t batl = battable[va >> ADDR_SR_SHFT].batl;
                        register_t mask = (~(batu & BAT_BL) << 15) & ~0x1ffffL;



Home | Main Index | Thread Index | Old Index