projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f794436
)
optee: Add optee_image_get_load_addr()
author
Bryan O'Donoghue
<
[email protected]
>
Tue, 13 Mar 2018 16:50:32 +0000
(16:50 +0000)
committer
Tom Rini
<
[email protected]
>
Mon, 19 Mar 2018 20:14:24 +0000
(16:14 -0400)
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 <
[email protected]
>
Cc: Harinarayan Bhatta <
[email protected]
>
Cc: Andrew F. Davis <
[email protected]
>
Cc: Tom Rini <
[email protected]
>
Cc: Kever Yang <
[email protected]
>
Cc: Philipp Tomsich <
[email protected]
>
Cc: Peng Fan <
[email protected]
>
Tested-by: Peng Fan <
[email protected]
>
include/tee/optee.h
patch
|
blob
|
history
diff --git
a/include/tee/optee.h
b/include/tee/optee.h
index eb328d3cc65a4a5080458e32ae43639ee45a2a04..e782cb0e0ed706217ef021a987fba442fc4848c3 100644
(file)
--- a/
include/tee/optee.h
+++ b/
include/tee/optee.h
@@
-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);