openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Bruce Mitchell" <Bruce.Mitchell@ibm.com>
To: Joel Stanley <joel@jms.id.au>
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 17:33:22 +0000	[thread overview]
Message-ID: <OF09FD4ECC.9DFDE50C-ON00258686.005FF8FB-00258686.00607087@notes.na.collabserv.com> (raw)
In-Reply-To: <CACPK8XdmbXK4CVfydO5yq4Qka--wT1fR-vuqFKD_rg29fAquMA@mail.gmail.com>



-----"openbmc" <openbmc-bounces+bruce.mitchell=ibm.com@lists.ozlabs.org> wrote: -----

>To: Bruce Mitchell <Bruce.Mitchell@ibm.com>
>From: Joel Stanley
>Sent by: "openbmc"
>Date: 02/24/2021 00:04
>Cc: Andrew Jeffery <andrew@aj.id.au>, OpenBMC Maillist
><openbmc@lists.ozlabs.org>
>Subject: [EXTERNAL] Re: My kexec test patches for OpenBMC
>
>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://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_sh
>enki_linux_commits_ast2600-2Dkexec&d=DwIFaQ&c=jf_iaSHvJObTbx-siA1Z
>Og&r=XYNAOU-BEndJr70kO1xkYnetCkaomJrlYQm5DudYzNc&m=oX_dPGCu4X3pBZl
>Dw0XYgu4z-3G1JebwP-IvlNbEMDE&s=gT3O534rB4ZDIPbf6Z78bKCR_op-JR1uYcv
>bd3z18RA&e=
>
>>
>> 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.

I believe I am using Cédric's tree as well.
https://github.com/legoater/qemu.git
commit 27ca38d3db4a35da977cc89d52541ea12e1ba9c4 (HEAD -> aspeed-5.2, origin/aspeed-5.2, origin/HEAD)

>
>> 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,i
>ndex=2 -net nic -net
>user,hostfwd=:127.0.0.1:2222-:22,hostfwd=:127.0.0.1:2443-:443,host
>name=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
>
>

I had only found examples that had changed the kernel config
so I changed defconfig to match. I'll try without changing it.


Thank Joel for all your suggestions.

--
Bruce


  parent reply	other threads:[~2021-02-24 17:33 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
2021-02-24 17:33 ` Bruce Mitchell [this message]
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=OF09FD4ECC.9DFDE50C-ON00258686.005FF8FB-00258686.00607087@notes.na.collabserv.com \
    --to=bruce.mitchell@ibm.com \
    --cc=andrew@aj.id.au \
    --cc=joel@jms.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).