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 /*
23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 #pragma ident "%Z%%M% %I% %E% SMI"
28
29 /*
30 * Hypervisor calls called by niu leaf driver.
31 */
32
33 #include <sys/asm_linkage.h>
34 #include <sys/hypervisor_api.h>
35
36 /*
37 * NIU HV API v1.1 definitions
38 */
39 #define N2NIU_VR_GETINFO 0x148
40 #define N2NIU_VR_GET_RX_MAP 0x14d
41 #define N2NIU_VR_GET_TX_MAP 0x14e
42 #define N2NIU_VRRX_SET_INO 0x150
43 #define N2NIU_VRTX_SET_INO 0x151
44
45
46 #if defined(lint) || defined(__lint)
47
48 /*ARGSUSED*/
49 uint64_t
50 vdds_hv_niu_vr_getinfo(uint32_t cookie, uint64_t *real_start, uint64_t *size)
51 { return (0); }
52
53 /*ARGSUSED*/
54 uint64_t
55 vdds_hv_niu_vr_get_rxmap(uint32_t cookie, uint64_t *dma_map)
56 { return (0); }
57
58 /*ARGSUSED*/
59 uint64_t
60 vdds_hv_niu_vr_get_txmap(uint32_t cookie, uint64_t *dma_map)
61 { return (0); }
62
63 /*ARGSUSED*/
64 uint64_t
65 vdds_hv_niu_vrtx_set_ino(uint32_t cookie, uint64_t vch_idx, uint32_t ino)
66 { return (0); }
67
68 /*ARGSUSED*/
69 uint64_t
70 vdds_hv_niu_vrrx_set_ino(uint32_t cookie, uint64_t vch_idx, uint32_t ino)
71 { return (0); }
72
73 #else /* lint || __lint */
74
75 /*
76 * vdds_hv_niu_vr_getinfo(uint32_t cookie, uint64_t &real_start,
77 * uint64_t &size)
78 */
79 ENTRY(vdds_hv_niu_vr_getinfo)
80 mov %o1, %g1
81 mov %o2, %g2
82 mov N2NIU_VR_GETINFO, %o5
83 ta FAST_TRAP
84 stx %o1, [%g1]
85 retl
86 stx %o2, [%g2]
87 SET_SIZE(vdds_hv_niu_vr_getinfo)
88
89 /*
90 * vdds_hv_niu_vr_get_rxmap(uint32_t cookie, uint64_t *dma_map)
91 */
92 ENTRY(vdds_hv_niu_vr_get_rxmap)
93 mov %o1, %g1
94 mov N2NIU_VR_GET_RX_MAP, %o5
111 /*
112 * vdds_hv_niu_vrrx_set_ino(uint32_t cookie, uint64_t vch_idx, uint32_t ino)
113 */
114 ENTRY(vdds_hv_niu_vrrx_set_ino)
115 mov N2NIU_VRRX_SET_INO, %o5
116 ta FAST_TRAP
117 retl
118 nop
119 SET_SIZE(vdds_hv_niu_vrrx_set_ino)
120
121 /*
122 * vdds_hv_niu_vrtx_set_ino(uint32_t cookie, uint64_t vch_idx, uint32_t ino)
123 */
124 ENTRY(vdds_hv_niu_vrtx_set_ino)
125 mov N2NIU_VRTX_SET_INO, %o5
126 ta FAST_TRAP
127 retl
128 nop
129 SET_SIZE(vdds_hv_niu_vrtx_set_ino)
130
131 #endif /* lint || __lint */
|
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 /*
23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 /*
28 * Hypervisor calls called by niu leaf driver.
29 */
30
31 #include <sys/asm_linkage.h>
32 #include <sys/hypervisor_api.h>
33
34 /*
35 * NIU HV API v1.1 definitions
36 */
37 #define N2NIU_VR_GETINFO 0x148
38 #define N2NIU_VR_GET_RX_MAP 0x14d
39 #define N2NIU_VR_GET_TX_MAP 0x14e
40 #define N2NIU_VRRX_SET_INO 0x150
41 #define N2NIU_VRTX_SET_INO 0x151
42
43
44 /*
45 * vdds_hv_niu_vr_getinfo(uint32_t cookie, uint64_t &real_start,
46 * uint64_t &size)
47 */
48 ENTRY(vdds_hv_niu_vr_getinfo)
49 mov %o1, %g1
50 mov %o2, %g2
51 mov N2NIU_VR_GETINFO, %o5
52 ta FAST_TRAP
53 stx %o1, [%g1]
54 retl
55 stx %o2, [%g2]
56 SET_SIZE(vdds_hv_niu_vr_getinfo)
57
58 /*
59 * vdds_hv_niu_vr_get_rxmap(uint32_t cookie, uint64_t *dma_map)
60 */
61 ENTRY(vdds_hv_niu_vr_get_rxmap)
62 mov %o1, %g1
63 mov N2NIU_VR_GET_RX_MAP, %o5
80 /*
81 * vdds_hv_niu_vrrx_set_ino(uint32_t cookie, uint64_t vch_idx, uint32_t ino)
82 */
83 ENTRY(vdds_hv_niu_vrrx_set_ino)
84 mov N2NIU_VRRX_SET_INO, %o5
85 ta FAST_TRAP
86 retl
87 nop
88 SET_SIZE(vdds_hv_niu_vrrx_set_ino)
89
90 /*
91 * vdds_hv_niu_vrtx_set_ino(uint32_t cookie, uint64_t vch_idx, uint32_t ino)
92 */
93 ENTRY(vdds_hv_niu_vrtx_set_ino)
94 mov N2NIU_VRTX_SET_INO, %o5
95 ta FAST_TRAP
96 retl
97 nop
98 SET_SIZE(vdds_hv_niu_vrtx_set_ino)
99
|