xref: /netbsd-src/usr.sbin/eeprom/eeprom.8 (revision 8b0f9554ff8762542c4defc4f70e1eb76fb508fa)
1.\"	$NetBSD: eeprom.8,v 1.13 2007/03/02 20:48:50 wiz Exp $
2.\"
3.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Jason R. Thorpe.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\" 3. All advertising materials mentioning features or use of this software
18.\"    must display the following acknowledgement:
19.\"        This product includes software developed by the NetBSD
20.\"        Foundation, Inc. and its contributors.
21.\" 4. Neither the name of The NetBSD Foundation nor the names of its
22.\"    contributors may be used to endorse or promote products derived
23.\"    from this software without specific prior written permission.
24.\"
25.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
26.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
29.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35.\" POSSIBILITY OF SUCH DAMAGE.
36.\"
37.Dd February 27, 2007
38.Dt EEPROM 8
39.Os
40.Sh NAME
41.Nm eeprom
42.Nd display or modify contents of the EEPROM or openprom
43.Sh SUN 3 SYNOPSIS
44.Nm
45.Op Fl
46.Op Fl c
47.Op Fl f Ar device
48.Op Fl i
49.Oo
50.Ar field Ns Oo
51.Li = Ns Ar value
52.Oc ...
53.Oc
54.Sh SPARC, SPARC64, MACPPC and PREP SYNOPSIS
55.Nm
56.Op Fl
57.Op Fl c
58.Op Fl f Ar device
59.Op Fl i
60.Op Fl v
61.Oo
62.Ar field Ns Oo
63.Li = Ns Ar value
64.Oc ...
65.Oc
66.Sh DESCRIPTION
67.Nm
68provides an interface for displaying and changing the contents of the
69EEPROM or openprom.
70Without any arguments,
71.Nm
72will list all of the known fields and their corresponding values.
73When given the name of a specific field,
74.Nm
75will display that value or set it if the field name is followed by
76.Sq =
77and a value.
78Only the super-user may modify the contents of the EEPROM or openprom.
79.Pp
80The options are as follows:
81.Bl -tag -width indent
82.It Fl
83Commands are taken from stdin and displayed on stdout.
84.It Fl c
85.Nm
86will fix incorrect checksum values and exit.
87This flag is quietly ignored on systems with an openprom.
88.It Fl f Ar device
89On systems with an EEPROM, use
90.Ar device
91instead of the default
92.Pa /dev/eeprom .
93On systems with an openprom, use
94.Ar device
95instead of the default
96.Pa /dev/openprom .
97.It Fl i
98If checksum values are incorrect,
99.Nm
100will ignore them and continue after displaying a warning.
101This flag is quietly ignored on systems with an openprom.
102.El
103.Pp
104The following options are valid only on the SPARC and will produce an
105error when used on a Sun 3:
106.Bl -tag -width indent
107.It Fl v
108On systems with an openprom, be verbose when setting a value.
109Systems with an EEPROM are always verbose.
110.El
111.Pp
112The
113.Fl v
114option is also present on sparc64, macppc, and prep systems.
115.Sh FIELDS AND VALUES
116The following fields and values are for systems with an EEPROM:
117.Bl -tag -width "watchdog_reboot  "
118.It hwupdate
119A valid date, such as
120.Dq 7/12/95 .
121The strings
122.Dq today
123and
124.Dq now
125are also acceptable.
126.It memsize
127How much memory, in megabytes, is installed in the system.
128.It memtest
129How much memory, in megabytes, is to be tested upon power-up.
130.It scrsize
131The size of the screen.
132Acceptable values are
133.Dq 1024x1024 ,
134.Dq 1152x900 ,
135.Dq 1600x1280 ,
136and
137.Dq 1440x1440 .
138.It watchdog_reboot
139If true, the system will reboot upon reset.
140Otherwise, the system will fall into the monitor.
141.It default_boot
142If true, the system will use the boot device stored in
143.Pa bootdev .
144.It bootdev
145Specifies the default boot device in the form cc(x,x,x), where
146.Sq cc
147is a combination of two letters such as
148.Sq sd
149or
150.Sq le
151and each
152.Sq x
153is a hexadecimal number between 0 and ff, less the prepending
154.Sq 0x .
155.It kbdtype
156This value is
157.Dq 0
158for all Sun keyboards.
159.It console
160Specifies the console type.
161Valid values are
162.Dq b\*[Am]w ,
163.Dq ttya ,
164.Dq ttyb ,
165.Dq color ,
166and
167.Dq p4opt .
168.It keyclick
169If true, the keys click annoyingly.
170.It diagdev
171This is a string very similar to that used by
172.Pa bootdev .
173It specifies the default boot device when the diagnostic switch is
174turned on.
175.It diagpath
176A 40-character, NULL-terminated string specifying the kernel or standalone
177program to load when the diagnostic switch is turned on.
178.It columns
179An 8-bit integer specifying the number of columns on the console.
180.It rows
181An 8-bit integer specifying the number of rows on the console.
182.It ttya_use_baud
183Use the baud rate stored in
184.Pa ttya_baud
185instead of the default 9600.
186.It ttya_baud
187A 16-bit integer specifying the baud rate to use on ttya.
188.It ttya_no_rtsdtr
189If true, disables RTS/DTR.
190.It ttyb_use_baud
191Similar to
192.Pa ttya_use_baud ,
193but for ttyb.
194.It ttyb_baud
195Similar to
196.Pa ttya_baud ,
197but for ttyb.
198.It ttyb_no_rtsdtr
199Similar to
200.Pa ttya_no_rtsdtr ,
201but for ttyb.
202.It banner
203An 80-character, NULL-terminated string to use at power-up instead
204of the default Sun banner.
205.El
206.Pp
207Note that the
208.Pa secure ,
209.Pa bad_login ,
210and
211.Pa password
212fields are not currently supported.
213.Pp
214Since the openprom is designed such that the field names are arbitrary,
215explaining them here is dubious.
216Below are field names and values that
217one is likely to see on a system with an openprom.
218NOTE: this list may be incomplete or incorrect due to differences
219between revisions of the openprom.
220.Bl -tag -width "last-hardware-update  "
221.It sunmon-compat?
222If true, the old EEPROM-style interface will be used while in the monitor,
223rather than the openprom-style interface.
224.It selftest-#megs
225A 32-bit integer specifying the number of megabytes of memory to
226test upon power-up.
227.It oem-logo
228A 64bitx64bit bitmap in Sun Iconedit format.
229To set the bitmap, give the pathname of the file containing the
230image.
231NOTE: this property is not yet supported.
232.It oem-logo?
233If true, enables the use of the bitmap stored in
234.Pa oem-logo
235rather than the default Sun logo.
236.It oem-banner
237A string to use at power up, rather than the default Sun banner.
238.It oem-banner?
239If true, enables the use of the banner stored in
240.Pa oem-banner
241rather than the default Sun banner.
242.It ttya-mode
243A string of five comma separated fields in the format
244.Dq 9600,8,n,1,- .
245The first field is the baud rate.
246The second field is the number of data bits.
247The third field is the parity; acceptable values for parity are
248.Sq n
249(none),
250.Sq e
251(even),
252.Sq o
253(odd),
254.Sq m
255(mark), and
256.Sq s
257(space).
258The fourth field is the number of stop bits.
259The fifth field is the
260.Sq handshake
261field; acceptable values are
262.Sq -
263(none),
264.Sq h
265(RTS/CTS), and
266.Sq s
267(Xon/Xoff).
268.It ttya-rts-dtr-off
269If true, the system will ignore RTS/DTR.
270.It ttya-ignore-cd
271If true, the system will ignore carrier detect.
272.It ttyb-mode
273Similar to
274.Pa ttya-mode ,
275but for ttyb.
276.It ttyb-rts-dtr-off
277Similar to
278.Pa ttya-rts-dtr-off ,
279but for ttyb.
280.It ttyb-ignore-cd
281Similar to
282.Pa ttya-ignore-cd ,
283but for ttyb.
284.It sbus-probe-list
285Four digits in the format
286.Dq 0123
287specifying which order to probe the sbus at power-up.
288It is unlikely that this value should ever be changed.
289.It screen-#columns
290An 8-bit integer specifying the number of columns on the console.
291.It screen-#rows
292An 8-bit integer specifying the number of rows on the console.
293.It auto-boot?
294If true, the system will boot automatically at power-up.
295.It watchdog-reboot?
296If true, the system will reboot upon reset.
297Otherwise, system will fall into the monitor.
298.It input-device
299One of the strings
300.Dq keyboard ,
301.Dq ttya ,
302or
303.Dq ttyb
304specifying the default console input device.
305.It output-device
306One of the strings
307.Dq screen ,
308.Dq ttya ,
309or
310.Dq ttyb
311specifying the default console output device.
312.It keyboard-click?
313If true, the keys click annoyingly.
314.It sd-targets
315A string in the format
316.Dq 31204567
317describing the translation of physical to logical target.
318.It st-targets
319Similar to
320.Pa sd-targets ,
321but for tapes.
322The default translation is
323.Dq 45670123 .
324.It scsi-initiator-id
325The SCSI ID of the on-board SCSI controller.
326.It hardware-revision
327A 7-character string describing a date, such as
328.Dq 25May95 .
329.It last-hardware-update
330Similar to
331.Pa hardware-revision ,
332describing when the CPU was last updated.
333.It diag-switch?
334If true, the system will boot and run in diagnostic mode.
335.El
336.Sh FILES
337.Bl -tag -width "/dev/openprom  "
338.It /dev/eeprom
339The EEPROM device on systems with an EEPROM.
340.It /dev/openprom
341The openprom device on systems with an openprom.
342.It /dev/nvram
343The nvram device on PReP systems.
344.El
345.Sh BUGS
346The fields and their values are not necessarily well defined on
347systems with an openprom.
348Your mileage may vary.
349.Pp
350There are a few fields known to exist in some revisions of the EEPROM
351and/or openprom that are not yet supported.
352Most notable are those
353relating to password protection of the EEPROM or openprom.
354.Pp
355Avoid gratuitously changing the contents of the EEPROM.
356It has a limited number of write cycles.
357.Pp
358The date parser isn't very intelligent.
359