mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 23:23:13 +00:00
2009-03-12 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1385/cpukit * cpu_asm.S: When the type rtems_boolean was switched to the C99 bool, the size changed from 4 bytes to 1 byte. The interrupt dispatching code accesses two boolean variables for scheduling purposes and the assembly implementations of this code did not get updated.
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
2009-03-12 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
PR 1385/cpukit
|
||||||
|
* cpu_asm.S: When the type rtems_boolean was switched to the C99 bool,
|
||||||
|
the size changed from 4 bytes to 1 byte. The interrupt dispatching
|
||||||
|
code accesses two boolean variables for scheduling purposes and the
|
||||||
|
assembly implementations of this code did not get updated.
|
||||||
|
|
||||||
2009-02-12 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2009-02-12 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* cpu.c, rtems/score/cpu.h: Change prototype of IDLE thread to
|
* cpu.c, rtems/score/cpu.h: Change prototype of IDLE thread to
|
||||||
|
|||||||
@@ -474,7 +474,7 @@ noHandler:
|
|||||||
sp = [sp];
|
sp = [sp];
|
||||||
noStackRestore:
|
noStackRestore:
|
||||||
|
|
||||||
/* check this stuff to insure context_switch_necessary and
|
/* check this stuff to ensure context_switch_necessary and
|
||||||
isr_signals_to_thread_executing are being handled appropriately. */
|
isr_signals_to_thread_executing are being handled appropriately. */
|
||||||
p0.h = __Thread_Dispatch_disable_level;
|
p0.h = __Thread_Dispatch_disable_level;
|
||||||
p0.l = __Thread_Dispatch_disable_level;
|
p0.l = __Thread_Dispatch_disable_level;
|
||||||
@@ -487,17 +487,17 @@ noStackRestore:
|
|||||||
/* do thread dispatch if necessary */
|
/* do thread dispatch if necessary */
|
||||||
p0.h = __Context_Switch_necessary;
|
p0.h = __Context_Switch_necessary;
|
||||||
p0.l = __Context_Switch_necessary;
|
p0.l = __Context_Switch_necessary;
|
||||||
r0 = [p0];
|
r0 = B[p0] (Z);
|
||||||
cc = r0 == 0;
|
cc = r0 == 0;
|
||||||
p0.h = __ISR_Signals_to_thread_executing;
|
p0.h = __ISR_Signals_to_thread_executing;
|
||||||
p0.l = __ISR_Signals_to_thread_executing;
|
p0.l = __ISR_Signals_to_thread_executing;
|
||||||
if !cc jump doDispatch
|
if !cc jump doDispatch
|
||||||
r0 = [p0];
|
r0 = B[p0] (Z);
|
||||||
cc = r0 == 0;
|
cc = r0 == 0;
|
||||||
if cc jump noDispatch
|
if cc jump noDispatch
|
||||||
doDispatch:
|
doDispatch:
|
||||||
r0 = 0;
|
r0 = 0;
|
||||||
[p0] = r0;
|
B[p0] = r0;
|
||||||
raise 15;
|
raise 15;
|
||||||
noDispatch:
|
noDispatch:
|
||||||
r0 = [sp++];
|
r0 = [sp++];
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
2009-03-12 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
PR 1385/cpukit
|
||||||
|
* cpu_asm.S: When the type rtems_boolean was switched to the C99 bool,
|
||||||
|
the size changed from 4 bytes to 1 byte. The interrupt dispatching
|
||||||
|
code accesses two boolean variables for scheduling purposes and the
|
||||||
|
assembly implementations of this code did not get updated.
|
||||||
|
|
||||||
2009-02-12 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2009-02-12 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* cpu.c: Change prototype of IDLE thread to consistently return void *
|
* cpu.c: Change prototype of IDLE thread to consistently return void *
|
||||||
|
|||||||
@@ -148,10 +148,10 @@ nested:
|
|||||||
mov.l er1,@__Thread_Dispatch_disable_level
|
mov.l er1,@__Thread_Dispatch_disable_level
|
||||||
bne exit
|
bne exit
|
||||||
|
|
||||||
mov.l @__Context_Switch_necessary,er1
|
mov.b @__Context_Switch_necessary,er1
|
||||||
bne bframe ; If yes then dispatch next task
|
bne bframe ; If yes then dispatch next task
|
||||||
|
|
||||||
mov.l @__ISR_Signals_to_thread_executing,er1
|
mov.b @__ISR_Signals_to_thread_executing,er1
|
||||||
beq exit ; If no signals waiting
|
beq exit ; If no signals waiting
|
||||||
|
|
||||||
/* Context switch here through ISR_Dispatch */
|
/* Context switch here through ISR_Dispatch */
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
2009-03-12 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
PR 1385/cpukit
|
||||||
|
* cpu_asm.S: When the type rtems_boolean was switched to the C99 bool,
|
||||||
|
the size changed from 4 bytes to 1 byte. The interrupt dispatching
|
||||||
|
code accesses two boolean variables for scheduling purposes and the
|
||||||
|
assembly implementations of this code did not get updated.
|
||||||
|
|
||||||
2009-02-12 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2009-02-12 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* rtems/score/cpu.h: Change prototype of IDLE thread to consistently
|
* rtems/score/cpu.h: Change prototype of IDLE thread to consistently
|
||||||
|
|||||||
@@ -337,16 +337,16 @@ SYM (_ISR_Handler):
|
|||||||
beq.b exit
|
beq.b exit
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
tstl SYM (_Context_Switch_necessary)
|
tstb SYM (_Context_Switch_necessary)
|
||||||
| Is thread switch necessary?
|
| Is thread switch necessary?
|
||||||
bne.b bframe | Yes, invoke dispatcher
|
bne.b bframe | Yes, invoke dispatcher
|
||||||
|
|
||||||
tstl SYM (_ISR_Signals_to_thread_executing)
|
tstb SYM (_ISR_Signals_to_thread_executing)
|
||||||
| signals sent to Run_thread
|
| signals sent to Run_thread
|
||||||
| while in interrupt handler?
|
| while in interrupt handler?
|
||||||
beq.b exit | No, then exit
|
beq.b exit | No, then exit
|
||||||
|
|
||||||
bframe: clrl SYM (_ISR_Signals_to_thread_executing)
|
bframe: clrb SYM (_ISR_Signals_to_thread_executing)
|
||||||
| If sent, will be processed
|
| If sent, will be processed
|
||||||
#if ( M68K_HAS_SEPARATE_STACKS == 1 )
|
#if ( M68K_HAS_SEPARATE_STACKS == 1 )
|
||||||
movec msp,a0 | a0 = master stack pointer
|
movec msp,a0 | a0 = master stack pointer
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
2009-03-12 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
PR 1385/cpukit
|
||||||
|
* cpu_asm.S: When the type rtems_boolean was switched to the C99 bool,
|
||||||
|
the size changed from 4 bytes to 1 byte. The interrupt dispatching
|
||||||
|
code accesses two boolean variables for scheduling purposes and the
|
||||||
|
assembly implementations of this code did not get updated.
|
||||||
|
|
||||||
2009-02-12 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2009-02-12 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* cpu.c, rtems/score/cpu.h: Change prototype of IDLE thread to
|
* cpu.c, rtems/score/cpu.h: Change prototype of IDLE thread to
|
||||||
|
|||||||
@@ -584,8 +584,8 @@ ENDFRAME(_CPU_Context_restore)
|
|||||||
|
|
||||||
ASM_EXTERN(_ISR_Nest_level,4)
|
ASM_EXTERN(_ISR_Nest_level,4)
|
||||||
ASM_EXTERN(_Thread_Dispatch_disable_level,4)
|
ASM_EXTERN(_Thread_Dispatch_disable_level,4)
|
||||||
ASM_EXTERN(_Context_Switch_necessary,4)
|
ASM_EXTERN(_Context_Switch_necessary,1)
|
||||||
ASM_EXTERN(_ISR_Signals_to_thread_executing,4)
|
ASM_EXTERN(_ISR_Signals_to_thread_executing,1)
|
||||||
ASM_EXTERN(_Thread_Executing,4)
|
ASM_EXTERN(_Thread_Executing,4)
|
||||||
|
|
||||||
.extern _Thread_Dispatch
|
.extern _Thread_Dispatch
|
||||||
@@ -964,8 +964,8 @@ _ISR_Handler_1:
|
|||||||
* if ( !_Context_Switch_necessary && !_ISR_Signals_to_thread_executing )
|
* if ( !_Context_Switch_necessary && !_ISR_Signals_to_thread_executing )
|
||||||
* goto the label "exit interrupt (simple case)"
|
* goto the label "exit interrupt (simple case)"
|
||||||
*/
|
*/
|
||||||
lw t0,_Context_Switch_necessary
|
lbu t0,_Context_Switch_necessary
|
||||||
lw t1,_ISR_Signals_to_thread_executing
|
lbu t1,_ISR_Signals_to_thread_executing
|
||||||
NOP
|
NOP
|
||||||
or t0,t0,t1
|
or t0,t0,t1
|
||||||
beq t0,zero,_ISR_Handler_exit
|
beq t0,zero,_ISR_Handler_exit
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
2009-03-12 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
PR 1385/cpukit
|
||||||
|
* cpu_asm.S: When the type rtems_boolean was switched to the C99 bool,
|
||||||
|
the size changed from 4 bytes to 1 byte. The interrupt dispatching
|
||||||
|
code accesses two boolean variables for scheduling purposes and the
|
||||||
|
assembly implementations of this code did not get updated.
|
||||||
|
|
||||||
2009-02-12 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2009-02-12 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* rtems/score/cpu.h: Change prototype of IDLE thread to consistently
|
* rtems/score/cpu.h: Change prototype of IDLE thread to consistently
|
||||||
|
|||||||
@@ -665,7 +665,7 @@ dont_fix_pil2:
|
|||||||
* return to the interrupt dispatcher.
|
* return to the interrupt dispatcher.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ld [%l4 + %lo(SYM(_Context_Switch_necessary))], %l5
|
ldub [%l4 + %lo(SYM(_Context_Switch_necessary))], %l5
|
||||||
|
|
||||||
orcc %l5, %g0, %g0 ! Is thread switch necessary?
|
orcc %l5, %g0, %g0 ! Is thread switch necessary?
|
||||||
bnz SYM(_ISR_Dispatch) ! yes, then invoke the dispatcher
|
bnz SYM(_ISR_Dispatch) ! yes, then invoke the dispatcher
|
||||||
@@ -677,7 +677,7 @@ dont_fix_pil2:
|
|||||||
* executing task. If so, we need to invoke the interrupt dispatcher.
|
* executing task. If so, we need to invoke the interrupt dispatcher.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ld [%l6 + %lo(SYM(_ISR_Signals_to_thread_executing))], %l7
|
ldub [%l6 + %lo(SYM(_ISR_Signals_to_thread_executing))], %l7
|
||||||
|
|
||||||
orcc %l7, %g0, %g0 ! Were signals sent to the currently
|
orcc %l7, %g0, %g0 ! Were signals sent to the currently
|
||||||
! executing thread?
|
! executing thread?
|
||||||
@@ -734,11 +734,11 @@ isr_dispatch:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
sethi %hi(SYM(_Context_Switch_necessary)), %l4
|
sethi %hi(SYM(_Context_Switch_necessary)), %l4
|
||||||
ld [%l4 + %lo(SYM(_Context_Switch_necessary))], %l5
|
ldub [%l4 + %lo(SYM(_Context_Switch_necessary))], %l5
|
||||||
|
|
||||||
! NOTE: Use some of delay slot to start loading this
|
! NOTE: Use some of delay slot to start loading this
|
||||||
sethi %hi(SYM(_ISR_Signals_to_thread_executing)), %l6
|
sethi %hi(SYM(_ISR_Signals_to_thread_executing)), %l6
|
||||||
ld [%l6 + %lo(SYM(_ISR_Signals_to_thread_executing))], %l7
|
ldub [%l6 + %lo(SYM(_ISR_Signals_to_thread_executing))], %l7
|
||||||
|
|
||||||
orcc %l5, %g0, %g0 ! Is thread switch necessary?
|
orcc %l5, %g0, %g0 ! Is thread switch necessary?
|
||||||
bnz dispatchAgain ! yes, then invoke the dispatcher AGAIN
|
bnz dispatchAgain ! yes, then invoke the dispatcher AGAIN
|
||||||
|
|||||||
Reference in New Issue
Block a user