misctrap.S 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #ifdef CONFIG_KGDB
  2. .globl arch_kgdb_breakpoint
  3. .type arch_kgdb_breakpoint,#function
  4. arch_kgdb_breakpoint:
  5. ta 0x72
  6. retl
  7. nop
  8. .size arch_kgdb_breakpoint,.-arch_kgdb_breakpoint
  9. #endif
  10. .type __do_privact,#function
  11. __do_privact:
  12. mov TLB_SFSR, %g3
  13. stxa %g0, [%g3] ASI_DMMU ! Clear FaultValid bit
  14. membar #Sync
  15. sethi %hi(109f), %g7
  16. ba,pt %xcc, etrap
  17. 109: or %g7, %lo(109b), %g7
  18. call do_privact
  19. add %sp, PTREGS_OFF, %o0
  20. ba,a,pt %xcc, rtrap
  21. .size __do_privact,.-__do_privact
  22. .type do_mna,#function
  23. do_mna:
  24. rdpr %tl, %g3
  25. cmp %g3, 1
  26. /* Setup %g4/%g5 now as they are used in the
  27. * winfixup code.
  28. */
  29. mov TLB_SFSR, %g3
  30. mov DMMU_SFAR, %g4
  31. ldxa [%g4] ASI_DMMU, %g4
  32. ldxa [%g3] ASI_DMMU, %g5
  33. stxa %g0, [%g3] ASI_DMMU ! Clear FaultValid bit
  34. membar #Sync
  35. bgu,pn %icc, winfix_mna
  36. rdpr %tpc, %g3
  37. 1: sethi %hi(109f), %g7
  38. ba,pt %xcc, etrap
  39. 109: or %g7, %lo(109b), %g7
  40. mov %l4, %o1
  41. mov %l5, %o2
  42. call mem_address_unaligned
  43. add %sp, PTREGS_OFF, %o0
  44. ba,a,pt %xcc, rtrap
  45. .size do_mna,.-do_mna
  46. .type do_lddfmna,#function
  47. do_lddfmna:
  48. sethi %hi(109f), %g7
  49. mov TLB_SFSR, %g4
  50. ldxa [%g4] ASI_DMMU, %g5
  51. stxa %g0, [%g4] ASI_DMMU ! Clear FaultValid bit
  52. membar #Sync
  53. mov DMMU_SFAR, %g4
  54. ldxa [%g4] ASI_DMMU, %g4
  55. ba,pt %xcc, etrap
  56. 109: or %g7, %lo(109b), %g7
  57. mov %l4, %o1
  58. mov %l5, %o2
  59. call handle_lddfmna
  60. add %sp, PTREGS_OFF, %o0
  61. ba,a,pt %xcc, rtrap
  62. .size do_lddfmna,.-do_lddfmna
  63. .type do_stdfmna,#function
  64. do_stdfmna:
  65. sethi %hi(109f), %g7
  66. mov TLB_SFSR, %g4
  67. ldxa [%g4] ASI_DMMU, %g5
  68. stxa %g0, [%g4] ASI_DMMU ! Clear FaultValid bit
  69. membar #Sync
  70. mov DMMU_SFAR, %g4
  71. ldxa [%g4] ASI_DMMU, %g4
  72. ba,pt %xcc, etrap
  73. 109: or %g7, %lo(109b), %g7
  74. mov %l4, %o1
  75. mov %l5, %o2
  76. call handle_stdfmna
  77. add %sp, PTREGS_OFF, %o0
  78. ba,a,pt %xcc, rtrap
  79. .size do_stdfmna,.-do_stdfmna
  80. .type breakpoint_trap,#function
  81. breakpoint_trap:
  82. call sparc_breakpoint
  83. add %sp, PTREGS_OFF, %o0
  84. ba,pt %xcc, rtrap
  85. nop
  86. .size breakpoint_trap,.-breakpoint_trap