[RTEMS Project] #4458: Simplify trap table initialization

RTEMS trac trac at rtems.org
Fri Jun 18 15:22:45 UTC 2021


#4458: Simplify trap table initialization
-----------------------------+------------------------------
 Reporter:  Sebastian Huber  |       Owner:  Sebastian Huber
     Type:  enhancement      |      Status:  assigned
 Priority:  normal           |   Milestone:  6.1
Component:  arch/sparc       |     Version:  6
 Severity:  normal           |  Resolution:
 Keywords:  qualification    |  Blocked By:
 Blocking:                   |
-----------------------------+------------------------------
Description changed by Sebastian Huber:

Old description:

> Currently, the trap table is statically initialized (see start.S).
> Unexpected traps end up in system error mode. Later during startup most
> traps are changed to jump to _ISR_Handler(). This is a side-effect of
> bsp_spurious_initialize(). The used functions for this dynamic
> initialization are a bit complex and need cache manager directives which
> involve all online processors. This should be simplified to cover only
> basic requirements.
>
> 1. The _ISR_Vector_table should be initialized by
> _CPU_Initialize_vectors() to an new default handler
> _SPARC_ISR_handler_default() which just invokes _Terminate().
>
> 2. The traps associated with external interrupts (0x11 up to including
> 0x1f) should be statically initialized in start.S to jump to
> _ISR_Handler().
>
> 3. Standard synchronous exceptions such as
>   * 0x01 instruction access exception
>   * 0x02 illegal instruction
>   * 0x03 privileged instruction
>   * 0x04 fp disabled
>   * 0x05 window overflow
>   * 0x06 window underflow
>   * 0x07 memory address not aligned
>   * 0x08 fp exception
>   * 0x09 data access exception
>   * 0x0A tag overflow
>   * 0x24 cp_disabled
>   * 0x28 cp_exception
>
>   should also be statically initialize to jump to _ISR_Handler() to
> invoke the fatal error handler.
>

> If software needs to change the default initialization, then it can use
> set_vector() or alternatives on demand.

New description:

 Currently, the trap table is statically initialized (see start.S).
 Unexpected traps end up in system error mode. Later during startup most
 traps are changed to jump to _ISR_Handler(). This is a side-effect of
 bsp_spurious_initialize(). The used functions for this dynamic
 initialization are a bit complex and need cache manager directives which
 involve all online processors. This should be simplified to cover only
 basic requirements.

 1. The _ISR_Vector_table should be initialized by
 _CPU_Initialize_vectors() to an new default handler
 _SPARC_ISR_handler_default() which just invokes _Terminate().

 2. The traps associated with external interrupts (0x11 up to including
 0x1f) should be statically initialized in start.S to jump to
 _ISR_Handler().

 3. Standard synchronous exceptions such as
   * 0x01 instruction access exception
   * 0x02 illegal instruction
   * 0x03 privileged instruction
   * 0x04 fp disabled
   * 0x07 memory address not aligned
   * 0x08 fp exception
   * 0x09 data access exception
   * 0x0A tag overflow
   * 0x24 cp_disabled
   * 0x28 cp_exception

   should also be statically initialize to jump to _ISR_Handler() to invoke
 the fatal error handler.


 If software needs to change the default initialization, then it can use
 set_vector() or alternatives on demand.

--

--
Ticket URL: <http://devel.rtems.org/ticket/4458#comment:2>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list