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