Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#4459 closed defect (fixed)

Handling of unexpected traps is unreliable on SPARC

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone:
Component: arch/sparc Version: 6
Severity: normal Keywords: qualification
Cc: Blocked By:
Blocking:

Description

Currently, all traps without special functions are handled by _ISR_Handler(). For traps which occur for example due to

  • instruction access exception
  • illegal instruction
  • privileged instruction
  • fp disabled
  • memory address not aligned
  • fp exception
  • data access exception

errors the trap handling is unreliable since

  1. the stack pointer of the context which caused the trap is used, and
  1. writeable data structures are used (for example _ISR_Vector_table).

The trap table is initialized to "ta 0" which ends up in a system error mode. In this mode, the RTEMS fatal error handling is by passed and the initial fatal error handlers are not called.

The trap handling should be changed to invoke a statically initialized bad trap handler which performs the RTEMS fatal error procedure and uses a CPU-specific stack with minimum dependencies on the context which caused the trap.

Change History (4)

comment:1 Changed on 06/24/21 at 10:30:30 by Sebastian Huber <sebastian.huber@…>

In [changeset:"955c045b3c66c26899d65dde744d5647588ca91c/rtems" 955c045b/rtems]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems.git does not appear to be a Git repository.

comment:2 Changed on 06/24/21 at 10:30:33 by Sebastian Huber <sebastian.huber@…>

In [changeset:"d73e657e063e3d34db16fa4bce6c2ab1e5e22ec4/rtems" d73e657e/rtems]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems.git does not appear to be a Git repository.

comment:3 Changed on 12/02/21 at 15:21:46 by Sebastian Huber <sebastian.huber@…>

In [changeset:"87d1f4d762769c05e4fb950a739c57f610187665/rtems-docs" 87d1f4d/rtems-docs]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems-docs.git does not appear to be a Git repository.

comment:4 Changed on 12/02/21 at 15:21:48 by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: assignedclosed

In [changeset:"835ece14cca47f51d8f3e8088019f0ffa761e702/rtems-docs" 835ece1/rtems-docs]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems-docs.git does not appear to be a Git repository.
Note: See TracTickets for help on using tickets.