1
2
3
4
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
14
15
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
25
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
35
36
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
46
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
56
57
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
67
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
77
78
79
80
81
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
91
92
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
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
110
111
112
113
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
123
124
125
126
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
136
137
138
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
151
152
153
154
155
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
165
166
167
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
177
178
179
180
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
193
194
195
196
197
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
208
209
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
221
222
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
232
233
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
247
248
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
258
259
260
261
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
269 be,a,pn %icc, 1f
270 mov %o1, %o0
271 cmp %o1, -2
272 be,a,pn %icc, 1f
273 mov %o1, %o0
274 stx %o1, [%o4]
2751: retl
276 nop
277ENDPROC(sun4v_con_read)
278
279
280
281
282
283
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
295
296
297
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
307
308
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
318
319
320
321
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
333
334
335
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
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
357
358
359
360
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
370
371
372
373
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
387
388
389
390
391
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
407
408
409
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
419
420
421
422
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
432
433
434
435
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
449
450
451
452
453
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
469
470
471
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
481
482
483
484
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
494
495
496
497
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
511
512
513
514
515
516
517
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
529
530
531
532
533
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
547
548
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
558
559
560
561
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
571
572
573
574
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
586
587
588
589
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
599
600
601
602
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
614
615
616
617
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
627
628
629
630
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
642
643
644
645
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
655
656
657
658
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
670
671
672
673
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
683
684
685
686
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