Skip to content
Snippets Groups Projects
Commit ef3fc42d authored by Andrew F. Davis's avatar Andrew F. Davis Committed by Tom Rini
Browse files

arm: mach-omap2: Align image address before cache operations


The image address passed to secure_boot_verify_image() may not be
cacheline aligned, round the address down to the nearest cacheline.

Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
Reviewed-by: default avatarLokesh Vutla <lokeshvutla@ti.com>
parent c826d172
No related branches found
No related tags found
No related merge requests found
......@@ -112,8 +112,8 @@ int secure_boot_verify_image(void **image, size_t *size)
/* Perform cache writeback on input buffer */
flush_dcache_range(
(u32)*image,
(u32)*image + roundup(*size, ARCH_DMA_MINALIGN));
rounddown((u32)*image, ARCH_DMA_MINALIGN),
roundup((u32)*image + *size, ARCH_DMA_MINALIGN));
cert_addr = (uint32_t)*image;
sig_addr = find_sig_start((char *)*image, *size);
......@@ -151,8 +151,8 @@ int secure_boot_verify_image(void **image, size_t *size)
/* Perform cache writeback on output buffer */
flush_dcache_range(
(u32)*image,
(u32)*image + roundup(*size, ARCH_DMA_MINALIGN));
rounddown((u32)*image, ARCH_DMA_MINALIGN),
roundup((u32)*image + *size, ARCH_DMA_MINALIGN));
auth_exit:
if (result != 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment