mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
optee: Add lib entries for sharing OPTEE code across ports
This patch adds code to lib to enable sharing of useful OPTEE code between board-ports and architectures. The code on lib/optee/optee.c comes from the TI omap2 port. Eventually the OMAP2 code will be patched to include the shared code. The intention here is to add more useful OPTEE specific code as more functionality gets added. 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:
committed by
Tom Rini
parent
5cf32518ea
commit
32ce6179fb
@@ -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 */
|
||||
|
Reference in New Issue
Block a user