[PATCH v2 4/9] arm64/mirror: arm64 enabling - find mirrored memory ranges

From: Wupeng Ma
Date: Thu Apr 14 2022 - 05:54:59 EST


From: Ma Wupeng <mawupeng1@xxxxxxxxxx>

Commit b05b9f5f9dcf ("x86, mirror: x86 enabling - find mirrored memory ranges")
introduced mirrored memory support for x86 and this could be used on arm64.

So efi_find_mirror() is added in efi_init() so on EFI enabled systems scan
the memory map and tell memblock about any mirrored ranges.

Signed-off-by: Ma Wupeng <mawupeng1@xxxxxxxxxx>
---
Documentation/admin-guide/kernel-parameters.txt | 2 +-
arch/arm64/kernel/setup.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index ea47c0ba7593..1d87dc4e3cef 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -2270,7 +2270,7 @@

keepinitrd [HW,ARM]

- kernelcore= [KNL,X86,IA-64,PPC]
+ kernelcore= [KNL,X86,IA-64,PPC,ARM64]
Format: nn[KMGTPE] | nn% | "mirror"
This parameter specifies the amount of memory usable by
the kernel for non-movable allocations. The requested
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index daade64889ff..3957290d9ade 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -345,6 +345,7 @@ void __init __no_sanitize_address setup_arch(char **cmdline_p)
arm64_memblock_init();

efi_fake_memmap();
+ efi_find_mirror();

paging_init();

--
2.18.0.huawei.25