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