git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1847 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
c66c182894
commit
da542ee0ca
@ -44,6 +44,7 @@ rt_hw_interrupt_disable:
|
||||
|
||||
RTSD r15, 8
|
||||
AND r0, r0, r0
|
||||
|
||||
.end rt_hw_interrupt_disable
|
||||
|
||||
/*
|
||||
@ -56,6 +57,7 @@ rt_hw_interrupt_disable:
|
||||
rt_hw_interrupt_enable:
|
||||
RTSD r15, 8
|
||||
MTS rMSR, r5 /* Move the saved status from r5 into rMSR */
|
||||
|
||||
.end rt_hw_interrupt_enable
|
||||
|
||||
/*
|
||||
@ -81,7 +83,7 @@ rt_hw_context_switch:
|
||||
BNEI r3, rt_hw_context_switch_ie /*if IE bit set,should be use RTID (return from interrupt). */
|
||||
|
||||
LWI r3, r1, STACK_RMSR
|
||||
MTS RMSR,r3
|
||||
MTS RMSR, r3
|
||||
POP_ALL
|
||||
ADDIK r1, r1, STACK_SIZE
|
||||
RTSD r15, 8
|
||||
@ -91,12 +93,13 @@ rt_hw_context_switch_ie:
|
||||
|
||||
LWI r3, r1, STACK_RMSR
|
||||
ANDNI r3, r3, IE_BIT /* clear IE bit, prevent interrupt occur immediately*/
|
||||
MTS RMSR,r3
|
||||
MTS RMSR, r3
|
||||
LWI r3, r1, STACK_R03
|
||||
POP_ALL
|
||||
ADDIK r1, r1, STACK_SIZE
|
||||
RTID r14, 0 /* IE bit will be set automatically */
|
||||
AND r0, r0, r0
|
||||
|
||||
.end rt_hw_context_switch
|
||||
|
||||
/*
|
||||
@ -110,7 +113,7 @@ rt_hw_context_switch_to:
|
||||
LWI r1, r5, 0 /* get new task stack pointer */
|
||||
LWI r3, r1, STACK_RMSR
|
||||
ANDNI r3, r3, IE_BIT /* clear IE bit, prevent interrupt occur immediately*/
|
||||
MTS RMSR,r3
|
||||
MTS RMSR, r3
|
||||
POP_ALL
|
||||
ADDIK r1, r1, STACK_SIZE
|
||||
RTID r14, 0 /* IE bit will be set automatically */
|
||||
@ -138,15 +141,15 @@ rt_hw_context_switch_interrupt:
|
||||
LA r3, r0, rt_interrupt_from_thread /* set rt_interrupt_from_thread */
|
||||
SWI r5, r3, 0 /* rt_interrupt_from_thread = from */
|
||||
_reswitch:
|
||||
LA r3, r0, rt_interrupt_to_thread /* set rt_interrupt_to_thread */
|
||||
LA r3, r0, rt_interrupt_to_thread/* set rt_interrupt_to_thread */
|
||||
SWI r6, r3, 0 /* rt_interrupt_to_thread = to */
|
||||
RTSD r15, 8
|
||||
AND r0, r0, r0
|
||||
|
||||
.end rt_hw_context_switch_interrupt
|
||||
|
||||
|
||||
.globl _interrupt_handler
|
||||
.section .text
|
||||
.align 2
|
||||
.ent _interrupt_handler
|
||||
.type _interrupt_handler, @function
|
||||
@ -166,7 +169,7 @@ _interrupt_handler:
|
||||
BRLID r15, rt_interrupt_leave
|
||||
AND r0, r0, r0
|
||||
|
||||
/*
|
||||
/*
|
||||
* if rt_thread_switch_interrupt_flag set, jump to
|
||||
* rt_hw_context_switch_interrupt_do and don't return
|
||||
*/
|
||||
@ -178,7 +181,7 @@ _interrupt_handler:
|
||||
|
||||
LWI r3, r1, STACK_RMSR
|
||||
ANDNI r3, r3, IE_BIT
|
||||
MTS RMSR,r3
|
||||
MTS RMSR, r3
|
||||
POP_ALL
|
||||
ADDIK r1, r1, STACK_SIZE
|
||||
|
||||
@ -204,7 +207,7 @@ rt_hw_context_switch_interrupt_do:
|
||||
BNEI r3, return_with_ie /*if IE bit set,should be use RTID (return from interrupt). */
|
||||
|
||||
LWI r3, r1, STACK_RMSR
|
||||
MTS RMSR,r3
|
||||
MTS RMSR, r3
|
||||
POP_ALL
|
||||
ADDIK r1, r1, STACK_SIZE
|
||||
RTSD r15, 8
|
||||
@ -214,11 +217,12 @@ return_with_ie:
|
||||
|
||||
LWI r3, r1, STACK_RMSR
|
||||
ANDNI r3, r3, IE_BIT /* clear IE bit, prevent interrupt occur immediately*/
|
||||
MTS RMSR,r3
|
||||
MTS RMSR, r3
|
||||
LWI r3, r1, STACK_R03
|
||||
POP_ALL
|
||||
ADDIK r1, r1, STACK_SIZE
|
||||
RTID r14, 0 /* IE bit will be set automatically */
|
||||
AND r0, r0, r0
|
||||
|
||||
.end _interrupt_handler
|
||||
.end _interrupt_handler
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user