hvcalls.S 14.4 KB
Newer Older
1 2 3 4 5
	/* %o0: devhandle
	 * %o1:	devino
	 *
	 * returns %o0: sysino
	 */
6
ENTRY(sun4v_devino_to_sysino)
7 8 9 10
	mov	HV_FAST_INTR_DEVINO2SYSINO, %o5
	ta	HV_FAST_TRAP
	retl
	 mov	%o1, %o0
11
ENDPROC(sun4v_devino_to_sysino)
12 13 14 15 16

	/* %o0: sysino
	 *
	 * returns %o0: intr_enabled (HV_INTR_{DISABLED,ENABLED})
	 */
17
ENTRY(sun4v_intr_getenabled)
18 19 20 21
	mov	HV_FAST_INTR_GETENABLED, %o5
	ta	HV_FAST_TRAP
	retl
	 mov	%o1, %o0
22
ENDPROC(sun4v_intr_getenabled)
23 24 25 26

	/* %o0: sysino
	 * %o1: intr_enabled (HV_INTR_{DISABLED,ENABLED})
	 */
27
ENTRY(sun4v_intr_setenabled)
28 29 30 31
	mov	HV_FAST_INTR_SETENABLED, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
32
ENDPROC(sun4v_intr_setenabled)
33 34 35 36 37

	/* %o0: sysino
	 *
	 * returns %o0: intr_state (HV_INTR_STATE_*)
	 */
38
ENTRY(sun4v_intr_getstate)
39 40 41 42
	mov	HV_FAST_INTR_GETSTATE, %o5
	ta	HV_FAST_TRAP
	retl
	 mov	%o1, %o0
43
ENDPROC(sun4v_intr_getstate)
44 45 46 47

	/* %o0: sysino
	 * %o1: intr_state (HV_INTR_STATE_*)
	 */
48
ENTRY(sun4v_intr_setstate)
49 50 51 52
	mov	HV_FAST_INTR_SETSTATE, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
53
ENDPROC(sun4v_intr_setstate)
54 55 56 57 58

	/* %o0: sysino
	 *
	 * returns %o0: cpuid
	 */
59
ENTRY(sun4v_intr_gettarget)
60 61 62 63
	mov	HV_FAST_INTR_GETTARGET, %o5
	ta	HV_FAST_TRAP
	retl
	 mov	%o1, %o0
64
ENDPROC(sun4v_intr_gettarget)
65 66 67 68

	/* %o0: sysino
	 * %o1: cpuid
	 */
69
ENTRY(sun4v_intr_settarget)
70 71 72 73
	mov	HV_FAST_INTR_SETTARGET, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
74
ENDPROC(sun4v_intr_settarget)
75 76 77 78 79 80 81 82

	/* %o0:	cpuid
	 * %o1: pc
	 * %o2:	rtba
	 * %o3:	arg0
	 *
	 * returns %o0:	status
	 */
83
ENTRY(sun4v_cpu_start)
84 85 86 87
	mov	HV_FAST_CPU_START, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
88
ENDPROC(sun4v_cpu_start)
89 90 91 92 93

	/* %o0:	cpuid
	 *
	 * returns %o0: status
	 */
94
ENTRY(sun4v_cpu_stop)
95 96 97 98
	mov	HV_FAST_CPU_STOP, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
99
ENDPROC(sun4v_cpu_stop)
100 101

	/* returns %o0:	status  */
102
ENTRY(sun4v_cpu_yield)
103 104 105 106
	mov	HV_FAST_CPU_YIELD, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
107
ENDPROC(sun4v_cpu_yield)
108 109 110 111 112 113 114

	/* %o0:	type
	 * %o1:	queue paddr
	 * %o2:	num queue entries
	 *
	 * returns %o0:	status
	 */
115
ENTRY(sun4v_cpu_qconf)
116 117 118 119
	mov	HV_FAST_CPU_QCONF, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
120
ENDPROC(sun4v_cpu_qconf)
121 122 123 124 125 126 127

	/* %o0:	num cpus in cpu list
	 * %o1:	cpu list paddr
	 * %o2:	mondo block paddr
	 *
	 * returns %o0: status
	 */
128
ENTRY(sun4v_cpu_mondo_send)
129 130 131 132
	mov	HV_FAST_CPU_MONDO_SEND, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
133
ENDPROC(sun4v_cpu_mondo_send)
134 135 136 137 138 139

	/* %o0:	CPU ID
	 *
	 * returns %o0:	-status if status non-zero, else
	 *         %o0:	cpu state as HV_CPU_STATE_*
	 */
140
ENTRY(sun4v_cpu_state)
141 142 143 144 145 146 147
	mov	HV_FAST_CPU_STATE, %o5
	ta	HV_FAST_TRAP
	brnz,pn	%o0, 1f
	 sub	%g0, %o0, %o0
	mov	%o1, %o0
1:	retl
	 nop
148
ENDPROC(sun4v_cpu_state)
149 150 151 152 153 154 155 156

	/* %o0: virtual address
	 * %o1: must be zero
	 * %o2: TTE
	 * %o3: HV_MMU_* flags
	 *
	 * returns %o0: status
	 */
157
ENTRY(sun4v_mmu_map_perm_addr)
158 159 160 161
	mov	HV_FAST_MMU_MAP_PERM_ADDR, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
162
ENDPROC(sun4v_mmu_map_perm_addr)
163 164 165 166 167 168

	/* %o0: number of TSB descriptions
	 * %o1: TSB descriptions real address
	 *
	 * returns %o0: status
	 */
169
ENTRY(sun4v_mmu_tsb_ctx0)
170 171 172 173
	mov	HV_FAST_MMU_TSB_CTX0, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
174
ENDPROC(sun4v_mmu_tsb_ctx0)
175 176 177 178 179 180 181

	/* %o0:	API group number
	 * %o1: pointer to unsigned long major number storage
	 * %o2: pointer to unsigned long minor number storage
	 *
	 * returns %o0: status
	 */
182
ENTRY(sun4v_get_version)
183 184 185 186 187 188 189
	mov	HV_CORE_GET_VER, %o5
	mov	%o1, %o3
	mov	%o2, %o4
	ta	HV_CORE_TRAP
	stx	%o1, [%o3]
	retl
	 stx	%o2, [%o4]
190
ENDPROC(sun4v_get_version)
191 192 193 194 195 196 197 198

	/* %o0: API group number
	 * %o1: desired major number
	 * %o2: desired minor number
	 * %o3: pointer to unsigned long actual minor number storage
	 *
	 * returns %o0: status
	 */
199
ENTRY(sun4v_set_version)
200 201 202 203 204
	mov	HV_CORE_SET_VER, %o5
	mov	%o3, %o4
	ta	HV_CORE_TRAP
	retl
	 stx	%o1, [%o4]
205
ENDPROC(sun4v_set_version)
206 207 208 209 210

	/* %o0: pointer to unsigned long time
	 *
	 * returns %o0: status
	 */
211
ENTRY(sun4v_tod_get)
212 213 214 215 216 217
	mov	%o0, %o4
	mov	HV_FAST_TOD_GET, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%o4]
	retl
	 nop
218
ENDPROC(sun4v_tod_get)
219 220 221 222 223

	/* %o0: time
	 *
	 * returns %o0: status
	 */
224
ENTRY(sun4v_tod_set)
225 226 227 228
	mov	HV_FAST_TOD_SET, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
229
ENDPROC(sun4v_tod_set)
230 231 232 233 234

	/* %o0: pointer to unsigned long status
	 *
	 * returns %o0: signed character
	 */
235
ENTRY(sun4v_con_getchar)
236 237 238 239 240 241 242 243
	mov	%o0, %o4
	mov	HV_FAST_CONS_GETCHAR, %o5
	clr	%o0
	clr	%o1
	ta	HV_FAST_TRAP
	stx	%o0, [%o4]
	retl
	 sra	%o1, 0, %o0
244
ENDPROC(sun4v_con_getchar)
245 246 247 248 249

	/* %o0: signed long character
	 *
	 * returns %o0: status
	 */
250
ENTRY(sun4v_con_putchar)
251 252 253 254
	mov	HV_FAST_CONS_PUTCHAR, %o5
	ta	HV_FAST_TRAP
	retl
	 sra	%o0, 0, %o0
255
ENDPROC(sun4v_con_putchar)
256 257 258 259 260 261 262

	/* %o0: buffer real address
	 * %o1: buffer size
	 * %o2: pointer to unsigned long bytes_read
	 *
	 * returns %o0: status
	 */
263
ENTRY(sun4v_con_read)
264 265 266 267 268 269 270 271 272 273 274 275 276
	mov	%o2, %o4
	mov	HV_FAST_CONS_READ, %o5
	ta	HV_FAST_TRAP
	brnz	%o0, 1f
	 cmp	%o1, -1		/* break */
	be,a,pn	%icc, 1f
	 mov	%o1, %o0
	cmp	%o1, -2		/* hup */
	be,a,pn	%icc, 1f
	 mov	%o1, %o0
	stx	%o1, [%o4]
1:	retl
	 nop
277
ENDPROC(sun4v_con_read)
278 279 280 281 282 283 284

	/* %o0: buffer real address
	 * %o1: buffer size
	 * %o2: pointer to unsigned long bytes_written
	 *
	 * returns %o0: status
	 */
285
ENTRY(sun4v_con_write)
286 287 288 289 290 291
	mov	%o2, %o4
	mov	HV_FAST_CONS_WRITE, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%o4]
	retl
	 nop
292
ENDPROC(sun4v_con_write)
293 294 295 296 297 298

	/* %o0:	soft state
	 * %o1:	address of description string
	 *
	 * returns %o0: status
	 */
299
ENTRY(sun4v_mach_set_soft_state)
300 301 302 303
	mov	HV_FAST_MACH_SET_SOFT_STATE, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
304
ENDPROC(sun4v_mach_set_soft_state)
305 306 307 308 309

	/* %o0: exit code
	 *
	 * Does not return.
	 */
310
ENTRY(sun4v_mach_exit)
311 312 313 314
	mov	HV_FAST_MACH_EXIT, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
315
ENDPROC(sun4v_mach_exit)
316 317 318 319 320 321 322

	/* %o0: buffer real address
	 * %o1: buffer length
	 * %o2: pointer to unsigned long real_buf_len
	 *
	 * returns %o0: status
	 */
323
ENTRY(sun4v_mach_desc)
324 325 326 327 328 329
	mov	%o2, %o4
	mov	HV_FAST_MACH_DESC, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%o4]
	retl
	 nop
330
ENDPROC(sun4v_mach_desc)
331 332 333 334 335 336

	/* %o0: new timeout in milliseconds
	 * %o1: pointer to unsigned long orig_timeout
	 *
	 * returns %o0: status
	 */
337
ENTRY(sun4v_mach_set_watchdog)
338 339 340
	mov	%o1, %o4
	mov	HV_FAST_MACH_SET_WATCHDOG, %o5
	ta	HV_FAST_TRAP
341
	brnz,a,pn %o4, 0f
342
	stx	%o1, [%o4]
343
0:	retl
344
	 nop
345
ENDPROC(sun4v_mach_set_watchdog)
346 347

	/* No inputs and does not return.  */
348
ENTRY(sun4v_mach_sir)
349 350 351 352 353 354
	mov	%o1, %o4
	mov	HV_FAST_MACH_SIR, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%o4]
	retl
	 nop
355
ENDPROC(sun4v_mach_sir)
356 357 358 359 360 361 362

	/* %o0: channel
	 * %o1:	ra
	 * %o2:	num_entries
	 *
	 * returns %o0:	status
	 */
363
ENTRY(sun4v_ldc_tx_qconf)
364 365 366 367
	mov	HV_FAST_LDC_TX_QCONF, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
368
ENDPROC(sun4v_ldc_tx_qconf)
369 370 371 372 373 374 375

	/* %o0: channel
	 * %o1:	pointer to unsigned long ra
	 * %o2:	pointer to unsigned long num_entries
	 *
	 * returns %o0:	status
	 */
376
ENTRY(sun4v_ldc_tx_qinfo)
377 378 379 380 381 382 383 384
	mov	%o1, %g1
	mov	%o2, %g2
	mov	HV_FAST_LDC_TX_QINFO, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%g1]
	stx	%o2, [%g2]
	retl
	 nop
385
ENDPROC(sun4v_ldc_tx_qinfo)
386 387 388 389 390 391 392 393

	/* %o0: channel
	 * %o1:	pointer to unsigned long head_off
	 * %o2:	pointer to unsigned long tail_off
	 * %o2:	pointer to unsigned long chan_state
	 *
	 * returns %o0:	status
	 */
394
ENTRY(sun4v_ldc_tx_get_state)
395 396 397 398 399 400 401 402 403 404
	mov	%o1, %g1
	mov	%o2, %g2
	mov	%o3, %g3
	mov	HV_FAST_LDC_TX_GET_STATE, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%g1]
	stx	%o2, [%g2]
	stx	%o3, [%g3]
	retl
	 nop
405
ENDPROC(sun4v_ldc_tx_get_state)
406 407 408 409 410 411

	/* %o0: channel
	 * %o1:	tail_off
	 *
	 * returns %o0:	status
	 */
412
ENTRY(sun4v_ldc_tx_set_qtail)
413 414 415 416
	mov	HV_FAST_LDC_TX_SET_QTAIL, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
417
ENDPROC(sun4v_ldc_tx_set_qtail)
418 419 420 421 422 423 424

	/* %o0: channel
	 * %o1:	ra
	 * %o2:	num_entries
	 *
	 * returns %o0:	status
	 */
425
ENTRY(sun4v_ldc_rx_qconf)
426 427 428 429
	mov	HV_FAST_LDC_RX_QCONF, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
430
ENDPROC(sun4v_ldc_rx_qconf)
431 432 433 434 435 436 437

	/* %o0: channel
	 * %o1:	pointer to unsigned long ra
	 * %o2:	pointer to unsigned long num_entries
	 *
	 * returns %o0:	status
	 */
438
ENTRY(sun4v_ldc_rx_qinfo)
439 440 441 442 443 444 445 446
	mov	%o1, %g1
	mov	%o2, %g2
	mov	HV_FAST_LDC_RX_QINFO, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%g1]
	stx	%o2, [%g2]
	retl
	 nop
447
ENDPROC(sun4v_ldc_rx_qinfo)
448 449 450 451 452 453 454 455

	/* %o0: channel
	 * %o1:	pointer to unsigned long head_off
	 * %o2:	pointer to unsigned long tail_off
	 * %o2:	pointer to unsigned long chan_state
	 *
	 * returns %o0:	status
	 */
456
ENTRY(sun4v_ldc_rx_get_state)
457 458 459 460 461 462 463 464 465 466
	mov	%o1, %g1
	mov	%o2, %g2
	mov	%o3, %g3
	mov	HV_FAST_LDC_RX_GET_STATE, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%g1]
	stx	%o2, [%g2]
	stx	%o3, [%g3]
	retl
	 nop
467
ENDPROC(sun4v_ldc_rx_get_state)
468 469 470 471 472 473

	/* %o0: channel
	 * %o1:	head_off
	 *
	 * returns %o0:	status
	 */
474
ENTRY(sun4v_ldc_rx_set_qhead)
475 476 477 478
	mov	HV_FAST_LDC_RX_SET_QHEAD, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
479
ENDPROC(sun4v_ldc_rx_set_qhead)
480 481 482 483 484 485 486

	/* %o0: channel
	 * %o1:	ra
	 * %o2:	num_entries
	 *
	 * returns %o0: status
	 */
487
ENTRY(sun4v_ldc_set_map_table)
488 489 490 491
	mov	HV_FAST_LDC_SET_MAP_TABLE, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
492
ENDPROC(sun4v_ldc_set_map_table)
493 494 495 496 497 498 499

	/* %o0: channel
	 * %o1:	pointer to unsigned long ra
	 * %o2:	pointer to unsigned long num_entries
	 *
	 * returns %o0: status
	 */
500
ENTRY(sun4v_ldc_get_map_table)
501 502 503 504 505 506 507 508
	mov	%o1, %g1
	mov	%o2, %g2
	mov	HV_FAST_LDC_GET_MAP_TABLE, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%g1]
	stx	%o2, [%g2]
	retl
	 nop
509
ENDPROC(sun4v_ldc_get_map_table)
510 511 512 513 514 515 516 517 518 519

	/* %o0:	channel
	 * %o1:	dir_code
	 * %o2:	tgt_raddr
	 * %o3:	lcl_raddr
	 * %o4:	len
	 * %o5:	pointer to unsigned long actual_len
	 *
	 * returns %o0:	status
	 */
520
ENTRY(sun4v_ldc_copy)
521 522 523 524 525 526
	mov	%o5, %g1
	mov	HV_FAST_LDC_COPY, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%g1]
	retl
	 nop
527
ENDPROC(sun4v_ldc_copy)
528 529 530 531 532 533 534 535

	/* %o0:	channel
	 * %o1:	cookie
	 * %o2:	pointer to unsigned long ra
	 * %o3:	pointer to unsigned long perm
	 *
	 * returns %o0:	status
	 */
536
ENTRY(sun4v_ldc_mapin)
537 538 539 540 541 542 543 544
	mov	%o2, %g1
	mov	%o3, %g2
	mov	HV_FAST_LDC_MAPIN, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%g1]
	stx	%o2, [%g2]
	retl
	 nop
545
ENDPROC(sun4v_ldc_mapin)
546 547 548 549 550

	/* %o0:	ra
	 *
	 * returns %o0:	status
	 */
551
ENTRY(sun4v_ldc_unmap)
552 553 554 555
	mov	HV_FAST_LDC_UNMAP, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
556
ENDPROC(sun4v_ldc_unmap)
557 558 559 560 561 562 563

	/* %o0: channel
	 * %o1:	cookie
	 * %o2:	mte_cookie
	 *
	 * returns %o0:	status
	 */
564
ENTRY(sun4v_ldc_revoke)
565 566 567 568
	mov	HV_FAST_LDC_REVOKE, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
569
ENDPROC(sun4v_ldc_revoke)
570 571 572 573 574 575 576

	/* %o0: device handle
	 * %o1:	device INO
	 * %o2:	pointer to unsigned long cookie
	 *
	 * returns %o0: status
	 */
577
ENTRY(sun4v_vintr_get_cookie)
578 579 580 581 582 583
	mov	%o2, %g1
	mov	HV_FAST_VINTR_GET_COOKIE, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%g1]
	retl
	 nop
584
ENDPROC(sun4v_vintr_get_cookie)
585 586 587 588 589 590 591

	/* %o0: device handle
	 * %o1:	device INO
	 * %o2:	cookie
	 *
	 * returns %o0: status
	 */
592
ENTRY(sun4v_vintr_set_cookie)
593 594 595 596
	mov	HV_FAST_VINTR_SET_COOKIE, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
597
ENDPROC(sun4v_vintr_set_cookie)
598 599 600 601 602 603 604

	/* %o0: device handle
	 * %o1:	device INO
	 * %o2:	pointer to unsigned long valid_state
	 *
	 * returns %o0: status
	 */
605
ENTRY(sun4v_vintr_get_valid)
606 607 608 609 610 611
	mov	%o2, %g1
	mov	HV_FAST_VINTR_GET_VALID, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%g1]
	retl
	 nop
612
ENDPROC(sun4v_vintr_get_valid)
613 614 615 616 617 618 619

	/* %o0: device handle
	 * %o1:	device INO
	 * %o2:	valid_state
	 *
	 * returns %o0: status
	 */
620
ENTRY(sun4v_vintr_set_valid)
621 622 623 624
	mov	HV_FAST_VINTR_SET_VALID, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
625
ENDPROC(sun4v_vintr_set_valid)
626 627 628 629 630 631 632

	/* %o0: device handle
	 * %o1:	device INO
	 * %o2:	pointer to unsigned long state
	 *
	 * returns %o0: status
	 */
633
ENTRY(sun4v_vintr_get_state)
634 635 636 637 638 639
	mov	%o2, %g1
	mov	HV_FAST_VINTR_GET_STATE, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%g1]
	retl
	 nop
640
ENDPROC(sun4v_vintr_get_state)
641 642 643 644 645 646 647

	/* %o0: device handle
	 * %o1:	device INO
	 * %o2:	state
	 *
	 * returns %o0: status
	 */
648
ENTRY(sun4v_vintr_set_state)
649 650 651 652
	mov	HV_FAST_VINTR_SET_STATE, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
653
ENDPROC(sun4v_vintr_set_state)
654 655 656 657 658 659 660

	/* %o0: device handle
	 * %o1:	device INO
	 * %o2:	pointer to unsigned long cpuid
	 *
	 * returns %o0: status
	 */
661
ENTRY(sun4v_vintr_get_target)
662 663 664 665 666 667
	mov	%o2, %g1
	mov	HV_FAST_VINTR_GET_TARGET, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%g1]
	retl
	 nop
668
ENDPROC(sun4v_vintr_get_target)
669 670 671 672 673 674 675

	/* %o0: device handle
	 * %o1:	device INO
	 * %o2:	cpuid
	 *
	 * returns %o0: status
	 */
676
ENTRY(sun4v_vintr_set_target)
677 678 679 680
	mov	HV_FAST_VINTR_SET_TARGET, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
681
ENDPROC(sun4v_vintr_set_target)
682 683 684 685 686 687 688

	/* %o0: NCS sub-function
	 * %o1:	sub-function arg real-address
	 * %o2:	sub-function arg size
	 *
	 * returns %o0:	status
	 */
689
ENTRY(sun4v_ncs_request)
690 691 692 693
	mov	HV_FAST_NCS_REQUEST, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
694
ENDPROC(sun4v_ncs_request)
695

696
ENTRY(sun4v_svc_send)
697 698 699 700 701 702 703 704 705
	save	%sp, -192, %sp
	mov	%i0, %o0
	mov	%i1, %o1
	mov	%i2, %o2
	mov	HV_FAST_SVC_SEND, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%i3]
	ret
	restore
706
ENDPROC(sun4v_svc_send)
707

708
ENTRY(sun4v_svc_recv)
709 710 711 712 713 714 715 716 717
	save	%sp, -192, %sp
	mov	%i0, %o0
	mov	%i1, %o1
	mov	%i2, %o2
	mov	HV_FAST_SVC_RECV, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%i3]
	ret
	restore
718
ENDPROC(sun4v_svc_recv)
719

720
ENTRY(sun4v_svc_getstatus)
721 722 723 724 725 726
	mov	HV_FAST_SVC_GETSTATUS, %o5
	mov	%o1, %o4
	ta	HV_FAST_TRAP
	stx	%o1, [%o4]
	retl
	 nop
727
ENDPROC(sun4v_svc_getstatus)
728

729
ENTRY(sun4v_svc_setstatus)
730 731 732 733
	mov	HV_FAST_SVC_SETSTATUS, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
734
ENDPROC(sun4v_svc_setstatus)
735

736
ENTRY(sun4v_svc_clrstatus)
737 738 739 740
	mov	HV_FAST_SVC_CLRSTATUS, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
741
ENDPROC(sun4v_svc_clrstatus)
742

743
ENTRY(sun4v_mmustat_conf)
744 745 746 747 748 749
	mov	%o1, %o4
	mov	HV_FAST_MMUSTAT_CONF, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%o4]
	retl
	 nop
750
ENDPROC(sun4v_mmustat_conf)
751

752
ENTRY(sun4v_mmustat_info)
753 754 755 756 757 758
	mov	%o0, %o4
	mov	HV_FAST_MMUSTAT_INFO, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%o4]
	retl
	 nop
759
ENDPROC(sun4v_mmustat_info)
760

761
ENTRY(sun4v_mmu_demap_all)
762 763 764 765 766 767 768
	clr	%o0
	clr	%o1
	mov	HV_MMU_ALL, %o2
	mov	HV_FAST_MMU_DEMAP_ALL, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
769
ENDPROC(sun4v_mmu_demap_all)
770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801

ENTRY(sun4v_niagara_getperf)
	mov	%o0, %o4
	mov	HV_FAST_GET_PERFREG, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%o4]
	retl
	 nop
ENDPROC(sun4v_niagara_getperf)

ENTRY(sun4v_niagara_setperf)
	mov	HV_FAST_SET_PERFREG, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
ENDPROC(sun4v_niagara_setperf)

ENTRY(sun4v_niagara2_getperf)
	mov	%o0, %o4
	mov	HV_FAST_N2_GET_PERFREG, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%o4]
	retl
	 nop
ENDPROC(sun4v_niagara2_getperf)

ENTRY(sun4v_niagara2_setperf)
	mov	HV_FAST_N2_SET_PERFREG, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
ENDPROC(sun4v_niagara2_setperf)
802 803 804 805 806 807 808

ENTRY(sun4v_reboot_data_set)
	mov	HV_FAST_REBOOT_DATA_SET, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
ENDPROC(sun4v_reboot_data_set)
809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824

ENTRY(sun4v_vt_get_perfreg)
	mov	%o1, %o4
	mov	HV_FAST_VT_GET_PERFREG, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%o4]
	retl
	 nop
ENDPROC(sun4v_vt_get_perfreg)

ENTRY(sun4v_vt_set_perfreg)
	mov	HV_FAST_VT_SET_PERFREG, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
ENDPROC(sun4v_vt_set_perfreg)
B
bob picco 已提交
825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840

ENTRY(sun4v_t5_get_perfreg)
	mov	%o1, %o4
	mov	HV_FAST_T5_GET_PERFREG, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%o4]
	retl
	 nop
ENDPROC(sun4v_t5_get_perfreg)

ENTRY(sun4v_t5_set_perfreg)
	mov	HV_FAST_T5_SET_PERFREG, %o5
	ta	HV_FAST_TRAP
	retl
	 nop
ENDPROC(sun4v_t5_set_perfreg)
841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856

ENTRY(sun4v_m7_get_perfreg)
	mov	%o1, %o4
	mov	HV_FAST_M7_GET_PERFREG, %o5
	ta	HV_FAST_TRAP
	stx	%o1, [%o4]
	retl
	nop
ENDPROC(sun4v_m7_get_perfreg)

ENTRY(sun4v_m7_set_perfreg)
	mov	HV_FAST_M7_SET_PERFREG, %o5
	ta	HV_FAST_TRAP
	retl
	nop
ENDPROC(sun4v_m7_set_perfreg)