mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-04 18:41:03 +00:00
9b3f40ad09
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>
36 lines
939 B
C
36 lines
939 B
C
/*
|
|
* Copyright 2016 NXP Semiconductor, Inc.
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#ifndef __SEC_FIRMWARE_H_
|
|
#define __SEC_FIRMWARE_H_
|
|
|
|
#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 *, u32 *, u32 *);
|
|
int _sec_firmware_entry(const void *, u32 *, u32 *);
|
|
bool sec_firmware_is_valid(const void *);
|
|
bool sec_firmware_support_hwrng(void);
|
|
int sec_firmware_get_random(uint8_t *rand, int bytes);
|
|
int fdt_fixup_kaslr(void *fdt);
|
|
#ifdef CONFIG_SEC_FIRMWARE_ARMV8_PSCI
|
|
unsigned int sec_firmware_support_psci_version(void);
|
|
unsigned int _sec_firmware_support_psci_version(void);
|
|
#else
|
|
static inline unsigned int sec_firmware_support_psci_version(void)
|
|
{
|
|
return PSCI_INVALID_VER;
|
|
}
|
|
#endif
|
|
|
|
static inline unsigned int sec_firmware_used_jobring_offset(void)
|
|
{
|
|
return SEC_JR3_OFFSET;
|
|
}
|
|
|
|
#endif /* __SEC_FIRMWARE_H_ */
|