arm64: kexec_file: load initrd and device-tree
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Thu, 15 Nov 2018 05:52:49 +0000 (14:52 +0900)
committerWill Deacon <will.deacon@arm.com>
Thu, 6 Dec 2018 14:38:52 +0000 (14:38 +0000)
commit52b2a8af7436044cfcb27e4b0f72c2ce1f3890da
treee2f3e8e7db651f8f19fd0fa2d3608400337affa2
parent3ddd9992a590c7462ff22f7cb17d386b83ed0a07
arm64: kexec_file: load initrd and device-tree

load_other_segments() is expected to allocate and place all the necessary
memory segments other than kernel, including initrd and device-tree
blob (and elf core header for crash).
While most of the code was borrowed from kexec-tools' counterpart,
users may not be allowed to specify dtb explicitly, instead, the dtb
presented by the original boot loader is reused.

arch_kimage_kernel_post_load_cleanup() is responsible for freeing arm64-
specific data allocated in load_other_segments().

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/kexec.h
arch/arm64/kernel/machine_kexec_file.c