| #
718cc2b5 |
| 30-Sep-2024 |
Volodymyr Babchuk <volodymyr_babchuk@epam.com> |
notif: fix build when NS_VIRTUALIZATION is enabled
Right now OP-TEE build fails if CFG_NS_VIRTUALIZATION=y and CFG_CORE_ASYNC_NOTIF=n with the following error:
core/kernel/notif.c: In function 'nex
notif: fix build when NS_VIRTUALIZATION is enabled
Right now OP-TEE build fails if CFG_NS_VIRTUALIZATION=y and CFG_CORE_ASYNC_NOTIF=n with the following error:
core/kernel/notif.c: In function 'nex_init_notif': core/kernel/notif.c:185:42: error: 'notif_data_id' undeclared (first use in this function); did you mean 'notif_wait'? 185 | return virt_add_guest_spec_data(¬if_data_id, | ^~~~~~~~~~~~~ | notif_wait core/kernel/notif.c:185:42: note: each undeclared identifier is reported only once for each function it appears in core/kernel/notif.c:186:48: error: invalid application of 'sizeof' to incomplete type 'struct notif_data' 186 | sizeof(struct notif_data), NULL); | ^~~~~~ core/kernel/notif.c:187:1: warning: control reaches end of non-void function [-Wreturn-type] 187 | } | ^
Move `#ifdef CFG_NS_VIRTUALIZATION` section under `#ifdef CFG_CORE_ASYNC_NOTIF` to fix this.
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
d237e616 |
| 06-Feb-2024 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: make generic notifications virtualization-aware
Makes the generic notification handling aware of virtualization. Atomic events are delivered with a guest_id parameter and asynchronous notifica
core: make generic notifications virtualization-aware
Makes the generic notification handling aware of virtualization. Atomic events are delivered with a guest_id parameter and asynchronous notifications are started per guest_id.
struct notif_data is added as guest specific data to be able to track if notifications are started for a guest.
While this patch compiles it doesn't work as intended without patches handling the ABI specific side of things.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
450f8ada |
| 23-Jan-2024 |
Gavin Liu <gavin.liu@mediatek.com> |
core: notif: add support timeout notify
Add support timeout notification, allowing to avoid waiting indefinitely for the completion of an event
Signed-off-by: Gavin Liu <gavin.liu@mediatek.com> Rev
core: notif: add support timeout notify
Add support timeout notification, allowing to avoid waiting indefinitely for the completion of an event
Signed-off-by: Gavin Liu <gavin.liu@mediatek.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
fc59f3d8 |
| 13-Mar-2024 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: notif: assert callback is unpaged
Add an assert that the atomic_cb() pointer in notif_register_driver() points to an unpaged address since the callback function will be called from an interrup
core: notif: assert callback is unpaged
Add an assert that the atomic_cb() pointer in notif_register_driver() points to an unpaged address since the callback function will be called from an interrupt handler and must not be paged.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
4199b52f |
| 12-Feb-2024 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: notif_register_driver() assert ndrv is nexus memory
Notification drivers defined by struct notif_driver are processed from the nexus when non-secure virtualization is enabled. Add an assert in
core: notif_register_driver() assert ndrv is nexus memory
Notification drivers defined by struct notif_driver are processed from the nexus when non-secure virtualization is enabled. Add an assert in notif_register_driver() to check that the passed driver struct is located in nexus memory.
Move all notif global state variables into nexus memory. The mutex used for yielding notifications is the exception since notif_deliver_event() is called from a partition outside of the nexus.
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 ...
|
| #
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 ...
|
| #
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 ...
|
| #
94397285 |
| 27-Jan-2022 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: notif: allow GIC_PPI usage for async notif
Allows to use GIC_PPI interrupts for asynchronous notification.
This change replace macro COMPILE_TIME_ASSERT() with static_assert() as the former i
core: notif: allow GIC_PPI usage for async notif
Allows to use GIC_PPI interrupts for asynchronous notification.
This change replace macro COMPILE_TIME_ASSERT() with static_assert() as the former is deprecated.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
aac71369 |
| 14-Feb-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: move NOTIF_VALUE_DO_BOTTOM_HALF assert to thread_optee_smc.c
Moves the compile assertion that NOTIF_VALUE_DO_BOTTOM_HALF matches OPTEE_SMC_ASYNC_NOTIF_VALUE_DO_BOTTOM_HALF in core/kernel/notif
core: move NOTIF_VALUE_DO_BOTTOM_HALF assert to thread_optee_smc.c
Moves the compile assertion that NOTIF_VALUE_DO_BOTTOM_HALF matches OPTEE_SMC_ASYNC_NOTIF_VALUE_DO_BOTTOM_HALF in core/kernel/notif.c to core/arch/arm/kernel/thread_optee_smc.c to keep dependencies to optee_smc.h in architecture specific code.
Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
c2d44948 |
| 20-Apr-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add asynchronous notifications
Adds support for asynchronous notifications from secure world to normal world. This allows a design with a top half and bottom half type of driver where the top
core: add asynchronous notifications
Adds support for asynchronous notifications from secure world to normal world. This allows a design with a top half and bottom half type of driver where the top half runs in secure interrupt context and a notifications tells normal world to schedule a yielding call to do the bottom half processing.
The protocol is defined in optee_msg.h optee_rpc_cmd.h and optee_smc.h.
A notification consists of a 32-bit value which normal world can retrieve using a fastcall into secure world. OP-TEE is currently only supporting the value 0-63 where 0 has a special meaning. When 0 is sent it means that normal world is supposed to make a yielding call OPTEE_MSG_CMD_DO_BOTTOM_HALF.
The notification framework in OP-TEE defines an interface where drivers can register a callback which is called on each yielding bottom half call.
Notification capability is negotiated with the normal world while it initializes its driver. If both sides supports these notifications then they are enabled.
CFG_CORE_ASYNC_NOTIF_GIC_INTID is added to define the hardware interrupt used to notify normal world. This is added to the DTB in case OP-TEE can is configured with CFG_DT=y. Other cases requires the normal world DTB to be kept in sync with this.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
2828809e |
| 20-Apr-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add new interface for synchronous notifications
Adds a new interface for synchronous notifications. The old RPC interface based on OPTEE_RPC_CMD_WAIT_QUEUE is renamed to OPTEE_RPC_CMD_NOTIFICA
core: add new interface for synchronous notifications
Adds a new interface for synchronous notifications. The old RPC interface based on OPTEE_RPC_CMD_WAIT_QUEUE is renamed to OPTEE_RPC_CMD_NOTIFICATION in order to match the new interface.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|