|OPENPROM(4)||Device Drivers Manual||OPENPROM(4)|
The file /dev/openprom is an interface to the OPENPROM. This interface is highly stylized, ioctls are used for all operations. These ioctls refer to “nodes”, which are simply “magic” integer values describing data areas. Occasionally the number 0 may be used or returned instead, as described below.
The calls that take and/or return a node use a pointer to an
int variable for this purpose; others use a pointer
struct opiocdesc descriptor, which contains a
node and two counted strings. The first string is comprised of the fields
char *), giving
the name of a field. The second string is comprised of the fields
analogously. These two counted strings work in a
“value-result” fashion. At entry to the ioctl, the counts are
expected to reflect the buffer size; on return, the counts are updated to
reflect the buffer contents.
The following ioctls are supported:
OPIOCGETNEXT, the next name after the empty string is the first name.
The following may result in rejection of an operation:
openprom interface first appeared in
OpenBSD 3.0 for sparc64. It has been available on
macppc since OpenBSD 4.3, on octeon since
OpenBSD 6.0, on armv7 since OpenBSD
6.0, and on arm64 since OpenBSD 6.1.
Due to limitations within the OPENPROM itself, these functions run at elevated priority and may adversely affect system performance.
|April 25, 2019||OpenBSD-6.8|