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