hvcalls.S 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855
  1. /* %o0: devhandle
  2. * %o1: devino
  3. *
  4. * returns %o0: sysino
  5. */
  6. ENTRY(sun4v_devino_to_sysino)
  7. mov HV_FAST_INTR_DEVINO2SYSINO, %o5
  8. ta HV_FAST_TRAP
  9. retl
  10. mov %o1, %o0
  11. ENDPROC(sun4v_devino_to_sysino)
  12. /* %o0: sysino
  13. *
  14. * returns %o0: intr_enabled (HV_INTR_{DISABLED,ENABLED})
  15. */
  16. ENTRY(sun4v_intr_getenabled)
  17. mov HV_FAST_INTR_GETENABLED, %o5
  18. ta HV_FAST_TRAP
  19. retl
  20. mov %o1, %o0
  21. ENDPROC(sun4v_intr_getenabled)
  22. /* %o0: sysino
  23. * %o1: intr_enabled (HV_INTR_{DISABLED,ENABLED})
  24. */
  25. ENTRY(sun4v_intr_setenabled)
  26. mov HV_FAST_INTR_SETENABLED, %o5
  27. ta HV_FAST_TRAP
  28. retl
  29. nop
  30. ENDPROC(sun4v_intr_setenabled)
  31. /* %o0: sysino
  32. *
  33. * returns %o0: intr_state (HV_INTR_STATE_*)
  34. */
  35. ENTRY(sun4v_intr_getstate)
  36. mov HV_FAST_INTR_GETSTATE, %o5
  37. ta HV_FAST_TRAP
  38. retl
  39. mov %o1, %o0
  40. ENDPROC(sun4v_intr_getstate)
  41. /* %o0: sysino
  42. * %o1: intr_state (HV_INTR_STATE_*)
  43. */
  44. ENTRY(sun4v_intr_setstate)
  45. mov HV_FAST_INTR_SETSTATE, %o5
  46. ta HV_FAST_TRAP
  47. retl
  48. nop
  49. ENDPROC(sun4v_intr_setstate)
  50. /* %o0: sysino
  51. *
  52. * returns %o0: cpuid
  53. */
  54. ENTRY(sun4v_intr_gettarget)
  55. mov HV_FAST_INTR_GETTARGET, %o5
  56. ta HV_FAST_TRAP
  57. retl
  58. mov %o1, %o0
  59. ENDPROC(sun4v_intr_gettarget)
  60. /* %o0: sysino
  61. * %o1: cpuid
  62. */
  63. ENTRY(sun4v_intr_settarget)
  64. mov HV_FAST_INTR_SETTARGET, %o5
  65. ta HV_FAST_TRAP
  66. retl
  67. nop
  68. ENDPROC(sun4v_intr_settarget)
  69. /* %o0: cpuid
  70. * %o1: pc
  71. * %o2: rtba
  72. * %o3: arg0
  73. *
  74. * returns %o0: status
  75. */
  76. ENTRY(sun4v_cpu_start)
  77. mov HV_FAST_CPU_START, %o5
  78. ta HV_FAST_TRAP
  79. retl
  80. nop
  81. ENDPROC(sun4v_cpu_start)
  82. /* %o0: cpuid
  83. *
  84. * returns %o0: status
  85. */
  86. ENTRY(sun4v_cpu_stop)
  87. mov HV_FAST_CPU_STOP, %o5
  88. ta HV_FAST_TRAP
  89. retl
  90. nop
  91. ENDPROC(sun4v_cpu_stop)
  92. /* returns %o0: status */
  93. ENTRY(sun4v_cpu_yield)
  94. mov HV_FAST_CPU_YIELD, %o5
  95. ta HV_FAST_TRAP
  96. retl
  97. nop
  98. ENDPROC(sun4v_cpu_yield)
  99. /* %o0: type
  100. * %o1: queue paddr
  101. * %o2: num queue entries
  102. *
  103. * returns %o0: status
  104. */
  105. ENTRY(sun4v_cpu_qconf)
  106. mov HV_FAST_CPU_QCONF, %o5
  107. ta HV_FAST_TRAP
  108. retl
  109. nop
  110. ENDPROC(sun4v_cpu_qconf)
  111. /* %o0: num cpus in cpu list
  112. * %o1: cpu list paddr
  113. * %o2: mondo block paddr
  114. *
  115. * returns %o0: status
  116. */
  117. ENTRY(sun4v_cpu_mondo_send)
  118. mov HV_FAST_CPU_MONDO_SEND, %o5
  119. ta HV_FAST_TRAP
  120. retl
  121. nop
  122. ENDPROC(sun4v_cpu_mondo_send)
  123. /* %o0: CPU ID
  124. *
  125. * returns %o0: -status if status non-zero, else
  126. * %o0: cpu state as HV_CPU_STATE_*
  127. */
  128. ENTRY(sun4v_cpu_state)
  129. mov HV_FAST_CPU_STATE, %o5
  130. ta HV_FAST_TRAP
  131. brnz,pn %o0, 1f
  132. sub %g0, %o0, %o0
  133. mov %o1, %o0
  134. 1: retl
  135. nop
  136. ENDPROC(sun4v_cpu_state)
  137. /* %o0: virtual address
  138. * %o1: must be zero
  139. * %o2: TTE
  140. * %o3: HV_MMU_* flags
  141. *
  142. * returns %o0: status
  143. */
  144. ENTRY(sun4v_mmu_map_perm_addr)
  145. mov HV_FAST_MMU_MAP_PERM_ADDR, %o5
  146. ta HV_FAST_TRAP
  147. retl
  148. nop
  149. ENDPROC(sun4v_mmu_map_perm_addr)
  150. /* %o0: number of TSB descriptions
  151. * %o1: TSB descriptions real address
  152. *
  153. * returns %o0: status
  154. */
  155. ENTRY(sun4v_mmu_tsb_ctx0)
  156. mov HV_FAST_MMU_TSB_CTX0, %o5
  157. ta HV_FAST_TRAP
  158. retl
  159. nop
  160. ENDPROC(sun4v_mmu_tsb_ctx0)
  161. /* %o0: API group number
  162. * %o1: pointer to unsigned long major number storage
  163. * %o2: pointer to unsigned long minor number storage
  164. *
  165. * returns %o0: status
  166. */
  167. ENTRY(sun4v_get_version)
  168. mov HV_CORE_GET_VER, %o5
  169. mov %o1, %o3
  170. mov %o2, %o4
  171. ta HV_CORE_TRAP
  172. stx %o1, [%o3]
  173. retl
  174. stx %o2, [%o4]
  175. ENDPROC(sun4v_get_version)
  176. /* %o0: API group number
  177. * %o1: desired major number
  178. * %o2: desired minor number
  179. * %o3: pointer to unsigned long actual minor number storage
  180. *
  181. * returns %o0: status
  182. */
  183. ENTRY(sun4v_set_version)
  184. mov HV_CORE_SET_VER, %o5
  185. mov %o3, %o4
  186. ta HV_CORE_TRAP
  187. retl
  188. stx %o1, [%o4]
  189. ENDPROC(sun4v_set_version)
  190. /* %o0: pointer to unsigned long time
  191. *
  192. * returns %o0: status
  193. */
  194. ENTRY(sun4v_tod_get)
  195. mov %o0, %o4
  196. mov HV_FAST_TOD_GET, %o5
  197. ta HV_FAST_TRAP
  198. stx %o1, [%o4]
  199. retl
  200. nop
  201. ENDPROC(sun4v_tod_get)
  202. /* %o0: time
  203. *
  204. * returns %o0: status
  205. */
  206. ENTRY(sun4v_tod_set)
  207. mov HV_FAST_TOD_SET, %o5
  208. ta HV_FAST_TRAP
  209. retl
  210. nop
  211. ENDPROC(sun4v_tod_set)
  212. /* %o0: pointer to unsigned long status
  213. *
  214. * returns %o0: signed character
  215. */
  216. ENTRY(sun4v_con_getchar)
  217. mov %o0, %o4
  218. mov HV_FAST_CONS_GETCHAR, %o5
  219. clr %o0
  220. clr %o1
  221. ta HV_FAST_TRAP
  222. stx %o0, [%o4]
  223. retl
  224. sra %o1, 0, %o0
  225. ENDPROC(sun4v_con_getchar)
  226. /* %o0: signed long character
  227. *
  228. * returns %o0: status
  229. */
  230. ENTRY(sun4v_con_putchar)
  231. mov HV_FAST_CONS_PUTCHAR, %o5
  232. ta HV_FAST_TRAP
  233. retl
  234. sra %o0, 0, %o0
  235. ENDPROC(sun4v_con_putchar)
  236. /* %o0: buffer real address
  237. * %o1: buffer size
  238. * %o2: pointer to unsigned long bytes_read
  239. *
  240. * returns %o0: status
  241. */
  242. ENTRY(sun4v_con_read)
  243. mov %o2, %o4
  244. mov HV_FAST_CONS_READ, %o5
  245. ta HV_FAST_TRAP
  246. brnz %o0, 1f
  247. cmp %o1, -1 /* break */
  248. be,a,pn %icc, 1f
  249. mov %o1, %o0
  250. cmp %o1, -2 /* hup */
  251. be,a,pn %icc, 1f
  252. mov %o1, %o0
  253. stx %o1, [%o4]
  254. 1: retl
  255. nop
  256. ENDPROC(sun4v_con_read)
  257. /* %o0: buffer real address
  258. * %o1: buffer size
  259. * %o2: pointer to unsigned long bytes_written
  260. *
  261. * returns %o0: status
  262. */
  263. ENTRY(sun4v_con_write)
  264. mov %o2, %o4
  265. mov HV_FAST_CONS_WRITE, %o5
  266. ta HV_FAST_TRAP
  267. stx %o1, [%o4]
  268. retl
  269. nop
  270. ENDPROC(sun4v_con_write)
  271. /* %o0: soft state
  272. * %o1: address of description string
  273. *
  274. * returns %o0: status
  275. */
  276. ENTRY(sun4v_mach_set_soft_state)
  277. mov HV_FAST_MACH_SET_SOFT_STATE, %o5
  278. ta HV_FAST_TRAP
  279. retl
  280. nop
  281. ENDPROC(sun4v_mach_set_soft_state)
  282. /* %o0: exit code
  283. *
  284. * Does not return.
  285. */
  286. ENTRY(sun4v_mach_exit)
  287. mov HV_FAST_MACH_EXIT, %o5
  288. ta HV_FAST_TRAP
  289. retl
  290. nop
  291. ENDPROC(sun4v_mach_exit)
  292. /* %o0: buffer real address
  293. * %o1: buffer length
  294. * %o2: pointer to unsigned long real_buf_len
  295. *
  296. * returns %o0: status
  297. */
  298. ENTRY(sun4v_mach_desc)
  299. mov %o2, %o4
  300. mov HV_FAST_MACH_DESC, %o5
  301. ta HV_FAST_TRAP
  302. stx %o1, [%o4]
  303. retl
  304. nop
  305. ENDPROC(sun4v_mach_desc)
  306. /* %o0: new timeout in milliseconds
  307. * %o1: pointer to unsigned long orig_timeout
  308. *
  309. * returns %o0: status
  310. */
  311. ENTRY(sun4v_mach_set_watchdog)
  312. mov %o1, %o4
  313. mov HV_FAST_MACH_SET_WATCHDOG, %o5
  314. ta HV_FAST_TRAP
  315. stx %o1, [%o4]
  316. retl
  317. nop
  318. ENDPROC(sun4v_mach_set_watchdog)
  319. /* No inputs and does not return. */
  320. ENTRY(sun4v_mach_sir)
  321. mov %o1, %o4
  322. mov HV_FAST_MACH_SIR, %o5
  323. ta HV_FAST_TRAP
  324. stx %o1, [%o4]
  325. retl
  326. nop
  327. ENDPROC(sun4v_mach_sir)
  328. /* %o0: channel
  329. * %o1: ra
  330. * %o2: num_entries
  331. *
  332. * returns %o0: status
  333. */
  334. ENTRY(sun4v_ldc_tx_qconf)
  335. mov HV_FAST_LDC_TX_QCONF, %o5
  336. ta HV_FAST_TRAP
  337. retl
  338. nop
  339. ENDPROC(sun4v_ldc_tx_qconf)
  340. /* %o0: channel
  341. * %o1: pointer to unsigned long ra
  342. * %o2: pointer to unsigned long num_entries
  343. *
  344. * returns %o0: status
  345. */
  346. ENTRY(sun4v_ldc_tx_qinfo)
  347. mov %o1, %g1
  348. mov %o2, %g2
  349. mov HV_FAST_LDC_TX_QINFO, %o5
  350. ta HV_FAST_TRAP
  351. stx %o1, [%g1]
  352. stx %o2, [%g2]
  353. retl
  354. nop
  355. ENDPROC(sun4v_ldc_tx_qinfo)
  356. /* %o0: channel
  357. * %o1: pointer to unsigned long head_off
  358. * %o2: pointer to unsigned long tail_off
  359. * %o2: pointer to unsigned long chan_state
  360. *
  361. * returns %o0: status
  362. */
  363. ENTRY(sun4v_ldc_tx_get_state)
  364. mov %o1, %g1
  365. mov %o2, %g2
  366. mov %o3, %g3
  367. mov HV_FAST_LDC_TX_GET_STATE, %o5
  368. ta HV_FAST_TRAP
  369. stx %o1, [%g1]
  370. stx %o2, [%g2]
  371. stx %o3, [%g3]
  372. retl
  373. nop
  374. ENDPROC(sun4v_ldc_tx_get_state)
  375. /* %o0: channel
  376. * %o1: tail_off
  377. *
  378. * returns %o0: status
  379. */
  380. ENTRY(sun4v_ldc_tx_set_qtail)
  381. mov HV_FAST_LDC_TX_SET_QTAIL, %o5
  382. ta HV_FAST_TRAP
  383. retl
  384. nop
  385. ENDPROC(sun4v_ldc_tx_set_qtail)
  386. /* %o0: channel
  387. * %o1: ra
  388. * %o2: num_entries
  389. *
  390. * returns %o0: status
  391. */
  392. ENTRY(sun4v_ldc_rx_qconf)
  393. mov HV_FAST_LDC_RX_QCONF, %o5
  394. ta HV_FAST_TRAP
  395. retl
  396. nop
  397. ENDPROC(sun4v_ldc_rx_qconf)
  398. /* %o0: channel
  399. * %o1: pointer to unsigned long ra
  400. * %o2: pointer to unsigned long num_entries
  401. *
  402. * returns %o0: status
  403. */
  404. ENTRY(sun4v_ldc_rx_qinfo)
  405. mov %o1, %g1
  406. mov %o2, %g2
  407. mov HV_FAST_LDC_RX_QINFO, %o5
  408. ta HV_FAST_TRAP
  409. stx %o1, [%g1]
  410. stx %o2, [%g2]
  411. retl
  412. nop
  413. ENDPROC(sun4v_ldc_rx_qinfo)
  414. /* %o0: channel
  415. * %o1: pointer to unsigned long head_off
  416. * %o2: pointer to unsigned long tail_off
  417. * %o2: pointer to unsigned long chan_state
  418. *
  419. * returns %o0: status
  420. */
  421. ENTRY(sun4v_ldc_rx_get_state)
  422. mov %o1, %g1
  423. mov %o2, %g2
  424. mov %o3, %g3
  425. mov HV_FAST_LDC_RX_GET_STATE, %o5
  426. ta HV_FAST_TRAP
  427. stx %o1, [%g1]
  428. stx %o2, [%g2]
  429. stx %o3, [%g3]
  430. retl
  431. nop
  432. ENDPROC(sun4v_ldc_rx_get_state)
  433. /* %o0: channel
  434. * %o1: head_off
  435. *
  436. * returns %o0: status
  437. */
  438. ENTRY(sun4v_ldc_rx_set_qhead)
  439. mov HV_FAST_LDC_RX_SET_QHEAD, %o5
  440. ta HV_FAST_TRAP
  441. retl
  442. nop
  443. ENDPROC(sun4v_ldc_rx_set_qhead)
  444. /* %o0: channel
  445. * %o1: ra
  446. * %o2: num_entries
  447. *
  448. * returns %o0: status
  449. */
  450. ENTRY(sun4v_ldc_set_map_table)
  451. mov HV_FAST_LDC_SET_MAP_TABLE, %o5
  452. ta HV_FAST_TRAP
  453. retl
  454. nop
  455. ENDPROC(sun4v_ldc_set_map_table)
  456. /* %o0: channel
  457. * %o1: pointer to unsigned long ra
  458. * %o2: pointer to unsigned long num_entries
  459. *
  460. * returns %o0: status
  461. */
  462. ENTRY(sun4v_ldc_get_map_table)
  463. mov %o1, %g1
  464. mov %o2, %g2
  465. mov HV_FAST_LDC_GET_MAP_TABLE, %o5
  466. ta HV_FAST_TRAP
  467. stx %o1, [%g1]
  468. stx %o2, [%g2]
  469. retl
  470. nop
  471. ENDPROC(sun4v_ldc_get_map_table)
  472. /* %o0: channel
  473. * %o1: dir_code
  474. * %o2: tgt_raddr
  475. * %o3: lcl_raddr
  476. * %o4: len
  477. * %o5: pointer to unsigned long actual_len
  478. *
  479. * returns %o0: status
  480. */
  481. ENTRY(sun4v_ldc_copy)
  482. mov %o5, %g1
  483. mov HV_FAST_LDC_COPY, %o5
  484. ta HV_FAST_TRAP
  485. stx %o1, [%g1]
  486. retl
  487. nop
  488. ENDPROC(sun4v_ldc_copy)
  489. /* %o0: channel
  490. * %o1: cookie
  491. * %o2: pointer to unsigned long ra
  492. * %o3: pointer to unsigned long perm
  493. *
  494. * returns %o0: status
  495. */
  496. ENTRY(sun4v_ldc_mapin)
  497. mov %o2, %g1
  498. mov %o3, %g2
  499. mov HV_FAST_LDC_MAPIN, %o5
  500. ta HV_FAST_TRAP
  501. stx %o1, [%g1]
  502. stx %o2, [%g2]
  503. retl
  504. nop
  505. ENDPROC(sun4v_ldc_mapin)
  506. /* %o0: ra
  507. *
  508. * returns %o0: status
  509. */
  510. ENTRY(sun4v_ldc_unmap)
  511. mov HV_FAST_LDC_UNMAP, %o5
  512. ta HV_FAST_TRAP
  513. retl
  514. nop
  515. ENDPROC(sun4v_ldc_unmap)
  516. /* %o0: channel
  517. * %o1: cookie
  518. * %o2: mte_cookie
  519. *
  520. * returns %o0: status
  521. */
  522. ENTRY(sun4v_ldc_revoke)
  523. mov HV_FAST_LDC_REVOKE, %o5
  524. ta HV_FAST_TRAP
  525. retl
  526. nop
  527. ENDPROC(sun4v_ldc_revoke)
  528. /* %o0: device handle
  529. * %o1: device INO
  530. * %o2: pointer to unsigned long cookie
  531. *
  532. * returns %o0: status
  533. */
  534. ENTRY(sun4v_vintr_get_cookie)
  535. mov %o2, %g1
  536. mov HV_FAST_VINTR_GET_COOKIE, %o5
  537. ta HV_FAST_TRAP
  538. stx %o1, [%g1]
  539. retl
  540. nop
  541. ENDPROC(sun4v_vintr_get_cookie)
  542. /* %o0: device handle
  543. * %o1: device INO
  544. * %o2: cookie
  545. *
  546. * returns %o0: status
  547. */
  548. ENTRY(sun4v_vintr_set_cookie)
  549. mov HV_FAST_VINTR_SET_COOKIE, %o5
  550. ta HV_FAST_TRAP
  551. retl
  552. nop
  553. ENDPROC(sun4v_vintr_set_cookie)
  554. /* %o0: device handle
  555. * %o1: device INO
  556. * %o2: pointer to unsigned long valid_state
  557. *
  558. * returns %o0: status
  559. */
  560. ENTRY(sun4v_vintr_get_valid)
  561. mov %o2, %g1
  562. mov HV_FAST_VINTR_GET_VALID, %o5
  563. ta HV_FAST_TRAP
  564. stx %o1, [%g1]
  565. retl
  566. nop
  567. ENDPROC(sun4v_vintr_get_valid)
  568. /* %o0: device handle
  569. * %o1: device INO
  570. * %o2: valid_state
  571. *
  572. * returns %o0: status
  573. */
  574. ENTRY(sun4v_vintr_set_valid)
  575. mov HV_FAST_VINTR_SET_VALID, %o5
  576. ta HV_FAST_TRAP
  577. retl
  578. nop
  579. ENDPROC(sun4v_vintr_set_valid)
  580. /* %o0: device handle
  581. * %o1: device INO
  582. * %o2: pointer to unsigned long state
  583. *
  584. * returns %o0: status
  585. */
  586. ENTRY(sun4v_vintr_get_state)
  587. mov %o2, %g1
  588. mov HV_FAST_VINTR_GET_STATE, %o5
  589. ta HV_FAST_TRAP
  590. stx %o1, [%g1]
  591. retl
  592. nop
  593. ENDPROC(sun4v_vintr_get_state)
  594. /* %o0: device handle
  595. * %o1: device INO
  596. * %o2: state
  597. *
  598. * returns %o0: status
  599. */
  600. ENTRY(sun4v_vintr_set_state)
  601. mov HV_FAST_VINTR_SET_STATE, %o5
  602. ta HV_FAST_TRAP
  603. retl
  604. nop
  605. ENDPROC(sun4v_vintr_set_state)
  606. /* %o0: device handle
  607. * %o1: device INO
  608. * %o2: pointer to unsigned long cpuid
  609. *
  610. * returns %o0: status
  611. */
  612. ENTRY(sun4v_vintr_get_target)
  613. mov %o2, %g1
  614. mov HV_FAST_VINTR_GET_TARGET, %o5
  615. ta HV_FAST_TRAP
  616. stx %o1, [%g1]
  617. retl
  618. nop
  619. ENDPROC(sun4v_vintr_get_target)
  620. /* %o0: device handle
  621. * %o1: device INO
  622. * %o2: cpuid
  623. *
  624. * returns %o0: status
  625. */
  626. ENTRY(sun4v_vintr_set_target)
  627. mov HV_FAST_VINTR_SET_TARGET, %o5
  628. ta HV_FAST_TRAP
  629. retl
  630. nop
  631. ENDPROC(sun4v_vintr_set_target)
  632. /* %o0: NCS sub-function
  633. * %o1: sub-function arg real-address
  634. * %o2: sub-function arg size
  635. *
  636. * returns %o0: status
  637. */
  638. ENTRY(sun4v_ncs_request)
  639. mov HV_FAST_NCS_REQUEST, %o5
  640. ta HV_FAST_TRAP
  641. retl
  642. nop
  643. ENDPROC(sun4v_ncs_request)
  644. ENTRY(sun4v_svc_send)
  645. save %sp, -192, %sp
  646. mov %i0, %o0
  647. mov %i1, %o1
  648. mov %i2, %o2
  649. mov HV_FAST_SVC_SEND, %o5
  650. ta HV_FAST_TRAP
  651. stx %o1, [%i3]
  652. ret
  653. restore
  654. ENDPROC(sun4v_svc_send)
  655. ENTRY(sun4v_svc_recv)
  656. save %sp, -192, %sp
  657. mov %i0, %o0
  658. mov %i1, %o1
  659. mov %i2, %o2
  660. mov HV_FAST_SVC_RECV, %o5
  661. ta HV_FAST_TRAP
  662. stx %o1, [%i3]
  663. ret
  664. restore
  665. ENDPROC(sun4v_svc_recv)
  666. ENTRY(sun4v_svc_getstatus)
  667. mov HV_FAST_SVC_GETSTATUS, %o5
  668. mov %o1, %o4
  669. ta HV_FAST_TRAP
  670. stx %o1, [%o4]
  671. retl
  672. nop
  673. ENDPROC(sun4v_svc_getstatus)
  674. ENTRY(sun4v_svc_setstatus)
  675. mov HV_FAST_SVC_SETSTATUS, %o5
  676. ta HV_FAST_TRAP
  677. retl
  678. nop
  679. ENDPROC(sun4v_svc_setstatus)
  680. ENTRY(sun4v_svc_clrstatus)
  681. mov HV_FAST_SVC_CLRSTATUS, %o5
  682. ta HV_FAST_TRAP
  683. retl
  684. nop
  685. ENDPROC(sun4v_svc_clrstatus)
  686. ENTRY(sun4v_mmustat_conf)
  687. mov %o1, %o4
  688. mov HV_FAST_MMUSTAT_CONF, %o5
  689. ta HV_FAST_TRAP
  690. stx %o1, [%o4]
  691. retl
  692. nop
  693. ENDPROC(sun4v_mmustat_conf)
  694. ENTRY(sun4v_mmustat_info)
  695. mov %o0, %o4
  696. mov HV_FAST_MMUSTAT_INFO, %o5
  697. ta HV_FAST_TRAP
  698. stx %o1, [%o4]
  699. retl
  700. nop
  701. ENDPROC(sun4v_mmustat_info)
  702. ENTRY(sun4v_mmu_demap_all)
  703. clr %o0
  704. clr %o1
  705. mov HV_MMU_ALL, %o2
  706. mov HV_FAST_MMU_DEMAP_ALL, %o5
  707. ta HV_FAST_TRAP
  708. retl
  709. nop
  710. ENDPROC(sun4v_mmu_demap_all)
  711. ENTRY(sun4v_niagara_getperf)
  712. mov %o0, %o4
  713. mov HV_FAST_GET_PERFREG, %o5
  714. ta HV_FAST_TRAP
  715. stx %o1, [%o4]
  716. retl
  717. nop
  718. ENDPROC(sun4v_niagara_getperf)
  719. ENTRY(sun4v_niagara_setperf)
  720. mov HV_FAST_SET_PERFREG, %o5
  721. ta HV_FAST_TRAP
  722. retl
  723. nop
  724. ENDPROC(sun4v_niagara_setperf)
  725. ENTRY(sun4v_niagara2_getperf)
  726. mov %o0, %o4
  727. mov HV_FAST_N2_GET_PERFREG, %o5
  728. ta HV_FAST_TRAP
  729. stx %o1, [%o4]
  730. retl
  731. nop
  732. ENDPROC(sun4v_niagara2_getperf)
  733. ENTRY(sun4v_niagara2_setperf)
  734. mov HV_FAST_N2_SET_PERFREG, %o5
  735. ta HV_FAST_TRAP
  736. retl
  737. nop
  738. ENDPROC(sun4v_niagara2_setperf)
  739. ENTRY(sun4v_reboot_data_set)
  740. mov HV_FAST_REBOOT_DATA_SET, %o5
  741. ta HV_FAST_TRAP
  742. retl
  743. nop
  744. ENDPROC(sun4v_reboot_data_set)
  745. ENTRY(sun4v_vt_get_perfreg)
  746. mov %o1, %o4
  747. mov HV_FAST_VT_GET_PERFREG, %o5
  748. ta HV_FAST_TRAP
  749. stx %o1, [%o4]
  750. retl
  751. nop
  752. ENDPROC(sun4v_vt_get_perfreg)
  753. ENTRY(sun4v_vt_set_perfreg)
  754. mov HV_FAST_VT_SET_PERFREG, %o5
  755. ta HV_FAST_TRAP
  756. retl
  757. nop
  758. ENDPROC(sun4v_vt_set_perfreg)
  759. ENTRY(sun4v_t5_get_perfreg)
  760. mov %o1, %o4
  761. mov HV_FAST_T5_GET_PERFREG, %o5
  762. ta HV_FAST_TRAP
  763. stx %o1, [%o4]
  764. retl
  765. nop
  766. ENDPROC(sun4v_t5_get_perfreg)
  767. ENTRY(sun4v_t5_set_perfreg)
  768. mov HV_FAST_T5_SET_PERFREG, %o5
  769. ta HV_FAST_TRAP
  770. retl
  771. nop
  772. ENDPROC(sun4v_t5_set_perfreg)
  773. ENTRY(sun4v_m7_get_perfreg)
  774. mov %o1, %o4
  775. mov HV_FAST_M7_GET_PERFREG, %o5
  776. ta HV_FAST_TRAP
  777. stx %o1, [%o4]
  778. retl
  779. nop
  780. ENDPROC(sun4v_m7_get_perfreg)
  781. ENTRY(sun4v_m7_set_perfreg)
  782. mov HV_FAST_M7_SET_PERFREG, %o5
  783. ta HV_FAST_TRAP
  784. retl
  785. nop
  786. ENDPROC(sun4v_m7_set_perfreg)