diff options
author | Andrew F. Davis <afd@ti.com> | 2017-06-29 08:38:25 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-07-10 14:26:05 -0400 |
commit | 9e58d4dbe361319bd964a760b4f6f0ddfc7b9e7f (patch) | |
tree | 6b991042015b151d5cedb225a4ac2d55724918fa /arch/arm/mach-keystone | |
parent | 7bdc6947d2cdfd45b6fc0a51f8f7e77a54c68e55 (diff) | |
download | u-boot-9e58d4dbe361319bd964a760b4f6f0ddfc7b9e7f.zip u-boot-9e58d4dbe361319bd964a760b4f6f0ddfc7b9e7f.tar.gz u-boot-9e58d4dbe361319bd964a760b4f6f0ddfc7b9e7f.tar.bz2 |
arm: mach-keystone: Modify secure image size before copy
The size of the secure image does not include the size of the
header, subtract this out before we move the image or we grab
extra data after the image.
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'arch/arm/mach-keystone')
-rw-r--r-- | arch/arm/mach-keystone/mon.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mach-keystone/mon.c b/arch/arm/mach-keystone/mon.c index 8100984..ebfb483 100644 --- a/arch/arm/mach-keystone/mon.c +++ b/arch/arm/mach-keystone/mon.c @@ -114,12 +114,12 @@ void board_fit_image_post_process(void **p_image, size_t *p_size) } /* - * Overwrite the image headers after authentication - * and decryption. Update size to reflect removal - * of header. - */ - memcpy(image, image + KS2_HS_SEC_HEADER_LEN, *p_size); + * Overwrite the image headers after authentication + * and decryption. Update size to reflect removal + * of header. + */ *p_size -= KS2_HS_SEC_HEADER_LEN; + memcpy(image, image + KS2_HS_SEC_HEADER_LEN, *p_size); /* * Output notification of successful authentication to re-assure the |