Home | History | Annotate | Download | only in netboot
History log of /src/sys/arch/alpha/stand/netboot/if_prom.c
RevisionDateAuthorComments
 1.21  03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.20  12-Jan-2009  tsutsui branches: 1.20.64; 1.20.66;
Replace time_t values in libsa sources with the following two types
to avoid unnecessary 64 bit ops which would make binaries larger:

satime_t (currently unsigned int):
numbers in seconds returned by the machine dependent getsecs() function
which are used to measure relative time

saseconds_t (currently int):
numbers in seconds used to specify timeout to network drivers

Per discussion on current-users.
 1.19  13-Mar-2003  drochner branches: 1.19.104; 1.19.108; 1.19.116;
kill the last use of NENTS
(We shouldn't use libsa/netif here at all.)
 1.18  13-Mar-2003  drochner cope with removal of this sick NENTS macro from libsa/netif.h
 1.17  09-Nov-2002  thorpej Make the bootblocks build with warnings.
 1.16  22-Jul-2001  wiz branches: 1.16.2;
bcopy -> memcpy, bzero -> memset
 1.15  13-Nov-1999  thorpej branches: 1.15.8;
Backout my libsa changes.
 1.14  12-Nov-1999  simonb Don't include <lib/libkern/libkern.h> for prototypes that are also in
<lib/libsa/stand.h>. The alpha still needs libkern for the division
and remainder support.
 1.13  26-May-1999  cgd branches: 1.13.2; 1.13.4; 1.13.8;
uh, get the port name consistently correct (NetBSD/alpha, not NetBSD/Alpha)
 1.12  02-Apr-1999  cgd branches: 1.12.2; 1.12.4; 1.12.6;
abstract the prom device open/close into a separate module, which
provides the correct functions for primary, secondary, and unified
boot blocks. actually behave correctly (e.g. expect correct arguments,
perform correct operations) depending on which you are. also
some minor cleanup.
 1.11  27-Mar-1999  ross Bug fix for the bug fix. Be sure to prom_close() in bootxx and boot, but not
in netboot, and not in diskclose(), but after trying all kernelnames[].
 1.10  06-Sep-1997  drochner -Wall fixes
 1.9  06-Apr-1997  cgd branches: 1.9.4; 1.9.6;
clean up NetBSD RCS ID strings
 1.8  24-Jan-1997  cgd branches: 1.8.2;
reorganize Alpha boot block sources: put common sources in a 'common'
directory (so they don't clutter up the arch/alpha/stand), and put
not-common sources in programs' directories.
 1.7  18-Jan-1997  cgd printfs newline cosmetics
 1.6  18-Jan-1997  cgd allow netboot ethernet address to be hard-coded into binary so that
machines with old firmware which doesn't pass it in the boot device
can work. Assume that if the ethernet address isn't passed in, it
uses the old (dain-bramaged) 'read' interface works on my 3000/300LX.
 1.5  16-Jan-1997  cgd more carefully include libkern and libsa headers
 1.4  02-Oct-1996  cgd spaces/tabs cleanup
 1.3  02-Oct-1996  cgd clean and polish a bit
 1.2  23-Sep-1996  cgd checkpoint current development, add ELF toolchain build support
 1.1  18-Sep-1996  cgd start on some network boot blocks. they work, but:
(1) the if_prom code needs to be cleaned up quite a bit
(right now it hard-codes client's ethernet address), and
(2) much of this code (esp: getsecs.c, netboot.c, newvers.sh,
rpcc.S) should be shared with other Alpha boot blocks,
and dev_net.[ch] should maybe go in libsa proper.
 1.8.2.1  01-Jun-1997  cgd sync the nwscons branch up with yesterday's version of the trunk.
Lots of conflicts/changes because of the RCS Id format changes.
Also, a few cleanups and corrections.
 1.9.6.2  06-Apr-1997  cgd clean up NetBSD RCS ID strings
 1.9.6.1  06-Apr-1997  cgd file if_prom.c was added on branch alpha-nwscons on 1997-04-06 08:41:27 +0000
 1.9.4.1  06-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.12.6.1  30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code). Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.
 1.12.4.1  21-Jun-1999  thorpej Sync w/ -current.
 1.12.2.2  21-Jun-1999  perry pullup 1.12->1.13 (cgd): NetBSD/alpha, not NetBSD/Alpha
 1.12.2.1  02-Apr-1999  perry file if_prom.c was added on branch netbsd-1-4 on 1999-06-21 14:42:53 +0000
 1.13.8.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.4.1  14-Nov-1999  fvdl Sync with -current.
 1.13.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.15.8.1  03-Aug-2001  lukem update to -current
 1.16.2.2  11-Nov-2002  nathanw Catch up to -current
 1.16.2.1  22-Jul-2001  nathanw file if_prom.c was added on branch nathanw_sa on 2002-11-11 21:56:04 +0000
 1.19.116.1  19-Jan-2009  skrll Sync with HEAD.
 1.19.108.1  04-May-2009  yamt sync with head.
 1.19.104.1  17-Jan-2009  mjf Sync with HEAD.
 1.20.66.1  10-Jun-2019  christos Sync with HEAD
 1.20.64.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

RSS XML Feed