diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-06-04 03:22:16 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-06-04 03:22:16 +0000 |
commit | c93ed764cc3dd28dafc36852422c688d5a56b267 (patch) | |
tree | 0de2f2249b6f7efdcfe58ab7c3c732e8a1ee3206 /sys/powerpc/aim/mmu_oea64.c | |
parent | 61654ba68b4efa7f996ca6c4084d645565ca7eb4 (diff) | |
download | FreeBSD-src-c93ed764cc3dd28dafc36852422c688d5a56b267.zip FreeBSD-src-c93ed764cc3dd28dafc36852422c688d5a56b267.tar.gz |
Fix a typo derived from a mismerge from mmu_oea that would cause
pmap_sync_icache() to sync random (possibly uncached or nonexisting!)
memory, causing kernel page faults or machine checks, most easily
triggered by using GDB. While here, add an additional safeguard to only
sync cacheable memory.
MFC after: 2 days
Diffstat (limited to 'sys/powerpc/aim/mmu_oea64.c')
-rw-r--r-- | sys/powerpc/aim/mmu_oea64.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c index bd7b709..12a1201 100644 --- a/sys/powerpc/aim/mmu_oea64.c +++ b/sys/powerpc/aim/mmu_oea64.c @@ -2562,8 +2562,8 @@ moea64_sync_icache(mmu_t mmu, pmap_t pm, vm_offset_t va, vm_size_t sz) lim = round_page(va); len = MIN(lim - va, sz); pvo = moea64_pvo_find_va(pm, va & ~ADDR_POFF); - if (pvo != NULL) { - pa = (pvo->pvo_pte.pte.pte_lo & LPTE_RPGN) | + if (pvo != NULL && !(pvo->pvo_pte.lpte.pte_lo & LPTE_I)) { + pa = (pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN) | (va & ADDR_POFF); moea64_syncicache(mmu, pm, va, pa, len); } |