Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Wang Nan <wangnan0@huawei.com>
To: dyoung@redhat.com
Cc: Wang Nan <wangnan0@huawei.com>, Simon Horman <horms@verge.net.au>,
	kexec@lists.infradead.org, Geng Hui <hui.geng@huawei.com>
Subject: [PATCH 0/2] Two patches for kexec for arm
Date: Thu, 20 Mar 2014 10:36:31 +0800	[thread overview]
Message-ID: <1395282993-37549-1-git-send-email-wangnan0@huawei.com> (raw)

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

             reply	other threads:[~2014-03-20  2:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-20  2:36 Wang Nan [this message]
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

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=1395282993-37549-1-git-send-email-wangnan0@huawei.com \
    --to=wangnan0@huawei.com \
    --cc=dyoung@redhat.com \
    --cc=horms@verge.net.au \
    --cc=hui.geng@huawei.com \
    --cc=kexec@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