xref: /titanic_52/usr/src/uts/sun4v/io/ds_pri_hcall.s (revision 4df55fde49134f9735f84011f23a767c75e393c7)
1*4df55fdeSJanie Lu/*
2*4df55fdeSJanie Lu * CDDL HEADER START
3*4df55fdeSJanie Lu *
4*4df55fdeSJanie Lu * The contents of this file are subject to the terms of the
5*4df55fdeSJanie Lu * Common Development and Distribution License (the "License").
6*4df55fdeSJanie Lu * You may not use this file except in compliance with the License.
7*4df55fdeSJanie Lu *
8*4df55fdeSJanie Lu * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*4df55fdeSJanie Lu * or http://www.opensolaris.org/os/licensing.
10*4df55fdeSJanie Lu * See the License for the specific language governing permissions
11*4df55fdeSJanie Lu * and limitations under the License.
12*4df55fdeSJanie Lu *
13*4df55fdeSJanie Lu * When distributing Covered Code, include this CDDL HEADER in each
14*4df55fdeSJanie Lu * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*4df55fdeSJanie Lu * If applicable, add the following below this CDDL HEADER, with the
16*4df55fdeSJanie Lu * fields enclosed by brackets "[]" replaced with your own identifying
17*4df55fdeSJanie Lu * information: Portions Copyright [yyyy] [name of copyright owner]
18*4df55fdeSJanie Lu *
19*4df55fdeSJanie Lu * CDDL HEADER END
20*4df55fdeSJanie Lu */
21*4df55fdeSJanie Lu
22*4df55fdeSJanie Lu/*
23*4df55fdeSJanie Lu * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24*4df55fdeSJanie Lu * Use is subject to license terms.
25*4df55fdeSJanie Lu */
26*4df55fdeSJanie Lu
27*4df55fdeSJanie Lu/*
28*4df55fdeSJanie Lu * Hypervisor calls called by ds_pri driver.
29*4df55fdeSJanie Lu */
30*4df55fdeSJanie Lu
31*4df55fdeSJanie Lu#include <sys/asm_linkage.h>
32*4df55fdeSJanie Lu#include <sys/hypervisor_api.h>
33*4df55fdeSJanie Lu
34*4df55fdeSJanie Lu#if defined(lint) || defined(__lint)
35*4df55fdeSJanie Lu
36*4df55fdeSJanie Lu/*ARGSUSED*/
37*4df55fdeSJanie Luuint64_t
38*4df55fdeSJanie Luhv_mach_pri(uint64_t buffer_ra, uint64_t *buffer_sizep)
39*4df55fdeSJanie Lu{ return (0); }
40*4df55fdeSJanie Lu
41*4df55fdeSJanie Lu#else	/* lint || __lint */
42*4df55fdeSJanie Lu
43*4df55fdeSJanie Lu	/*
44*4df55fdeSJanie Lu	 * MACH_PRI
45*4df55fdeSJanie Lu	 * arg0 buffer real address
46*4df55fdeSJanie Lu	 * arg1 pointer to uint64_t for size of buffer
47*4df55fdeSJanie Lu	 * ret0 status
48*4df55fdeSJanie Lu	 * ret1 return required size of buffer / returned data size
49*4df55fdeSJanie Lu	 */
50*4df55fdeSJanie Lu	ENTRY(hv_mach_pri)
51*4df55fdeSJanie Lu	mov	%o1, %o4		! save datap
52*4df55fdeSJanie Lu	ldx	[%o1], %o1
53*4df55fdeSJanie Lu	mov	HV_MACH_PRI, %o5
54*4df55fdeSJanie Lu	ta	FAST_TRAP
55*4df55fdeSJanie Lu	retl
56*4df55fdeSJanie Lu	stx	%o1, [%o4]
57*4df55fdeSJanie Lu	SET_SIZE(hv_mach_pri)
58*4df55fdeSJanie Lu
59*4df55fdeSJanie Lu#endif	/* lint || __lint */
60