sie64a.S 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * sie64a.S - low level sie call
  3. *
  4. * Copyright IBM Corp. 2008
  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 only)
  8. * as published by the Free Software Foundation.
  9. *
  10. * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
  11. */
  12. #include <linux/errno.h>
  13. #include <asm/asm-offsets.h>
  14. SP_R5 = 5 * 8 # offset into stackframe
  15. SP_R6 = 6 * 8
  16. /*
  17. * sie64a calling convention:
  18. * %r2 pointer to sie control block
  19. * %r3 guest register save area
  20. */
  21. .globl sie64a
  22. sie64a:
  23. lgr %r5,%r3
  24. stmg %r5,%r14,SP_R5(%r15) # save register on entry
  25. lgr %r14,%r2 # pointer to sie control block
  26. lmg %r0,%r13,0(%r3) # load guest gprs 0-13
  27. sie_inst:
  28. sie 0(%r14)
  29. lg %r14,SP_R5(%r15)
  30. stmg %r0,%r13,0(%r14) # save guest gprs 0-13
  31. lghi %r2,0
  32. lmg %r6,%r14,SP_R6(%r15)
  33. br %r14
  34. sie_err:
  35. lg %r14,SP_R5(%r15)
  36. stmg %r0,%r13,0(%r14) # save guest gprs 0-13
  37. lghi %r2,-EFAULT
  38. lmg %r6,%r14,SP_R6(%r15)
  39. br %r14
  40. .section __ex_table,"a"
  41. .quad sie_inst,sie_err
  42. .previous