mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
u-boot: align cache flushes in load_elf_image_shdr to line boundaries
Prevent cache warning messages when using the 'bootelf' command on an Arm target. Round down each section start address and round up the respective section end to the nearest cache line. Signed-off-by: Neil Stainton <nstainton@asl-control.co.uk> [trini: Manually apply, rework whitespace] Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
0c54411537
commit
18f201ea20
1 changed files with 4 additions and 1 deletions
|
@ -219,7 +219,10 @@ static unsigned long load_elf_image_shdr(unsigned long addr)
|
|||
memcpy((void *)(uintptr_t)shdr->sh_addr,
|
||||
(const void *)image, shdr->sh_size);
|
||||
}
|
||||
flush_cache(shdr->sh_addr, shdr->sh_size);
|
||||
flush_cache(rounddown(shdr->sh_addr, ARCH_DMA_MINALIGN),
|
||||
roundup((shdr->sh_addr + shdr->sh_size),
|
||||
ARCH_DMA_MINALIGN) -
|
||||
rounddown(shdr->sh_addr, ARCH_DMA_MINALIGN));
|
||||
}
|
||||
|
||||
return ehdr->e_entry;
|
||||
|
|
Loading…
Reference in a new issue