public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Hiago De Franco <hiagofranco@gmail.com>
To: linux-pm@vger.kernel.org
Cc: Peng Fan <peng.fan@nxp.com>, Ulf Hansson <ulf.hansson@linaro.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, regressions@lists.linux.dev
Subject: [REGRESSION] Kernel reboots unexpectdely on i.MX8X when Cortex-M4 is running and it was started by U-Boot bootaux
Date: Fri, 4 Apr 2025 11:17:13 -0300	[thread overview]
Message-ID: <20250404141713.ac2ntcsjsf7epdfa@hiago-nb> (raw)

#regzbot introduced: 4f6c983261

Hi Peng and all,

Commit 4f6c9832613b ("genpd: imx: scu-pd: initialize is_off according to
HW state") introduced a regression where the Kernel reboots unexpectedly
(without any warnings, crashes or errors) when the Cortex-M4 was loaded
and running by U-Boot, using the bootaux command:

# load mmc 0:2 ${loadaddr} /home/root/hello_world.bin
# bootaux ${loadaddr} 0
# boot

This is a simple hello world binary that prints a message into the
M40.UART0 pin (demo from NXP MCUXpresso).

Before this commit, everything worked as expected, Linux boots fine and
the HMP core keeps running and printing messages to the UART. After the
commit, the kernel reboots at the beggining of the boot process. The
only relevant message is printed by U-Boot after reset:

"Reset cause: SCFW fault reset"

This commit was bisectabled, the same device tree, u-boot version, and
SCFW versions were used. Reverting this commit fixes the issues.

For testing purposes, I created the following patch which also fixes the
issue:

diff --git a/drivers/pmdomain/imx/scu-pd.c b/drivers/pmdomain/imx/scu-pd.c
index 38f3cdd21042..0477b3fb4991 100644
--- a/drivers/pmdomain/imx/scu-pd.c
+++ b/drivers/pmdomain/imx/scu-pd.c
@@ -539,6 +539,9 @@ imx_scu_add_pm_domain(struct device *dev, int idx,
                return NULL;
        }

+       if (strstr("cm40", sc_pd->name) != NULL)
+               is_off = true;
+
        ret = pm_genpd_init(&sc_pd->pd, NULL, is_off);
        if (ret) {
                dev_warn(dev, "failed to init pd %s rsrc id %d",


Test Environment:
- Hardware: Colibri iMX8DX 1GB with Colbiri Evaluation Board.
- U-Boot Version: 2024.04
- U-Boot Build info:
	SCFW 83624b99, SECO-FW c9de51c0, IMX-MKIMAGE 4622115c, ATF 7c64d4e

The issue is not present on: v6.5

The real root cause is still unclear to me. Anybody has any ideas? I am
happy to share more details if needed.

Cheers,
Hiago.


             reply	other threads:[~2025-04-04 14:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-04 14:17 Hiago De Franco [this message]
2025-04-11 12:50 ` [REGRESSION] Kernel reboots unexpectdely on i.MX8X when Cortex-M4 is running and it was started by U-Boot bootaux Hiago De Franco
2025-04-11 13:23   ` Peng Fan
2025-04-11 16:23     ` Hiago De Franco
2025-04-14  6:09       ` Peng Fan
2025-04-14 22:44         ` Hiago De Franco
2025-04-15  0:11           ` Peng Fan
2025-04-15 18:40             ` Hiago De Franco
2025-04-16  8:19               ` Peng Fan
2025-04-16 21:57                 ` Hiago De Franco
2025-04-17  2:46                   ` Peng Fan
2025-04-17 21:37                     ` Hiago De Franco

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=20250404141713.ac2ntcsjsf7epdfa@hiago-nb \
    --to=hiagofranco@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=peng.fan@nxp.com \
    --cc=regressions@lists.linux.dev \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=ulf.hansson@linaro.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