xref: /titanic_52/usr/src/uts/sun4v/sys/drctl_impl.h (revision 1d4b38e0077763e7c9b20768eacb841957e787bc)
1*1d4b38e0Srsmaeda /*
2*1d4b38e0Srsmaeda  * CDDL HEADER START
3*1d4b38e0Srsmaeda  *
4*1d4b38e0Srsmaeda  * The contents of this file are subject to the terms of the
5*1d4b38e0Srsmaeda  * Common Development and Distribution License (the "License").
6*1d4b38e0Srsmaeda  * You may not use this file except in compliance with the License.
7*1d4b38e0Srsmaeda  *
8*1d4b38e0Srsmaeda  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*1d4b38e0Srsmaeda  * or http://www.opensolaris.org/os/licensing.
10*1d4b38e0Srsmaeda  * See the License for the specific language governing permissions
11*1d4b38e0Srsmaeda  * and limitations under the License.
12*1d4b38e0Srsmaeda  *
13*1d4b38e0Srsmaeda  * When distributing Covered Code, include this CDDL HEADER in each
14*1d4b38e0Srsmaeda  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*1d4b38e0Srsmaeda  * If applicable, add the following below this CDDL HEADER, with the
16*1d4b38e0Srsmaeda  * fields enclosed by brackets "[]" replaced with your own identifying
17*1d4b38e0Srsmaeda  * information: Portions Copyright [yyyy] [name of copyright owner]
18*1d4b38e0Srsmaeda  *
19*1d4b38e0Srsmaeda  * CDDL HEADER END
20*1d4b38e0Srsmaeda  */
21*1d4b38e0Srsmaeda 
22*1d4b38e0Srsmaeda /*
23*1d4b38e0Srsmaeda  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24*1d4b38e0Srsmaeda  * Use is subject to license terms.
25*1d4b38e0Srsmaeda  */
26*1d4b38e0Srsmaeda 
27*1d4b38e0Srsmaeda #ifndef _SYS_DRCTL_IMPL_H
28*1d4b38e0Srsmaeda #define	_SYS_DRCTL_IMPL_H
29*1d4b38e0Srsmaeda 
30*1d4b38e0Srsmaeda #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*1d4b38e0Srsmaeda 
32*1d4b38e0Srsmaeda #ifdef	__cplusplus
33*1d4b38e0Srsmaeda extern "C" {
34*1d4b38e0Srsmaeda #endif
35*1d4b38e0Srsmaeda 
36*1d4b38e0Srsmaeda #define	DRCTL_IOC_IMPL	('I' << 8)
37*1d4b38e0Srsmaeda 
38*1d4b38e0Srsmaeda /*
39*1d4b38e0Srsmaeda  * The communication with the backend should be decoupled from the
40*1d4b38e0Srsmaeda  * rest of the drctl module.  Currently, the backend lives in
41*1d4b38e0Srsmaeda  * userland and this module communicates with it via a door upcall.
42*1d4b38e0Srsmaeda  * In the future the backend may be kernel resident.  For this
43*1d4b38e0Srsmaeda  * reason the interface is placed in a separate "impl" source
44*1d4b38e0Srsmaeda  * module and can be easily replaced.
45*1d4b38e0Srsmaeda  */
46*1d4b38e0Srsmaeda #define	DRCTL_IOCTL_CONNECT_SERVER (DRCTL_IOC_IMPL | 1)
47*1d4b38e0Srsmaeda 
48*1d4b38e0Srsmaeda typedef struct drctl_setup {
49*1d4b38e0Srsmaeda 	uint_t did;
50*1d4b38e0Srsmaeda } drctl_setup_t;
51*1d4b38e0Srsmaeda 
52*1d4b38e0Srsmaeda extern void i_drctl_init(void);
53*1d4b38e0Srsmaeda extern void i_drctl_fini(void);
54*1d4b38e0Srsmaeda extern int i_drctl_ioctl(int, intptr_t);
55*1d4b38e0Srsmaeda extern int i_drctl_send(void *, size_t, void **, size_t *);
56*1d4b38e0Srsmaeda 
57*1d4b38e0Srsmaeda #ifdef	__cplusplus
58*1d4b38e0Srsmaeda }
59*1d4b38e0Srsmaeda #endif
60*1d4b38e0Srsmaeda 
61*1d4b38e0Srsmaeda #endif	/* _SYS_DRCTL_IMPL_H */
62