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