openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* My kexec test patches for OpenBMC
@ 2021-02-19  0:53 Bruce Mitchell
  2021-02-24  8:03 ` Joel Stanley
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Bruce Mitchell @ 2021-02-19  0:53 UTC (permalink / raw)
  To: openbmc, Joel Stanley; +Cc: Andrew Jeffery

[-- Attachment #1: Type: text/plain, Size: 8612 bytes --]



Hello Joel,

Per your request yesterday, I am emailing the details of my kexec/kdump
development efforts.

I am running QEMU
   qemu-system-arm --version
   QEMU emulator version 5.2.0 (v5.1.0-3479-g27ca38d3db)
   Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers
   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"

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

This is my source code starting point: (taken from openbmc/openbmc: OpenBMC
Distribution (github.com) )
   bam@latitude-e5430:~/my_git/openbmc/openbmc$ git log
   commit c0263ac8ac029de5e7651a22cc864c4b3aaea5c3 (HEAD)
   Author: Andrew Geissler <openbmcbump-github@yahoo.com>
   Date:   Wed Feb 17 00:51:19 2021 +0000

       phosphor-sel-logger: srcrev bump 7d8a3003fb..dbd77b9200

       Charles Hsu (1):
             Add watchdog event monitor

       Change-Id: I08d375e006e560c573896349562ca53e3162d628
       Signed-off-by: Andrew Geissler <openbmcbump-github@yahoo.com>

   commit 91dd8078a5855ee7369c0d60dc405511c4941def
   Author: Andrew Geissler <openbmcbump-github@yahoo.com>
   Date:   Tue Feb 16 19:51:09 2021 +0000

       phosphor-power: srcrev bump de0fd44f76..10d9405574

       Jay Meyer (1):
             Capture PSU STATUS_MFR_SPECIFIC during analysis

       Change-Id: Ifd8b0e4b7dd2cd43f3e861e27d52ba03034a4d22
       Signed-off-by: Andrew Geissler <openbmcbump-github@yahoo.com>

This shows the modified files:
   bam@latitude-e5430:~/my_git/openbmc/openbmc$ git status
   HEAD detached at c0263ac8a
   Changes not staged for commit:
     (use "git add <file>..." to update what will be committed)
     (use "git checkout -- <file>..." to discard changes in working
   directory)

           modified:
   meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g6/defconfig
           modified:
   meta-ibm/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend

This shows the git diff
meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g6/defconfig
   bam@latitude-e5430:~/my_git/openbmc/openbmc$ git diff
   meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g6/defconfig
   diff --git
   a/meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g6/defconfig
   b/meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g6/defconfig
   index b80042396..92de519a5 100644
   --- a/meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g6/defconfig
   +++ b/meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g6/defconfig
   @@ -18,6 +18,10 @@ CONFIG_BLK_DEV_INITRD=y
    # CONFIG_RD_LZ4 is not set
    # CONFIG_UID16 is not set
    # CONFIG_SYSFS_SYSCALL is not set
   +CONFIG_SYSFS=y
   +CONFIG_CRASH_DUMP=y
   +CONFIG_PROC_VMCORE=y
   +AUTO_ZRELADDR=y
    # CONFIG_AIO is not set
    CONFIG_BPF_SYSCALL=y
    CONFIG_EMBEDDED=y
   @@ -299,3 +303,5 @@ CONFIG_FUNCTION_TRACER=y
    CONFIG_DEBUG_WX=y
    CONFIG_DEBUG_USER=y
    # CONFIG_RUNTIME_TESTING_MENU is not set
   +
   +CONFIG_MAGIC_SYSRQ=y

This shows the git diff
meta-ibm/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend
   bam@latitude-e5430:~/my_git/openbmc/openbmc$ git diff
   meta-ibm/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend
   diff --git
   a/meta-ibm/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend
 b/meta-ibm/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend
   index 29a567e27..5a19f561b 100644
   ---
   a/meta-ibm/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend
   +++
   b/meta-ibm/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend
   @@ -28,9 +28,9 @@ RDEPENDS_${PN}-inventory_append_mihawk = "
   openpower-fru-vpd openpower-occ-contr
    RDEPENDS_${PN}-fan-control_append_ibm-ac-server = " fan-watchdog"
    RDEPENDS_${PN}-fan-control_append_rainier = " fan-watchdog"
    RDEPENDS_${PN}-extras_append_ibm-ac-server = " $
   {POWER_SERVICE_PACKAGES_AC_SERVER} witherspoon-power-supply-sync
   phosphor-webui"
   -RDEPENDS_${PN}-extras_append_rainier = " $
   {POWER_SERVICE_PACKAGES_RAINIER} webui-vue dbus-sensors
   phosphor-virtual-sensor"
   +RDEPENDS_${PN}-extras_append_rainier = " $
   {POWER_SERVICE_PACKAGES_RAINIER} webui-vue dbus-sensors
   phosphor-virtual-sensor kexec-tools file"
    RDEPENDS_${PN}-extras_append_mihawk = " phosphor-webui
   phosphor-image-signing wistron-ipmi-oem $
   {POWER_SERVICE_PACKAGES_AC_SERVER}"
   -RDEPENDS_${PN}-extras_append_witherspoon-tacoma = " pldm srvcfg-manager
   webui-vue biosconfig-manager"
   +RDEPENDS_${PN}-extras_append_witherspoon-tacoma = " pldm srvcfg-manager
   webui-vue biosconfig-manager kexec-tools file"

    RDEPENDS_${PN}-extras_remove_rainier = "obmc-ikvm liberation-fonts
   uart-render-controller"
    RDEPENDS_${PN}-extras_remove_swift = "obmc-ikvm"
   bam@latitude-e5430:~/my_git/openbmc/openbmc$


Here is where I am staring from for linux-aspeed:
   bam@latitude-e5430:~/my_git/openbmc/openbmc/build/witherspoon-tacoma/workspace/sources/linux-aspeed
$ git log
   commit 56621ca6dcf8c20fc7bc72771df00cd3d59c153b
   Author: Joel Stanley <joel@jms.id.au>
   Date:   Tue Feb 9 13:47:10 2021 +1030

       ARM: configs: aspeed: Update defconfigs

       OpenBMC-Staging-Count: 1
       Signed-off-by: Joel Stanley <joel@jms.id.au>

   commit 88c06f67f99fead1fba4ab508786f5ef824a7404
   Author: Tomer Maimon <tmaimon77@gmail.com>
   Date:   Mon Jan 14 15:07:09 2019 +0200

       ARM: configs: add defconfig for Nuvoton NPCM7xx BMC

       OpenBMC-Staging-Count: 9
       Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
       Signed-off-by: Joel Stanley <joel@jms.id.au>

This shows the modified file:
   bam@latitude-e5430:~/my_git/openbmc/openbmc/build/witherspoon-tacoma/workspace/sources/linux-aspeed
$ git status
   On branch devtool
   Changes not staged for commit:
     (use "git add <file>..." to update what will be committed)
     (use "git checkout -- <file>..." to discard changes in working
   directory)

           modified:   arch/arm/mach-aspeed/platsmp.c

This shows the git diff arch/arm/mach-aspeed/platsmp.c
   bam@latitude-e5430:~/my_git/openbmc/openbmc/build/witherspoon-tacoma/workspace/sources/linux-aspeed
$ git diff
   diff --git a/arch/arm/mach-aspeed/platsmp.c
   b/arch/arm/mach-aspeed/platsmp.c
   index 2324becf7991..d004fef81e6f 100644
   --- a/arch/arm/mach-aspeed/platsmp.c
   +++ b/arch/arm/mach-aspeed/platsmp.c
   @@ -7,11 +7,32 @@
    #include <linux/of.h>
    #include <linux/smp.h>

   +#include <linux/errno.h>
   +#include <linux/jiffies.h>
   +#include <asm/cacheflush.h>
   +#include <asm/cp15.h>
   +#include <asm/proc-fns.h>
   +
    #define BOOT_ADDR      0x00
    #define BOOT_SIG       0x04

    static struct device_node *secboot_node;

   +static void aspeed_g6_cpu_die(unsigned int cpu)
   +{
   +       v7_exit_coherency_flush(louis);
   +
   +       while (1) {
   +               cpu_do_idle();
   +       }
   +}
   +
   +static int aspeed_g6_cpu_kill(unsigned int cpu)
   +{
   +
   +       return 1;
   +}
   +
    static int aspeed_g6_boot_secondary(unsigned int cpu, struct
   task_struct *idle)
    {
           void __iomem *base;
   @@ -56,6 +77,10 @@ static void __init aspeed_g6_smp_prepare_cpus
   (unsigned int max_cpus)
    static const struct smp_operations aspeed_smp_ops __initconst = {
           .smp_prepare_cpus       = aspeed_g6_smp_prepare_cpus,
           .smp_boot_secondary     = aspeed_g6_boot_secondary,
   +#ifdef CONFIG_HOTPLUG_CPU
   +       .cpu_die                = aspeed_g6_cpu_die,
   +       .cpu_kill               = aspeed_g6_cpu_kill,
   +#endif
    };

    CPU_METHOD_OF_DECLARE(aspeed_smp, "aspeed,ast2600-smp",
   &aspeed_smp_ops);
   bam@latitude-e5430:~/my_git/openbmc/openbmc/build/witherspoon-tacoma/workspace/sources/linux-aspeed
$

Thank you.

--
Bruce

[-- Attachment #2: Type: text/html, Size: 12131 bytes --]

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

* Re: My kexec test patches for OpenBMC
  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
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Joel Stanley @ 2021-02-24  8:03 UTC (permalink / raw)
  To: Bruce Mitchell; +Cc: Andrew Jeffery, OpenBMC Maillist

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

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

* RE: My kexec test patches for OpenBMC
  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
  2021-03-05 22:27 ` Bruce Mitchell
  2021-03-16 20:42 ` Bruce Mitchell
  3 siblings, 0 replies; 6+ messages in thread
From: Bruce Mitchell @ 2021-02-24 17:33 UTC (permalink / raw)
  To: Joel Stanley; +Cc: Andrew Jeffery, OpenBMC Maillist



-----"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


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

* RE: My kexec test patches for OpenBMC
  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
@ 2021-03-05 22:27 ` Bruce Mitchell
  2021-03-16 20:42 ` Bruce Mitchell
  3 siblings, 0 replies; 6+ messages in thread
From: Bruce Mitchell @ 2021-03-05 22:27 UTC (permalink / raw)
  To: Joel Stanley; +Cc: Andrew Jeffery, OpenBMC Maillist



-----"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=
>

Your kernel changes are similar to what I had done. Since you know
the community better than I do, I propose submitting your changes.
I can do the labor, but want you to get the credit. How would you
like me to proceed?

>>
>> 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,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
>
>

Hello Joel,

Thanks again for your advice and sharing your wisdom.
I am being urged by our manager to get this up-streamed
sooner rather than later. How can I best work with the
system to make this happen?

Thank you!

--
Bruce



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

* RE: My kexec test patches for OpenBMC
  2021-02-19  0:53 My kexec test patches for OpenBMC Bruce Mitchell
                   ` (2 preceding siblings ...)
  2021-03-05 22:27 ` Bruce Mitchell
@ 2021-03-16 20:42 ` Bruce Mitchell
  2021-03-16 22:57   ` Andrew Jeffery
  3 siblings, 1 reply; 6+ messages in thread
From: Bruce Mitchell @ 2021-03-16 20:42 UTC (permalink / raw)
  To: Joel Stanley, Andrew Jeffery; +Cc: Andrew Jeffery, OpenBMC Maillist, bradleyb



-----Bruce Mitchell/US/IBM wrote: -----

>To: Joel Stanley <joel@jms.id.au>
>From: Bruce Mitchell/US/IBM
>Date: 03/05/2021 14:27
>Cc: Andrew Jeffery <andrew@aj.id.au>, OpenBMC Maillist
><openbmc@lists.ozlabs.org>
>Subject: Re: [EXTERNAL] Re: My kexec test patches for OpenBMC
>
>
>-----"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_s
>h
>>enki_linux_commits_ast2600-2Dkexec&d=DwIFaQ&c=jf_iaSHvJObTbx-siA1
>Z
>>Og&r=XYNAOU-BEndJr70kO1xkYnetCkaomJrlYQm5DudYzNc&m=oX_dPGCu4X3pBZ
>l
>>Dw0XYgu4z-3G1JebwP-IvlNbEMDE&s=gT3O534rB4ZDIPbf6Z78bKCR_op-JR1uYc
>v
>>bd3z18RA&e=
>>
>
>Your kernel changes are similar to what I had done. Since you know
>the community better than I do, I propose submitting your changes.
>I can do the labor, but want you to get the credit. How would you
>like me to proceed?
>
>>>
>>> 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,
>i
>>ndex=2 -net nic -net
>>user,hostfwd=:127.0.0.1:2222-:22,hostfwd=:127.0.0.1:2443-:443,hos
>t
>>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
>>
>>
>
>Hello Joel,
>
>Thanks again for your advice and sharing your wisdom.
>I am being urged by our manager to get this up-streamed
>sooner rather than later. How can I best work with the
>system to make this happen?
>
>Thank you!
>
>--
>Bruce
>
>

Hi Joel and Andrew,

I cannot find any response to this thread in my inbox,
however I may still have missed it.

"Joel's kernel changes are similar to what I had done. Since you know
the community better than I do, I propose submitting your changes.
I can do the labor, but want you to get the credit. How would you
like me to proceed?"

Also openbmc/meta-aspeed/MAINTAINERS and the
Linux ARM/ASPEED MACHINE SUPPORT MAINTAINERS
can communicate faster with Joel than I.

I am seeking direction on how to be effective in making this
happen that works with the community.

Thank you!

--
Bruce


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

* Re: My kexec test patches for OpenBMC
  2021-03-16 20:42 ` Bruce Mitchell
@ 2021-03-16 22:57   ` Andrew Jeffery
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Jeffery @ 2021-03-16 22:57 UTC (permalink / raw)
  To: Bruce Mitchell, Joel Stanley
  Cc: Andrew Jeffery, OpenBMC Maillist, Brad Bishop



On Wed, 17 Mar 2021, at 07:12, Bruce Mitchell wrote:
> 
> 
> -----Bruce Mitchell/US/IBM wrote: -----

> >Hello Joel,
> >
> >Thanks again for your advice and sharing your wisdom.
> >I am being urged by our manager to get this up-streamed
> >sooner rather than later. How can I best work with the
> >system to make this happen?
> >
> >Thank you!
> >
> >--
> >Bruce
> >
> >
> 
> Hi Joel and Andrew,
> 
> I cannot find any response to this thread in my inbox,
> however I may still have missed it.

I don't think you missed anything :)

> 
> "Joel's kernel changes are similar to what I had done. Since you know
> the community better than I do, I propose submitting your changes.
> I can do the labor, but want you to get the credit. How would you
> like me to proceed?"

Well, you've both ended up with the same implementation as far as I'm 
aware? I don't think it matters too much which way the patches go in 
terms of credit. Let's not hold the show up on something like that. 
Joel will need to review your patches on the upstream list anyway, so 
you might as well just post them rather than wait on getting 
permission. "Bias for action" from Amazon's leadership principles is a 
helpful mindset[1] (and it's worth reading the others).

[1] https://www.aboutamazon.com/about-us/leadership-principles

Before sending your patches, please read the following and make sure 
you are confident your work satisfies all the listed requirements:

1. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v5.11
2. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submit-checklist.rst?h=v5.11

The very minimum is that ./scripts/checkpatch.pl says your patches are 
clean and that you Cc the appropriate maintainers as listed by 
./scripts/get_maintainer.pl.

The process of emailing patches is terrible, so if you have any 
questions about that please don't hesitate to ask.

Cheers,

Andrew

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

end of thread, other threads:[~2021-03-16 22:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-03-05 22:27 ` Bruce Mitchell
2021-03-16 20:42 ` Bruce Mitchell
2021-03-16 22:57   ` Andrew Jeffery

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).