* [PATCH] arm: stm32mp1: force boot_device variable for invalid TAMP register value
@ 2021-07-08 8:53 Patrick Delaunay
2021-07-09 9:49 ` Patrice CHOTARD
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Patrick Delaunay @ 2021-07-08 8:53 UTC (permalink / raw)
To: u-boot; +Cc: Patrick Delaunay, Patrice Chotard, Tom Rini, U-Boot STM32
When the TAMP register 20 have an invalid value (0x0 for example after
TAMPER error) the "boot_device" U-Boot env variable have no value and
no error is displayed in U-Boot log.
The STM32MP boot command bootcmd_stm32mp failed with strange trace:
"Boot over !"
and the next command in bootcmd_stm32mp failed with few indication:
if test ${boot_device} = serial || test ${boot_device} = usb;
then stm32prog ${boot_device} ${boot_instance};
As it is difficult to investigate, the current patch avoids this issue:
- change the debug message to error: "unexpected boot mode" is displayed
- display trace "Boot over invalid!" in bootcmd_stm32mp
- execute "run distro_bootcmd" to try all the possible target
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---
arch/arm/mach-stm32mp/cpu.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index 592bfd413d..5ea1ddc497 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -542,7 +542,9 @@ static void setup_boot_mode(void)
env_set("boot_instance", "0");
break;
default:
- log_debug("unexpected boot mode = %x\n", boot_mode);
+ env_set("boot_device", "invalid");
+ env_set("boot_instance", "");
+ log_err("unexpected boot mode = %x\n", boot_mode);
break;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: stm32mp1: force boot_device variable for invalid TAMP register value
2021-07-08 8:53 [PATCH] arm: stm32mp1: force boot_device variable for invalid TAMP register value Patrick Delaunay
@ 2021-07-09 9:49 ` Patrice CHOTARD
2021-07-27 9:08 ` Patrick DELAUNAY
2021-07-27 9:09 ` Patrick DELAUNAY
2 siblings, 0 replies; 4+ messages in thread
From: Patrice CHOTARD @ 2021-07-09 9:49 UTC (permalink / raw)
To: Patrick Delaunay, u-boot; +Cc: Tom Rini, U-Boot STM32
Hi Patrick
On 7/8/21 10:53 AM, Patrick Delaunay wrote:
> When the TAMP register 20 have an invalid value (0x0 for example after
> TAMPER error) the "boot_device" U-Boot env variable have no value and
> no error is displayed in U-Boot log.
>
> The STM32MP boot command bootcmd_stm32mp failed with strange trace:
> "Boot over !"
>
> and the next command in bootcmd_stm32mp failed with few indication:
> if test ${boot_device} = serial || test ${boot_device} = usb;
> then stm32prog ${boot_device} ${boot_instance};
>
> As it is difficult to investigate, the current patch avoids this issue:
> - change the debug message to error: "unexpected boot mode" is displayed
> - display trace "Boot over invalid!" in bootcmd_stm32mp
> - execute "run distro_bootcmd" to try all the possible target
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
>
> arch/arm/mach-stm32mp/cpu.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
> index 592bfd413d..5ea1ddc497 100644
> --- a/arch/arm/mach-stm32mp/cpu.c
> +++ b/arch/arm/mach-stm32mp/cpu.c
> @@ -542,7 +542,9 @@ static void setup_boot_mode(void)
> env_set("boot_instance", "0");
> break;
> default:
> - log_debug("unexpected boot mode = %x\n", boot_mode);
> + env_set("boot_device", "invalid");
> + env_set("boot_instance", "");
> + log_err("unexpected boot mode = %x\n", boot_mode);
> break;
> }
>
>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Thanks
Patrice
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: stm32mp1: force boot_device variable for invalid TAMP register value
2021-07-08 8:53 [PATCH] arm: stm32mp1: force boot_device variable for invalid TAMP register value Patrick Delaunay
2021-07-09 9:49 ` Patrice CHOTARD
@ 2021-07-27 9:08 ` Patrick DELAUNAY
2021-07-27 9:09 ` Patrick DELAUNAY
2 siblings, 0 replies; 4+ messages in thread
From: Patrick DELAUNAY @ 2021-07-27 9:08 UTC (permalink / raw)
To: u-boot; +Cc: Patrice Chotard, Tom Rini, U-Boot STM32
Hi,
On 7/8/21 10:53 AM, Patrick Delaunay wrote:
> When the TAMP register 20 have an invalid value (0x0 for example after
> TAMPER error) the "boot_device" U-Boot env variable have no value and
> no error is displayed in U-Boot log.
>
> The STM32MP boot command bootcmd_stm32mp failed with strange trace:
> "Boot over !"
>
> and the next command in bootcmd_stm32mp failed with few indication:
> if test ${boot_device} = serial || test ${boot_device} = usb;
> then stm32prog ${boot_device} ${boot_instance};
>
> As it is difficult to investigate, the current patch avoids this issue:
> - change the debug message to error: "unexpected boot mode" is displayed
> - display trace "Boot over invalid!" in bootcmd_stm32mp
> - execute "run distro_bootcmd" to try all the possible target
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
>
> arch/arm/mach-stm32mp/cpu.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>
Applied to u-boot-stm/master, thanks!
Regards
Patrick
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: stm32mp1: force boot_device variable for invalid TAMP register value
2021-07-08 8:53 [PATCH] arm: stm32mp1: force boot_device variable for invalid TAMP register value Patrick Delaunay
2021-07-09 9:49 ` Patrice CHOTARD
2021-07-27 9:08 ` Patrick DELAUNAY
@ 2021-07-27 9:09 ` Patrick DELAUNAY
2 siblings, 0 replies; 4+ messages in thread
From: Patrick DELAUNAY @ 2021-07-27 9:09 UTC (permalink / raw)
To: u-boot; +Cc: Patrice Chotard, Tom Rini, U-Boot STM32
Hi,
On 7/8/21 10:53 AM, Patrick Delaunay wrote:
> When the TAMP register 20 have an invalid value (0x0 for example after
> TAMPER error) the "boot_device" U-Boot env variable have no value and
> no error is displayed in U-Boot log.
>
> The STM32MP boot command bootcmd_stm32mp failed with strange trace:
> "Boot over !"
>
> and the next command in bootcmd_stm32mp failed with few indication:
> if test ${boot_device} = serial || test ${boot_device} = usb;
> then stm32prog ${boot_device} ${boot_instance};
>
> As it is difficult to investigate, the current patch avoids this issue:
> - change the debug message to error: "unexpected boot mode" is displayed
> - display trace "Boot over invalid!" in bootcmd_stm32mp
> - execute "run distro_bootcmd" to try all the possible target
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
>
> arch/arm/mach-stm32mp/cpu.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>
Applied to u-boot-stm/master, thanks!
Regards
Patrick
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-07-27 9:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-08 8:53 [PATCH] arm: stm32mp1: force boot_device variable for invalid TAMP register value Patrick Delaunay
2021-07-09 9:49 ` Patrice CHOTARD
2021-07-27 9:08 ` Patrick DELAUNAY
2021-07-27 9:09 ` Patrick DELAUNAY
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.