[PATCH 1/4] bootm: fix flush_cache() with IH_TYPE_KERNEL_NOLOAD
Nora Schiffer
nora.schiffer at ew.tq-group.com
Wed Jun 10 11:01:22 CEST 2026
`flush_start` must be set after `load` has been assigned.
Fixes: 69544c4fd8b1 ("bootm: Support kernel_noload with compression")
Signed-off-by: Nora Schiffer <nora.schiffer at ew.tq-group.com>
---
boot/bootm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/boot/bootm.c b/boot/bootm.c
index ec74873b503..51d99a3385f 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -617,7 +617,7 @@ static int bootm_load_os(struct bootm_headers *images, int boot_progress)
ulong blob_end = os.end;
ulong image_start = os.image_start;
ulong image_len = os.image_len;
- ulong flush_start = ALIGN_DOWN(load, ARCH_DMA_MINALIGN);
+ ulong flush_start;
bool no_overlap;
void *load_buf, *image_buf;
int err;
@@ -659,6 +659,7 @@ static int bootm_load_os(struct bootm_headers *images, int boot_progress)
/* We need the decompressed image size in the next steps */
images->os.image_len = load_end - load;
+ flush_start = ALIGN_DOWN(load, ARCH_DMA_MINALIGN);
flush_cache(flush_start, ALIGN(load_end, ARCH_DMA_MINALIGN) - flush_start);
debug(" kernel loaded at 0x%08lx, end = 0x%08lx\n", load, load_end);
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
https://www.tq-group.com/
More information about the U-Boot
mailing list