| be501eb1 | 05-Oct-2021 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
util: rename ALIGNMENT_IS_OK to IS_ALIGNED_WITH_TYPE
Implement the renamed macro using the IS_ALIGNED definition.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Reviewed-by: Etienne Carrie
util: rename ALIGNMENT_IS_OK to IS_ALIGNED_WITH_TYPE
Implement the renamed macro using the IS_ALIGNED definition.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 702fe5a7 | 10-Aug-2021 |
Clément Léger <clement.leger@bootlin.com> |
core: kernel: interrupt: add type and prio for interrupts
When describing a device in the device tree, it is sometimes necessary to parse the interrupts properties and propagates them until adding t
core: kernel: interrupt: add type and prio for interrupts
When describing a device in the device tree, it is sometimes necessary to parse the interrupts properties and propagates them until adding the interrupt. For instance some interrupt-cells allows to describe priority and type of interrupt:
interrupts = <67 IRQ_TYPE_LEVEL_HIGH 2>;
With existing support, only the interrupt number is returned by `dt_get_irq()`. This patch adds type and prio parameter which are passed to `dt_get_irq_type_prio()` and `itr_add_type_prio()`. This allows interrupt drivers to fill this from devicetree in `dt_get_irq()` but also use these information in the `add()` callback. Additionally, it allows to specify these flags manually when not using devicetree.
These parameters can then be used by the interrupt controller driver to setup the irq line correctly.
Signed-off-by: Clément Léger <clement.leger@bootlin.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 888bb63d | 13-Oct-2021 |
Clément Léger <clement.leger@bootlin.com> |
core: kernel: interrupt: rename len argument of dt_get_irq to count
len can be missleading, use a more descriptive name.
Signed-off-by: Clément Léger <clement.leger@bootlin.com> Reviewed-by: Etienn
core: kernel: interrupt: rename len argument of dt_get_irq to count
len can be missleading, use a more descriptive name.
Signed-off-by: Clément Léger <clement.leger@bootlin.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| bd59a6ad | 31-Aug-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add call_preinitcalls()
Adds call_preinitcalls() for really early initcalls. This function is supposed to be called before call_initcalls() is called. With virtualization enabled it is called
core: add call_preinitcalls()
Adds call_preinitcalls() for really early initcalls. This function is supposed to be called before call_initcalls() is called. With virtualization enabled it is called in a blocking context when the OP-TEE partition is created.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| aae59a1e | 24-Sep-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
drivers: stm32_gpio: inline function when without GPIO support
Provide an implementation for GPIO configuration when the driver is not embedded (CFG_STM32_GPIO!=y). In such configuration, platform c
drivers: stm32_gpio: inline function when without GPIO support
Provide an implementation for GPIO configuration when the driver is not embedded (CFG_STM32_GPIO!=y). In such configuration, platform cannot configure the GPIO pins hence place an assert() instruction.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| e4ca953c | 10-Aug-2021 |
Clement Faure <clement.faure@nxp.com> |
drivers: imx: add OCOTP driver
Add OCOTP driver for imx6, imx7, imx7ulp and imx8m platforms. The implementation only supports the read of OCOTP shadow registers. It also implements the tee_otp_get_d
drivers: imx: add OCOTP driver
Add OCOTP driver for imx6, imx7, imx7ulp and imx8m platforms. The implementation only supports the read of OCOTP shadow registers. It also implements the tee_otp_get_die_id() function.
Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| df45c114 | 17-Sep-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt: fix missing const attribute on fdt reference
The standard FDT reference in libfdt and friends is a const void *. Fix few function prototypes that miss the const attribute.
Signed-off-by:
core: dt: fix missing const attribute on fdt reference
The standard FDT reference in libfdt and friends is a const void *. Fix few function prototypes that miss the const attribute.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| c2e4eb43 | 23-May-2021 |
Anton Rybakov <a.rybakov@omp.ru> |
core_mmu: fix phys_to_virt() to check length
phys_to_virt() function without length parameter doesn`t always have ability to find the correct mapping for requested physical address. This is because
core_mmu: fix phys_to_virt() to check length
phys_to_virt() function without length parameter doesn`t always have ability to find the correct mapping for requested physical address. This is because physical address can be mapped in the same time in different virtual regions with different length. So the first found region which contains the requested physical address possibly doesn`t have enough mapped data. This is fixed by adding the length parameter to phys_to_virt() function. Length parameter can be set to 1 if caller knows that requested (pa + len) doesn`t cross mapping granule boundary.
core_mmu_get_va() and io_pa_or_va() functions now are take length parameter too as they based on phys_to_virt() in case of MMU enabled.
Signed-off-by: Anton Rybakov <a.rybakov@omp.ru> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (stm32mp1-157C_DK2) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6dlsabreauto) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6dlsabresd) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6qpsabreauto) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6sllevk) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6ulevk) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6ullevk) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx6ulzevk) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx7dsabresd) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx7ulpevk) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx8mmevk) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx8mnevk) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx8mqevk) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx8mpevk) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx8qmmek) Tested-by: Clement Faure <clement.faure@nxp.com> (imx-mx8qxpmek)
show more ...
|
| 927d81ac | 27-Aug-2021 |
Jerome Forissier <jerome@forissier.org> |
core: panic: introduce cpu_idle() function
Adds a cpu_idle() weak function to panic.h/panic.c, which can later be implemented in arch-specific code. The purpose is to avoid a busy loop (which is the
core: panic: introduce cpu_idle() function
Adds a cpu_idle() weak function to panic.h/panic.c, which can later be implemented in arch-specific code. The purpose is to avoid a busy loop (which is the default implementation) when __do_panic() is done but cannot return.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| ff01e245 | 24-Jun-2021 |
Anton Rybakov <a.rybakov@omp.ru> |
mm: split mobj_tee_ram onto rw/rx parts
Now mobj_tee_ram memory abstraction contains both TEE_RAM_RX and TEE_RAM_RW regions joined together. This patch splits it to mobj_tee_ram_rx and mobj_tee_ram_
mm: split mobj_tee_ram onto rw/rx parts
Now mobj_tee_ram memory abstraction contains both TEE_RAM_RX and TEE_RAM_RW regions joined together. This patch splits it to mobj_tee_ram_rx and mobj_tee_ram_rw to manage RX/RW memory objects separately.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Anton Rybakov <a.rybakov@omp.ru>
show more ...
|
| 1b02ce1d | 21-Jun-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add overflow check in SHDR_ENC_GET_SIZE()
Prior to this patch could the additions in the macro SHDR_ENC_GET_SIZE() cause an integer overflow. So fix this by using the ADD_OVERFLOW() macro and
core: add overflow check in SHDR_ENC_GET_SIZE()
Prior to this patch could the additions in the macro SHDR_ENC_GET_SIZE() cause an integer overflow. So fix this by using the ADD_OVERFLOW() macro and a helper function. In case of overflow return 0 which never can be a correct size.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Ruchika Gupta <ruchika.gupta@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reported-by: Patrik Lantz <Patrik.Lantz@axis.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 077732a0 | 12-May-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: make __wq_rpc() static again
With dependency chains properly broken for various ops structs we can make __wq_rpc() static again and remove it from link_dummies_paged.c.
Acked-by: Jerome Foris
core: make __wq_rpc() static again
With dependency chains properly broken for various ops structs we can make __wq_rpc() static again and remove it from link_dummies_paged.c.
Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 3cc2413a | 11-May-2021 |
Jerome Forissier <jerome@forissier.org> |
core: allow configuration without any secure storage
Support a configuration with no secure storage (CFG_REE_FS=n and CFG_RPMB_FS=n). In such a case, user TAs will get error code TEEC_ERROR_ITEM_NOT
core: allow configuration without any secure storage
Support a configuration with no secure storage (CFG_REE_FS=n and CFG_RPMB_FS=n). In such a case, user TAs will get error code TEEC_ERROR_ITEM_NOT_FOUND when trying to access persistent objects.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| f85678c1 | 26-Apr-2021 |
Igor Opaniuk <igor.opaniuk@foundries.io> |
imx: pm: add support for reset2 function
Add support for SYSTEM_RESET2, which asserts WDOG-generated reset signal WDOG_RESET_B_DEB (internal reset).
For additional details check WDOGx_WCR fields de
imx: pm: add support for reset2 function
Add support for SYSTEM_RESET2, which asserts WDOG-generated reset signal WDOG_RESET_B_DEB (internal reset).
For additional details check WDOGx_WCR fields description in iMX Applications Processor Reference Manual.
Acked-by: Clement Faure <clement.faure@nxp.com> Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
show more ...
|
| b4bfc9a9 | 30-Apr-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core/include/*/*.h: use U() for unsigned constants
Updates with the U() macro as described in the recently updated coding guidelines.
Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Je
core/include/*/*.h: use U() for unsigned constants
Updates with the U() macro as described in the recently updated coding guidelines.
Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2735636f | 04-May-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core/include/drivers/*.h: use BIT() and SHIFT_U32() macros
Uses the more safe BIT() and SHIFT_U32() macros instead of direct shifting of 1 or some other constant integer.
Acked-by: Ruchika Gupta <r
core/include/drivers/*.h: use BIT() and SHIFT_U32() macros
Uses the more safe BIT() and SHIFT_U32() macros instead of direct shifting of 1 or some other constant integer.
Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 57f197ec | 30-Apr-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core/include/*.h: use U() for unsigned constants
Updates with the U() macro as described in the recently updated coding guidelines.
Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Jero
core/include/*.h: use U() for unsigned constants
Updates with the U() macro as described in the recently updated coding guidelines.
Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d5ad7ccf | 10-Jan-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: rename struct tee_pager_area to vm_paged_region
Renames struct tee_pager_area to struct vm_paged_region and moves it next to the declaration of struct vm_region. Since areas are now called pag
core: rename struct tee_pager_area to vm_paged_region
Renames struct tee_pager_area to struct vm_paged_region and moves it next to the declaration of struct vm_region. Since areas are now called paged regions or regions also rename functions, variables and struct members accordingly.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| fb19e98e | 25-Feb-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: enable FF-A with SPM Core at S-EL2
This enables support for FF-A with SPM Core at S-EL2 in a secure hypervisor while OP-TEE is running at S-EL1 as a SP. This configuration is also know as "S-E
core: enable FF-A with SPM Core at S-EL2
This enables support for FF-A with SPM Core at S-EL2 in a secure hypervisor while OP-TEE is running at S-EL1 as a SP. This configuration is also know as "S-EL2 SPMC" in the FFA specification.
Compile with CFG_CORE_SEL2_SPMC=y
Note that this is an experimental feature, ABIs etc may have incompatible changes.
This depends on using the FF-A v4 patchset in the Linux kernel.
Reviewed-by: Jelle Sels <jelle.sels@arm.com> Co-developed-by: Marc Bonnici <marc.bonnici@arm.com> Signed-off-by: Marc Bonnici <marc.bonnici@arm.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c1bdf4fc | 25-Feb-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: spmc: FF-A ABI updates
Updates structs and definitions to follow FF-A version 1.0.
Use the special hard coded UUID (486178e0-e7f8-11e3-bc5e-0002a5d5c51b) for the SP OP-TEE is when compiled fo
core: spmc: FF-A ABI updates
Updates structs and definitions to follow FF-A version 1.0.
Use the special hard coded UUID (486178e0-e7f8-11e3-bc5e-0002a5d5c51b) for the SP OP-TEE is when compiled for FF-A.
Updates the FF-A OP-TEE message ABI to make room for struct optee_msg_arg to be used for RPC for OPTEE_FFA_YIELDING_CALL_WITH_ARG.
struct thread_ctx::rpc_arg for the current thread will always hold a pointer to the struct optee_msg_arg to be used for RPC.
With this allocation of shared memory can be pushed up one layer and be done via the struct optee_msg_arg so the OPTEE_FFA_YIELDING_CALL_RETURN_ALLOC_*_SHM and OPTEE_FFA_YIELDING_CALL_RETURN_FREE_*_SHM can be removed making the FF-A ABI a bit less complicated.
Changes OPTEE_FFA_UNREGISTER_SHM to be a blocking call instead of a yielding call.
Removes the unused OPTEE_FFA_YIELDING_CALL_REGISTER_SHM.
Updates the return values from yielding calls to use the TEE_Result values instead of FF-A one to use the error code from the correct layer.
Defines OPTEE_MSG_FMEM_INVALID_GLOBAL_ID to 0xffffffffffffffffff which is used as an invalid global id instead of 0.
This is an ABI breakage which must be done in sync with the FF-A v4 patchset in the Linux kernel.
Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 3e530666 | 25-Apr-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
drivers: scmi-msg: introduce scmi_smt_channel_handle()
New API function for scmi-msg drivers: sub channel ID to handle conversion for consistency in SCMI PTA.
Signed-off-by: Etienne Carriere <etien
drivers: scmi-msg: introduce scmi_smt_channel_handle()
New API function for scmi-msg drivers: sub channel ID to handle conversion for consistency in SCMI PTA.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| acc5dd21 | 09-Apr-2021 |
Ludovic Barre <ludovic.barre@foss.st.com> |
core: kernel: interrupt: add interface to allocate and add handler
This commit adds an interface to allocate and add an interrupt handler. This change allows to factorize code when dynamic interrupt
core: kernel: interrupt: add interface to allocate and add handler
This commit adds an interface to allocate and add an interrupt handler. This change allows to factorize code when dynamic interrupt handler allocation is needed.
Signed-off-by: Ludovic Barre <ludovic.barre@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| 7acb3a47 | 09-Apr-2021 |
Ludovic Barre <ludovic.barre@foss.st.com> |
core: add interrupt resource in dt_node_info
Adds interrupt resource in dt_node_info and load it from _fdt_fill_device_info().
Signed-off-by: Ludovic Barre <ludovic.barre@foss.st.com> Reviewed-by:
core: add interrupt resource in dt_node_info
Adds interrupt resource in dt_node_info and load it from _fdt_fill_device_info().
Signed-off-by: Ludovic Barre <ludovic.barre@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| 67729d8d | 09-Apr-2021 |
Ludovic Barre <ludovic.barre@foss.st.com> |
core: dt: split dt_get_irq() between interrupt framework and drivers
To welcome other interrupt drivers (coming from other platform for example), we need to rework dt_get_irq() which was dedicated t
core: dt: split dt_get_irq() between interrupt framework and drivers
To welcome other interrupt drivers (coming from other platform for example), we need to rework dt_get_irq() which was dedicated to ARM platform more specifically GIC driver. This change moves dt_get_irq() in interrupt framework, this manages the generic part of interrupt bindings (specified by devicetree.org [1]) and then call a driver callback to translate specific properties. This callback is registered by drivers while its init step.
Update CAAM crypto driver accordingly.
Link: [1] https://www.devicetree.org/specifications/ Signed-off-by: Ludovic Barre <ludovic.barre@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| 25c76675 | 29-Mar-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: tee: move entry_std.c to core/tee
entry_std.* are not architecture-specific codes, therefore move entry_std.c to core/tee and entry_std.h to core/include/tee.
Signed-off-by: Marouene Boubakri
core: tee: move entry_std.c to core/tee
entry_std.* are not architecture-specific codes, therefore move entry_std.c to core/tee and entry_std.h to core/include/tee.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|