linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ben.dooks@codethink.co.uk (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: Kexec: BE kernel on ARM VE TC2
Date: Mon, 05 Aug 2013 16:28:16 +0100	[thread overview]
Message-ID: <51FFC490.5090907@codethink.co.uk> (raw)
In-Reply-To: <CALicx6ueLxCFCeun1grdtcC21HSkCDfenLWOSfuoSJnhx9GZ6w@mail.gmail.com>

On 05/08/13 13:12, Vijay Kilari wrote:
> Hi Will,
>
> I am trying to make kexec work on BE kernel on ARM VE TC2.
>
> First, to make KEXEC work with SMP on ARM VE TC2 board,
> I set nr_cpus=2 (i.e boot only A15's) this works with LE kernel.
>
> However, I made below changes to make KEXEC work for BE kernel.
> my question is: why delay is required for board to reboot with kexec?.
> Is it platform issue?.
>
> diff --git a/arch/arm/kernel /machine_kexec.c b/arch/arm/kernel/machine_kexec.c
> index 4fb074c..0fb0ff9 100644
> --- a/arch/arm/kernel/machine_kexec.c
> +++ b/arch/arm/kernel/machine_kexec.c
> @@ -123,6 +123,18 @@ void machine_crash_shutdown(struct pt_regs *regs)
>          printk(KERN_INFO "Loading crashdump kernel...\n");
>   }
>
> +static void byte_copy_relocate_kernel(void *dst, const void *src, int size)
> +{
> +        char *d, *s;
> +        d = (char *) dst;
> +        s = (char *) src;
> +        while (size>  0)
> +        {
> +                *d++ = *s++;
> +                size--;
> +        }
> +}
> +
>   /*
>    * Function pointer to optional machine-specific reinitialization
>    */
> @@ -155,9 +167,8 @@ void machine_kexec(struct kimage *image)
>
>
>          /* copy our kernel relocation code to the control code page */
> -       memcpy(reboot_code_buffer,
> -              relocate_new_kernel, relocate_new_kernel_size);
> -
> +       byte_copy_relocate_kernel(reboot_code_buffer,
> +              relocate_new_kernel, relocate_new_kernel_size);

you should be able to use memcpy() here, as it shouldn't change the
endian-ness of the data being copied.

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

  reply	other threads:[~2013-08-05 15:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-05 12:12 Kexec: BE kernel on ARM VE TC2 Vijay Kilari
2013-08-05 15:28 ` Ben Dooks [this message]
2013-08-08  6:16   ` Vijay Kilari
2013-08-08  8:36     ` Russell King - ARM Linux
2013-08-08 21:50 ` Will Deacon
2013-08-12  9:59   ` Vijay Kilari
2013-08-13 11:15     ` Will Deacon
2013-08-13 22:52   ` Nicolas Pitre
2013-08-14  5:46     ` Vijay Kilari
2013-08-14 15:19       ` Nicolas Pitre
2013-08-19  7:31         ` Vijay Kilari
2013-08-19 12:17           ` Vijay Kilari
2013-08-20 10:31             ` Vijay Kilari

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=51FFC490.5090907@codethink.co.uk \
    --to=ben.dooks@codethink.co.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).