efi: Make code to find mirrored memory ranges generic
Commit
b05b9f5f9dcf ("x86, mirror: x86 enabling - find mirrored memory
ranges") introduce the efi_find_mirror() function on x86. In order to reuse
the API we make it public.
Arm64 can support mirrored memory too, so function efi_find_mirror() is added to
efi_init() to this support for arm64.
Since efi_init() is shared by ARM, arm64 and riscv, this patch will bring
mirror memory support for these architectures, but this support is only tested
in arm64.
Signed-off-by: Ma Wupeng <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ardb: fix subject to better reflect the payload]
Acked-by: Mike Rapoport <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>