linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Kexec: BE kernel on ARM VE TC2
@ 2013-08-05 12:12 Vijay Kilari
  2013-08-05 15:28 ` Ben Dooks
  2013-08-08 21:50 ` Will Deacon
  0 siblings, 2 replies; 13+ messages in thread
From: Vijay Kilari @ 2013-08-05 12:12 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-08-20 10:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-05 12:12 Kexec: BE kernel on ARM VE TC2 Vijay Kilari
2013-08-05 15:28 ` 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

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).