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