When the memory reported from EFI isn't on a 1G boundary we still use 1G mappings.
On some hardware this can cause issues as the core may still access this memory. Reduce this limit down to a 2M boundary.
With this patch, DMAP is mapped with L2 (2MiB) resolution.
Implementation of pmap_mapbios and pmap_unmapbios had to be updated as some regions containing ACPI tables are no longer in DMAP (as they are not in the physmap reported by EFI).
This implementation is similar to what we have on amd64.
Caveats (only first revision of patch):
- Maximum 2MiB mapbios mapping in early boot stage (also, the mapping cannot cross L2 boundary)
Acknowledgements: part of the code was taken from @andrew 's WIP code (pmap_bootstrap_dmap).