v2023.07-rc5 regression: Image overlaps SPL
Fabio Estevam
festevam at gmail.com
Fri Jun 30 15:22:48 CEST 2023
Hi Francesco and Marek,
On Thu, Jun 29, 2023 at 11:19 AM Francesco Dolcini <francesco at dolcini.it> wrote:
>
> Hello Marek,
> as briefly discussed off-list it looks like
> commit 77aed22b48ab ("spl: spl_legacy: Add extra address checks") introduces a
> regression on some board/arch, at least colibri and apalis imx6 fails to boot now
>
> ```
> Trying to boot from MMC1
> SPL: Image overlaps SPL
> resetting ...
I was able to reproduce this problem on an imx6dl colibri and added
some debug information:
Trying to boot from USB SDP
SDP: initialize...
SDP: handle requests...
Downloading file of size 551176 to 0x177fffc0... done
Jumping to header at 0x177fffc0
Header Tag is not an IMX image
Found header at 0x177fffc0
********* start: 0x177fffc0
********* size: 0x86908
********* spl_start: 0x908000
********* spl_end: 0x18200480
********* end: 0x178868c8
SPL: Image overlaps SPL
Please note that spl_start is inside internal RAM space, but spl_end
points to a DDR address.
Should we fix spl_end like this?
--- 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 = spl_start + size;
uintptr_t end = start + size;
More information about the U-Boot
mailing list