Commit graph

4 commits

Author SHA1 Message Date
Yann Gautier
16a659d73a fix(stm32mp2): enable timer earlier in BL31
The timer is required when setting console. In BL2 the timer init is
done in clock driver init. This is not the case in BL31. So initialize
the generic_delay_timer_init() just after stm32mp2_clk_init() call.
This is required after the recent changes in timer framework [1].

[1]: a6485b2b3b refactor(delay-timer): add timer callback functions

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I4e84a45fc526ed132e97b238596aa69ddfc2b058
2024-11-14 11:01:04 +01:00
Maxime Méré
77847f037d feat(stm32mp2): initialize gic and delay timer in bl31_plat_arch_setup
For minimal BL31 setup, GIC and tick must be initialized.

Change-Id: I8d62253e93b77cd8ce8091ccc9ea88208bdd6053
Signed-off-by: Maxime Méré <maxime.mere@foss.st.com>
2024-10-21 16:06:01 +02:00
Maxime Méré
27dd11dbf5 feat(stm32mp2): add BL31 device tree support
BL31 will need to access a device tree for several configurations (UART,
GIC, OTP mapping...).
Create a BL31 device tree (SOC_FW_CONFIG). It is loaded in DDR, in a
spare area.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Signed-off-by: Maxime Méré <maxime.mere@foss.st.com>
Change-Id: I320a05859e1aa3dd8db9a274e7201075a8c250c2
2024-10-21 16:03:07 +02:00
Yann Gautier
03020b6688 feat(stm32mp2): add minimal support for BL31
Add the required files to compile BL31 on STM32MP2.
Update BL2 configuration to load BL31. The platform boots until BL31,
but stops here as no other binaries are loaded as DDR is not
initialized.
At runtime, BL31 will use only the first half of the SYSRAM, the upper
half will be used for non-secure DMA LLIs. To be sure nothing from this
area is still in the cache, invalidate the upper SYSRAM before enabling
BL31 cache. BL31 should then map only first half of the SYSRAM. But it
must temporarily map the upper half read-only, as this is where we will
retrieve BL2 parameters, used to fill registers for next boot stages.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Maxime Méré <maxime.mere@foss.st.com>
Change-Id: Ie91527a7a26625624b4b3c65fb6a0ca9dd355dbd
2024-09-13 17:37:56 +02:00