Tegra: add 'late' platform setup handler
This patch adds a platform setup handler that gets called after the MMU is enabled. Platforms wanting to make use of this handler should declare 'plat_late_platform_setup' handler in their platform files, to override the default weakly defined handler. Change-Id: Ibc97a2e5a24608ddea856d0bd543a9d5876f604c Signed-off-by: Dilan Lee <dilee@nvidia.com>
This commit is contained in:
parent
dd20f5b3d9
commit
3e1923d9cf
|
@ -70,6 +70,7 @@ extern uint64_t ns_image_entrypoint;
|
||||||
#pragma weak plat_early_platform_setup
|
#pragma weak plat_early_platform_setup
|
||||||
#pragma weak plat_get_bl31_params
|
#pragma weak plat_get_bl31_params
|
||||||
#pragma weak plat_get_bl31_plat_params
|
#pragma weak plat_get_bl31_plat_params
|
||||||
|
#pragma weak plat_late_platform_setup
|
||||||
|
|
||||||
void plat_early_platform_setup(void)
|
void plat_early_platform_setup(void)
|
||||||
{
|
{
|
||||||
|
@ -86,6 +87,11 @@ plat_params_from_bl2_t *plat_get_bl31_plat_params(void)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void plat_late_platform_setup(void)
|
||||||
|
{
|
||||||
|
; /* do nothing */
|
||||||
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Return a pointer to the 'entry_point_info' structure of the next image for
|
* 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
|
* security state specified. BL33 corresponds to the non-secure image type
|
||||||
|
@ -328,6 +334,13 @@ void bl31_platform_setup(void)
|
||||||
*/
|
*/
|
||||||
tegra_memctrl_tzram_setup(TEGRA_TZRAM_BASE, TEGRA_TZRAM_SIZE);
|
tegra_memctrl_tzram_setup(TEGRA_TZRAM_BASE, TEGRA_TZRAM_SIZE);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Late setup handler to allow platforms to performs additional
|
||||||
|
* functionality.
|
||||||
|
* This handler gets called with MMU enabled.
|
||||||
|
*/
|
||||||
|
plat_late_platform_setup();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add timestamp for platform setup exit.
|
* Add timestamp for platform setup exit.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -75,6 +75,8 @@ uint32_t plat_get_console_from_id(int32_t id);
|
||||||
void plat_gic_setup(void);
|
void plat_gic_setup(void);
|
||||||
struct tegra_bl31_params *plat_get_bl31_params(void);
|
struct tegra_bl31_params *plat_get_bl31_params(void);
|
||||||
plat_params_from_bl2_t *plat_get_bl31_plat_params(void);
|
plat_params_from_bl2_t *plat_get_bl31_plat_params(void);
|
||||||
|
void plat_early_platform_setup(void);
|
||||||
|
void plat_late_platform_setup(void);
|
||||||
|
|
||||||
/* Declarations for plat_secondary.c */
|
/* Declarations for plat_secondary.c */
|
||||||
void plat_secondary_setup(void);
|
void plat_secondary_setup(void);
|
||||||
|
@ -126,7 +128,6 @@ int tegra_prepare_cpu_on_finish(unsigned long mpidr);
|
||||||
/* Declarations for tegra_bl31_setup.c */
|
/* Declarations for tegra_bl31_setup.c */
|
||||||
plat_params_from_bl2_t *bl31_get_plat_params(void);
|
plat_params_from_bl2_t *bl31_get_plat_params(void);
|
||||||
int32_t bl31_check_ns_address(uint64_t base, uint64_t size_in_bytes);
|
int32_t bl31_check_ns_address(uint64_t base, uint64_t size_in_bytes);
|
||||||
void plat_early_platform_setup(void);
|
|
||||||
|
|
||||||
/* Declarations for tegra_delay_timer.c */
|
/* Declarations for tegra_delay_timer.c */
|
||||||
void tegra_delay_timer_init(void);
|
void tegra_delay_timer_init(void);
|
||||||
|
|
Loading…
Reference in New Issue