Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Two patches for kexec for arm
@ 2014-03-20  2:36 Wang Nan
  2014-03-20  2:36 ` [PATCH 1/2] kexec: align initrd when no --image-size passed Wang Nan
  2014-03-20  2:36 ` [PATCH 2/2] kexec: pass initrd position in dtb Wang Nan
  0 siblings, 2 replies; 10+ messages in thread
From: Wang Nan @ 2014-03-20  2:36 UTC (permalink / raw)
  To: dyoung; +Cc: Wang Nan, Simon Horman, kexec, Geng Hui

Hi Dave and Simon,

   Sorry for the long delay. We have discussed kexec on arm at January
   this year:
   http://lists.infradead.org/pipermail/kexec/2014-February/011031.html

   I rewrite 2 patches and tested on QEMU, both crash dump and normal
   kexec is okay (kernel is 3.10.33). Please check.

   The first patch makes initrd to be loaded at page boundary.

   The second patch passes kernel command line and initrd infomation
   through dtb.

   Without these two patches kexec, failed to work on arm.

   I tested using following commands:

Start qemu:
$ qemu-system-arm -kernel $KERNEL_PATH -M versatilepb -initrd $INITRD_PATH \
       -no-reboot -show-cursor  -vnc 0.0.0.0:0 -machine type=vexpress-a9 \
       -cpu cortex-a9 -m 512  --append "console=ttyAMA0 \
       ip=192.168.7.2::192.168.7.1:255.255.255.0 mem=512M highres=off \
       rdinit=/sbin/init crashkernel=72M@0x70000000" -serial stdio


Crash dump case:
$ kexec -p /zImage -d -t zImage --dtb=/vexpress-v2p-ca9-512m.dtb \
        --initrd=/initrd.cpio.gz \
	--command-line="maxcpus=1 console=ttyAMA0 highres=off \
	rdinit=/sbin/init"
$ echo c > /proc/sysrq-trigger


kexec case:
$ kexec -f /zImage -d -t zImage --dtb=/vexpress-v2p-ca9-512m.dtb \
        --initrd=initrd.cpio.gz --command-line="maxcpus=1 console=ttyAMA0 \
        highres=off rdinit=/sbin/init"


Kernel configuration is based on arch/arm/configs/vexpress_defconfig,
with CONFIG_KEXEC selected.

Because we use only 512m memory, related dtb must be modified (in crash
dump case, it is no problem because memory size is clamped by command
line, but it is essential in normal kexec case). I haven't
check atags.

vexpress-v2p-ca9-512m.dtb is generated by
arch/arm/boot/dts/vexpress-v2p-ca9.dts with following patch:

--- vexpress-v2p-ca9.dts	2014-02-25 13:06:34.000000000 +0800
+++ vexpress-v2p-ca9-512m.dts	2014-03-19 17:14:40.000000000 +0800
@@ -64,7 +64,7 @@
 
 	memory@60000000 {
 		device_type = "memory";
-		reg = <0x60000000 0x40000000>;
+		reg = <0x60000000 0x20000000>;
 	};
 
 	clcd@10020000 {

WangNan (2):
  kexec: align initrd when no --image-size passed
  kexec: pass initrd position in dtb

 kexec/arch/arm/kexec-zImage-arm.c | 88 +++++++++++++++++++++++++++------------
 1 file changed, 61 insertions(+), 27 deletions(-)

-- 
1.8.4


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

end of thread, other threads:[~2014-03-20  6:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-20  2:36 [PATCH 0/2] Two patches for kexec for arm Wang Nan
2014-03-20  2:36 ` [PATCH 1/2] kexec: align initrd when no --image-size passed Wang Nan
2014-03-20  3:25   ` Dave Young
2014-03-20  3:51     ` Simon Horman
2014-03-20  2:36 ` [PATCH 2/2] kexec: pass initrd position in dtb Wang Nan
2014-03-20  3:26   ` Dave Young
2014-03-20  3:34     ` Dave Young
2014-03-20  3:57       ` Wang Nan
2014-03-20  5:37         ` Dave Young
2014-03-20  5:41         ` Dave Young

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox