hvcalls.S 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862
  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. brnz,a,pn %o4, 0f
  316. stx %o1, [%o4]
  317. 0: retl
  318. nop
  319. ENDPROC(sun4v_mach_set_watchdog)
  320. EXPORT_SYMBOL(sun4v_mach_set_watchdog)
  321. /* No inputs and does not return. */
  322. ENTRY(sun4v_mach_sir)
  323. mov %o1, %o4
  324. mov HV_FAST_MACH_SIR, %o5
  325. ta HV_FAST_TRAP
  326. stx %o1, [%o4]
  327. retl
  328. nop
  329. ENDPROC(sun4v_mach_sir)
  330. /* %o0: channel
  331. * %o1: ra
  332. * %o2: num_entries
  333. *
  334. * returns %o0: status
  335. */
  336. ENTRY(sun4v_ldc_tx_qconf)
  337. mov HV_FAST_LDC_TX_QCONF, %o5
  338. ta HV_FAST_TRAP
  339. retl
  340. nop
  341. ENDPROC(sun4v_ldc_tx_qconf)
  342. /* %o0: channel
  343. * %o1: pointer to unsigned long ra
  344. * %o2: pointer to unsigned long num_entries
  345. *
  346. * returns %o0: status
  347. */
  348. ENTRY(sun4v_ldc_tx_qinfo)
  349. mov %o1, %g1
  350. mov %o2, %g2
  351. mov HV_FAST_LDC_TX_QINFO, %o5
  352. ta HV_FAST_TRAP
  353. stx %o1, [%g1]
  354. stx %o2, [%g2]
  355. retl
  356. nop
  357. ENDPROC(sun4v_ldc_tx_qinfo)
  358. /* %o0: channel
  359. * %o1: pointer to unsigned long head_off
  360. * %o2: pointer to unsigned long tail_off
  361. * %o2: pointer to unsigned long chan_state
  362. *
  363. * returns %o0: status
  364. */
  365. ENTRY(sun4v_ldc_tx_get_state)
  366. mov %o1, %g1
  367. mov %o2, %g2
  368. mov %o3, %g3
  369. mov HV_FAST_LDC_TX_GET_STATE, %o5
  370. ta HV_FAST_TRAP
  371. stx %o1, [%g1]
  372. stx %o2, [%g2]
  373. stx %o3, [%g3]
  374. retl
  375. nop
  376. ENDPROC(sun4v_ldc_tx_get_state)
  377. /* %o0: channel
  378. * %o1: tail_off
  379. *
  380. * returns %o0: status
  381. */
  382. ENTRY(sun4v_ldc_tx_set_qtail)
  383. mov HV_FAST_LDC_TX_SET_QTAIL, %o5
  384. ta HV_FAST_TRAP
  385. retl
  386. nop
  387. ENDPROC(sun4v_ldc_tx_set_qtail)
  388. /* %o0: channel
  389. * %o1: ra
  390. * %o2: num_entries
  391. *
  392. * returns %o0: status
  393. */
  394. ENTRY(sun4v_ldc_rx_qconf)
  395. mov HV_FAST_LDC_RX_QCONF, %o5
  396. ta HV_FAST_TRAP
  397. retl
  398. nop
  399. ENDPROC(sun4v_ldc_rx_qconf)
  400. /* %o0: channel
  401. * %o1: pointer to unsigned long ra
  402. * %o2: pointer to unsigned long num_entries
  403. *
  404. * returns %o0: status
  405. */
  406. ENTRY(sun4v_ldc_rx_qinfo)
  407. mov %o1, %g1
  408. mov %o2, %g2
  409. mov HV_FAST_LDC_RX_QINFO, %o5
  410. ta HV_FAST_TRAP
  411. stx %o1, [%g1]
  412. stx %o2, [%g2]
  413. retl
  414. nop
  415. ENDPROC(sun4v_ldc_rx_qinfo)
  416. /* %o0: channel
  417. * %o1: pointer to unsigned long head_off
  418. * %o2: pointer to unsigned long tail_off
  419. * %o2: pointer to unsigned long chan_state
  420. *
  421. * returns %o0: status
  422. */
  423. ENTRY(sun4v_ldc_rx_get_state)
  424. mov %o1, %g1
  425. mov %o2, %g2
  426. mov %o3, %g3
  427. mov HV_FAST_LDC_RX_GET_STATE, %o5
  428. ta HV_FAST_TRAP
  429. stx %o1, [%g1]
  430. stx %o2, [%g2]
  431. stx %o3, [%g3]
  432. retl
  433. nop
  434. ENDPROC(sun4v_ldc_rx_get_state)
  435. /* %o0: channel
  436. * %o1: head_off
  437. *
  438. * returns %o0: status
  439. */
  440. ENTRY(sun4v_ldc_rx_set_qhead)
  441. mov HV_FAST_LDC_RX_SET_QHEAD, %o5
  442. ta HV_FAST_TRAP
  443. retl
  444. nop
  445. ENDPROC(sun4v_ldc_rx_set_qhead)
  446. /* %o0: channel
  447. * %o1: ra
  448. * %o2: num_entries
  449. *
  450. * returns %o0: status
  451. */
  452. ENTRY(sun4v_ldc_set_map_table)
  453. mov HV_FAST_LDC_SET_MAP_TABLE, %o5
  454. ta HV_FAST_TRAP
  455. retl
  456. nop
  457. ENDPROC(sun4v_ldc_set_map_table)
  458. /* %o0: channel
  459. * %o1: pointer to unsigned long ra
  460. * %o2: pointer to unsigned long num_entries
  461. *
  462. * returns %o0: status
  463. */
  464. ENTRY(sun4v_ldc_get_map_table)
  465. mov %o1, %g1
  466. mov %o2, %g2
  467. mov HV_FAST_LDC_GET_MAP_TABLE, %o5
  468. ta HV_FAST_TRAP
  469. stx %o1, [%g1]
  470. stx %o2, [%g2]
  471. retl
  472. nop
  473. ENDPROC(sun4v_ldc_get_map_table)
  474. /* %o0: channel
  475. * %o1: dir_code
  476. * %o2: tgt_raddr
  477. * %o3: lcl_raddr
  478. * %o4: len
  479. * %o5: pointer to unsigned long actual_len
  480. *
  481. * returns %o0: status
  482. */
  483. ENTRY(sun4v_ldc_copy)
  484. mov %o5, %g1
  485. mov HV_FAST_LDC_COPY, %o5
  486. ta HV_FAST_TRAP
  487. stx %o1, [%g1]
  488. retl
  489. nop
  490. ENDPROC(sun4v_ldc_copy)
  491. /* %o0: channel
  492. * %o1: cookie
  493. * %o2: pointer to unsigned long ra
  494. * %o3: pointer to unsigned long perm
  495. *
  496. * returns %o0: status
  497. */
  498. ENTRY(sun4v_ldc_mapin)
  499. mov %o2, %g1
  500. mov %o3, %g2
  501. mov HV_FAST_LDC_MAPIN, %o5
  502. ta HV_FAST_TRAP
  503. stx %o1, [%g1]
  504. stx %o2, [%g2]
  505. retl
  506. nop
  507. ENDPROC(sun4v_ldc_mapin)
  508. /* %o0: ra
  509. *
  510. * returns %o0: status
  511. */
  512. ENTRY(sun4v_ldc_unmap)
  513. mov HV_FAST_LDC_UNMAP, %o5
  514. ta HV_FAST_TRAP
  515. retl
  516. nop
  517. ENDPROC(sun4v_ldc_unmap)
  518. /* %o0: channel
  519. * %o1: cookie
  520. * %o2: mte_cookie
  521. *
  522. * returns %o0: status
  523. */
  524. ENTRY(sun4v_ldc_revoke)
  525. mov HV_FAST_LDC_REVOKE, %o5
  526. ta HV_FAST_TRAP
  527. retl
  528. nop
  529. ENDPROC(sun4v_ldc_revoke)
  530. /* %o0: device handle
  531. * %o1: device INO
  532. * %o2: pointer to unsigned long cookie
  533. *
  534. * returns %o0: status
  535. */
  536. ENTRY(sun4v_vintr_get_cookie)
  537. mov %o2, %g1
  538. mov HV_FAST_VINTR_GET_COOKIE, %o5
  539. ta HV_FAST_TRAP
  540. stx %o1, [%g1]
  541. retl
  542. nop
  543. ENDPROC(sun4v_vintr_get_cookie)
  544. /* %o0: device handle
  545. * %o1: device INO
  546. * %o2: cookie
  547. *
  548. * returns %o0: status
  549. */
  550. ENTRY(sun4v_vintr_set_cookie)
  551. mov HV_FAST_VINTR_SET_COOKIE, %o5
  552. ta HV_FAST_TRAP
  553. retl
  554. nop
  555. ENDPROC(sun4v_vintr_set_cookie)
  556. /* %o0: device handle
  557. * %o1: device INO
  558. * %o2: pointer to unsigned long valid_state
  559. *
  560. * returns %o0: status
  561. */
  562. ENTRY(sun4v_vintr_get_valid)
  563. mov %o2, %g1
  564. mov HV_FAST_VINTR_GET_VALID, %o5
  565. ta HV_FAST_TRAP
  566. stx %o1, [%g1]
  567. retl
  568. nop
  569. ENDPROC(sun4v_vintr_get_valid)
  570. /* %o0: device handle
  571. * %o1: device INO
  572. * %o2: valid_state
  573. *
  574. * returns %o0: status
  575. */
  576. ENTRY(sun4v_vintr_set_valid)
  577. mov HV_FAST_VINTR_SET_VALID, %o5
  578. ta HV_FAST_TRAP
  579. retl
  580. nop
  581. ENDPROC(sun4v_vintr_set_valid)
  582. /* %o0: device handle
  583. * %o1: device INO
  584. * %o2: pointer to unsigned long state
  585. *
  586. * returns %o0: status
  587. */
  588. ENTRY(sun4v_vintr_get_state)
  589. mov %o2, %g1
  590. mov HV_FAST_VINTR_GET_STATE, %o5
  591. ta HV_FAST_TRAP
  592. stx %o1, [%g1]
  593. retl
  594. nop
  595. ENDPROC(sun4v_vintr_get_state)
  596. /* %o0: device handle
  597. * %o1: device INO
  598. * %o2: state
  599. *
  600. * returns %o0: status
  601. */
  602. ENTRY(sun4v_vintr_set_state)
  603. mov HV_FAST_VINTR_SET_STATE, %o5
  604. ta HV_FAST_TRAP
  605. retl
  606. nop
  607. ENDPROC(sun4v_vintr_set_state)
  608. /* %o0: device handle
  609. * %o1: device INO
  610. * %o2: pointer to unsigned long cpuid
  611. *
  612. * returns %o0: status
  613. */
  614. ENTRY(sun4v_vintr_get_target)
  615. mov %o2, %g1
  616. mov HV_FAST_VINTR_GET_TARGET, %o5
  617. ta HV_FAST_TRAP
  618. stx %o1, [%g1]
  619. retl
  620. nop
  621. ENDPROC(sun4v_vintr_get_target)
  622. /* %o0: device handle
  623. * %o1: device INO
  624. * %o2: cpuid
  625. *
  626. * returns %o0: status
  627. */
  628. ENTRY(sun4v_vintr_set_target)
  629. mov HV_FAST_VINTR_SET_TARGET, %o5
  630. ta HV_FAST_TRAP
  631. retl
  632. nop
  633. ENDPROC(sun4v_vintr_set_target)
  634. /* %o0: NCS sub-function
  635. * %o1: sub-function arg real-address
  636. * %o2: sub-function arg size
  637. *
  638. * returns %o0: status
  639. */
  640. ENTRY(sun4v_ncs_request)
  641. mov HV_FAST_NCS_REQUEST, %o5
  642. ta HV_FAST_TRAP
  643. retl
  644. nop
  645. ENDPROC(sun4v_ncs_request)
  646. ENTRY(sun4v_svc_send)
  647. save %sp, -192, %sp
  648. mov %i0, %o0
  649. mov %i1, %o1
  650. mov %i2, %o2
  651. mov HV_FAST_SVC_SEND, %o5
  652. ta HV_FAST_TRAP
  653. stx %o1, [%i3]
  654. ret
  655. restore
  656. ENDPROC(sun4v_svc_send)
  657. ENTRY(sun4v_svc_recv)
  658. save %sp, -192, %sp
  659. mov %i0, %o0
  660. mov %i1, %o1
  661. mov %i2, %o2
  662. mov HV_FAST_SVC_RECV, %o5
  663. ta HV_FAST_TRAP
  664. stx %o1, [%i3]
  665. ret
  666. restore
  667. ENDPROC(sun4v_svc_recv)
  668. ENTRY(sun4v_svc_getstatus)
  669. mov HV_FAST_SVC_GETSTATUS, %o5
  670. mov %o1, %o4
  671. ta HV_FAST_TRAP
  672. stx %o1, [%o4]
  673. retl
  674. nop
  675. ENDPROC(sun4v_svc_getstatus)
  676. ENTRY(sun4v_svc_setstatus)
  677. mov HV_FAST_SVC_SETSTATUS, %o5
  678. ta HV_FAST_TRAP
  679. retl
  680. nop
  681. ENDPROC(sun4v_svc_setstatus)
  682. ENTRY(sun4v_svc_clrstatus)
  683. mov HV_FAST_SVC_CLRSTATUS, %o5
  684. ta HV_FAST_TRAP
  685. retl
  686. nop
  687. ENDPROC(sun4v_svc_clrstatus)
  688. ENTRY(sun4v_mmustat_conf)
  689. mov %o1, %o4
  690. mov HV_FAST_MMUSTAT_CONF, %o5
  691. ta HV_FAST_TRAP
  692. stx %o1, [%o4]
  693. retl
  694. nop
  695. ENDPROC(sun4v_mmustat_conf)
  696. ENTRY(sun4v_mmustat_info)
  697. mov %o0, %o4
  698. mov HV_FAST_MMUSTAT_INFO, %o5
  699. ta HV_FAST_TRAP
  700. stx %o1, [%o4]
  701. retl
  702. nop
  703. ENDPROC(sun4v_mmustat_info)
  704. ENTRY(sun4v_mmu_demap_all)
  705. clr %o0
  706. clr %o1
  707. mov HV_MMU_ALL, %o2
  708. mov HV_FAST_MMU_DEMAP_ALL, %o5
  709. ta HV_FAST_TRAP
  710. retl
  711. nop
  712. ENDPROC(sun4v_mmu_demap_all)
  713. ENTRY(sun4v_niagara_getperf)
  714. mov %o0, %o4
  715. mov HV_FAST_GET_PERFREG, %o5
  716. ta HV_FAST_TRAP
  717. stx %o1, [%o4]
  718. retl
  719. nop
  720. ENDPROC(sun4v_niagara_getperf)
  721. EXPORT_SYMBOL(sun4v_niagara_getperf)
  722. ENTRY(sun4v_niagara_setperf)
  723. mov HV_FAST_SET_PERFREG, %o5
  724. ta HV_FAST_TRAP
  725. retl
  726. nop
  727. ENDPROC(sun4v_niagara_setperf)
  728. EXPORT_SYMBOL(sun4v_niagara_setperf)
  729. ENTRY(sun4v_niagara2_getperf)
  730. mov %o0, %o4
  731. mov HV_FAST_N2_GET_PERFREG, %o5
  732. ta HV_FAST_TRAP
  733. stx %o1, [%o4]
  734. retl
  735. nop
  736. ENDPROC(sun4v_niagara2_getperf)
  737. EXPORT_SYMBOL(sun4v_niagara2_getperf)
  738. ENTRY(sun4v_niagara2_setperf)
  739. mov HV_FAST_N2_SET_PERFREG, %o5
  740. ta HV_FAST_TRAP
  741. retl
  742. nop
  743. ENDPROC(sun4v_niagara2_setperf)
  744. EXPORT_SYMBOL(sun4v_niagara2_setperf)
  745. ENTRY(sun4v_reboot_data_set)
  746. mov HV_FAST_REBOOT_DATA_SET, %o5
  747. ta HV_FAST_TRAP
  748. retl
  749. nop
  750. ENDPROC(sun4v_reboot_data_set)
  751. ENTRY(sun4v_vt_get_perfreg)
  752. mov %o1, %o4
  753. mov HV_FAST_VT_GET_PERFREG, %o5
  754. ta HV_FAST_TRAP
  755. stx %o1, [%o4]
  756. retl
  757. nop
  758. ENDPROC(sun4v_vt_get_perfreg)
  759. ENTRY(sun4v_vt_set_perfreg)
  760. mov HV_FAST_VT_SET_PERFREG, %o5
  761. ta HV_FAST_TRAP
  762. retl
  763. nop
  764. ENDPROC(sun4v_vt_set_perfreg)
  765. ENTRY(sun4v_t5_get_perfreg)
  766. mov %o1, %o4
  767. mov HV_FAST_T5_GET_PERFREG, %o5
  768. ta HV_FAST_TRAP
  769. stx %o1, [%o4]
  770. retl
  771. nop
  772. ENDPROC(sun4v_t5_get_perfreg)
  773. ENTRY(sun4v_t5_set_perfreg)
  774. mov HV_FAST_T5_SET_PERFREG, %o5
  775. ta HV_FAST_TRAP
  776. retl
  777. nop
  778. ENDPROC(sun4v_t5_set_perfreg)
  779. ENTRY(sun4v_m7_get_perfreg)
  780. mov %o1, %o4
  781. mov HV_FAST_M7_GET_PERFREG, %o5
  782. ta HV_FAST_TRAP
  783. stx %o1, [%o4]
  784. retl
  785. nop
  786. ENDPROC(sun4v_m7_get_perfreg)
  787. ENTRY(sun4v_m7_set_perfreg)
  788. mov HV_FAST_M7_SET_PERFREG, %o5
  789. ta HV_FAST_TRAP
  790. retl
  791. nop
  792. ENDPROC(sun4v_m7_set_perfreg)