History log of /freebsd-10.1-release/sys/boot/forth/
Revision Date Author Comments
272461 03-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

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


271135 04-Sep-2014 emaste

MFC UEFI loader

This MFC consists of the following SVN revisions:
258741 261568 261603 261668 263115 263117 263968 264078 264087 264088
264092 264095 264115 264132 264208 264261 264262 264263 264319 265028
265057 268974

Detailed commit messages:

r258741: Note that libstand is 32-bit on amd64 and powerpc64

r261568: Build libstand as a 64-bit library on amd64

The 32-bit bootloaders now link against libstand.a in
sys/boot/libstand32, so there is no need to force /usr/lib/libstand.a
to be 32-bit.

r261603: Don't force efi to a 32-bit build on amd64

r261668: Build libstand as a 64-bit library on ppc64

The 32-bit bootloaders now link against libstand.a in
sys/boot/libstand32, so there is no need to force /usr/lib/libstand.a
to be 32-bit.

This is equivalent to r261568 for amd64.

r263115: Add amd64 EFI headers

r263117: Connect 64-bit boot ficl to the build

It is not yet used, but this will ensure it doesn't get broken.

r263968: Use EFI types for EFI values (silences warnings).

EFI UINTN is actually a 64-bit type on 64-bit processors.

r264078: Put each source file on a separate line

This will simplify rebasing the amd64 UEFI patch set.

r264087: Build boot/ficl as 64-bit library on amd64

The 32-bit bootloaders on amd64 now use the 32-bit version in ficl32,
as is done with libstand32. The native 64-bit ficl will be used by the
upcoming UEFI loader.

r264088: Merge efilib changes from projects/uefi

r247216: Add the ability for a device to have an "alias" handle.

r247379: Fix network device registration.

r247380: Adjust our load device when we boot from CD under UEFI.

The process for booting from a CD under UEFI involves adding a FAT
filesystem containing your loader code as an El Torito boot image.
When UEFI detects this, it provides a block IO instance that points
at the FAT filesystem as a child of the device that represents the CD
itself. The problem being that the CD device is flagged as a "raw
device" while the boot image is flagged as a "logical partition".
The existing EFI partition code only looks for logical partitions and
so the CD filesystem was rendered invisible.

To fix this, check the type of each block IO device. If it's found to
be a CD, and thus an El Torito boot image, look up its parent device
and add that instead so that the loader will then load the kernel from
the CD filesystem. This is done by using the handle for the boot
filesystem as an alias.

Something similar to this will be required for booting from other media
as well as the loader will live in the EFI system partition, not on the
partition containing the kernel.

r247381: Remove a scatalogical debug printf that crept in.

r264092: Add -fPIC for amd64

r264095: Support UEFI booting on amd64 via loader.efi

This is largely the work from the projects/uefi branch, with some
additional refinements. This is derived from (and replaces) the
original i386 efi implementation; i386 support will be restored later.

Specific revisions of note from projects/uefi:

r247380:

Adjust our load device when we boot from CD under UEFI.

The process for booting from a CD under UEFI involves adding a FAT
filesystem containing your loader code as an El Torito boot image.
When UEFI detects this, it provides a block IO instance that points at
the FAT filesystem as a child of the device that represents the CD
itself. The problem being that the CD device is flagged as a "raw
device" while the boot image is flagged as a "logical partition". The
existing EFI partition code only looks for logical partitions and so
the CD filesystem was rendered invisible.

To fix this, check the type of each block IO device. If it's found to
be a CD, and thus an El Torito boot image, look up its parent device
and add that instead so that the loader will then load the kernel from
the CD filesystem. This is done by using the handle for the boot
filesystem as an alias.

Something similar to this will be required for booting from other
media as well as the loader will live in the EFI system partition, not
on the partition containing the kernel.

r246231:

Add necessary code to hand off from loader to an amd64 kernel.

r246335:

Grab the EFI memory map and store it as module metadata on the kernel.

This is the same approach used to provide the BIOS SMAP to the kernel.

r246336:

Pass the ACPI table metadata via hints so the kernel ACPI code can
find them.

r246608:

Rework copy routines to ensure we always use memory allocated via EFI.

The previous code assumed it could copy wherever it liked. This is not
the case. The approach taken by this code is pretty ham-fisted in that
it simply allocates a large (32MB) buffer area and stages into that,
then copies the whole area into place when it's time to execute. A more
elegant solution could be used but this works for now.

r247214:

Fix a number of problems preventing proper handover to the kernel.

There were two issues at play here. Firstly, there was nothing
preventing UEFI from placing the loader code above 1GB in RAM. This
meant that when we switched in the page tables the kernel expects to
be running on, we are suddenly unmapped and things no longer work. We
solve this by making our trampoline code not dependent on being at any
given position and simply copying it to a "safe" location before
calling it.

Secondly, UEFI could allocate our stack wherever it wants. As it
happened on my PC, that was right where I was copying the kernel to.
This did not cause happiness. The solution to this was to also switch
to a temporary stack in a safe location before performing the final
copy of the loaded kernel.

r246231:

Add necessary code to hand off from loader to an amd64 kernel.

r246335:

Grab the EFI memory map and store it as module metadata on the kernel.

This is the same approach used to provide the BIOS SMAP to the kernel.

r246336:

Pass the ACPI table metadata via hints so the kernel ACPI code can
find them.

r246608:

Rework copy routines to ensure we always use memory allocated via EFI.

The previous code assumed it could copy wherever it liked. This is not
the case. The approach taken by this code is pretty ham-fisted in that
it simply allocates a large (32MB) buffer area and stages into that,
then copies the whole area into place when it's time to execute. A more
elegant solution could be used but this works for now.

r247214:

Fix a number of problems preventing proper handover to the kernel.

There were two issues at play here. Firstly, there was nothing
preventing UEFI from placing the loader code above 1GB in RAM. This
meant that when we switched in the page tables the kernel expects to
be running on, we are suddenly unmapped and things no longer work. We
solve this by making our trampoline code not dependent on being at any
given position and simply copying it to a "safe" location before
calling it.

Secondly, UEFI could allocate our stack wherever it wants. As it
happened on my PC, that was right where I was copying the kernel to.
This did not cause happiness. The solution to this was to also switch
to a temporary stack in a safe location before performing the final
copy of the loaded kernel.

r247216:

Use the UEFI Graphics Output Protocol to get the parameters of the
framebuffer.

r264115: Fix printf format mismatches

r264132: Connect sys/boot/amd64 to the build

r264208: Do not build the amd64 UEFI loader with GCC

The UEFI loader causes buildworld to fail when building with (in-tree)
GCC, due to a typedef redefinition. As it happens the in-tree GCC
cannot successfully build the UEFI loader anyhow, as it does not support
__attribute__((ms_abi)). Thus, just avoid trying to build it with GCC,
rather than disconnecting it from the build until the underlying issue
is fixed.

r264261: Correct a variable's type for 64-bit Ficl

FICL_INT is long.

r264262: Fix printf args for 64-bit archs

r264263: Add explicit casts to quiet warnings in libefi

r264319: Fix EFI loader object tree creation on 9.x build hosts

Previously ${COMPILER_TYPE} was checked in sys/boot/amd64, and the efi
subdirectory was skipped altogether for gcc (since GCC does not support
a required attribute). However, during the early buildworld stages
${COMPILER_TYPE} is the existing system compiler (i.e., gcc on 9.x build
hosts), not the compiler that will eventually be used. This caused
"make obj" to skip the efi subdirectory. In later build stages
${COMPILER_TYPE} is "clang", and then the efi loader would attempt to
build in the source directory.

r265028 (dteske): Disable the beastie menu for EFI console ...

which doesn't support ANSI codes (so things like `at-xy', `clear', and
other commands don't work making it impossible to generate a living
menu).

r265057 (nwhitehorn): Turn off various fancy instruction sets...

as well as deduplicate some options. This makes the EFI loader build
work with CPUTYPE=native in make.conf on my Core i5.

r268974 (sbruno): Supress clang warning for FreeBSD printf %b and %D formats

Relnotes: Yes
Sponsored by: The FreeBSD Foundation


267010 03-Jun-2014 rodrigc

MFC r266938:

Allow customization of the brand displayed in the boot menu.
If the user specifies in /boot/loader.conf:

loader_brand="mycustom-brand"

Then "mycustom-brand" will be executed instead of "fbsd-logo".

Submitted by: alfred
Obtained from: FreeNAS


262704 03-Mar-2014 dteske

MFC r258270:

Add a try-include word (which acts the same as "include") and use it to
conditionally include (but ignore failures) /boot/loader.rc.local and
/boot/menu.rc.local -- to make customizing the menu easier.

Reviewed by: alfred
Discussed on: -hackers


262703 03-Mar-2014 dteske

MFC r258269: Refactor draw-beastie function.

Discussed on: -hackers


262702 03-Mar-2014 dteske

MFC r257821:

Extend loader_delay as-documented in beastie.4th(8) and delay.4th(8),
making it available to architectures that do not use or load the beastie
menu. This is reported to save headaches on some PPC systems where unload
followed by load does not produce the desired results wherein if-given
the opportunity to abort the initial loading sequence, you can customize
the first load.

Reviewed by: nwhitehorn, kan
Discussed on: -current


262701 03-Mar-2014 dteske

MFC r257650:

Defer loading of kernel and modules if the beastie menu is enabled. Add a
kernel selection menu to the beastie menu. List of kernels is taken from
`kernels' in loader.conf(5) as a space (or comma) separated list of names
to display (up to 9). If not set, default value is "kernel kernel.old".
Does not validate that kernels exist because the next enhancement will be
to allow selection of the root device.

Discussed on: -current


256381 12-Oct-2013 markm

Merge from project branch via main. Uninteresting commits are trimmed.

Refactor of /dev/random device. Main points include:

* Userland seeding is no longer used. This auto-seeds at boot time
on PC/Desktop setups; this may need some tweeking and intelligence
from those folks setting up embedded boxes, but the work is believed
to be minimal.

* An entropy cache is written to /entropy (even during installation)
and the kernel uses this at next boot.

* An entropy file written to /boot/entropy can be loaded by loader(8)

* Hardware sources such as rdrand are fed into Yarrow, and are no
longer available raw.

------------------------------------------------------------------------
r256240 | des | 2013-10-09 21:14:16 +0100 (Wed, 09 Oct 2013) | 4 lines

Add a RANDOM_RWFILE option and hide the entropy cache code behind it.
Rename YARROW_RNG and FORTUNA_RNG to RANDOM_YARROW and RANDOM_FORTUNA.
Add the RANDOM_* options to LINT.

------------------------------------------------------------------------
r256239 | des | 2013-10-09 21:12:59 +0100 (Wed, 09 Oct 2013) | 2 lines

Define RANDOM_PURE_RNDTEST for rndtest(4).

------------------------------------------------------------------------
r256204 | des | 2013-10-09 18:51:38 +0100 (Wed, 09 Oct 2013) | 2 lines

staticize struct random_hardware_source

------------------------------------------------------------------------
r256203 | markm | 2013-10-09 18:50:36 +0100 (Wed, 09 Oct 2013) | 2 lines

Wrap some policy-rich code in 'if NOTYET' until we can thresh out
what it really needs to do.

------------------------------------------------------------------------
r256184 | des | 2013-10-09 10:13:12 +0100 (Wed, 09 Oct 2013) | 2 lines

Re-add /dev/urandom for compatibility purposes.

------------------------------------------------------------------------
r256182 | des | 2013-10-09 10:11:14 +0100 (Wed, 09 Oct 2013) | 3 lines

Add missing include guards and move the existing ones out of the
implementation namespace.

------------------------------------------------------------------------
r256168 | markm | 2013-10-08 23:14:07 +0100 (Tue, 08 Oct 2013) | 10 lines

Fix some just-noticed problems:

o Allow this to work with "nodevice random" by fixing where the
MALLOC pool is defined.

o Fix the explicit reseed code. This was correct as submitted, but
in the project branch doesn't need to set the "seeded" bit as this
is done correctly in the "unblock" function.

o Remove some debug ifdeffing.

o Adjust comments.

------------------------------------------------------------------------
r256159 | markm | 2013-10-08 19:48:11 +0100 (Tue, 08 Oct 2013) | 6 lines

Time to eat crow for me.

I replaced the sx_* locks that Arthur used with regular mutexes;
this turned out the be the wrong thing to do as the locks need to
be sleepable. Revert this folly.

# Submitted by: Arthur Mesh <arthurmesh@gmail.com> (In original diff)

------------------------------------------------------------------------
r256138 | des | 2013-10-08 12:05:26 +0100 (Tue, 08 Oct 2013) | 10 lines

Add YARROW_RNG and FORTUNA_RNG to sys/conf/options.

Add a SYSINIT that forces a reseed during proc0 setup, which happens
fairly late in the boot process.

Add a RANDOM_DEBUG option which enables some debugging printf()s.

Add a new RANDOM_ATTACH entropy source which harvests entropy from the
get_cyclecount() delta across each call to a device attach method.

------------------------------------------------------------------------
r256135 | markm | 2013-10-08 07:54:52 +0100 (Tue, 08 Oct 2013) | 8 lines

Debugging. My attempt at EVENTHANDLER(multiuser) was a failure; use
EVENTHANDLER(mountroot) instead.

This means we can't count on /var being present, so something will
need to be done about harvesting /var/db/entropy/... .

Some policy now needs to be sorted out, and a pre-sync cache needs
to be written, but apart from that we are now ready to go.

Over to review.

------------------------------------------------------------------------
r256094 | markm | 2013-10-06 23:45:02 +0100 (Sun, 06 Oct 2013) | 8 lines

Snapshot.

Looking pretty good; this mostly works now. New code includes:

* Read cached entropy at startup, both from files and from loader(8)
preloaded entropy. Failures are soft, but announced. Untested.

* Use EVENTHANDLER to do above just before we go multiuser. Untested.

------------------------------------------------------------------------
r256088 | markm | 2013-10-06 14:01:42 +0100 (Sun, 06 Oct 2013) | 2 lines

Fix up the man page for random(4). This mainly removes no-longer-relevant
details about HW RNGs, reseeding explicitly and user-supplied
entropy.

------------------------------------------------------------------------
r256087 | markm | 2013-10-06 13:43:42 +0100 (Sun, 06 Oct 2013) | 6 lines

As userland writing to /dev/random is no more, remove the "better
than nothing" bootstrap mode.

Add SWI harvesting to the mix.

My box seeds Yarrow by itself in a few seconds! YMMV; more to follow.

------------------------------------------------------------------------
r256086 | markm | 2013-10-06 13:40:32 +0100 (Sun, 06 Oct 2013) | 11 lines

Debug run. This now works, except that the "live" sources haven't
been tested. With all sources turned on, this unlocks itself in
a couple of seconds! That is no my box, and there is no guarantee
that this will be the case everywhere.

* Cut debug prints.

* Use the same locks/mutexes all the way through.

* Be a tad more conservative about entropy estimates.

------------------------------------------------------------------------
r256084 | markm | 2013-10-06 13:35:29 +0100 (Sun, 06 Oct 2013) | 5 lines

Don't use the "real" assembler mnemonics; older compilers may not
understand them (like when building CURRENT on 9.x).

# Submitted by: Konstantin Belousov <kostikbel@gmail.com>

------------------------------------------------------------------------
r256081 | markm | 2013-10-06 10:55:28 +0100 (Sun, 06 Oct 2013) | 12 lines

SNAPSHOT.

Simplify the malloc pools; We only need one for this device.

Simplify the harvest queue.

Marginally improve the entropy pool hashing, making it a bit faster
in the process.

Connect up the hardware "live" source harvesting. This is simplistic
for now, and will need to be made rate-adaptive.

All of the above passes a compile test but needs to be debugged.

------------------------------------------------------------------------
r256042 | markm | 2013-10-04 07:55:06 +0100 (Fri, 04 Oct 2013) | 25 lines

Snapshot. This passes the build test, but has not yet been finished or debugged.

Contains:

* Refactor the hardware RNG CPU instruction sources to feed into
the software mixer. This is unfinished. The actual harvesting needs
to be sorted out. Modified by me (see below).

* Remove 'frac' parameter from random_harvest(). This was never
used and adds extra code for no good reason.

* Remove device write entropy harvesting. This provided a weak
attack vector, was not very good at bootstrapping the device. To
follow will be a replacement explicit reseed knob.

* Separate out all the RANDOM_PURE sources into separate harvest
entities. This adds some secuity in the case where more than one
is present.

* Review all the code and fix anything obviously messy or inconsistent.
Address som review concerns while I'm here, like rename the pseudo-rng
to 'dummy'.

# Submitted by: Arthur Mesh <arthurmesh@gmail.com> (the first item)

------------------------------------------------------------------------
r255319 | markm | 2013-09-06 18:51:52 +0100 (Fri, 06 Sep 2013) | 4 lines

Yarrow wants entropy estimations to be conservative; the usual idea
is that if you are certain you have N bits of entropy, you declare
N/2.

------------------------------------------------------------------------
r255075 | markm | 2013-08-30 18:47:53 +0100 (Fri, 30 Aug 2013) | 4 lines

Remove short-lived idea; thread to harvest (eg) RDRAND enropy into the
usual harvest queues. It was a nifty idea, but too heavyweight.

# Submitted by: Arthur Mesh <arthurmesh@gmail.com>

------------------------------------------------------------------------
r255071 | markm | 2013-08-30 12:42:57 +0100 (Fri, 30 Aug 2013) | 4 lines

Separate out the Software RNG entropy harvesting queue and thread
into its own files.

# Submitted by: Arthur Mesh <arthurmesh@gmail.com>

------------------------------------------------------------------------
r254934 | markm | 2013-08-26 20:07:03 +0100 (Mon, 26 Aug 2013) | 2 lines

Remove the short-lived namei experiment.

------------------------------------------------------------------------
r254928 | markm | 2013-08-26 19:35:21 +0100 (Mon, 26 Aug 2013) | 2 lines

Snapshot; Do some running repairs on entropy harvesting. More needs
to follow.

------------------------------------------------------------------------
r254927 | markm | 2013-08-26 19:29:51 +0100 (Mon, 26 Aug 2013) | 15 lines

Snapshot of current work;

1) Clean up namespace; only use "Yarrow" where it is Yarrow-specific
or close enough to the Yarrow algorithm. For the rest use a neutral
name.

2) Tidy up headers; put private stuff in private places. More could
be done here.

3) Streamline the hashing/encryption; no need for a 256-bit counter;
128 bits will last for long enough.

There are bits of debug code lying around; these will be removed
at a later stage.

------------------------------------------------------------------------
r254784 | markm | 2013-08-24 14:54:56 +0100 (Sat, 24 Aug 2013) | 39 lines

1) example (partially humorous random_adaptor, that I call "EXAMPLE")
* It's not meant to be used in a real system, it's there to show how
the basics of how to create interfaces for random_adaptors. Perhaps
it should belong in a manual page

2) Move probe.c's functionality in to random_adaptors.c
* rename random_ident_hardware() to random_adaptor_choose()

3) Introduce a new way to choose (or select) random_adaptors via tunable
"rngs_want" It's a list of comma separated names of adaptors, ordered
by preferences. I.e.:
rngs_want="yarrow,rdrand"

Such setting would cause yarrow to be preferred to rdrand. If neither of
them are available (or registered), then system will default to
something reasonable (currently yarrow). If yarrow is not present, then
we fall back to the adaptor that's first on the list of registered
adaptors.

4) Introduce a way where RNGs can play a role of entropy source. This is
mostly useful for HW rngs.

The way I envision this is that every HW RNG will use this
functionality by default. Functionality to disable this is also present.
I have an example of how to use this in random_adaptor_example.c (see
modload event, and init function)

5) fix kern.random.adaptors from
kern.random.adaptors: yarrowpanicblock
to
kern.random.adaptors: yarrow,panic,block

6) add kern.random.active_adaptor to indicate currently selected
adaptor:
root@freebsd04:~ # sysctl kern.random.active_adaptor
kern.random.active_adaptor: yarrow

# Submitted by: Arthur Mesh <arthurmesh@gmail.com>

Submitted by: Dag-Erling Smørgrav <des@FreeBSD.org>, Arthur Mesh <arthurmesh@gmail.com>
Reviewed by: des@FreeBSD.org
Approved by: re (delphij)
Approved by: secteam (des,delphij)


256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

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


254952 27-Aug-2013 dteske

Update copyright.


254942 26-Aug-2013 dteske

Building upon SVN r254237, disable automated activation of alternate layouts
and add support for default underride to $loader_version, acting as a way to
name a release. Release text is not displayed for the aforementioned feature
of alternate display layout (introduced in r254237); however, for all other
layouts (incl. default), the release name is displayed at lower-right.

See version.4th(8) for additional information and/or historical details.
NOTE: Also a minor edit to version.4th(8) while we're here.


254237 12-Aug-2013 dteske

Add optional support for default override of standard setup; but only if
corresponding functions are provided. If override function does not exist,
boot remains unmodified. This patch should not result in any changes.


254108 08-Aug-2013 dteske

Update legacy static assignments in old code to support dynamic framing,
plotting, and alignment coinciding with enhancements in SVN r242667.


254105 08-Aug-2013 dteske

Since the introduction of SVN r244048 and [follow-up] r244089, it is now
safe to build upon ``boot_serial?'' functionality to make safer UI choices.


253715 27-Jul-2013 kientzle

Put in commented-out version of beastie menu commands
so that non-i386 users can easily experiment with this.


253071 09-Jul-2013 avg

default loader.conf: there is no need to load zpool.cache now

kernel does not need it for importing a root pool.

MFC after: 4 weeks


244158 12-Dec-2012 dteske

Fix a regression caused by SVN r222417.

Prior to r222417, setting `password' in loader.conf(5) did not prevent boot
but instead only prevented changes to boot options by prompting for password
if autoboot failed or the user interrupted the countdown sequence.
After r222417 the same machine with `password' set in loader.conf(5) would no
longer boot without _always_ entering the password.

This patch restores the old (8.x and older) functionality for password in
loader.conf(5) while adding a new bootlock_password feature to replace the
edge-case should anybody desire the regressed functionality (HINT: great for
PXE servers and/or private distributions).

loader.conf(5) was updated to be more clear with-respect to password setting
(previous text was misleading).

Documentation (loader.conf(5) and check-password.4th(8)) has been updated to
include notes on the new bootlock_password setting.

Special thanks to Alex Verbod for bringing this to my attention and helping to
refine the loader.conf(5) text.

PR: conf/170110
Submitted by: Vitaly Zakharov <ded3axap@gmail.com>
Reviewed by: Alexander Verbod <alexander.verbod@gmail.com>


244089 10-Dec-2012 dteske

Add support for comma-separated values (whitespace-separated still supported).

PR: conf/121064
Submitted by: koitsu
Reviewed by: jh


244048 09-Dec-2012 dteske

Use ASCII characters for box/line characters in frames.4th

Committed with changes to support the following from loader.conf(5):
+ console="vidconsole comconsole" (not just console="comconsole")
+ boot_serial="anything" (not just boot_serial="YES")
+ boot_multicons="anything" (unsupported in originally-submitted patch)

PR: conf/121064
Submitted by: koitsu
Reviewed by: gcooper, adrian (co-mentor)
Approved by: adrian (co-mentor)


243660 28-Nov-2012 dteske

Discussed at-length on -arch.

Make the following interface changes to my beastie boot menu:
+ Move boot options to a submenu
+ Add a new "Boot Single" menu item
+ Make "Boot" item and new "Boot Single" item reverse when boot_single is set
+ Add new "Load Defaults" item (in new "Boot Options" submenu) for overridding
loader.conf(5) provided values with system defaults.

Reviewed by: adrian (co-mentor)
Approved by: adrian (co-mentor)


243114 16-Nov-2012 dteske

+ This patch does not change user experience or functionality
+ Cleanup syntax, slim-down code, and make things more readable
+ Introduce new +c! operator and ilk to reduce heap usage/allocations
+ Add safemode_enabled? safemode_enable and safemode_disable functions
+ Add singleuser_enabled? singleuser_enable singleuser_disable functions
+ Add verbose_enabled? verbose_enable and verbose_disable functions
+ Centralize strings (also to reduce heap usage)

Reviewed by: peterj, adrian (co-mentor)
Approved by: adrian (co-mentor)


242923 12-Nov-2012 dteske

Fix a stack leak in [unused] cycle_menuitem function while we're here
(required misconfiguration and/or missing environment vars to occur).

Reviewed by: peterj, adrian (co-mentor)
Approved by: adrian (co-mentor)


242669 06-Nov-2012 dteske

Fix funny comment.

Approved by: adrian (co-mentor) (implicit)


242668 06-Nov-2012 dteske

Fix c/p error in comment.

Approved by: adrian (co-mentor) (implicit)


242667 06-Nov-2012 dteske

Add ontop of my existing boot loader Forth code, including support for
submenus. See menusets.4th(8) for additional details including examples.

Discussed on arch and recommended for inclusion at the devsummit.

This change does not alter the appearance or user experience, only enhances
possibilities.

Reviewed by: adrian (co-mentor)
Approved by: adrian (co-mentor)


241636 17-Oct-2012 attilio

Disconnect non-MPSAFE NTFS from the build in preparation for dropping
GIANT from VFS. This code is particulary broken and fragile and other
in-kernel implementations around, found in other operating systems,
don't really seem clean and solid enough to be imported at all.
If someone wants to reconsider in-kernel NTFS implementation for
inclusion again, a fair effort for completely fixing and cleaning it
up is expected.

In the while NTFS regular users can use FUSE interface and ntfs-3g
port to work with their NTFS partitions.

This is not targeted for MFC.


241608 16-Oct-2012 attilio

Disconnect non-MPSAFE CODAFS from the build in preparation for dropping
GIANT from VFS.

This is not targeted for MFC.


241607 16-Oct-2012 attilio

Disconnect non-MPSAFE XFS from the build in preparation for dropping
GIANT from VFS.

This is not targeted for MFC.


241606 16-Oct-2012 attilio

Disconnect non-MPSAFE PORTALFS from the build in preparation for dropping
GIANT from VFS.

This is not targeted for MFC.


241523 14-Oct-2012 dteske

Since the introduction of the new advanced boot menu (r222417), options like
"boot verbose", "single user mode", "ACPI" and more are now stateful boolean
menuitems rather than direct action-items.

A short-coming in this new menu system is that when a user sets a non-default
value in loader.conf(5), this non-default state is not reflected in the menu
-- leading to confusion as to whether the option was taking effect or not.

This patch adds dynamic menuitem constructors _and_ the necessary Forth
callbacks to initialize these stateful menuitems -- causing the aforementioned
menuitems to adhere to loader.conf(5) settings.

PR: bin/172529
Approved by: adrian (co-mentor)
MFC after: 21 days


241367 09-Oct-2012 dteske

Fix a typo (s/prefix/suffix/) and comment.

NOTE: This is in an unused portion of the menu framework.

Reviewed by: eadler, adrian (co-mentor)
Approved by: adrian (co-mentor)


241365 09-Oct-2012 dteske

Fix an oversight that cyclic menu items actually are zero-based and can
accommodate 10 different states.

Reviewed by: eadler, adrian (co-mentor)
Approved by: adrian (co-mentor)


241363 09-Oct-2012 dteske

Make the "Options:" separator-text configurable by setting $menu_optionstext.

Reviewed by: eadler, adrian (co-mentor)
Approved by: adrian (co-mentor)
MFC after: 3 days


241361 08-Oct-2012 dteske

Add an echo to say we're "Booting..." when the overloaded "boot" Ficl word is
executed to better differentiate between loader-specific errors and kernel-
specific errors (if ever any of either).

This type of functionality hasn't been required before the introduction of the
advanced menu system (r222417). Adding this functionality will help different-
iate errors at the loader-level such as a BTX halt caused by heap exhaustion
and errors that may be involved with executing the kernel (wrong architecture
for example). A user can learn that messages before "Booting..." are related to
the loader(8) environment and it's Forth-ilk, while those after are not
related to loader(8) -- the point that loader(8) has ``left the building''.

This patch also includes a man-page update to color.4th(8) as the color logic
moves to a lower-level (from being included by beastie.4th to being included
by loader.4th).

After noticing a delay between execution of the overloaded "boot" FICL word and
the display of text on-screen, gcooper confirmed that the introduction of a
builtin memory test (disabled by adding hw.memtest.tests="0" to loader.conf(5))
was the cause of the delay.

This patch adds an echo to produce "Booting..." when the overloaded "boot" word
is executed (this includes from the interactive command-prompt on all arches,
from the menu system on arches that run the beastie menu, and even those arches
that run the menu but disable it by setting beastie_disable="YES" in
loader.conf(5)). When loader_color="YES" in loader.conf(5), the same message is
produced but in white text on a blue background (only the letters produced have
this background -- opposed to perhaps the entire line).


241310 07-Oct-2012 dteske

Comment and Copyright fixes/updates.

Reviewed by: adrian (co-mentor)
Approved by: adrian (co-mentor)


238431 14-Jul-2012 dteske

Fix domain.

Approved by: emaste


235873 24-May-2012 wblock

Fixes to man8 groff mandoc style, usage mistakes, or typos.

PR: 168016
Submitted by: Nobuyuki Koganemaru
Approved by: gjb
MFC after: 3 days


235560 17-May-2012 dteske

Update contact info.

PR: N/A (mentor approved)
Submitted by: dteske
Reviewed by: dteske (mentor approved)
Approved by: emaste (mentor)
MFC after: 1 week


233941 06-Apr-2012 avg

retrofit Safe Mode loader menu item actions

The menu item is now made completely independent with the ACPI item - most
modern systems seem to require ACPI and become even more "unsafe"
without it.
Safe Mode no longer disables APIC for the same reason.
kbdmux is not disabled as this feature has proven itself stable.

New actions:
- SMP is disabled in the Safe Mode now
- eventtimers are forced to periodic mode (some real and virtual systems
seem to have problems otherwise)
- geom extra vigorous integrity checking is disabled, this is to
facilitate migration from previous versions

Possible short term to do:
- make SMP switch a separate menu item
- restore APIC switch as a separate menu item

Longer term to do:
- turn various tweaks into separate menu items in a Safe Mode sub-menu

Please consider adding a safety tweak to Safe Mode when introducing
new major features or changes that may cause instabilities.

Discussed with: jhb, scottl, Devin Teske
MFC after: 3 weeks (stable/9 only)


233648 29-Mar-2012 eadler

Remove trailing whitespace per mdoc lint warning

Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days


232614 06-Mar-2012 bz

Provide wbwd(4), a driver for the watchdog timer found on various
Winbond Super I/O chips.

With minor efforts it should be possible the extend the driver to support
further chips/revisions available from Winbond. In the simplest case
only new IDs need to be added, while different chipsets might require
their own function to enter extended function mode, etc.

Sponsored by: Sandvine Incorporated ULC (in 2011)
Reviewed by: emaste, brueffer
MFC after: 2 weeks


232158 25-Feb-2012 gjb

Whitespace cleanup:
o Wrap sentences on to new lines
o Cleanup trailing whitespace

Found with: textproc/igor
MFC after: 1 week
X-MFC-With: r232157


232157 25-Feb-2012 gjb

Fix various typos in manual pages.

Submitted by: amdmi3
PR: 165431
MFC after: 1 week


230545 25-Jan-2012 pluknet

Clarify and improve the boot menu with some small changes:
- Enter instead of ENTER
- Remove colons
- Line up option values
- Use dots to provide a line to visually connect the menu
selections with their values
- Replace Enabled/Disabled with off/On
(bigger inital cap for "On" is a visual indicator)
- Remove confusing "Boot" from selections that don't boot.
- With loader_color=1 in /boot/loader.conf, use reverse video to
highlight enabled options

PR: misc/160818
Submitted by: Warren Block <wblock wonkity com>
Reviewed by: Devin Teske <devin dot teske fisglobal com>, current@
MFC after: 1 week


230109 14-Jan-2012 eadler

- Document TheDraw splash screens in the default loader.conf

Submitted by: Jason Hellenthal
Approved by: glebius
MFC after: 3 days


229881 09-Jan-2012 pluknet

Get rid of a spurious warning on the console when booting the kernel
from the interactive loader(8) prompt and beastie_disable="YES" is set
in loader.conf(5). In this case menu.rc is not evaluated and consequently
menu-unset does not have a body yet. This results in the ficl warning
"menu-unset not found" when try-menu-unset invokes menu-unset.

Check for beastie_disable="YES" explicitly, so that the try-menu-unset
word will not attempt to invoke menu-unset because the menu will have
never been configured. [1]
Use the sfind primitive as a last resort as an additional safer approach
conjuring a foreign word safely. [2]

PR: kern/163938
Submitted by: Devin Teske [1]
Reviewed by: Devin Teske [2]
Reported and tested by: dim
MFC after: 1 week
X-MFC with: r228985


228985 30-Dec-2011 pluknet

Unset the environment variables associated with individual menu items
before invoking the kernel.

Quoting submitter:

The issue is with the new boot loader menu. It adds many loader variables
including ones that contain ANSI color escapes.

Obviously, these ANSI codes don't play well with serial consoles when
kenv(1) is executed without arguments (reports vary as to what happens,
but it's never pretty).

The net-effect is that kenv(1) no longer reports menu-related variables.

In essence, kenv(1) output should now appear the same as on RELENG_8
(which lacks the new boot loader and didn't use any such variables).
Thus, restoring serial console glory.

Submitted by: Devin Teske <devin dott teske fisglobal.com>
MFC after: 2 weeks


228576 16-Dec-2011 glebius

- Rename if_carp.ko to carp.ko.
- carp.ko depends on sha1.c


227727 19-Nov-2011 miwi

- Add new loader_logo orbbw to default.conf

PR: 162608
Submitted by: manolis
Approved by: rwatson (mentor)
MFC after: 3 Days


226833 27-Oct-2011 pluknet

Remove the long reprecated ``/stand/sysinstall'' from the init_path.

It can be put back using the INIT_PATH config option or init_path
loader variable, if still needed (which I doubt).

MFC after: 1 week


225353 02-Sep-2011 jh

Restore behavior of the autoboot_delay="-1" boot menu setting to the
pre-r222417 state. The behavior was essentially reversed in r222417
which can cause confusion.

PR: 159775
Submitted by: Devin Teske
Approved by: re (kib)


225122 23-Aug-2011 marck

Add kern.cam.boot_delay description (with reasonable default) to
default/loader.conf

This should help people installing ${OS} to USB devices, where there are
frequently cases where kernel tries to mount root before actual umass sensing
is finished.

Reviewed by: mav
Approved by: re (kib)
MFC after: 1 week


224408 25-Jul-2011 rodrigc

Document the tftp.blksize variable added in src/lib/libstand/tftp.c.

Approved by: re (kib)
Requested by: maxim


224228 20-Jul-2011 jhb

Note that the "kernel" variable in loader.conf is the name of a directory
containing a kernel under /boot and that it's default value is "kernel"
not "/boot/kernel/kernel".

PR: docs/158992
Reported by: Wayne Mitchell wayne.mitchell.iz at gmail
Approved by: re (kib)
MFC after: 1 week


223109 15-Jun-2011 nwhitehorn

Revert changes to this file in r222417. This unconditionally enabled the
boot menu on all platforms, which breaks loader completely on at least
powerpc for reasons that are not understood yet.

Reviewed by: Devin Teske


222599 02-Jun-2011 uqs

mdoc: fix markup


222417 28-May-2011 julian

New boot loader menus from Devin Teske.
Discussed on hackers and recommended for inclusion into 9.0 at the devsummit.
All support email to devin dteske at vicor dot ignoreme dot com .

Submitted by: dteske at vicor dot ignoreme dot com
Reviewed by: me and many others


220594 13-Apr-2011 pluknet

Remove the now defunct kern.ipc.nmbufs tunable.

PR: kern/132497 (part)
MFC after: 1 week


219647 14-Mar-2011 davidch

- Initial release of bxe(4) to support Broadcom NetXtreme II 10GbE.
(BCM57710, BCM57711, BCM57711E)

MFC after: One month


218815 18-Feb-2011 danger

- add missing if_ devices which were missing and are available as loadable
modules too

Reviewed by: brucec


217689 21-Jan-2011 pluknet

Add kern.msgbufsize default setting to /boot/defaults/loader.conf.

Suggested by: Alex Kozlov <spam rm-rf.kiev.ua> (via private mail)
Approved by: kib (mentor)


217688 21-Jan-2011 pluknet

Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize.

Submitted by: perryh pluto.rain.com (previous version)
Reviewed by: jhb
Approved by: kib (mentor)
Tested by: universe


217644 20-Jan-2011 jhb

Fix a stack leak in r215345 when skipping over the ACPI menu item for
machines that do not support ACPI.

Submitted by: olli


216829 31-Dec-2010 yongari

Add driver for DM&P Vortex86 RDC R6040 Fast Ethernet.
The controller is commonly found on DM&P Vortex86 x86 SoC. The
driver supports all hardware features except flow control. The
flow control was intentionally disabled due to silicon bug.

DM&P Electronics, Inc. provided all necessary information including
sample board to write driver and answered many questions I had.
Many thanks for their support of FreeBSD.

H/W donated by: DM&P Electronics, Inc.


215345 15-Nov-2010 jhb

Don't display option 2 (to toggle ACPI on or off) on x86 machines if the
BIOS does not support ACPI. The other options in the menu retain their
existing numbers, option 2 is simply blanked out (and '2' is ignored).

MFC after: 1 month


215016 08-Nov-2010 jhb

Remove support for autoloading ACPI from the loader. Leave in the code to
detect ACPI and export info such as the location of the RSDP via hints as
that is still useful.


212861 19-Sep-2010 nork

Add support 'device tpm' for amd64.
Add tpm(4)'s default setting to /boot/defaults/loader.conf.
Add 'device tpm' to NOTES for amd64 and i386.

Discussed with: takawata
Approved by: imp (mentor)


212338 08-Sep-2010 jhb

If autoboot_delay is set to -1, boot immediately without checking for
a keypress to match the behavior of the loader.

PR: docs/108101
Submitted by: Wayne Sierke ws of au.dyndns.ws
Tested by: brd
MFC after: 1 week


209466 23-Jun-2010 brucec

Add some more modules to loader.conf. Remove if_awi since support for it
was removed 2 years ago.

PR: conf/147126
PR: conf/116071
Approved by: rrs (mentor)


208027 13-May-2010 uqs

mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the
bottom of the manpages and order them consistently.

GNU groff doesn't care about the ordering, and doesn't even mention
CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put
them.

Found by: mdocml lint run
Reviewed by: ru


207630 04-May-2010 delphij

Remove if_ar, if_ray, if_sr, if_ppp, if_sl to reflect the current modules
available, they were removed due to NEEDSGIANT.

While I'm there, add if_et which was missed quite a while ago.

MFC after: 2 weeks


206625 14-Apr-2010 yongari

Add driver for Silicon Integrated Systems SiS190/191 Fast/Gigabit Ethernet.
This driver was written by Alexander Pohoyda and greatly enhanced
by Nikolay Denev. I don't have these hardwares but this driver was
tested by Nikolay Denev and xclin.

Because SiS didn't release data sheet for this controller, programming
information came from Linux driver and OpenSolaris. Unlike other open
source driver for SiS190/191, sge(4) takes full advantage of TX/RX
checksum offloading and does not require additional copy operation in
RX handler.
The controller seems to have advanced offloading features like VLAN
hardware tag insertion/stripping, TCP segmentation offload(TSO) as
well as jumbo frame support but these features are not available
yet. Special thanks to xclin <xclin<> cs dot nctu dot edu dot tw>
who sent fix for receiving VLAN oversized frames.


204328 25-Feb-2010 weongyo

Add bwn(4) driver.


202437 16-Jan-2010 trasz

Add gmountver, disk mount verification GEOM class.

Note that due to e.g. write throttling ('wdrain'), it can stall all the disk
I/O instead of just the device it's configured for. Using it for removable
media is therefore not a good idea.

Reviewed by: pjd (earlier version)


202143 12-Jan-2010 brooks

Replace the static NGROUPS=NGROUPS_MAX+1=1024 with a dynamic
kern.ngroups+1. kern.ngroups can range from NGROUPS_MAX=1023 to
INT_MAX-1. Given that the Windows group limit is 1024, this range
should be sufficient for most applications.

MFC after: 1 month


199855 27-Nov-2009 sobomax

Add new loader console type: "spinconsole". This console selects the
video console which doesn't take any input from keyboard and hides
all output replacing it with ``spinning'' character (useful for
embedded products and custom installations).

Sponsored by: Sippy Software, Inc.


197518 26-Sep-2009 bz

lindev(4) [1] is supposed to be a collection of linux-specific pseudo
devices that we also support, just not by default (thus only LINT or
module builds by default).

While currently there is only "/dev/full" [2], we are planning to see more
in the future. We may decide to change the module/dependency logic in the
future should the list grow too long.

This is not part of linux.ko as also non-linux binaries like kFreeBSD
userland or ports can make use of this as well.

Suggested by: rwatson [1] (name)
Submitted by: ed [2]
Discussed with: markm, ed, rwatson, kib (weeks ago)
Reviewed by: rwatson, brueffer (prev. version)
PR: kern/68961
MFC after: 6 weeks


195892 26-Jul-2009 bz

Update epair(4) to the new netisr implementation and polish
things a bit:
- use dpcpu data to track the ifps with packets queued up,
- per-cpu locking and driver flags
- along with .nh_drainedcpu and NETISR_POLICY_CPU.
- Put the mbufs in flight reference count, preventing interfaces
from going away, under INVARIANTS as this is a general problem
of the stack and should be solved in if.c/netisr but still good
to verify the internal queuing logic.
- Permit changing the MTU to virtually everythinkg like we do for loopback.

Hook epair(4) up to the build.

Approved by: re (kib)


194246 15-Jun-2009 marius

Add cas(4), a driver for Sun Cassini/Cassini+ and National Semiconductor
DP83065 Saturn Gigabit Ethernet controllers. These are the successors
of the Sun GEM controllers and still have a similar but extended transmit
logic. As such this driver is based on gem(4).
Thanks to marcel@ for providing a Sun Quad GigaSwift Ethernet UTP (QGE)
card which was vital for getting this driver to work on architectures
not using Open Firmware.

Approved by: re (kib)
MFC after: 2 weeks


193880 10-Jun-2009 yongari

Add alc(4), a driver for Atheros AR8131/AR8132 PCIe ethernet
controller. These controllers are also known as L1C(AR8131) and
L2C(AR8132) respectively. These controllers resembles the first
generation controller L1 but usage of different descriptor format
and new register mappings over L1 register space requires a new
driver. There are a couple of registers I still don't understand
but the driver seems to have no critical issues for performance and
stability. Currently alc(4) supports the following hardware
features.
o MSI
o TCP Segmentation offload
o Hardware VLAN tag insertion/stripping
o Tx/Rx interrupt moderation
o Hardware statistics counters(dev.alc.%d.stats)
o Jumbo frame
o WOL
AR8131/AR8132 also supports Tx checksum offloading but I disabled
it due to stability issues. I'm not sure this comes from broken
sample boards or hardware bugs. If you know your controller works
without problems you can still enable it. The controller has a
silicon bug for Rx checksum offloading, so the feature was not
implemented.
I'd like to say big thanks to Atheros. Atheros kindly sent sample
boards to me and answered several questions I had.

HW donated by: Atheros Communications, Inc.


192247 17-May-2009 brueffer

Improve the accf_dns_load description.


190789 07-Apr-2009 weongyo

Add an entry for the uath(4) module.


190100 19-Mar-2009 thompsa

Remove the uscanner(4) driver, this follows the removal of the kernel scanner
driver in Linux 2.6. uscanner was just a simple wrapper around a fifo and
contained no logic, the default interface is now libusb (supported by sane).

Reviewed by: HPS


189872 16-Mar-2009 dchagin

Chase the k8temp->amdtemp rename in NOTES and loader.conf.

Approved by: kib (mentor)


187614 23-Jan-2009 weongyo

Add an entry for the urtw(4) module.


187143 13-Jan-2009 luigi

comment out some debugging messages that slipped in by mistake.

MFC after: 3 days


186789 05-Jan-2009 luigi

This patch introduces a number of simplifications to the Forth
functions used in the bootloader. The goal is to make the code more
readable and smaller (especially because we have size issues
in the loader's environment).

High level description of the changes:
+ define some string manipulation functions to improve readability;
+ create functions to manipulate module descriptors, removing some
duplicated code;
+ rename the error codes to ESOMETHING;
+ consistently use set_environment_variable (which evaluates
$variables) when interpreting variable=value assignments;

I have tested the code, but there might be code paths that I have
not traversed so please let me know of any issues.

Details of this change:

--- loader.4th ---
+ add some module operators, to remove duplicated code while parsing
module-related commands:

set-module-flag
enable-module
disable-module
toggle-module
show-module

--- pnp.4th ---
+ move here the definition related to the pnp devices list, e.g.
STAILQ_* , pnpident, pnpinfo

--- support.4th ---
+ rename error codes to capital e.g. ENOMEM EFREE ... and do obvious
changes related to the renaming;
+ remove unused structures (those relevant to pnp are moved to pnp.4th)
+ various string functions
- strlen removed (it is an internal function)
- strchr, defined as the C function
- strtype -- type a string to output
- strref -- assign a reference to the string on the stack
- unquote -- remove quotes from a string

+ remove reset_line_buffer

+ move up the 'set_environment_variable' function (which now
uses the interpreter, so $variables are evaluated).
Use the function in various places

+ add a 'test_file function' for debugging purposes

MFC after: 4 weeks


185746 07-Dec-2008 luigi

PROBLEM: putting in a loader config file a line of the form

loader_conf_files="foo bar baz"

should cause loading the files listed, and then resume with the
remaining config files (from previous values of the variable).
Unfortunately, sometimes the line was ignored -- actually even
modifying the line in /boot/default/loader.conf sometimes doesn't work.

ANALYSIS: After much investigation, turned out to be a bug in the logic.
The existing code detected a new assignment by looking at the address
of the the variable containing the string. This only worked by pure
chance, i.e. if the new string is longer than the previous value
then the memory allocator may return a different address
to store the string hence triggering the detection.

SOLUTION: This commit contains a minimal change to fix the problem,
without altering too much the existing structure of the code.
However, as a step towards improving the quality and reliability of
this code, I have introduced a handful of one-line functions
(strget, strset, strfree, string= ) that could be used in dozens
of places in the existing code.

HOWEVER:
There is a much bigger problem here. Even though I am no Forth
expert (as most fellow src committers) I can tell that much of the
forth code (in support.4th at least) is in severe need of a
review/refactoring:

+ pieces of code are replicated multiple times instead of writing
functions (see e.g. set_module_*);

+ a lot of stale code (e.g. "structure" definitions for
preloaded_files, kernel_module, pnp stuff) which is not used
or at least belongs elsewhere.
The code bload is extremely bad as the loader runs with very small
memory constraints, and we already hit the limit once (see

http://svn.freebsd.org/viewvc/base?view=revision&revision=185132
Reducing the footprint of the forth files is critical.

+ two different styles of coding, one using pure stack functions
(maybe beautiful but surely highly unreadable), one using
high level mechanisms to give names to arguments and local
variables (which leads to readable code).

Note that this code is used by default by all FreeBSD installations,
so the fragility and the code bloat are extremely damaging.
I will try to work fixing the three items above, but if others have
time, please have a look at these issues.

MFC after: 4 weeks


184870 12-Nov-2008 yongari

Add ale(4), a driver for Atheros AR8121/AR8113/AR8114 PCIe ethernet
controller. The controller is also known as L1E(AR8121) and
L2E(AR8113/AR8114). Unlike its predecessor Attansic L1,
AR8121/AR8113/AR8114 uses completely different Rx logic such that
it requires separate driver. Datasheet for AR81xx is not available
to open source driver writers but it shares large part of Tx and
PHY logic of L1. I still don't understand some part of register
meaning and some MAC statistics counters but the driver seems to
have no critical issues for performance and stability.

The AR81xx requires copy operation to pass received frames to upper
stack such that ale(4) consumes a lot of CPU cycles than that of
other controller. A couple of silicon bugs also adds more CPU
cycles to address the known hardware bug. However, if you have fast
CPU you can still saturate the link.
Currently ale(4) supports the following hardware features.
- MSI.
- TCP Segmentation offload.
- Hardware VLAN tag insertion/stripping with checksum offload.
- Tx TCP/UDP checksum offload and Rx IP/TCP/UDP checksum offload.
- Tx/Rx interrupt moderation.
- Hardware statistics counters.
- Jumbo frame.
- WOL.

AR81xx PCIe ethernet controllers are mainly found on ASUS EeePC or
P5Q series of ASUS motherboards. Special thanks to Jeremy Chadwick
who sent the hardware to me. Without his donation writing a driver
for AR81xx would never have been possible. Big thanks to all people
who reported feedback or tested patches.

HW donated by: koitsu
Tested by: bsam, Joao Barros <joao.barros <> gmail DOT com >
Jan Henrik Sylvester <me <> janh DOT de >
Ivan Brawley < ivan <> brawley DOT id DOT au >,
CURRENT ML


183592 04-Oct-2008 stas

- Add ae(4) to loader.conf.

Approved by: kib (mentor)
MFC after: 1 week


182912 10-Sep-2008 jhb

Resurrect the sbni(4) driver. Someone finally tested the MPSAFE patches and
the driver worked ok with them.

Tested by: friends of yar


182194 26-Aug-2008 matteo

Add geom_journal

PR: conf/126829
MFC after: 2 days


181581 11-Aug-2008 weongyo

Add an entry for the upgt(4) module.


181297 04-Aug-2008 rpaulo

Add coretemp(4) and k8temp(4).

MFC after: 1 day


180593 18-Jul-2008 dwmalone

Add an accept filter for TCP based DNS requests. It waits until the
whole first request is present before returning from accept.


180265 04-Jul-2008 jhb

Remove the sbni(4) driver. No one responded to calls to test it on
current@ and stable@.


180259 04-Jul-2008 jhb

Remove the oltr(4) driver. No one responded to calls for testing on
current@ and stable@ for the locking patches. The driver can always be
revived if someone tests it.

This driver also sleeps in its if_init routine, so it likely doesn't really
work at all anyway in modern releases.


179343 27-May-2008 yongari

Add an entry for the jme(4) module.


179106 19-May-2008 yongari

Add an entry for the age(4) module.


177990 08-Apr-2008 weongyo

Add a couple of missing wireless NIC driver modules.

Approved by: thompsa (mentor)


177693 28-Mar-2008 brueffer

Add a couple of missing NIC driver modules.

Approved by: rwatson (mentor)
MFC after: 3 days


175380 16-Jan-2008 keramida

Bump manpage date for rev 1.27

MFC after: 3 days


175379 16-Jan-2008 keramida

Document that loader(8) stops reading `loader.conf' when it
encounters a syntax error, and add a tip about adding first
the `vital' options and then experimental ones.

PR: docs/119658
Submitted by: Julian Stacey, jhs at berklix.org


174777 19-Dec-2007 ambrisko

Allow negative values to be specified in the loader.


172327 26-Sep-2007 ru

Mention that autoboot_delay also accepts the "NO" value.

Approved by: re (kensmith)


171023 25-Jun-2007 rafan

- Remove UMAP filesystem. It was disconnected from build three years ago,
and it is seriously broken.

Discussed on: freebsd-arch@
Approved by: re (mux)


168554 09-Apr-2007 pjd

Add zfs_load here.

Reminded by: bmah


168512 09-Apr-2007 pjd

Always try to load zpool.cache instead of trying to find good place to
document it. When there is no such file, it's invisible for the user.


166486 04-Feb-2007 imp

Document the init_chroot and init_script variables.

# I didn't check the markup too closely, so doc people, please check

Submitted by: Oliver Fromme


166005 14-Jan-2007 maxim

o Wrap long lines.


166004 14-Jan-2007 maxim

o Typo: note -> node.

PR: misc/107906
Submitted by: Alex Keda
MFC after: 3 days


166003 14-Jan-2007 maxim

o Move the comment to the correct place.

PR: misc/107904
MFC after: 3 days


165145 13-Dec-2006 yongari

Add an entry for the msk(4) module.


163327 13-Oct-2006 ru

Replace a rarely used "depuration" with "debugging".

PR: docs/85127
Submitted by: Gary W. Swearingen (partially)
MFC after: 3 days


162934 01-Oct-2006 ariff

Add module loading option for Intel High Definition Audio Controller
- snd_hda(4)


162890 30-Sep-2006 netchild

Add snd_envy24ht and remove the snd_ak4* module.


161449 18-Aug-2006 brueffer

Wordsmithing on the ixgb(4) and mxge(4) descriptions.

Suggested by: ru (ixgb)


161448 18-Aug-2006 brueffer

Add more modules, correct alphabetical order.


161286 14-Aug-2006 brueffer

Several updates:

- Added missing file system/network/sound module entries
- Removed obsolete network module entries
- Capitalized (Fast|Gigabit) Ethernet

MFC after: 1 week


160709 26-Jul-2006 ache

Add snd_emu10kx_load


160651 25-Jul-2006 yongari

Add an entry for the stge(4) module.
While I'm here remove a stale wx(4) entry which was removed 4 years,
9 months ago.


158569 14-May-2006 marius

- Replace the entry for the no longer existing lnc(4) module with an
entry for the replacement le(4) module.
- Add an entry for the gem(4) module.
- Remove gratuitous whitespace in the description of the hme(4) entry.


158467 12-May-2006 jhb

Remove more Alpha bits from the boot code including fixing several
stale comments.


157339 31-Mar-2006 scottl

Remove the USB keyboard hack now that KBDMUX is enabled by default. Allow
it to be disabled if Safe Mode is selected.


152979 01-Dec-2005 ariff

Add kernel module loading option for snd_atiixp(4).


152568 18-Nov-2005 ru

-mdoc sweep.


152463 15-Nov-2005 ru

Catch up with loader_color -> loader_logo and document beastie_disable.


152309 11-Nov-2005 pjd

Rename GEOM class kernel module g_md.ko to geom_md.ko for consistency
with the rest.

mdconfig.c: Simplify mdmaybeload() function.
mdioctl.h: Removed (now unused) #define.
loader.conf: Sort GEOM classes properly.

OK'ed by: phk


152307 11-Nov-2005 pjd

Add more GEOM classes to defaults/loader.conf. Add references to manual
pages to those already present.

Reviewed by: brueffer


151873 30-Oct-2005 scottl

Replace loader_color with loader_logo


150469 22-Sep-2005 ru

Add loader(8) variables for RB_DFLTROOT, RB_MUTE, and RB_PAUSE:
"boot_dfltroot", "boot_mute", and "boot_pause" respectively.


149661 31-Aug-2005 glebius

net.graph.ngqfreemax has been deprecated.


149213 18-Aug-2005 iedowse

Add a "comconsole_speed" loader variable that can be used to change
the serial console speed (i386 and amd64 only). If the previous
stage boot loader requested a serial console (RB_SERIAL or RB_MULTIPLE)
then the default speed is determined from the current serial port
speed. Otherwise it is set to 9600 or the value of BOOT_COMCONSOLE_SPEED
at compile time.

This makes it possible to set the serial port speed once in
/boot.config and the setting will propagate to boot2, loader and
the kernel serial console.


148817 07-Aug-2005 krion

Add if_arl_load, if_axe_load, if_aue_load, if_cs_load, if_cue_load,
if_hme_load, if_nve_load, if_rue_load, if_udav_load to Networking
Drivers section.

Submitted by: matteo


148798 06-Aug-2005 krion

Add if_ath_load (default NO) in Networking Drivers section.

PR: conf/80870
Submitted by: Hasan Cana <vpb at albabsd dot org>


148515 29-Jul-2005 brian

Mention that console= can set multiple consoles.
Relate boot_ options to their kernel command line flags and make it clear
how kenv(1) is used.

Sponsored by: ActiveState/Sophos
MFC after: 1 week


146421 19-May-2005 sobomax

Extend `autoboot_delay' handling - is this variable is set to -1 don't allow
user to interrupt autoboot process at all. Currently, even when
`autoboot_delay' is set to 0, loader(8) still allows autoboot process to be
interrupted by pressing any key on the console when the loader reads kernel
and modules from the disk. In some cases (i.e. untrusted environment) such
behaviour is highly indesirable and user should not be allowed to interfere
with the autoboot process at all.

Sponsored by: PBXpress Inc.
MFC after: 3 days


142009 17-Feb-2005 des

Add /rescue/init to the default init_path, before /stand/sysinstall.

MFC after: 2 weeks


141846 13-Feb-2005 ru

Expand *n't contractions.


138427 06-Dec-2004 imp

The 'start' command processes loader.conf variables, not loader.rc.
Fix comment to match.


138258 01-Dec-2004 scottl

Fix a bunch of stack leaks. These were theoretically harmless, except that
they would leave enough elements on the stack that if you escaped to the
loader prompt and then typed 'setenv', it would pull in all of the leaked
junk and cause an exception in the environment. There still seems to be
3 leaked elements, but they don't appear to be coming from this file.


138249 01-Dec-2004 scottl

Remove the last vestiges of the userconfig option. None of this actually
did anything, so this commit should be considered a NO-OP.


137344 07-Nov-2004 krion

Document "loader_color" variable.

PR: conf/73396
Submitted by: Aleksander Fafula <alex at fafula dot com>
Approved by: scottl


137071 30-Oct-2004 brooks

Add a loader menu option to set hint.atkbd.0.flags=0x1 which allows USB
keyboards to work if no PS/2 keyboard is attached. The position in the
menu was chosen to avoid moving option 6 (loader prompt). This should
be a no-op on non-i386/amd64 machines.


136144 05-Oct-2004 pjd

Back out changes which were introduced to delay mounting root file system.
Those changes were made on gmirror needs, but now gmirror handles this
by itself.


135995 30-Sep-2004 ru

Setting "kernel" to an absolute path is a bad idea because
after loading such a kernel, "module_path" will be set to
an insane value. Fixed example by providing an equivalent
setting. For the record, when automatically loading a
kernel (commands "boot" and "boot-conf"), the following is
tried, in this order:

path=/boot/${kernel} file=${bootfile}
path=/boot/${kernel} file=${kernel}
path=${kernel} file=${bootfile}
path=${kernel} file=${kernel}
path=${module_path} file=${kernel}


135986 30-Sep-2004 ru

Bring this file more up to date.


135980 30-Sep-2004 ru

Retire now useless userconfig_script_*.


135973 30-Sep-2004 ru

Setting dump device from loader(8) has not been supported since 2002.


135967 30-Sep-2004 ru

Document boot_cdrom, boot_multicons, and boot_serial.
Reduce diffs between help.common and loader(8).
Mention that boot_userconfig is currently a no-op.


135729 24-Sep-2004 pjd

Document vfs.root.mountdelay value.

Reminded by: ru


133217 06-Aug-2004 jmg

remove /boot/kernel from the default path.. There is already code that
will prepend the current kernel booting... This prevents a problem of
loading /boot/kernel's modules when a different kernel has no modules,
but you left your module_load="YES" in loader.conf...

Reviewed by: dcs (minus the help part)


132853 29-Jul-2004 ceri

Correct typo in a comment.

Approved by: jhb


132248 16-Jul-2004 tanimura

Rename snd_pcm as sound.


131840 08-Jul-2004 brian

Change the following environment variables to kernel options:

bootp -> BOOTP
bootp.nfsroot -> BOOTP_NFSROOT
bootp.nfsv3 -> BOOTP_NFSV3
bootp.compat -> BOOTP_COMPAT
bootp.wired_to -> BOOTP_WIRED_TO

- i.e. back out the previous commit. It's already possible to
pxeboot(8) with a GENERIC kernel.

Pointed out by: dwmalone


131814 08-Jul-2004 brian

Change the following kernel options to environment variables:

BOOTP -> bootp
BOOTP_NFSROOT -> bootp.nfsroot
BOOTP_NFSV3 -> bootp.nfsv3
BOOTP_COMPAT -> bootp.compat
BOOTP_WIRED_TO -> bootp.wired_to

This lets you PXE boot with a GENERIC kernel by putting this sort of thing
in loader.conf:

bootp="YES"
bootp.nfsroot="YES"
bootp.nfsv3="YES"
bootp.wired_to="bge1"

or even setting the variables manually from the OK prompt.


131068 24-Jun-2004 josef

Remove the entry for configuring pcm0 mixer channels.
This is accomplished via device.hints now.


130945 22-Jun-2004 brueffer

Throw out pfsync and pflog, the modules were removed


130793 20-Jun-2004 josef

Document the possibility of setting default values for
mixer channels via boot loader.


129310 16-May-2004 ru

Markup fixes.


128280 15-Apr-2004 cperciva

s/atspeaker/speaker/
cf. revision 1.2 of src/sys/modules/speaker/Makefile

PR: conf/65195
Submitted by: daichi


126455 01-Mar-2004 des

While I'm here, add linprocfs (but not pseudofs, since it is no use on
its own)


126453 01-Mar-2004 des

Add acpi_video_load (default NO) in the ACPI section


126263 26-Feb-2004 mlaier

Tweak existing header and other build infrastructure to be able to build
pf/pflog/pfsync as modules. Do not list them in NOTES or modules/Makefile
(i.e. do not connect it to any (automatic) builds - yet).

Approved by: bms(mentor)


125837 15-Feb-2004 simon

mdoc(7) janitor:
- Fix hard sentence breaks.
- Quote argument to the Nd macro.
- Use Pa for filenames.


125795 14-Feb-2004 njl

Fix hw.acpi.os_name by renaming it to hw.acpi.osname. The "_name" suffix
is reserved by the loader, and thus any tunable name with that suffix will
be silently discarded.

Document this in the header and man page so that other developers do not
develop so many bumps on the head after banging it against the wall.

Detective work by: Mark Santcroos, grehan


125091 27-Jan-2004 des

Rename the kern.vm.kmem.size tunable to the more logical vm.kmem_size. To
assure backward compatibility (conditional on !BURN_BRIDGES), look it up
by its old name first, and log a warning (but accept the setting) if it
was found. If both the old and new name are defined, the new name takes
precedence.

Also export vm.kmem_size as a read-only sysctl variable; I find it hard to
tune a parameter when I don't know its default value, especially when that
default value is computed at boot time.


124648 18-Jan-2004 nyan

PC98 uses the different frame code.


124306 09-Jan-2004 scottl

Disable the APIC when selecting the 'Safe Mode' option of the loader. This
will disable both APIC interrupt routing and SMP.


121632 28-Oct-2003 scottl

Directly call the 'reboot' word instead of indirectly evaluating it.


121618 27-Oct-2003 scottl

Directly call the 'boot' word instead of indirectly evaluating it.

Submitted by: dcs


120031 13-Sep-2003 scottl

Apply Aleksander Fafula's crayons to the beastie. Add the this line to
/boot/loader.conf to see the pretty colors =-)

loader_color="YES"


117090 01-Jul-2003 brueffer

Add the beastie_disable variable which allows to turn the beastie
boot menu on and off.

Reviewed by: scottl


116175 10-Jun-2003 scottl

Don't start the beastie menu if the 'beastie_disable' variable is set to
'YES'.

If the user selects to escape to the loader prompt, set 'autoboot_delay'
to 'NO' so that the prompt timer doesn't run.


115451 31-May-2003 scottl

Man, I'm not on the ball. 4th does not need to escape '\' chars. This
should make our beloved friend look less like he has a massive head wound.


115434 31-May-2003 scottl

Flag when ACPI has been disabled by the user so that sysinstall can do
something with it.


115410 30-May-2003 scottl

Add a new bootloader menu. Pull in screen.4th and frames.4th from the
examples directory to support it. This is installed only on i386 for
now. It will be enabled in a later commit.

Approved by: re


115054 16-May-2003 murray

Add variables for missing network drivers.

PR: kern/51911
Submitted by: David Yeske <dyeske@yahoo.com>
Approved by: re


112091 11-Mar-2003 ru

FreeBSD 5.0 has stopped shipping /modules 2.5 years ago. Catch
up with this further by excluding /modules from the (default)
kern.module_path.


111749 02-Mar-2003 harti

Add two loader tuneables that allow one to change the maximum number of
queue items that can be allocated by netgraph and the number of free queue
items that are cached on a private list.

Netgraph places an upper limit on the number of queue items it may allocate.
When there is a large number of netgraph messages travelling through the
system (100k/sec and more) there is a high probability, that messages get
queued at the nodes and netgraph runs out of queue items. In this case the data
flow through netgraph gets blocked. The tuneable for the number of free
items lets one trade memory for performance.

The tunables are also available as read-only sysctls.

PR: kern/47393
Reviewed by: julian
Approved by: jake (mentor)


107266 26-Nov-2002 yar

Eliminate references to defunct kernel tunables.

Approved by: re
PR: bin/43343


107175 22-Nov-2002 dcs

The new "all sound drivers" driver name is snd_driver. Loader.conf didn't
knew about it, though. Now it does.

MFC after: 2 weeks


106335 02-Nov-2002 mini

Fix indentation of comments.


106330 02-Nov-2002 mini

Add loader variables to control the loading of various networking modules.

Submitted by: David Yeske <dyeske@yahoo.com>


102862 02-Sep-2002 brooks

Make SCSI_DELAY setable at boot time and runtime via the
kern.cam.scsi_delay tunable/sysctl.

Reviewed by: mdodd, njl


102466 27-Aug-2002 trhodes

Whitespace fix from last commit.


102465 27-Aug-2002 trhodes

Fix some grammar errors in loader.conf.5

PR: 40237
Submitted by: Chris Pepper <pepper@rockefeller.edu>


102011 17-Aug-2002 orion

Support for VIA VT8233 audio controller.


101824 13-Aug-2002 ru

mdoc(7) police: Get rid of hard sentence breaks.


101187 01-Aug-2002 rwatson

Sample loader.conf lines for various MAC modules.


100187 16-Jul-2002 mp

Don't imply that setting the boot_ variables to "NO" will disable them.

MFC after: 3 days


99975 14-Jul-2002 charnier

The .Nm set of commands


99332 03-Jul-2002 mini

Add missing kernal tunables to loader.conf.

PR: i386/39085
Submitted by: David Yeske <dyeske@yahoo.com>


97568 30-May-2002 schweikh

Fix a handful of typos and grammar bogons. No content changes.
Translators can ignore this commit.

MFC after: 2 weeks


97201 24-May-2002 gordon

Add support for reading an additional loader configuration file. By default,
this is called /boot/nextboot.conf. This file is required to have it's first
line be nextboot_enable="YES" for it to be read. Also, this file is
rewritten by the loader to nextboot_enable="NO"<space> after it is read.
This makes it so the file is read exactly once. Finally, the nextboot.conf
is removed shortly after the filesystems are mounted r/w.

Caution should be taken as you can shoot yourself in the foot. This is only
the loader piece. There will be a tool called nextboot(8) that will manage
the nextboot.conf file for you. It is coming shortly.

Reviewed by: dcs
Approved by: jake (mentor)


96247 09-May-2002 joe

Replace /kernel with /boot/kernel/kernel.

PR: docs/37757
Submitted by: Hiten Pandya <hiten@uk.FreeBSD.org>


95531 26-Apr-2002 wes

Rename the file used to specify the nextboot to make it clear that this
is a loader configuration file and can be used for more than just a
kernel name.

Submitted by: Gordon Tetlow <gordont@gnf.org>


95524 26-Apr-2002 dcs

A long, long time ago, msmith introduced vfs.root.mountfrom
loader variable, which let users specify the root mount point
the exact way one does after booting the kernel.

Let's take this opportunity to document it...


95485 26-Apr-2002 wes

Add a -k option to reboot to specify the kernel to boot next time
around. If the kernel boots successfully, the record of this kernel
is erased, it is intended to be a one-shot option for testing
kernels.

This could be improved by having the loader remove the record of
the next kernel to boot, it is currently removed in /etc/rc immediately
after disks are mounted r/w.

I'd like to MFC this before the 4.6 freeze unless there is violent
objection.

Reviewed by: Several on IRC
MFC after: 4 days


92224 13-Mar-2002 ru

Further document "console" (nullconsole).


91609 04-Mar-2002 alfred

Support for USB fm radio.

Submitted by: David Yeske <dyeske@yahoo.com>


91008 21-Feb-2002 davidc

Document the hw.physmem kernel environment variable.

Reviewed by: alfred


89601 21-Jan-2002 sobomax

Allow dump device be configured as early as possible using loader(8) tunable.
This allows obtaining crash dumps from the panics occured during late stages
of kernel initialisation before system enters into single-user mode.

MFC after: 2 weeks


88253 20-Dec-2001 jim

Add missing snd_ich_load entry.

Noticed by: will
MFC after: 2 days


87636 11-Dec-2001 jhb

- Add 'fwrite' and 'fseek' words for writing to and seeking on files.
- Change the 'fopen' keyword to accept a mode parameter. Note that this
will break existing 4th scripts that use fopen. Thus, the loader
version has been bumped and loader.4th has been changed to check for a
sufficient version on i386 and alpha. Be sure that you either do a full
world build or install or full build and install of sys/boot after this
since loader.old won't work with the new 4th files and vice versa.

PR: kern/32389
Submitted by: Jonathan Mini <mini@haikugeek.com>
Sponsored by: ClickArray, Inc.


87004 27-Nov-2001 rwatson

Document the "console" setting in loader.conf, suggesting vidconsole
or comconsole.


86902 26-Nov-2001 rwatson

o Add 'kern.maxusers' to the list of commented out sample tunable
variables, since that can now be tuned at boot-time without a
recompile.


86133 06-Nov-2001 iwasaki

Add S4BIOS sleep (BIOS hibernation) and DSDT overriding support.
- Add S4BIOS sleep implementation. This will works well if MIB
hw.acpi.s4bios is set (and of course BIOS supports it and hibernation
is enabled correctly).
- Add DSDT overriding support which is submitted by takawata originally.
If loader tunable acpi_dsdt_load="YES" and DSDT file is set to
acpi_dsdt_name (default DSDT file name is /boot/acpi_dsdt.aml),
ACPI CA core loads DSDT from given file rather than BIOS memory block.
DSDT file can be generated by iasl in ports/devel/acpicatools/.
- Add new files so that we can add our proposed additional code to Intel
ACPI CA into these files temporary. They will be removed when
similar code is added into ACPI CA officially.


81588 13-Aug-2001 ru

Spell "FreeBSD" with "F" and "BSD" in uppercase.


79454 09-Jul-2001 dd

mdoc(7) police: remove extraneous .Pp before and/or after .Sh.


77575 01-Jun-2001 ru

Remove vestiges of MFS.


77444 29-May-2001 dcs

Go back to 1.20 again.


77376 29-May-2001 dcs

Revert 1.20, as it causes mysterious problems to the Alpha people.


77162 25-May-2001 ru

- sys/msdosfs moved to sys/fs/msdosfs
- msdos.ko renamed to msdosfs.ko
- /usr/include/msdosfs moved to /usr/include/fs/msdosfs


77034 23-May-2001 ru

The following modules were renamed:

fdesc -> fdescfs
portal -> portalfs
umap -> umapfs
union -> unionfs


76948 22-May-2001 dd

Fix a grammar nit.

PR: 27520
Submitted by: Michael Lucas <mwlucas@blackhelicopters.org>


76714 17-May-2001 dcs

Allocate more memory if necessary.


75659 18-Apr-2001 ru

mdoc(7) police: fixed whatis(1) entry.


74263 14-Mar-2001 jhb

Use better descriptions (ones invovling words from the English language
anyways) for the accept filter modules.


74255 14-Mar-2001 dcs

Improve comments about the sound drivers.
Correct accf lines.


74212 13-Mar-2001 jhb

- Sync up with stable by adding in the Netgraph and Sound module sections,
the agp module, and the accept filter modules.
- Remove an extraneous blank line.


73953 07-Mar-2001 dcs

Goodbye vn, welcome md.


71897 01-Feb-2001 des

Add atspeaker_load.


71102 16-Jan-2001 ru

Prepare for mdoc(7)NG.


70706 06-Jan-2001 jhb

Add commented out examples for the new KTR loader tunables.


70426 28-Dec-2000 des

Retire kernfs (kernel part).


70405 27-Dec-2000 ru

Prepare for mdoc(7)NG.


68961 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


68755 15-Nov-2000 ben

remove period from SEE ALSO.


67955 30-Oct-2000 n_hibma

Add entry for umodem


67562 25-Oct-2000 n_hibma

The USB scanner driver. To be used together with SANE.


66871 09-Oct-2000 dcs

Now I see the error of my ways.

Previous revision of this file changed the "boot" commands to take
no arguments from the stack. This is only valid in the case where
a kernel has not been loaded. In that case, load_kernel_and_modules
will be called, which takes a list of arguments from the stack.

When a kernel is presently loaded, though, the list of arguments must
be passed to the boot command, which was the behaviour before the last
revision.

Fix things for both cases.

Noticed by: S-Max and others on that chat room


66349 25-Sep-2000 dcs

Get rid of garbage left on the stack.


66346 25-Sep-2000 dcs

What could possibly have possessed me to forget the "0 (arguments)"
in two of the three boot words in the "boot" redefinition, I have no
clue. Fix it.

Noticed by: bp
Noticed by: adrian


66046 18-Sep-2000 dcs

Check for the correct minimum version required by the current code.

I hope I got this right... :-)


65949 16-Sep-2000 dcs

Use _ instead or - where proper, according to the style I have been
using.

Overload "?" so it will also show loader.4th commands.


65945 16-Sep-2000 dcs

Solve a name clash.
Add something to help debugging.


65939 16-Sep-2000 dcs

The module_path set by default was bogus. It had /boot/kernel last,
which makes little sense.


65938 16-Sep-2000 dcs

Both boot and boot-conf were using a different algorithm from the one
used by start to find the kernel. Fix this.

Also, boot would proceed immediately in the absence of a path as
argument. Check first if a kernel has already been loaded, and, if
not, fall back to load kernel&modules behavior.

Some further factorizing. I deem this code to be mostly readable by
now! :-)

Many thanks to: Makoto MATSUSHITA <matusita@jp.FreeBSD.org>


65883 15-Sep-2000 dcs

Factorize, reorganize, and move code around.

The boot-conf and boot code had various bugs, and some of it was big,
ugly, unwieldy, and, sometimes, plain incorrect. I'm just about
completely replaced these ugly parts with something much more manageable.

Minor changes were made to the well-factorized parts of it, to accomodate
the new code.

Of note:

* make sure boot-conf has the exact same behavior wrt boot order
as start.

* Correct both boot and boot-conf so they'll work correctly when
compiled in, as they both had some bugs, minor and major.

* Remove all the crud from loader.4th back into support.4th, for
the first time since boot-conf was first improved. Hurray!

I'm fairly satisfied with the code at this time. Time to see about those
man pages...


65785 12-Sep-2000 dcs

New world order wrt to kernel location and name. This doesn't actually
changes anything (in theory), just better document it. I'm waiting for
the final word before I tackle the man pages.


65769 12-Sep-2000 roger

Back out bktr_mem_load. It is not needed because I'm use MODULE_DEPEND
elsewhere.
Reminded by: Mike Smith


65738 11-Sep-2000 roger

Add bktr_mem_loader, default to NO.
In the near future the bktr module will need the bktr_mem module too.


65689 10-Sep-2000 markm

The entropy driver module has changed name.


65641 09-Sep-2000 dcs

Upon reflection, I decided that bootfile must have priority over kernel
as the kernel name. The one very unfortunate consequence is that kernel
as an absolute path loses the priority. It will only be tried after
/boot/${kernel}/${bootfile}. I'll see what can be done about it later.


65630 09-Sep-2000 dcs

First tackle at trying to handle the New Deal on kernels.

Load the first of the following kernels to be found:

${kernel} if ${kernel} is an absolute path
/boot/${kernel}/${kernel}
/boot/${kernel}/${bootfile}
${kernel}/${kernel}
${kernel}/${bootfile}
${kernel}
${bootfile}

The last instance of ${kernel} and ${bootfile} will be treated as a
list of semicolon separated file names, and each will be tried in turn,
from left to right.

Also, for each filename loader(8) will try filename, filename.ko,
filename.gz, filename.ko.gz, in that order, but that's not related
to this code.

This resulted in a major reorganization of the code, and much of what
was accumulating on loader.4th was rightly transfered to support.4th.

The semantics of boot-conf and boot also changed. Both will try to load
a kernel the same as above.

After a kernel was loaded, the variable module_path may get changed. Such
change will happen if the kernel was found with a directory prefix. In
that case, the module path will be set to ${directory};${module_path}.

Next, the modules are loaded as usual.

This is intended so kernel="xyzzy" in /boot/loader.conf will load
/boot/xyzzy/kernel.ko, load system modules from /boot/xyzzy/, and
load third party modules from /boot/modules or /modules. If that doesn't
work, it's a bug.

Also, fix a breakage of "boot" which was recently introduced. Boot without
any arguments would fail. No longer. Also, boot will only unload/reload
if the first argument is a path. If no argument exists or the first
argument is a flag, boot will use whatever is already loaded. I hope this
is POLA. That behavior is markedly different from that of boot-conf, which
will always unload/reload.

The semantics introduced here are experimental. Even if the code works,
we might decide this is not the prefered behavior. If you feel so, send
your feedback. (Yeah, this belongs in a HEADS UP or something, but I've
been working for the past 16 hours on this stuff, so gimme a break.)


65622 08-Sep-2000 dcs

Update boot and boot-conf descriptions to reflect new and old changes.
Add a warning in loader(8) that boot might be changed by loader.4th.


65621 08-Sep-2000 dcs

Enhance boot-conf.

Now boot-conf can also receive parameters to be passed to the kernel
being booted. The syntax is the same as in the boot command, so one
boots /kernel.OLD in single-user mode by typing:

boot-conf /kernel.OLD -s instead of
boot-conf -s /kernel.OLD

The syntax still supports use of directory instead of file name, so

boot-conf kernel.OLD -s

may be used to boot /boot/kernel.OLD/kernel.ko in single-user mode.

Notice that if one passes a flag to boot-conf, it will override the
flags set in .conf files, but only for that invocation. If the user
aborts the countdown and tries again without passing any flags, the
flags set in .conf files will be used.

Some factorization was done in the process of enhancing boot-conf,
as it has been growing steadly as features are getting added, becoming
too big for a Forth word. It still could do with more factorization,
as a matter of fact.

Override the builtin "boot" with something based on boot-conf. It will
behave exactly like boot-conf, but booting directly instead of going
through autoboot.

Since we are now pairing kernel and module set in the same directory,
this change to boot makes sense.


65618 08-Sep-2000 dcs

Strictly speaking, this works. It enumarates the PnP devices, and
load the modules needed according to a file relating module names
(actually, _file_ names, not really modules -- the dependency
stuff is not exported to loader's UI) to PnP IDs.

But it still lacks a number of desired features, and it's too crude
for my tastes. But since I don't have time to work on it, it might
be preferable to make it available to those who might. It's not
installed by default, much less loaded. In fact, it wouldn't even
had a copyright message (who? me? assume responsibility for _this_?),
if the cvs commit hadn't aborted for lack of $FreeBSD$, and I decided
to just cut&paste the stuff from elsewhere.


65616 08-Sep-2000 dcs

Fix an error message which was using the wrong variable to get the
kernel name from.


65615 08-Sep-2000 dcs

Add constructors to crude structure support. Rework some of the
code into a more modular interface, with hidden vocabularies and
such. Remove the need to a lot of ugly initialization.

Also, add a few structure definitions, from stuff used on the C
part of loader. Some of this will disappear, and the crude structure
support will most likely be replaced by full-blown OOP support
already present on FICL, but not installed by default. But it was
getting increasingly inconvenient to keep this separate on my tree,
and I already lost lots of work once because of the hurdles, so
commit this.

Anyway, it makes support.4th more structured, and I'm not proceeding
with the work on it any time soon, unfortunately.


65501 05-Sep-2000 obrien

The kernel is now known as `kernel.ko' and it and its matching modules
live in ``/boot/kernel/''.


63962 28-Jul-2000 sheldonh

Rename the loadable nullfs kernel module: null -> nullfs


62233 29-Jun-2000 ache

Add randomdev_load="NO"


61757 17-Jun-2000 mjacob

Add wx and ispfw loadable module defaults.


61694 14-Jun-2000 dcs

Revert to 1.8


61650 14-Jun-2000 peter

With apologies to dcs, temporarily comment out the version check code. It
is failing for everybody that I have spoken with that has tried it.

FreeBSD/i386 bootstrap loader, Revision 0.8
(root@outback.netplex.com.au, Tue Jun 13 23:26:49 PDT 2000)
Loader version 0.3+ required
Aborted!
start not found

Note that the 0.3+ message is from inside the arch-alpha block, not the
i386 block of code. And even then, 0.8 is higher than 0.3.

This prevents the rest of the loader.conf stuff working. :-/


61640 13-Jun-2000 peter

Borrow phk's axe and apply the next stage of config(8)'s evolution.

Use Warner Losh's "hint" driver to decode ascii strings to fill the
resource table at boot time.

config(8) no longer generates an ioconf.c table - ie: the configuration
no longer has to be compiled into the kernel. You can reconfigure your
isa devices with the likes of this at loader(8) time:
set hint.ed.0.port=0x320

userconfig will be rewritten to use this style interface one day and will
move to /boot/userconfig.4th or something like that.

It is still possible to statically compile in a set of hints into a kernel
if you do not wish to use loader(8). See the "hints" directive in GENERIC
as an example.

All device wiring has been moved out of config(8). There is a set of
helper scripts (see i386/conf/gethints.pl, and the same for alpha and pc98)
that extract the 'at isa? port foo irq bar' from the old files and produces
a hints file. If you install this file as /boot/device.hints (and update
/boot/defaults/loader.conf - You can do a build/install in sys/boot) then
loader will load it automatically for you. You can also compile in the
hints directly with: hints "device.hints" as well.

There are a few things that I'm not too happy with yet. Under this scheme,
things like LINT would no longer be useful as "documentation" of settings.
I have renamed this file to 'NOTES' and stored the example hints strings
in it. However... this is not something that config(8) understands, so
there is a script that extracts the build-specific data from the
documentation file (NOTES) to produce a LINT that can be config'ed and
built. A stack of man4 pages will need updating. :-/

Also, since there is no longer a difference between 'device' and
'pseudo-device' I collapsed the two together, and the resulting 'device'
takes a 'number of units' for devices that still have it statically
allocated. eg: 'device fe 4' will compile the fe driver with NFE set
to 4. You can then set hints for 4 units (0 - 3). Also note that
'device fe0' will be interpreted as "zero units of 'fe'" which would be
bad, so there is a config warning for this. This is only needed for
old drivers that still have static limits on numbers of units.
All the statically limited drivers that I could find were marked.

Please exercise EXTREME CAUTION when transitioning!

Moral support by: phk, msmith, dfr, asmodai, imp, and others


61585 12-Jun-2000 dcs

The word environment? returns a flag indicating whether the variable
was found or not. Fix it's usage. Alas, it caused no problem before,
besides leaving garbage in the stack, because refill, used by [if]
[else] [then], was broken.


61379 07-Jun-2000 dcs

Put some version checking.


61376 07-Jun-2000 dcs

Modify boot-conf so it can take a kernel or directory name as
a parameter and dtrt.

Also, make boot-conf always unload first. There wasn't really any
point in not doing this, as the kernel _has_ to be loaded before
any other modules.

Tested by: dwhite


61373 07-Jun-2000 dcs

Remove AGAIN definition, as FICL 2.04 provides it.

Add strlen, to help handling data generated by C code.

Add 2>r 2r>, because OO programming without them sucks.


59895 02-May-2000 n_hibma

Add the udbp module


55992 14-Jan-2000 wpaul

Add driver support for the Aironet 4500/4800 series wireless 802.11
NICs. (Finally!) The PCMCIA, ISA and PCI varieties are all supported,
though only the ISA and PCI ones will work on the alpha for now.
PCCARD, ISA and PCI attachments are all provided. Also provided an
ancontrol(8) utility for configuring the NIC, man pages, and updated
pccard.conf.sample. ISA cards are supported in both ISA PnP and hard-wired
mode, although you must configure the kernel explicitly to support the
hardwired mode since you have to know the I/O address and port ahead
of time.

Special thanks to Doug Ambrisko for doing the initial newbus hackery
and getting it to work in infrastructure mode.


55944 14-Jan-2000 wpaul

Add device driver support for USB ethernet adapters based on the CATC
USB-EL1202A chipset. Between this and the other two drivers, we should
have support for pretty much every USB ethernet adapter on the market.
The only other USB chip that I know of is the SMC USB97C196, and right
now I don't know of any adapters that use it (including the ones made
by SMC :/ ).

Note that the CATC chip supports a nifty feature: read and write combining.
This allows multiple ethernet packets to be transfered in a single USB
bulk in/out transaction. However I'm again having trouble with large
bulk in transfers like I did with the ADMtek chip, which leads me to
believe that our USB stack needs some work before we can really make
use of this feature. When/if things improve, I intend to revisit the
aue and cue drivers. For now, I've lost enough sanity points.


55429 05-Jan-2000 wpaul

Add device driver support for USB ethernet adapters based on the
Kawasaki LSI KL5KUSB101B chip, including the LinkSys USB10T, the
Entrega NET-USB-E45, the Peracom USB Ethernet Adapter, the 3Com
3c19250 and the ADS Technologies USB-10BT. This device is 10mbs
half-duplex only, so there's miibus or ifmedia support. This device
also requires firmware to be loaded into it, however KLSI allows
redistribution of the firmware images (I specifically asked about
this; they said it was ok).

Special thanks to Annelise Anderson for getting me in touch with
KLSI (eventually) and thanks to KLSI for providing the necessary
programming info.

Highlights:
- Add driver files to /sys/dev/usb
- update usbdevs and regenerate attendate files
- update usb_quirks.c
- Update HARDWARE.TXT and RELNOTES.TXT for i386 and alpha
- Update LINT, GENERIC and others for i386, alpha and pc98
- Add man page
- Add module
- Update sysinstall and userconfig.c


55162 28-Dec-1999 wpaul

This commit adds device driver support for the ADMtek AN986 Pegasus
USB ethernet chip. Adapters that use this chip include the LinkSys
USB100TX. There are a few others, but I'm not certain of their
availability in the U.S. I used an ADMtek eval board for development.
Note that while the ADMtek chip is a 100Mbps device, you can't really
get 100Mbps speeds over USB. Regardless, this driver uses miibus to
allow speed and duplex mode selection as well as autonegotiation.
Building and kldloading the driver as a module is also supported.

Note that in order to make this driver work, I had to make what some
may consider an ugly hack to sys/dev/usb/usbdi.c. The usbd_transfer()
function will use tsleep() for synchronous transfers that don't complete
right away. This is a problem since there are times when we need to
do sync transfers from an interrupt context (i.e. when reading registers
from the MAC via the control endpoint), where tsleep() us a no-no.
My hack allows the driver to have the code poll for transfer completion
subject to the xfer->timeout timeout rather that calling tsleep().
This hack is controlled by a quirk entry and is only enabled for the
ADMtek device.

Now, I'm sure there are a few of you out there ready to jump on me
and suggest some other approach that doesn't involve a busy wait. The
only solution that might work is to handle the interrupts in a kernel
thread, where you may have something resembling a process context that
makes it okay to tsleep(). This is lovely, except we don't have any
mechanism like that now, and I'm not about to implement such a thing
myself since it's beyond the scope of driver development. (Translation:
I'll be damned if I know how to do it.) If FreeBSD ever aquires such
a mechanism, I'll be glad to revisit the driver to take advantage of
it. In the meantime, I settled for what I perceived to be the solution
that involved the least amount of code changes. In general, the hit
is pretty light.

Also note that my only USB test box has a UHCI controller: I haven't
I don't have a machine with an OHCI controller available.

Highlights:

- Updated usb_quirks.* to add UQ_NO_TSLEEP quirk for ADMtek part.
- Updated usbdevs and regenerated generated files
- Updated HARDWARE.TXT and RELNOTES.TXT files
- Updated sysinstall/device.c and userconfig.c
- Updated kernel configs -- device aue0 is commented out by default
- Updated /sys/conf/files
- Added new kld module directory


55017 23-Dec-1999 wpaul

Close PR #15422; fix loader.conf to reflect new driver support (old
tulip clone NICs merged into if_dc driver).

PR: conf/15422


54265 07-Dec-1999 msmith

Update the sample for $init_path to reflect the kernel default.


54247 07-Dec-1999 dcs

Make some examples reflect defaults.


54020 02-Dec-1999 dcs

Add bus suffix to mii.


54019 02-Dec-1999 dcs

Add if_ prefix to network drivers.


53708 26-Nov-1999 dcs

Belatedly add splash_pcx_load to the documented variables. Reword
splash_bmp_load.


53673 24-Nov-1999 dcs

Activates password protection (if a password is defined).

Adds $FreeBSD$.


53672 24-Nov-1999 dcs

Add silly password feature. If people want to depend on a flawed
security measures, so be it. It costs us almost nothing.

Document some code in support.4th that I was unable to understand
just by reading.


53548 22-Nov-1999 n_hibma

Add comments on what it the USB modules are. Add the usb module.

The USB module contains the OHCI and UHCI controllers as well.
Sticking them into separate modules might be possible after I have
untangled the mess.


53315 17-Nov-1999 n_hibma

Change the name of the modules from <name>_mod to <name>

Suggested by: David O'Brien <obrien@FreeBSD.ORG>


53243 16-Nov-1999 n_hibma

Add the USB modules.


52749 01-Nov-1999 dcs

Changes prompt to "ok". This line is actually commented out, and serves only
as an example and to reflect the builtin default.


52674 30-Oct-1999 phantom

Remove comments left since mdoc.template time or just useless comments


51045 07-Sep-1999 wpaul

Add mii_load entry to the network drivers section. Also add entries for
a few additional drivers that have recently been module-ized.


50477 28-Aug-1999 peter

$Id$ -> $FreeBSD$


50000 18-Aug-1999 chris

Fix a bunch of broken cross-references


49611 10-Aug-1999 wpaul

Convert the Winbond driver to newbus and have it compiled as a module.


49610 10-Aug-1999 wpaul

Convert the VIA Rhine driver to newbus and set it up to be compiled as
a module. Also modified the code to work on FreeBSD/alpha and added
device vr0 to the alpha GENERIC config.

While I was in the neighborhood, I noticed that I was still using
#define NFPX 1 in all of the Makefiles that I'd copied from the fxp
module. I don't really use #define Nfoo X so it didn't matter, but
I decided to customize this correctly anyway.


49412 04-Aug-1999 green

Add various network cards that have been new-busified and made into KLDs
(thanks Bill!)

Remove lkm.


47890 13-Jun-1999 roger

Add bktr_load for the loadable Bt848/Bt878 driver.


47198 14-May-1999 dcs

Add "initialize" to loader.4th, so running "start" is not actually needed.


47175 14-May-1999 dcs

Add fxp on a category of it's own.


47173 14-May-1999 dcs

Remove atapi and joy, add svr4 and streams. I wonder if removing vinum
is in order or not... (things are _not_ loaded by default, but it serves
as a reference to people tweaking their own loader.conf files)


47171 14-May-1999 dcs

Add ntfs and splash_pcx, remove pcic and wcd (yikes! what was THAT
doing here?).

Candidate for 3.2.


47113 13-May-1999 brian

Better English.


46352 03-May-1999 jkoshy

Correct misuse of .Nm.

PR: docs/11449
Submitted by: Kazuo Horikawa <horikawa@jp.freebsd.org>


46009 24-Apr-1999 dcs

Move loader.conf.5, while it is still in it's first revision.


46005 24-Apr-1999 dcs

Add loader.4th man page (worst man page I ever wrote -- reviews
are welcomed). Correct a nasty bug in loader.4th before anyone
notices, add a couple of features.


45881 20-Apr-1999 des

Make the location of init(8) tunable at boot time.


45758 18-Apr-1999 dcs

A default loader.rc to be installed.


44758 14-Mar-1999 dcs

Replace /kernel.config with /boot/kernel.conf.


44603 09-Mar-1999 dcs

New loader.rc stuff.

Reviewed by: jkh