summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/include/tsb.h
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2001-08-03 01:21:24 +0000
committerjake <jake@FreeBSD.org>2001-08-03 01:21:24 +0000
commit524b50ae8e992a1d0d73c543d7ca736b37fb27aa (patch)
treece281049e45d919a319ff32d71cb40beac779062 /sys/sparc64/include/tsb.h
parent97f76f62e05b1c512f4074afdde8da345990321e (diff)
downloadFreeBSD-src-524b50ae8e992a1d0d73c543d7ca736b37fb27aa.zip
FreeBSD-src-524b50ae8e992a1d0d73c543d7ca736b37fb27aa.tar.gz
Fix a bug translating virtual translation table entry addresses to physical
addresses. It helps to use the physical address that the virtual address actually maps to (doh!). Comment out some code that crashes. Found independently by: tmm
Diffstat (limited to 'sys/sparc64/include/tsb.h')
-rw-r--r--sys/sparc64/include/tsb.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/sparc64/include/tsb.h b/sys/sparc64/include/tsb.h
index 5bc46cf..917121b 100644
--- a/sys/sparc64/include/tsb.h
+++ b/sys/sparc64/include/tsb.h
@@ -138,8 +138,7 @@ tsb_stte_vtophys(pmap_t pm, struct stte *stp)
va = (vm_offset_t)stp;
if (pm == kernel_pmap)
- return (tsb_kernel_phys +
- ((va - TSB_KERNEL_MIN_ADDRESS) << STTE_SHIFT));
+ return (tsb_kernel_phys + (va - TSB_KERNEL_MIN_ADDRESS));
if (trunc_page(va) == TSB_USER_MIN_ADDRESS)
data = pm->pm_stte.st_tte.tte_data;
@@ -185,7 +184,7 @@ tsb_tte_enter_kernel(vm_offset_t va, struct tte tte)
stp = tsb_kvtostte(va);
stp->st_tte = tte;
-#if 1
+#if 0
pv_insert(kernel_pmap, TD_PA(tte.tte_data), va, stp);
#endif
}
@@ -197,7 +196,7 @@ tsb_remove_kernel(vm_offset_t va)
stp = tsb_kvtostte(va);
tte_invalidate(&stp->st_tte);
-#if 1
+#if 0
pv_remove_virt(stp);
#endif
}
OpenPOWER on IntegriCloud