aboutsummaryrefslogtreecommitdiff
path: root/boot/image-fit.c
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2022-06-20 16:31:17 +0930
committerTom Rini <trini@konsulko.com>2022-07-01 16:01:25 -0400
commitc5e2442033d9afe67b1913e192b0eafa74eef856 (patch)
tree4bf4fe415bec0ff55e76cf20a63eecca7e37d6a1 /boot/image-fit.c
parent975918f6a14374f21f094ed5f5262e959190a9d2 (diff)
downloadu-boot-c5e2442033d9afe67b1913e192b0eafa74eef856.zip
u-boot-c5e2442033d9afe67b1913e192b0eafa74eef856.tar.gz
u-boot-c5e2442033d9afe67b1913e192b0eafa74eef856.tar.bz2
image: fit: Use stack allocation macroWIP/2022-07-01-additional-critical-fixes-and-updates
The documentation above the DEFINE_ALIGN_BUFFER says it's for use outside functions, but we're inside one. Instead use ALLOC_CACHE_ALIGN_BUFFER, the stack based macro, which also includes the cache alignment. Fixes: b583348ca8c8 ("image: fit: Align hash output buffers") Signed-off-by: Joel Stanley <joel@jms.id.au> Tested-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com> Reviewed-by: Sean Anderson <sean.anderson@seco.com>
Diffstat (limited to 'boot/image-fit.c')
-rw-r--r--boot/image-fit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/boot/image-fit.c b/boot/image-fit.c
index f57d97f..df3e5df 100644
--- a/boot/image-fit.c
+++ b/boot/image-fit.c
@@ -1264,8 +1264,7 @@ int calculate_hash(const void *data, int data_len, const char *name,
static int fit_image_check_hash(const void *fit, int noffset, const void *data,
size_t size, char **err_msgp)
{
- DEFINE_ALIGN_BUFFER(uint8_t, value, FIT_MAX_HASH_LEN,
- ARCH_DMA_MINALIGN);
+ ALLOC_CACHE_ALIGN_BUFFER(uint8_t, value, FIT_MAX_HASH_LEN);
int value_len;
const char *algo;
uint8_t *fit_value;