[PATCH 01/10] ARM: stm32: Add STM32MP13xx SPL Kconfig options
Patrice CHOTARD
patrice.chotard at foss.st.com
Tue Jul 29 09:19:28 CEST 2025
On 7/29/25 06:05, Marek Vasut wrote:
> On 6/29/25 9:08 PM, Marek Vasut wrote:
>
> Hi,
>
>>>> diff --git a/arch/arm/mach-stm32mp/Kconfig.13x b/arch/arm/mach- stm32mp/Kconfig.13x
>>>> index bc8b3f8cf77..cecf9e3b8c7 100644
>>>> --- a/arch/arm/mach-stm32mp/Kconfig.13x
>>>> +++ b/arch/arm/mach-stm32mp/Kconfig.13x
>>>> @@ -20,7 +20,8 @@ config TARGET_ST_STM32MP13X
>>>> endchoice
>>>> config TEXT_BASE
>>>> - default 0xC0000000
>>>> + default 0xC0000000 if TFABOOT
>>>> + default 0xC0100000 if !TFABOOT
>>>> config PRE_CON_BUF_ADDR
>>>> default 0xC0800000
>>>
>>>
>>> I don't understood why you modify TEXT_BASE here.
>> Loading of data to the very beginning of DRAM may fail in case the data are wrapped in various container image types, because the image loader in SPL may use the area before the data load address to load for example image header(s) in there. This is one example of such header loading, which is triggered on STM32MP13xx in SPL:
>>
>> https://source.denx.de/u-boot/u-boot/-/blob/master/include/spl_load.h#L18
>>
>> "
>> 18 struct legacy_img_hdr *header =
>> 19 spl_get_load_buffer(-sizeof(*header), sizeof(*header));
>> 20 ulong base_offset, image_offset, overhead;
>> 21 int read, ret;
>> 22
>> 23 log_debug("\nloading hdr from %lx to %p\n", (ulong)offset, header);
>> 24 read = info->read(info, offset, ALIGN(sizeof(*header),
>> 25 spl_get_bl_len(info)), header);
>> "
>>
>> The header is loaded at CONFIG_TEXT_BASE - sizeof(*header). If CONFIG_TEXT_BASE is start of DRAM with no usable memory right below it AND sizeof(*header) is non-zero, then this loading will fail.
>>
>> That's why the TEXT_BASE is shifted a bit higher in this patch.
>
> Any news on this series ? It would be good to move this along.
>
Hi Marek
Sorry for the delay, i am back from vacation. I will prepare pull request soon.
Thanks
Patrice
More information about the U-Boot
mailing list