Motivation: I would like to enable the EFI map parsing on riscv, which
is preferable to parsing memory regions from the device tree. I could
easily duplicate the functionality, but it can be shared without much
extra effort.
In this commit, the arm64 code is moved to the new file, and enabled for
that platform. No functional change intended.
The memreserve/kboot early map parsing is necessarily moved as well, but
is not inherently machine-dependent. I gated it behind a feature flag,
EFI_HAS_MEMRESERVE. Naming and placement is up for discussion. Note: the
argument to exclude_efi_memreserve() is changed to a vm_paddr_t, the
more correct type.
armv7 is yet unchanged; there are slight differences in its (older)
version of the map parsing code, so testing is required to enable it,
but this would be the plan in the near term.
amd64 could be converted to use this interface too, but it doesn't use
the common "physmem" interfaces for managing physical memory, and would
therefore require further tweaks. I am not inclined to make this change
right away.
Further: struct efi_map_header and struct efi_fb can be de-duplicated,
and don't really belong in metadata.h.