| 01ef3c79 | 01-Dec-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: panic(): avoid panic in panic
When configured with CFG_HALT_CORES_ON_PANIC=y panic() sends a secure SGI to all other CPUs to trap all of them, but if interrupts haven't been configured yet it
core: panic(): avoid panic in panic
When configured with CFG_HALT_CORES_ON_PANIC=y panic() sends a secure SGI to all other CPUs to trap all of them, but if interrupts haven't been configured yet it triggers a cascade of panics. So add a check to see if interrupts are configured before trying to trap the other CPUs.
Fixes: 2b719df0fc1c ("core: interrupt: halt other cores when one is panicking") Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| 245a552c | 01-Dec-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add interrupt_get_main_chip_may_fail()
Add interrupt_get_main_chip_may_fail() to be able to check if it's possible to use interrupts without causing a panic.
Signed-off-by: Jens Wiklander <je
core: add interrupt_get_main_chip_may_fail()
Add interrupt_get_main_chip_may_fail() to be able to check if it's possible to use interrupts without causing a panic.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| c038f3da | 29-Nov-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: dt_driver: do not defer probe on skip phandler arguments
Prevent dt_driver_device_from_node_idx_prop() to request driver probe deferral when needing to skip phandle arguments cells related to
core: dt_driver: do not defer probe on skip phandler arguments
Prevent dt_driver_device_from_node_idx_prop() to request driver probe deferral when needing to skip phandle arguments cells related to providers not yet registered. When skipping these phandle argument cells we don't really need the skipped provider is registered, we can read the #xxx-cells property in the provider DT node straight.
For example, consider a driver which DT node defines: clocks = <&foo_clock 1 2 3>, <&bar_clock 2>; clock-names = "foo", "bar"; If driver calls clk_get_by_name(fdt, node, "bar"), it does not need to wait &foo_clock related driver to be already probed, it does not even need the driver to be ever probed.
Fixes: a22e85b25772 ("core: dt_driver: factorize clk_dt_get_from_provider()") Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| a05577ea | 23-Nov-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
tree wide: clarify PTA ABI
Explicitly describe the statistics PTA ABI using dedicated inline comments and moving struct pta_stats_ta and struct pta_stats_alloc from respectively tee_ta_manager.c and
tree wide: clarify PTA ABI
Explicitly describe the statistics PTA ABI using dedicated inline comments and moving struct pta_stats_ta and struct pta_stats_alloc from respectively tee_ta_manager.c and malloc.h to pta_stats.h header file.
For that purpose, define ALLOC_ID_* macros to identify each allocator one can query information from through the statistics PTA API.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 54115809 | 23-Nov-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: rename struct tee_ta_dump_stats
Rename struct tee_ta_dump_stats to struct pta_stats_ta to prepare the creation of pta_stats.h header file that will define the whole statistics PTA API and ABI,
core: rename struct tee_ta_dump_stats
Rename struct tee_ta_dump_stats to struct pta_stats_ta to prepare the creation of pta_stats.h header file that will define the whole statistics PTA API and ABI, located in libutee/include/ as already done for all other PTAs.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 2617f49f | 22-Nov-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
tree wide: rename struct malloc_stats
Rename struct malloc_stats to struct pta_stats_alloc to prepare the creation of pta_stats.h header file that will define the whole statistics PTA API and ABI, l
tree wide: rename struct malloc_stats
Rename struct malloc_stats to struct pta_stats_alloc to prepare the creation of pta_stats.h header file that will define the whole statistics PTA API and ABI, located in libutee/include/ as already done for all other PTAs.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 2e02a737 | 23-Oct-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ffa: add notifications with SPMC at S-EL1
Adds support for asynchronous notifications via FF-A with SPMC at S-EL1.
The OP-TEE FF-A ABI is extended to report support for asynchronous notificat
core: ffa: add notifications with SPMC at S-EL1
Adds support for asynchronous notifications via FF-A with SPMC at S-EL1.
The OP-TEE FF-A ABI is extended to report support for asynchronous notifications during OPTEE_FFA_EXCHANGE_CAPABILITIES.
The SPMC at S-EL1 is extended to provide the FF-A notifications ABI to a normal world VM.
The notifications depends on having a non-secure SGI interrupt ID available to notify normal world that a notification is pending. Notifications becomes available once platform code has called thread_spmc_set_async_notif_intid() with a designed SGI ID.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| f2b06bc5 | 23-Oct-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: notif: remove interrupt assumptions
Removes the assumption in notif_register_driver() that OP-TEE is using interrupts to notify the normal world. The coming FF-A based implementation will use
core: notif: remove interrupt assumptions
Removes the assumption in notif_register_driver() that OP-TEE is using interrupts to notify the normal world. The coming FF-A based implementation will use FFA_NOTIFICATION_SET for when notifying using an SPMC at S-EL2 or EL3.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| a2a3dfbc | 23-Oct-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: separate async notification implementation
Separates the implementation of sending asynchronous notifications from the part managing reception of events. This makes room for an alternative imp
core: separate async notification implementation
Separates the implementation of sending asynchronous notifications from the part managing reception of events. This makes room for an alternative implementation based on FF-A.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| e9376d02 | 08-Oct-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: interrupt: add interrupt_create_handler()
Adds interrupt_create_handler() API function in interrupt framework. The function is to be used with interrupt controls obtained from the DT with int
core: interrupt: add interrupt_create_handler()
Adds interrupt_create_handler() API function in interrupt framework. The function is to be used with interrupt controls obtained from the DT with interrupt_dt_get() interrupt_dt_get_by_index() or interrupt_dt_get_by_name().
The function differs from legacy interrupt_add_handler() in that this latter always reconfigure the interrupt while new interrupt_create_handler() function assumes the interrupt was configured from interrupt_dt_get() or friends.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 33a0c835 | 14-Jun-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: interrupt: registering interrupt providers
Adds interrupt chip framework API functions for an interrupt controller to register as an interrupt provider in the driver probing sequence based on
core: interrupt: registering interrupt providers
Adds interrupt chip framework API functions for an interrupt controller to register as an interrupt provider in the driver probing sequence based on device tree. This allows interrupt consumer to be deferred when a dependent interrupt controller is not yet initialized.
Interrupt controllers register a driver in DT_DRIVER providers list with: interrupt_register_provider().
Interrupt consumer can get their interrupt through DT data with interrupt_dt_get(), interrupt_dt_get_by_index() or interrupt_dt_get_by_name().
This change removes inclusion of interrupt.h from kernel/dt.h as it is not needed and conflicts with inclusion of kernel/dt.h from kernel/interrupt.h.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| b548a657 | 06-Nov-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: dt_driver: reference output device reference as void *
Changes dt_driver API function to reference device reference as void * instead of void ** which could be confusing as the reference can b
core: dt_driver: reference output device reference as void *
Changes dt_driver API function to reference device reference as void * instead of void ** which could be confusing as the reference can be a pointer to a device pointer (e.g. in clk_dt.c) or a pointer to a structure (e.g. interrupt.c).
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 955b02aa | 10-Oct-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: dt_driver: don't enforce phandle 1st arg is a phandle
Changes local function device_from_provider_prop() to assume its argument @prop points to the first argument to pass with phandle.
This c
core: dt_driver: don't enforce phandle 1st arg is a phandle
Changes local function device_from_provider_prop() to assume its argument @prop points to the first argument to pass with phandle.
This change allows a later change to support other DT bindings ("interrupts" property) where 1st cell of the property is not a phandle but the 1st phandle argument to be passed.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| bce2f88a | 19-Nov-2023 |
Vincent Mailhol <mailhol.vincent@wanadoo.fr> |
tree-wide: remove useless newline character in *MSG() messages
The *MSG() macros take care of printing a newline. Adding a newline character ('\n') is useless. Remove it.
Signed-off-by: Vincent Mai
tree-wide: remove useless newline character in *MSG() messages
The *MSG() macros take care of printing a newline. Adding a newline character ('\n') is useless. Remove it.
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| dcff802b | 16-Nov-2023 |
Raymond Mao <raymond.mao@linaro.org> |
core: add new argument to init_external_dt()
Add argument to function init_external_dt() to allow callers to specify the maximum size of external DTB to be initialized.
Signed-off-by: Raymond Mao <
core: add new argument to init_external_dt()
Add argument to function init_external_dt() to allow callers to specify the maximum size of external DTB to be initialized.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 3d8cac14 | 10-May-2022 |
Patrick Delaunay <patrick.delaunay@foss.st.com> |
core: kernel: tee_ta_manager.c: add uuid in open session error trace
Adds the TA UUID in open session error trace to allow to identify witch TA cause the issue when debug trace are not acitvated.
B
core: kernel: tee_ta_manager.c: add uuid in open session error trace
Adds the TA UUID in open session error trace to allow to identify witch TA cause the issue when debug trace are not acitvated.
By the way, fix specifier for res argument that is a uint32_t.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 2b719df0 | 07-Nov-2023 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
core: interrupt: halt other cores when one is panicking
When one core panics, send an SGI (CFG_CORE_HALT_CORES_ON_PANIC_SGI) to halt other cores if CFG_CORE_HALT_CORES_ON_PANIC is enabled.
Signed-o
core: interrupt: halt other cores when one is panicking
When one core panics, send an SGI (CFG_CORE_HALT_CORES_ON_PANIC_SGI) to halt other cores if CFG_CORE_HALT_CORES_ON_PANIC is enabled.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 17a66904 | 10-Nov-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: print current guest ID in logs
If CFG_NS_VIRTUALIZATION is enabled include the current guest ID on each log line. A number is added before the core number identifying the currently set guest I
core: print current guest ID in logs
If CFG_NS_VIRTUALIZATION is enabled include the current guest ID on each log line. A number is added before the core number identifying the currently set guest ID, for example: D/TC:2 0 0 call_initcalls:40 level 1 teecore_init_pub_ram()
Where the "2" indicates that this is done with guest ID 2 active.
Update the symbolize.py script accordingly to recognize and ignore an eventual guest ID in a log entry.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 66763721 | 26-Sep-2023 |
Raymond Mao <raymond.mao@linaro.org> |
core: add support for transfer list
Add supports for Transfer List on both aarch32/64. Fetch arguments from {x,r}{0-3} and check if a valid Transfer List exists, which compliant to the Firmware Hand
core: add support for transfer list
Add supports for Transfer List on both aarch32/64. Fetch arguments from {x,r}{0-3} and check if a valid Transfer List exists, which compliant to the Firmware Handoff specification. The Transfer List will be mapped during early initialization and unmapped before exiting to next boot stage. DTB and pagable address will be parsed from the Transfer List if they exist as Transfer Entries. If Transfer List does not exist or is invalid, legacy argument handoff is backwards compatible.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| a1222502 | 20-Sep-2023 |
Raymond Mao <raymond.mao@linaro.org> |
core: add transfer list API
Introduce Transfer List API into kernel to implement Firmware Handoff specification
Link: https://github.com/FirmwareHandoff/firmware_handoff Signed-off-by: Raymond Mao
core: add transfer list API
Introduce Transfer List API into kernel to implement Firmware Handoff specification
Link: https://github.com/FirmwareHandoff/firmware_handoff Signed-off-by: Raymond Mao <raymond.mao@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| bb053cc1 | 01-Jun-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: interrupt: remove old API functions
Remove old itr_xxx() API functions.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> |
| da637b6b | 01-Jun-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: notif: upgrade to new interrupt framework
Uses main controller ops to call .raise_sgi as the old API functions itr_xxx() are deprecated.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org
core: notif: upgrade to new interrupt framework
Uses main controller ops to call .raise_sgi as the old API functions itr_xxx() are deprecated.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 0a75d408 | 13-Oct-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: fix data abort during ftrace
With commit c10e3fa93d24 ("core: fix race in handling TA panic") the resources of a panicked TAs are released as early as possible, including the user space mapped
core: fix data abort during ftrace
With commit c10e3fa93d24 ("core: fix race in handling TA panic") the resources of a panicked TAs are released as early as possible, including the user space mapped ftrace buffer. However, the pointer to the ftrace buffer is stored in the ts_session for quick and easy access. The ftrace buffer is always retrieved with get_fbuf() that already have a few other checks to see if the buffer is currently available. So add a check to see that the TA hasn't panicked also.
Fixes: c10e3fa93d24 ("core: fix race in handling TA panic") Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (vexpress-qemu_armv8a)
show more ...
|
| 1b5c7ca4 | 22-Jun-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: interrupt: helper function interrupt_alloc_add_conf_handler()
Adds interrupt API function interrupt_alloc_add_conf_handler() to allocate, configure and register an interrupt handler, providing
core: interrupt: helper function interrupt_alloc_add_conf_handler()
Adds interrupt API function interrupt_alloc_add_conf_handler() to allocate, configure and register an interrupt handler, providing interrupt type and priority.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 99e2612c | 16-May-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
drivers: move to interrupt_call_handlers()
Removes itr_handle() in favor to interrupt_call_handlers(). This changes updates all implemented main interrupt controller drivers that are the GIC driver,
drivers: move to interrupt_call_handlers()
Removes itr_handle() in favor to interrupt_call_handlers(). This changes updates all implemented main interrupt controller drivers that are the GIC driver, the HFIC driver and Atmel SAIC driver.
Reviewed-by: Alvin Chang <alvinga@andestech.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|