diff options
author | Tom Rini <trini@konsulko.com> | 2018-01-23 21:48:53 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-01-23 21:48:53 -0500 |
commit | 16121280188d3daa57b18ad623d0845bbbb5a90a (patch) | |
tree | 1eced38d4dbbb8aa8813ed7095aedd06f0226ec1 /common/hash.c | |
parent | a516416d75a9b0f52e9d63d47f8a7bd53239767c (diff) | |
parent | 6c8945ec41cb7bff27fbacc88316e3e557c20240 (diff) |
Merge git://git.denx.de/u-boot-fsl-qoriq
Diffstat (limited to 'common/hash.c')
-rw-r--r-- | common/hash.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/common/hash.c b/common/hash.c index cf4d70f852..69d53ed251 100644 --- a/common/hash.c +++ b/common/hash.c @@ -390,7 +390,7 @@ int hash_command(const char *algo_name, int flags, cmd_tbl_t *cmdtp, int flag, if (multi_hash()) { struct hash_algo *algo; - uint8_t output[HASH_MAX_DIGEST_SIZE]; + u8 *output; uint8_t vsum[HASH_MAX_DIGEST_SIZE]; void *buf; @@ -405,6 +405,9 @@ int hash_command(const char *algo_name, int flags, cmd_tbl_t *cmdtp, int flag, return 1; } + output = memalign(ARCH_DMA_MINALIGN, + sizeof(uint32_t) * HASH_MAX_DIGEST_SIZE); + buf = map_sysmem(addr, len); algo->hash_func_ws(buf, len, output, algo->chunk_size); unmap_sysmem(buf); @@ -440,6 +443,8 @@ int hash_command(const char *algo_name, int flags, cmd_tbl_t *cmdtp, int flag, store_result(algo, output, *argv, flags & HASH_FLAG_ENV); } + unmap_sysmem(output); + } /* Horrible code size hack for boards that just want crc32 */ |