| 3d52f27c | 12-Feb-2024 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: move multi_core_panic_handler into __nex_data
Multi core panic interrupts are delivered on all cores on panic. For this to work reliably with CFG_NS_VIRTUALIZATION=y make sure that multi_core_
core: move multi_core_panic_handler into __nex_data
Multi core panic interrupts are delivered on all cores on panic. For this to work reliably with CFG_NS_VIRTUALIZATION=y make sure that multi_core_panic_handler is located in nexus memory.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| a039ffc6 | 05-Jan-2024 |
Clement Faure <clement.faure@nxp.com> |
core: kernel: dt: check return values from snprintf()
Check return values from snprintf() function.
Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Jerome Forissier <jerome.foriss
core: kernel: dt: check return values from snprintf()
Check return values from snprintf() function.
Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| e33c3ff5 | 05-Jan-2024 |
Clement Faure <clement.faure@nxp.com> |
core: kernel: check device tree property pointer
Assert `prop` pointer before using it in fdt32_to_cpu().
Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Jerome Forissier <jerome.
core: kernel: check device tree property pointer
Assert `prop` pointer before using it in fdt32_to_cpu().
Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 5ca2c365 | 10-Jan-2024 |
Clement Faure <clement.faure@nxp.com> |
core: remove unnecessary includes
Remove unnecessary includes.
Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander
core: remove unnecessary includes
Remove unnecessary includes.
Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 4fd40c39 | 22-Mar-2023 |
Clément Léger <clement.leger@bootlin.com> |
core: dt_driver: add DT_DRIVER_NVMEM support
Handle DT_DRIVER_NVMEM the same way that DT_DRIVER_PINCTRL is handled. Indeed, it uses the same kind of DT references (phandle to a subnode of a controll
core: dt_driver: add DT_DRIVER_NVMEM support
Handle DT_DRIVER_NVMEM the same way that DT_DRIVER_PINCTRL is handled. Indeed, it uses the same kind of DT references (phandle to a subnode of a controller) to get a nvmem cell.
Signed-off-by: Clément Léger <clement.leger@bootlin.com> Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 963eb457 | 10-Jan-2024 |
Clement Faure <clement.faure@nxp.com> |
core: fix unintended sign extension
Suspicious implicit sign extension: memtag_get_tag(kaddr) with type uint8_t (8 bits, unsigned) is promoted in memtag_get_tag(kaddr) << uref_tag_shift to type int
core: fix unintended sign extension
Suspicious implicit sign extension: memtag_get_tag(kaddr) with type uint8_t (8 bits, unsigned) is promoted in memtag_get_tag(kaddr) << uref_tag_shift to type int (32 bits, signed), then sign-extended to type unsigned long (64 bits, unsigned).
If memtag_get_tag(kaddr) << uref_tag_shift is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
Cast memtag_get_tag(kaddr) to vaddr_t to avoid implicit sign extension.
Signed-off-by: Clement Faure <clement.faure@nxp.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| a5bf88f0 | 17-Jun-2022 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
core: fix trace in add_node_to_probe()
Fix trace format, drv_name and node_name are inverted.
Fixes: b3a88b52a17c ("core: dt_driver probe sequence") Signed-off-by: Gatien Chevallier <gatien.chevall
core: fix trace in add_node_to_probe()
Fix trace format, drv_name and node_name are inverted.
Fixes: b3a88b52a17c ("core: dt_driver probe sequence") Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 508e2476 | 29-Nov-2023 |
Raymond Mao <raymond.mao@linaro.org> |
core: update transfer list header and signature
Add tl->flags and TL_FLAGS_HAS_CHECKSUM to align to the latest FW Handoff spec update. Bypass checksum verifying and updating if TL_FLAGS_HAS_CHECKSUM
core: update transfer list header and signature
Add tl->flags and TL_FLAGS_HAS_CHECKSUM to align to the latest FW Handoff spec update. Bypass checksum verifying and updating if TL_FLAGS_HAS_CHECKSUM bit is not set in tl->flags. Update TL signature to 4a0f_b10b to align to the latest FW Handoff spec update.
Note: It causes Transfer List ABI breakage due to FW Handoff spec stays with same rev number (v0.9) with above changes.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 86dbb179 | 27-Nov-2023 |
Raymond Mao <raymond.mao@linaro.org> |
core: remove unused bytes from transfer list
Only marks the minimum bytes required by alignment as 'TL_TAG_EMPTY' and release the rest of unused bytes from transfer list when downsizing the data of
core: remove unused bytes from transfer list
Only marks the minimum bytes required by alignment as 'TL_TAG_EMPTY' and release the rest of unused bytes from transfer list when downsizing the data of a transfer entry. Function transfer_list_set_data_size() will remove the unused bytes from the transfer list so that the freed space is allocable when adding new transfer entries.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 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 ...
|