1 .\" $NetBSD: openprom.4,v 1.7 2003/04/16 13:35:21 wiz Exp $
3 .\" Copyright (c) 1992, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" This software was developed by the Computer Systems Engineering group
7 .\" at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
8 .\" contributed to Berkeley.
10 .\" Redistribution and use in source and binary forms, with or without
11 .\" modification, are permitted provided that the following conditions
13 .\" 1. Redistributions of source code must retain the above copyright
14 .\" notice, this list of conditions and the following disclaimer.
15 .\" 2. Redistributions in binary form must reproduce the above copyright
16 .\" notice, this list of conditions and the following disclaimer in the
17 .\" documentation and/or other materials provided with the distribution.
18 .\" 3. Neither the name of the University nor the names of its contributors
19 .\" may be used to endorse or promote products derived from this software
20 .\" without specific prior written permission.
22 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .\" from: @(#)openprom.4 8.1 (Berkeley) 6/5/93
41 .Nd Sun OPENPROM and EEPROM interface
43 .In machine/openpromio.h
47 is an interface to the SPARC OPENPROM,
48 including the EEPROM area.
49 This interface is highly stylized;
50 ioctls are used for all operations.
55 integer values describing data areas.
56 Occasionally the number 0 may be used or returned instead,
58 A special distinguished
60 node holds the EEPROM settings.
62 The calls that take and/or return a node
65 variable for this purpose;
66 others use a pointer to an
69 which contains a node and two counted strings.
70 The first string comprises the fields
78 giving the name of a field.
79 The second string comprises the fields
84 These two counted strings work in a
87 At entry to the ioctl,
88 the counts are expected to reflect the buffer size;
90 the counts are updated to reflect the buffer contents.
92 The following ioctls are supported:
93 .Bl -tag -width OPIOCGETOPTNODE
94 .It Dv OPIOCGETOPTNODE
95 Takes nothing, and fills in the options node number.
97 Takes a node number and returns the number of the following node.
98 The node following the last node is number 0;
99 the node following number 0 is the first node.
101 Takes a node number and returns the number of the first
104 This child may have siblings; these can be discovered by using
107 Fills in the value of the named property for the given node.
108 If no such property is associated with that node,
109 the value length is set to -1.
110 If the named property exists but has no value,
111 the value length is set to 0.
113 Writes the given value under the given name.
114 The OPENPROM may refuse this operation;
119 Finds the property whose name follows the given name
120 in OPENPROM internal order.
121 The resulting name is returned in the value field.
122 If the named property is the last, the
124 name is the empty string.
127 the next name after the empty string is the first name.
132 The following may result in rejection of an operation:
135 The given node number
137 and does not correspond to any valid node,
138 or is zero where zero is not allowed.
140 The requested operation requires permissions not specified at the call to
142 .It Bq Er ENAMETOOLONG
143 The given name or value field
144 exceeds the maximum allowed length (8191 bytes).
149 .Pa http://playground.sun.com/1275/
151 Due to limitations within the
153 itself, these functions run at elevated priority
154 and may adversely affect system performance.
159 is what became the Open Firmware
161 standard for processor and system independent boot firmware.