diff mbox series

[v2,7/7] configs: stm32f746-disco: Remove CONFIG_SYS_UBOOT_START flag

Message ID 20220920160436.117811-8-patrice.chotard@foss.st.com
State Accepted
Commit 2b5dee9485eb52875df801a414838d75b000604d
Delegated to: Patrick Delaunay
Headers show
Series SPL fixes for STM32F7 MCUs | expand

Commit Message

Patrice CHOTARD Sept. 20, 2022, 4:04 p.m. UTC
By pressing "c" key during SPL execution, we force U-boot execution
instead of a kernel XIP image.

This fixes a hard fault when booting stm32f746-disco in SPL with "c"
key pressed during SPL execution.

U-Boot SPL 2022.10-rc5-00009-g40d02baa91 (Sep 20 2022 - 17:21:21 +0200)
Trying to boot from XIP
Hard fault
pc : 080083fc    lr : 08000d1b    xPSR : 21000000
r12 : 2004f108   r3 : 080083fd    r2 : 00000028
r1 : 2004f0c8    r0 : 2004f0e4
Resetting CPU ...

This is due to SYS_UBOOT_START flag set to 0x080083FD which is not correct.
If unset, SYS_UBOOT_START is set by default to CONFIG_SYS_TEXT_BASE
which match with our requirement.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
---

(no changes since v1)

 include/configs/stm32f746-disco.h | 1 -
 1 file changed, 1 deletion(-)

Comments

Patrick DELAUNAY Sept. 26, 2022, 1:02 p.m. UTC | #1
Hi,

On 9/20/22 18:04, Patrice Chotard wrote:
> By pressing "c" key during SPL execution, we force U-boot execution
> instead of a kernel XIP image.
>
> This fixes a hard fault when booting stm32f746-disco in SPL with "c"
> key pressed during SPL execution.
>
> U-Boot SPL 2022.10-rc5-00009-g40d02baa91 (Sep 20 2022 - 17:21:21 +0200)
> Trying to boot from XIP
> Hard fault
> pc : 080083fc    lr : 08000d1b    xPSR : 21000000
> r12 : 2004f108   r3 : 080083fd    r2 : 00000028
> r1 : 2004f0c8    r0 : 2004f0e4
> Resetting CPU ...
>
> This is due to SYS_UBOOT_START flag set to 0x080083FD which is not correct.
> If unset, SYS_UBOOT_START is set by default to CONFIG_SYS_TEXT_BASE
> which match with our requirement.
>
> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
> ---
>
> (no changes since v1)
>
>   include/configs/stm32f746-disco.h | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/include/configs/stm32f746-disco.h b/include/configs/stm32f746-disco.h
> index 64c1bc7d43..b0ec226114 100644
> --- a/include/configs/stm32f746-disco.h
> +++ b/include/configs/stm32f746-disco.h
> @@ -34,7 +34,6 @@
>   			BOOTENV
>   
>   #define CONFIG_SYS_MONITOR_LEN		(512 * 1024)
> -#define CONFIG_SYS_UBOOT_START		0x080083FD
>   #define CONFIG_SYS_UBOOT_BASE		(CONFIG_SYS_FLASH_BASE + \
>   					 CONFIG_SPL_PAD_TO)
>   



Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>

Thanks
Patrick
Patrice CHOTARD Sept. 26, 2022, 3:56 p.m. UTC | #2
On 9/26/22 15:02, Patrick DELAUNAY wrote:
> Hi,
> 
> On 9/20/22 18:04, Patrice Chotard wrote:
>> By pressing "c" key during SPL execution, we force U-boot execution
>> instead of a kernel XIP image.
>>
>> This fixes a hard fault when booting stm32f746-disco in SPL with "c"
>> key pressed during SPL execution.
>>
>> U-Boot SPL 2022.10-rc5-00009-g40d02baa91 (Sep 20 2022 - 17:21:21 +0200)
>> Trying to boot from XIP
>> Hard fault
>> pc : 080083fc    lr : 08000d1b    xPSR : 21000000
>> r12 : 2004f108   r3 : 080083fd    r2 : 00000028
>> r1 : 2004f0c8    r0 : 2004f0e4
>> Resetting CPU ...
>>
>> This is due to SYS_UBOOT_START flag set to 0x080083FD which is not correct.
>> If unset, SYS_UBOOT_START is set by default to CONFIG_SYS_TEXT_BASE
>> which match with our requirement.
>>
>> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
>> ---
>>
>> (no changes since v1)
>>
>>   include/configs/stm32f746-disco.h | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/include/configs/stm32f746-disco.h b/include/configs/stm32f746-disco.h
>> index 64c1bc7d43..b0ec226114 100644
>> --- a/include/configs/stm32f746-disco.h
>> +++ b/include/configs/stm32f746-disco.h
>> @@ -34,7 +34,6 @@
>>               BOOTENV
>>     #define CONFIG_SYS_MONITOR_LEN        (512 * 1024)
>> -#define CONFIG_SYS_UBOOT_START        0x080083FD
>>   #define CONFIG_SYS_UBOOT_BASE        (CONFIG_SYS_FLASH_BASE + \
>>                        CONFIG_SPL_PAD_TO)
>>   
> 
> 
> 
> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> 
> Thanks
> Patrick
> 
Applied to u-boot-stm32/next

Thanks
diff mbox series

Patch

diff --git a/include/configs/stm32f746-disco.h b/include/configs/stm32f746-disco.h
index 64c1bc7d43..b0ec226114 100644
--- a/include/configs/stm32f746-disco.h
+++ b/include/configs/stm32f746-disco.h
@@ -34,7 +34,6 @@ 
 			BOOTENV
 
 #define CONFIG_SYS_MONITOR_LEN		(512 * 1024)
-#define CONFIG_SYS_UBOOT_START		0x080083FD
 #define CONFIG_SYS_UBOOT_BASE		(CONFIG_SYS_FLASH_BASE + \
 					 CONFIG_SPL_PAD_TO)