ip32-irq-glue.S
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:2k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /*
  2.  * Low level interrupt handler for the SGI O2 aka IP32 aka Moosehead
  3.  *
  4.  * This file is subject to the terms and conditions of the GNU General Public
  5.  * License.  See the file "COPYING" in the main directory of this archive
  6.  * for more details.
  7.  *
  8.  * Copyright (C) 2000 Harald Koerfgen
  9.  * Copyright (C) 2001 Keith M Wesolowski
  10.  */
  11. #include <asm/asm.h>
  12. #include <asm/regdef.h>
  13. #include <asm/mipsregs.h>
  14. #include <asm/stackframe.h>
  15. #include <asm/addrspace.h>
  16. #include <asm/ip32/ip32_ints.h>
  17. .text
  18. .set    noreorder
  19. .set    noat
  20. .align  5
  21. NESTED(ip32_handle_int, PT_SIZE, ra)
  22. .set    noat
  23. SAVE_ALL
  24. CLI # TEST: interrupts should be off
  25. .set    at
  26. .set    noreorder
  27. mfc0 s0,CP0_CAUSE
  28. andi t1, s0, IE_IRQ0
  29. bnez t1, handle_irq0
  30.  andi t1, s0, IE_IRQ1
  31. bnez t1, handle_irq1
  32.  andi t1, s0, IE_IRQ2
  33. bnez t1, handle_irq2
  34.  andi t1, s0, IE_IRQ3
  35. bnez t1, handle_irq3
  36.  andi t1, s0, IE_IRQ4
  37. bnez t1, handle_irq4
  38.  andi t1, s0, IE_IRQ5
  39. bnez t1, handle_irq5
  40.  nop
  41. /* Either someone has triggered the "software interrupts"
  42.  * or we lost an interrupt somehow.  Ignore it.
  43.  */
  44. j ret_from_irq
  45.  nop
  46. handle_irq0:
  47. jal ip32_irq0
  48.  move a0, sp
  49. j ret_from_irq
  50.  nop
  51. handle_irq1:
  52. jal ip32_irq1
  53.  move a0, sp
  54. j ret_from_irq
  55.  nop
  56. handle_irq2:
  57. jal ip32_irq2
  58.  move a0, sp
  59. j ret_from_irq
  60.  nop
  61. handle_irq3:
  62. jal ip32_irq3
  63.  move a0, sp
  64. j ret_from_irq
  65.  nop
  66. handle_irq4:
  67. jal ip32_irq4
  68.  move a0, sp
  69. j ret_from_irq
  70.  nop
  71. handle_irq5:
  72. jal ip32_irq5
  73. move a0, sp
  74. j ret_from_irq
  75.  nop
  76. END(ip32_handle_int)