Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sh3/sh3 pmap_extract: handle P1 and P2 (MMU bypass)...



details:   https://anonhg.NetBSD.org/src/rev/ef4a134e9db7
branches:  trunk
changeset: 588140:ef4a134e9db7
user:      uwe <uwe%NetBSD.org@localhost>
date:      Thu Feb 09 10:08:32 2006 +0000

description:
pmap_extract: handle P1 and P2 (MMU bypass) addresses specially.
PMAP_MAP_POOLPAGE maps pa -> P1 va, so we must handle this case here.
PR port-sh3/26569 by Nick Hudson.

diffstat:

 sys/arch/sh3/sh3/pmap.c |  14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r e66b173cbbe1 -r ef4a134e9db7 sys/arch/sh3/sh3/pmap.c
--- a/sys/arch/sh3/sh3/pmap.c   Thu Feb 09 08:55:00 2006 +0000
+++ b/sys/arch/sh3/sh3/pmap.c   Thu Feb 09 10:08:32 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.52 2006/01/21 00:56:05 uwe Exp $    */
+/*     $NetBSD: pmap.c,v 1.53 2006/02/09 10:08:32 uwe Exp $    */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.52 2006/01/21 00:56:05 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.53 2006/02/09 10:08:32 uwe Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -585,8 +585,16 @@
 boolean_t
 pmap_extract(pmap_t pmap, vaddr_t va, paddr_t *pap)
 {
-       pt_entry_t *pte = __pmap_pte_lookup(pmap, va);
+       pt_entry_t *pte;
 
+       /* handle P1 and P2 specially: va == pa */
+       if (pmap == pmap_kernel() && (va >> 30) == 2) {
+               if (pap != NULL)
+                       *pap = va & SH3_PHYS_MASK;
+               return (TRUE);
+       }
+
+       pte = __pmap_pte_lookup(pmap, va);
        if (pte == NULL || *pte == 0)
                return (FALSE);
 



Home | Main Index | Thread Index | Old Index