File indexing completed on 2025-05-11 08:23:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 #include <rtems.h>
0035 #include <stdlib.h>
0036 #include <bsp/irq-generic.h>
0037 #include <bsp/pci.h>
0038 #include <bsp/i8259.h>
0039 #include <bsp.h>
0040 #include <libcpu/isr_entries.h>
0041
0042 void mips_default_isr( int vector );
0043
0044 #include <rtems/bspIo.h> /* for printk */
0045
0046 void mips_vector_isr_handlers( CPU_Interrupt_frame *frame )
0047 {
0048 unsigned int sr;
0049 unsigned int cause;
0050 unsigned int pending;
0051
0052 mips_get_sr( sr );
0053 mips_get_cause( cause );
0054
0055 pending = (cause & sr & 0xff00) >> CAUSE_IPSHIFT;
0056
0057
0058 if ( pending & 0x01) {
0059 printk("Pending IRQ Q 0x%x\n", pending );
0060 }
0061
0062 if ( pending & 0x02) {
0063 printk("Pending IRQ Q 0x%x\n", pending );
0064 }
0065
0066
0067 if ( pending & 0x04) {
0068 BSP_i8259s_int_process();
0069 }
0070
0071
0072 if (pending & 0x08){
0073 printk( "Pending IRQ 0x%x\n", pending );
0074 }
0075
0076
0077 if (pending & 0x10) {
0078 printk( "Pending IRQ 0x%x\n", pending );
0079 }
0080
0081 if (pending & 0x20) {
0082 printk( "Pending IRQ 0x%x\n", pending );
0083 }
0084
0085 if (pending & 0x40) {
0086 printk( "Pending IRQ 0x%x\n", pending );
0087 }
0088
0089 if ( pending & 0x80 ) {
0090 bsp_interrupt_handler_dispatch( MALTA_INT_TICKER );
0091 }
0092 }
0093
0094 void mips_default_isr( int vector )
0095 {
0096 unsigned int sr;
0097 unsigned int cause;
0098
0099 mips_get_sr( sr );
0100 mips_get_cause( cause );
0101
0102 printk( "Unhandled isr exception: vector 0x%02x, cause 0x%08X, sr 0x%08X\n",
0103 vector, cause, sr );
0104
0105 while(1);
0106
0107 rtems_fatal_error_occurred(1);
0108 }
0109