From: Simon Glass Date: Mon, 7 Nov 2016 15:47:04 +0000 (-0700) Subject: efi: Correct cache flush alignment X-Git-Tag: v2017.01-rc1~252^2~19 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d0d9099365f6658cfc89943b4e08d6436200845f;p=u-boot efi: Correct cache flush alignment Make sure that the cache flushes correctly by ensuring that the end address is correctly aligned. Signed-off-by: Simon Glass Signed-off-by: Alexander Graf --- diff --git a/lib/efi_loader/efi_image_loader.c b/lib/efi_loader/efi_image_loader.c index 5165377eee..3262d76bca 100644 --- a/lib/efi_loader/efi_image_loader.c +++ b/lib/efi_loader/efi_image_loader.c @@ -174,7 +174,8 @@ void *efi_load_pe(void *efi, struct efi_loaded_image *loaded_image_info) efi_loader_relocate(rel, rel_size, efi_reloc); /* Flush cache */ - flush_cache((ulong)efi_reloc, virt_size); + flush_cache((ulong)efi_reloc, + ALIGN(virt_size, CONFIG_SYS_CACHELINE_SIZE)); invalidate_icache_all(); /* Populate the loaded image interface bits */