Skip to content

Two patches for kexec for arm

Wang Nan kexec 1 version Applied

Status from this message: Thanks, applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 7 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2kexec: align initrd when no --image-size passedkexec/arch/arm/kexec-zImage-arm.c+2 -22 replies
2/2kexec: pass initrd position in dtbkexec/arch/arm/kexec-zImage-arm.c+59 -255 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchDave Young
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] Two patches for kexec for arm

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-512m.dts renamed from vexpress-v2p-ca9.dts +1 -1
@@ -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(-)
Signature · 7 lines
1.8.4


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec