summaryrefslogtreecommitdiffstats
path: root/include/tee/optee.h
diff options
context:
space:
mode:
authorMarco Felsch <m.felsch@pengutronix.de>2024-01-16 18:07:30 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-01-19 08:55:59 +0100
commit99c0794d820afa8089cc0ee40e7b496a48e220cf (patch)
tree04bd7ce27e94d69d95a94fe80d1d9ff3e949a122 /include/tee/optee.h
parent19f07229bc19f0b080d8b3da88d3443ac6a9cd20 (diff)
downloadbarebox-99c0794d820afa8089cc0ee40e7b496a48e220cf.tar.gz
barebox-99c0794d820afa8089cc0ee40e7b496a48e220cf.tar.xz
optee: add helper functions to set/get the optee memory base
Provide helper functions to set/get the optee memory base address gathered previously from the builtin optee binary header. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20240116170738.209954-11-m.felsch@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/tee/optee.h')
-rw-r--r--include/tee/optee.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/tee/optee.h b/include/tee/optee.h
index b5ba0a71d7..0cdf828a6d 100644
--- a/include/tee/optee.h
+++ b/include/tee/optee.h
@@ -33,6 +33,24 @@ struct optee_header {
int optee_verify_header (struct optee_header *hdr);
+#ifdef CONFIG_HAVE_OPTEE
+
+void optee_set_membase(const struct optee_header *hdr);
+int optee_get_membase(u64 *membase);
+
+#else
+
+static inline void optee_set_membase(const struct optee_header *hdr)
+{
+}
+
+static inline int optee_get_membase(u64 *membase)
+{
+ return -ENOSYS;
+}
+
+#endif /* CONFIG_HAVE_OPTEE */
+
#ifdef __PBL__
int start_optee_early(void* fdt, void* tee);