diff options
author | Patrick Delaunay <patrick.delaunay@foss.st.com> | 2023-01-06 13:20:15 +0100 |
---|---|---|
committer | Patrice Chotard <patrice.chotard@foss.st.com> | 2023-01-12 16:37:13 +0100 |
commit | 33a909a42a07b35c78782fc4c9dbb36f066641fd (patch) | |
tree | b61535ae15ac787b9ead08a50b5079526359515c /arch/arm/mach-stm32mp/cmd_stm32key.c | |
parent | 27bad4e7fcb143c80a0e9337bb7e0ee95799c9f6 (diff) |
stm32mp: Add OP-TEE support in bsec driver
When OP-TEE is used, the SMC for BSEC management are not available and
the STM32MP BSEC pseudo TA must be used (it is mandatory for STM32MP13
and it is a new feature for STM32MP15x).
The BSEC driver try to open a session to this PTA BSEC at probe
and use it for OTP read or write access to fuse or to shadow.
This patch also adapts the commands stm32key and stboard to handle
the BSEC_LOCK_PERM lock value instead of 1.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Diffstat (limited to 'arch/arm/mach-stm32mp/cmd_stm32key.c')
-rw-r--r-- | arch/arm/mach-stm32mp/cmd_stm32key.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm/mach-stm32mp/cmd_stm32key.c b/arch/arm/mach-stm32mp/cmd_stm32key.c index 278253e472..85be8e23bd 100644 --- a/arch/arm/mach-stm32mp/cmd_stm32key.c +++ b/arch/arm/mach-stm32mp/cmd_stm32key.c @@ -8,6 +8,7 @@ #include <console.h> #include <log.h> #include <misc.h> +#include <asm/arch/bsec.h> #include <dm/device.h> #include <dm/uclass.h> @@ -84,9 +85,6 @@ static u32 get_otp_close_mask(void) return STM32_OTP_STM32MP15x_CLOSE_MASK; } -#define BSEC_LOCK_ERROR (-1) -#define BSEC_LOCK_PERM BIT(0) - static int get_misc_dev(struct udevice **dev) { int ret; |