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