diff --git a/plat/st/common/include/stm32mp_common.h b/plat/st/common/include/stm32mp_common.h index 42d3487024dd6a42a0b5aa238415707a84e90e09..edced71aa247b183a17414c930d82c0a17df2778 100644 --- a/plat/st/common/include/stm32mp_common.h +++ b/plat/st/common/include/stm32mp_common.h @@ -17,6 +17,7 @@ /* Functions to save and get boot context address given by ROM code */ void stm32mp_save_boot_ctx_address(uintptr_t address); uintptr_t stm32mp_get_boot_ctx_address(void); +uint16_t stm32mp_get_boot_itf_selected(void); bool stm32mp_is_single_core(void); bool stm32mp_is_closed_device(void); diff --git a/plat/st/common/stm32mp_common.c b/plat/st/common/stm32mp_common.c index aa87c5d6b697f33be8c1eba9e47d3b033c26ae33..5e5958baa28af199c4f03070f47dc394f8add2d3 100644 --- a/plat/st/common/stm32mp_common.c +++ b/plat/st/common/stm32mp_common.c @@ -28,10 +28,14 @@ unsigned int plat_get_syscnt_freq2(void) } static uintptr_t boot_ctx_address; +static uint16_t boot_itf_selected; void stm32mp_save_boot_ctx_address(uintptr_t address) { + boot_api_context_t *boot_context = (boot_api_context_t *)address; + boot_ctx_address = address; + boot_itf_selected = boot_context->boot_interface_selected; } uintptr_t stm32mp_get_boot_ctx_address(void) @@ -39,6 +43,11 @@ uintptr_t stm32mp_get_boot_ctx_address(void) return boot_ctx_address; } +uint16_t stm32mp_get_boot_itf_selected(void) +{ + return boot_itf_selected; +} + uintptr_t stm32mp_ddrctrl_base(void) { return DDRCTRL_BASE;