*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> sparc64/openprom (4)              



NAME    [Toc]    [Back]

     openprom - OPENPROM interface

SYNOPSIS    [Toc]    [Back]

     #include <machine/openpromio.h>

DESCRIPTION    [Toc]    [Back]

     The file /dev/openprom is an  interface  to  the  UltraSPARC
     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 to a struct opiocdesc
     which contains a node and two counted  strings.   The  first
string is comprised
 of the fields op_namelen (an int) and op_name (a char
*), giving
     the name of a field.  The second string is comprised of  the
     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:

     OPIOCGETOPTNODE  Takes nothing, and  fills  in  the  options
node number.

     OPIOCGETNEXT      Takes a node number and returns the number
of the following
 node.  The node following  the  last
node is number
                      0; the node following number 0 is the first

     OPIOCGETCHILD    Takes a node number and returns the  number
of the first
                      ``child''  of  that  node.   This child may
have siblings;
                      these can be discovered by using  OPIOCGETNEXT.

     OPIOCGET          Fills  in  the value of the named property
for the given
                      node.  If no such  property  is  associated
with that node,
                      the  value  length  is  set  to -1.  If the
named property
                      exists but has no value, the  value  length
is set to 0.

     OPIOCSET          Writes  the  given  value  under the given
name.  The OPENPROM
 may refuse  this  operation;  in  this
case EINVAL is

     OPIOCNEXTPROP     Finds  the property whose name follows the
given name in
                      OPENPROM  internal  order.   The  resulting
name is returned
                      in  the value field.  If the named property
is the last,
                      the ``next'' name is the empty string.   As
                      OPIOCGETNEXT, the next name after the empty
string is
                      the first name.

FILES    [Toc]    [Back]


ERRORS    [Toc]    [Back]

     The following may result in rejection of an operation:

     [EINVAL]        The given node number is not zero  and  does
not correspond
                     to  any valid node, or is zero where zero is
not allowed.

     [EBADF]         The requested operation requires permissions
not specified
 at the call to open().

     [ENAMETOOLONG]   The  given  name or value field exceeds the
maximum allowed
                     length (8191 bytes).

SEE ALSO    [Toc]    [Back]

     ioctl(2), eeprom(8)

HISTORY    [Toc]    [Back]

     A sparc64 openprom manual page  first  appeared  in  OpenBSD

BUGS    [Toc]    [Back]

     Due  to  limitations within the OPENPROM itself, these functions run at elevated
 priority and may adversely affect system performance.

OpenBSD      3.6                          October     5,     2001
[ Back ]
 Similar pages
Name OS Title
openprom OpenBSD OPENPROM and EEPROM interface
eeprom OpenBSD display or modify contents of the EEPROM or OpenPROM
eeprom OpenBSD display or modify contents of the EEPROM or OpenPROM
tirdwr IRIX Transport Interface read/write interface STREAMS module
diag2 HP-UX interface for diagnostic logging and interface to processors
if_indextoname Tru64 Map an interface index to an interface name
if_nametoindex Tru64 Map an interface name to an interface index
ifup Linux bring a network interface up ifdown - take a network interface down
pci_find_device FreeBSD PCI bus interface
pci FreeBSD PCI bus interface
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service