From: Neil Armstrong <neil.armstrong@linaro.org>
To: Stephan Gerhold <stephan.gerhold@linaro.org>,
Caleb Connolly <caleb.connolly@linaro.org>
Cc: Tom Rini <trini@konsulko.com>, Ramon Fried <rfried.dev@gmail.com>,
Sumit Garg <sumit.garg@kernel.org>,
u-boot@lists.denx.de, u-boot-qcom@groups.io,
Sam Day <me@samcday.com>
Subject: Re: [PATCH 01/13] mach-snapdragon: Fix EL2 boot on DragonBoard 410c
Date: Mon, 7 Apr 2025 20:12:00 +0200 [thread overview]
Message-ID: <36a928d1-a95d-4183-a67d-bc2e0cbcfe8c@linaro.org> (raw)
In-Reply-To: <20250407-db410c-fixes-v1-1-524aefbc8bb4@linaro.org>
On 07/04/2025 18:59, Stephan Gerhold wrote:
> The workaround for the "PSCI bug" on DragonBoard 410c implemented in
> arch/arm/mach-snapdragon/include/mach/boot0.h clobbers the x0 register
> by storing the CurrentEL in there. When running in EL1, the mode switch
> sequence implemented there later clears the register again, but this is
> skipped when U-Boot is booted in EL2.
>
> This causes crashes in the mach-snapdragon board_fdt_blob_setup() later,
> because the invalid address stored in x0 gets dereferenced to check if it
> points to a valid DTB.
>
> We can't rely on having a valid values in the CPU registers for the first
> stage bootloader configuration on DB410c, and nothing would place a DTB
> there anyway. Skip selecting the SAVE_PREV_BL_FDT_ADDR option for the boot0
> hook case to avoid crashing with the clobbered register value.
>
> Fixes: 059d526af312 ("mach-snapdragon: generalise board support")
> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> ---
> arch/arm/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 63aefeda9575fec8fc57194358df0819397d088e..af3d39196ee4fb201d4aad20a882bbbb39263396 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1115,7 +1115,7 @@ config ARCH_SNAPDRAGON
> select SPMI
> select BOARD_LATE_INIT
> select OF_BOARD
> - select SAVE_PREV_BL_FDT_ADDR
> + select SAVE_PREV_BL_FDT_ADDR if !ENABLE_ARM_SOC_BOOT0_HOOK
> select LINUX_KERNEL_IMAGE_HEADER if !ENABLE_ARM_SOC_BOOT0_HOOK
> select SYSRESET
> select SYSRESET_PSCI
>
Good catch
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
next prev parent reply other threads:[~2025-04-07 18:12 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 16:59 [PATCH 00/13] board: dragonboard410c: Various fixes and cleanup Stephan Gerhold
2025-04-07 16:59 ` [PATCH 01/13] mach-snapdragon: Fix EL2 boot on DragonBoard 410c Stephan Gerhold
2025-04-07 18:12 ` Neil Armstrong [this message]
2025-04-07 16:59 ` [PATCH 02/13] board: dragonboard410c: Fix RAM size Stephan Gerhold
2025-04-07 18:06 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 03/13] board: dragonboard410c: Fix BD address Stephan Gerhold
2025-04-07 18:11 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 04/13] board: dragonboard410c: Drop UNSTUFF_BITS() macro Stephan Gerhold
2025-04-07 18:07 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 05/13] board: dragonboard410c: Drop reflash functionality Stephan Gerhold
2025-04-07 18:12 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 06/13] board: dragonboard410c: Drop unused linux_image Stephan Gerhold
2025-04-07 18:08 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 07/13] board: dragonboard410c: Use dynamically allocated load addresses Stephan Gerhold
2025-04-07 18:08 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 08/13] board: dragonboard410c: Fix counter frequency Stephan Gerhold
2025-04-07 18:08 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 09/13] board: dragonboard410c: Enable RTL8152 ethernet Stephan Gerhold
2025-04-07 18:09 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 10/13] board: dragonboard410c: Use BOOTSTD instead of DISTRO_DEFAULTS Stephan Gerhold
2025-04-07 18:09 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 11/13] board: dragonboard410c: Enable support for Android boot images Stephan Gerhold
2025-04-07 18:10 ` Neil Armstrong
2025-04-08 7:01 ` Stephan Gerhold
2025-04-08 7:18 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 12/13] board: dragonboard410c: Use button_cmd instead of custom code Stephan Gerhold
2025-04-07 18:10 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 13/13] board: dragonboard410c: Update maintainers Stephan Gerhold
2025-04-07 18:11 ` Neil Armstrong
2025-04-09 15:23 ` [PATCH 00/13] board: dragonboard410c: Various fixes and cleanup Caleb Connolly
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=36a928d1-a95d-4183-a67d-bc2e0cbcfe8c@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=caleb.connolly@linaro.org \
--cc=me@samcday.com \
--cc=rfried.dev@gmail.com \
--cc=stephan.gerhold@linaro.org \
--cc=sumit.garg@kernel.org \
--cc=trini@konsulko.com \
--cc=u-boot-qcom@groups.io \
--cc=u-boot@lists.denx.de \
/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