History log of /freebsd-11-stable/stand/pc98/boot2/boot2.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 333049 27-Apr-2018 nyan

whitespace changes to reduce diffs from i386.
still broken pc98 boot.


# 329145 12-Feb-2018 kevans

MFC r325834,r325997,326502: Move sys/boot to stand/

This is effectively a direct commit to stable/11, due to differences between
stable/11 and head. Changes to DTS in sys/boot/fdt/dts were often
accompanied by kernel changes. Many of these were also risc-v updates that
likely had many more dependencies to MFC.

Because of this, sys/boot/fdt/dts remains as-is while everything else in
sys/boot relocates to stand/.

r325834: Move sys/boot to stand. Fix all references to new location

r325997: Remove empty directories.

r326502: Document the sys/boot -> stand move in hier.7 and the top-level README.


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/Makefile.inc1
/freebsd-11-stable/README
/freebsd-11-stable/lib/libefivar/Makefile
/freebsd-11-stable/release/powerpc/generate-hfs.sh
/freebsd-11-stable/release/tools/vmimage.subr
/freebsd-11-stable/share/examples/bootforth/README
/freebsd-11-stable/share/examples/etc/make.conf
/freebsd-11-stable/share/man/man5/make.conf.5
/freebsd-11-stable/share/man/man7/hier.7
/freebsd-11-stable/share/man/man8/diskless.8
/freebsd-11-stable/stand
/freebsd-11-stable/stand/Makefile
/freebsd-11-stable/stand/Makefile.amd64
/freebsd-11-stable/stand/Makefile.arm
/freebsd-11-stable/stand/Makefile.arm64
/freebsd-11-stable/stand/Makefile.i386
/freebsd-11-stable/stand/Makefile.inc
/freebsd-11-stable/stand/Makefile.mips
/freebsd-11-stable/stand/Makefile.pc98
/freebsd-11-stable/stand/Makefile.powerpc
/freebsd-11-stable/stand/Makefile.sparc64
/freebsd-11-stable/stand/arm
/freebsd-11-stable/stand/arm64
/freebsd-11-stable/stand/common
/freebsd-11-stable/stand/defs.mk
/freebsd-11-stable/stand/efi
/freebsd-11-stable/stand/fdt
/freebsd-11-stable/stand/fdt.mk
/freebsd-11-stable/stand/fdt/Makefile
/freebsd-11-stable/stand/fdt/Makefile.depend
/freebsd-11-stable/stand/fdt/fdt_loader_cmd.c
/freebsd-11-stable/stand/fdt/fdt_platform.h
/freebsd-11-stable/stand/fdt/help.fdt
/freebsd-11-stable/stand/ficl
/freebsd-11-stable/stand/ficl.mk
/freebsd-11-stable/stand/ficl32
/freebsd-11-stable/stand/forth
/freebsd-11-stable/stand/forth/pnp.4th
/freebsd-11-stable/stand/forth/support.4th
/freebsd-11-stable/stand/geli
/freebsd-11-stable/stand/i386
/freebsd-11-stable/stand/i386/Makefile.inc
/freebsd-11-stable/stand/kshim
/freebsd-11-stable/stand/libsa
/freebsd-11-stable/stand/libsa32
/freebsd-11-stable/stand/loader.mk
/freebsd-11-stable/stand/man
/freebsd-11-stable/stand/mips
/freebsd-11-stable/stand/ofw
/freebsd-11-stable/stand/pc98
/freebsd-11-stable/stand/pc98/Makefile.inc
/freebsd-11-stable/stand/powerpc
/freebsd-11-stable/stand/sparc64
/freebsd-11-stable/stand/uboot
/freebsd-11-stable/stand/uboot.mk
/freebsd-11-stable/stand/usb
/freebsd-11-stable/stand/userboot
/freebsd-11-stable/stand/userboot/ficl
/freebsd-11-stable/stand/userboot/libstand
/freebsd-11-stable/stand/userboot/zfs
/freebsd-11-stable/stand/zfs
/freebsd-11-stable/stand/zfs32
/freebsd-11-stable/sys/Makefile
/freebsd-11-stable/sys/boot/Makefile
/freebsd-11-stable/sys/boot/Makefile.amd64
/freebsd-11-stable/sys/boot/Makefile.arm
/freebsd-11-stable/sys/boot/Makefile.arm64
/freebsd-11-stable/sys/boot/Makefile.i386
/freebsd-11-stable/sys/boot/Makefile.inc
/freebsd-11-stable/sys/boot/Makefile.mips
/freebsd-11-stable/sys/boot/Makefile.pc98
/freebsd-11-stable/sys/boot/Makefile.powerpc
/freebsd-11-stable/sys/boot/Makefile.sparc64
/freebsd-11-stable/sys/boot/arm
/freebsd-11-stable/sys/boot/arm64
/freebsd-11-stable/sys/boot/common
/freebsd-11-stable/sys/boot/defs.mk
/freebsd-11-stable/sys/boot/efi
/freebsd-11-stable/sys/boot/fdt.mk
/freebsd-11-stable/sys/boot/fdt/Makefile
/freebsd-11-stable/sys/boot/fdt/Makefile.depend
/freebsd-11-stable/sys/boot/fdt/fdt_loader_cmd.c
/freebsd-11-stable/sys/boot/fdt/fdt_platform.h
/freebsd-11-stable/sys/boot/fdt/help.fdt
/freebsd-11-stable/sys/boot/ficl
/freebsd-11-stable/sys/boot/ficl.mk
/freebsd-11-stable/sys/boot/ficl32
/freebsd-11-stable/sys/boot/forth
/freebsd-11-stable/sys/boot/geli
/freebsd-11-stable/sys/boot/i386
/freebsd-11-stable/sys/boot/kshim
/freebsd-11-stable/sys/boot/libsa
/freebsd-11-stable/sys/boot/libsa32
/freebsd-11-stable/sys/boot/loader.mk
/freebsd-11-stable/sys/boot/man
/freebsd-11-stable/sys/boot/mips
/freebsd-11-stable/sys/boot/ofw
/freebsd-11-stable/sys/boot/pc98
/freebsd-11-stable/sys/boot/powerpc
/freebsd-11-stable/sys/boot/sparc64
/freebsd-11-stable/sys/boot/uboot
/freebsd-11-stable/sys/boot/uboot.mk
/freebsd-11-stable/sys/boot/usb
/freebsd-11-stable/sys/boot/userboot
/freebsd-11-stable/sys/boot/zfs
/freebsd-11-stable/sys/boot/zfs32
/freebsd-11-stable/sys/contrib/dev/acpica/acpica_prep.sh
/freebsd-11-stable/tools/boot/universe.sh
/freebsd-11-stable/tools/tools/bootparttest/Makefile
/freebsd-11-stable/tools/tools/zfsboottest/Makefile
/freebsd-11-stable/usr.sbin/bhyveload/Makefile
# 302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
# 294925 27-Jan-2016 imp

Fix mistake when transitioning to the new defines with ZFS loader. I
hate adding yet another define, but it is the lessor of the evil
choices available. Kill another evil by removing PATH_BOOT3 and
replacing it with PATH_LOADER or PATH_LOADER_ZFS as appropriate.

PR: 206659


# 294847 26-Jan-2016 imp

Remove static from these two. They slipped through the cracks.

MFC After: 1 week


# 294766 26-Jan-2016 imp

RBX_ defines are in rbx.h, move it there.

Differential Revision: https://reviews.freebsd.org/D5038


# 294765 26-Jan-2016 imp

Move all the separate copies of the same strings into paths.h. There's
nothing machine specific about these.

Differential Revision: https://reviews.freebsd.org/D5038


# 292682 24-Dec-2015 jhb

Fix remaining direct tests of the carry flag in the v86 %eflags via a
magic number to use V86_CY() instead. These should have been fixed as
part of the cleanup in r226746 but were missed.

The md5 sums of the object files were unchanged, so there should be no
functional change.

PR: 205424
Submitted by: Alexander Kuleshov <kuleshovmail@gmail.com>
MFC after: 1 week


# 284885 27-Jun-2015 nyan

MFi386: r284878

Reduce warnings:

- Add prototype for boot2 main()
- Don't make assignment within if statement, split it into two.


# 275411 02-Dec-2014 nyan

MFi386: r275305 (by rdivacky)

Unbreak the code for non-digits below '0' by casting the expression
to unsigned int.


# 275241 29-Nov-2014 nyan

MFi386: r275059, r275061, r275062 and r275191 (by rdivacky)

Shrink boot2 by a couple more bytes.


# 275239 29-Nov-2014 nyan

MFi386: r275237 (by rdivacky)

Shrink boot2 a bit more by factoring out common pattern
of printf();return(-1);


# 268475 10-Jul-2014 imp

Make SERIAL support optional again. Enable it for i386 because a huge
percentage of machines has a 16550. Disable it for pc98 since only a
tiny fraction of them have one. These changes save 293 bytes when
building with clang, but preserves the ability to build with serial if
you really want. We now have 92 bytes free (412 with the in-tree gcc).


# 254015 07-Aug-2013 marcel

Change <sys/diskpc98.h> to not redefine the same symbols that are
being defined in <sys/diskmbr.h>. Instead give the symbols here a
"PC98_" prefix. This way, both <sys/diskmbr.h> and <sys/diskpc98.h>
can be included in the same C source file.

The renaming is trivial. The only gotcha is that DOSBBSECTOR is
also redefined from 0 to 1. This because DOSBBSECTOR was always
used in conjunction with an addition of 1. The PC98_BBSECTOR symbol
is defined as 1 and the expression is simplified.

Note: it is not believed that ports are seriously impacted; or at
all for that matter.

Approved by: nyan@


# 242863 10-Nov-2012 nyan

MFi386: r241301

add detection of serial console presence to btx and boot2-like blocks


# 239063 05-Aug-2012 nyan

MFi386: the part of r219452 and r236405.

- bunch of variables are turned into uint8_t.
- Remove unnecessary initializations.


# 235988 25-May-2012 gleb

Use 32-bit ufs_ino_t instead of ino_t to keep boot2 small and prevent
unnecessary 64-bit math on 32-bit machines.

Sponsored by: Google Summer of Code 2011


# 232784 10-Mar-2012 nyan

MFi386: revisions 232570 and 232754

Fix boot2 to handle boot config files that only contain a custom path to
a loader or kernel.


# 226746 25-Oct-2011 jhb

Consolidate duplicate definitions of V86_CY() and V86_ZR() which check for
the carry and zero flags being set, respectively, in <btxv86.h> and use
them throughout the x86 boot code.


# 226506 18-Oct-2011 des

Look for /boot/config in addition to /boot.config, with the former taking
precedence over the latter if it exists.

MFC after: 3 weeks


# 220685 16-Apr-2011 nyan

MFi386: revisions 220389 and 220392

- Mark getc() as inline, this has no effect on gcc but helps clang.
- Move getc() body before xgetc() so gcc does not emit a warning about
function having no body.


# 219960 24-Mar-2011 nyan

MFi386: the part of 219452

- bunch of variables are turned into uint8_t.
- the setting and reading of "fmt" in load() is removed.
- buf in printf() is made static to save space.


# 219225 03-Mar-2011 nyan

MFi386: revision 219186

This patch shrinks boot2 a little.

o It switches kname to be just a pointer instead of an array.
o It changes ioctl to unsigned from uint8_t.
o It changes the second keyhit limit to 3 seconds from 5.
o It removes bi_basemem/bi_extmem/bi_memsizes_valid setting.


# 218946 22-Feb-2011 nyan

MFi386: revision 218926

In sys/boot/i386/boot2/boot2.c, change the type of the 'opts' variable
from uint16_t back to uint32_t. The actual option bitmasks (RB_* and
RBX_*) assume at least a 32 bit variable.

Submitted by: rdivacky


# 218842 19-Feb-2011 nyan

MFi386: revision 218745

Remove reading of symbols from a.out loaded files.


# 218737 16-Feb-2011 nyan

MFi386: revision 218713

Apply a few small optimizations to boot2's code, to make it shrink a
little further.


# 214257 24-Oct-2010 nyan

MFi386: revision 214210

Avoid using memcpy() for copying 32bit chunks. This shrinks
the resulting code a little.


# 212098 01-Sep-2010 dim

Use a cleaner expression to retrieve the memory size in pc98's boot2.c,
which also avoids NULL pointer arithmetic, as suggested by jhb. The
available space goes from 11 bytes to 7.

Reviewed by: nyan
Approved by: rpaulo (mentor)


# 212064 31-Aug-2010 dim

Avoid directly manipulating a NULL pointer (which could result in
undefined behaviour) in sys/boot/pc98/boot2/boot2.c.

Reviewed by: nyan
Approved by: rpaulo (mentor)


# 201342 31-Dec-2009 nyan

Reimplement the boot2 for pc98 completely.
It's based on the newest i386's one and has the advantage of:

- ELF binary support.
- UFS2 filesystem support.
- Many FreeBSD slices support on a disk.

Tested by: SATOU Tomokazu ( tomo1770 _ maple _ ocn _ ne _ jp ),
WATANABE Kazuhiro ( CQG00620 _ nifty _ ne _ jp ) and
nyan

MFC after: 2 week

Happy New Year in Japan!!