armv8: sec_firmware: Add support for loadables in FIT

Enable support for loadables in SEC firmware FIT image. Currently
support is added for single loadable image.

Brief description of implementation:
  Add two more address pointers (loadable_h, loadable_l) as arguments to
  sec_firmware_init() api.
  Create new api: sec_firmware_checks_copy_loadable() to check if loadables
  node is present in SEC firmware FIT image. If present, verify loadable
  image and copies it to secure DDR memory.
  Populate address pointers with secure DDR memory addresses where loadable
  is copied.

Example use-case could be trusted OS (tee.bin) as loadables node in SEC
firmware FIT image.

Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
This commit is contained in:
Sumit Garg
2017-09-01 13:55:01 +05:30
committed by York Sun
parent 9781d9ff5f
commit 9b3f40ad09
3 changed files with 104 additions and 8 deletions

View File

@@ -9,8 +9,10 @@
#define PSCI_INVALID_VER 0xffffffff
#define SEC_JR3_OFFSET 0x40000
#define WORD_MASK 0xffffffff
#define WORD_SHIFT 32
int sec_firmware_init(const void *, u32 *, u32 *);
int sec_firmware_init(const void *, u32 *, u32 *, u32 *, u32 *);
int _sec_firmware_entry(const void *, u32 *, u32 *);
bool sec_firmware_is_valid(const void *);
bool sec_firmware_support_hwrng(void);