Home | History | Annotate | only in /src/sys/arch/ofppc/stand
History log of /src/sys/arch/ofppc/stand
RevisionDateAuthorComments
 1.3 23-Jan-2008  garbled Add a new mkbootinfo.sh script that builds a bootinfo.txt file. Remove a
printf in ofwboot.
 1.2 16-Apr-1997  thorpej branches: 1.2.64; 1.2.126; 1.2.132;
New OpenFirmware boot code for NetBSD/powerpc, based on Wolfgang's original
NetBSD/powerpc boot program. Highligts:
- Rearrange a bit so that we can sanely add boot programs for
non-OpenFirmware systems.
- Add support for loading compressed kernels (for booting from
1.44M floppies).
- Add support for loading Elf kernels (Elf is the new standard format
for NetBSD/powerpc). (XXX Don't load symbols right now - the code
to do it is there, but I don't particularly like how space for the
symbol table is allocated; I will revisit this soon'ish).
 1.1 30-Sep-1996  ws PowerPC port
 1.2.132.1 18-Feb-2008  mjf Sync with HEAD.
 1.2.126.1 23-Mar-2008  matt sync with HEAD
 1.2.64.1 04-Feb-2008  yamt sync with head.
 1.5 14-Apr-2021  mrg more -fcommon.
 1.4 10-Aug-2014  joerg branches: 1.4.42;
Put GCC/GAS specific options under ACTIVE_CC == "gcc".
 1.3 22-May-1998  drochner branches: 1.3.198;
STANDALONE->_STANDALONE (cpp definition)
closes PR kern/5481 (Erik Bertelsen <erik@q610.ebe.uni-c.dk>)
 1.2 16-Apr-1997  thorpej New OpenFirmware boot code for NetBSD/powerpc, based on Wolfgang's original
NetBSD/powerpc boot program. Highligts:
- Rearrange a bit so that we can sanely add boot programs for
non-OpenFirmware systems.
- Add support for loading compressed kernels (for booting from
1.44M floppies).
- Add support for loading Elf kernels (Elf is the new standard format
for NetBSD/powerpc). (XXX Don't load symbols right now - the code
to do it is there, but I don't particularly like how space for the
symbol table is allocated; I will revisit this soon'ish).
 1.1 30-Sep-1996  ws PowerPC port
 1.3.198.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.42.1 17-Apr-2021  thorpej Sync with HEAD.
 1.3 07-Aug-2000  jdolecek convert to use conf/newvers_stand.sh, minor Makefile adjustments
 1.2 28-May-1998  sakamoto branches: 1.2.14;
Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.1 17-Apr-1997  thorpej oops, forgot to commit this yesterday - newvers.sh script for boot
program.
 1.2.14.1 20-Nov-2000  bouyer Remove files that are no longer on the trunck
 1.1 23-Jan-2008  garbled branches: 1.1.2; 1.1.4; 1.1.12;
Add a new mkbootinfo.sh script that builds a bootinfo.txt file. Remove a
printf in ofwboot.
 1.1.12.2 23-Mar-2008  matt sync with HEAD
 1.1.12.1 23-Jan-2008  matt file Makefile was added on branch matt-armv6 on 2008-03-23 02:04:15 +0000
 1.1.4.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.4.1 23-Jan-2008  mjf file Makefile was added on branch mjf-devfs on 2008-02-18 21:04:54 +0000
 1.1.2.2 04-Feb-2008  yamt sync with head.
 1.1.2.1 23-Jan-2008  yamt file Makefile was added on branch yamt-lazymbuf on 2008-02-04 09:22:19 +0000
 1.2 24-Jan-2008  garbled branches: 1.2.2; 1.2.4; 1.2.12;
Add another optional argument to mkbootinfo.sh, the location of the bitmap.
 1.1 23-Jan-2008  garbled Add a new mkbootinfo.sh script that builds a bootinfo.txt file. Remove a
printf in ofwboot.
 1.2.12.2 23-Mar-2008  matt sync with HEAD
 1.2.12.1 24-Jan-2008  matt file mkbootinfo.sh was added on branch matt-armv6 on 2008-03-23 02:04:15 +0000
 1.2.4.2 18-Feb-2008  mjf Sync with HEAD.
 1.2.4.1 24-Jan-2008  mjf file mkbootinfo.sh was added on branch mjf-devfs on 2008-02-18 21:04:54 +0000
 1.2.2.2 04-Feb-2008  yamt sync with head.
 1.2.2.1 24-Jan-2008  yamt file mkbootinfo.sh was added on branch yamt-lazymbuf on 2008-02-04 09:22:19 +0000
 1.1 23-Jan-2008  garbled branches: 1.1.2; 1.1.4; 1.1.12;
Add a new mkbootinfo.sh script that builds a bootinfo.txt file. Remove a
printf in ofwboot.
 1.1.12.2 23-Mar-2008  matt sync with HEAD
 1.1.12.1 23-Jan-2008  matt file netbsd.chrp was added on branch matt-armv6 on 2008-03-23 02:04:15 +0000
 1.1.4.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.4.1 23-Jan-2008  mjf file netbsd.chrp was added on branch mjf-devfs on 2008-02-18 21:04:54 +0000
 1.1.2.2 04-Feb-2008  yamt sync with head.
 1.1.2.1 23-Jan-2008  yamt file netbsd.chrp was added on branch yamt-lazymbuf on 2008-02-04 09:22:20 +0000
 1.23 20-Sep-2014  phx A stack size of 8K is too small for a block buffer of 65536 bytes.
Increased the stack size to 128K. This makes ofwboot work with FirmWorks
OpenFirmware systems again (tested with Motorola PowerStack II).
 1.22 12-Jan-2009  tsutsui branches: 1.22.24; 1.22.40;
WARNSfy
 1.21 12-Feb-2008  garbled branches: 1.21.6; 1.21.10; 1.21.18;
Add a very quick and simple hack to allow ofwboot to be compiled into a
program that dumps the entire ofw device tree automatically. I needed
this functionality to collect ofw dumps from users, and it doesn't hurt
to just commit it, as it's all protected inside a #ifdef OFWDUMP.
 1.20 24-Jan-2008  garbled Add padding to align the rodata section. This fixes a strange bug
where the bootloader would freak out if various printfs were enabled or
disabled.

Add code to autodetect a 64bit cpu, and attempt to load a different set
of kernels if they exist.

Bump version to 1.9
 1.19 23-Jan-2008  garbled Add a new mkbootinfo.sh script that builds a bootinfo.txt file. Remove a
printf in ofwboot.
 1.18 09-Jan-2008  garbled Changes to the ofppc ofwboot to make it boot on an IBM CHRP RS/6000.
Tested on a pegasos II and a 7044-270. Also, switch away from the hacked
up alloc.c we were using, and use the stock libsa one.
 1.17 24-Nov-2007  jmmv branches: 1.17.6;
Fix a typo in a comment, and while here also drop trailing whitespace.
 1.16 17-Oct-2007  garbled branches: 1.16.2;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.15 21-May-2007  tsutsui branches: 1.15.8; 1.15.10;
- convert to register prefixes
- zero out BSS before we start calling into C code instead of memset()
(pulled from macppc/stand/ofwboot/Locore.c rev 1.16)
 1.14 27-Jan-2006  uwe branches: 1.14.28; 1.14.30; 1.14.36;
Tell gcc that startup and stack are used.
 1.13 24-Dec-2005  perry branches: 1.13.2;
bare asm -> __asm
 1.12 11-Dec-2005  christos merge ktrace-lwp.
 1.11 08-Oct-2003  simonb branches: 1.11.16;
Don't use multi-line strings (keeps gcc331 happy).
 1.10 14-Jul-2003  aymeric . ANSIfy a bit more
. use the boot_entry_t type for the entry point

Makes ofwboot compile with -Wmissing-prototypes -Wstrict-prototypes, as
suggested by Chuck Silvers in a private e-mail.
 1.9 26-Jun-2003  aymeric branches: 1.9.2;
. ANSIfy
. Fix a missing return
. replace %x by %p to print pointers in OFW_DEBUG printf's
 1.8 25-Oct-2002  briggs Double the amount of stack space for ofwboot.
 1.7 18-Sep-2002  chs add OF_boot(), call it if the user says "reboot".
try loading "netbsd.ofppc" first, to allow sharing root fs.
 1.6 23-Oct-2001  thorpej branches: 1.6.4;
Clean up the NetBSD/ofppc boot loader:
- Garbage collect some cruft that doesn't apply to the ofppc port.
- Make our OFW-friendly alloc.c more like the libsa alloc.c
- Generally reduce some differences where we can between this
boot loader and the NetBSD/macppc boot loader.
- Use libsa's loadfile().
- Fix DDB symbol loading -- Add a magic number after the args string
so the kernel knows the symbols are there, provide both ssym and
esym, and make sure all these values are aligned to a 4-byte boundary.
- Add support for MS-DOS file systems.
 1.5 17-Jan-2001  ws branches: 1.5.4;
Increase stack size to make this work again.
 1.4 22-Feb-1998  mycroft branches: 1.4.14;
Clean up #include paths.
Copy prom2boot() from kernel source.
rename _rtt() to OF_exit(), and add a _rtt() that calls it.
 1.3 28-Apr-1997  mycroft A handle of 0 means the open failed...
 1.2 28-Apr-1997  mycroft DTRT if OF_read() returns 0 when no data is available.
 1.1 16-Apr-1997  thorpej New OpenFirmware boot code for NetBSD/powerpc, based on Wolfgang's original
NetBSD/powerpc boot program. Highligts:
- Rearrange a bit so that we can sanely add boot programs for
non-OpenFirmware systems.
- Add support for loading compressed kernels (for booting from
1.44M floppies).
- Add support for loading Elf kernels (Elf is the new standard format
for NetBSD/powerpc). (XXX Don't load symbols right now - the code
to do it is there, but I don't particularly like how space for the
symbol table is allocated; I will revisit this soon'ish).
 1.4.14.1 11-Feb-2001  bouyer Sync with HEAD.
 1.5.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.5.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.6.4.3 11-Nov-2002  nathanw Catch up to -current
 1.6.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.6.4.1 23-Oct-2001  nathanw file Locore.c was added on branch nathanw_sa on 2002-10-18 02:39:20 +0000
 1.9.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.2.1 03-Aug-2004  skrll Sync with HEAD
 1.11.16.6 27-Feb-2008  yamt sync with head.
 1.11.16.5 04-Feb-2008  yamt sync with head.
 1.11.16.4 21-Jan-2008  yamt sync with head
 1.11.16.3 07-Dec-2007  yamt sync with head
 1.11.16.2 03-Sep-2007  yamt sync with head.
 1.11.16.1 21-Jun-2006  yamt sync with head.
 1.13.2.1 01-Feb-2006  yamt sync with head.
 1.14.36.1 22-May-2007  matt Update to HEAD.
 1.14.30.1 11-Jul-2007  mjf Sync with head.
 1.14.28.2 03-Dec-2007  ad Sync with HEAD.
 1.14.28.1 27-May-2007  ad Sync with head.
 1.15.10.3 23-Mar-2008  matt sync with HEAD
 1.15.10.2 09-Jan-2008  matt sync with HEAD
 1.15.10.1 06-Nov-2007  matt sync with HEAD
 1.15.8.1 27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.16.2.2 18-Feb-2008  mjf Sync with HEAD.
 1.16.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.17.6.1 10-Jan-2008  bouyer Sync with HEAD
 1.21.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.21.10.1 04-May-2009  yamt sync with head.
 1.21.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.22.40.1 22-Sep-2014  martin Pull up following revision(s) (requested by phx in ticket #114):
sys/arch/ofppc/stand/ofwboot/ofwstart.S: revision 1.4
sys/arch/ofppc/stand/ofwboot/Locore.c: revision 1.23
sys/arch/ofppc/stand/ofwboot/version: revision 1.13
A stack size of 8K is too small for a block buffer of 65536 bytes.
Increased the stack size to 128K. This makes ofwboot work with FirmWorks
OpenFirmware systems again (tested with Motorola PowerStack II).
 1.22.24.1 03-Dec-2017  jdolecek update from HEAD
 1.32 08-Apr-2017  christos centralize vers.c building for standalone programs.
 1.31 10-Aug-2014  joerg branches: 1.31.4; 1.31.8; 1.31.12;
Put GCC/GAS specific options under ACTIVE_CC == "gcc".
 1.30 08-Aug-2014  joerg Don't set -mmultiple or -mno-string for PowerPC, the difference is too
small to really matter and it sometimes even increases the size.
 1.29 12-Jan-2014  tsutsui branches: 1.29.2;
Add empty LIBCRTI= as LIBCRT0 to build sa programs without installed DESTDIR.

XXX: probabry we should have bsd.saprog.mk or something.
 1.28 21-Aug-2013  matt Use <bsd.klinks.mk>
Add ${_MKTARGET_LINK}
 1.27 24-Jan-2011  joerg branches: 1.27.4; 1.27.14; 1.27.18;
Ensure that NOMAN is defined earlier.
 1.26 22-Jan-2011  joerg 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.25 11-Sep-2009  phx branches: 1.25.4; 1.25.6; 1.25.8;
Added support for RDB partitions.
Moved MBR parition code out of ofdev.c into mbr.c.
Tested on Pegasos2 (RDB and MBR) and RS6000.
 1.24 12-Jan-2009  tsutsui WARNSfy
 1.23 13-Feb-2008  garbled branches: 1.23.6; 1.23.10; 1.23.18;
Add support to ofwboot for booting on the 7046-B50. Also likely to work
on the 7043-150. The B50 wants not only a note at the head of the
binary, like the 7044 did, but it also wants a PHDR that points at it.
Because the IBM firmware doesn't like the real note section that ld
generates (it puts it at the end of the file), we instead point PT_NOTE
at the text section. This works, because at the top of the text section,
there is a note hacked in, which was required for the 7044.

Also, change the mode from virtual mode to real mode in the note, because
the B50 hangs if you load it in virtual. Tested to work on a B50, 7044,
and Pegasos2.

Yay IBM.
 1.22 12-Feb-2008  garbled Add a very quick and simple hack to allow ofwboot to be compiled into a
program that dumps the entire ofw device tree automatically. I needed
this functionality to collect ofw dumps from users, and it doesn't hurt
to just commit it, as it's all protected inside a #ifdef OFWDUMP.
 1.21 09-Jan-2008  garbled Changes to the ofppc ofwboot to make it boot on an IBM CHRP RS/6000.
Tested on a pegasos II and a 7044-270. Also, switch away from the hacked
up alloc.c we were using, and use the stock libsa one.
 1.20 17-Oct-2007  garbled branches: 1.20.2; 1.20.8;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.19 21-May-2007  tsutsui branches: 1.19.10;
Add src/common/include to -I include path so that ofwboot build
without installed headers in DESTDIR.
 1.18 11-Dec-2005  christos branches: 1.18.30; 1.18.32; 1.18.38;
merge ktrace-lwp.
 1.17 26-Oct-2003  lukem branches: 1.17.16;
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.16 24-Oct-2003  matt Make this work with R/O source trees.
 1.15 08-Oct-2003  simonb Use -ffreestanding.
Define LIB{CRT0,C,CRTBEGIN,CRTEND} as nothing, we don't need to link
against them.
 1.14 21-Sep-2002  chs branches: 1.14.6;
tidy a bit.
 1.13 18-Sep-2002  chs build ofwboot as an ELF binary.
 1.12 18-Jun-2002  itojun avoid hardcoding MBR_MAGICOFF and MBR_MAGIC.
 1.11 12-Dec-2001  tv branches: 1.11.8;
MKfoo=no -> NOfoo
 1.10 23-Oct-2001  thorpej branches: 1.10.4;
Clean up the NetBSD/ofppc boot loader:
- Garbage collect some cruft that doesn't apply to the ofppc port.
- Make our OFW-friendly alloc.c more like the libsa alloc.c
- Generally reduce some differences where we can between this
boot loader and the NetBSD/macppc boot loader.
- Use libsa's loadfile().
- Fix DDB symbol loading -- Add a magic number after the args string
so the kernel knows the symbols are there, provide both ssym and
esym, and make sure all these values are aligned to a 4-byte boundary.
- Add support for MS-DOS file systems.
 1.9 07-Aug-2000  jdolecek branches: 1.9.4;
convert to use conf/newvers_stand.sh, minor Makefile adjustments
 1.8 23-Jan-2000  mycroft Clean up the machine symlink stuff ever so slightly. Needs to be
standardized between files.
 1.7 12-Oct-1999  wrstuden branches: 1.7.2;
Make symlink for powerpc@.
 1.6 13-Feb-1999  lukem branches: 1.6.8;
convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.5 09-Jun-1998  sakamoto Use PowerPC-generic stuff and eliminate the powermac portion.
 1.4 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.3 02-Mar-1998  drochner enable compatibility for old partition ID per default
 1.2 17-Apr-1997  thorpej STRIP -> STRIPFLAG
 1.1 16-Apr-1997  thorpej New OpenFirmware boot code for NetBSD/powerpc, based on Wolfgang's original
NetBSD/powerpc boot program. Highligts:
- Rearrange a bit so that we can sanely add boot programs for
non-OpenFirmware systems.
- Add support for loading compressed kernels (for booting from
1.44M floppies).
- Add support for loading Elf kernels (Elf is the new standard format
for NetBSD/powerpc). (XXX Don't load symbols right now - the code
to do it is there, but I don't particularly like how space for the
symbol table is allocated; I will revisit this soon'ish).
 1.6.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.7.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.3 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.9.4.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.9.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.10.4.4 18-Oct-2002  nathanw Catch up to -current.
 1.10.4.3 20-Jun-2002  nathanw Catch up to -current.
 1.10.4.2 08-Jan-2002  nathanw Catch up to -current.
 1.10.4.1 23-Oct-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-01-08 00:27:01 +0000
 1.11.8.1 16-Jul-2002  gehenna catch up with -current.
 1.14.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.14.6.1 03-Aug-2004  skrll Sync with HEAD
 1.17.16.3 27-Feb-2008  yamt sync with head.
 1.17.16.2 21-Jan-2008  yamt sync with head
 1.17.16.1 03-Sep-2007  yamt sync with head.
 1.18.38.1 22-May-2007  matt Update to HEAD.
 1.18.32.1 11-Jul-2007  mjf Sync with head.
 1.18.30.1 27-May-2007  ad Sync with head.
 1.19.10.2 23-Mar-2008  matt sync with HEAD
 1.19.10.1 06-Nov-2007  matt sync with HEAD
 1.20.8.1 10-Jan-2008  bouyer Sync with HEAD
 1.20.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.23.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.23.10.2 16-Sep-2009  yamt sync with head
 1.23.10.1 04-May-2009  yamt sync with head.
 1.23.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.25.8.1 08-Feb-2011  bouyer Sync with HEAD
 1.25.6.1 06-Jun-2011  jruoho Sync with HEAD.
 1.25.4.1 05-Mar-2011  rmind sync with head
 1.27.18.2 18-May-2014  rmind sync with head
 1.27.18.1 28-Aug-2013  rmind sync with head
 1.27.14.2 03-Dec-2017  jdolecek update from HEAD
 1.27.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.27.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.29.2.1 10-Aug-2014  tls Rebase.
 1.31.12.1 21-Apr-2017  bouyer Sync with HEAD
 1.31.8.1 26-Apr-2017  pgoyette Sync with HEAD
 1.31.4.1 28-Aug-2017  skrll Sync with HEAD
 1.8 09-Jan-2008  garbled Changes to the ofppc ofwboot to make it boot on an IBM CHRP RS/6000.
Tested on a pegasos II and a 7044-270. Also, switch away from the hacked
up alloc.c we were using, and use the stock libsa one.
 1.7 27-Jan-2006  uwe branches: 1.7.48; 1.7.54; 1.7.62;
Sync with macppc version. Cosmetic changes mostly.
 1.6 25-Jan-2006  christos free -> dealloc
unsigned -> size_t for alloc/dealloc
 1.5 26-Jun-2003  aymeric branches: 1.5.18; 1.5.30;
ANSIfy
 1.4 23-Oct-2001  thorpej branches: 1.4.4;
Clean up the NetBSD/ofppc boot loader:
- Garbage collect some cruft that doesn't apply to the ofppc port.
- Make our OFW-friendly alloc.c more like the libsa alloc.c
- Generally reduce some differences where we can between this
boot loader and the NetBSD/macppc boot loader.
- Use libsa's loadfile().
- Fix DDB symbol loading -- Add a magic number after the args string
so the kernel knows the symbols are there, provide both ssym and
esym, and make sure all these values are aligned to a 4-byte boundary.
- Add support for MS-DOS file systems.
 1.3 22-Feb-1998  mycroft branches: 1.3.28;
Clean up #include paths.
Copy prom2boot() from kernel source.
rename _rtt() to OF_exit(), and add a _rtt() that calls it.
 1.2 05-Oct-1997  thorpej Copyright assigned to The NetBSD Foundation.
 1.1 16-Apr-1997  thorpej branches: 1.1.4;
New OpenFirmware boot code for NetBSD/powerpc, based on Wolfgang's original
NetBSD/powerpc boot program. Highligts:
- Rearrange a bit so that we can sanely add boot programs for
non-OpenFirmware systems.
- Add support for loading compressed kernels (for booting from
1.44M floppies).
- Add support for loading Elf kernels (Elf is the new standard format
for NetBSD/powerpc). (XXX Don't load symbols right now - the code
to do it is there, but I don't particularly like how space for the
symbol table is allocated; I will revisit this soon'ish).
 1.1.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.3.28.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.4.2 23-Oct-2001  thorpej Clean up the NetBSD/ofppc boot loader:
- Garbage collect some cruft that doesn't apply to the ofppc port.
- Make our OFW-friendly alloc.c more like the libsa alloc.c
- Generally reduce some differences where we can between this
boot loader and the NetBSD/macppc boot loader.
- Use libsa's loadfile().
- Fix DDB symbol loading -- Add a magic number after the args string
so the kernel knows the symbols are there, provide both ssym and
esym, and make sure all these values are aligned to a 4-byte boundary.
- Add support for MS-DOS file systems.
 1.4.4.1 23-Oct-2001  thorpej file alloc.c was added on branch nathanw_sa on 2001-10-23 03:31:27 +0000
 1.5.30.1 01-Feb-2006  yamt sync with head.
 1.5.18.2 21-Jan-2008  yamt sync with head
 1.5.18.1 21-Jun-2006  yamt sync with head.
 1.7.62.1 10-Jan-2008  bouyer Sync with HEAD
 1.7.54.1 18-Feb-2008  mjf Sync with HEAD.
 1.7.48.1 23-Mar-2008  matt sync with HEAD
 1.2 09-Jan-2008  garbled Remove alloc.h too, no longer needed.
 1.1 26-Jun-2003  aymeric branches: 1.1.18; 1.1.80; 1.1.86; 1.1.94;
declare functions from corresponding C file
 1.1.94.1 10-Jan-2008  bouyer Sync with HEAD
 1.1.86.1 18-Feb-2008  mjf Sync with HEAD.
 1.1.80.1 23-Mar-2008  matt sync with HEAD
 1.1.18.1 21-Jan-2008  yamt sync with head
 1.25 15-Sep-2020  mrg partial port to powerpc64.
 1.24 11-Jun-2016  dholland PR 51200 gets in libsa considered harmful: use kgets
 1.23 22-Jan-2011  joerg branches: 1.23.14; 1.23.32;
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.22 12-Jan-2009  tsutsui branches: 1.22.6; 1.22.8; 1.22.10;
WARNSfy
 1.21 28-Apr-2008  martin branches: 1.21.8;
Remove clause 3 and 4 from TNF licenses
 1.20 12-Feb-2008  garbled branches: 1.20.6; 1.20.8; 1.20.10;
Add a very quick and simple hack to allow ofwboot to be compiled into a
program that dumps the entire ofw device tree automatically. I needed
this functionality to collect ofw dumps from users, and it doesn't hurt
to just commit it, as it's all protected inside a #ifdef OFWDUMP.
 1.19 24-Jan-2008  garbled Add padding to align the rodata section. This fixes a strange bug
where the bootloader would freak out if various printfs were enabled or
disabled.

Add code to autodetect a 64bit cpu, and attempt to load a different set
of kernels if they exist.

Bump version to 1.9
 1.18 09-Jan-2008  garbled Remove alloc.h too, no longer needed.
 1.17 09-Jan-2008  garbled Changes to the ofppc ofwboot to make it boot on an IBM CHRP RS/6000.
Tested on a pegasos II and a 7044-270. Also, switch away from the hacked
up alloc.c we were using, and use the stock libsa one.
 1.16 18-Oct-2007  garbled branches: 1.16.2; 1.16.8;
Update the bootloader to work with the ofwoea_initppc code used by macppc
 1.15 11-Dec-2005  christos branches: 1.15.30; 1.15.48; 1.15.50; 1.15.54;
merge ktrace-lwp.
 1.14 14-Jul-2003  aymeric branches: 1.14.16;
. ANSIfy a bit more
. use the boot_entry_t type for the entry point

Makes ofwboot compile with -Wmissing-prototypes -Wstrict-prototypes, as
suggested by Chuck Silvers in a private e-mail.
 1.13 26-Jun-2003  aymeric branches: 1.13.2;
. ANSIfy
. include alloc.h
. while there, fix a bug in prom2boot() introduced in rev. 1.11
 1.12 18-Sep-2002  chs add OF_boot(), call it if the user says "reboot".
try loading "netbsd.ofppc" first, to allow sharing root fs.
 1.11 23-Oct-2001  thorpej branches: 1.11.4;
Clean up the NetBSD/ofppc boot loader:
- Garbage collect some cruft that doesn't apply to the ofppc port.
- Make our OFW-friendly alloc.c more like the libsa alloc.c
- Generally reduce some differences where we can between this
boot loader and the NetBSD/macppc boot loader.
- Use libsa's loadfile().
- Fix DDB symbol loading -- Add a magic number after the args string
so the kernel knows the symbols are there, provide both ssym and
esym, and make sure all these values are aligned to a 4-byte boundary.
- Add support for MS-DOS file systems.
 1.10 22-Jul-2001  wiz bcopy -> memcpy, bzero -> memset
 1.9 03-May-2001  soren branches: 1.9.2;
PPC machine type tags haven't been used for a while.
 1.8 17-Jan-2001  ws branches: 1.8.2;
Don't claim the memory for the executable from the firmware.
Some implementations seemed to do strange mappings as a result of it.
 1.7 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.6 25-Oct-1999  kleink Update to match new SVR4-style definition names in <sys/exec_elf.h>.
 1.5 17-Apr-1999  ws branches: 1.5.2; 1.5.4; 1.5.6;
Modify syncicache on PowerPC from an inline to a real function.
Support different cache line sizes with the same object code in userland.
While here, move the function to implementation name space.
 1.4 22-Feb-1998  mycroft branches: 1.4.10;
Clean up #include paths.
Copy prom2boot() from kernel source.
rename _rtt() to OF_exit(), and add a _rtt() that calls it.
 1.3 27-Jan-1998  sakamoto Fix PR/4679:missing cast, from SUNAGAWA Keiki.
 1.2 05-Oct-1997  thorpej Copyright assigned to The NetBSD Foundation.
 1.1 16-Apr-1997  thorpej branches: 1.1.4;
New OpenFirmware boot code for NetBSD/powerpc, based on Wolfgang's original
NetBSD/powerpc boot program. Highligts:
- Rearrange a bit so that we can sanely add boot programs for
non-OpenFirmware systems.
- Add support for loading compressed kernels (for booting from
1.44M floppies).
- Add support for loading Elf kernels (Elf is the new standard format
for NetBSD/powerpc). (XXX Don't load symbols right now - the code
to do it is there, but I don't particularly like how space for the
symbol table is allocated; I will revisit this soon'ish).
 1.1.4.1 14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.4.10.1 21-Jun-1999  thorpej Sync w/ -current.
 1.5.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.4.1 15-Nov-1999  fvdl Sync with -current
 1.5.2.2 11-Feb-2001  bouyer Sync with HEAD.
 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.8.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.9.2.3 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.9.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.9.2.1 03-Aug-2001  lukem update to -current
 1.11.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.11.4.1 23-Oct-2001  nathanw file boot.c was added on branch nathanw_sa on 2002-10-18 02:39:20 +0000
 1.13.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.13.2.1 03-Aug-2004  skrll Sync with HEAD
 1.14.16.4 27-Feb-2008  yamt sync with head.
 1.14.16.3 04-Feb-2008  yamt sync with head.
 1.14.16.2 21-Jan-2008  yamt sync with head
 1.14.16.1 27-Oct-2007  yamt sync with head.
 1.15.54.1 25-Oct-2007  bouyer Sync with HEAD.
 1.15.50.2 23-Mar-2008  matt sync with HEAD
 1.15.50.1 06-Nov-2007  matt sync with HEAD
 1.15.48.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.15.30.1 23-Oct-2007  ad Sync with head.
 1.16.8.1 10-Jan-2008  bouyer Sync with HEAD
 1.16.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.20.10.2 04-May-2009  yamt sync with head.
 1.20.10.1 16-May-2008  yamt sync with head.
 1.20.8.1 18-May-2008  yamt sync with head.
 1.20.6.2 17-Jan-2009  mjf Sync with HEAD.
 1.20.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.21.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.22.10.1 08-Feb-2011  bouyer Sync with HEAD
 1.22.8.1 06-Jun-2011  jruoho Sync with HEAD.
 1.22.6.1 05-Mar-2011  rmind sync with head
 1.23.32.1 09-Jul-2016  skrll Sync with HEAD
 1.23.14.1 03-Dec-2017  jdolecek update from HEAD
 1.1 14-Jul-2003  aymeric branches: 1.1.4;
. prototype for main()
. typedef boot_entry_t to be the prototype of the kernel entry point
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 14-Jul-2003  skrll file boot.h was added on branch ktrace-lwp on 2004-08-03 10:38:46 +0000
 1.1 13-Feb-2008  garbled branches: 1.1.2; 1.1.10; 1.1.12;
Add support to ofwboot for booting on the 7046-B50. Also likely to work
on the 7043-150. The B50 wants not only a note at the head of the
binary, like the 7044 did, but it also wants a PHDR that points at it.
Because the IBM firmware doesn't like the real note section that ld
generates (it puts it at the end of the file), we instead point PT_NOTE
at the text section. This works, because at the top of the text section,
there is a note hacked in, which was required for the 7044.

Also, change the mode from virtual mode to real mode in the note, because
the B50 hangs if you load it in virtual. Tested to work on a B50, 7044,
and Pegasos2.

Yay IBM.
 1.1.12.2 23-Mar-2008  matt sync with HEAD
 1.1.12.1 13-Feb-2008  matt file ldscript was added on branch matt-armv6 on 2008-03-23 02:04:15 +0000
 1.1.10.2 27-Feb-2008  yamt sync with head.
 1.1.10.1 13-Feb-2008  yamt file ldscript was added on branch yamt-lazymbuf on 2008-02-27 08:36:23 +0000
 1.1.2.2 18-Feb-2008  mjf Sync with HEAD.
 1.1.2.1 13-Feb-2008  mjf file ldscript was added on branch mjf-devfs on 2008-02-18 21:04:54 +0000
 1.6 17-May-2021  mrg include libkern.h for moved dkcksum().
 1.5 30-Mar-2016  christos branches: 1.5.34; 1.5.36;
PR/51015: David Binderman: remove useless code
 1.4 02-Feb-2012  phx branches: 1.4.6; 1.4.24;
Fixed writing of MBR disklabel. It was written by disklabel(8) -r directly
into sector 0, corrupting the MBR. Moved to sector 1.
Removed MBR_LABELSECTOR, which is no longer needed.
 1.3 21-Aug-2011  phx branches: 1.3.2; 1.3.6;
When there is no NetBSD MBR partition with a valid disklabel, look for
the first FAT partition and construct a disklabel with an MSDOS filesystem
in partition 'a'.
 1.2 18-Aug-2011  phx Finding the disklabel on MBR partitioned disks did no longer work since RDB
support was added. Fixed that and bumped the version to 1.12.
 1.1 11-Sep-2009  phx branches: 1.1.2;
Added support for RDB partitions.
Moved MBR parition code out of ofdev.c into mbr.c.
Tested on Pegasos2 (RDB and MBR) and RS6000.
 1.1.2.2 16-Sep-2009  yamt sync with head
 1.1.2.1 11-Sep-2009  yamt file mbr.c was added on branch yamt-nfs-mp on 2009-09-16 13:37:41 +0000
 1.3.6.1 18-Feb-2012  mrg merge to -current.
 1.3.2.1 17-Apr-2012  yamt sync with head
 1.4.24.1 22-Apr-2016  skrll Sync with HEAD
 1.4.6.1 03-Dec-2017  jdolecek update from HEAD
 1.5.36.1 31-May-2021  cjep sync with head
 1.5.34.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.1 11-Sep-2009  phx branches: 1.1.2;
Added support for RDB partitions.
Moved MBR parition code out of ofdev.c into mbr.c.
Tested on Pegasos2 (RDB and MBR) and RS6000.
 1.1.2.2 16-Sep-2009  yamt sync with head
 1.1.2.1 11-Sep-2009  yamt file mbr.h was added on branch yamt-nfs-mp on 2009-09-16 13:37:41 +0000
 1.7 12-Apr-2021  mrg remove shadowed (common) declarations of various libsa variables
from various boot programs. for macppc and zaurus, avoid building
with -fcommon any more.
 1.6 26-Jun-2003  aymeric branches: 1.6.208;
. ANSIfy
. include the needed headers
. net_mountroot() becomes static
 1.5 13-Mar-2003  drochner Remove remaining uses of libsa/netif -- the "netif" structure was only
used to lookup a "struct of_dev", everything else was ballast.
Do it straightforward now and assign the ofdev directly to io_netif.
 1.4 07-May-1999  drochner include <lib/libkern/libkern.h> for intoa()/inet_ntoa()
 1.3 22-Feb-1998  mycroft branches: 1.3.10;
Clean up #include paths.
Copy prom2boot() from kernel source.
rename _rtt() to OF_exit(), and add a _rtt() that calls it.
 1.2 22-Jul-1997  drochner Don't use <lib/libsa/if_ether.h> anymore. This was a copy of the
old (before ARP changes) <netinet/if_ether.h>, intended for
temporary use.
 1.1 16-Apr-1997  thorpej New OpenFirmware boot code for NetBSD/powerpc, based on Wolfgang's original
NetBSD/powerpc boot program. Highligts:
- Rearrange a bit so that we can sanely add boot programs for
non-OpenFirmware systems.
- Add support for loading compressed kernels (for booting from
1.44M floppies).
- Add support for loading Elf kernels (Elf is the new standard format
for NetBSD/powerpc). (XXX Don't load symbols right now - the code
to do it is there, but I don't particularly like how space for the
symbol table is allocated; I will revisit this soon'ish).
 1.3.10.1 21-Jun-1999  thorpej Sync w/ -current.
 1.6.208.1 17-Apr-2021  thorpej Sync with HEAD.
 1.1 26-Jun-2003  aymeric declare functions from corresponding C file
 1.9 17-Jan-2009  he Follow up the time_t -> saseconds_t or satime_t type changes by
changing the signatures of netif_get() and getsecs() appropriately.
 1.8 12-Jan-2009  tsutsui WARNSfy
 1.7 26-Jun-2003  aymeric branches: 1.7.104; 1.7.108; 1.7.116;
ANSIfy
 1.6 13-Mar-2003  drochner Remove remaining uses of libsa/netif -- the "netif" structure was only
used to lookup a "struct of_dev", everything else was ballast.
Do it straightforward now and assign the ofdev directly to io_netif.
 1.5 22-Jul-2001  wiz branches: 1.5.6;
bcopy -> memcpy, bzero -> memset
 1.4 22-Feb-1998  mycroft branches: 1.4.28;
Clean up #include paths.
Copy prom2boot() from kernel source.
rename _rtt() to OF_exit(), and add a _rtt() that calls it.
 1.3 22-Jul-1997  drochner Don't use <lib/libsa/if_ether.h> anymore. This was a copy of the
old (before ARP changes) <netinet/if_ether.h>, intended for
temporary use.
 1.2 28-Apr-1997  mycroft DTRT if OF_read() returns 0 when no data is available.
 1.1 16-Apr-1997  thorpej New OpenFirmware boot code for NetBSD/powerpc, based on Wolfgang's original
NetBSD/powerpc boot program. Highligts:
- Rearrange a bit so that we can sanely add boot programs for
non-OpenFirmware systems.
- Add support for loading compressed kernels (for booting from
1.44M floppies).
- Add support for loading Elf kernels (Elf is the new standard format
for NetBSD/powerpc). (XXX Don't load symbols right now - the code
to do it is there, but I don't particularly like how space for the
symbol table is allocated; I will revisit this soon'ish).
 1.4.28.1 03-Aug-2001  lukem update to -current
 1.5.6.2 22-Jul-2001  wiz bcopy -> memcpy, bzero -> memset
 1.5.6.1 22-Jul-2001  wiz file netif_of.c was added on branch nathanw_sa on 2001-07-22 14:43:16 +0000
 1.7.116.1 19-Jan-2009  skrll Sync with HEAD.
 1.7.108.1 04-May-2009  yamt sync with head.
 1.7.104.1 17-Jan-2009  mjf Sync with HEAD.
 1.1 13-Mar-2003  drochner Remove remaining uses of libsa/netif -- the "netif" structure was only
used to lookup a "struct of_dev", everything else was ballast.
Do it straightforward now and assign the ofdev directly to io_netif.
 1.19 21-Aug-2011  phx Fixed booting from disks without a valid disklabel (e.g. CDROM). This
became broken with my last changes in rev.1.18..
 1.18 18-Aug-2011  phx Finding the disklabel on MBR partitioned disks did no longer work since RDB
support was added. Fixed that and bumped the version to 1.12.
 1.17 11-Sep-2009  phx Added support for RDB partitions.
Moved MBR parition code out of ofdev.c into mbr.c.
Tested on Pegasos2 (RDB and MBR) and RS6000.
 1.16 12-Jan-2009  tsutsui WARNSfy
 1.15 03-Jan-2008  mrg branches: 1.15.6; 1.15.10; 1.15.18;
support FS_RAID partitions, and increase the offset by
RF_PROTECTED_SECTORS (64) if so.
 1.14 28-Jun-2006  he branches: 1.14.34; 1.14.40; 1.14.48;
Make devsw non-static to match libsa/stand.h.
 1.13 11-Dec-2005  christos branches: 1.13.4; 1.13.8; 1.13.16;
merge ktrace-lwp.
 1.12 23-Jun-2005  junyoung branches: 1.12.2;
Use FS_OPS() macro.
 1.11 08-Oct-2003  lukem Overhaul MBR handling (part 1):

<sys/bootblock.h>:
* Added definitions for the Master Boot Record (MBR) used by
a variety of systems (primarily i386), including the format
of the BIOS Parameter Block (BPB).
This information was cribbed from a variety of sources
including <sys/disklabel_mbr.h> which this is a superset of.

As part of this, some data structure elements and #defines
were renamed to be more "namespace friendly" and consistent
with other bootblocks and MBR documentation.
Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
* Deprecated in favor of <sys/bootblock.h> (the latter is more
"host tool" friendly).

amd64 & i386:
* Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
be consistent with the naming convention of the msdosfs tools.

* Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
and it's confusing to have two functionally equivalent bootblocks,
especially given that "ufs" has multiple meanings (it could be
a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

* Rework pbr.S (the first sector of bootxx_*):
+ Ensure that BPB (bytes 11..89) and the partition table
(bytes 446..509) do not contain code.
+ Add support for booting from FAT partitions if BOOT_FROM_FAT
is defined. (Only set for bootxx_msdos).
+ Remove "dummy" partition 3; if people want to installboot(8)
these to the start of the disk they can use fdisk(8) to
create a real MBR partition table...
+ Compile with TERSE_ERROR so it fits because of the above.
Whilst this is less user friendly, I feel it's important
to have a valid partition table and BPB in the MBR/PBR.

* Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
with other platforms.

* Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
we can boot off FAT partitions.

* Crank version of /usr/mdec/boot to 3.1, and fix some of the other
entries in the version file.

installboot(8) (i386):
* Read the existing MBR of the filesystem and retain the BIOS
Parameter Block (BPB) in bytes 11..89 and the MBR partition
table in bytes 446..509. (Previously installboot(8) would
trash those two sections of the MBR.)

mbrlabel(8):
* Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
 1.10 08-Oct-2003  simonb Use <lib/libkern/libkern.h> for str*() prototypes instead of the userland
header <string.h>.
 1.9 26-Jun-2003  aymeric branches: 1.9.2;
. ANSIfy
. include needed headers
. fix a couple of warnings
 1.8 18-Sep-2002  chs fix parsing of pathnames with a partition specifier.
reformat for readability.
 1.7 18-Jun-2002  itojun avoid hardcoding MBR_MAGICOFF and MBR_MAGIC.
 1.6 23-Oct-2001  thorpej branches: 1.6.4; 1.6.12;
Clean up the NetBSD/ofppc boot loader:
- Garbage collect some cruft that doesn't apply to the ofppc port.
- Make our OFW-friendly alloc.c more like the libsa alloc.c
- Generally reduce some differences where we can between this
boot loader and the NetBSD/macppc boot loader.
- Use libsa's loadfile().
- Fix DDB symbol loading -- Add a magic number after the args string
so the kernel knows the symbols are there, provide both ssym and
esym, and make sure all these values are aligned to a 4-byte boundary.
- Add support for MS-DOS file systems.
 1.5 22-Jul-2001  wiz bcopy -> memcpy, bzero -> memset
 1.4 12-Oct-1999  wrstuden branches: 1.4.14;
Catch up with sys/disklabel_mbr.h.
 1.3 02-Mar-1998  drochner branches: 1.3.14;
Change MBR partition type for NetBSD to 0xa9, like the i386 port.
Provide compatibility via COMPAT_386BSD_MBRPART.
 1.2 22-Feb-1998  mycroft Clean up #include paths.
Copy prom2boot() from kernel source.
rename _rtt() to OF_exit(), and add a _rtt() that calls it.
 1.1 16-Apr-1997  thorpej New OpenFirmware boot code for NetBSD/powerpc, based on Wolfgang's original
NetBSD/powerpc boot program. Highligts:
- Rearrange a bit so that we can sanely add boot programs for
non-OpenFirmware systems.
- Add support for loading compressed kernels (for booting from
1.44M floppies).
- Add support for loading Elf kernels (Elf is the new standard format
for NetBSD/powerpc). (XXX Don't load symbols right now - the code
to do it is there, but I don't particularly like how space for the
symbol table is allocated; I will revisit this soon'ish).
 1.3.14.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.4.14.4 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.4.14.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.4.14.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.14.1 03-Aug-2001  lukem update to -current
 1.6.12.1 16-Jul-2002  gehenna catch up with -current.
 1.6.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.6.4.2 20-Jun-2002  nathanw Catch up to -current.
 1.6.4.1 23-Oct-2001  nathanw file ofdev.c was added on branch nathanw_sa on 2002-06-20 03:40:26 +0000
 1.9.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.2.1 03-Aug-2004  skrll Sync with HEAD
 1.12.2.2 21-Jan-2008  yamt sync with head
 1.12.2.1 30-Dec-2006  yamt sync with head.
 1.13.16.1 13-Jul-2006  gdamore Merge from HEAD.
 1.13.8.1 11-Aug-2006  yamt sync with head
 1.13.4.1 09-Sep-2006  rpaulo sync with head
 1.14.48.1 08-Jan-2008  bouyer Sync with HEAD
 1.14.40.1 18-Feb-2008  mjf Sync with HEAD.
 1.14.34.1 09-Jan-2008  matt sync with HEAD
 1.15.18.1 19-Jan-2009  skrll Sync with HEAD.
 1.15.10.2 16-Sep-2009  yamt sync with head
 1.15.10.1 04-May-2009  yamt sync with head.
 1.15.6.1 17-Jan-2009  mjf Sync with HEAD.
 1.3 11-Sep-2009  phx Added support for RDB partitions.
Moved MBR parition code out of ofdev.c into mbr.c.
Tested on Pegasos2 (RDB and MBR) and RS6000.
 1.2 26-Jun-2003  aymeric branches: 1.2.108;
include <sys/types.h> so that this file can be included first/alone
 1.1 16-Apr-1997  thorpej New OpenFirmware boot code for NetBSD/powerpc, based on Wolfgang's original
NetBSD/powerpc boot program. Highligts:
- Rearrange a bit so that we can sanely add boot programs for
non-OpenFirmware systems.
- Add support for loading compressed kernels (for booting from
1.44M floppies).
- Add support for loading Elf kernels (Elf is the new standard format
for NetBSD/powerpc). (XXX Don't load symbols right now - the code
to do it is there, but I don't particularly like how space for the
symbol table is allocated; I will revisit this soon'ish).
 1.2.108.1 16-Sep-2009  yamt sync with head
 1.4 20-Sep-2014  phx A stack size of 8K is too small for a block buffer of 65536 bytes.
Increased the stack size to 128K. This makes ofwboot work with FirmWorks
OpenFirmware systems again (tested with Motorola PowerStack II).
 1.3 28-Apr-2008  martin branches: 1.3.44; 1.3.62;
Remove clause 3 and 4 from TNF licenses
 1.2 13-Feb-2008  garbled branches: 1.2.2; 1.2.8; 1.2.10; 1.2.12; 1.2.14;
Add support to ofwboot for booting on the 7046-B50. Also likely to work
on the 7043-150. The B50 wants not only a note at the head of the
binary, like the 7044 did, but it also wants a PHDR that points at it.
Because the IBM firmware doesn't like the real note section that ld
generates (it puts it at the end of the file), we instead point PT_NOTE
at the text section. This works, because at the top of the text section,
there is a note hacked in, which was required for the 7044.

Also, change the mode from virtual mode to real mode in the note, because
the B50 hangs if you load it in virtual. Tested to work on a B50, 7044,
and Pegasos2.

Yay IBM.
 1.1 09-Jan-2008  garbled branches: 1.1.2; 1.1.4;
Changes to the ofppc ofwboot to make it boot on an IBM CHRP RS/6000.
Tested on a pegasos II and a 7044-270. Also, switch away from the hacked
up alloc.c we were using, and use the stock libsa one.
 1.1.4.3 27-Feb-2008  yamt sync with head.
 1.1.4.2 21-Jan-2008  yamt sync with head
 1.1.4.1 09-Jan-2008  yamt file ofwstart.S was added on branch yamt-lazymbuf on 2008-01-21 09:37:56 +0000
 1.1.2.2 10-Jan-2008  bouyer Sync with HEAD
 1.1.2.1 09-Jan-2008  bouyer file ofwstart.S was added on branch bouyer-xeni386 on 2008-01-10 23:43:32 +0000
 1.2.14.1 16-May-2008  yamt sync with head.
 1.2.12.1 18-May-2008  yamt sync with head.
 1.2.10.2 23-Mar-2008  matt sync with HEAD
 1.2.10.1 13-Feb-2008  matt file ofwstart.S was added on branch matt-armv6 on 2008-03-23 02:04:15 +0000
 1.2.8.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.2.2 18-Feb-2008  mjf Sync with HEAD.
 1.2.2.1 13-Feb-2008  mjf file ofwstart.S was added on branch mjf-devfs on 2008-02-18 21:04:54 +0000
 1.3.62.1 22-Sep-2014  martin Pull up following revision(s) (requested by phx in ticket #114):
sys/arch/ofppc/stand/ofwboot/ofwstart.S: revision 1.4
sys/arch/ofppc/stand/ofwboot/Locore.c: revision 1.23
sys/arch/ofppc/stand/ofwboot/version: revision 1.13
A stack size of 8K is too small for a block buffer of 65536 bytes.
Increased the stack size to 128K. This makes ofwboot work with FirmWorks
OpenFirmware systems again (tested with Motorola PowerStack II).
 1.3.44.1 03-Dec-2017  jdolecek update from HEAD
 1.6 24-Dec-2007  perry Remove __attribute__((__noreturn__)) from things already marked __dead
Found by the department of redundancy department.
 1.5 11-Dec-2005  christos branches: 1.5.50; 1.5.60; 1.5.64;
merge ktrace-lwp.
 1.4 14-Jul-2003  aymeric branches: 1.4.16;
. ANSIfy a bit more
. use the boot_entry_t type for the entry point

Makes ofwboot compile with -Wmissing-prototypes -Wstrict-prototypes, as
suggested by Chuck Silvers in a private e-mail.
 1.3 18-Sep-2002  chs branches: 1.3.6;
add OF_boot(), call it if the user says "reboot".
try loading "netbsd.ofppc" first, to allow sharing root fs.
 1.2 22-Feb-1998  mycroft branches: 1.2.28; 1.2.32;
Clean up #include paths.
Copy prom2boot() from kernel source.
rename _rtt() to OF_exit(), and add a _rtt() that calls it.
 1.1 16-Apr-1997  thorpej New OpenFirmware boot code for NetBSD/powerpc, based on Wolfgang's original
NetBSD/powerpc boot program. Highligts:
- Rearrange a bit so that we can sanely add boot programs for
non-OpenFirmware systems.
- Add support for loading compressed kernels (for booting from
1.44M floppies).
- Add support for loading Elf kernels (Elf is the new standard format
for NetBSD/powerpc). (XXX Don't load symbols right now - the code
to do it is there, but I don't particularly like how space for the
symbol table is allocated; I will revisit this soon'ish).
 1.2.32.1 18-Oct-2002  nathanw Catch up to -current.
 1.2.28.1 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.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.6.1 03-Aug-2004  skrll Sync with HEAD
 1.4.16.1 21-Jan-2008  yamt sync with head
 1.5.64.1 02-Jan-2008  bouyer Sync with HEAD
 1.5.60.1 26-Dec-2007  ad Sync with head.
 1.5.50.1 09-Jan-2008  matt sync with HEAD
 1.3 17-May-2021  mrg include libkern.h for moved dkcksum().
 1.2 19-Jun-2010  kiyohara branches: 1.2.76; 1.2.78;
Support load from FAT.
 1.1 11-Sep-2009  phx branches: 1.1.2; 1.1.4; 1.1.6;
Added support for RDB partitions.
Moved MBR parition code out of ofdev.c into mbr.c.
Tested on Pegasos2 (RDB and MBR) and RS6000.
 1.1.6.1 03-Jul-2010  rmind sync with head
 1.1.4.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.1.2.3 11-Aug-2010  yamt sync with head.
 1.1.2.2 16-Sep-2009  yamt sync with head
 1.1.2.1 11-Sep-2009  yamt file rdb.c was added on branch yamt-nfs-mp on 2009-09-16 13:37:41 +0000
 1.2.78.1 31-May-2021  cjep sync with head
 1.2.76.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.1 11-Sep-2009  phx branches: 1.1.2;
Added support for RDB partitions.
Moved MBR parition code out of ofdev.c into mbr.c.
Tested on Pegasos2 (RDB and MBR) and RS6000.
 1.1.2.2 16-Sep-2009  yamt sync with head
 1.1.2.1 11-Sep-2009  yamt file rdb.h was added on branch yamt-nfs-mp on 2009-09-16 13:37:41 +0000
 1.13 20-Sep-2014  phx A stack size of 8K is too small for a block buffer of 65536 bytes.
Increased the stack size to 128K. This makes ofwboot work with FirmWorks
OpenFirmware systems again (tested with Motorola PowerStack II).
 1.12 18-Aug-2011  phx branches: 1.12.12; 1.12.28;
Finding the disklabel on MBR partitioned disks did no longer work since RDB
support was added. Fixed that and bumped the version to 1.12.
 1.11 11-Sep-2009  phx Added support for RDB partitions.
Moved MBR parition code out of ofdev.c into mbr.c.
Tested on Pegasos2 (RDB and MBR) and RS6000.
 1.10 13-Feb-2008  garbled branches: 1.10.10;
Add support to ofwboot for booting on the 7046-B50. Also likely to work
on the 7043-150. The B50 wants not only a note at the head of the
binary, like the 7044 did, but it also wants a PHDR that points at it.
Because the IBM firmware doesn't like the real note section that ld
generates (it puts it at the end of the file), we instead point PT_NOTE
at the text section. This works, because at the top of the text section,
there is a note hacked in, which was required for the 7044.

Also, change the mode from virtual mode to real mode in the note, because
the B50 hangs if you load it in virtual. Tested to work on a B50, 7044,
and Pegasos2.

Yay IBM.
 1.9 24-Jan-2008  garbled Add padding to align the rodata section. This fixes a strange bug
where the bootloader would freak out if various printfs were enabled or
disabled.

Add code to autodetect a 64bit cpu, and attempt to load a different set
of kernels if they exist.

Bump version to 1.9
 1.8 09-Jan-2008  garbled Changes to the ofppc ofwboot to make it boot on an IBM CHRP RS/6000.
Tested on a pegasos II and a 7044-270. Also, switch away from the hacked
up alloc.c we were using, and use the stock libsa one.
 1.7 03-Jan-2008  mrg support FS_RAID partitions, and increase the offset by
RF_PROTECTED_SECTORS (64) if so.
 1.6 18-Oct-2007  garbled branches: 1.6.2; 1.6.8;
Bump version
 1.5 23-Oct-2001  thorpej branches: 1.5.4; 1.5.36; 1.5.78; 1.5.96; 1.5.98; 1.5.102;
Clean up the NetBSD/ofppc boot loader:
- Garbage collect some cruft that doesn't apply to the ofppc port.
- Make our OFW-friendly alloc.c more like the libsa alloc.c
- Generally reduce some differences where we can between this
boot loader and the NetBSD/macppc boot loader.
- Use libsa's loadfile().
- Fix DDB symbol loading -- Add a magic number after the args string
so the kernel knows the symbols are there, provide both ssym and
esym, and make sure all these values are aligned to a 4-byte boundary.
- Add support for MS-DOS file systems.
 1.4 24-Sep-2000  jdolecek branches: 1.4.4;
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.3 19-Apr-1997  thorpej branches: 1.3.14;
...and again.
 1.2 19-Apr-1997  thorpej Replay history....
 1.1 16-Apr-1997  thorpej New OpenFirmware boot code for NetBSD/powerpc, based on Wolfgang's original
NetBSD/powerpc boot program. Highligts:
- Rearrange a bit so that we can sanely add boot programs for
non-OpenFirmware systems.
- Add support for loading compressed kernels (for booting from
1.44M floppies).
- Add support for loading Elf kernels (Elf is the new standard format
for NetBSD/powerpc). (XXX Don't load symbols right now - the code
to do it is there, but I don't particularly like how space for the
symbol table is allocated; I will revisit this soon'ish).
 1.3.14.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.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.102.1 25-Oct-2007  bouyer Sync with HEAD.
 1.5.98.3 23-Mar-2008  matt sync with HEAD
 1.5.98.2 09-Jan-2008  matt sync with HEAD
 1.5.98.1 06-Nov-2007  matt sync with HEAD
 1.5.96.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.5.78.1 23-Oct-2007  ad Sync with head.
 1.5.36.4 27-Feb-2008  yamt sync with head.
 1.5.36.3 04-Feb-2008  yamt sync with head.
 1.5.36.2 21-Jan-2008  yamt sync with head
 1.5.36.1 27-Oct-2007  yamt sync with head.
 1.5.4.2 23-Oct-2001  thorpej Clean up the NetBSD/ofppc boot loader:
- Garbage collect some cruft that doesn't apply to the ofppc port.
- Make our OFW-friendly alloc.c more like the libsa alloc.c
- Generally reduce some differences where we can between this
boot loader and the NetBSD/macppc boot loader.
- Use libsa's loadfile().
- Fix DDB symbol loading -- Add a magic number after the args string
so the kernel knows the symbols are there, provide both ssym and
esym, and make sure all these values are aligned to a 4-byte boundary.
- Add support for MS-DOS file systems.
 1.5.4.1 23-Oct-2001  thorpej file version was added on branch nathanw_sa on 2001-10-23 03:31:27 +0000
 1.6.8.2 10-Jan-2008  bouyer Sync with HEAD
 1.6.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.6.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.10.10.1 16-Sep-2009  yamt sync with head
 1.12.28.1 22-Sep-2014  martin Pull up following revision(s) (requested by phx in ticket #114):
sys/arch/ofppc/stand/ofwboot/ofwstart.S: revision 1.4
sys/arch/ofppc/stand/ofwboot/Locore.c: revision 1.23
sys/arch/ofppc/stand/ofwboot/version: revision 1.13
A stack size of 8K is too small for a block buffer of 65536 bytes.
Increased the stack size to 128K. This makes ofwboot work with FirmWorks
OpenFirmware systems again (tested with Motorola PowerStack II).
 1.12.12.1 03-Dec-2017  jdolecek update from HEAD

RSS XML Feed