Merge branch 'master' of git://git.denx.de/u-boot
[oweals/u-boot.git] / lib / efi_loader / efi_image_loader.c
index 5165377eee662cd5dbf3101c85b5f4e2829efd76..3262d76bcac036b2a2f04fc93667c2e3f2e7bca5 100644 (file)
@@ -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 */