#if defined(JAZZ) && defined(R3000) /*++ Copyright (c) 1990 Microsoft Corporation Module Name: j3inter.s Abstract: This module contains the interrupt dispatcher and various interrupt routines for the selftest. The exception dispatcher resides in rom because the BEV bit in the psr is set. Author: Lluis Abello (lluis) 8-May-91 Environment: Executes in kernal mode. Revision History: --*/ #include "led.h" #include "ksmips.h" #include "trap.h" #include "interupt.h" #include "jzconfig.h" #include "dmaregs.h" #include // // PROM entry point definitions. // Define base address of prom entry vector and prom entry macro. // #define PROM_BASE (KSEG1_BASE | 0x1fc00000) #define PROM_ENTRY(x) (PROM_BASE + ((x) * 8)) #define PutLedDisplay PROM_ENTRY(14) .globl TimerTicks .data InterruptTable: // vector of 8 interrupt handler pointers .word 0:8 // initialy set to zero. DeviceIntTable: // vector of 10 device interrupt handler pointers .word 0:10 // initialy set to zero. InterruptNotExpectedMsg: .ascii "\r\nInterrupt not expected.\r\n\0" #define IntOffset 12 TimerTicks: // Counter of timer ticks. Decremented by Timer interrupt handler. .word 0 .text .set noreorder .set noat // //++ //ConnectInterrupts // // Routine Description: // // This routine initializes the interrupt table with pointers to // the interrupt handlers. // // Handlers for the following interrupts are installed: // MCT_ADR Interval Timer // Sonic // Video // Sound // // It also enables interrupts. // // Arguments: // // None. // // Return Value: // // None. // //-- LEAF_ENTRY(ConnectInterrupts) // // Initialize the interrupt dispatch table // la t0,InterruptTable // get address of table la t1,DeviceInt // address of routine sw t1,DEVICE_INT*4(t0) // store in table la t1,IntervalTimerInt // get address of routine sw t1,TIMER_INT*4(t0) // store it in table // // Initialize the device interrupt dispatch table // la t0,DeviceIntTable // get address of table la t1,SonicInterrupt // address of handler sw t1,INTR_SRC_LAN(t0) // store in table la t1,VideoInterrupt // address of handler sw t1,INTR_SRC_VIDEO(t0) // store in table // la t1,SoundInterrupt // address of handler // sw t1,INTR_SRC_SOUND(t0) // store in table // // Initialize the exception dispatch table // li t0,EXCEPTION_JUMP_TABLE // lookup table la t1,InterruptDispatcher // address of interrupt disp sw t1,EXCEPTION_INT(t0) // write in proper entry. // // Enable interrupts. // li t0,(1<< PSR_BEV)+(1<