From: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
"Aneesh Kumar K.V" <aneesh.kumar@kernel.org>,
"Naveen N. Rao" <naveen.n.rao@linux.ibm.com>,
Anatolij Gustschin <agust@denx.de>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
linux@ew.tq-group.com
Subject: powerpc: several early boot regressions on MPC52xx
Date: Mon, 18 Dec 2023 14:48:59 +0100 [thread overview]
Message-ID: <46a002f7fe894c7c7ed8324e48e9cd226e428894.camel@ew.tq-group.com> (raw)
Hi all,
I'm currently in the process of porting our ancient TQM5200 SoM to a modern kernel, and I've
identified a number of regressions that cause early boot failures (before the UART console has been
initialized) with arch/powerpc/configs/52xx/tqm5200_defconfig.
Issue 1) Boot fails with CONFIG_PPC_KUAP enabled (enabled by default since 9f5bd8f1471d7
"powerpc/32s: Activate KUAP and KUEP by default"). The reason is a number of of_iomap() calls in
arch/powerpc/platforms/52xx that should be early_ioremap().
I can fix this up easy enough for mpc5200_simple by changing mpc5200_setup_xlb_arbiter() to use
early_ioremap() and moving mpc52xx_map_common_devices() from the setup_arch to the init hook (one
side effect is that mpc52xx_restart() only works a bit later, as it requires the mpc52xx_wdt mapping
from mpc52xx_map_common_devices(); I'm not sure if there is a better solution).
For the other 52xx platforms (efika, lite5200, media5200) things are a bit more chaotic, and they
create several more temporary mappings from setup_arch. Either they should all be moved to the init
hook as well, or be converted to early_ioremap(), but I can't tell which is more appropriate. As a
first step, I would propose a patch that fixes this for the simple platforms and leaves the other
ones unchanged.
(Side note: I also found that before 16132529cee58 ("powerpc/32s: Rework Kernel Userspace Access
Protection"), boot would succeed even with KUAP enabled without changing the incorrect of_iomap(); I
guess the old implementation was more lenient about the incorrect calls that the kernel warns
about?)
Issue 2) Boot fails with CONFIG_STRICT_KERNEL_RWX enabled, which is also the default nowadays.
I have not found the cause of this boot failure yet; is there any way to debug this if the failure
happens before the UART is available and I currently don't have JTAG for this hardware?
Best regards,
Matthias
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
https://www.tq-group.com/
next reply other threads:[~2023-12-18 13:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 13:48 Matthias Schiffer [this message]
2023-12-18 19:48 ` Christophe Leroy
2023-12-19 13:34 ` Matthias Schiffer
2023-12-20 14:55 ` Christophe Leroy
2023-12-21 10:33 ` Matthias Schiffer
2023-12-21 11:17 ` 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=46a002f7fe894c7c7ed8324e48e9cd226e428894.camel@ew.tq-group.com \
--to=matthias.schiffer@ew.tq-group.com \
--cc=agust@denx.de \
--cc=aneesh.kumar@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@ew.tq-group.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=naveen.n.rao@linux.ibm.com \
--cc=npiggin@gmail.com \
/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
all inboxes | Powered by JetHome®