source: rtems/bsps/mips/hurricane/irq/vectorisrs.c @ 8f8ccee

5
Last change on this file since 8f8ccee was 8f8ccee, checked in by Sebastian Huber <sebastian.huber@…>, on 04/23/18 at 07:50:39

bsps: Move interrupt controller support to bsps

This patch is a part of the BSP source reorganization.

Update #3285.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/**
2 *  @file
3 *
4 *  RM5231 Interrupt Vectoring 
5 */
6
7/*
8 *  COPYRIGHT (c) 1989-2012.
9 *  On-Line Applications Research Corporation (OAR).
10 *
11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
13 *  http://www.rtems.org/license/LICENSE.
14 */
15
16#include <rtems.h>
17#include <stdlib.h>
18#include <libcpu/isr_entries.h>
19#include <libcpu/rm5231.h>
20#include <bsp/irq.h>
21#include <bsp/irq-generic.h>
22
23#include <rtems/bspIo.h>  /* for printk */
24
25void mips_default_isr( int vector );
26
27void mips_vector_isr_handlers( CPU_Interrupt_frame *frame )
28{
29  unsigned int sr;
30  unsigned int cause;
31  unsigned int i;
32  unsigned int mask;
33
34  mips_get_sr( sr );
35  mips_get_cause( cause );
36
37  cause &= (sr & SR_IMASK);
38  cause >>= CAUSE_IPSHIFT;
39
40  for ( i=1, mask=0x80 ; i<=8 ; i++, mask >>= 1 ) {
41    if ( cause & mask )
42      bsp_interrupt_handler_dispatch( MIPS_INTERRUPT_BASE + 8 - i );
43  }
44}
45
46void mips_default_isr( int vector )
47{
48  unsigned int sr;
49  unsigned int cause;
50
51  mips_get_sr( sr );
52  mips_get_cause( cause );
53
54  printk( "Unhandled isr exception: vector 0x%02x, cause 0x%08X, sr 0x%08X\n",
55      vector, cause, sr );
56  rtems_fatal_error_occurred(1);
57}
58
Note: See TracBrowser for help on using the repository browser.