Files
u-boot/common
Rasmus Villemoes 122c25c00a common/spl: use memmove() in load_simple_fit()
I had trouble booting some am335x boards (both
beagleboneblack and a custom board). SPL would start just fine, and
apparently load U-Boot proper, but it would hang when jumping to
U-Boot.

While debugging, I stumbled on this memcpy() which from code
inspection very much looked to have overlapping src and dst, and
indeed a simple printf revealed

  calling memcpy(0x8087bf68, 0x8087bf80, 0xf7f8)

Now, it will always be with src > dst, our memcpy()
implementations "most likely" do forward-copying, and in the end it
turned out that this wasn't the culprit after all [*].

But to avoid me or others barking up the wrong tree in the future, and
because this use of memcpy() is technically undefined, use memmove()
instead.

[*] That was 358d1cc232 ("spl: Align FDT load address"), which has
since been fixed in master but not the v2025.07 I worked of by
52caad0d14 ("ARM: Align image end to 8 bytes to fit DT alignment").

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@gmx.de>
2025-09-09 10:35:59 -06:00
..
2025-06-20 12:15:08 -06:00
2024-11-03 21:27:12 -06:00
2025-07-28 08:53:20 -06:00
2025-04-08 16:23:51 -06:00
2013-04-01 16:33:52 -04:00
2025-02-03 16:00:42 -06:00
2024-07-15 12:12:17 -06:00
2024-07-15 12:12:17 -06:00
2025-01-26 11:06:56 +01:00
2025-06-23 16:15:23 -06:00
2025-03-11 23:06:18 +01:00
2024-07-15 12:12:17 -06:00