aboutsummaryrefslogtreecommitdiff
path: root/tools/mkimage.h
diff options
context:
space:
mode:
authorSean Anderson <sean.anderson@seco.com>2022-03-24 11:26:11 -0400
committerTom Rini <trini@konsulko.com>2022-04-11 11:39:19 -0400
commitb583348ca8c8ce74d5dd665446d20f4c6c6e3f06 (patch)
tree46c9d7af8d9c1ccc8210caa049c34c39aae56d09 /tools/mkimage.h
parente6fe02a5715b3dc02fe4041c4f5a59099a711d70 (diff)
downloadu-boot-b583348ca8c8ce74d5dd665446d20f4c6c6e3f06.zip
u-boot-b583348ca8c8ce74d5dd665446d20f4c6c6e3f06.tar.gz
u-boot-b583348ca8c8ce74d5dd665446d20f4c6c6e3f06.tar.bz2
image: fit: Align hash output buffers
Hardware-accelerated hash functions require that the input and output buffers be aligned to the minimum DMA alignment. memalign.h helpfully provides a macro just for this purpose. It doesn't exist on the host, but we don't need to be aligned there either. Fixes: 5dfb521386 ("[new uImage] New uImage low-level API") Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/mkimage.h')
-rw-r--r--tools/mkimage.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/mkimage.h b/tools/mkimage.h
index 0d31484..7652c8b 100644
--- a/tools/mkimage.h
+++ b/tools/mkimage.h
@@ -41,6 +41,9 @@ static inline ulong map_to_sysmem(void *ptr)
return (ulong)(uintptr_t)ptr;
}
+#define ARCH_DMA_MINALIGN 1
+#define DEFINE_ALIGN_BUFFER(type, name, size, alugn) type name[size]
+
#define MKIMAGE_TMPFILE_SUFFIX ".tmp"
#define MKIMAGE_MAX_TMPFILE_LEN 256
#define MKIMAGE_DEFAULT_DTC_OPTIONS "-I dts -O dtb -p 500"