summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-08-14 23:08:04 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-08-14 23:08:04 +0000
commit8e0738e1e643041794c633e76135235d83d9bf9a (patch)
treeba45f962bdd13a330beebcbb3592e1d8ac1c1560 /cpukit
parent2002-08-14 Greg Menke <gregory.menke@gsfc.nasa.gov> (diff)
downloadrtems-8e0738e1e643041794c633e76135235d83d9bf9a.tar.bz2
2002-08-14 Brett Swimley <brett.swimley@aedinc.net>
* cpu_asm.S: Per PR267, the _ISR_Handler() function never was modifying _ISR_Nest_level, and _Watchdog_Insert() requires this variable to be modified to determine if an interrupt may have modified the watchdog chain. Prior to modifying _ISR_Handler(), I had a test that would fail if _ISR_Flash was not commented out in _Watchdog_Insert(). After this modification was made, my test ran flawlessly.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/score/cpu/m68k/ChangeLog10
-rw-r--r--cpukit/score/cpu/m68k/cpu_asm.S9
-rw-r--r--cpukit/score/cpu/m68k/rtems/score/cpu.h13
3 files changed, 30 insertions, 2 deletions
diff --git a/cpukit/score/cpu/m68k/ChangeLog b/cpukit/score/cpu/m68k/ChangeLog
index 4326643639..4d4f3a72a2 100644
--- a/cpukit/score/cpu/m68k/ChangeLog
+++ b/cpukit/score/cpu/m68k/ChangeLog
@@ -1,3 +1,13 @@
+2002-08-14 Brett Swimley <brett.swimley@aedinc.net>
+
+ * cpu_asm.S: Per PR267, the _ISR_Handler() function never was modifying
+ _ISR_Nest_level, and _Watchdog_Insert() requires this variable
+ to be modified to determine if an interrupt may have modified
+ the watchdog chain. Prior to modifying _ISR_Handler(), I had
+ a test that would fail if _ISR_Flash was not commented out in
+ _Watchdog_Insert(). After this modification was made, my test
+ ran flawlessly.
+
2002-08-05 Joel Sherrill <joel@OARcorp.com>
* Per PR260 eliminate use of make-target-options. This impacted
diff --git a/cpukit/score/cpu/m68k/cpu_asm.S b/cpukit/score/cpu/m68k/cpu_asm.S
index 0d14c16401..c8357a09c5 100644
--- a/cpukit/score/cpu/m68k/cpu_asm.S
+++ b/cpukit/score/cpu/m68k/cpu_asm.S
@@ -139,6 +139,8 @@ SYM (_ISR_Handler):
#if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 )
+ tstl SYM (_ISR_Nest_level) | Interrupting an interrupt handler?
+ bne 2f | Yes, just skip over stack switch code
movel _CPU_Interrupt_stack_high,a0 | a0 now point just above interrupt stack
cmpl _CPU_Interrupt_stack_low,a7 | stack below interrupt stack?
bcs.b 1f | yes, switch to interrupt stack
@@ -151,6 +153,8 @@ SYM (_ISR_Handler):
2:
#endif /* CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 */
+ addql #1,SYM(_ISR_Nest_level) | one nest level deeper
+
movel SYM (_ISR_Vector_table),a0 | a0= base of RTEMS table
#if ( M68K_HAS_PREINDEXING == 1 )
movel (a0,d0:w:1),a0 | a0 = address of user routine
@@ -165,14 +169,17 @@ SYM (_ISR_Handler):
addql #4,a7 | remove vector number
#if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 )
+ subql #1,SYM(_ISR_Nest_level) | Reduce interrupt-nesting count
+ bne 1f | Skip if return to interrupt
movel _CPU_Interrupt_stack_high,a0
subql #4,a0
cmpl a0,a7 | At top of interrupt stack?
bne.b 1f | No, do not restore task stack pointer
movel (a7),a7 | Restore task stack pointer
1:
+#else
+ subql #1,SYM (_ISR_Nest_level) | one less nest level
#endif /* CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 */
-
subql #1,SYM (_Thread_Dispatch_disable_level)
| unnest multitasking
bne.b exit | If dispatch disabled, exit
diff --git a/cpukit/score/cpu/m68k/rtems/score/cpu.h b/cpukit/score/cpu/m68k/rtems/score/cpu.h
index d988b4e4eb..8d4b46608e 100644
--- a/cpukit/score/cpu/m68k/rtems/score/cpu.h
+++ b/cpukit/score/cpu/m68k/rtems/score/cpu.h
@@ -84,7 +84,7 @@ extern "C" {
#define CPU_IDLE_TASK_IS_FP FALSE
#define CPU_USE_DEFERRED_FP_SWITCH TRUE
-#define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
+#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
#define CPU_STACK_GROWS_UP FALSE
#define CPU_STRUCTURE_ALIGNMENT
@@ -417,6 +417,17 @@ unsigned32 _CPU_ISR_Get_level( void );
/* end of Context handler macros */
/*
+ * _CPU_Thread_Idle_body
+ *
+ * This routine is the CPU dependent IDLE thread body.
+ *
+ * NOTE: It need only be provided if CPU_PROVIDES_IDLE_THREAD_BODY
+ * is TRUE.
+ */
+
+void _CPU_Thread_Idle_body( void );
+
+/*
* Fatal Error manager macros
*
* These macros perform the following functions: