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