diff options
-rw-r--r-- | plat/nvidia/tegra/common/tegra_bl31_setup.c | 24 | ||||
-rw-r--r-- | plat/nvidia/tegra/include/tegra_private.h | 2 |
2 files changed, 26 insertions, 0 deletions
diff --git a/plat/nvidia/tegra/common/tegra_bl31_setup.c b/plat/nvidia/tegra/common/tegra_bl31_setup.c index 6237c805..5ad3e795 100644 --- a/plat/nvidia/tegra/common/tegra_bl31_setup.c +++ b/plat/nvidia/tegra/common/tegra_bl31_setup.c @@ -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 @@ -130,9 +142,21 @@ void bl31_early_platform_setup(bl31_params_t *from_bl2, #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; diff --git a/plat/nvidia/tegra/include/tegra_private.h b/plat/nvidia/tegra/include/tegra_private.h index c09a153c..012bfd77 100644 --- a/plat/nvidia/tegra/include/tegra_private.h +++ b/plat/nvidia/tegra/include/tegra_private.h @@ -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); |