[PATCH] arm64: Kexec: Add support for binary image
Geoff Levand
geoff at infradead.org
Wed May 6 10:34:41 PDT 2015
Hi,
On Wed, 2015-04-22 at 17:56 +0530, Pratyush Anand wrote:
> @@ -30,6 +32,7 @@ static const char arm64_opts_usage[] __attribute__ ((unused)) =
> " --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.\n"
> +" --page-offset Kernel page-offset for binary image load.\n"
Sorry I didn't see this before, but page-offset is for Image load, so
should go in the image_arm64_usage().
I think it is OK to keep page_offset in struct arm64_opts, then just
ignore it for the other file formats.
> " --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";
> --- a/kexec/arch/arm64/kexec-image-arm64.c
> +++ b/kexec/arch/arm64/kexec-image-arm64.c
> +static unsigned long long get_kernel_page_offset(void)
> +{
> + unsigned long long text_sym_addr = get_kernel_text_sym();
> + unsigned long long text_page_offset =
> + text_sym_addr & 0xFFFFFFFFFFE00000;
> +
> + if(arm64_opts.page_offset) {
> + if (text_page_offset != arm64_opts.page_offset)
> + dbgprintf("User page offset did not match with text page offset\n");
I'd like to see the values printed.
> + return arm64_opts.page_offset;
> + } else if(text_page_offset) {
> + dbgprintf("text page offset is %llx\n", text_page_offset);
> + return text_page_offset;
> + } else {
> + return ARM64_DEFAULT_PAGE_OFFSET;
> + }
> }
-Geoff
More information about the kexec
mailing list