openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Joel Stanley <joel@jms.id.au>
To: Bruce Mitchell <Bruce.Mitchell@ibm.com>
Cc: Andrew Jeffery <andrew@aj.id.au>,
	OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: My kexec test patches for OpenBMC
Date: Wed, 24 Feb 2021 08:03:56 +0000	[thread overview]
Message-ID: <CACPK8XdmbXK4CVfydO5yq4Qka--wT1fR-vuqFKD_rg29fAquMA@mail.gmail.com> (raw)
In-Reply-To: <OFC6D46F57.69575CC5-ON00258681.0002C252-88258681.0004EA2C@notes.na.collabserv.com>

On Fri, 19 Feb 2021 at 00:53, Bruce Mitchell <Bruce.Mitchell@ibm.com> wrote:
>
> Hello Joel,
>
> Per your request yesterday, I am emailing the details of my kexec/kdump development efforts.

Thanks. Here's what I tested:

https://github.com/shenki/linux/commits/ast2600-kexec

>
> I am running QEMU
>
> qemu-system-arm --version
> QEMU emulator version 5.2.0 (v5.1.0-3479-g27ca38d3db)

That looks fine. I'm using cedric's tree, but anything that will boot
your kernel is fine.

> qemu-system-arm -d cpu_reset -M tacoma-bmc -kernel /tmp/tmp.y2fpdAXM1h.kernel -dtb /tmp/tmp.BWkadwNbTf.dtb -initrd /tmp/tmp.jRpFbzfpBs.initrd -drive file=obmc-phosphor-image-witherspoon-tacoma.wic,if=sd,format=raw,index=2 -net nic -net user,hostfwd=:127.0.0.1:2222-:22,hostfwd=:127.0.0.1:2443-:443,hostname=qemu -nographic -append "crashkernel=64M console=ttyS4,115200n8 rootwait root=PARTLABEL=rofs-a"

You could simplify your qemu setup if you want. Here's how I tested:

 $ qemu-system-arm -M tacoma-bmc -nographic -net nic -nic
user,hostfwd=::2222-:22,tftp=/srv/tftp/ -kernel
aspeed-g5-dev/arch/arm/boot/zImage -dtb
aspeed-g5-dev/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dtb -initrd
~/dev/kernels/misc/rootfs.cpio.xz

This uses a small initramfs with the kexec utility, and has a copy of
the kernel, initrd and dtb inside to make testing easy.

Or, if you want, you can copy files into the system over the ssh port:

I have this in my ~/.ssh/config:

Host qemu
    Hostname localhost
    Port 2222
    User root
    UserKnownHostsFile /dev/null
    StrictHostKeyChecking no

And then you can use scp like this:

scp aspeed-g5-dev/arch/arm/boot/zImage
aspeed-g5-dev/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dtb
/home/joel/dev/kernels/misc/rootfs.cpio.xz  qemu:

> From OpenBMC within QEMU I am using the following to test kexec
>
> kexec -d -l /home/kexec_files/tmp.y2fpdAXM1h.kernel --initrd=/home/kexec_files/tmp.jRpFbzfpBs.initrd --dtb=/home/kexec_files/tmp.BWkadwNbTf.dtb --append="earlycon console=ttyS4,115200n8 rootwait root=PARTLABEL=rofs-a 1 maxcpus=1 reset_devices"
> kexec -d -e

Here's how I was running it:

# kexec -l zImage --dtb aspeed-bmc-opp-tacoma.dtb --initrd rootfs.cpio.xz
# kexec -e

I haven't set a new command line, so it uses the command line from the
device tree (console=ttyS4,115200n8).

With my patch we will not get the secondary CPU:

[    0.039517] ASPEED AST2600 rev A1 (05010303)
[    0.042030] smp: Bringing up secondary CPUs ...
[    1.163950] CPU1: failed to come online
[    1.167999] smp: Brought up 1 node, 1 CPU
[    1.168164] SMP: Total of 1 processors activated (2250.00 BogoMIPS).

That should be the next step in working on the kexec patches. We want
the secondary CPU to be in a state such that the new kernel can take
control as it would in a firmware boot.

Note that this didn't require any changes to the system beyond the
kernel patch. I'm using the same defconfig as we have in the tree.

Cheers,

Joel

  reply	other threads:[~2021-02-24  8:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19  0:53 My kexec test patches for OpenBMC Bruce Mitchell
2021-02-24  8:03 ` Joel Stanley [this message]
2021-02-24 17:33 ` Bruce Mitchell
2021-03-05 22:27 ` Bruce Mitchell
2021-03-16 20:42 ` Bruce Mitchell
2021-03-16 22:57   ` Andrew Jeffery

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=CACPK8XdmbXK4CVfydO5yq4Qka--wT1fR-vuqFKD_rg29fAquMA@mail.gmail.com \
    --to=joel@jms.id.au \
    --cc=Bruce.Mitchell@ibm.com \
    --cc=andrew@aj.id.au \
    --cc=openbmc@lists.ozlabs.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).