mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 10:04:26 +00:00
feat(tc): port BL31-BL33 interface to firmware handoff framework
Adding support for this framework at the handoff boundary between firmware stage BL31 and BL33 on TC. Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> Change-Id: Ia6cd29c8b6cdda0a127a3bac02f6fa1dcfc07151
This commit is contained in:
parent
2a36dee8f1
commit
25a6bcd571
3 changed files with 20 additions and 0 deletions
|
@ -42,12 +42,18 @@
|
|||
#define PLAT_ARM_FW_HANDOFF_SIZE U(0x9000)
|
||||
#define PLAT_ARM_EL3_FW_HANDOFF_BASE ARM_BL_RAM_BASE
|
||||
#define PLAT_ARM_EL3_FW_HANDOFF_LIMIT PLAT_ARM_EL3_FW_HANDOFF_BASE + PLAT_ARM_FW_HANDOFF_SIZE
|
||||
#define FW_NS_HANDOFF_BASE (PLAT_ARM_NS_IMAGE_BASE - PLAT_ARM_FW_HANDOFF_SIZE)
|
||||
|
||||
/* Mappings for Secure and Non-secure Transfer_list */
|
||||
#define TC_MAP_EL3_FW_HANDOFF MAP_REGION_FLAT( \
|
||||
PLAT_ARM_EL3_FW_HANDOFF_BASE, \
|
||||
PLAT_ARM_FW_HANDOFF_SIZE, \
|
||||
MT_MEMORY | MT_RW | EL3_PAS)
|
||||
|
||||
#define TC_MAP_FW_NS_HANDOFF MAP_REGION_FLAT( \
|
||||
FW_NS_HANDOFF_BASE, \
|
||||
PLAT_ARM_FW_HANDOFF_SIZE, \
|
||||
MT_MEMORY | MT_RW | MT_NS)
|
||||
#endif /* TRANSFER_LIST */
|
||||
|
||||
/*
|
||||
|
|
|
@ -159,8 +159,10 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
|
|||
|
||||
arm_bl31_early_platform_setup(arg0, arg1, arg2, arg3);
|
||||
|
||||
#if !TRANSFER_LIST
|
||||
/* Fill the properties struct with the info from the config dtb */
|
||||
fconf_populate("FW_CONFIG", arg1);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_TESTS
|
||||
|
@ -205,6 +207,13 @@ void __init bl31_plat_arch_setup(void)
|
|||
{
|
||||
arm_bl31_plat_arch_setup();
|
||||
|
||||
/*
|
||||
* When TRANSFER_LIST is enabled, HW_CONFIG is included in Transfer List
|
||||
* as an entry with the tag TL_TAG_FDT. In this case, the configuration
|
||||
* is already available, so the fconf_populate mechanism is not needed.
|
||||
* The code block below is only required when TRANSFER_LIST is not used.
|
||||
*/
|
||||
#if !TRANSFER_LIST
|
||||
/* HW_CONFIG was also loaded by BL2 */
|
||||
const struct dyn_cfg_dtb_info_t *hw_config_info;
|
||||
|
||||
|
@ -212,6 +221,7 @@ void __init bl31_plat_arch_setup(void)
|
|||
assert(hw_config_info != NULL);
|
||||
|
||||
fconf_populate("HW_CONFIG", hw_config_info->config_addr);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(SPD_spmd) && (SPMC_AT_EL3 == 0)
|
||||
|
|
|
@ -77,6 +77,10 @@ const mmap_region_t plat_arm_mmap[] = {
|
|||
PLAT_DTB_DRAM_NS,
|
||||
#if SPM_MM
|
||||
ARM_SPM_BUF_EL3_MMAP,
|
||||
#endif
|
||||
#if TRANSFER_LIST
|
||||
TC_MAP_FW_NS_HANDOFF,
|
||||
TC_MAP_EL3_FW_HANDOFF,
|
||||
#endif
|
||||
{0}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue