arm: remove support for legacy kernels
Change-Id: I93c2dd6bf7286f50cb2702a94cbc85dc3bdee807 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
dccec68e0f
commit
3a6bd2a552
10 changed files with 31 additions and 318 deletions
|
@ -36,10 +36,7 @@ _ASM_FILE_PROLOGUE
|
|||
GTEXT(_ExcExit)
|
||||
GTEXT(_IntExit)
|
||||
GDATA(_nanokernel)
|
||||
|
||||
#ifdef CONFIG_KERNEL_V2
|
||||
GTEXT(_is_next_thread_current)
|
||||
#endif
|
||||
|
||||
#if CONFIG_GDB_INFO
|
||||
#define _EXIT_EXC_IF_FIBER_PREEMPTED beq _ExcExitWithGdbStub
|
||||
|
@ -93,44 +90,28 @@ SECTION_SUBSEC_FUNC(TEXT, _HandlerModeExit, _ExcExit)
|
|||
|
||||
ldr r1, =_nanokernel
|
||||
|
||||
#ifdef CONFIG_KERNEL_V2
|
||||
ldr r1, [r1, #__tNANO_current_OFFSET]
|
||||
ldr r1, [r1, #__tNANO_current_OFFSET]
|
||||
ldr r2, [r1, #__tTCS_prio_OFFSET]
|
||||
ldr r3, [r1, #__tTCS_sched_locked_OFFSET]
|
||||
|
||||
ldr r2, [r1, #__tTCS_prio_OFFSET]
|
||||
ldr r3, [r1, #__tTCS_sched_locked_OFFSET]
|
||||
|
||||
/* coop thread ? do not schedule */
|
||||
cmp r2, #0
|
||||
blt _EXIT_EXC
|
||||
|
||||
/* scheduler locked ? do not schedule */
|
||||
cmp r3, #0
|
||||
bgt _EXIT_EXC
|
||||
|
||||
push {lr}
|
||||
blx _is_next_thread_current
|
||||
#if defined(CONFIG_CPU_CORTEX_M0_M0PLUS)
|
||||
pop {r1}
|
||||
mov lr, r1
|
||||
#else
|
||||
pop {lr}
|
||||
#endif /* CONFIG_CPU_CORTEX_M0_M0PLUS */
|
||||
cmp r0, #0
|
||||
bne _EXIT_EXC
|
||||
#else
|
||||
|
||||
/* is the current thread preemptible (task) ? */
|
||||
ldr r2, [r1, #__tNANO_flags_OFFSET]
|
||||
ldr r3, =PREEMPTIBLE
|
||||
ands r2, r3
|
||||
_EXIT_EXC_IF_FIBER_PREEMPTED
|
||||
|
||||
/* is there a fiber ready ? */
|
||||
ldr r2, [r1, #__tNANO_fiber_OFFSET]
|
||||
/* coop thread ? do not schedule */
|
||||
cmp r2, #0
|
||||
_EXIT_EXC_IF_FIBER_NOT_READY
|
||||
blt _EXIT_EXC
|
||||
|
||||
#endif
|
||||
/* scheduler locked ? do not schedule */
|
||||
cmp r3, #0
|
||||
bgt _EXIT_EXC
|
||||
|
||||
push {lr}
|
||||
blx _is_next_thread_current
|
||||
#if defined(CONFIG_CPU_CORTEX_M0_M0PLUS)
|
||||
pop {r1}
|
||||
mov lr, r1
|
||||
#else
|
||||
pop {lr}
|
||||
#endif /* CONFIG_CPU_CORTEX_M0_M0PLUS */
|
||||
cmp r0, #0
|
||||
bne _EXIT_EXC
|
||||
|
||||
/* context switch required, pend the PendSV exception */
|
||||
ldr r1, =_SCS_ICSR
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue