n2-asm.S 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* n2-asm.S: Niagara2 RNG hypervisor call assembler.
  2. *
  3. * Copyright (C) 2008 David S. Miller <davem@davemloft.net>
  4. */
  5. #include <linux/linkage.h>
  6. #include <asm/hypervisor.h>
  7. #include "n2rng.h"
  8. .text
  9. ENTRY(sun4v_rng_get_diag_ctl)
  10. mov HV_FAST_RNG_GET_DIAG_CTL, %o5
  11. ta HV_FAST_TRAP
  12. retl
  13. nop
  14. ENDPROC(sun4v_rng_get_diag_ctl)
  15. ENTRY(sun4v_rng_ctl_read_v1)
  16. mov %o1, %o3
  17. mov %o2, %o4
  18. mov HV_FAST_RNG_CTL_READ, %o5
  19. ta HV_FAST_TRAP
  20. stx %o1, [%o3]
  21. retl
  22. stx %o2, [%o4]
  23. ENDPROC(sun4v_rng_ctl_read_v1)
  24. ENTRY(sun4v_rng_ctl_read_v2)
  25. save %sp, -192, %sp
  26. mov %i0, %o0
  27. mov %i1, %o1
  28. mov HV_FAST_RNG_CTL_READ, %o5
  29. ta HV_FAST_TRAP
  30. stx %o1, [%i2]
  31. stx %o2, [%i3]
  32. stx %o3, [%i4]
  33. stx %o4, [%i5]
  34. ret
  35. restore %g0, %o0, %o0
  36. ENDPROC(sun4v_rng_ctl_read_v2)
  37. ENTRY(sun4v_rng_ctl_write_v1)
  38. mov %o3, %o4
  39. mov HV_FAST_RNG_CTL_WRITE, %o5
  40. ta HV_FAST_TRAP
  41. retl
  42. stx %o1, [%o4]
  43. ENDPROC(sun4v_rng_ctl_write_v1)
  44. ENTRY(sun4v_rng_ctl_write_v2)
  45. mov HV_FAST_RNG_CTL_WRITE, %o5
  46. ta HV_FAST_TRAP
  47. retl
  48. nop
  49. ENDPROC(sun4v_rng_ctl_write_v2)
  50. ENTRY(sun4v_rng_data_read_diag_v1)
  51. mov %o2, %o4
  52. mov HV_FAST_RNG_DATA_READ_DIAG, %o5
  53. ta HV_FAST_TRAP
  54. retl
  55. stx %o1, [%o4]
  56. ENDPROC(sun4v_rng_data_read_diag_v1)
  57. ENTRY(sun4v_rng_data_read_diag_v2)
  58. mov %o3, %o4
  59. mov HV_FAST_RNG_DATA_READ_DIAG, %o5
  60. ta HV_FAST_TRAP
  61. retl
  62. stx %o1, [%o4]
  63. ENDPROC(sun4v_rng_data_read_diag_v2)
  64. ENTRY(sun4v_rng_data_read)
  65. mov %o1, %o4
  66. mov HV_FAST_RNG_DATA_READ, %o5
  67. ta HV_FAST_TRAP
  68. retl
  69. stx %o1, [%o4]
  70. ENDPROC(sun4v_rng_data_read)