History log of /freebsd-9.3-release/sys/boot/i386/libi386/bootinfo32.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

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

# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 185029 17-Nov-2008 pjd

Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.

This bring huge amount of changes, I'll enumerate only user-visible changes:

- Delegated Administration

Allows regular users to perform ZFS operations, like file system
creation, snapshot creation, etc.

- L2ARC

Level 2 cache for ZFS - allows to use additional disks for cache.
Huge performance improvements mostly for random read of mostly
static content.

- slog

Allow to use additional disks for ZFS Intent Log to speed up
operations like fsync(2).

- vfs.zfs.super_owner

Allows regular users to perform privileged operations on files stored
on ZFS file systems owned by him. Very careful with this one.

- chflags(2)

Not all the flags are supported. This still needs work.

- ZFSBoot

Support to boot off of ZFS pool. Not finished, AFAIK.

Submitted by: dfr

- Snapshot properties

- New failure modes

Before if write requested failed, system paniced. Now one
can select from one of three failure modes:
- panic - panic on write error
- wait - wait for disk to reappear
- continue - serve read requests if possible, block write requests

- Refquota, refreservation properties

Just quota and reservation properties, but don't count space consumed
by children file systems, clones and snapshots.

- Sparse volumes

ZVOLs that don't reserve space in the pool.

- External attributes

Compatible with extattr(2).

- NFSv4-ACLs

Not sure about the status, might not be complete yet.

Submitted by: trasz

- Creation-time properties

- Regression tests for zpool(8) command.

Obtained from: OpenSolaris


# 163897 01-Nov-2006 marcel

Extend struct devdesc with a unit field, called d_unit. Promote the
device (kind) specific unit field to the common field. This change
allows a future version of libefi to work without requiring anything
more than what is defined in struct devdesc and as such makes it
possible to compile said version of libefi for different platforms
without requiring that those platforms have identical derivatives
of struct devdesc.


# 119482 25-Aug-2003 obrien

Use __FBSDID().
Also some minor copyright style cleanups.


# 114385 01-May-2003 peter

Argh. This was broken by the last-minute elf32/elf64/"elf kernel" changes.


# 114379 01-May-2003 peter

Enable the i386 loader to load and run an amd64 kernel. If this puts
things over floppy size limits, I can exclude it for release builds or
something like that. Most of the changes are to get the load_elf.c file
into a seperate elf32_ or elf64_ namespace so that you can have two
ELF loaders present at once. Note that for 64 bit kernels, it actually
starts up the kernel already in 64 bit mode with paging enabled. This
is really easy because we have a known minimum feature set.

Of note is that for amd64, we have to pass in the bios int 15 0xe821
memory map because once in long mode, you absolutely cannot make VM86
calls. amd64 does not use 'struct bootinfo' at all. It is a pure loader
metadata startup, just like sparc64 and powerpc. Much of the
infrastructure to support this was adapted from sparc64.


# 98472 20-Jun-2002 peter

Add boot_serial and boot_multicons variables to set RB_SERIAL and
RB_MULTIPLE since this seems to be the easiest way to add these flags
for non-forth loaders etc.


# 88874 04-Jan-2002 jhb

Don't turn on RB_CDROM if the rootdev is a BIOS cd device for now as this
breaks when cdboot is used with an MFS root.


# 87620 10-Dec-2001 guido

Add new boot flag to i386 boot: -p.
This flag adds a pausing utility. When ran with -p, during the kernel
probing phase, the kernel will pause after each line of output.
This pausing can be ended with the '.' key, and is automatically
suspended when entering ddb.

This flag comes in handy at systems without a serial port that either hang
during booting or reser.
Reviewed by: (partly by jlemon)
MFC after: 1 week


# 86091 05-Nov-2001 jhb

Add a device driver for the BIOS device for CD-ROM's booted via El Torito
no emulation mode. Unlike other BIOS devices, this device uses 2048 byte
sectors. Also, the bioscd driver does not have to worry about slices
or partitions.


# 85376 23-Oct-2001 jlemon

Set RB_MULTIPLE (multiple console support) if the kernel is booted
with the -D flag.


# 72640 18-Feb-2001 asmodai

Preceed/preceeding are not english words. Use precede or preceding.


# 66133 20-Sep-2000 archie

Add support for the "nullconsole" console type, for systems with
neither a video console nor a serial port. Use it if the RB_MUTE
flag is set.

Submitted by: Doug Ambrisko <ambrisko@whistle.com>
Reviewed by: jhb


# 64187 03-Aug-2000 jhb

Cleanup warnings. Most of these are signed/unsigned warnings, as well as
some added const's.


# 59854 01-May-2000 bp

Update loader logic to distinguish modules vs. files.
Add support for module metadata. The old way of dependancy
handling will be supported for a while.

Reviewed by: peter


# 59087 07-Apr-2000 ps

Make PXE use the UDP API. This allows for both TFTP and NFS support.
You may specify TFTP or NFS via compile time options in the loader,
but not both at this time.

Also, remove a warning about not knowing how to boot from network
devices. We can obviously do that now.


# 55211 29-Dec-1999 msmith

Substantially revamp the way that we determine the amount of memory available
for our use. Use the same search order for BIOS memory size functions
as the kernel will later use.

Allow the loader to use all of the detected physical memory (this will
greatly help people trying to load enormous memory disk images).

More correctly handle running out of memory when loading an object.

Use the end of base memory for the top of the heap, rather than
blindly hoping that there is 384k left.

Add copyrights to a couple of files I forgot.


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 48952 20-Jul-1999 msmith

Walk around the end of all the silly guessing of device types and unit
numbers that we have been doing in the past, and read /etc/fstab off the
proposed root filesystem to determine the actual device name and vfs
type for the root filesystem. These are then exported to the kernel
via the environment variable vfs.root.mountfrom.


# 48083 21-Jun-1999 rnordier

Fill in bi_bios_geom[] in the bootinfo structure passed to the kernel.
This should resolve the problem raised in PR 12315, and incidentally
makes it easier to determine what geometry the BIOS is actually using
(by way of boot -v and dmesg).


# 47727 04-Jun-1999 ghelmer

Modify the boot loader to recognize the -C flag and pass the RB_CDROM
flag to the kernel to mount a CDROM as the root filesystem. Alternatively,
the boot_cdrom env var can be set.

As Mike Smith noted, "-C is the "wrong" way to do this", but this is
an acceptable stopgap in lieu of a better way.

PR: bin/11884
Reviewed by: msmith@freebsd.org


# 44861 18-Mar-1999 dcs

Avoid copying m_args if none exists. (Perhaps this is a better solution,
Doug?)


# 44572 08-Mar-1999 dcs

Add MODINFO_ARGS, parameters passed to a module at load time.

VS: ----------------------------------------------------------------------


# 43114 23-Jan-1999 msmith

biosdisk.c
Implement a new variable 'root_disk_unit' which supersedes
'num_ide_disks' and makes it possible to explicitly set the
root device unit number regardless of type considerations.

bootinfo.c
If we can't calculate a dev_t for the root disk, complain and
don't proceed to boot with an invalid boot device.


# 41139 13-Nov-1998 msmith

Add a new variable $num_ide_disks which is used to offset the unit number
for SCSI disks when converting from BIOS unit numbers to da unit numbers.

Prompted by Kevin Street <street@iname.com>


# 40393 15-Oct-1998 peter

Get the last used address via a more conservative method, don't depend
on the module chain being in increasing address order.


# 40336 14-Oct-1998 peter

Align to sizeof(long) rather than sizeof(int32_t). It needs to be
long because this code is shared with the alpha. I hope the alpha can
read 32 bit ints at 32 bit alignment (vs. 64 bit alignment).


# 40146 09-Oct-1998 peter

Attempt to at least align MODINFO_* blocks. IMHO, decoding this stuff
should be MD code since one day we'll have to recover pages from deleted
preload data. MI code can't be expected to know how to deal with pmap
internals, assuming it gets done via pmap that is. :-)


# 40107 09-Oct-1998 msmith

Remove some debugging code.
Do a much better job of DWIM with partial device specifications.
Fix the module metadata build process, which was completely broken.
Use a larger read buffer when copying large objects in; this
improves performance marginally and will avoid flushning any small caches
we might choose to implement.


# 40034 07-Oct-1998 peter

Fix that pesky boot aguments parsing bug. (I think :-)


# 40016 07-Oct-1998 msmith

- Drain the keyboard buffer when initialising.
- Be pedantic about the return from int 16 fn 01.


# 39989 06-Oct-1998 msmith

bootinfo.c
Strip any device name information from the kernel name
before passing it in.

biosdisk.c
Be more strict about matching device names to slice entries.
Only allow unsliced syntax on unsliced disks.


# 39919 03-Oct-1998 rnordier

bootinfo bi_vesa no longer exists.


# 39902 02-Oct-1998 msmith

Consolidate the bootinfo-loading code, greatly simplifying the _exec
functions.


# 39730 28-Sep-1998 peter

Missing return value that was kinda important.


# 39441 17-Sep-1998 msmith

Initial integration of the i386 bootloader and BTX.

- Discard large amounts of BIOS-related code in favour of the more compact
BTX vm86 interface.
- Build the loader module as ELF, although the resulting object is a.out,
make gensetdefs 32/64-bit sensitive and use a single copy of it.
- Throw away installboot, as it's no longer required.
- Use direct bcopy operations in the i386_copy module, as BTX
maps the first 16M of memory. Check operations against the
detected size of actual memory.


# 39178 14-Sep-1998 msmith

Resynch with working sources before BTX integration.

- Use format-independant module allocator.
- Conditionalise ISA PnP support.
- Simplify PnP enumerator interface.
- Improve module/object searching.
- Add missing depend/install targets in BTX makefiles.
- Pass the kernel environment and module data in extended bootinfo fields.
- Add a pointer to the end of the kernel + modules in bootinfo.
- Fix parsing of old-style kernel arguments.


# 38764 03-Sep-1998 msmith

Bootstrap updates.

- Move some startup code from MD to MI sections
- Add a 'copyout' and some copyout-related functions. These will be
obsoleted when BTX is available for the 386 and the kernel load
area becomes directly addressable.
- Add the ability load an arbitrary file as a module, associating
and arbitrary type string with it. This can be used eg. for loading
splash-screen images etc.
- Add KLD module dependancy infrastructure. We know how to look for
dependancies inside KLD modules, how to resolve these dependancies
and what to do if things go wrong. Only works for a.out at the
moment, due to lack of an MI ELF loader. Attach KLD module information
to loaded modules as metadata, but don't pass it to the kernel (it
can find it itself).
- Load a.out KLD modules on a page boundary. Only pad the a.out BSS
for the kernel, as it may want to throw symbols away. (We might want
to do this for KLD modules too.)
- Allow commands to be hidden from the '?' display, to avoid cluttering
it with things like 'echo'. Add 'echo'.
- Bring the 'prompt' command into line with the parser syntax.
- Fix the verbose 'ls'; it was using an uninitialised stack variable.
- Add a '-v' flag to 'lsmod' to have it display module metadata as well
(not terribly useful for the average user)
- Support a 'module searchpath' for required modules.
- The bootstrap file on i386 is now called 'loader' to permit the
/boot directory to use that name.
- Discard the old i386 pread() function, as it's replaced by
arch_readin()


# 38465 21-Aug-1998 msmith

This is the new unified bootstrap, sometimes known previously as the
'three-stage' bootstrap.
There are a number of caveats with the code in its current state:
- The i386 bootstrap only supports booting from a floppy.
- The kernel and kld do not yet know how to deal with the extended
information and module summary passed in.
- PnP-based autodetection and demand loading of modules is not implemented.
- i386 ELF kernel loading is not ready yet.
- The i386 bootstrap is loaded via an ugly blockmap.

On the alpha, both net- and disk-booting (SRM console machines only) is
supported. No blockmaps are used by this code.

Obtained from: Parts from the NetBSD/i386 standalone bootstrap.