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