xref: /openbsd-src/sys/arch/macppc/include/openpromio.h (revision 47faca803f3d90c0581854a13a1ca638f7a64bf7)
1*47faca80Skettenis /*	$OpenBSD: openpromio.h,v 1.1 2007/11/12 19:23:26 kettenis Exp $	*/
2*47faca80Skettenis /*	$NetBSD: openpromio.h,v 1.1.1.1 1998/06/20 04:58:52 eeh Exp $ */
3*47faca80Skettenis 
4*47faca80Skettenis /*
5*47faca80Skettenis  * Copyright (c) 1992, 1993
6*47faca80Skettenis  *	The Regents of the University of California.  All rights reserved.
7*47faca80Skettenis  *
8*47faca80Skettenis  * This software was developed by the Computer Systems Engineering group
9*47faca80Skettenis  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
10*47faca80Skettenis  * contributed to Berkeley.
11*47faca80Skettenis  *
12*47faca80Skettenis  * All advertising materials mentioning features or use of this software
13*47faca80Skettenis  * must display the following acknowledgement:
14*47faca80Skettenis  *	This product includes software developed by the University of
15*47faca80Skettenis  *	California, Lawrence Berkeley Laboratory.
16*47faca80Skettenis  *
17*47faca80Skettenis  * Redistribution and use in source and binary forms, with or without
18*47faca80Skettenis  * modification, are permitted provided that the following conditions
19*47faca80Skettenis  * are met:
20*47faca80Skettenis  * 1. Redistributions of source code must retain the above copyright
21*47faca80Skettenis  *    notice, this list of conditions and the following disclaimer.
22*47faca80Skettenis  * 2. Redistributions in binary form must reproduce the above copyright
23*47faca80Skettenis  *    notice, this list of conditions and the following disclaimer in the
24*47faca80Skettenis  *    documentation and/or other materials provided with the distribution.
25*47faca80Skettenis  * 3. Neither the name of the University nor the names of its contributors
26*47faca80Skettenis  *    may be used to endorse or promote products derived from this software
27*47faca80Skettenis  *    without specific prior written permission.
28*47faca80Skettenis  *
29*47faca80Skettenis  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
30*47faca80Skettenis  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31*47faca80Skettenis  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32*47faca80Skettenis  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
33*47faca80Skettenis  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34*47faca80Skettenis  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35*47faca80Skettenis  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36*47faca80Skettenis  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37*47faca80Skettenis  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38*47faca80Skettenis  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39*47faca80Skettenis  * SUCH DAMAGE.
40*47faca80Skettenis  *
41*47faca80Skettenis  *	@(#)openpromio.h	8.1 (Berkeley) 6/11/93
42*47faca80Skettenis  */
43*47faca80Skettenis 
44*47faca80Skettenis struct opiocdesc {
45*47faca80Skettenis 	int	op_nodeid;		/* passed or returned node id */
46*47faca80Skettenis 	int	op_namelen;		/* length of op_name */
47*47faca80Skettenis 	char	*op_name;		/* pointer to field name */
48*47faca80Skettenis 	int	op_buflen;		/* length of op_buf (value-result) */
49*47faca80Skettenis 	char	*op_buf;		/* pointer to field value */
50*47faca80Skettenis };
51*47faca80Skettenis 
52*47faca80Skettenis #define	OPIOCGET	_IOWR('O', 1, struct opiocdesc) /* get openprom field */
53*47faca80Skettenis #define	OPIOCSET	_IOW('O', 2, struct opiocdesc) /* set openprom field */
54*47faca80Skettenis #define	OPIOCNEXTPROP	_IOWR('O', 3, struct opiocdesc) /* get next property */
55*47faca80Skettenis #define	OPIOCGETOPTNODE	_IOR('O', 4, int)	/* get openprom field */
56*47faca80Skettenis #define	OPIOCGETNEXT	_IOWR('O', 5, int)	/* get next node of node */
57*47faca80Skettenis #define	OPIOCGETCHILD	_IOWR('O', 6, int)	/* get first child of node */
58