1 /* SPDX-License-Identifier: GPL-2.0 */
7 ENTRY(sun4v_devino_to_sysino)
8 mov HV_FAST_INTR_DEVINO2SYSINO, %o5
12 ENDPROC(sun4v_devino_to_sysino)
16 * returns %o0: intr_enabled (HV_INTR_{DISABLED,ENABLED})
18 ENTRY(sun4v_intr_getenabled)
19 mov HV_FAST_INTR_GETENABLED, %o5
23 ENDPROC(sun4v_intr_getenabled)
26 * %o1: intr_enabled (HV_INTR_{DISABLED,ENABLED})
28 ENTRY(sun4v_intr_setenabled)
29 mov HV_FAST_INTR_SETENABLED, %o5
33 ENDPROC(sun4v_intr_setenabled)
37 * returns %o0: intr_state (HV_INTR_STATE_*)
39 ENTRY(sun4v_intr_getstate)
40 mov HV_FAST_INTR_GETSTATE, %o5
44 ENDPROC(sun4v_intr_getstate)
47 * %o1: intr_state (HV_INTR_STATE_*)
49 ENTRY(sun4v_intr_setstate)
50 mov HV_FAST_INTR_SETSTATE, %o5
54 ENDPROC(sun4v_intr_setstate)
60 ENTRY(sun4v_intr_gettarget)
61 mov HV_FAST_INTR_GETTARGET, %o5
65 ENDPROC(sun4v_intr_gettarget)
70 ENTRY(sun4v_intr_settarget)
71 mov HV_FAST_INTR_SETTARGET, %o5
75 ENDPROC(sun4v_intr_settarget)
84 ENTRY(sun4v_cpu_start)
85 mov HV_FAST_CPU_START, %o5
89 ENDPROC(sun4v_cpu_start)
96 mov HV_FAST_CPU_STOP, %o5
100 ENDPROC(sun4v_cpu_stop)
102 /* returns %o0: status */
103 ENTRY(sun4v_cpu_yield)
104 mov HV_FAST_CPU_YIELD, %o5
108 ENDPROC(sun4v_cpu_yield)
112 * returns %o0: status
114 ENTRY(sun4v_cpu_poke)
115 mov HV_FAST_CPU_POKE, %o5
119 ENDPROC(sun4v_cpu_poke)
123 * %o2: num queue entries
125 * returns %o0: status
127 ENTRY(sun4v_cpu_qconf)
128 mov HV_FAST_CPU_QCONF, %o5
132 ENDPROC(sun4v_cpu_qconf)
134 /* %o0: num cpus in cpu list
135 * %o1: cpu list paddr
136 * %o2: mondo block paddr
138 * returns %o0: status
140 ENTRY(sun4v_cpu_mondo_send)
141 mov HV_FAST_CPU_MONDO_SEND, %o5
145 ENDPROC(sun4v_cpu_mondo_send)
149 * returns %o0: -status if status non-zero, else
150 * %o0: cpu state as HV_CPU_STATE_*
152 ENTRY(sun4v_cpu_state)
153 mov HV_FAST_CPU_STATE, %o5
160 ENDPROC(sun4v_cpu_state)
162 /* %o0: virtual address
165 * %o3: HV_MMU_* flags
167 * returns %o0: status
169 ENTRY(sun4v_mmu_map_perm_addr)
170 mov HV_FAST_MMU_MAP_PERM_ADDR, %o5
174 ENDPROC(sun4v_mmu_map_perm_addr)
176 /* %o0: number of TSB descriptions
177 * %o1: TSB descriptions real address
179 * returns %o0: status
181 ENTRY(sun4v_mmu_tsb_ctx0)
182 mov HV_FAST_MMU_TSB_CTX0, %o5
186 ENDPROC(sun4v_mmu_tsb_ctx0)
188 /* %o0: API group number
189 * %o1: pointer to unsigned long major number storage
190 * %o2: pointer to unsigned long minor number storage
192 * returns %o0: status
194 ENTRY(sun4v_get_version)
195 mov HV_CORE_GET_VER, %o5
202 ENDPROC(sun4v_get_version)
204 /* %o0: API group number
205 * %o1: desired major number
206 * %o2: desired minor number
207 * %o3: pointer to unsigned long actual minor number storage
209 * returns %o0: status
211 ENTRY(sun4v_set_version)
212 mov HV_CORE_SET_VER, %o5
217 ENDPROC(sun4v_set_version)
219 /* %o0: pointer to unsigned long time
221 * returns %o0: status
225 mov HV_FAST_TOD_GET, %o5
230 ENDPROC(sun4v_tod_get)
234 * returns %o0: status
237 mov HV_FAST_TOD_SET, %o5
241 ENDPROC(sun4v_tod_set)
243 /* %o0: pointer to unsigned long status
245 * returns %o0: signed character
247 ENTRY(sun4v_con_getchar)
249 mov HV_FAST_CONS_GETCHAR, %o5
256 ENDPROC(sun4v_con_getchar)
258 /* %o0: signed long character
260 * returns %o0: status
262 ENTRY(sun4v_con_putchar)
263 mov HV_FAST_CONS_PUTCHAR, %o5
267 ENDPROC(sun4v_con_putchar)
269 /* %o0: buffer real address
271 * %o2: pointer to unsigned long bytes_read
273 * returns %o0: status
275 ENTRY(sun4v_con_read)
277 mov HV_FAST_CONS_READ, %o5
280 cmp %o1, -1 /* break */
283 cmp %o1, -2 /* hup */
289 ENDPROC(sun4v_con_read)
291 /* %o0: buffer real address
293 * %o2: pointer to unsigned long bytes_written
295 * returns %o0: status
297 ENTRY(sun4v_con_write)
299 mov HV_FAST_CONS_WRITE, %o5
304 ENDPROC(sun4v_con_write)
307 * %o1: address of description string
309 * returns %o0: status
311 ENTRY(sun4v_mach_set_soft_state)
312 mov HV_FAST_MACH_SET_SOFT_STATE, %o5
316 ENDPROC(sun4v_mach_set_soft_state)
322 ENTRY(sun4v_mach_exit)
323 mov HV_FAST_MACH_EXIT, %o5
327 ENDPROC(sun4v_mach_exit)
329 /* %o0: buffer real address
331 * %o2: pointer to unsigned long real_buf_len
333 * returns %o0: status
335 ENTRY(sun4v_mach_desc)
337 mov HV_FAST_MACH_DESC, %o5
342 ENDPROC(sun4v_mach_desc)
344 /* %o0: new timeout in milliseconds
345 * %o1: pointer to unsigned long orig_timeout
347 * returns %o0: status
349 ENTRY(sun4v_mach_set_watchdog)
351 mov HV_FAST_MACH_SET_WATCHDOG, %o5
357 ENDPROC(sun4v_mach_set_watchdog)
358 EXPORT_SYMBOL(sun4v_mach_set_watchdog)
360 /* No inputs and does not return. */
361 ENTRY(sun4v_mach_sir)
363 mov HV_FAST_MACH_SIR, %o5
368 ENDPROC(sun4v_mach_sir)
374 * returns %o0: status
376 ENTRY(sun4v_ldc_tx_qconf)
377 mov HV_FAST_LDC_TX_QCONF, %o5
381 ENDPROC(sun4v_ldc_tx_qconf)
384 * %o1: pointer to unsigned long ra
385 * %o2: pointer to unsigned long num_entries
387 * returns %o0: status
389 ENTRY(sun4v_ldc_tx_qinfo)
392 mov HV_FAST_LDC_TX_QINFO, %o5
398 ENDPROC(sun4v_ldc_tx_qinfo)
401 * %o1: pointer to unsigned long head_off
402 * %o2: pointer to unsigned long tail_off
403 * %o2: pointer to unsigned long chan_state
405 * returns %o0: status
407 ENTRY(sun4v_ldc_tx_get_state)
411 mov HV_FAST_LDC_TX_GET_STATE, %o5
418 ENDPROC(sun4v_ldc_tx_get_state)
423 * returns %o0: status
425 ENTRY(sun4v_ldc_tx_set_qtail)
426 mov HV_FAST_LDC_TX_SET_QTAIL, %o5
430 ENDPROC(sun4v_ldc_tx_set_qtail)
436 * returns %o0: status
438 ENTRY(sun4v_ldc_rx_qconf)
439 mov HV_FAST_LDC_RX_QCONF, %o5
443 ENDPROC(sun4v_ldc_rx_qconf)
446 * %o1: pointer to unsigned long ra
447 * %o2: pointer to unsigned long num_entries
449 * returns %o0: status
451 ENTRY(sun4v_ldc_rx_qinfo)
454 mov HV_FAST_LDC_RX_QINFO, %o5
460 ENDPROC(sun4v_ldc_rx_qinfo)
463 * %o1: pointer to unsigned long head_off
464 * %o2: pointer to unsigned long tail_off
465 * %o2: pointer to unsigned long chan_state
467 * returns %o0: status
469 ENTRY(sun4v_ldc_rx_get_state)
473 mov HV_FAST_LDC_RX_GET_STATE, %o5
480 ENDPROC(sun4v_ldc_rx_get_state)
485 * returns %o0: status
487 ENTRY(sun4v_ldc_rx_set_qhead)
488 mov HV_FAST_LDC_RX_SET_QHEAD, %o5
492 ENDPROC(sun4v_ldc_rx_set_qhead)
498 * returns %o0: status
500 ENTRY(sun4v_ldc_set_map_table)
501 mov HV_FAST_LDC_SET_MAP_TABLE, %o5
505 ENDPROC(sun4v_ldc_set_map_table)
508 * %o1: pointer to unsigned long ra
509 * %o2: pointer to unsigned long num_entries
511 * returns %o0: status
513 ENTRY(sun4v_ldc_get_map_table)
516 mov HV_FAST_LDC_GET_MAP_TABLE, %o5
522 ENDPROC(sun4v_ldc_get_map_table)
529 * %o5: pointer to unsigned long actual_len
531 * returns %o0: status
533 ENTRY(sun4v_ldc_copy)
535 mov HV_FAST_LDC_COPY, %o5
540 ENDPROC(sun4v_ldc_copy)
544 * %o2: pointer to unsigned long ra
545 * %o3: pointer to unsigned long perm
547 * returns %o0: status
549 ENTRY(sun4v_ldc_mapin)
552 mov HV_FAST_LDC_MAPIN, %o5
558 ENDPROC(sun4v_ldc_mapin)
562 * returns %o0: status
564 ENTRY(sun4v_ldc_unmap)
565 mov HV_FAST_LDC_UNMAP, %o5
569 ENDPROC(sun4v_ldc_unmap)
575 * returns %o0: status
577 ENTRY(sun4v_ldc_revoke)
578 mov HV_FAST_LDC_REVOKE, %o5
582 ENDPROC(sun4v_ldc_revoke)
584 /* %o0: device handle
586 * %o2: pointer to unsigned long cookie
588 * returns %o0: status
590 ENTRY(sun4v_vintr_get_cookie)
592 mov HV_FAST_VINTR_GET_COOKIE, %o5
597 ENDPROC(sun4v_vintr_get_cookie)
599 /* %o0: device handle
603 * returns %o0: status
605 ENTRY(sun4v_vintr_set_cookie)
606 mov HV_FAST_VINTR_SET_COOKIE, %o5
610 ENDPROC(sun4v_vintr_set_cookie)
612 /* %o0: device handle
614 * %o2: pointer to unsigned long valid_state
616 * returns %o0: status
618 ENTRY(sun4v_vintr_get_valid)
620 mov HV_FAST_VINTR_GET_VALID, %o5
625 ENDPROC(sun4v_vintr_get_valid)
627 /* %o0: device handle
631 * returns %o0: status
633 ENTRY(sun4v_vintr_set_valid)
634 mov HV_FAST_VINTR_SET_VALID, %o5
638 ENDPROC(sun4v_vintr_set_valid)
640 /* %o0: device handle
642 * %o2: pointer to unsigned long state
644 * returns %o0: status
646 ENTRY(sun4v_vintr_get_state)
648 mov HV_FAST_VINTR_GET_STATE, %o5
653 ENDPROC(sun4v_vintr_get_state)
655 /* %o0: device handle
659 * returns %o0: status
661 ENTRY(sun4v_vintr_set_state)
662 mov HV_FAST_VINTR_SET_STATE, %o5
666 ENDPROC(sun4v_vintr_set_state)
668 /* %o0: device handle
670 * %o2: pointer to unsigned long cpuid
672 * returns %o0: status
674 ENTRY(sun4v_vintr_get_target)
676 mov HV_FAST_VINTR_GET_TARGET, %o5
681 ENDPROC(sun4v_vintr_get_target)
683 /* %o0: device handle
687 * returns %o0: status
689 ENTRY(sun4v_vintr_set_target)
690 mov HV_FAST_VINTR_SET_TARGET, %o5
694 ENDPROC(sun4v_vintr_set_target)
696 /* %o0: NCS sub-function
697 * %o1: sub-function arg real-address
698 * %o2: sub-function arg size
700 * returns %o0: status
702 ENTRY(sun4v_ncs_request)
703 mov HV_FAST_NCS_REQUEST, %o5
707 ENDPROC(sun4v_ncs_request)
709 ENTRY(sun4v_svc_send)
714 mov HV_FAST_SVC_SEND, %o5
719 ENDPROC(sun4v_svc_send)
721 ENTRY(sun4v_svc_recv)
726 mov HV_FAST_SVC_RECV, %o5
731 ENDPROC(sun4v_svc_recv)
733 ENTRY(sun4v_svc_getstatus)
734 mov HV_FAST_SVC_GETSTATUS, %o5
740 ENDPROC(sun4v_svc_getstatus)
742 ENTRY(sun4v_svc_setstatus)
743 mov HV_FAST_SVC_SETSTATUS, %o5
747 ENDPROC(sun4v_svc_setstatus)
749 ENTRY(sun4v_svc_clrstatus)
750 mov HV_FAST_SVC_CLRSTATUS, %o5
754 ENDPROC(sun4v_svc_clrstatus)
756 ENTRY(sun4v_mmustat_conf)
758 mov HV_FAST_MMUSTAT_CONF, %o5
763 ENDPROC(sun4v_mmustat_conf)
765 ENTRY(sun4v_mmustat_info)
767 mov HV_FAST_MMUSTAT_INFO, %o5
772 ENDPROC(sun4v_mmustat_info)
774 ENTRY(sun4v_mmu_demap_all)
778 mov HV_FAST_MMU_DEMAP_ALL, %o5
782 ENDPROC(sun4v_mmu_demap_all)
784 ENTRY(sun4v_niagara_getperf)
786 mov HV_FAST_GET_PERFREG, %o5
791 ENDPROC(sun4v_niagara_getperf)
792 EXPORT_SYMBOL(sun4v_niagara_getperf)
794 ENTRY(sun4v_niagara_setperf)
795 mov HV_FAST_SET_PERFREG, %o5
799 ENDPROC(sun4v_niagara_setperf)
800 EXPORT_SYMBOL(sun4v_niagara_setperf)
802 ENTRY(sun4v_niagara2_getperf)
804 mov HV_FAST_N2_GET_PERFREG, %o5
809 ENDPROC(sun4v_niagara2_getperf)
810 EXPORT_SYMBOL(sun4v_niagara2_getperf)
812 ENTRY(sun4v_niagara2_setperf)
813 mov HV_FAST_N2_SET_PERFREG, %o5
817 ENDPROC(sun4v_niagara2_setperf)
818 EXPORT_SYMBOL(sun4v_niagara2_setperf)
820 ENTRY(sun4v_reboot_data_set)
821 mov HV_FAST_REBOOT_DATA_SET, %o5
825 ENDPROC(sun4v_reboot_data_set)
827 ENTRY(sun4v_vt_get_perfreg)
829 mov HV_FAST_VT_GET_PERFREG, %o5
834 ENDPROC(sun4v_vt_get_perfreg)
836 ENTRY(sun4v_vt_set_perfreg)
837 mov HV_FAST_VT_SET_PERFREG, %o5
841 ENDPROC(sun4v_vt_set_perfreg)
843 ENTRY(sun4v_t5_get_perfreg)
845 mov HV_FAST_T5_GET_PERFREG, %o5
850 ENDPROC(sun4v_t5_get_perfreg)
852 ENTRY(sun4v_t5_set_perfreg)
853 mov HV_FAST_T5_SET_PERFREG, %o5
857 ENDPROC(sun4v_t5_set_perfreg)
859 ENTRY(sun4v_m7_get_perfreg)
861 mov HV_FAST_M7_GET_PERFREG, %o5
866 ENDPROC(sun4v_m7_get_perfreg)
868 ENTRY(sun4v_m7_set_perfreg)
869 mov HV_FAST_M7_SET_PERFREG, %o5
873 ENDPROC(sun4v_m7_set_perfreg)
875 /* %o0: address of CCB array
876 * %o1: size (in bytes) of CCB array
882 * %o1: size (in bytes) of the CCB array that was accepted
886 ENTRY(sun4v_ccb_submit)
888 mov HV_CCB_SUBMIT, %o5
893 ENDPROC(sun4v_ccb_submit)
894 EXPORT_SYMBOL(sun4v_ccb_submit)
896 /* %o0: completion area ra for the ccb to get info
905 ENTRY(sun4v_ccb_info)
909 sth %o1, [%g1 + CCB_INFO_OFFSET_CCB_STATE]
910 sth %o2, [%g1 + CCB_INFO_OFFSET_QUEUE_POS]
911 sth %o3, [%g1 + CCB_INFO_OFFSET_DAX_UNIT]
913 sth %o4, [%g1 + CCB_INFO_OFFSET_QUEUE_NUM]
914 ENDPROC(sun4v_ccb_info)
915 EXPORT_SYMBOL(sun4v_ccb_info)
917 /* %o0: completion area ra for the ccb to kill
921 * %o1: result of the kill
923 ENTRY(sun4v_ccb_kill)
929 ENDPROC(sun4v_ccb_kill)
930 EXPORT_SYMBOL(sun4v_ccb_kill)