From: vijay.kilari@gmail.com (Vijay Kilari)
To: linux-arm-kernel@lists.infradead.org
Subject: Kexec: BE kernel on ARM VE TC2
Date: Mon, 5 Aug 2013 17:42:17 +0530 [thread overview]
Message-ID: <CALicx6ueLxCFCeun1grdtcC21HSkCDfenLWOSfuoSJnhx9GZ6w@mail.gmail.com> (raw)
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);
flush_icache_range((unsigned long) reboot_code_buffer,
(unsigned long) reboot_code_buffer +
KEXEC_CONTROL_PAGE_SIZE);
@@ -165,6 +176,6 @@ void machine_kexec(struct kimage *image)
if (kexec_reinit)
kexec_reinit();
-
+ mdelay(500);
soft_restart(reboot_code_buffer_phys);
}
Thanks & Regards
Vijay
next reply other threads:[~2013-08-05 12:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-05 12:12 Vijay Kilari [this message]
2013-08-05 15:28 ` Kexec: BE kernel on ARM VE TC2 Ben Dooks
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=CALicx6ueLxCFCeun1grdtcC21HSkCDfenLWOSfuoSJnhx9GZ6w@mail.gmail.com \
--to=vijay.kilari@gmail.com \
--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).