History log of /freebsd-11-stable/stand/i386/boot2/boot1.S
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 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
# 232623 06-Mar-2012 jhb

Add a note to clarify why we create a relocated copy of boot1 in lower
memory.


# 215285 14-Nov-2010 brucec

Fix the jump location.


# 215284 14-Nov-2010 brucec

When rebooting the machine jump to 0xf000:fff0 instead of 0xffff:0x0.
This is the same change that was made in rev 1.33 of boot/i386/btx/btx/btx.S

PR: i386/91871
Submitted by: Bjorn Konig <bkoenig at cs.tu-berlin.de>
MFC after: 1 week


# 189500 07-Mar-2009 marcel

Revert the part of change 107879 that employs the unused bytes after
the disklabel in the 2nd sector for boot code. Even with both UFS1
and UFS2 supported, there's enough bytes left that we don't have to
nibble from the disklabel.
Thus, the entire 2nd sector is now reserved for the disklabel, which
makes the bootcode compatible again with disklabels that have more
than 8 partitions -- such as those created and supported by gpart.

i386: 135 bytes available
amd64: 151 bytes available

Ok'd by: jhb


# 157667 11-Apr-2006 jhb

Minor whitespace tweak.


# 134430 28-Aug-2004 yar

Try packet mode of INT13 on a hard disk first if not prohibited by
the flag, fall back to the old INT13/AH=02 function if that fails.
This way of operation is less likely to fail with modern BIOSes and
large disks of strange geometries.

PR: i386/70241
Submitted by: Valentin Nechayev <netch <@> netch.kiev.ua> (inital version)
Discussed with: jhb (by Valentin Nechayev)
Tested on: bochs (with EDD turned on or off by patching the BIOS), PCs


# 133154 05-Aug-2004 kan

Move boot2 BSS zeroing into btx startup code out of boot1. boot1 does not
have clear idea on boot2 BSS size and leaves portion of it not zeroed out.
btxcsu.s is in much better position for this job.

Obtained from: DragonflyBSD (with minor adjustments)


# 129993 02-Jun-2004 phk

Some embedded platforms have no keyboard controller. Give up waiting
for it to react after a timeout.


# 129240 14-May-2004 ru

Back out last revision that unnecessarily changed valid assembler
line comments and damaged the CVS history.

Prompted by: bde, jhb


# 128716 28-Apr-2004 ru

After talking to Bruce Evans and reading more standards specs,
switch to using C99-style comments everywhere in preprocessed
assembler. The reason is that lines starting with the regexp
'^[[:space:]]#' are treated as preprocessing directives, and
while it seems to work now with GCC, it's not necessarily has
to work. Use C99 comments `//' for the trailing comments to
save whitespace.


# 128707 28-Apr-2004 ru

- Use C (and CPP) style comments for assembler-with-cpp sources,
for lines that start with a comment.
- Preserve as(1) style comments for the rest.


# 119253 22-Aug-2003 imp

Many newer CF do not handle having the entire track read from them at
boot time. Instead, read it a sector at a time. While this sounds
like a significant slowdown, I've not been able to measure any
signficant difference.

Submitted by: luigi
Reviewed by: jhb, sam (both a while ago)
MFC After: 3 days


# 107879 14-Dec-2002 phk

Employ the unused bytes after the disklabel in the second sector. This makes
it possible to make UFS1_ONLY and UFS2_ONLY versions which fit inside the
traditional 16 sectors.

Remove assorted now unneeded hackery.

UFS1_AND_UFS2 still needs another 150 bytes to work, and that is probably
not within our reach, ever.


# 104683 08-Oct-2002 jhb

Revert MEM_USR back to 0xa000 for BTX clients. Instead, adjust boot2
to run at 0xc000 by changing its virtual start address from 0x1000 to
0x2000.

Tested by: phk


# 104635 07-Oct-2002 phk

Conditionalize the number of sectors loaded by boot1.s on UFS1/UFS12.

Conditionalize the "XX bytes left" checks reference on UFS1/UFS12.

Conditionally build the necessary 64bit math for boot2 if UFS12.

Sponsored by: DARPA & NAI Labs.


# 104632 07-Oct-2002 phk

Change the comment character from # to // in boot1.s and run
it through CPP so we can conditionalized things.

Sponsored by: DARPA & NAI Labs


# 104618 07-Oct-2002 phk

Move MEM_USR a page upwards to make space for larger UFS1 boot2.

Load 4 sectors more than we used to. This is harmless overhead for
the UFS1_ONLY case, but sufficient for boot2(UFS1+2).

Sponsored by: DARPA & NAI Labs


# 85805 01-Nov-2001 peter

Fix the ILLEGAL fdisk table that is there for supporting "dangerously
dedicated" mode. This was specifying that there are 256 (illegal!)
heads on the disk. If bioses store that in a byte, and it gets truncated
to 0, then that almost certainly causes the infamous divide-by-zero
nightmare.

This is also most likely the reason why the Thinkpad T20/A20 series
were locking up when FreeBSD was installed. This is also the most likely
reason why a boot1 being present causes an IA64 box to lock up at boot.
(removing the "part4" stuff from boot1.s fixes the IA64 boxes and would
most likely have fixed the T20/A20 and some TP600E series thinkpads)


# 80751 31-Jul-2001 jhb

Add in a hack to support IBM "El Torito" CD-ROM booting BIOS's which expect
the first sector of the emulated floppy to contain a valid MS-DOS BPB that
it can modify. Since boot1 is the first sector of boot.flp, this resulted
in the BIOS overwriting part of boot1: specifically the function used to
read in sectors from the disk.

Submitted by: Mark Peek <mark@whistle.com>
Submitted by: Doug Ambrisko <ambrisko@ambrisko.com>
PR: i386/26382
Obtained from: NetBSD, OpenBSD (the example BPB)
MFC after: 1 month


# 62660 06-Jul-2000 jhb

Doh. The disklabel is not 0x200 bytes of zeros, but it is 0x200 bytes long.


# 62658 06-Jul-2000 jhb

Clarify the comments in here a bit. The first sector of boot2 is not just
zeros, it is actually the disklabel itself. boot2.ldr is simply a
placeholder in the boot2 binary.


# 62138 26-Jun-2000 jhb

Add in support for EDD to support large disks via LBA. This uses a
method similar to that of the loader to avoid potentially breaking older
drives in that we only use EDD if the desired cylinder is > 1023.


# 61836 19-Jun-2000 jhb

Comment this bad boy. Hopefully the next person that comes along won't
have to spend a few hours reading the code to figure all this out.


# 60821 23-May-2000 jhb

Clean up all of the 16-bit assembly code in the x86 bootstrap to work
with the new binutils. Now that we have a decent assembler, all the old
m4 macros are no longer needed. Instead, straight assembly can be used
since as(1) now understands 16-bit addressing, branches, etc. Also,
several bugs have been fixed in as(1), allowing boot0.s to be further
cleaned up.


# 50477 28-Aug-1999 peter

$Id$ -> $FreeBSD$


# 48919 20-Jul-1999 rnordier

Reintroduce LBA (cyl > 1023) support in the bootblocks, enabled by
means of a build option.


# 42638 13-Jan-1999 rnordier

In the event of a disk error, boot2 is expecting an error
code to be returned: give it one


# 42478 10-Jan-1999 peter

Damn, I thought I had committed this already, but it seems not.

Move the relocated boot1 and arg transfer space from 0x600/0x800 to
0x700/0x900. In theory this should make no difference, apart from the fact
that Buslogic controllers happen to use a few bytes at 0x600 for some sort
of scratch space for it's int 0x13 hook (!!!), causing the machine to crash
badly when the boot2 code makes it's callbacks into boot1 for disk IO.

Submitted by: Robert Nordier <rnordier@freebsd.org>


# 41085 11-Nov-1998 rnordier

Revise error messages.


# 41008 08-Nov-1998 rnordier

boot1: Eliminate EDD detection and optional use of disk packet
interface. Do some general consistency fixes and space optimizations.
Use of some freed-up space to defend against possible BIOS misfeatures.

boot2: Revise disk read interface to provide for boot1 changes. Free
up space for this.


# 40940 05-Nov-1998 rnordier

Make use of BIOS int 0x13 extensions configurable, and disabled
by default.


# 40675 27-Oct-1998 rnordier

Avoid interruptions while talking to keyboard controller.


# 40314 13-Oct-1998 rnordier

Change to a 15-sector boot2.
Refine slice-handling.


# 40269 12-Oct-1998 rnordier

New boot blocks: support for /boot/loader; a.out & ELF; cyl > 1023;
multiple 0xa5 slices; etc.