Only invalidate the early DTB mapping if it exists

This temporary mapping will become optional. Booting via loader(8)
means that the DTB will have already been copied into the kernel's
staging area, and is therefore covered by the early KVA mappings.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D24911
This commit is contained in:
Mitchell Horne 2020-06-24 15:21:12 +00:00
parent f7d2df2a8a
commit 133b1f1461
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=362584

View File

@ -619,8 +619,8 @@ pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, vm_size_t kernlen)
* possibility of an aliased mapping in the future.
*/
l2p = pmap_l2(kernel_pmap, VM_EARLY_DTB_ADDRESS);
KASSERT((pmap_load(l2p) & PTE_V) != 0, ("dtpb not mapped"));
pmap_clear(l2p);
if ((pmap_load(l2p) & PTE_V) != 0)
pmap_clear(l2p);
sfence_vma();