Yinghai Lu <[email protected]> writes:

> only do that for bzImage64, and it could have command line above 4g.

Just a small nit.
>
> Signed-off-by: Yinghai Lu <[email protected]>
> ---
>  kexec/arch/i386/x86-linux-setup.c |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/kexec/arch/i386/x86-linux-setup.c 
> b/kexec/arch/i386/x86-linux-setup.c
> index b0e6119..c929166 100644
> --- a/kexec/arch/i386/x86-linux-setup.c
> +++ b/kexec/arch/i386/x86-linux-setup.c
> @@ -105,7 +105,13 @@ void setup_linux_bootloader_parameters(
>               /* setup_move_size */
>       /* } */
>       if (real_mode->protocol_version >= 0x0202) {
> -             real_mode->cmd_line_ptr = real_mode_base + cmdline_offset;
> +             unsigned long cmd_line_ptr = real_mode_base + cmdline_offset;
> +
> +             real_mode->cmd_line_ptr = cmd_line_ptr & 0xffffffff;
> +             if (real_mode->protocol_version >= 0x020c)

It probably makes sense to guard this with a test to see if the
cmd_line_ptr value exceeds 4G before doing the >> 32 in case a 32bit
kernel uses boot protocol 0x020c and we have a 32bit kexec.

+               if ((real_mode->protocol_version >= 0x020c) &&
+                   ((cmd_line_ptr & 0xffffffffUL) != cmd_line_ptr))
                
> +                     real_mode->ext_cmd_line_ptr = cmd_line_ptr >> 32;
> +
> +             printf("cmd_line_ptr: %lx\n", cmd_line_ptr);
>       }
>  
>       /* Fill in the command line */

Eric

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Reply via email to