The ti_secure_image_check() function may relocate the image during
authentication, updating image_addr to point to the verified location.
The caller was not updated with this new address, causing it to
reference the original unverified location.
Update p_image with the verified image address after authentication
to ensure subsequent operations use the correct location.
Signed-off-by: Philippe Schenker <philippe.schenker@impulsing.ch>
*/
*p_size = image_size;
+ *p_image = (void *)(uintptr_t)image_addr;
+
/*
* Output notification of successful authentication to re-assure the
* user that the secure code is being processed as expected. However