| #
fbe66cf8 |
| 16-Oct-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: fix header file guard names
Fixes header file guards macro name prefix (mostly missing occurrences) that should reflect the file base directory sub-path where applicable.
Reviewed-by: Jens Wi
core: fix header file guard names
Fixes header file guards macro name prefix (mostly missing occurrences) that should reflect the file base directory sub-path where applicable.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
893a762d |
| 23-Jun-2023 |
Patrick Delaunay <patrick.delaunay@foss.st.com> |
drivers: stm32_bsec: implement the get otp by phandle
Add a new interface stm32_bsec_find_otp_by_phandle() to retrieve localization of an OTP from a given node phandle.
When the node phandle is abs
drivers: stm32_bsec: implement the get otp by phandle
Add a new interface stm32_bsec_find_otp_by_phandle() to retrieve localization of an OTP from a given node phandle.
When the node phandle is absent in the NVMEM node, layout_cell->phandle = 0 and reference to this OTP with this API function is not possible.
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
show more ...
|
| #
9f007225 |
| 12-Dec-2022 |
Patrick Delaunay <patrick.delaunay@foss.st.com> |
drivers: stm32_bsec: add support for bits property in the DT
Adds the possibility to specify the number of managed bit in the NVMEM cell device tree description, using the optional bits property and
drivers: stm32_bsec: add support for bits property in the DT
Adds the possibility to specify the number of managed bit in the NVMEM cell device tree description, using the optional bits property and removes restriction on aligned NVMEM cell on 32-bit word by supporting bit offset in stm32_bsec_find_otp_in_nvmem_layout().
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
show more ...
|
| #
38df614f |
| 11-Jul-2022 |
Lionel Debieve <lionel.debieve@foss.st.com> |
drivers: stm32_bsec: keep stm32_bsec_permanent_lock_otp() under flag
Keep the function to access the OTP lock under the CFG_STM32_BSEC_WRITE flag to align with the write function.
Reviewed-by: Etie
drivers: stm32_bsec: keep stm32_bsec_permanent_lock_otp() under flag
Keep the function to access the OTP lock under the CFG_STM32_BSEC_WRITE flag to align with the write function.
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
show more ...
|
| #
0042538e |
| 05-Jan-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
plat-stm32mp1: fix visibility of stm32_bsec_shadow_register()
Makes stm32_bsec_shadow_register() function a visible driver API function as it is needed when CFG_STM32_BSEC_SIP is enabled. Fixed comm
plat-stm32mp1: fix visibility of stm32_bsec_shadow_register()
Makes stm32_bsec_shadow_register() function a visible driver API function as it is needed when CFG_STM32_BSEC_SIP is enabled. Fixed commit made it a local function which was wrong.
Fixes: a638030bce84 ("drivers: stm32_bsec: remove unused functions") Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
4b4b84a8 |
| 12-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: remove protection on debug configuration
Keeps stm32_bsec_write_debug_conf() out of CFG_STM32_BSEC_WRITE purpose. This switch must protect OTP memory writes, not accesses to BSE
drivers: stm32_bsec: remove protection on debug configuration
Keeps stm32_bsec_write_debug_conf() out of CFG_STM32_BSEC_WRITE purpose. This switch must protect OTP memory writes, not accesses to BSEC configuration registers.
CFG_STM32_BSEC_WRITE is now default enabled and not set to CFG_TEE_CORE_DEBUG value.
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
a638030b |
| 07-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: remove unused functions
Removes unused functions stm32_bsec_otp_lock() and stm32_bsec_shadow_register().
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-o
drivers: stm32_bsec: remove unused functions
Removes unused functions stm32_bsec_otp_lock() and stm32_bsec_shadow_register().
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
7dfc80ab |
| 12-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: add new generic interfaces
Exports generic functions to retrieve the BSEC state and check if a fuse can be read depending on the BSEC current state. Adds some robustness in the
drivers: stm32_bsec: add new generic interfaces
Exports generic functions to retrieve the BSEC state and check if a fuse can be read depending on the BSEC current state. Adds some robustness in the driver to enforce security when trying to access a fuse.
It is a preliminary step for BSEC PTA introduction.
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
93114f2e |
| 07-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: support NVMEM cell description in device-tree
Support the nvmem cells description in device tree and add the platform helper function stm32_bsec_find_otp_in_nvmem_layout() that
drivers: stm32_bsec: support NVMEM cell description in device-tree
Support the nvmem cells description in device tree and add the platform helper function stm32_bsec_find_otp_in_nvmem_layout() that allows drivers to find an OTP location (BSEC word number and bit size) from the OTP string identifier, name of the cell in device tree.
The bsec driver directly reads the nvmem cells sub node of bsec device.
This allow to remove the hardcoded OTP index in platform and is aligned with linux kernel binding.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
1ff52b85 |
| 12-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: move debug defines to include
Moves definition of DEBUG status macros from driver source file to its header file to allow other drivers to control the debug level. Introduces BS
drivers: stm32_bsec: move debug defines to include
Moves definition of DEBUG status macros from driver source file to its header file to allow other drivers to control the debug level. Introduces BSEC_DEBUG_ALL that is the default debug configuration. Removes configuration masking as it has no use.
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
8396f62e |
| 15-Dec-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
drivers: stm32_bsec: rework and move BITS_PER_WORD
Transforms BITS_PER_WORD to BSEC_BITS_PER_WORD to specify it is BSEC-related and move it to BSEC driver header file.
Adds BSEC_BYTES_PER_WORD for
drivers: stm32_bsec: rework and move BITS_PER_WORD
Transforms BITS_PER_WORD to BSEC_BITS_PER_WORD to specify it is BSEC-related and move it to BSEC driver header file.
Adds BSEC_BYTES_PER_WORD for later use.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
0c30f9ea |
| 17-Jul-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
stm32_bsec: always embed shadow OTPs write function
Change the scope of configuration switch CFG_STM32_BSEC_WRITE to not cover shadow OTP write support. CFG_STM32_BSEC_WRITE is used to embed or not
stm32_bsec: always embed shadow OTPs write function
Change the scope of configuration switch CFG_STM32_BSEC_WRITE to not cover shadow OTP write support. CFG_STM32_BSEC_WRITE is used to embed or not OTP programming support but writing shadow OTPs is a normal executing an OTP read operation hence this change embeds stm32_bsec_write_otp() driver API function even when CFG_STM32_BSEC_WRITE is disabled.
Signed-off-by: Lionel Debieve <lionel.debieve@st.com> [etienne: rephrase commit log] Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
301b3eb5 |
| 21-Feb-2020 |
Etienne Carriere <etienne.carriere@st.com> |
stm32_bsec: introduce configuration switch for write support
Introduce configuration switch CFG_STM32_BSEC_WRITE to not embed write operation support in BSEC.
Signed-off-by: Etienne Carriere <etien
stm32_bsec: introduce configuration switch for write support
Introduce configuration switch CFG_STM32_BSEC_WRITE to not embed write operation support in BSEC.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
ef9888dc |
| 20-Apr-2020 |
Etienne Carriere <etienne.carriere@st.com> |
stm32_bsec: simplify lock support functions
Change stm32_bsec_otp_lock() to only lock fuses as hardware safely does not allow unlocking a locked BSEC word.
Functions to read a lock return a TEE_Res
stm32_bsec: simplify lock support functions
Change stm32_bsec_otp_lock() to only lock fuses as hardware safely does not allow unlocking a locked BSEC word.
Functions to read a lock return a TEE_Result status aside from the effective lock value read.
Rename stm32_bsec_wr_lock() into stm32_bsec_read_permanent_lock() as it is more explicit.
Change IMSG() into DMSG() as traces refer to debug info rather than informative info.
Use flag character '#' to prefix printed hexadecimal values with "0x".
Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
d64485e4 |
| 25-Feb-2019 |
Etienne Carriere <etienne.carriere@st.com> |
stm32_bsec: OTP driver for stm32mp platforms
BSEC is a one time programmable (OTP) memory interface for stm32mp SoCs. OTPs are grouped into 32bit words identified by a incremental ID starting from 0
stm32_bsec: OTP driver for stm32mp platforms
BSEC is a one time programmable (OTP) memory interface for stm32mp SoCs. OTPs are grouped into 32bit words identified by a incremental ID starting from 0. Shadowed OTPs are loaded in a volatile memory yet used as OTP values by the software.
The platform shall implement stm32mp_get_bsec_static_cfg() to provide BSEC driver some information as the BSEC memory size and its lower/upper threshold ID that split non-secure from secure OTPs.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Signed-off-by: Christophe Montaud <christophe.montaud@st.com> Signed-off-by: Lionel Debieve <lionel.debieve@st.com> Signed-off-by: Mathieu Belou <mathieu.belou@st.com> Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com> Signed-off-by: Yann Gautier <yann.gautier@st.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|