mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 13:43:28 +00:00
optee: Add optee_image_get_load_addr()
This patch adds optee_image_get_load_addr() a helper function used to calculate the load-address of an OPTEE image based on the lower entry-point address given in the OPTEE header. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Cc: Harinarayan Bhatta <harinarayan@ti.com> Cc: Andrew F. Davis <afd@ti.com> Cc: Tom Rini <trini@konsulko.com> Cc: Kever Yang <kever.yang@rock-chips.com> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Peng Fan <peng.fan@nxp.com> Tested-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
f79443684b
commit
dd5a12e287
1 changed files with 5 additions and 0 deletions
|
@ -36,6 +36,11 @@ static inline uint32_t optee_image_get_entry_point(const image_header_t *hdr)
|
|||
return optee_hdr->init_load_addr_lo;
|
||||
}
|
||||
|
||||
static inline uint32_t optee_image_get_load_addr(const image_header_t *hdr)
|
||||
{
|
||||
return optee_image_get_entry_point(hdr) - sizeof(struct optee_header);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_OPTEE)
|
||||
int optee_verify_image(struct optee_header *hdr, unsigned long tzdram_start,
|
||||
unsigned long tzdram_len, unsigned long image_len);
|
||||
|
|
Loading…
Reference in a new issue