diff options
| author | Nora Schiffer <nora.schiffer@ew.tq-group.com> | 2026-06-22 13:19:31 +0200 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2026-07-03 10:11:11 -0600 |
| commit | 0f890963da2d463dd47ec77ef75b1324cc8064f9 (patch) | |
| tree | 862ccc3ee5b3e952f164df5e9feb4c14dc081909 | |
| parent | f42eac9dc8a8b8125920d8a18f7f64afedf1fbc5 (diff) | |
| download | u-boot-0f890963da2d463dd47ec77ef75b1324cc8064f9.tar.gz u-boot-0f890963da2d463dd47ec77ef75b1324cc8064f9.zip | |
bootm: fix flush_cache() with IH_TYPE_KERNEL_NOLOAD
`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@ew.tq-group.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
| -rw-r--r-- | boot/bootm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/boot/bootm.c b/boot/bootm.c index 4c260a5f5ce..7c9a6f82976 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -618,7 +618,7 @@ static int bootm_load_os(struct bootm_headers *images, int boot_progress) ulong image_start = os.image_start; ulong image_len = os.image_len; ulong decomp_len = CONFIG_SYS_BOOTM_LEN; - ulong flush_start = ALIGN_DOWN(load, ARCH_DMA_MINALIGN); + ulong flush_start; bool no_overlap; void *load_buf, *image_buf; int err; @@ -663,6 +663,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); |
