Changeset 8db3f0e in rtems for cpukit/score/cpu/riscv/cpu.c


Ignore:
Timestamp:
Jul 19, 2018, 10:11:19 AM (15 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
7fe4855
Parents:
5694b0c
git-author:
Sebastian Huber <sebastian.huber@…> (07/19/18 10:11:19)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/25/18 08:07:43)
Message:

riscv: Rework exception handling

Remove _CPU_ISR_install_raw_handler() and _CPU_ISR_install_vector()
functions. Applications can install an exception handler via the fatal
error handler to handle synchronous exceptions.

Handle interrupt exceptions via _RISCV_Interrupt_dispatch() which must
be provided by the BSP.

Update #3433.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/cpu/riscv/cpu.c

    r5694b0c r8db3f0e  
    174174);
    175175
    176 /* bsp_start_vector_table_begin is the start address of the vector table
    177  * containing addresses to ISR Handlers. It's defined at the BSP linkcmds
    178  * and may differ from one BSP to another.
    179  */
    180 extern char bsp_start_vector_table_begin[];
    181 
    182176void _init(void);
    183177
     
    209203}
    210204
    211 void _CPU_ISR_install_raw_handler(
    212   uint32_t   vector,
    213   proc_ptr    new_handler,
    214   proc_ptr   *old_handler
    215 )
    216 {
    217   /* Do nothing */
    218 }
    219 
    220 void _CPU_ISR_install_vector(
    221   unsigned long    vector,
    222   proc_ptr    new_handler,
    223   proc_ptr   *old_handler
    224 )
    225 {
    226   proc_ptr *table =
    227     (proc_ptr *) bsp_start_vector_table_begin;
    228   proc_ptr current_handler;
    229 
    230   ISR_Level level;
    231 
    232   _ISR_Local_disable( level );
    233 
    234   current_handler = table [vector];
    235 
    236   /* The current handler is now the old one */
    237   if (old_handler != NULL) {
    238     *old_handler = (proc_ptr) current_handler;
    239   }
    240 
    241   /* Write only if necessary to avoid writes to a maybe read-only
    242    * memory */
    243   if (current_handler != new_handler) {
    244     table [vector] = new_handler;
    245   }
    246 
    247   _ISR_Local_enable( level );
    248 
    249 }
    250 
    251205void *_CPU_Thread_Idle_body( uintptr_t ignored )
    252206{
Note: See TracChangeset for help on using the changeset viewer.