xref: /titanic_53/usr/src/uts/sun4v/ml/hcall.s (revision 1ae0874509b6811fdde1dfd46f0d93fd09867a3f)
17c478bd9Sstevel@tonic-gate/*
27c478bd9Sstevel@tonic-gate * CDDL HEADER START
37c478bd9Sstevel@tonic-gate *
47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the
544bb982bSgovinda * Common Development and Distribution License (the "License").
644bb982bSgovinda * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate *
87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate * and limitations under the License.
127c478bd9Sstevel@tonic-gate *
137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate *
197c478bd9Sstevel@tonic-gate * CDDL HEADER END
207c478bd9Sstevel@tonic-gate */
21*1ae08745Sheppo
227c478bd9Sstevel@tonic-gate/*
2344bb982bSgovinda * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate * Use is subject to license terms.
257c478bd9Sstevel@tonic-gate */
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gate#pragma ident	"%Z%%M%	%I%	%E% SMI"
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gate/*
307c478bd9Sstevel@tonic-gate * Hypervisor calls
317c478bd9Sstevel@tonic-gate */
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gate#include <sys/asm_linkage.h>
347c478bd9Sstevel@tonic-gate#include <sys/machasi.h>
357c478bd9Sstevel@tonic-gate#include <sys/machparam.h>
367c478bd9Sstevel@tonic-gate#include <sys/hypervisor_api.h>
377c478bd9Sstevel@tonic-gate
387c478bd9Sstevel@tonic-gate#if defined(lint) || defined(__lint)
397c478bd9Sstevel@tonic-gate
407c478bd9Sstevel@tonic-gate/*ARGSUSED*/
41*1ae08745Sheppouint64_t
42*1ae08745Sheppohv_mach_exit(uint64_t exit_code)
43*1ae08745Sheppo{ return (0); }
44*1ae08745Sheppo
45*1ae08745Sheppouint64_t
46*1ae08745Sheppohv_mach_sir(void)
47*1ae08745Sheppo{ return (0); }
48*1ae08745Sheppo
49*1ae08745Sheppo/*ARGSUSED*/
50*1ae08745Sheppouint64_t
51*1ae08745Sheppohv_cpu_start(uint64_t cpuid, uint64_t pc, uint64_t rtba, uint64_t arg)
52*1ae08745Sheppo{ return (0); }
53*1ae08745Sheppo
54*1ae08745Sheppo/*ARGSUSED*/
55*1ae08745Sheppouint64_t
56*1ae08745Sheppohv_cpu_stop(uint64_t cpuid)
57*1ae08745Sheppo{ return (0); }
58*1ae08745Sheppo
59*1ae08745Sheppo/*ARGSUSED*/
60*1ae08745Sheppouint64_t
61*1ae08745Sheppohv_cpu_set_rtba(uint64_t *rtba)
62*1ae08745Sheppo{ return (0); }
63*1ae08745Sheppo
64*1ae08745Sheppo/*ARGSUSED*/
657c478bd9Sstevel@tonic-gateint64_t
667c478bd9Sstevel@tonic-gatehv_cnputchar(uint8_t ch)
677c478bd9Sstevel@tonic-gate{ return (0); }
687c478bd9Sstevel@tonic-gate
697c478bd9Sstevel@tonic-gate/*ARGSUSED*/
707c478bd9Sstevel@tonic-gateint64_t
717c478bd9Sstevel@tonic-gatehv_cngetchar(uint8_t *ch)
727c478bd9Sstevel@tonic-gate{ return (0); }
737c478bd9Sstevel@tonic-gate
747c478bd9Sstevel@tonic-gate/*ARGSUSED*/
757c478bd9Sstevel@tonic-gateuint64_t
767c478bd9Sstevel@tonic-gatehv_tod_get(uint64_t *seconds)
777c478bd9Sstevel@tonic-gate{ return (0); }
787c478bd9Sstevel@tonic-gate
797c478bd9Sstevel@tonic-gate/*ARGSUSED*/
807c478bd9Sstevel@tonic-gateuint64_t
817c478bd9Sstevel@tonic-gatehv_tod_set(uint64_t seconds)
827c478bd9Sstevel@tonic-gate{ return (0);}
837c478bd9Sstevel@tonic-gate
847c478bd9Sstevel@tonic-gate/*ARGSUSED*/
857c478bd9Sstevel@tonic-gateuint64_t
867c478bd9Sstevel@tonic-gatehv_mmu_map_perm_addr(void *vaddr, int ctx, uint64_t tte, int flags)
877c478bd9Sstevel@tonic-gate{ return (0); }
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gate/*ARGSUSED */
907c478bd9Sstevel@tonic-gateuint64_t
91*1ae08745Sheppohv_mmu_fault_area_conf(void *raddr)
92*1ae08745Sheppo{ return (0); }
93*1ae08745Sheppo
94*1ae08745Sheppo/*ARGSUSED*/
95*1ae08745Sheppouint64_t
967c478bd9Sstevel@tonic-gatehv_mmu_unmap_perm_addr(void *vaddr, int ctx, int flags)
977c478bd9Sstevel@tonic-gate{ return (0); }
987c478bd9Sstevel@tonic-gate
997c478bd9Sstevel@tonic-gate/*ARGSUSED*/
1007c478bd9Sstevel@tonic-gateuint64_t
1017c478bd9Sstevel@tonic-gatehv_set_ctx0(uint64_t ntsb_descriptor, uint64_t desc_ra)
1027c478bd9Sstevel@tonic-gate{ return (0); }
1037c478bd9Sstevel@tonic-gate
1047c478bd9Sstevel@tonic-gate/*ARGSUSED*/
1057c478bd9Sstevel@tonic-gateuint64_t
1067c478bd9Sstevel@tonic-gatehv_set_ctxnon0(uint64_t ntsb_descriptor, uint64_t desc_ra)
1077c478bd9Sstevel@tonic-gate{ return (0); }
1087c478bd9Sstevel@tonic-gate
1097c478bd9Sstevel@tonic-gate#ifdef SET_MMU_STATS
1107c478bd9Sstevel@tonic-gate/*ARGSUSED*/
1117c478bd9Sstevel@tonic-gateuint64_t
1127c478bd9Sstevel@tonic-gatehv_mmu_set_stat_area(uint64_t rstatarea, uint64_t size)
1137c478bd9Sstevel@tonic-gate{ return (0); }
1147c478bd9Sstevel@tonic-gate#endif /* SET_MMU_STATS */
1157c478bd9Sstevel@tonic-gate
1167c478bd9Sstevel@tonic-gate/*ARGSUSED*/
1177c478bd9Sstevel@tonic-gateuint64_t
1187c478bd9Sstevel@tonic-gatehv_cpu_qconf(int queue, uint64_t paddr, int size)
1197c478bd9Sstevel@tonic-gate{ return (0); }
1207c478bd9Sstevel@tonic-gate
1217c478bd9Sstevel@tonic-gate/*ARGSUSED*/
1227c478bd9Sstevel@tonic-gateuint64_t
1237c478bd9Sstevel@tonic-gatehvio_intr_devino_to_sysino(uint64_t dev_hdl, uint32_t devino, uint64_t *sysino)
1247c478bd9Sstevel@tonic-gate{ return (0); }
1257c478bd9Sstevel@tonic-gate
1267c478bd9Sstevel@tonic-gate/*ARGSUSED*/
1277c478bd9Sstevel@tonic-gateuint64_t
1287c478bd9Sstevel@tonic-gatehvio_intr_getvalid(uint64_t sysino, int *intr_valid_state)
1297c478bd9Sstevel@tonic-gate{ return (0); }
1307c478bd9Sstevel@tonic-gate
1317c478bd9Sstevel@tonic-gate/*ARGSUSED*/
1327c478bd9Sstevel@tonic-gateuint64_t
1337c478bd9Sstevel@tonic-gatehvio_intr_setvalid(uint64_t sysino, int intr_valid_state)
1347c478bd9Sstevel@tonic-gate{ return (0); }
1357c478bd9Sstevel@tonic-gate
1367c478bd9Sstevel@tonic-gate/*ARGSUSED*/
1377c478bd9Sstevel@tonic-gateuint64_t
1387c478bd9Sstevel@tonic-gatehvio_intr_getstate(uint64_t sysino, int *intr_state)
1397c478bd9Sstevel@tonic-gate{ return (0); }
1407c478bd9Sstevel@tonic-gate
1417c478bd9Sstevel@tonic-gate/*ARGSUSED*/
1427c478bd9Sstevel@tonic-gateuint64_t
1437c478bd9Sstevel@tonic-gatehvio_intr_setstate(uint64_t sysino, int intr_state)
1447c478bd9Sstevel@tonic-gate{ return (0); }
1457c478bd9Sstevel@tonic-gate
1467c478bd9Sstevel@tonic-gate/*ARGSUSED*/
1477c478bd9Sstevel@tonic-gateuint64_t
1487c478bd9Sstevel@tonic-gatehvio_intr_gettarget(uint64_t sysino, uint32_t *cpuid)
1497c478bd9Sstevel@tonic-gate{ return (0); }
1507c478bd9Sstevel@tonic-gate
1517c478bd9Sstevel@tonic-gate/*ARGSUSED*/
1527c478bd9Sstevel@tonic-gateuint64_t
1537c478bd9Sstevel@tonic-gatehvio_intr_settarget(uint64_t sysino, uint32_t cpuid)
1547c478bd9Sstevel@tonic-gate{ return (0); }
1557c478bd9Sstevel@tonic-gate
1567c478bd9Sstevel@tonic-gateuint64_t
1577c478bd9Sstevel@tonic-gatehv_cpu_yield(void)
1587c478bd9Sstevel@tonic-gate{ return (0); }
1597c478bd9Sstevel@tonic-gate
1607c478bd9Sstevel@tonic-gate/*ARGSUSED*/
1617c478bd9Sstevel@tonic-gateuint64_t
1627c478bd9Sstevel@tonic-gatehv_cpu_state(uint64_t cpuid, uint64_t *cpu_state)
1637c478bd9Sstevel@tonic-gate{ return (0); }
1647c478bd9Sstevel@tonic-gate
1657c478bd9Sstevel@tonic-gate/*ARGSUSED*/
1667c478bd9Sstevel@tonic-gateuint64_t
1677c478bd9Sstevel@tonic-gatehv_dump_buf_update(uint64_t paddr, uint64_t size, uint64_t *minsize)
1687c478bd9Sstevel@tonic-gate{ return (0); }
1697c478bd9Sstevel@tonic-gate
1707c478bd9Sstevel@tonic-gate/*ARGSUSED*/
1717c478bd9Sstevel@tonic-gateuint64_t
1727c478bd9Sstevel@tonic-gatehv_mem_scrub(uint64_t real_addr, uint64_t length, uint64_t *scrubbed_len)
1737c478bd9Sstevel@tonic-gate{ return (0); }
1747c478bd9Sstevel@tonic-gate
1757c478bd9Sstevel@tonic-gate/*ARGSUSED*/
1767c478bd9Sstevel@tonic-gateuint64_t
1777c478bd9Sstevel@tonic-gatehv_mem_sync(uint64_t real_addr, uint64_t length, uint64_t *flushed_len)
1787c478bd9Sstevel@tonic-gate{ return (0); }
1797c478bd9Sstevel@tonic-gate
1807c478bd9Sstevel@tonic-gate/*ARGSUSED*/
1817c478bd9Sstevel@tonic-gateuint64_t
1827c478bd9Sstevel@tonic-gatehv_ttrace_buf_conf(uint64_t paddr, uint64_t size, uint64_t *size1)
1837c478bd9Sstevel@tonic-gate{ return (0); }
1847c478bd9Sstevel@tonic-gate
1857c478bd9Sstevel@tonic-gate/*ARGSUSED*/
1867c478bd9Sstevel@tonic-gateuint64_t
1877c478bd9Sstevel@tonic-gatehv_ttrace_buf_info(uint64_t *paddr, uint64_t *size)
1887c478bd9Sstevel@tonic-gate{ return (0); }
1897c478bd9Sstevel@tonic-gate
1907c478bd9Sstevel@tonic-gate/*ARGSUSED*/
1917c478bd9Sstevel@tonic-gateuint64_t
1927c478bd9Sstevel@tonic-gatehv_ttrace_enable(uint64_t enable, uint64_t *prev_enable)
1937c478bd9Sstevel@tonic-gate{ return (0); }
1947c478bd9Sstevel@tonic-gate
1957c478bd9Sstevel@tonic-gate/*ARGSUSED*/
1967c478bd9Sstevel@tonic-gateuint64_t
1977c478bd9Sstevel@tonic-gatehv_ttrace_freeze(uint64_t freeze, uint64_t *prev_freeze)
1987c478bd9Sstevel@tonic-gate{ return (0); }
1997c478bd9Sstevel@tonic-gate
2007c478bd9Sstevel@tonic-gate/*ARGSUSED*/
2017c478bd9Sstevel@tonic-gateuint64_t
2027c478bd9Sstevel@tonic-gatehv_mach_desc(uint64_t buffer_ra, uint64_t *buffer_sizep)
2037c478bd9Sstevel@tonic-gate{ return (0); }
2047c478bd9Sstevel@tonic-gate
2057c478bd9Sstevel@tonic-gate/*ARGSUSED*/
2067c478bd9Sstevel@tonic-gateuint64_t
20769cd775fSschwartzhv_ra2pa(uint64_t ra)
20869cd775fSschwartz{ return (0); }
20969cd775fSschwartz
21069cd775fSschwartz/*ARGSUSED*/
21169cd775fSschwartzuint64_t
21269cd775fSschwartzhv_hpriv(void *func, uint64_t arg1, uint64_t arg2, uint64_t arg3)
21369cd775fSschwartz{ return (0); }
21469cd775fSschwartz
215*1ae08745Sheppo/*ARGSUSED*/
216*1ae08745Sheppouint64_t
217*1ae08745Sheppohv_ldc_tx_qconf(uint64_t channel, uint64_t ra_base, uint64_t nentries)
218*1ae08745Sheppo{ return (0); }
219*1ae08745Sheppo
220*1ae08745Sheppo/*ARGSUSED*/
221*1ae08745Sheppouint64_t
222*1ae08745Sheppohv_ldc_tx_qinfo(uint64_t channel, uint64_t *ra_base, uint64_t *nentries)
223*1ae08745Sheppo{ return (0); }
224*1ae08745Sheppo
225*1ae08745Sheppo/*ARGSUSED*/
226*1ae08745Sheppouint64_t
227*1ae08745Sheppohv_ldc_tx_get_state(uint64_t channel,
228*1ae08745Sheppo	uint64_t *headp, uint64_t *tailp, uint64_t *state)
229*1ae08745Sheppo{ return (0); }
230*1ae08745Sheppo
231*1ae08745Sheppo/*ARGSUSED*/
232*1ae08745Sheppouint64_t
233*1ae08745Sheppohv_ldc_tx_set_qtail(uint64_t channel, uint64_t tail)
234*1ae08745Sheppo{ return (0); }
235*1ae08745Sheppo
236*1ae08745Sheppo/*ARGSUSED*/
237*1ae08745Sheppouint64_t
238*1ae08745Sheppohv_ldc_rx_qconf(uint64_t channel, uint64_t ra_base, uint64_t nentries)
239*1ae08745Sheppo{ return (0); }
240*1ae08745Sheppo
241*1ae08745Sheppo/*ARGSUSED*/
242*1ae08745Sheppouint64_t
243*1ae08745Sheppohv_ldc_rx_qinfo(uint64_t channel, uint64_t *ra_base, uint64_t *nentries)
244*1ae08745Sheppo{ return (0); }
245*1ae08745Sheppo
246*1ae08745Sheppo/*ARGSUSED*/
247*1ae08745Sheppouint64_t
248*1ae08745Sheppohv_ldc_rx_get_state(uint64_t channel,
249*1ae08745Sheppo	uint64_t *headp, uint64_t *tailp, uint64_t *state)
250*1ae08745Sheppo{ return (0); }
251*1ae08745Sheppo
252*1ae08745Sheppo/*ARGSUSED*/
253*1ae08745Sheppouint64_t
254*1ae08745Sheppohv_ldc_rx_set_qhead(uint64_t channel, uint64_t head)
255*1ae08745Sheppo{ return (0); }
256*1ae08745Sheppo
257*1ae08745Sheppo/*ARGSUSED*/
258*1ae08745Sheppouint64_t
259*1ae08745Sheppohv_ldc_send_msg(uint64_t channel, uint64_t msg_ra)
260*1ae08745Sheppo{ return (0); }
261*1ae08745Sheppo
262*1ae08745Sheppo/*ARGSUSED*/
263*1ae08745Sheppouint64_t
264*1ae08745Sheppohv_ldc_set_map_table(uint64_t channel, uint64_t tbl_ra, uint64_t tbl_entries)
265*1ae08745Sheppo{ return (0); }
266*1ae08745Sheppo
267*1ae08745Sheppo/*ARGSUSED*/
268*1ae08745Sheppouint64_t
269*1ae08745Sheppohv_ldc_copy(uint64_t channel, uint64_t request, uint64_t cookie,
270*1ae08745Sheppo	uint64_t raddr, uint64_t length, uint64_t *lengthp)
271*1ae08745Sheppo{ return (0); }
272*1ae08745Sheppo
273*1ae08745Sheppo/*ARGSUSED*/
274*1ae08745Sheppouint64_t
275*1ae08745Sheppohvldc_intr_getcookie(uint64_t dev_hdl, uint32_t devino, uint64_t *cookie)
276*1ae08745Sheppo{ return (0); }
277*1ae08745Sheppo
278*1ae08745Sheppo/*ARGSUSED*/
279*1ae08745Sheppouint64_t
280*1ae08745Sheppohvldc_intr_setcookie(uint64_t dev_hdl, uint32_t devino, uint64_t cookie)
281*1ae08745Sheppo{ return (0); }
282*1ae08745Sheppo
283*1ae08745Sheppo/*ARGSUSED*/
284*1ae08745Sheppouint64_t
285*1ae08745Sheppohvldc_intr_getvalid(uint64_t dev_hdl, uint32_t devino, int *intr_valid_state)
286*1ae08745Sheppo{ return (0); }
287*1ae08745Sheppo
288*1ae08745Sheppo/*ARGSUSED*/
289*1ae08745Sheppouint64_t
290*1ae08745Sheppohvldc_intr_setvalid(uint64_t dev_hdl, uint32_t devino, int intr_valid_state)
291*1ae08745Sheppo{ return (0); }
292*1ae08745Sheppo
293*1ae08745Sheppo/*ARGSUSED*/
294*1ae08745Sheppouint64_t
295*1ae08745Sheppohvldc_intr_getstate(uint64_t dev_hdl, uint32_t devino, int *intr_state)
296*1ae08745Sheppo{ return (0); }
297*1ae08745Sheppo
298*1ae08745Sheppo/*ARGSUSED*/
299*1ae08745Sheppouint64_t
300*1ae08745Sheppohvldc_intr_setstate(uint64_t dev_hdl, uint32_t devino, int intr_state)
301*1ae08745Sheppo{ return (0); }
302*1ae08745Sheppo
303*1ae08745Sheppo/*ARGSUSED*/
304*1ae08745Sheppouint64_t
305*1ae08745Sheppohvldc_intr_gettarget(uint64_t dev_hdl, uint32_t devino, uint32_t *cpuid)
306*1ae08745Sheppo{ return (0); }
307*1ae08745Sheppo
308*1ae08745Sheppo/*ARGSUSED*/
309*1ae08745Sheppouint64_t
310*1ae08745Sheppohvldc_intr_settarget(uint64_t dev_hdl, uint32_t devino, uint32_t cpuid)
311*1ae08745Sheppo{ return (0); }
312*1ae08745Sheppo
313*1ae08745Sheppo/*ARGSUSED*/
314*1ae08745Sheppouint64_t
315*1ae08745Sheppohv_api_get_version(uint64_t api_group, uint64_t *majorp, uint64_t *minorp)
316*1ae08745Sheppo{ return (0); }
317*1ae08745Sheppo
318*1ae08745Sheppo/*ARGSUSED*/
319*1ae08745Sheppouint64_t
320*1ae08745Sheppohv_api_set_version(uint64_t api_group, uint64_t major, uint64_t minor,
321*1ae08745Sheppo    uint64_t *supported_minor)
322*1ae08745Sheppo{ return (0); }
323*1ae08745Sheppo
3247c478bd9Sstevel@tonic-gate#else	/* lint || __lint */
3257c478bd9Sstevel@tonic-gate
3267c478bd9Sstevel@tonic-gate	/*
327*1ae08745Sheppo	 * int hv_mach_exit(uint64_t exit_code)
328*1ae08745Sheppo	 */
329*1ae08745Sheppo	ENTRY(hv_mach_exit)
330*1ae08745Sheppo	mov	HV_MACH_EXIT, %o5
331*1ae08745Sheppo	ta	FAST_TRAP
332*1ae08745Sheppo	retl
333*1ae08745Sheppo	  nop
334*1ae08745Sheppo	SET_SIZE(hv_mach_exit)
335*1ae08745Sheppo
336*1ae08745Sheppo	/*
337*1ae08745Sheppo	 * uint64_t hv_mach_sir(void)
338*1ae08745Sheppo	 */
339*1ae08745Sheppo	ENTRY(hv_mach_sir)
340*1ae08745Sheppo	mov	HV_MACH_SIR, %o5
341*1ae08745Sheppo	ta	FAST_TRAP
342*1ae08745Sheppo	retl
343*1ae08745Sheppo	  nop
344*1ae08745Sheppo	SET_SIZE(hv_mach_sir)
345*1ae08745Sheppo
346*1ae08745Sheppo	/*
347*1ae08745Sheppo	 * hv_cpu_start(uint64_t cpuid, uint64_t pc, ui64_t rtba,
348*1ae08745Sheppo	 *     uint64_t arg)
349*1ae08745Sheppo	 */
350*1ae08745Sheppo	ENTRY(hv_cpu_start)
351*1ae08745Sheppo	mov	HV_CPU_START, %o5
352*1ae08745Sheppo	ta	FAST_TRAP
353*1ae08745Sheppo	retl
354*1ae08745Sheppo	  nop
355*1ae08745Sheppo	SET_SIZE(hv_cpu_start)
356*1ae08745Sheppo
357*1ae08745Sheppo	/*
358*1ae08745Sheppo	 * hv_cpu_stop(uint64_t cpuid)
359*1ae08745Sheppo	 */
360*1ae08745Sheppo	ENTRY(hv_cpu_stop)
361*1ae08745Sheppo	mov	HV_CPU_STOP, %o5
362*1ae08745Sheppo	ta	FAST_TRAP
363*1ae08745Sheppo	retl
364*1ae08745Sheppo	  nop
365*1ae08745Sheppo	SET_SIZE(hv_cpu_stop)
366*1ae08745Sheppo
367*1ae08745Sheppo	/*
368*1ae08745Sheppo	 * hv_cpu_set_rtba(uint64_t *rtba)
369*1ae08745Sheppo	 */
370*1ae08745Sheppo	ENTRY(hv_cpu_set_rtba)
371*1ae08745Sheppo	mov	%o0, %o2
372*1ae08745Sheppo	ldx	[%o2], %o0
373*1ae08745Sheppo	mov	HV_CPU_SET_RTBA, %o5
374*1ae08745Sheppo	ta	FAST_TRAP
375*1ae08745Sheppo	stx	%o1, [%o2]
376*1ae08745Sheppo	retl
377*1ae08745Sheppo	  nop
378*1ae08745Sheppo	SET_SIZE(hv_cpu_set_rtba)
379*1ae08745Sheppo
380*1ae08745Sheppo	/*
381*1ae08745Sheppo	 * int64_t hv_cnputchar(uint8_t ch)
3827c478bd9Sstevel@tonic-gate	 */
3837c478bd9Sstevel@tonic-gate	ENTRY(hv_cnputchar)
384*1ae08745Sheppo	mov	CONS_PUTCHAR, %o5
3857c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
3867c478bd9Sstevel@tonic-gate	retl
387*1ae08745Sheppo	  nop
3887c478bd9Sstevel@tonic-gate	SET_SIZE(hv_cnputchar)
3897c478bd9Sstevel@tonic-gate
3907c478bd9Sstevel@tonic-gate	/*
391*1ae08745Sheppo	 * int64_t hv_cngetchar(uint8_t *ch)
3927c478bd9Sstevel@tonic-gate	 */
3937c478bd9Sstevel@tonic-gate	ENTRY(hv_cngetchar)
3947c478bd9Sstevel@tonic-gate	mov	%o0, %o2
395*1ae08745Sheppo	mov	CONS_GETCHAR, %o5
3967c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
3977c478bd9Sstevel@tonic-gate	brnz,a	%o0, 1f		! failure, just return error
398*1ae08745Sheppo	  nop
3997c478bd9Sstevel@tonic-gate
4007c478bd9Sstevel@tonic-gate	cmp	%o1, H_BREAK
4017c478bd9Sstevel@tonic-gate	be	1f
4027c478bd9Sstevel@tonic-gate	mov	%o1, %o0
4037c478bd9Sstevel@tonic-gate
4047c478bd9Sstevel@tonic-gate	cmp	%o1, H_HUP
4057c478bd9Sstevel@tonic-gate	be	1f
4067c478bd9Sstevel@tonic-gate	mov	%o1, %o0
4077c478bd9Sstevel@tonic-gate
4087c478bd9Sstevel@tonic-gate	stb	%o1, [%o2]	! success, save character and return 0
4097c478bd9Sstevel@tonic-gate	mov	0, %o0
4107c478bd9Sstevel@tonic-gate1:
4117c478bd9Sstevel@tonic-gate	retl
4127c478bd9Sstevel@tonic-gate	  nop
4137c478bd9Sstevel@tonic-gate	SET_SIZE(hv_cngetchar)
4147c478bd9Sstevel@tonic-gate
4157c478bd9Sstevel@tonic-gate	ENTRY(hv_tod_get)
4167c478bd9Sstevel@tonic-gate	mov	%o0, %o4
4177c478bd9Sstevel@tonic-gate	mov	TOD_GET, %o5
4187c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
4197c478bd9Sstevel@tonic-gate	retl
4207c478bd9Sstevel@tonic-gate	  stx	%o1, [%o4]
4217c478bd9Sstevel@tonic-gate	SET_SIZE(hv_tod_get)
4227c478bd9Sstevel@tonic-gate
4237c478bd9Sstevel@tonic-gate	ENTRY(hv_tod_set)
4247c478bd9Sstevel@tonic-gate	mov	TOD_SET, %o5
4257c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
4267c478bd9Sstevel@tonic-gate	retl
4277c478bd9Sstevel@tonic-gate	nop
4287c478bd9Sstevel@tonic-gate	SET_SIZE(hv_tod_set)
4297c478bd9Sstevel@tonic-gate
4307c478bd9Sstevel@tonic-gate	/*
4317c478bd9Sstevel@tonic-gate	 * Map permanent address
4327c478bd9Sstevel@tonic-gate	 * arg0 vaddr (%o0)
4337c478bd9Sstevel@tonic-gate	 * arg1 context (%o1)
4347c478bd9Sstevel@tonic-gate	 * arg2 tte (%o2)
4357c478bd9Sstevel@tonic-gate	 * arg3 flags (%o3)  0x1=d 0x2=i
4367c478bd9Sstevel@tonic-gate	 */
4377c478bd9Sstevel@tonic-gate	ENTRY(hv_mmu_map_perm_addr)
4387c478bd9Sstevel@tonic-gate	mov	MAP_PERM_ADDR, %o5
4397c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
4407c478bd9Sstevel@tonic-gate	retl
4417c478bd9Sstevel@tonic-gate	nop
4427c478bd9Sstevel@tonic-gate	SET_SIZE(hv_mmu_map_perm_addr)
4437c478bd9Sstevel@tonic-gate
4447c478bd9Sstevel@tonic-gate	/*
445*1ae08745Sheppo	 * hv_mmu_fault_area_conf(void *raddr)
446*1ae08745Sheppo	 */
447*1ae08745Sheppo	ENTRY(hv_mmu_fault_area_conf)
448*1ae08745Sheppo	mov	%o0, %o2
449*1ae08745Sheppo	ldx	[%o2], %o0
450*1ae08745Sheppo	mov	MMU_SET_INFOPTR, %o5
451*1ae08745Sheppo	ta	FAST_TRAP
452*1ae08745Sheppo	stx	%o1, [%o2]
453*1ae08745Sheppo	retl
454*1ae08745Sheppo	  nop
455*1ae08745Sheppo	SET_SIZE(hv_mmu_fault_area_conf)
456*1ae08745Sheppo
457*1ae08745Sheppo	/*
4587c478bd9Sstevel@tonic-gate	 * Unmap permanent address
4597c478bd9Sstevel@tonic-gate	 * arg0 vaddr (%o0)
4607c478bd9Sstevel@tonic-gate	 * arg1 context (%o1)
4617c478bd9Sstevel@tonic-gate	 * arg2 flags (%o2)  0x1=d 0x2=i
4627c478bd9Sstevel@tonic-gate	 */
4637c478bd9Sstevel@tonic-gate	ENTRY(hv_mmu_unmap_perm_addr)
4647c478bd9Sstevel@tonic-gate	mov	UNMAP_PERM_ADDR, %o5
4657c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
4667c478bd9Sstevel@tonic-gate	retl
4677c478bd9Sstevel@tonic-gate	nop
4687c478bd9Sstevel@tonic-gate	SET_SIZE(hv_mmu_unmap_perm_addr)
4697c478bd9Sstevel@tonic-gate
4707c478bd9Sstevel@tonic-gate	/*
4717c478bd9Sstevel@tonic-gate	 * Set TSB for context 0
4727c478bd9Sstevel@tonic-gate	 * arg0 ntsb_descriptor (%o0)
4737c478bd9Sstevel@tonic-gate	 * arg1 desc_ra (%o1)
4747c478bd9Sstevel@tonic-gate	 */
4757c478bd9Sstevel@tonic-gate	ENTRY(hv_set_ctx0)
4767c478bd9Sstevel@tonic-gate	mov	MMU_TSB_CTX0, %o5
4777c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
4787c478bd9Sstevel@tonic-gate	retl
4797c478bd9Sstevel@tonic-gate	nop
4807c478bd9Sstevel@tonic-gate	SET_SIZE(hv_set_ctx0)
4817c478bd9Sstevel@tonic-gate
4827c478bd9Sstevel@tonic-gate	/*
4837c478bd9Sstevel@tonic-gate	 * Set TSB for context non0
4847c478bd9Sstevel@tonic-gate	 * arg0 ntsb_descriptor (%o0)
4857c478bd9Sstevel@tonic-gate	 * arg1 desc_ra (%o1)
4867c478bd9Sstevel@tonic-gate	 */
4877c478bd9Sstevel@tonic-gate	ENTRY(hv_set_ctxnon0)
4887c478bd9Sstevel@tonic-gate	mov	MMU_TSB_CTXNON0, %o5
4897c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
4907c478bd9Sstevel@tonic-gate	retl
4917c478bd9Sstevel@tonic-gate	nop
4927c478bd9Sstevel@tonic-gate	SET_SIZE(hv_set_ctxnon0)
4937c478bd9Sstevel@tonic-gate
4947c478bd9Sstevel@tonic-gate#ifdef SET_MMU_STATS
4957c478bd9Sstevel@tonic-gate	/*
4967c478bd9Sstevel@tonic-gate	 * Returns old stat area on success
4977c478bd9Sstevel@tonic-gate	 */
4987c478bd9Sstevel@tonic-gate	ENTRY(hv_mmu_set_stat_area)
4997c478bd9Sstevel@tonic-gate	mov	MMU_STAT_AREA, %o5
5007c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
5017c478bd9Sstevel@tonic-gate	retl
5027c478bd9Sstevel@tonic-gate	nop
5037c478bd9Sstevel@tonic-gate	SET_SIZE(hv_mmu_set_stat_area)
5047c478bd9Sstevel@tonic-gate#endif /* SET_MMU_STATS */
5057c478bd9Sstevel@tonic-gate
5067c478bd9Sstevel@tonic-gate	/*
5077c478bd9Sstevel@tonic-gate	 * CPU Q Configure
5087c478bd9Sstevel@tonic-gate	 * arg0 queue (%o0)
5097c478bd9Sstevel@tonic-gate	 * arg1 Base address RA (%o1)
5107c478bd9Sstevel@tonic-gate	 * arg2 Size (%o2)
5117c478bd9Sstevel@tonic-gate	 */
5127c478bd9Sstevel@tonic-gate	ENTRY(hv_cpu_qconf)
513*1ae08745Sheppo	mov	HV_CPU_QCONF, %o5
5147c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
5157c478bd9Sstevel@tonic-gate	retl
5167c478bd9Sstevel@tonic-gate	nop
5177c478bd9Sstevel@tonic-gate	SET_SIZE(hv_cpu_qconf)
5187c478bd9Sstevel@tonic-gate
5197c478bd9Sstevel@tonic-gate	/*
5207c478bd9Sstevel@tonic-gate	 * arg0 - devhandle
5217c478bd9Sstevel@tonic-gate	 * arg1 - devino
5227c478bd9Sstevel@tonic-gate	 *
5237c478bd9Sstevel@tonic-gate	 * ret0 - status
5247c478bd9Sstevel@tonic-gate	 * ret1 - sysino
5257c478bd9Sstevel@tonic-gate	 */
5267c478bd9Sstevel@tonic-gate	ENTRY(hvio_intr_devino_to_sysino)
5277c478bd9Sstevel@tonic-gate	mov	HVIO_INTR_DEVINO2SYSINO, %o5
5287c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
5297c478bd9Sstevel@tonic-gate	brz,a	%o0, 1f
5307c478bd9Sstevel@tonic-gate	stx	%o1, [%o2]
5317c478bd9Sstevel@tonic-gate1:	retl
5327c478bd9Sstevel@tonic-gate	nop
5337c478bd9Sstevel@tonic-gate	SET_SIZE(hvio_intr_devino_to_sysino)
5347c478bd9Sstevel@tonic-gate
5357c478bd9Sstevel@tonic-gate	/*
5367c478bd9Sstevel@tonic-gate	 * arg0 - sysino
5377c478bd9Sstevel@tonic-gate	 *
5387c478bd9Sstevel@tonic-gate	 * ret0 - status
5397c478bd9Sstevel@tonic-gate	 * ret1 - intr_valid_state
5407c478bd9Sstevel@tonic-gate	 */
5417c478bd9Sstevel@tonic-gate	ENTRY(hvio_intr_getvalid)
5427c478bd9Sstevel@tonic-gate	mov	%o1, %o2
5437c478bd9Sstevel@tonic-gate	mov	HVIO_INTR_GETVALID, %o5
5447c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
5457c478bd9Sstevel@tonic-gate	brz,a	%o0, 1f
5467c478bd9Sstevel@tonic-gate	stuw	%o1, [%o2]
5477c478bd9Sstevel@tonic-gate1:	retl
5487c478bd9Sstevel@tonic-gate	nop
5497c478bd9Sstevel@tonic-gate	SET_SIZE(hvio_intr_getvalid)
5507c478bd9Sstevel@tonic-gate
5517c478bd9Sstevel@tonic-gate	/*
5527c478bd9Sstevel@tonic-gate	 * arg0 - sysino
5537c478bd9Sstevel@tonic-gate	 * arg1 - intr_valid_state
5547c478bd9Sstevel@tonic-gate	 *
5557c478bd9Sstevel@tonic-gate	 * ret0 - status
5567c478bd9Sstevel@tonic-gate	 */
5577c478bd9Sstevel@tonic-gate	ENTRY(hvio_intr_setvalid)
5587c478bd9Sstevel@tonic-gate	mov	HVIO_INTR_SETVALID, %o5
5597c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
5607c478bd9Sstevel@tonic-gate	retl
5617c478bd9Sstevel@tonic-gate	nop
5627c478bd9Sstevel@tonic-gate	SET_SIZE(hvio_intr_setvalid)
5637c478bd9Sstevel@tonic-gate
5647c478bd9Sstevel@tonic-gate	/*
5657c478bd9Sstevel@tonic-gate	 * arg0 - sysino
5667c478bd9Sstevel@tonic-gate	 *
5677c478bd9Sstevel@tonic-gate	 * ret0 - status
5687c478bd9Sstevel@tonic-gate	 * ret1 - intr_state
5697c478bd9Sstevel@tonic-gate	 */
5707c478bd9Sstevel@tonic-gate	ENTRY(hvio_intr_getstate)
5717c478bd9Sstevel@tonic-gate	mov	%o1, %o2
5727c478bd9Sstevel@tonic-gate	mov	HVIO_INTR_GETSTATE, %o5
5737c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
5747c478bd9Sstevel@tonic-gate	brz,a	%o0, 1f
5757c478bd9Sstevel@tonic-gate	stuw	%o1, [%o2]
5767c478bd9Sstevel@tonic-gate1:	retl
5777c478bd9Sstevel@tonic-gate	nop
5787c478bd9Sstevel@tonic-gate	SET_SIZE(hvio_intr_getstate)
5797c478bd9Sstevel@tonic-gate
5807c478bd9Sstevel@tonic-gate	/*
5817c478bd9Sstevel@tonic-gate	 * arg0 - sysino
5827c478bd9Sstevel@tonic-gate	 * arg1 - intr_state
5837c478bd9Sstevel@tonic-gate	 *
5847c478bd9Sstevel@tonic-gate	 * ret0 - status
5857c478bd9Sstevel@tonic-gate	 */
5867c478bd9Sstevel@tonic-gate	ENTRY(hvio_intr_setstate)
5877c478bd9Sstevel@tonic-gate	mov	HVIO_INTR_SETSTATE, %o5
5887c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
5897c478bd9Sstevel@tonic-gate	retl
5907c478bd9Sstevel@tonic-gate	nop
5917c478bd9Sstevel@tonic-gate	SET_SIZE(hvio_intr_setstate)
5927c478bd9Sstevel@tonic-gate
5937c478bd9Sstevel@tonic-gate	/*
5947c478bd9Sstevel@tonic-gate	 * arg0 - sysino
5957c478bd9Sstevel@tonic-gate	 *
5967c478bd9Sstevel@tonic-gate	 * ret0 - status
5977c478bd9Sstevel@tonic-gate	 * ret1 - cpu_id
5987c478bd9Sstevel@tonic-gate	 */
5997c478bd9Sstevel@tonic-gate	ENTRY(hvio_intr_gettarget)
6007c478bd9Sstevel@tonic-gate	mov	%o1, %o2
6017c478bd9Sstevel@tonic-gate	mov	HVIO_INTR_GETTARGET, %o5
6027c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
6037c478bd9Sstevel@tonic-gate	brz,a	%o0, 1f
6047c478bd9Sstevel@tonic-gate	stuw	%o1, [%o2]
6057c478bd9Sstevel@tonic-gate1:	retl
6067c478bd9Sstevel@tonic-gate	nop
6077c478bd9Sstevel@tonic-gate	SET_SIZE(hvio_intr_gettarget)
6087c478bd9Sstevel@tonic-gate
6097c478bd9Sstevel@tonic-gate	/*
6107c478bd9Sstevel@tonic-gate	 * arg0 - sysino
6117c478bd9Sstevel@tonic-gate	 * arg1 - cpu_id
6127c478bd9Sstevel@tonic-gate	 *
6137c478bd9Sstevel@tonic-gate	 * ret0 - status
6147c478bd9Sstevel@tonic-gate	 */
6157c478bd9Sstevel@tonic-gate	ENTRY(hvio_intr_settarget)
6167c478bd9Sstevel@tonic-gate	mov	HVIO_INTR_SETTARGET, %o5
6177c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
6187c478bd9Sstevel@tonic-gate	retl
6197c478bd9Sstevel@tonic-gate	nop
6207c478bd9Sstevel@tonic-gate	SET_SIZE(hvio_intr_settarget)
6217c478bd9Sstevel@tonic-gate
6227c478bd9Sstevel@tonic-gate	/*
6237c478bd9Sstevel@tonic-gate	 * hv_cpu_yield(void)
6247c478bd9Sstevel@tonic-gate	 */
6257c478bd9Sstevel@tonic-gate	ENTRY(hv_cpu_yield)
6267c478bd9Sstevel@tonic-gate	mov	HV_CPU_YIELD, %o5
6277c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
6287c478bd9Sstevel@tonic-gate	retl
6297c478bd9Sstevel@tonic-gate	nop
6307c478bd9Sstevel@tonic-gate	SET_SIZE(hv_cpu_yield)
6317c478bd9Sstevel@tonic-gate
6327c478bd9Sstevel@tonic-gate	/*
6337c478bd9Sstevel@tonic-gate	 * int hv_cpu_state(uint64_t cpuid, uint64_t *cpu_state);
6347c478bd9Sstevel@tonic-gate	 */
6357c478bd9Sstevel@tonic-gate	ENTRY(hv_cpu_state)
6367c478bd9Sstevel@tonic-gate	mov	%o1, %o4			! save datap
6377c478bd9Sstevel@tonic-gate	mov	HV_CPU_STATE, %o5
6387c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
6397c478bd9Sstevel@tonic-gate	brz,a	%o0, 1f
6407c478bd9Sstevel@tonic-gate	stx	%o1, [%o4]
6417c478bd9Sstevel@tonic-gate1:
6427c478bd9Sstevel@tonic-gate	retl
6437c478bd9Sstevel@tonic-gate	nop
6447c478bd9Sstevel@tonic-gate	SET_SIZE(hv_cpu_state)
6457c478bd9Sstevel@tonic-gate
6467c478bd9Sstevel@tonic-gate	/*
6477c478bd9Sstevel@tonic-gate	 * HV state dump zone Configure
6487c478bd9Sstevel@tonic-gate	 * arg0 real adrs of dump buffer (%o0)
6497c478bd9Sstevel@tonic-gate	 * arg1 size of dump buffer (%o1)
6507c478bd9Sstevel@tonic-gate	 * ret0 status (%o0)
6517c478bd9Sstevel@tonic-gate	 * ret1 size of buffer on success and min size on EINVAL (%o1)
6527c478bd9Sstevel@tonic-gate	 * hv_dump_buf_update(uint64_t paddr, uint64_t size, uint64_t *ret_size)
6537c478bd9Sstevel@tonic-gate	 */
6547c478bd9Sstevel@tonic-gate	ENTRY(hv_dump_buf_update)
6557c478bd9Sstevel@tonic-gate	mov	DUMP_BUF_UPDATE, %o5
6567c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
6577c478bd9Sstevel@tonic-gate	retl
6587c478bd9Sstevel@tonic-gate	stx	%o1, [%o2]
6597c478bd9Sstevel@tonic-gate	SET_SIZE(hv_dump_buf_update)
6607c478bd9Sstevel@tonic-gate
6617c478bd9Sstevel@tonic-gate
6627c478bd9Sstevel@tonic-gate	/*
6637c478bd9Sstevel@tonic-gate	 * For memory scrub
6647c478bd9Sstevel@tonic-gate	 * int hv_mem_scrub(uint64_t real_addr, uint64_t length,
6657c478bd9Sstevel@tonic-gate	 * 	uint64_t *scrubbed_len);
6667c478bd9Sstevel@tonic-gate	 * Retun %o0 -- status
6677c478bd9Sstevel@tonic-gate	 *       %o1 -- bytes scrubbed
6687c478bd9Sstevel@tonic-gate	 */
6697c478bd9Sstevel@tonic-gate	ENTRY(hv_mem_scrub)
6707c478bd9Sstevel@tonic-gate	mov	%o2, %o4
6717c478bd9Sstevel@tonic-gate	mov	HV_MEM_SCRUB, %o5
6727c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
6737c478bd9Sstevel@tonic-gate	retl
6747c478bd9Sstevel@tonic-gate	stx	%o1, [%o4]
6757c478bd9Sstevel@tonic-gate	SET_SIZE(hv_mem_scrub)
6767c478bd9Sstevel@tonic-gate
6777c478bd9Sstevel@tonic-gate	/*
6787c478bd9Sstevel@tonic-gate	 * Flush ecache
6797c478bd9Sstevel@tonic-gate	 * int hv_mem_sync(uint64_t real_addr, uint64_t length,
6807c478bd9Sstevel@tonic-gate	 * 	uint64_t *flushed_len);
6817c478bd9Sstevel@tonic-gate	 * Retun %o0 -- status
6827c478bd9Sstevel@tonic-gate	 *       %o1 -- bytes flushed
6837c478bd9Sstevel@tonic-gate	 */
6847c478bd9Sstevel@tonic-gate	ENTRY(hv_mem_sync)
6857c478bd9Sstevel@tonic-gate	mov	%o2, %o4
6867c478bd9Sstevel@tonic-gate	mov	HV_MEM_SYNC, %o5
6877c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
6887c478bd9Sstevel@tonic-gate	retl
6897c478bd9Sstevel@tonic-gate	stx	%o1, [%o4]
6907c478bd9Sstevel@tonic-gate	SET_SIZE(hv_mem_sync)
6917c478bd9Sstevel@tonic-gate
6927c478bd9Sstevel@tonic-gate	/*
6937c478bd9Sstevel@tonic-gate	 * TTRACE_BUF_CONF Configure
6947c478bd9Sstevel@tonic-gate	 * arg0 RA base of buffer (%o0)
6957c478bd9Sstevel@tonic-gate	 * arg1 buf size in no. of entries (%o1)
6967c478bd9Sstevel@tonic-gate	 * ret0 status (%o0)
6977c478bd9Sstevel@tonic-gate	 * ret1 minimum size in no. of entries on failure,
6987c478bd9Sstevel@tonic-gate	 * actual size in no. of entries on success (%o1)
6997c478bd9Sstevel@tonic-gate	 */
7007c478bd9Sstevel@tonic-gate	ENTRY(hv_ttrace_buf_conf)
7017c478bd9Sstevel@tonic-gate	mov	TTRACE_BUF_CONF, %o5
7027c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
7037c478bd9Sstevel@tonic-gate	retl
7047c478bd9Sstevel@tonic-gate	stx	%o1, [%o2]
7057c478bd9Sstevel@tonic-gate	SET_SIZE(hv_ttrace_buf_conf)
7067c478bd9Sstevel@tonic-gate
7077c478bd9Sstevel@tonic-gate	 /*
7087c478bd9Sstevel@tonic-gate	 * TTRACE_BUF_INFO
7097c478bd9Sstevel@tonic-gate	 * ret0 status (%o0)
7107c478bd9Sstevel@tonic-gate	 * ret1 RA base of buffer (%o1)
7117c478bd9Sstevel@tonic-gate	 * ret2 size in no. of entries (%o2)
7127c478bd9Sstevel@tonic-gate	 */
7137c478bd9Sstevel@tonic-gate	ENTRY(hv_ttrace_buf_info)
7147c478bd9Sstevel@tonic-gate	mov	%o0, %o3
7157c478bd9Sstevel@tonic-gate	mov	%o1, %o4
7167c478bd9Sstevel@tonic-gate	mov	TTRACE_BUF_INFO, %o5
7177c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
7187c478bd9Sstevel@tonic-gate	stx	%o1, [%o3]
7197c478bd9Sstevel@tonic-gate	retl
7207c478bd9Sstevel@tonic-gate	stx	%o2, [%o4]
7217c478bd9Sstevel@tonic-gate	SET_SIZE(hv_ttrace_buf_info)
7227c478bd9Sstevel@tonic-gate
7237c478bd9Sstevel@tonic-gate	/*
7247c478bd9Sstevel@tonic-gate	 * TTRACE_ENABLE
7257c478bd9Sstevel@tonic-gate	 * arg0 enable/ disable (%o0)
7267c478bd9Sstevel@tonic-gate	 * ret0 status (%o0)
7277c478bd9Sstevel@tonic-gate	 * ret1 previous enable state (%o1)
7287c478bd9Sstevel@tonic-gate	 */
7297c478bd9Sstevel@tonic-gate	ENTRY(hv_ttrace_enable)
7307c478bd9Sstevel@tonic-gate	mov	%o1, %o2
7317c478bd9Sstevel@tonic-gate	mov	TTRACE_ENABLE, %o5
7327c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
7337c478bd9Sstevel@tonic-gate	retl
7347c478bd9Sstevel@tonic-gate	stx	%o1, [%o2]
7357c478bd9Sstevel@tonic-gate	SET_SIZE(hv_ttrace_enable)
7367c478bd9Sstevel@tonic-gate
7377c478bd9Sstevel@tonic-gate	/*
7387c478bd9Sstevel@tonic-gate	 * TTRACE_FREEZE
7397c478bd9Sstevel@tonic-gate	 * arg0 enable/ freeze (%o0)
7407c478bd9Sstevel@tonic-gate	 * ret0 status (%o0)
7417c478bd9Sstevel@tonic-gate	 * ret1 previous freeze state (%o1)
7427c478bd9Sstevel@tonic-gate	 */
7437c478bd9Sstevel@tonic-gate	ENTRY(hv_ttrace_freeze)
7447c478bd9Sstevel@tonic-gate	mov	%o1, %o2
7457c478bd9Sstevel@tonic-gate	mov	TTRACE_FREEZE, %o5
7467c478bd9Sstevel@tonic-gate	ta	FAST_TRAP
7477c478bd9Sstevel@tonic-gate	retl
7487c478bd9Sstevel@tonic-gate	stx	%o1, [%o2]
7497c478bd9Sstevel@tonic-gate	SET_SIZE(hv_ttrace_freeze)
7507c478bd9Sstevel@tonic-gate
7517c478bd9Sstevel@tonic-gate	/*
7527c478bd9Sstevel@tonic-gate	 * MACH_DESC
7537c478bd9Sstevel@tonic-gate	 * arg0 buffer real address
7547c478bd9Sstevel@tonic-gate	 * arg1 pointer to uint64_t for size of buffer
7557c478bd9Sstevel@tonic-gate	 * ret0 status
7567c478bd9Sstevel@tonic-gate	 * ret1 return required size of buffer / returned data size
7577c478bd9Sstevel@tonic-gate	 */
7587c478bd9Sstevel@tonic-gate	ENTRY(hv_mach_desc)
7597c478bd9Sstevel@tonic-gate	mov     %o1, %o4                ! save datap
7607c478bd9Sstevel@tonic-gate	ldx     [%o1], %o1
7617c478bd9Sstevel@tonic-gate	mov     HV_MACH_DESC, %o5
7627c478bd9Sstevel@tonic-gate	ta      FAST_TRAP
7637c478bd9Sstevel@tonic-gate	retl
7647c478bd9Sstevel@tonic-gate	stx   %o1, [%o4]
7657c478bd9Sstevel@tonic-gate	SET_SIZE(hv_mach_desc)
7667c478bd9Sstevel@tonic-gate
7677c478bd9Sstevel@tonic-gate	/*
76869cd775fSschwartz	 * hv_ra2pa(uint64_t ra)
76969cd775fSschwartz	 *
77069cd775fSschwartz	 * MACH_DESC
77169cd775fSschwartz	 * arg0 Real address to convert
77269cd775fSschwartz	 * ret0 Returned physical address or -1 on error
77369cd775fSschwartz	 */
77469cd775fSschwartz	ENTRY(hv_ra2pa)
77569cd775fSschwartz	mov	HV_RA2PA, %o5
77669cd775fSschwartz	ta	FAST_TRAP
77769cd775fSschwartz	cmp	%o0, 0
77869cd775fSschwartz	move	%xcc, %o1, %o0
77969cd775fSschwartz	movne	%xcc, -1, %o0
78069cd775fSschwartz	retl
78169cd775fSschwartz	nop
78269cd775fSschwartz	SET_SIZE(hv_ra2pa)
78369cd775fSschwartz
78469cd775fSschwartz	/*
78569cd775fSschwartz	 * hv_hpriv(void *func, uint64_t arg1, uint64_t arg2, uint64_t arg3)
78669cd775fSschwartz	 *
78769cd775fSschwartz	 * MACH_DESC
78869cd775fSschwartz	 * arg0 OS function to call
78969cd775fSschwartz	 * arg1 First arg to OS function
79069cd775fSschwartz	 * arg2 Second arg to OS function
79169cd775fSschwartz	 * arg3 Third arg to OS function
79269cd775fSschwartz	 * ret0 Returned value from function
79369cd775fSschwartz	 */
79469cd775fSschwartz
79569cd775fSschwartz	ENTRY(hv_hpriv)
79669cd775fSschwartz	mov	HV_HPRIV, %o5
79769cd775fSschwartz	ta	FAST_TRAP
79869cd775fSschwartz	retl
79969cd775fSschwartz	nop
80069cd775fSschwartz	SET_SIZE(hv_hpriv)
80169cd775fSschwartz
802*1ae08745Sheppo	/*
803*1ae08745Sheppo         * hv_ldc_tx_qconf(uint64_t channel, uint64_t ra_base,
804*1ae08745Sheppo	 *	uint64_t nentries);
805*1ae08745Sheppo	 */
806*1ae08745Sheppo	ENTRY(hv_ldc_tx_qconf)
807*1ae08745Sheppo	mov     LDC_TX_QCONF, %o5
808*1ae08745Sheppo	ta      FAST_TRAP
809*1ae08745Sheppo	retl
810*1ae08745Sheppo	  nop
811*1ae08745Sheppo	SET_SIZE(hv_ldc_tx_qconf)
812*1ae08745Sheppo
813*1ae08745Sheppo
814*1ae08745Sheppo	/*
815*1ae08745Sheppo         * hv_ldc_tx_qinfo(uint64_t channel, uint64_t *ra_base,
816*1ae08745Sheppo	 *	uint64_t *nentries);
817*1ae08745Sheppo	 */
818*1ae08745Sheppo	ENTRY(hv_ldc_tx_qinfo)
819*1ae08745Sheppo	mov	%o1, %g1
820*1ae08745Sheppo	mov	%o2, %g2
821*1ae08745Sheppo	mov     LDC_TX_QINFO, %o5
822*1ae08745Sheppo	ta      FAST_TRAP
823*1ae08745Sheppo	stx     %o1, [%g1]
824*1ae08745Sheppo	retl
825*1ae08745Sheppo	  stx   %o2, [%g2]
826*1ae08745Sheppo	SET_SIZE(hv_ldc_tx_qinfo)
827*1ae08745Sheppo
828*1ae08745Sheppo
829*1ae08745Sheppo	/*
830*1ae08745Sheppo	 * hv_ldc_tx_get_state(uint64_t channel,
831*1ae08745Sheppo	 *	uint64_t *headp, uint64_t *tailp, uint64_t *state);
832*1ae08745Sheppo	 */
833*1ae08745Sheppo	ENTRY(hv_ldc_tx_get_state)
834*1ae08745Sheppo	mov     LDC_TX_GET_STATE, %o5
835*1ae08745Sheppo	mov     %o1, %g1
836*1ae08745Sheppo	mov     %o2, %g2
837*1ae08745Sheppo	mov     %o3, %g3
838*1ae08745Sheppo	ta      FAST_TRAP
839*1ae08745Sheppo	stx     %o1, [%g1]
840*1ae08745Sheppo	stx     %o2, [%g2]
841*1ae08745Sheppo	retl
842*1ae08745Sheppo	  stx   %o3, [%g3]
843*1ae08745Sheppo	SET_SIZE(hv_ldc_tx_get_state)
844*1ae08745Sheppo
845*1ae08745Sheppo
846*1ae08745Sheppo	/*
847*1ae08745Sheppo	 * hv_ldc_tx_set_qtail(uint64_t channel, uint64_t tail)
848*1ae08745Sheppo	 */
849*1ae08745Sheppo	ENTRY(hv_ldc_tx_set_qtail)
850*1ae08745Sheppo	mov     LDC_TX_SET_QTAIL, %o5
851*1ae08745Sheppo	ta      FAST_TRAP
852*1ae08745Sheppo	retl
853*1ae08745Sheppo	SET_SIZE(hv_ldc_tx_set_qtail)
854*1ae08745Sheppo
855*1ae08745Sheppo
856*1ae08745Sheppo	/*
857*1ae08745Sheppo         * hv_ldc_rx_qconf(uint64_t channel, uint64_t ra_base,
858*1ae08745Sheppo	 *	uint64_t nentries);
859*1ae08745Sheppo	 */
860*1ae08745Sheppo	ENTRY(hv_ldc_rx_qconf)
861*1ae08745Sheppo	mov     LDC_RX_QCONF, %o5
862*1ae08745Sheppo	ta      FAST_TRAP
863*1ae08745Sheppo	retl
864*1ae08745Sheppo	  nop
865*1ae08745Sheppo	SET_SIZE(hv_ldc_rx_qconf)
866*1ae08745Sheppo
867*1ae08745Sheppo
868*1ae08745Sheppo	/*
869*1ae08745Sheppo         * hv_ldc_rx_qinfo(uint64_t channel, uint64_t *ra_base,
870*1ae08745Sheppo	 *	uint64_t *nentries);
871*1ae08745Sheppo	 */
872*1ae08745Sheppo	ENTRY(hv_ldc_rx_qinfo)
873*1ae08745Sheppo	mov	%o1, %g1
874*1ae08745Sheppo	mov	%o2, %g2
875*1ae08745Sheppo	mov     LDC_RX_QINFO, %o5
876*1ae08745Sheppo	ta      FAST_TRAP
877*1ae08745Sheppo	stx     %o1, [%g1]
878*1ae08745Sheppo	retl
879*1ae08745Sheppo	  stx   %o2, [%g2]
880*1ae08745Sheppo	SET_SIZE(hv_ldc_rx_qinfo)
881*1ae08745Sheppo
882*1ae08745Sheppo
883*1ae08745Sheppo	/*
884*1ae08745Sheppo	 * hv_ldc_rx_get_state(uint64_t channel,
885*1ae08745Sheppo	 *	uint64_t *headp, uint64_t *tailp, uint64_t *state);
886*1ae08745Sheppo	 */
887*1ae08745Sheppo	ENTRY(hv_ldc_rx_get_state)
888*1ae08745Sheppo	mov     LDC_RX_GET_STATE, %o5
889*1ae08745Sheppo	mov     %o1, %g1
890*1ae08745Sheppo	mov     %o2, %g2
891*1ae08745Sheppo	mov     %o3, %g3
892*1ae08745Sheppo	ta      FAST_TRAP
893*1ae08745Sheppo	stx     %o1, [%g1]
894*1ae08745Sheppo	stx     %o2, [%g2]
895*1ae08745Sheppo	retl
896*1ae08745Sheppo	  stx   %o3, [%g3]
897*1ae08745Sheppo	SET_SIZE(hv_ldc_rx_get_state)
898*1ae08745Sheppo
899*1ae08745Sheppo
900*1ae08745Sheppo	/*
901*1ae08745Sheppo	 * hv_ldc_rx_set_qhead(uint64_t channel, uint64_t head)
902*1ae08745Sheppo	 */
903*1ae08745Sheppo	ENTRY(hv_ldc_rx_set_qhead)
904*1ae08745Sheppo	mov     LDC_RX_SET_QHEAD, %o5
905*1ae08745Sheppo	ta      FAST_TRAP
906*1ae08745Sheppo	retl
907*1ae08745Sheppo	SET_SIZE(hv_ldc_rx_set_qhead)
908*1ae08745Sheppo
909*1ae08745Sheppo	/*
910*1ae08745Sheppo	 * hv_ldc_set_map_table(uint64_t channel, uint64_t tbl_ra,
911*1ae08745Sheppo	 *		uint64_t tbl_entries)
912*1ae08745Sheppo	 */
913*1ae08745Sheppo	ENTRY(hv_ldc_set_map_table)
914*1ae08745Sheppo	mov     LDC_SET_MAP_TABLE, %o5
915*1ae08745Sheppo	ta      FAST_TRAP
916*1ae08745Sheppo	retl
917*1ae08745Sheppo	  nop
918*1ae08745Sheppo	SET_SIZE(hv_ldc_set_map_table)
919*1ae08745Sheppo
920*1ae08745Sheppo
921*1ae08745Sheppo	/*
922*1ae08745Sheppo	 * hv_ldc_get_map_table(uint64_t channel, uint64_t *tbl_ra,
923*1ae08745Sheppo	 *		uint64_t *tbl_entries)
924*1ae08745Sheppo	 */
925*1ae08745Sheppo	ENTRY(hv_ldc_get_map_table)
926*1ae08745Sheppo	mov	%o1, %g1
927*1ae08745Sheppo	mov	%o2, %g2
928*1ae08745Sheppo	mov     LDC_GET_MAP_TABLE, %o5
929*1ae08745Sheppo	ta      FAST_TRAP
930*1ae08745Sheppo	stx     %o1, [%g1]
931*1ae08745Sheppo	retl
932*1ae08745Sheppo	  stx     %o2, [%g2]
933*1ae08745Sheppo	SET_SIZE(hv_ldc_get_map_table)
934*1ae08745Sheppo
935*1ae08745Sheppo
936*1ae08745Sheppo	/*
937*1ae08745Sheppo	 * hv_ldc_copy(uint64_t channel, uint64_t request, uint64_t cookie,
938*1ae08745Sheppo	 *		uint64_t raddr, uint64_t length, uint64_t *lengthp);
939*1ae08745Sheppo	 */
940*1ae08745Sheppo	ENTRY(hv_ldc_copy)
941*1ae08745Sheppo	mov     %o5, %g1
942*1ae08745Sheppo	mov     LDC_COPY, %o5
943*1ae08745Sheppo	ta      FAST_TRAP
944*1ae08745Sheppo	retl
945*1ae08745Sheppo	  stx   %o1, [%g1]
946*1ae08745Sheppo	SET_SIZE(hv_ldc_copy)
947*1ae08745Sheppo
948*1ae08745Sheppo
949*1ae08745Sheppo	/*
950*1ae08745Sheppo	 * hv_ldc_mapin(uint64_t channel, uint64_t cookie, uint64_t *raddr,
951*1ae08745Sheppo	 *		uint64_t *perm)
952*1ae08745Sheppo	 */
953*1ae08745Sheppo	ENTRY(hv_ldc_mapin)
954*1ae08745Sheppo	mov	%o2, %g1
955*1ae08745Sheppo	mov	%o3, %g2
956*1ae08745Sheppo	mov     LDC_MAPIN, %o5
957*1ae08745Sheppo	ta      FAST_TRAP
958*1ae08745Sheppo	stx     %o1, [%g1]
959*1ae08745Sheppo	retl
960*1ae08745Sheppo	  stx     %o2, [%g2]
961*1ae08745Sheppo	SET_SIZE(hv_ldc_mapin)
962*1ae08745Sheppo
963*1ae08745Sheppo
964*1ae08745Sheppo	/*
965*1ae08745Sheppo	 * hv_ldc_unmap(uint64_t raddr)
966*1ae08745Sheppo	 */
967*1ae08745Sheppo	ENTRY(hv_ldc_unmap)
968*1ae08745Sheppo	mov     LDC_UNMAP, %o5
969*1ae08745Sheppo	ta      FAST_TRAP
970*1ae08745Sheppo	retl
971*1ae08745Sheppo	  nop
972*1ae08745Sheppo	SET_SIZE(hv_ldc_unmap)
973*1ae08745Sheppo
974*1ae08745Sheppo
975*1ae08745Sheppo	/*
976*1ae08745Sheppo	 * hv_ldc_revoke(uint64_t raddr)
977*1ae08745Sheppo	 */
978*1ae08745Sheppo	ENTRY(hv_ldc_revoke)
979*1ae08745Sheppo	mov     LDC_REVOKE, %o5
980*1ae08745Sheppo	ta      FAST_TRAP
981*1ae08745Sheppo	retl
982*1ae08745Sheppo	  nop
983*1ae08745Sheppo	SET_SIZE(hv_ldc_revoke)
984*1ae08745Sheppo
985*1ae08745Sheppo
986*1ae08745Sheppo	/*
987*1ae08745Sheppo	 * hvldc_intr_getcookie(uint64_t dev_hdl, uint32_t devino,
988*1ae08745Sheppo	 *			uint64_t *cookie);
989*1ae08745Sheppo	 */
990*1ae08745Sheppo	ENTRY(hvldc_intr_getcookie)
991*1ae08745Sheppo	mov	%o2, %g1
992*1ae08745Sheppo	mov     VINTR_GET_COOKIE, %o5
993*1ae08745Sheppo	ta      FAST_TRAP
994*1ae08745Sheppo	retl
995*1ae08745Sheppo	  stx   %o1, [%g1]
996*1ae08745Sheppo	SET_SIZE(hvldc_intr_getcookie)
997*1ae08745Sheppo
998*1ae08745Sheppo	/*
999*1ae08745Sheppo	 * hvldc_intr_setcookie(uint64_t dev_hdl, uint32_t devino,
1000*1ae08745Sheppo	 *			uint64_t cookie);
1001*1ae08745Sheppo	 */
1002*1ae08745Sheppo	ENTRY(hvldc_intr_setcookie)
1003*1ae08745Sheppo	mov     VINTR_SET_COOKIE, %o5
1004*1ae08745Sheppo	ta      FAST_TRAP
1005*1ae08745Sheppo	retl
1006*1ae08745Sheppo	  nop
1007*1ae08745Sheppo	SET_SIZE(hvldc_intr_setcookie)
1008*1ae08745Sheppo
1009*1ae08745Sheppo
1010*1ae08745Sheppo	/*
1011*1ae08745Sheppo	 * hvldc_intr_getvalid(uint64_t dev_hdl, uint32_t devino,
1012*1ae08745Sheppo	 *			int *intr_valid_state);
1013*1ae08745Sheppo	 */
1014*1ae08745Sheppo	ENTRY(hvldc_intr_getvalid)
1015*1ae08745Sheppo	mov	%o2, %g1
1016*1ae08745Sheppo	mov     VINTR_GET_VALID, %o5
1017*1ae08745Sheppo	ta      FAST_TRAP
1018*1ae08745Sheppo	retl
1019*1ae08745Sheppo	  stuw   %o1, [%g1]
1020*1ae08745Sheppo	SET_SIZE(hvldc_intr_getvalid)
1021*1ae08745Sheppo
1022*1ae08745Sheppo	/*
1023*1ae08745Sheppo	 * hvldc_intr_setvalid(uint64_t dev_hdl, uint32_t devino,
1024*1ae08745Sheppo	 *			int intr_valid_state);
1025*1ae08745Sheppo	 */
1026*1ae08745Sheppo	ENTRY(hvldc_intr_setvalid)
1027*1ae08745Sheppo	mov     VINTR_SET_VALID, %o5
1028*1ae08745Sheppo	ta      FAST_TRAP
1029*1ae08745Sheppo	retl
1030*1ae08745Sheppo	  nop
1031*1ae08745Sheppo	SET_SIZE(hvldc_intr_setvalid)
1032*1ae08745Sheppo
1033*1ae08745Sheppo	/*
1034*1ae08745Sheppo	 * hvldc_intr_getstate(uint64_t dev_hdl, uint32_t devino,
1035*1ae08745Sheppo	 *			int *intr_state);
1036*1ae08745Sheppo	 */
1037*1ae08745Sheppo	ENTRY(hvldc_intr_getstate)
1038*1ae08745Sheppo	mov	%o2, %g1
1039*1ae08745Sheppo	mov     VINTR_GET_STATE, %o5
1040*1ae08745Sheppo	ta      FAST_TRAP
1041*1ae08745Sheppo	retl
1042*1ae08745Sheppo	  stuw   %o1, [%g1]
1043*1ae08745Sheppo	SET_SIZE(hvldc_intr_getstate)
1044*1ae08745Sheppo
1045*1ae08745Sheppo	/*
1046*1ae08745Sheppo	 * hvldc_intr_setstate(uint64_t dev_hdl, uint32_t devino,
1047*1ae08745Sheppo	 *			int intr_state);
1048*1ae08745Sheppo	 */
1049*1ae08745Sheppo	ENTRY(hvldc_intr_setstate)
1050*1ae08745Sheppo	mov     VINTR_SET_STATE, %o5
1051*1ae08745Sheppo	ta      FAST_TRAP
1052*1ae08745Sheppo	retl
1053*1ae08745Sheppo	  nop
1054*1ae08745Sheppo	SET_SIZE(hvldc_intr_setstate)
1055*1ae08745Sheppo
1056*1ae08745Sheppo	/*
1057*1ae08745Sheppo	 * hvldc_intr_gettarget(uint64_t dev_hdl, uint32_t devino,
1058*1ae08745Sheppo	 *			uint32_t *cpuid);
1059*1ae08745Sheppo	 */
1060*1ae08745Sheppo	ENTRY(hvldc_intr_gettarget)
1061*1ae08745Sheppo	mov	%o2, %g1
1062*1ae08745Sheppo	mov     VINTR_GET_TARGET, %o5
1063*1ae08745Sheppo	ta      FAST_TRAP
1064*1ae08745Sheppo	retl
1065*1ae08745Sheppo	  stuw   %o1, [%g1]
1066*1ae08745Sheppo	SET_SIZE(hvldc_intr_gettarget)
1067*1ae08745Sheppo
1068*1ae08745Sheppo	/*
1069*1ae08745Sheppo	 * hvldc_intr_settarget(uint64_t dev_hdl, uint32_t devino,
1070*1ae08745Sheppo	 *			uint32_t cpuid);
1071*1ae08745Sheppo	 */
1072*1ae08745Sheppo	ENTRY(hvldc_intr_settarget)
1073*1ae08745Sheppo	mov     VINTR_SET_TARGET, %o5
1074*1ae08745Sheppo	ta      FAST_TRAP
1075*1ae08745Sheppo	retl
1076*1ae08745Sheppo	  nop
1077*1ae08745Sheppo	SET_SIZE(hvldc_intr_settarget)
1078*1ae08745Sheppo
1079*1ae08745Sheppo	/*
1080*1ae08745Sheppo	 * hv_api_get_version(uint64_t api_group, uint64_t *majorp,
1081*1ae08745Sheppo	 *			uint64_t *minorp)
1082*1ae08745Sheppo	 *
1083*1ae08745Sheppo	 * API_GET_VERSION
1084*1ae08745Sheppo	 * arg0 API group
1085*1ae08745Sheppo	 * ret0 status
1086*1ae08745Sheppo	 * ret1 major number
1087*1ae08745Sheppo	 * ret2 minor number
1088*1ae08745Sheppo	 */
1089*1ae08745Sheppo	ENTRY(hv_api_get_version)
1090*1ae08745Sheppo	mov	%o1, %o3
1091*1ae08745Sheppo	mov	%o2, %o4
1092*1ae08745Sheppo	mov	API_GET_VERSION, %o5
1093*1ae08745Sheppo	ta	CORE_TRAP
1094*1ae08745Sheppo	stx	%o1, [%o3]
1095*1ae08745Sheppo	retl
1096*1ae08745Sheppo	  stx	%o2, [%o4]
1097*1ae08745Sheppo	SET_SIZE(hv_api_get_version)
1098*1ae08745Sheppo
1099*1ae08745Sheppo	/*
1100*1ae08745Sheppo	 * hv_api_set_version(uint64_t api_group, uint64_t major,
1101*1ae08745Sheppo	 *			uint64_t minor, uint64_t *supported_minor)
1102*1ae08745Sheppo	 *
1103*1ae08745Sheppo	 * API_SET_VERSION
1104*1ae08745Sheppo	 * arg0 API group
1105*1ae08745Sheppo	 * arg1 major number
1106*1ae08745Sheppo	 * arg2 requested minor number
1107*1ae08745Sheppo	 * ret0 status
1108*1ae08745Sheppo	 * ret1 actual minor number
1109*1ae08745Sheppo	 */
1110*1ae08745Sheppo	ENTRY(hv_api_set_version)
1111*1ae08745Sheppo	mov	%o3, %o4
1112*1ae08745Sheppo	mov	API_SET_VERSION, %o5
1113*1ae08745Sheppo	ta	CORE_TRAP
1114*1ae08745Sheppo	retl
1115*1ae08745Sheppo	  stx	%o1, [%o4]
1116*1ae08745Sheppo	SET_SIZE(hv_api_set_version)
1117*1ae08745Sheppo
11187c478bd9Sstevel@tonic-gate#endif	/* lint || __lint */
1119