From b75a06743b0342af20324eaa8dd26468c508ed5b Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Geoff Levand Date: Fri, 17 Apr 2015 10:54:55 -0700 Subject: [PATCH 04/15] arm64: Add support for kexec --lite option WARNING: This implementation uses kernel feature not yet merged upstream. In the future I may convert this to use a minimal purgatory that is just a trampoline. --- kexec/arch/arm64/include/arch/options.h | 2 +- kexec/arch/arm64/kexec-arm64.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/kexec/arch/arm64/include/arch/options.h b/kexec/arch/arm64/include/arch/options.h index 903b4a1fbd7f..afe3e9827ff3 100644 --- a/kexec/arch/arm64/include/arch/options.h +++ b/kexec/arch/arm64/include/arch/options.h @@ -29,7 +29,7 @@ static const char arm64_opts_usage[] __attribute__ ((unused)) = " --command-line=STRING Set the kernel command line to STRING.\n" " --dtb=FILE Use FILE as the device tree blob.\n" " --initrd=FILE Use FILE as the kernel initial ramdisk.\n" -" --lite Fast reboot, no memory integrity checks - currently NOT SUPPORTED.\n"); +" --lite Fast reboot, no memory integrity checks.\n" " --port=ADDRESS Purgatory output to port ADDRESS.\n" " --ramdisk=FILE Use FILE as the kernel initial ramdisk.\n" " --reuse-cmdline Use command line arg of primary kernel.\n"; diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c index 22d70244f8db..6398e55fe575 100644 --- a/kexec/arch/arm64/kexec-arm64.c +++ b/kexec/arch/arm64/kexec-arm64.c @@ -96,7 +96,6 @@ int arch_process_options(int argc, char **argv) break; case OPT_LITE: arm64_opts.lite = 1; - fprintf(stderr, "kexec: --lite option currently NOT SUPPORTED.\n"); break; case OPT_PORT: arm64_opts.port = strtoull(optarg, NULL, 0); @@ -702,10 +701,9 @@ int arm64_load_other_segments(struct kexec_info *info, add_segment_phys_virt(info, initrd_buf, initrd_size, initrd_base, initrd_size, 0); - if (arm64_opts.lite) { - fprintf(stderr, "kexec: --lite option currently NOT SUPPORTED.\n"); - return -ENOSYS; - } else { + if (arm64_opts.lite) + info->entry = (void *)kernel_entry; + else { result = build_elf_rel_info(purgatory, purgatory_size, &ehdr, 0); -- 2.1.0