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