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 | |
parent | 1f3f0357aa79212e06fadf2149a85e0fa435a8eb (diff) | |
download | u-boot-imx-d0d9099365f6658cfc89943b4e08d6436200845f.zip u-boot-imx-d0d9099365f6658cfc89943b4e08d6436200845f.tar.gz u-boot-imx-d0d9099365f6658cfc89943b4e08d6436200845f.tar.bz2 |
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')
-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 5165377..3262d76 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 */ |