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