| 528a70a4 | 13-Nov-2025 |
Jerome Forissier <jerome.forissier@linaro.org> |
ci: scripts/notify_maintainers.py: fix undefined variable error
Fix error:
File "scripts/notify_maintainers.py", line 132, in main " ".join(f"@{h}" for h in new_handles))
ci: scripts/notify_maintainers.py: fix undefined variable error
Fix error:
File "scripts/notify_maintainers.py", line 132, in main " ".join(f"@{h}" for h in new_handles)) ^^^^^^^^^^^ UnboundLocalError: cannot access local variable 'new_handles' where it is not associated with a value
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 122114b2 | 11-Nov-2025 |
Alistair Higgins <Alistair_Higgins@trimble.com> |
plat-ti: Fix initialisation order
Since commit 358cdcd2b079 ("core: arm32: initialize secure monitor late") TI platforms have been broken due to only initialising the HUK in `init_sec_mon` after the
plat-ti: Fix initialisation order
Since commit 358cdcd2b079 ("core: arm32: initialize secure monitor late") TI platforms have been broken due to only initialising the HUK in `init_sec_mon` after the SSK has been derived/generated from it in the `tee_fs_init_key_manager` service init.
Move initialisation of HUK into an `early_init` registration to restore the correct order of operations.
Secure monitor initialisation cannot be moved into the `early_init()` as the secure monitor stack is not yet initialised.
Link: https://github.com/OP-TEE/optee_os/issues/7587
Signed-off-by: Alistair Higgins <Alistair_Higgins@trimble.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a25cf4cf | 10-Nov-2025 |
Alistair Higgins <Alistair_Higgins@trimble.com> |
core: make boot_arg_nsec_entry globally accessible
Required on TI platforms that need access to access the boot arguments in an `early_init()` call. Need the boot args to memory-map and initialise t
core: make boot_arg_nsec_entry globally accessible
Required on TI platforms that need access to access the boot arguments in an `early_init()` call. Need the boot args to memory-map and initialise the HUK before it is used in the `tee_fs_init_key_manager` service init.
Signed-off-by: Alistair Higgins <Alistair_Higgins@trimble.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2c33d6e6 | 12-Nov-2025 |
Jerome Forissier <jerome.forissier@linaro.org> |
plat-telechips: fix spelling mistake
Fix a spelling mistake in the tcmktool.py script.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@lina
plat-telechips: fix spelling mistake
Fix a spelling mistake in the tcmktool.py script.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 698b8cfd | 13-Nov-2025 |
Jerome Forissier <jerome.forissier@linaro.org> |
ci: add 'issues: write' permission for notify_maintainers.py
Add the write permission to issues to the CI workflow so that the maintainer notification script is allowed to post comments. This should
ci: add 'issues: write' permission for notify_maintainers.py
Add the write permission to issues to the CI workflow so that the maintainer notification script is allowed to post comments. This should fix a 403 error [1]. In principle, 'pull-requests: write' should not be needed.
Link: https://github.com/OP-TEE/optee_os/actions/runs/19324768252/job/55273243282?pr=7603 [1] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 15e14f8f | 09-Nov-2025 |
Aleksandr Iashchenko <aleksandr.iashchenko@linutronix.de> |
scripts/gen_ldelf_hex.py: account for true memsz in last load segment mapping
The pad_size array is used to compute code/data/load mapping sizes for ldelf by measuring the gaps after each PT_LOAD se
scripts/gen_ldelf_hex.py: account for true memsz in last load segment mapping
The pad_size array is used to compute code/data/load mapping sizes for ldelf by measuring the gaps after each PT_LOAD segment. The last entry was hardcoded to 0, effectively ignoring the final segment’s (p_memsz - p_filesz) - i.e. the BSS portion that exists in memory but not in the file.
As a result, the RW mapping for ldelf was undersized: the zero-filled area of the last PT_LOAD was not reserved, which could lead to writes past the mapped region.
Signed-off-by: Aleksandr Iashchenko <aleksandr.iashchenko@linutronix.de> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| bcfbef15 | 14-Oct-2025 |
Jerome Forissier <jerome.forissier@linaro.org> |
ci: mention reviewers/maintainers from MAINTAINERS
Introduce a new Python script: notify_maintainers.py and run it in CI as part of a new job. When invoked in the context of a pull request against t
ci: mention reviewers/maintainers from MAINTAINERS
Introduce a new Python script: notify_maintainers.py and run it in CI as part of a new job. When invoked in the context of a pull request against the OP-TEE OS official project, it invokes get_maintainer.py to find out the GitHub handles of the people to whom the change in the PR is relevant. It then posts a comment so that these people may be notified via email. People are mentioned only once per PR (they normally receive subsequent messages automatically). The PR author, assignees and requested reviewers (if any) are skipped since they are already notified, as well as the default maintainers ("THE REST") who are assumed to receive all PRs. The format of the comment is:
github-actions (bot) commented ...
FYI <handle1> <handle2>...
Note: Subsystem/platform maintainers who have their GitHub handle in MAINTAINERS and who already "watch" the project will receive two emails upon creation of a PR that touches their area of expertise: one when the PR is created, and one shortly after when the script runs and the GitHub bot tags them in a comment. Hopefully it is only a minor inconvenience.
Note 2: The script was written with the help of generative AI. It was reviewed, tested and modified by me.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Sumit Garg <sumit.garg@oss.qualcomm.com> Reviewed-by: Rouven Czerwinski <rouven.czerwinski@linaro.org>
show more ...
|
| 394baaf7 | 06-Nov-2025 |
Vladislavas Putys <vputys@witekio.com> |
core: ltc: rsa_verify_hash: fix panic on hash length difference
Fixing coupled conditions in rsa_verify_hash_ex(): inc1 was set to 1 in situations when ftmn_set_check_res_memcmp() was not executed a
core: ltc: rsa_verify_hash: fix panic on hash length difference
Fixing coupled conditions in rsa_verify_hash_ex(): inc1 was set to 1 in situations when ftmn_set_check_res_memcmp() was not executed and leading to a panic in FTMN_CALLEE_DONE_CHECK()
Signed-off-by: Vladislavas Putys <vputys@witekio.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 82d5d8cc | 24-Oct-2025 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ffa: guard sp_session field state with spinlock
Accesses to the state field in struct sp_session is often guarded with a spinlock, but there are a few places with it's missing. So, add the mis
core: ffa: guard sp_session field state with spinlock
Accesses to the state field in struct sp_session is often guarded with a spinlock, but there are a few places with it's missing. So, add the missing spinlocks.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 8c8f3bae | 24-Oct-2025 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ffa: verify thread ID before resuming S-EL0 SP
Check that the thread ID for an S-EL0 SP is correct before trying to resume it. This guards against resuming an unrelated thread.
Signed-off-by:
core: ffa: verify thread ID before resuming S-EL0 SP
Check that the thread ID for an S-EL0 SP is correct before trying to resume it. This guards against resuming an unrelated thread.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 6af74df5 | 24-Oct-2025 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ffa: fix direct request error code for S-EL0 SP
Direct requests to S-EL0 SPs are delivered using a thread. If no thread is available return FFA_BUSY, to let the caller know that it should try
core: ffa: fix direct request error code for S-EL0 SP
Direct requests to S-EL0 SPs are delivered using a thread. If no thread is available return FFA_BUSY, to let the caller know that it should try again. This should normally never happen, but let's do our best for a corner case.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 574b1b2d | 02-Sep-2025 |
Jens Wiklander <jens.wiklander@linaro.org> |
ci: add builds for dynamic protected memory
Add two builds for dynamic protected memory, one with and one without FF-A.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Fo
ci: add builds for dynamic protected memory
Add two builds for dynamic protected memory, one with and one without FF-A.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 00338334 | 31-Oct-2024 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: support dynamic protected memory lending
With CFG_CORE_DYN_PROTMEM=y support dynamic protected memory lending.
A new internal struct mobj_ffa_rsm is added to handle dynamic protected memory f
core: support dynamic protected memory lending
With CFG_CORE_DYN_PROTMEM=y support dynamic protected memory lending.
A new internal struct mobj_ffa_rsm is added to handle dynamic protected memory for FF-A.
A new internal struct mobj_protmem is add to handle dynamic protected memory without FF-A.
Lending non-secure memory to OP-TEE to use it as protected memory means that it should to become inaccessible by the normal world as part of the process. This part is currently not supported, since it must be done in a platform specific way for platforms that support that. QEMU don't support that.
Adding two platform specific functions, plat_get_protmem_config() and plat_set_protmem_range() for dynamic protected memory. The functions has __weak implementation to allow easier testing. However, plat_set_protmem_range() requires CFG_INSECURE=y since it doesn't change memory protection.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 46195e2f | 14-Nov-2024 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: arm: refactor struct mobj_ffa
Moves the non-secure shared memory specific fields of struct mobj_ffa into the new struct mobj_ffa_shm which in turn embeds struct mobj_ffa.
This prepares for an
core: arm: refactor struct mobj_ffa
Moves the non-secure shared memory specific fields of struct mobj_ffa into the new struct mobj_ffa_shm which in turn embeds struct mobj_ffa.
This prepares for another derivate of struct mobj_ffa that deals with another kind of memory.
No change in functionality.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 3c2e09b3 | 31-Oct-2024 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ABI description for dynamic protected memory
Extend the SMC and FF-A ABI to handle dynamic protected memory lending. The capability bits OPTEE_SMC_SEC_CAP_DYNAMIC_PROTMEM and OPTEE_FFA_SEC_CAP
core: ABI description for dynamic protected memory
Extend the SMC and FF-A ABI to handle dynamic protected memory lending. The capability bits OPTEE_SMC_SEC_CAP_DYNAMIC_PROTMEM and OPTEE_FFA_SEC_CAP_PROTMEM respectively tells its availability.
OPTEE_MSG_CMD_GET_PROTMEM_CONFIG tells the minimal size and required alignment of protected memory to lend.
For the SMC ABI, OPTEE_MSG_CMD_LEND_PROTMEM lends protected memory and OPTEE_MSG_CMD_RECLAIM_PROTMEM returns the memory to normal world use.
For the FF-A ABI, FFA_LEND framework request followed by OPTEE_MSG_CMD_ASSIGN_PROTMEM lends protected memory and OPTEE_FFA_RELEASE_PROTMEM followed by the FFA_RECLAIM framework request returns the memory to normal world use.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 89f492f5 | 01-Oct-2024 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: arm: SMC ABI to return protected memory configuration
Extend the SMC ABI to return the protect memory configuration.
A capability bit, OPTEE_SMC_SEC_CAP_PROTMEM, is added to announce that the
core: arm: SMC ABI to return protected memory configuration
Extend the SMC ABI to return the protect memory configuration.
A capability bit, OPTEE_SMC_SEC_CAP_PROTMEM, is added to announce that the new SMC fast call OPTEE_SMC_GET_PROTMEM_CONFIG is available. OPTEE_SMC_GET_PROTMEM_CONFIG returns the physical memory range of reserved protected memory.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 0cbde272 | 26-Nov-2024 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: sync ABI description files
Syncs the ABI description files optee_ffa.h and optee_msg.h with their counterpart in the Linux kernel driver. Small changes in comments and introduction of uint8_t
core: sync ABI description files
Syncs the ABI description files optee_ffa.h and optee_msg.h with their counterpart in the Linux kernel driver. Small changes in comments and introduction of uint8_t octets[24] as an alternative to struct optee_msg_param_value value.
No ABI changes or extensions.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| e1e6e2c6 | 22-May-2024 |
Volodymyr Babchuk <volodymyr_babchuk@epam.com> |
plat: rpi5: add basic Raspberry Pi 5 support
RPi5 is based on new BCM2712 SoC which is based on quad Cortex-A76.
BCM2712 still does not provide secure memory so we are free to locate OP-TEE anythin
plat: rpi5: add basic Raspberry Pi 5 support
RPi5 is based on new BCM2712 SoC which is based on quad Cortex-A76.
BCM2712 still does not provide secure memory so we are free to locate OP-TEE anything we want. It would be most beneficial to locate OP-TEE right after TF-A, at address 0x80000, but RPi5 loader places kernel there and it's location can't be changed.
According to PCB silkscreen, RPi5 boards can have 1GB, 2GB, 4GB or 8GB of memory. To be compatible with any variant, OP-TEE is placed close to the end of the first gigabyte.
BCM2712 uses PL011 as debug UART so we enable its driver.
According to specification, BCM2712 includes cryptography extensions, but this basic port does not enable them.
As there is no way to load OP-TEE image into memory during boot process, TF-A with OPTEE_ALLOW_SMC_LOAD=1 option should be used. In this case OP-TEE can be loaded via Linux kernel or U-Boot.
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> Co-developed-by: Hugo Trippaers <htrippaers@schubergphilis.com> Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| e06a9ea5 | 26-Jul-2024 |
Volodymyr Babchuk <volodymyr_babchuk@epam.com> |
mmu: ignore VA spaces in core_mmu_get_type_by_pa
VA spaces have no valid PA addresses stored in memory map, so they are not valid return values for core_mmu_get_type_by_pa() function.
This issues w
mmu: ignore VA spaces in core_mmu_get_type_by_pa
VA spaces have no valid PA addresses stored in memory map, so they are not valid return values for core_mmu_get_type_by_pa() function.
This issues was discovered when OP-TEE tried to access a device tree that was stored at the very beginning of physical address space. In may case it had PA address 0x112C0, which was "covered" by RES_VASPACE:
D/TC:0 0 dump_mmap_table:838 type RES_VASPACE va 0x1d800000..0x1e1fffff pa 0x00000000..0x009fffff size 0x00a00000 (pgdir)
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 79b6146c | 18-Jul-2025 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
drivers: ele: remove sab_init() initialization
ELE firmware has been divided into 2 firmwares for i.MX8ULP and i.MX95: Primary and secondary firmware. SAB init command is in Secondary firmware, whic
drivers: ele: remove sab_init() initialization
ELE firmware has been divided into 2 firmwares for i.MX8ULP and i.MX95: Primary and secondary firmware. SAB init command is in Secondary firmware, which will be loaded when rootfs comes up, so this command is not available when OP-TEE is initializing. Moreover, we are not using any ELE command which is available in secondary firmware, So removing sab_init() function. Will add it when it will be used in driver.
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| de9f0c25 | 18-Jul-2025 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
drivers: ele: update struct get_info_rsp{} fields
There has been an addition of PQC related fields in Get Info Command response for i.MX95.
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Ac
drivers: ele: update struct get_info_rsp{} fields
There has been an addition of PQC related fields in Get Info Command response for i.MX95.
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 3d8c192a | 14-Jul-2025 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
drivers: ele: enable getting HUK/RNG from ELE on imx95
Enable support of getting HUK and RNG from ELE on imx95
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jens Wiklander <jens.
drivers: ele: enable getting HUK/RNG from ELE on imx95
Enable support of getting HUK and RNG from ELE on imx95
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2d65d514 | 04-Jul-2024 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
core: imx: enable MU and ELE drivers for imx95
Enable both MU and ELE driver for imx95
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> |
| 358eab24 | 04-Jul-2024 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
core: imx: add MU_BASE and MU_SIZE for imx95
Add MU Base address and MU size for imx95
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> |
| 16e0d122 | 04-Jul-2024 |
Sahil Malhotra <sahil.malhotra@nxp.com> |
drivers: imx: mu: add support for imx95
Add MU driver support for imx95
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> |