When these are allocated we already have the DMAP region mapped. Search
for the largest region and use this to hold these.
Sponsored by: Arm Ltd
andrew on Nov 23 2023, 2:20 PM.Authored by
It's part of a general clean up of the early page table creation code. In this case I'm trying to reduce the size of the 6M of extra virtual address space added in create_pagetables in locore.S as it may not be usable memory, e.g. if the kernel and modules are loaded at the end of physical memory and use almost all the 64M allocation in loader.efi.
It looks like it also fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269726