source: rtems/c/src/lib/libbsp/mips/malta/irq/vectorisrs.c @ 8ef8a32

5
Last change on this file since 8ef8a32 was 8ef8a32, checked in by Sebastian Huber <sebastian.huber@…>, on 11/11/16 at 09:48:14

bsps/mips: Use <libcpu/isr_entries.h>

Avoid duplicate mips_vector_isr_handlers() declarations.

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/**
2 *  @file
3 *
4 */
5
6/*
7 *  COPYRIGHT (c) 1989-2012.
8 *  On-Line Applications Research Corporation (OAR).
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.rtems.org/license/LICENSE.
13 */
14
15#include <rtems.h>
16#include <stdlib.h>
17#include <bsp/irq-generic.h>
18#include <bsp/pci.h>
19#include <bsp/i8259.h>
20#include <bsp.h>
21#include <libcpu/isr_entries.h>
22
23void mips_default_isr( int vector );
24
25#include <rtems/bspIo.h>  /* for printk */
26
27void mips_vector_isr_handlers( CPU_Interrupt_frame *frame )
28{
29  unsigned int sr;
30  unsigned int cause;
31  unsigned int pending;
32
33  mips_get_sr( sr );
34  mips_get_cause( cause );
35
36  pending = (cause & sr & 0xff00) >> CAUSE_IPSHIFT;
37
38  /* SW Bits */
39  if ( pending & 0x01) {
40    printk("Pending IRQ Q 0x%x\n", pending );
41  }
42
43  if ( pending & 0x02) {
44    printk("Pending IRQ Q 0x%x\n", pending );
45  }
46
47  /* South Bridge Interrupt */
48  if ( pending & 0x04) {
49     BSP_i8259s_int_process();
50  }
51
52  /* South Bridge SMI */
53  if (pending & 0x08){
54    printk( "Pending IRQ 0x%x\n", pending );
55  }
56
57  /* TTY 2 */
58  if (pending & 0x10) {
59    printk( "Pending IRQ 0x%x\n", pending );
60  }
61  /* Core HI */
62  if (pending & 0x20) {
63    printk( "Pending IRQ 0x%x\n", pending );
64  }
65   /* Core LO */
66  if (pending & 0x40) {
67    printk( "Pending IRQ 0x%x\n", pending );
68  }
69
70  if ( pending & 0x80 ) {
71    bsp_interrupt_handler_dispatch( MALTA_INT_TICKER );
72  }
73}
74
75void mips_default_isr( int vector )
76{
77  unsigned int sr;
78  unsigned int cause;
79
80  mips_get_sr( sr );
81  mips_get_cause( cause );
82
83  printk( "Unhandled isr exception: vector 0x%02x, cause 0x%08X, sr 0x%08X\n",
84      vector, cause, sr );
85
86  while(1);      /* Lock it up */
87
88  rtems_fatal_error_occurred(1);
89}
90
Note: See TracBrowser for help on using the repository browser.