-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Closed
Copy link
Labels
FeatureA planned feature with a milestoneA planned feature with a milestonearea: APIChanges to public APIsChanges to public APIsarea: ARMARM (32-bit) ArchitectureARM (32-bit) Architecturearea: Trusted ExecutionTrusted ExecutionTrusted Execution
Description
This issue aims to define an internal API and implement it, to address #6376 for ARMv8-M (with Security Extension).
In irq_manage.c we implement the following ARM Cortex-M-specific functions:
-
void irq_target_state_set(unsigned int irq, int secure_state); -
int irq_target_state_is_nonsecure(unsigned int irq);
Function irq_target_state_set(unsigned int irq, int secure_state) sets the security state (Secure or Non-Secure) targeted by the given irq.
irq_target_state_set(unsigned int irq, int nonsecure_state):
- requires ARMv8-M
- is only compiled if
ARM_SECURE_FIRMWAREis defined - shall only be called if we are in Secure state, otherwise, a write attempt to NVIC.ITNS[x] register is WRITE-IGNORED (WI), because the ITNS register is not banked between security states
- shall set the NVIC.ITNS[x].irq bit accordingly, depending on the
secure_state - shall _ASSERT if the operation is not performed successfully
Function irq_target_state_is_secure(unsigned int irq) returns the security state targeted by the given irq.
irq_target_state_is_nonsecure(unsigned int irq)
- requires ARMv8-M (mainline or baseline)
- is only compiled if
ARM_SECURE_FIRMWAREis defined - shall only be called if we are in Secure state, otherwise, a read attempt to NVIC.ITNS[x] register is READ-AS-ZERO, because the ITNS register is not banked between security states.
- shall get the NVIC.ITNS[x].irq bit and return the security state it corresponds to
Metadata
Metadata
Assignees
Labels
FeatureA planned feature with a milestoneA planned feature with a milestonearea: APIChanges to public APIsChanges to public APIsarea: ARMARM (32-bit) ArchitectureARM (32-bit) Architecturearea: Trusted ExecutionTrusted ExecutionTrusted Execution