mca_drv_asm.S 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * File: mca_drv_asm.S
  3. * Purpose: Assembly portion of Generic MCA handling
  4. *
  5. * Copyright (C) 2004 FUJITSU LIMITED
  6. * Copyright (C) 2004 Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
  7. */
  8. #include <linux/threads.h>
  9. #include <asm/asmmacro.h>
  10. #include <asm/processor.h>
  11. #include <asm/ptrace.h>
  12. GLOBAL_ENTRY(mca_handler_bhhook)
  13. invala // clear RSE ?
  14. cover
  15. ;;
  16. clrrrb
  17. ;;
  18. alloc r16=ar.pfs,0,2,3,0 // make a new frame
  19. mov ar.rsc=0
  20. mov r13=IA64_KR(CURRENT) // current task pointer
  21. ;;
  22. mov r2=r13
  23. ;;
  24. addl r22=IA64_RBS_OFFSET,r2
  25. ;;
  26. mov ar.bspstore=r22
  27. addl sp=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r2
  28. ;;
  29. adds r2=IA64_TASK_THREAD_ON_USTACK_OFFSET,r13
  30. ;;
  31. st1 [r2]=r0 // clear current->thread.on_ustack flag
  32. mov loc0=r16
  33. movl loc1=mca_handler_bh // recovery C function
  34. ;;
  35. mov out0=r8 // poisoned address
  36. mov out1=r9 // iip
  37. mov out2=r10 // psr
  38. mov b6=loc1
  39. ;;
  40. mov loc1=rp
  41. ssm psr.ic
  42. ;;
  43. srlz.i
  44. ;;
  45. ssm psr.i
  46. br.call.sptk.many rp=b6 // does not return ...
  47. ;;
  48. mov ar.pfs=loc0
  49. mov rp=loc1
  50. ;;
  51. mov r8=r0
  52. br.ret.sptk.many rp
  53. END(mca_handler_bhhook)