Module Name: src Committed By: matt Date: Wed Jul 18 18:50:46 UTC 2012
Modified Files: src/sys/arch/powerpc/booke: e500_tlb.c Log Message: Don't assume 1:1 PA:VA mapping To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/booke/e500_tlb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/powerpc/booke/e500_tlb.c diff -u src/sys/arch/powerpc/booke/e500_tlb.c:1.9 src/sys/arch/powerpc/booke/e500_tlb.c:1.10 --- src/sys/arch/powerpc/booke/e500_tlb.c:1.9 Wed Jul 18 18:29:22 2012 +++ src/sys/arch/powerpc/booke/e500_tlb.c Wed Jul 18 18:50:46 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: e500_tlb.c,v 1.9 2012/07/18 18:29:22 matt Exp $ */ +/* $NetBSD: e500_tlb.c,v 1.10 2012/07/18 18:50:46 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -38,7 +38,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: e500_tlb.c,v 1.9 2012/07/18 18:29:22 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: e500_tlb.c,v 1.10 2012/07/18 18:50:46 matt Exp $"); #include <sys/param.h> @@ -722,7 +722,8 @@ e500_tlb_mapiodev(paddr_t pa, psize_t le && (prefetchable || (xtlb->e_tlb.tlb_pte & PTE_WIG) == (PTE_I|PTE_G))) { xtlb->e_refcnt++; - return (void *) pa; + return (void *) (xtlb->e_tlb.tlb_va + + pa - (xtlb->e_tlb.tlb_pte & PTE_RPN_MASK)); } return NULL; }