Home | History | Annotate | only in /src/sys/arch/vax/boot
History log of /src/sys/arch/vax/boot
RevisionDateAuthorComments
 1.2 16-Sep-1995  ragge Obsolete when not using Microvax rom anymore.
 1.1 29-Mar-1995  ragge Added support for uVAX boot.
 1.22 29-Mar-2002  matt Add a xxboot_ustarfs for floppies.
 1.21 06-Mar-1999  ragge branches: 1.21.22; 1.21.26;
New boot program for vax. Appearance similar to the i386 boot blocks.
 1.20 11-Nov-1998  matt Make DHCP/BOOTP the default for VAX net booting
 1.19 09-Oct-1998  matt include <bsd.prog.mk> and make changes so that "make obj" works.
Make it easy to build an boot which uses BOOTP/DHCP instead
RARP/BOOTPARAMS.
 1.18 01-Jul-1998  ragge Added boot program support for the SGEC Ethernet controller, present on
some VAX 4000 maachines. Written by Jay Maynard. (jmaynard@phoenix.net)
 1.17 11-Mar-1998  ragge Standalone routine for DEQNA, written by Roar Thronaes.
 1.16 28-Feb-1998  ragge Move the boot program higher up in memory; to allow loading of bigger kernels.
 1.15 20-Oct-1997  ragge Fix vers.c dependency; PR#4090.
 1.14 29-Jun-1997  ragge Must grok includes. Also; prettier compile-time printout.
 1.13 08-Jun-1997  ragge Use correct console on KA65? machines. Bugfix when specifying adaptor
number. Show compile-time for boot. Prettier printout.
 1.12 15-Mar-1997  ragge Add routines for network handling and standalone le driver.
To make this work nice, big changes to the boot unit handling
was also required. From now only DEC HW unit numbering are used
in boot, to easy match boot device in kernel.
 1.11 18-Oct-1996  thorpej Use ${INSTALL}.
 1.10 02-Aug-1996  ragge Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.9 16-Mar-1996  ragge Support installation of /usr/mdec files.
 1.8 02-Mar-1996  ragge Add VAX780 support to the boot program.
 1.7 17-Feb-1996  ragge Add standalone driver for TU58 (DECtape II). Now initial installation
from TU58 on 11/750 is possible.
Change types on pte pointers, due to the change of pte's from
int to struct pte.
 1.6 28-Dec-1995  ragge Create libkern as a .a instead of a .o file.
 1.5 20-Oct-1995  ragge branches: 1.5.2;
SA_LIB -> SALIB
Include rpb.h. Typeclash fixes.
Removed #include of non-existing file.
 1.4 16-Sep-1995  ragge TMSCP support added.
 1.3 25-Apr-1995  ragge Cleanup and fixes for uVAX boot.
 1.2 29-Mar-1995  ragge Added support for uVAX boot.
 1.1 13-Feb-1995  ragge Boot program added.
 1.5.2.2 20-Oct-1995  ragge SA_LIB -> SALIB
Include rpb.h. Typeclash fixes.
Removed #include of non-existing file.
 1.5.2.1 20-Oct-1995  ragge file Makefile was added on branch netbsd-1-1 on 1995-10-20 13:35:45 +0000
 1.21.26.1 17-Apr-2002  nathanw Catch up to -current.
 1.21.22.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.19 29-Jan-2023  tsutsui Make a vax bootloader work on 8MB VAXen.

64KB (0x800000 - 0x7f0000) is not enough for the bootloader itself
and more spaces are required for heap on loading a kernel.
https://mail-index.netbsd.org/port-vax/2023/01/24/msg004149.html

"Go ahead" from ragge@. Should be pulled up to netbsd-10 and netbsd-9.
 1.18 22-Mar-2018  ragge branches: 1.18.6; 1.18.32;
Let boot relocate to just below 8MB. This solves the problem with
booting a kernel larger than below 4MB.
 1.17 13-Mar-2016  christos branches: 1.17.10; 1.17.16;
Add NO variables for the things that boot block does not support
(SSP/PIE/DEBUG/FORTIFY)
 1.16 21-Aug-2013  matt branches: 1.16.6;
Use <bsd.klinks.mk>
 1.15 18-Jul-2013  joerg Explicitly disable unwind tables for the boot loader.
 1.14 31-Mar-2007  matt branches: 1.14.72; 1.14.82; 1.14.88; 1.14.96;
Add -fno-pic to CFLAGS and AFLAGS
 1.13 13-Mar-2007  ragge Link the boot loader for address 4M-64k, as requested by Hans Rosenfeld.
It's not likely that a vax has less than 4MB of memory today, if someone
has a small-memory-machine he have to recompile boot himself.
 1.12 06-Sep-2006  matt branches: 1.12.6; 1.12.8; 1.12.12; 1.12.14; 1.12.16;
Define LIBCRTBEGIN/LIBCRTEND so we don't need to build userland before
building the bootloaders.
 1.11 02-Jun-2006  mrg remove support for building (with) GCC 2.95. also:
- always install <stdbool.h>
- don't generate a fake one for vax / gettext.
 1.10 07-Apr-2006  mrg branches: 1.10.2;
retire HAVE_GCC3/HAVE_GCC4 and introduce HAVE_GCC that is set to 2, 3 or 4.
 1.9 11-Dec-2005  christos branches: 1.9.4; 1.9.6; 1.9.8; 1.9.10; 1.9.12;
merge ktrace-lwp.
 1.8 11-Dec-2003  matt branches: 1.8.16;
Rework things to move common stuff into Makefile.inc.
 1.7 08-Dec-2003  matt Move common CFLAGS/AFLAGS to Makefile.inc.
For now, only suppy -mno-asm-pic when not using gcc3.
 1.6 24-Feb-2002  matt branches: 1.6.16;
Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.
 1.5 02-Nov-2000  ragge branches: 1.5.4; 1.5.8;
Remove unused define.
 1.4 19-Jul-2000  matt Add support for loading a 2nd stage boot in either a.out or ELF.
Add support for loading a 2nd stage boot directly to it's desired address
if possible.
cleanup use of u_int/size_t.
 1.3 03-Jul-2000  matt Make cross-compile friendly
 1.2 18-Jul-1999  abs branches: 1.2.2;
Work with obj dirs (It seems that ${.CURDIR}/... is your friend).
If I _had_ to pick an arch on which to learn how this stuff works, it probably
would not have been vax... unless of course I was experimenting with time
compressing drugs. If we have a 1.4.2, this is definitely a candidate.
 1.1 06-Mar-1999  ragge branches: 1.1.2; 1.1.4;
New boot program for vax. Appearance similar to the i386 boot blocks.
 1.1.4.1 02-Aug-1999  thorpej Update from trunk.
 1.1.2.1 01-Mar-2000  he Apply patch (requested by toddpw):
Finish porting sysinst to vax, and build various bootable installers
in new directory distrib/vax/bootfs.
 1.2.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.2.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.5.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.5.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.6.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.16.1 03-Aug-2004  skrll Sync with HEAD
 1.8.16.3 03-Sep-2007  yamt sync with head.
 1.8.16.2 30-Dec-2006  yamt sync with head.
 1.8.16.1 21-Jun-2006  yamt sync with head.
 1.9.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.9.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.9.8.3 14-Sep-2006  yamt sync with head.
 1.9.8.2 26-Jun-2006  yamt sync with head.
 1.9.8.1 11-Apr-2006  yamt sync with head
 1.9.6.2 03-Jun-2006  kardel Sync with head.
 1.9.6.1 22-Apr-2006  simonb Sync with head.
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.10.2.1 19-Jun-2006  chap Sync with head.
 1.12.16.1 07-Apr-2008  skrll Pullup changes to get vax shlibs working.
 1.12.14.1 11-Jul-2007  mjf Sync with head.
 1.12.12.1 10-Apr-2007  ad Sync with head.
 1.12.8.2 15-Apr-2007  yamt sync with head.
 1.12.8.1 24-Mar-2007  yamt sync with head.
 1.12.6.1 19-Apr-2008  bouyer Pull up following revision(s) (requested by skrll in ticket #1129):
share/mk/bsd.own.mk: revision 1.489.4.3
gnu/dist/gcc4/gcc/config/vax/vax.h: revision 1.2.6.1
gnu/dist/gcc4/gcc/config/vax/builtins.md: revision 1.2.10.2
sys/arch/vax/conf/Makefile.vax: revision 1.77.22.1
gnu/dist/gcc4/gcc/config/vax/vax-protos.h: revision 1.1.1.1.6.1
gnu/dist/binutils/gas/config/tc-vax.h: revision 1.1.1.1.18.1
gnu/lib/libgcc4/libgcc/Makefile: revision 1.2.6.1
sys/arch/vax/include/macros.h: revision 1.37.14.1
gnu/lib/crtstuff4/Makefile: revision 1.1.6.1
gnu/dist/gcc4/gcc/config/vax/elf.h: revision 1.1.1.1.6.1
gnu/dist/gcc4/gcc/config/vax/vax.c: revision 1.1.1.1.6.1
sys/arch/vax/boot/Makefile.inc: revision 1.12.16.1
tools/gcc/Makefile: revision 1.22.4.1
lib/libcrypto/Makefile: revision 1.46.4.2
gnu/dist/gcc4/gcc/config/vax/netbsd-elf.h: revision 1.1.1.1.6.1
sys/lib/libkern/libkern.h: revision 1.67.6.1
gnu/dist/gcc4/gcc/config/vax/predicates.md: revision 1.3.10.2
gnu/dist/binutils/bfd/elf32-vax.c: revision 1.5.6.1
gnu/dist/gcc4/gcc/config/vax/vax.md: revision 1.1.1.1.4.1.2.1
gnu/dist/gcc4/gcc/config/vax/vax.opt: revision 1.1.1.1.6.1
gnu/dist/binutils/gas/config/tc-vax.c: revision 1.4.4.1.2.1
Pullup changes to get vax shlibs working from the wrstuden-fixsa branch.
 1.14.96.1 23-Jul-2013  riastradh sync with HEAD
 1.14.88.1 28-Aug-2013  rmind sync with head
 1.14.82.2 03-Dec-2017  jdolecek update from HEAD
 1.14.82.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.14.72.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.16.6.1 19-Mar-2016  skrll Sync with HEAD
 1.17.16.1 30-Mar-2018  pgoyette Resolve conflicts between branch and HEAD
 1.17.10.1 24-Mar-2018  snj Pull up following revision(s) (requested by ragge in ticket #657):
sys/arch/vax/boot/Makefile.inc: 1.18
Let boot relocate to just below 8MB. This solves the problem with
booting a kernel larger than below 4MB.
 1.18.32.1 01-Feb-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #64):

sys/arch/vax/boot/Makefile.inc: revision 1.19

Make a vax bootloader work on 8MB VAXen.

64KB (0x800000 - 0x7f0000) is not enough for the bootloader itself
and more spaces are required for heap on loading a kernel.

https://mail-index.netbsd.org/port-vax/2023/01/24/msg004149.html

"Go ahead" from ragge@. Should be pulled up to netbsd-10 and netbsd-9.
 1.18.6.1 01-Feb-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #1582):

sys/arch/vax/boot/Makefile.inc: revision 1.19

Make a vax bootloader work on 8MB VAXen.

64KB (0x800000 - 0x7f0000) is not enough for the bootloader itself
and more spaces are required for heap on loading a kernel.

https://mail-index.netbsd.org/port-vax/2023/01/24/msg004149.html

"Go ahead" from ragge@. Should be pulled up to netbsd-10 and netbsd-9.
 1.14 20-Jun-1999  ragge Remove old unused files.
 1.13 09-Mar-1999  ragge branches: 1.13.4;
Basic KA48 (VAXstation 4000 VLC) support.
From Michael Kukat <michael@camaronet.de>
 1.12 08-Aug-1998  ragge Netboot support for KA46 (VS4000/60).
 1.11 01-Jul-1998  ragge Added boot program support for the SGEC Ethernet controller, present on
some VAX 4000 maachines. Written by Jay Maynard. (jmaynard@phoenix.net)
 1.10 18-Oct-1997  ragge Make UBA adapter selection work on 8600 again.
 1.9 10-Apr-1997  ragge Add better boot support for VS3100/??.
 1.8 22-Mar-1997  ragge Bugfixes to lance routines. Get memory size from rpb to pass to kernel.
Support some more CPU types in boot.
 1.7 15-Mar-1997  ragge Add routines for network handling and standalone le driver.
To make this work nice, big changes to the boot unit handling
was also required. From now only DEC HW unit numbering are used
in boot, to easy match boot device in kernel.
 1.6 02-Aug-1996  ragge Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.5 07-Mar-1996  ragge Support for VAX 8600/8650 added. Works with lots of Unibus adapters,
and will probably work with Massbus adapters as well. (Not tested,
but it's the same code as for 11/780). Ubareset's may cause crashes
on 8600 also like 11/780, but they are more uncommon. No support
for console RL02 yet, but it's likely to come.
 1.4 02-Mar-1996  ragge Add VAX780 support to the boot program.
 1.3 16-Sep-1995  ragge ka650 added. Converted to KNF.
 1.2 29-Mar-1995  ragge uVAX II support.
 1.1 13-Feb-1995  ragge Boot program added.
 1.13.4.1 01-Jul-1999  thorpej Sync w/ -current.
 1.10 20-Jun-1999  ragge Remove old unused files.
 1.9 22-Aug-1998  ragge branches: 1.9.8;
New times, new pagesize, use magic number in exec header.
 1.8 01-Jul-1998  ragge Added boot program support for the SGEC Ethernet controller, present on
some VAX 4000 maachines. Written by Jay Maynard. (jmaynard@phoenix.net)
 1.7 08-Jun-1997  ragge Use correct console on KA65? machines. Bugfix when specifying adaptor
number. Show compile-time for boot. Prettier printout.
 1.6 15-Mar-1997  ragge Add routines for network handling and standalone le driver.
To make this work nice, big changes to the boot unit handling
was also required. From now only DEC HW unit numbering are used
in boot, to easy match boot device in kernel.
 1.5 02-Aug-1996  ragge Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.4 16-Sep-1995  ragge Load microcode file on 11/750.
 1.3 16-Jun-1995  ragge Pass symtab address to kernel.
 1.2 29-Mar-1995  ragge Added support for uVAX boot.
 1.1 13-Feb-1995  ragge Boot program added.
 1.9.8.1 01-Jul-1999  thorpej Sync w/ -current.
 1.3 16-Sep-1995  ragge Obsolete when not using Microvax rom anymore.
 1.2 25-Apr-1995  ragge Cleanup and fixes for uVAX boot.
 1.1 29-Mar-1995  ragge Added support for uVAX boot.
 1.15 13-Mar-1999  ragge Outdated files.
 1.14 21-Oct-1998  ragge Make boot recognize MSCP disks on VAX8200. From Sergey Svishchev.
 1.13 20-Mar-1998  ragge Use rom routines on MicroVAX II, so that the QDSS/QVSS display will
be used if present. Fix provided by Boris Gjenero.
 1.12 28-Feb-1998  ragge Move the boot program higher up in memory; to allow loading of bigger kernels.
 1.11 08-Jun-1997  ragge Use correct console on KA65? machines. Bugfix when specifying adaptor
number. Show compile-time for boot. Prettier printout.
 1.10 10-Apr-1997  ragge Add better boot support for VS3100/??.
 1.9 22-Mar-1997  ragge Bugfixes to lance routines. Get memory size from rpb to pass to kernel.
Support some more CPU types in boot.
 1.8 15-Mar-1997  ragge Add routines for network handling and standalone le driver.
To make this work nice, big changes to the boot unit handling
was also required. From now only DEC HW unit numbering are used
in boot, to easy match boot device in kernel.
 1.7 02-Aug-1996  ragge Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.6 15-Jul-1996  ragge Put in boot support for VAX 8200.
 1.5 17-Feb-1996  ragge Add standalone driver for TU58 (DECtape II). Now initial installation
from TU58 on 11/750 is possible.
Change types on pte pointers, due to the change of pte's from
int to struct pte.
 1.4 20-Oct-1995  ragge branches: 1.4.2;
SA_LIB -> SALIB
Include rpb.h. Typeclash fixes.
Removed #include of non-existing file.
 1.3 16-Sep-1995  ragge Bootblock support for tmscp added, used on MicroVAX.
MicroVAX rom routines not used anymore, too inconsistent when
not using FILES-11 filesystem.
 1.2 25-Apr-1995  ragge Cleanup and fixes for uVAX boot.
 1.1 29-Mar-1995  ragge Added support for uVAX boot.
 1.4.2.2 20-Oct-1995  ragge SA_LIB -> SALIB
Include rpb.h. Typeclash fixes.
Removed #include of non-existing file.
 1.4.2.1 20-Oct-1995  ragge file bootxx.c was added on branch netbsd-1-1 on 1995-10-20 13:35:44 +0000
 1.11 20-Jun-1999  ragge Remove old unused files.
 1.10 01-Jul-1998  ragge branches: 1.10.8; 1.10.10;
Added boot program support for the SGEC Ethernet controller, present on
some VAX 4000 maachines. Written by Jay Maynard. (jmaynard@phoenix.net)
 1.9 11-Mar-1998  ragge Standalone routine for DEQNA, written by Roar Thronaes.
 1.8 10-Apr-1997  ragge Add better boot support for VS3100/??.
 1.7 15-Mar-1997  ragge Add routines for network handling and standalone le driver.
To make this work nice, big changes to the boot unit handling
was also required. From now only DEC HW unit numbering are used
in boot, to easy match boot device in kernel.
 1.6 02-Aug-1996  ragge Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.5 17-Feb-1996  ragge Add standalone driver for TU58 (DECtape II). Now initial installation
from TU58 on 11/750 is possible.
Change types on pte pointers, due to the change of pte's from
int to struct pte.
 1.4 16-Sep-1995  ragge TMSCP support added.
 1.3 25-Apr-1995  ragge Cleanup and fixes for uVAX boot.
 1.2 29-Mar-1995  ragge Added support for uVAX boot.
 1.1 13-Feb-1995  ragge Boot program added.
 1.10.10.1 01-Jul-1999  thorpej Sync w/ -current.
 1.10.8.1 01-Mar-2000  he Apply patch (requested by toddpw):
Finish porting sysinst to vax, and build various bootable installers
in new directory distrib/vax/bootfs.
 1.13 20-Jun-1999  ragge Remove more unused files.
 1.12 09-Mar-1999  ragge branches: 1.12.4;
Basic KA48 (VAXstation 4000 VLC) support.
From Michael Kukat <michael@camaronet.de>
 1.11 08-Aug-1998  ragge Netboot support for KA46 (VS4000/60).
 1.10 01-Jul-1998  ragge Added boot program support for the SGEC Ethernet controller, present on
some VAX 4000 maachines. Written by Jay Maynard. (jmaynard@phoenix.net)
 1.9 20-Mar-1998  ragge Use rom routines on MicroVAX II, so that the QDSS/QVSS display will
be used if present. Fix provided by Boris Gjenero.
 1.8 08-Jun-1997  ragge Use correct console on KA65? machines. Bugfix when specifying adaptor
number. Show compile-time for boot. Prettier printout.
 1.7 10-Apr-1997  ragge Add better boot support for VS3100/??.
 1.6 22-Mar-1997  ragge Bugfixes to lance routines. Get memory size from rpb to pass to kernel.
Support some more CPU types in boot.
 1.5 15-Mar-1997  ragge Add routines for network handling and standalone le driver.
To make this work nice, big changes to the boot unit handling
was also required. From now only DEC HW unit numbering are used
in boot, to easy match boot device in kernel.
 1.4 02-Aug-1996  ragge Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.3 16-Sep-1995  ragge Take care of xon/xoff (== discard them).
 1.2 25-Apr-1995  ragge Cleanup and fixes for uVAX boot.
 1.1 13-Feb-1995  ragge Boot program added.
 1.12.4.1 01-Jul-1999  thorpej Sync w/ -current.
 1.6 16-Jun-2000  matt these are obsolete now that vax uses sysinst.
 1.5 10-Nov-1997  ragge branches: 1.5.14; 1.5.22;
Fix multivolume installation bug; PR#4454.
 1.4 12-Feb-1997  ragge branches: 1.4.8;
s/tms/mt/
 1.3 02-Aug-1996  ragge branches: 1.3.6;
Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.2 29-Sep-1995  ragge Arg to printf forgot.
 1.1 16-Sep-1995  ragge Rick Macklem's copy hack that can do standalone (multi-)volume
copies from anything to anything.
 1.3.6.1 12-Mar-1997  is Merge in changes from Trunk
 1.4.8.1 12-Nov-1997  mellon Pull rev 1.5 up from trunk (ragge)
 1.5.22.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.5.14.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.2 20-Jun-1999  ragge Remove old unused files.
 1.1 17-Feb-1996  ragge branches: 1.1.26;
Add standalone driver for TU58 (DECtape II). Now initial installation
from TU58 on 11/750 is possible.
Change types on pte pointers, due to the change of pte's from
int to struct pte.
 1.1.26.1 01-Jul-1999  thorpej Sync w/ -current.
 1.5 20-Jun-1999  ragge Remove old unused files.
 1.4 16-Sep-1995  ragge branches: 1.4.28;
struct rpb -> include/rpb.h
 1.3 16-Jun-1995  ragge Passing symtab address to kernel.
 1.2 25-Apr-1995  ragge Cleanup and fixes for uVAX boot.
 1.1 29-Mar-1995  ragge Added support for uVAX boot.
 1.4.28.1 01-Jul-1999  thorpej Sync w/ -current.
 1.9 20-Jun-1999  ragge Remove old unused files.
 1.8 08-Jun-1997  ragge branches: 1.8.18;
Use correct console on KA65? machines. Bugfix when specifying adaptor
number. Show compile-time for boot. Prettier printout.
 1.7 15-Mar-1997  ragge Add routines for network handling and standalone le driver.
To make this work nice, big changes to the boot unit handling
was also required. From now only DEC HW unit numbering are used
in boot, to easy match boot device in kernel.
 1.6 02-Aug-1996  ragge Do not use any emulated insn's in boot program. (in this case cmpc3).
Add strncmp to get around this.
 1.5 02-Aug-1996  ragge Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.4 16-Mar-1996  ragge Accept adapter numbering in boot.
 1.3 16-Sep-1995  ragge TMSCP support added.
 1.2 25-Apr-1995  ragge Cleanup and fixes for uVAX boot.
 1.1 13-Feb-1995  ragge Boot program added.
 1.8.18.1 01-Jul-1999  thorpej Sync w/ -current.
 1.4 16-Jun-2000  matt these are obsolete now that vax uses sysinst.
 1.3 01-Jul-1998  ragge branches: 1.3.14; 1.3.22;
Added boot program support for the SGEC Ethernet controller, present on
some VAX 4000 maachines. Written by Jay Maynard. (jmaynard@phoenix.net)
 1.2 02-Aug-1996  ragge Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.1 16-Sep-1995  ragge Foolish and easy standalone prog to edit disklabels.
 1.3.22.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.3.14.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.7 13-Mar-1999  ragge Outdated files.
 1.6 09-Oct-1998  matt Commit out include of "../include/macros.h" since its bcopy conflict with
the one in "lib/libsa/stand.h".
 1.5 17-Feb-1996  ragge Add standalone driver for TU58 (DECtape II). Now initial installation
from TU58 on 11/750 is possible.
Change types on pte pointers, due to the change of pte's from
int to struct pte.
 1.4 16-Sep-1995  ragge Removed bug to prevent division-by-zero when accessing unlabelled disks.
 1.3 25-Apr-1995  ragge Cleanup and fixes for uVAX boot.
 1.2 29-Mar-1995  ragge Added support for uVAX boot.
 1.1 13-Feb-1995  ragge Boot program added.
 1.8 20-Jun-1999  ragge Remove old unused files.
 1.7 25-Mar-1999  thorpej branches: 1.7.4;
Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
ourselves.
 1.6 09-Oct-1998  matt Workaround problem with le driver forgetting its address
 1.5 08-Aug-1998  ragge Netboot support for KA46 (VS4000/60).
 1.4 26-Jul-1998  ragge Fix netboot support for 3100/m76 which uses diagmem for its lance buffers.
 1.3 21-Jul-1998  drochner adapt to LANCE driver split
 1.2 22-Mar-1997  ragge Bugfixes to lance routines. Get memory size from rpb to pass to kernel.
Support some more CPU types in boot.
 1.1 15-Mar-1997  ragge Add routines for network handling and standalone le driver.
To make this work nice, big changes to the boot unit handling
was also required. From now only DEC HW unit numbering are used
in boot, to easy match boot device in kernel.
 1.7.4.1 01-Jul-1999  thorpej Sync w/ -current.
 1.3 20-Jun-1999  ragge Remove old unused files.
 1.2 31-Aug-1998  ragge branches: 1.2.8;
Bug fixes and improvements. By Roar Thron�s and myself.
 1.1 11-Mar-1998  ragge Standalone routine for DEQNA, written by Roar Thronaes.
 1.2.8.1 01-Jul-1999  thorpej Sync w/ -current.
 1.3 20-Jun-1999  ragge Remove old unused files.
 1.2 25-Mar-1999  thorpej branches: 1.2.4;
Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
ourselves.
 1.1 01-Jul-1998  ragge Added boot program support for the SGEC Ethernet controller, present on
some VAX 4000 maachines. Written by Jay Maynard. (jmaynard@phoenix.net)
 1.2.4.1 01-Jul-1999  thorpej Sync w/ -current.
 1.4 15-Jul-1996  ragge Obsoleted by now.
 1.3 16-Sep-1995  ragge ka650 added. Converted to KNF.
 1.2 25-Apr-1995  ragge Cleanup and fixes for uVAX boot.
 1.1 29-Mar-1995  ragge Added support for uVAX boot.
 1.2 20-Jun-1999  ragge Remove old unused files.
 1.1 02-Aug-1996  ragge branches: 1.1.24;
Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.1.24.1 01-Jul-1999  thorpej Sync w/ -current.
 1.3 20-Jun-1999  ragge Remove more unused files.
 1.2 15-Mar-1997  ragge branches: 1.2.18;
Add routines for network handling and standalone le driver.
To make this work nice, big changes to the boot unit handling
was also required. From now only DEC HW unit numbering are used
in boot, to easy match boot device in kernel.
 1.1 02-Aug-1996  ragge Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.2.18.1 01-Jul-1999  thorpej Sync w/ -current.
 1.5 20-Jun-1999  ragge Remove more unused files.
 1.4 07-May-1999  drochner include <lib/libkern/libkern.h> for intoa()/inet_ntoa()
 1.3 09-Oct-1998  matt branches: 1.3.8;
Remove define for SUPPORT_BOOTPARAMS and put in the Makefile instead.
Fix DHCP code so it works.
 1.2 05-Oct-1997  thorpej Copyright assigned to The NetBSD Foundation.
 1.1 15-Mar-1997  ragge branches: 1.1.4;
Add routines for network handling and standalone le driver.
To make this work nice, big changes to the boot unit handling
was also required. From now only DEC HW unit numbering are used
in boot, to easy match boot device in kernel.
 1.1.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.3.8.2 01-Jul-1999  thorpej Sync w/ -current.
 1.3.8.1 21-Jun-1999  thorpej Sync w/ -current.
 1.7 20-Jun-1999  ragge Remove more unused files.
 1.6 09-Oct-1998  matt branches: 1.6.8;
Commit out include of "../include/macros.h" since its bcopy conflict with
the one in "lib/libsa/stand.h".
 1.5 02-Aug-1996  ragge Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.4 17-Feb-1996  ragge Add standalone driver for TU58 (DECtape II). Now initial installation
from TU58 on 11/750 is possible.
Change types on pte pointers, due to the change of pte's from
int to struct pte.
 1.3 16-Sep-1995  ragge ka650 added. Converted to KNF.
 1.2 25-Apr-1995  ragge Cleanup and fixes for uVAX boot.
 1.1 29-Mar-1995  ragge Added support for uVAX boot.
 1.6.8.1 01-Jul-1999  thorpej Sync w/ -current.
 1.2 16-Jun-2000  matt now lives one level down in boot.
 1.1 02-Aug-1996  ragge branches: 1.1.28; 1.1.36;
Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.1.36.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.28.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.5 16-Jun-2000  matt This file now lives one level down in common.
 1.4 02-Aug-1996  ragge branches: 1.4.28; 1.4.36;
Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.3 16-Sep-1995  ragge Calls to MicroVAX rom routines removed.
 1.2 25-Apr-1995  ragge Cleanup and fixes for uVAX boot.
 1.1 29-Mar-1995  ragge Added support for uVAX boot.
 1.4.36.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.4.28.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.2 20-Jun-1999  ragge Remove old unused files.
 1.1 02-Aug-1996  ragge branches: 1.1.24;
Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.1.24.1 01-Jul-1999  thorpej Sync w/ -current.
 1.2 31-Mar-2002  matt These haven't been use for a long time. Move 'em to the attic.
 1.1 02-Aug-1996  ragge branches: 1.1.42; 1.1.46;
Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.1.46.1 17-Apr-2002  nathanw Catch up to -current.
 1.1.42.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2 31-Mar-2002  matt These haven't been use for a long time. Move 'em to the attic.
 1.1 02-Aug-1996  ragge branches: 1.1.42; 1.1.46;
Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.1.46.1 17-Apr-2002  nathanw Catch up to -current.
 1.1.42.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2 31-Mar-2002  matt These haven't been use for a long time. Move 'em to the attic.
 1.1 02-Aug-1996  ragge branches: 1.1.42; 1.1.46;
Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.1.46.1 17-Apr-2002  nathanw Catch up to -current.
 1.1.42.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2 31-Mar-2002  matt These haven't been use for a long time. Move 'em to the attic.
 1.1 02-Aug-1996  ragge branches: 1.1.42; 1.1.46;
Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.1.46.1 17-Apr-2002  nathanw Catch up to -current.
 1.1.42.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.10 20-Jun-1999  ragge Remove old unused files.
 1.9 22-Mar-1997  ragge branches: 1.9.18;
Bugfixes to lance routines. Get memory size from rpb to pass to kernel.
Support some more CPU types in boot.
 1.8 15-Mar-1997  ragge Add routines for network handling and standalone le driver.
To make this work nice, big changes to the boot unit handling
was also required. From now only DEC HW unit numbering are used
in boot, to easy match boot device in kernel.
 1.7 27-Feb-1997  ragge Be able to find out if we are booted from network.
 1.6 02-Aug-1996  ragge branches: 1.6.6;
Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.5 07-Mar-1996  ragge Support for VAX 8600/8650 added. Works with lots of Unibus adapters,
and will probably work with Massbus adapters as well. (Not tested,
but it's the same code as for 11/780). Ubareset's may cause crashes
on 8600 also like 11/780, but they are more uncommon. No support
for console RL02 yet, but it's likely to come.
 1.4 16-Sep-1995  ragge Calls to MicroVAX rom routines removed.
 1.3 16-Jun-1995  ragge Passing symtab address to kernel.
 1.2 29-Mar-1995  ragge Added support for uVAX boot.
 1.1 13-Feb-1995  ragge Boot program added.
 1.6.6.1 12-Mar-1997  is Merge in changes from Trunk
 1.9.18.1 01-Jul-1999  thorpej Sync w/ -current.
 1.11 20-Jun-1999  ragge Remove old unused files.
 1.10 22-Mar-1997  ragge branches: 1.10.18;
Bugfixes to lance routines. Get memory size from rpb to pass to kernel.
Support some more CPU types in boot.
 1.9 27-Feb-1997  ragge Be able to find out if we are booted from network.
 1.8 02-Aug-1996  ragge branches: 1.8.6;
Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.7 02-Feb-1996  mycroft ASSEMBLER -> _LOCORE
 1.6 01-Feb-1996  mycroft LOCORE -> _LOCORE
 1.5 20-Oct-1995  ragge branches: 1.5.2;
SA_LIB -> SALIB
Include rpb.h. Typeclash fixes.
Removed #include of non-existing file.
 1.4 16-Sep-1995  ragge Calls to MicroVAX rom routines removed.
 1.3 16-Jun-1995  ragge Passing symtab address to kernel.
 1.2 25-Apr-1995  ragge Cleanup and fixes for uVAX boot.
 1.1 29-Mar-1995  ragge Added support for uVAX boot.
 1.5.2.2 20-Oct-1995  ragge SA_LIB -> SALIB
Include rpb.h. Typeclash fixes.
Removed #include of non-existing file.
 1.5.2.1 20-Oct-1995  ragge file start.s was added on branch netbsd-1-1 on 1995-10-20 13:35:42 +0000
 1.8.6.1 12-Mar-1997  is Merge in changes from Trunk
 1.10.18.1 01-Jul-1999  thorpej Sync w/ -current.
 1.5 20-Jun-1999  ragge Remove more unused files.
 1.4 09-Oct-1998  matt branches: 1.4.8;
Add strncpy (needed for bootp/dhcp). Tighten up some of the assembly.
 1.3 15-Mar-1997  ragge Add routines for network handling and standalone le driver.
To make this work nice, big changes to the boot unit handling
was also required. From now only DEC HW unit numbering are used
in boot, to easy match boot device in kernel.
 1.2 02-Aug-1996  ragge Do not use any emulated insn's in boot program. (in this case cmpc3).
Add strncmp to get around this.
 1.1 02-Aug-1996  ragge Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.4.8.1 01-Jul-1999  thorpej Sync w/ -current.
 1.6 20-Jun-1999  ragge Remove more unused files.
 1.5 09-Oct-1998  matt branches: 1.5.8;
Commit out include of "../include/macros.h" since its bcopy conflict with
the one in "lib/libsa/stand.h".
 1.4 15-Mar-1997  ragge Add routines for network handling and standalone le driver.
To make this work nice, big changes to the boot unit handling
was also required. From now only DEC HW unit numbering are used
in boot, to easy match boot device in kernel.
 1.3 02-Aug-1996  ragge Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.2 17-Feb-1996  ragge Add standalone driver for TU58 (DECtape II). Now initial installation
from TU58 on 11/750 is possible.
Change types on pte pointers, due to the change of pte's from
int to struct pte.
 1.1 16-Sep-1995  ragge Standalone support for TMSCP tapes, based on ra disk driver.
 1.5.8.1 01-Jul-1999  thorpej Sync w/ -current.
 1.7 20-Jun-1999  ragge Remove more unused files.
 1.6 15-Mar-1997  ragge branches: 1.6.18;
Add routines for network handling and standalone le driver.
To make this work nice, big changes to the boot unit handling
was also required. From now only DEC HW unit numbering are used
in boot, to easy match boot device in kernel.
 1.5 02-Aug-1996  ragge Add support for booting Vaxstations; from MFM and SCSI. (PROM-based boot).
 1.4 17-Feb-1996  ragge Add standalone driver for TU58 (DECtape II). Now initial installation
from TU58 on 11/750 is possible.
Change types on pte pointers, due to the change of pte's from
int to struct pte.
 1.3 25-Apr-1995  ragge Cleanup and fixes for uVAX boot.
 1.2 29-Mar-1995  ragge Added support for uVAX boot.
 1.1 13-Feb-1995  ragge Boot program added.
 1.6.18.1 01-Jul-1999  thorpej Sync w/ -current.
 1.48 23-Oct-2024  kalvisd vax: use vax-mopcopy to generate usr/mdec/boot.mop from usr/mdec/boot;
include boot.mop in the base set once again.

OK rin@
 1.47 30-Sep-2024  kalvisd vax/boot: XXX: Silence GCC12 -Warray-bounds for autoconf.c at the moment

OK rin@ (from rin@)
 1.46 19-Mar-2018  ragge branches: 1.46.38;
gcc 5.5 has no problem with -O2 on boot.
 1.45 08-Apr-2017  christos branches: 1.45.12;
centralize vers.c building for standalone programs.
 1.44 17-Jan-2016  tsutsui branches: 1.44.2; 1.44.4;
Enable LIBSA_CREAD_NOCRC. PR/50638

Bump version to denote user visible change.
Tested on simh 4.0-Beta1 emulationg MicroVAX 3900.
 1.43 17-Jan-2016  tsutsui Make this build without installed DESTDIR files.
 1.42 24-May-2014  martin branches: 1.42.4;
Force -O1 when compiling this, it doesn't work with -O2 (need to investigate
later)
 1.41 21-Aug-2013  matt branches: 1.41.2;
Use <bsd.klinks.mk>
 1.40 14-May-2012  abs branches: 1.40.2; 1.40.4;
Revert hax to fix boot blocks for gcc 4.5, accudently committed in last
 1.39 14-May-2012  abs From the "why was this not done before" box:
Implement WSDISPLAYIO_LINEBYTES so xwsfb works
 1.38 22-Jan-2011  joerg branches: 1.38.4;
Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh. Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
 1.37 08-Mar-2006  sekiya branches: 1.37.90; 1.37.96; 1.37.98;
The network bootloader entry point should be nisse(), not start(). Fixes a
very long-standing netboot issue.

Patch contributed by Hans Rosenfeld.
 1.36 11-Dec-2005  christos branches: 1.36.4; 1.36.6; 1.36.8; 1.36.10;
merge ktrace-lwp.
 1.35 21-Apr-2004  matt branches: 1.35.12;
Add ${_MKTARGET_LINK} to the link step
 1.34 11-Dec-2003  matt Rework things to move common stuff into Makefile.inc.
 1.33 08-Dec-2003  matt Move common CFLAGS/AFLAGS to Makefile.inc.
For now, only suppy -mno-asm-pic when not using gcc3.
 1.32 26-Oct-2003  lukem Use ${HOST_SH} instead of `sh'.

If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
 1.31 19-Jan-2003  ragge branches: 1.31.2;
Bring back "START=start", otherwise booting via real VMB don't work.
 1.30 05-Nov-2002  thorpej Add -mno-asm-pic to CFLAGS and AFLAGS.
 1.29 05-Nov-2002  thorpej Set the entry point to 0 for the ELF case, too.
 1.28 09-Jun-2002  matt Add -ffreestanding and LIBC= to stand/boot/*/Makefile. Fix various
asm's to work with gcc-current.
 1.27 07-Apr-2002  matt branches: 1.27.2; 1.27.4;
Use ${PROG}.sym in CLEANFILES
 1.26 31-Mar-2002  matt Don't build boot.mop. Remove a redundant ${INSTALL_FILE}
 1.25 24-Feb-2002  matt Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.
 1.24 24-Feb-2002  matt Change the default entry for ELF.
 1.23 09-Feb-2002  lukem use ${INSTALL_FILE} as appropriate
 1.22 23-Dec-2001  matt Don't install boot.mop if ELF.
 1.21 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.20 02-May-2001  matt branches: 1.20.2; 1.20.8;
Keep around a version of boot with symbols.
 1.19 09-Nov-2000  matt branches: 1.19.2;
NOMAN needs to be *before* we include bsd.own.mk
 1.18 02-Nov-2000  matt Change the way we make machine-links so that only occurs when we are building
on VAX.
 1.17 01-Nov-2000  ragge Define NO_MID_CHECK, to allow booting of old VAX kernels with other (or
none) mid.
 1.16 23-Sep-2000  simonb Use ${COPY} instead of -c for ${INSTALL} commands.
 1.15 30-Aug-2000  jdolecek Switch to newvers_stand.sh-based boot block versioning. Add sensible 'version'
template, the boot block changes were picked from cvs annotates for Makefile
and boot.c.

Reviewed by Ragge.
 1.14 25-Aug-2000  matt Need <bsd.own.mk> for OBJECT_FMT.
 1.13 19-Jul-2000  matt Switch to loadfile instead of exec. Now we can load a.out or ELF kernels.
 1.12 19-Jul-2000  matt Add support for loading a 2nd stage boot in either a.out or ELF.
Add support for loading a 2nd stage boot directly to it's desired address
if possible.
cleanup use of u_int/size_t.
 1.11 03-Jul-2000  matt Make cross-compile friendly
 1.10 15-Jun-2000  ragge branches: 1.10.2;
Standalone device driver for DEBNx (ni) ethernet controllers.
 1.9 11-Jun-2000  matt Add local symlink so that machine & vax refer ../../include instead of the
system ones.
 1.8 22-May-2000  matt branches: 1.8.2;
The double / in the path has been bothering me for awhile.
 1.7 21-May-2000  ragge Standalone driver for the Digital Equipment Unibus Network Adapter (DEUNA).
This allows 11/750 owners to install from a single TU58 cassette.
(Are there still any 11/750 owners left out there? :-)
 1.6 20-May-2000  ragge WARNS=1. Unify the ra and tmscp driver.
 1.5 04-Mar-2000  ragge Install the boot programs in /usr/mdec also. From Todd Whitesel.
 1.4 23-May-1999  ragge branches: 1.4.2;
Use common routines to identify cpu type.
Set up a SCB to be able to handle clock interrupts in the boot program.
Now timer countdown should work on all types of vaxen.
 1.3 01-Apr-1999  ragge branches: 1.3.2; 1.3.4;
A bunch of small fixes to make boot work on most VAXen.
 1.2 27-Mar-1999  ragge #define was wrong. Some .c should be .s.
 1.1 06-Mar-1999  ragge New boot program for vax. Appearance similar to the i386 boot blocks.
 1.3.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.3.2.1 01-Mar-2000  he Apply patch (requested by toddpw):
Finish porting sysinst to vax, and build various bootable installers
in new directory distrib/vax/bootfs.
 1.4.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.4.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.8.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.10.2.1 27-Jul-2000  matt Makefile: Pullup revision 1.13
boot.c: Pullup revision 1.12
loadfile_machdep.h: Pullup revision 1.2
Add support for loading elf kernels
 1.19.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.20.8.6 11-Nov-2002  nathanw Catch up to -current
 1.20.8.5 20-Jun-2002  nathanw Catch up to -current.
 1.20.8.4 17-Apr-2002  nathanw Catch up to -current.
 1.20.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.20.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.20.8.1 02-May-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-01-08 00:28:29 +0000
 1.20.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.20.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.20.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.27.4.3 23-Mar-2003  jmc Pullup rev 1.31 (requested by jklos in ticket #1227)
Bring back START=start, otherwise booting via real VMB don't work.
 1.27.4.2 26-Jan-2003  jmc Pullup revisions 1.27-1.28 and 1.29-1.30 (requested by he in ticket #1072)
Add -mno-asm-pic to CFLAGS and AFLAGS, and add -ffreestanding and
empty LIBC setting to bootloader Makefiles.
 1.27.4.1 11-Dec-2002  he Pull up revision 1.29 (requested by thorpej in ticket #963):
Set the entry point to 0 for the ELF case as well.
 1.27.2.1 15-Jul-2002  gehenna catch up with -current.
 1.31.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.31.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.31.2.1 03-Aug-2004  skrll Sync with HEAD
 1.35.12.1 21-Jun-2006  yamt sync with head.
 1.36.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.36.8.1 13-Mar-2006  yamt sync with head.
 1.36.6.1 22-Apr-2006  simonb Sync with head.
 1.36.4.1 09-Sep-2006  rpaulo sync with head
 1.37.98.1 08-Feb-2011  bouyer Sync with HEAD
 1.37.96.1 06-Jun-2011  jruoho Sync with HEAD.
 1.37.90.1 05-Mar-2011  rmind sync with head
 1.38.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.40.4.1 28-Aug-2013  rmind sync with head
 1.40.2.2 03-Dec-2017  jdolecek update from HEAD
 1.40.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.41.2.1 10-Aug-2014  tls Rebase.
 1.42.4.2 28-Aug-2017  skrll Sync with HEAD
 1.42.4.1 19-Mar-2016  skrll Sync with HEAD
 1.44.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.44.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.45.12.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.46.38.1 02-Aug-2025  perseant Sync with HEAD
 1.29 22-May-2017  ragge Update copyright notice for Ludd (remove clause 3 & 4).
 1.28 18-Mar-2009  cegger branches: 1.28.22; 1.28.40;
Ansify function definitions w/o arguments. Generated with sed.
 1.27 12-Jan-2009  tsutsui branches: 1.27.2;
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.26 31-Mar-2008  he branches: 1.26.4; 1.26.12;
Convert from use of bcopy() to memcpy() so that this builds again.
 1.25 04-Mar-2007  christos branches: 1.25.40;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.24 08-Jun-2006  he branches: 1.24.12;
Get rid of lvalue casts by either using an extra temporary variable
or by using the appropriate casts in the first place.
 1.23 24-Dec-2005  perry branches: 1.23.4; 1.23.8; 1.23.14;
bare asm -> __asm
 1.22 11-Dec-2005  christos merge ktrace-lwp.
 1.21 08-Dec-2003  matt branches: 1.21.16;
Suppress a gcc3 type-punning warning.
 1.20 09-Jun-2002  matt branches: 1.20.6;
Add -ffreestanding and LIBC= to stand/boot/*/Makefile. Fix various
asm's to work with gcc-current.
 1.19 01-Jun-2002  ragge Add 11/780 and 8600 to list for who to create a RPB.
 1.18 31-May-2002  ragge Handle machine checks separate from other "stray" interrupts.
 1.17 24-May-2002  ragge Boot support for the VXT2000 X terminal, based on some info on the VAXLinux
mailing list.
 1.16 24-Feb-2002  matt branches: 1.16.8; 1.16.10;
Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.
 1.15 19-Jul-2000  matt branches: 1.15.4; 1.15.8;
Add support for loading a 2nd stage boot in either a.out or ELF.
Add support for loading a 2nd stage boot directly to it's desired address
if possible.
cleanup use of u_int/size_t.
 1.14 10-Jul-2000  ragge Forgot a debug printf.
 1.13 10-Jul-2000  ragge Add support for VAX 6000 + VAX 8000. Tweak console routines.
Create a fake RPB if either netbooted (on machine without RPB) or
loaded from console storage (without VMB intervention).
 1.12 04-Jun-2000  matt more cleanup. use __builtin_frame_address(0) instead of our funky
FRAMEOFFSET macro. define an interrupt call frame and use that directly
instead of some magic offsets. Make boot autoconf.o use the current
reality.
 1.11 20-May-2000  ragge branches: 1.11.2;
Adopt to the RPB changes. Complete change of how network devices are
handled. No more hacks to find bus addresses.
 1.10 08-May-2000  ragge Console support for VXT 2000, VAX 4000/105 and VAX 4000/500.
From Michael Kukat.
 1.9 24-Apr-2000  ragge Add 4000/90 to the countdown hack.
 1.8 24-Apr-2000  mhitch Fix bootblock countdown for 4000/VLC.
 1.7 22-Apr-2000  ragge Fix boot block countdown on 4000/60. Easy to add for other 4000 machines also.
 1.6 24-Jan-2000  matt More files that were changed.
 1.5 23-Aug-1999  ragge branches: 1.5.2;
Add support for 4000/90. Also handle interrupts more intelligent.
XXX - countdown doesn't work on 4000/90.
 1.4 20-Jun-1999  ragge Some 4000/200 fixes. From Michael Kukat.
 1.3 23-May-1999  ragge Use common routines to identify cpu type.
Set up a SCB to be able to handle clock interrupts in the boot program.
Now timer countdown should work on all types of vaxen.
 1.2 14-Apr-1999  ragge Machines using KA48 must have memory mapped in, and use the same
addresses for console as KA46. From Michael Kukat.
 1.1 06-Mar-1999  ragge branches: 1.1.2;
New boot program for vax. Appearance similar to the i386 boot blocks.
 1.1.2.1 15-Apr-1999  ragge branches: 1.1.2.1.2;
Pull up autoconf.c 1.2 and consio.c 1.3.
 1.1.2.1.2.2 01-Jul-1999  thorpej Sync w/ -current.
 1.1.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.5.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.11.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.15.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.15.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.15.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.15.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.16.10.1 02-Jun-2002  tv Pull up revision 1.19 (requested by ragge in ticket #125):
Add 11/780 and 8600 to list for who to create a RPB.
 1.16.8.2 15-Jul-2002  gehenna catch up with -current.
 1.16.8.1 30-May-2002  gehenna Catch up with -current.
 1.20.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.20.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.20.6.1 03-Aug-2004  skrll Sync with HEAD
 1.21.16.2 03-Sep-2007  yamt sync with head.
 1.21.16.1 21-Jun-2006  yamt sync with head.
 1.23.14.1 19-Jun-2006  chap Sync with head.
 1.23.8.1 26-Jun-2006  yamt sync with head.
 1.23.4.1 09-Sep-2006  rpaulo sync with head
 1.24.12.1 12-Mar-2007  rmind Sync with HEAD.
 1.25.40.2 17-Jan-2009  mjf Sync with HEAD.
 1.25.40.1 03-Apr-2008  mjf Sync with HEAD.
 1.26.12.2 28-Apr-2009  skrll Sync with HEAD.
 1.26.12.1 19-Jan-2009  skrll Sync with HEAD.
 1.26.4.1 04-May-2009  yamt sync with head.
 1.27.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.28.40.1 28-Aug-2017  skrll Sync with HEAD
 1.28.22.1 03-Dec-2017  jdolecek update from HEAD
 1.36 23-Oct-2024  rin vax: boot: Fix my typo in comment. No binary changes.
 1.35 30-Sep-2024  kalvisd vax/boot: loadpcs: Silence GCC12 -Warray-bounds for 0-th page accesss

as done for evbppc:
http://cvsweb.netbsd.org/cgi-bin/cvsweb.cgi/src/sys/arch/evbppc/wii/mainbus.c#rev1.4

(from rin@)
OK rin@
 1.34 11-Jun-2016  dholland branches: 1.34.54;
PR 51200 gets in libsa considered harmful: use kgets
 1.33 05-Jun-2015  martin Close the file descriptor used for loading before jumping to the kernel.
Pointed out by Felix Deichmann on port-vax.
 1.32 09-Nov-2013  christos branches: 1.32.4; 1.32.6;
remove unused
 1.31 22-Jan-2011  joerg branches: 1.31.4; 1.31.14; 1.31.18;
Drop bootprog_maker (formerly enabled by -M) and bootprog_date (formerly
disabled by -D) from the output of newvers_stand.sh. Change -D to the
inverted logic, so that it adds the date to bootprog_rev in ().

Change all platforms accordingly. -D is added if MKREPRO is not yes and
wasn't present before. Platforms that didn't use -D don't depend on
MKREPRO now either.
 1.30 26-Oct-2009  cegger branches: 1.30.4; 1.30.6; 1.30.8;
kill extra whitespaces
reviewed by tsutsui@
 1.29 18-Mar-2009  cegger bcopy -> memcpy
 1.28 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.27 12-Jan-2009  tsutsui branches: 1.27.2;
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.26 24-Dec-2005  perry branches: 1.26.74; 1.26.78; 1.26.86;
bare asm -> __asm
 1.25 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.24 11-Dec-2005  christos merge ktrace-lwp.
 1.23 27-Jun-2005  junyoung branches: 1.23.2;
Use the form of #include <...> rather than #include "..." for headers of
which paths don't start from the current directory.
 1.22 27-Jun-2005  junyoung Remove trailing spaces.
 1.21 01-Nov-2003  jdolecek rename local index() to strchr()
 1.20 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.19 09-Jun-2002  matt branches: 1.19.6;
Add -ffreestanding and LIBC= to stand/boot/*/Makefile. Fix various
asm's to work with gcc-current.
 1.18 31-May-2002  ragge Handle machine checks separate from other "stray" interrupts.
 1.17 02-May-2001  matt branches: 1.17.2; 1.17.8; 1.17.16;
Pass the numbers of syms down as well.
 1.16 02-May-2001  matt Use loadfile with boot commands, not exec.
 1.15 01-Nov-2000  ragge branches: 1.15.2;
Declare revision correctly.
 1.14 24-Sep-2000  jdolecek add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.
 1.13 30-Aug-2000  jdolecek Switch to newvers_stand.sh-based boot block versioning. Add sensible 'version'
template, the boot block changes were picked from cvs annotates for Makefile
and boot.c.

Reviewed by Ragge.
 1.12 19-Jul-2000  matt Switch to loadfile instead of exec. Now we can load a.out or ELF kernels.
 1.11 13-Jul-2000  matt Include libkern.h
 1.10 10-Jul-2000  ragge Add support for VAX 6000 + VAX 8000. Tweak console routines.
Create a fake RPB if either netbooted (on machine without RPB) or
loaded from console storage (without VMB intervention).
 1.9 26-May-2000  ragge branches: 1.9.4;
Avoid hanging if boot fails on some machines.
 1.8 25-May-2000  matt Modify the file list for kernel to supress errors/text for certain ones.
 1.7 23-May-2000  matt Allow for boot.vax and netbsd.vax when booting. this allows a multi
architecture CD to be made which includes VAX support.
 1.6 20-May-2000  ragge Adopt to the RPB changes. Complete change of how network devices are
handled. No more hacks to find bus addresses.
 1.5 22-Apr-2000  ragge Fix boot block countdown on 4000/60. Easy to add for other 4000 machines also.
 1.4 23-Oct-1999  ragge Use romread() routines if we are booted from SCSI disks.
 1.3 30-Jun-1999  ragge branches: 1.3.2; 1.3.4; 1.3.6;
Clean up the boot command selection a bit. Add a command "halt".
 1.2 01-Apr-1999  ragge branches: 1.2.2; 1.2.4;
A bunch of small fixes to make boot work on most VAXen.
 1.1 06-Mar-1999  ragge New boot program for vax. Appearance similar to the i386 boot blocks.
 1.2.4.1 01-Jul-1999  thorpej Sync w/ -current.
 1.2.2.1 01-Mar-2000  he Apply patch (requested by toddpw):
Finish porting sysinst to vax, and build various bootable installers
in new directory distrib/vax/bootfs.
 1.3.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.3.4.1 15-Nov-1999  fvdl Sync with -current
 1.3.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.3.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.9.4.1 27-Jul-2000  matt Makefile: Pullup revision 1.13
boot.c: Pullup revision 1.12
loadfile_machdep.h: Pullup revision 1.2
Add support for loading elf kernels
 1.15.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.17.16.1 15-Jul-2002  gehenna catch up with -current.
 1.17.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.17.8.1 02-May-2001  nathanw file boot.c was added on branch nathanw_sa on 2002-06-20 03:42:06 +0000
 1.17.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.19.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.19.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.19.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.19.6.1 03-Aug-2004  skrll Sync with HEAD
 1.23.2.1 21-Jun-2006  yamt sync with head.
 1.26.86.2 28-Apr-2009  skrll Sync with HEAD.
 1.26.86.1 19-Jan-2009  skrll Sync with HEAD.
 1.26.78.2 11-Mar-2010  yamt sync with head
 1.26.78.1 04-May-2009  yamt sync with head.
 1.26.74.1 17-Jan-2009  mjf Sync with HEAD.
 1.27.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.30.8.1 08-Feb-2011  bouyer Sync with HEAD
 1.30.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.30.4.1 05-Mar-2011  rmind sync with head
 1.31.18.1 18-May-2014  rmind sync with head
 1.31.14.2 03-Dec-2017  jdolecek update from HEAD
 1.31.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.31.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.32.6.2 09-Jul-2016  skrll Sync with HEAD
 1.32.6.1 06-Jun-2015  skrll Sync with HEAD
 1.32.4.1 05-Jul-2015  snj Pull up following revision(s) (requested by martin in ticket #852):
sys/arch/vax/boot/boot/boot.c: revision 1.33
Close the file descriptor used for loading before jumping to the kernel.
Pointed out by Felix Deichmann on port-vax.
 1.34.54.1 02-Aug-2025  perseant Sync with HEAD
 1.19 14-Jul-2025  hans vax/boot: fix detection of CMD CQD-22x MSCP controllers

Certain models of CMD MSCP controllers fail to be detected by uda(4) if
they have been booted from. This failure mode has been introduced in
revision 1.11 of uba_mainbus.c, when scanning for Qbus/Unibus memories
was added. They are deteced fine when NetBSD is booted from any other
device such as over the network.

When NetBSD is booted from a MSCP controller, the boot loader sets up
the Qbus map to provide the controller with a small command/response
ring in memory to be used for I/O. Once the kernel is loaded and uba(4)
is attaching, the Qbus map is cleared while scanning for memories. It
appears that sudden loss of access to the command/response ring causes
the firmware of these CMD controllers to drop dead.

As a result, these controllers don't react in a reasonable time (100ms
by the spec) when their IP register is written to re-initialze the
controller. Even though uda(4)'s udamatch() waits up to 10s for a sign
of life from the controller, that's usually not enough for it to wake
up and it is assumed to be absent. Which, of course, causes the kernel
to fail booting as the boot device can't be found.

This needs to be addressed both in the kernel and the bootloader.

To fix this properly, the standalone ra.c driver in the boot loader
should provide a close() entry point which clears the IP register to
issue a controller reset. Thus when the kernel is loaded, the firmware
of the MSCP controller is again in reset state and can't get confused
anymore by the initialization of the Qbus map in uba(4).
 1.18 01-May-2018  ragge branches: 1.18.38;
Enable ffsv2 in boot.
 1.17 22-May-2017  ragge branches: 1.17.8;
Update copyright notice for Ludd (remove clause 3 & 4).
 1.16 28-Jun-2013  matt branches: 1.16.10;
ufs -> ffsv1 (ffsv2 is commentout due to size limitations)
 1.15 18-Mar-2009  cegger branches: 1.15.12; 1.15.22;
bzero -> memset
 1.14 11-Dec-2005  christos branches: 1.14.78; 1.14.86; 1.14.92;
merge ktrace-lwp.
 1.13 27-Jun-2005  junyoung Use the form of #include <...> rather than #include "..." for headers of
which paths don't start from the current directory.
 1.12 23-Jun-2005  junyoung Use FS_OPS() macro.
 1.11 06-Jan-2004  matt Add proper boot/autoconf support for SDN devices. Take from Hugh Graham;
see http://mail-index.netbsd.org/port-vax/2002/06/28/0005.html
 1.10 15-Jun-2000  ragge branches: 1.10.26;
Standalone device driver for DEBNx (ni) ethernet controllers.
 1.9 26-May-2000  ragge branches: 1.9.2;
Fake success when trying to use the strategy() routine on a network device.
This avoids clobbering errno and bad error messages.
 1.8 21-May-2000  ragge Standalone driver for the Digital Equipment Unibus Network Adapter (DEUNA).
This allows 11/750 owners to install from a single TU58 cassette.
(Are there still any 11/750 owners left out there? :-)
 1.7 20-May-2000  ragge Adopt to the RPB changes. Complete change of how network devices are
handled. No more hacks to find bus addresses.
 1.6 24-Apr-2000  matt Add cd9660 support to the secondary boot blocks.
 1.5 22-Apr-2000  ragge Add device switch entry for RL disks. Only uses rom to boot so far.
 1.4 16-Apr-2000  matt move ustarfs to end so that '@" can be avoided. from mhitch.
 1.3 23-Oct-1999  ragge Use romread() routines if we are booted from SCSI disks.
 1.2 30-Jun-1999  ragge branches: 1.2.2; 1.2.4; 1.2.6;
Support loading the kernel from ustarfs.
 1.1 06-Mar-1999  ragge branches: 1.1.2; 1.1.4;
New boot program for vax. Appearance similar to the i386 boot blocks.
 1.1.4.1 01-Jul-1999  thorpej Sync w/ -current.
 1.1.2.1 01-Mar-2000  he Apply patch (requested by toddpw):
Finish porting sysinst to vax, and build various bootable installers
in new directory distrib/vax/bootfs.
 1.2.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.4.1 15-Nov-1999  fvdl Sync with -current
 1.2.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.9.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.10.26.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.26.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.26.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.26.1 03-Aug-2004  skrll Sync with HEAD
 1.14.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.14.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.14.78.1 04-May-2009  yamt sync with head.
 1.15.22.2 03-Dec-2017  jdolecek update from HEAD
 1.15.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.12.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.16.10.1 28-Aug-2017  skrll Sync with HEAD
 1.17.8.1 02-May-2018  pgoyette Synch with HEAD
 1.18.38.1 02-Aug-2025  perseant Sync with HEAD
 1.17 22-May-2017  ragge Update copyright notice for Ludd (remove clause 3 & 4).
 1.16 07-Jul-2016  msaitoh KNF. Remove extra spaces. No functional change.
 1.15 14-Mar-2009  dsl branches: 1.15.22; 1.15.40;
Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.14 01-Jul-2006  mrg branches: 1.14.62; 1.14.70; 1.14.76;
fix pointer signedness and build with GCC4.
 1.13 24-May-2002  ragge branches: 1.13.22; 1.13.36; 1.13.40; 1.13.48;
Boot support for the VXT2000 X terminal, based on some info on the VAXLinux
mailing list.
 1.12 04-May-2001  ragge branches: 1.12.2; 1.12.8; 1.12.16;
Remove forgotten VAX_BTYP_690. From Michael Kukat.
 1.11 19-Jul-2000  matt branches: 1.11.2;
Add support for loading a 2nd stage boot in either a.out or ELF.
Add support for loading a 2nd stage boot directly to it's desired address
if possible.
cleanup use of u_int/size_t.
 1.10 10-Jul-2000  ragge Add support for VAX 6000 + VAX 8000. Tweak console routines.
Create a fake RPB if either netbooted (on machine without RPB) or
loaded from console storage (without VMB intervention).
 1.9 20-May-2000  ragge Adopt to the RPB changes. Complete change of how network devices are
handled. No more hacks to find bus addresses.
 1.8 09-May-2000  ragge Get boot device CSR from RPB instead of trying to guess it.
 1.7 08-May-2000  ragge Console support for VXT 2000, VAX 4000/105 and VAX 4000/500.
From Michael Kukat.
 1.6 23-Aug-1999  ragge branches: 1.6.2;
Add support for 4000/90. Also handle interrupts more intelligent.
XXX - countdown doesn't work on 4000/90.
 1.5 20-Jun-1999  ragge Some 4000/200 fixes. From Michael Kukat.
 1.4 23-May-1999  ragge Use common routines to identify cpu type.
Set up a SCB to be able to handle clock interrupts in the boot program.
Now timer countdown should work on all types of vaxen.
 1.3 14-Apr-1999  ragge Machines using KA48 must have memory mapped in, and use the same
addresses for console as KA46. From Michael Kukat.
 1.2 27-Mar-1999  ragge branches: 1.2.2;
#define was wrong. Some .c should be .s.
 1.1 06-Mar-1999  ragge New boot program for vax. Appearance similar to the i386 boot blocks.
 1.2.2.1 15-Apr-1999  ragge branches: 1.2.2.1.2;
Pull up autoconf.c 1.2 and consio.c 1.3.
 1.2.2.1.2.2 01-Jul-1999  thorpej Sync w/ -current.
 1.2.2.1.2.1 21-Jun-1999  thorpej Sync w/ -current.
 1.6.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.11.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.12.16.1 30-May-2002  gehenna Catch up with -current.
 1.12.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.12.8.1 04-May-2001  nathanw file consio.c was added on branch nathanw_sa on 2002-06-20 03:42:06 +0000
 1.12.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.13.48.1 13-Jul-2006  gdamore Merge from HEAD.
 1.13.40.1 11-Aug-2006  yamt sync with head
 1.13.36.1 09-Sep-2006  rpaulo sync with head
 1.13.22.1 30-Dec-2006  yamt sync with head.
 1.14.76.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.14.70.1 28-Apr-2009  skrll Sync with HEAD.
 1.14.62.1 04-May-2009  yamt sync with head.
 1.15.40.2 28-Aug-2017  skrll Sync with HEAD
 1.15.40.1 09-Jul-2016  skrll Sync with HEAD
 1.15.22.1 03-Dec-2017  jdolecek update from HEAD
 1.2 22-May-2017  ragge Update copyright notice for Ludd (remove clause 3 & 4).
 1.1 24-Feb-2002  matt branches: 1.1.2; 1.1.8; 1.1.170; 1.1.190;
Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.
 1.1.190.1 28-Aug-2017  skrll Sync with HEAD
 1.1.170.1 03-Dec-2017  jdolecek update from HEAD
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 24-Feb-2002  jdolecek file consio2.S was added on branch kqueue on 2002-03-16 16:00:11 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 24-Feb-2002  nathanw file consio2.S was added on branch nathanw_sa on 2002-02-28 04:12:26 +0000
 1.2 24-Feb-2002  matt Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.
 1.1 19-Jul-2000  matt branches: 1.1.2; 1.1.6; 1.1.10;
Put the assembly consio routines in a separate file so it can deal with
a.out/ELF differences.
 1.1.10.1 28-Feb-2002  nathanw Catch up to -current.
 1.1.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.2.2 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.1.2.1 19-Jul-2000  bouyer file consio2.s was added on branch thorpej_scsipi on 2000-11-20 20:32:36 +0000
 1.9 22-May-2017  ragge Update copyright notice for Ludd (remove clause 3 & 4).
 1.8 18-Mar-2009  cegger branches: 1.8.22; 1.8.40;
Ansify function definitions w/o arguments. Generated with sed.
 1.7 17-Mar-2009  dsl Add some 'int' into function definitions where the K&R one didn't
specify a type.
 1.6 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.5 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.4 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.3 20-May-2000  ragge branches: 1.3.134; 1.3.142; 1.3.148;
Change all devices to use the RPB info when autobooting, this allows for
booting from unsupported devices also. As a side effect; it fixes PR#9202.
 1.2 16-Mar-2000  darrenr __P(()) -> __P((void))
 1.1 06-Mar-1999  ragge branches: 1.1.8;
New boot program for vax. Appearance similar to the i386 boot blocks.
 1.1.8.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.3.148.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.142.1 28-Apr-2009  skrll Sync with HEAD.
 1.3.134.1 04-May-2009  yamt sync with head.
 1.8.40.1 28-Aug-2017  skrll Sync with HEAD
 1.8.22.1 03-Dec-2017  jdolecek update from HEAD
 1.5 22-May-2017  ragge Update copyright notice for Ludd (remove clause 3 & 4).
 1.4 01-Jul-2006  mrg branches: 1.4.106; 1.4.126;
fix pointer signedness and build with GCC4.
 1.3 26-Jul-2001  wiz branches: 1.3.6; 1.3.38; 1.3.52; 1.3.56; 1.3.64;
Various typos in comments (neccessary, sceme, choise, ...).
 1.2 20-May-2000  ragge branches: 1.2.8;
Adopt to the RPB changes. Complete change of how network devices are
handled. No more hacks to find bus addresses.
 1.1 06-Mar-1999  ragge branches: 1.1.8;
New boot program for vax. Appearance similar to the i386 boot blocks.
 1.1.8.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.2.8.1 03-Aug-2001  lukem update to -current
 1.3.64.1 13-Jul-2006  gdamore Merge from HEAD.
 1.3.56.1 11-Aug-2006  yamt sync with head
 1.3.52.1 09-Sep-2006  rpaulo sync with head
 1.3.38.1 30-Dec-2006  yamt sync with head.
 1.3.6.2 26-Jul-2001  wiz Various typos in comments (neccessary, sceme, choise, ...).
 1.3.6.1 26-Jul-2001  wiz file data.h was added on branch nathanw_sa on 2001-07-26 15:05:10 +0000
 1.4.126.1 28-Aug-2017  skrll Sync with HEAD
 1.4.106.1 03-Dec-2017  jdolecek update from HEAD
 1.20 21-Mar-2018  ragge Fix bug causing autoboot on 750/780 not to work. Cleanup.
 1.19 19-Mar-2018  ragge Use a common routine ubmap() that setup the map registers as needed,
not expecting everything to be below 4M. This solves the problem
that large kernels cannot be loaded reported on port-vax.
 1.18 22-May-2017  ragge branches: 1.18.2; 1.18.8;
Update copyright notice for Ludd (remove clause 3 & 4).
 1.17 10-Aug-2014  martin branches: 1.17.4;
Remove atoi() prototype
 1.16 14-Mar-2009  dsl branches: 1.16.22;
ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.15 16-Oct-2008  hans branches: 1.15.2; 1.15.8;
Set nexaddr on qbus vaxen to enable remapping of buffers when booting
from MSCP devices. Fixes MSCP boot problem introduced by moving boot up
to allow for bigger kernels. OK by matt.
 1.14 11-Dec-2005  christos branches: 1.14.74; 1.14.78; 1.14.84;
merge ktrace-lwp.
 1.13 27-Jun-2005  junyoung Use the form of #include <...> rather than #include "..." for headers of
which paths don't start from the current directory.
 1.12 27-Jun-2005  junyoung Remove trailing spaces.
 1.11 01-Nov-2003  jdolecek rename local index() to strchr()
 1.10 24-May-2002  ragge branches: 1.10.6;
Boot support for the VXT2000 X terminal, based on some info on the VAXLinux
mailing list.
 1.9 01-May-2001  ragge branches: 1.9.2; 1.9.8; 1.9.16;
Do not (try to) remap the qbus on MV1.
 1.8 20-Mar-2001  matt Add a diagnostic when we encounter an unknown boot device type.
 1.7 13-Jul-2000  matt branches: 1.7.2;
Include libkern.h
 1.6 10-Jul-2000  ragge Add support for VAX 6000 + VAX 8000. Tweak console routines.
Create a fake RPB if either netbooted (on machine without RPB) or
loaded from console storage (without VMB intervention).
 1.5 11-Jun-2000  ragge Fix booting from BI-based disks.
 1.4 21-May-2000  ragge branches: 1.4.2;
Set correct adapter addresses if none is given.
 1.3 20-May-2000  ragge Adopt to the RPB changes. Complete change of how network devices are
handled. No more hacks to find bus addresses.
 1.2 30-Jun-1999  ragge branches: 1.2.2;
Support loading the kernel from ustarfs.
 1.1 06-Mar-1999  ragge branches: 1.1.4;
New boot program for vax. Appearance similar to the i386 boot blocks.
 1.1.4.1 01-Jul-1999  thorpej Sync w/ -current.
 1.2.2.2 27-Mar-2001  bouyer Sync with HEAD.
 1.2.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.4.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.7.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.7.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.9.16.1 30-May-2002  gehenna Catch up with -current.
 1.9.8.2 20-Jun-2002  nathanw Catch up to -current.
 1.9.8.1 01-May-2001  nathanw file devopen.c was added on branch nathanw_sa on 2002-06-20 03:42:07 +0000
 1.9.2.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.10.6.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.6.1 03-Aug-2004  skrll Sync with HEAD
 1.14.84.1 19-Oct-2008  haad Sync with HEAD.
 1.14.78.1 04-May-2009  yamt sync with head.
 1.14.74.1 17-Jan-2009  mjf Sync with HEAD.
 1.15.8.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.15.2.1 28-Apr-2009  skrll Sync with HEAD.
 1.16.22.2 03-Dec-2017  jdolecek update from HEAD
 1.16.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.4.1 28-Aug-2017  skrll Sync with HEAD
 1.18.8.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.18.2.1 24-Mar-2018  snj Pull up following revision(s) (requested by ragge in ticket #655):
sys/arch/vax/boot/boot/devopen.c: 1.19-1.20
sys/arch/vax/boot/boot/hp.c: 1.11
sys/arch/vax/boot/boot/if_de.c: 1.10
sys/arch/vax/boot/boot/if_qe.c: 1.10
sys/arch/vax/boot/boot/ra.c: 1.21-1.22
sys/arch/vax/boot/boot/vaxstand.h: 1.10
Use a common routine ubmap() that setup the map registers as needed,
not expecting everything to be below 4M. This solves the problem
that large kernels cannot be loaded reported on port-vax.
--
Change the driver to map the data structures onto the qbus.
--
Fix bug causing autoboot on 750/780 not to work. Cleanup.
 1.11 19-Mar-2018  ragge Use a common routine ubmap() that setup the map registers as needed,
not expecting everything to be below 4M. This solves the problem
that large kernels cannot be loaded reported on port-vax.
 1.10 22-May-2017  ragge branches: 1.10.2; 1.10.8;
Update copyright notice for Ludd (remove clause 3 & 4).
 1.9 18-Mar-2009  cegger branches: 1.9.22; 1.9.40;
bzero -> memset
 1.8 11-Dec-2005  christos branches: 1.8.78; 1.8.86; 1.8.92;
merge ktrace-lwp.
 1.7 27-Jun-2005  junyoung Use the form of #include <...> rather than #include "..." for headers of
which paths don't start from the current directory.
 1.6 27-Jun-2005  junyoung Remove trailing spaces.
 1.5 19-Jul-2000  matt branches: 1.5.24;
Add support for loading a 2nd stage boot in either a.out or ELF.
Add support for loading a 2nd stage boot directly to it's desired address
if possible.
cleanup use of u_int/size_t.
 1.4 04-Jun-2000  ragge Adopt to latest mba/hp changes.
 1.3 20-May-2000  ragge branches: 1.3.2;
Change all devices to use the RPB info when autobooting, this allows for
booting from unsupported devices also. As a side effect; it fixes PR#9202.
 1.2 01-Apr-1999  ragge branches: 1.2.8;
A bunch of small fixes to make boot work on most VAXen.
 1.1 06-Mar-1999  ragge New boot program for vax. Appearance similar to the i386 boot blocks.
 1.2.8.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.3.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.5.24.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.8.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.8.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.8.78.1 04-May-2009  yamt sync with head.
 1.9.40.1 28-Aug-2017  skrll Sync with HEAD
 1.9.22.1 03-Dec-2017  jdolecek update from HEAD
 1.10.8.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.10.2.1 24-Mar-2018  snj Pull up following revision(s) (requested by ragge in ticket #655):
sys/arch/vax/boot/boot/devopen.c: 1.19-1.20
sys/arch/vax/boot/boot/hp.c: 1.11
sys/arch/vax/boot/boot/if_de.c: 1.10
sys/arch/vax/boot/boot/if_qe.c: 1.10
sys/arch/vax/boot/boot/ra.c: 1.21-1.22
sys/arch/vax/boot/boot/vaxstand.h: 1.10
Use a common routine ubmap() that setup the map registers as needed,
not expecting everything to be below 4M. This solves the problem
that large kernels cannot be loaded reported on port-vax.
--
Change the driver to map the data structures onto the qbus.
--
Fix bug causing autoboot on 750/780 not to work. Cleanup.
 1.10 19-Mar-2018  ragge Use a common routine ubmap() that setup the map registers as needed,
not expecting everything to be below 4M. This solves the problem
that large kernels cannot be loaded reported on port-vax.
 1.9 22-May-2017  ragge branches: 1.9.2; 1.9.8;
Update copyright notice for Ludd (remove clause 3 & 4).
 1.8 26-Oct-2009  cegger branches: 1.8.22; 1.8.40;
kill extra whitespaces
reviewed by tsutsui@
 1.7 18-Mar-2009  cegger bcopy -> memcpy
 1.6 18-Mar-2009  cegger bzero -> memset
 1.5 12-Jan-2009  tsutsui branches: 1.5.2;
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.4 01-Jul-2006  mrg branches: 1.4.58; 1.4.62; 1.4.70;
fix pointer signedness and build with GCC4.
 1.3 08-Jun-2006  he branches: 1.3.2;
Get rid of lvalue casts by either using an extra temporary variable
or by using the appropriate casts in the first place.
 1.2 24-May-2002  ragge branches: 1.2.22; 1.2.36; 1.2.40; 1.2.46;
%d -> %ld in some debug messages, after the ELF switch.
 1.1 21-May-2000  ragge branches: 1.1.6; 1.1.10; 1.1.14; 1.1.22;
Standalone driver for the Digital Equipment Unibus Network Adapter (DEUNA).
This allows 11/750 owners to install from a single TU58 cassette.
(Are there still any 11/750 owners left out there? :-)
 1.1.22.1 30-May-2002  gehenna Catch up with -current.
 1.1.14.1 20-Jun-2002  nathanw Catch up to -current.
 1.1.10.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.2 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.1.6.1 21-May-2000  bouyer file if_de.c was added on branch thorpej_scsipi on 2000-11-20 20:32:37 +0000
 1.2.46.1 19-Jun-2006  chap Sync with head.
 1.2.40.2 11-Aug-2006  yamt sync with head
 1.2.40.1 26-Jun-2006  yamt sync with head.
 1.2.36.1 09-Sep-2006  rpaulo sync with head
 1.2.22.2 30-Dec-2006  yamt sync with head.
 1.2.22.1 21-Jun-2006  yamt sync with head.
 1.3.2.1 13-Jul-2006  gdamore Merge from HEAD.
 1.4.70.2 28-Apr-2009  skrll Sync with HEAD.
 1.4.70.1 19-Jan-2009  skrll Sync with HEAD.
 1.4.62.2 11-Mar-2010  yamt sync with head
 1.4.62.1 04-May-2009  yamt sync with head.
 1.4.58.1 17-Jan-2009  mjf Sync with HEAD.
 1.5.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.8.40.1 28-Aug-2017  skrll Sync with HEAD
 1.8.22.1 03-Dec-2017  jdolecek update from HEAD
 1.9.8.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.9.2.1 24-Mar-2018  snj Pull up following revision(s) (requested by ragge in ticket #655):
sys/arch/vax/boot/boot/devopen.c: 1.19-1.20
sys/arch/vax/boot/boot/hp.c: 1.11
sys/arch/vax/boot/boot/if_de.c: 1.10
sys/arch/vax/boot/boot/if_qe.c: 1.10
sys/arch/vax/boot/boot/ra.c: 1.21-1.22
sys/arch/vax/boot/boot/vaxstand.h: 1.10
Use a common routine ubmap() that setup the map registers as needed,
not expecting everything to be below 4M. This solves the problem
that large kernels cannot be loaded reported on port-vax.
--
Change the driver to map the data structures onto the qbus.
--
Fix bug causing autoboot on 750/780 not to work. Cleanup.
 1.13 22-May-2017  ragge Update copyright notice for Ludd (remove clause 3 & 4).
 1.12 12-Jan-2009  tsutsui branches: 1.12.24; 1.12.42;
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.11 31-Mar-2008  he branches: 1.11.4; 1.11.12;
Convert from use of bcopy() to memcpy() so that this builds again.
 1.10 11-Jun-2006  he branches: 1.10.60;
Correct mistakes I made when getting rid of lvalue casts.
 1.9 08-Jun-2006  he Get rid of lvalue casts by either using an extra temporary variable
or by using the appropriate casts in the first place.
 1.8 11-Dec-2005  christos branches: 1.8.4; 1.8.8; 1.8.14;
merge ktrace-lwp.
 1.7 10-Nov-2003  wiz branches: 1.7.16;
Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
 1.6 20-May-2000  ragge branches: 1.6.28;
Change all devices to use the RPB info when autobooting, this allows for
booting from unsupported devices also. As a side effect; it fixes PR#9202.
 1.5 09-May-2000  ragge Get boot device CSR from RPB instead of trying to guess it.
 1.4 14-Aug-1999  ragge branches: 1.4.2;
Add boot support for the VAX 3300/3400 LANCE chip.
 1.3 01-Apr-1999  ragge A bunch of small fixes to make boot work on most VAXen.
 1.2 25-Mar-1999  thorpej Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
ourselves.
 1.1 06-Mar-1999  ragge New boot program for vax. Appearance similar to the i386 boot blocks.
 1.4.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.6.28.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.28.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.28.1 03-Aug-2004  skrll Sync with HEAD
 1.7.16.1 21-Jun-2006  yamt sync with head.
 1.8.14.1 19-Jun-2006  chap Sync with head.
 1.8.8.1 26-Jun-2006  yamt sync with head.
 1.8.4.1 09-Sep-2006  rpaulo sync with head
 1.10.60.2 17-Jan-2009  mjf Sync with HEAD.
 1.10.60.1 03-Apr-2008  mjf Sync with HEAD.
 1.11.12.1 19-Jan-2009  skrll Sync with HEAD.
 1.11.4.1 04-May-2009  yamt sync with head.
 1.12.42.1 28-Aug-2017  skrll Sync with HEAD
 1.12.24.1 03-Dec-2017  jdolecek update from HEAD
 1.11 22-May-2017  ragge Update copyright notice for Ludd (remove clause 3 & 4).
 1.10 09-Nov-2013  christos branches: 1.10.6;
fix unused variable warnings
 1.9 03-Jul-2011  mrg branches: 1.9.2; 1.9.12; 1.9.16;
avoid some multi-level pointer cast issues.
 1.8 26-Oct-2009  cegger kill extra whitespaces
reviewed by tsutsui@
 1.7 18-Mar-2009  cegger bcopy -> memcpy
 1.6 18-Mar-2009  cegger bzero -> memset
 1.5 12-Jan-2009  tsutsui branches: 1.5.2;
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.4 04-Mar-2007  christos branches: 1.4.40; 1.4.44; 1.4.52;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.3 01-Jul-2006  mrg branches: 1.3.10;
fix pointer signedness and build with GCC4.
 1.2 10-Jul-2000  ragge branches: 1.2.2; 1.2.42; 1.2.56; 1.2.60; 1.2.68;
NODESIZE -> BI_NODESIZE.
 1.1 15-Jun-2000  ragge branches: 1.1.4;
Standalone device driver for DEBNx (ni) ethernet controllers.
 1.1.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.4.1 15-Jun-2000  minoura file if_ni.c was added on branch minoura-xpg4dl on 2000-06-22 17:04:56 +0000
 1.2.68.1 13-Jul-2006  gdamore Merge from HEAD.
 1.2.60.1 11-Aug-2006  yamt sync with head
 1.2.56.1 09-Sep-2006  rpaulo sync with head
 1.2.42.2 03-Sep-2007  yamt sync with head.
 1.2.42.1 30-Dec-2006  yamt sync with head.
 1.2.2.2 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.2.2.1 10-Jul-2000  bouyer file if_ni.c was added on branch thorpej_scsipi on 2000-11-20 20:32:37 +0000
 1.3.10.1 12-Mar-2007  rmind Sync with HEAD.
 1.4.52.2 28-Apr-2009  skrll Sync with HEAD.
 1.4.52.1 19-Jan-2009  skrll Sync with HEAD.
 1.4.44.2 11-Mar-2010  yamt sync with head
 1.4.44.1 04-May-2009  yamt sync with head.
 1.4.40.1 17-Jan-2009  mjf Sync with HEAD.
 1.5.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.9.16.1 18-May-2014  rmind sync with head
 1.9.12.2 03-Dec-2017  jdolecek update from HEAD
 1.9.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.10.6.1 28-Aug-2017  skrll Sync with HEAD
 1.10 20-Mar-2018  ragge Change the driver to map the data structures onto the qbus.
 1.9 26-Oct-2009  cegger branches: 1.9.56; 1.9.62;
kill extra whitespaces
reviewed by tsutsui@
 1.8 18-Mar-2009  cegger bcopy -> memcpy
 1.7 18-Mar-2009  cegger bzero -> memset
 1.6 12-Jan-2009  tsutsui branches: 1.6.2;
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.5 04-Mar-2007  christos branches: 1.5.40; 1.5.44; 1.5.52;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.4 01-Jul-2006  mrg branches: 1.4.10;
fix pointer signedness and build with GCC4.
 1.3 20-May-2000  ragge branches: 1.3.44; 1.3.58; 1.3.62; 1.3.70;
Change all devices to use the RPB info when autobooting, this allows for
booting from unsupported devices also. As a side effect; it fixes PR#9202.
 1.2 30-Jun-1999  ragge branches: 1.2.2;
Search for include files in new locations.
 1.1 06-Mar-1999  ragge branches: 1.1.4;
New boot program for vax. Appearance similar to the i386 boot blocks.
 1.1.4.1 01-Jul-1999  thorpej Sync w/ -current.
 1.2.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.3.70.1 13-Jul-2006  gdamore Merge from HEAD.
 1.3.62.1 11-Aug-2006  yamt sync with head
 1.3.58.1 09-Sep-2006  rpaulo sync with head
 1.3.44.2 03-Sep-2007  yamt sync with head.
 1.3.44.1 30-Dec-2006  yamt sync with head.
 1.4.10.1 12-Mar-2007  rmind Sync with HEAD.
 1.5.52.2 28-Apr-2009  skrll Sync with HEAD.
 1.5.52.1 19-Jan-2009  skrll Sync with HEAD.
 1.5.44.2 11-Mar-2010  yamt sync with head
 1.5.44.1 04-May-2009  yamt sync with head.
 1.5.40.1 17-Jan-2009  mjf Sync with HEAD.
 1.6.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.9.62.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.9.56.1 24-Mar-2018  snj Pull up following revision(s) (requested by ragge in ticket #655):
sys/arch/vax/boot/boot/devopen.c: 1.19-1.20
sys/arch/vax/boot/boot/hp.c: 1.11
sys/arch/vax/boot/boot/if_de.c: 1.10
sys/arch/vax/boot/boot/if_qe.c: 1.10
sys/arch/vax/boot/boot/ra.c: 1.21-1.22
sys/arch/vax/boot/boot/vaxstand.h: 1.10
Use a common routine ubmap() that setup the map registers as needed,
not expecting everything to be below 4M. This solves the problem
that large kernels cannot be loaded reported on port-vax.
--
Change the driver to map the data structures onto the qbus.
--
Fix bug causing autoboot on 750/780 not to work. Cleanup.
 1.17 26-Oct-2009  cegger kill extra whitespaces
reviewed by tsutsui@
 1.16 18-Mar-2009  cegger bcopy -> memcpy
 1.15 18-Mar-2009  cegger bzero -> memset
 1.14 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.13 12-Jan-2009  tsutsui branches: 1.13.2;
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.12 27-May-2002  ragge branches: 1.12.108; 1.12.112; 1.12.120;
Use correct ethernet address address on VXT2000.
 1.11 24-May-2002  ragge Boot support for the VXT2000 X terminal, based on some info on the VAXLinux
mailing list.
 1.10 20-May-2000  ragge branches: 1.10.8; 1.10.12; 1.10.20;
Change all devices to use the RPB info when autobooting, this allows for
booting from unsupported devices also. As a side effect; it fixes PR#9202.
 1.9 18-May-2000  matt fix comments.
 1.8 09-May-2000  ragge Get boot device CSR from RPB instead of trying to guess it.
 1.7 08-May-2000  ragge Console support for VXT 2000, VAX 4000/105 and VAX 4000/500.
From Michael Kukat.
 1.6 28-Apr-2000  matt Dump NRCV to 8 from 5. Note that a 8K NFS reply takes 6 full size
Ethernet packets so the chances are that if the server was fast enough
this driver would continuously lose one of the fragments. Eventually
causing the kernel load to fail. Add 2 extra for random ARP or other
packets that might be picked up.
 1.5 23-Aug-1999  ragge branches: 1.5.2;
Add support for 4000/90. Also handle interrupts more intelligent.
XXX - countdown doesn't work on 4000/90.
 1.4 07-Aug-1999  ragge Reset the interface when loading is finished, to avoid spurious writing
to memory.
 1.3 01-Apr-1999  ragge A bunch of small fixes to make boot work on most VAXen.
 1.2 25-Mar-1999  thorpej Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
ourselves.
 1.1 06-Mar-1999  ragge New boot program for vax. Appearance similar to the i386 boot blocks.
 1.5.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.10.20.1 30-May-2002  gehenna Catch up with -current.
 1.10.12.1 20-Jun-2002  nathanw Catch up to -current.
 1.10.8.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.12.120.2 28-Apr-2009  skrll Sync with HEAD.
 1.12.120.1 19-Jan-2009  skrll Sync with HEAD.
 1.12.112.2 11-Mar-2010  yamt sync with head
 1.12.112.1 04-May-2009  yamt sync with head.
 1.12.108.1 17-Jan-2009  mjf Sync with HEAD.
 1.13.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.16 28-Oct-2019  christos Rewrite the floppy selection logic, and fix an always false condition.
 1.15 22-May-2017  ragge branches: 1.15.10;
Update copyright notice for Ludd (remove clause 3 & 4).
 1.14 09-Nov-2013  christos branches: 1.14.6;
fix unused variable warnings
 1.13 26-Oct-2009  cegger branches: 1.13.12; 1.13.22; 1.13.26;
kill extra whitespaces
reviewed by tsutsui@
 1.12 18-Mar-2009  cegger bcopy -> memcpy
 1.11 18-Mar-2009  cegger bzero -> memset
 1.10 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.9 17-Mar-2009  dsl Add some 'int' into function definitions where the K&R one didn't
specify a type.
 1.8 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.7 08-Jun-2006  he branches: 1.7.64; 1.7.72; 1.7.78;
Get rid of lvalue casts by either using an extra temporary variable
or by using the appropriate casts in the first place.
 1.6 11-Dec-2005  christos branches: 1.6.4; 1.6.8; 1.6.14;
merge ktrace-lwp.
 1.5 27-Jun-2005  junyoung branches: 1.5.2;
Use the form of #include <...> rather than #include "..." for headers of
which paths don't start from the current directory.
 1.4 26-Jul-2001  wiz branches: 1.4.6; 1.4.22;
issueing -> issuing
 1.3 19-Jul-2000  matt branches: 1.3.4;
Add support for loading a 2nd stage boot in either a.out or ELF.
Add support for loading a 2nd stage boot directly to it's desired address
if possible.
cleanup use of u_int/size_t.
 1.2 20-May-2000  ragge Change all devices to use the RPB info when autobooting, this allows for
booting from unsupported devices also. As a side effect; it fixes PR#9202.
 1.1 06-Mar-1999  ragge branches: 1.1.8;
New boot program for vax. Appearance similar to the i386 boot blocks.
 1.1.8.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.3.4.1 03-Aug-2001  lukem update to -current
 1.4.22.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.6.2 26-Jul-2001  wiz issueing -> issuing
 1.4.6.1 26-Jul-2001  wiz file mfm.c was added on branch nathanw_sa on 2001-07-26 22:55:14 +0000
 1.5.2.1 21-Jun-2006  yamt sync with head.
 1.6.14.1 19-Jun-2006  chap Sync with head.
 1.6.8.1 26-Jun-2006  yamt sync with head.
 1.6.4.1 09-Sep-2006  rpaulo sync with head
 1.7.78.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.7.72.1 28-Apr-2009  skrll Sync with HEAD.
 1.7.64.2 11-Mar-2010  yamt sync with head
 1.7.64.1 04-May-2009  yamt sync with head.
 1.13.26.1 18-May-2014  rmind sync with head
 1.13.22.2 03-Dec-2017  jdolecek update from HEAD
 1.13.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.12.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.14.6.1 28-Aug-2017  skrll Sync with HEAD
 1.15.10.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.16 19-May-2011  jakllsch Specify that the sock argument of socktodesc() is an int,
instead of letting it default to int.
 1.15 26-Oct-2009  cegger branches: 1.15.4; 1.15.6;
kill extra whitespaces
reviewed by tsutsui@
 1.14 21-Oct-2009  snj Drop 3rd and 4th clauses. Approved by gwr@ (copyright holder).
 1.13 18-Mar-2009  cegger bcopy -> memcpy
 1.12 18-Mar-2009  cegger bzero -> memset
 1.11 12-Jan-2009  tsutsui branches: 1.11.2;
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.10 28-Apr-2008  martin branches: 1.10.8;
Remove clause 3 and 4 from TNF licenses
 1.9 11-Dec-2005  christos branches: 1.9.74; 1.9.76; 1.9.78;
merge ktrace-lwp.
 1.8 27-Jun-2005  junyoung Use the form of #include <...> rather than #include "..." for headers of
which paths don't start from the current directory.
 1.7 28-Mar-2003  he branches: 1.7.2;
Compensate for the change of type for io_netif by adding a cast so
that this compiles again.
 1.6 26-May-2000  ragge Don't init the net info more than once.
 1.5 20-May-2000  ragge Adopt to the RPB changes. Complete change of how network devices are
handled. No more hacks to find bus addresses.
 1.4 30-Jun-1999  ragge branches: 1.4.2;
Stop the network interface after kernel is loaded but before starting it.
Not doing this caused packets to be read into memory somewhere after the
kernel was started but before the device was probed, normally in the
system page table. This gave quite unpredictable results...
 1.3 07-May-1999  drochner include <lib/libkern/libkern.h> for intoa()/inet_ntoa()
 1.2 01-Apr-1999  ragge branches: 1.2.4;
A bunch of small fixes to make boot work on most VAXen.
 1.1 06-Mar-1999  ragge New boot program for vax. Appearance similar to the i386 boot blocks.
 1.2.4.2 01-Jul-1999  thorpej Sync w/ -current.
 1.2.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.4.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.7.2.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.78.3 11-Mar-2010  yamt sync with head
 1.9.78.2 04-May-2009  yamt sync with head.
 1.9.78.1 16-May-2008  yamt sync with head.
 1.9.76.1 18-May-2008  yamt sync with head.
 1.9.74.2 17-Jan-2009  mjf Sync with HEAD.
 1.9.74.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.8.2 28-Apr-2009  skrll Sync with HEAD.
 1.10.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.11.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.15.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.15.4.1 31-May-2011  rmind sync with head
 1.23 14-Jul-2025  hans vax/boot: fix detection of CMD CQD-22x MSCP controllers

Certain models of CMD MSCP controllers fail to be detected by uda(4) if
they have been booted from. This failure mode has been introduced in
revision 1.11 of uba_mainbus.c, when scanning for Qbus/Unibus memories
was added. They are deteced fine when NetBSD is booted from any other
device such as over the network.

When NetBSD is booted from a MSCP controller, the boot loader sets up
the Qbus map to provide the controller with a small command/response
ring in memory to be used for I/O. Once the kernel is loaded and uba(4)
is attaching, the Qbus map is cleared while scanning for memories. It
appears that sudden loss of access to the command/response ring causes
the firmware of these CMD controllers to drop dead.

As a result, these controllers don't react in a reasonable time (100ms
by the spec) when their IP register is written to re-initialze the
controller. Even though uda(4)'s udamatch() waits up to 10s for a sign
of life from the controller, that's usually not enough for it to wake
up and it is assumed to be absent. Which, of course, causes the kernel
to fail booting as the boot device can't be found.

This needs to be addressed both in the kernel and the bootloader.

To fix this properly, the standalone ra.c driver in the boot loader
should provide a close() entry point which clears the IP register to
issue a controller reset. Thus when the kernel is loaded, the firmware
of the MSCP controller is again in reset state and can't get confused
anymore by the initialization of the Qbus map in uba(4).
 1.22 21-Mar-2018  ragge branches: 1.22.38;
Fix bug causing autoboot on 750/780 not to work. Cleanup.
 1.21 19-Mar-2018  ragge Use a common routine ubmap() that setup the map registers as needed,
not expecting everything to be below 4M. This solves the problem
that large kernels cannot be loaded reported on port-vax.
 1.20 22-May-2017  ragge branches: 1.20.2; 1.20.8;
Update copyright notice for Ludd (remove clause 3 & 4).
 1.19 09-Nov-2013  christos branches: 1.19.6;
fix unused variable warnings
 1.18 18-Mar-2009  cegger branches: 1.18.12; 1.18.22; 1.18.26;
bzero -> memset
 1.17 01-Jul-2006  mrg branches: 1.17.62; 1.17.70; 1.17.76;
fix pointer signedness and build with GCC4.
 1.16 11-Jun-2006  he branches: 1.16.2;
Correct a mistake I introduced when getting rid of lvalue casts.
 1.15 08-Jun-2006  he Get rid of lvalue casts by either using an extra temporary variable
or by using the appropriate casts in the first place.
 1.14 11-Dec-2005  christos branches: 1.14.4; 1.14.8; 1.14.14;
merge ktrace-lwp.
 1.13 27-Jun-2005  junyoung branches: 1.13.2;
Use the form of #include <...> rather than #include "..." for headers of
which paths don't start from the current directory.
 1.12 27-Jun-2005  junyoung Remove trailing spaces.
 1.11 04-Jun-2002  ragge branches: 1.11.6;
Need longer delay while waiting for mscp packets, otherwise it times out
on VAX8650.
 1.10 24-May-2002  ragge %d -> %ld in some debug messages, after the ELF switch.
 1.9 19-Jul-2000  matt branches: 1.9.4; 1.9.8; 1.9.16;
Add support for loading a 2nd stage boot in either a.out or ELF.
Add support for loading a 2nd stage boot directly to it's desired address
if possible.
cleanup use of u_int/size_t.
 1.8 10-Jul-2000  ragge Add support for VAX 6000 + VAX 8000. Tweak console routines.
Create a fake RPB if either netbooted (on machine without RPB) or
loaded from console storage (without VMB intervention).
 1.7 11-Jun-2000  ragge Fix booting from BI-based disks.
 1.6 21-May-2000  ragge branches: 1.6.2;
Remove forgotten debug printf.
 1.5 20-May-2000  ragge Change all devices to use the RPB info when autobooting, this allows for
booting from unsupported devices also. As a side effect; it fixes PR#9202.
 1.4 07-Aug-1999  ragge branches: 1.4.2;
BI bus files has moved.
 1.3 30-Jun-1999  ragge Search for include files in new locations.
 1.2 01-Apr-1999  ragge branches: 1.2.4;
A bunch of small fixes to make boot work on most VAXen.
 1.1 06-Mar-1999  ragge New boot program for vax. Appearance similar to the i386 boot blocks.
 1.2.4.1 01-Jul-1999  thorpej Sync w/ -current.
 1.4.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.6.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.9.16.2 15-Jul-2002  gehenna catch up with -current.
 1.9.16.1 30-May-2002  gehenna Catch up with -current.
 1.9.8.1 20-Jun-2002  nathanw Catch up to -current.
 1.9.4.1 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.11.6.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.13.2.2 30-Dec-2006  yamt sync with head.
 1.13.2.1 21-Jun-2006  yamt sync with head.
 1.14.14.1 19-Jun-2006  chap Sync with head.
 1.14.8.2 11-Aug-2006  yamt sync with head
 1.14.8.1 26-Jun-2006  yamt sync with head.
 1.14.4.1 09-Sep-2006  rpaulo sync with head
 1.16.2.1 13-Jul-2006  gdamore Merge from HEAD.
 1.17.76.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.17.70.1 28-Apr-2009  skrll Sync with HEAD.
 1.17.62.1 04-May-2009  yamt sync with head.
 1.18.26.1 18-May-2014  rmind sync with head
 1.18.22.2 03-Dec-2017  jdolecek update from HEAD
 1.18.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.12.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.19.6.1 28-Aug-2017  skrll Sync with HEAD
 1.20.8.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.20.2.1 24-Mar-2018  snj Pull up following revision(s) (requested by ragge in ticket #655):
sys/arch/vax/boot/boot/devopen.c: 1.19-1.20
sys/arch/vax/boot/boot/hp.c: 1.11
sys/arch/vax/boot/boot/if_de.c: 1.10
sys/arch/vax/boot/boot/if_qe.c: 1.10
sys/arch/vax/boot/boot/ra.c: 1.21-1.22
sys/arch/vax/boot/boot/vaxstand.h: 1.10
Use a common routine ubmap() that setup the map registers as needed,
not expecting everything to be below 4M. This solves the problem
that large kernels cannot be loaded reported on port-vax.
--
Change the driver to map the data structures onto the qbus.
--
Fix bug causing autoboot on 750/780 not to work. Cleanup.
 1.22.38.1 02-Aug-2025  perseant Sync with HEAD
 1.11 25-Apr-2022  mlelstv libsa now needs ioctl support to handle media with large sectors.
Provide dummy functions.
 1.10 22-May-2017  ragge Update copyright notice for Ludd (remove clause 3 & 4).
 1.9 18-Mar-2009  cegger branches: 1.9.22; 1.9.40;
bzero -> memset
 1.8 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.7 11-Dec-2005  christos branches: 1.7.78; 1.7.86; 1.7.92;
merge ktrace-lwp.
 1.6 27-Jun-2005  junyoung Use the form of #include <...> rather than #include "..." for headers of
which paths don't start from the current directory.
 1.5 19-Sep-2002  ragge branches: 1.5.6;
Remove the (today) unneccessary boot unit number conversions for rom-booted
disks. This allows for booting from different LUNs on SCSI disks.
 1.4 24-Jun-2002  mrg make booting from FS_RAID work. tested on vs4000/90.
 1.3 19-Jul-2000  matt branches: 1.3.4; 1.3.8; 1.3.16; 1.3.18;
Add support for loading a 2nd stage boot in either a.out or ELF.
Add support for loading a 2nd stage boot directly to it's desired address
if possible.
cleanup use of u_int/size_t.
 1.2 20-May-2000  ragge Change all devices to use the RPB info when autobooting, this allows for
booting from unsupported devices also. As a side effect; it fixes PR#9202.
 1.1 06-Mar-1999  ragge branches: 1.1.8;
New boot program for vax. Appearance similar to the i386 boot blocks.
 1.1.8.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.3.18.1 26-Jun-2002  lukem Pull up revision 1.4 (requested by mrg in ticket #370):
make booting from FS_RAID work. tested on vs4000/90.
 1.3.16.1 17-Jul-2002  gehenna catch up with -current.
 1.3.8.2 18-Oct-2002  nathanw Catch up to -current.
 1.3.8.1 01-Aug-2002  nathanw Catch up to -current.
 1.3.4.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.3.4.1 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.5.6.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.7.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.7.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.7.78.1 04-May-2009  yamt sync with head.
 1.9.40.1 28-Aug-2017  skrll Sync with HEAD
 1.9.22.1 03-Dec-2017  jdolecek update from HEAD
 1.9 22-May-2017  ragge Update copyright notice for Ludd (remove clause 3 & 4).
 1.8 17-Mar-2009  dsl branches: 1.8.22; 1.8.40;
Add some 'int' into function definitions where the K&R one didn't
specify a type.
 1.7 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.6 11-Dec-2005  christos branches: 1.6.78; 1.6.86; 1.6.92;
merge ktrace-lwp.
 1.5 27-Jun-2005  junyoung Use the form of #include <...> rather than #include "..." for headers of
which paths don't start from the current directory.
 1.4 27-Jun-2005  junyoung Remove trailing spaces.
 1.3 30-Jun-1999  ragge branches: 1.3.36;
Search for include files in new locations.
 1.2 01-Apr-1999  ragge branches: 1.2.4;
A bunch of small fixes to make boot work on most VAXen.
 1.1 06-Mar-1999  ragge New boot program for vax. Appearance similar to the i386 boot blocks.
 1.2.4.1 01-Jul-1999  thorpej Sync w/ -current.
 1.3.36.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.6.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.6.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.6.78.1 04-May-2009  yamt sync with head.
 1.8.40.1 28-Aug-2017  skrll Sync with HEAD
 1.8.22.1 03-Dec-2017  jdolecek update from HEAD
 1.12 14-Jul-2025  hans vax/boot: fix detection of CMD CQD-22x MSCP controllers

Certain models of CMD MSCP controllers fail to be detected by uda(4) if
they have been booted from. This failure mode has been introduced in
revision 1.11 of uba_mainbus.c, when scanning for Qbus/Unibus memories
was added. They are deteced fine when NetBSD is booted from any other
device such as over the network.

When NetBSD is booted from a MSCP controller, the boot loader sets up
the Qbus map to provide the controller with a small command/response
ring in memory to be used for I/O. Once the kernel is loaded and uba(4)
is attaching, the Qbus map is cleared while scanning for memories. It
appears that sudden loss of access to the command/response ring causes
the firmware of these CMD controllers to drop dead.

As a result, these controllers don't react in a reasonable time (100ms
by the spec) when their IP register is written to re-initialze the
controller. Even though uda(4)'s udamatch() waits up to 10s for a sign
of life from the controller, that's usually not enough for it to wake
up and it is assumed to be absent. Which, of course, causes the kernel
to fail booting as the boot device can't be found.

This needs to be addressed both in the kernel and the bootloader.

To fix this properly, the standalone ra.c driver in the boot loader
should provide a close() entry point which clears the IP register to
issue a controller reset. Thus when the kernel is loaded, the firmware
of the MSCP controller is again in reset state and can't get confused
anymore by the initialization of the Qbus map in uba(4).
 1.11 25-Apr-2022  mlelstv branches: 1.11.10;
libsa now needs ioctl support to handle media with large sectors.
Provide dummy functions.
 1.10 19-Mar-2018  ragge Use a common routine ubmap() that setup the map registers as needed,
not expecting everything to be below 4M. This solves the problem
that large kernels cannot be loaded reported on port-vax.
 1.9 22-May-2017  ragge branches: 1.9.2; 1.9.8;
Update copyright notice for Ludd (remove clause 3 & 4).
 1.8 11-Dec-2005  christos branches: 1.8.122; 1.8.142;
merge ktrace-lwp.
 1.7 04-Nov-2003  jdolecek yield to the strchr() prototype from libkern.h
 1.6 01-Nov-2003  jdolecek rename local index() to strchr()
 1.5 15-Jun-2000  ragge branches: 1.5.26;
Standalone device driver for DEBNx (ni) ethernet controllers.
 1.4 21-May-2000  ragge branches: 1.4.2;
Standalone driver for the Digital Equipment Unibus Network Adapter (DEUNA).
This allows 11/750 owners to install from a single TU58 cassette.
(Are there still any 11/750 owners left out there? :-)
 1.3 20-May-2000  ragge Adopt to the RPB changes. Complete change of how network devices are
handled. No more hacks to find bus addresses.
 1.2 09-May-2000  ragge Get boot device CSR from RPB instead of trying to guess it.
 1.1 06-Mar-1999  ragge branches: 1.1.8;
New boot program for vax. Appearance similar to the i386 boot blocks.
 1.1.8.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.4.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.5.26.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.26.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.26.1 03-Aug-2004  skrll Sync with HEAD
 1.8.142.1 28-Aug-2017  skrll Sync with HEAD
 1.8.122.1 03-Dec-2017  jdolecek update from HEAD
 1.9.8.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.9.2.1 24-Mar-2018  snj Pull up following revision(s) (requested by ragge in ticket #655):
sys/arch/vax/boot/boot/devopen.c: 1.19-1.20
sys/arch/vax/boot/boot/hp.c: 1.11
sys/arch/vax/boot/boot/if_de.c: 1.10
sys/arch/vax/boot/boot/if_qe.c: 1.10
sys/arch/vax/boot/boot/ra.c: 1.21-1.22
sys/arch/vax/boot/boot/vaxstand.h: 1.10
Use a common routine ubmap() that setup the map registers as needed,
not expecting everything to be below 4M. This solves the problem
that large kernels cannot be loaded reported on port-vax.
--
Change the driver to map the data structures onto the qbus.
--
Fix bug causing autoboot on 750/780 not to work. Cleanup.
 1.11.10.1 02-Aug-2025  perseant Sync with HEAD
 1.8 17-Jan-2016  tsutsui Enable LIBSA_CREAD_NOCRC. PR/50638

Bump version to denote user visible change.
Tested on simh 4.0-Beta1 emulationg MicroVAX 3900.
 1.7 18-Oct-2014  snj branches: 1.7.2;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.6 11-Dec-2005  christos branches: 1.6.122;
merge ktrace-lwp.
 1.5 13-Feb-2004  wiz Uppercase CPU.
 1.4 09-Nov-2001  scw branches: 1.4.2; 1.4.18;
Bump the version numbers of all bootloaders which use loadfile_elfXX() now
that it tries hard to avoid backwards seeks.
 1.3 02-Aug-2001  bjh21 branches: 1.3.4;
Bump version numbers of all bootloaders that use loadfile/ELF, to account for
my changes to symbol loading. I should probably have done this at the time,
but it's better late than never.
 1.2 24-Sep-2000  jdolecek branches: 1.2.2; 1.2.6;
add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.
 1.1 30-Aug-2000  jdolecek Switch to newvers_stand.sh-based boot block versioning. Add sensible 'version'
template, the boot block changes were picked from cvs annotates for Makefile
and boot.c.

Reviewed by Ragge.
 1.2.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.6.1 03-Aug-2001  lukem update to -current
 1.2.2.2 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.2.2.1 24-Sep-2000  bouyer file version was added on branch thorpej_scsipi on 2000-11-20 20:32:39 +0000
 1.3.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.4.18.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.18.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.18.1 03-Aug-2004  skrll Sync with HEAD
 1.4.2.2 09-Nov-2001  scw Bump the version numbers of all bootloaders which use loadfile_elfXX() now
that it tries hard to avoid backwards seeks.
 1.4.2.1 09-Nov-2001  scw file version was added on branch nathanw_sa on 2001-11-09 19:53:16 +0000
 1.6.122.1 03-Dec-2017  jdolecek update from HEAD
 1.7.2.1 19-Mar-2016  skrll Sync with HEAD
 1.2 22-May-2017  ragge Update copyright notice for Ludd (remove clause 3 & 4).
 1.1 24-Feb-2002  matt branches: 1.1.2; 1.1.8; 1.1.170; 1.1.190;
Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.
 1.1.190.1 28-Aug-2017  skrll Sync with HEAD
 1.1.170.1 03-Dec-2017  jdolecek update from HEAD
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 24-Feb-2002  jdolecek file romread.S was added on branch kqueue on 2002-03-16 16:00:11 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 24-Feb-2002  nathanw file romread.S was added on branch nathanw_sa on 2002-02-28 04:12:27 +0000
 1.3 24-Feb-2002  matt Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.
 1.2 20-May-2000  ragge branches: 1.2.8; 1.2.12;
New arguments to the rom routines. Adapt srt0 to new world also.
 1.1 06-Mar-1999  ragge branches: 1.1.8;
New boot program for vax. Appearance similar to the i386 boot blocks.
 1.1.8.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.2.12.1 28-Feb-2002  nathanw Catch up to -current.
 1.2.8.1 16-Mar-2002  jdolecek Catch up with -current.
 1.6 19-Mar-2018  ragge Do not use movc3 to copy boot program, it may be larger than 64k.
 1.5 22-May-2017  ragge branches: 1.5.2; 1.5.8;
Update copyright notice for Ludd (remove clause 3 & 4).
 1.4 02-Dec-2002  ragge branches: 1.4.156; 1.4.176;
Revert Jason's changes to the boot startup code:
- All regs must be saved before any register is altered.
- movc{3,5} alters r0-r5, so clearing bss would clear the text instead.
This needs more thinking/testing to get it work correct; there are
different ways different CPUs call "boot".
 1.3 05-Nov-2002  thorpej Only skip the copy if we are already relocated; always clear
the BSS.
 1.2 31-Mar-2002  matt branches: 1.2.4;
Make ddb symbol loading work for ELF as well a.out.
 1.1 24-Feb-2002  matt branches: 1.1.2; 1.1.8;
Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.
 1.1.8.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 24-Feb-2002  jdolecek file srt0.S was added on branch kqueue on 2002-03-16 16:00:11 +0000
 1.1.2.5 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.4 11-Nov-2002  nathanw Catch up to -current
 1.1.2.3 17-Apr-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 24-Feb-2002  nathanw file srt0.S was added on branch nathanw_sa on 2002-02-28 04:12:27 +0000
 1.2.4.2 12-Dec-2002  he Pull up revision 1.4 (requested by thorpej in ticket #1032):
Revert the effects of the previous pull-up, it has undesireable
and unintended side-effects.
 1.2.4.1 11-Dec-2002  he Pull up revision 1.3 (requested by thorpej in ticket #964):
Only skip the copy if we are already relocated; always
clear the BSS.
 1.4.176.1 28-Aug-2017  skrll Sync with HEAD
 1.4.156.1 03-Dec-2017  jdolecek update from HEAD
 1.5.8.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.5.2.1 24-Mar-2018  snj Pull up following revision(s) (requested by ragge in ticket #656):
sys/arch/vax/boot/common/srt0.S: 1.6
Do not use movc3 to copy boot program, it may be larger than 64k.
 1.10 24-Feb-2002  matt Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.
 1.9 18-Feb-2002  matt Add code to pass symbol table from loadfile to kernel.
 1.8 01-Nov-2000  ragge branches: 1.8.4; 1.8.8;
Start address must be == 0, otherwise loading on some MicroVAXen will
fail (boot program loaded at address 0 anyway, but tries to start at
the compiled entry point).
 1.7 19-Jul-2000  matt Add support for loading a 2nd stage boot in either a.out or ELF.
Add support for loading a 2nd stage boot directly to it's desired address
if possible.
cleanup use of u_int/size_t.
 1.6 13-Jul-2000  matt Use <machine/asm.h>. (e.g. prepare for ELF)
 1.5 10-Jul-2000  ragge Save registers for eventually later usage.
Use REI to clear pipes after code copy.
 1.4 24-May-2000  ragge Four more instructions makes it possible to boot old kernels also.
 1.3 20-May-2000  ragge New arguments to the rom routines. Adapt srt0 to new world also.
 1.2 23-May-1999  ragge branches: 1.2.2;
Use common routines to identify cpu type.
Set up a SCB to be able to handle clock interrupts in the boot program.
Now timer countdown should work on all types of vaxen.
 1.1 06-Mar-1999  ragge branches: 1.1.4;
New boot program for vax. Appearance similar to the i386 boot blocks.
 1.1.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.2.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.2.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.8.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.8.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.6 22-May-2017  ragge Update copyright notice for Ludd (remove clause 3 & 4).
 1.5 11-Dec-2005  christos branches: 1.5.122; 1.5.142;
merge ktrace-lwp.
 1.4 01-Nov-2003  jdolecek rename local index() to strchr()
 1.3 07-Oct-2003  ragge The last commit broke the boot code (memset may be larger than 64k).
Johnny Billquist fixed it and bugfixed some routines.
 1.2 04-Sep-2003  dsl Add memcmp, memcpy and memset
Fix strncmp(x, y, 0)
Use unsigned compares for strcmp and memcmp (and bcmp).
Compiles but untested
AFAICT http://h71000.www7.hp.com/doc/72final/4515/4515pro_025.html#4515ch9_146
cmpc3/5 set %r4 and %r5 to zero, It doesn't look as though the procedure
call is set to preserve these, and I doubt that gcc is treating them as
scratch registers - does our vax pcs actually have %r2 and %r3 as scratch regs?
 1.1 24-Feb-2002  matt branches: 1.1.2; 1.1.8; 1.1.20;
Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.
 1.1.20.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.20.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.20.1 03-Aug-2004  skrll Sync with HEAD
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 24-Feb-2002  jdolecek file str.S was added on branch kqueue on 2002-03-16 16:00:12 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 24-Feb-2002  nathanw file str.S was added on branch nathanw_sa on 2002-02-28 04:12:27 +0000
 1.5.142.1 28-Aug-2017  skrll Sync with HEAD
 1.5.122.1 03-Dec-2017  jdolecek update from HEAD
 1.4 24-Feb-2002  matt Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.
 1.3 13-Jul-2000  matt branches: 1.3.4; 1.3.8;
Use <machine/asm.h>. (e.g. prepare for ELF)
 1.2 22-Apr-2000  ragge Fix boot block countdown on 4000/60. Easy to add for other 4000 machines also.
 1.1 06-Mar-1999  ragge branches: 1.1.8;
New boot program for vax. Appearance similar to the i386 boot blocks.
 1.1.8.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.3.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.3.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.22 15-Sep-2020  mrg make build (and run) with GCC 9.
 1.21 11-Dec-2005  christos merge ktrace-lwp.
 1.20 11-Dec-2003  matt Rework things to move common stuff into Makefile.inc.
 1.19 09-Dec-2003  matt Make sure to include <bsd.own.mk> to pick up the definition of HAVE_GCC3
 1.18 08-Dec-2003  matt Move common CFLAGS/AFLAGS to Makefile.inc.
For now, only suppy -mno-asm-pic when not using gcc3.
 1.17 04-Feb-2003  matt branches: 1.17.2;
Add CPPFLAGS=-D__daddr_t=int32_t to shrink primary boot block.
 1.16 05-Nov-2002  thorpej Add -mno-asm-pic to CFLAGS and AFLAGS.
 1.15 15-Jun-2002  matt Make sure to cleanup the ${PROG}.out files
 1.14 09-Jun-2002  matt Add -ffreestanding and LIBC= to stand/boot/*/Makefile. Fix various
asm's to work with gcc-current.
 1.13 29-Mar-2002  matt branches: 1.13.2; 1.13.4;
Add a xxboot_ustarfs for floppies.
 1.12 24-Feb-2002  matt Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.
 1.11 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.10 03-May-2001  matt branches: 1.10.2; 1.10.8;
change to let make obj work right with MAKEOBJDIRPREFIX and read-only source
 1.9 19-Jul-2000  matt branches: 1.9.2;
Add support for loading a 2nd stage boot in either a.out or ELF.
Add support for loading a 2nd stage boot directly to it's desired address
if possible.
cleanup use of u_int/size_t.
 1.8 03-Jul-2000  matt Make cross-compile friendly
 1.7 19-Jun-2000  matt Rename ncr[5380] device to si to more consistent with other ports.
Add VAX660 to cputype.h. Remove needs-flag from si & asc entries.
 1.6 22-May-2000  matt branches: 1.6.2;
get rid of a double /
 1.5 20-May-2000  ragge Rewriting of the VAX boot block. Differences:

- Use the RPB for passing boot device info up to kernel, instead of the
old BSD "hack" with an encoded longword (see sys/reboot.h for details)
- Instead of separate drivers for all devices, use the HW-provided ROM
routines as much as possible.
- Add filesystem support for CD9660 also (now when there is space).
- Make everything compile with WARNS=1.

The boot block is now <7K in size and have support for UFS, CD9660 and USTAR.
 1.4 18-Apr-2000  matt Compile -Os instead of -O2 (optimize for space).
 1.3 16-Apr-2000  matt Use objcopy to emit the binary and linked around for debugging.
 1.2 23-Oct-1999  ragge Boot block code fixed to 1) understand SCSI disks and 2) read from a
ustar filesystem (used in installation).
 1.1 06-Mar-1999  ragge branches: 1.1.8; 1.1.10; 1.1.12;
New boot program for vax. Appearance similar to the i386 boot blocks.
 1.1.12.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.10.1 15-Nov-1999  fvdl Sync with -current
 1.1.8.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.6.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.9.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.10.8.6 11-Nov-2002  nathanw Catch up to -current
 1.10.8.5 20-Jun-2002  nathanw Catch up to -current.
 1.10.8.4 17-Apr-2002  nathanw Catch up to -current.
 1.10.8.3 28-Feb-2002  nathanw Catch up to -current.
 1.10.8.2 08-Jan-2002  nathanw Catch up to -current.
 1.10.8.1 03-May-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-01-08 00:28:29 +0000
 1.10.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.10.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.10.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.13.4.2 26-Jan-2003  jmc Pullup revisions 1.13-1.14 and 1.15-1.16 (requested by he in ticket #1072)
Add -mno-asm-pic to CFLAGS and AFLAGS, and add -ffreestanding and
empty LIBC setting to bootloader Makefiles.
 1.13.4.1 18-Jun-2002  lukem Pull up revision 1.15 (requested by matt in ticket #287):
Make sure to cleanup the ${PROG}.out files
 1.13.2.1 15-Jul-2002  gehenna catch up with -current.
 1.17.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.17.2.1 03-Aug-2004  skrll Sync with HEAD
 1.2 16-Apr-2000  matt This should have never been checked in. it's what this directory is supposed
to make. opps.
 1.1 06-Mar-1999  ragge branches: 1.1.8;
New boot program for vax. Appearance similar to the i386 boot blocks.
 1.1.8.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.39 25-Apr-2022  mlelstv libsa now needs ioctl support to handle media with large sectors.
Provide dummy functions.
 1.38 01-May-2018  ragge Enable ffsv2 in boot.
 1.37 28-Jun-2013  matt branches: 1.37.32;
ufs -> ffsv1 (ffsv2 is commentout due to size limitations)
 1.36 18-Sep-2009  mhitch branches: 1.36.12; 1.36.22;
Explicitly include sys/exec_aout.h.
 1.35 23-Mar-2009  tsutsui Revert kludge in previous.
The warning was triggered by __builtin_memcpy() on vax, and
it has been disabled in libkern.h for _STANDALONE programs.
 1.34 19-Mar-2009  he It seems gcc is unhappy about a literal 0 as a pointer argument
to memcpy(). Work around that by using a local variable instead.
(This looks a bit dubious, but who am I to judge the restrictions
in the standalone environment on the vax -- this should not change
the semantics of what was here before.)
 1.33 18-Mar-2009  cegger bcopy -> memcpy
 1.32 18-Mar-2009  cegger bzero -> memset
 1.31 18-Mar-2009  cegger bcmp -> memcmp
 1.30 18-Mar-2009  cegger Ansify function definitions w/o arguments. Generated with sed.
 1.29 14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.28 05-Mar-2007  christos branches: 1.28.44; 1.28.52; 1.28.58;
another caddr_t botch
 1.27 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.26 01-Jul-2006  mrg branches: 1.26.10;
fix pointer signedness and build with GCC4.
 1.25 08-Jun-2006  he branches: 1.25.2;
Get rid of another instance of an lvalue cast.
 1.24 08-Mar-2006  sekiya branches: 1.24.4;
The network bootloader entry point should be nisse(), not start(). Fixes a
very long-standing netboot issue.

Patch contributed by Hans Rosenfeld.
 1.23 27-Jan-2006  he branches: 1.23.2; 1.23.4; 1.23.6; 1.23.8;
Track latest changes elsewhere: free() is now dealloc(), and alloc/dealloc
size argument is now a size_t.
 1.22 24-Dec-2005  perry branches: 1.22.2;
bare asm -> __asm
 1.21 11-Dec-2005  christos merge ktrace-lwp.
 1.20 27-Jun-2005  junyoung branches: 1.20.2;
Use the form of #include <...> rather than #include "..." for headers of
which paths don't start from the current directory.
 1.19 27-Jun-2005  junyoung Remove trailing spaces.
 1.18 06-Jan-2004  matt Add proper boot/autoconf support for SDN devices. Take from Hugh Graham;
see http://mail-index.netbsd.org/port-vax/2002/06/28/0005.html
 1.17 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.16 29-Mar-2002  matt branches: 1.16.10;
Add a xxboot_ustarfs for floppies.
 1.15 24-Feb-2002  matt Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.
 1.14 09-Nov-2000  matt branches: 1.14.4; 1.14.8;
Fix a thinko or two i made a few days ago. I could have sworn i compiled
this. :)
 1.13 03-Nov-2000  simonb Use the canonical RF_PROTECTED_SECTORS #define hack.
 1.12 02-Nov-2000  matt Add code to read the disklabel and add the beginning offset for A. Add
support for booting off a RAID root parition.
 1.11 19-Jul-2000  matt Add support for loading a 2nd stage boot in either a.out or ELF.
Add support for loading a 2nd stage boot directly to it's desired address
if possible.
cleanup use of u_int/size_t.
 1.10 10-Jul-2000  ragge Add code that allows the boot blocks to be loaded by VMB.EXE, and
also have optional MTPR printf available.
 1.9 04-Jun-2000  ragge branches: 1.9.2;
Adapt to mba changes. Fix assembler buf (EDIV uses 64-bit arg, not 32).
 1.8 23-May-2000  matt branches: 1.8.2;
Allow for boot.vax and netbsd.vax when booting. this allows a multi
architecture CD to be made which includes VAX support.
 1.7 21-May-2000  ragge 11/750 fixes:
- Set the correct adapter address in RPB for Unibus devices.
- Repair the disk read routines for HP disks. ROM routines do not work
on HP disks, therefore use a small home-written routine.
 1.6 20-May-2000  ragge Rewriting of the VAX boot block. Differences:

- Use the RPB for passing boot device info up to kernel, instead of the
old BSD "hack" with an encoded longword (see sys/reboot.h for details)
- Instead of separate drivers for all devices, use the HW-provided ROM
routines as much as possible.
- Add filesystem support for CD9660 also (now when there is space).
- Make everything compile with WARNS=1.

The boot block is now <7K in size and have support for UFS, CD9660 and USTAR.
 1.5 22-Apr-2000  ragge Recognize RL02 as boot device.
 1.4 18-Apr-2000  ragge Handle NCR5394 SCSI as NCR5380. (Doesn't matter, it will use the ROM
routines anyway).
 1.3 16-Apr-2000  matt Add missing cases for MARIAH/SOC/NVAX and fix a comment or two.
 1.2 23-Oct-1999  ragge Boot block code fixed to 1) understand SCSI disks and 2) read from a
ustar filesystem (used in installation).
 1.1 06-Mar-1999  ragge branches: 1.1.8; 1.1.10; 1.1.12;
New boot program for vax. Appearance similar to the i386 boot blocks.
 1.1.12.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.10.1 15-Nov-1999  fvdl Sync with -current
 1.1.8.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.8.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.8.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.9.2.1 27-Jul-2000  matt Pullup revision 1.11
Add support for loading ELF 2nd stage bootstrap
 1.14.8.2 17-Apr-2002  nathanw Catch up to -current.
 1.14.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.14.4.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.14.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.16.10.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.16.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.16.10.1 03-Aug-2004  skrll Sync with HEAD
 1.20.2.3 03-Sep-2007  yamt sync with head.
 1.20.2.2 30-Dec-2006  yamt sync with head.
 1.20.2.1 21-Jun-2006  yamt sync with head.
 1.22.2.1 01-Feb-2006  yamt sync with head.
 1.23.8.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.23.6.3 11-Aug-2006  yamt sync with head
 1.23.6.2 26-Jun-2006  yamt sync with head.
 1.23.6.1 13-Mar-2006  yamt sync with head.
 1.23.4.1 22-Apr-2006  simonb Sync with head.
 1.23.2.1 09-Sep-2006  rpaulo sync with head
 1.24.4.1 19-Jun-2006  chap Sync with head.
 1.25.2.1 13-Jul-2006  gdamore Merge from HEAD.
 1.26.10.1 12-Mar-2007  rmind Sync with HEAD.
 1.28.58.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.28.52.1 28-Apr-2009  skrll Sync with HEAD.
 1.28.44.2 11-Mar-2010  yamt sync with head
 1.28.44.1 04-May-2009  yamt sync with head.
 1.36.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.36.12.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.37.32.1 02-May-2018  pgoyette Synch with HEAD
 1.7 06-Apr-2020  snj fix comment in typo
 1.6 22-May-2017  ragge branches: 1.6.10;
Update copyright notice for Ludd (remove clause 3 & 4).
 1.5 04-Apr-2013  martin branches: 1.5.12;
Rearrange primary bootstrap slightly to free up all space between the disk
label and the uVAX rom boot parameter block.
 1.4 11-Dec-2005  christos branches: 1.4.88; 1.4.112; 1.4.118; 1.4.122;
merge ktrace-lwp.
 1.3 21-Oct-2005  he Make it possible to use <sys/disklabel.h> from assembly source by
introducing OMIT_DKTYPENUMS and OMIT_FSTYPENUMS, which omits the
declaration of the enums. Use this in the vax boot code to make
it build again. Also use __CONCAT() instead of ##.
 1.2 10-Nov-2003  wiz branches: 1.2.16; 1.2.18;
Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
 1.1 24-Feb-2002  matt branches: 1.1.2; 1.1.8; 1.1.20;
Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.
 1.1.20.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.20.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.20.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.20.1 03-Aug-2004  skrll Sync with HEAD
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 24-Feb-2002  jdolecek file start.S was added on branch kqueue on 2002-03-16 16:00:12 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 24-Feb-2002  nathanw file start.S was added on branch nathanw_sa on 2002-02-28 04:12:28 +0000
 1.2.18.1 26-Oct-2005  yamt sync with head
 1.2.16.1 21-Jun-2006  yamt sync with head.
 1.4.122.2 03-Dec-2017  jdolecek update from HEAD
 1.4.122.1 23-Jun-2013  tls resync from head
 1.4.118.1 20-Apr-2013  bouyer Pull up following revision(s) (requested by martin in ticket #865):
sys/arch/vax/include/disklabel.h: revision 1.7
sys/arch/vax/boot/xxboot/start.S: revision 1.5
sys/sys/bootblock.h: revision 1.55
sys/sys/disklabel.h: revision 1.113
usr.sbin/installboot/arch/vax.c: revision 1.14
usr.sbin/installboot/arch/vax.c: revision 1.15
sys/kern/sys_generic.c: revision 1.129
Revert VAX MAXPARTITION bump to 16, adjusting it to 12 instead. Fix bootblocks
and installboot for VAX 780 and other machines booting via VMB.EXE.
 1.4.112.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.88.1 12-Jun-2013  msaitoh Pull up following revision(s) (requested by martin in ticket #1856):
sys/arch/vax/boot/xxboot/start.S: revision 1.5
sys/sys/bootblock.h: revision 1.55
sys/sys/disklabel.h: revision 1.113
usr.sbin/installboot/arch/vax.c: revision 1.14-1.15
Rearrange primary bootstrap slightly to free up all space between the disk
label and the uVAX rom boot parameter block.
Calculate the disklabel size (for asm code) dynamically based on MAXPARTITIONS.
Adapt to new vax primary bootstrap layout.
Fix installboot for VAX, as discussed on port-vax. Problem pointed out
by Jonny Billquist, thanks to Marl Pizzolato for patiently explaining
the various ways of booting a vax to me.
Now VAX 780 can boot directly from VMB.EXE again.
Provide an empty __CTASSERT() for toolbuilds
 1.5.12.1 28-Aug-2017  skrll Sync with HEAD
 1.6.10.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.12 24-Feb-2002  matt Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.
 1.11 02-Nov-2000  matt branches: 1.11.4; 1.11.8;
Add code to read the disklabel and add the beginning offset for A. Add
support for booting off a RAID root parition.
 1.10 19-Jul-2000  matt Add support for loading a 2nd stage boot in either a.out or ELF.
Add support for loading a 2nd stage boot directly to it's desired address
if possible.
cleanup use of u_int/size_t.
 1.9 13-Jul-2000  matt Use <machine/asm.h>
 1.8 10-Jul-2000  ragge Add code that allows the boot blocks to be loaded by VMB.EXE, and
also have optional MTPR printf available.
 1.7 19-Jun-2000  ragge Variable "from" must be in first block read from disk, otherwise it will be
overwritten on non-VMB machines.
 1.6 17-Jun-2000  matt Adjust this a bit so that the primary entry point is 0x200, not 0x0a.
 1.5 22-May-2000  matt branches: 1.5.2;
cpp can be so annoying. to appease it, can't -> cannot
 1.4 21-May-2000  ragge On the 11/750, the stack will be placed by ROM in the code area.
Start with moving it to a safe place.
 1.3 20-May-2000  ragge Rewriting of the VAX boot block. Differences:

- Use the RPB for passing boot device info up to kernel, instead of the
old BSD "hack" with an encoded longword (see sys/reboot.h for details)
- Instead of separate drivers for all devices, use the HW-provided ROM
routines as much as possible.
- Add filesystem support for CD9660 also (now when there is space).
- Make everything compile with WARNS=1.

The boot block is now <7K in size and have support for UFS, CD9660 and USTAR.
 1.2 23-Oct-1999  ragge Boot block code fixed to 1) understand SCSI disks and 2) read from a
ustar filesystem (used in installation).
 1.1 06-Mar-1999  ragge branches: 1.1.8; 1.1.10; 1.1.12;
New boot program for vax. Appearance similar to the i386 boot blocks.
 1.1.12.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.1.10.1 15-Nov-1999  fvdl Sync with -current
 1.1.8.2 22-Nov-2000  bouyer Sync with HEAD.
 1.1.8.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.5.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.11.8.1 28-Feb-2002  nathanw Catch up to -current.
 1.11.4.1 16-Mar-2002  jdolecek Catch up with -current.
 1.9 15-Sep-2020  mrg make build (and run) with GCC 9.
 1.8 11-Dec-2005  christos merge ktrace-lwp.
 1.7 11-Dec-2003  matt Rework things to move common stuff into Makefile.inc.
 1.6 09-Dec-2003  matt Make sure to include <bsd.own.mk> to pick up the definition of HAVE_GCC3
 1.5 08-Dec-2003  matt Move common CFLAGS/AFLAGS to Makefile.inc.
For now, only suppy -mno-asm-pic when not using gcc3.
 1.4 05-Nov-2002  thorpej branches: 1.4.6;
Add -mno-asm-pic to CFLAGS and AFLAGS.
 1.3 15-Jun-2002  matt branches: 1.3.2;
Make sure to cleanup the ${PROG}.out files
 1.2 09-Jun-2002  matt Add -ffreestanding and LIBC= to stand/boot/*/Makefile. Fix various
asm's to work with gcc-current.
 1.1 29-Mar-2002  matt branches: 1.1.2; 1.1.4; 1.1.6;
Add a xxboot_ustarfs for floppies.
 1.1.6.2 26-Jan-2003  jmc Pullup revisions 1.1-1.2 and 1.3-1.4 (requested by he in ticket #1072)
Add -mno-asm-pic to CFLAGS and AFLAGS, and add -ffreestanding and
empty LIBC setting to bootloader Makefiles.
 1.1.6.1 18-Jun-2002  lukem Pull up revision 1.3 (requested by matt in ticket #287):
Make sure to cleanup the ${PROG}.out files
 1.1.4.1 15-Jul-2002  gehenna catch up with -current.
 1.1.2.4 11-Nov-2002  nathanw Catch up to -current
 1.1.2.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.2.2 17-Apr-2002  nathanw Catch up to -current.
 1.1.2.1 29-Mar-2002  nathanw file Makefile was added on branch nathanw_sa on 2002-04-17 00:04:38 +0000
 1.3.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.3.2.1 15-Jun-2002  jdolecek file Makefile was added on branch kqueue on 2002-06-23 17:42:58 +0000
 1.4.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.6.1 03-Aug-2004  skrll Sync with HEAD

RSS XML Feed