Changeset 17408b90 in rtems


Ignore:
Timestamp:
Sep 30, 1998, 1:02:30 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
9dd23877
Parents:
982ed3f8
Message:

Patch from Eric Norum <eric@…>:

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 _ISRDispatch. 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.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/score/cpu/m68k/cpu_asm.s

    r982ed3f8 r17408b90  
    239239        movew   #0,a0@-                  | push format word
    240240        movel   #SYM(_ISR_Dispatch),a0@- | push return addr
    241         movew   sr,a0@-                  | push existing sr
     241        movew   a0@(6),a0@-              | push saved sr
    242242        movec   a0,msp                   | set master stack pointer
    243243#else
  • c/src/exec/score/cpu/m68k/m68k.h

    r982ed3f8 r17408b90  
    120120#define M68K_HAS_VBR             1
    121121#define M68K_HAS_SEPARATE_STACKS 1
    122 #define M68K_HAS_BFFFO           1
    123 #define M68K_HAS_PREINDEXING     1
    124 #define M68K_HAS_EXTB_L          1
    125 #define M68K_HAS_MISALIGNED      1
    126 # if defined (__HAVE_68881__)
    127 # define M68K_HAS_FPU            1
    128 # define M68K_HAS_FPSP_PACKAGE   1
    129 # else
    130 # define M68K_HAS_FPU            0
    131 # define M68K_HAS_FPSP_PACKAGE   0
    132 # endif
    133  
    134 #elif defined(__mc68060__)
    135 
    136 #define CPU_MODEL_NAME          "m68060"
    137 #define M68K_HAS_VBR             1
    138 #define M68K_HAS_SEPARATE_STACKS 0
    139122#define M68K_HAS_BFFFO           1
    140123#define M68K_HAS_PREINDEXING     1
  • make/custom/gen68360.cfg

    r982ed3f8 r17408b90  
    1919# This is the actual bsp directory used during the build process.
    2020RTEMS_BSP_FAMILY=gen68360
    21 
    22 ## Target compiler config file, if any
    23 CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
    24 
    25 # We may install in a CPU model based directory but this is still
    26 # a gen68360 based bsp.
    27 RTEMS_BSP=gen68360
    2821
    2922#
Note: See TracChangeset for help on using the changeset viewer.