diff options
author | Simon Glass <sjg@chromium.org> | 2016-11-07 08:47:04 -0700 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2016-11-14 23:24:03 +0100 |
commit | d0d9099365f6658cfc89943b4e08d6436200845f (patch) | |
tree | 1742e95710198ff48e3b385e3aef032051f826ff /lib/efi_loader | |
parent | 1f3f0357aa79212e06fadf2149a85e0fa435a8eb (diff) | |
download | u-boot-d0d9099365f6658cfc89943b4e08d6436200845f.tar.gz u-boot-d0d9099365f6658cfc89943b4e08d6436200845f.tar.xz u-boot-d0d9099365f6658cfc89943b4e08d6436200845f.zip |
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 <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'lib/efi_loader')
-rw-r--r-- | lib/efi_loader/efi_image_loader.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 */ |