5353#endif
5454
5555/* Globals */
56- static uint8_t XALIGNED ( 4 ) digest [WOLFBOOT_SHA_DIGEST_SIZE ];
56+ static uint8_t digest [WOLFBOOT_SHA_DIGEST_SIZE ] XALIGNED ( 4 ) ;
5757
5858/* TPM based verify */
5959#if defined(WOLFBOOT_TPM ) && defined(WOLFBOOT_TPM_VERIFY )
@@ -748,7 +748,7 @@ uint16_t wolfBoot_get_header(struct wolfBoot_image *img, uint16_t type,
748748}
749749
750750#ifdef EXT_FLASH
751- static uint8_t XALIGNED ( 4 ) ext_hash_block [WOLFBOOT_SHA_BLOCK_SIZE ];
751+ static uint8_t ext_hash_block [WOLFBOOT_SHA_BLOCK_SIZE ] XALIGNED ( 4 ) ;
752752#endif
753753/**
754754 * @brief Get a block of data to be hashed.
@@ -772,7 +772,7 @@ static uint8_t *get_sha_block(struct wolfBoot_image *img, uint32_t offset)
772772}
773773
774774#ifdef EXT_FLASH
775- static uint8_t XALIGNED ( 4 ) hdr_cpy [IMAGE_HEADER_SIZE ];
775+ static uint8_t hdr_cpy [IMAGE_HEADER_SIZE ] XALIGNED ( 4 ) ;
776776static int hdr_cpy_done = 0 ;
777777
778778/**
@@ -1500,7 +1500,7 @@ static int update_hash_flash_fwimg(wolfBoot_hash_t* ctx,
15001500{
15011501 uint32_t current_offset = offset ;
15021502 uint32_t remaining_size = size ;
1503- uint8_t XALIGNED ( 4 ) read_buf [WOLFBOOT_SHA_BLOCK_SIZE ]; /* Use local buffer */
1503+ uint8_t read_buf [WOLFBOOT_SHA_BLOCK_SIZE ] XALIGNED ( 4 ) ; /* Use local buffer*/
15041504
15051505 while (remaining_size > 0 ) {
15061506 uint32_t read_size = (remaining_size > WOLFBOOT_SHA_BLOCK_SIZE )
@@ -1529,7 +1529,7 @@ static int update_hash_flash_fwimg(wolfBoot_hash_t* ctx,
15291529static int update_hash_flash_addr (wolfBoot_hash_t * ctx , uintptr_t addr ,
15301530 uint32_t size , int src_ext )
15311531{
1532- uint8_t XALIGNED ( 4 ) buffer [WOLFBOOT_SHA_BLOCK_SIZE ];
1532+ uint8_t buffer [WOLFBOOT_SHA_BLOCK_SIZE ] XALIGNED ( 4 ) ;
15331533 uint32_t remaining_size = size ;
15341534 uintptr_t current_addr = addr ;
15351535
@@ -1568,7 +1568,7 @@ int wolfBoot_check_flash_image_elf(uint8_t part, unsigned long* entry_out)
15681568 size_t ph_size = 0 ;
15691569 size_t current_ph_offset = 0 ;
15701570 int64_t final_offset = -1 ;
1571- uint8_t XALIGNED ( 4 ) calc_digest [WOLFBOOT_SHA_DIGEST_SIZE ];
1571+ uint8_t calc_digest [WOLFBOOT_SHA_DIGEST_SIZE ] XALIGNED ( 4 ) ;
15721572 uint8_t * exp_digest ;
15731573 int32_t stored_sha_len ;
15741574 int i ;
0 commit comments