summaryrefslogtreecommitdiff
path: root/include/tee
diff options
context:
space:
mode:
Diffstat (limited to 'include/tee')
-rw-r--r--include/tee/optee.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/tee/optee.h b/include/tee/optee.h
index 9ab0d08634..8943afb439 100644
--- a/include/tee/optee.h
+++ b/include/tee/optee.h
@@ -10,6 +10,8 @@
#ifndef _OPTEE_H
#define _OPTEE_H
+#include <linux/errno.h>
+
#define OPTEE_MAGIC 0x4554504f
#define OPTEE_VERSION 1
#define OPTEE_ARCH_ARM32 0
@@ -27,4 +29,18 @@ struct optee_header {
uint32_t paged_size;
};
+#if defined(CONFIG_OPTEE)
+int optee_verify_image(struct optee_header *hdr, unsigned long tzdram_start,
+ unsigned long tzdram_len, unsigned long image_len);
+#else
+static inline int optee_verify_image(struct optee_header *hdr,
+ unsigned long tzdram_start,
+ unsigned long tzdram_len,
+ unsigned long image_len)
+{
+ return -EPERM;
+}
+
+#endif
+
#endif /* _OPTEE_H */