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