All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Aaro Koskinen <aaro.koskinen@nokia.com>
Cc: Paul Burton <paul.burton@imgtec.com>, linux-mips@linux-mips.org
Subject: Re: [PATCH] MIPS: malta: pass fw arguments on kexec
Date: Tue, 31 Mar 2015 13:13:00 +0200	[thread overview]
Message-ID: <20150331111300.GB28951@linux-mips.org> (raw)
In-Reply-To: <1424877665-4487-1-git-send-email-aaro.koskinen@nokia.com>

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@nokia.com>
> ---
>  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

  reply	other threads:[~2015-03-31 11:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-25 15:21 [PATCH] MIPS: malta: pass fw arguments on kexec Aaro Koskinen
2015-03-31 11:13 ` Ralf Baechle [this message]
2015-03-31 12:56   ` Aaro Koskinen
2015-03-31 14:19     ` Ralf Baechle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150331111300.GB28951@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=aaro.koskinen@nokia.com \
    --cc=linux-mips@linux-mips.org \
    --cc=paul.burton@imgtec.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.