]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - usr.sbin/eeprom/eeprom.8
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / usr.sbin / eeprom / eeprom.8
1 .\" Copyright (c) 1996 The NetBSD Foundation, Inc.
2 .\" Copyright (c) 2004 Marius Strobl
3 .\" All rights reserved.
4 .\"
5 .\" This code is derived from software contributed to The NetBSD Foundation
6 .\" by Jason R. Thorpe.
7 .\"
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
10 .\" are met:
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\"    notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\"    notice, this list of conditions and the following disclaimer in the
15 .\"    documentation and/or other materials provided with the distribution.
16 .\"
17 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
18 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20 .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
21 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 .\" POSSIBILITY OF SUCH DAMAGE.
28 .\"
29 .\"     from: NetBSD: eeprom.8,v 1.11 2003/03/31 01:31:39 perry Exp
30 .\" $FreeBSD$
31 .\"
32 .Dd September 1, 2006
33 .Dt EEPROM 8 sparc64
34 .Os
35 .Sh NAME
36 .Nm eeprom
37 .Nd "display or modify contents of the EEPROM or NVRAM"
38 .Sh SYNOPSIS
39 .Nm
40 .Fl a
41 .Nm
42 .Op Fl
43 .Ar name Ns Op = Ns Ar value
44 .Ar ...
45 .Sh DESCRIPTION
46 The
47 .Nm
48 utility provides an interface for displaying and changing the system's
49 configuration variables contained in EEPROM or NVRAM.
50 In the first synopsis form, all available configuration variables and their
51 current values are printed.
52 In the second form, only the variable selected by
53 .Ar name
54 and its value is printed or changed if
55 .Ar name
56 is followed by
57 .Ql =
58 and a
59 .Ar value .
60 .Pp
61 The following options are available:
62 .Bl -tag -width indent
63 .It Fl
64 Commands for displaying or changing variables are taken from stdin, allowing
65 one
66 .Ar name
67 or one
68 .Ar name
69 and
70 .Ar value
71 pair per line.
72 The output is printed on stdout.
73 .It Fl a
74 Print all available configuration variables and their current values.
75 .El
76 .Sh VARIABLES AND VALUES
77 Below are variables and values that one is likely to find on a system equipped
78 with OpenBoot 3.x and Open Firmware respectively.
79 .Pp
80 Note: the attempt to set a variable to an illegal value results in the
81 Open Firmware setting it to some legal value instead.
82 The
83 .Nm
84 utility will detect this, try to recover the previous value of the variable
85 and issue a warning telling that the requested value could not be set.
86 .Bl -tag -width ".Va last-hardware-update"
87 .It Va auto-boot?
88 If
89 .Dq Li true ,
90 the system will try to boot automatically from the devices listed in
91 .Va boot-device
92 and
93 .Va diag-device
94 respectively, using the command specified in
95 .Va boot-command
96 at power-up.
97 Default:
98 .Dq Li true .
99 .It Va auto-boot-retry?
100 If set to
101 .Dq Li true
102 and
103 .Va auto-boot?
104 is also set to
105 .Dq Li true ,
106 the system will try to boot from the specified boot devices forever.
107 Default:
108 .Dq Li false .
109 .It Va ansi-terminal?
110 If
111 .Dq Li false ,
112 .Tn ANSI
113 escape sequences are not interpreted by the terminal emulator.
114 Default:
115 .Dq Li true .
116 .It Va boot-command
117 Command executed when
118 .Va auto-boot?
119 is set to
120 .Dq Li true .
121 Default:
122 .Dq Li boot .
123 .It Va boot-device
124 Default device to boot from if
125 .Va diag-switch?
126 is set to
127 .Dq Li false .
128 Takes one or more device aliases or device paths.
129 The boot devices are sequentially tried to boot from, beginning with the first
130 one specified.
131 Default:
132 .Dq Li "net disk" .
133 .It Va cpci-probe-list
134 Digits in the format
135 .Dq Li 0,1,2
136 specifying in which order to probe the devices on the CompactPCI bus at
137 power-up.
138 Default: system-dependent.
139 .It Va boot-file
140 Default arguments for boot when
141 .Va diag-switch?
142 is set to
143 .Dq Li false .
144 When empty, the secondary boot loader will choose the file to boot.
145 Default: empty string.
146 .It Va diag-device
147 Like
148 .Va boot-device .
149 Used when
150 .Va diag-switch?
151 is set to
152 .Dq Li true .
153 Default:
154 .Dq Li net .
155 .It Va diag-file
156 Like
157 .Va boot-file .
158 Used when
159 .Va diag-switch?
160 is set to
161 .Dq Li true .
162 Default: empty string.
163 .It Va diag-level
164 Level of diagnostics to run when
165 .Va diag-switch?
166 is set to
167 .Dq Li true .
168 Possible values are
169 .Dq Li max ,
170 .Dq Li menus ,
171 .Dq Li min
172 and
173 .Dq Li off
174 (depending on the system model).
175 When set to
176 .Dq Li off ,
177 the Power-On Self Test (POST) is not run.
178 The other values are interpreted by the POST.
179 Default:
180 .Dq Li min
181 or
182 .Dq Li max
183 (system-dependent).
184 .It Va diag-switch?
185 If
186 .Dq Li true ,
187 the system will boot and run in diagnostic mode.
188 Default:
189 .Dq Li false
190 or
191 .Dq Li true
192 (system-dependent).
193 .It Va env-monitor
194 Enables or disables the Advanced System Monitoring (ASM).
195 Possible values are
196 .Dq Li enabled
197 and
198 .Dq Li disabled .
199 Default:
200 .Dq Li enabled .
201 .It Va fcode-debug?
202 Used for debugging FCode programs.
203 If set to
204 .Dq Li true ,
205 names of additional FCodes are registered in the Forth dictionary.
206 Default:
207 .Dq Li false .
208 .It Va hardware-revision
209 A string describing the system hardware version.
210 Default: system-dependent.
211 .It Va input-device
212 One of the strings
213 .Dq Li keyboard ,
214 .Dq Li ttya ,
215 or
216 .Dq Li ttyb ,
217 specifying the default console input device.
218 Default:
219 .Dq Li keyboard
220 or
221 .Dq Li ttya
222 (system-dependent).
223 .It Va keyboard-click?
224 If set to
225 .Dq Li true ,
226 the keys click annoyingly.
227 Default:
228 .Dq Li false .
229 .It Va keymap
230 Keymap for a custom keyboard.
231 Default: empty string.
232 .It Va last-hardware-update
233 Similar to
234 .Va hardware-revision ,
235 describing when the hardware was last updated.
236 Default: system-dependent.
237 .It Va last-poweroff-cause
238 Cause of the last power-off.
239 Used internally by the OpenBoot PROM.
240 Default:
241 .Dq Li 0 .
242 .It Va load-base
243 Default address where client programs are loaded to.
244 It is unlikely that this value should ever be changed.
245 Default:
246 .Dq Li 16384 .
247 .It Va local-mac-address?
248 If set to
249 .Dq Li false ,
250 all Ethernet devices with FCode will use the system default MAC address.
251 If set to
252 .Dq Li true ,
253 Ethernet devices with FCode that contains a unique MAC address will use it
254 rather than the system's default MAC address.
255 Default:
256 .Dq Li false .
257 .Pp
258 Ethernet devices with FCode include those supported by
259 .Xr dc 4 ,
260 .Xr gem 4
261 and
262 .Xr hme 4 .
263 Please see the respective manual page for further information.
264 .It Va mfg-mode
265 Manufacture test mode interpreted by the POST.
266 Possible values are
267 .Dq Li chamber
268 and
269 .Dq Li off .
270 Default:
271 .Dq Li off .
272 .It Va mfg-switch?
273 If set to
274 .Dq Li true ,
275 manufacturing tests are repeated until stopped by pressing STOP-A.
276 Default:
277 .Dq Li off .
278 .It Va net-timeout
279 If set to
280 .Dq Li 0 ,
281 the system will try to boot forever when the boot device used is a network
282 device.
283 Any non-zero value is interpreted as minutes to try a network boot.
284 Default:
285 .Dq Li 0 .
286 .It Va nvramrc
287 Contents of the NVRAMRC.
288 Default: empty string.
289 .Pp
290 While
291 .Va nvramrc
292 can be set using
293 .Nm ,
294 it is preferred to use
295 .Ic nvedit
296 in the boot monitor instead.
297 .It Va oem-banner
298 A string displayed at power-up, rather than the default banner.
299 Used when
300 .Va oem-banner?
301 is set to
302 .Dq Li true .
303 Default: system-dependent.
304 .It Va oem-banner?
305 If set to
306 .Dq Li true ,
307 the string stored in
308 .Va oem-banner
309 is displayed at power-up rather than the default banner.
310 Default: system-dependent.
311 .It Va oem-logo
312 A logo displayed at power-up when
313 .Va oem-logo?
314 is set to
315 .Dq Li true ,
316 rather than the default logo.
317 The logo has to be 512 bytes in size, containing a 64x64-bit monochrome image
318 in Sun Raster format without the leading 32-byte header.
319 Default: system-dependent.
320 .Pp
321 To set the logo with
322 .Nm ,
323 give the pathname of the file containing the image as the
324 .Ar value .
325 Using an empty
326 .Ar value
327 will remove the image.
328 .It Va oem-logo?
329 If set to
330 .Dq Li true ,
331 the logo stored in
332 .Va oem-logo
333 is displayed at power-up rather than the default logo.
334 .It Va output-device
335 One of the strings
336 .Dq Li screen ,
337 .Dq Li ttya ,
338 or
339 .Dq Li ttyb ,
340 specifying the default console output device.
341 Default:
342 .Dq Li screen
343 or
344 .Dq Li ttya
345 (system-dependent).
346 .It Va pcia-probe-list
347 Digits in the format
348 .Dq Li 1,2,3
349 specifying in which order to probe the devices on the PCI bus A.
350 Default: system-dependent.
351 .It Va pcib-probe-list
352 Like
353 .Va pcia-probe-list ,
354 but for PCI bus B.
355 Default: system-dependent.
356 .It Va #power-cycles
357 Number of power-cycles.
358 Automatically incremented on each power-cycle.
359 Default: system-dependent.
360 .It Va sbus-probe-list
361 Digits in the format
362 .Dq Li 0123
363 specifying in which order to probe the SBus slots at power-up.
364 Default: system-dependent.
365 .It Va screen-#columns
366 An integer specifying the screen width in characters per line.
367 Default:
368 .Dq Li 80 .
369 .It Va screen-#rows
370 An integer specifying the screen height in lines.
371 Default:
372 .Dq Li 34 .
373 .It Va scsi-initiator-id
374 The SCSI ID of SCSI controllers in the range of [0-7] or [0-f] (depending
375 on the controller).
376 A SCSI controller may or may not adhere to this setting, depending on its
377 FCode and device driver.
378 Default:
379 .Dq Li 7 .
380 .It Va security-#badlogins
381 Number of incorrect password attempts when
382 .Va security-mode
383 is set to
384 .Dq Li command
385 or
386 .Dq Li full .
387 Default:
388 .Dq Li 0 .
389 .It Va security-mode
390 Boot monitor security level.
391 One of the three possible values
392 .Dq Li full ,
393 .Dq Li command ,
394 or
395 .Dq Li none .
396 When set to
397 .Dq Li full ,
398 all boot monitor commands except for
399 .Ic go
400 require the password.
401 When set to
402 .Dq Li command ,
403 all boot monitor commands except for
404 .Ic boot
405 and
406 .Ic go
407 require the password.
408 When set to
409 .Dq Li none ,
410 no password is required.
411 Default:
412 .Dq Li none .
413 .Pp
414 When
415 .Nm
416 is used to set
417 .Va security-mode
418 to
419 .Dq Li full
420 or
421 .Dq Li command ,
422 you will be prompted for the password.
423 When
424 .Va security-mode
425 is set to
426 .Dq Li none ,
427 .Nm
428 will clear the password.
429 .It Va security-password
430 The password used when
431 .Va security-mode
432 is set to
433 .Dq Li full
434 or
435 .Dq Li command .
436 The maximum length for this password is 8 characters.
437 All characters exceeding this length will be ignored.
438 The value displayed for
439 .Va security-password
440 is always an empty string, even when a password is set.
441 Default: empty string.
442 .Pp
443 When
444 .Va security-mode
445 is set to
446 .Dq Li full
447 or
448 .Dq Li command ,
449 .Nm
450 can be used to enter a new password using any
451 .Ar value
452 for
453 .Va security-password
454 on the command line.
455 You will be prompted by
456 .Nm
457 to type in the new password in this case.
458 Trying to set
459 .Va security-password
460 when
461 .Va security-mode
462 is set to
463 .Dq Li none
464 using
465 .Nm
466 has no effect.
467 .It Va selftest-#megs
468 An integer specifying the number of megabytes of memory to test upon
469 power-up when
470 .Va diag-switch?
471 is set to
472 .Dq Li false .
473 Default:
474 .Dq Li 1 .
475 .It Va shutdown-temperature
476 Temperature at which the ASM issues an over-temperature shutdown.
477 Default: system-dependent.
478 .It Va silent-mode
479 If set to
480 .Dq Li true ,
481 memory test messages will not be displayed at power-up.
482 Default:
483 .Dq Li false .
484 .It Va sunmon-compat?
485 If set to
486 .Dq Li true ,
487 the old bootROM interface will be used while in the boot monitor,
488 rather than the OpenBoot PROM interface.
489 Default:
490 .Dq Li false .
491 .It Va system-board-date
492 Manufacturing date of the system board.
493 Default: system-dependent.
494 .It Va system-board-serial#
495 Serial number of the system board.
496 Default: system-dependent.
497 .It Va tpe-link-test?
498 Enable link test on 10baseT and 100baseTX Ethernet devices.
499 Default:
500 .Dq Li true .
501 .It Va ttya-mode
502 A string of five comma separated fields in the format
503 .Dq Li 9600,8,n,1,- .
504 The first field is the baud rate.
505 The second field is the number of data bits.
506 The third field is the parity; acceptable values for parity are
507 .Ql n
508 (none),
509 .Ql e
510 (even),
511 .Ql o
512 (odd),
513 .Ql m
514 (mark), and
515 .Ql s
516 (space).
517 The fourth field is the number of stop bits.
518 The fifth field is the
519 .Dq handshake
520 field; acceptable values are
521 .Ql -
522 (none),
523 .Ql h
524 (RTS/CTS), and
525 .Ql s
526 (Xon/Xoff).
527 Default:
528 .Dq Li 9600,8,n,1,- .
529 .It Va ttya-ignore-cd
530 If set to
531 .Dq Li true ,
532 the system will ignore carrier detect.
533 Default:
534 .Dq Li true .
535 .It Va ttya-rts-dtr-off
536 If set to
537 .Dq Li true ,
538 the system will ignore RTS/DTR.
539 Default:
540 .Dq Li false .
541 .It Va ttyb-mode
542 Like
543 .Va ttya-mode ,
544 but for ttyb.
545 Default:
546 .Dq Li 9600,8,n,1,- .
547 .It Va ttyb-ignore-cd
548 Like
549 .Va ttya-ignore-cd ,
550 but for ttyb.
551 Default:
552 .Dq Li true .
553 .It Va ttyb-rts-dtr-off
554 Like
555 .Va ttya-rts-dtr-off ,
556 but for ttyb.
557 Default:
558 .Dq Li false .
559 .It Va use-boot-table?
560 Use boot table defined by the OEM.
561 Default: system-dependent.
562 .It Va use-nvramrc?
563 If set to
564 .Dq Li true ,
565 the script stored in
566 .Va nvramrc
567 will be executed during start-up.
568 Default:
569 .Dq Li false .
570 .It Va warning-temperature
571 Temperature at which the ASM issues an over-temperature warning.
572 Default: system-dependent.
573 .It Va watchdog-enable?
574 Enables or disables the system watchdog timer.
575 Default:
576 .Dq Li false .
577 .It Va watchdog-reboot?
578 If set to
579 .Dq Li true ,
580 the system will reboot upon terminal count of the system watchdog timer.
581 If set to
582 .Dq Li false ,
583 the system will fall into the boot monitor.
584 Default:
585 .Dq Li false .
586 .It Va watchdog-timeout
587 Expiry limit for the system watchdog timer.
588 Range and unit depend on the system model.
589 Default: system-dependent.
590 .El
591 .Sh EXAMPLES
592 Print all available configuration variables and their current values:
593 .Pp
594 .Dl "eeprom -a"
595 .Pp
596 Print the current value of the
597 .Va local-mac-address?
598 variable:
599 .Pp
600 .Dl "eeprom local-mac-address\e?"
601 .Pp
602 Set the value of the
603 .Va local-mac-address?
604 variable to
605 .Dq Li true :
606 .Pp
607 .Dl "eeprom local-mac-address\e?=true"
608 .Pp
609 Note that the
610 .Ql \e
611 in the above examples is used to keep the shell from interpreting the
612 .Ql \&? .
613 .Pp
614 Write an image to the
615 .Va oem-logo
616 variable:
617 .Pp
618 .Dl "eeprom oem-logo=/path/to/image.raw"
619 .Pp
620 Remove the image from the
621 .Va oem-logo
622 variable again:
623 .Pp
624 .Dl "eeprom oem-logo="
625 .Pp
626 Set the value of the
627 .Va security-mode
628 variable to
629 .Dq Li full ,
630 and set the password:
631 .Bd -literal -offset indent
632 eeprom security-mode=full
633 New password:
634 Retype new password:
635 .Ed
636 .Pp
637 Remember that the maximum length for the password is 8 characters.
638 All characters exceeding this length will be ignored.
639 .Pp
640 Set a new password when the
641 .Va security-mode
642 variable is set to
643 .Dq Li command
644 or
645 .Dq Li full :
646 .Bd -literal -offset indent
647 eeprom security-password=
648 New password:
649 Retype new password:
650 .Ed
651 .Sh SEE ALSO
652 .Xr dc 4 ,
653 .Xr gem 4 ,
654 .Xr hme 4 ,
655 .Xr ofwdump 8
656 .Sh HISTORY
657 The
658 .Nm
659 utility first appeared in
660 .Bx 4.4 .
661 It was adopted from there by
662 .Fx 2.0 .
663 The
664 .Nm
665 utility was removed from
666 .Fx
667 again after
668 .Fx 2.1.7
669 because the utility was unused at that time.
670 The present implementation of the
671 .Nm
672 utility first appeared in
673 .Fx 5.3 .
674 It is inspired by the
675 .Nx
676 .Xr eeprom 8
677 and SunOS/Solaris
678 .Xr eeprom 1M
679 utilities.
680 .Sh AUTHORS
681 .An -nosplit
682 The
683 .Nm
684 utility uses base code from the
685 .Nx
686 version written by
687 .An "Jason R. Thorpe" .
688 The handlers for the Open Firmware
689 .Pa /options
690 node were written by
691 .An "Marius Strobl" Aq marius@FreeBSD.org .
692 The code for accessing the Open Firmware device tree is shared with the
693 .Xr ofwdump 8
694 utility written by
695 .An "Thomas Moestl" Aq tmm@FreeBSD.org .
696 .Sh BUGS
697 Currently,
698 .Nm
699 only supports systems equipped with Open Firmware and is only tested on Sun
700 Microsystems sun4u machines.