2018-03-28 18:00:20 +08:00
|
|
|
zephyr_library()
|
|
|
|
|
|
|
|
zephyr_library_sources(
|
2017-10-27 21:43:34 +08:00
|
|
|
exc_exit.S
|
|
|
|
irq_init.c
|
arch: arm: Change method of __swap processing
This patch reworks the current ARM __swap() function into a C function.
Due to some issues with using svc calls withing fault handlers, we
needed to change the way we initiate a swap by removing the dependence
on svc #0.
Before __swap() is called, the system has already done an irq_lock().
Upon return from __swap(), the equivalent of an irq_lock() is done due
to restoration of the key value from the irq_lock preceeding the call.
For ARM V6M (M0/M0+), the pendsv bit is toggled and the irqs are
enabled. There is no priority masking in v6m, so it's just a global
enable. For ARM V7M, the priority mask has to be set to 0x0 to allow
for the pendsv IRQ to be taken. This is done for both via a call to
irq_unlock(0).
After this unlock, a pendsv irq will be taken, either at the tail end
of the current irq handling if we are in handler mode, or immediately
due to the pendsv being asserted (no other outstanding irqs). The next
thread will be scheduled.
Upon return from the context switch to the original
thread, the priority mask will already be correct due to the pendsv
processing.
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2018-02-22 14:22:45 +08:00
|
|
|
swap.c
|
|
|
|
swap_helper.S
|
2017-10-27 21:43:34 +08:00
|
|
|
fault.c
|
|
|
|
irq_manage.c
|
|
|
|
thread.c
|
|
|
|
cpu_idle.S
|
|
|
|
fault_s.S
|
|
|
|
fatal.c
|
|
|
|
sys_fatal_error_handler.c
|
|
|
|
thread_abort.c
|
|
|
|
)
|
|
|
|
|
2018-03-28 18:00:20 +08:00
|
|
|
zephyr_library_sources_ifdef(CONFIG_GEN_SW_ISR_TABLE isr_wrapper.S)
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_CPLUSPLUS __aeabi_atexit.c)
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_IRQ_OFFLOAD irq_offload.c)
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_CPU_CORTEX_M0 irq_relay.S)
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_USERSPACE userspace.S)
|
2017-10-27 21:43:34 +08:00
|
|
|
|
|
|
|
add_subdirectory_ifdef(CONFIG_CPU_CORTEX_M cortex_m)
|
2018-09-17 21:03:43 +08:00
|
|
|
add_subdirectory_ifdef(CONFIG_ARM_MPU cortex_m/mpu)
|
2018-03-28 21:30:40 +08:00
|
|
|
add_subdirectory_ifdef(CONFIG_CPU_CORTEX_M_HAS_CMSE cortex_m/cmse)
|
2018-03-22 22:26:26 +08:00
|
|
|
add_subdirectory_ifdef(CONFIG_ARM_SECURE_FIRMWARE cortex_m/tz)
|