The following diff removes the last mentions of the sun4 old style eeprom behaviour in the eeprom(8) manual page, as well as options specific to it.
Index: eeprom.8 =================================================================== RCS file: /OpenBSD/src/usr.sbin/eeprom/eeprom.8,v retrieving revision 1.22 diff -u -p -r1.22 eeprom.8 --- eeprom.8 8 Jan 2020 14:45:36 -0000 1.22 +++ eeprom.8 8 Nov 2022 15:42:12 -0000 @@ -33,12 +33,11 @@ .Os .Sh NAME .Nm eeprom -.Nd display or modify contents of the EEPROM or OpenPROM +.Nd display or modify contents of the OpenPROM .Sh SYNOPSIS .Nm eeprom -.Op Fl cipv +.Op Fl pv .Op Fl f Ar device -.Op Fl N Ar system .Oo .Ar field Ns Op = Ns Ar value .Ar ... @@ -46,7 +45,7 @@ .Sh DESCRIPTION .Nm eeprom provides an interface for displaying and changing the contents of the -EEPROM or OpenPROM. +OpenPROM. Without any arguments, .Nm eeprom will list all of the known fields and their corresponding values. @@ -55,145 +54,26 @@ When given the name of a specific field, will display that value or set it if the field name is followed by .Sq = and a value. -Only the superuser may modify the contents of the EEPROM or OpenPROM. +Only the superuser may modify the contents of the OpenPROM. .Pp The options are as follows: .Bl -tag -width Ds .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 +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. -.It Fl N Ar system -Use the system image -.Ar system -instead of the default -.Pa /bsd . .It Fl p -On systems with an OpenPROM, display the tree derived from it and exit. -This flag is quietly ignored on systems with an EEPROM. +Display the tree derived from the OpenPROM and exit. .It Fl v -On systems with an OpenPROM, be verbose when setting a value. -Systems with an EEPROM are always verbose. +Be verbose when setting a value. .El .Sh FIELDS AND VALUES -The following fields and values are for systems with an EEPROM: -.Bl -tag -width "watchdog_reboot " -.It Ar hwupdate -A valid date, such as -.Dq 7/12/95 . -The strings -.Dq today -and -.Dq now -are also acceptable. -.It Ar memsize -How much memory, in megabytes, is installed in the system. -.It Ar memtest -How much memory, in megabytes, is to be tested upon power-up. -.It Ar scrsize -The size of the screen. -Acceptable values are -.Dq 1024x1024 , -.Dq 1152x900 , -.Dq 1600x1280 , -and -.Dq 1440x1440 . -.It Ar watchdog_reboot -If true, the system will reboot upon reset. -Otherwise, the system will fall into the monitor. -.It Ar default_boot -If true, the system will use the boot device stored in -.Ar bootdev . -.It Ar bootdev -Specifies the default boot device in the form cc(x,x,x), where -.Dq cc -is a combination of two letters such as -.Dq sd -or -.Dq le -and each -.Dq x -is a hexadecimal number between 0 and ff, less the prepending -.Dq 0x . -.It Ar kbdtype -This value is -.Dq 0 -for all Sun keyboards. -.It Ar console -Specifies the console type. -Valid values are -.Dq b&w , -.Dq ttya , -.Dq ttyb , -.Dq color , -and -.Dq p4opt . -.It Ar keyclick -If true, the keys click annoyingly. -.It Ar diagdev -This is a string very similar to that used by -.Ar bootdev . -It specifies the default boot device when the diagnostic switch is -turned on. -.It Ar diagpath -A 40-character, NULL-terminated string specifying the kernel or stand-alone -program to load when the diagnostic switch is turned on. -.It Ar columns -An 8-bit integer specifying the number of columns on the console. -.It Ar rows -An 8-bit integer specifying the number of rows on the console. -.It Ar ttya_use_baud -Use the baud rate stored in -.Ar ttya_baud -instead of the default 9600. -.It Ar ttya_baud -A 16-bit integer specifying the baud rate to use on ttya. -.It Ar ttya_no_rtsdtr -If true, disables RTS/DTR. -.It Ar ttyb_use_baud -Similar to -.Ar ttya_use_baud , -but for ttyb. -.It Ar ttyb_baud -Similar to -.Ar ttya_baud , -but for ttyb. -.It Ar ttyb_no_rtsdtr -Similar to -.Ar ttya_no_rtsdtr , -but for ttyb. -.It Ar banner -An 80-character, NULL-terminated string to use at power-up instead -of the default Sun banner. -.El -.Pp -Note that the -.Ar secure , -.Ar bad_login , -and -.Ar 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. +Below are field names and values that one is likely to see. NOTE: this list may be incomplete or incorrect due to differences between revisions of the OpenPROM. @@ -336,10 +216,8 @@ other hardware will not. .El .Sh FILES .Bl -tag -width "/dev/openprom" -compact -.It /dev/eeprom -the EEPROM device on systems with an EEPROM .It /dev/openprom -the OpenPROM device on systems with an OpenPROM +the OpenPROM device .El .Sh SEE ALSO .Xr openprom 4 @@ -348,12 +226,9 @@ The fields and their values are not nece 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. +There are a few fields known to exist in some revisions of the +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. +relating to password protection of the OpenPROM. .Pp The date parser isn't very intelligent. Index: main.c =================================================================== RCS file: /OpenBSD/src/usr.sbin/eeprom/main.c,v retrieving revision 1.25 diff -u -p -r1.25 main.c --- main.c 9 Jan 2020 19:33:19 -0000 1.25 +++ main.c 8 Nov 2022 15:42:12 -0000 @@ -45,13 +45,7 @@ static void action(char *); static void dump_prom(void); static void usage(void); -char *path_eeprom = "/dev/eeprom"; char *path_openprom = "/dev/openprom"; -int fix_checksum = 0; -int ignore_checksum = 0; -int update_checksums = 0; -int cksumfail = 0; -u_short writecount; int eval = 0; int print_tree = 0; int verbose = 0; @@ -63,35 +57,22 @@ main(int argc, char *argv[]) { int ch, do_stdin = 0; char *cp, line[BUFSIZE]; - char *optstring = "cf:ipvN:-"; + char *optstring = "f:pv-"; while ((ch = getopt(argc, argv, optstring)) != -1) switch (ch) { case '-': do_stdin = 1; break; - - case 'c': - fix_checksum = 1; - break; - case 'f': - path_eeprom = path_openprom = optarg; - break; - - case 'i': - ignore_checksum = 1; + path_openprom = optarg; break; - case 'p': print_tree = 1; break; - case 'v': verbose = 1; break; - - case '?': default: usage(); } @@ -116,7 +97,7 @@ main(int argc, char *argv[]) } else { if (argc == 0) { dump_prom(); - exit(eval + cksumfail); + exit(eval); } while (argc) { @@ -126,7 +107,7 @@ main(int argc, char *argv[]) } } - exit(eval + cksumfail); + exit(eval); } /* @@ -171,7 +152,7 @@ usage(void) { fprintf(stderr, - "usage: %s [-cipv] [-f device] [field[=value] ...]\n", + "usage: %s [-pv] [-f device] [field[=value] ...]\n", __progname); exit(1); }