mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-27 15:24:54 +00:00
feat(stm32mp1): add RNG initialization in BL2 for STM32MP13
Initialize RNG driver at platform level for STM32MP13. Change-Id: I64832de43e5f6559a12e26680142db54c88f0b9e Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@foss.st.com>
This commit is contained in:
parent
6b5fc19227
commit
2742374414
2 changed files with 13 additions and 1 deletions
|
@ -17,6 +17,7 @@
|
||||||
#include <drivers/st/bsec.h>
|
#include <drivers/st/bsec.h>
|
||||||
#include <drivers/st/regulator_fixed.h>
|
#include <drivers/st/regulator_fixed.h>
|
||||||
#include <drivers/st/stm32_iwdg.h>
|
#include <drivers/st/stm32_iwdg.h>
|
||||||
|
#include <drivers/st/stm32_rng.h>
|
||||||
#include <drivers/st/stm32_uart.h>
|
#include <drivers/st/stm32_uart.h>
|
||||||
#include <drivers/st/stm32mp1_clk.h>
|
#include <drivers/st/stm32mp1_clk.h>
|
||||||
#include <drivers/st/stm32mp1_pwr.h>
|
#include <drivers/st/stm32mp1_pwr.h>
|
||||||
|
@ -375,6 +376,12 @@ skip_console_init:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if STM32MP13
|
||||||
|
if (stm32_rng_init() != 0) {
|
||||||
|
panic();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if STM32MP15
|
#if STM32MP15
|
||||||
if (stm32mp_is_auth_supported()) {
|
if (stm32mp_is_auth_supported()) {
|
||||||
stm32mp1_auth_ops.check_key =
|
stm32mp1_auth_ops.check_key =
|
||||||
|
|
|
@ -117,8 +117,10 @@ endif
|
||||||
|
|
||||||
ifeq ($(STM32MP13),1)
|
ifeq ($(STM32MP13),1)
|
||||||
STM32_HASH_VER := 4
|
STM32_HASH_VER := 4
|
||||||
|
STM32_RNG_VER := 4
|
||||||
else # Assuming STM32MP15
|
else # Assuming STM32MP15
|
||||||
STM32_HASH_VER := 2
|
STM32_HASH_VER := 2
|
||||||
|
STM32_RNG_VER := 2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Boot devices
|
# Boot devices
|
||||||
|
@ -236,6 +238,7 @@ $(eval $(call assert_numerics,\
|
||||||
$(sort \
|
$(sort \
|
||||||
PLAT_PARTITION_MAX_ENTRIES \
|
PLAT_PARTITION_MAX_ENTRIES \
|
||||||
STM32_HASH_VER \
|
STM32_HASH_VER \
|
||||||
|
STM32_RNG_VER \
|
||||||
STM32_TF_A_COPIES \
|
STM32_TF_A_COPIES \
|
||||||
STM32_TF_VERSION \
|
STM32_TF_VERSION \
|
||||||
STM32MP_UART_BAUDRATE \
|
STM32MP_UART_BAUDRATE \
|
||||||
|
@ -247,6 +250,7 @@ $(eval $(call add_defines,\
|
||||||
PLAT_PARTITION_MAX_ENTRIES \
|
PLAT_PARTITION_MAX_ENTRIES \
|
||||||
PLAT_XLAT_TABLES_DYNAMIC \
|
PLAT_XLAT_TABLES_DYNAMIC \
|
||||||
STM32_HASH_VER \
|
STM32_HASH_VER \
|
||||||
|
STM32_RNG_VER \
|
||||||
STM32_TF_A_COPIES \
|
STM32_TF_A_COPIES \
|
||||||
STM32_TF_VERSION \
|
STM32_TF_VERSION \
|
||||||
STM32MP_CRYPTO_ROM_LIB \
|
STM32MP_CRYPTO_ROM_LIB \
|
||||||
|
@ -317,7 +321,8 @@ PLAT_BL_COMMON_SOURCES += drivers/arm/tzc/tzc400.c \
|
||||||
|
|
||||||
ifeq ($(STM32MP13),1)
|
ifeq ($(STM32MP13),1)
|
||||||
PLAT_BL_COMMON_SOURCES += drivers/st/clk/clk-stm32-core.c \
|
PLAT_BL_COMMON_SOURCES += drivers/st/clk/clk-stm32-core.c \
|
||||||
drivers/st/clk/clk-stm32mp13.c
|
drivers/st/clk/clk-stm32mp13.c \
|
||||||
|
drivers/st/crypto/stm32_rng.c
|
||||||
else
|
else
|
||||||
PLAT_BL_COMMON_SOURCES += drivers/st/clk/stm32mp1_clk.c
|
PLAT_BL_COMMON_SOURCES += drivers/st/clk/stm32mp1_clk.c
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue