xref: /titanic_52/usr/src/uts/common/io/nxge/nxge_hcall.s (revision 911106dfb16696472af8c1b7b4c554a829354fa8)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
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 niu leaf driver.
30*/
31
32#include <sys/asm_linkage.h>
33#include <sys/hypervisor_api.h>
34#include <sys/nxge/nxge_impl.h>
35
36#if defined(lint) || defined(__lint)
37
38/*ARGSUSED*/
39uint64_t
40hv_niu_rx_logical_page_conf(uint64_t chidx, uint64_t pgidx,
41	uint64_t raddr, uint64_t size)
42{ return (0); }
43
44/*ARGSUSED*/
45uint64_t
46hv_niu_rx_logical_page_info(uint64_t chidx, uint64_t pgidx,
47	uint64_t *raddr, uint64_t *size)
48{ return (0); }
49
50/*ARGSUSED*/
51uint64_t
52hv_niu_tx_logical_page_conf(uint64_t chidx, uint64_t pgidx,
53	uint64_t raddr, uint64_t size)
54{ return (0); }
55
56/*ARGSUSED*/
57uint64_t
58hv_niu_tx_logical_page_info(uint64_t chidx, uint64_t pgidx,
59	uint64_t *raddr, uint64_t *size)
60{ return (0); }
61
62#else	/* lint || __lint */
63
64	/*
65	 * hv_niu_rx_logical_page_conf(uint64_t chidx, uint64_t pgidx,
66	 *	uint64_t raddr, uint64_t size)
67	 */
68	ENTRY(hv_niu_rx_logical_page_conf)
69	mov	N2NIU_RX_LP_CONF, %o5
70	ta	FAST_TRAP
71	retl
72	nop
73	SET_SIZE(hv_niu_rx_logical_page_conf)
74
75	/*
76	 * hv_niu_rx_logical_page_info(uint64_t chidx, uint64_t pgidx,
77	 *	uint64_t *raddr, uint64_t *size)
78	 */
79	ENTRY(hv_niu_rx_logical_page_info)
80	mov	%o2, %g1
81	mov	%o3, %g2
82	mov	N2NIU_RX_LP_INFO, %o5
83	ta	FAST_TRAP
84	stx	%o1, [%g1]
85	retl
86	stx	%o2, [%g2]
87	SET_SIZE(hv_niu_rx_logical_page_info)
88
89	/*
90	 * hv_niu_tx_logical_page_conf(uint64_t chidx, uint64_t pgidx,
91	 *	uint64_t raddr, uint64_t size)
92	 */
93	ENTRY(hv_niu_tx_logical_page_conf)
94	mov	N2NIU_TX_LP_CONF, %o5
95	ta	FAST_TRAP
96	retl
97	nop
98	SET_SIZE(hv_niu_tx_logical_page_conf)
99
100	/*
101	 * hv_niu_tx_logical_page_info(uint64_t chidx, uint64_t pgidx,
102	 *	uint64_t *raddr, uint64_t *size)
103	 */
104	ENTRY(hv_niu_tx_logical_page_info)
105	mov	%o2, %g1
106	mov	%o3, %g2
107	mov	N2NIU_TX_LP_INFO, %o5
108	ta	FAST_TRAP
109	stx	%o1, [%g1]
110	retl
111	stx	%o2, [%g2]
112	SET_SIZE(hv_niu_tx_logical_page_info)
113
114#endif	/* lint || __lint */
115