interrupt

interrupt - { int old_in = in_interrupt; in_interrupt = 1;...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <types.h> #include <lib.h> #include <machine/bus.h> #include <machine/spl.h> #include <machine/pcb.h> /* Global that signals if we're presently in an interrupt handler. */ int in_interrupt; /* * General interrupt handler for mips. * "cause" is the contents of the c0_cause register. */ #define LAMEBUS_IRQ_BIT 0x00000400 #define LAMEBUS_NMI_BIT 0x00000800 void mips_interrupt(u_int32_t cause)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { int old_in = in_interrupt; in_interrupt = 1; /* interrupts should be off */ assert(curspl&gt;0); if (cause &amp; LAMEBUS_IRQ_BIT) { mips_lamebus_interrupt(); } else if (cause &amp; LAMEBUS_NMI_BIT) { panic(&quot;Received NMI\n&quot;); } else { panic(&quot;Unknown interrupt; cause register is %08x\n&quot;, cause); } in_interrupt = old_in; }...
View Full Document

Ask a homework question - tutors are online