| OPENPROM(4) | Device Drivers Manual (sparc) | OPENPROM(4) |
openprom —
#include <machine/openpromio.h>
/dev/openprom is an interface to the SPARC
OPENPROM, including the EEPROM area. 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.
A special distinguished “options” node holds the EEPROM
settings.
The calls that take and/or return a node use a pointer to an
int variable for this purpose; others use a pointer
to an struct opiocdesc descriptor, which contains a
node and two counted strings. The first string comprises the fields
op_namelen (an int) and
op_name (a char *), giving
the name of a field. The second string comprises the fields
op_buflen and op_buf, used
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:
OPIOCGETOPTNODEOPIOCGETCHILDOPIOCGETNEXT.OPIOCGETOPIOCSETEINVAL is returned.OPIOCNEXTPROPOPIOCGETNEXT, the next name after the
empty string is the first name.EINVAL]EBADF]open().ENAMETOOLONG]openprom itself, these
functions run at elevated priority and may adversely affect system
performance.
The Sun openprom is what became the Open
Firmware (IEEE 1275) standard for processor and system independent boot
firmware.
| June 5, 1993 | NetBSD 9.2 |