On Wed, Feb 25, 2015 at 05:21:05PM +0200, Aaro Koskinen wrote: > Pass fw arguments on kexec to the new kernel. > > Tested with MIPS64 QEMU. Without the patch the new kernel will default to > (likely) incorrect default memory and console setup, making kexec pretty > much useless. > > Signed-off-by: Aaro Koskinen <aaro.koskinen@xxxxxxxxx> > --- > arch/mips/mti-malta/malta-reset.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/arch/mips/mti-malta/malta-reset.c b/arch/mips/mti-malta/malta-reset.c > index 2fd2cc2..f218ba8 100644 > --- a/arch/mips/mti-malta/malta-reset.c > +++ b/arch/mips/mti-malta/malta-reset.c > @@ -8,8 +8,10 @@ > */ > #include <linux/io.h> > #include <linux/pm.h> > +#include <linux/kexec.h> > > #include <asm/reboot.h> > +#include <asm/bootinfo.h> > #include <asm/mach-malta/malta-pm.h> > > #define SOFTRES_REG 0x1f000500 > @@ -36,8 +38,19 @@ static void mips_machine_power_off(void) > mips_machine_restart(NULL); > } > > +static int mips_kexec_prepare(struct kimage *image) > +{ > + kexec_args[0] = fw_arg0; > + kexec_args[1] = fw_arg1; > + kexec_args[2] = fw_arg2; > + kexec_args[3] = fw_arg3; > + > + return 0; > +} This makes arguments coming from the firmware non-overridable default? Ralf