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.
This commit is contained in:
Justin Hibbits 2019-11-08 04:26:19 +00:00
parent d3895bffd9
commit 55073c7837
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354527

View File

@ -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