int-handler.S
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:1k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /*
  2.  *  arch/mips/philips/nino/int-handler.S
  3.  *
  4.  *  Copyright (C) 2001 Steven J. Hill (sjhill@realitydiluted.com)
  5.  *
  6.  * This program is free software; you can redistribute it and/or modify
  7.  * it under the terms of the GNU General Public License version 2 as
  8.  * published by the Free Software Foundation.
  9.  *
  10.  *  Interrupt exception dispatch code for Philips Nino
  11.  */
  12. #include <asm/asm.h>
  13. #include <asm/mipsregs.h>
  14. #include <asm/regdef.h>
  15. #include <asm/stackframe.h>
  16. /*
  17.  * Here is the table of interrupts for the Philips Nino
  18.  * which uses the Philips PR31700/Toshiba TMPR3912 core.
  19.  *
  20.  *   MIPS IRQ             Description
  21.  *   -------- --------------------------------
  22.  *       0 SW0 interrupt (unused)
  23.  *       1 SW1 interrupt (unused)
  24.  *       2
  25.  *       3
  26.  *       4 PR31700 low priority interrupts
  27.  *       5
  28.  *       6 PR31700 high priority interrupts
  29.  *       7
  30.  */
  31. .text
  32. .set noreorder
  33. .set noat
  34. .align 5
  35. NESTED(ninoIRQ, PT_SIZE, sp)
  36. SAVE_ALL
  37. CLI
  38. .set at
  39. mfc0 s0, CP0_CAUSE # determine cause
  40. andi a0, s0, CAUSEF_IP6
  41. beq a0, zero, 1f
  42. andi a0, s0, CAUSEF_IP4 # delay slot
  43. move    a0, sp
  44. jal irq6_dispatch
  45. nop # delay slot
  46. j ret_from_irq
  47. nop # delay slot
  48. 1:
  49. beq a0, zero, 1f
  50. nop # delay slot
  51. move a0, sp
  52. jal irq4_dispatch
  53. nop # delay slot
  54. j ret_from_irq
  55. nop # delay slot
  56. 1:
  57. /* We should never get here */
  58. move a0, sp
  59. j irq_bad
  60. nop
  61. END(ninoIRQ)