Tegra: get BL31 arguments from previous bootloader
This patch implements handlers which platforms can override to get the BL31 arguments passed by the previous bootloader. Change-Id: I6b9628a984644ce1b5de5aa6d7cd890e57241d89 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
This commit is contained in:
parent
4ce9a18282
commit
8ab06d2f1e
|
@ -84,12 +84,24 @@ extern uint64_t ns_image_entrypoint;
|
|||
* provide typical implementations that will be overridden by a SoC.
|
||||
******************************************************************************/
|
||||
#pragma weak plat_early_platform_setup
|
||||
#pragma weak plat_get_bl31_params
|
||||
#pragma weak plat_get_bl31_plat_params
|
||||
|
||||
void plat_early_platform_setup(void)
|
||||
{
|
||||
; /* do nothing */
|
||||
}
|
||||
|
||||
bl31_params_t *plat_get_bl31_params(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
plat_params_from_bl2_t *plat_get_bl31_plat_params(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Return a pointer to the 'entry_point_info' structure of the next image for
|
||||
* security state specified. BL33 corresponds to the non-secure image type
|
||||
|
@ -129,10 +141,22 @@ void bl31_early_platform_setup(bl31_params_t *from_bl2,
|
|||
int impl = (read_midr() >> MIDR_IMPL_SHIFT) & MIDR_IMPL_MASK;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* For RESET_TO_BL31 systems, BL31 is the first bootloader to run so
|
||||
* there's no argument to relay from a previous bootloader. Platforms
|
||||
* might use custom ways to get arguments, so provide handlers which
|
||||
* they can override.
|
||||
*/
|
||||
if (from_bl2 == NULL)
|
||||
from_bl2 = plat_get_bl31_params();
|
||||
if (plat_params == NULL)
|
||||
plat_params = plat_get_bl31_plat_params();
|
||||
|
||||
/*
|
||||
* Copy BL3-3, BL3-2 entry point information.
|
||||
* They are stored in Secure RAM, in BL2's address space.
|
||||
*/
|
||||
assert(from_bl2);
|
||||
assert(from_bl2->bl33_ep_info);
|
||||
bl33_image_ep_info = *from_bl2->bl33_ep_info;
|
||||
|
||||
|
|
|
@ -82,6 +82,8 @@ int32_t tegra_soc_validate_power_state(unsigned int power_state,
|
|||
const mmap_region_t *plat_get_mmio_map(void);
|
||||
uint32_t plat_get_console_from_id(int id);
|
||||
void plat_gic_setup(void);
|
||||
bl31_params_t *plat_get_bl31_params(void);
|
||||
plat_params_from_bl2_t *plat_get_bl31_plat_params(void);
|
||||
|
||||
/* Declarations for plat_secondary.c */
|
||||
void plat_secondary_setup(void);
|
||||
|
|
Loading…
Reference in New Issue