common: spl: atf: add bl32/bl33 entry point to struct spl_image_info
This allows other booting device to initial other firmware entry point, but not only FIT. Change-Id: I73b08d594079ce0842b68f1c9d222f58e171b555 Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
parent
64d1b263e7
commit
1620aad4c9
|
|
@ -455,6 +455,16 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
memset(&spl_image, '\0', sizeof(spl_image));
|
memset(&spl_image, '\0', sizeof(spl_image));
|
||||||
|
|
||||||
|
#if CONFIG_IS_ENABLED(ATF)
|
||||||
|
/*
|
||||||
|
* Bl32 ep is optional, initial it as an invalid value.
|
||||||
|
* BL33 ep is mandatory, but initial it as a default value is better.
|
||||||
|
*/
|
||||||
|
spl_image.entry_point_bl32 = -1;
|
||||||
|
spl_image.entry_point_bl33 = CONFIG_SYS_TEXT_BASE;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SYS_SPL_ARGS_ADDR
|
#ifdef CONFIG_SYS_SPL_ARGS_ADDR
|
||||||
spl_image.arg = (void *)CONFIG_SYS_SPL_ARGS_ADDR;
|
spl_image.arg = (void *)CONFIG_SYS_SPL_ARGS_ADDR;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -152,15 +152,22 @@ uintptr_t spl_fit_images_get_entry(void *blob, int node)
|
||||||
|
|
||||||
void spl_invoke_atf(struct spl_image_info *spl_image)
|
void spl_invoke_atf(struct spl_image_info *spl_image)
|
||||||
{
|
{
|
||||||
uintptr_t bl32_entry = -1;
|
uintptr_t bl32_entry, bl33_entry;
|
||||||
uintptr_t bl33_entry = CONFIG_SYS_TEXT_BASE;
|
|
||||||
void *blob = spl_image->fdt_addr;
|
void *blob = spl_image->fdt_addr;
|
||||||
uintptr_t platform_param = (uintptr_t)blob;
|
uintptr_t platform_param = (uintptr_t)blob;
|
||||||
int node;
|
int node;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Find the OP-TEE binary (in /fit-images) load address or
|
||||||
|
* entry point (if different) and pass it as the BL3-2 entry
|
||||||
|
* point, this is optional.
|
||||||
|
* This will need to be extended to support Falcon mode.
|
||||||
|
*/
|
||||||
node = spl_fit_images_find(blob, IH_OS_OP_TEE);
|
node = spl_fit_images_find(blob, IH_OS_OP_TEE);
|
||||||
if (node >= 0)
|
if (node >= 0)
|
||||||
bl32_entry = spl_fit_images_get_entry(blob, node);
|
bl32_entry = spl_fit_images_get_entry(blob, node);
|
||||||
|
else
|
||||||
|
bl32_entry = spl_image->entry_point_bl32; /* optional */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find the U-Boot binary (in /fit-images) load addreess or
|
* Find the U-Boot binary (in /fit-images) load addreess or
|
||||||
|
|
@ -168,10 +175,11 @@ void spl_invoke_atf(struct spl_image_info *spl_image)
|
||||||
* point.
|
* point.
|
||||||
* This will need to be extended to support Falcon mode.
|
* This will need to be extended to support Falcon mode.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
node = spl_fit_images_find(blob, IH_OS_U_BOOT);
|
node = spl_fit_images_find(blob, IH_OS_U_BOOT);
|
||||||
if (node >= 0)
|
if (node >= 0)
|
||||||
bl33_entry = spl_fit_images_get_entry(blob, node);
|
bl33_entry = spl_fit_images_get_entry(blob, node);
|
||||||
|
else
|
||||||
|
bl33_entry = spl_image->entry_point_bl33;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If ATF_NO_PLATFORM_PARAM is set, we override the platform
|
* If ATF_NO_PLATFORM_PARAM is set, we override the platform
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,11 @@ struct spl_image_info {
|
||||||
const char *name;
|
const char *name;
|
||||||
u8 os;
|
u8 os;
|
||||||
uintptr_t load_addr;
|
uintptr_t load_addr;
|
||||||
uintptr_t entry_point;
|
uintptr_t entry_point; /* Next stage entry point */
|
||||||
|
#if CONFIG_IS_ENABLED(ATF)
|
||||||
|
uintptr_t entry_point_bl32;
|
||||||
|
uintptr_t entry_point_bl33;
|
||||||
|
#endif
|
||||||
#if CONFIG_IS_ENABLED(LOAD_FIT)
|
#if CONFIG_IS_ENABLED(LOAD_FIT)
|
||||||
void *fdt_addr;
|
void *fdt_addr;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue