6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
26 #pragma ident "%Z%%M% %I% %E% SMI"
27
28 /*
29 * Hypervisor calls called by glvc driver.
30 */
31
32 #include <sys/asm_linkage.h>
33 #include <sys/hypervisor_api.h>
34 #include <sys/glvc.h>
35
36 #if defined(lint) || defined(__lint)
37
38 /*ARGSUSED*/
39 uint64_t
40 hv_service_recv(uint64_t s_id, uint64_t buf_pa, uint64_t size,
41 uint64_t *recv_bytes)
42 { return (0); }
43
44 /*ARGSUSED*/
45 uint64_t
46 hv_service_send(uint64_t s_id, uint64_t buf_pa, uint64_t size,
47 uint64_t *send_bytes)
48 { return (0); }
49
50 /*ARGSUSED*/
51 uint64_t
52 hv_service_getstatus(uint64_t s_id, uint64_t *vreg)
53 { return (0); }
54
55 /*ARGSUSED*/
56 uint64_t
57 hv_service_setstatus(uint64_t s_id, uint64_t bits)
58 { return (0); }
59
60 /*ARGSUSED*/
61 uint64_t
62 hv_service_clrstatus(uint64_t s_id, uint64_t bits)
63 { return (0); }
64
65 #else /* lint || __lint */
66
67 /*
68 * hv_service_recv(uint64_t s_id, uint64_t buf_pa,
69 * uint64_t size, uint64_t *recv_bytes);
70 */
71 ENTRY(hv_service_recv)
72 save %sp, -SA(MINFRAME), %sp
73 mov %i0, %o0
74 mov %i1, %o1
75 mov %i2, %o2
76 mov %i3, %o3
77 mov SVC_RECV, %o5
78 ta FAST_TRAP
79 brnz %o0, 1f
80 mov %o0, %i0
81 stx %o1, [%i3]
82 1:
83 ret
84 restore
85 SET_SIZE(hv_service_recv)
86
121 /*
122 * hv_service_setstatus(uint64_t s_id, uint64_t bits);
123 */
124 ENTRY(hv_service_setstatus)
125 mov SVC_SETSTATUS, %o5
126 ta FAST_TRAP
127 retl
128 nop
129 SET_SIZE(hv_service_setstatus)
130
131 /*
132 * hv_service_clrstatus(uint64_t s_id, uint64_t bits);
133 */
134 ENTRY(hv_service_clrstatus)
135 mov SVC_CLRSTATUS, %o5
136 ta FAST_TRAP
137 retl
138 nop
139 SET_SIZE(hv_service_clrstatus)
140
141 #endif /* lint || __lint */
|
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
26 /*
27 * Hypervisor calls called by glvc driver.
28 */
29
30 #include <sys/asm_linkage.h>
31 #include <sys/hypervisor_api.h>
32 #include <sys/glvc.h>
33
34 /*
35 * hv_service_recv(uint64_t s_id, uint64_t buf_pa,
36 * uint64_t size, uint64_t *recv_bytes);
37 */
38 ENTRY(hv_service_recv)
39 save %sp, -SA(MINFRAME), %sp
40 mov %i0, %o0
41 mov %i1, %o1
42 mov %i2, %o2
43 mov %i3, %o3
44 mov SVC_RECV, %o5
45 ta FAST_TRAP
46 brnz %o0, 1f
47 mov %o0, %i0
48 stx %o1, [%i3]
49 1:
50 ret
51 restore
52 SET_SIZE(hv_service_recv)
53
88 /*
89 * hv_service_setstatus(uint64_t s_id, uint64_t bits);
90 */
91 ENTRY(hv_service_setstatus)
92 mov SVC_SETSTATUS, %o5
93 ta FAST_TRAP
94 retl
95 nop
96 SET_SIZE(hv_service_setstatus)
97
98 /*
99 * hv_service_clrstatus(uint64_t s_id, uint64_t bits);
100 */
101 ENTRY(hv_service_clrstatus)
102 mov SVC_CLRSTATUS, %o5
103 ta FAST_TRAP
104 retl
105 nop
106 SET_SIZE(hv_service_clrstatus)
107
|