Only check the page tables if within the KVA.

Devices aren't mapped within the KVA, and with the way 64-bit hashes the
addresses pte_vatopa() may not return a 0 physical address for a device.

MFC after:	1 week
This commit is contained in:
Justin Hibbits 2017-11-29 01:26:07 +00:00
parent 8e3e3a7ae8
commit 3de971a61a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326354

View File

@ -2091,10 +2091,11 @@ static vm_paddr_t
mmu_booke_kextract(mmu_t mmu, vm_offset_t va)
{
tlb_entry_t e;
vm_paddr_t p;
vm_paddr_t p = 0;
int i;
p = pte_vatopa(mmu, kernel_pmap, va);
if (va >= VM_MIN_KERNEL_ADDRESS && va <= VM_MAX_KERNEL_ADDRESS)
p = pte_vatopa(mmu, kernel_pmap, va);
if (p == 0) {
/* Check TLB1 mappings */