linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
To: Jordan Niethe <jniethe5@gmail.com>
Cc: "Emmanuel Gil Peyrot" <linkmauve@linkmauve.fr>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
	"Alistair Popple" <alistair@popple.id.au>
Subject: Re: PPC32: Boot regression on Nintendo Wii, after create_branch rework in 5.8
Date: Wed, 28 Apr 2021 20:14:16 +0200	[thread overview]
Message-ID: <YIml+D0kB3t3BMXB@latitude> (raw)
In-Reply-To: <CACzsE9qOj2Fp4A9dYopQddw1oc7w--BCe_2_3xJfEo=d9WoC1Q@mail.gmail.com>

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

Hi,

On Wed, Apr 28, 2021 at 11:33:24AM +1000, Jordan Niethe wrote:
> On Mon, Apr 26, 2021 at 1:40 AM Jonathan Neuschäfer
> <j.neuschaefer@gmx.net> wrote:
> >
> > Hi,
> >
> > I recently booted my Wii again, and I noticed a regression at boot time.
> > Output stops after the "Finalizing device tree... flat tree at 0xXXXXXX"
> > message. I bisected it to this commit in the 5.8 development cycle:
> >
> > commit 7c95d8893fb55869882c9f68f4c94840dc43f18f
> > Author: Jordan Niethe <jniethe5@gmail.com>
> > Date:   Wed May 6 13:40:25 2020 +1000
> >
> >     powerpc: Change calling convention for create_branch() et. al.
[...]
> > Do you have any hints on how to debug and/or fix this issue?
> Thanks for bisecting and reporting.
> The "Finalizing device tree... flat tree at 0xXXXXXX" message comes
> from the bootwrapper so if that is the last output it must be crashing
> pretty early.
> Commit 7c95d8893fb5 ("powerpc: Change calling convention for
> create_branch() et. al.") made a change to machine_init() in
> setup_32.c which seems like it might be a likely culprit for causing
> early crashing.
> The branch that is created and patched is just for optimization, so to
> see if that is in fact the problem it might be worth trying to boot
> with a patch like below
> 
> diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
> --- a/arch/powerpc/kernel/setup_32.c
> +++ b/arch/powerpc/kernel/setup_32.c
> @@ -87,9 +87,6 @@ notrace void __init machine_init(u64 dt_ptr)
> 
>         patch_instruction_site(&patch__memcpy_nocache, ppc_inst(PPC_INST_NOP));
> 
> -       create_cond_branch(&insn, addr, branch_target(addr), 0x820000);
> -       patch_instruction(addr, insn);  /* replace b by bne cr0 */
> -
>         /* Do some early initialization based on the flat device tree */
>         early_init_devtree(__va(dt_ptr));

This brings no improvement, unfortunately. The output is still:

top of MEM2 @ 13F00000

zImage starting: loaded at 0x00b00000 (sp: 0x01145f90)
Allocating 0xae3970 bytes for kernel...
Decompressing (0x00000000 <- 0x00b11000:0x01143576)...
Done! Decompressed 0xa65fdc bytes

Linux/PowerPC load: root=/dev/mmcblk0p2 rootwait console=usbgecko1
Finalizing device tree... flat tree at 0x11467a0


I'll probably dig deeper next weekend.



Jonathan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-04-28 18:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-25 15:40 PPC32: Boot regression on Nintendo Wii, after create_branch rework in 5.8 Jonathan Neuschäfer
2021-04-28  1:33 ` Jordan Niethe
2021-04-28 18:14   ` Jonathan Neuschäfer [this message]
2021-04-29 14:26     ` Christophe Leroy

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=YIml+D0kB3t3BMXB@latitude \
    --to=j.neuschaefer@gmx.net \
    --cc=alistair@popple.id.au \
    --cc=jniethe5@gmail.com \
    --cc=linkmauve@linkmauve.fr \
    --cc=linuxppc-dev@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).