[PATCH 00/10] sparc: Rework trap handling

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Jun 23 06:49:26 UTC 2021


This patch set simplifies the trap handling and makes the handling of
unexpected traps (bad traps) more reliable.  The trap handling through
_ISR_Handler() is now optional.  By default, a statically initialized trap
table is used which performs the normal RTEMS fatal error procedure for bad
traps.  External interrupt traps are handled by the generic interrupt support.

This patch set was tested using the SIS on erc32, leon2, leon3, and gr740.

Sebastian Huber (10):
  score: Remove _CPU_Initialize_vectors()
  score: Remove bogus _ISR_Nest_level setting
  score: Move _ISR_Vector_table[] to separate file
  bsps/sparc: Add a symbol for each trap table entry
  sparc: Move ISR handler install routines
  sparc: More reliable bad trap handling
  bsps/sparc: Use rtems_interrupt_handler_install()
  sparc: Move FP frame offset defines to cpuimpl.h
  bsps: bsp_interrupt_handler_dispatch_unchecked()
  sparc: Simplify trap table initialization

 bsps/include/bsp/irq-generic.h                |  59 +-
 bsps/sparc/erc32/clock/ckinit.c               |  10 +-
 bsps/sparc/erc32/include/bsp.h                |  10 +-
 bsps/sparc/erc32/include/tm27.h               |  24 +-
 bsps/sparc/erc32/start/bspstart.c             |  17 +-
 bsps/sparc/erc32/start/spurious.c             | 194 ------
 bsps/sparc/leon2/clock/ckinit.c               |  14 +-
 bsps/sparc/leon2/include/bsp.h                |  10 +-
 bsps/sparc/leon2/include/tm27.h               |  24 +-
 bsps/sparc/leon2/start/bspstart.c             |   4 +-
 bsps/sparc/leon2/start/spurious.c             | 184 ------
 bsps/sparc/leon3/include/bsp.h                |  10 +-
 bsps/sparc/leon3/include/tm27.h               |  24 +-
 bsps/sparc/leon3/mpci/mpisr.c                 |   9 +-
 bsps/sparc/leon3/start/bspsmp.c               |  34 +-
 bsps/sparc/leon3/start/bspstart.c             |  36 +-
 bsps/sparc/leon3/start/spurious.c             | 183 ------
 bsps/sparc/shared/irq/bsp_isr_handler.c       |  27 +-
 bsps/sparc/shared/irq/irq-shared.c            |  21 -
 bsps/sparc/shared/start/start.S               | 373 ++++++++---
 c/src/lib/libbsp/sparc/erc32/Makefile.am      |   1 -
 c/src/lib/libbsp/sparc/leon2/Makefile.am      |   1 -
 c/src/lib/libbsp/sparc/leon3/Makefile.am      |   1 -
 cpukit/Makefile.am                            |   5 +
 .../score/cpu/bfin/include/rtems/score/cpu.h  |   9 -
 .../score/cpu/lm32/include/rtems/score/cpu.h  |   9 -
 .../score/cpu/m68k/include/rtems/score/cpu.h  |   3 -
 .../score/cpu/moxie/include/rtems/score/cpu.h |   5 -
 .../score/cpu/nios2/include/rtems/score/cpu.h |   2 -
 .../cpu/no_cpu/include/rtems/score/cpu.h      |  11 -
 .../score/cpu/or1k/include/rtems/score/cpu.h  |  10 -
 .../score/cpu/riscv/include/rtems/score/cpu.h |   2 -
 cpukit/score/cpu/sh/include/rtems/score/cpu.h |   8 -
 cpukit/score/cpu/sparc/cpu.c                  | 230 ++-----
 cpukit/score/cpu/sparc/cpu_asm.S              | 157 ++---
 .../score/cpu/sparc/include/rtems/score/cpu.h |  64 +-
 .../cpu/sparc/include/rtems/score/cpuimpl.h   |  43 ++
 cpukit/score/cpu/sparc/sparc-bad-trap.S       | 231 +++++++
 .../cpu/sparc/sparc-exception-frame-print.c   | 157 +++++
 cpukit/score/cpu/sparc/sparc-isr-handler.S    | 620 ++++++++++++++++++
 cpukit/score/cpu/sparc/sparc-isr-install.c    | 194 ++++++
 .../cpu/sparc64/include/rtems/score/cpu.h     |   6 -
 .../cpu/x86_64/include/rtems/score/cpu.h      |   2 -
 cpukit/score/src/isr.c                        |  16 -
 cpukit/score/src/isrvectortable.c             |  48 ++
 spec/build/bsps/sparc/erc32/bsperc32.yml      |   1 -
 spec/build/bsps/sparc/leon2/obj.yml           |   1 -
 spec/build/bsps/sparc/leon3/obj.yml           |   1 -
 spec/build/cpukit/cpusparc.yml                |   4 +
 spec/build/cpukit/librtemscpu.yml             |   1 +
 50 files changed, 1913 insertions(+), 1197 deletions(-)
 delete mode 100644 bsps/sparc/erc32/start/spurious.c
 delete mode 100644 bsps/sparc/leon2/start/spurious.c
 delete mode 100644 bsps/sparc/leon3/start/spurious.c
 create mode 100644 cpukit/score/cpu/sparc/sparc-bad-trap.S
 create mode 100644 cpukit/score/cpu/sparc/sparc-exception-frame-print.c
 create mode 100644 cpukit/score/cpu/sparc/sparc-isr-handler.S
 create mode 100644 cpukit/score/cpu/sparc/sparc-isr-install.c
 create mode 100644 cpukit/score/src/isrvectortable.c

-- 
2.26.2



More information about the devel mailing list