aboutsummaryrefslogtreecommitdiff
path: root/sys/powerpc
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2019-11-08 04:26:19 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2019-11-08 04:26:19 +0000
commit55073c7837899a9fa515033f3055ebe20407d161 (patch)
treef055ad9d0c0b540df5e06c0eb714c453eb163c77 /sys/powerpc
parentd3895bffd9ce4a32822f935527fd150f88b03103 (diff)
downloadsrc-55073c7837899a9fa515033f3055ebe20407d161.tar.gz
src-55073c7837899a9fa515033f3055ebe20407d161.zip
powerpc/booke: Only handle kernel page faults in KVA range
The memory range between VM_MAXUSER_ADDRESS and VM_MIN_KERNEL_ADDRESS is reserved for devices currently, which are always mapped in TLB1, and therefore do not exist in the kernel page table. Any page fault in this range is therefore automatically a fatal fault.
Notes
Notes: svn path=/head/; revision=354527
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/booke/trap_subr.S9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/powerpc/booke/trap_subr.S b/sys/powerpc/booke/trap_subr.S
index 7ecd67324d85..b1c1544068aa 100644
--- a/sys/powerpc/booke/trap_subr.S
+++ b/sys/powerpc/booke/trap_subr.S
@@ -713,6 +713,15 @@ INTERRUPT(int_data_tlb_error)
mtcr %r21
bt 17, search_failed /* check MSR[PR] */
+#ifdef __powerpc64__
+ srdi %r21, %r31, 48
+ cmpldi cr0, %r21, VM_MIN_KERNEL_ADDRESS@highest
+#else
+ lis %r21, VM_MIN_KERNEL_ADDRESS@h
+ cmplw cr0, %r31, %r21
+#endif
+ blt search_failed
+
search_kernel_pmap:
/* Load r26 with kernel_pmap address */
bl 1f