Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 #ifndef _SPARC_OPENPROMIO_H
0003 #define _SPARC_OPENPROMIO_H
0004 
0005 #include <linux/compiler.h>
0006 #include <linux/ioctl.h>
0007 
0008 /*
0009  * SunOS and Solaris /dev/openprom definitions. The ioctl values
0010  * were chosen to be exactly equal to the SunOS equivalents.
0011  */
0012 
0013 struct openpromio
0014 {
0015     unsigned int oprom_size;    /* Actual size of the oprom_array. */
0016     char    oprom_array[1];     /* Holds property names and values. */
0017 };
0018 
0019 #define OPROMMAXPARAM   4096        /* Maximum size of oprom_array. */
0020 
0021 #define OPROMGETOPT     0x20004F01
0022 #define OPROMSETOPT     0x20004F02
0023 #define OPROMNXTOPT     0x20004F03
0024 #define OPROMSETOPT2        0x20004F04
0025 #define OPROMNEXT       0x20004F05
0026 #define OPROMCHILD      0x20004F06
0027 #define OPROMGETPROP        0x20004F07
0028 #define OPROMNXTPROP        0x20004F08
0029 #define OPROMU2P        0x20004F09
0030 #define OPROMGETCONS        0x20004F0A
0031 #define OPROMGETFBNAME      0x20004F0B
0032 #define OPROMGETBOOTARGS    0x20004F0C
0033 /* Linux extensions */              /* Arguments in oprom_array: */
0034 #define OPROMSETCUR     0x20004FF0  /* int node - Sets current node */
0035 #define OPROMPCI2NODE       0x20004FF1  /* int pci_bus, pci_devfn - Sets current node to PCI device's node */
0036 #define OPROMPATH2NODE      0x20004FF2  /* char path[] - Set current node from fully qualified PROM path */
0037 
0038 /*
0039  * Return values from OPROMGETCONS:
0040  */
0041 
0042 #define OPROMCONS_NOT_WSCONS    0
0043 #define OPROMCONS_STDIN_IS_KBD  0x1     /* stdin device is kbd */
0044 #define OPROMCONS_STDOUT_IS_FB  0x2     /* stdout is a framebuffer */
0045 #define OPROMCONS_OPENPROM      0x4     /* supports openboot */
0046 
0047 
0048 /*
0049  *  NetBSD/OpenBSD /dev/openprom definitions.
0050  */
0051 
0052 struct opiocdesc
0053 {
0054     int op_nodeid;      /* PROM Node ID (value-result) */
0055     int op_namelen;     /* Length of op_name. */
0056     char    __user *op_name;    /* Pointer to the property name. */
0057     int op_buflen;      /* Length of op_buf (value-result) */
0058     char    __user *op_buf;     /* Pointer to buffer. */
0059 };
0060 
0061 #define OPIOCGET    _IOWR('O', 1, struct opiocdesc)
0062 #define OPIOCSET    _IOW('O', 2, struct opiocdesc)
0063 #define OPIOCNEXTPROP   _IOWR('O', 3, struct opiocdesc)
0064 #define OPIOCGETOPTNODE _IOR('O', 4, int)
0065 #define OPIOCGETNEXT    _IOWR('O', 5, int)
0066 #define OPIOCGETCHILD   _IOWR('O', 6, int)
0067 
0068 #endif /* _SPARC_OPENPROMIO_H */
0069