| 736cb9e1 | 22-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: allow drivers to fail initialization
Change the probing logic to not panic core if a drivers fails to initialize. Driver that fail to probe are moved in a specific list that may be
core: dt_driver: allow drivers to fail initialization
Change the probing logic to not panic core if a drivers fails to initialize. Driver that fail to probe are moved in a specific list that may be later print for debug purpose.
Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 115944b5 | 22-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: factorize resource releasing
Moves dt_driver_release_provider() into release_probe_lists() to get all DT driver probing resources released upon core initialization completion.
Also
core: dt_driver: factorize resource releasing
Moves dt_driver_release_provider() into release_probe_lists() to get all DT driver probing resources released upon core initialization completion.
Also removes the debug verbosity that is not useful at that place.
Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 7ca695bf | 16-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
drivers: clk: add verbosity on provider probe error case
Prints the names of the parent node and node for which core failed to probe a clock instance. Also prints the returned error code. These adde
drivers: clk: add verbosity on provider probe error case
Prints the names of the parent node and node for which core failed to probe a clock instance. Also prints the returned error code. These added debug information help understanding where and FDT parsing failed.
Acked-by: Clément Léger <clement.leger@bootlin.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| bb04f4b9 | 02-Dec-2021 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
core: drivers: caam: disable jobring in DT only in case of external DTB
On LX2160 board, Embedded DTB is enabled. While booting with CAAM enabled, a crash comes in OP-TEE because it tries to disable
core: drivers: caam: disable jobring in DT only in case of external DTB
On LX2160 board, Embedded DTB is enabled. While booting with CAAM enabled, a crash comes in OP-TEE because it tries to disable the Job Ring in Embedded DTB, which is read only. So disable Job ring only when using External DTB.
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 33e1c2b8 | 02-Dec-2021 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
core: kernel: introduce function is_embedded_dt()
This function will return true if passed DTB is same as Embedded DTB, otherwise false
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-
core: kernel: introduce function is_embedded_dt()
This function will return true if passed DTB is same as Embedded DTB, otherwise false
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| c4c84e2c | 02-Dec-2021 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
core: dt_driver: skip drivers not providing a probe operator
If drivers is not providing a probe operator, that can result in crash, so skip drivers not providing a probe operator.
Signed-off-by: S
core: dt_driver: skip drivers not providing a probe operator
If drivers is not providing a probe operator, that can result in crash, so skip drivers not providing a probe operator.
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Fixes: https://github.com/OP-TEE/optee_os/issues/5017
show more ...
|
| 8dca59b4 | 19-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: use driver type when finding a driver provider
Adds driver type argument to functions dt_driver_get_provider_by_node(), and dt_driver_get_provider_by_phandle() to differentiate driv
core: dt_driver: use driver type when finding a driver provider
Adds driver type argument to functions dt_driver_get_provider_by_node(), and dt_driver_get_provider_by_phandle() to differentiate driver provider references when a single DT node relates to several driver providers that are of different type by DT binding definition. For example, a DT node may describe a device that acts both as a clock provider and a reset controller, for which two driver references are needed in the driver provider list.
Updates dt_driver_device_from_node_idx_prop() accordingly.
Fixes: f498c4042931 ("core: dt_driver: factorize clk_get_provider_by_*()") Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 5dac4bd1 | 30-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
drivers: crypto: stm32_cryp: register secure peripheral
Adds registering of CRYP1 device as a secure peripheral when it is registered as a crypto driver.
Fixes: 95134dac4b22 ("plat-stm32mp1: enable
drivers: crypto: stm32_cryp: register secure peripheral
Adds registering of CRYP1 device as a secure peripheral when it is registered as a crypto driver.
Fixes: 95134dac4b22 ("plat-stm32mp1: enable CRYPTO HW if available") Reviewed-by: Nicolas Toromanoff <nicolas.toromanoff@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 5c3bcc38 | 30-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
dts: stm32mp1: disable CRYP1 device
Don't enable CRYP1 support in OP-TEE core from ST boards supporting stm32mp1 platform to comply with the upstream boards DTS files since v5.11 [1] in Linux kernel
dts: stm32mp1: disable CRYP1 device
Don't enable CRYP1 support in OP-TEE core from ST boards supporting stm32mp1 platform to comply with the upstream boards DTS files since v5.11 [1] in Linux kernel that enables CRYP1 in non-secure world.
Link: [1] https://github.com/torvalds/linux/commit/b6aa35c7393680ee0a1286ca3b3237fd106ef896 Fixes: 5e64ae6796b7 ("crypto: stm32: use CRYP IP for CIPHER algorithms") Reviewed-by: Nicolas Toromanoff <nicolas.toromanoff@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| a3f00f7d | 21-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: return TEE_ERROR_DEFER_DRIVER_INIT if no provider
Changes dt_driver_device_from_node_idx_prop() to report caller driver probe deferral when the expected provider is not yet found in
core: dt_driver: return TEE_ERROR_DEFER_DRIVER_INIT if no provider
Changes dt_driver_device_from_node_idx_prop() to report caller driver probe deferral when the expected provider is not yet found in the provider list as the function description expects.
Fixes: d8b14b46af9d ("core: dt_driver: get return code when querying a device") Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| d803b885 | 01-Dec-2021 |
Dominique Martinet <dominique.martinet@atmark-techno.com> |
libtomcrypt/sha256_accel: fix stringop-overflow error
Attempting to build optee-os with gcc11 fails with the following error ---- In function ‘sha256_compress_nblocks’, inlined from ‘sha256_comp
libtomcrypt/sha256_accel: fix stringop-overflow error
Attempting to build optee-os with gcc11 fails with the following error ---- In function ‘sha256_compress_nblocks’, inlined from ‘sha256_compress’ at core/lib/libtomcrypt/sha256_accel.c:81:11, inlined from ‘sha256_done’ at core/lib/libtomcrypt/sha256_accel.c:158:5: core/lib/libtomcrypt/sha256_accel.c:75:5: error: ‘crypto_accel_sha256_compress’ accessing 32 bytes in a region of size 20 [-Werror=stringop-overflow=] 75 | crypto_accel_sha256_compress(state, buf, blocks); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ core/lib/libtomcrypt/sha256_accel.c: In function ‘sha256_done’: core/lib/libtomcrypt/sha256_accel.c:75:5: note: referencing argument 1 of type ‘uint32_t *’ {aka ‘unsigned int *’} In file included from core/lib/libtomcrypt/sha256_accel.c:41: core/include/crypto/crypto_accel.h:45:6: note: in a call to function ‘crypto_accel_sha256_compress’ 45 | void crypto_accel_sha256_compress(uint32_t state[8], const void *src, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ----
Indeed, the 'state' argument here is taken from sha1.state which is a uint32_t state[5], so 20 bytes long instead of the uint32_t state[8] crypto_accel_sha256_compress expects.
OTOH we're in a sha256 function, and sha256.state conveniently is of the correct size, so use sha256.state as appropriate instead.
Note that hash_state is a union and sha{1,256}.state are at the same offset, so this is actually a no-op change.
Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| c020046d | 23-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt: fix inline description of _fdt_get_status()
Corrects inline comment describing _fdt_get_status() helper function.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etien
core: dt: fix inline description of _fdt_get_status()
Corrects inline comment describing _fdt_get_status() helper function.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 289611b8 | 24-Nov-2021 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
crypto: drivers: se050: object identifier persistence property
The persistence of the object identifiers can be obtained by interrogating the device. Since objects can now be created by external act
crypto: drivers: se050: object identifier persistence property
The persistence of the object identifiers can be obtained by interrogating the device. Since objects can now be created by external actors using the APDU PTA, we will drop the current implementation which flags the object transient property using a bit on the object identifier itself.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| 32ddbffb | 13-Nov-2021 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
crypto: se050: APDU driver
This driver allows trusted applications to send raw APDU frames to the SE050 device. The Plug-and-Trust subsystem will route the frames back to OP-TEE for SCP03 encryption
crypto: se050: APDU driver
This driver allows trusted applications to send raw APDU frames to the SE050 device. The Plug-and-Trust subsystem will route the frames back to OP-TEE for SCP03 encryption and I2C transmission to the bus.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| b0e1c5e4 | 13-Nov-2021 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
core: pta: APDU pseudo trusted application
Allow trusted applications and REE clients to send APDU frames to a secure element.
Even though secure elements are usually accessible from serial buses,
core: pta: APDU pseudo trusted application
Allow trusted applications and REE clients to send APDU frames to a secure element.
Even though secure elements are usually accessible from serial buses, when they have been initialized in OP-TEE is possible that the SCP03 secret keys are only available in the Trusted World and therefore APDU requests must be handled in OP-TEE.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| ff0c5d42 | 13-Nov-2021 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
core: crypto: Secure Element cryptographic interface
Extract cryptographic operations specific to Secure Elements from the more generic cryptographic interface.
Also, the Secure Channel Protocol03
core: crypto: Secure Element cryptographic interface
Extract cryptographic operations specific to Secure Elements from the more generic cryptographic interface.
Also, the Secure Channel Protocol03 is a global protocol supported by most SEs and not NXP SE05X specific. Use this commit to reflect this fact.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 8c8316db | 24-Nov-2021 |
Etienne Carriere <etienne.carriere@st.com> |
drivers: stm32_bsec: move to early_init stage
BSEC driver shall initialize a early_init initcall level to prepare OTP access needed to read the HUK from OTPs.
Acked-by: Jerome Forissier <jerome@for
drivers: stm32_bsec: move to early_init stage
BSEC driver shall initialize a early_init initcall level to prepare OTP access needed to read the HUK from OTPs.
Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
show more ...
|
| 7b05d514 | 24-Nov-2021 |
Etienne Carriere <etienne.carriere@st.com> |
drivers: stm32_bsec: fix error on SAFMEM power-up
Fix unbalanced access locking when SAFMEM power up sequence fails.
Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens
drivers: stm32_bsec: fix error on SAFMEM power-up
Fix unbalanced access locking when SAFMEM power up sequence fails.
Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
show more ...
|
| b76fcab5 | 24-Nov-2021 |
Etienne Carriere <etienne.carriere@st.com> |
drivers: stm32_bsec: increase timeout
Increase stm32_bsec timeout to handle worst case at 10ms.
Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org
drivers: stm32_bsec: increase timeout
Increase stm32_bsec timeout to handle worst case at 10ms.
Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
show more ...
|
| 8afb7c41 | 24-Nov-2021 |
Etienne Carriere <etienne.carriere@st.com> |
drivers: stm32_bsec: return busy/bad parms where applicable
Change stm32_bsec driver to return TEE_ERROR_BUSY when the BSEC interface reports a busy state and TEE_ERROR_BAD_PARAMETERS word programmi
drivers: stm32_bsec: return busy/bad parms where applicable
Change stm32_bsec driver to return TEE_ERROR_BUSY when the BSEC interface reports a busy state and TEE_ERROR_BAD_PARAMETERS word programming/locking has failed which means provided arguments were invalid.
Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
show more ...
|
| 33b38f8c | 21-Nov-2021 |
Ruslan Piasetskyi <ruslan.piasetskyi@gmail.com> |
core: introduce CFG_CORE_HUK_SUBKEY_COMPAT_USE_OTP_DIE_ID
Adds CFG_CORE_HUK_SUBKEY_COMPAT_USE_OTP_DIE_ID which if set to 'y' makes huk_subkey_derive() generate SSK using tee_otp_get_die_id().
Old s
core: introduce CFG_CORE_HUK_SUBKEY_COMPAT_USE_OTP_DIE_ID
Adds CFG_CORE_HUK_SUBKEY_COMPAT_USE_OTP_DIE_ID which if set to 'y' makes huk_subkey_derive() generate SSK using tee_otp_get_die_id().
Old scheme for SSK generation: SSK = HMAC_SHA256(HUK, Chip_ID || "ONLY_FOR_tee_fs_ssk") This config changes Chip_ID from the default BEEF-like value to the result of tee_otp_get_die_id().
Note that this option works only if CFG_CORE_HUK_SUBKEY_COMPAT=y.
Acked-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Ruslan Piasetskyi <ruslan.piasetskyi@gmail.com>
show more ...
|
| afb1cc80 | 24-Nov-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: Fix warning in gprof_send_rpc()
Fixes a -Wdeclaration-after-statement warning in gprof_send_rpc(): core/pta/gprof.c: In function ‘gprof_send_rpc’: core/pta/gprof.c:35:2: error: ISO C90 forbids
core: Fix warning in gprof_send_rpc()
Fixes a -Wdeclaration-after-statement warning in gprof_send_rpc(): core/pta/gprof.c: In function ‘gprof_send_rpc’: core/pta/gprof.c:35:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] struct thread_param params[3] = { ^~~~~~
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 6e2de0d7 | 24-Nov-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: Fix warnings in core/kernel/lockdep.c
Fixes -Wdeclaration-after-statement warnings in core/kernel/lockdep.c: core/kernel/lockdep.c: In function 'lockdep_graph_get_shortest_cycle': core/kernel/
core: Fix warnings in core/kernel/lockdep.c
Fixes -Wdeclaration-after-statement warnings in core/kernel/lockdep.c: core/kernel/lockdep.c: In function 'lockdep_graph_get_shortest_cycle': core/kernel/lockdep.c:151:3: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] struct lockdep_node *n = qe->node; ^~~~~~ core/kernel/lockdep.c:155:3: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] struct lockdep_edge *e = NULL; ^~~~~~ core/kernel/lockdep.c:183:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] size_t nlen = qe->pathlen + 1; ^~~~~~ core/kernel/lockdep.c: In function 'lockdep_visit': core/kernel/lockdep.c:221:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] struct lockdep_edge *e; ^~~~~~ core/kernel/lockdep.c: In function '__lockdep_lock_acquire': core/kernel/lockdep.c:343:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] struct lockdep_lock *lock = NULL; ^~~~~~ core/kernel/lockdep.c:356:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] TEE_Result res = lockdep_graph_sort(graph); ^~~~~~~~~~ core/kernel/lockdep.c: In function '__lockdep_lock_tryacquire': core/kernel/lockdep.c:390:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] struct lockdep_lock *lock = NULL; ^~~~~~
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 7c94d5d6 | 24-Nov-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: Fix warnings in core/tee/socket.c
Fixes -Wdeclaration-after-statement warnings in core/tee/socket.c: core/tee/socket.c: In function ‘socket_open’: core/tee/socket.c:44:2: error: ISO C90 forbid
core: Fix warnings in core/tee/socket.c
Fixes -Wdeclaration-after-statement warnings in core/tee/socket.c: core/tee/socket.c: In function ‘socket_open’: core/tee/socket.c:44:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] struct thread_param tpm[4] = { ^~~~~~ core/tee/socket.c: In function ‘socket_close’: core/tee/socket.c:76:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] struct thread_param tpm = THREAD_PARAM_VALUE(IN, OPTEE_RPC_SOCKET_CLOSE, ^~~~~~ core/tee/socket.c: In function ‘socket_send’: core/tee/socket.c:108:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] struct thread_param tpm[3] = { ^~~~~~ core/tee/socket.c: In function ‘socket_recv’: core/tee/socket.c:147:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] struct thread_param tpm[3] = { ^~~~~~ core/tee/socket.c: In function ‘socket_ioctl’: core/tee/socket.c:190:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] struct thread_param tpm[3] = { ^~~~~~
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 5ab3fbc5 | 24-Nov-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: Fix warnings in core/tee/tadb.c
Fixes -Wdeclaration-after-statement warnings in core/tee/tadb.c: core/tee/tadb.c:111:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-
core: Fix warnings in core/tee/tadb.c
Fixes -Wdeclaration-after-statement warnings in core/tee/tadb.c: core/tee/tadb.c:111:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] struct thread_param params[] = { ^~~~~~ core/tee/tadb.c: In function ‘ta_operation_remove’: core/tee/tadb.c:137:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] struct thread_param params[] = { ^~~~~~ core/tee/tadb.c: In function ‘ta_load’: core/tee/tadb.c:712:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] struct thread_param params[] = { ^~~~~~
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|