Path: blob/master/arch/sparc/include/uapi/asm/openpromio.h
26495 views
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1#ifndef _SPARC_OPENPROMIO_H2#define _SPARC_OPENPROMIO_H34#include <linux/compiler.h>5#include <linux/ioctl.h>67/*8* SunOS and Solaris /dev/openprom definitions. The ioctl values9* were chosen to be exactly equal to the SunOS equivalents.10*/1112struct openpromio {13unsigned int oprom_size; /* Actual size of the oprom_array. */14char oprom_array[]; /* Holds property names and values. */15};1617#define OPROMMAXPARAM 4096 /* Maximum size of oprom_array. */1819#define OPROMGETOPT 0x20004F0120#define OPROMSETOPT 0x20004F0221#define OPROMNXTOPT 0x20004F0322#define OPROMSETOPT2 0x20004F0423#define OPROMNEXT 0x20004F0524#define OPROMCHILD 0x20004F0625#define OPROMGETPROP 0x20004F0726#define OPROMNXTPROP 0x20004F0827#define OPROMU2P 0x20004F0928#define OPROMGETCONS 0x20004F0A29#define OPROMGETFBNAME 0x20004F0B30#define OPROMGETBOOTARGS 0x20004F0C31/* Linux extensions */ /* Arguments in oprom_array: */32#define OPROMSETCUR 0x20004FF0 /* int node - Sets current node */33#define OPROMPCI2NODE 0x20004FF1 /* int pci_bus, pci_devfn - Sets current node to PCI device's node */34#define OPROMPATH2NODE 0x20004FF2 /* char path[] - Set current node from fully qualified PROM path */3536/*37* Return values from OPROMGETCONS:38*/3940#define OPROMCONS_NOT_WSCONS 041#define OPROMCONS_STDIN_IS_KBD 0x1 /* stdin device is kbd */42#define OPROMCONS_STDOUT_IS_FB 0x2 /* stdout is a framebuffer */43#define OPROMCONS_OPENPROM 0x4 /* supports openboot */444546/*47* NetBSD/OpenBSD /dev/openprom definitions.48*/4950struct opiocdesc51{52int op_nodeid; /* PROM Node ID (value-result) */53int op_namelen; /* Length of op_name. */54char __user *op_name; /* Pointer to the property name. */55int op_buflen; /* Length of op_buf (value-result) */56char __user *op_buf; /* Pointer to buffer. */57};5859#define OPIOCGET _IOWR('O', 1, struct opiocdesc)60#define OPIOCSET _IOW('O', 2, struct opiocdesc)61#define OPIOCNEXTPROP _IOWR('O', 3, struct opiocdesc)62#define OPIOCGETOPTNODE _IOR('O', 4, int)63#define OPIOCGETNEXT _IOWR('O', 5, int)64#define OPIOCGETCHILD _IOWR('O', 6, int)6566#endif /* _SPARC_OPENPROMIO_H */67686970