diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-09-30 13:02:30 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-09-30 13:02:30 +0000 |
commit | 17408b901bc26f97aab23786801382d28b754231 (patch) | |
tree | 2f58989556bcaf95c14affb8334b0ebff5d22c50 /c/src/exec/score/cpu | |
parent | Made cosmetic changes and documented routines in this file (diff) | |
download | rtems-17408b901bc26f97aab23786801382d28b754231.tar.bz2 |
Patch from Eric Norum <eric@skatter.USask.Ca>:
I found that my 68040/68360 test programs would not run even after
I fixed the `wrong BSP' problem.
It seems that there's a bug in the interrupt handling code for
processors with hardware interrupt stacks (e.g. 68040). The wrong
status register was getting pushed on the stack for the `return
from exception' to call _ISR__Dispatch. This ended up making
the context switch code run on the interrupt stack, so interrupt-driven
context switches would always fail.
I guess that no one has tried running any of the RTEMS-4.0 snapshots
on a 68040 machine!
Anyhow, here are the patches for
1) gen68360.cfg --- to fix the `wrong-BSP' problem.
2) m68k/cpu_asm.s --- to fix the hardware interrupt stack problem.
With these patches in place, the network demo programs run on my
68040/68360 system. The paranoia program runs with no failures,
defects nor flaws.
Diffstat (limited to 'c/src/exec/score/cpu')
-rw-r--r-- | c/src/exec/score/cpu/m68k/cpu_asm.s | 2 | ||||
-rw-r--r-- | c/src/exec/score/cpu/m68k/m68k.h | 17 |
2 files changed, 1 insertions, 18 deletions
diff --git a/c/src/exec/score/cpu/m68k/cpu_asm.s b/c/src/exec/score/cpu/m68k/cpu_asm.s index 0251335909..6f02897bec 100644 --- a/c/src/exec/score/cpu/m68k/cpu_asm.s +++ b/c/src/exec/score/cpu/m68k/cpu_asm.s @@ -238,7 +238,7 @@ bframe: clrl SYM (_ISR_Signals_to_thread_executing) movec msp,a0 | a0 = master stack pointer movew #0,a0@- | push format word movel #SYM(_ISR_Dispatch),a0@- | push return addr - movew sr,a0@- | push existing sr + movew a0@(6),a0@- | push saved sr movec a0,msp | set master stack pointer #else jsr SYM (_Thread_Dispatch) | Perform context switch diff --git a/c/src/exec/score/cpu/m68k/m68k.h b/c/src/exec/score/cpu/m68k/m68k.h index e7869b6ffa..5f4c3597b5 100644 --- a/c/src/exec/score/cpu/m68k/m68k.h +++ b/c/src/exec/score/cpu/m68k/m68k.h @@ -148,23 +148,6 @@ extern "C" { # define M68K_HAS_FPSP_PACKAGE 0 # endif -#elif defined(__mc68060__) - -#define CPU_MODEL_NAME "m68060" -#define M68K_HAS_VBR 1 -#define M68K_HAS_SEPARATE_STACKS 0 -#define M68K_HAS_BFFFO 1 -#define M68K_HAS_PREINDEXING 1 -#define M68K_HAS_EXTB_L 1 -#define M68K_HAS_MISALIGNED 1 -# if defined (__HAVE_68881__) -# define M68K_HAS_FPU 1 -# define M68K_HAS_FPSP_PACKAGE 1 -# else -# define M68K_HAS_FPU 0 -# define M68K_HAS_FPSP_PACKAGE 0 -# endif - #elif defined(__mc68302__) #define CPU_MODEL_NAME "m68302" #define M68K_HAS_VBR 0 |