
On Fri, Jun 30, 2023 at 10:22 AM Fabio Estevam festevam@gmail.com wrote:
Should we fix spl_end like this?
Looking at u-boot-spl.map:
0x0000000000912264 0x0 common/spl/spl.o 0x0000000000912264 . = ALIGN (0x4) 0x0000000000912264 __image_copy_end = .
.end *(.__end) 0x0000000000912264 _image_binary_end = .
__image_copy_end is the last address of the SPL inside the internal RAM.
So shouldn't we do this instead?
--- a/common/spl/spl_legacy.c +++ b/common/spl/spl_legacy.c @@ -19,9 +19,17 @@ static void spl_parse_legacy_validate(uintptr_t start, uintptr_t size) { uintptr_t spl_start = (uintptr_t)_start; - uintptr_t spl_end = (uintptr_t)__bss_end; + uintptr_t spl_end = (uintptr_t)__image_copy_end; uintptr_t end = start + size;
Which results in:
********* start: 0x177fffc0 ********* size: 0x86908 ********* spl_start: 0x908000 ********* spl_end: 0x912264 ********* end: 0x178868c8 ********* start: 0x17800000 ********* size: 0x0 ********* spl_start: 0x908000 ********* spl_end: 0x912264 ********* end: 0x17800000
and allows the boot to proceed:
U-Boot 2023.07-rc5-00012-g5fa30f2351ac-dirty (Jun 30 2023 - 10:45:40 -0300)
CPU: Freescale i.MX6DL rev1.4 at 792MHz CPU: Industrial temperature grade (-40C to 105C) at 46C