ppc32 doesn't boot when linkaddr=0x00900000
Christophe Leroy
christophe.leroy at csgroup.eu
Mon Sep 27 16:53:26 AEST 2021
Hi,
Le 25/09/2021 à 11:49, cp a écrit :
> hi
> I am new to this list. Hope this is the right place to ask.
>
> I am working with a PPC405GP board, and as far as I understand, the
> support for ppc40x platforms like Acadia and Walnut were dropped with
> kernel 5.8.0, so this seems like a pretty straightforward question,
> but extensive experiments from kernel 4.11 to kernel 5.7.19 haven't
> shown a really clear, up-to-date answer.
>
> In k4.11 .. k5.7.19, when the kernel size is bigger than 8 MB, the
> final kernel doesn't boot but rather arch/powerpc/boot/main.c dies
> before the first message from the kernel shows up.
>
> Why?
>
...
>
> The following is the same kernel, compiled with the same .config, but
> with two link_addr values
>
> A) with link_addr=0x0080.0000
...
> Finalizing device tree... flat tree at 0xf23b80
...
> B) with link_addr=0x0080.0000
...
> Finalizing device tree... flat tree at 0x1023b80
...
> Any ideas?
> I am lost ...
>
As you can see above, when it works you have "flat tree at 0xf23b80",
when it fails you have "flat tree at 0x1023b80".
The reason for the failure is likely that ppc 40x only maps 16 Mbytes at
startup, so when your device tree is outside that map if fails.
See
https://elixir.bootlin.com/linux/v5.15-rc2/source/arch/powerpc/kernel/head_40x.S#L656
Called from
https://elixir.bootlin.com/linux/v5.15-rc2/source/arch/powerpc/kernel/head_40x.S#L56
As you can see it maps one 16Mbytes page.
Allthough I'm not an expert on 40x I think it should be easy to map a
second 16Mbytes page to get 32Mbytes mapped. I will send a patch later
today for you to test.
Christophe
More information about the Linuxppc-dev
mailing list