History log of /freebsd-10-stable/sys/boot/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
339698 24-Oct-2018 dteske

MFC r339509: Fix loader.conf(5) "password" feature

Restore the ability to prevent the user from interrupting the boot process
without first entering the password stored in loader.conf(5).

PR: kern/207069
Reported by: david@dcrosstech.com
Sponsored by: Smule, Inc.

335744 27-Jun-2018 dteske

MFC r335607: check-password.4th(8): Fix manual [in]accuracy

SVN r280384 updated the maximum password length from 16 bytes to 255. The
manual was not updated to reflect this.

Sponsored by: Smule, Inc.

331928 03-Apr-2018 eugen

MFC r331630: Fix instructions in the zfsboot manual page.

zfsloader(8) fails to probe a slice containing ZFS pool if its second sector
contains traces of BSD label (DISKMAGIC == 0x82564557).
Fix manual page to show working example erasing such traces.

_M .
M sys/boot/i386/zfsboot/zfsboot.8

323052 31-Aug-2017 oleg

MFC r322628: Fix BSD label partition end sector calculation.

Approved by: re (marius)
Differential Revision: https://reviews.freebsd.org/D12066

321660 28-Jul-2017 dim

MFC r321305:

Fix printf format warning in zfs_module.c

Clang 5.0.0 got better warnings about print format strings using %zd,
and this leads to the following -Werror warning on e.g. arm:

sys/boot/efi/boot1/zfs_module.c:186:18: error: format specifies type 'ssize_t' (aka 'int') but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat]
"(%lu)\n", st.st_size, spa->spa_name, filepath, EFI_ERROR_CODE(status));
^~~~~~~~~~

Fix this by casting off_t arguments to intmax_t, and using %jd instead.

Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D11678

321265 20-Jul-2017 ngie

MFC r316102:

Wrap bootcamp DEBUG statement with curly braces

This fixes a -Wempty-body warning with gcc 6.3.0 when PART_DEBUG is undefined.

Tested with: amd64-gcc-6.3.0 (devel/amd64-xtoolchain-gcc)

319025 28-May-2017 ngie

MFC r309412,r316109,r316132:

r309412 (by imp):

dd is currently a bootstrap tool. It really doesn't have any business
being a bootstrap tool. However, for reproducible build output,
FreeBSD added dd status=none because it was otherwise difficult to
suppress the status information, but retain any errors that might
happen. There's no real reason that dd has to be a build tool, other
than we use status=none unconditional. Remove dd from a bootstrap tool
entirely by only using status=none when available. This may also help
efforts to build the system on non-FreeBSD hosts as well.

r316109:

Don't hardcode input files for stage 1/2 bootloaders; use .ALLSRC instead

This is a better pattern to follow when creating the bootloaders and doing
the relevant space checks to make sure that the sizes aren't exceeded (and
thus, copy-pasting is a bit less error prone).

r316132:

Parameterize out 7680 (15 * 512) as BOOT2SIZE, similar to sys/boot/i386/zfsboot/...

This is being done to make it easier to change in the future--this action might be
needed sooner rather than later because of gcc 6.3.0 bailing, stating that there
is negative free space left (deficit) in the boot2 bootloader.

318626 22-May-2017 ngie

MFC r316103:

Remove redundant declarations

They're already defined in libstand.h

316323 31-Mar-2017 ngie

MFC r316106:

Don't shadow read(2) definition with `read` argument in vdev_{create,probe}

This fixes several -Wshadow warnings introduced in r192194, but now errors
with gcc 6.3.0.

316321 31-Mar-2017 ngie

MFC r316107:

Remove redundant declaration for `zfs_crc64_table`

zfssubr.c already defines this statically. Besides, zfsimpl.c defined it, but
didn't use it.

This fixes a -Wredundant-decls warning.

316319 31-Mar-2017 ngie

MFC r316108:

Remove -Wunused-but-set variable, `tail` in `ls_getdir(..)`

This variable has been unused since its inception in r40106.

316273 30-Mar-2017 dexuan

MFC: 314547, 314770, 314828, 314891, 314956, 314962, 315235

r314547
loader.efi: reduce the size of the staging area if necessary

The loader assumes physical memory in [2MB, 2MB + EFI_STAGING_SIZE)
is Conventional Memory, but actually it may not, e.g. in the case
of Hyper-V Generation-2 VM (i.e. UEFI VM) running on Windows
Server 2012 R2 host, there is a BootServiceData memory block at
the address 47.449MB and the memory is not writable.

Without the patch, the loader will crash in efi_copy_finish():
see PR 211746.

The patch verifies the end of the staging area, and reduces its
size if necessary. This way, the loader will not try to write into
the BootServiceData memory any longer.

Thank Marcel Moolenaar for helping me on this issue!

The patch also allocates the staging area in the first 1GB memory.
See the comment in the patch for this.

Reviewed by: marcel, kib, sephe
Approved by: sephe (mentor)
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D9686

r314770
loader.efi: fix recent UEFI-boot regression on physical machines

This patch fixes my recent patch
"loader.efi: reduce the size of the staging area if necessary", which
causes EFI-boot failure on physical machines since Mar 2:
on the host there is a 1MB LoaderData memory range, which splits
the big Conventional Memory range into a small one (15MB) and a
big one: the small one is too small to hold the staging area.

We can actually use the LoaderData range safely, because when
amd64_tramp -> efi_copy_finish() starts to run, we're almost at
the very end of the efi loader code and we're going to "return"
to the kernel entry, so we're pretty sure we won't access any loader
data any more.

For people who are interested in the details: please see
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211746#c22

PS, some people also reported the regression happened to FreeBSD VM
running on Bhyve in EFI mode. This patch should resolve it too,
though I don't have such a setup to test.

Reviewed by: sephe
Approved by: sephe (mentor)
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D9904

r314828
loader.efi: fix an off-by-one bug in efi_verify_staging_size()

Also remove the warning message: it may not be unusual to see
the memory range containing 2MB is not of EfiConventionalMemory.

Sponsored by: Microsoft

r314891
loader.efi: finally fix the off-by-one bug in efi_verify_staging_size()

r314828(loader.efi: fix an off-by-one bug in efi_verify_staging_size())
doesn't really fix the bug and this patch adds the missing part.

It's a shame that I didn't make everything correct at the very beginning...

Sponsored by: Microsoft

r314956
loader.efi: only reduce the size of the staging area on Hyper-V

Doing this on physical hosts turns out to be problematic, e.g. see comment
24 and 28 in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211746.

To fix the real underlying issue correctly & thoroughly, IMO we need
a relocatable kernel, but that would require a lot of complicated long
term work: https://reviews.freebsd.org/D9686?id=25414#inline-56969

For now, let's only apply efi_verify_staging_size() to VMs running on
Hyper-V, and restore the old behavior on physical machines since that
has been working for people for a long period of time, though that's
potentially unsafe...

Sponsored by: Microsoft

r314962
loader.efi: only include the machine/ header files on x86

The 2 files may not exist on other archs like aarch64 and hence we
can have a build failure there.

Reported by: lwhsu
Sponsored by: Microsoft

r315235
loader.efi: use stricter check for Hyper-V

Some other hypervisors like Xen can pretend to be Hyper-V but obviously
they can't implement all Hyper-V features. Let's make sure we're genuine
Hyper-V here.

Also fix some minor coding style issues.

Sponsored by: Microsoft

PR: 211746

316130 29-Mar-2017 ngie

MFC r315738:

Document some more 10GbE+ network drivers in loader.conf

- if_cxgbe
- if_ixl
- if_ixlv
- sfxge

314922 08-Mar-2017 pfg

MFC r314505:
Split the ficl CFLAGS when they refer to an arch-specific include path.

This is a minimal attempt to keep consistency in the Makefiles so that
moving ficl to somwehere like contrib will be less error prone.

312773 25-Jan-2017 dim

MFC r311933:

Use proper prototypes in struct boot_module_t

With clang 4.0.0, we are getting the following warnings about struct
boot_module_t in efi's boot_module.h:

In file included from sys/boot/efi/boot1/ufs_module.c:41:
sys/boot/efi/boot1/boot_module.h:67:14: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
void (*init)();
^
void
sys/boot/efi/boot1/boot_module.h:92:16: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
void (*status)();
^
void
sys/boot/efi/boot1/boot_module.h:95:24: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
dev_info_t *(*devices)();
^
void
3 errors generated.

Fix this by adding 'void' to the parameter lists. No functional change.

Reviewed by: emaste, imp, smh
Differential Revision: https://reviews.freebsd.org/D9144

312772 25-Jan-2017 dim

MFC r311932:

Make EFI_RESERVED_SERVICE a proper prototype

With clang 4.0.0, the EFI API header causes the following warning:

In file included from sys/boot/efi/loader/bootinfo.c:43:
In file included from sys/boot/efi/loader/../include/efi.h:52:
sys/boot/efi/include/efiapi.h:534:32: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
(EFIAPI *EFI_RESERVED_SERVICE) (
^

Add VOID to make it into a real prototype.

Reviewed by: imp, emaste, tsoome
Differential Revision: https://reviews.freebsd.org/D9132

312771 25-Jan-2017 dim

MFC r311929:

Don't include <errno.h> in reloc_elf.c, as it includes <stand.h> just
after it, which has a conflicting definition of errno. This leads to
the following warning with clang 4.0.0:

In file included from sys/boot/common/reloc_elf32.c:6:
In file included from sys/boot/common/reloc_elf.c:37:
/usr/obj/usr/src/tmp/usr/include/stand.h:155:12: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
extern int errno;
^
sys/sys/errno.h:46:26: note: expanded from macro 'errno'
#define errno (* __error())
^

312540 20-Jan-2017 asomers

MFC r310417

Add a dumpdev example to /boot/defaults/loader.conf

312403 19-Jan-2017 delphij

MFC r293040,293341,293435:

Reduce libstand Makefile duplication.

PR: 216251

308915 21-Nov-2016 avg

MFC r308089: zfsbootcfg: a simple tool to set next boot (one time)
options for zfsboot

There is a branch-specific change in sbin/zfsbootcfg/Makefile because of
LIBADD vs LDADD/DPADD.

307203 13-Oct-2016 sephe

MFC 305588

pxeboot: Add nfs.read_size tunable.

Increase this tunable improves kernel loading speed.

Submitted by: Jun Su <junsu microsoft com>
Reviewed by: rpokala, wblock (previous version)
Obtained from: DragonFlyBSD
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7756

306378 27-Sep-2016 pluknet

MFC r274925: misc mdoc fixes.

305615 08-Sep-2016 pfg

MFC r303891, r303892:
sys: replace comma with semicolon when pertinent.

Uses of commas instead of a semicolons can easily go undetected. The comma
can serve as a statement separator but this shouldn't be abused when
statements are meant to be standalone.

305458 06-Sep-2016 avg

MFC r303738: report sector size and number of sectors in lsdev output
for bios disks

304507 19-Aug-2016 jhb

MFC 304018: Add defines needed to export SMBIOS serial numbers

Some defines needed for exporting serial numbers from the SMBIOS were
missed during integration of SMBIOS support in the EFI boot loader (r281138).
This is needed for getting the hostid set from the system hardware UUID.

PR: 206031

303297 25-Jul-2016 emaste

MFC r297871: boot1.efifat: provide a fallback startup.nsh

In case the firmware falls through to executing startup.sh, populate it
with the name of our boot loader. In normal operation this should not be
necessary but may allow the system to boot if it would otherwise just
remain at a shell prompt.

Sponsored by: The FreeBSD Foundation

303294 25-Jul-2016 emaste

MFC r302335: boot1.efi: fix assignment / comparison expression

PR: 210706
Submitted by: David Binderman <dcb314@hotmail.com>

301056 31-May-2016 ian

MFC r297147, r297148, r297149, r297150, r297151:

Make both the loader and kernel use the interface-mtu option if the
dhcp server provides it. Made up of these (semi-)related changes...

[kernel...] If the dhcp server provides an interface-mtu option, parse
the value and set that mtu on the interface.

[libstand...]

Garbage collect the bswap routines from libstand, use sys/endian.h.

If the dhcp server delivers an interface-mtu option, parse it and store
the value in a new global intf_mtu for use by the application.

[loader...]

If the dhcp server provided an interface-mtu option, transcribe the value
to the boot.netif.mtu env var, which will be picked up by pre-existing code
in nfs_mountroot() and used to configure the interface accordingly.

PR: 187094

300464 23-May-2016 ngie

MFC r299659:

Remove unused const variable

300460 23-May-2016 ngie

MFC r299655:

Add missing prototype for getchar(..)

299706 14-May-2016 pfg

MFC r298831:
boot/forth: minor spelling fixes.

298493 22-Apr-2016 emaste

MFC r277205 (imp):

Reserve and ignore the a new module metadata type MDT_PNP_INFO for
associating an optional PNP hint table with this module. In the
future, when these are added, these changes will silently ignore the
new type they would otherwise warn about. It will always be safe to
ignore this data. Get this into the builds today for some future
proofing.

297821 11-Apr-2016 emaste

MFC r296769: boot/efi: Prefer nm to objdump

Both objdump and nm are equally capable of reporting undefined symbols.

This gets us a step closer to building without binutils as we have an nm
implementation from ELF Tool Chain.

Sponsored by: The FreeBSD Foundation

297555 04-Apr-2016 marius

MFC: r292563

loader.efi: strip trailing whitespace

MFC: r293244 (remainder missing in r294275)

Introduce and use new EFI_ERROR_CODE macro for EFI errors

296438 07-Mar-2016 dim

MFC r296419 (by kib):

In the link_elf_obj.c, handle sections of type SHT_AMD64_UNWIND same
as SHT_PROGBITS. This is needed after the clang 3.8 import, which
generates that type for .eh_frame section, which had SHT_PROGBITS type
before.

Reported by: Nikolai Lifanov <lifanov@mail.lifanov.com>
PR: 207729
Tested by: dim (previous version)
Sponsored by: The FreeBSD Foundation

MFC r296428:

Since kernel modules can now contain sections of type SHT_AMD64_UNWIND,
the boot loader should not skip over these anymore while loading images.
Otherwise the kernel can still panic when it doesn't find the .eh_frame
section belonging to the .rela.eh_frame section.

Unfortunately this will require installing boot loaders from sys/boot
before attempting to boot with a new kernel.

Reviewed by: kib

295872 22-Feb-2016 marius

MFC: r287299 [1]

Add a gop command to help diagnose VT efifb problems. The gop
command has the following sub-commands:
list - list all possible modes (paged)
get - return the current mode
set <mode> - set the current mode to <mode>

MFC: r287317, r287422, r287475, r287489, r287538 [2]

Add support for the UGA draw protocol. This includes adding a
command called 'uga' to show whether UGA is implemented by the
firmware and what the settings are. It also includes filling
the efi_fb structure from the UGA information when GOP isn't
implemented by the firmware.

PR: 207313 [1], 202730 [2]
Approved by: re (gjb)

295835 20-Feb-2016 smh

MFC r272785:

Null terminate boot config buffer

PR: 207070
Approved by: re (gjb)
Sponsored by: Multiplay

295551 11-Feb-2016 imp

Merge from current r294767,294769,295408

r294767: Parse command line arguments in loader.fi
r294769: Allow newlines to be treated as whitespace when parsing args
r295408: Implement -P command line option in for EFI booting.

Approved by: re@ (gjb@)

295550 11-Feb-2016 smh

MFC r295320, r295356 (Partial)

Fix EFI multi device boot support

Approved by: re (marius)
Sponsored by: Multiplay

295539 11-Feb-2016 smh

MFC r294768:

Process /boot/config and /boot.config during EFI boot

Approved by: re (marius)
Sponsored by: Multiplay

295538 11-Feb-2016 smh

Fix ia64 build failures in EFI platform

The MFC of the recent EFI work to stable/10 caused build breakage
under ia64.

It was not apparent that there was EFI code outside the EFI tree as
this is not the case in HEAD, however in stable/10 there is for ia64.

This change does the following:
* Re-enables libefi for ia64 under gcc.
* Adds the ignore for unsupported pragma's when building libefi for ia64.
* Adds the missing parameter to efi_handle_lookup in the ia64 loader.

This is a direct commit as ia64 is no longer supported after 10.x

Approved by: re (marius)
Sponsored by: Multiplay

295531 11-Feb-2016 smh

MFC r295356 (Partial)

Fix EFI platform build failures on arm.armeb

Approved by: re (marius)
Sponsored by: Multiplay

295475 10-Feb-2016 allanjude

Catch the EFI loader up to the latest ZFS Boot Environment Menu features

MFC: r294072
Move init_zfs_bootenv to sys/boot/zfs/zfs.c instead of having a copy in each loader

MFC: r294073
Connect the ZFS boot environment menu to the UEFI loader

MFC: r295357
Do not set vfs.root.mountfrom unnecessarily when initializing ZFS BE menu

Approved by: re (marius)
Relnotes: yes
Sponsored by: ScaleEngine Inc.

295453 09-Feb-2016 emaste

MFC boot loader path and RBX constant deduplication

r294765 (imp)

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

r294765 (imp)

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

r294847 (imp)

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

r294925 (imp)

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

Approved by: re (gjb)

295135 02-Feb-2016 allanjude

MFC: r294926
ficl on i386 should cast to unsigned char output to support efi i386

Submitted by: Toomas Soome <tsoome at me.com>
Approved by: re (gjb)

295057 30-Jan-2016 smh

Fix clean target for sys/boot/efi

Fix clean target breakage of sys/boot/efi introduced by r294981
specifically the MFC of r294029 without the related change introduced by
r281114.

This is direct commit to stable/10 as head uses src.opts.mk.

Approved by: re (glebius)
Sponsored by: Multiplay

294999 28-Jan-2016 smh

MFC r294068, r294265

MFC r294068:
Add EFI ZFS boot support

MFC r294265:
Fix broken DPRINTF and wire up EFI_DEBUG so -DEFI_DEBUG to make works.

Relnotes: Yes
Sponsored by: Multiplay

294997 28-Jan-2016 smh

MFC r281060, r294060, r294291, r294493, r294284:

MFC r281060:
Remove an unnecessary space in a printf call

MFC r294060:
Modularise EFI boot loader

MFC r294291 (by andrew):
Reset the filesystem cache

MFC r294493:
Fix EFI UFS caching

MFC r294284 (by emaste):
boot1: correct typo in error message

Sponsored by: Multiplay

294986 28-Jan-2016 smh

MFC r294506:

Prevent loader.conf load failure due to unknown console entries

Sponsored by: Multiplay

294985 28-Jan-2016 smh

MFC r293835:

Improve non-interactive forth cmd error reporting

Sponsored by: Multiplay

294984 28-Jan-2016 smh

MFC r286234 (by trasz):

Fix a problem which made loader(8) load non-kld files twice.

Sponsored by: Multiplay

294982 28-Jan-2016 smh

MFC r294059:

Ensure boot fsread correctly probes all partitions

Sponsored by: Multiplay

294981 28-Jan-2016 smh

MFC r281169, r293724, r293796, r294029, r294041, r294058

MFC r281169 (by andrew):
Make global variabled only used in this file static

MFC r294058:
Make common boot file_loadraw name parameter const

MFC r294041:
Remove unused reg param from fdt_fixup_memory

MFC r293724:
Enable warnings in EFI boot code

MFC r293796:
Fix typo in libefi.c

MFC r294029:
Only build EFI components on supported compilers

Sponsored by: Multiplay

294975 28-Jan-2016 smh

MFC r294040:

Prevent bogus compiler in ZFS boot code.

Sponsored by: Multiplay

294921 27-Jan-2016 dteske

MFC 283933: Add comments

r283933: Indicate where the flag for later abort" originates.

294852 26-Jan-2016 jkim

MFC: r256940

Allow users to set UUID in network byte order regardless of SMBIOS version.

294726 25-Jan-2016 smh

MFC r293460:

Switch EFT boot1 to use libstand

This includes a change to the Makefile comment to correct it due to the
lack of arm and i386 support in 10.x.

Sponsored by: Multiplay

294725 25-Jan-2016 smh

MFC r293422 (partial):

Update generated EFI boot image templates.

This is a partial MFC as stable/10 only has EFI boot support for amd64,
and there are no plans to change this, so the other platform images
aren't included.

Sponsored by: Multiplay

294721 25-Jan-2016 smh

MFC r293461:

Remove hidden "Not ufs" printfs from boot code

Sponsored by: Multiplay

294720 25-Jan-2016 smh

MFC r293274:

style(9) fixes for EFI boot

Sponsored by: Multiplay

294719 25-Jan-2016 smh

MFC r281059 (by rpaulo):

boot1 EFI: reset the screen and select the best mode.

Sponsored by: Multiplay

294716 25-Jan-2016 smh

MFC r293269:

Fix return from zfs_probe_dev

Sponsored by: Multiplay

294715 25-Jan-2016 smh

MFC r293268:

Fix _MSC_EXTENSIONS checks

Sponsored by: Multiplay

294685 24-Jan-2016 ian

MFC r293053, r293061, r293063, r293064, r293065, r293775, r293792:

Use 64-bit math when finding a block of ram to hold the kernel. This fixes
a problem on 32-bit systems which have ram occupying the end of the physical
address space -- for example, a block of ram at 0x80000000 with a size of
0x80000000 was overflowing 32 bit math and ending up with a calculated size
of zero.

Use 64-bit math when processing the lists of physical and excluded memory
to generate the phys_avail and dump_avail arrays.

Work around problems that happen when there is ram at the end of the
physical address space.

Cast pointer through uintptr_t on the way to uint64_t to squelch a warning.

Reword the comment to better describe what I found while researching the
problem that led to this temporary workaround (and also so I can properly
cite the PR in the commit this time).

Cast using uintfptr_t and eliminate the cast to uint64_t which is uneeded
because rounding down cannot increase the number of bits needed to express
the result.

Go back to using uintptr_t, because code that actually compiles is
infinitely less buggy than code that is theoretically correct in some
alternate universe.

PR: 201614

294672 24-Jan-2016 ian

MFC r289704:

Fix parsing of I2C addresses properties in fdt data. I2C address is
represented in 7-bits format in DT files, but system expect it in 8-bit
format. Also, fix two drivers that locally hack around this bug.

This includes a direct-commit change to the beaglebone dts data in the
10-stable branch to adjust the i2c slave addresses directly. In -current
the equivelent change happened with a switch from homegrown to standard
fdt data.

294480 21-Jan-2016 jhb

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

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

PR: 205424
Submitted by: Alexander Kuleshov <kuleshovmail@gmail.com>

294460 20-Jan-2016 emaste

Leave temporary ia64 loader.sym behind if the build fails

This facilitates investigation of the build failure, and is the same way
it's done for other architectures using EFI.

294449 20-Jan-2016 emaste

MFC r293245: loader.efi style(9) cleanup

Submitted by: smh

294446 20-Jan-2016 emaste

MFC r293234: Enable the beastie menu for the UEFI console

As of r294445 [in stable/10] the UEFI console includes basic terminal
emulator support.

Relnotes: Yes

294445 20-Jan-2016 emaste

MFC r293233: loader.efi: add terminal emulation support

This is based on the vidconsole implementation.

Submitted by: Toomas Soome <tsoome@me.com>
Relnotes: Yes

294417 20-Jan-2016 royger

MFC r277215, r277291, r277418, r280953 and r280954:

loader: implement multiboot support for Xen Dom0

Note that only the subset of the multiboot specification needed in order to
boot a Xen Dom0 is implemented.

Sponsored by: Citrix Systems R&D

294346 19-Jan-2016 ian

MFC r292888:

Fix the error checking for the ubenv command. This moves the check for an
empty ldvar (which amounts to the varname string starting with '=') into
the if block that manipulates ldvar, which avoids later referencing ldvar
when it was never initialized.

294345 19-Jan-2016 ian

MFC r292584:

Set env vars from values on the efi loader command line.

Examine each cmdline arg and if it contains an '=' convert it to ascii and
pass it to putenv(). This allows var=value settings to come in on the
command line.

This will allow overriding dhcp server-provided data in loader(8), as
discussed in PR 202098

PR: 202098
Relnotes: Yes (this goes together with r294343)

294342 19-Jan-2016 ian

MFC r292234, r292527:

Add strlcat() and strlcpy() to libstand and libstand32.

294341 19-Jan-2016 ian

MFC r291164, r291876, r292227:

Print more detailed info about the disk and partition chosen for booting.
No behavioral changes, just cosmetics.

Remove stray unescaped `%` in `Booting from ...` informational message.

Enhance the "ubenv import" command to allow importing a u-boot env var
directly into a loader (and thus kernel) env var.

294276 18-Jan-2016 emaste

MFC r281058: Remove whitespace.

294275 18-Jan-2016 emaste

MFC r293244: Introduce and use new EFI_ERROR_CODE macro for EFI errors

294270 18-Jan-2016 emaste

MFC r293165: loader.efi: support non-contiguous console modes

294269 18-Jan-2016 emaste

MFC r281117: Move boot1.efi to the global CLEANFILES list

It's not x86 specific.

294268 18-Jan-2016 emaste

MFC r287930: Various small cleanups to EFI loader Makefiles.

293802 13-Jan-2016 allanjude

MFC: r293001
Introduce the ZFS Boot Environments menu to the loader menu

MFC: r293414
Add ZFS Boot Environments menu to userboot

MFC: r293454
Only call init_zfs_bootenv when the system is booted with ZFS

MFC: r293612
Fix calling init_zfs_bootenv to early, resulting in empty ZFS BE menu

Relnotes: yes
Sponsored by: ScaleEngine Inc.

293660 11-Jan-2016 emaste

MFC r286967 by imp: use -mno-aes and -mno-avx flags only with Clang

The flags -mno-aes -mno-avx only exist for clang, not [base] gcc, so
add them only to the clang CFLAGS.

293654 11-Jan-2016 emaste

Move -msoft-float compiler flag into x86/i386 cases to fix ia64

Direct commit to stable/10 as ia64 support does not exist in HEAD.

293649 11-Jan-2016 emaste

MFC r281027: Clean up more x86 only options in the efi code.

293634 10-Jan-2016 ae

MFC r292057:
Make detection of GPT a bit more reliable.

When we are detecting a partition table and didn't find PMBR, try to
read backup GPT header from the last sector and if it is correct,
assume that we have GPT.

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

MFC r292058:
Remove a note about damaged PMBR. Now GPT will be detected automatically
with such corruption.

Relnotes: yes

293353 07-Jan-2016 emaste

MFC r280808 by andrew: Reorder sys/boot/Makefile for the efi loader move

As these will depend on ficl having been built, and are set via
bsd.arch.inc.mk we need to place this after ficl.

As Makefile.amd64 is now late enough we can add the i386 directory to
this.

293347 07-Jan-2016 emaste

MFC r281524 by andrew@: Use MACHINE in the efi loader when it is what we mean

It may not be the same as MACHINE_CPUARCH, it just happened to be the
case the architectures this code currently supports.

Fixes build failure reported by Oliver Pinter.

293304 07-Jan-2016 emaste

loader.efi: combine GetMemoryMap and ExitBootServices and retry on error

MFC r292338: UEFI: combine GetMemoryMap and ExitBootServices and retry on error

The EFI memory map may change before or during the first
ExitBootServices call. In that case ExitBootServices returns an error,
and GetMemoryMap and ExitBootServices must be retried.

Glue together calls to GetMemoryMap(), ExitBootServices() and storage of
(now up-to-date) MODINFOMD_EFI_MAP metadata within a single function.

That new function - bi_add_efi_data_and_exit() - uses space previously
allocated in bi_load_efi_data() to store the memory map (it will fail if
that space is too short). It handles re-calling GetMemoryMap() once to
update the map key if necessary. Finally, if ExitBootServices() is
successful, it stores the memory map and its header as MODINFOMD_EFI_MAP
metadata.

ExitBootServices() calls are now done earlier, from within arch-
independent bi_load() code.

MFC r292442: loader.efi: show EFI error number, not full status value

EFI return values set the high bit to indicate an error. The log
messages changed here are printed only in the case of an error,
so including the error bit is redundant. Also switch to decimal to
match the error definitions (in sys/boot/efi/include/efierr.h).

MFC r292515: loader.efi: refresh size in GetMemoryMap retry loop

If ExitBootServices fails due to a changed efi_mapkey then GetMemoryMap
must be called again. In this case it is also possible for the memory
map to grow, so repeat the initial GetMemoryMap call to fetch the new
size.

Also roll bi_add_efi_data_and_exit into bi_load_efi_data as there's no
need for it to be a separate function.

PR: 202455
Relnotes: Yes
Sponsored by: The FreeBSD Foundation

293303 07-Jan-2016 emaste

MFC r281138: SMBIOS support for EFI

Restore smbios support lost in r293297

293302 07-Jan-2016 emaste

Remove old amd64 EFI directory

293301 07-Jan-2016 emaste

MFC r288372: Use EFI page size constants instead of hardcoding 4096

293300 07-Jan-2016 emaste

MFC r287934: Increase EFI staging size from 32MB to 48MB

The EFI boot loader allocates a single chunk of contiguous memory to
hold the kernel, modules, and any other loaded data. This memory block
is relocated to the kernel's expected location during the transfer of
control from the loader to the kernel.

PR: 201679

293299 07-Jan-2016 emaste

MFC r292576: boot1.efi: show EFI error number, not full status value

EFI return values set the high bit to indicate an error. The log
messages changed here are printed only in the case of an error,
so including the error bit is redundant. Also switch to decimal to
match the error definitions (in sys/boot/efi/include/efierr.h).

293298 07-Jan-2016 emaste

MFC r281000: Move i386/efi files to new home in efi/loader/arch/i386

This was not (and still is not) connected to the build, but the EFI
loader is in the process of being built for other than amd64 so these
files ought to live in their eventual MD location.

293297 07-Jan-2016 emaste

MFC r280950: Move the efi loaders to be under sys/boot/efi

In HEAD this was done to support UEFI on arm64. Merging to stable/10 to
facilitate the merging of later UEFI changes.

293296 07-Jan-2016 dteske

MFC SVN revisions 292899,292996,292999-293000.

r292899: Fix stack leak introduced by SVN r97201
r292996: Remove debugging messages added by SVN r187143
r292999: Fix a memory leak
r293000: Remove supposition comment

293294 07-Jan-2016 dteske

MFC r286368: Remove guards around overwriting loader.rc and menu.rc

There have been .local version of each for user modifications for some time
This allows users to receive future updates to these files

PR: 183765
Differential Revision: https://reviews.freebsd.org/D3176
Submitted by: Bertram Scharpf, Nikolai Lifanov (patch)
Reviewed by: dteske, loos, eadler
Approved by: bapt (mentor)
Relnotes: yes
Sponsored by: ScaleEngine Inc.

293293 07-Jan-2016 dteske

MFC SVN revisions 280922,285875,285882.
r280922: Change contents of the exec variable in loader.conf (dteske/rpaulo)
r285875: Use double newlines consistently (trasz/foundation)
r285882: Use consistent spacing (trasz/foundation)

293162 04-Jan-2016 emaste

MFC r280351: Stop calling x86_efi_copyin and x86_efi_getdev directly

In HEAD this is to help port loader.efi to both 32 and 64-bit ARM where
we can use this file with minimal changes. Merged to stable/10 to
simplify MFCs of later EFI commits.

292562 21-Dec-2015 emaste

MFC r279738, r281307: boot1.efi: add error reporting

Sponsored by: The FreeBSD Foundation

292561 21-Dec-2015 emaste

MFC r276146: Use explicit --output-target to set EFI file format

According to objcopy(1) --target is for use where the input and output
formats are the same ("no translation"). In practice it does detect the
input format in any case, but be explicit that we're specifying the
output format as we are translating from ELF to EFI PE format.

Sponsored by: The FreeBSD Foundation

292560 21-Dec-2015 emaste

MFC r280047: build x86-specific files in amd64 loader.efi

This was originally done for the arm and arm64 loader.efi and is MFC'd
here to ease future UEFI loader MFCs.

Sponsored by: The FreeBSD Foundation

292343 16-Dec-2015 emaste

MFC r278234: EFI: print more information about EFI Tables.

This adds the GUIDs for DXE, HOB, Memory Type Information and Debug
Image Info.

292342 16-Dec-2015 emaste

MFC r274439: Add the FDT table GUID.

This is used to pass the device tree blob from UEFI to the loader
in a similar way to the ACPI tables.

This will be used on arm64 but is not specific to the architecture.

Sponsored by: The FreeBSD Foundation

291295 25-Nov-2015 smh

MFC r291012:

Document loader(8) dumpdev option

Sponsored by: Multiplay

290877 15-Nov-2015 ngie

MFC r289896:

Make vers.c creation atomic by using a temporary file, then moving
the temporary file to vers.c at the end of the script

The previous logic wrote out to vers.c multiple times, so the file
could be incorrectly interpreted as being completely written out
after one of the echo calls with recursive make, when in reality it
was only partially written.

Also, in the event the build was interrupted when creating vers.c
(small race window), it would have a leftover file that needed to
be cleaned up before resuming the build.

Sponsored by: EMC / Isilon Storage Division

290411 05-Nov-2015 jhb

MFC 288372:
Use EFI page size constants instead of hardcoding 4096.

290410 05-Nov-2015 jhb

MFC 287934:
The EFI boot loader allocates a single chunk of contiguous memory to
hold the kernel, modules, and any other loaded data. This memory block
is relocated to the kernel's expected location during the transfer of
control from the loader to the kernel.

The GENERIC kernel on amd64 has recently grown such that a kernel + zfs.ko
no longer fits in the default staging size. Bump the default size from
32MB to 48MB to provide more breathing room.

PR: 201679

290124 29-Oct-2015 jhb

MFC 278582:
MFi386:
When building some of the boot loaders with clang, and DEBUG_FLAGS or
CFLAGS having '-g' in it, clang outputs several assembly directives that
are too new for our version of binutils.

Therefore, assemble the resulting .s files with clang instead. A more
general solution can be implemented when a GNU as-compatible driver for
clang's integrated assembler appears.

289508 18-Oct-2015 trasz

MFC r285881:

Add md_root example to defaults/loader.conf.

Note that this doesn't quite work yet - the preloaded image
gets loaded twice for some reason.

Sponsored by: The FreeBSD Foundation

289507 18-Oct-2015 trasz

MFC r285870:

Document md_root in loader(8). The md(4) manual page mentions it,
but it's hard to find and easy to miss.

Sponsored by: The FreeBSD Foundation

289358 15-Oct-2015 cperciva

MFC 289031: Teach gptldr to handle >64k boot2.

287274 29-Aug-2015 hselasky

MFC r286773:
Improve the realtime properties of USB transfers for embedded systems
like RPI-B and RPI-2.

287016 22-Aug-2015 mav

MFC r280451:
Remove from legacy ata(4) driver support for hardware, supported by newer
and more functional drivers ahci(4), siis(4) and mvs(4).

This removes about 3400 lines of code, unused since FreeBSD 9.0 release.

285951 28-Jul-2015 emaste

MFC r285246: Avoid creating invalid UEFI device path

The UEFI loader on the 10.1 release install disk (disc1) modifies an
existing EFI_DEVICE_PATH_PROTOCOL instance in an apparent attempt to
truncate the device path. In doing so it creates an invalid device
path.

Perform the equivalent action without modification of structures
allocated by firmware.

PR: 197641
Submitted by: Chris Ruffin <chris.ruffin at intel.com>

285726 20-Jul-2015 allanjude

MFC: r277949:
New function smbios_match to detect BIOS versions during boot

MFC: r277957:
Fix order of functions in smbios.c (corrects r277949)

MFC: r281138:
SMBIOS support for EFI

r281138 makes changes to the new unified EFI loader (r280950), which has not been merged to stable/10 (and likely won't be).
These changes were manually applied to the amd64 EFI loader (sys/boot/amd64/efi).
The changes to sys/boot/amd64/efi are a direct commit.

Reviewed by: stas
Approved by: re (gjb), marcel
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D3129

285298 08-Jul-2015 loos

MFC r285138:

Install loader.rc with ARM u-boot loader (ubldr).

loader.rc is the responsible to read and process loader.conf variables.

This fix the issue of loader.conf being silently ignored.

Approved by: re (gjb)

284713 23-Jun-2015 dteske

MFC r284672 (antoine):
Install version.4th.8 again
It was disconnected from installation in r281081, but was never removed
from the tree or added to ObsoleteFiles.inc

284509 17-Jun-2015 avg

MFC r284025,284032: dnode_read: handle hole blocks in zfs boot code

PR: 199804

284311 12-Jun-2015 avg

MFC r283939: userboot: enable bzipfs support

283971 03-Jun-2015 dteske

MFC r268254 (jmg):
Add a hint that you can enable this by default if you want;
necessary if you want the keyboard break to work early in boot.

283927 02-Jun-2015 jhb

MFC 281887:
Reassign copyright statements on several files from Advanced
Computing Technologies LLC to Hudson River Trading LLC.


/freebsd-10-stable/lib/libc/gen/_once_stub.c
/freebsd-10-stable/lib/libc/include/compat.h
/freebsd-10-stable/lib/libc/stdio/open_memstream.3
/freebsd-10-stable/lib/libc/stdio/open_memstream.c
/freebsd-10-stable/lib/libc/stdio/open_wmemstream.c
/freebsd-10-stable/lib/libc/sys/closefrom.2
/freebsd-10-stable/lib/libc/sys/procctl.2
/freebsd-10-stable/share/man/man9/BUS_BIND_INTR.9
/freebsd-10-stable/share/man/man9/BUS_CHILD_DELETED.9
/freebsd-10-stable/share/man/man9/BUS_CHILD_DETACHED.9
/freebsd-10-stable/share/man/man9/BUS_DESCRIBE_INTR.9
/freebsd-10-stable/share/man/man9/BUS_NEW_PASS.9
/freebsd-10-stable/share/man/man9/VOP_ADVISE.9
/freebsd-10-stable/share/man/man9/VOP_ALLOCATE.9
/freebsd-10-stable/share/man/man9/bus_adjust_resource.9
/freebsd-10-stable/share/man/man9/bus_generic_new_pass.9
/freebsd-10-stable/share/man/man9/bus_set_pass.9
/freebsd-10-stable/share/man/man9/refcount.9
/freebsd-10-stable/share/man/man9/sglist.9
/freebsd-10-stable/share/man/man9/shm_map.9
/freebsd-10-stable/sys/amd64/include/vm.h
i386/common/edd.h
/freebsd-10-stable/sys/dev/pci/pci_subr.c
/freebsd-10-stable/sys/i386/include/vm.h
/freebsd-10-stable/sys/sys/procctl.h
/freebsd-10-stable/sys/vm/sg_pager.c
/freebsd-10-stable/sys/x86/acpica/srat.c
/freebsd-10-stable/sys/x86/include/mca.h
/freebsd-10-stable/sys/x86/pci/qpi.c
/freebsd-10-stable/sys/x86/x86/mca.c
/freebsd-10-stable/tools/regression/lib/libc/stdio/test-open_memstream.c
/freebsd-10-stable/tools/regression/lib/libc/stdio/test-open_wmemstream.c
/freebsd-10-stable/tools/regression/netinet/arphold/arphold.c
/freebsd-10-stable/usr.bin/perror/perror.1
/freebsd-10-stable/usr.bin/perror/perror.c
/freebsd-10-stable/usr.bin/procstat/procstat_rusage.c
/freebsd-10-stable/usr.bin/protect/protect.1
/freebsd-10-stable/usr.bin/protect/protect.c
/freebsd-10-stable/usr.sbin/bhyve/ioapic.c
/freebsd-10-stable/usr.sbin/bhyve/ioapic.h
/freebsd-10-stable/usr.sbin/bhyve/pci_irq.c
/freebsd-10-stable/usr.sbin/bhyve/pci_irq.h
/freebsd-10-stable/usr.sbin/bhyve/pm.c
/freebsd-10-stable/usr.sbin/etcupdate/etcupdate.8
/freebsd-10-stable/usr.sbin/etcupdate/etcupdate.sh
/freebsd-10-stable/usr.sbin/etcupdate/tests/always_test.sh
/freebsd-10-stable/usr.sbin/etcupdate/tests/conflicts_test.sh
/freebsd-10-stable/usr.sbin/etcupdate/tests/fbsdid_test.sh
/freebsd-10-stable/usr.sbin/etcupdate/tests/ignore_test.sh
/freebsd-10-stable/usr.sbin/etcupdate/tests/preworld_test.sh
/freebsd-10-stable/usr.sbin/etcupdate/tests/tests_test.sh
/freebsd-10-stable/usr.sbin/etcupdate/tests/tzsetup_test.sh
/freebsd-10-stable/usr.sbin/pciconf/err.c
283510 25-May-2015 ian

MFC r283033, r283062, r283066, r283069:

Do not set preload_addr_relocate for ARM.

Refactor net_getparams() to make it easier to get params from sources other
than bootp and rarp.

Add a routine to obtain netboot parameters from the U-Boot env vars

Enable the NETIF_OPEN_CLOSE_ONCE option for ubldr.

283505 25-May-2015 ian

MFC r277962, r277988, r282661, r282727, r282731, r283013, r283035:

Add support for booting relocatable kernels on PowerPC.

Add code to support loading relocatable kernels at offsets that are
not zero.

Move ubldr text section to the start of the output file, so that when you
create a stripped .bin file from it the entry point is the first byte of
the file. (Will allow "load $addr $file ; go $addr" in u-boot.)

Create a relocatable instance of ubldr for ARM (ubldr.bin).

Re-link ubldr when any of its libraries change.

An ARM kernel can be loaded at any 2MB boundary, make ubldr aware of that.

283500 24-May-2015 ian

MFC r268838, r277644:

Add support for Toradex Apalis i.MX6 development board.

Add support for imx6 audio transmitting, include drivers for:
o Digital Audio Multiplexer (AUDMUX)
o Smart Direct Memory Access Controller (SDMA)
o Synchronous Serial Interface (SSI)

283409 24-May-2015 ian

MFC r280194:

Fix fdt_platform_fixups() mem region handling.

283289 22-May-2015 gjb

MFC r281011 (jkim):
Fix powerpc, powerpc64 build.

Sponsored by: The FreeBSD Foundation

281843 22-Apr-2015 dteske

MFC revisions 277693,278335,280382-280385,280923-280926,280931,
280933-280939,280974-280976,281002,281009,281081,281176-281180,
281271,281275,281616 (described in-breif below):
r277693: Font fix (des)
r278335: Revert that
r280382: Whitespace, comments, and copyright update
r280383: Prevent inadvertent bootlock condition
r280384: Increase max passowrd length from 16 to 255 chars
r280385: Add missing variable hints to loader.conf(5) defaults
r280923: Whitespace
r280924: Comments
r280925: Optimize bootmsg to use fg/bg/me from screen.4th
r280926: Whitespace and cleanup
r280931: Comments
r280933: Move beastie to logo-*.4th; brands to brand-*.4th
r280934: Add remainder of supported ANSI escape sequences
r280935: Securely overwrite (zero) user input after password checks
r280936: Use equals for ASCII double frames
r280937: Solve dreaded "dictionary full" issue
r280938: Add "GELI Passphrase:" prompt to boot loader
r280939: Revert that (premature commit)
r280974: Use fg/b/me from screen.4th instead of literals
r280975: Eliminate literal escape sequences from *.4th
r280976: Use ^[[m mode-ending versus ^[[37m
r281002: Install newly added brand-*.4th and logo-*.4th files (jkim)
r281009: Revert .PATH changes to fix mips build (jkim)
r281081: Make sure forth manpages are only installed once (bapt)
r281176: Back to previous mode-endings based on feedback
r281177: Back to previous mode-endings based on feedback
r281178: Back to previous mode-endings based on feedback
r281179: Back to previous mode-endings based on feedback
r281180: Eliminate literal escape sequences from *.rc
r281271: Fix a bootlock condition if loader_version is set
NB: Commit message of r281271 has a typo, s/_logo/_version/
r281275: Re-do proper mode-endings
r281616: Add "GELI Passphrase:" prompt to boot loader

Relnotes: Added "GELI Passphrase:" prompt to boot loader

281323 09-Apr-2015 jhb

MFC 279950:
Enable bzipfs support in the EFI loader.
- Add bzipfs to the list of supported filesystems in the EFI loader.
- Increase the heap size allocated for the EFI loader from 2MB to 3MB.

281321 09-Apr-2015 jhb

MFC 279949:
The System V ABI for amd64 allows functions to use space in a 128 byte
redzone below the stack pointer for scratch space and requires
interrupt and signal frames to avoid overwriting it. However, EFI uses
the Windows ABI which does not support this. As a result, interrupt
handlers in EFI push their interrupt frames directly on top of the
stack pointer. If the compiler used the red zone in a function in the
EFI loader, then a device interrupt that occurred while that function
was running could trash its local variables. In practice this happens
fairly reliable when using gzipfs as an interrupt during decompression
can trash the local variables in the inflate_table() function
resulting in corrupted output or hangs.

Fix this by disabling the redzone for amd64 EFI binaries. This
requires building not only the loader but any libraries used by the
loader without redzone support.

Thanks to Jilles for pointing me at the redzone once I found the stack
corruption.

281319 09-Apr-2015 jhb

MFC 279929:
Allow the EFI loader to work with large kernels and/or modules
(for example, a large mfsroot). Note that for EFI the kernel and
modules (as well as other metadata files such as splash screens or
memory disk images) are loaded into a statically-sized staging area.
When the EFI loader exits it copies this staging area down to the
location the kernel expects to run at.
- Add bounds checking to the copy routines to fail attempts to access
memory outside of the staging area. Previously loading a combined
kernel + modules larger than the staging size (32MB) would overflow
the staging area trashing whatever memory was afterwards. Under
Intel's OVMF firmware for qemu this resulted in fatal faults in the
firmware itself. Now the attempt will fail with ENOMEM.
- Allow the staging area size to be configured at compile time via
an EFI_STAGING_SIZE variable in src.conf or on the command line.
It accepts the size of the staging area in MB. The default size
remains 32MB.

281289 09-Apr-2015 dim

MFC r280980:

Ensure the cross assembler, linker and objcopy are used for the build32
stage, just like for the regular world stage.

Reviewed by: rodrigc, imp, bapt, emaste
Differential Revision: https://reviews.freebsd.org/D2187

279877 11-Mar-2015 mav

MFC r279275: Fix potential NULL dereference.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

279796 08-Mar-2015 dim

MFC r279598:

When compiling boot2 with gcc on i386 and pc98, only use the custom flag
-mno-align-long-strings when compiling with base gcc. This is checked
by comparing the version number against 4.2.1, which is not exactly
right, but good enough. (There is no other way to check whether we are
using the non-standard gcc in base, as far as I know.)

Reported by: rodrigc

279565 03-Mar-2015 loos

MFC r278915:

Set the #address-cells and #size-cells properties on I2C controllers of
Raspberry-pi.

This fixes the issues on dtc(1) while compiling I2C addresses set with
"reg" property.

279254 24-Feb-2015 emaste

MFC part of r273865: fix boot1.efi for block size != 512

r273865 is part of the work for supporting 4Kn drives, but it turns out
the underlying bug can actually cause corruption of the UEFI system
table in any case where block size is not 512.

Relevant portion of the original commit message:

convert boot1.efi to corrrectly calculate the lba for what the
media reports and convert the size based on what FreeBSD uses.
existing code would use the 512 byte lba and convert the
using 4K byte size.

PR: 197881
Reviewed by: Chris Ruffin

278736 13-Feb-2015 ian

MFC r278032:

Do not skip setting the memory 'reg' property if the fdt data already
contains one.

278675 13-Feb-2015 ian

MFC r276632: Create a custom /boot/defaults/loader.conf for ARM.

278637 12-Feb-2015 ian

MFC r276306: Use proper markup for quotes.

278608 12-Feb-2015 ian

MFC r275779, r275963, r276101, r276161, r276297:

Move ofw_cpu.c to sys/dev/ofw so that it can be used by other
architectures.

Add driver for CPU frequency/voltage control on the Raspberry Pi.

On initialization, do not use bcm_mbox_intr() to read the pending messages.
This fixes the hang that happens on boot while initializing the cpufreq on
Raspberry Pi.

278604 11-Feb-2015 ian

MFC r276145: Convert lingering NO_FORTH conditionals to test MK_FORTH.

278602 11-Feb-2015 ian

MFC r276079, r276087:

Add a divisor parameter to twiddle() so that callers can request that
output only happen on every Nth call.

Add a new loader(8) variable, twiddle_divisor, allowing control over the
output frequency of the "twiddle" IO progress indicator.

278599 11-Feb-2015 ian

MFC r266943, r266950, r267390:

Add support for Exynos 5420 Octa - 8-core (big.LITTLE) ARM machine
Enable SMP for both Exynos5 models we support.

278079 02-Feb-2015 loos

MFC r277042:

Add support to turn off Beaglebone with poweroff(8) or shutdown(8) -p.

To cut off the power we need to start the shutdown sequence by writing
the OFF bit on PMIC.

Once the PMIC is programmed the SoC needs to toggle the PMIC_PWR_ENABLE
pin when it is ready for the PMIC to cut off the power. This is done by
triggering the ALARM2 interrupt on SoC RTC.

The RTC driver only works in power management mode which means it won't
provide any kind of time keeping functionality. It only implements a way
to trigger the ALARM2 interrupt when requested.

278073 02-Feb-2015 loos

MFC r277208:

Fix the PMIC node name to match the PMIC i2c address.

Remove an extra blank line.

No functional changes.

277946 30-Jan-2015 jhb

MFC 274398,274537:
Move NFS and TFTP filesystems before the synthetic filesystems (bzip,
gzip, and split).

276486 31-Dec-2014 ngie

MFC r264400,r265836:

r264400:

NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
and finish the job. ncurses is now the only Makefile in the tree that
uses it since it wasn't a simple mechanical change, and will be
addressed in a future commit.

r265836:

Remove last two NO_MAN= in the tree. In both of these cases, MAN= is
what is needed.


/freebsd-10-stable/cddl/usr.bin/sgsmsg/Makefile
/freebsd-10-stable/cddl/usr.bin/zinject/Makefile
/freebsd-10-stable/cddl/usr.bin/zlook/Makefile
/freebsd-10-stable/cddl/usr.bin/ztest/Makefile
/freebsd-10-stable/cddl/usr.sbin/zhack/Makefile
/freebsd-10-stable/contrib/libucl/Makefile.am
/freebsd-10-stable/contrib/libucl/doc/Makefile.am
/freebsd-10-stable/contrib/libucl/tests/Makefile.am
/freebsd-10-stable/contrib/libucl/utils/Makefile.am
/freebsd-10-stable/contrib/ofed/usr.bin/ibsendtrap/Makefile
/freebsd-10-stable/contrib/ofed/usr.lib/libsdp/Makefile
/freebsd-10-stable/crypto/heimdal/appl/Makefile.am
/freebsd-10-stable/crypto/heimdal/appl/ftp/Makefile.am
/freebsd-10-stable/crypto/heimdal/appl/ftp/common/Makefile.am
/freebsd-10-stable/crypto/heimdal/lib/Makefile.am
/freebsd-10-stable/crypto/heimdal/lib/ipc/Makefile.am
/freebsd-10-stable/games/fortune/unstr/Makefile
/freebsd-10-stable/games/ppt/Makefile
/freebsd-10-stable/games/primes/Makefile
/freebsd-10-stable/gnu/usr.bin/cc/c++/Makefile
/freebsd-10-stable/gnu/usr.bin/cc/c++filt/Makefile
/freebsd-10-stable/gnu/usr.bin/cc/cc1/Makefile
/freebsd-10-stable/gnu/usr.bin/cc/cc1plus/Makefile
/freebsd-10-stable/gnu/usr.bin/cc/collect2/Makefile
/freebsd-10-stable/gnu/usr.bin/cc/protoize/Makefile
/freebsd-10-stable/gnu/usr.bin/gdb/Makefile.inc
/freebsd-10-stable/gnu/usr.bin/gdb/gdbtui/Makefile
/freebsd-10-stable/gnu/usr.bin/groff/src/devices/grohtml/Makefile
/freebsd-10-stable/gnu/usr.bin/groff/src/preproc/html/Makefile
/freebsd-10-stable/kerberos5/libexec/digest-service/Makefile
/freebsd-10-stable/kerberos5/libexec/ipropd-slave/Makefile
/freebsd-10-stable/kerberos5/tools/asn1_compile/Makefile
/freebsd-10-stable/kerberos5/tools/make-roken/Makefile
/freebsd-10-stable/kerberos5/tools/slc/Makefile
/freebsd-10-stable/kerberos5/usr.bin/hxtool/Makefile
/freebsd-10-stable/kerberos5/usr.bin/ksu/Makefile
/freebsd-10-stable/lib/libarchive/test/Makefile
/freebsd-10-stable/lib/libauditd/Makefile
/freebsd-10-stable/lib/libproc/Makefile
/freebsd-10-stable/lib/libproc/test/t1-bkpt/Makefile
/freebsd-10-stable/lib/libproc/test/t2-name2map/Makefile
/freebsd-10-stable/lib/libproc/test/t3-name2sym/Makefile
/freebsd-10-stable/lib/ncurses/form/Makefile
/freebsd-10-stable/lib/ncurses/menu/Makefile
/freebsd-10-stable/lib/ncurses/ncurses/Makefile
/freebsd-10-stable/lib/ncurses/panel/Makefile
/freebsd-10-stable/libexec/bootpd/bootpgw/Makefile
/freebsd-10-stable/libexec/ulog-helper/Makefile
/freebsd-10-stable/release/picobsd/tinyware/aps/Makefile
/freebsd-10-stable/release/picobsd/tinyware/help/Makefile
/freebsd-10-stable/release/picobsd/tinyware/msg/Makefile
/freebsd-10-stable/release/picobsd/tinyware/ns/Makefile
/freebsd-10-stable/release/picobsd/tinyware/oinit/Makefile
/freebsd-10-stable/release/picobsd/tinyware/simple_httpd/Makefile
/freebsd-10-stable/release/picobsd/tinyware/sps/Makefile
/freebsd-10-stable/release/picobsd/tinyware/view/Makefile
/freebsd-10-stable/release/picobsd/tinyware/vm/Makefile
/freebsd-10-stable/rescue/rescue/Makefile
/freebsd-10-stable/sbin/geom/Makefile
/freebsd-10-stable/sbin/rtsol/Makefile
/freebsd-10-stable/secure/lib/libcrypto/engines/lib4758cca/Makefile
/freebsd-10-stable/share/examples/FreeBSD_version/Makefile
/freebsd-10-stable/share/examples/find_interface/Makefile
/freebsd-10-stable/share/examples/kld/cdev/test/Makefile
/freebsd-10-stable/share/examples/kld/syscall/test/Makefile
/freebsd-10-stable/share/examples/libvgl/Makefile
/freebsd-10-stable/share/examples/perfmon/Makefile
/freebsd-10-stable/share/examples/ppi/Makefile
/freebsd-10-stable/share/mk/bsd.README
/freebsd-10-stable/share/mk/bsd.test.mk
amd64/boot1.efi/Makefile
amd64/efi/Makefile
arm/at91/boot0/Makefile
arm/at91/boot0iic/Makefile
arm/at91/boot0spi/Makefile
arm/at91/boot2/Makefile
arm/at91/bootiic/Makefile
arm/at91/bootspi/Makefile
arm/at91/libat91/Makefile
arm/ixp425/boot2/Makefile
i386/boot0/Makefile
i386/btx/btx/Makefile
i386/btx/btxldr/Makefile
i386/btx/lib/Makefile
i386/cdboot/Makefile
i386/kgzldr/Makefile
i386/mbr/Makefile
i386/pmbr/Makefile
i386/zfsloader/Makefile
ia64/efi/Makefile
ia64/ski/Makefile
libstand32/Makefile
pc98/boot0.5/Makefile
pc98/boot0/Makefile
pc98/btx/btx/Makefile
pc98/btx/btxldr/Makefile
pc98/btx/lib/Makefile
pc98/cdboot/Makefile
pc98/kgzldr/Makefile
powerpc/boot1.chrp/Makefile
powerpc/uboot/Makefile
sparc64/boot1/Makefile
userboot/libstand/Makefile
userboot/test/Makefile
userboot/userboot/Makefile
/freebsd-10-stable/sys/crypto/rijndael/Makefile
/freebsd-10-stable/sys/dev/aic7xxx/aicasm/Makefile
/freebsd-10-stable/sys/dev/patm/genrtab/Makefile
/freebsd-10-stable/tests/sys/netinet/Makefile
/freebsd-10-stable/tools/KSE/ksetest/Makefile
/freebsd-10-stable/tools/KSE/rr/Makefile
/freebsd-10-stable/tools/bsdbox/Makefile
/freebsd-10-stable/tools/diag/dumpvfscache/Makefile
/freebsd-10-stable/tools/diag/localeck/Makefile
/freebsd-10-stable/tools/regression/acct/Makefile
/freebsd-10-stable/tools/regression/aio/aiop/Makefile
/freebsd-10-stable/tools/regression/aio/aiotest/Makefile
/freebsd-10-stable/tools/regression/aio/kqueue/Makefile
/freebsd-10-stable/tools/regression/aio/kqueue/lio/Makefile
/freebsd-10-stable/tools/regression/audit/audit_pipe_ioctl/Makefile
/freebsd-10-stable/tools/regression/doat/Makefile
/freebsd-10-stable/tools/regression/environ/Makefile.envctl
/freebsd-10-stable/tools/regression/environ/Makefile.retention
/freebsd-10-stable/tools/regression/environ/Makefile.timings
/freebsd-10-stable/tools/regression/ethernet/ethermulti/Makefile
/freebsd-10-stable/tools/regression/execve/Makefile
/freebsd-10-stable/tools/regression/fifo/fifo_create/Makefile
/freebsd-10-stable/tools/regression/fifo/fifo_io/Makefile
/freebsd-10-stable/tools/regression/fifo/fifo_misc/Makefile
/freebsd-10-stable/tools/regression/fifo/fifo_open/Makefile
/freebsd-10-stable/tools/regression/file/dup/Makefile
/freebsd-10-stable/tools/regression/file/flock/Makefile
/freebsd-10-stable/tools/regression/file/ftruncate/Makefile
/freebsd-10-stable/tools/regression/file/newfileops_on_fork/Makefile
/freebsd-10-stable/tools/regression/filemon/Makefile
/freebsd-10-stable/tools/regression/fsx/Makefile
/freebsd-10-stable/tools/regression/gaithrstress/Makefile
/freebsd-10-stable/tools/regression/geom/ConfCmp/Makefile
/freebsd-10-stable/tools/regression/geom/MdLoad/Makefile
/freebsd-10-stable/tools/regression/include/stdatomic/Makefile
/freebsd-10-stable/tools/regression/include/tgmath/Makefile
/freebsd-10-stable/tools/regression/kgssapi/Makefile
/freebsd-10-stable/tools/regression/kqueue/Makefile
/freebsd-10-stable/tools/regression/kthread/kld/Makefile
/freebsd-10-stable/tools/regression/lib/libc/resolv/Makefile
/freebsd-10-stable/tools/regression/mac/mac_bsdextended/Makefile
/freebsd-10-stable/tools/regression/mlock/Makefile
/freebsd-10-stable/tools/regression/mmap/Makefile
/freebsd-10-stable/tools/regression/mqueue/mqtest1/Makefile
/freebsd-10-stable/tools/regression/mqueue/mqtest2/Makefile
/freebsd-10-stable/tools/regression/mqueue/mqtest3/Makefile
/freebsd-10-stable/tools/regression/mqueue/mqtest4/Makefile
/freebsd-10-stable/tools/regression/mqueue/mqtest5/Makefile
/freebsd-10-stable/tools/regression/netinet/arphold/Makefile
/freebsd-10-stable/tools/regression/netinet/ipbroadcast/Makefile
/freebsd-10-stable/tools/regression/netinet/ipdivert/Makefile
/freebsd-10-stable/tools/regression/netinet/ipmulticast/Makefile
/freebsd-10-stable/tools/regression/netinet/ipsockopt/Makefile
/freebsd-10-stable/tools/regression/netinet/msocket/Makefile
/freebsd-10-stable/tools/regression/netinet/msocket_ifnet_remove/Makefile
/freebsd-10-stable/tools/regression/netinet/rawconnect/Makefile
/freebsd-10-stable/tools/regression/netinet/tcpconnect/Makefile
/freebsd-10-stable/tools/regression/netinet/tcpdrop/Makefile
/freebsd-10-stable/tools/regression/netinet/tcpfullwindowrst/Makefile
/freebsd-10-stable/tools/regression/netinet/tcpsockclosebeforeaccept/Makefile
/freebsd-10-stable/tools/regression/netinet/tcpsocktimewait/Makefile
/freebsd-10-stable/tools/regression/netinet/tcpstream/Makefile
/freebsd-10-stable/tools/regression/netinet/udpconnectjail/Makefile
/freebsd-10-stable/tools/regression/netinet/udpzerobyte/Makefile
/freebsd-10-stable/tools/regression/netinet6/icmp6_filter/Makefile
/freebsd-10-stable/tools/regression/netinet6/inet6_rth/Makefile
/freebsd-10-stable/tools/regression/netinet6/ip6_sockets/Makefile
/freebsd-10-stable/tools/regression/nfsmmap/test1/Makefile
/freebsd-10-stable/tools/regression/nfsmmap/test2/Makefile
/freebsd-10-stable/tools/regression/p1003_1b/Makefile
/freebsd-10-stable/tools/regression/pipe/Makefile
/freebsd-10-stable/tools/regression/posixsem/Makefile
/freebsd-10-stable/tools/regression/posixsem2/Makefile
/freebsd-10-stable/tools/regression/posixshm/Makefile
/freebsd-10-stable/tools/regression/pthread/cv_cancel1/Makefile
/freebsd-10-stable/tools/regression/pthread/mutex_isowned_np/Makefile
/freebsd-10-stable/tools/regression/rpcsec_gss/Makefile
/freebsd-10-stable/tools/regression/security/access/Makefile
/freebsd-10-stable/tools/regression/security/cap_test/Makefile
/freebsd-10-stable/tools/regression/security/open_to_operation/Makefile
/freebsd-10-stable/tools/regression/security/proc_to_proc/Makefile
/freebsd-10-stable/tools/regression/sigqueue/sigqtest1/Makefile
/freebsd-10-stable/tools/regression/sigqueue/sigqtest2/Makefile
/freebsd-10-stable/tools/regression/sockets/accept_fd_leak/Makefile
/freebsd-10-stable/tools/regression/sockets/accf_data_attach/Makefile
/freebsd-10-stable/tools/regression/sockets/fstat/Makefile
/freebsd-10-stable/tools/regression/sockets/kqueue/Makefile
/freebsd-10-stable/tools/regression/sockets/listen_backlog/Makefile
/freebsd-10-stable/tools/regression/sockets/listenclose/Makefile
/freebsd-10-stable/tools/regression/sockets/pr_atomic/Makefile
/freebsd-10-stable/tools/regression/sockets/reconnect/Makefile
/freebsd-10-stable/tools/regression/sockets/rtsocket/Makefile
/freebsd-10-stable/tools/regression/sockets/sblock/Makefile
/freebsd-10-stable/tools/regression/sockets/sendfile/Makefile
/freebsd-10-stable/tools/regression/sockets/shutdown/Makefile
/freebsd-10-stable/tools/regression/sockets/sigpipe/Makefile
/freebsd-10-stable/tools/regression/sockets/so_setfib/Makefile
/freebsd-10-stable/tools/regression/sockets/socketpair/Makefile
/freebsd-10-stable/tools/regression/sockets/unix_bindconnect/Makefile
/freebsd-10-stable/tools/regression/sockets/unix_close_race/Makefile
/freebsd-10-stable/tools/regression/sockets/unix_cmsg/Makefile
/freebsd-10-stable/tools/regression/sockets/unix_gc/Makefile
/freebsd-10-stable/tools/regression/sockets/unix_passfd/Makefile
/freebsd-10-stable/tools/regression/sockets/unix_sendtorace/Makefile
/freebsd-10-stable/tools/regression/sockets/unix_socket/Makefile
/freebsd-10-stable/tools/regression/sockets/unix_sorflush/Makefile
/freebsd-10-stable/tools/regression/sockets/zerosend/Makefile
/freebsd-10-stable/tools/regression/sysvmsg/Makefile
/freebsd-10-stable/tools/regression/sysvsem/Makefile
/freebsd-10-stable/tools/regression/sysvshm/Makefile
/freebsd-10-stable/tools/regression/tls/ttls1/Makefile
/freebsd-10-stable/tools/regression/tls/ttls2/Makefile
/freebsd-10-stable/tools/regression/tls/ttls4/Makefile
/freebsd-10-stable/tools/regression/tmpfs/Makefile
/freebsd-10-stable/tools/regression/ufs/uprintf/Makefile
/freebsd-10-stable/tools/test/auxinfo/Makefile
/freebsd-10-stable/tools/test/iconv/gnu/Makefile
/freebsd-10-stable/tools/test/iconv/posix/Makefile
/freebsd-10-stable/tools/test/iconv/refgen/Makefile
/freebsd-10-stable/tools/test/iconv/tablegen/Makefile
/freebsd-10-stable/tools/test/malloc/Makefile
/freebsd-10-stable/tools/test/netfibs/Makefile
/freebsd-10-stable/tools/test/ppsapi/Makefile
/freebsd-10-stable/tools/test/ptrace/Makefile
/freebsd-10-stable/tools/test/upsdl/Makefile
/freebsd-10-stable/tools/tools/aac/Makefile
/freebsd-10-stable/tools/tools/ath/Makefile.inc
/freebsd-10-stable/tools/tools/ath/ath_ee_9287_print/Makefile
/freebsd-10-stable/tools/tools/ath/ath_ee_9300_print/Makefile
/freebsd-10-stable/tools/tools/ath/ath_ee_v14_print/Makefile
/freebsd-10-stable/tools/tools/ath/ath_ee_v4k_print/Makefile
/freebsd-10-stable/tools/tools/ath/athstats/Makefile
/freebsd-10-stable/tools/tools/atsectl/Makefile
/freebsd-10-stable/tools/tools/bootparttest/Makefile
/freebsd-10-stable/tools/tools/cfi/Makefile
/freebsd-10-stable/tools/tools/cxgbetool/Makefile
/freebsd-10-stable/tools/tools/cxgbtool/Makefile
/freebsd-10-stable/tools/tools/drm/radeon/mkregtable/Makefile
/freebsd-10-stable/tools/tools/find-sb/Makefile
/freebsd-10-stable/tools/tools/gdb_regofs/Makefile
/freebsd-10-stable/tools/tools/ifinfo/Makefile
/freebsd-10-stable/tools/tools/ifpifa/Makefile
/freebsd-10-stable/tools/tools/ipw/Makefile
/freebsd-10-stable/tools/tools/iwi/Makefile
/freebsd-10-stable/tools/tools/mfi/Makefile
/freebsd-10-stable/tools/tools/mwl/mwldebug/Makefile
/freebsd-10-stable/tools/tools/mwl/mwlstats/Makefile
/freebsd-10-stable/tools/tools/ncpus/Makefile
/freebsd-10-stable/tools/tools/net80211/stumbler/Makefile
/freebsd-10-stable/tools/tools/net80211/w00t/Makefile.inc
/freebsd-10-stable/tools/tools/net80211/wesside/dics/Makefile
/freebsd-10-stable/tools/tools/net80211/wesside/udps/Makefile
/freebsd-10-stable/tools/tools/net80211/wesside/wesside/Makefile
/freebsd-10-stable/tools/tools/net80211/wlaninject/Makefile
/freebsd-10-stable/tools/tools/net80211/wlanstats/Makefile
/freebsd-10-stable/tools/tools/net80211/wlantxtime/Makefile
/freebsd-10-stable/tools/tools/net80211/wlanwatch/Makefile
/freebsd-10-stable/tools/tools/net80211/wlanwds/Makefile
/freebsd-10-stable/tools/tools/netmap/Makefile
/freebsd-10-stable/tools/tools/netrate/http/Makefile
/freebsd-10-stable/tools/tools/netrate/httpd/Makefile
/freebsd-10-stable/tools/tools/netrate/juggle/Makefile
/freebsd-10-stable/tools/tools/netrate/netblast/Makefile
/freebsd-10-stable/tools/tools/netrate/netreceive/Makefile
/freebsd-10-stable/tools/tools/netrate/netsend/Makefile
/freebsd-10-stable/tools/tools/netrate/tcpconnect/Makefile
/freebsd-10-stable/tools/tools/netrate/tcpp/Makefile
/freebsd-10-stable/tools/tools/netrate/tcpreceive/Makefile
/freebsd-10-stable/tools/tools/npe/npestats/Makefile
/freebsd-10-stable/tools/tools/nxge/Makefile
/freebsd-10-stable/tools/tools/pciroms/Makefile
/freebsd-10-stable/tools/tools/pirtool/Makefile
/freebsd-10-stable/tools/tools/syscall_timing/Makefile
/freebsd-10-stable/tools/tools/tionxcl/Makefile
/freebsd-10-stable/tools/tools/umastat/Makefile
/freebsd-10-stable/tools/tools/vxge/Makefile
/freebsd-10-stable/tools/tools/wtap/vis_map/Makefile
/freebsd-10-stable/tools/tools/wtap/wtap/Makefile
/freebsd-10-stable/tools/tools/zfsboottest/Makefile
/freebsd-10-stable/usr.bin/bzip2recover/Makefile
/freebsd-10-stable/usr.bin/clang/clang-tblgen/Makefile
/freebsd-10-stable/usr.bin/clang/llvm-mc/Makefile
/freebsd-10-stable/usr.bin/clang/llvm-objdump/Makefile
/freebsd-10-stable/usr.bin/clang/llvm-rtdyld/Makefile
/freebsd-10-stable/usr.bin/clang/macho-dump/Makefile
/freebsd-10-stable/usr.bin/cpio/test/Makefile
/freebsd-10-stable/usr.bin/dirname/Makefile
/freebsd-10-stable/usr.bin/locate/bigram/Makefile
/freebsd-10-stable/usr.bin/locate/code/Makefile
/freebsd-10-stable/usr.bin/mkcsmapper_static/Makefile
/freebsd-10-stable/usr.bin/mkesdb_static/Makefile
/freebsd-10-stable/usr.bin/svn/svn/Makefile
/freebsd-10-stable/usr.bin/svn/svnadmin/Makefile
/freebsd-10-stable/usr.bin/svn/svndumpfilter/Makefile
/freebsd-10-stable/usr.bin/svn/svnlook/Makefile
/freebsd-10-stable/usr.bin/svn/svnmucc/Makefile
/freebsd-10-stable/usr.bin/svn/svnrdump/Makefile
/freebsd-10-stable/usr.bin/svn/svnserve/Makefile
/freebsd-10-stable/usr.bin/svn/svnsync/Makefile
/freebsd-10-stable/usr.bin/svn/svnversion/Makefile
/freebsd-10-stable/usr.bin/tar/test/Makefile
/freebsd-10-stable/usr.bin/unexpand/Makefile
/freebsd-10-stable/usr.bin/uudecode/Makefile
/freebsd-10-stable/usr.bin/vgrind/RETEST/Makefile
/freebsd-10-stable/usr.bin/xlint/lint2/Makefile
/freebsd-10-stable/usr.sbin/bhyvectl/Makefile
/freebsd-10-stable/usr.sbin/bootparamd/callbootd/Makefile
/freebsd-10-stable/usr.sbin/bsdinstall/distextract/Makefile
/freebsd-10-stable/usr.sbin/bsdinstall/distfetch/Makefile
/freebsd-10-stable/usr.sbin/bsdinstall/scripts/Makefile
/freebsd-10-stable/usr.sbin/crunch/examples/Makefile
/freebsd-10-stable/usr.sbin/ctm/ctm_dequeue/Makefile
/freebsd-10-stable/usr.sbin/ctm/ctm_smail/Makefile
/freebsd-10-stable/usr.sbin/ctm/mkCTM/Makefile
/freebsd-10-stable/usr.sbin/fifolog/fifolog_reader/Makefile
/freebsd-10-stable/usr.sbin/fifolog/fifolog_writer/Makefile
/freebsd-10-stable/usr.sbin/lpr/filters.ru/koi2855/Makefile
/freebsd-10-stable/usr.sbin/lpr/filters.ru/koi2alt/Makefile
/freebsd-10-stable/usr.sbin/lpr/filters/Makefile
/freebsd-10-stable/usr.sbin/ntp/ntp-keygen/Makefile
/freebsd-10-stable/usr.sbin/ntp/ntpd/Makefile
/freebsd-10-stable/usr.sbin/ntp/ntpdate/Makefile
/freebsd-10-stable/usr.sbin/ntp/ntpdc/Makefile
/freebsd-10-stable/usr.sbin/ntp/ntpq/Makefile
/freebsd-10-stable/usr.sbin/ntp/ntptime/Makefile
/freebsd-10-stable/usr.sbin/portsnap/make_index/Makefile
/freebsd-10-stable/usr.sbin/portsnap/phttpget/Makefile
/freebsd-10-stable/usr.sbin/rpc.ypupdated/Makefile
276289 27-Dec-2014 ian

r276026:

Allow whitspace to appear between device name and unit number in loaderdev.

276081 22-Dec-2014 delphij

MFC r274337,r274673,274681,r275515:

ZFS large block support. The default recordsize remains at 128KB.

A new tunable/sysctl variable, vfs.zfs.max_recordsize is added to
allow adjusting the permitted maximum record size, or
zfs_max_recordsize, with a default of 1MB. ZFS will not allow
setting recordsize greater than zfs_max_recordsize as a safety
belt, because larger recordsize means greater read and write
latency and more memory usage.

Please note that booting from datasets that have recordsize greater
than 128KB is not supported (but it's Okay to enable the feature on
the pool).

Limited safety belt is provided for mounted root filesystem but use
caution when using a larger value.

Illumos issue:
5027 zfs large block support


/freebsd-10-stable/cddl/contrib/opensolaris/cmd/zdb/zdb.c
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/zfs/zfs.8
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/ztest/ztest.c
/freebsd-10-stable/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
/freebsd-10-stable/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
/freebsd-10-stable/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
/freebsd-10-stable/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c
/freebsd-10-stable/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h
zfs/zfsimpl.c
/freebsd-10-stable/sys/cddl/boot/zfs/zfsimpl.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h
275763 14-Dec-2014 andrew

MFC 273927:

Move the definitions of the fdt functions from a uboot header to a new fdt
header. There is nothing in the fdt spec that ties it to U-Boot.

While here sort and fix the signature of fdt_setup_fdtp.

MFC 273934:

Start to allow platforms other than U-Boot to use the FDT code in loader by
moving U-Boot specific code from libfdt.a to a new libuboot_fdt.a. This
needs to be a new library for linking to work correctly.

Differential Revision: https://reviews.freebsd.org/D1054
Reviewed by: ian, rpaulo (earlier version)

275762 14-Dec-2014 andrew

MFC r273913:

Clean up the types of a few strings to make them const when they are never
written to.

MFC r273914:

The command name is a constant, use the correct type.

275426 02-Dec-2014 brooks

MFC r274818:

Merge from CheriBSD (3422ebe71b6c06fe78b1be73623b240c219e08e3):

Rename beripic to beripic0.

Sponsored by: DARPA, AFRL

274942 24-Nov-2014 grehan

MFC r274407

Fix incorrect reading of 32-bit modinfo by 64-bit loaders.

The various structures in the mod_metadata set of a FreeBSD kernel and
modules contain pointers. The FreeBSD loader correctly deals with a
mismatch in loader and kernel pointer size (e.g. 32-bit i386/ppc
loader, loading 64-bit amd64/ppc64 kernels), but wasn't dealing with
the inverse case where a 64-bit loader was loading a 32-bit kernel.

274269 08-Nov-2014 ian

MFC r268836: Fix a typo in a gpio node name.

274042 03-Nov-2014 nyan

MFC: r268474 and r268476 (by imp)
- Merge the clang support from i386.
- Compile boot2 with clang on pc98.

MFC: r272250 (by nyan)
- Reduce diffs against i386.

274041 03-Nov-2014 nyan

MFC: r268475 (by imp)

Make SERIAL support optional again. Enable it for i386 because a huge
percentage of machines has a 16550. Disable it for pc98 since only a
tiny fraction of them have one.

274034 03-Nov-2014 nyan

MFC: r272256

Switch from lib/libstand to sys/boot/libstand32.

274032 03-Nov-2014 nyan

MFC: r272255

Supress clang warning for FreeBSD printf %b and %D formats.

274029 03-Nov-2014 nyan

MFC: r272252

Drop the 3rd clause from all 3 clause BSD licenses.

273680 26-Oct-2014 ian

MFC r273298:

The U-Boot README says fdt_addr_r is the right env var for fdt data
loaded into ram, but vendors also use fdtaddr and fdt_addr. Check the
recommended variable first and fall back to the others.

273665 26-Oct-2014 ian

MFC r271285:

Add a 'ubenv import' command to import environment variables from the
u-boot env into the loader(8) env (which also gets them into the kernel
env).

273663 26-Oct-2014 ian

MFC r271097, r271100, r271101, r271102, r271124:

- Add a basic iomux driver for imx6.
- Implement the same public interface in imx51 and imx6 iomux
- The iomux driver is no longer optional, remove it from kernel configs.
- Implement the imx_iomux_get/set_gpr() interface for imx6.
- Stop setting the iomux device status to disabled, now that we have a driver.

273662 26-Oct-2014 ian

MFC r268973, r268977: Rename i.MX I2C driver file, enable it on imx6.

273661 26-Oct-2014 ian

MFC r268834, r268835:

o Enable GPIO device driver for i.MX6.
It was originally written for i.MX5 and compatible with newer chip.
o Extend device tree information
o style(9) fixes
o Rename gpio driver file.

273658 26-Oct-2014 ian

MFC r271054:

When built with FDT support, add /boot/dtb to the list of search directories.

273645 25-Oct-2014 ian

MFC r268633, r271046:

Fixes and enhancements for the if_cgem driver...

- miibus fixes as suggested by Yonghyeon Pyun.
- enable VLAN MTU support.
- fix a few WITNESS complaints in cgem_attach().
- have cgem_attach() properly init the ifnet struct before calling
mii_attach() to fix panic when using e1000phy.
- fix ethernet address changing.
- fix transmit queue overflow handling.
- tweak receive queue handling to reduce receive overflows.
- bring out MAC statistic counters to sysctls.
- add e1000phy to config file.
- implement receive hang work-around described in reference guide.
- change device name from if_cgem to cgem to be consistent with other
interfaces.

Fix the Zedboard/Zynq ethernet driver to handle media speed changes so
that it can connect to switches at speeds other than 1gb.

273623 25-Oct-2014 rpaulo

MFC r273256:
AM335X FDT: use the omap3-wdt string for compatibility with Linux.

273622 25-Oct-2014 rpaulo

MFC r273248:
AM335x FDT: add an entry for the watchdog.

273117 15-Oct-2014 ae

MFC r272749:
Fix comment.

272933 11-Oct-2014 ae

MFC r272487:
Add UUID of FreeBSD slice to GPT scheme.

272696 07-Oct-2014 avg

MFC r271609: add gptzfsboot.8, zfsboot.8 and zfsloader.8 manual pages

272301 30-Sep-2014 emaste

MFC r272105: Remove duplicated header content

Approved by: re (gjb, kib)

271996 22-Sep-2014 emaste

MFC r271762: Switch to text mode in UEFI boot

The loader previously failed to display on MacBooks and other
systems where the UEFI firmware remained in graphics mode.

Submitted by: Rafael Espindola

Approved by: re

271880 19-Sep-2014 emaste

MFC r271475 by ambrisko:

Add support for serial and null console to UEFI boot loader.

Approved by: re

271136 04-Sep-2014 emaste

MFC boot1.efi stub loader

r264391 (nwhitehorn):

Add a simple EFI stub loader. This is a quick and dirty of boot1.chrp
from the PowerPC port with all the Open Firmware bits removed and
replaced by their EFI counterparts. On the whole, I think I prefer
Open Firmware.

This code is supposed to be an immutable shim that sits on the EFI
system partition, loads /boot/loader.efi from UFS and tells the real
loader what disk/partition to look at. It finds the UFS root partition
by the somewhat braindead approach of picking the first UFS partition
it can find. Better approaches are called for, but this works for now.
This shim loader will also be useful for secure boot in the future,
which will require some rearchitecture.

r264403 (nwhitehorn):

Fix buildworld. I had some local bits in my build tree that caused
this to work by accident.

r264404 (nwhitehorn):

Add my copyright here. Most of this is unmodified from the original
sparc64 version, but at least some indication of changes that postdate
the actual invention of EFI is probably a good idea.

r264414 (nwhitehorn):

Apparently some of the i386 boot blocks are so close to full that
adding single lines to ufsread.c spills them over. Duplicate a whole
bunch of code to get file sizes into boot1.efi/boot1.c rather than
modifying ufsread.c.

r264975 (nwhitehorn):

Add generation of an EFI filesystem to hold boot1.efi. This is a near-
exact copy of the code from boot1.chrp again.

The resulting image is installed to /boot/boot1.efifat. If dd'ed to an
800K "efi" partition, it should result in a bootable system.

r268975 (sbruno): Remove boot1.efi during clean target.

Relnotes: Yes
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

271132 04-Sep-2014 emaste

MFC r263005 by royger: howto_names: unify declaration

271131 04-Sep-2014 emaste

MFC libstand32 clean target fixes

r269029 (sbruno):

Update so that clean target in sys/boot will delete the symlink
created for machine

r269036 (sbruno):

Delete the entire cleandepend/cleanmachine target thing now that its
been cleared out in r269029

271130 04-Sep-2014 emaste

r261567: Build a 32-bit libstand under sys/boot/

A 32-bit libstand is needed on 64-bit platforms for use by various
bootloaders. Previously only the 32-bit version was built, installed
as /usr/lib/libstand.a.

A new 64-bit libstand consumer will arrive in the near future, so move
the bootloader-specific 32-bit version to sys/boot/libstand32/.

Explicitly link against this version in the 32-bit loaders.

r261614: Build a 32-bit libstand under sys/boot/ for ppc64

This change is equivalent to r261567 for i386/amd64.

Relnotes: Yes
Sponsored by: The FreeBSD Foundation

270917 01-Sep-2014 ae

MFC r270445:
The size of the GPT table can not be less than one sector.

MFC r270521:
Since the size of GPT entry may differ from the sizeof(struct gpt_ent),
use the size from GPT header to iterate entries.

270243 20-Aug-2014 loos

MFC r267021:

FreeBSD, historically, has always used 8-bit addresses for i2c devices
(7-bit device address << 1), always leaving the room for the read/write
bit.

This commit convert ti_i2c and revert r259127 on bcm2835_bsc to make them
compatible with 8-bit addresses. Previous to this commit an i2c device
would have different addresses depending on the controller it was attached
to (by example, when compared to any iicbb(4) based i2c controller), which
was a pretty annoying behavior.

Also, update the PMIC i2c address on beaglebone* DTS files to match the
new address scheme.

Now the userland utilities need to do the correct slave address shifting
(but it is going to work with any i2c controller on the system).

Discussed with: ian

MFC r267834:

Clarify the expected usage of I2C 7-bit slave addresses on ioctl(2)
interface.

While here add the cross reference to iic(4) on iicbus(4).

CR: D210
Suggested by: jmg

270061 16-Aug-2014 bz

MFC r264601,264646,265766,267918,267919,267920:

Merge if_nf10bmac(4), a driver to support an NetFPGA-10G Embedded
CPU Ethernet Core.

The current version operates on a simple PIO based interface connected
to a NetFPGA-10G port.

To avoid confusion: this driver operates on a CPU running on the FPGA,
e.g. BERI/mips, and is not suited for the PCI host interface.

Adjust the register layout to allow for 64bit registers in the
future for nf10bmac(4). Also, add support for and enable RX interrupts.

Allow switching between 32bit and 64bit bus width data access at compile
time by setting NF10BMAC_64BIT and using a REGWTYPE #define to set correct
variable and return value widths.

Adjust comments to indicate the 32 or 64bit register widths.

Relnotes: yes
Sponsored by: DARPA/AFRL

270060 16-Aug-2014 bz

MFC r263632:

For BERI on NetFPGA assume HZ=100 by default.

Remove the uart support in favour of a "jtag-uart" interface imitation
providing a much simpler interface, directly exported to the host,
allowing the toolchain to be shared with BERI on Altera. [1]

Submitted by: Jong Hun HAN (jong.han cl.cam.ac.uk) [1]
Sponsored by: DARPA/AFRL

269922 13-Aug-2014 hselasky

MFC r269567:
Add new USB phone descriptor template for USB device side mode.

269921 13-Aug-2014 hselasky

MFC r266396 and r267183:
Build fixes. Add support for fast interrupts.

268953 21-Jul-2014 jhb

MFC 264353,264509,264768,264770,264825,264846,264988,265114,265165,265365,
265941,265951,266390,266550,266910:
Various bhyve fixes:
- Don't save host's return address in 'struct vmxctx'.
- Permit non-32-bit accesses to local APIC registers.
- Factor out common ioport handler code.
- Use calloc() in favor of malloc + memset.
- Change the vlapic timer frequency to be in the ballpark of contemporary
hardware.
- Allow the guest to read the TSC via MSR 0x10.
- A VMCS is always inactive when it exits the vmx_run() loop. Remove
redundant code and the misleading comment that suggest otherwise.
- Ignore writes to microcode update MSR. This MSR is accessed by RHEL7
guest.
Add KTR tracepoints to annotate wrmsr and rdmsr VM exits.
- Provide an alias for the userboot console and name it 'comconsole'.
- Use EV_ADD to create an mevent and EV_ENABLE to enable it.
- abort(3) the process in response to a VMEXIT_ABORT.
- Don't include the guest memory segments in the bhyve(8) process core dump.
- Make the vmx asm code dtrace-fbt-friendly.
- Allow vmx_getdesc() and vmx_setdesc() to be called for a vcpu that is in
the VCPU_RUNNING state.
- Enable VMX in the IA32_FEATURE_CONTROL MSR if it not enabled and the MSR
isn't locked.

268932 20-Jul-2014 jhb

MFC 262331,262487,262495,262523:
ZFS boot support for bhyveload.

268649 15-Jul-2014 delphij

MFC r268075: MFV r267565:

4757 ZFS embedded-data block pointers ("zero block compression")
4913 zfs release should not be subject to space checks


/freebsd-10-stable/cddl/contrib/opensolaris/cmd/zdb/zdb.c
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/zfs/zfs.8
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/ztest/ztest.c
/freebsd-10-stable/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
/freebsd-10-stable/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
/freebsd-10-stable/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c
/freebsd-10-stable/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h
/freebsd-10-stable/cddl/sbin/zpool/Makefile
/freebsd-10-stable/cddl/usr.bin/zinject/Makefile
/freebsd-10-stable/cddl/usr.sbin/zdb/Makefile
/freebsd-10-stable/cddl/usr.sbin/zhack/Makefile
zfs/zfsimpl.c
/freebsd-10-stable/sys/cddl/boot/zfs/README
/freebsd-10-stable/sys/cddl/boot/zfs/blkptr.c
/freebsd-10-stable/sys/cddl/boot/zfs/zfsimpl.h
/freebsd-10-stable/sys/cddl/boot/zfs/zfssubr.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/Makefile.files
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/blkptr.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/blkptr.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_impl.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
/freebsd-10-stable/sys/conf/files
267399 12-Jun-2014 jhb

MFC 261504:
Add support for FreeBSD/i386 guests under bhyve.

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

266751 27-May-2014 ian

MFC r264096, r264097, r264099 r264100, r264101, r264102, r264119:

Fixes to the ti_sdhci and sdhci drivers (fix clock divisor calcs).

Use the ti_sdhci driver instead of ti_mmchs for Pandaboard.

266397 18-May-2014 ian

MFC 265624, 265739: Fix interrupt parent property in dts, add SMP support.

266382 18-May-2014 ian

MFC 265208: Honor the max-frequency property if it appears in the fdt data.

266376 17-May-2014 ian

MFC 265038:

Move common device tree informations to separate dtsi files for A10 and
A20 SoC. Change cubieboard1 and cubieboard2 dts files accordingly.

266367 17-May-2014 ian

MFC 264428:

Improve the i.MX53 / Digi DTS:

* Fix the IPU address.
* Fix the PATA definition.
* Add another I2C.
* Add more UARTs.
* Add SATA.

266365 17-May-2014 ian

MFC 264251: Updates to i.MX53:

* Define support for the SDHCI driver, although it doesn't work yet
* Fix the memory mappings for IPU

266364 17-May-2014 ian

MFC 264230: Move dts files accidentally placed in arm dir to powerpc dir.

266362 17-May-2014 ian

MFC 264203, 264204, 264206, 264218:

Tell VM we now have ARM platforms with physically discontiguous memory.

Define the full 1024M of ram on the imx51 and imx53 boards.

Use a more professional uart device description.

266352 17-May-2014 ian

MFC 264052, 264057, 264065, 264094, 264103, 264120

Actually save the mpcore clock frequency retrieved from fdt data.

imx6..
- Don't call sdhci_init_slot() until after handling the FDT properties
related to detecting card presence.
- Flag several sysctl variables as tunables.
- Rework the cpu frequency management code for imx6 to add "operating
points" and min/max frequency controls.

generic timer...
- Setup both secure and non-secure timer IRQs.
We don't know our ARM security state, so one of them will operate.
- Don't set frequency, since it's unpossible in non-secure state.
Only rely on DTS clock-frequency value or get clock from timer.

266348 17-May-2014 ian

MFC 264054, 264056

Switch imx6 to using the mpcore per-cpu event timers, but continue to use
the GPT timer, which is fixed-frequency, as a timecounter.

Change NO_EVENTTIMERS from an arm-specific to an MI option, so that it can
be used in MI code.

266341 17-May-2014 ian

MFC 263910, 263913, 263914, 263933, 263934, 263935, 263936, 263981, 263982,

Add more flags for the fpexc register from the ARM1176JZF-S Manual

Initialise fpscr to a sane value when we create the pcb. This sets NaNs to
be the default NaN and for denormalised numbers to be flushed to zero.

VFP fixes/cleanups for ARM11:
* Save the required VFP registers on context switch. If the exception bit
is set we need to save and restore the FPINST register, and if the fp2v
bit is also set we need to save and restore FPINST2.
* Move saving and restoring the floating point control registers to C.
* Clear the fpexc exception and fp2v flags on a floating-point exception.
* Signal a SIGFPE if the fpexc exception flag is set on an undefined
instruction. This is how the ARM core signals to software there is a
floating-point exception.

Add Cortex-A15 cpu id revisions.

Exynos/Arndale...
- Merge SoC-common parts
- Enable iicbus device
- Directly call kmem_alloc_contig to allocate framebuffer memory
and pass VM_MEMATTR_UNCACHEABLE (no-cache, no-buffer).
This fixes screen refreshing problem when data is updated too slowly.
- Add support for keyboard used in Samsung Chromebook (ARM machine)
Support covers device drivers for:
- Interrupt Combiner
- gpio/pad, External Interrupts Controller (pad)
- I2C Interface
- Chrome Embedded Controller
- Chrome Keyboard
- Use new gpio dev class in EHCI driver
- Expand device tree information
- Release i2c bus on detach.

266340 17-May-2014 loos

MFC r265013

Revert r258678. Make the led gpio-specifier match again the #gpio-cells
settings from the GPIO controller, which i had broken in r258678. Restore
the active-low flag.

266338 17-May-2014 loos

Adds the ADC driver for TI AM3xxx SoC family.

The ADC has a 12bit resolution and its raw output can be read via sysctl(8)
interface.

The driver allows the setup of ADC clock, samples average and open delay
(the number of clock cycles to wait before start the conversion).

The TSC_ADC module is set in the general purpose mode (no touchscreen
support).

Tested on Beaglebone-black.

Written based on AM335x TRM.

266337 17-May-2014 ian

MFC 263631, 263637, 263664, 263676, 263679, 263698, 263711,

Implement __flt_rounds for ARMv6 hard-float. The fpscr register stores the
current rounding mode used by the VFP unit.

Simplify how we build MACHINE_ARCH. There are 3 options that may be set
however only arm, armeb, armv6, and soon armv6hf will be used.

Add the llvm/clang patch for r263619.

Reorder the pmap macros so "ARM_MMU_V6 + ARM_MMU_V7" is first. As they are
identical this allows us to build for both v6 and v7 together.

Add code for enabling second CPU core for A20 SoC.
Enable SMP on Cubieboard2.

Switch to freebsd.org emal address in copyright.


/freebsd-10-stable/contrib/llvm/patches/patch-r263619-clang-r201662-arm-gnueabihf.diff
/freebsd-10-stable/lib/libc/arm/gen/flt_rounds.c
/freebsd-10-stable/sys/arm/allwinner/a10_clk.c
/freebsd-10-stable/sys/arm/allwinner/a10_clk.h
/freebsd-10-stable/sys/arm/allwinner/a10_common.c
/freebsd-10-stable/sys/arm/allwinner/a10_ehci.c
/freebsd-10-stable/sys/arm/allwinner/a10_gpio.c
/freebsd-10-stable/sys/arm/allwinner/a10_gpio.h
/freebsd-10-stable/sys/arm/allwinner/a10_machdep.c
/freebsd-10-stable/sys/arm/allwinner/a10_sramc.c
/freebsd-10-stable/sys/arm/allwinner/a10_sramc.h
/freebsd-10-stable/sys/arm/allwinner/a20/a20_cpu_cfg.c
/freebsd-10-stable/sys/arm/allwinner/a20/a20_cpu_cfg.h
/freebsd-10-stable/sys/arm/allwinner/a20/a20_mp.c
/freebsd-10-stable/sys/arm/allwinner/a20/files.a20
/freebsd-10-stable/sys/arm/allwinner/aintc.c
/freebsd-10-stable/sys/arm/allwinner/console.c
/freebsd-10-stable/sys/arm/allwinner/if_emac.c
/freebsd-10-stable/sys/arm/allwinner/if_emacreg.h
/freebsd-10-stable/sys/arm/allwinner/timer.c
/freebsd-10-stable/sys/arm/conf/CUBIEBOARD2
/freebsd-10-stable/sys/arm/include/param.h
/freebsd-10-stable/sys/arm/include/pmap.h
/freebsd-10-stable/sys/arm/rockchip/rk30xx_common.c
/freebsd-10-stable/sys/arm/rockchip/rk30xx_gpio.c
/freebsd-10-stable/sys/arm/rockchip/rk30xx_grf.c
/freebsd-10-stable/sys/arm/rockchip/rk30xx_grf.h
/freebsd-10-stable/sys/arm/rockchip/rk30xx_machdep.c
/freebsd-10-stable/sys/arm/rockchip/rk30xx_pmu.c
/freebsd-10-stable/sys/arm/rockchip/rk30xx_pmu.h
/freebsd-10-stable/sys/arm/rockchip/rk30xx_wdog.c
/freebsd-10-stable/sys/arm/rockchip/rk30xx_wdog.h
fdt/dts/arm/cubieboard.dts
fdt/dts/arm/cubieboard2.dts
fdt/dts/arm/rk3188-radxa.dts
fdt/dts/arm/rk3188.dtsi
266332 17-May-2014 ian

MFC 263250, 263251, 263424, 263425, 263426, 263427, 263430, 263431

Use the same cache terminology as the ARM docs in comments. No
functional changes.

Use armv7 TLB flush code, not arm11, for cortex-a processors.

Exynos/ Arndale...
- Disable debugging by default.
- Add display-related and clk devices to the tree
- Prevent resources intersection with EHCI driver
- Add display-related and clk devices to the tree
- Prevent resources intersection with EHCI driver
- Add driver for Display Controller.
- Add support for Samsung Chromebook (ARM Cortex A15 machine).
- Rename mct and ehci drivers files to match common naming.

266277 17-May-2014 ian

MFC 257774, 256760, 262916, 262905, 262918, 262919, 262920, 262921, 262924,
262925, 262929, 262932, 262935, 262940, 262941, 262942, 262948, 262949,
262950

Strip arm/conf/DEFAULTS down to just items that are mandatory for running
the architecture.

Move all the files named foo/common.c to foo/foo_common.c

Initial cut for DTS on the hl201 board.

Add commented out dts for sam9260ek as well as early printf support.

Make clock optional on uart nodes, then back it out ("I don't know what I
was thinking, but it is lame.")

Set the baud rate if it isn't 0

Make at91_soc_id() public.

Properly round at91 resource on unmapping.

Move AT91 AIC related stuff to own file.

Fix another bug in multicast filtering. i.MX uses 6 bits from MSB in
LE CRC32 for the hash value, not the lowest 6 bits in BE CRC32.

Follow r262916 with one more config file that references a renamed common.c

Remove bogus AT91 define that causes compile errors. Most of the defines
for SAM9X are going away soonish anyway (once FDT works), but until
then...

Remove all dregs of a per-thread undefined-exception-mode stack.

Rework the VFP code that handles demand-based save and restore of state.

Always call vfp_discard() on thread death.

When a thread begins life it doesn't own the VFP hardware state on any cpu.

Make undefined exception entry MP-safe.


/freebsd-10-stable/sys/arm/allwinner/a10_common.c
/freebsd-10-stable/sys/arm/allwinner/a20/files.a20
/freebsd-10-stable/sys/arm/allwinner/common.c
/freebsd-10-stable/sys/arm/allwinner/files.a10
/freebsd-10-stable/sys/arm/arm/exception.S
/freebsd-10-stable/sys/arm/arm/genassym.c
/freebsd-10-stable/sys/arm/arm/machdep.c
/freebsd-10-stable/sys/arm/arm/swtch.S
/freebsd-10-stable/sys/arm/arm/undefined.c
/freebsd-10-stable/sys/arm/arm/vfp.c
/freebsd-10-stable/sys/arm/arm/vm_machdep.c
/freebsd-10-stable/sys/arm/at91/at91.c
/freebsd-10-stable/sys/arm/at91/at91_aic.c
/freebsd-10-stable/sys/arm/at91/at91rm9200.c
/freebsd-10-stable/sys/arm/at91/at91sam9g20.c
/freebsd-10-stable/sys/arm/at91/at91sam9g20reg.h
/freebsd-10-stable/sys/arm/at91/at91sam9x5.c
/freebsd-10-stable/sys/arm/at91/files.at91
/freebsd-10-stable/sys/arm/broadcom/bcm2835/bcm2835_common.c
/freebsd-10-stable/sys/arm/broadcom/bcm2835/bus_space.c
/freebsd-10-stable/sys/arm/broadcom/bcm2835/common.c
/freebsd-10-stable/sys/arm/broadcom/bcm2835/files.bcm2835
/freebsd-10-stable/sys/arm/conf/AC100
/freebsd-10-stable/sys/arm/conf/ARMADAXP
/freebsd-10-stable/sys/arm/conf/ARNDALE
/freebsd-10-stable/sys/arm/conf/ATMEL
/freebsd-10-stable/sys/arm/conf/AVILA
/freebsd-10-stable/sys/arm/conf/BEAGLEBONE
/freebsd-10-stable/sys/arm/conf/BWCT
/freebsd-10-stable/sys/arm/conf/CAMBRIA
/freebsd-10-stable/sys/arm/conf/CNS11XXNAS
/freebsd-10-stable/sys/arm/conf/CRB
/freebsd-10-stable/sys/arm/conf/CUBIEBOARD
/freebsd-10-stable/sys/arm/conf/CUBIEBOARD2
/freebsd-10-stable/sys/arm/conf/DB-78XXX
/freebsd-10-stable/sys/arm/conf/DB-88F5XXX
/freebsd-10-stable/sys/arm/conf/DB-88F6XXX
/freebsd-10-stable/sys/arm/conf/DEFAULTS
/freebsd-10-stable/sys/arm/conf/DIGI-CCWMX53
/freebsd-10-stable/sys/arm/conf/DOCKSTAR
/freebsd-10-stable/sys/arm/conf/DREAMPLUG-1001
/freebsd-10-stable/sys/arm/conf/EA3250
/freebsd-10-stable/sys/arm/conf/EB9200
/freebsd-10-stable/sys/arm/conf/EFIKA_MX
/freebsd-10-stable/sys/arm/conf/EP80219
/freebsd-10-stable/sys/arm/conf/ETHERNUT5
/freebsd-10-stable/sys/arm/conf/GUMSTIX
/freebsd-10-stable/sys/arm/conf/HL200
/freebsd-10-stable/sys/arm/conf/HL201
/freebsd-10-stable/sys/arm/conf/IMX53-QSB
/freebsd-10-stable/sys/arm/conf/IMX6
/freebsd-10-stable/sys/arm/conf/IQ31244
/freebsd-10-stable/sys/arm/conf/KB920X
/freebsd-10-stable/sys/arm/conf/LN2410SBC
/freebsd-10-stable/sys/arm/conf/NSLU
/freebsd-10-stable/sys/arm/conf/PANDABOARD
/freebsd-10-stable/sys/arm/conf/QILA9G20
/freebsd-10-stable/sys/arm/conf/RADXA
/freebsd-10-stable/sys/arm/conf/RPI-B
/freebsd-10-stable/sys/arm/conf/SAM9260EK
/freebsd-10-stable/sys/arm/conf/SAM9G20EK
/freebsd-10-stable/sys/arm/conf/SAM9X25EK
/freebsd-10-stable/sys/arm/conf/SHEEVAPLUG
/freebsd-10-stable/sys/arm/conf/SIMICS
/freebsd-10-stable/sys/arm/conf/SN9G45
/freebsd-10-stable/sys/arm/conf/TS7800
/freebsd-10-stable/sys/arm/conf/VERSATILEPB
/freebsd-10-stable/sys/arm/conf/VYBRID.common
/freebsd-10-stable/sys/arm/conf/ZEDBOARD
/freebsd-10-stable/sys/arm/freescale/imx/common.c
/freebsd-10-stable/sys/arm/freescale/imx/files.imx51
/freebsd-10-stable/sys/arm/freescale/imx/files.imx53
/freebsd-10-stable/sys/arm/freescale/imx/files.imx6
/freebsd-10-stable/sys/arm/freescale/imx/imx_common.c
/freebsd-10-stable/sys/arm/include/param.h
/freebsd-10-stable/sys/arm/include/pcb.h
/freebsd-10-stable/sys/arm/include/pcpu.h
/freebsd-10-stable/sys/arm/include/vfp.h
/freebsd-10-stable/sys/arm/mv/common.c
/freebsd-10-stable/sys/arm/mv/files.mv
/freebsd-10-stable/sys/arm/mv/mv_common.c
/freebsd-10-stable/sys/arm/mv/mvreg.h
/freebsd-10-stable/sys/arm/rockchip/common.c
/freebsd-10-stable/sys/arm/rockchip/files.rk30xx
/freebsd-10-stable/sys/arm/rockchip/rk30xx_common.c
/freebsd-10-stable/sys/arm/samsung/exynos/common.c
/freebsd-10-stable/sys/arm/samsung/exynos/exynos5_common.c
/freebsd-10-stable/sys/arm/samsung/exynos/files.exynos5
/freebsd-10-stable/sys/arm/tegra/common.c
/freebsd-10-stable/sys/arm/tegra/files.tegra2
/freebsd-10-stable/sys/arm/tegra/tegra2_common.c
/freebsd-10-stable/sys/arm/ti/common.c
/freebsd-10-stable/sys/arm/ti/files.ti
/freebsd-10-stable/sys/arm/ti/ti_common.c
/freebsd-10-stable/sys/arm/versatile/common.c
/freebsd-10-stable/sys/arm/versatile/files.versatile
/freebsd-10-stable/sys/arm/versatile/versatile_common.c
fdt/dts/arm/hl201.dts
/freebsd-10-stable/sys/dev/ffec/if_ffec.c
/freebsd-10-stable/sys/dev/uart/uart_bus_fdt.c
266274 16-May-2014 ian

MFC 262695, 262708, 262709, 262710, 262711, 262728, 262870, 262877, 262880,
262885, 262891, 262903,

imx6: Add a tunable to set the number of active cores, enable SMP by default.

ffec: Fix multicast filtering.

Allwinner a10/a20...
- Add gpio and clock bits for A10/A20's EMAC ethernet controller driver
- EMAC gpio configuration
- EMAC clock activation
- Add Static Random Access Memory controller driver for A10/A20.
A10/A20's SRAM is used by devices, such as CPU, EMAC,
for extra fast memory or as cache.
- Add EMAC 10/100 Ethernet controller driver for A10/A20.
It is available mostly in A10 devices like Hackberry, Marsboard,
Mele A1000, A2000, A100 HTPC, cubieboard1 and A20 device
like cubieboard2.
TX performance can be improved using both channels 0 and 1.
RX performance is poor and needs improvement with the assistance of
external DMA controller in case there
- Add EMAC and SRAM controller entries to FDT.
- Add EMAC device to kernel config files and enable EMAC, SRAM drivers.

OMAP: When calculating the MPU freq, make sure not to overflow.

Vybrid:
- Add driver for Port control and interrupts (PORT).
- Export panel info to DTS
- Reset all the layers before setup first one
- Enable display

nandfs: Slight code reordering to make error branch last.

Add option TMPFS to arm/conf/DEFAULTS, remove it from the few configs
that have it individually. Concensus on freebsd-arm@ is that it should
be included in all ARM kernels.

Fix the arm sys_sigreturn(): its argument is a struct ucontext, not a
struct sigframe containing the struct ucontext.


/freebsd-10-stable/sbin/newfs_nandfs/newfs_nandfs.c
/freebsd-10-stable/sys/arm/allwinner/a10_clk.c
/freebsd-10-stable/sys/arm/allwinner/a10_clk.h
/freebsd-10-stable/sys/arm/allwinner/a10_gpio.c
/freebsd-10-stable/sys/arm/allwinner/a10_gpio.h
/freebsd-10-stable/sys/arm/allwinner/a10_sramc.c
/freebsd-10-stable/sys/arm/allwinner/a10_sramc.h
/freebsd-10-stable/sys/arm/allwinner/a20/files.a20
/freebsd-10-stable/sys/arm/allwinner/files.a10
/freebsd-10-stable/sys/arm/allwinner/if_emac.c
/freebsd-10-stable/sys/arm/allwinner/if_emacreg.h
/freebsd-10-stable/sys/arm/arm/genassym.c
/freebsd-10-stable/sys/arm/arm/locore.S
/freebsd-10-stable/sys/arm/arm/machdep.c
/freebsd-10-stable/sys/arm/conf/ARNDALE
/freebsd-10-stable/sys/arm/conf/BEAGLEBONE
/freebsd-10-stable/sys/arm/conf/CUBIEBOARD
/freebsd-10-stable/sys/arm/conf/CUBIEBOARD2
/freebsd-10-stable/sys/arm/conf/DEFAULTS
/freebsd-10-stable/sys/arm/conf/DIGI-CCWMX53
/freebsd-10-stable/sys/arm/conf/DOCKSTAR
/freebsd-10-stable/sys/arm/conf/DREAMPLUG-1001
/freebsd-10-stable/sys/arm/conf/EFIKA_MX
/freebsd-10-stable/sys/arm/conf/IMX53-QSB
/freebsd-10-stable/sys/arm/conf/IMX6
/freebsd-10-stable/sys/arm/conf/VYBRID.common
/freebsd-10-stable/sys/arm/conf/WANDBOARD.common
/freebsd-10-stable/sys/arm/freescale/imx/imx6_mp.c
/freebsd-10-stable/sys/arm/freescale/vybrid/files.vybrid
/freebsd-10-stable/sys/arm/freescale/vybrid/vf_dcu4.c
/freebsd-10-stable/sys/arm/freescale/vybrid/vf_gpio.c
/freebsd-10-stable/sys/arm/freescale/vybrid/vf_port.c
/freebsd-10-stable/sys/arm/freescale/vybrid/vf_port.h
/freebsd-10-stable/sys/arm/ti/omap4/omap4_prcm_clks.c
fdt/dts/arm/cubieboard.dts
fdt/dts/arm/cubieboard2.dts
fdt/dts/arm/vybrid-quartz.dts
fdt/dts/arm/vybrid.dtsi
/freebsd-10-stable/sys/dev/ffec/if_ffec.c
266251 16-May-2014 ian

MFC 262614, 262625, 262626, 262627, 262682, 262714, 262725, 262736

Integrate device-tree upstream files into the build process:
(1) Invoke cpp to bring in files via #include (although the old
/include/ stuff is supported still).
(2) bring in files from either vendor tree or freebsd-custom files
when building.
(3) move all dts* files from sys/boot/fdt/dts to
sys/boot/fdt/dts/${MACHINE} as appropriate.
(4) encode all the magic to do the build in sys/tools/fdt/make_dtb.sh
so that the different places in the tree use the exact same logic.
(5) switch back to gpl dtc by default. the bsdl one in the tree has
significant issues not easily addressed by those unfamiliar with
the code.

Only try to build the static dtb when we're building a static dtb.

Use proper include path for dtc as well as cpp.

Fix syntax errors (missing ; other minor glitches) in existing dts files.


/freebsd-10-stable/Makefile.inc1
/freebsd-10-stable/share/mk/bsd.own.mk
fdt/dts/am335x-evm.dts
fdt/dts/am335x.dtsi
fdt/dts/arm
fdt/dts/arm/beaglebone-black.dts
fdt/dts/arm/beaglebone.dts
fdt/dts/arm/imx53-qsb.dts
fdt/dts/arm/imx53x.dtsi
fdt/dts/arm/imx6.dtsi
fdt/dts/arm/rk3188.dtsi
fdt/dts/arm/rpi.dts
fdt/dts/bcm2835.dtsi
fdt/dts/beaglebone-black.dts
fdt/dts/beaglebone.dts
fdt/dts/beri-netfpga.dts
fdt/dts/beri-sim.dts
fdt/dts/beripad-de4.dts
fdt/dts/cubieboard.dts
fdt/dts/cubieboard2.dts
fdt/dts/db78100.dts
fdt/dts/db78460.dts
fdt/dts/db88f5182.dts
fdt/dts/db88f5281.dts
fdt/dts/db88f6281.dts
fdt/dts/digi-ccwmx53.dts
fdt/dts/dockstar.dts
fdt/dts/dreamplug-1001.dts
fdt/dts/dreamplug-1001N.dts
fdt/dts/ea3250.dts
fdt/dts/efikamx.dts
fdt/dts/exynos5250-arndale.dts
fdt/dts/exynos5250.dtsi
fdt/dts/imx51x.dtsi
fdt/dts/imx53-qsb.dts
fdt/dts/imx53x.dtsi
fdt/dts/imx6.dtsi
fdt/dts/mips
fdt/dts/mips/beri-netfpga.dts
fdt/dts/mips/beri-sim.dts
fdt/dts/mips/beripad-de4.dts
fdt/dts/mpc8555cds.dts
fdt/dts/mpc8572ds.dts
fdt/dts/p1020rdb.dts
fdt/dts/p2020ds.dts
fdt/dts/p2041rdb.dts
fdt/dts/p2041si.dtsi
fdt/dts/p3041ds.dts
fdt/dts/p3041si.dtsi
fdt/dts/p5020ds.dts
fdt/dts/p5020si.dtsi
fdt/dts/pandaboard.dts
fdt/dts/powerpc
fdt/dts/rk3188-radxa.dts
fdt/dts/rk3188.dtsi
fdt/dts/rpi.dts
fdt/dts/sheevaplug.dts
fdt/dts/tegra20-paz00.dts
fdt/dts/tegra20.dtsi
fdt/dts/trimslice.dts
fdt/dts/ts7800.dts
fdt/dts/versatilepb.dts
fdt/dts/vybrid-colibri-vf50.dts
fdt/dts/vybrid-cosmic.dts
fdt/dts/vybrid-quartz.dts
fdt/dts/vybrid.dtsi
fdt/dts/wandboard-dual.dts
fdt/dts/wandboard-quad.dts
fdt/dts/wandboard-solo.dts
fdt/dts/xlp-basic.dts
fdt/dts/zedboard.dts
/freebsd-10-stable/sys/conf/files
/freebsd-10-stable/sys/tools/fdt/make_dtb.sh
266240 16-May-2014 ian

MFC 252439: Fix the led 'gpios' definition to match the documented binding

266239 16-May-2014 ian

MFC 258547, 259122

Add clock frequency for rk3188 watchdog.
Replace "clocks" to "clock-frequency".
Add gpio config for usb1 in dts.

266203 16-May-2014 ian

MFC r262409, r262411, r262413, r262420, r262426, r262427, r262440, r262456,
r262482, r262483, r262531,

Move the declaration for mpentry() into a header file instead of pasting
it into a bunch of different .c files.

If the L2 cache type is PIPT, pass a physical address for a flush.

Actually set the proper bit to indicate TTB shared memory.

Add a new cache maintenance function, idcache_inv_all, to the table, and
implementations for each of the chips we support.

Invalidate caches immediately upon entry to init_secondary(). Also set
the Bufferable bit in the PDE entries of the secondary processor startup
pagetables.

Add the bits needed to run SMP on imx6.

Invalidate the SCU cache tag ram on all 4 cores, not just 1-3.

Minor tweaks to the imx GPT timer

Vybrid enhancements...
- Pin configuration is a complete iomux register now and includes
drive strength, pull mode, mux mode, speed, etc.
- Add i2c devices to the tree
- Add IPG clock
- Add support for Quartz Module.
- Pin configuration is a complete iomux register now and includes
drive strength, pull mode, mux mode, speed, etc.
- Add i2c devices to the tree
- Add IPG clock

266201 15-May-2014 ian

MFC r261982, r261987, r262123, r262244, r262278, r262280, r262353, r262354,
r262355, r262419,

Add Vybrid driver for Synchronous Audio Interface (SAI).

Decrease SAI buffer size. Handle eDMA interrupt on running channel only.

Give the physmem fdt helper routines static linkage since no global
definition of them is provided anywhere.

Add imx6 early printf support, wrapped in #if 0 because it's rarely needed.

Add basic cpu frequency control and temperature monitoring to imx6_anatop.

Add the FREEBSD_BOOT_LOADER option so that a loaded DTB passed in from
ubldr will actually get used.

Create a generic IMX6 kernel config, then fix it to have an ident line.

Don't force imx6 bootverbose on anymore, it can be set from ubldr now.

266200 15-May-2014 ian

MFC r261938, r261939, r261940, r261944, r261945, r261946, r261947, r261956, r261957, r261983, r261094,
r261955, r261958,

Add a driver to provide access to imx6 on-chip one-time-programmble data.

Make it possible to access the ocotp registers before the ocotp device
is attached, by establishing a temporary mapping of the registers when
necessary.

It turns out Freescale cleverly made the ocotp device compatible across
several different families of SoCs, so move it to the freescale directory
and prefix everything with fsl rather than imx6.

Convert the imx6 sdhci "R1B fix" from a busy-loop in the interrupt handler
to a callout.

Increase the wait time for acquiring the SD bus from 10 to 250ms.

If no compatible cards were found after probing the SD bus, say so.

Add timeout logic to sdhci, separate from the timeouts done by the hardware.

After a timeout, reset the controller using SDHCI_RESET_CMD|SDHCI_RESET_DATA
rather than SDHCI_RESET_ALL; the latter turns off clocks and power, removing
any possibility of recovering from the error.

Add a helper routine to depth-search the device tree for a node with a
matching 'compatible' property.

266198 15-May-2014 ian

MFC r261803, r261808, r261814, r261815, r261816, r261817, r261818, r261826,
r261848, r261855

On armv6 and later, use the WriteNotRead bit of the fault status register
to decide what protections are required by the faulting access.

Use the right symbols for determining arm architecture. Include the
necessary header file which has the new FAULT_WNR symbol defined in it.

Allow the kernel to be loaded at any 1MiB address. This requirement is
because we use the 1MiB section maps as they only need a single pagetable.

Add function for configuring Vybrid PLL4 (Audio) clock frequency output.

imx6 changes ...

- Fix the definition of the SDHCI_STATE_DAT and SDHCI_STATE_CMD fields,
and add SDHCI_RETUNE_REQUEST. None of these are actually used in the
code yet.

- Write translation code for the SDHCI_PRESENT_STATE register.
Freescale moved some bits around in their version of the register,
adjust things so that the sdhci code sees the standard layout.

- Add standard non-removable and cd-gpios properties to the usdhc
devices. That generates references to gpio devices, so uncomment them
even though there isn't a gpio driver to do anything with them yet.

- Add handling of standard "non-removable" property, and also some
workaround code so that if card detect is wired to a gpio pin, for now
we just treat it the same as non-removable (because there isn't a gpio
driver yet).

- Enable both sdcard slots, but not the sdio-based wifi that we don't
yet have a driver for.

- Remove a couple obsolete function declarations.

266170 15-May-2014 ian

MFC r261616, r261639

Remove FreeBSD 6 support from atmel usb controllers.

Add Vybrid drivers for:
- Enhanced Direct Memory Access Controller (eDMA)
- Direct Memory Access Multiplexer (DMAMUX)

266155 15-May-2014 ian

MFC r261411, r261413, r261416:

Add support for Colibri VF50 Evaluation Board.

Add driver for Display Control Unit (DCU4).

Add prototype for tcon_bypass() used by dcu4.
Add register definition.

266146 15-May-2014 ian

MFC r261406, r261409: enhance Vybrid support...

o Expand device tree information
o Export iomuxc (pins) configuration to DTS
o Allow devices to assign clocks in DTS
o Split kernel configuration to chip common and board specific parts.

266105 15-May-2014 loos

MFC r258046, r258047, r258050, r259035, r259036, r259037, r261842, r261843,
r261844, r261845, r261846, r262194, r262522, r262559

r258046:
Fix a typo on a comment in ofw_bus_if.m, the default method will return -1
when a node doesn't exist.

r258047:
Move the KASSERT() check to the point before the increase of number of pins.

r258050:
Fix gpiobus to return BUS_PROBE_GENERIC insted of BUS_PROBE_SPECIFIC (0) so
it can be overriden by its OFW/FDT version.

Give a chance for GPIO devices that implement the device_identify method to
attach.

r259035:
Remove unnecessary includes and an unused softc variable. While here apply
two minor style(9) fixes.

r259036:
Move the GPIOBUS_SET_PINFLAGS(..., ..., pin, GPIO_PIN_OUTPUT) to led(4)
control callback function. This makes gpioled(4) works even if the pin
is accidentally set to an input.

r259037:
Fix the pin value reading on AM335x. Because of the inverted logic it was
always returning '0' for all the reads, even for the outputs. It is now
known to work with gpioiic(4) and gpioled(4).

r261842:
Add an OFW GPIO compatible bus. This allows the use of the DTS files to
describe GPIO bindings in the system.

Move the GPIOBUS lock macros to gpiobusvar.h as they are now shared between
the OFW and the non OFW versions of GPIO bus.

Export gpiobus_print_pins() so it can also be used on the OFW GPIO bus.

r261843:
Add OFW support to the in tree gpio compatible devices: gpioiic(4) and
gpioled(4).

Tested on RPi and BBB (using the hardware I2C controller and gpioiic(4) for
the I2C tests). It was also verified for regressions on RSPRO (MIPS/ar71xx)
used as reference for a non OFW-based system.

Update the gpioled(4) and gpioiic(4) man pages with some details and
examples about the FDT/OFW support.

Some compatibility details pointed out by imp@ will follow in subsequent
commits.

r261844:
Allow the use of OFW I2C bus together with iicbb(4) on OFW-based systems.

This change makes ofw_iicbus attach to iicbb(4) controllers in addition to
the already supported i2c host bridges (iichb).

On iicbb(4) allow the direct access of the OFW parent node by its children,
so they can be directly attached to iicbb(4) node on the DTS without the
need of describing the i2c bus.

r261845:
Allow the use of the OFW GPIO bus for ti_gpio and bcm2835_gpio. With this
change the gpio children can be described as directly connected to the GPIO
controller without the need of describing the OFW GPIO bus itself on the
DTS file.

With this commit the OFW GPIO bus is fully functional on BBB and RPi.

GPIO controllers which want to use the OFW GPIO bus will need similar
changes.

r261846:
Make the gpioled(4) work out of the box on BBB.

Add gpioled(4) to BEAGLEBONE kernel and add the description of the four
on-board leds of beaglebone-black to its DTS file.

r262194:
Remove an unnecessary header.

r262522:
Fix make depend for iicbus.

r262559:
Inspired by r262522, fix make depend. This fixes the build of gpio modules.

266086 14-May-2014 ian

MFC r260440, r260441, r260447, r260490, r260493

Add option USB_HOST_ALIGN to configs that contain 'device usb'.

Update dts files of Cubieboard1,2 to use 1GB memory.

Add a function to print the contents of the static device mapping table,


/freebsd-10-stable/sys/arm/arm/devmap.c
/freebsd-10-stable/sys/arm/arm/machdep.c
/freebsd-10-stable/sys/arm/conf/AC100
/freebsd-10-stable/sys/arm/conf/ARMADAXP
/freebsd-10-stable/sys/arm/conf/ARNDALE
/freebsd-10-stable/sys/arm/conf/ATMEL
/freebsd-10-stable/sys/arm/conf/AVILA
/freebsd-10-stable/sys/arm/conf/BWCT
/freebsd-10-stable/sys/arm/conf/CAMBRIA
/freebsd-10-stable/sys/arm/conf/CNS11XXNAS
/freebsd-10-stable/sys/arm/conf/COSMIC
/freebsd-10-stable/sys/arm/conf/CUBIEBOARD
/freebsd-10-stable/sys/arm/conf/CUBIEBOARD2
/freebsd-10-stable/sys/arm/conf/DB-78XXX
/freebsd-10-stable/sys/arm/conf/DB-88F5XXX
/freebsd-10-stable/sys/arm/conf/DB-88F6XXX
/freebsd-10-stable/sys/arm/conf/DIGI-CCWMX53
/freebsd-10-stable/sys/arm/conf/EA3250
/freebsd-10-stable/sys/arm/conf/EB9200
/freebsd-10-stable/sys/arm/conf/EFIKA_MX
/freebsd-10-stable/sys/arm/conf/ETHERNUT5
/freebsd-10-stable/sys/arm/conf/HL200
/freebsd-10-stable/sys/arm/conf/HL201
/freebsd-10-stable/sys/arm/conf/IMX53-QSB
/freebsd-10-stable/sys/arm/conf/KB920X
/freebsd-10-stable/sys/arm/conf/LN2410SBC
/freebsd-10-stable/sys/arm/conf/NSLU
/freebsd-10-stable/sys/arm/conf/PANDABOARD
/freebsd-10-stable/sys/arm/conf/QILA9G20
/freebsd-10-stable/sys/arm/conf/RADXA
/freebsd-10-stable/sys/arm/conf/RPI-B
/freebsd-10-stable/sys/arm/conf/SAM9260EK
/freebsd-10-stable/sys/arm/conf/SAM9G20EK
/freebsd-10-stable/sys/arm/conf/SAM9X25EK
/freebsd-10-stable/sys/arm/conf/SHEEVAPLUG
/freebsd-10-stable/sys/arm/conf/SN9G45
/freebsd-10-stable/sys/arm/conf/TS7800
/freebsd-10-stable/sys/arm/conf/ZEDBOARD
/freebsd-10-stable/sys/arm/include/devmap.h
fdt/dts/cubieboard.dts
fdt/dts/cubieboard2.dts
266085 14-May-2014 ian

MFC r256839, r256948, r256950, r257299, r257414, r258057, r259090

Add configuration for the Freescale i.MX53 Quick Start Board.

Add the Raspberry Pi BSC (I2C compliant) controller driver.

Add Radxa Rock board (by radxa.com) support.

Digi-CCWMX53: enable ffec and uart, USB.

Add support for Freescale Vybrid Family VF600

Move and rename dwc otg driver to more generic one as it appears to work
for rk3188 SoC based board too.

266084 14-May-2014 ian

MFC r257738, r259202, r258410, r260288, r260292, r260294, r260320, r260323,
r260326, r260327, r260331, r260333, r260340, r260371, r260372, r260373,
r260374, r260375

Add common bus_space tag definition shared for most supported ARMv6/v7 SoCs.
Correct license statements to reflect the fact that these files were all
derived from sys/arm/mv/bus_space.c.

In pmap_unmapdev(), remember the size, and use that as an argument to
kva_free(), or we'd end up always passing it a size of 0

In pmap_mapdev(), first check whether a static mapping exists,

Convert TI static device mapping to use the new arm_devmap_add_entry(),

Use the common armv6 fdt_bus_tag defintion for tegra instead of a local copy.

Eliminate use of fdt_immr_addr(), it's not needed for tegra

Convert lpc from using fdt_immr style to arm_devmap_add_entry() to make
static device mappings.

Retire machine/fdt.h as a header used by MI code, as its function is now
obsolete. This involves the following pieces:
- Remove it entirely on PowerPC, where it is not used by MD code either
- Remove all references to machine/fdt.h in non-architecture-specific code
(aside from uart_cpu_fdt.c, shared by ARM and MIPS, and so is somewhat
non-arch-specific).
- Fix code relying on header pollution from machine/fdt.h includes
- Legacy fdtbus.c (still used on x86 FDT systems) now passes resource
requests to its parent (nexus). This allows x86 FDT devices to allocate
both memory and IO requests and removes the last notionally MI use of
fdtbus_bs_tag.
- On those architectures that retain a machine/fdt.h, unused bits like
FDT_MAP_IRQ and FDT_INTR_MAX have been removed.

Add #include <machine/fdt.h> to a few files that used to get it via pollution

Enable the mv cesa security/crypto device by providing the required property
in the dts source, and adding the right devices to the kernel config.

Remove dev/fdt/fdt_pci.c, which was code specific to Marvell ARM SoCs,
related to setting up static device mappings. Since it was only used by
arm/mv/mv_pci.c, it's now just static functions within that file, plus
one public function that gets called only from arm/mv/mv_machdep.c.

Switch RPi to using arm_devmap_add_entry() to set up static device mapping.

Allow 'no static device mappings' to potentially work.

Don't try to find a static mapping before calling pmap_mapdev(), that logic
is now part of pmap_mapdev() and doesn't need to be duplicated here.

Switch a10 to using arm_devmap_add_entry() to set up static device mapping.


/freebsd-10-stable/sys/arm/allwinner/a10_machdep.c
/freebsd-10-stable/sys/arm/arm/bus_space-v6.c
/freebsd-10-stable/sys/arm/arm/bus_space_generic.c
/freebsd-10-stable/sys/arm/arm/devmap.c
/freebsd-10-stable/sys/arm/arm/machdep.c
/freebsd-10-stable/sys/arm/arm/trap.c
/freebsd-10-stable/sys/arm/broadcom/bcm2835/bcm2835_fbd.c
/freebsd-10-stable/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
/freebsd-10-stable/sys/arm/conf/DOCKSTAR
/freebsd-10-stable/sys/arm/freescale/imx/imx51_ipuv3.c
/freebsd-10-stable/sys/arm/include/fdt.h
/freebsd-10-stable/sys/arm/include/intr.h
/freebsd-10-stable/sys/arm/include/ofw_machdep.h
/freebsd-10-stable/sys/arm/include/psl.h
/freebsd-10-stable/sys/arm/lpc/lpc_gpio.c
/freebsd-10-stable/sys/arm/lpc/lpc_machdep.c
/freebsd-10-stable/sys/arm/lpc/lpc_mmc.c
/freebsd-10-stable/sys/arm/lpc/lpcreg.h
/freebsd-10-stable/sys/arm/mv/mv_machdep.c
/freebsd-10-stable/sys/arm/mv/mv_pci.c
/freebsd-10-stable/sys/arm/mv/mvvar.h
/freebsd-10-stable/sys/arm/tegra/bus_space.c
/freebsd-10-stable/sys/arm/tegra/files.tegra2
/freebsd-10-stable/sys/arm/tegra/tegra2_machdep.c
/freebsd-10-stable/sys/arm/ti/ti_machdep.c
/freebsd-10-stable/sys/arm/versatile/bus_space.c
/freebsd-10-stable/sys/arm/xilinx/zy7_bus_space.c
fdt/dts/dockstar.dts
/freebsd-10-stable/sys/conf/files
/freebsd-10-stable/sys/dev/fdt/fdt_common.c
/freebsd-10-stable/sys/dev/fdt/fdt_common.h
/freebsd-10-stable/sys/dev/fdt/fdt_pci.c
/freebsd-10-stable/sys/dev/fdt/fdtbus.c
/freebsd-10-stable/sys/dev/fdt/simplebus.c
/freebsd-10-stable/sys/dev/uart/uart_bus_fdt.c
/freebsd-10-stable/sys/dev/uart/uart_dev_lpc.c
/freebsd-10-stable/sys/mips/include/fdt.h
/freebsd-10-stable/sys/powerpc/include/fdt.h
/freebsd-10-stable/sys/x86/include/fdt.h
/freebsd-10-stable/sys/x86/include/ofw_machdep.h
266046 14-May-2014 ian

MFC r257170, r257171, r257172, r257240, r257278, r257279, r257280, r257281,
r257282, r257332

Wait for DesignWare UART transfers completion before accessing line control

Enable UART busy detection handling for Armada XP - based board

Enable SATA interface on Armada XP
Run mvs SATA driver on Armada XP instead of old mv_sata

Retire arm_remap_nocache() and the data and constants associated with it.

Remove hard-coded mappings related to Armada XP support

Fix-up DTB for Armada XP registers' base according to the actual settings

Change Armada XP kernel load address to the u-boot's end address

Remove not working and deprecated PJ4Bv6 support

Switch off explicit broadcasting of the TLB flush operations for PJ4B CPU

Add missing ARMv6 CPU functions to ARM Makefile

265998 14-May-2014 ian

MFC r257180, r257195, r257196, r257198, r257209, r257295

Add some extra sanity checking and checks to printf format specifiers.

Try even harder to find a console before giving up.

Make devices with registers into the KVA region work reliably.

Turn on VM_KMEM_SIZE_SCALE on 32-bit as well as 64-bit PowerPC.

Return NOKEY instead of 0 if there are no more key presses queued.

265935 12-May-2014 ian

MFC r260235: fixes to dockstar DTS source.

265809 10-May-2014 rpaulo

Manually MFC 262714:
Add a missing semicolong, noticed by the gnu dt compiler.

In head, the directory layout changed and we can't svn merge correctly.

265804 10-May-2014 rpaulo

MFC r252440:

Enable the second and the third I2C controllers on Beaglebone-black.

265071 29-Apr-2014 ian

MFC r263052, r263124, r263265, r263267... Enhance loaderdev env var.

Enhance the mechanism that lets you configure the ubldr boot device by
setting the u-boot environment variable loaderdev=. It used to accept only
'disk' or 'net'. Now it allows specification of unit, slice, and partition
as well. In addition to the generic 'disk' it also accepts specific
storage device types such as 'mmc' or 'sata'.

If there isn't a loaderdev env var, the historical behavior is maintained.
It will use the first storage device it finds, or a network device if
no working storage device exists.

99% of the work on this was done by Patrick Kelsey, but I made some
changes, so if anything goes wrong, blame me.

(Indeed, the 3 followup commits fixed things I got wrong on the first.)

265070 29-Apr-2014 ian

MFC r262666: exit with code 0xbadab1 if the u-boot API support is missing.

265069 29-Apr-2014 ian

MFC r262664, r262694:

Prevent fdt data loaded from a file from overwriting the kernel environment,
by having uboot_autoload() do the fdt setup (which may load a file) rather
than waiting until we're actually in the process of launching the kernel.

As part of making this happen...
- Define LOADER_FDT_SUPPORT on the uboot/lib compile command line when
MK_FDT is set.
- Make fdt_setup_fdtb() public.
- Declare public fdt_whatever() functions in a header instead of using
scattered extern decls in .c files.

265068 29-Apr-2014 ian

MFC r262340, r262345, r262347, find and load an appropriate dtb file.

The search order for a usable dtb in fdt_setup_fdtp() is now

- A dtb loaded with an explicit "load -t dtb" command.
- A dtb already loaded into memory somehow[*] and pointed to by fdt_to_load.
- A dtb in the memory pointed to by the u-boot env vars fdtaddr or fdt_addr.
- A file named by the u-boot env vars fdtfile or fdt_file.
- A static dtb compiled into the kernel.

* Presumably by some arch-specific command or code.

265067 29-Apr-2014 ian

MFC r262337: Allow the boot device to be choosen by a u-boot env variable.

If a "loaderdev=<device>" env variable is set and the named device
exists, it is used. If the device doesn't exist, fall back to the
historic "probe" loop that prefers disk devices over network devices.

265066 29-Apr-2014 ian

MFC r262326 (white space) and r262327 (fdt_addr).

This change was supposed to be whitespace only, but a functional change
snuck in, as follows:

Look for both fdtaddr and fdt_addr env var names. Grepping the u-boot
source shows that board vendors seem to be about evenly split on this.
The added lines were:

/* Board vendors use both fdtaddr and fdt_addr names. Grrrr. */

if (s == NULL)
s = ub_env_get("fdt_addr");

265065 29-Apr-2014 ian

MFC r261819 & r262242: Actually validate the header of a loaded dtb file.

265064 28-Apr-2014 ian

MFC r257210, r258527: No hardfloat in ubldr, save/restore r9 for api calls.

264816 23-Apr-2014 brueffer

MFC: r264482

Re-indent break statement.

263964 31-Mar-2014 ae

MFC r263468:
When loader(8) inspects MBR, it chooses GPT as main partition table,
when MBR contains only PMBR entry or it is bootcamp-compatible.
If MBR has PMBR entry and some other, the loader rejects it.

Make these checks to be less strict. If loader decided that PMBR
isn't suitable for GPT, it will use MBR.

Reported by: Paul Thornton

263763 26-Mar-2014 dim

MFC r262613:

Merge the projects/clang-sparc64 branch back to head. This brings in
several updates from the llvm and clang trunks to make the sparc64
backend fully functional.

Apart from one patch to sys/sparc64/include/pcpu.h which is still under
discussion, this makes it possible to let clang fully build world and
kernel for sparc64.

Any assistance with testing this on actual sparc64 hardware is greatly
appreciated, as there will unavoidably be bugs left.

Many thanks go to Roman Divacky for his upstream work on getting the
sparc64 backend into shape.

MFC r262985:

Repair a few minor mismerges from r262261 in the clang-sparc64 project
branch. This is also to minimize differences with upstream.


/freebsd-10-stable/contrib/compiler-rt/lib/absvti2.c
/freebsd-10-stable/contrib/compiler-rt/lib/addvti3.c
/freebsd-10-stable/contrib/compiler-rt/lib/ashlti3.c
/freebsd-10-stable/contrib/compiler-rt/lib/ashrti3.c
/freebsd-10-stable/contrib/compiler-rt/lib/clzti2.c
/freebsd-10-stable/contrib/compiler-rt/lib/cmpti2.c
/freebsd-10-stable/contrib/compiler-rt/lib/ctzti2.c
/freebsd-10-stable/contrib/compiler-rt/lib/divti3.c
/freebsd-10-stable/contrib/compiler-rt/lib/ffsti2.c
/freebsd-10-stable/contrib/compiler-rt/lib/fixdfti.c
/freebsd-10-stable/contrib/compiler-rt/lib/fixsfti.c
/freebsd-10-stable/contrib/compiler-rt/lib/fixunsdfti.c
/freebsd-10-stable/contrib/compiler-rt/lib/fixunssfti.c
/freebsd-10-stable/contrib/compiler-rt/lib/fixunsxfti.c
/freebsd-10-stable/contrib/compiler-rt/lib/fixxfti.c
/freebsd-10-stable/contrib/compiler-rt/lib/floattidf.c
/freebsd-10-stable/contrib/compiler-rt/lib/floattisf.c
/freebsd-10-stable/contrib/compiler-rt/lib/floattixf.c
/freebsd-10-stable/contrib/compiler-rt/lib/floatuntidf.c
/freebsd-10-stable/contrib/compiler-rt/lib/floatuntisf.c
/freebsd-10-stable/contrib/compiler-rt/lib/floatuntixf.c
/freebsd-10-stable/contrib/compiler-rt/lib/int_types.h
/freebsd-10-stable/contrib/compiler-rt/lib/lshrti3.c
/freebsd-10-stable/contrib/compiler-rt/lib/modti3.c
/freebsd-10-stable/contrib/compiler-rt/lib/muloti4.c
/freebsd-10-stable/contrib/compiler-rt/lib/multi3.c
/freebsd-10-stable/contrib/compiler-rt/lib/mulvti3.c
/freebsd-10-stable/contrib/compiler-rt/lib/negti2.c
/freebsd-10-stable/contrib/compiler-rt/lib/negvti2.c
/freebsd-10-stable/contrib/compiler-rt/lib/parityti2.c
/freebsd-10-stable/contrib/compiler-rt/lib/popcountti2.c
/freebsd-10-stable/contrib/compiler-rt/lib/subvti3.c
/freebsd-10-stable/contrib/compiler-rt/lib/ucmpti2.c
/freebsd-10-stable/contrib/compiler-rt/lib/udivmodti4.c
/freebsd-10-stable/contrib/compiler-rt/lib/udivti3.c
/freebsd-10-stable/contrib/compiler-rt/lib/umodti3.c
/freebsd-10-stable/contrib/gcc/longlong.h
/freebsd-10-stable/contrib/llvm/include/llvm/MC/MCAsmInfo.h
/freebsd-10-stable/contrib/llvm/include/llvm/Object/ELFObjectFile.h
/freebsd-10-stable/contrib/llvm/include/llvm/Support/ELF.h
/freebsd-10-stable/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
/freebsd-10-stable/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
/freebsd-10-stable/contrib/llvm/lib/MC/MCObjectFileInfo.cpp
/freebsd-10-stable/contrib/llvm/lib/Object/ELF.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/AsmParser
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/DelaySlotFiller.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/Disassembler
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/InstPrinter
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/InstPrinter/SparcInstPrinter.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcBaseInfo.h
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcFixupKinds.h
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.h
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.h
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcTargetStreamer.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/Sparc.h
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/Sparc.td
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/SparcCallingConv.td
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/SparcCodeEmitter.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/SparcISelLowering.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/SparcISelLowering.h
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/SparcInstr64Bit.td
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/SparcInstrAliases.td
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/SparcInstrFormats.td
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.td
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/SparcJITInfo.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/SparcMCInstLower.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/SparcRelocations.h
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/SparcSubtarget.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/SparcSubtarget.h
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/SparcTargetObjectFile.cpp
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/SparcTargetObjectFile.h
/freebsd-10-stable/contrib/llvm/lib/Target/Sparc/SparcTargetStreamer.h
/freebsd-10-stable/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
/freebsd-10-stable/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp
/freebsd-10-stable/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp
/freebsd-10-stable/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
/freebsd-10-stable/lib/clang/Makefile
/freebsd-10-stable/lib/clang/clang.build.mk
/freebsd-10-stable/lib/clang/include/SparcGenAsmMatcher.inc
/freebsd-10-stable/lib/clang/include/SparcGenAsmWriter.inc
/freebsd-10-stable/lib/clang/include/SparcGenCallingConv.inc
/freebsd-10-stable/lib/clang/include/SparcGenCodeEmitter.inc
/freebsd-10-stable/lib/clang/include/SparcGenDAGISel.inc
/freebsd-10-stable/lib/clang/include/SparcGenDisassemblerTables.inc
/freebsd-10-stable/lib/clang/include/SparcGenInstrInfo.inc
/freebsd-10-stable/lib/clang/include/SparcGenMCCodeEmitter.inc
/freebsd-10-stable/lib/clang/include/SparcGenRegisterInfo.inc
/freebsd-10-stable/lib/clang/include/SparcGenSubtargetInfo.inc
/freebsd-10-stable/lib/clang/include/llvm/Config/AsmParsers.def
/freebsd-10-stable/lib/clang/include/llvm/Config/AsmPrinters.def
/freebsd-10-stable/lib/clang/include/llvm/Config/Disassemblers.def
/freebsd-10-stable/lib/clang/include/llvm/Config/Targets.def
/freebsd-10-stable/lib/clang/libllvmsparcasmparser
/freebsd-10-stable/lib/clang/libllvmsparccodegen
/freebsd-10-stable/lib/clang/libllvmsparcdesc
/freebsd-10-stable/lib/clang/libllvmsparcdisassembler
/freebsd-10-stable/lib/clang/libllvmsparcinfo
/freebsd-10-stable/lib/clang/libllvmsparcinstprinter
/freebsd-10-stable/lib/libc/sparc64/sys/__sparc_utrap_setup.c
/freebsd-10-stable/lib/msun/Makefile
/freebsd-10-stable/share/mk/bsd.sys.mk
sparc64/boot1/Makefile
/freebsd-10-stable/sys/conf/kern.mk
/freebsd-10-stable/sys/dev/esp/esp_sbus.c
/freebsd-10-stable/sys/dev/fb/creator.c
/freebsd-10-stable/sys/dev/fb/machfb.c
/freebsd-10-stable/sys/dev/mk48txx/mk48txx.c
/freebsd-10-stable/sys/sparc64/conf/GENERIC
/freebsd-10-stable/sys/sparc64/isa/isa.c
/freebsd-10-stable/sys/sparc64/pci/firereg.h
/freebsd-10-stable/usr.bin/clang/clang/Makefile
/freebsd-10-stable/usr.bin/clang/llc/Makefile
/freebsd-10-stable/usr.bin/clang/llvm-mc/Makefile
/freebsd-10-stable/usr.bin/clang/llvm-objdump/Makefile
/freebsd-10-stable/usr.bin/clang/llvm-rtdyld/Makefile
/freebsd-10-stable/usr.bin/clang/opt/Makefile
/freebsd-10-stable/usr.sbin/eeprom/ofw_options.c
263397 19-Mar-2014 delphij

MFC r260150: MFV r259170:

4370 avoid transmitting holes during zfs send

4371 DMU code clean up

illumos/illumos-gate@43466aae47bfcd2ad9bf501faec8e75c08095e4f

NOTE: Make sure the boot code is updated if a zpool upgrade is
done on boot zpool.


/freebsd-10-stable/cddl/contrib/opensolaris/cmd/zdb/zdb.c
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/zdb/zdb_il.c
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/zhack/zhack.c
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7
/freebsd-10-stable/lib/libprocstat/zfs/Makefile
zfs/zfsimpl.c
/freebsd-10-stable/sys/cddl/boot/zfs/zfsimpl.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfeature.h
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
/freebsd-10-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
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

262192 18-Feb-2014 jhb

MFC 261517,261520:
Convert the license on files where I am the sole copyright holder to
2 clause BSD licenses.

261720 10-Feb-2014 wblock

MFC r261522:

Describe the use of a freebsd-boot GPT partition, brought up by Scot
Hetzel <swhetzel@gmail.com> on the -doc mailing list.

Also modify the Author section to be clear that I wrote the man page,
not gptboot.

261573 07-Feb-2014 mav

MFC r260949:
Make comconsole options set before its activation to be remembered.

261455 04-Feb-2014 eadler

MFC r258779,r258780,r258787,r258822:

Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this
shifts into the sign bit. Instead use (1U << 31) which gets the
expected result.

Similar to the (1 << 31) case it is not defined to do (2 << 30).

This fix is not ideal as it assumes a 32 bit int, but does fix the issue
for most cases.

A similar change was made in OpenBSD.


/freebsd-10-stable/lib/libc/sparc64/fpu/fpu.c
/freebsd-10-stable/lib/libc/sparc64/fpu/fpu_sqrt.c
/freebsd-10-stable/lib/libc/xdr/xdr_rec.c
/freebsd-10-stable/sys/amd64/pci/pci_cfgreg.c
/freebsd-10-stable/sys/amd64/vmm/intel/vmcs.h
/freebsd-10-stable/sys/amd64/vmm/intel/vmx_controls.h
/freebsd-10-stable/sys/amd64/vmm/intel/vtd.c
/freebsd-10-stable/sys/arm/arm/cpufunc_asm_pj4b.S
/freebsd-10-stable/sys/arm/arm/db_trace.c
/freebsd-10-stable/sys/arm/arm/pl190.c
/freebsd-10-stable/sys/arm/at91/if_macbvar.h
/freebsd-10-stable/sys/arm/broadcom/bcm2835/bcm2835_dma.c
/freebsd-10-stable/sys/arm/econa/if_ece.c
/freebsd-10-stable/sys/arm/freescale/imx/imx6_anatopreg.h
/freebsd-10-stable/sys/arm/freescale/imx/imx6_usbphy.c
/freebsd-10-stable/sys/arm/freescale/imx/imx_gptreg.h
/freebsd-10-stable/sys/arm/include/armreg.h
/freebsd-10-stable/sys/arm/lpc/if_lpereg.h
/freebsd-10-stable/sys/arm/lpc/lpcreg.h
/freebsd-10-stable/sys/arm/mv/mv_pci.c
/freebsd-10-stable/sys/arm/samsung/exynos/ehci_exynos5.c
/freebsd-10-stable/sys/arm/xscale/i8134x/i81342reg.h
/freebsd-10-stable/sys/arm/xscale/ixp425/ixp425reg.h
arm/at91/libat91/mci_device.h
i386/libfirewire/fwohci.h
i386/libfirewire/fwohcireg.h
/freebsd-10-stable/sys/dev/aac/aacvar.h
/freebsd-10-stable/sys/dev/acpica/acpi_video.c
/freebsd-10-stable/sys/dev/agp/agp_i810.c
/freebsd-10-stable/sys/dev/ahci/ahci.h
/freebsd-10-stable/sys/dev/bktr/bktr_core.c
/freebsd-10-stable/sys/dev/cesa/cesa.h
/freebsd-10-stable/sys/dev/drm/i915_reg.h
/freebsd-10-stable/sys/dev/drm/mach64_drv.h
/freebsd-10-stable/sys/dev/drm/mga_drv.h
/freebsd-10-stable/sys/dev/drm/r128_drv.h
/freebsd-10-stable/sys/dev/drm/r300_reg.h
/freebsd-10-stable/sys/dev/drm/r600_blit.c
/freebsd-10-stable/sys/dev/drm/radeon_cp.c
/freebsd-10-stable/sys/dev/drm/radeon_drv.h
/freebsd-10-stable/sys/dev/drm/via_irq.c
/freebsd-10-stable/sys/dev/drm2/i915/i915_reg.h
/freebsd-10-stable/sys/dev/drm2/radeon/evergreen_blit_kms.c
/freebsd-10-stable/sys/dev/drm2/radeon/evergreen_cs.c
/freebsd-10-stable/sys/dev/drm2/radeon/evergreend.h
/freebsd-10-stable/sys/dev/drm2/radeon/nid.h
/freebsd-10-stable/sys/dev/drm2/radeon/r200.c
/freebsd-10-stable/sys/dev/drm2/radeon/r300.c
/freebsd-10-stable/sys/dev/drm2/radeon/r300_reg.h
/freebsd-10-stable/sys/dev/drm2/radeon/r500_reg.h
/freebsd-10-stable/sys/dev/drm2/radeon/r600_blit.c
/freebsd-10-stable/sys/dev/drm2/radeon/r600_blit_kms.c
/freebsd-10-stable/sys/dev/drm2/radeon/r600_cs.c
/freebsd-10-stable/sys/dev/drm2/radeon/r600d.h
/freebsd-10-stable/sys/dev/drm2/radeon/radeon_cp.c
/freebsd-10-stable/sys/dev/drm2/radeon/radeon_drv.h
/freebsd-10-stable/sys/dev/drm2/radeon/radeon_reg.h
/freebsd-10-stable/sys/dev/drm2/radeon/rv770d.h
/freebsd-10-stable/sys/dev/drm2/radeon/sid.h
/freebsd-10-stable/sys/dev/drm2/ttm/ttm_bo.c
/freebsd-10-stable/sys/dev/e1000/e1000_82575.h
/freebsd-10-stable/sys/dev/e1000/e1000_ich8lan.c
/freebsd-10-stable/sys/dev/e1000/e1000_regs.h
/freebsd-10-stable/sys/dev/etherswitch/arswitch/arswitchreg.h
/freebsd-10-stable/sys/dev/ffec/if_ffecreg.h
/freebsd-10-stable/sys/dev/firewire/firewire.c
/freebsd-10-stable/sys/dev/firewire/fwohci.c
/freebsd-10-stable/sys/dev/firewire/fwohcireg.h
/freebsd-10-stable/sys/dev/firewire/sbp.c
/freebsd-10-stable/sys/dev/firewire/sbp.h
/freebsd-10-stable/sys/dev/firewire/sbp_targ.c
/freebsd-10-stable/sys/dev/hatm/if_hatmreg.h
/freebsd-10-stable/sys/dev/hwpmc/hwpmc_piv.h
/freebsd-10-stable/sys/dev/iwn/if_iwnreg.h
/freebsd-10-stable/sys/dev/mge/if_mgevar.h
/freebsd-10-stable/sys/dev/mpt/mpt_cam.c
/freebsd-10-stable/sys/dev/msk/if_mskreg.h
/freebsd-10-stable/sys/dev/mvs/mvs.h
/freebsd-10-stable/sys/dev/mxge/mxge_mcp.h
/freebsd-10-stable/sys/dev/qlxge/qls_dump.c
/freebsd-10-stable/sys/dev/ral/rt2560reg.h
/freebsd-10-stable/sys/dev/ral/rt2661reg.h
/freebsd-10-stable/sys/dev/ral/rt2860reg.h
/freebsd-10-stable/sys/dev/sound/pci/hda/hdaa.h
/freebsd-10-stable/sys/dev/usb/controller/ehci.h
/freebsd-10-stable/sys/dev/usb/wlan/if_rumreg.h
/freebsd-10-stable/sys/dev/usb/wlan/if_runreg.h
/freebsd-10-stable/sys/dev/usb/wlan/if_uralreg.h
/freebsd-10-stable/sys/dev/usb/wlan/if_urtwreg.h
/freebsd-10-stable/sys/dev/usb/wlan/if_zydreg.h
/freebsd-10-stable/sys/dev/wpi/if_wpireg.h
/freebsd-10-stable/sys/geom/raid/tr_raid1e.c
/freebsd-10-stable/sys/i386/pci/pci_cfgreg.c
/freebsd-10-stable/sys/mips/atheros/ar71xxreg.h
/freebsd-10-stable/sys/mips/atheros/ar934xreg.h
/freebsd-10-stable/sys/mips/atheros/if_argevar.h
/freebsd-10-stable/sys/mips/malta/gt_pci.c
/freebsd-10-stable/sys/mips/nlm/dev/net/nae.c
/freebsd-10-stable/sys/mips/nlm/xlp_machdep.c
/freebsd-10-stable/sys/mips/rmi/pic.h
/freebsd-10-stable/sys/ofed/drivers/infiniband/hw/mlx4/qp.c
/freebsd-10-stable/sys/ofed/drivers/infiniband/hw/mthca/mthca_mcg.c
/freebsd-10-stable/sys/ofed/drivers/infiniband/hw/mthca/mthca_qp.c
/freebsd-10-stable/sys/ofed/drivers/net/mlx4/mcg.c
/freebsd-10-stable/sys/powerpc/fpu/fpu_emu.c
/freebsd-10-stable/sys/powerpc/fpu/fpu_sqrt.c
/freebsd-10-stable/sys/powerpc/powermac/nvbl.c
/freebsd-10-stable/sys/sys/consio.h
/freebsd-10-stable/sys/x86/iommu/intel_reg.h
/freebsd-10-stable/usr.sbin/bluetooth/bthidd/kbd.c
261078 23-Jan-2014 loos

MFC r256959:

Add the Raspberry Pi BSC (I2C compliant) controller driver.

Reviewed by: rpaulo

MFC r256961:

Enable the build of OFW I2C bus for FDT systems.

MFC r258045:

As all the IIC controllers on system uses the same 'iichb' prefix we cannot
rely only on checking the device unit to indentify the BSC unit we are
attaching to. Make use of the device base address to identify our BSC unit.

MFC r259127:

Bring the RPi I2C driver in line with ti_i2c. Make it treat any slave
address as a 7-bit address.

Approved by: adrian (mentor)

261077 23-Jan-2014 loos

MFC r257127:

Remove all the instances of '#undef DEBUG' from kernel.

Suggested by: rpaulo
Approved by: adrian (mentor)

260497 09-Jan-2014 dim

MFC r260334:

Split the last gcc-specific flags off into CFLAGS.gcc. This also
removes the need to use -Qunused-arguments for clang throughout the
tree.

MFC r260369:

Apply band-aid for 32-bit compat libs failures after r260334: put back
-Qunused-arguments for clang for now, until I can figure out a way to
make it unneeded in all scenarios. Sorry about the breakage.

260291 04-Jan-2014 dim

MFC r260095:

For sys/boot/i386 and sys/boot/pc98, separate flags to be passed
directly to the linker (LD_FLAGS) from flags passed indirectly, via the
compiler driver (LDFLAGS).

This is because several Makefiles under sys/boot/i386 and sys/boot/pc98
use ${LD} directly to link, and the normal LDFLAGS value should not be
used in these cases.

260096 30-Dec-2013 dim

MFC r257532 (by adrian):

Fix this build for clang.

MFC r259730:

To avoid having to explicitly test COMPILER_TYPE for setting
clang-specific or gcc-specific flags, introduce the following new
variables for use in Makefiles:

CFLAGS.clang
CFLAGS.gcc
CXXFLAGS.clang
CXXFLAGS.gcc

In bsd.sys.mk, these get appended to the regular CFLAGS or CXXFLAGS for
the right compiler.

MFC r259913:

For libstand and sys/boot, split off gcc-only flags into CFLAGS.gcc.

MFC r259927:

Fix pc98 build, by also forcing COMPILER_TYPE in sys/boot/pc98/boot2's
Makefile.

Pointy hat to: dim

259899 26-Dec-2013 bz

MFC r259267:

Add an FDT DTS and MDROOT kernel configuration for BERI on NetFPGA.

At this point we only support one CPU, the PIC, and a UART console.

Sponsored by: DARPA, AFRL

259356 13-Dec-2013 ian

MFC r257518, r257519:

TI sdhci driver improvements, mostly related to fdt data...

Use the published compatible strings (our own invention, "ti,mmchs" is
still accepted as well, for now).

Don't blindly turn on 8-bit bus mode, because even though the controller
supports it, the board has to be wired appropriately as well. Use the
published property (bus-width=<n>) and honor all the valid values (1,4,8).

The eMMC device on a Beaglebone Black is wired for 8-bit, update the dts.

The mmchs controller can inherently do both 1.8v and 3.0v on the first
device and 1.8v only on other devices, unless an external transceiver is
used. Set the voltage automatically for the first device and honor
the published fdt property (ti,dualvolt) for other devices.

259355 13-Dec-2013 ian

MFC r257483, r257486, r257489:

Add the Soc- / machine-dependent parts of imx6 support.
Add dts source for imx6 SoCs and for Wandboard boards.
Add kernel config for Wandboard.

259345 13-Dec-2013 ian

MFC r257393:

Rework the imx ehci driver so that it's four separate ehci units rather
than one unit with four busses attached to it. This allows us to use
existing fdt data which describes separate devices with separate resources.
It also allows any combination of the units to be en/disabled in the
board dts files.

Adjust our dts code to match what's used by linux and u-boot now that
we're structured to do so.

259325 13-Dec-2013 ian

MFC r257062: Add the Raspberry Pi SPI controller driver.

259318 13-Dec-2013 ian

MFC r256809: Add configuration for the Freescale i.MX53 Quick Start Board.

259315 13-Dec-2013 ian

MFC r256804:

Switch to using the standard uart console driver instead of the special
driver for early boot debugging.

259073 07-Dec-2013 peter

Hoist all the mergeinfo up to the root in preparation for enforcing merges
to the root only. All MFC's were rerecorded to the root.

Going forward, if an MFC includes mergeinfo, it will need to be made to
the root and committed from the root. Merges with --ignore-ancestry
or diff | patch can go anywhere.

The mergeinfo in HEAD is in a bad state from years of neglect and manual
tampering and this was branched into 10.x. This confuses the coalescing
code and prevents it from doing its job.

Approved by: re (gjb, implicit)


/freebsd-10-stable/MAINTAINERS
/freebsd-10-stable/Makefile.inc1
/freebsd-10-stable/ObsoleteFiles.inc
/freebsd-10-stable/UPDATING
/freebsd-10-stable/bin/df
/freebsd-10-stable/bin/freebsd-version
/freebsd-10-stable/cddl
/freebsd-10-stable/cddl/contrib/opensolaris
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-10-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-10-stable/contrib/apr
/freebsd-10-stable/contrib/apr-util
/freebsd-10-stable/contrib/atf
/freebsd-10-stable/contrib/binutils
/freebsd-10-stable/contrib/bmake
/freebsd-10-stable/contrib/byacc
/freebsd-10-stable/contrib/bzip2
/freebsd-10-stable/contrib/com_err
/freebsd-10-stable/contrib/compiler-rt
/freebsd-10-stable/contrib/dialog
/freebsd-10-stable/contrib/dtc
/freebsd-10-stable/contrib/ee
/freebsd-10-stable/contrib/expat
/freebsd-10-stable/contrib/file
/freebsd-10-stable/contrib/gcc
/freebsd-10-stable/contrib/gdb
/freebsd-10-stable/contrib/gdtoa
/freebsd-10-stable/contrib/groff
/freebsd-10-stable/contrib/ipfilter
/freebsd-10-stable/contrib/ipfilter/ml_ipl.c
/freebsd-10-stable/contrib/ipfilter/mlfk_ipl.c
/freebsd-10-stable/contrib/ipfilter/mlh_rule.c
/freebsd-10-stable/contrib/ipfilter/mli_ipl.c
/freebsd-10-stable/contrib/ipfilter/mln_ipl.c
/freebsd-10-stable/contrib/ipfilter/mls_ipl.c
/freebsd-10-stable/contrib/ldns
/freebsd-10-stable/contrib/less
/freebsd-10-stable/contrib/libarchive
/freebsd-10-stable/contrib/libarchive/cpio
/freebsd-10-stable/contrib/libarchive/libarchive
/freebsd-10-stable/contrib/libarchive/libarchive_fe
/freebsd-10-stable/contrib/libarchive/tar
/freebsd-10-stable/contrib/libc++
/freebsd-10-stable/contrib/libc-vis
/freebsd-10-stable/contrib/libcxxrt
/freebsd-10-stable/contrib/libexecinfo
/freebsd-10-stable/contrib/libpcap
/freebsd-10-stable/contrib/libstdc++
/freebsd-10-stable/contrib/llvm
/freebsd-10-stable/contrib/llvm/tools/clang
/freebsd-10-stable/contrib/mtree
/freebsd-10-stable/contrib/ncurses
/freebsd-10-stable/contrib/netcat
/freebsd-10-stable/contrib/ntp
/freebsd-10-stable/contrib/nvi
/freebsd-10-stable/contrib/one-true-awk
/freebsd-10-stable/contrib/openbsm
/freebsd-10-stable/contrib/openpam
/freebsd-10-stable/contrib/openresolv
/freebsd-10-stable/contrib/pf
/freebsd-10-stable/contrib/sendmail
/freebsd-10-stable/contrib/serf
/freebsd-10-stable/contrib/smbfs
/freebsd-10-stable/contrib/subversion
/freebsd-10-stable/contrib/tcpdump
/freebsd-10-stable/contrib/tcsh
/freebsd-10-stable/contrib/tnftp
/freebsd-10-stable/contrib/top
/freebsd-10-stable/contrib/top/install-sh
/freebsd-10-stable/contrib/tzcode/stdtime
/freebsd-10-stable/contrib/tzcode/zic
/freebsd-10-stable/contrib/tzdata
/freebsd-10-stable/contrib/unbound
/freebsd-10-stable/contrib/wpa
/freebsd-10-stable/contrib/xz
/freebsd-10-stable/crypto/heimdal
/freebsd-10-stable/crypto/openssh
/freebsd-10-stable/crypto/openssl
/freebsd-10-stable/etc
/freebsd-10-stable/etc/rc.d
/freebsd-10-stable/gnu/lib
/freebsd-10-stable/gnu/usr.bin/binutils
/freebsd-10-stable/gnu/usr.bin/cc/cc_tools
/freebsd-10-stable/gnu/usr.bin/gdb
/freebsd-10-stable/include
/freebsd-10-stable/lib
/freebsd-10-stable/lib/libc
/freebsd-10-stable/lib/libc/stdtime
/freebsd-10-stable/lib/libc_nonshared
/freebsd-10-stable/lib/libfetch
/freebsd-10-stable/lib/libiconv_modules
/freebsd-10-stable/lib/libsmb
/freebsd-10-stable/lib/libthr
/freebsd-10-stable/lib/libutil
/freebsd-10-stable/lib/libvmmapi
/freebsd-10-stable/lib/libyaml
/freebsd-10-stable/lib/libz
/freebsd-10-stable/release
/freebsd-10-stable/release/doc
/freebsd-10-stable/sbin
/freebsd-10-stable/sbin/camcontrol
/freebsd-10-stable/sbin/dumpon
/freebsd-10-stable/sbin/hastd
/freebsd-10-stable/sbin/ifconfig
/freebsd-10-stable/sbin/ipfw
/freebsd-10-stable/sbin/nvmecontrol
/freebsd-10-stable/share
/freebsd-10-stable/share/examples/bhyve
/freebsd-10-stable/share/i18n/csmapper/JIS
/freebsd-10-stable/share/i18n/esdb/EUC
/freebsd-10-stable/share/man
/freebsd-10-stable/share/man/man4
/freebsd-10-stable/share/man/man4/bhyve.4
/freebsd-10-stable/share/man/man5
/freebsd-10-stable/share/man/man7
/freebsd-10-stable/share/man/man8
/freebsd-10-stable/share/misc
/freebsd-10-stable/share/mk
/freebsd-10-stable/share/mk/bsd.arch.inc.mk
/freebsd-10-stable/share/syscons
/freebsd-10-stable/share/zoneinfo
/freebsd-10-stable/sys
/freebsd-10-stable/sys/amd64/include/vmm.h
/freebsd-10-stable/sys/amd64/include/vmm_dev.h
/freebsd-10-stable/sys/amd64/include/vmm_instruction_emul.h
/freebsd-10-stable/sys/amd64/include/xen
/freebsd-10-stable/sys/amd64/vmm
/freebsd-10-stable/sys/boot
i386/efi
ia64/efi
ia64/ski
powerpc/boot1.chrp
powerpc/ofw
/freebsd-10-stable/sys/cddl/contrib/opensolaris
/freebsd-10-stable/sys/conf
/freebsd-10-stable/sys/contrib/dev/acpica
/freebsd-10-stable/sys/contrib/dev/acpica/changes.txt
/freebsd-10-stable/sys/contrib/dev/acpica/common
/freebsd-10-stable/sys/contrib/dev/acpica/compiler
/freebsd-10-stable/sys/contrib/dev/acpica/components/debugger
/freebsd-10-stable/sys/contrib/dev/acpica/components/disassembler
/freebsd-10-stable/sys/contrib/dev/acpica/components/dispatcher
/freebsd-10-stable/sys/contrib/dev/acpica/components/events
/freebsd-10-stable/sys/contrib/dev/acpica/components/executer
/freebsd-10-stable/sys/contrib/dev/acpica/components/hardware
/freebsd-10-stable/sys/contrib/dev/acpica/components/namespace
/freebsd-10-stable/sys/contrib/dev/acpica/components/parser
/freebsd-10-stable/sys/contrib/dev/acpica/components/resources
/freebsd-10-stable/sys/contrib/dev/acpica/components/tables
/freebsd-10-stable/sys/contrib/dev/acpica/components/utilities
/freebsd-10-stable/sys/contrib/dev/acpica/include
/freebsd-10-stable/sys/contrib/dev/acpica/os_specific
/freebsd-10-stable/sys/contrib/ipfilter
/freebsd-10-stable/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
/freebsd-10-stable/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c
/freebsd-10-stable/sys/contrib/libfdt
/freebsd-10-stable/sys/contrib/octeon-sdk
/freebsd-10-stable/sys/contrib/x86emu
/freebsd-10-stable/sys/dev/bvm
/freebsd-10-stable/sys/dev/fdt/fdt_ic_if.m
/freebsd-10-stable/sys/dev/hyperv
/freebsd-10-stable/sys/modules/hyperv
/freebsd-10-stable/sys/modules/vmm
/freebsd-10-stable/sys/x86/include/acpica_machdep.h
/freebsd-10-stable/tools
/freebsd-10-stable/tools/build
/freebsd-10-stable/tools/build/options
/freebsd-10-stable/tools/tools/atsectl
/freebsd-10-stable/usr.bin/calendar
/freebsd-10-stable/usr.bin/csup
/freebsd-10-stable/usr.bin/iscsictl
/freebsd-10-stable/usr.bin/procstat
/freebsd-10-stable/usr.sbin
/freebsd-10-stable/usr.sbin/bhyve
/freebsd-10-stable/usr.sbin/bhyvectl
/freebsd-10-stable/usr.sbin/bhyveload
/freebsd-10-stable/usr.sbin/bsdconfig
/freebsd-10-stable/usr.sbin/bsdinstall
/freebsd-10-stable/usr.sbin/ctladm
/freebsd-10-stable/usr.sbin/ctld
/freebsd-10-stable/usr.sbin/freebsd-update
/freebsd-10-stable/usr.sbin/jail
/freebsd-10-stable/usr.sbin/mergemaster
/freebsd-10-stable/usr.sbin/mount_smbfs
/freebsd-10-stable/usr.sbin/ndiscvt
/freebsd-10-stable/usr.sbin/pkg
/freebsd-10-stable/usr.sbin/rtadvctl
/freebsd-10-stable/usr.sbin/rtadvd
/freebsd-10-stable/usr.sbin/rtsold
/freebsd-10-stable/usr.sbin/zic
257527 01-Nov-2013 brooks

MFC r256912, r256931, r256977

Sync BERI kernel configs with P4:

Switch the majority of device configuration to FDT from hints.

Add BERI_*_BASE configs to reduce duplication in the MDROOT and SDROOT
kernels.

Add NFS and GSSAPI support by default.

Enable ATSE_CFI_HACK in BERI configs, stable MAC addresses are useful.

BERI_SIM.hint is no longer used, remove it.

Sponsored by: DARPA/AFRL
Approved by: re (delphij)

256562 15-Oct-2013 jhb

MFC 256293:
Sanitize the %eflags returned by BIOS routines. Some BIOS routines enter
protected mode and may leave protected-mode-specific flags like PSL_NT set
when they return to real mode. This can cause a fault when BTX re-enters
protected mode after the BIOS mode returns.

Approved by: re (gjb)

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)


/freebsd-10-stable/etc/defaults/rc.conf
/freebsd-10-stable/etc/rc.d/initrandom
/freebsd-10-stable/share/examples/kld/random_adaptor/random_adaptor_example.c
/freebsd-10-stable/share/man/man4/random.4
forth/loader.conf
/freebsd-10-stable/sys/conf/NOTES
/freebsd-10-stable/sys/conf/files
/freebsd-10-stable/sys/conf/files.amd64
/freebsd-10-stable/sys/conf/files.i386
/freebsd-10-stable/sys/conf/options
/freebsd-10-stable/sys/dev/glxsb/glxsb.c
/freebsd-10-stable/sys/dev/hifn/hifn7751.c
/freebsd-10-stable/sys/dev/random/dummy_rng.c
/freebsd-10-stable/sys/dev/random/harvest.c
/freebsd-10-stable/sys/dev/random/hash.h
/freebsd-10-stable/sys/dev/random/ivy.c
/freebsd-10-stable/sys/dev/random/live_entropy_sources.c
/freebsd-10-stable/sys/dev/random/live_entropy_sources.h
/freebsd-10-stable/sys/dev/random/nehemiah.c
/freebsd-10-stable/sys/dev/random/pseudo_rng.c
/freebsd-10-stable/sys/dev/random/random_adaptors.c
/freebsd-10-stable/sys/dev/random/random_adaptors.h
/freebsd-10-stable/sys/dev/random/random_harvestq.c
/freebsd-10-stable/sys/dev/random/random_harvestq.h
/freebsd-10-stable/sys/dev/random/randomdev.c
/freebsd-10-stable/sys/dev/random/randomdev.h
/freebsd-10-stable/sys/dev/random/randomdev_soft.c
/freebsd-10-stable/sys/dev/random/randomdev_soft.h
/freebsd-10-stable/sys/dev/random/rwfile.c
/freebsd-10-stable/sys/dev/random/rwfile.h
/freebsd-10-stable/sys/dev/random/yarrow.c
/freebsd-10-stable/sys/dev/random/yarrow.h
/freebsd-10-stable/sys/dev/rndtest/rndtest.c
/freebsd-10-stable/sys/dev/safe/safe.c
/freebsd-10-stable/sys/dev/syscons/scmouse.c
/freebsd-10-stable/sys/dev/syscons/syscons.c
/freebsd-10-stable/sys/dev/ubsec/ubsec.c
/freebsd-10-stable/sys/kern/kern_intr.c
/freebsd-10-stable/sys/kern/subr_bus.c
/freebsd-10-stable/sys/mips/cavium/octeon_rnd.c
/freebsd-10-stable/sys/modules/random/Makefile
/freebsd-10-stable/sys/net/if_ethersubr.c
/freebsd-10-stable/sys/net/if_tun.c
/freebsd-10-stable/sys/netgraph/ng_iface.c
/freebsd-10-stable/sys/sys/random.h
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


255977 01-Oct-2013 pluknet

Sweep man pages replacing ad -> ada.

Approved by: re (blackend)
MFC after: 1 week
X-MFC note: stable/9 only


255944 29-Sep-2013 bdrewery

Use MK_SSP=no after including bsd.own.mk to disable SSP instead of user-knob
WITH[OUT]_SSP to avoid hitting an error if user has WITH_SSP in their
make.conf. Ports now use this knob.

make[7]: "/usr/src/share/mk/bsd.own.mk" line 466: WITH_SSP and
WITHOUT_SSP can't both be set.

This is similar to previous cleanup done in r188895

Approved by: bapt
Reviewed by: jlh (earlier version)
Approved by: re (marius)
MFC after: 1 week


255939 29-Sep-2013 andrew

Fix ixp425 boot2 with ARM EABI:
- libkern is missing __aeabi_llsl, implement this by calling __ashldi3.
- Because of how the asm entry macros are defined the boot2 code
requires the unwind symbols to exist, include them in boot2.

Approved by: re (marius)


255130 01-Sep-2013 rpaulo

Initial support for the Digi ConnectCore(c) i.MX53 / Wi-i.MX53 boards.

There are many drivers missing, but we can reach single user mode now.

Hardware graciously donated by Douglas Beattie.


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.


254733 23-Aug-2013 jkim

Set the hint for physical address of RSDP in hexadecimal as before r223262.


254598 21-Aug-2013 ian

Add support for uarts other than the serial console in TI OMAP SoCs.

The TI uart hardware is ns16550-compatible, except that before it can
be used the clocks and power have to be enabled and a non-standard
mode control register has to be set to put the device in uart mode
(as opposed to irDa or other serial protocols). This adds the extra
code in an extension to the standard ns8250 probe routine, and the
rest of the driver is just the standard ns8250 code.


254559 20-Aug-2013 ian

Make the standard sdhci(4) driver work for the TI OMAP family SoCs.
The MMCHS hardware is pretty much a standard SDHCI v2.0 controller with a
couple quirks, which are now supported by sdhci(4) as of r254507.

This should work for all TI SoCs that use the MMCHS hardware, but it has
only been tested on AM335x right now, so this enables it on those platforms
but leaves the existing ti_mmchs driver in place for other OMAP variants
until they can be tested.

This initial incarnation lacks DMA support (coming soon). Even without it
this improves performance pretty noticibly over the ti_mmchs driver,
primarily because it now does multiblock IO.


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.


254155 09-Aug-2013 marcel

Fix the freaddir implementation for the stand-alone interpreter.

Bug pointed out by: Jan Beich <jbeich@tormail.org>


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.


254092 08-Aug-2013 ae

Make the check for number of entries less strict.
Some partitioning tools can create GPT with number of entries less
than 128.

MFC after: 1 week


254056 07-Aug-2013 ganbold

Bring initial support for Allwinner A20 SoC (Cubieboard2).
Add support for A20 timer.
Correct interrupt offset depending from chip.
Add basic code for CPU configuration module.
For now, add kernel config and dts file
(only FDT blob related problem needs to be solved later in
order to have one kernel for both cubieboard1 and 2).

Approved by: ray@


254015 07-Aug-2013 marcel

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

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

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

Approved by: nyan@


253971 05-Aug-2013 cognet

Let the platform calculate the timer frequency at runtime, and use that for
the omap4, instead of relying on the (wrong) value provided in the dts.


253862 01-Aug-2013 marcel

Fix the build of the testmain target. This target compiles a Forth
interpreter that can be run on the system and as such cannot be
compiled against libbstand. On the one hand this means we need to
include the usual headers for system interfaces that we use and
on the the other hand we can only use standard system interfaces.

While here, define local variables only when needed to make this
WARNS=2 clean on amd64.

PR: 172542
Obtained from: peterj@
Pointed out by: Jan Beich <jbeich@tormail.org>


253832 31-Jul-2013 rpaulo

Add definitions for the Mailbox, Spinlock and PRU-ICSS devices.


253715 27-Jul-2013 kientzle

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


253714 27-Jul-2013 kientzle

Install Forth infrastructure along with ubldr.

Note: loader.rc is installed as loader.rc.sample
so that by default, none of this is actually used.


253172 10-Jul-2013 marcel

Add 2 builtin words for working with directories:
isdir? ( fd -- bool )
freaddir ( fd -- ptr len TRUE | FALSE )

The 'isdir?' word returns `true' if the file descriptor is for a
directory and `false' otherwise.

The 'freaddir' word reads the next directory entry and if successful,
returns its name and 'true'. Otherwise 'false' is returned.

These words give the loader the ability to scan directories and read
files contained in them for 'rc.d'-like flexibility in handling which
modules to load and/or which tunables to set.

Obtained from: Juniper Networks, Inc.


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


253024 08-Jul-2013 gonzo

- MMC1 (internal eMMC) pins should be configured as input-pullup, except
for reset pin


252914 07-Jul-2013 gonzo

- Add musb node to shared dtsi and proper pin configuratin for every
AM553x-based device


252719 04-Jul-2013 gonzo

Add nodes for PWMSS1 and PWMSS2


252586 03-Jul-2013 wblock

Add descriptions to the FILES list, fix some mdoc complaints, move the
"neither" entry out of the table in BOOTING.

Submitted by: joeld
Reviewed by: joeld
MFC after: 1 week


252492 01-Jul-2013 wblock

Add a new gptboot(8) man page. Factor out the redundant information
in gpart(8) and boot(8), adding references to gptboot(8) in both.

Reviewed by: jhb, ae, pjd, Paul Schenkeveld <bsdcan@psconsult.nl>, david_a_bright@dell.com (portions), gjb
MFC after: 1 week


252439 01-Jul-2013 rpaulo

Split bcm2835-rpi-b.dts into bcm2835.dtsi and rpi.dts. This DTS actually works
on all R-Pi models because VideoCore binary patches it during boot.

Reviewed by: gonzo


252371 29-Jun-2013 ray

Add FDT for Arndale board and Samsung Exynos5250 SoC.

Submitted by: Ruslan Bukin <br@bsdpad.com>


251589 10-Jun-2013 marius

- The method introduced as part of r234898 for not altering the boot path
when booting from ZFS turned out to also cause the boot path not being
adjusted if booting from CD-ROM with firmware versions that do not employ
the "cdrom" alias in that case. So shuffle the code around instead in order
to achieve the original intent. Ideally, we shouldn't fiddle with the boot
path when booting from UFS on a disk either; unfortunately, there doesn't
seem to be an universal way of telling disks and CD-ROMs apart, though. [1]
- Use NULL instead of 0 for pointers.

PR: 179289
MFC after: 1 week


251250 02-Jun-2013 tijl

Convert old make variable modifiers :U and :L to bmake :tu and :tl.

Reviewed by: sjg


251223 01-Jun-2013 nyan

MFi386: revision 245848

Always update the hw.uart.console hint.


251020 27-May-2013 gonzo

Add DTS for AM335x EVM with properly muxed PWM and LCD pins, and
LCD panel description


251019 27-May-2013 gonzo

Add PWM and LCDC nodes to base DTS for AM335x-based devices


250769 18-May-2013 kientzle

Correct the spelling of "okay".
Add pinmux setting for the Reset GPIO pin for MMC1.


250435 10-May-2013 kientzle

Move 'compatible' line out of the common am335x.dtsi and into
the beaglebone-specific .dts file.

Add a new .dts for the BeagleBone Black with more memory,
slightly different pinmux initialization, and with mmchs1
configured (though the latter doesn't quite work yet).


250333 07-May-2013 jhb

Don't pad disk partition sizes with leading zeros. This was already
fixed in a different way by the new disk code used for other
platforms.

MFC after: 1 week


250291 06-May-2013 gber

Move initialization of CESA decoding windows from common section
to driver specific files.

- window initialization is done during device attach
- CESA TDMA decoding windows values are set based on DTS,
not copied from CPU registers
- remove unnecessary virtual mapping
- update dts file

Obtained from: Semihalf


249997 27-Apr-2013 wkoszek

Add Xilinx Zynq ARM/FPGA SoC support to FreeBSD/arm port.

Submitted by: Thomas Skibo <ThomasSkibo (at) sbcglobal.net>
Reviewed by: wkoszek, freebsd-arm@ (no objections raised)


249946 26-Apr-2013 gonzo

Move pinmux configuration to board-specific config. It will vary
from board to board.


249846 24-Apr-2013 dim

When rebooting (exiting) from the BTX loader, make sure to restore the
GDT from the correct segment, otherwise a triple fault would be caused.
In some virtual environments (VMware, VirtualBox, etc) this could lead
to a unhandled error or hang in the guest emulation software.

Thanks to avg and jhb for a few hints in the right direction.

Noticed by: Jeremy Chadwick <jdc@koitsu.org> (and many others)
MFC after: 1 week


249774 22-Apr-2013 gonzo

Split BeagleBone DTS to generic AM335x part and Beagle-bone specific


249719 21-Apr-2013 ae

Since we didn't break the loop, we should set i to -1 to start from the
beginning.

Submitted by: Steven Hartland
MFC after: 1 week


249223 07-Apr-2013 kientzle

The CELL fields can be various integer types depending on the platform
(ARM uses 'int' and 'unsigned'; i386 uses 'long' and 'unsigned long'),
so we need explicit casts to long and unsigned long here to ensure
that the result matches the printf %ld and %lx specifiers.


249222 07-Apr-2013 kientzle

Fix two broken macros.


249139 05-Apr-2013 avg

strncmp for boot code: fix an off by one error

Before this change strncmp would access and _compare_ n+1 characters
in the case where the first n characters match.

MFC after: 5 days


248962 31-Mar-2013 ian

When running on armv6, set alignment checking to modulo-4 mode rather
than modulo-8, because clang emits ldrd and strd instructions for
addresses that are only 4-byte aligned


248934 30-Mar-2013 kientzle

Initialize sym_count to 0.

This fixes a compiler warning introduced in r248121.


248557 20-Mar-2013 ray

Integrate Efika MX project back to home.

Sponsored by: The FreeBSD Foundation


248121 10-Mar-2013 ian

Attach the elf section headers to the loaded kernel as metadata, so
they can easily be used by later post-processing. When searching for
a compiled-in fdt blob, use the section headers to get the size and
location of the .dynsym section to do a symbol search.

This fixes a problem where the search could overshoot the symbol
table and wander into the string table. Sometimes that was harmless
and sometimes it lead to spurious panic messages about an offset
bigger than the module size.


248118 09-Mar-2013 ian

Since ubldr doesn't necessarily load a kernel at the physical address in the
elf headers, mask out the high nibble of that address. This effectly makes
the entry point the offset from the load address, and it gets adjusted for
the actual load address before jumping to it.

Masking the high nibble makes assumptions about memory layout that are true
for all the arm platforms we support right now, but it makes me uneasy.
This needs to be revisited.


247520 01-Mar-2013 ganbold

Enable uart driver for A10.

Approved by: gonzo@


247413 27-Feb-2013 ian

Fix a typo that prevented booting a kernel that had virtual addresses in
the elf headers.


247301 26-Feb-2013 ian

Adjust the arm kernel entry point address properly regardless of whether the
e_entry field holds a physical or a virtual address. Add a comment block
that explains the assumptions being made by the adjustment code.


247250 25-Feb-2013 kientzle

Fix the bug I introduced in r247045.
After digging through more carefully, it looks like there's
no real need to have the DTB in the module directory.
So we can simplify a lot: Just copy DTB into local heap
for "fdt addr" and U-Boot integration, drop all the extra
COPYIN() calls.

I've left one final COPYIN() to update the in-kernel DTB
for consistency with how this code used to work, but I'm
no longer convinced it's appropriate here.

I've also remove the mem_load_raw() utility that I added
to boot/common/module.c with r247045 since it's no longer
necessary.


247208 23-Feb-2013 gonzo

- Move dma, sdhci and mbox nodes down in dts in order to get them
initialized after FPIO controller since they might rely on GPIO
functionality

- Update interrupts property of dma node to contain all allocated
interrupts


247201 23-Feb-2013 kientzle

"fdt addr" gets run from loader.rc before the kernel is loaded.
This was broken by r247045 which tried to copy the FDT into the
module directory immediately.
Instead, store the address and arrange for the FDT to get
copied into the module directory later when the usual
FDT initialization runs.


247200 23-Feb-2013 kientzle

Print kernel args as late as possible before jumping into kernel.


247047 20-Feb-2013 kib

Convert machine/elf.h, machine/frame.h, machine/sigframe.h,
machine/signal.h and machine/ucontext.h into common x86 includes,
copying from amd64 and merging with i386.

Kernel-only compat definitions are kept in the i386/include/sigframe.h
and i386/include/signal.h, to reduce amd64 kernel namespace pollution.
The amd64 compat uses its own definitions so far.

The _MACHINE_ELF_WANT_32BIT definition is to allow the
sys/boot/userboot/userboot/elf32_freebsd.c to use i386 ELF definitions
on the amd64 compile host. The same hack could be usefully abused by
other code too.


247045 20-Feb-2013 kientzle

Fix "fdt addr" to accept literal addresses rather than va offsets.
When initializing the fdt, query U-Boot as well.

With this change, it is now feasible to have U-Boot load
the FDT, ubldr will pull it from U-Boot and hand it to the
kernel.


246953 18-Feb-2013 kientzle

Add mem_load_raw() for loading data from another location in memory.

This will be used by some upcoming changes to loader(8) FDT
handling to allow it to use an FDT provided by an earlier
boot stage the same as an FDT loaded from disk.


246948 18-Feb-2013 kientzle

Clarify an error message. The addresses here are
really offsets within the primary mapped memory block
(which may not start at address zero).


246851 15-Feb-2013 gonzo

Enable USB1 (which is EHCI0) for Allwinner A10

Tested by: ganbold@


246660 11-Feb-2013 gonzo

Add watchdog driver for Allwinner A10


246647 11-Feb-2013 kientzle

Provide verbose help for fdt commands on platforms that use it.


246630 10-Feb-2013 ae

Add bootcamp support to the loader.

Tested by: dchagin
MFC after: 1 week


246616 10-Feb-2013 hselasky

- Move scratch data from the USB bus structure to the USB device structure
so that simultaneous access cannot happen. Protect scratch area using
the enumeration lock. Also reduce stack usage in usbd_transfer_setup()
by moving some big stack members to the scratch area. This saves around
200 bytes of stack.
- Fix a whitespace.

MFC after: 1 week


246571 08-Feb-2013 hselasky

Correctly list the usbloader dependencies.


246369 05-Feb-2013 andrew

* Add the integer div & mod functions and ARM EABI support functions to
libstand.
* Stop linking the ARM U-Boot loader against libgcc now libstand has the
required symbols.


246363 05-Feb-2013 hselasky

Add defines to more easily allow a single threaded version of the FreeBSD
USB stack. This is useful for non-kernel purposes, like the loader.


246359 05-Feb-2013 hselasky

Fix depend target.


246342 05-Feb-2013 ganbold

Add gpio driver and update dts and kernel config accordingly.

Approved by: gonzo@


246145 31-Jan-2013 hselasky

Initial version of libusbboot, a fully stand-alone, single threaded and
functional compilation of the FreeBSD USB stack for use with boot loaders
and such.

Discussed with: Hiroki Sato, hrs @ EuroBSDCon


246135 30-Jan-2013 ian

Do metadata relocation fixup on all loaded modules, not just the kernel.

Approved by: cognet (mentor)


246057 29-Jan-2013 ganbold

Add simple clock driver and ehci glue code for a10
Update dts and kernel config

Approved by: gonzo@


246026 28-Jan-2013 dmarion

Configure all GPIO pins as described in Beaglebone SRM.

Submitted by: Emmanuel Vadot <elbarto@megadrive.org>


245955 27-Jan-2013 ian

Add support for the GlobalScale Technologies DreamPlug computer.

This adds support for version 10, revision 01, but it should also work
without changes for the 0901 model, at least until we get drivers for the
two different wifi chips involved.

Many users contributed to and tested the various patchsets floating around
for the past year that have eventually evolved into this checkin, most notably
Richard Neese who provided the bulk of the kernel config file.

Approved by: cognet (mentor)


245900 25-Jan-2013 ganbold

Fix method of naming compatible string to follow
"<manufacturer>,<model>" as described in
http://www.devicetree.org/Device_Tree_Usage

Reviewed by: andrew@
Approved by: gonzo@


245848 23-Jan-2013 jhb

Always update the hw.uart.console hint anytime a change is made to the
comconsole setup. Previously the hint would be set when if you set a
custom port, but it would not be updated if you later set a custom speed.

Also, leave the hw.uart.console hint mutable so it can be overridden or
unset by the user if needed.

Reviewed by: kib (earlier version)
MFC after: 1 week


245765 22-Jan-2013 benno

Fix linking of loader.efi.

gcc handles -symbolic by passing -Bsymbolic through to ld. clang ignores
-symbolic and thus invokes ld without -Bsymbolic which leads to some symbols
not being properly linked in loader.efi. Fix this by using -Wl,-Bsymbolic which
passes -Bsymbolic to ld in both the gcc and clang cases.

Approved by: rpaulo


245703 21-Jan-2013 kientzle

Use correct size for AM335x CPSW memory window.


245697 20-Jan-2013 avg

zfs/sparc64 boot: fix booting after r242230

arch_zfs_probe method is supposed to only probe for ZFS vdevs, but it can
not expect that ZFS data is in a ready state yet.
So, move some code from sparc64_zfs_probe to main to meet the constraints.

Reported by: Chris Ross <cross+freebsd@distal.com>
Tested by: Chris Ross <cross+freebsd@distal.com>
MFC after: 4 days


245677 19-Jan-2013 andrew

Link against compiler-rt to pull in the required __aeabi_* functions


245673 19-Jan-2013 kientzle

Use correct GPIO interrupt lines.


245450 15-Jan-2013 ganbold

Initial support for Allwinner A10 SoC (Cubieboard)
Add simple console driver
Add interrupt handling and timer codes
Add kernel config file
Add dts file
Approved by: gonzo


245424 14-Jan-2013 sbruno

Quiesce some clang warnings while we're here doing stuff.

Submitted by: Hiren Panchasara <hiren.panchasara@gmail.com>
Obtained from: Yahoo! Inc


245148 08-Jan-2013 grehan

Bring in some userboot changes from the bhyve branch to reduce diffs.

r238966
Bump up the heap size to 1MB. With a few kernel modules, libstand
zalloc and userboot seem to want to use ~600KB of heap space, which
results in a segfault when malloc fails in bhyveload.

r241180
Clarify comment about default number of FICL dictionary cells.

r241153
Allow the number of FICL dictionary cells to be overridden.
Loading a 7.3 ISO with userboot/amd64 takes up 10035 cells,
overflowing the long-standing default of 10000.

Bump userboot's value up to 15000 cells.

Reviewed by: dteske (r238966,241180)
Obtained from: NetApp


244916 31-Dec-2012 gonzo

Add interrupt for PL310 controller


244537 21-Dec-2012 rpaulo

Move the 64-bit _setjmp to lib/libstand.


244531 21-Dec-2012 rpaulo

Build a 64 bit version of the FICL library. This is need for a 64 bit
EFI bootloader (amd64 only for now).

This is not yet connected to the build.


244332 17-Dec-2012 rpaulo

amd64 only has rela sections.


244307 16-Dec-2012 marius

Restore pre-r234898 printing of boot loader and path.

MFC after: 3 days


244278 15-Dec-2012 andrew

Ignore a warning in ubldr where clang doesn't understand the %D printf
specifier from libstand.


244197 13-Dec-2012 gonzo

Add support for QEMU's version of Versatile Platform Board


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)


243978 07-Dec-2012 rpaulo

Typo in a comment.


243977 07-Dec-2012 rpaulo

Make this work for 64 bit binaries.


243875 05-Dec-2012 rpaulo

Remove dead code that clang refuses to compile.


243700 30-Nov-2012 neel

Teach userboot to boot from ISO image files.

Reviewed by: ae@, dfr@
Obtained from: NetApp


243694 30-Nov-2012 gonzo

Add vchiq node


243693 30-Nov-2012 gonzo

- Implement "fdt mres" sub-command that prints reserved memory regions
- Add "fdt addr" subcommand that lets you specify preloaded blob address
- Do not pre-initialize blob for "fdt addr"
- Do not try to load dtb every time fdt subcommand is issued,
do it only once
- Change the way DTB is passed to kernel. With introduction of "fdt addr"
actual blob address can be not virtual but physical or reside in
area higher then 64Mb. ubldr should create copy of it in kernel area
and pass pointer to this newly allocated buffer which is guaranteed to work
in kernel after switching on MMU.
- Convert memreserv FDT info to "memreserv" property of root node
FDT uses /memreserve/ data to notify OS about reserved memory areas.
Technically it's not real property, it's just data blob, sequence
of <start, size> pairs where both start and size are 64-bit integers.
It doesn't fit nicely with OF API we use in kernel, so in order to unify
thing ubldr converts this data to "memreserve" property using the same
format for addresses and sizes as /memory node.


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)


243526 25-Nov-2012 kientzle

Print kernel args when booting the kernel.


243420 23-Nov-2012 gonzo

Make FDT blob compatible with Raspberry Pi firmware.

Rasperry Pi firmware has a set of hardcoded pathes it uses to fill
FDT with system-specific information like display resolution, memory
size, UART and SDHCI clocks, ethernet MAC address. Handle two of them:

- Add placeholder for ethernet MAC address
- Move display node out of "axi" node


243305 19-Nov-2012 marius

Fix build after r243245.

Submitted by: trasz


243254 19-Nov-2012 trasz

Fix build on powerpc.

Reviewed by: nwhitehorn


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)


243025 14-Nov-2012 avg

boot: use packed attribute for edd_params* structures and their substructures

The sole purpose of this change is to make sure that sizeof produces
"canonical" sizes for these structures. This is to avoid triggering
bugs in the BIOSes that properly handle only the canonical values of
input length provided to INT 13h AH=48h.
The canonical sizes are: 30 for v2, 66 for v3, etc.
Buggy BIOS code probably looks like:
if (input_length > 30) { /* > v2 */
assume that input length is 66 /* assume v3 or later */
}

This should fix boot problems at least on Supermicro X8DT6 and possibly
on P410i Smart Array Controller (as found in e.g. HP DL360 G7).

Reported by: gnn, np, rstone
Debugged by: rstone
Discussed with: ae, np, rstone
MFC after: 4 days


242935 12-Nov-2012 neel

Add a callback function to userboot.so to fetch a list of environment
variables and pass them to the kernel.

Reviewed by: dfr


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)


242865 10-Nov-2012 nyan

cosmetic changes to reduce diffs against i386.


242864 10-Nov-2012 nyan

MFi386: r241300

i386 comconsole: don't loop forever if hardware doesn't respond

- clear capability flags when hw timeouts
- retire comc_started status variable and directly use c_flags to see
if comconsole is selected for use


242863 10-Nov-2012 nyan

MFi386: r241301

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


242855 10-Nov-2012 nyan

MFi386: r241785

boot: use -march=i386 for both i386 and amd64 builds


242804 08-Nov-2012 dim

Shrink boot2 by 8 bytes, by eliminating some unneeded instructions in
sio.S. This is not particularly needed for head right now, but it is
intended to merge to stable/9, to fix boot2 build with clang there.

Reviewed by: avg
MFC after: 3 days


242706 07-Nov-2012 dim

Put in a band-aid to get the pc98 bootstraps building, now clang is the
default compiler. This has two parts:
- Make sys/boot/pc98/boot2 always build with gcc for now, until we can
figure out a way to shrink it enough when building with clang.
- Since sys/boot/p98/cdboot uses .code16 directives, which are not yet
supported by clang's integrated assembler, use -no-integrated-as,
similar to sys/boot/i386/cdboot.

Reviewed by: nyan
MFC after: 1 week


242688 07-Nov-2012 dteske

Hook in new files menusets.4th and manual.

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


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)


242145 26-Oct-2012 mav

Fix loader crash when some unhalted exception happens during `include`
command execution. In case of such unhandled exception, vmReset() inside
ficlExecC() flushes the VM state. Attempt to return back to Forth after
that cause garbage dereference with unexpected results. To avoid that
situation call vmThrow() directly instead of expecting Forth to do it.


242084 25-Oct-2012 mav

Remove new-line characters from the include() errors to make it consistent
with the rest of code.


241876 22-Oct-2012 ae

When loader tries to open GPT partition, but partition table is not GPT,
then try automatically detect an appropriate partition type.

PR: kern/172550
Tested by: Ralf Wenk


241809 21-Oct-2012 ae

Add the flags parameter to the disk_open() function and DISK_F_NOCACHE
flag, that disables the caching of partition tables metadata.
Use this flag for floppies in the libi386/biosdisk driver.


241785 20-Oct-2012 avg

boot: use -march=i386 for both i386 and amd64 builds

.. so that consistent compilation algorithms are used for both
architectures as in practice the binaries are expected to be
interchangeable (for time being).
Previously i386 used default setting which were equivalent to
-march=i486 -mtune=generic.
The only difference is using smaller but slower "leave" instructions.

Discussed with: jhb, dim
MFC after: 29 days


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)


241301 06-Oct-2012 avg

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

Note that this commit slightly increases size of boot blocks.

Reviewed by: jhb
Tested by: Olivier Cochard-Labbe <olivier@cochard.me>
MFC after: 26 days


241300 06-Oct-2012 avg

i386 comconsole: don't loop forever if hardware doesn't respond

- clear capability flags when hw timeouts
- retire comc_started status variable and directly use c_flags to see
if comconsole is selected for use

Reviewed by: jhb
Tested by: Uffe Jakobsen <uffe@uffe.org>,
Olivier Cochard-Labbe <olivier@cochard.me>
MFC after: 26 days


241299 06-Oct-2012 avg

boot/console: handle consoles that fail to probe

- clarify meaning of console flags
- perform i/o via a console only if both of the following conditions are met:
o console is active (selected by user or config)
o console flags that it can perform the operation
- warn if a chosen console can not work (the warning may go nowhere without
working and active console, though)

Reviewed by: jhb
Tested by: Uffe Jakobsen <uffe@uffe.org>,
Olivier Cochard-Labbe' <olivier@cochard.me>
MFC after: 26 days


241294 06-Oct-2012 avg

zfsboot: simplify probe_drive() a little bit

The first discovered pool, whether it covers the whole boot disk or not,
is going to be first in zfs_pools list. So there is no need at all
for spapp parameter.

This commit also fixes a bug where NULL would be assigned to NULL
pointer when probe_drive was called with the spapp parameter of NULL.

MFC after: 21 days


241293 06-Oct-2012 avg

zfs boot: export boot/primary pool and vdev guid all the way to kenv

This is work in progress to for znextboot and it also provides
some convenient infrastructure.

MFC after: 20 days


241292 06-Oct-2012 avg

zfs loader: treat plain pool name as a name of its root dataset

... as opposed to the previous behavior of treating it as boot
dataset (specified by bootfs or default)

MFC after: 19 days


241291 06-Oct-2012 avg

zfs boot spa_status: print bootfs for each reported pool

MFC after: 9 days


241290 06-Oct-2012 avg

boot/zfs: a small whitespace cleanup

MFC after: 5 days


241289 06-Oct-2012 avg

boot/zfs: call zfs_spa_init for all found pools

... and drop those for which it fails.
Also, add more sanity checking to the function.

MFC after: 16 days


241288 06-Oct-2012 avg

zfsboot: use the same zfs dataset naming format as loader

Also, pool name alone now names a root dataset of the pool regardless
of bootfs property value.

MFC after: 15 days


241284 06-Oct-2012 avg

zfs boot: add lszfs command to i386 loader

... to list child datasets of a specified dataset.
Dataset name should be provided in poolname/dsname format.

MFC after: 17 days


241283 06-Oct-2012 avg

zfs boot: add code for listing child datasets of a given dataset

- only filesystem datasets are supported
- children names are printed to stdout

To do: allow to iterate over the list and fetch names programatically

MFC after: 17 days


241282 06-Oct-2012 avg

zfs boot: chose a "first" pool if none is explicitly requested

MFC after: 8 days


241164 03-Oct-2012 ae

Replace all references to loader_callbacks_v1 with loader_callbacks.

Suggested by: grehan@


241070 30-Sep-2012 ae

Fix the style.


241069 30-Sep-2012 ae

Remember the file format of the last loaded module and try to use it for
next files.


241068 30-Sep-2012 ae

Reduce the number of attempts to detect proper kld format for the amd64
loader.


241065 30-Sep-2012 ae

Fix disk_cleanup() to work without DISK_DEBUG too.


241053 29-Sep-2012 ae

Almost each time when loader opens a file, this leads to calling
disk_open(). Very often this is called several times for one file.
This leads to reading partition table metadata for each call. To
reduce the number of disk I/O we have a simple block cache, but it
is very dumb and more than half of I/O operations related to reading
metadata, misses this cache.

Introduce new cache layer to resolve this problem. It is independent
and doesn't need initialization like bcache, and will work by default
for all loaders which use the new DISK API. A successful disk_open()
call to each new disk or partition produces new entry in the cache.
Even more, when disk was already open, now opening of any nested
partitions does not require reading top level partition table.
So, if without this cache, partition table metadata was read around
20-50 times during boot, now it reads only once. This affects the booting
from GPT and MBR from the UFS.


241047 29-Sep-2012 ae

Disable splitfs support, since we aren't support floppies for a long
time. This slightly reduces an overhead, when loader tries to open
file that doesn't exist.


241023 28-Sep-2012 ae

Make the loader a bit smarter, when it tries to open disk and the slice
number is not exactly specified. When the disk has MBR, also try to read
BSD label after ptable_getpart() call. When the disk has GPT, also set
d_partition to 255. Mostly, this is how it worked before.


240854 23-Sep-2012 nyan

MFi386: revision 240637

loader/i386: replace ugly inb/outb re-implementations with cpufunc.h


240852 23-Sep-2012 nyan

Cosmetic changes.


240782 21-Sep-2012 andreast

Implement elfN(reloc) for powerpc. With this change the kernel is now able to
resolve dependencies of modules at boot time and load additional modules when
needed.

MFC after: 1 week


240655 18-Sep-2012 mav

Fix panics on attempt to dereference uninitizlized pointer, returned via
'path' argument of ofw_parsedev() if devspec refers raw device with no path.

For example, `ls /pci@1f,0/ide@d/disk@0,0:a/` works fine, while
`ls /pci@1f,0/ide@d/disk@0,0:a` panicked before this change.


240637 18-Sep-2012 avg

loader/i386: replace ugly inb/outb re-implementations with cpufunc.h

Use of __builtin_constant_p in a function that is only called via
a pointer is a good example of how out-of-date it was.

Suggested by: bde
MFC after: 1 week


240594 17-Sep-2012 andrew

Add the Tegra2 DTS files. Now our dtc supports including other files use
this support to pull out the SoC specific parts of the dts file.


240492 14-Sep-2012 gber

Add support for MSI in interrupt controlller.

MSI are implemented via software interrupt. PCIe cards will write
into software interrupt register which will cause inbound shared
interrupt which will be interpreted as a MSI.

Obtained from: Marvell, Semihalf


240488 14-Sep-2012 gber

Add support for Armada XP A0.

- Add functions to calculate clocks instead using hardcoded values
- Update reset and timers functions
- Update number of interrupts
- Change name of platform from db88f78100 to db78460
- Correct DRAM size and PCI IRQ routing in dts file.

Obtained from: Semihalf


240481 14-Sep-2012 kientzle

The MBR data is not necessarily aligned. This is a problem on ARM.


240421 12-Sep-2012 mav

Make pxe device in lsdev really include device name, looking like this:
pxe0: 192.168.3.1:/storage/nfsroot/amd64
, instead of confusing and less useful:
192.168.3.1:pxeboot


240349 11-Sep-2012 avg

zfs boot: add a size check for a value in fzap_lookup

MFC after: 25 days


240348 11-Sep-2012 avg

zfs boot: print only an attribute name in fzap_list

... this matches mzap_list behavior

MFC after: 12 days


240347 11-Sep-2012 avg

zfs boot: fix/replace fzap_rlookup implementation

The previous one was totally bogus as it used hash value of
_output_ variable as an index for searching...
The only reliable way to do a reverse lookup here is to iterate
over all entries.

MFC after: 15 days


240346 11-Sep-2012 avg

zfs boot: bring zap_leaf_chunk field names in sync with kernel code

This change is cosmetic.

MFC after: 10 days


240342 11-Sep-2012 avg

boot: file_loadraw should strdup name argument

... the same way it's done for type argument.

MFC after: 2 weeks


240341 11-Sep-2012 avg

a bit of trailing whitespace cleanup

MFC after: 1 week


240335 11-Sep-2012 ae

Slightly reduce an overhead for the open() call in the zfsloader.
libstand(3) tries to detect file system in the predefined order,
but zfsloader usually is used for the booting from ZFS, and there is
no need to try detect several file system types for each open() call.


240277 09-Sep-2012 ae

Handle LOADER_NO_DISK_SUPPORT knob in the arm and powerpc ubldr.


240276 09-Sep-2012 ae

Update according to the change of struct uboot_devdesc.


240275 09-Sep-2012 ae

Build disk.c only when DISK_SUPPORT is enabled.


240274 09-Sep-2012 ae

Update uboot's disk driver to use new DISK API.


240273 09-Sep-2012 ae

Use disk_fmtdev() and disk_parsedev() functions from the new DISK API.


240272 09-Sep-2012 ae

Make struct uboot_devdesc compatible with struct disk_devdesc.


240249 08-Sep-2012 andreast

Fix loading of kernel modules at boot time for powerpc64.

Reported by: Mathias Breuninger
MFC after: 1 week


239922 30-Aug-2012 gonzo

Add barebone Raspberry Pi port. Supported parts:
- Interrupts controller
- Watchdog
- System timer
- Framebuffer (hardcoded resolution/bpp)


239487 21-Aug-2012 jchandra

Add correct range parameter in XLP DTS

r239274 added support for ranges. Update XLP DTS to provide the correct
range parameter for the XLP SoC bus. Also fix bus_space_map method
for XLP bus space.

Submitted by: Sreekanth M. <sreekanth.molagavalli@broadcom.com>


239378 18-Aug-2012 marcel

Build zfs on ia64 as well. We don't build a loader with zfs support
just yet, but building it makes sure we catch (build) regressions.


239377 18-Aug-2012 marcel

Don't build the ski loader anymore. The code is not deleted just yet,
as it explains the distinction between the common and the platform-
specific code.


239325 16-Aug-2012 ae

Add comment why the code has been disabled.

Requested by: rpaulo


239294 15-Aug-2012 ae

Some BIOSes return incorrect number of sectors, make checks less
strictly, to do not lost some partitions.

Reported by: swills@


239293 15-Aug-2012 ae

Rework r239232 to unbreak ZFS detection on MBR slices.


239292 15-Aug-2012 ae

Explicitly terminate the string after strncpy(3).


239281 15-Aug-2012 gonzo

Merging of projects/armv6, part 10

- Support for Texas Instruments SoCs:
- AM335x
- OMAP4

- Kernel configs, DTS for Beaglebone and Pandaboard

Submitted by: Ben Gray, Damjan Marion


239280 15-Aug-2012 gonzo

Merging of projects/armv6, part 9

Very basic support for Nvidia Tegra2: timer, interrupts, UART.

Submitted by: Damjan Marion <dmarion@freebsd.org>


239278 15-Aug-2012 gonzo

Merging of projects/armv6, part 8

r235162:

Initial LPC32x0 support. Includes DTS file for Embedded Artists EA3250
board.

Peripherals currently supported:
- Serial ports
- Interrupt controller
- Timers
- Ethernet
- USB host
- Framebuffer (in conjunction with SSD1289 LCD controller)
- RTC
- SPI
- GPIO

Submitted by: Jakub Wojciech Klama <jceel@freebsd.org>


239277 15-Aug-2012 gonzo

Merging of projects/armv6, part 7

Add Marvell ARMADA XP support

Obtained from: Marvell, Semihalf


239255 14-Aug-2012 des

As discussed on -current, remove the hardcoded default maxswzone.

MFC after: 3 weeks


239243 13-Aug-2012 dim

After r239066, reinitialize v86.ctl and v86.addr for int 13 EDD probing
in sys/boot/i386/libi386/biosdisk.c. Otherwise, when DISK_DEBUG is
enabled, the DEBUG() macros will clobber those fields, and cause the
probing to always fail mysteriously when debugging is enabled.


239232 13-Aug-2012 ae

Restore the old behaviour. If requested partition is a BSD slice,
but d_partition isn't explicitly set, then try to open BSD label and its
first partition.


239231 13-Aug-2012 ae

Remove colons from the debug message, device name returned by the
disk_fmtdev() already has the colons.


239230 13-Aug-2012 ae

Unbreak booting from the true dedicated disks.
When we open the disk, check the type of partition table, that has
been detected. If this is BSD label, then we assume this is DD mode.

Reported by: dim@


239211 12-Aug-2012 ae

Add another debug message.


239210 12-Aug-2012 ae

Add more debug messages.


239127 07-Aug-2012 ae

As it turned out, there are some installations, where BSD label
contains partitions with type zero. And it has worked.
So, allow detect these partitions.

Reported by: glebius


239088 06-Aug-2012 ae

Fix start offset calculation for the EBR partitions.


239073 05-Aug-2012 ae

Bump USERBOOT_VERSION.

Requested by: dfr


239069 05-Aug-2012 nyan

Reduce diffs against i386.


239068 05-Aug-2012 ae

Teach the ZFS use new partitions API when probing.
Note: now ZFS does probe only for partitions with type "freebsd-zfs"
and "freebsd".


239067 05-Aug-2012 ae

Remove unneeded flag.


239066 05-Aug-2012 ae

Add offset field to the i386_devdesc structure to be compatible with
disk_devdesc structure. Update biosdisk driver to the new disk API.


239064 05-Aug-2012 nyan

Reduce diffs against i386.


239063 05-Aug-2012 nyan

MFi386: the part of r219452 and r236405.

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


239060 05-Aug-2012 ae

When GPT signature is invalid in the primary GPT header, then try to
read backup GPT header.

Submitted by: hrs (previous version)


239058 05-Aug-2012 ae

Introduce new API to work with disks from the loader's drivers.
It uses new API from the part.c to work with partition tables.

Update userboot's disk driver to use new API. Note that struct
loader_callbacks_v1 has changed.


239057 05-Aug-2012 ae

Remove unused variables.


239054 05-Aug-2012 ae

Create the interface to work with various partition tables from the
loader(8). The following partition tables are supported: BSD label, GPT,
MBR, EBR and VTOC8.


238851 27-Jul-2012 marius

Pull the tier-2 card and change the sparc64 ZFS loader to no longer probe
all diskN aliases for providers (which more or less corresponds to how the
x86 version behaves) but instead probe only those listed in the boot-device
OFW environment variable. This has the following advantages:
- avoids otherwise unavoidable OFW warnings about failures to open disks
for which aliases exist but no actual hardware is connected
- avoids issues due to different diskN naming schemes
- aligns us with Solaris

MFC after: 3 days


238795 26-Jul-2012 ache

Try to avoid all files dependence on the modification time of the large and
often modified directory created symbolic links points to - it cause
unnecessary full rebuilds each time make runs when directory is changed.
So do it only if symbolic link does not exists, which usually means that
objdir is clean anyway.

MFC after: 1 week


238463 15-Jul-2012 imp

Use the pin number rather than the hybrid pin number + name.


238431 14-Jul-2012 dteske

Fix domain.

Approved by: emaste


238188 07-Jul-2012 imp

Generalize this for loading the loader into the SPI. Plus trim about
100 bytes from the binary with silly tricks. Hope to get this small
enough to run on the models that have 4k SRAM. We are close compiled
for the at91rm9200, but still need to trim for the target.


238187 07-Jul-2012 imp

Allow other SOCs to be compiled in, first step.


238186 07-Jul-2012 imp

Strip out the useless junk. All we really care about is the text,
data and bss sections. All the rest is needed for normal binaries,
but boot loaders aren't normal.


237410 21-Jun-2012 delphij

MFV: Update zlib to 1.2.7.

(x86 assembler optimization disabled for now because it
requires the new .cfi_* directives that is not supported
by base system binutils).

MFC after: 1 week


237338 20-Jun-2012 jhb

Don't return an error if a kld does not contain any modules (e.g. a
kld that only contained a sysctl). The kernel linker allows such
modules, so the boot loader should not reject them.

MFC after: 2 weeks


237001 13-Jun-2012 mm

Fix ZFS boot with pre-features pools (version <= 28) broken in r236884

Reported by: mav
MFC after: 1 month


236884 11-Jun-2012 mm

Introduce "feature flags" for ZFS pools (bump SPA version to 5000).
Add first feature "com.delphix:async_destroy" (asynchronous destroy
of ZFS datasets).
Implement features support in ZFS boot code.

Illumos revisions merged:
13700:2889e2596bd6
13701:1949b688d5fb
2619 asynchronous destruction of ZFS file systems
2747 SPA versioning with zfs feature flags

References:
https://www.illumos.org/issues/2619
https://www.illumos.org/issues/2747

Obtained from: illumos (issue #2619, #2747)
MFC after: 1 month


236581 04-Jun-2012 marius

The loaddev environment variable is not modifiable once set, so it is not
update for ZFS. It seems that this does not really affect anything except
the help command. Nevertheless, rearrange things so loaddev is set only
once in all cases in order to get it right.
Pointed out by: avg

MFC after: r235364


236579 04-Jun-2012 marius

The workaround added in r151650 for handling firmwares that don't allow
a single device to be opened multiple times concurrently unfortunately
isn't sufficient with ZFS. This is due to the fact, that ZFS may open
different partitions of a single device simultaneously. So the best we
can do in this case is to cache the lastly used device path and close
and open devices in ofwd_strategy() as needed.

PR: 165025
Submitted by: Gavin Mu
MFC after: 1 week


236405 01-Jun-2012 jhb

Remove unnecessary initializations. The BSS of boot2 is in fact
zero'd when boot2 begins execution by the _start() routine in btxcsu.S.

MFC after: 1 week


236213 29-May-2012 kevlo

Make sure that each va_start has one and only one matching va_end,
especially in error cases.


236159 27-May-2012 kientzle

Allow the load address used by ARM ubldr to be set via Make argument.

In particular, this simplifies scripts that build system
images.


236024 25-May-2012 raj

Import DTS files for the upcoming DPAA QorIQ (PowerPC) support.

- P2041RDB
- P3041DS
- P5020DS

Obtained from: Freescale


235988 25-May-2012 gleb

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

Sponsored by: Google Summer of Code 2011


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


235779 22-May-2012 gber

Divide nand flash for DB6281 into two partitions. One for u-boot
and second one for general use.

Obtained from: Semihalf
Supported by: FreeBSD Foundation, Juniper Networks


235778 22-May-2012 gber

Add a new geom class which allows to divide NAND Flash chip
into partitions.

Partitions are created based on data in dts file which are
extracted and interpreted by slicer.

Obtained from: Semihalf
Supported by: FreeBSD Foundation, Juniper Networks


235694 20-May-2012 kientzle

Determine kernel load address dynamically from u-boot memory map.

The generic ELF loading code maps the kernel into low memory
by subtracting KERN_BASE. So the copyin/copyout/readin functions
are always called with low addresses. This code finds the largest
DRAM block from the U-Boot memory map and adds that base to
the addresses.

In particular, this fixes ubldr on AM3358, which has DRAM
mapped to 0x80000000 at power-on.


235609 18-May-2012 gber

Add architecture dependent code to support NAND Framework on Marvell SoCs.

Obtained from: Semihalf
Supported by: FreeBSD Foundation, Juniper Networks


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


235537 17-May-2012 gber

Import work done under project/nand (@235533) into head.

The NAND Flash environment consists of several distinct components:
- NAND framework (drivers harness for NAND controllers and NAND chips)
- NAND simulator (NANDsim)
- NAND file system (NAND FS)
- Companion tools and utilities
- Documentation (manual pages)

This work is still experimental. Please use with caution.

Obtained from: Semihalf
Supported by: FreeBSD Foundation, Juniper Networks


235529 17-May-2012 kientzle

Access the device tree blob via copyin/copyout.

The code previously assumed that copyin/copyout did no
address translation and that the device tree blob could
be manipulated in-place (with only a few adjustments for
the ELF loader offset). This isn't possible on all platforms,
so the revised code uses copyout() to copy the device tree
blob into a heap-allocated buffer and then updates the
device tree with copyout(). This isn't ideal, since it
bloats the loader memory usage, but seems the only feasible
approach (short of rewriting all of the fdt manipulation
routines).


235395 13-May-2012 avg

libpc98: unbreak after zfs-related changes in libi386 code

Pointyhat to: avg
MFC after: 1 month


235394 13-May-2012 avg

zfs boot: cleanup remnants of temporary compat code

MFC after: 1 month


235390 13-May-2012 avg

zfs boot code: mark spa_t arguments as const where they are used as such

MFC after: 1 month


235364 12-May-2012 avg

sparc64/zfs boot: take advantage of new libzfsboot capabilities

Also drop the now unneeded compatibility shims.

Tested by: marius
MFC after: 1 month


235361 12-May-2012 avg

zfs boot code: use %j and uintmax_t instead %ll and uint64_t in printfs

This is to silence warnings that result from different definitions of
uint64_t on different architectures, specifically i386 and sparc64.

MFC after: 1 month


235330 12-May-2012 avg

zfs boot: try to set vfs.root.mountfrom from currdev as a fallback

This way with the new zfsloader there is no need to explicitly set zfs
root filesystem either via vfs.root.mountfrom or fstab.
It should be automatically picked up from currdev which is by default
is set from bootfs.

Tested by: Florian Wagner <florian@wagner-flo.net> (x86)
MFC after: 1 month


235329 12-May-2012 avg

zfsboot/zfsloader: support accessing filesystems within a pool

In zfs loader zfs device name format now is "zfs:pool/fs",
fully qualified file path is "zfs:pool/fs:/path/to/file"
loader allows accessing files from various pools and filesystems as well
as changing currdev to a different pool/filesystem.

zfsboot accepts kernel/loader name in a format pool:fs:path/to/file or,
as before, pool:path/to/file; in the latter case a default filesystem
is used (pool root or bootfs). zfsboot passes guids of the selected
pool and dataset to zfsloader to be used as its defaults.

zfs support should be architecture independent and is provided
in a separate library, but architectures wishing to use this zfs support
still have to provide some glue code and their devdesc should be
compatible with zfs_devdesc.
arch_zfs_probe method is used to discover all disk devices that may
be part of ZFS pool(s).

libi386 unconditionally includes zfs support, but some zfs-specific
functions are stubbed out as weak symbols. The strong definitions
are provided in libzfsboot.
This change mean that the size of i386_devspec becomes larger
to match zfs_devspec.

Backward-compatibility shims are provided for recently added sparc64
zfs boot support. Currently that architecture still works the old
way and does not support the new features.

TODO:
- clear up pool root filesystem vs pool bootfs filesystem distinction
- update sparc64 support
- set vfs.root.mountfrom based on currdev (for zfs)

Mid-future TODO:
- loader sub-menu for selecting alternative boot environment

Distant future TODO:
- support accessing snapshots, using a snapshot as readonly root

Reviewed by: marius (sparc64),
Gavin Mu <gavin.mu@gmail.com> (sparc64)
Tested by: Florian Wagner <florian@wagner-flo.net> (x86),
marius (sparc64)
No objections: fs@, hackers@
MFC after: 1 month


235281 11-May-2012 dim

Fix sys/boot/i386/cdboot/cdboot.S compilation with clang after r235219.
This file uses .code16 directives, which are not yet supported by
clang's integrated assembler.

MFC after: 1 month


235272 11-May-2012 imp

Add support for passing in the board ID.

# This doesn't implement the full Linux boot ABI for arm yet.
# since there's no ATAGs list passed in for r2, and r0 has
# boot options rather than 0 as specified in the standard.
# Commited code to the tree won't touch any of this anyway, but
# future code may be able to use this.


235271 11-May-2012 imp

Hack to unbreak boot2 for at91rm9200 boot loader. When the at91sam
code came in, it moved things around which wound up breaking the
build. We have to do this bit of a hack to avoid duplication of a lot
of #defines.


235264 11-May-2012 avg

MFi386: improve argument passing via btxldr

use related definitions in i386 bootargs.h

Reviewed by: nyan, jhb
MFC after: 1 month


235261 11-May-2012 kientzle

Don't hang if there is no /cpus node in the device tree.


235219 10-May-2012 avg

cdboot, pxeldr: make use of bootargs.h instead of redefining flag constants

Reviewed by: jhb
MFC after: 1 month


235207 09-May-2012 marius

Use a non-tricky approach for building and installing zfsboot sharing
the Makefile with boot1.

Submitted by: ru


235158 09-May-2012 avg

r235154 followup: add stddef.h for offsetof

MFC after: 1 month


235156 09-May-2012 avg

i386 zfsloader: rename LIBZFS to LIBZFSBOOT

... to avoid name clash with the other libzfs

MFC after: 1 month


235155 09-May-2012 avg

i386 boot: consolidate MAXBDDEV definition

MFC after: 1 month


235154 09-May-2012 avg

btxldr: future-proof argument passing from boot1/2-ish to loader

Place the arguments at a fixed offset of 0x800 withing the argument area
(of size 0x1000). Allow variable size extended arguments first of which
should be a size of the extended arguments (including the size
parameter).

Consolidate all related definitions in a new i386/common/bootargs.h header.

Many thanks to jhb and bde for their guidance and reviews.

Reviewed by: jhb, bde
Approved by: jhb
MFC after: 1 month


235153 09-May-2012 avg

sys/boot: add common CTASSERT definition


235095 06-May-2012 kientzle

Ooops. Back out changes to main.c from r235094.

This change is specific to BeagleBone; I need to figure out how to
generalize this before committing.


235094 06-May-2012 kientzle

Don't call strcmp with a NULL pointer.

In particular, on the AM335x, which comes up with no memory
mapped to low addresses, dereferencing the NULL causes a crash.


234908 02-May-2012 kientzle

Remove some redundant register loads.

Discussed on: arm@


234898 01-May-2012 marius

Add initial support for booting from ZFS on sparc64. At least on Sun Fire
V100, the firmware is known to be broken and not allowing to simultaneously
open disk devices, causing attempts to boot from a mirror or RAIDZ to cause
a crash. This will be worked around later. The firmwares of newer sun4u models
don't seem to exhibit this problem though.

Steps for ZFS booting:

1. create VTOC8 label
# gpart create -s vtoc8 da0

2. add partitions, f.e.:
# gpart add -t freebsd-zfs -s 60g da0
# gpart add -t freebsd-swap da0
resulting in something like:
# gpart show
=> 0 143331930 da0 VTOC8 (68G)
0 125821080 1 freebsd-zfs (60G)
125821080 17510850 2 freebsd-swap (8.4G)

3. create zpool
# zpool create bunker da0a
or for mirror/RAIDZ (after preparing additional disks as in steps 1. + 2.):
# zpool create bunker mirror da0a da1a
# zpool create bunker raidz da0a da1a da2a ...

4. set bootfs
# zpool set bootfs=bunker bunker

5. install zfsboot
# zpool export bunker
# gpart bootcode -p /boot/zfsboot da0

6. write zfsloader to the ZFS Boot Block (so far, there's no dedicated tool
for this, so dd(1) has to be used for this purpose)
When using mirror/RAIDZ, step 4. and the dd(1) invocation should be repeated
for the additional disks in order to be able to boot from another disk in
case of failure.
# sysctl kern.geom.debugflags=0x10
# dd if=/boot/zfsloader of=/dev/da0a bs=512 oseek=1024 conv=notrunc
# zpool import bunker

7. install system on ZFS filesystem
Don't forget to set 'zfs_load="YES"' and vfs.root.mountfrom="zfs:bunker" in
loader.conf as well as 'zfs_enable="YES"'in rc.conf.

8. copy zpool.cache to the ZFS filesystem
cp -p /boot/zfs/zpool.cache /bunker/boot/zfs/zpool.cache

9. set mountpoint
# zfs set mountpoint=/ bunker

10. Now, given that aliases for all disks in the zpool exists (check with
the `devalias` command on the boot monitor prompt) and disk0 corresponds
to da0 (likewise for additional disks), the system can be booted from the
ZFS with:
{1} ok boot disk0

PR: 165025
Submitted by: Gavin Mu


234897 01-May-2012 marius

Add a command for showing the heap usage.

PR: 165025
Submitted by: Gavin Mu
MFC after: 1 week


234860 01-May-2012 kientzle

Teach ubldr(8) about simple MBR partitioning.


234789 29-Apr-2012 marius

Add multiple inclusion protection.

PR: 165025
Submitted by: Gavin Mu
MFC after: 1 week


234493 20-Apr-2012 marcel

Build a 32-bit EFI loader on amd64. This to match the rest of the
code that is used to construct a loader (e.g. libstand, ficl, etc).

There is such a thing as a 64-bit EFI application, but it's not
as standard as 32-bit is. Let's make the 32-bit functional (as in
we can load and actualy boot a kernel) before solving the 64-bit
loader problem.


234339 16-Apr-2012 avg

zfsboot: honor -q if it's present in boot.config

Before r228267 the option was honored but the original content of
boot.config was not preserved. I tried to fix that but missed the idea.
Now the proper way of doing things is taken from i386/boo2.
Also, a comment is added to explain this a little bit unobvious
behavior.

Inspired by: jhb
MFC after: 5 days


234176 12-Apr-2012 ae

Read backup GPT header from the last LBA only when primary GPT header and
table aren't valid. If they are ok, use hdr_lba_alt value to read backup
header. This will make gptboot happy when GPT used atop of some GEOM
provider, e.g. GEOM_MIRROR.

Reviewed by: pjd
MFC after: 2 weeks


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)


233666 29-Mar-2012 nwhitehorn

Fix build after changes to trap headers.


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


233517 26-Mar-2012 marius

Remove second consts in r233288 in order to appease C++ compilers.
While at it, remove some style(9) bugs in libkern.h.

Submitted by: kan


233323 22-Mar-2012 raj

Improve FDT handling in loader(8) and make it more robust.

o Fix buffer overflows when using a long property body in node paths.
o Fix loop end condition when iterating through the symbol table.
o Better error handling during node modification, better problem reporting.
o Eliminate build time warnings.

Submitted by: Lukasz Wojcik
Obtained from: Semihalf
MFC after: 1 week


233288 21-Mar-2012 marius

Declare the CRC lookup-tables const as they hardly should change at
run-time.


233287 21-Mar-2012 marius

Use the common/shared CRC-32 implementation instead of duplicating it.

MFC after: 1 week


233230 20-Mar-2012 raj

Improve device tree blob (DTB) handling in loader(8).

Enable using the statically embedded blob from the kernel, if present. The KLD
loaded DTB takes precedence, but they are both recognized and handled in the
same way.

Submitted by: Lukasz Wojcik
Obtained from: Semihalf
MFC after: 1 week


233105 18-Mar-2012 marius

Declare some variables static in order to reduce the object size and
redo r232822 in a less hackish way. The latter now no longer breaks
compiling the x86 boot2 with clang.

MFC after: 1 week


232822 11-Mar-2012 marius

Fix a bug introduced in r223938; on big-endian machines coping a 32-bit
quantum bytewise to the address of a 64-bit variable results in writing
to the "wrong" 32-bit half so adjust the address accordingly. This fix
is implemented in a hackish way for two reasons:
o in order to be able to get it into 8.3 with zero impact on the little-
endian architectures where this bug has no effect and
o to avoid blowing the x86 boot2 out of the water again when compiling
it with clang, which all sane versions of this fix tested do.
This change fixes booting from UFS1 file systems on big-endian machines.

MFC after: 3 days


232784 10-Mar-2012 nyan

MFi386: revisions 232570 and 232754

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


232754 09-Mar-2012 jkim

Make boot2 build with Clang again.

Submitted by: dim (bsd.sys.mk)
Reviewed by: dim, jhb


232623 06-Mar-2012 jhb

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


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


232570 05-Mar-2012 jhb

Fix boot2 to handle boot config files that only contain a custom path to
a loader or kernel. Specifically, kname cannot be pointed at cmd[] since
it's value is change to be an empty string after the initial call to
parse, and cmd[]'s value can be changed (thus losing a prior setting for
kname) due to user input at the boot prompt. While here, ensure that that
initial boot config file text is nul-terminated, that ops is initialized
to zero, and that kname is always initialized to a valid string.

Tested by: Domagoj Smolcic rank1seeker of gmail
MFC after: 1 week


232518 04-Mar-2012 raj

Respect phy-handle property in Ethernet nodes of the device tree.

This lets specify whereabouts of the parent PHY for a given MAC node
(and get rid of ugly kludges in mge(4) and tsec(4)).

Obtained from: Semihalf
MFC after: 1 week


232309 29-Feb-2012 jkim

Fix a long standing bug. The caller expects a non-zero value for success.
Luckily keyboard probing was turned off by default from the first revision.

Submitted by: Alexander Sack (asack at niksun dot com)
MFC after: 3 days


232263 28-Feb-2012 dim

Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to
get rid of testing explicitly for clang (using ${CC:T:Mclang}) in
individual Makefiles.

Instead, use the following extra macros, for use with clang:
- NO_WERROR.clang (disables -Werror)
- NO_WCAST_ALIGN.clang (disables -Wcast-align)
- NO_WFORMAT.clang (disables -Wformat and friends)
- CLANG_NO_IAS (disables integrated assembler)
- CLANG_OPT_SMALL (adds flags for extra small size optimizations)

As a side effect, this enables setting CC/CXX/CPP in src.conf instead of
make.conf! For clang, use the following:

CC=clang
CXX=clang++
CPP=clang-cpp

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


231852 17-Feb-2012 bz

Merge multi-FIB IPv6 support from projects/multi-fibv6/head/:

Extend the so far IPv4-only support for multiple routing tables (FIBs)
introduced in r178888 to IPv6 providing feature parity.

This includes an extended rtalloc(9) KPI for IPv6, the necessary
adjustments to the network stack, and user land support as in netstat.

Sponsored by: Cisco Systems, Inc.
Reviewed by: melifaro (basically)
MFC after: 10 days


231810 16-Feb-2012 nwhitehorn

Make sure to synchronize icache for the newly loaded loader. Not an issue
on most systems, when the relevant icache lines are not full.

MFC after: 2 weeks


231387 10-Feb-2012 nyan

Reduce diffs against i386.

MFC after: 1 week


231042 05-Feb-2012 rpaulo

Fix clang warnings.


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


230522 25-Jan-2012 nwhitehorn

Experimental support for booting CHRP-type PowerPC systems from hard disks.


230325 19-Jan-2012 sbruno

Wrap changes from svn r212126 inside LOADER_NFS_SUPPORT such that
using LOADER_TFTP_SUPPORT excludes this code. Fixes compilation of pxeldr
with -DLOADER_TFTP_SUPPORT

Applicable to stable/9 and stable/8 now.

This appears to not be needed on stable/7 as r212126 has not been MFC'd.

Obtained from: Yahoo! Inc.
MFC after: 2 weeks


230140 15-Jan-2012 nwhitehorn

Fix some unreliability problems related to MSR bits inherited from kboot by
setting an absolute MSR when during on the MMU. This prevents delay(), in
particular, from intermittently malfunctioning.


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


229771 07-Jan-2012 kib

Document comconsole_port and comconsole_pcidev loader variables.

MFC after: 2 weeks


229463 04-Jan-2012 nyan

MFi386: revision 229435

Add special loader environment variables 'comconsole_port' and
'comconsole_pcidev'.

MFC after: 2 weeks


229462 04-Jan-2012 nyan

Fix 230MB MO support.

Submitted by: Kaho Toshikazu
MFC after: 1 week


229435 03-Jan-2012 kib

Add special loader environment variables 'comconsole_port' and
'comconsole_pcidev'. The former allows to set the base address of the
serial console i/o port. The later takes the string of the format
'bus:device:function:[bar]' as a value and uses the serial port attached
as PCI device at the specified location for console.

Both variants pass 'hw.uart.console' variable to the uart driver to
properly hand-over the kernel console.

Change allows to use ISA serial ports other than COM1 for the
loader/kernel console without loader recompilation. Also, you can use
PCI-attached port as the console, e.g. Intel AMT serial pseudo-port on
some motherboards based on Q67 chipset.

Reviewed by: jhb
MFC after: 2 weeks


229403 03-Jan-2012 ed

Replace index() and rindex() calls with strchr() and strrchr().

The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.

This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.


229368 03-Jan-2012 ed

Merge index() and strchr() together.

As I looked through the C library, I noticed the FreeBSD MIPS port has a
hand-written version of index(). This is nice, if it weren't for the
fact that most applications call strchr() instead.

Also, on the other architectures index() and strchr() are identical,
meaning we have two identical pieces of code in the C library and
statically linked applications.

Solve this by naming the actual file strchr.[cS] and let it use
__strong_reference()/STRONG_ALIAS() to provide the index() routine. Do
the same for rindex()/strrchr().

This seems to make the C libraries and static binaries slightly smaller,
but this reduction in size seems negligible.


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


228916 27-Dec-2011 pluknet

Clean up from the 4.x era.

In an example of boot command:
- rename wd(4) IDE disk drives name to ad(4) for the time being.
- update the used kernel path "/kernel" to the current default.
[It still worked occasionally by looking into the /boot/kernel directory,
so the resulting path was "/boot//kernel/kernel", with two slashes.]

Bump .Dd for this and previous changes.

MFC after: 1 week


228782 21-Dec-2011 ed

Make the RTC checking for QEMU even more aggressive.

At work, where we use use KVM+QEMU, we notice that pxeboot is pratically
impossible because of network timeouts. This is due to the fact that the
RTC code makes aggressive jumps.

Two RTC reads does not seem to be sufficient. Change the code to check
for 8 identical RTC values.

Sponsored by: Kumina bv


228738 20-Dec-2011 jhb

Allow boot0cfg to force a PXE boot via boot0 on the next boot.
- Fix boot0 to check for PXE when using the pre-set setting for the
preferred slice.
- Update boot0cfg to use slice 6 to select PXE. Accept a 'pxe' argument
instead of a number for the 's' option as a way to select PXE as well.

Submitted by: Andrew Boyer aboyer averesystems
MFC after: 2 weeks


228576 16-Dec-2011 glebius

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


228471 13-Dec-2011 ed

Replace `inline static' by `static inline'.

If I interpret the C standard correctly, the storage specifier should be
placed before the inline keyword. While at it, replace __inline by
inline in the files affected.


228267 04-Dec-2011 avg

zfsboot: print boot.config contents before parsing it

as parsing can be a destructive operation

MFC after: 2 weeks


228266 04-Dec-2011 avg

zfs boot: allow file vdevs to be used in testing (e.g. with zfsboottest)

MFC after: 1 week


227739 19-Nov-2011 andreast

Rename the linker emulation name for powerpc and powerc64. This is needed that
we can also use the upstream binutils linker where we have to have a unique
name for the FreeBSD emulation.


227730 19-Nov-2011 raj

Initial version of cesa(4) driver for Marvell crypto engine and security
accelerator.

The following algorithms and schemes are supported:
- 3DES, AES, DES
- MD5, SHA1

Obtained from: Semihalf
Written by: Piotr Ziecik


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


227726 19-Nov-2011 miwi

- Whitespaces fixed only

Approved by: rwatson (mentor)


227629 17-Nov-2011 marcel

Wire the kernel text RWX, rather than RX. We're not quite ready
for having kernel text non-writable, because we still need to
apply relocations. On top of that, the PBVM page table has all
pages marked as RWX, so it's an inconsistency to begin with.


227613 17-Nov-2011 raj

Add DTS for the Freescale P2020DS.

Obtained from: Freescale


227508 14-Nov-2011 marcel

Add DTS for the Freescale P1020RDB.


227506 14-Nov-2011 marcel

Add DTS for the Freescale P3041DS.


227389 09-Nov-2011 jhb

Revert some debugging printfs that crept into 223695.


227056 03-Nov-2011 pluknet

Remove the remnants of /stand/sysinstall.

loader.8: Sync the default init_path list with kern/init_main.c.

NOTES: Replace with /rescue/init in the INIT_PATH kernel option.


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


226748 25-Oct-2011 jhb

- Add a new header for the x86 boot code that defines various structures
and constants related to the BIOS Enhanced Disk Drive Specification.
- Use this header instead of magic numbers and various duplicate structure
definitions for doing I/O.
- Use an actual structure for the request to fetch drive parameters in
drvsize() rather than a gross hack of a char array with some magic
size. While here, change drvsize() to only pass the 1.1 version of
the structure and not request device path information. If we want
device path information you have to set the length of the device
path information as an input (along with probably checking the actual
EDD version to see which size one should use as the device path
information is variable-length). This fixes data smashing problems
from passing an EDD 3 structure to BIOSes supporting EDD 4.

Reviewed by: avg
Tested by: Dennis Koegel dk neveragain.de
MFC after: 1 week


226746 25-Oct-2011 jhb

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


226569 20-Oct-2011 pjd

With LOADER_MBR_SUPPORT defined and LOADER_GPT_SUPPORT undefined we would
never call disk_openmbr().

Submitted by: avg
MFC after: 3 days


226568 20-Oct-2011 pjd

- Correctly read gang header from raidz.
- Decompress assembled gang block data if compressed.
- Verify checksum of a gang header.
- Verify checksum of assembled gang block data.
- Verify checksum of uber block.

Submitted by: avg
MFC after: 3 days


226554 19-Oct-2011 pjd

Fix missing return when LOADER_GPT_SUPPORT is defined, but LOADER_MBR_SUPPORT
is not.

MFC after: 3 days


226553 19-Oct-2011 pjd

Always pass data size for checksum verification function, as using
physical block size declared in bp may not always be what we want.
For example in case of gang block header physical block size declared
in bp is much larger than SPA_GANGBLOCKSIZE (512 bytes) and checksum
calculation failed. This bug could lead to accessing unallocated
memory and resets/failures during boot.

MFC after: 3 days


226552 19-Oct-2011 pjd

Never pass NULL block pointer when reading. This is neither expected nor
handled by lower layers like vdev_raidz, which uses bp for checksum
verification. This bug could lead to NULL pointer reference and resets
during boot.

MFC after: 3 days


226551 19-Oct-2011 pjd

Don't mark vdev as healthy too soon, so we won't try to use invalid vdevs.

MFC after: 3 days


226506 18-Oct-2011 des

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

MFC after: 3 weeks


226501 18-Oct-2011 jchandra

Support for booting XLP using FDT.

- update xlp_machdep.c to read arguments from FDT if FDT support is
compiled in.
- define rmi_uart_bus_space, and use it as fdtbus_bs_tag
- update conf files for FDT support
- add default dts file xlp-basic.dts


226436 16-Oct-2011 eadler

- change "is is" to "is" or "it is"
- change "the the" to "the"

Approved by: lstewart
Approved by: sahil (mentor)
MFC after: 3 days


225955 04-Oct-2011 thompsa

Allow ixp425 boot2 to compile after r219452


225608 16-Sep-2011 avg

zfstest: rename to zfsboottest and move to tools

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


225530 13-Sep-2011 avg

gpt/zfs boot blocks: reduce optimizing CFLAGS to -O1

gpt and zfs boot blocks are not nearly as size-constrained as boot2
from which they inherited their current optimization and anti-optimization
options. As such the current options do not provide any benefit, but
make debugging of the code much harder.
Also, it has been demonstrated that combination of -mrtd and
-fno-unit-at-a-time may result in mis-compilation of the boot code
with the current base gcc.

Additionally, intermediate assembly file filtering is removed for
zfsboot.

The new boot blocks are all compile- and boot- tested using qemu.
gptzfsboot is tested with real hardware.

Reported by: Peter Jeremy <peterjeremy@acm.org> [miscompilation]
Discussed with: bde, jhb
Tested by: Sebastian Chmielewski <chmielsster@gmail.com> [gptzfsboot]
Approved by: re (kib)
MFC after: 3 weeks


225529 13-Sep-2011 avg

zfstest: cleanup the code, improve functionality and diagnostics

The utility is not connected to the build, so it should be safe
to update it.
To do: move the utility to tools/.
Some code is provided by Peter Jeremy <peterjeremy@acm.org>

Tested by: Sebastian Chmielewski <chmielsster@gmail.com>,
Peter Jeremy <peterjeremy@acm.org> (earlier versions)
Approved by: re (kib)
MFC after: 4 days


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


224857 14-Aug-2011 nwhitehorn

Add support for the Blu-Ray drive found in the Sony Playstation 3 and fix
some realted minor bugs in PS3 internal storage support.

Submitted by: glevand <geoffrey.levand@mail.ru>
Approved by: re (bz)


224722 08-Aug-2011 dim

Fix buffer overflow in sys/boot/common/util.c's printf(), when printing
large (>= 10^10) numbers. In theory, 20 characaters should be enough,
but bump the buffer to 32 characters, so we have some room for the
future.

Reviewed by: pjd
Approved by: re (kib)


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


224131 17-Jul-2011 dim

When building some of the boot loaders with clang, and DEBUG_FLAGS or
CFLAGS having '-g' in it, clang outputs several assembly directives that
are too new for our version of binutils.

Therefore, assemble the resulting .s files with clang instead. A more
general solution can be implemented when a GNU as-compatible driver for
clang's integrated assembler appears.

Reported by: dougb


224106 16-Jul-2011 nwhitehorn

Add support for booting PS3s from disk. This is still a little hackish until
we can find a way to get the information from petitboot or to guess it, so
the current algorithm is:

1. See if ps3disk3p1 (first GPT slice on OtherOS partition) exists, and if
so try to boot it.
2. Otherwise, netboot.

Submitted by: glevand <geoffrey.levand at mail dot ru >


223938 11-Jul-2011 marius

Since r219452 the alignment of __dmadat has changed, revealing that fsread()
bogusly casts its contents around causing alignment faults on sparc64 and
most likely also on at least powerpc. Fix this by copying the contents
bytewise instead as partly already done here. Solving this the right way
costs some space, i.e. 148 bytes with GCC and 16 bytes with clang on x86
there are still some bytes left there though, and an acceptable hack which
tricks the compiler into only using a 2-byte alignment instead of the native
one when accessing the contents turned out to even take up more space that.


223758 04-Jul-2011 attilio

With retirement of cpumask_t and usage of cpuset_t for representing a
mask of CPUs, pc_other_cpus and pc_cpumask become highly inefficient.

Remove them and replace their usage with custom pc_cpuid magic (as,
atm, pc_cpumask can be easilly represented by (1 << pc_cpuid) and
pc_other_cpus by (all_cpus & ~(1 << pc_cpuid))).

This change is not targeted for MFC because of struct pcpu members
removal and dependency by cpumask_t retirement.

MD review by: marcel, marius, alc
Tested by: pluknet
MD testing by: marcel, marius, gonzo, andreast


223719 02-Jul-2011 marius

- For Cheetah- and Zeus-class CPUs don't flush all unlocked entries from
the TLBs in order to get rid of the user mappings but instead traverse
them an flush only the latter like we also do for the Spitfire-class.
Also flushing the unlocked kernel entries can cause instant faults which
when called from within cpu_switch() are handled with the scheduler lock
held which in turn can cause timeouts on the acquisition of the lock by
other CPUs. This was easily seen with a 16-core V890 but occasionally
also happened with 2-way machines.
While at it, move the SPARC64-V support code entirely to zeus.c. This
causes a little bit of duplication but is less confusing than partially
using Cheetah-class bits for these.
- For SPARC64-V ensure that 4-Mbyte page entries are stored in the 1024-
entry, 2-way set associative TLB.
- In {d,i}tlb_get_data_sun4u() turn off the interrupts in order to ensure
that ASI_{D,I}TLB_DATA_ACCESS_REG actually are read twice back-to-back.

Tested by: Peter Jeremy (16-core US-IV), Michael Moll (2-way SPARC64-V)


223712 01-Jul-2011 marius

Fix r223695 to compile on architectures which don't use the MBR scheme; wrap
the MBR support in the common part of the loader in #ifdef's and enable it
only for userboot for now.


223695 30-Jun-2011 dfr

Add a version of the FreeBSD bootloader which can run in userland, packaged
as a shared library. This is intended to be used by BHyVe to load FreeBSD
kernels into new virtual machines.


223611 27-Jun-2011 jhb

Revert the entry point label to 'start' to unbreak the build.

Pointy hat to: jhb


223597 27-Jun-2011 jhb

- Remove the fake BPB from zfsldr. zfsldr doesn't support booting from
floppies, so it will not be used as the start of an emulated floppy
image on a bootable CD which is what the fake BPB was used for.
- Only check that EDD packet mode is available once at the start of
zfsldr rather than for each disk sector now that we read data in one
sector at a time. As a result, collapse the remaining bits of read
up into nread and rename nread to read.
- Restore a return at the end of putstr that I removed in the previous
revision.

Tested by: Henri Hennebert (earlier version)
MFC after: 1 week


223539 25-Jun-2011 marius

As with EFI, OFW and U-Boot etc only compile FDT support on those
architectures that actually use it.


223477 23-Jun-2011 jhb

The recent change to increase the zfsboot size to 64k made a few BIOSes
unhappy (probably they don't handle crossing the 64k boundary, etc.).
Fix this by changing zfsldr to use a loop reading from the disk one
sector at a time. To avoid trashing the saved copy of the MBR which is
used for disk I/O, read zfsboot2 at address 0x9000. This has the
advantage that BTX no longer needs to be relocated as it is read into
the correct location. However, the loop to relocate zfsboot2.bin can
now cross a 64k boundary, so change it to use relative segments instead.
(This will need further work if zfsboot2.bin ever exceeds 64k.)

While here, stop storing a relocated copy of zfsldr at 0x700. This was
only used by the xread hack which has recently been removed (and even
that use was dubious). Also, include the BIOS error code as hex when
reporting read errors to aid in debugging.

Much thanks to Henri Hennebert for patiently testing various iterations
of the patch as well as fixing the zfsboot2.bin relocation to use
relative segments.

MFC after: 1 week


223295 19-Jun-2011 kan

Minimize backward seeks when trying to load ELF relocatable modules.

Some of loader filesystems are very ill equipped to handle seeking
backwards within the file. Namely, tftp requires trasfer to be
restarted from the start of the file every time we go backwards.


223262 18-Jun-2011 benl

Fix clang warnings.

Approved by: philip (mentor)


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


223017 12-Jun-2011 dim

Upgrade our copy of llvm/clang to r132879, from upstream's trunk.


222813 07-Jun-2011 attilio

etire the cpumask_t type and replace it with cpuset_t usage.

This is intended to fix the bug where cpu mask objects are
capped to 32. MAXCPU, then, can now arbitrarely bumped to whatever
value. Anyway, as long as several structures in the kernel are
statically allocated and sized as MAXCPU, it is suggested to keep it
as low as possible for the time being.

Technical notes on this commit itself:
- More functions to handle with cpuset_t objects are introduced.
The most notable are cpusetobj_ffs() (which calculates a ffs(3)
for a cpuset_t object), cpusetobj_strprint() (which prepares a string
representing a cpuset_t object) and cpusetobj_strscan() (which
creates a valid cpuset_t starting from a string representation).
- pc_cpumask and pc_other_cpus are target to be removed soon.
With the moving from cpumask_t to cpuset_t they are now inefficient
and not really useful. Anyway, for the time being, please note that
access to pcpu datas is protected by sched_pin() in order to avoid
migrating the CPU while reading more than one (possible) word
- Please note that size of cpuset_t objects may differ between kernel
and userland. While this is not directly related to the patch itself,
it is good to understand that concept and possibly use the patch
as a reference on how to deal with cpuset_t objects in userland, when
accessing kernland members.
- KTR_CPUMASK is changed and now is represented through a string, to be
set as the example reported in NOTES.

Please additively note that no MAXCPU is bumped in this patch, but
private testing has been done until to MAXCPU=128 on a real 8x8x2(htt)
machine (amd64).

Please note that the FreeBSD version is not yet bumped because of
the upcoming pcpu changes. However, note that this patch is not
targeted for MFC.

People to thank for the time spent on this patch:
- sbruno, pluknet and Nicholas Esborn (nick AT desert DOT net) tested
several revision of the patches and really helped in improving
stability of this work.
- marius fixed several bugs in the sparc64 implementation and reviewed
patches related to ktr.
- jeff and jhb discussed the basic approach followed.
- kib and marcel made targeted review on some specific part of the
patch.
- marius, art, nwhitehorn and andreast reviewed MD specific part of
the patch.
- marius, andreast, gonzo, nwhitehorn and jceel tested MD specific
implementations of the patch.
- Other people have made contributions on other patches that have been
already committed and have been listed separately.

Companies that should be mentioned for having participated at several
degrees:
- Yahoo! for having offered the machines used for testing on big
count of CPUs.
- The FreeBSD Foundation for having sponsored my devsummit attendance,
which has been instrumental.
- Sandvine for having offered offices and infrastructure during
development.

(I really hope I didn't forget anyone, if it happened I apologize in
advance).


222799 07-Jun-2011 marcel

o Bump the EFI loader version to 3.1.
o Add the about, pbvm and reboot commands.
o Trim the banner (suppress maker and date).


222798 07-Jun-2011 marcel

Add ia64_sync_icache() and use it to make the I-cache coherent
after loading the kernel's text segment. The kernel will do the
same for loaded modules, so don't worry about that.


222599 02-Jun-2011 uqs

mdoc: fix markup


222472 30-May-2011 julian

Include forgotten framework changes to get some of the new menu files installed correctly on non x86/amd systems.
pointy-hut to devin


222450 29-May-2011 andreast

Add some missing files. Without we hang in the OF prompt asking for screen.4th.

Approved by: nwhitehorn (mentor)


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


221869 14-May-2011 attilio

Disconnect sun4v architecture from the three.

Some files keep the SUN4V tags as a code reference, for the future,
if any rewamped sun4v support wants to be added again.

Reviewed by: marius
Tested by: sbruno
Approved by: re


221601 07-May-2011 avg

a whitespace nit

Reminder from: kib
MFC after: 4 days


221593 07-May-2011 avg

a whitespace nit

MFC after: 4 days


221506 05-May-2011 dim

Fine-tune llvm optimization for sys/boot/i386/boot2, which shaves off
some more bytes from the final boot2 image.

Submitted by: rdivacky


221356 03-May-2011 marcel

Fix corner case where the size is a power of two.


221348 02-May-2011 dim

Clang r130700 can now compile sys/boot/i386/boot2 with room to spare.


221269 30-Apr-2011 marcel

Turn PBVM page table entries into PTEs so that they can be inserted
into the TLB as-is.

While here, have ia64_platform_alloc() return ~0UL on failure.


221177 28-Apr-2011 jhb

Due to space constraints, the UFS boot2 and boot1 use an evil hack where
boot2 calls back into boot1 to perform disk reads. The ZFS MBR boot blocks
do not have the same space constraints, so remove this hack for ZFS.
While here, remove commented out code to support C/H/S addressing from
zfsldr. The ZFS and GPT bootstraps always just use EDD LBA addressing.

MFC after: 2 weeks


220924 21-Apr-2011 ae

Remove all object files during 'make clean'.

MFC after: 1 week


220685 16-Apr-2011 nyan

MFi386: revisions 220389 and 220392

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


220653 15-Apr-2011 philip

Add basic support for the Marvell Orion TS-7800.

Submitted by: Kristof Provost <kristof -at- freebsd.org>


220594 13-Apr-2011 pluknet

Remove the now defunct kern.ipc.nmbufs tunable.

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


220392 06-Apr-2011 rdivacky

Move getc() body before xgetc() so gcc does not emit a warning about function
having no body.

Approved by: jhb


220389 06-Apr-2011 rdivacky

Mark getc() as inline, this has no effect on gcc but helps clang.

Approved by: jhb


220361 05-Apr-2011 nyan

MFi386: revision 220337

Build boot2 with -mregparm=3.


220337 04-Apr-2011 rdivacky

Build boot2 with -mregparm=3, ie. pass upto 3 arguments via registers.
This modifies CFLAGS and tweaks sio.S to use the new calling convention.
The sio_init() and sio_putc() prototypes are modified so that other
users of this code know the correct calling convention.

This makes the code smaller when compiled with clang.

Reviewed by: jhb
Tested by: me and Freddie Cash <fjwcash gmail com>


220332 04-Apr-2011 marcel

Fix a long standing bug where file_load() passes down the global loadaddr
to the l_load() method in the file_formats structure, while being passed
an address as an argument (dest). With file_load() calling arch_loadaddr()
now, this bug is a little bit more significant.

Spotted by: nyan@ (nice catch!)


220313 04-Apr-2011 marcel

Use the new arch_loadaddr I/F to align ELF objects to PBVM page
boundaries. For good measure, align all other objects to cache
lines boundaries.

Use the new arch_loadseg I/F to keep track of kernel text and
data so that we can wire as much of it as is possible. It is
the responsibility of the kernel to link critical (read IVT
related) code and data at the front of the respective segment
so that it's covered by TRs before the kernel has a chance to
add more translations.

Use a better way of determining whether we're loading a legacy
kernel or not. We can't check for the presence of the PBVM page
table, because we may have unloaded that kernel and loaded an
older (legacy) kernel after that. Simply use the latest load
address for it.


220311 03-Apr-2011 marcel

Add 2 new archsw interfaces:
1. arch_loadaddr - used by platform code to adjust the address at which
the object gets loaded. Implement PC98 using this new interface instead
of using conditional compilation. For ELF objects the ELF header is
passed as the data pointer. For raw files it's the filename. Note that
ELF objects are first considered as raw files.
2. arch_loadseg - used by platform code to keep track of actual segments,
so that (instruction) caches can be flushed or translations can be
created. Both the ELF header as well as the program header are passed
to allow platform code to treat the kernel proper differently from any
additional modules and to have all the relevant details of the loaded
segment (e.g. protection).


220290 03-Apr-2011 marcel

Revert rev 165325. The arch_maphint interface hasn't been in use for
more than 4 years.


220283 03-Apr-2011 marcel

Make the ski loader functional again after the previous set of changes.


219960 24-Mar-2011 nyan

MFi386: the part of 219452

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


219703 16-Mar-2011 ae

The size of zfsboot2 grown up to 64 Kbytes in r219089.
Increase NSECT up to 128 sectors too.

Reviewed by: jhb, pjd


219702 16-Mar-2011 ae

Set control flags in putc(). This should fix zfsboot hangs in drvread().

PR: kern/153552
Reviewed by: jhb
MFC after: 1 week


219691 16-Mar-2011 marcel

MFaltix:
Add support for Pre-Boot Virtual Memory (PBVM) to the loader.

PBVM allows us to link the kernel at a fixed virtual address without
having to make any assumptions about the physical memory layout. On
the SGI Altix 350 for example, there's no usuable physical memory
below 192GB. Also, the PBVM allows us to control better where we're
going to physically load the kernel and its modules so that we can
make sure we load the kernel in memory that's close to the BSP.

The PBVM is managed by a simple page table. The minimum size of the
page table is 4KB (EFI page size) and the maximum is currently set
to 1MB. A page in the PBVM is 64KB, as that's the maximum alignment
one can specify in a linker script. The bottom line is that PBVM is
between 64KB and 8GB in size.

The loader maps the PBVM page table at a fixed virtual address and
using a single translations. The PBVM itself is also mapped using a
single translation for a maximum of 32MB.

While here, increase the heap in the EFI loader from 512KB to 2MB
and set the stage for supporting relocatable modules.


219683 16-Mar-2011 marcel

Revert previous commit: EFI_STATUS is a 64-bit integral on ia64. Fix the
compile warning on i386 (where EFI_STATUS is a 32-bit integral) by casting
the status argument to u_long instead.

Pointy hat: brucec
MFC after: 3 days


219647 14-Mar-2011 davidch

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

MFC after: One month


219483 11-Mar-2011 jhb

Remove all object files during 'make clean'.

PR: kern/154888
Submitted by: arundel
MFC after: 1 week


219452 10-Mar-2011 rdivacky

Some more shrinking.

o bunch of variables are turned into uint8_t

o initial setting of namep[] in lookup() is removed
as it's only overwritten a few lines down

o kname is explicitly initialized in main() as BSS
in boot2 is not zeroed

o the setting and reading of "fmt" in load() is removed

o buf in printf() is made static to save space

Reviewed by: jhb
Tested by: me and Fabian Keil <freebsd-listen fabiankeil de>


219225 03-Mar-2011 nyan

MFi386: revision 219186

This patch shrinks boot2 a little.

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


219186 02-Mar-2011 rdivacky

This patch shrinks boot2 a little.

o It switches kname to be just a pointer instead of an array
thus avoiding a couple of memcpy()s.

o It changes ioctl to unsigned from uint8_t.

o It changes the second keyhit limit to 3 seconds from 5
so that constant propagation can take place.

o It changes the ticks overflow computation as suggested by bde@.

o It removes bi_basemem/bi_extmem/bi_memsizes_valid setting from
bootinfo as it is unused.

Reviewed by: jhb


219126 01-Mar-2011 brucec

Remove duplicate "in".

Suggested by: Rob Farmer <rfarmer at predatorlabs.net>
MFC after: 3 days


219096 28-Feb-2011 brucec

Revert some of r177626. "in in" is valid in certain sentences.

PR: 121490
MFC after: 3 days


219089 27-Feb-2011 pjd

Finally... Import the latest open-source ZFS version - (SPA) 28.

Few new things available from now on:

- Data deduplication.
- Triple parity RAIDZ (RAIDZ3).
- zfs diff.
- zpool split.
- Snapshot holds.
- zpool import -F. Allows to rewind corrupted pool to earlier
transaction group.
- Possibility to import pool in read-only mode.

MFC after: 1 month


219083 27-Feb-2011 pjd

Rename bcpy() macro to bcopy().


219079 27-Feb-2011 dim

Clang's integrated assembler can now handle sys/boot/i386/boot2/sio.S.
It used to choke on the notation "inb (%dx),%al" for "inb %dx,%al"; GNU
as accepts both forms. Which notation is more 'correct' is an open
question. :)


218974 23-Feb-2011 brucec

Handle memory allocation failures in include().

PR: i386/85652
Submitted by: Ben Thomas <bthomas at virtualiron.com>
MFC after: 3 days


218946 22-Feb-2011 nyan

MFi386: revision 218926

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

Submitted by: rdivacky


218926 21-Feb-2011 dim

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

Submitted by: rdivacky


218909 21-Feb-2011 brucec

Fix typos - remove duplicate "the".

PR: bin/154928
Submitted by: Eitan Adler <lists at eitanadler.com>
MFC after: 3 days


218893 20-Feb-2011 dim

Upgrade our copy of llvm/clang to r126079, from upstream's trunk.

This contains many improvements, primarily better C++ support, an
integrated assembler for x86 and support for -pg.


218842 19-Feb-2011 nyan

MFi386: revision 218745

Remove reading of symbols from a.out loaded files.


218822 18-Feb-2011 dim

Merge binutils 2.17.50 to head. This brings a number of improvements to
x86 CPU support, better support for powerpc64, some new directives, and
many other things. Bump __FreeBSD_version, and add a note to UPDATING.

Thanks to the many people that have helped to test this.

Obtained from: projects/binutils-2.17


218815 18-Feb-2011 danger

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

Reviewed by: brucec


218745 16-Feb-2011 imp

Remove reading of symbols from a.out loaded files. Since we are tight
on space for clang and a.out support is only needed for /boot/loader,
they are excess bytes that serve no useful purpose other than to
support really old kernels (FreeBSD < 3.2 or so). Prefer clang
support over support for these old kernels and remove this code. We
gain about 100 bytes of space this way.

Reviewed by: rdivacky@


218737 16-Feb-2011 nyan

MFi386: revision 218713

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


218716 15-Feb-2011 dim

In sys/boot/common/ufsread.c, use uint8_t instead of u_int8_t.

Submitted by: mdf


218713 15-Feb-2011 dim

Apply a few small optimizations to boot2's code, to make it shrink a
little further. This gets us further on the way to be able to build it
successfully with clang. Using in-tree gcc, this shrinks boot2.bin with
60 bytes, the in-tree clang shaves off 72 bytes, and ToT clang 84 bytes.

Submitted by: rdivacky
Reviewed by: imp


218595 12-Feb-2011 nyan

Fix build.


218557 11-Feb-2011 nyan

Add the pc98boot image which concatenates boot0 and boot0.5.
It's required by the gpart to write bootcode.


218246 04-Feb-2011 marcel

Add PEX0 and select the first serial port as console.


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


217663 20-Jan-2011 imp

No need to list an obsolete arm compiler here.


217657 20-Jan-2011 imp

Don't need __DYNAMIC here. it is commented out and a.out only -- these are all ELF.


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


217067 06-Jan-2011 marcel

Help static analysis by initializing variables that we know cannot be
used uninitialized, but which cannot be inferred from the code itself.


217044 06-Jan-2011 nwhitehorn

Import support for the Sony Playstation 3 using the OtherOS feature
available on firmwares 3.15 and earlier.

Caveats: Support for the internal SATA controller is currently missing,
as is support for framebuffer resolutions other than 720x480. These
deficiencies will be remedied soon.

Special thanks to Peter Grehan for providing the hardware that made this
port possible, and thanks to Geoff Levand of Sony Computer Entertainment
for advice on the LV1 hypervisor.


217033 05-Jan-2011 dim

On i386 and amd64, consistently use the following options whenever we
want to avoid using any "advanced" CPU features:

-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float


217030 05-Jan-2011 dim

Remove an empty .if/.endif pair from sys/boot/ficl/Makefile that I
forgot to cleanup in the last commit.


217029 05-Jan-2011 dim

In lib/libstand, sys/boot/ficl and sys/boot/zfs, -mno-sse3 should also
be used for amd64, not just for i386.


217028 05-Jan-2011 dim

Remove superfluous -mno-(mmx|3dnow|sse|sse2|sse3) flags in Makefiles
under sys/boot/{i386,pc98}, since these are already added via
sys/boot/{i386,pc98}/Makefile.inc.

Submitted by: arundel


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.


215811 25-Nov-2010 emaste

Give a bit of a hint of the failure (read != expected) but don't make
the error message needlessly more verbose.

Discussed with: attilio


215758 23-Nov-2010 attilio

Make this printfoutput more verbose.

Sponsored by: Sandvine Incorporated
Submitted by: Sandvine Incorporated
MFC after: 3 days


215577 20-Nov-2010 andreast

Check the OF_getprop() return value before proceeding. Allocate only as
much space as needed for the mode buffer. Use strcmp, relying on OF giving
back NULL terminated strings.

Submitted by: marius
Approved by: nwhitehorn (mentor)


215441 17-Nov-2010 andreast

Revert r215435. We need to figure out the exact value to be loaded.

Approved by: nwhitehorn (mentor)


215438 17-Nov-2010 andreast

Check the real-mode? OF property to find out whether we operate in real or
virtual mode. In virtual mode we have to do memory mapping. On PowerMacs it is
usually false while on pSeries we have found that it is true. The real-mode?
property is not available on sparc64.

Approved by: nwhitehorn (mentor)


215437 17-Nov-2010 andreast

Move the declaration of the eh struct (used only when debugging is enabled)
from ofwn_put into the debug section.

Approved by: nwhitehorn (mentor)


215436 17-Nov-2010 andreast

Make sure the .bss is cleared at the beginning. The pSeries OF ELF loader does
not clear .bss automatically.

Approved by: nwhitehorn (mentor)


215435 17-Nov-2010 andreast

Load the full 16k stack space.

Approved by: nwhitehorn (mentor)


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


215344 15-Nov-2010 imp

We no longer need the OUTPUT_FORMAT line, so fix the build by removing it.


215285 14-Nov-2010 brucec

Fix the jump location.


215284 14-Nov-2010 brucec

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

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


215246 13-Nov-2010 nyan

Now there is no functional difference from i386 version.
So use i386 version.


215245 13-Nov-2010 nyan

Remove unused includes.


215122 11-Nov-2010 raj

Correct RAM size of the MPC8555CDS board.


215034 09-Nov-2010 brucec

Fix typos.

PR: bin/148894
Submitted by: olgeni


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.


214526 29-Oct-2010 marius

Partially revert r203829; as it turns out what the PowerPC OFW loader did
was incorrect as further down the road cons_probe() calls malloc() so the
former can't be called before init_heap() has succeed. Instead just exit
to the firmware in case init_heap() fails like OF_init() does when hitting
a problem as we're then likely running in a very broken environment where
hardly anything can be trusted to work.


214495 29-Oct-2010 nwhitehorn

Fix the printf() in init_heap so that it can run before the console is up.

Pointed out by: marius


214494 29-Oct-2010 nwhitehorn

Fix netboot on some Apple machines on which calling dma-free on the
network device can hang the machine. This causes the loss of 64 KB of
accessible memory on netbooted machines.


214493 28-Oct-2010 nwhitehorn

Fix some memory management issues discovered when trying to boot the PPC
OF loader on systems where address cells and size cells are both 2 (the
Mambo simulator) and fix an error where cons_probe() was called before
init_heap() but used malloc() to set environment variables.

MFC after: 1 month


214257 24-Oct-2010 nyan

MFi386: revision 214210

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


214210 22-Oct-2010 rdivacky

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

Approved by: rpaulo (mentor)
Reviewed by: jhb


214114 20-Oct-2010 pjd

Correct typos.


213573 08-Oct-2010 uqs

mdoc: drop redundant .Pp and .LP calls

They have no effect when coming in pairs, or before .Bl/.Bd


213568 08-Oct-2010 pho

Ensure that a make from sys/boot does not pick up include files from
/usr/include.

Discussed with: kib


213136 24-Sep-2010 pjd

- Split code shared by almost any boot loader into separate files and
clean up most layering violations:

sys/boot/i386/common/rbx.h:

RBX_* defines
OPT_SET()
OPT_CHECK()

sys/boot/common/util.[ch]:

memcpy()
memset()
memcmp()
bcpy()
bzero()
bcmp()
strcmp()
strncmp() [new]
strcpy()
strcat()
strchr()
strlen()
printf()

sys/boot/i386/common/cons.[ch]:

ioctrl
putc()
xputc()
putchar()
getc()
xgetc()
keyhit() [now takes number of seconds as an argument]
getstr()

sys/boot/i386/common/drv.[ch]:

struct dsk
drvread()
drvwrite() [new]
drvsize() [new]

sys/boot/common/crc32.[ch] [new]

sys/boot/common/gpt.[ch] [new]

- Teach gptboot and gptzfsboot about new files. I haven't touched the
rest, but there is still a lot of code duplication to be removed.

- Implement full GPT support. Currently we just read primary header and
partition table and don't care about checksums, etc. After this change we
verify checksums of primary header and primary partition table and if
there is a problem we fall back to backup header and backup partition
table.

- Clean up most messages to use prefix of boot program, so in case of an
error we know where the error comes from, eg.:

gptboot: unable to read primary GPT header

- If we can't boot, print boot prompt only once and not every five
seconds.

- Honour newly added GPT attributes:

bootme - this is bootable partition
bootonce - try to boot from this partition only once
bootfailed - we failed to boot from this partition

- Change boot order of gptboot to the following:

1. Try to boot from all the partitions that have both 'bootme'
and 'bootonce' attributes one by one.
2. Try to boot from all the partitions that have only 'bootme'
attribute one by one.
3. If there are no partitions with 'bootme' attribute, boot from
the first UFS partition.

- The 'bootonce' functionality is implemented in the following way:

1. Walk through all the partitions and when 'bootonce'
attribute is found without 'bootme' attribute, remove
'bootonce' attribute and set 'bootfailed' attribute.
'bootonce' attribute alone means that we tried to boot from
this partition, but boot failed after leaving gptboot and
machine was restarted.
2. Find partition with both 'bootme' and 'bootonce' attributes.
3. Remove 'bootme' attribute.
4. Try to execute /boot/loader or /boot/kernel/kernel from that
partition. If succeeded we stop here.
5. If execution failed, remove 'bootonce' and set 'bootfailed'.
6. Go to 2.

If whole boot succeeded there is new /etc/rc.d/gptboot script coming
that will log all partitions that we failed to boot from (the ones with
'bootfailed' attribute) and will remove this attribute. It will also
find partition with 'bootonce' attribute - this is the partition we
booted from successfully. The script will log success and remove the
attribute.

All the GPT updates we do here goes to both primary and backup GPT if
they are valid. We don't touch headers or partition tables when
checksum doesn't match.

Reviewed by: arch (Message-ID: <20100917234542.GE1902@garage.freebsd.pl>)
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com
MFC after: 2 weeks


212979 21-Sep-2010 dim

When building world with clang, for gnu/lib/libobjc, sys/boot/i386/boot2
and sys/boot/pc98/boot2, do not simply assign 'gcc' to CC, since compile
flags are sometimes passed via this variable, for example during the
build32 stage on amd64. This caused the 32-bit libobjc build on amd64
to fail.

Instead, only replace the first instance of clang (if any, including
optional path) with gcc, and leave the arguments alone.

Approved-by: rpaulo (mentor)


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)


212805 17-Sep-2010 pjd

Before VirtualBox is fixed, mark with #ifdef what has to be done to make
it possible to boot from ZFS RAIDZ for example from within VirtualBox.
The problem with VirtualBox is that its BIOS reports only one disk present.
If we choose to ignore this report, we can find all the disks available.
We can't have this work-around to be turned on by default, because some broken
BIOSes report true when it comes to number of disks, but present the same disk
multiple times.


212804 17-Sep-2010 pjd

Remove magic value.


212729 16-Sep-2010 marius

Merge from powerpc:
- Change putc_func_t to use a char instead of an int for the character.
- Make functions and variables not used outside of this source file static.
- Remove unused prototypes and variables.
- The OFW read and seek methods take 3 and not 4 input arguments.


212387 09-Sep-2010 pjd

Remove empty lines committed by accident.

MFC after: 2 weeks


212384 09-Sep-2010 pjd

Ignore log vdevs.

MFC after: 2 weeks


212383 09-Sep-2010 pjd

Allow to boot from a pool within which replacing is in progress.
Before the change it wasn't possible and the following error was printed:

ZFS: can only boot from disk, mirror or raidz vdevs

Now if the original vdev (the one we are replacing) is still present we will
read from it, but if it is not present we won't read from the new vdev, as it
might not have enough valid data yet.

MFC after: 2 weeks


212382 09-Sep-2010 pjd

Remove duplicated code.

MFC after: 2 weeks


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


212332 08-Sep-2010 emax

Add custom kernel configuration and device tree source files for
Seagate FreeAgent DockStar(tm) device. It seems to be a dumb down
version of Marvell SheevaPlug. Device tree source file could use
more tweaking, but at least it wll network boot and run FreeBSD/arm.


212165 02-Sep-2010 nwhitehorn

In the case of non-sequential mappings, ofw_mapmem() could ask Open
Firmware to map a memory region with negative length, causing crashes
and Undefined Behavior. Add the appropriate check to make the behavior
defined.


212126 02-Sep-2010 rmacklem

Modify pxe.c to use the version of nfs_getrootfh() that returns
the file handle's size and was recently committed to
lib/libstand/nfs.c. This allows pxeboot to use NFSv3 and work
correcty for non-FreeBSD as well as FreeBSD NFS servers.
If built with OLD_NFSV2 defined, the old
code that predated this patch will be used.

Tested by: danny at cs.huji.ac.il


212098 01-Sep-2010 dim

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

Reviewed by: nyan
Approved by: rpaulo (mentor)


212066 31-Aug-2010 delphij

For consistency, change all 'i386' and MACHINE_ARCH to x86.

Reviewed by: jhb
MFC after: 1 week


212064 31-Aug-2010 dim

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

Reviewed by: nyan
Approved by: rpaulo (mentor)


212062 31-Aug-2010 dim

Always compile pc98 boot2 with gcc instead of clang, just as with i386
boot2. Unfortunately both still are too big when compiled with clang.

Reviewed by: nyan
Approved by: rpaulo (mentor)


212060 31-Aug-2010 dim

Use a more robust way to substitute gcc for clang, when compiling
gnu/lib/libobjc and sys/boot/i386/boot2, so it also works when using
absolute paths and/or options, as in CC="/absolute/path/clang -foo".

Approved by: rpaulo (mentor)


211817 25-Aug-2010 nwhitehorn

Fix build of ppc32 loader.


211747 24-Aug-2010 rpaulo

Replace structure assignments with explicity memcpy calls. This allows
Clang to compile this file: it was using the builtin memcpy and we want
to use the memcpy defined in gptboot.c. (Clang can't compile boot2 yet).

Submitted by: Dimitry Andric <dimitry at andric.com>
Reviewed by: jhb


211725 23-Aug-2010 imp

MFtbemd:

Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.


211680 23-Aug-2010 imp

MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH (which simplifies some powerpc/powerpc64 ifs)


211679 23-Aug-2010 imp

MF tbemd: move to using specific architecture makefiles


211678 23-Aug-2010 imp

MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH (which simplifies some powerpc/powerpc64 ifs)


211677 23-Aug-2010 imp

MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH


211676 23-Aug-2010 imp

It turns out that the OUTPUT_FORMAT should do the right thing for both endians...


211675 23-Aug-2010 imp

MF tbemd: differentiate between arm and armeb


211571 21-Aug-2010 rpaulo

Make sure the boot2 stage is compiled with gcc, as clang has no
problems compiling it, but it just gets too big at the moment, even
with -Os. This is not applicable to gptboot, though.

Submitted by: Dimitry Andric <dimitry at andric.com>


211091 09-Aug-2010 mm

Return EIO if vdev->v_phys_read is NULL.

This fixes booting from a ZFS mirror with a unavailable primary device.

PR: kern/148655
Reviewed by: avg
Approved by: delphij (mentor)
MFC after: 3 days


210764 02-Aug-2010 uqs

mdoc: make sure to pass at least one argument to quotation macros


210650 30-Jul-2010 dfr

A simple test harness to help debug problems with the ZFS boot code.


210459 25-Jul-2010 nyan

MFi386: revision 210387

Correctly setup LDADD with regards to libstand.


210423 23-Jul-2010 avg

completely ignore zero-sized elf sections in modules of elf object type (amd64)

Current code doesn't check size of elf sections and may perform needless
actions of zero-sized memory allocation and similar.
The bigger issue is that alignment requirement of a zero-sized section
gets effectively applied to the next section if it has smaller alignment
requirement. But other tools, like gdb and consequently kgdb,
completely ignore zero-sized sections and thus may map symbols to
addresses differently.

Zero-sized sections are not typical in general.
Their typical (only, even) cause in FreeBSD modules is inline assembly that
creates custom sections which is found in pcpu.h and vnet.h. Mere inclusion
of one of those header files produces a custom section in elf output.
If there is no actual use for the section in a given module, then the
section remains empty.

Better solution is to avoid creating zero-sized sections altogether,
which is in plans.

Preloaded modules are handled in boot code (load_elf_obj.c), while
dynamically loaded modules are handled by kernel (link_elf_obj.c).

Based on code by: np
MFC after: 3 weeks


210387 22-Jul-2010 rpaulo

Correctly setup LDADD with regards to libstand. The submitter points
out that "on amd64, libstand.a is compiled for i386, but is still installed
under ${WORLDTMP}/usr/lib instead of ${WORLDTMP}/usr/lib32. Even if it
would be installed there, ld on amd64 is set up incorrectly with a
${TOOLS_PREFIX}/usr/lib/i386 default path, so it wouldn't link. The reason
it does link under gcc is that gcc passes -L${WORLDTMP}/usr/lib twice,
even for -m32 builds, which is also incorrect, but accidentally works in
this case."

Submitted by: Dimitry Andric <dimitry at andric.com>


209920 12-Jul-2010 nwhitehorn

Provide support in loader for booting 64-bit PowerPC kernels. Like amd64,
64-bit PowerPC kernels are loaded by a 32-bit loader, since nearly all
powerpc64 firmwares execute in 32-bit mode.


209909 11-Jul-2010 raj

Get rid of bootinfo for good in loader (U-Boot-based) and ARM.

For FDT-enabled platforms the device tree is a modern replacement for bootinfo
config data.


209903 11-Jul-2010 raj

Provide a missing interrupt-parent for the CPM / QUICC node in the DTS.


209774 07-Jul-2010 marcel

Use the kernel's start address to determine what to map. This allows
us to link the kernel at different addresses without needing to build
a corresponding loader.


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)


209361 20-Jun-2010 brian

Add a missing prototype

PR: 145232
Submitted by: gcooper
MFC after: 1 week


209162 14-Jun-2010 rdivacky

Pass the -N flag to linked via -Wl.

Approved by: ed (mentor)


209125 13-Jun-2010 raj

Fix conditional FDT support in loader(8).


208789 03-Jun-2010 ed

Use -Wl,-N instead of the undocumented -N option for GCC.

GCC forwards the -N flag directly to ld. This flag is not documented and
not supported by (for example) Clang. Just use -Wl,-N.

Submitted by: Pawel Worach


208669 31-May-2010 avg

zfs boot: fix error handling in zfs_readdir

Found by: clang static analyzer
MFC after: 4 days


208610 28-May-2010 avg

boot/zfs: fix gang block reading code

- use correct size (512) while reading a gang block
- skip holes while reading child blocks
- advance buffer pointer while reading child blocks

PR: 144214
MFC after: 10 days


208561 26-May-2010 raj

Initial device tree source (DTS) files for Marvell ARM systems:

o DB-88F5182
o DB-88F5281
o DB-88F6281
o DB-78100
o SheevaPlug

This also includes device tree bindings definitions for some newly introduced
nodes (mpp, gpio).

Reviewed by: imp
Sponsored by: The FreeBSD Foundation


208560 26-May-2010 raj

Import device tree source (DTS) files for PowerPC MPC8555CDS and MPC8572DS
development systems.

Special thanks to Phil Brownfield for help with BSD-style relicensing of
these files.

Obtained from: Freescale


208539 25-May-2010 raj

Bring a missing FDT piece (omitted in the previous commit).


208538 25-May-2010 raj

Initial loader(8) support for Flattened Device Tree.

o This is disabled by default for now, and can be enabled using WITH_FDT at
build time.

o Tested with ARM and PowerPC.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation


208535 25-May-2010 raj

Mostly revert r200691. U-Boot syscall() entry point returns 1 on success.


208534 25-May-2010 raj

Use loader devices only when they initialized properly.


208388 21-May-2010 jhb

- Set 'dmadat' earlier so that we properly setup the heap if we fail to
locate a high memory area for the heap using the SMAP.
- Read the number of hard drive devices from the BIOS instead of hardcoding
a limit of 128. Some BIOSes duplicate disk devices once you get beyond
the maximum drive number.

MFC after: 1 month


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


207854 10-May-2010 imp

Formatting nit


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


207537 02-May-2010 marius

Add support for SPARC64 V (and where it already makes sense for other
HAL/Fujitsu) CPUs. For the most part this consists of fleshing out the
MMU and cache handling, it doesn't add pmap optimizations possible with
these CPU, yet, though.
With these changes FreeBSD runs stable on Fujitsu Siemens PRIMEPOWER 250
and likely also other models based on SPARC64 V like 450, 650 and 850.
Thanks go to Michael Moll for providing access to a PRIMEPOWER 250.


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.


206378 07-Apr-2010 rpaulo

Add a copyright.


206376 07-Apr-2010 rpaulo

EFI boot loader for FreeBSD/i386.

Doesn't boot a kernel yet, but it can read an ELF file from the EFI FAT
partition.


205662 26-Mar-2010 delphij

Our boot loader is capable of booting both i386 and amd64 kernels so
call it "x86" instead of "i386".

Suggested by: jhb in response to Alexander Best's loader proposal
MFC after: 1 month


204900 09-Mar-2010 ticso

BWCT boards can have 128MB SDRAM.


204899 09-Mar-2010 ticso

fix signed warning


204328 25-Feb-2010 weongyo

Add bwn(4) driver.


204318 25-Feb-2010 raj

Minor style correction.


204317 25-Feb-2010 raj

Fix handling of GPT disk partition index.

Obtained from: Semihalf
MFC after: 1 week


204316 25-Feb-2010 raj

Let loader(8) for U-Boot use default storage more flexibly.

Obtained from: Semihalf
MFC after: 1 week


204315 25-Feb-2010 raj

Enable U-Boot storage for PowerPC. While there fix loader(8) help file name.

MFC after: 1 week


204152 20-Feb-2010 marius

Some machines can not only consist of CPUs running at different speeds
but also of different types, f.e. Sun Fire V890 can be equipped with a
mix of UltraSPARC IV and IV+ CPUs, requiring different MMU initialization
and different workarounds for model specific errata. Therefore move the
CPU implementation number from a global variable to the per-CPU data.
Functions which are called before the latter is available are passed the
implementation number as a parameter now.


204129 20-Feb-2010 nwhitehorn

Enable NETIF_OPEN_CLOSE_ONCE on PowerPC OFW. This fixes netbooting on
PowerPC Book-S hardware, which had been broken for a very long time.

Submitted by: Andreas Tobler
MFC after: 1 week


204067 18-Feb-2010 pjd

Update comment. We also look for GPT partitions.


203831 13-Feb-2010 marius

Correct the panic strings introduced in r203830 to match their arguments.


203830 13-Feb-2010 marius

Use the SUNW,{d,i}tlb-load methods for entering locked TLB entries like
OpenBSD and OpenSolaris do instead of fiddling with the MMUs ourselves.
Unlike direct access the firmware methods don't automatically use the
next free (?) TLB slot, instead the slot to be used has to be specified.
We allocate the TLB slots for the kernel top-down as OpenSolaris suggests
that the firmware will always allocate the ones for its own use bottom-up.
Besides being simpler, according to OpenBSD using the firmware methods is
required to allow booting on Sun Fire E10K with multi-systemboard domains.


203829 13-Feb-2010 marius

- Assert that HEAPSZ is a multiple of PAGE_SIZE as at least the firmware
of Sun Fire V1280 doesn't round up the size itself but instead lets
claiming of non page-sized amounts of memory fail.
- Change parameters and variables related to the TLB slots to unsigned
which is more appropriate.
- Search the whole OFW device tree instead of only the children of the
root nexus device for the BSP as starting with UltraSPARC IV the 'cpu'
nodes hang off of from 'cmp' (chip multi-threading processor) or 'core'
or combinations thereof. Also in large UltraSPARC III based machines
the 'cpu' nodes hang off of 'ssm' (scalable shared memory) nodes which
group snooping-coherency domains together instead of directly from the
nexus.
- Add support for UltraSPARC IV and IV+ BSPs. Due to the fact that these
are multi-core each CPU has two Fireplane config registers and thus the
module/target ID has to be determined differently so the one specific
to a certain core is used. Similarly, starting with UltraSPARC IV the
individual cores use a different property in the OFW device tree to
indicate the CPU/core ID as it no longer is in coincidence with the
shared slot/socket ID.
While at it additionally distinguish between CPUs with Fireplane and
JBus interconnects as these also use slightly different sizes for the
JBus/agent/module/target IDs.
- Check the return value of init_heap(). This requires moving it after
cons_probe() so we can panic when appropriate. This should be fine as
the PowerPC OFW loader uses that order for quite some time now.


202552 18-Jan-2010 marcel

Add command-line option -dev to set the default value of the currdev
variable. This is to be used by the EFI boot manager.

While here, re-factor the code a little bit and bump the version to
2.1.


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


201966 10-Jan-2010 marcel

Remove debugging printf(). There's no need to print the image
base address anymore.


201941 09-Jan-2010 marcel

Remove file system support based on the simple file system protocol
as this only allows us to access file systems that EFI knows about.
With a loader that can only use EFI-supported file systems, we're
forced to put /boot on the EFI system partition. This is suboptimal
in the following ways:
1. With /boot a symlink to /efi/boot, mergemaster complains about
the mismatch and there's no quick solution.
2. The EFI loader can only boot a single version of FreeBSD. There's
no way to install multiple versions of FreeBSD and select one
at the loader prompt.
3. ZFS maintains /boot/zfs/zpool.cache and with /boot a symlink we
end up with the file on a MSDOS file system. ZFS does not have
proper handling of file systems that are under Giant.

Implement a disk device based on the block I/O protocol instead and
pull in file system code from libstand. The disk devices are really
the partitions that EFI knows about.

This change is backward compatible.

MFC after: 1 week


201932 09-Jan-2010 marius

- Add code allowing a network device to only be open and closed once
by keeping it opened after the first open and closing it via the
cleanup handler when NETIF_OPEN_CLOSE_ONCE is defined in order to
avoid the open-close-dance on every file access which with firmware
that for example performs an auto-negotiation on every open causes
netbooting to take horribly long. Basically the behavior with this
knob enabled resembles the one employed between r60506 and r177108
(and for sparc64 also again since r182919) with the addition that
the network device now is closed eventually before entering the
kernel and before rebooting. Actually I think this should be the
desired MI behavior, however the U-Boot loader actually requires
net_close() to be called after every transaction in order for some
local shutdown operations to be performed (and which I think thus
will break on concurrent opens, i.e. when netdev_opens is > 1, like
the loader does at least for disks when LOADER_GZIP_SUPPORT is
enabled).
- Use NETIF_OPEN_CLOSE_ONCE to replace the hack, which artificially
increased netdev_opens for sparc64 in order to keep the network
device opened forever, as at least some firmware versions require
the network device to be closed eventually before entering the
kernel or otherwise will DMA received packets to stale memory.
The powerpc OFW loader probably wants NETIF_OPEN_CLOSE_ONCE to be
set as well for the same reasons.


201901 09-Jan-2010 marius

Remove clause 3 and 4 from TNF licenses (this was the only 4-clause TNF
license FreeBSD had in sys/boot).

Obtained from: NetBSD


201690 06-Jan-2010 delphij

Space cleanup for revision 201689 committed separately for easier review.
This commit is purely space changes.

Submitted by: Matt Reimer
Sponsored by: VPOP Technologies, Inc.
MFC after: 2 weeks


201689 06-Jan-2010 delphij

Instead of assuming all vdevs are healthy, check the newest vdev label
for each vdev's status. Booting from a degraded vdev should now be
more robust.

Submitted by: Matt Reimer <mattjreimer at gmail.com>
Sponsored by: VPOP Technologies, Inc.
MFC after: 2 weeks


201399 02-Jan-2010 mbr

Fix typo: s/partion/partition/

Submitted by: Marc Balmer <marc@msys.ch>
MFC after: 3 days


201342 31-Dec-2009 nyan

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

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

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

MFC after: 2 week

Happy New Year in Japan!!


201340 31-Dec-2009 nyan

Don't use 15M-16M area on pc98. It's reserved for some devices.

MFC after: 2 week


201339 31-Dec-2009 nyan

Add setting machine type support to the loader.

MFC after: 2 week


201145 28-Dec-2009 antoine

(S)LIST_HEAD_INITIALIZER takes a (S)LIST_HEAD as an argument.
Fix some wrong usages.
Note: this does not affect generated binaries as this argument is not used.

PR: 137213
Submitted by: Eygene Ryabinkin (initial version)
MFC after: 1 month


200946 24-Dec-2009 marius

Execute the cleanup handlers before jumping to the kernel just
like the other architectures do.


200945 24-Dec-2009 marius

- Consistently wrap debugging in NETIF_DEBUG. This basically merges
NetBSD rev 1.19.
- Make the functions match their prototypes regarding static.


200944 24-Dec-2009 marius

Revert r183628 as with the current ata(4) ATAPI DMA with AcerLabs
M5229 appears to be once again fixed. If this happens to return
we probably should disable ATAPI DMA in ataacerlabs(4) instead
just like the Linux libATA does.


200872 22-Dec-2009 jhb

Don't build zfsboot, gptzfsboot, and zfsloader if WITHOUT_ZFS is enabled.

MFC after: 1 week


200776 21-Dec-2009 nyan

Move cursor position after putting a character.

MFC after: 1 week


200691 18-Dec-2009 marcel

Fix ub_env_enum(): syscall() returns 0 when properly invoked.


200631 17-Dec-2009 nyan

Fix debug messages of bd_io().

MFC after: 1 week


200460 13-Dec-2009 marcel

Add support for memory disk (md). The size of the memory disk
is determined by MD_IMAGE_SIZE. A file system can be embedded
into the loader with /sys/tools/embed_mfs.sh.
Note that md.c is not included when MD_IMAGE_SIZE is not set.


200407 11-Dec-2009 nyan

Cleanups the boot2 for pc98. There is no functional change.
- Make setting machine type and getting geom conditional for future.
- Remove unused RAWBOOT and CDBOOT supports.
- Remove unneeded include.
- Fix warnings.

MFC after: 1 week


200357 10-Dec-2009 jhb

Don't warn about an RSDP with a corrupt checksum. The kernel does a better
job about warning about these things later and this message can be
confusing.

Submitted by: infofarmer
MFC after: 1 week


200310 09-Dec-2009 jhb

Fix a confusing typo in the EDD packet structure used in gptboot and
gptzfsboot. I got the segment and offset fields reversed in the structure,
but I also succeeded in crossing the assignments so the actual EDD packet
ended up correct.

MFC after: 1 week


200309 09-Dec-2009 jhb

- Port bios_getmem() from libi386 to {gpt,}zfsboot() and use it to
safely allocate a heap region above 1MB. This enables {gpt,}zfsboot()
to allocate much larger buffers than before.
- Use a larger buffer (1MB instead of 128K) for temporary ZFS buffers. This
allows more reliable reading of compressed files in a raidz/raidz2 pool.

Submitted by: Matt Reimer mattjreimer of gmail
MFC after: 1 week


200255 08-Dec-2009 nyan

MFi386: revision 200219

Improve the algorithm the loader uses to choose a memory range for its
heap when using a range above 1MB.

MFC after: 1 week


200254 08-Dec-2009 nyan

MFi386: Use real mode instead of v86 mode.

MFC after: 1 week


200253 08-Dec-2009 nyan

MFi386: revision 200216

Various small whitespace and style fixes.


200219 07-Dec-2009 jhb

Improve the algorithm the loader uses to choose a memory range for its
heap when using a range above 1MB.

Previously the loader would always use the last 3MB in the first memory
range above 1MB for the heap. However, this memory range is also where the
kernel and any modules are loaded. If this memory range is "small", then
using the high 3MB for the heap may not leave enough room for the kernel
and modules.

Now the loader will use any range below 4GB for the heap, and the logic to
choose the "high" heap region has moved into biosmem.c. It sets two
variables that the loader can use for a high heap if it desires. When a
high heap is enabled (BZIP2, FireWire, GPT, or ZFS), then the following
memory ranges are preferred for the heap in order from best to worst:
- The largest memory region in the SMAP with a start address greater than
1MB. The memory region must be at least 3MB in length. This leaves the
region starting at 1MB purely for use by the kernel and modules.
- The last 3MB of the memory region starting at 1MB if it is at least 3MB
in size. This matches the current behavior except that the current loader
would break horribly if the first region was not at least 3MB in size.
- The memory range from the end of the loader up to the 640k window. This
is the range the loader uses when none of the high-heap-requesting options
are enabled.

Tested by: hrs
MFC after: 1 week


200216 07-Dec-2009 jhb

Various small whitespace and style fixes.


199864 27-Nov-2009 sobomax

Remove spinconsole from pc98, some parts seem to be missed and it's
too late (early?) to figure out what exactly.

Reported by: TAKAHASHI Yoshihiro


199857 27-Nov-2009 sobomax

Whitespace-only: another instance of identation with spaces.


199856 27-Nov-2009 sobomax

Whitespace on: use tabs for identation consistently.


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.


199806 25-Nov-2009 trasz

Be nice, don't use the f-word.


199714 23-Nov-2009 rnoland

Create a seperate ZFS enabled loader.

This adds zfsloader which will be called by zfsboot/gptzfsboot code rather
than the tradional loader. This eliminates the need to set the
LOADER_ZFS_SUPPORT variable in order to get a ZFS enabled loader.

Note however, that you must reinstall your bootcode (zfsboot/gptzfsboot)
in order for the boot process to use the new loader.

New installations will no longer be required to build a ZFS enabled
loader for a working ZFS boot system. Installing zfsboot/gptzfsboot is
sufficient for acknowledging the use of CDDL code and therefore the ZFS
enabled loader.

Based on a previous patch from jhb@

Reviewed by: jhb@
MFC after: 2 weeks


199579 20-Nov-2009 jhb

Always use 64-bit LBAs for disk addresses in zfsboot and gptzfsboot to
fully support booting from large volumes.

Tested by: Emil Smolenski ambsd of raisa.eu.org
Submitted by: Matt Reimer mattjreimer of gmail (most of the C bits)
MFC after: 1 week


199534 19-Nov-2009 raj

Provide an effective (relocated) address when building modules metadata.

This lets modules loaded dynamically in loader(8) work for U-Boot-based
platforms.

MFC after: 1 week


199210 12-Nov-2009 attilio

Introduce a new option (BOOT_PROMPT_123) that lets enter the boot prompt
only when typing the sequence "123" (opposite to the standard 'push any
button' approach).
That results useful when using serial lines sending garbage and leading
to unwilling boot prompt appearence.

Obtained from: Sandvine Incorporated
Reviewed by: emaste, jhb
Sponsored by: Sandvine Incorporated
MFC: 1 week


199193 11-Nov-2009 antoine

- Remove trailing ";" after if statement
- Remove #if 0 section that was never needed/used

Reviewed by: raj@
MFC after: 1 month


198537 28-Oct-2009 brueffer

Close a file descriptor leak in an error case.

PR: 138374
Submitted by: Patroklos Argyroudis <argp@census-labs.com>
MFC after: 1 week


198420 23-Oct-2009 rnoland

Correct some issues with zfs boot.

- Teach it to read gang blocks. (essentially untested)
If you see "ZFS: gang block detected!", please let
me know, so we can either remove the printf if it
works, or fix it if it doesn't.

- If multiple partitions exist on a disk, probe them all.
We also need to reset dsk->start to 0 to read the right
sector here.

- With GPT, we can have 128 partitions.

- If the bootfs property has ever been set on a pool
it seems that it never goes away. zpool won't allow
you to add to the pool with the bootfs property set.
However, if you clear the property back to default
we end up getting 0 for the object number and read
a bogus block pointer and fail to boot.

- Fix some error printfs. The printf in the loader is
only capable of c,s and u formats.

- Teach printf how to display %llu

Reviewed by: dfr, jhb
MFC after: 2 weeks


198079 14-Oct-2009 jhb

Use zfs_read() instead of xfsread() to read /boot.config. xfsread() fails
short read requests, so the result was that a /boot.config smaller than 512
bytes was ignored. boot2 uses fsread() instead of xfsread() to read
/boot.config already, so this makes zfsboot more like boot2.

Submitted by: Johny Mattsson johny-freebsd of earthmagic org
Reviewed by: dfr
MFC after: 3 days


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


197156 13-Sep-2009 nyan

MFi386:

Move the loader's entry point to 0x200000. This change is also needed
for pc98.

MFC after: 3 days


197082 10-Sep-2009 emaste

If the pxe client is told to use / as the root path, honour that rather
of trying to mount /pxeroot instead.

PR: i386/106493
Submitted by: Andrey Russev
MFC after: 1 month


196326 17-Aug-2009 jhay

Fix parse() so that the partition to boot (load /boot/loader) from can
be set. The syntax as printed in main() is used: 0:ad(0p3)/boot/loader

Reviewed by: jhb
Approved by: re (kib)


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)


195045 26-Jun-2009 rpaulo

On special systems where the MBR and the GPT are in sync (up to the 4th
slicei, Apple EFI hardware), the bootloader will fail to recognize the GPT
if it finds anything else but the EFI partition. Change the check to continue
detecting the GPT by looking at the EFI partition on the MBR but
stopping successfuly after finding it.

PR: kern/134590
Submitted by: Christoph Langguth <christoph at rosenkeller.org>
Reviewed by: jhb
MFC after: 2 weeks
Approved by: re (kib)


194634 22-Jun-2009 raj

Bump PowerPC loader(8) version to reflect extensions it has recently grown.


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.


193720 08-Jun-2009 jhb

Instead of packing the individual fields in the PnP structures, pack the
entire structures. This trims some warnings.

Verified by: md5(1)
MFC after: 1 week


193719 08-Jun-2009 jhb

Don't attempt to free the GPT partition list for a disk with an empty GPT.

Submitted by: Yuri Pankov yuri.pankov of gmail
MFC after: 3 days


193530 05-Jun-2009 jkim

Import ACPICA 20090521.


193387 03-Jun-2009 raj

Make GPT style partitiong endian-safe in U-Boot support library.

Submitted by: Piotr Ziecik
Obtained from: Semihalf


193229 01-Jun-2009 jhb

Add a missing parameter when displaying GPT partitions with an unknown
UUID.

Submitted by: Pawel Worach pawel.worach | gmail
MFC after: 1 week


193192 01-Jun-2009 rodrigc

sys/boot/common.c
=================
Extend the loader to parse the root file system mount options in /etc/fstab,
and set a new loader variable vfs.root.mountfrom.options with these options.
The root mount options must be a comma-delimited string, as specified in
/etc/fstab.
Only set the vfs.root.mountfrom.options variable if it has not been
set in the environment.

sys/kern/vfs_mount.c
====================
When mounting the root file system, pass the mount options
specified in vfs.root.mountfrom.options, but filter out "rw" and "noro",
since the initial mount of the root file system must be done as "ro".
While we are here, try to add a few hints to the mountroot prompt
to give users and idea what might of gone wrong during mounting
of the root file system.

Reviewed by: jhb (an earlier patch)


193111 30-May-2009 marcel

Fix NETIF_DEBUG compilation.


192972 28-May-2009 dfr

Some of the boot loader code only works on a ufs file system, but it
uses the generic struct dirent, which happens to look identical to UFS's
struct direct. If BSD ever changes dirent then this will be a problem.

Submitted by: matthew dot fleming at isilon dot com


192247 17-May-2009 brueffer

Improve the accf_dns_load description.


192194 16-May-2009 dfr

Add support for booting from raidz1 and raidz2 pools.


191829 05-May-2009 raj

GPT style partitioning for loader(8) with U-Boot support library (tested on
ARM).

Submitted by: Piotr Ziecik kosmo ! semihalf dot com


191111 15-Apr-2009 jkim

A simple rewrite of biossmap.c:

- Do not iterate int 15h, function e820h twice. Instead, we use STAILQ to
store each return buffer and copy all at once.
- Export optional extended attributes defined in ACPI 3.0 as separate
metadata. Currently, there are only two bits defined in the specification.
For example, if the descriptor has extended attributes and it is not
enabled, it has to be ignored by OS. We may implement it in the kernel
later if it is necessary and proven correct in reality.
- Check return buffer size strictly as suggested in ACPI 3.0.

Reviewed by: jhb


191071 14-Apr-2009 marius

Fix masking of TTE bits; the TD_*_MASK macros need shifting via the
corresponding TD_*_SHIFT.

MFC after: 3 days


191061 14-Apr-2009 jhb

Use a disk address instead of an int to hold the starting offset of an
open partition. This fixes access to partitions whose starting offset
is >= 2 TB.

Submitted by: "James R. Van Artsdalen" james jrv.org
MFC after: 3 days


191012 13-Apr-2009 marius

Fix whitespace.


190814 07-Apr-2009 jkim

Rewrite SMBIOS for loader:

- First three fields of system UUID may be little-endian as described in
SMBIOS Specification v2.6. For now, we keep the network byte order for
backward compatibility (and consistency with popular dmidecode tool)
if SMBIOS table revision is less than 2.6. However, little-endian format
can be forced by defining BOOT_LITTLE_ENDIAN_UUID from make.conf(5) if it
is necessary.
- Replace overly ambitious optimizations with more readable code.
- Update comments to SMBIOS Specification v2.6 and clean up style(9) bugs.


190813 07-Apr-2009 jkim

Increase sprintf(3) buffer size, which I forgot from the previous commit.


190789 07-Apr-2009 weongyo

Add an entry for the uath(4) module.


190599 31-Mar-2009 jkim

Probe size of installed memory modules from loader and display it
as 'real memory' instead of Maxmem if the value is available.
Note amd64 displayed physmem as 'usable memory' since machdep.c r1.640
to unconfuse users. Now it is consistent across amd64 and i386 again.
While I am here, clean up smbios.c a bit and update copyright date.

Reviewed by: jhb


190147 20-Mar-2009 nyan

Oops, fix the previous change.


190146 20-Mar-2009 nyan

MFi386: r189749

Teach the BIOS CD driver to use bounce buffers when the destination
address is > 1 MB.


190127 20-Mar-2009 nyan

Merge the missing changes from i386.
Teach the loader about the FAT partitions.


190126 20-Mar-2009 nyan

MFi386: the part of r179825 to reduce diffs against i386.


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


190046 19-Mar-2009 nyan

Reduce diffs against i386.


190029 19-Mar-2009 nyan

Use the common PC98_MID_* defines instead of a magic number.


189872 16-Mar-2009 dchagin

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

Approved by: kib (mentor)


189749 12-Mar-2009 jhb

The recent change to use memory > 1MB for the heap by default broke CD
booting because the CD driver did not use bounce buffers to ensure
request buffers sent to the BIOS were always in the first 1MB. Copy over
the bounce buffer logic from the BIOS disk driver (minus the 64k boundary
code for floppies) to fix this.

Reported by: kensmith


189588 09-Mar-2009 jhb

- Make it possible to disable GPT support by setting LOADER_NO_GPT_SUPPORT
in make.conf or src.conf.
- When GPT is enabled (which it is by default), use memory above 1 MB and
leave the memory from the end of the bss to the end of the 640k window
purely for the stack. The loader has grown and now it is much more
common for the heap and stack to grow into each other when both are
located in the 640k window.

PR: kern/129526
MFC after: 1 week


189500 07-Mar-2009 marcel

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

i386: 135 bytes available
amd64: 151 bytes available

Ok'd by: jhb


189017 24-Feb-2009 jhb

Fix some more issues with the real mode BTX.

The old BTX passed the general purpose registers from the 32-bit client to
the routines called via virtual 86 mode. The new BTX did the same thing.
However, it turns out that some instructions behave differently in virtual 86
mode and real mode (even though this is under-documented). For example, the
LEAVE instruction will cause an exception in real mode if any of the upper
16-bits of %ebp are non-zero after it executes. In virtual 8086 mode the
upper 16-bits are simply ignored. This could cause faults in hardware
interrupt handlers that inherited an %ebp larger than 0xffff from the 32-bit
client (loader, boot2, etc.) while running in real mode.

To fix, when executing hardware interrupt handlers provide an explicit clean
state where all the general purpose and segment registers are zero upon
entry to the interrupt handler. While here, I attempted to simplify the
control flow in the 'intusr' code that sets up the various stack frames
and exits protected mode to invoke the requested routine via real mode.

A huge thanks to Tor Egge (tegge@) for debugging this issue.

Submitted by: tegge
Reviewed by: tegge
Tested by: bz
MFC after: 1 week


188895 21-Feb-2009 ru

Fix build when WITH_SSP is set explicitly.

Submitted by: Jeremie Le Hen


188825 19-Feb-2009 imp

Enable building of ficl on MIPS. It compiles, but needs more testing.


188824 19-Feb-2009 imp

Add basic mips support. This has been compile tested only.


188666 16-Feb-2009 thompsa

Add a helper function for loading geli keys from the loader.


188455 10-Feb-2009 marius

- Use the generally more appropriate PROM base rather than the
kernel one as the non-faulting flush address in the loader so
we can can change KERNBASE and VM_MIN_KERNEL_ADDRESS if we
ever want to without needing to worry about using a compatible
loader.
- Correctly check for LOADER_DEBUG.
- Add a missing const for page_sizes[].


187917 30-Jan-2009 gabor

- Remove superfluous comment

PR: docs/129400
Submitted by: Gavin Atkinson <gavin@freebsd.org>


187614 23-Jan-2009 weongyo

Add an entry for the urtw(4) module.


187197 13-Jan-2009 luigi

remove a file which is, as far as I can tell, totally unused.


187143 13-Jan-2009 luigi

comment out some debugging messages that slipped in by mistake.

MFC after: 3 days


187101 12-Jan-2009 jkim

Allow VIA Nano processors to boot FreeBSD/amd64.

PR: amd64/130303
MFC after: 1 week


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


186598 30-Dec-2008 luigi

A number of small changes to make the 'save choice to disk' safer,
and re-enable it as default.

In particular:

+ re-enable the 'update' flag in the Makefile (of course!);

+ commit Warner's patch "orb $NOUPDATE,_FLAGS(%bp)"
to avoid writing to disk in case of a timeout/default choice;

+ fix an off-by-one count in the partition scan code that would
print the wrong name for unknown partitions;

+ unconditionally change the boot prompt to 'Boot:' instead of 'Default:'
to make room for the extra code/checks/messages. Some of the changes
listed below are also made to save space;

+ rearrange and fix comments for known partition types. Right now we
explicitly recognise *BSD, Linux, FAT16 (type 6, used on many USB keys),
NTFS (type 7), FAT32 (type 11).
Depending on other options we also recognise Extended (type 5),
FAT12 (type 1) and FAT16 < 32MB (type 4).

+ Add an entry "F6 PXE" when the code is built with -DPXE (which is
a default now). Technically, F6 boots through INT18, so the prompt 'PXE'
is a bit misleading. Unfortunately the name INT18
is too long and does not fit in - we could use ROM perhaps.
The reason I picked 'PXE' is that on many (I believe) new systems
INT18 calls PXE.

Apart from the choice of the name for PXE/ROM/INT18, this should close
pending issues on the 1-sector boot0 code and we should be able to
move the code to RELENG_7 when it reopens.

No boot0cfg changes are necessary.

MFC after: 3 weeks


186352 20-Dec-2008 sam

Merge support for Gateworks Cambria boards:
o add support for IXP435 cpu's (e.g. 64 irq's)
o add support for Cambria-specific devices: npe, led's (front panel and
octal latch), ehci, mcu, ide cf
o redo memory mapping for xscale/ixp4xx boards: previously memory
was assumed aliased to 0x10000000 but this appears to be true only
for ixp425 systems and breaks operation on others; rework so memory
is assumed to start at 0
o rework NPE configuration support to use NPE id's instead of port #'s;
these changes also rename the associated MAC's to follow the NPE's
they are attached to
o update npe firmware to latest rev (same license) and update default fw
imageid's to match; in particular this adds NPE-A and crypto support
o re-style NPE fw handling code and add a console msg identifying the
attributes of the loaded fw
o fix numerous problems with handling failures during npe setup
o fix npe rx q setup; need to spin waiting for mailbox responses during
early boot stages as qmgr interrupts are not delivered; this fixes
the problem where all 8 traffic classifications were not tied to the
rx q (and eliminates the console msg "remember to fix rx q setup")
o add DELAY to npe MII wait logic for IXP435
o strip down builtin phys->virt address translation table in resource
handling to just those resources that require it and add a console msg
to alert people when this (kludge) table needs to be extended
o purge a bunch of dead netbsd-ism's
o cleanup avila led driver
o add Cambria support to boot2 and rework code for better multi-board support

Notes:
1. NPE-A doesn't work and causes NPE-C to stop working; it is disabled
in the hints
2. USB isn't working yet; controller communicates ok but device
discovery fails
3. Cambria support must be configured separately from IXP425 boards;
multi-board support is TBD

Sponsored by: Hobnob, Gateworks (board donation)
Reviewed by: imp


186243 17-Dec-2008 dfr

Use full 64bit arithmetic when converting file offsets to block numbers - fixes
booting on filesystems with inode numbers with values above 4194304.

Submitted by: ps


186231 17-Dec-2008 raj

Improve style(9) in PowerPC U-Boot support lib.


186073 14-Dec-2008 nyan

Disconnect the efi from pc98. It's not needed.


185938 11-Dec-2008 ps

Fix a leak introduced in r185902. We should free the devspec if
we've successfully found a zfs pool.


185902 11-Dec-2008 ps

Avoid a double free in devopen by not freeing the device structure
in zfs_dev_open. This stops a panic in the loader when trying to
read from a zfs device and no zfs devices exist.


185852 10-Dec-2008 dfr

Don't get confused if we encounter a device which is part of a raidz or raidz2
pool while probing for vdevs.

PR: 129539
Submitted by: Paul Wootton (paul at fletchermoorland dot co dot uk)


185781 09-Dec-2008 sobomax

Remove now unused label.

Submitted by: Christoph Mallon
MFC after: 4 weeks
(along with r185779 and r185780)


185780 09-Dec-2008 sobomax

Optimiza assembly in the previous r185779, to save whooping 16 bytes.

Submitted by: Christoph Mallon
MFC after: 4 weeks
(including r185779)


185779 08-Dec-2008 sobomax

Respect RBX_MUTE flag from boot[012].

MFC after: 4 weeks


185776 08-Dec-2008 sobomax

Fix typo in the comment %is -> %si.


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


185711 06-Dec-2008 ps

Correct include path for i386 specific includes. This allows zfs
to boot on systems where the loader is built on amd64 systems.


185692 06-Dec-2008 danger

- correct variable name

PR: docs/129448
Submitted by: Kenyon Ralph <kralph@gmail.com>
MFC after: Revision 1.91 is merged


185579 03-Dec-2008 luigi

Another, hopefully final set of changes to boot0 and boot0cfg.

boot0.S changes:

+ import a patch from Christoph Mallon to rearrange the various
print functions and save another couple of bytes;

+ implement the suggestion in PR 70531 to enable booting from
any valid partition because even the extended partitions that
were previously in our kill list may contain a valid boot loader.
This simplifies the code and saves some bytes;

+ followwing up PR 127764, implement conditional code to preserve
the 'Volume ID' which might be used by other OS (NT, XP, Vista)
and is located at offset 0x1b8. This requires a relocation of the
parameter block within the boot sector -- there is no other
possible workaround.
To address this, boot0cfg has been updated to handle both
versions of the boot code;

+ slightly rearrange the strings printed in the menus to make
the code buildable with all options. Given the tight memory
budget, this means that with certain options we need to
shrink or remove certain labels.

and especially:

make -DVOLUME_LABEL -DPXE the default options.

This means that the newly built boot0 block will preserve the
Volume ID, and has the (hidden) option F6 to boot from INT18/PXE.
I think the extra functionality is well worth the change.

The most visible difference here is that the 'Default: ' string
now becomes 'Boot: ' (it can be reverted to the old value
but then we need to nuke 1/2 partition name or entries to
make up for the extra room).

boot0cfg changes:

+ modify the code to recognise the new boot0 structure (with the
relocated options block to make room for the Volume id).

+ add two options, '-i xxxx-xxxx' to set the volume ID, -e c
to modify the character printed in case of bad input

PR: 127764 70531
Submitted by: Christoph Mallon (portions)
MFC after: 4 weeks


185562 02-Dec-2008 luigi

This commits brings in a lot of documentation and some enhancement
of the boot0.S code, with a number of compile-time selectable options,
the most interesting one being the ability to select PXE booting.

The code is completely compatible with the previous one, and with
the boot0cfg program. Even the actual code is largely unmodified,
with only minor rearrangements or fixes to make room for the new
features.

The behaviour of the standard build differs from the previous
version in the following, minor things:

+ 'noupdate' is the default, which means the code does not
write back the selection to disk. You can enable the feature
at runtime with boot0cfg, or changing the flags in the Makefile.

+ a drive number of 0x00 (floppy, or USB in floppy emulation) is
now accepted as valid. Previously, it was overridden with 0x80,
meaning that the partition table coming from the media was
used to access sectors on a possibly different media.
You can revert to the previous mode building with -DCHECK_DRIVE,
and you can always use the 'setdrv' option in boot0cfg

+ certain FAT or NTFS partitions are listed as WIN instead of DOS.

+ the 'bel' character on a bad selection is replaced by a '#' to
make it clear that the system is not hang even if the machine
does not have a speaker. This can be reverted back at compile
time, or at runtime with an upcoming boot0cfg option.

Additional features are available as compile time options,
and may be become the default if deemed useful. In particular:

+ INT18/PXE boot (make -DPXE)
This option enables booting through INT 18h (which on certain
BIOSes can be hooked to PXE) by pressing F6. There is unfortunately
no room to print the additional menu option.
Also, to make room for the code, the 'Default: ' string is
changed to 'Boot: '

+ print current drive number (make -DTEST)
Prints a line indicating the current drive number.
This is useful to figure out what is going on for machines/bioses
which remap drives in sometimes surprising ways.

+ disable numeric keys in console mode (make -DONLY_F_KEYS)
Not really a significant option, but it is needed to make
room for the -DTEST mode.

+ disable floppy support (make -DCHECK_DRIVE)
Revert to the old behaviour of only accepting 0x80 and above
as valid drive numbers.

MFC after: 6 weeks


185375 27-Nov-2008 raj

Let ARM loader(8) build with the man page.


185346 26-Nov-2008 luigi

Fix a typo in previous commit: must call "putn" to print a crlf,
instead of "puts" which prints whatever is at %si, followed by a CRLF.

It was not noticed during tests because at that point %si points
to a partition entry whose first byte is 0x80, which is both a
terminator for the string and a non printable character.

Submitted by: Christoph Mallon


185339 26-Nov-2008 luigi

Pass the pointer to the selected partition in %si to the next stage
boot code. The bug was introduced in rev.1.13, and went unnoticed
because FreeBSD's boot1 does not use it, but other systems might.

(I have been struggling for almost a full day trying to figure out
why a syslinux'ed partition would not boot when started with the
FreeBSD /boot/boot0, only to realize that the bug was ours!)

The space for the two extra bytes (push %si and pop %si) is reclaimed
by removing an extra CRLF that is printed before booting.

The bug is not a major one but if there is time it might be a good
thing to merge it into the upcoming releases.


185175 22-Nov-2008 dfr

Fix amd64 build and re-enable gptzfsboot.


185151 21-Nov-2008 des

Disconnect gptzfsboot from the build until dfr@ gets his act together.


185132 20-Nov-2008 luigi

As reported in kern/118222, pxeboot in RELENG7 (and presumably
above) exhibits some misbehaviours on machines with AMD64 CPUs,
which at least in some cases I have tracked down to a heap overflow.

It is unclear whether it depends on the CPU or on the pxe bios
itself which may use more memory on AMD machines.

Noticeably a pxeboot compiled from 6.x sources works fine on all
machines I have tried so far, while a pxeboot compiled from 7.x
sources does not.

This patch is a first step in reducing the amount of memory used
while processing the configuration files read by the loader at boot
(some of them are quite large, 1700+ lines), and it does so by:
+ moving a buffer to static memory instead of allocating in the heap;
+ skipping empty lines;
+ reducing the amount of memory used for line descriptors;

Unfortunately there are several changes between 6.x and above,
affecting the compiler, the loader code itself, and libstand,
and it is not so straightforward to
These changes fix the behaviour on one motherboard with a
single-core AMD cpu, but are still not enough e.g on an Asus
M2N-VM (with a dual-core CPU).

I need to investigate the problem a bit more before figuring
out what should be committed to RELENG_7

PR: kern/118222


185099 19-Nov-2008 raj

Initial storage functionality for U-Boot support library.

- Only non-sliced bsdlabel style partitioning is currently supported (but provisions
are made towards GPT support, which should follow soon)
- Enable storage support in loader on ARM

Obtained from: Semihalf


185097 19-Nov-2008 dfr

Some zfsboot fixes from Norikatsu Shigemura:

1. zfsboot2 (boot2) doesn't %d (printf), so change %d to %u.
2. chase new zpool versioning as SPA_VERSION.
Obtained from: sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h

Submitted by: nork


185096 19-Nov-2008 dfr

Add a GPT-aware variant of zfsboot which should be used in a similar manner
to gptboot, i.e. installed in a freebsd-boot partition using /sbin/gpart or
/sbin/gpt.

Tweak the /boot/loader ZFS support so that it can find ZFS pools that are
contained in GPT partitions.


185095 19-Nov-2008 dfr

If we free the GPT partition list in bd_open_gpt() because of an error, don't
try to free it again in bd_closedisk(). While I'm here, fix a DEBUG print.


185045 18-Nov-2008 ache

Fix building without ZFS (can't find library)


185029 17-Nov-2008 pjd

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

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

- Delegated Administration

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

- L2ARC

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

- slog

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

- vfs.zfs.super_owner

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

- chflags(2)

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

- ZFSBoot

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

Submitted by: dfr

- Snapshot properties

- New failure modes

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

- Refquota, refreservation properties

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

- Sparse volumes

ZVOLs that don't reserve space in the pool.

- External attributes

Compatible with extattr(2).

- NFSv4-ACLs

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

Submitted by: trasz

- Creation-time properties

- Regression tests for zpool(8) command.

Obtained from: OpenSolaris


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


184490 31-Oct-2008 nwhitehorn

Modify our boot block to pick an output device, without which boot1 will fail
on G4 machines. On the assumption that most people using FreeBSD on Apple
hardware are not using serial consoles, set boot1's output to screen. This
should be revisited. While here, reduce verbosity of boot1.


183878 14-Oct-2008 raj

Initial support of loader(8) for ARM machines running U-Boot.

This uses the common U-Boot support lib (sys/boot/uboot, already used on
FreeBSD/powerpc), and assumes the underlying firmware has the modern API for
stand-alone apps enabled in the config (CONFIG_API).

Only netbooting is supported at the moment.

Obtained from: Marvell, Semihalf


183863 14-Oct-2008 nwhitehorn

Add a simple HFS boot block implementation for booting PowerPC macs. It creates
a small HFS filesystem with a CHRP boot script and an early-stage bootloader
derived from the sparc64 boot block.

Obtained from: sparc64


183825 13-Oct-2008 nwhitehorn

Don't close OF disk devices on PowerPC. This fixes loader when booting from
disk on my Blue & White G3 system.


183673 07-Oct-2008 imp

More diff reductions against ixp425/boot2/boot2.c. This time, we
bring in FIXUP_BOOT_DRV functionality as an #ifdef. This is not
enabled at this time, and the md5 remains constant with this change.
Apart from the 'accept any partitioning scheme on the device' changes,
this was the biggest delta...

# and yes, we'll merge these into one source file if we can do that in a
# way that makes sense.

Obtained from: sys/boot/arm/ixp425/boot2/boot2.c


183671 07-Oct-2008 imp

Diff reduction with boot/arm/at91/boot2/boot2.c: indent this statement
correctly.


183669 07-Oct-2008 sam

don't hardcode cc

Submitted by: Andrey Eltsov


183667 07-Oct-2008 jhb

Use CPUID to see if the current CPU supports long mode when attemping to
boot an amd64 kernel. If not, then fail the boot request with an error
message. Otherwise, the boot attempt will fail with a BTX fault when
trying to read the EFER MSR.

MFC after: 3 days


183651 06-Oct-2008 jhay

Add a boot loader for ixp425 based boards like the Gateworks Avila
and ADI Pronghorn Metro with Redboot on them.


183636 06-Oct-2008 imp

Bring in the trivial differences between this code and John Hay's new
code. Added a copyright for the work I did to this file a couple of
years ago. Add John's copyright too, since I'm sure I'll be pulling
more into this code. This also implements a new -n option to not
allow breaking into the boot sequence which was original in the patch
John posted (not in the original i386 code I based this boot2.c on,
only the name is the same). I haven't checked to see if he did that,
or if it was one of Sam's improvements.

Submitted by: jhay@


183635 05-Oct-2008 imp

Remove XMODEM_DL support. It never was complete and only serves to
increase the diffs with other arm boot2 loaders.


183634 05-Oct-2008 imp

Indent with 8-space tabs. This reduces the diffs to the newer ixp425
boot2 and may make it easier to merge these files in the future...


183628 05-Oct-2008 marius

Disable ATAPI DMA as it's once again broken in that it causes data
corruption with the on-board AcerLabs M5229 controllers. While at
it, remove the pointless "nothing to autoload yet." message.

MFC after: 3 days


183599 04-Oct-2008 raj

Minor style(9) fixes for U-Boot API glue.


183598 04-Oct-2008 raj

U-Boot API glue improvements:

- extend ub_dev_read() and ub_dev_recv() so that the actual len and
all error codes can be passed and processed properly; unify behaviour of
these routines

- introduce syscall general error code (API_ESYSC)


183592 04-Oct-2008 stas

- Add ae(4) to loader.conf.

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


183198 19-Sep-2008 sobomax

Backout rev 183181. It appears that I should have been using boot-device
of "cd:,\\:tbxi" with properly configured boot.tbxi, instead of booting
\boot\loader directly. Rev 183168 could probably stay, since it can be
viewed as an anti-foot-shooting measure and has no impact on normal
operation. I can revert it as well, if anybody objects.


183181 19-Sep-2008 sobomax

On PowerPC send output to both "/chosen/stdout" and "screen" nodes, unless
they point to the very same device. This should make loader usable on
some (all?) PowerMacs, where "/chosen/stdout" is disconneted from the
"screen" by the OF init process by default, except when user actually
has requested interaction with OF by holding ALT-CMD-O-F. Along with
rev 183168 this should provide a way to build bootable FreeBSD/ppc
installation or live CD that works OOB. Also, it should bring PowerMac
experience closer to that on other arches.

MFC after: 1 week
(assiming re@ blessing)


183149 18-Sep-2008 obrien

No FORTH for MIPS.


182919 10-Sep-2008 marius

Revert r177108 and restore r60506 for sparc64 as long as libstand
isn't fixed to only open the network device once and not do a open
and close dance on every file access; the firmwares of newer sparc64
machines perform an auto-negotiation with every open which in turn
causes netbooting to take horribly long if we open and close the
device over and over again.


182916 10-Sep-2008 marius

Work around Cheetah+ erratum 34 (USIII+ erratum #10) by relocating
the locked entry in it16 slot 0, which typically is occupied by the
PROM, and manually entering locked entries in slots != 0.

Thanks to Hubert Feyrer for donating the Blade 2000 this change was
developed on.


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


182877 08-Sep-2008 marius

USIII and beyond CPUs have stricter requirements when it comes
to synchronization needed after stores to internal ASIs in order
to make side-effects visible. This mainly requires the MEMBAR #Sync
after such stores to be replaced with a FLUSH. We use KERNBASE as
the address to FLUSH as it is guaranteed to not trap. Actually,
the USII synchronization rules also already require a FLUSH in
pretty much all of the cases changed.
We're also hitting an additional USIII synchronization rule which
requires stores to AA_IMMU_SFSR to be immediately followed by a DONE,
FLUSH or RETRY. Doing so triggers a RED state exception though so
leave the MEMBAR #Sync. Linux apparently also has gotten away with
doing the same for quite some time now, apart from the fact that
it's not clear to me why we need to clear the valid bit from the
SFSR in the first place.

Reviewed by: nwhitehorn


182766 04-Sep-2008 marius

Ensure interrupts are off while in {d,i}tlb_va_to_pa_sun4u().
I think this is necessary in order to make sure the workarounds
in {d,i}tlb_get_data_sun4u() work correctly.


182732 03-Sep-2008 raj

Improve loader support for U-Boot.

- add new diag commands: devinfo, sysinfo for U-Boot-style details about the system
configuration
- better memory info summary
- style corrections

Obtained from: Semihalf


182731 03-Sep-2008 raj

Show info about net devices in loader's 'lsdev' command. While there fix style.


182726 03-Sep-2008 raj

Use current SP instead of global data ptr for the U-Boot API signature search hint.

Global data (pointed by R2 on PowerPC) in principle is not guaranteed to be in
proximity of U-Boot heap (where the API signature is placed) accross different
architectures and platforms. Instead, use U-Boot stack pointer as a hint for
the search instead of the global data; this method tends to be more uniform
accross different platforms.

Obtained from: Semihalf


182724 03-Sep-2008 raj

Make metadata.c shared across all platforms using U-Boot.

This will [soon] be needed for ARM.


182723 03-Sep-2008 raj

Move U-Boot compatibility library to WARNS=2 level.


182478 30-Aug-2008 marius

- Read ASI_{D,I}TLB_DATA_ACCESS_REG twice in order to work around
errata of USIII and beyond (USIII erratum #19, USIII+ erratum #1,
USIIIi erratum #1).
- Use the cheetah PA mask in {d,i}tlb_va_to_pa_sun4u() for USIII
and beyond. This is done so that these functions will still mask
the debug bits of spitfire-class CPUs once we increase TD_PA_BITS
to match the number of bits used for the PA by cheetah-class CPUs.
- Change {d,i}tlb_enter_sun4u() to also set TLB_CTX_KERNEL as the
context of the mappings entered. This is more or less cosmetic as
TLB_CTX_KERNEL is 0.
- Now that we have to distinguish between different sun4u CPUs in
the loader anyway, no longer do trial and error when reading the
portid property.


182194 26-Aug-2008 matteo

Add geom_journal

PR: conf/126829
MFC after: 2 days


182020 22-Aug-2008 marius

cosmetic changes and style fixes


181581 11-Aug-2008 weongyo

Add an entry for the upgt(4) module.


181436 08-Aug-2008 jhb

- Initialize the vm86 structure to a known-good state. Specifically, always
set the %eflags used during a BIOS call via BTX to 0x202. Previously
the flags field was uninitialized garbage, and thus it was "random" if
interrupts were enabled or not during BIOS calls.
- Use constants from <machine/psl.h> for fields in %eflags.

MFC after: 3 days


181433 08-Aug-2008 jhb

Fix the hangs reported with the real mode BTX:
- I had errantly assumed that all user requests should run with interrupts
enabled. User requests for software interrupts, however, need to disable
interrupts (and tracing) just like hardware interrupts.
- Disable alignment checking when emulating a hardware interrupt as well
(based on the description of the real mode operation of the 'INT'
instruction in the IA-32 manuals).
- Use constants for fields in %eflags.

Tested by: bz
MFC after: 3 days


181398 07-Aug-2008 marius

- Reimplement {d,i}tlb_enter() and {d,i}tlb_va_to_pa() in C. There's
no particular reason for them to be implemented in assembler and
having them in C allows easier extension as well as using more C
macros and {d,i}tlb_slot_max rather than hard-coding magic (and
actually spitfire-only) values.
- Fix the compilation of pmap_print_tte().
- Change pmap_print_tlb() to use ldxa() rather than re-rolling it
inline as well as TLB_DAR_SLOT and {d,i}tlb_slot_max rather than
hardcoding magic (and actually spitfire-only) values.
- While at it, suffix the above mentioned functions with "_sun4u" to
underline they're architecture-specific.
- Use __FBSDID and macros instead of magic values in locore.S.
- Remove unused includes and smp_stack in locore.S.


181297 04-Aug-2008 rpaulo

Add coretemp(4) and k8temp(4).

MFC after: 1 day


181282 04-Aug-2008 cperciva

Dereferencing uninitialized pointers considered harmful. Prior to this
commit, calling i386_parsedev(..., X, ...) where X is "ad", "bge", or
any other disk or network device name without a unit number, would
result in dereferencing whatever happened to be on the stack where the
variable "cp" is stored.

Found by: LLVM/Clang Static Checker


181278 04-Aug-2008 cperciva

Setting a variable to the same value twice doesn't actually make it
more likely to have the right value. Remove superfluous assignments.

Found by: LLVM/Clang Static Checker


180733 23-Jul-2008 imp

Only descend into the boot directory for the architecture if it
actually exists and is a directory or symlink to a directory.


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.


180253 04-Jul-2008 nyan

Remove Japanese document.


180208 03-Jul-2008 peter

Set magic fbsd:nokeywords property that allows files to bypass
keyword expansion. (file-specific replacement for CVSROOT/exclude)


180194 02-Jul-2008 peter

Attempt to set the charset


180193 02-Jul-2008 peter

Pretend that this file isn't binary.


180145 01-Jul-2008 nyan

Fix off-by-one error.

MFC after: 1 week


180023 26-Jun-2008 ru

Fix a fallout from SSP commit, and make this compile again.
Bonus: including kern.mk just to pick kernel warning flags
was an extremely bad idea anyway, because it also picked
up CFLAGS (it probably wasn't the case at the time of CVS
rev. 1.1, I haven't checked). Remove duplicate CWARNFLAGS
from CFLAGS.


180012 25-Jun-2008 ru

Enable GCC stack protection (aka Propolice) for userland:
- It is opt-out for now so as to give it maximum testing, but it may be
turned opt-in for stable branches depending on the consensus. You
can turn it off with WITHOUT_SSP.
- WITHOUT_SSP was previously used to disable the build of GNU libssp.
It is harmless to steal the knob as SSP symbols have been provided
by libc for a long time, GNU libssp should not have been much used.
- SSP is disabled in a few corners such as system bootstrap programs
(sys/boot), process bootstrap code (rtld, csu) and SSP symbols themselves.
- It should be safe to use -fstack-protector-all to build world, however
libc will be automatically downgraded to -fstack-protector because it
breaks rtld otherwise.
- This option is unavailable on ia64.

Enable GCC stack protection (aka Propolice) for kernel:
- It is opt-out for now so as to give it maximum testing.
- Do not compile your kernel with -fstack-protector-all, it won't work.

Submitted by: Jeremie Le Hen <jeremie@le-hen.org>


179825 16-Jun-2008 olli

Implement a workaround for a long-standing problem in
libi386's time(), caused by a qemu bug. The bug might
be present in other BIOSes, too.

qemu either does not simulate the AT RTC correctly or
has a broken BIOS 1A/02 implementation, and will return
an incorrect value if the RTC is read while it is being
updated.

The effect is worsened by the fact that qemu's INT 15/86
function ("wait" a.k.a. usleep) is non-implmeneted or
broken and returns immediately, causing beastie.4th to
spin in a tight loop calling the "read RTC" function
millions of times, triggering the problem quickly.

Therefore, we keep reading the BIOS value until we get
the same result twice. This change fixes beastie.4th's
countdown under qemu.

Approved by: des (mentor)


179634 07-Jun-2008 kib

Fix the incorrect calculation of a block address within a single indirect
block.

PR: 108215
Submitted by: Yuichiro Goto, y7goto gmail com
MFC after: 2 weeks


179631 07-Jun-2008 jhb

Workaround a bug in the BIOS of Dell R900 machines. Specifically, each
entry in the SMAP is a 20 byte structure and they are queried from the
BIOS via sucessive BIOS calls. Due to an apparent bug in the R900's
BIOS, for some SMAP requests the BIOS overflows the 20 byte buffer
trashing a few bytes of memory immediately after the SMAP structure. As
a workaround, add 8 bytes of padding after the SMAP structure used in
the loader for SMAP queries.

PR: i386/122668
Submitted by: Mike Hibler mike flux.utah.edu, silby
MFC after: 3 days


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.


178037 09-Apr-2008 jhb

Revert the previous change and let PROBE_KEYBOARD function identical to -P
in boot2/gptboot.


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


177626 26-Mar-2008 brueffer

Fix some "in in" typos in comments.

PR: 121490
Submitted by: Anatoly Borodin <anatoly.borodin@gmail.com>
Approved by: rwatson (mentor), jkoshy
MFC after: 3 days


177152 13-Mar-2008 obrien

style(9) & style.Makefile(9)

Reviewed by: raj


177109 12-Mar-2008 raj

Improve handling U-Boot's "eth%daddr" while PowerPC metadata preparation.

We're now more robust against cases of non-sorted and/or non-continuous
numbering of those entries.

Reviewed by: imp, marcel
Approved by: cognet (mentor)


177108 12-Mar-2008 raj

Eliminate artificial increasing of 'netdev_opens' counter in loader's net_open().

This was introduced as a workaround long time ago for some Alpha firmware
(which is now gone), and actually prevented net_close() to ever be
called.

Certain firmwares (U-Boot) need local shutdown operations to be performed on a
network controller upon transaction end: such platform-specific hooks are
supposed to be called via netif_close() (from within net_close()).

This change effectively reverts the following CVS commit:

sys/boot/common/dev_net.c

revision 1.7
date: 2000/05/13 15:40:46; author: dfr; state: Exp; lines: +2 -1
Only probe network settings on the first open of the network device.
The alpha firmware takes a seriously long time to open the network device
the first time.

Also suppress excessive output while netbooting via loader, unless debugging.

While there, make sys/boot/uboot more style(9) compliant.

Reviewed by: imp
Approved by: cognet (mentor)


177039 10-Mar-2008 jhb

Change the BTX kernel to drop all the way out to real mode to invoke BIOS
routines (V86 requests from the client and hardware interrupt handlers):
- Install trampoline real mode interrupt handlers at IDT vectors 0x20-0x2f
to handle hardware interrupts by invoking the appropriate vector (0x8-0xf
or 0x70-0x78). This allows the 8259As to use vectors 0x20-0x2f in real
mode as well as protected mode will ensuring that the master 8259A
doesn't share IDT space with CPU exceptions in protected mode.
- Since we don't need to reserve space for page tables and a page directory
anymore since dropping paging support, move the TSS and protected mode
IDT up by 16k. Grow the ring 1 link stack by 16k as a result.
- Repurpose the ring 1 link stack to be used as a real mode stack when
invoking real mode routines either via a V86 request or a hardware
interrupts. This simplifies a few things as we avoid disturbing the
original user stack.
- Add some more block comments to explain how the code interacts with the
V86 structure as this wasn't immediately obvious from the prior comments
(e.g. that we explicitly copy the seg regs for real mode out of the V86
struct onto the stack to be popped off when going into real mode, etc.).
Also, document some of the stack frames we create going to real mode and
back.
- Remove all of the virtual 86 related code including having to simulate
various instructions and BIOS calls on a trap from virtual 86 mode.
- Explicitly panic if a user client attempts to perform a V86 CALL
request that isn't a far call.
- Bump version to 1.2.

Assuming this works ok this should fix some of the long standing issues
with USB booting as well as etherboot.

MFC after: 2 weeks
Submitted by: kib (some parts from his original real mode patch)


176882 06-Mar-2008 jhb

In the PROBE_KEYBOARD case, always enable multiple consoles and set the
serial console as the primary console if the keyboard probe fails.

MFC after: 1 week


176656 29-Feb-2008 nyan

MFi386: revision 1.43

Do not attempt to make an NFS rpc call if using tftp


176654 29-Feb-2008 nyan

MFi386: revision 1.55.

Tweak the verbose disk printing a bit.


176646 28-Feb-2008 jhb

Tweak the verbose disk printing a bit:
- Consolidate the code to humanize the size of a disk partition into a
single function based on the code for GPT partitions and use it for
GPT partitions, BSD slices, and BSD partitions.
- Teach the humanize code to use KB for small partitions (e.g. GPT boot
partitions now show up as 64KB rather than 0MB).
- Pad a few partition type names out so that things line up in the
common case.

MFC after: 1 week


176645 28-Feb-2008 nyan

MFi386:

Retire the support for using paging in BTX. It hasn't been used since
before 4.0.


176644 28-Feb-2008 jhb

Rev 1.72 fixed a bug where if /boot.config changed the console its contents
weren't displayed on the new console. However, the config string has been
altered as part of being parsed so we only display the first option. Fix
this by saving a copy of /boot.config before parsing it and displaying the
saved copy after parsing.

MFC after: 1 week
PR: i386/103972
Submitted by: Alexandre Belloni alexandre.belloni of netasq.com


176631 27-Feb-2008 jhb

Retire the support for using paging in BTX. It hasn't been used since
before 4.0.

Submitted by: kib


176490 23-Feb-2008 marcel

o Build and install the U-Boot loader as ubldr.
o Don't build/install the manual pages or configuration
files that are already installed by the OFW loader.
o Hook the U-Boot loader to the build.


176489 23-Feb-2008 marcel

style(9) commit.


176487 23-Feb-2008 marcel

Setup the new bootinfo structure.
While here, make local function static and update copyright.


176486 23-Feb-2008 marcel

o Keep running on U-Boot's stack.
o Disable interrupts while not running U-Boot code. We clobber
registers that the U-Boot interrupt handlers assume to be
fixed as per the U-Boot register usage. At this time this only
applies to r14. U-Boot uses r2 now for what they used r29 for.
After we restore r14 in preparation of doing the syscall, we
re-enable interrupts. When we return from the syscall, we
disable interrupts and restore the callee-saved r14.


176485 23-Feb-2008 marcel

The NFS file system support is conditional upon LOADER_NFS_SUPPORT,
not LOADER_NET_SUPPORT.


176484 23-Feb-2008 marcel

Add __elfN(relocation_offset). It holds the offset between the virtual
(link) address and the physical (load) address. Ideally, the mapping
between link and load addresses should be abstracted by the copyin(),
copyout() and readin() functions, so that we don't have to add kluges
in __elfN(loadimage)(). Then, we could also have paged virtual memory
for the kernel. This can be important under EFI, where you need to
allocate physical memory form the firmware if you want to work in all
scenarios.


176482 23-Feb-2008 marcel

o Include glue.h
o Support multiple memory regions.


176481 23-Feb-2008 marcel

o Build libuboot with -msoft-float like everything else.
o Move the API prototypes to a separate header (glue.h)
o Allow the platform to hint libuboot about where to look
for the API signature. The uboot_address variable is
expected to be defined by the platform.


176480 23-Feb-2008 marcel

Add the appropriate license information. This file is double
licensed under GPL and BSD.

Thanks to: raj@


176479 23-Feb-2008 marcel

We build ficl and libofw with -msoft-float. Build the loader
with -msoft-float too.


176372 17-Feb-2008 marcel

Move the $FreeBSD$ tag in a comment as __FBSDID doesn't work.


176371 17-Feb-2008 marcel

Hook the U-Boot library up to the build.


176349 16-Feb-2008 marcel

MFp4 (e500):

Add support for U-Boot. This uses the U-Boot API as developed by
Rafal and which is (will be) part of U-Boot 1.3.2 and later.

Credits to: raj@


176348 16-Feb-2008 marcel

MFp4 (e500):

Add support for U-Boot. This uses the U-Boot API as developed by
Rafal and which is (will be) part of U-Boot 1.3.2 and later.

Credits to: raj@


176185 11-Feb-2008 raj

Clean up PowerPC loader(8) build config.

Turn off TFTP support by default: when both TFTP and NFS are enabled in the
loader, strange interactions occur in the pure netbooting scenario (i.e.
loader is TFTP-ed, kernel+world mounted over NFS), leading to very slow access
to the NFS-exported files.

Reviewed by: grehan
Approved by: cognet (mentor)


176068 06-Feb-2008 grehan

Make the openfirmware getchar entry point non-blocking. This catches up
with jhb's 2005/05/27 loader multiple-console change.

Tested by: marius/sparc64, grehan/ofwppc


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


174930 26-Dec-2007 marcel

"FreeBSD/Open Firmware/PowerPC ..." is confusing and non-standard.
Use "FreeBSD/powerpc Open Firmware ..." instead.


174878 23-Dec-2007 ticso

- remove code from oroginal file, which is not required on BWCT boards
- Be more chatty on startup, since we have enough code space on
AT91RM9200
- init DS1672 charging
- init USART GPIO


174877 23-Dec-2007 ticso

BWCT boards uses two different SPI flash chips
check for both status codes


174777 19-Dec-2007 ambrisko

Allow negative values to be specified in the loader.


174724 17-Dec-2007 marcel

Remove file after being repocopied to ../ofw, where it lives on.

Repocopy by: simon@


174723 17-Dec-2007 marcel

Build the OFW loader from its new location after the sources
were repocopied from ./loader to ./ofw.


173957 26-Nov-2007 jhb

Add a note to indicate that these files do borrow in part from mbr.s and
boot1.S

Requested by: rnordier


173720 18-Nov-2007 nyan

MFi386: revision 1.18

Add a trailing \0 to the read error string so that read errors don't print
out two error messages.


173697 17-Nov-2007 jhb

Add a trailing \0 to the read error string so that read errors don't print
out two error messages.

MFC after: 3 days


173575 12-Nov-2007 bz

Though we are currently not interested in the EDD3 flag,
Enhanced Disk Drive Specification Ver 3.0 defines that the version
of extension in AH would be 30h.
Correct the check for that to be >=30h instead of >3h.
MFC after: 2 months


173440 08-Nov-2007 ru

Document the per-arch default value of kern.maxbcache.


173118 28-Oct-2007 jhb

- Add constants for the different memory types in the SMAP table.
- Use the SMAP types and constants from <machine/pc/bios.h> in the boot
code rather than duplicating it.


173040 26-Oct-2007 jhb

Use the smaller cgbase() macro in ufsread.c if UFS_SMALL_CGBASE is
defined. This lets each boot program choose which version of cgbase() it
wants to use rather than forcing ufsread.c to have that knowledge.

MFC after: 1 week
Discussed with: imp


173026 26-Oct-2007 jhb

Add . to the include path so that we follow the 'machine' symlink we create
during depend on amd64.

Reported by: rwatson


173024 26-Oct-2007 imp

The arm boot code uses this function as well. Redefining cgbase()
saves about 500 bytes in the boot code. While the AT91RM9200 has 12k
of space for the boot loader, which is more than i386's 8k, the code
generated by gcc is a bit bigger.

I've had this in p4 for about two years now.


172991 25-Oct-2007 cognet

Fix signedness to make gcc happy.


172974 25-Oct-2007 jhb

Break out of the I/O retry loop as soon as an I/O operation succeeds rather
than always retrying operations three times.

Submitted by: nyan


172968 25-Oct-2007 nyan

MFi386: part of 1.52

Split the pc98_partition specific routine in bd_opendisk()
into bd_open_pc98().


172965 25-Oct-2007 nyan

MFi386: part of revision 1.51

Rework the read/write support in the bios disk driver some to cut down
on duplicated code.
- All of the bounce buffer and retry logic duplicated in bd_read() and
bd_write() are merged into a single bd_io() routine that takes an
extra direction argument. bd_read() and bd_write() are now simple
wrappers around bd_io().


172952 25-Oct-2007 imp

Load the bytes into the EMAC's MAC address register in the proper
order. The kernel used to shuffle them around to get things right,
but that was recently fixed. This makes our boot loader match the
behavior of most other boot loaders for the atmel parts. This bug was
inherited from the Kwikbyte loader that we started from.

This bug was discovered by Bj?\027.A?\027Nvrn K?\027Nvnig back in June, but fell on the
floor. He provided patches to the kernel, include backwards
compatibility options that were similar to Olivier's if_ate.c commit.


172940 24-Oct-2007 jhb

First cut at support for booting a GPT labeled disk via the BIOS bootstrap
on i386 and amd64 machines. The overall process is that /boot/pmbr lives
in the PMBR (similar to /boot/mbr for MBR disks) and is responsible for
locating and loading /boot/gptboot. /boot/gptboot is similar to /boot/boot
except that it groks GPT rather than MBR + bsdlabel. Unlike /boot/boot,
/boot/gptboot lives in its own dedicated GPT partition with a new
"FreeBSD boot" type. This partition does not have a fixed size in that
/boot/pmbr will load the entire partition into the lower 640k. However,
it is limited in that it can only be 545k. That's still a lot better than
the current 7.5k limit for boot2 on MBR. gptboot mostly acts just like
boot2 in that it reads /boot.config and loads up /boot/loader. Some more
details:
- Include uuid_equal() and uuid_is_nil() in libstand.
- Add a new 'boot' command to gpt(8) which makes a GPT disk bootable using
/boot/pmbr and /boot/gptboot. Note that the disk must have some free
space for the boot partition.
- This required exposing the backend of the 'add' function as a
gpt_add_part() function to the rest of gpt(8). 'boot' uses this to
create a boot partition if needed.
- Don't cripple cgbase() in the UFS boot code for /boot/gptboot so that
it can handle a filesystem > 1.5 TB.
- /boot/gptboot has a simple loader (gptldr) that doesn't do any I/O
unlike boot1 since /boot/pmbr loads all of gptboot up front. The
C portion of gptboot (gptboot.c) has been repocopied from boot2.c.
The primary changes are to parse the GPT to find a root filesystem
and to use 64-bit disk addresses. Currently gptboot assumes that the
first UFS partition on the disk is the / filesystem, but this algorithm
will likely be improved in the future.
- Teach the biosdisk driver in /boot/loader to understand GPT tables.
GPT partitions are identified as 'disk0pX:' (e.g. disk0p2:) which is
similar to the /dev names the kernel uses (e.g. /dev/ad0p2).
- Add a new "freebsd-boot" alias to g_part() for the new boot UUID.

MFC after: 1 month
Discussed with: marcel (some things might still change, but am committing
what I have so far)


172927 24-Oct-2007 jhb

Rework the read/write support in the bios disk driver some to cut down
on duplicated code and support 64-bit LBAs for GPT.
- The code to manage an EDD or C/H/S I/O request are now in their own
routines. The EDD routine now handles a full 64-bit LBA instead of
truncating LBAs to the lower 32-bits. (MBRs and BSD labels only
have 32-bit LBAs anyway, so the only LBAs ever passed down were 32-bit).
- All of the bounce buffer and retry logic duplicated in bd_read() and
bd_write() are merged into a single bd_io() routine that takes an
extra direction argument. bd_read() and bd_write() are now simple
wrappers around bd_io().
- If a disk supports EDD then always use it rather than only using it if
the cylinder is > 1023. Other parts of the boot code already do
something similar to this. Also, GPT just uses LBAs, so for a GPT disk
it's probably best to ignore C/H/S completely. Always using EDD when
it is supported by a disk is an easy way to accomplish this.

MFC after: 1 week


172925 24-Oct-2007 nyan

MFi386: revision 1.50

Reindent the read/write code of bd_realstrategy() so it is more readable.


172924 24-Oct-2007 nyan

MFi386: revision 1.41

Slightly cleanup the 'bootdev' concept on x86 by changing the various
macros to treat the 'slice' field as a real part of the bootdev instead
of as hack that spans two other fields (adaptor (sic) and controller)
that are not used in any modern FreeBSD boot code.


172922 24-Oct-2007 jhb

Reindent the read/write code of bd_realstrategy() so it is more readable.

MFC after: 1 week


172921 24-Oct-2007 jhb

Slightly cleanup the 'bootdev' concept on x86 by changing the various
macros to treat the 'slice' field as a real part of the bootdev instead
of as hack that spans two other fields (adaptor (sic) and controller)
that are not used in any modern FreeBSD boot code.

MFC after: 1 week


172664 15-Oct-2007 nyan

Optimize for size on pc98. It enables to boot a kernel again.

I don't know what's wrong (loader, boot2 or others), but this change is
effective.

Tested by: NAKAJI Hiroyuki
MFC after: 3 days


172591 12-Oct-2007 ps

Do not attempt to make an NFS rpc call if using tftp

PR: kern/91720
Submitted by: Ruben Kerkhof


172445 04-Oct-2007 obrien

Also boot *.debug if everything else fails.

Approved by: re(gnn)


172327 26-Sep-2007 ru

Mention that autoboot_delay also accepts the "NO" value.

Approved by: re (kensmith)


171876 17-Aug-2007 imp

Don't pass RB_BOOTINFO to the kernel. There's no bootinfo actually
passed into the kernel, and the kernel will soon grow that ability on
arm.

Approved by: re@ (blanket)


171794 09-Aug-2007 imp

Use the .S version for now. I have a version optimized for size p4,
but I'm unsure of its provenance, so rather than add it here, revert
the migration to it.

Approved by: re@ (blanket)


171426 13-Jul-2007 imp

MFp4:
Add support for the CENTIPAD board (http://www.harerod.de/centipad/index.html)
(which is a very cool, very small ARM board)
Add support for KB9202B (it has different memory)
Make BOOT_FLAVOR settable
Minor cleanup nits

Approved by: re@


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)


170854 17-Jun-2007 marius

- Make better use of the global chosen, memory and mmu handles instead
of obtaining them over and over again and pretending we could do
anything useful without them (for chosen this includes adding a
declaration and initializing it in OF_init()).
- In OF_init() if obtaining the memory or mmu handle fails just call
OF_exit() instead of panic() as the loader hasn't initialized the
console at these early stages yet and trying to print out something
causes a hang. With OF_exit() one at least has a change to get back
to the OFW boot monitor and debug the problem.
- Fix OF_call_method() on 64-bit machines (this is a merge of
sys/dev/ofw/openfirm.c rev 1.6).
- Replace OF_alloc_phys(), OF_claim_virt(), OF_map_phys() and
OF_release_phys() in the MI part of the loader with wrappers around
OF_call_method() in the sparc64. Beside the fact that they duplicate
OF_call_method() the formers should never have been in the MI part
of the loader as contrary to the OFW spec they use two-cell physical
addresses.
- Remove unused functions which are also MD dupes of OF_call_method().
- In sys/boot/sparc64/loader/main.c add __func__ to panic strings as
different functions use otherwise identical panic strings and make
some of the panic strings a tad more user-friendly instead of just
mentioning the name of the function that returned an unexpected
result.


170839 16-Jun-2007 marius

- Remove dupe and unused declarations and prototypes.
- Add missing prototypes.
- Define global variables not used outside of this module as static.
- Replace some outdated hard-coded functions names in panic strings
with __func__.
- Fix some style(9) bugs.


170838 16-Jun-2007 marius

Sync the styles of sys/boot/ofw/libofw/openfirm.c and
sys/dev/ofw/openfirm.c with themselves, with each-other
and with style(9).


170101 29-May-2007 simokawa

MFp4: add FireWire/dcons support in loader for i386/amd64.

It is disabled by default. You need to put
LOADER_FIREWIRE_SUPPORT=yes in /etc/make.conf
and rebuild loader to enable it.
(cd /sys/boot/i386 && make clean && make && make install)

You can find a short introduction of dcons at
http://wiki.freebsd.org/DebugWithDcons


170026 27-May-2007 marcel

Have the processor defer all faults and exceptions for control
speculative loads. This at least makes control speculative loads
work. In the future we should analyze which faults/exceptions
we want to handle rather than defer to avoid having to call the
recovery code when it's not strictly necessary.


169842 21-May-2007 jkim

Use lower cases for UUID string to conform RFC4122 and ISO/IEC-9834-8:2005.


169732 19-May-2007 kan

Tweak inlining parameters a little. Add warning to tell us if function
we declared as inline can not be inlined.


169399 09-May-2007 sepotvin

Add documentation for the vm.kmem_size_min and vm.kmem_size_max tunables.

Approved by: njl (mentor, blanket)


169286 05-May-2007 jmg

fixup talk of kern.maxswzone... It's been 32MB for almost 5 years now...
and only supports just over 7GB of swap...

Sound a bit more professional..

Inspired by: Marc G. Fournier
MFC After: 3 days


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.


168466 07-Apr-2007 nyan

Fix build.


168457 07-Apr-2007 kato

Added the IPLware 3.33 support.
- Added magic numbers to pretend the NEC original program version
2.70.
- Added string display routine with Shift-JIS code support.
- Added three nop instructions at start1 in start.s since the
installaer of the IPLware put 'call $0x09ab' instruction.
- Put the near return instruction at 0x9ab in selector.s.

Since the Shit-JIS display routine must be located at 0x1243, the
linker script file (ldscript) is applied.


168442 06-Apr-2007 kan

pc98 boot2 is compiled with _KERNEL defined, and that makes non-static
bootinfo variable declaration visible. It conflicts with static
declaration in this file. Declare variable as globally visible in
order to resolve the conflict.


168279 02-Apr-2007 imp

Loop on sdcard init. This helps if one hasn't plugged in the card
fast enough, or there's other issues that cause the first try to fail.


168013 28-Mar-2007 imp

RTC_TIMR's RTC_SEC field is BCD. That makes it unsuitable for
GetSeconds(). Instead, use CRTR register shifted right 15. This
gives us a range of 32 seconds we can do for timeout.

Shift to using == rather than < or > for calculating the timeout,
since if we can't read the ST_CTRT register twice in a second we have
even bigger problems to worry about, and == deals with the 'wrap'
issue.

This lets me type at the boot2 prompt again! Woo Hoo!

Bogusness noticed by: tisco
Pointy Hat to: That silly imp guy


168012 28-Mar-2007 imp

Since we're about to set ST_RTMR to 1 to increase the accuracy of the
CRTR register to be 1/32768th of a second in init, we don't need to do
it here.


168011 28-Mar-2007 imp

All SD cards have a block size of 512. The READ_BL_LEN field in the
CSD is usually 512 (well, 9), but for 2GB (and the rogue 4GB SD cards)
it is 1024 (or 2048 for 4GB). This value doesn't work for the block
read commands (which really want 512). Hardcode 512 for those. This
may break really old MMC cards that don't have a 512 block size (I've
never seen one: make my day and send me one :-), but since the MMC
side of the house is currently broken, it should only have the effect
that 2GB (and non-conforming 4GB) SD cards will work.

My 'non-conforming' 4GB SD card also works now too. The
non-conforming 4GB SD cards were sold for a while before the SD
association was worried they would be (a) incompatible (different FAT
flavor on them) and (b) confusing for the new SDHC standard and
cracked down on suppliers' bogus use of the SD trademark...


168007 28-Mar-2007 imp

Various buglets fixed (from submitter):

The changes to getstr() is so that the character that is
passed in to it, is also processed just as the rest. I also
removed one of the getc() calls otherwise you loose every
second character.

I also changed the strcpy of kname, so that it only happens if
kname is '\0'. This is so that one can pass a kernel in
through /boot.config.

The last change to boot2.c is in parse(). If you tried to type
a kernel name to boot, the first character was lost, the arg--
fix that.

Submitted by: jhay


168006 28-Mar-2007 imp

Fix problem where memcmp would return true in the case where the
character after the character that was the same.

Submitted by: jhay


168005 28-Mar-2007 imp

Fix off by one error in length of the string.

Submitted by: jhay


167914 26-Mar-2007 thomas

Fix setting of serial port speed. A junk value was passed in AX when
bioscom is called to set up serial port parameters because COMSPEED
was treated as an address instead of an immediate value, causing
serial port parameters to never be set.

PR: i386/110828
Reviewed by: jhb
MFC after: 2 weeks


167850 23-Mar-2007 jkim

Update to FICL 3.03 (the last release before FICL4 rewrite).

The relevant changes for FreeBSD (excerpt from the release note):

* Newly implemented CORE EXT words: CASE, OF, ENDOF, and ENDCASE. Also
added FALLTHROUGH, which works like ENDOF but jumps to the instruction
just after the next OF.
* Bugfix: John-Hopkins locals syntax now accepts | and -- in the comment
(between the first -- and the }.)
* Bugfix: Changed vmGetWord0() to make Purify happier. The resulting
code is no slower, no larger, and slightly more robust.


167814 22-Mar-2007 jkim

Catch up with ACPI-CA 20070320 import.


167657 17-Mar-2007 kato

- Moved the uninitialized variables from the data to the bss section.
- Fixed typos in comment.


167586 15-Mar-2007 imp

Remove vestiges of very specific fpga support for my company's board.
It isn't relevant to FreeBSD as a whole, breaks the build, and isn't
even needed for my company's boards anymore...

MFC After: 2 weeks


167191 04-Mar-2007 nyan

MFi386: revision 1.17.

Fix the cdboot twiddle display.


166926 23-Feb-2007 remko

Fix the cdboot twiddle display.
I created and tested this with a custom FreeSBIE cd-image.

PR: i386/96452
Submitted by: Yuichiro Goto <y7goto at gmail dot com>
MFC after: 3 days
Approved by: imp (mentor)


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


165876 07-Jan-2007 marius

Garbage collect the code for auto-loading modules based on ISAPNP IDs,
which is #if'ed out since nearly eight years, along with its outdated
database.

Agreed by: ru (some months ago)


165401 20-Dec-2006 imp

MFp4: differences for bwct ethernet attachment


165400 20-Dec-2006 imp

MFp4: Differences in flash part for bwct. need a more generic way to cope.


165399 20-Dec-2006 imp

MFp4: Add timeout to eeprom access for lame eeprom that go awol


165398 20-Dec-2006 imp

MFp4: bwct memory size and PLL parameters


165397 20-Dec-2006 imp

MFp4: bwct boot rom is different. need a more generic way to cope long term.


165396 20-Dec-2006 imp

MFp4: Delay a second or two after the upload before printing Done.
Add an automatic reset for remote operational luvin' goodness.


165395 20-Dec-2006 imp

MFp4: bwct is a new board choice.


165325 18-Dec-2006 kmacy

add an interface for passing the entire kernel size up front to the
loader so that it can memory can be allocated aligned at the beginning of
the desired large page


165145 13-Dec-2006 yongari

Add an entry for the msk(4) module.


164948 06-Dec-2006 jhb

Ignore any breakpoint instructions (int 3) we encounter in vm86 mode
rather than treating them as a fatal exception and halting. At least one
storage BIOS (some newer mpt(4) parts) have a breakpoint instruction in
their disk read routine.

MFC after: 3 days


164739 29-Nov-2006 yar

Note that not all architectures use sendfile(2) buffers;
refer to the respective manpage for details.

MFC after: 3 days


164563 23-Nov-2006 kmacy

remove CDDL derive hcall.S


164412 19-Nov-2006 marcel

Remove LDR_LOG2_PGSZ, ia64_pgtbl and ia64_pgtblsz. They are part of
a WIP and not used yet.


164335 16-Nov-2006 ru

Remove an unused variable.


164324 16-Nov-2006 imp

Mfp4: Remove mci_device.c. It should have been removed when it was
merged ito sd-card.c, but this is an imperfect world.


164323 16-Nov-2006 imp

Move to using a common arm_init.S. These things are more similar than
different at this point.


164322 16-Nov-2006 imp

MFp4: Don't fix the size at 8k, and some minor cleanups. andre@ contributed
to fixing this problem.


164321 16-Nov-2006 imp

MFp4: Improvements, including the ability to download to an arbitrary
part of the spi flash.


164320 16-Nov-2006 imp

Tweaks for better boot flavor support.


164319 16-Nov-2006 imp

Mfp4: We no longer need ee.h included here.


164138 09-Nov-2006 imp

MFp4: boot2 should now build


164137 09-Nov-2006 imp

MFp4: boot on KB9202 correctly. Also, reduce the size of the SD/MMC driver
somewhat.


164136 09-Nov-2006 imp

MFp4: Support KB9202 booting better


164135 09-Nov-2006 imp

Fix typo


164134 09-Nov-2006 imp

MFp4: Make boot2 work on Kwikbyte KB9202 boards.


164133 09-Nov-2006 imp

MFp4: Merge a slightly more generic build infrastructure.


164132 09-Nov-2006 imp

MFp4: Remove bogus \r


164115 09-Nov-2006 nyan

Add a stub of bios_addsmapdata(). PC98 does not have BIOS SMAP.


164114 09-Nov-2006 nyan

MFi386: revisions from 1.39 to 1.43.


164010 05-Nov-2006 marcel

Major rework of the ia64 loaders. The two primary objectives are:
1. Make libefi portable by removing ia64 specific code and build
it on i386 and amd64 by default to prevent regressions. These
changes include fixes and improvements over previous code to
establish or improve APIs where none existed or when the amount
of kluging was unacceptably high.
2. Increase the amount of sharing between the efi and ski loaders
to improve maintainability of the loaders and simplify making
changes to the loader-kernel handshaking in the future.

The version of the efi and ski loaders are now both changed to 1.2
as user visible improvements and changes have been made.


163929 03-Nov-2006 marcel

Make this compile on EFI32. The EFI_PHYSICAL_ADDRESS type is always
64-bit, even when sizeof(void *) is 32-bit.


163927 03-Nov-2006 marcel

Properly calculate the checksum of the APIC table.


163917 02-Nov-2006 ru

Unbreak compile with ELF_VERBOSE defined, and fix format warnings.


163914 02-Nov-2006 ru

Revert the last change. Masking only 2 MSBs of the virtual address
to get the physical address doesn't work for all values of KVA_PAGES,
while masking 8 MSBs works for all values of KVA_PAGES that are
multiple of 4 for non-PAE and 8 for PAE. (This leaves us limited
with 12MB for non-PAE kernels and 14MB for PAE kernels.)

To get things right, we'd need to subtract the KERNBASE from the
virtual address (but KERNBASE is not easy to figure out from here),
or have physical addresses set properly in the ELF headers.

Discussed with: jhb


163898 02-Nov-2006 marcel

Sync the EFI headers with version 1.10.14.62 of the Intel sample EFI
implementation. This re-introduces C99 style comments that previously
were replaced by original C comments.


163897 02-Nov-2006 marcel

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


163893 02-Nov-2006 marcel

Don't unconditionally compile-in the bcache code. It's only used on
i386/amd64 and pc98. Remove useless calls to bcache_init() from the
ia64 and sparc64 loaders, as well as from the OFW common code.


163891 02-Nov-2006 marcel

o Make sure to clear f->f_devdata if d_dev->dv_open() fails. It
would otherwise cause devclose() to free() the memory again.
o Refactor devopen() so that it's more readable.


163765 29-Oct-2006 ru

Because the BTX mini-kernel now uses flat memory mode and clients
are no longer limited to a virtual address space of 16 megabytes,
only mask high two bits of a virtual address. This allows to load
larger kernels (up to 1 gigabyte). Not masking addresses at all
was a bad idea on machines with less than >3G of memory -- kernels
are linked at 0xc0xxxxxx, and that would attempt to load a kernel
at above 3G. By masking only two highest bits we stay within the
safe limits while still allowing to boot larger kernels.

(This is a safer reimplmentation of sys/boot/i386/boot2/boot.2.c
rev. 1.71.)

Prodded by: jhb
Tested by: nyan (pc98)


163708 26-Oct-2006 ru

Adopt comments borrowed from aout_freebsd.c.


163707 26-Oct-2006 ru

Restore support for -c and -d that were treacherously murdered in
rev. 1.58. (This only costs us four bytes.)

Prodded by: bde
MFC after: 3 days


163706 26-Oct-2006 ru

Back out rev. 1.71 as it breaks directly loading (i386) kernels.

OK'ed by: jhb
PR: i386/96430, i386/104709
MFC after: 3 days


163617 23-Oct-2006 imp

Don't descend into at91 until we sort out the boot loader issues more generally


163598 21-Oct-2006 imp

MFp4: default to not loading the fpga


163597 21-Oct-2006 imp

MFp4: Update to smaller code footprint.


163596 21-Oct-2006 imp

MFp4: Move to smaller code footprint.


163595 21-Oct-2006 imp

MFp4: Move to smaller code. This was somehow forgotten before.


163542 20-Oct-2006 imp

There's no fpga.c, so omit it.


163533 20-Oct-2006 imp

MFp4:

Massive update. The highlights:
o dramatically cut memory usage by writing better, less intertwingled
code.
o implement booting off mmc/sd cards (sd only tested one at the moment)
o start to split out board specific stuff for boot2.


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


163154 09-Oct-2006 kmacy

more sun4v fallout - missed add
Approved by: rwatson (mentor)


163151 09-Oct-2006 kmacy

unbreak sparc64 loader build
re-add accidentally deleted asi value
remove sun4v only header include

Approved by: rwatson (mentor)
Reviewed by: jmg


163145 09-Oct-2006 kmacy

add sun4v support to the sparc64 boot loader

Approved by: rwatson (mentor)
Reviewed by: jmg
Tested by: kris, dwhite, and jmg


163070 07-Oct-2006 pav

- Update URL of Intel documentation

Submitted by: Rob <spamrefuse@yahoo.com> on freebsd-doc
MFC after: 3 days


163032 05-Oct-2006 jhb

- Fix a couple of improper uses of leal in the previous space saving
commits. For some reason I thought the scale factor was a shift count
rather than the multiplicand (that is, I thought leal (%eax,%edx,4) was
going to generate %eax + %edx << 4 rather than %eax + %edx * 4). What
I need is to multiply by 16 to convert a real-mode (seg, offset) tuple
into a flat address. However, the max multiplicand for scaled/index
addressing on i386 is 8, so go back to using a shl and an add.
- Convert two more inter-register mov instructions where we don't need to
preserve the source register to xchg instructions to keep our space
savings.

Tested by: Ian FREISLICH if at hetzner.co.za
MFC after: 1 week


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.


162815 29-Sep-2006 ru

Fix WARNS=2 warnings.


162814 29-Sep-2006 ru

Fix most of the WARNS=2 warnings.


162813 29-Sep-2006 jhb

Oops, add return values for the smap command function. We must have the
warnings set weird or something because gcc didn't warn about this at all.

Submitted by: ru


162745 28-Sep-2006 jhb

Tweak the code to handle intercepting BIOS calls to int 0x15 to shave
another 16 bytes off of BTX (and thus boot2):
- Compare against the value of %eax that is saved on the stack instead of
loading it into %eax (which requires saving the current %eax on the
stack).
- Use %ch to examine the keyboard flag state in the BIOS to see if
Ctrl-Alt-Del is pressed instead of %al so we don't have to save %eax on
the stack anymore.

MFC after: 1 week


162744 28-Sep-2006 jhb

Optimize the int 15/87 handler for space to shave another 16 bytes off of
BTX (and thus boot2):
- Don't bother saving %eax, %ebx, or %ecx as it is not necessary.
- Use a more compact sequence to load the base value out of a GDT entry
by loading the contiguous low 24 bits into the upper 24 bits of %eax,
loading the high 8 bits into %al, and using a ror to rotate the bits
(2 mov's and a ror) rather than loading the pieces in smaller chunks
(3 mov's and a shl).
- Use movzwl + leal instead of movl + movw + shll + addl.
- Use 'xchgl %eax,%foo' rather than 'movl %eax,%foo' for cases where
it's ok to trash %eax. xchgl %eax, foo is a 1-byte opcode whereas the
mov is a 2-byte opcode.
- Use movzwl rather than xorl + movw.

MFC after: 1 week


162743 28-Sep-2006 jhb

Add an 'smap' command that dumps out the BIOS SMAP.

MFC after: 1 week


162742 28-Sep-2006 jhb

Ignore a sub-topic match if it is inside the command description.
Otherwise, merge-help can get confused by a command description that
includes a word that starts with a capital S.

MFC after: 1 week


162737 28-Sep-2006 jhb

A couple of simple tweaks that trim BTX by 6 bytes. Since BTX is
16-byte aligned within boot2 however, this actually trims boot2 by 16
bytes.


162717 28-Sep-2006 ru

Add -march=i386 to fix amd64 build by generating the same code
as i386 would do.


162710 27-Sep-2006 jhb

Emulate moving cr0, cr2, cr3, or cr4 into any i386 general register
rather than just emulating mov cr0, eax. This fixes some Compaq/HP BIOS
with DMA (as the BIOS tried to read cr3 so it could translate addresses
if paging was enabled).

MFC after: 1 week


162649 26-Sep-2006 tegge

Add mnt_noasync counter to better handle interleaved calls to nmount(),
sync() and sync_fsync() without losing MNT_ASYNC. Add MNTK_ASYNC flag
which is set only when MNT_ASYNC is set and mnt_noasync is zero, and
check that flag instead of MNT_ASYNC before initiating async io.


162046 05-Sep-2006 ru

- Include <sys/reboot.h> to get the RB_* defines.

- Make the PROBE_KEYBOARD option better resemble the -P option in
boot2, i.e., if keyboard isn't present then boot with both
RB_SERIAL and RB_MULTIPLE set.

Reviewed by: jhb


161471 20-Aug-2006 ru

Make the default "init_path" value breakable, so it fits on the
screen's width, thus eliminating a groff(1) warning.

Suggested by: marck


161454 18-Aug-2006 imp

Copy powerpc ficl files sysdep files (maybe we need a common one)


161453 18-Aug-2006 imp

Build at91


161452 18-Aug-2006 imp

Support compiling as part of world


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.


161431 18-Aug-2006 marck

kern.ipc.nmbclusters is sysctl, not compile-time option. Change Dv to Va.

Touch .Dd.

Pointed out by: ru
MFC after: 1 week


161429 18-Aug-2006 marck

Remove references to NMBCLUSTERS which is obsoleted.

PR: 100427
Approved by: maxim
MFC after: 1 week


161379 17-Aug-2006 imp

MFp4: changes since .s -> .S rename. Use correct header for size


161370 16-Aug-2006 imp

MFp4: First cut at making spi and/or sd card booting work, needs work


161369 16-Aug-2006 imp

MFp4:

Tidy up a bit. Make sure that the burned image matches the downloaded
one.


161368 16-Aug-2006 imp

MFp4:

Simplify life a little for such a simple program.


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


161202 10-Aug-2006 imp

MFp4: Integrate a boatload of bug fixes from p4. We're right on the
8k boundary with this program still.

text data bss dec hex filename
7925 4 4476 12405 3075 bootiic.out

so we have like 293 bytes left before we have to play games. There
may be ways to reduce that somewhat, but they start to be very board
specific.


161199 10-Aug-2006 imp

MFp4:

Reach over into the arm tree to grab some at91 definitions.
Better warnings
Lots of build tweaks


161198 10-Aug-2006 imp

MFp4: remove obsolete files


161197 10-Aug-2006 imp

MFp4:
Remove obsolete files in list
Add spi flash reading routines


161196 10-Aug-2006 imp

MFp4: Numerous changes from p4 to try to improve tftp downloading,
reduce code footprint, etc. While some problems still remain, the
reliability of tftp is much improved.


161195 10-Aug-2006 imp

MFp4: consolidate #include files down to lib.h


161194 10-Aug-2006 imp

MFp4: These will migrate to the boot specific directories because they
are too hard to share between the different boot loaders.


161193 10-Aug-2006 imp

MFp4: Make it clearer that the address passed to the eeprom routines is
really an offset within the eeprom device, and not a IIC address.


161192 10-Aug-2006 imp

MFp4: Catchup with migration of some defines.


161191 10-Aug-2006 imp

MFp4: Tweaks for our board.


161190 10-Aug-2006 imp

MFp4: Increase character timeout to 10. Make it a #define for easier
changes in the future. This helps with getting started and to
overcome the really sucky level of granuality this timeout has in
getc. A timeout of 1 means 'wait until top of next second' rather
than 'wait for at least a second'.


161157 10-Aug-2006 imp

Don't need to special case arm here anymore


161156 10-Aug-2006 imp

Add a dummy makefile to keep build happy


160964 04-Aug-2006 yar

Commit the results of the typo hunt by Darren Pilgrim.
This change affects documentation and comments only,
no real code involved.

PR: misc/101245
Submitted by: Darren Pilgrim <darren pilgrim bitfreak org>
Tested by: md5(1)
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.


159744 18-Jun-2006 imp

Don't descend into ${MACHINE} on the arm platforms.


159096 31-May-2006 iedowse

Increment the disk block offset after writing, not before. This
fixes filesystem corruption when nextboot.conf is located after
cylinder 1023. The bug appears to have been introduced at the time
bd_read was copied to create bd_write.

PR: bin/98005
Reported by: yar
MFC after: 1 week


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.


158559 14-May-2006 nyan

Add a bootable CD support.


158467 12-May-2006 jhb

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


158466 12-May-2006 jhb

Remove Alpha bits for ficl.


158458 11-May-2006 jhb

First pass at removing Alpha kernel support.


158378 09-May-2006 nyan

Fix build (s:pc98/cbus/cbus.h:pc98/pc98/pc98_machdep.h:)

Pointyhat to: nyan


158265 03-May-2006 jhb

Restore the pre-5.x behavior of only beeping if the user makes a bad
selection and not always beeping on startup. The two bytes for the extra
'jmp' instruction were obtained by removing recognition of BSD/OS
partitions.

Requested by: many
Tested by: subset of many
Head nod: imp, keramida
MFC after: 2 weeks


158023 25-Apr-2006 jhb

Use PTOV() to convert physical addresses to appropriate virtual addresses
in the loader when searching for the ACPI RSDP. (The loader runs in a flat
mode with va 0 == pa 0xa000.)


157940 21-Apr-2006 imp

MFp4:
Make getc(0) polling (this has the happy side effect of saving
8 bytes in the generated code).


157939 21-Apr-2006 imp

MFp4: Loop forever getting characters... A kludge for now.


157938 21-Apr-2006 imp

MFp4: Integrate support for building tag support for linux booting.


157937 21-Apr-2006 imp

MFp4:
Init eeprom here now that we don't init the eeprom in arm_init.s
and read in the second 8k of the data.
Tweak formatting.


157936 21-Apr-2006 imp

Move from arm_init.s -> .S. #ifdef linux vs freebsd defaults for the
boot loader (linux booting helps regression testing). No repo copy
because of limited history.


157926 21-Apr-2006 imp

MFp4: formatting nits and minor style changes that likely won't matter.


157925 21-Apr-2006 imp

Allow one to enable building tags. Check the size of the boot imag.


157924 21-Apr-2006 imp

MFp4:

On the KB9202 go ahead and enable the flash controller so the boot
loader can access the parallel flash.


157921 21-Apr-2006 imp

MFp4:

Make this compile, assuming that you have linux installed in a
sensible place. tag_list is disabled by default, since we don't
distribute linux, but it is desirable to allow the boot loader to boot
Linux or FreeBSD (mostly for testing).


157918 21-Apr-2006 imp

MFp4:
Minor diffs to reduce diffs to p4.


157917 21-Apr-2006 imp

spi flash updating boot loader. upload this file for the recovery
xmodem download. Then download the image you want in the flash.
This will burn the image into the flash. You must then reset the
unit and the new flash image will be used for booting...


157916 21-Apr-2006 imp

iic eeprom updating boot loader. upload this file for the recovery
xmodem download. Then download the image you want in the eeprom.
This will burn the image into the eeprom. You must then reset the
unit and the new eeprom image will be used for booting...


157915 21-Apr-2006 imp

Add boot0iic and boot0spi. These are 'shortcut' boot loaders designed
to replace either a bad iic eeprom with one you download with xmodem,
or likewise with a spi flash.


157873 19-Apr-2006 imp

MFp4 (checkpoint of work in progress):

o Use a directory layout that is more akin to the i386 boot layout.
o Create a libat91 for library routines that are used by one or more
of the boot loaders.
o Create bootiic for booting from an iic part.
o Create bootspi for booting from an spi part.
o Optimize the size of many of these routines (especially emac.c). Except
for the emac.c optimizations, all these have been tested.
o eliminate the inc directory, libat91 superceeds it.
o Move linker.cfg up a layer to allow it to be shared.


157765 15-Apr-2006 imp

Fix style nit noticed by bde.


157733 13-Apr-2006 imp

Add commented out define for TSC board's boot0.


157732 13-Apr-2006 imp

MFp4:

For 32-bit SDRAM systems, enable D16 to D31 in the PIO controller.
Otherwise they read back as 0xffff.

Shave 8 bytes from the object size by using AT91C_BASE_PIOA directly
and by not assigning PIO_BSR to 0 in the DBGU init. That's a nop in
two ways (everything defaults to peripheral A, and writing 0 changes
nothing).


157731 13-Apr-2006 imp

Merge from p4:

Many places used #define FOO ((unsigned int) 0x23) where a simpler
#define FOO 0x23u would have sufficed. This practice is overly
verbose and has the disadvantage that you can't say

#if FOO == BAR
#endif

because the extra "unsigned int" tokens choke cpp's little brain.
Migrate to the latter style to allow use in preprocessor statements.
The two are the same semantically anyway in a C context (at least for
the uses they are put to presently, C gurus can explain to me how they
differ).


157730 13-Apr-2006 imp

Need at91rm9200_lowlevel.h for SDRAM_BASE definition.


157699 12-Apr-2006 imp

Common register definition for AT91RM9200


157697 12-Apr-2006 imp

Recovery boot loader for the AT91 family of processors. Download it
via xmodem to the DBGU port when the AT91 comes up in recovery mode.
The recovery loader will then load your program via xmodem into SDRAM
at 1MB which can do its things. It needs to be tweaked to the
specific board one is using, but it fits in < 1kB (all of Atmel's ARM
products have at least 8kb of SRAM that I can tell, so this should
work for them all).

Parts of this code were provided by Kwikbyte with copyright
specifically disclaimed. I heavily modified it to act as a recovery
loader (before it was a bootstrap loader) and to optimize for size
(before I started the size was closer to 8k).

Bootstrap loaders for SPI and IIC to follow.


157669 11-Apr-2006 sobomax

Merge in timeout into A20-enable routine from cdboot/boot1.

MFC after: 1 day


157668 11-Apr-2006 jhb

Drop the gateA20() function in the loader as it is unused. All the other
boot loaders that load the loader already handle A20. In fact, they are
required to do so in order to setup the environment that btxldr expects.


157667 11-Apr-2006 jhb

Minor whitespace tweak.


157664 11-Apr-2006 jhb

Tweak comment.


157663 11-Apr-2006 jhb

Use the proper condition to determine that we matched an filename.
Otherwise, we could match on a filename that had the wrong last character
(such as /boot/loaded instead of /boot/loader).

PR: kern/95625
Submitted by: Oliver Fromme <olli@secnetix.de>
MFC after: 1 month


157652 11-Apr-2006 sobomax

When enabling A20 put upper limit on amount of time we wait for the keyboard
controller to get ready (65K x ISA access time, visually around 1 second).
If we have wait more than that amount it's likely that the hardware is a
legacy-free one and simply doesn't have keyboard controller and doesn't
require enabling A20 at all.

This makes cdboot working for MacBook Pro with Boot Camp.

MFC after: 1 day


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.


156813 17-Mar-2006 ru

Reimplementation of world/kernel build options. For details, see:

http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine)


156712 14-Mar-2006 jkim

Export SMBIOS serial numbers by default. To turn it off, use
'BOOT_HIDE_SERIAL_NUMBERS' knob.

Suggested by: ceri


156558 10-Mar-2006 jkim

Micro-optimize invalid UUID check.


156519 09-Mar-2006 jkim

- Implement serial numbers, UUID, and asset tag (turned off by default).
Use 'BOOT_SENSITIVE_INFO=YES' variable to turn them on.
- Use 'uint*_t' instead of 'u_int*_t', correct compilation warnings, and
update copyright while I am here.


154527 18-Jan-2006 marcel

Remove ELF dynamic tag definitions that aren't used. Ideally,
those that are used should come from <machine/elf.h>.


154491 17-Jan-2006 marcel

s/R_IA64_/R_IA_64_/g as per the ia64 psABI.


154257 12-Jan-2006 marius

In moduledir_readhints() cast the value returned by sizeof() to ssize_t
when checking whether it's greater than a struct stat st_size in order
to also catch the case when st_size is -1. Previously this check didn't
trigger on sparc64 when st_size is -1 (as it's the case for a file on
a bzipfs, TFTP server etc.), causing the content of the linker hints
file to be copied to memory referenced by a null-pointer.

PR: 91231
MFC after: 1 week


153600 21-Dec-2005 nyan

MFi386: revisions 1.34 and 1.36.


153599 21-Dec-2005 nyan

MFi386: revision 1.8.


153598 21-Dec-2005 nyan

MFi386: revision 1.46.


153589 21-Dec-2005 sobomax

For the cases when loading bzip2-compressed kernels enabled use last
3MB of physical memory for heap instead of range between 1MB and 4MB.
This makes this feature working with PAE and amd64 kernels, which are
loaded at 2MB. Teach i386_copyin() to avoid using range allocated by
heap in such case, so that it won't trash heap in the low memory
conditions.

This should make loading bzip2-compressed kernels/modules/mfs images
generally useable, so that re@ team is welcome to evaluate merits
of using this feature in the installation CDs.

Valuable suggestions by: jhb


153551 20-Dec-2005 sobomax

Unbreak pc98 after my last changes to i386.


153536 19-Dec-2005 sobomax

If LOADER_BZIP2_SUPPORT is defined allocate heap in the 1MB-4MB range to
provide enough room for decompression (up to 2.5MB is necessary). This
should be safe to do since we load i386 kernels after 8MB mark now, so
that 16MB is the minimum amount of RAM necessary to even boot FreeBSD.

This makes bzip2-support practically useable.


153535 19-Dec-2005 sobomax

Long-long time ago, when the trees were large and memory expensive amount of
memory directly available to loader(8) and friends was limited to 640K on i386.
Those times have passed long time ago and now loader(8) can directly access
up to 4GB of RAM at least theoretically. At the same time, there are several
places where it's assumed that malloc() will only allocate memory within
first megabyte.

Remove that assumption by allocating appropriate bounce buffers for BIOS
calls on stack where necessary.

This allows using memory above first megabyte for heap if necessary.


153504 18-Dec-2005 marcel

Make our ELF64 type definitions match standards. In particular this
means:
o Remove Elf64_Quarter,
o Redefine Elf64_Half to be 16-bit,
o Redefine Elf64_Word to be 32-bit,
o Add Elf64_Xword and Elf64_Sxword for 64-bit entities,
o Use Elf_Size in MI code to abstract the difference between
Elf32_Word and Elf64_Word.
o Add Elf_Ssize as the signed counterpart of Elf_Size.

MFC after: 2 weeks


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


151999 03-Nov-2005 ru

Consistently use OPT_* macros to test/set boot options.


151882 30-Oct-2005 nyan

MFi386: Enable beastie.4th.


151874 30-Oct-2005 scottl

Add back some bits.


151873 30-Oct-2005 scottl

Replace loader_color with loader_logo


151650 25-Oct-2005 marius

- Add a workaround for the fact that OFW doesn't guarantee that
devices can be opened multiple times simultaneously but we're
expected to be able to do so by the rest of the loader.
This fixes booting from disks attached to the on-board SCSI
controller of Sun Ultra 1 (previously this triggered a trap)
and probably also of AX1115 boards.
- While here, remove unused variables and add empty lines where
style(9) requires such.

Tested on: powerpc (grehan), sparc64
MFC after: 1 month


151649 25-Oct-2005 marius

In ofw_parsedev() check the return value of malloc() and protect
against a NULL pointer dereference when ofw_parsedev() is called
with a NULL path argument.

Tested on: powerpc (grehan), sparc64


151507 20-Oct-2005 marius

Use an ihandle_t to store the instance handle of an opened device
instead of a phandle_t (package handle). Since both are typedefed
to unsigned int, this is more or less cosmetic.


151496 20-Oct-2005 marius

Remove unused variables.


151452 18-Oct-2005 jkim

Export processor socket information. New environment variables are:

smbios.socket.enabled: number of enabled sockets
smbios.socket.populated: number of populated sockets


151382 16-Oct-2005 sobomax

Re-implement rev.1.76 with respect to the code size.


151381 16-Oct-2005 sobomax

Backout previous commit - for some reason it overflows space constrains on
amd64. Better version will follow.


151367 16-Oct-2005 sobomax

Add new option `q', which makes second stage loader quiet unless autoboot
is disabled or fails.

MFC after: 1 week


150751 30-Sep-2005 nyan

MFi386: revision 1.33.
> Cause all flags passed by boot2 to set the respective loader(8)
> boot_* variable. The end effect is that all flags from boot2
> are now passed to the kernel.


150470 22-Sep-2005 ru

Cause all flags passed by boot2 to set the respective loader(8)
boot_* variable. The end effect is that all flags from boot2
are now passed to the kernel.


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.


150464 22-Sep-2005 ru

- RBX_MASK wasn't updated when RB_PAUSE was changed from 0x40000
to 0x100000 in rev. 1.67.

- NOPT wasn't updated (decremented) in previous revision.


150127 14-Sep-2005 nyan

Remove EPSON PC-386 note A/W/AE/WR support.


150073 13-Sep-2005 nyan

MFi386: revision 1.11.


150072 13-Sep-2005 nyan

MFi386: revisions 1.10 and 1.11.
- Add '-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3' to CFLAGS.


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.


149212 18-Aug-2005 iedowse

Add the ability to specify the boot2 serial console speed in
/boot.config or on the "boot:" prompt line via a "-S<speed>" flag,
e.g. "-h -S19200". This adds about 50 bytes to the size of boot2
and required a few other small changes to limit the size impact.
This changes only affects boot2; there are further loader changes
to follow.


149111 15-Aug-2005 marius

- Change the code that determines whether to use a serial console and
which serial device to use in that case respectively to not rely on
the OFW names of the input/output and stdin/stdout devices. Instead
check whether input and output refers to the same device and is of
type serial (uart(4) was already doing this) and for the fallback
to a serial console in case a keyboard is the selected input device
but unplugged do the same for stdin and stdout in case the input
device is nonexistent (PS/2 and USB keyboards) or has a 'keyboard'
property (RS232 keyboards). Additionally also check whether the OFW
did a fallback to a serial console in the same way in case the
output device is nonexistent. While at it save on some variables
and for sys/boot/sparc64/loader/metadata.c move the code in question
to a new function md_bootserial() so it can be kept in sync with
uart_cpu_getdev_console() more easily.
This fixes selecting a serial console and the appropriate device
when using a device path for the 'input-device' and 'output-device'
OFW environment variables instead of an alias for the serial device
to use or when using a screen alias that additionally denotes a
video mode (like e.g. 'screen:r1024x768x60') but no keyboard is
plugged in (amongst others). It also makes the code select a serial
console in case the OFW did the same due to a misconfiguration like
both 'input-device' and 'output-device' set to 'keyboard' or to a
nonexisting device (whether the OFW does a fallback to a serial
console in case of a misconfiguration or one ends up with just no
console at all highly depends on the OBP version however).
- Reduce the size of buffers that only ever need to hold the string
'serial' accordingly. Double the size of buffers that may need to
hold a device path as e.g. '/pci@8,700000/ebus@5/serial@1,400000:a'
exceeds 32 chars.
- Remove the package handle of the '/options' node from the argument
list of uart_cpu_getdev_dbgport() as it's unused there and future
use is also unlikely.

MFC after: 1 week


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>


148767 06-Aug-2005 ssouhlal

The kernel is usually at /boot/kernel/kernel nowadays.

PR: i386/81756
Submitted by: trasz <trasz@buziaczek.pl>


148516 29-Jul-2005 brian

Fix a comparison that broke ``set console=vidconsole'' and even the
loader.conf line ``console="vidconsole"''.

Sponsored by: ActiveState/Sophos
MFC after: 1 week


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


148450 27-Jul-2005 jkim

Simplify SMBIOS loader variables and drop `hint.smbios.0.enabled'.

They are not real hints.

Reported by: des
Pointed out by: peter
Approved by: anholt (mentor)


148398 25-Jul-2005 jmg

remove a pointless comment with a more helpful one...

Submitted by: Tobias Roth
MFC after: 5 days


148319 22-Jul-2005 grehan

Make code match comment: make the smallest unit of page allocation
from OpenFirmware be 16 pages to avoid fragmentation in the list
of mappings returned when the kernel requests it in pmap_bootstrap.

This allows a static buffer to be used when obtaining the existing
mappings - very useful on the G5 when random physical pages can't
be grabbed because they can't be BAT-mapped.

MFC after: 3 days


148046 15-Jul-2005 ache

Add -mno-sse3 for prescott/nocona


148006 14-Jul-2005 jkim

Scan static SMBIOS structures and export the following environment
variables to loader:

hint.smbios.0.enabled "YES" when SMBIOS is detected

hint.smbios.0.bios.vendor BIOS vendor
hint.smbios.0.bios.version BIOS version
hint.smbios.0.bios.reldate BIOS release date

hint.smbios.0.system.maker System manufacturer
hint.smbios.0.system.product System product name
hint.smbios.0.system.version System version number

hint.smbios.0.planar.maker Base board manufacturer
hint.smbios.0.planar.product Base board product name
hint.smbios.0.planar.version Base board version number

hint.smbios.0.chassis.maker Enclosure manufacturer
hint.smbios.0.chassis.version Enclosure version

These strings can be used to detect hardware quirks and to set appropriate
flags. For example, Compaq R3000 series and some HP laptops require

hint.atkbd.0.flags="0x9"

to boot. See amd64/67745 for more detail.

Note: Please do not abuse this feature to resolve general problem when it
can be fixed programmatically. This must be used as a last resort.

PR: kern/81449
Approved by: anholt (mentor)


147366 14-Jun-2005 ru

Improved markup, fixes some spelling and grammar.

Approved by: re (blanket)


146976 04-Jun-2005 marcel

Fix getsecs(). It was not counting the seconds right. The immediate
and visible effect of the bug what that autoboot would boot a kernel
after only a couple of seconds had passed instead of waiting the
full 10 seconds it's supposed to wait by default.
Add my copyright notice, since one was missing and I reimplemented
the one and only function in this file.

MFC after: 1 week


146973 04-Jun-2005 marcel

Fix delay(). The processor cycle counter is a 32-bit wrapping counter.
Hence, mask off the upper 32 bits and deal with wrap-arounds.

MFC after: 1 week


146874 01-Jun-2005 obrien

Temperarly disable building in the bzip2 support by default so we can fit
on the i386 floppies. Sigh, I hate floppies.


146844 31-May-2005 jhb

Add a missing const to alpha_setcurrdev() to quiet a warning.


146843 31-May-2005 jhb

Change the type the buf arg to the strategy routines from void * to char *
to quiet some warnings.


146842 31-May-2005 jhb

Whitespace.


146840 31-May-2005 obrien

Put bzip2 support on equal footing with gzip support.
Enable bzip2 support by default, set LOADER_NO_BZIP2_SUPPORT to disable it.

Pointy hat to: sobomax


146828 31-May-2005 obrien

Ensure GCC does not use FP registers in integer code.
I really don't like cluttering up the compiler invocation,
but this bigger hammer will fix reported problems for now.


146804 30-May-2005 ru

Markup nits.


146698 27-May-2005 jhb

- Add support to the loader for multiple consoles.
- Teach the i386 and pc98 loaders to honor multiple console requests from
their respective boot2 binaries so that the same console(s) are used in
both boot2 and the loader.
- Since the kernel doesn't support multiple consoles, whichever console is
listed first is treated as the "primary" console and is passed to the
kernel in the boot_howto flags.

PR: kern/66425
Submitted by: Gavin Atkinson gavin at ury dot york dot ac dot uk
MFC after: 1 week


146697 27-May-2005 jhb

Fix a warning by adding a missing 'const'.

MFC after: 1 week


146696 27-May-2005 jhb

Print out the commands from /boot.config after parsing them so that they
output is sent to the correct console(s).

PR: kern/66425
Submitted by: Gavin Atkinson gavin at ury dot york dot ac dot uk
MFC after: 1 week


146593 24-May-2005 grehan

Since the BAT mapping was removed a long time back, it can't
be assumed that modules are contiguous in memory (they're not)
so don't blindly __syncicache start/end. In fact, don't bother
syncing the icache for modules since the kernel will do it after
fixing up relocations.

This fixes the trap when loading modules at boot time.

Reported by: orlando at break dot net


146448 20-May-2005 charnier

Remove unused variables. Remove prototype for function that does not exist.


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


146368 19-May-2005 grehan

Change ofw_readin/ofw_copyin to map the entire region before
copying, rather than a page at a time. This was creating far
too many single-page mappings, and eventually OFW overflowed
some internal data structure and refused to map any more.
The new algorithm creates far less mappings and fixed a bug
where multiple mappings for the same page would be created.

'Twas known this was a problem, but only became urgent when the
install CD's mfs_root grew large enough to cause the overflow.


146365 19-May-2005 sobomax

Whitespace only: kill trailing spaces.


146049 10-May-2005 nyan

Change a directory layout for pc98.
- Move MD files into <arch>/<arch>.
- Move bus dependent files into <arch>/<bus>.
Rename some files to more suitable names.

Repo-copied by: peter
Discussed with: imp


146011 08-May-2005 nyan

Remove ifdef PC98.


146010 08-May-2005 nyan

Merged from libi386/biosdisk.c revisions 1.37 and 1.41.


146007 08-May-2005 nyan

Use DOSMID_386BSD rather than DOSPTYP_386BSD.


145515 25-Apr-2005 ru

Allow BOOT_BOOT0_COMCONSOLE_SPEED to be derived from BOOT_COMCONSOLE_SPEED
at compile time.


145209 17-Apr-2005 wollman

Pass the hostname we got from DHCP to the kernel so that machines can
share a read-only NFS root.


145158 16-Apr-2005 njl

Extend a local buffer to prevent an overflow of the XSDT address.

Submitted by: Joerg Sonnenberger
Obtained from: DragonflyBSD
MFC after: 1 day


145069 14-Apr-2005 nyan

MFi386: revision 1.20.


144837 09-Apr-2005 stefanf

Fix 'implicit int' instance.


144563 03-Apr-2005 imp

Fix buidling of boot blocks for pc98 with new links.

Submitted by: nyan@


143661 15-Mar-2005 obrien

Ensure GCC does not use FP registers in integer code.
I think all we really need is -fno-sse2.
I really don't like cluttering up the compiler invocation,
but this bigger hammer will fix reported problems for now.


143476 12-Mar-2005 kan

Allow kernels loaded by pxeboot, which was compiled with LOADER_TFTP_SUPPORT,
to stll be able to mount NFS root as prescribed by DCHP configuration. Since
pxeboot is using TFTP to get to the files, pxeboot can not rely on NFS to
provide it a root directory hande as a side effect. pxeboot has to make RPC
mount call itself.


143250 07-Mar-2005 stefanf

Don't try to use 'typedef struct foo' if just 'struct foo' makes more sense
and works on all compilers. This also removes the need for
__CC_SUPPORTS_FORWARD_REFERENCE_CONSTRUCT in <sys/cdefs.h>.

OK'ed by: marcel, dfr


143176 06-Mar-2005 stefanf

Fix typos in a comment.


143063 02-Mar-2005 joerg

netchild's mega-patch to isolate compiler dependencies into a central
place.

This moves the dependency on GCC's and other compiler's features into
the central sys/cdefs.h file, while the individual source files can
then refer to #ifdef __COMPILER_FEATURE_FOO where they by now used to
refer to #if __GNUC__ > 3.1415 && __BARC__ <= 42.

By now, GCC and ICC (the Intel compiler) have been actively tested on
IA32 platforms by netchild. Extension to other compilers is supposed
to be possible, of course.

Submitted by: netchild
Reviewed by: various developers on arch@, some time ago


143053 02-Mar-2005 marius

Remove unused variables.


142012 17-Feb-2005 des

Document the new default init_path.

Reminded by: ru
MFC after: 2 weeks


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.


141540 08-Feb-2005 des

Remove type 0x4 (FAT12 <32MB) to make room for type 0x7 (NTFS).


141060 30-Jan-2005 rwatson

Insert an explicit McAfee license, as we use a stock two-clause BSD
license rather than the slightly custom licence in ufsread.c.


139948 09-Jan-2005 peadar

Only update the boot sector when there is a valid drive number provided.
(After squeezing a few more bytes out of boot0)

Discussed With: jhb, julian
PR: 66248
Submitted By: Hans Petter Selasky
MFC After: 1 week


139738 05-Jan-2005 imp

Start each of the license/copyright comments with /*-


139737 05-Jan-2005 imp

Remove obsolete note about the boot loader not being ready for stable.
It has been in stable for at least 5 years now.


139123 21-Dec-2004 ru

NOFORTH -> NO_FORTH


139112 21-Dec-2004 ru

NOSHARED -> NO_SHARED


139103 21-Dec-2004 ru

Start the dreaded NOFOO -> NO_FOO conversion.

OK'ed by: core


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.


138223 30-Nov-2004 scottl

Instead of just not defining a bunch of words when TESTMAIN is set, provide
stubs that at least handle the stack correctly. This makes it much easier to
experiment with loader scripts from userland.


138190 29-Nov-2004 nyan

MFi386: revisions 1.77 and 1.78.


138189 29-Nov-2004 nyan

MFi386: revision 1.38.


138186 29-Nov-2004 ru

Pick up loader.rc from its old home.


138183 29-Nov-2004 scottl

Disable the beastie menu. It offends some and annoys everyone else, and I'm
frankly tired of the controversy. When people ask me why FreeBSD isn't user-
friendly, I'll tell them that I tried. RIP.


138141 28-Nov-2004 marcel

o Introduce efimd_va2pa() to translate addresses in efi_copy{in|out}()
and efi_readin(). This removes MD code from copy.c.
o Don't unconditionally add pal.S to SRCS. It's specific to ia64.


138140 28-Nov-2004 marcel

Add efimd.c. This file contains MD code used by the EFI library. While
changing the Makefile, fail the creation of loader.efi when there are
unresolved symbols in loader.sym. This avoids silently creating a
faulty EFI binary.


138048 24-Nov-2004 jhb

- If the COMSPEED is set to 0, then don't try to initialize the serial port
and assume that the BIOS has set it up for us. This allows folks with a
serial-aware BIOS to set the BIOS to speeds above 9600 and allow boot0 to
just use the existing settings.
- Purge some gratuitous cpp comments as per style(9).

Submitted by: Danny Braniss danny at cs dot huji dot ac dot il (1)
MFC after: 1 month


138046 24-Nov-2004 jhb

Fix comments for serial I/O function prototypes that were broken in the
assembler to cpp(1) comment conversions. This allows btx to compile again
when BTX_SERIAL is defined.

Reported by: Danny Braniss danny at cs dot huji dot ac dot il
MFC after: 1 month


138026 23-Nov-2004 marcel

This file was repocopied to src/sys/boot/ia64/efi.


138004 23-Nov-2004 marcel

Unhook the loader subdirectory. The ia64 EFI loader is now build
under ../ia64/efi.


138003 23-Nov-2004 marcel

Hookup the efi subdirectory.


138002 23-Nov-2004 marcel

This file was repocopied from src/sys/boot/efi/loader.
Updated for the new build location.


138001 23-Nov-2004 marcel

Visit the efi subdirectory before we visit the machine-specific
subdirectory so that the library built there can be used by the
machine specific boot code.


137978 21-Nov-2004 marcel

Remove struct ia64_itir and use a plain old uint64_t instead.


137667 13-Nov-2004 ru

There's no reason for "read" and "echo" commands to not
appear in the online command list.


137615 12-Nov-2004 ru

Pass the "?" command output through the pager.

(This doesn't quite work as this command is overridden by Forth,
and some Forth commands are appended to the output.)


137419 08-Nov-2004 peter

Remove a pre-tier-1 kernel compatability helper. This means a 6.x loader
won't boot a pre-5.1 development amd64 kernel. That's no big loss though.


137344 07-Nov-2004 krion

Document "loader_color" variable.

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


137298 06-Nov-2004 keramida

Clean up the comments, rewording, adding missing punctuation
and other minor nits.

Approved by: jhb


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.


136910 24-Oct-2004 ru

For variables that are only checked with defined(), don't provide
any fake value.


136895 24-Oct-2004 ru

Collapse several adjacent .if's into .if/.elif.


136893 24-Oct-2004 nyan

ELF64 support is not needed on pc98.


136892 24-Oct-2004 nyan

MFi386: revision 1.4.


136891 24-Oct-2004 nyan

MFi386: Set bi_basemem and bi_extmem variables.
Respect RB_MULTIPLE flag.


136890 24-Oct-2004 nyan

MFi386: Add support for preloading ELF relocatable object format modules.


136780 22-Oct-2004 simokawa

Respect RB_MULTIPLE flag.


136779 22-Oct-2004 simokawa

- Add FireWire subclass and OHCI interface.
- Add some PCI BIOS function calls.
(find_devclass, read_config, write_config)


136549 15-Oct-2004 imp

document host_start_mem.

# feel free to wordsmith.

Suggested by: ru@


136548 15-Oct-2004 ru

Polish the last change.


136525 15-Oct-2004 imp

Document hw.{pci,acpi}.host_start_mem

Requested by: ru@


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.


136097 03-Oct-2004 stefanf

Use the correct printf specifier.

PR: 47187


136036 01-Oct-2004 ru

Document MD commands.


135999 01-Oct-2004 ru

The "autoboot" command also has a third (optional) parameter.


135996 30-Sep-2004 ru

Don't give instructions on how to disable ACPI in the MI section.
For novice users, beastie.4th can just do it. Expert users can
read ACPI instructions by typing "help ACPI".


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_*.


135975 30-Sep-2004 ru

The value of $interpret is "OK", in uppercase.


135974 30-Sep-2004 ru

Fixed the default value of the $prompt variable, document what
happens if $prompt is unset.


135973 30-Sep-2004 ru

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


135970 30-Sep-2004 ru

The default value of "bootfile" has been "kernel" since 2000.


135969 30-Sep-2004 ru

Mention "help index" in the online help, and provide a help for
the `?' command.


135968 30-Sep-2004 ru

Added support for the -D boot option.


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.


135965 30-Sep-2004 ru

`?' is not the same as "help index".


135929 29-Sep-2004 ru

Fixed exiting from pager using the `q' key while paging
"help index" or "help <topic>" with list of subtopics.


135729 24-Sep-2004 pjd

Document vfs.root.mountdelay value.

Reminded by: ru


135702 24-Sep-2004 marcel

Remove. This file was repocopied to ../ski.


135700 24-Sep-2004 marcel

Replace misuse of NULL with 0UL.


135699 24-Sep-2004 marcel

Remove the dependency on the Intel EFI headers in sys/boot/efi. Instead
use <machine/efi.h> for the necessary definitions. This makes the EFI
code in sys/boot/efi totally unused, except for pure EFI loaders. As
such, maintenance and porting (to IA-32) of the EFI code is made as easy
as possible.


135698 24-Sep-2004 marcel

Unhook libski and skiload and hook up ski.


135697 24-Sep-2004 marcel

Post repocopy build fixes.


135630 23-Sep-2004 marcel

Redefine a PTE as a 64-bit integral type instead of a struct of
bit-fields. Unify the PTE defines accordingly and update all
uses.


135538 21-Sep-2004 wes

Trap invalid sector size 0 in disk probe, refusing to add such a
device to the list. This prevents crashes on /0 errors in 'lsdev'
et al.

Reviewed-by: jhb@
MT5 after: RE approval


135442 18-Sep-2004 marcel

Remove useless include of <machine/fpu.h>.


135410 18-Sep-2004 jhb

A long, long time ago in a CVS branch far away (specifically, HEAD prior
to 4.0 and RELENG_3), the BTX mini-kernel used paging rather than flat
mode and clients were limited to a virtual address space of 16 megabytes.
Because of this limitation, boot2 silently masked all physical addresses
in any binaries it loaded so that they were always loaded into the first
16 Meg. Since BTX no longer has this limitation (and hasn't for a long
time), remove the masking from boot2. This allows boot2 to load kernels
larger than about 12 to 14 meg (12 for non-PAE, 14 for PAE).

Submitted by: Sergey Lyubka devnull at uptsoft dot com
MFC after: 1 month


135409 18-Sep-2004 nyan

MFi386: revision 1.56 (Add -fno-unit-at-a-time to CFLAGS).


134944 08-Sep-2004 kensmith

Back out v1.24. v1.40 of sys/sparc64/sparc64/bus_machdep.c fixes the
problem this hack was put in place for.

MFC to be done if the fix to bus_machdep.c is MFC-ed.


134459 29-Aug-2004 iedowse

Add the loader side of support for preloading ELF relocatable object
format modules, which are currently only used on the amd64 platform.
This initial implementation just parses enough of the module to
allow it to extract dependencies and load all the bits into the
right place in memory, so the kernel must still do the full relocation
and linking. The details of the loaded sections are passed to the
kernel by supplying a copy of the ELF section header table as module
metadata with the MODINFOMD_SHDR tag.


134458 28-Aug-2004 iedowse

Separate out the ELF relocation code from the ELF loader, and add
better relocation support for the amd64 and i386 platforms. This
should not result in any change in functionality, but moves a step
towards supporting the relocatable object file modules on amd64.

The same hack/trick as load_elf*.c uses is used here to simultaneously
support both elf32 and elf64 on amd64 and i386.


134441 28-Aug-2004 iedowse

Add a few helper functions for zeroing kernel space and reading
from specified file offsets. Make use of these in load_elf.c.


134431 28-Aug-2004 yar

Don't be too smart, just try packet mode of INT13 first.
This way of operation is more robust than the "AI" used
before.

Add flags to mbr accessible from make.conf as BOOT_MBR_FLAGS.
Only one flag is defined now, "allow using packet mode", which
is 0x80 in accord with the rest of i386 boot code. The "packet"
flag is on by default.

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


134430 28-Aug-2004 yar

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

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


134382 27-Aug-2004 yar

B1FLAGS -> BOOT_BOOT1_FLAGS, which is consistent with
naming of other boot-related make vars.


134357 27-Aug-2004 obrien

In conjunction with having boot0cfg(8) default boot0 to packet mode.

Submitted by: Tor.Egge@cvsup.no.freebsd.org


134151 22-Aug-2004 maxim

Trim EOL white spaces.


134150 22-Aug-2004 maxim

Check a return code from read(2) correctly.

PR: kern/70815
Submitted by: info [at] haakh.de


134148 22-Aug-2004 marcel

Part 2 of fixing the boot code: gcc 3.4 fixes.

The whole problem seems to be size. Which is odd, because it is said
that size doesn't matter. Anyway... Add -Os to strategic places in the
makefile to have the final loader be as mall as possible. This seems
to be enough to make it work. For now... I think something is more
fundamentally wrong; or something more fundamental is wrong. Potato,
potaato.


134140 22-Aug-2004 marcel

Part 1 of fixing the boot code: binutils 2.15 fixes.

The binutils 2.15 assembler now automaticly and non-optionally adds
the .eh_frame section for unwind information. This section appears
to wreck havoc to the final boot code. Fix this by using a special
linker script that discards the .eh_frame sections, but is otherwise
identical to the linker internal script used for -N.

Compiler used: gcc 3.3.5
Verified with: binutils 2.14 & binutils 2.15 (stock and in-tree)
Tested with: /boot/loader & /boot/netboot


134039 19-Aug-2004 kensmith

Temporary bandaid to help sparc64 systems with ATA disks boot. Recent
changes to the ATA driver cause a kernel crash, no fault of the ATA
code. Work is in progress to add the necessary feature to the sparc64
kernel and this commit will be backed out when it is complete. This
bandaid is being put in mostly in the interests of getting the first
release snapshot done and out the door.

Tested on: Ultra-10 exhibiting the insta-panic.
MFC: Real Soon


133953 18-Aug-2004 grehan

Remove NOMAN so loader man pages are installed.

Noticed by: ru


133948 18-Aug-2004 maxim

Bump the manpage date.

Noticed by: ru


133947 18-Aug-2004 maxim

Retire hw.pci.allow_unsupported_io_range.

PR: bin/70533
Submitted by: Gavin Atkinson


133862 16-Aug-2004 marius

Instead of "OpenFirmware", "openfirmware", etc. use the official spelling
"Open Firmware" from IEEE 1275 and OpenFirmware.org (no pun intended).

Ok'ed by: tmm


133420 10-Aug-2004 marcel

Catch up with change to <machine/pte.h>.


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)


133154 05-Aug-2004 kan

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

Obtained from: DragonflyBSD (with minor adjustments)


132997 02-Aug-2004 grehan

Add PowerPC bridge instruction flag to the assembler to help out
with test code written in the loader.


132996 02-Aug-2004 grehan

G5 support: handle the case where the OpenFirmware memory array uses
64 bits for the phys address, but only 32 for the virtual address.


132881 30-Jul-2004 nyan

Fix new compiler error (s/bcopy/memcpy/).


132870 30-Jul-2004 kan

Compile boot2 with -fno-unit-at-a-time. GCCs aggressive optimization
breaks boot in spectacular ways otherwise.


132864 30-Jul-2004 kan

Clean up local memcpy implementation to take void * parameters.


132854 29-Jul-2004 ceri

Correct a documentation bug.

Approved by: jhb


132853 29-Jul-2004 ceri

Correct typo in a comment.

Approved by: jhb


132764 28-Jul-2004 kan

Define our own memcpy here instead of relying on GCC to provide one.


132437 20-Jul-2004 marcel

o Support the REL32LSB relocation. It's in the ELF file from which
we construct the EFI image. It doesn't seem to actually end up
in the EFI image, AFAICT.
o Replace .quad, .long and .short with data8, data4 and data2 resp.
The former are gnuisms.
o Redefine _start_plabel as a data16 with @iplt(_start) as its
value. This is the preferred way to create user PLT entries.


132435 20-Jul-2004 marcel

Fix the creation of EFI images that got broken by the import of
binutils 2.15. The linker now creates a .rela.dyn section for
dynamic relocations, while our script created a .rela section.
Likewise, we copied the .rela section to the EFI image, but not
the .rela.dyn section. The fix is to rename .rela to .rela.dyn
in the linker script so that all relocations end up in the same
section again. This we copy into the EFI image.


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.


131811 08-Jul-2004 grehan

Use a linker script for the loader. This avoids issues with
command-line options, such as misaligning the data segment.
Exposed by the limited PearPC OFW ELF loader, but a good thing in
general.


131785 08-Jul-2004 grehan

Remove cache flush, 256Mb 1:1 BAT mapping, and BAT clearing. This doesn't
work on a G5 (no BAT registers) or on PearPC (dBAT3 used for mapping
the framebuffer and BATs not re-inited on OpenFirmware calls).

It also hid a number of bugs.


131783 08-Jul-2004 grehan

All hell breaks loose if the loader image is released before
jumping to the kernel. Another bug exposed by removing the
1:1 BAT mapping. Sparc64 doesn't do this either.

Compile tested on: panther (sparc64). Code built, but not used, on sparc64.


131782 08-Jul-2004 grehan

Correctly calculate size of memory to be mapped when copying. Removal
of the 256Mb 1:1 BAT mapping exposed this as copying into memory that
hadn't been claimed from OpenFirmware.

compiled-tested on: panther (sparc64). Code built, but not used, on sparc64


131781 08-Jul-2004 grehan

Extract entry point from elf header before releasing the heap.
This caused a data-miss trap when the BAT init code was removed
on PPC.

Compile tested on: panther (sparc64). Code built, but not used, on sparc64.


131754 07-Jul-2004 ru

mdoc(7) fixes.


131575 04-Jul-2004 stefanf

Consistently use __inline instead of __inline__ as the former is an empty macro
in <sys/cdefs.h> for compilers without support for inline.


131489 02-Jul-2004 ru

Fixed what appeared to be a hard sentence break.


131393 01-Jul-2004 ps

When building a kernel or the loader, let the hostname be overridden


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


130943 22-Jun-2004 jhb

Update the copyright to use a 3 clause BSD license rather than one that
is less clear about allowing redistribution of modified copies.

Requested by: Tom Cosgrove tom dot cosgrove at arches-consulting dot com


130942 22-Jun-2004 jhb

Remove a bogus increment of %di when scanning the list of loader paths.
%di will already point to the character after the nul char when the
'repnz scasb' terminates.

Submitted by: Tom Cosgrove tom dot cosgrove at arches-consulting dot com


130793 20-Jun-2004 josef

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


130632 17-Jun-2004 phk

Save a couple of bytes for the SIO case.


130630 17-Jun-2004 phk

Fix another beak.

Seen by: pjd


130603 16-Jun-2004 phk

Unspam sys/boot, the dev_t commit should not have touched these.

Spotted by: peter


130601 16-Jun-2004 phk

My new keyboard can't spell.


130585 16-Jun-2004 phk

Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.


130579 16-Jun-2004 phk

Premptively fix GCC3.4 issue: add break; after empty default: clauses.

PR: 65493
Submitted by: Pawel Worach <sajd@telia.com>


130343 11-Jun-2004 phk

Merge boot0 and boot0sio so they behave the same.


129993 02-Jun-2004 phk

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


129702 25-May-2004 njl

Use the correct location of the EBDA for searching for the RSDP.
The EBDA is the 1 KB area addressed by the 16 bit pointer at 0x40E.

Pointed out by: robert.moore AT intel.com


129310 16-May-2004 ru

Markup fixes.


129269 16-May-2004 cognet

Try harder not to compile anything in sys/boot for arm.
I wonder how buildworld ever worked for me...


129240 14-May-2004 ru

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

Prompted by: bde, jhb


129239 14-May-2004 ru

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

Prompted by: bde, jhb


129218 14-May-2004 cognet

Do not attempt to build anything in sys/boot for arm.


129195 14-May-2004 jdp

Fix a potential stack buffer overflow on systems whose ACPI OEMID
fills its field (6 characters). In that case the OEMID is not
null-terminated, and the sprintf that was used would copy up to the
next null byte, which could be pretty far away.


128741 29-Apr-2004 ru

Convert block comments into C-style that is understood by cpp(1).
Keep line comments in assembler style. A few lines that match
the '^[[:space:]]+#' regexp still need to be fixed, somehow.

OK'ed by: bde, jhb


128736 29-Apr-2004 nyan

MFi386: revisions from 1.15 to 1.17.


128735 29-Apr-2004 nyan

MFi386: revisions from 1.16 to 1.18.


128725 28-Apr-2004 ru

Thanks to David's patches, we can now simplify these makefiles
further, and just use PROG directly (without FILES).

Suggested by: bde


128724 28-Apr-2004 ru

Properly merge boot0sio.s and boot0.s into boot0.S.


128723 28-Apr-2004 ru

Switch to using C99 comments in assembler preprocessed with cpp(1).


128722 28-Apr-2004 ru

- Properly merge boot0sio.s and boot0.s into boot0.S.
boot0sio.s was repo-copied to boot0.S.

- Rename boot0ext.s to boot0ext.S, to stay consistent
with other preprocessed asm files around here, and
for better portability.

Repocopied by: joe


128718 28-Apr-2004 ru

Temporary precaution measure until repocopy requests are
processed: don't forget to clean generated .s sources.


128716 28-Apr-2004 ru

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


128710 28-Apr-2004 ru

MFi386: Use C (and CPP) style comments for assembler-with-cpp
sources, for lines that start with a comment.


128709 28-Apr-2004 ru

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


128708 28-Apr-2004 ru

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


128707 28-Apr-2004 ru

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


128694 27-Apr-2004 ru

Removed now redundant CLEANFILES assignments.

Not read enough of my patch by: obrien ;)


128691 27-Apr-2004 phk

Change from '#' to "//" comment character to allow CPP preprocessing.

Merge boot0.s and boot0sio.s into boot0_512.s controlled by "#ifdef SIO".

Add Makefile magic to generate boot0.s and boot0sio.s from boot0_512.s.

The compile boot0 and boot0sio have unchanged MD5 checksums.


128651 25-Apr-2004 obrien

Use a more compact syntax for passing the "binary" options to 'ld'.


128649 25-Apr-2004 obrien

Simplify the building of our i386 'binary' boot components by directly
producing them using 'ld' options rather than post-processing with 'objcopy'.

Idea by: Ryan Sommers <ryans@gamersimpact.com>


128471 20-Apr-2004 obrien

Fix a last second typo in 'vi' that caused a problem.


128451 20-Apr-2004 obrien

White space style cleanup.


128441 19-Apr-2004 obrien

MFp4: merge version #5 of the 2-sector boot0 from the "jhb boot" branch.


128280 15-Apr-2004 cperciva

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

PR: conf/65195
Submitted by: daichi


128019 07-Apr-2004 imp

Remove advertising clause from University of California Regent's
license, per letter dated July 22, 1999 and email from Peter Wemm,
Alan Cox and Robert Watson.

Approved by: core, peter, alc, rwatson


127919 05-Apr-2004 imp

Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core


127826 04-Apr-2004 marcel

To quote the submitter:
"...If "keyboard" is the selected input-device and "screen" the
output-device (both via /options) but the keyboard is unplugged,
OF automatically switches to ttya for the console, it even prints
a line telling so on "screen". Solaris respects this behaviour and
uses ttya as the console in this case and people probably expect
FreeBSD to do the same (it's also very handy to temporarily switch
consoles)..."
"...I changed the comparison of the console device with "ttya" ||
"ttyb" to "tty" because on AXe boards all 4 onboard UARTs end in
SUB-D connectors (ttya and ttyb being 16550 and ttyc and ttyd a
SAB82532) and there's no Sun keyboard connector (but PS/2). If one
plugs a serial card in a box there also can be more than just ttya
and ttyb available for a console..."

Submitted by: Marius Strobl <marius@alchemy.franken.de>
Has no doubt that the change is correct: marcel


127789 03-Apr-2004 le

mdoc fix: put the end-of-list macro after the last list element.

Approved by: grog (mentor)


127458 26-Mar-2004 obrien

Bring back jhb's two sector (1024 bytes) 'boot0' [rev 1.22] as 'boot0ext'.


127417 25-Mar-2004 jhb

Enable splitfs in the Alpha boot loaders.


126970 14-Mar-2004 nyan

MFi386: revision 1.29.


126969 14-Mar-2004 nyan

MFi386: revision 1.76.


126958 14-Mar-2004 bde

Fixed misspellings of 0 as NULL.


126891 12-Mar-2004 trhodes

These are changes to allow to use the Intel C/C++ compiler (lang/icc)
to build the kernel. It doesn't affect the operation if gcc.

Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as
icc v8 may define __GNUC__ some parts may look strange but are
necessary.

Additional changes:
- in_cksum.[ch]:
* use a generic C version instead of the assembly version in the !gcc
case (ASM code breaks with the optimizations icc does)
-> no bad checksums with an icc compiled kernel
Help from: andre, grehan, das
Stolen from: alpha version via ppc version
The entire checksum code should IMHO be replaced with the DragonFly
version (because it isn't guaranteed future revisions of gcc will
include similar optimizations) as in:
---snip---
Revision Changes Path
1.12 +1 -0 src/sys/conf/files.i386
1.4 +142 -558 src/sys/i386/i386/in_cksum.c
1.5 +33 -69 src/sys/i386/include/in_cksum.h
1.5 +2 -0 src/sys/netinet/igmp.c
1.6 +0 -1 src/sys/netinet/in.h
1.6 +2 -0 src/sys/netinet/ip_icmp.c

1.4 +3 -4 src/contrib/ipfilter/ip_compat.h
1.3 +1 -2 src/sbin/natd/icmp.c
1.4 +0 -1 src/sbin/natd/natd.c
1.48 +1 -0 src/sys/conf/files
1.2 +0 -1 src/sys/conf/files.amd64
1.13 +0 -1 src/sys/conf/files.i386
1.5 +0 -1 src/sys/conf/files.pc98
1.7 +1 -1 src/sys/contrib/ipfilter/netinet/fil.c
1.10 +2 -3 src/sys/contrib/ipfilter/netinet/ip_compat.h
1.10 +1 -1 src/sys/contrib/ipfilter/netinet/ip_fil.c
1.7 +1 -1 src/sys/dev/netif/txp/if_txp.c
1.7 +1 -1 src/sys/net/ip_mroute/ip_mroute.c
1.7 +1 -2 src/sys/net/ipfw/ip_fw2.c
1.6 +1 -2 src/sys/netinet/igmp.c
1.4 +158 -116 src/sys/netinet/in_cksum.c
1.6 +1 -1 src/sys/netinet/ip_gre.c
1.7 +1 -2 src/sys/netinet/ip_icmp.c
1.10 +1 -1 src/sys/netinet/ip_input.c
1.10 +1 -2 src/sys/netinet/ip_output.c
1.13 +1 -2 src/sys/netinet/tcp_input.c
1.9 +1 -2 src/sys/netinet/tcp_output.c
1.10 +1 -1 src/sys/netinet/tcp_subr.c
1.10 +1 -1 src/sys/netinet/tcp_syncache.c
1.9 +1 -2 src/sys/netinet/udp_usrreq.c

1.5 +1 -2 src/sys/netinet6/ipsec.c
1.5 +1 -2 src/sys/netproto/ipsec/ipsec.c
1.5 +1 -1 src/sys/netproto/ipsec/ipsec_input.c
1.4 +1 -2 src/sys/netproto/ipsec/ipsec_output.c

and finally remove
sys/i386/i386 in_cksum.c
sys/i386/include in_cksum.h
---snip---
- endian.h:
* DTRT in C++ mode
- quad.h:
* we don't use gcc v1 anymore, remove support for it
Suggested by: bde (long ago)
- assym.h:
* avoid zero-length arrays (remove dependency on a gcc specific
feature)
This change changes the contents of the object file, but as it's
only used to generate some values for a header, and the generator
knows how to handle this, there's no impact in the gcc case.
Explained by: bde
Submitted by: Marius Strobl <marius@alchemy.franken.de>
- aicasm.c:
* minor change to teach it about the way icc spells "-nostdinc"
Not approved by: gibbs (no reply to my mail)
- bump __FreeBSD_version (lang/icc needs to know about the changes)

Incarnations of this patch survive gcc compiles since a loooong time,
I use it on my desktop. An icc compiled kernel works since Nov. 2003
(exceptions: snd_* if used as modules), it survives a build of the
entire ports collection with icc.

Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.

Reviewed by: -arch
Submitted by: netchild


126837 11-Mar-2004 bde

Fixed a misspelling of 0 as NULL.


126764 09-Mar-2004 marcel

Reset the text attributes when initializing the console. The EFI
loader typically doesn't do this so that we end up booting the
with whatever the EFI loader has set it to last.


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


126312 27-Feb-2004 ru

For some reason crt0.o needs to be linked first for pxeboot(8) to
work. This is odd because loader(8) doesn't suffer from this problem.
Perhaps pxeboot bootstrap can be fixed to handle this better.
Anyway, PXE booting should work again.


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)


125932 17-Feb-2004 ru

Re-add sio.S, and properly deal with assembler files.

Repocopied by: joe


125901 16-Feb-2004 obrien

Fix the AMD64 build: this file shouldn't exist.


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


125780 13-Feb-2004 nyan

MFi386: Get rid of unnecessary use of m4(1) by using cpp(1) instead.

Repocopied by: joe


125779 13-Feb-2004 nyan

MFi386: revisions 1.74 and 1.75.
- kzip(8) is long dead.
- Clean CLEANFILES.


125778 13-Feb-2004 nyan

MFi386: revision 1.20 (don't strip kgzldr.o)


125767 13-Feb-2004 marcel

Don't create a mapfile during link. It's not needed for the build.


125766 13-Feb-2004 marcel

o Don't build with -fpic. It's not needed and inconsistent with how
other constributions are compiled.
o Remove powerpc specific additions to CFLAGS.


125753 12-Feb-2004 ru

Fixed the fatal bug introduced in previous commit: don't strip
kgzldr.o -- kgzipping with such a loader produces bad images.


125751 12-Feb-2004 ru

Clean CLEANFILES.


125729 12-Feb-2004 ru

Tidy up makefiles.

Tested by: marcel


125722 11-Feb-2004 ru

kzip(8) is long dead.


125719 11-Feb-2004 ru

Overhaul makefiles.


125717 11-Feb-2004 ru

_start.S -> _start.s as the latter is pure asm file.

Repocopied by: joe


125693 11-Feb-2004 ru

Get rid of unnecessary use of m4(1) by using cpp(1) instead.
(John tells me there were problems when trying this before,
but it appears to be safe these day.)

OK'ed by: jhb
Repocopied by: joe


125674 10-Feb-2004 ru

Since loader(8) on SPARC64 is a pure ELF executable (as opposed
to other architectures), there is no reason not to strip(1) it.

Tested by: kensmith


125634 09-Feb-2004 grehan

Loader makefile cleanup.

Submitted by: ru


125625 09-Feb-2004 nyan

MFi386: Factor out -nostdlib and use PROG.


125622 09-Feb-2004 ru

MFi386.

- Factor out common settings and put them in an upper level Makefile.inc.
- Properly use PROG for real programs, not their products.
- Further reduce diffs to i386 versions.

Tested on: sparc64 (panther)


125621 09-Feb-2004 ru

- Factor out -nostdlib to an upper level Makefile.inc.

- Now that bsd.prog.mk deals with programs linked with -nostdlib
better, and has a notion of an "internal" program, use PROG
where possible. This has a good impact on the contents of
.depend files and causes programs to be linked with cc(1).

XXX: boot2 couldn't be converted as it's actually two programs.

Tested on: i386, amd64


125581 07-Feb-2004 ru

Argh, unbreak "make depend" for AMD64.

Reported by: kris


125567 07-Feb-2004 ru

MFi386: Removed -elf and duplicate -ffreestanding.


125566 07-Feb-2004 ru

- Removed -elf which is not a valid gcc(1) option anymore.
- Removed -ffreestanding; it's enforced by ../Makefile.inc.


125564 07-Feb-2004 ru

Generate .depend file.


125563 07-Feb-2004 nyan

MFi386: Cleanups to sys/boot makefiles.


125561 07-Feb-2004 ru

Style: use the defined() expression explicitly.


125556 07-Feb-2004 ru

Untangle building of AMD64 boot code.

Tested on: amd64 (sledge)


125537 06-Feb-2004 ru

First round of cleanups to sys/boot/ makefiles:

- do not use PROG for what's not a real C program,
- use sys.mk transformation rules where possible,
- only create the "machine" symlink on AMD64,
- removed MAINTAINER lines in individual makefiles,
- added the LIBSTAND defitinion to <bsd.libnames.mk>,
- somewhat better contents in .depend files.

Tested on: i386, amd64
Prodded by: bde


125517 06-Feb-2004 ru

Inherit BINDIR from a parent Makefile.inc.


125516 06-Feb-2004 ru

Only include ../Makefile.inc once in loader/Makefile.


125127 28-Jan-2004 nyan

MFi386: revision 1.33

PR: kern/62005


125117 27-Jan-2004 schweikh

Sync with Oxford Dictionary. Style (add missing full stops) while I'm here.


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.


124818 21-Jan-2004 jhb

If a transfer to or from a floppy disk crosses a 64k boundary, we have to
use a bounce buffer for the actual transfer to avoid crossing a 64k
boundary. To do this, we malloc a buffer twice as big as we need and then
find an aligned block within that buffer to do the transfer. The check
to see which part of the block we use used the wrong variable for part of
the condition meaning that in certain edge cases we would ask the BIOS to
cross a 64k boundary. The BIOS request would then fail resulting in file
transfers that just magically fail in the middle without any apparent
reason. Specifically, my tests for the splitfs boot floppies managed to
trigger this edge case.

MFC after: 1 week
X-MFC-info: along with fixes to libstand filesystems


124648 18-Jan-2004 nyan

PC98 uses the different frame code.


124647 18-Jan-2004 nyan

Fix to support KANA and graphics characters which code are over 0x80.


124445 12-Jan-2004 jhb

- Use constant for shift when converting file length in bytes to a sector
count.
- Fix the twiddle output so that it actually spins.
- Save %cx around BIOS calls to read in sectors from the disc as at least
one BIOS trashes %cx when called to read off of a USB CD-ROM drive.

Submitted by: Martin Nilsson <martin@gneto.com>
MFC after: 1 week


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.


124179 06-Jan-2004 obrien

Allow one to specify the com port settings for boot0sio.


124140 04-Jan-2004 obrien

Convert to __FBSDID.


124139 04-Jan-2004 obrien

Convert to __FBSDID.


123703 21-Dec-2003 grehan

- Add ':' as a separator between the OpenFirmware device space and
the file path. Commonly used on Macs e.g. "hd:9".
- Update the ofw_setcurrdev routine to match libstand setenv prototype

Not objected to by: sparc64


123702 21-Dec-2003 grehan

Make __elfN(ofw_loadfile) match parameter declaration for file_format
in boot/common/bootstrap.h. Having a 32-bit size when a 64-bit param
is declared wreaks havoc on PPC.

Not objected to by: sparc64


123701 21-Dec-2003 grehan

Only print out an error if returned data size is < 0. A value of 0
happens almost every time at the end of a file when using NFS.

No objection by: sparc64


123700 21-Dec-2003 grehan

Use daddr_t instead of u_long for byte offset in strategy
routine to avoid >4G truncation on 32-bit systems.

no objection by: sparc64


123699 21-Dec-2003 grehan

- use correct pointer arithmetic in heapsize calculation
- handle multiple Ofw memory regions when determining mem size
- allow currdev to be set as a loader command-line option.
parse() is used to allow future options to be processed.


123476 11-Dec-2003 jhb

- Change the lookup() function to report success or failure using the carry
flag rather than explicitly halting if a lookup failed.
- Add a loop around the call to lookup() to traverse an array of
nul-terminated strings for possible paths to the boot loader. A double
nul character denotes the end of the list.
- Add a new message to say that the boot failed if all of the path lookups
for a boot loader file failed.
- Add '/boot/loader' as a second boot path. If you build an ISO using
risky options to mkisofs such as -U then the loader will be called
'/boot/loader' rather than '/BOOT/LOADER;0'. This allows cdboot to work
with such risky ISO images.
- Bump version to 1.2 to denote added functionality.

The basic idea as well as some of the code were provided by the submitter,
but I added some extra code to use a loop rather than hard-code just 2
possible paths.

PR: misc/43543
Submitted by: kientzle
MFC after: 1 week


123470 11-Dec-2003 jhb

Properly fix a typo that the previous revision made even worse.


123399 10-Dec-2003 jhb

Fix typo in comment.


123377 10-Dec-2003 grehan

Enable FICL build on powerpc


123376 10-Dec-2003 grehan

Update libstand filesystems to be in-line with tier-1 platforms.


123375 10-Dec-2003 grehan

- Bring Makefile up to rev with sparc64 in terms of config options and rules
- Move loader relocation up to 0x1C00000. This is in line with OSX bootx,
and allows more space for boot-time modules/ramdisks without conflicting
with OpenFirmware's use of RAM


123374 10-Dec-2003 grehan

Disable floating point on PowerPC for the ficl library.


123373 10-Dec-2003 grehan

Define 'arch-powerpc'


123372 10-Dec-2003 grehan

FICL system-dependent files for powerpc. Taken from the i386 versions,
which were the most relevant.


123343 09-Dec-2003 marcel

Fix the build of libski now that we use the "official" MADT table
definitions. Those are slightly different than the ones we used
before ACPI-CA 20031203 got imported. No structural or functional
change.


123336 09-Dec-2003 obrien

Sync these two files.


123302 08-Dec-2003 obrien

Hook boot0sio to the build. Use 'boot0cfg -b /boot/boot0sio' to use.


123301 08-Dec-2003 bms

Add a serial console capable version of the FreeBSD boot manager. This has
been lying around my tree(s) for the past year or so. It could do with TLC.

Requested by: obrien
Sponsored by: Weyland-Yutani Corporation


122942 21-Nov-2003 dcs

With the beastie menu a problem was introduced in which selecting a
different kernel to boot with kernel="NAME" would load the kernel and
loader.conf-selected modules from /boot/NAME, but it would not change
module_path. So, for instance, the automatically loaded acpi.ko would come
from /boot/kernel/acpi.ko, *always*.

Mind you, this happened for unassisted boot. If you interrupted, typed
"unload" and then "boot NAME", it would Do The Right Thing.

The source of the problem is the double initialization with beastie's
loader.rc. One would happen inside "start", and would load the kernel. The
next one would happen later in the loader.rc script, resetting module_path.

Because module_path is set to the Right Value by the functions in support.4th
that actually load the kernel, when beastie.4th proceeded to boot
module_path would remain wrong, as the kernel was already loaded.

This can be corrected by removing either initialization, and also by changing
the command used by beastie.4th from "boot" to "boot-conf", which makes sure
you use the right kernel and modules.

I chose to remove the second initialization, since this let you interrupt
(or confirm) boot before beastie even comes up. I avoid also doing the
boot-conf change because that would simply cause the kernel and modules to
be loaded twice (in fact, that was my original patch, until, in writing this
very commit message, I saw the error of my ways).

This commit changes the semantics of module loading when using the beastie
menu. Now it does what one would expect it to, but not what it was actually
doing, so something may break for unusual setups depending on broken
behavior. As our japanese friends so nicely put it, shikata ga nakatta. :-)

Approved by: re (scottl)


122923 20-Nov-2003 jhb

Update the size of the OS string table that wasn't updated in the previous
commit that removed the UNIX entry.

Submitted by: Rudolf Cejka <cejkar@fit.vutbr.cz>
Approved by: re (rwatson)


122806 16-Nov-2003 phk

When rebooting the machine jump to 0xf000:0xfff0 instead of 0xffff:0x0.

While we end up the same place, we end up with two different CS register
values after the jump and 0xf000 is compatible with the hardware reset
value.

This makes a difference if the BIOS does a near jump before a far jump.

Detective work and patch by: Adrian Steinmann <ast@marabu.ch>


122753 15-Nov-2003 nyan

MFi386: revision 1.13.


122749 15-Nov-2003 bde

Changed the RB_PAUSE flag from 0x40000 to 0x100000 and marked the old
value as reserved for internal use in boot blocks, because RB_PAUSE
broke binary compatibility by usurping the RB_DUAL flag. Probably no
one except me has boot blocks for which this matters, since most boot
blocks based on biosboot including pc98's boot2 can't boot elf kernels,
and /boot/loader doesn't properly pass flags set by the previous stage.

reboot.h:
Also mark the historical RB_PROBEKBD flag (0x80000) as reserved for
internal use in boot blocks.

boot2.c:
Added comments to inhibit usurping of other flags.

Approved by: guido, imp
MFC after: 1 week


122499 11-Nov-2003 jake

Set RB_SERIAL in boothowto if the firmware output-device is ttya or ttyb.
This ensures that uart gets a higher console priority than syscons when
a serial console is being used. Testing against the "console" environment
variable doesn't make sense since we only have one loader console driver.


122463 11-Nov-2003 bde

Include <sys/reboot.h> the definition of RB_BOOTINFO. The previous
commit broke the world because it depended on namespace pollution that
was only in my version of <machine/bootinfo.h>. The include was removed
in rev.1.63 after the last reference to it went away in rev.1.61.


122433 10-Nov-2003 bde

Fixed loss of setting of the RB_BOOTINFO flag in rev.1.43. Fixed wrong
comment about this flag in rev.1.61. It is not historical like the
comment said; it is the flag that says that most of what is laboriously
put in the bootinfo struct is actually there. Newer kernels were
bootable by even the broken boot2 without losing anything except the
symbol table, but older kernels need at least the memory sizes.

Restoring the "|" with RB_BOOTINFO that was lost in rev.1.43 costs 5
bytes. The fix can be done in only 4 bytes by fixing some code that
was removed in rev.1.61 (put RB_BOOTINFO back in in the initial value
of "opts" and fix RBX_MASK to not clobber it.)


122351 09-Nov-2003 marcel

Implement PAL_HALT_LIGHT now that the kernel halts the processor
when idle. All we have to do is return.


122350 09-Nov-2003 marcel

Do not strip skiload when installed. The stripped binary does not load
in the simulator.


122177 06-Nov-2003 jhb

Fix an incorrect quote character in an M4 test conditon. Basically, one
of the verbose print statements that BTXLDR_VERBOSE enables wasn't properly
enabled.


121973 03-Nov-2003 iedowse

Override the root server address if an IP address is specified in
the root path. This is reported to make non-PXE netbooting, such as
is used on sparc64 systems, work correctly when the TFTP server is
not the same as the root server.

PR: kern/57328
Submitted by: Per Kristian Hove <Per.Hove@math.ntnu.no>


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


120118 16-Sep-2003 bde

Don't repeat selected defines from ns16550.h or sioreg.h. Just
include ns16550.h. The missing installation of ns16550.h was fixed
long ago and the misplaced defines in sioreg.h were fixed recently.


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"


119880 08-Sep-2003 obrien

Use __FBSDID().
Also some minor style cleanups.


119714 03-Sep-2003 phk

Add BOOT_PXELDR_ALWAYS_SERIAL option which forces serial console.


119483 25-Aug-2003 obrien

Use __FBSDID().
Also some minor style cleanups.


119482 25-Aug-2003 obrien

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


119253 22-Aug-2003 imp

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

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


118982 16-Aug-2003 obrien

FICL doesn't build on PowerPC yet, so disable.


118607 07-Aug-2003 jhb

Consistently use the BSD u_int and u_short instead of the SYSV uint and
ushort. In most of these files, there was a mixture of both styles and
this change just makes them self-consistent.

Requested by: bde (kern_ktrace.c)


118604 07-Aug-2003 njl

Null terminate the OEM hint. This rids my laptop of the smiley face that
would follow the 6 valid chars of the table entry.


118485 05-Aug-2003 grehan

Fix asm string newlines to keep gcc3.3 happy. Use register prefixes
to make the asm a bit more readable.


118346 02-Aug-2003 marcel

Don't hardcode unit 0 for the current device if we're loaded from an
EFI file system. When booting from a CD and there's already an EFI
system partition on the disk, setting the current device to unit 0
will select the harddisk. This invariably breaks installing FreeBSD
when other operating systems have been installed before.

We obviously want to do the same when we're booting over the network.
Maybe later.

Based on a patch (from memory) from: arun


117677 17-Jul-2003 marcel

Fix the ski loader, broken by the gcc upgrade. Update the linker
script to match the one for the EFI loader and rewrite __start()
in assembly to have gp defined without getting in the way of the
compiler.


117676 17-Jul-2003 marcel

Have the linker script look more like the default linker script
on ia64. This fixes the breakage caused by the gcc upgrade that
resulted in a broken executable.


117529 13-Jul-2003 njl

Add include file so this builds with new acpica

Reported by: Kevin Oberman <oberman@es.net>


117511 13-Jul-2003 nyan

Fixed build error with GCC 3.3.1


117448 11-Jul-2003 tmm

NFS support should be conditional on LOADER_NFS_SUPPORT, not
LOADER_NET_SUPPORT.


117160 02-Jul-2003 ru

Revert non-style part of the recent two deltas that dealt with
using as(1) to compile plain assembler source files; bsd.lib.mk
has been fixed (in revision 1.147).


117158 02-Jul-2003 ru

sys/ia64/ia64/pal.s has been repocopied to pal.S.

Approved by: marcel
Repocopied by: joe


117156 02-Jul-2003 ru

pal_stub.s has been repo-copied to pal_stub.S.

Approved by: marcel
Repocopied by: joe


117090 01-Jul-2003 brueffer

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

Reviewed by: scottl


117081 30-Jun-2003 ru

bsd.lib.mk,v 1.143 no longer uses ld(1) directly to strip
symbols from intermediate object files, so these hacks to
get AMD64 compile are no longer needed.

Tested on: sledge.FreeBSD.org


117075 30-Jun-2003 ru

Switch to using bsd.prog.mk; this gives us back the standard
.s.o transformation rule.


117053 30-Jun-2003 ru

MFi386: revision 1.16.


117052 30-Jun-2003 ru

Revision 1.13, besides its useful part, replaced bsd.prog.mk by
bsd.lib.mk and thus broke the build since AFLAGS were not taken
into considered anymore, as bsd.lib.mk currently has wrong .s.o
rule that uses cc(1) instead of as(1).

Revision 1.14 reverted to using as(1), and revision 1.15 brought
AFLAGS back to the business, but revision 1.14 also broke "make
clean".

To fix this, but not break anything that was fixed in revisions
1.13-1.15, we revert mostly to revision 1.13 except for switching
back to using bsd.prog.mk. This gives us back the default .s.o
rule from sys.mk that uses as(1), and fixes "make clean" by
restoring the full contents of OBJS.

Also fixed LDFLAGS.


117044 29-Jun-2003 brueffer

Capitalize an occurrence of 'ficl' for consistency.

Submitted by: Andre Guibert de Bruet <andy@siliconlandmark.com>
MFC after: 3 days


116864 26-Jun-2003 peter

Build on amd64. Yes, I know this isn't particularly nice.


116451 16-Jun-2003 iedowse

When looking for the ':' separator in the root path, don't go past
the terminating '\0'. Since the initialisation of rootpath in
libstand/bootp.c may copy junk into the rest of the buffer, it was
possible for the code to find a ':' after the '\0' and do the wrong
thing.

Reviewed by: ps
MFC after: 1 week


116415 15-Jun-2003 jake

Remember to release the loader's heap.

Reviewed by: tmm


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.


116003 08-Jun-2003 nyan

Add help file for pc98.


116002 08-Jun-2003 nyan

Enable new boot menu.


116001 08-Jun-2003 nyan

Don't load the acpi module.


116000 08-Jun-2003 nyan

Set arch-pc98 env to true for pc98.


115964 07-Jun-2003 obrien

Add ${AFLAGS} to 'as' invocation.


115946 07-Jun-2003 nyan

MFi386: revisions 1.13 and 1.14.


115944 07-Jun-2003 nyan

MFi386: revision 1.30.


115941 07-Jun-2003 obrien

Don't use a C compiler to assemble a pure asm file.


115899 06-Jun-2003 kuriyama

Tweak make values and targets not to build kgzldr.o at
installation stage.

Reviewed by: bde


115670 02-Jun-2003 obrien

Don't use a C compiler to assemble a pure asm file.


115638 01-Jun-2003 obrien

Accpet '1'..'5' in place of F1..F5 for serial console users.

Reviewed by: Bruce M Simpson <bms@spc.org>


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.


115423 31-May-2003 scottl

Enable the new bootloader for i386 only. The new loader.rc is will only
be installed if an old one does not exist, i.e. only during install, not
during upgrades.

Approved by: re


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


115113 17-May-2003 ru

Fixed the markup and wording of the kern.ipc.nsfbufs tunable.
(It does not modify NSFBUFS, but just overrides it if set.)

Approved by: re (blanket)


115091 17-May-2003 peter

Fix a bug in the AMD64 trampoline. I misunderstood the implicit
32->64 bit zero extend. This changes a movl to an orq.

Approved by: re (amd64 bits)


115054 16-May-2003 murray

Add variables for missing network drivers.

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


114937 12-May-2003 peter

Fix lookup of module metadata on amd64 systems. While this is in
common code, the non-trivial part is #ifdef'ed and only executes when
loading amd64 kernels. The rest is trivial but needed for the the amd64
case. (Two variables changed from char ** to Elf_Addr).

Approved by: re (amd64 "low-risk" stuff)


114933 12-May-2003 peter

Revert leftover AMD64 disable-acpi-module stuff.


114920 11-May-2003 peter

For amd64 kernels, repeat the 1GB mapping over the entire address space
instead of just at 0GB and 1GB marks. This gives more flexibility for
the choice of KERNBASE.

Approved by: re (amd64 stuff)


114707 05-May-2003 obrien

Since we insist on loading the POS ACPI by default, give the poor user
instructions on the main help screen for disabling it.


114654 04-May-2003 murray

Fix a bunch of typos and grammatical errors.

PR: docs/40234
Submitted by: Chris Pepper <pepper@rockefeller.edu> (mostly)
MFC After: 3 days


114521 02-May-2003 kato

IPLware support. The `IPLware' program assumes boot menu program
begins with the `jmp 0x2d4' near jump.


114407 01-May-2003 nyan

Fix to build pc98 boot loader after support amd64.


114386 01-May-2003 peter

Commit a missed change to keep in sync with the MI elf loader.


114385 01-May-2003 peter

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


114380 01-May-2003 peter

Nuke; repocopied to elf32_freebsd.c where it lives on.


114379 01-May-2003 peter

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

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


114343 30-Apr-2003 peter

We use i386 boot code on AMD64.


114339 30-Apr-2003 peter

ACPI will always be present on AMD64 - it will never be an autodetect
module.


114338 30-Apr-2003 peter

Also look for an "elf64 kernel" (for sparc64) and "elf32 kernel" (for
powerpc) when building metadata.


114246 29-Apr-2003 njl

Support functions for the new ACPI import.
* AcpiOsDerivePciId(): finds a bus number, given the slot/func and the
acpi parse tree.
* AcpiOsPredefinedOverride(): use the sysctl hw.acpi.os_name to
override the value for _OS.

Ideas from: takawata, jhb
Reviewed by: takawata, marcel
Tested on: i386, ia64


113583 16-Apr-2003 phk

Cut&Paste considered far too easy:

Don't include <sys/disklabel.h>


113161 06-Apr-2003 peter

Zap some a.out leftovers


113083 04-Apr-2003 phk

Libdisk does not need to include <sys/diskslice.h> any more.

Move the remaining bits of <sys/diskslice.h> to <i386/include/bootinfo.h>

Move i386/pc98 specific bits from <sys/reboot.h> to
<i386/include/bootinfo.h> as well.

Adjust includes in sys/boot accordingly.


113042 04-Apr-2003 marcel

Remove `#ifndef lint' left behind after previous change.


113038 03-Apr-2003 obrien

Use __FBSDID rather than rcsid[].


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.


111957 07-Mar-2003 trhodes

Fix a few spelling errors.

Submitted by: Stefan Farfeleder <stefan@fafoe.dyndns.org> via -doc.


111890 04-Mar-2003 seanc

Document the tunable kern.ipc.nsfbufs in help.common and loader.8. Small
nearby grammar fixup that saves a line of display while in the loader
(help set tunables), but reuses the line for kern.ipc.nsfbufs.

Approved by: roam


111852 03-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.


111764 02-Mar-2003 ru

Fixed sys/boot/pc98/boot2/Makefile to use kern.mk and
get rid of bsd.kern.mk completely.

OK'ed by: bde


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)


111693 01-Mar-2003 marcel

Speed up debugging in the context of unexpected traps by printing
the address of the image base of the loader. Given cr.iip, we can
use the symbol table to figure out what function caused the trap.


111692 01-Mar-2003 marcel

Paranoia: Don't use the length of the option string alone to
determine whether we have command line options. We expect a
valid string pointer as well.


111543 26-Feb-2003 marcel

Increase the block size for reading and writing from 8KB to 1MB and
introduce a preprocessor define for it. The larger block size
significantly speeds up the loading of the kernel.

Submitted by: Arun Sharma <arun.sharma@intel.com>


111536 26-Feb-2003 obrien

Consistently use NOFORTH to control the usage of ficl.


111490 25-Feb-2003 ru

Fixed CLEANFILES.

Submitted by: cron


111456 25-Feb-2003 obrien

Only apply rev 1.10 (which hacks around the i386 boot2 being too big for
both ufs1 and ufs2 support) on i386.


111410 24-Feb-2003 mckusick

Revert to old (broken for over 1.5Tb filesystems) version of cgbase
so that boot loader once again will fit.

Sponsored by: DARPA & NAI Labs.


111168 20-Feb-2003 marcel

Simplify page alignment.


110783 13-Feb-2003 benno

Don't bother to build ficl if NOFORTH is defined.


110554 08-Feb-2003 trhodes

s/hw.pci_allow_unsupported_io_range/hw.pci.allow_unsupported_io_range/

The former was incorrect and gave an `unknown oid' error.


110211 01-Feb-2003 marcel

Remove special casing for running in the simulator from the kernel
and instead add platform, firmware and EFI stubs to the loader.
The net effect of this change is that besides a special console and
disk driver, the kernel has no knowledge of the simulator. This has
the following advantages:
o Simulator support is much harder to break,
o It's easier to make use of more feature complete simulators.
This would only need a change in the simulator specific loader,
o Running SMP kernels within the simulator. Note that ski at this
time does not simulate IPIs, so there's no way to start APs.

The platform, firmware and EFI stubs describe the following hardware:
o 4 CPU Itanium,
o 128 MB RAM within the 4GB address space,
o 64 MB RAM above the 4GB address space.

NOTE: The stubs in the skiloader describe a machine that should in
parts be defined by the simulator. Things like processor interrupt
block and AP wakeup vector cannot be choosen at random because they
require interpretation by the simulator. Currently the simulator is
ignorant of this.

This change introduces an unofficial SSC call SSC_SAL_SET_VECTORS
which is ignored by the simulator.

Tested with: ski (version 0.943 for linux)


110206 01-Feb-2003 marcel

SSC calls use break immediate 0x80000. 0x80001 only works for
break.i. Ski is rather broken in this respect.


110102 30-Jan-2003 nyan

MFi386: Install the "boot" image which is boot1 + boot2.


109888 26-Jan-2003 phk

Link /boot/boot1 to the name /boot/boot to avoid per-arch naming of the
bootstrap code for disklabel using architectures.


109886 26-Jan-2003 phk

Build a file "boot" which consists of boot1 and boot2 concatenated.

There is little if any reason to treat the two components separately
and it will simplify disklabel(8) and libdisk if we didn't.


109638 21-Jan-2003 nyan

Use NDOSPART instead of NEXTDOSPART.


109637 21-Jan-2003 nyan

MFi386: revision 1.63.


109616 21-Jan-2003 jake

Fix module dependency (pre)loading on sparc64 by relocating the variables
read from the raw kld files.

Submitted by: Hartmut Brandt <brandt@fokus.gmd.de>
PR: 46870
Tested on: alpha (obrien), i386, sparc64


109559 20-Jan-2003 phk

Use NEXTDOSPART instead of MAX_SLICES.


109498 18-Jan-2003 obrien

Simplify the Makefile by just using our standard PROG variable.


109281 15-Jan-2003 mdodd

Minimally document hw.syscons.sc_no_suspend_vtswitch.

Requested by: Nate Lawson <nate@root.org>


109235 14-Jan-2003 imp

Save 4 more bytes by not initializing opts to 0. This moves it from
the data section to the bss section givig us initialization for free.

Noticed by: bde


109197 13-Jan-2003 imp

Fix interactive booting:
o Revision 1.38 introduced the -n flag. It conflicted with the
RB_BOOTINFO flag, so was in effect always on. Change the -n flag to
be bit 0x1c instead of 0x1f. This also had the consequence that a mal-formed
/boot.config would render the system unbootable because the user was
unable to enter anything at all on the command line.
o Remove the initialization of opt to be RB_BOOTINFO since we filter that bit
out and do not otherwise use it.

Reviewed by: jhb
MFC after: 3 days


108791 06-Jan-2003 nyan

Add SCSI MO device support.

Submitted by: Kawanobe Koh <kawanobe@st.rim.or.jp>


108650 04-Jan-2003 nyan

Rename the dos_partition structure for pc98 to pc98_partition.


108476 31-Dec-2002 obrien

RIP liloldr.
It is not complete (the LILO root= specification isn't passed to our
loader for instance), it has not been touched in over 2 years. Linux has
moved on to GRUB, so this is OBE now. If someone creeps up to work on it,
it could become a port.


108470 30-Dec-2002 schweikh

Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
Add FreeBSD Id tag where missing.


108149 21-Dec-2002 obrien

-mno-align-long-strings can make things smaller, so lets use it in hopes
that it does here.


108119 20-Dec-2002 imp

Put back the casts to unsigned. While no strictly necessary for its
current uses, the name strcmp has strong connotations that shouldn't
lightly be discarded. This doesn't cost us anything.

Submitted by: bde


108115 20-Dec-2002 jake

Fix breakage from earlier inadvertant changes.


108100 19-Dec-2002 jake

Renamed the loader's zipfs to gzipfs. zipfs.c was repo-copied to gzipfs.c.


108025 18-Dec-2002 marcel

Add command `hcdp'. This command dumps the DIG64 HCDP table if one
exists.


108016 18-Dec-2002 imp

I didn't intend to delete this rm from the Makefile. It snuck in at
the last second before the commit.

# likely we can remove this hack now that gcc generates better aligned code
# in the align to word case.

Noticed by: bde


108005 17-Dec-2002 imp

Reduce diffs with Peter's expanded diffs:
1) Put back the keyboard printing printf, at the cost of 58 bytes.
2) Minor tweak to getstr at no apparent cost.


108000 17-Dec-2002 imp

Make both UFS1 and UFS2 fit on the same boot blocks. These are a
subset of Peter's patchs that are believed to be safe.

Makefile tweaks:
o -fomit-frame-pointer
o Change default to building both UFS1 and UFS2 bootblocks.

Lots of boot2 tweaks:
o lookup is only ever called with kname, so use it directly.
o inline memsize
o getstr are only ever called with cmd, so hardware that.
o tweaks to the parsing code to test after the conversion rather than
before since we tested after anyways.
o eliminate support for %x in printf.
o eliminate a few bytes in printfs.
o Tweak the boot banner.
o eliminate support for wd and " " devices (I might add wd back to
keep bde happy).
o eliminate support for a few arguments.

This takes us from -162 bytes free to 67 bytes free.

I've tested this only on a few systems, so be careful when updating to
this change.

Submitted by: peter, imp, ian


107889 15-Dec-2002 obrien

Remove unneeded casts. Add others to make WARNS=5 happy.


107879 14-Dec-2002 phk

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

Remove assorted now unneeded hackery.

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


107878 14-Dec-2002 phk

Remove unnecessary call to fsread().


107877 14-Dec-2002 phk

Restructure so we can compile UFS1_ONLY, UFS2_ONLY or UFS1_AND_UFS2
versions from the same basic function.


107875 14-Dec-2002 phk

Always use the smaller GCC builtin memcpy


107874 14-Dec-2002 phk

Remove unused variable.


107869 14-Dec-2002 phk

Don't fill in the table with the BIOS idea about disk-geometry, we don't
use it. This saves a surprising number of bytes.


107788 12-Dec-2002 ru

Uniformly refer to a file system as "file system".

Approved by: re


107733 10-Dec-2002 marcel

Pass the HCDP table address to the kernel. If no such table exists,
NULL is passed. The address of the HCDP table can be found by
iterating over the configuration tables in the EFI system table.
To avoid more duplication, a function can be called with the GUID
of interest. The function will do the scanning. Use the function
in all places where we iterate over the configuration tables in
an attempt to find a specific one.

Bump the loader version number as the result of this.

Approved by: re (blanket)


107724 10-Dec-2002 marcel

The exit() function has been moved to libefi.c to better deal with
cleaning up after ourselves.

Approved by: re (blankoscheck)
German corrections: Alexander (both :-)


107723 10-Dec-2002 marcel

Change the startup code to fix a memory leak and to allow us to
accept load options (=command line options).

The call graph changes from *entry*->efi_main->efi_init, where
efi_main is the EFI equivalent of main to *entry*->efi_main->main,
where main is what you'd expect. efi_main now is what efi_init was.
The prototype of main follows that of C. The first argument is argc
and the second is argv. There is no third argument.
Allocation of heap pages is now handled by the EFI library and it
now deallocates the pages when main() returns or when exit() is
called. This allows us to safely return to the boot manager (or
EFI shell) without leaks. EFI applications are responsible to free
all memory themselves.

Handling of the load options is a bit tricky. There are either no
load options, load options in ASCII or load options in Unicode.
The EFI library will translate the ASCII options to Unicode options
as to simplify user code. Since the load options are passed as a
single string (if present) and main() accepts argc and argv, the
startup code also has to split the string into words and build the
argv vector. Here the trickiness starts. When the loader is started
from the EFI shell, argv[0] will automaticly load the program name.
In all other cases (ie through the boot manager), this is not the
case. Unfortunately, there's no trivial way to check. Hence, a
set of conditions is checked to determine if we need to fill in
argv[0] ourselves or not. This checking is not perfect. There are
known cases where it fails to do the right thing. The logic works
for most expected cases, though. This includes the case where no
options are given.

Approved by: re (blanket)


107722 10-Dec-2002 marcel

o Make all GUID variables global to maximize reuse.
o Recognize the HCDP configuration table.
o Dump the GUID of tables we don't recognize.

Approved by: re (carte blanche)


107721 10-Dec-2002 marcel

Build EFI with -fshort-wchar so that L"some string" works with the
EFI has defined CHAR16.


107720 10-Dec-2002 marcel

Remove _putchar, _puts and _puthex. These functions are unused.

Approved by: re (blanket)


107686 08-Dec-2002 marcel

Add the GUID of the DIG64 HCDP table.


107683 08-Dec-2002 marcel

The boot manager sets the watchdog timer to 5 minutes before invoking
a boot option. When the timer expires the machine is rebooted.
Disable the watchdog timer for 2 reasons:
o We're an interactive program. We cannot guarantee that we've
booted the kernel in the time available to us. There have been
situations where netbooting the right kernel took 2 tries and
more time than given. Not to speak of the normal behaviour to
have the loader sitting at the prompt while the user is off
doing other things (such as figuring out what to type next ;-)
o We may not boot a kernel at all. We may exit as the result of
the user typing quit (assuming it took less than 5 minutes to
type it :-). It is documented that loaders should have disabled
the watchdog timer if they return to the boot manager. Not doing
so would cause a reboot while in the boot manager. This appears
to be harmless, besides of course the actual reboot.

Approved by: re (weisse karte)


107682 08-Dec-2002 marcel

In efi_cons_poll we check if a key is present (pending) by checking
the signaled state of the apropriate event. As a side-effect of
checking the event, it's signaled state is cleared if it was set.
In efi_cons_getchar we used to wait for the apropriate event to be
signaled before reading a character. This however does not work if
we poll before reading the characteri, such as during autoboot. On
a more compliant EFI implementation this resulted in the behaviour
that hitting a key during autoboot would stop the countdown, but
would then wait for a new character to arrive instead of reading
the already pending key that stopped the countdown.

The correct behaviour for efi_cons_getchar is to try to read a key
and if none is pending, to wait for the apropriate event to signal
the arrival of a new key.

Note that with the previous behaviour, the second key would determine
how the autoboot was interrupted. This would indicate that the first
key got lost. This indicates that EFI does not necessarily maintain
a queue of pending keys. FWIW...

Approved by: re (carte blanche)
French corrected by: various people :-)


107483 02-Dec-2002 jake

Fix a dumb bug that broke net booting on sparc64. The wrong length was
passed to strncmp.

Noticed by: tmm
Approved by: re
Pointy hat to: jake


107367 28-Nov-2002 marcel

Remove a left-over virtual mapping of uncached I/O port space.
Previous kernels unwantingly depended on this mapping, but as
of version 1.123 of src/sys/ia64/ia64/machdep.c this dependency
has been removed. Consequently, one has to update the kernel
before updating the loader. The documented/recommended upgrade
will suffice in this case.

Due to a visible (from the kernels point of view) change in
behaviour, bump the loader version number from 0.3 to 1.0.

Approved by: re (carte blanc)


107352 27-Nov-2002 jhb

Enable UFS2 support in boot1. Just as with sparc64 the same boot1 works
great with both UFS1 and UFS2 filesystems.

Approved by: re


107294 27-Nov-2002 mckusick

Create a new 32-bit fs_flags word in the superblock. Add code to move
the old 8-bit fs_old_flags to the new location the first time that the
filesystem is mounted by a new kernel. One of the unused flags in
fs_old_flags is used to indicate that the flags have been moved.
Leave the fs_old_flags word intact so that it will work properly if
used on an old kernel.

Change the fs_sblockloc superblock location field to be in units
of bytes instead of in units of filesystem fragments. The old units
did not work properly when the fragment size exceeeded the superblock
size (8192). Update old fs_sblockloc values at the same time that
the flags are moved.

Suggested by: BOUWSMA Barry <freebsd-misuser@netscum.dyndns.dk>
Sponsored by: DARPA & NAI Labs.


107266 26-Nov-2002 yar

Eliminate references to defunct kernel tunables.

Approved by: re
PR: bin/43343


107203 24-Nov-2002 marcel

MFp4:
o Show the contents of the AP wakeup descriptor when dumping SAL
information.
o Increase S/N ratio when listing the itr and dtr. Only show valid
mappings and give the total number of TRs.

Approved by: re (blanket)


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


106845 13-Nov-2002 mdodd

Document loader tunables hw.pci.enable_io_modes and
hw.pci.allow_unsupported_io_range.

Submitted by: Hiten Pandya <hiten@angelica.unixdaemons.com>
Approved by: re (murray)


106842 13-Nov-2002 mdodd

Loader tunable 'machdep.disable_mtrrs'.
Sysctl of same name to reflect status.

Submitted by: jhb
Approved by: re (murray)
MFC after: 1 day


106738 10-Nov-2002 jake

Change the device path representation in libofw to use the full firmware
path, instead of an internal i386 specific one. Don't try to interpret
a disklabel in ofw_disk.c, open the partition's device node directly and
let the firmware do it. This fixes booting from a partition other than 'a'
on sparc64, which is needed to support more installation methods.

No objection: ppc


106385 03-Nov-2002 phk

Correctly recognize both bogus and genuine BSD disklabels.

Don't expect me to participate in a discussion which is which.

Sponsored by: DARPA & NAI Labs.


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>


105852 24-Oct-2002 marcel

o Fix a size calculation based on a 8KB page, while under EFI
pages are 4KB.
o As a second order fix, don't assume we have enough space
after the bootinfo block left in a page to hold the memory
map.
o A third order fix as that we removed the assumption that a
bootinfo block fits in a single 8KB page.

PR: ia64/39415
submitted by: Espen Skoglund <esk@ira.uka.de>


105427 18-Oct-2002 tmm

Pass the right number of tlb slots to the kernel. The allocation scheme
was changed in r1.4, but I neglected to update most of the code in
metadata.c.

Pointy hat to: tmm


105065 13-Oct-2002 jake

Compile in support for zipfs and bzipfs so we can load the gzipped mfsroot
that releases use.


104777 10-Oct-2002 nyan

Remove '-DUFS1_ONLY' from CFLAGS. It is not needed.


104683 08-Oct-2002 jhb

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

Tested by: phk


104680 08-Oct-2002 phk

Now that ufsread.c doesn't do 64bit divide remainder operations,
don't bother with libkern.

Sponsored by: DARPA & NAI Labs.


104679 08-Oct-2002 phk

Save a couple of bytes by not returning ints nobody care about.

Sponsored by: DARPA & NAI labs


104678 08-Oct-2002 phk

It seems that the only problem with UFS2 booting on i386 is the 64bit
divide/remainder calls. For reasons not resolved, compiling the
relevant routines from libkern into boot2 results in stack corruption.

Do the simple thing: Don't use 64bit divide/remainder operations.

Sponsored by: DARPA & NAI Labs


104673 08-Oct-2002 green

Reinstate rev 1.36 with an important line that got missed. Note this
also improves the "random undocumented offsets into various memory
spaces" a little bit.


104671 08-Oct-2002 phk

Remove unused TYPE_WD and TYPE_WFD.


104670 08-Oct-2002 phk

Correctly calculate dmadat: We need to take the address of _end, it's
contents is irrelevant and likely to be zero;

This doesn't change the resultant value, but it does save a couple of bytes
because &_end is constant.


104668 08-Oct-2002 phk

Unbreak boot2 by backing out rev 1.36 to Makefile, which does not
work as advertised:

bang# pwd
/bang/src/sys/boot/i386/boot2
bang# make clean >& /dev/null
bang# cvs -q update -r 1.35 Makefile >& /dev/null
bang# make >& /dev/null
bang# cat /usr/obj/`pwd`/boot2.h
#define XREADORG 0x725
bang# cvs -q update -r 1.36 Makefile > & /dev/null
bang# make clean > & /dev/null
bang# make > & /dev/null
bang# cat /usr/obj/`pwd`/boot2.h
#define XREADORG 0x25
bang#


104666 08-Oct-2002 phk

Save four bytes by shortening a string two chars.

Sponsored by: DARPA & NAI Labs.


104636 07-Oct-2002 green

Correct a bug in adding 0x700 to a number.


104635 07-Oct-2002 phk

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

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

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

Sponsored by: DARPA & NAI Labs.


104632 07-Oct-2002 phk

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

Sponsored by: DARPA & NAI Labs


104629 07-Oct-2002 phk

Correctly adjust for moved start address.

It seems that the existence of a "depend" target in src/sys/boot is not
to be taken as an indication that it actually does what one would expect,
at least it clearly threw my testing off.

Apologies to: jhb


104621 07-Oct-2002 nyan

Added '#include <sys/diskpc98.h>'.

Submitted by: kawanobe@st.rim.or.jp (Kawanobe Koh)


104620 07-Oct-2002 phk

Correctly compensate for both offset and unoffset on-disk BSD disklabels.

Sponsored by: DARPA & NAI Labs.


104618 07-Oct-2002 phk

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

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

Sponsored by: DARPA & NAI Labs


104613 07-Oct-2002 phk

Ups, forgot to tell cvs commit about this file.
Move UFS1_ONLY to Makefiles instead of common/ufsread.c

Sponsored by: DARPA & NAI Labs


104612 07-Oct-2002 phk

Move the definition of UFS1_ONLY into the Makefiles where it belongs.

Sponsored by: DARPA & NAI Labs.


104413 03-Oct-2002 nyan

Connected boot2.


104412 03-Oct-2002 nyan

Added some header files from -stable and fixed the boot[12] programs.


104315 01-Oct-2002 iwasaki

Don't call INT 12H anymore in boot program.
Many recent machine have a broken INT 12H (Get base memory size)
implementation and boot program stops if INT 12H is called.

This commit should solve the problem at very first step of FreeBSD
installation occurred on newer some machines.

Reviewed by: bde, jhb
MFC after: 1 week


104272 01-Oct-2002 phk

Split MBR and PC98 on-disk sliceformats out from disklabel.h, step 1:

Peter had repocopied sys/disklabel.h to sys/diskpc98.h and sys/diskmbr.h.

These two new copies are still intact copies of disklabel.h and
therefore protected by #ifndef _SYS_DISKLABEL_H_ so #including them
in programs which already include <sys.disklabel.h> is currently a
no-op.

This commit adds a number of such #includes.

Once I have verified that I have fixed all the places which need fixing,
I will commit the updated versions of the three #include files.

Sponsored by: DARPA & NAI Labs.


104234 30-Sep-2002 peter

Use as's --defsym switch to compensate for the loss of the M4 substitution
of SIOPRT which broke kgzldr and therefore make release.

Pointed out by: murray


103877 24-Sep-2002 nyan

Fixed to build after removing a.out suppot.


103870 23-Sep-2002 alfred

use __packed.


103834 23-Sep-2002 peter

At great personal risk, add a __packed and __aligned(x) define that
expand to __attribute__((packed)) and __attribute__((aligned(x)))
respectively. Replace the handful of gcc-ism's that use
__attribute__((aligned(16))) etc around the kernel with __aligned(16).

There are over 400 __attribute__((packed)) to deal with, that can come
later. I just want to use __packed in new code rather than add more
gcc-ism's.


103641 19-Sep-2002 nyan

MFi386: Remove a.out support.


103639 19-Sep-2002 nyan

Remove -elf option.


103436 17-Sep-2002 peter

Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports. As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL. It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha


102960 05-Sep-2002 iwasaki

Parse hint.acpi.0.disabled correctly.
Now that hint.acpi.0.disabled="0" won't disable acpi as expected.

Pointed-out by: bde


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


102829 02-Sep-2002 jake

Remove NOFORTH=yes, it seems to work now thanks to scottl.


102807 01-Sep-2002 kan

Restore Rev. 1.40 (remove "Keyboard yes/no" printf).
GCC 3.2 overflows boot2 by 12 bytes, this patch brings it back
within the boundaries, with 12 bytes available for future bloat.

Approved by: obrien


102657 31-Aug-2002 scottl

Make ficl work on sparc64. The assumption that int == long == void * is
very pervasive in this code. This fixes a few of those assumptions and
band-aids over some others.

Tested on: ia32 alpha sparc64

Reviewed by: peter jake (in concept)


102623 30-Aug-2002 jhb

Revert previous untested revision. The i386 loader consists of three parts:
At the front is btxldr, in the middle is BTX itself (our mini-kernel), and
then the 'client' (loader.bin) which is the actual loader itself. boot2
just executes a raw ELF or a.out binary with the only setup provided being
that a bootinfo structure is passed on the stack. Now, since loader.bin
is a BTX client, the loader needs to be able to locate a BTX kernel for
the client to execute in the context. Thus, just like pxelder, btxldr
uses the a.out header on the loader binary to find the BTX kernel stored
in the loader and set it up. It does _not_ just reuse the BTX kernel
that boot2 invoked it with. This is because it can't assume that it will
_have_ a "spare" BTX kernel lying around. For example, when cdboot
loads the loader there isn't an existing BTX kernel. In fact, cdboot
will only work with an a.out loader as well since it also "borrows" the
BTX kernel in the loader binary (which it finds by parsing the a.out
header) just as pxeldr does. The only difference between cdboot and
pxeldr is where they get /boot/loader from.

If we wanted to make /boot/loader be an actual ELF binary we would need
to change the following utilites to handle that (and they all have to be
able to handle locating the BTX kernel inside of an ELF binary somehow):
- btxldr
- pxeldr
- cdboot

If we didn't want to require a flag day but make the transition smooth
then we need to be able to support both a.out and ELF versions of
/boot/loader which isn't exactly trivial since all three of these utilities
are written in assembly.

Pointy-hat to: peter


102612 30-Aug-2002 iwasaki

s/hint.acpi.0.disable/hint.acpi.0.disabled/

Fix device hints entry for disabling acpi(4).
This also should fix the arbitration with apm(4) when both drivers
are enabled.

Note that your /boot/device.hints needs to be updated if you want to
stop auto-loading acpi.ko or disable acpi(4).


102591 29-Aug-2002 peter

Try #2 at having /boot/loader default to ELF. Have pxeldr build its
own a.out version of loader.bin rather than depend on ../loader/loader
being a.out.


102588 29-Aug-2002 peter

Actually remove the stale a.out kld support. This is the stuff that was
never updated for the metadata infrastructure.


102556 29-Aug-2002 peter

Initiate deorbit burn of i386 a.out kld "support" in loader. Note that
this was quite broken, it never was updated for metadata support.
The a.out kld file support was never really used, as it wasn't necessary.
You could always load elf kld's, even in an a.out kernel.


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>


102226 21-Aug-2002 robert

- Do not pretend to compile a kernel and remove the definition
of the _KERNEL macro.
- Do not include <sys/pcpu.h> for no reason.

Suggested by: jake


102219 21-Aug-2002 robert

- Define the macro _KERNEL to pretend we are compiling a kernel.
This is required by recent changes to <sys/pcpu.h>, which uses
the #error preprocessor directive to keep non-kernel
applications from using it.
_KERNEL is defined below the #include <stand.h>, because <stand.h>
removes the definition of _KERNEL.
- Move the inclusion of <sys/queue.h> above the inclusion of
<sys/linker.h> to avoid syntax errors.


102215 21-Aug-2002 scottl

Fix for stand-alone compiling

Reviewed by: mini


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.


101823 13-Aug-2002 ru

mdoc(7) police: revert unapproved changes in rev. 1.43, added missing markup bits in rev. 1.45.


101602 09-Aug-2002 iwasaki

Add help about hint.acpi.0.disable.


101558 09-Aug-2002 obrien

Restore autoloading of ACPI module.

Document the approved ways of disabling it.
Submitted by: Daniel O'Connor <doconnor@gsoft.com.au>


101556 09-Aug-2002 obrien

Don't auto load ACPI -- it causes trouble with my laptop and is TOTALLY
undocumented how to control its loading and queries to freebsd-current
go unanswered.


101287 04-Aug-2002 jake

Print out the strings in vers.o instead of hardcoding the loader banner.


101187 01-Aug-2002 rwatson

Sample loader.conf lines for various MAC modules.


101112 31-Jul-2002 jake

Stash various networking paramters in the environment for the kernel
to pick up, ala pxe.


100872 29-Jul-2002 ru

Drop support for COPY, -c has been the default mode of install(1)
for a long time now.

Approved by: bde


100391 20-Jul-2002 peter

Turn on -Wformat


100390 20-Jul-2002 peter

Fix printf format errors


100389 20-Jul-2002 peter

Work around some nasty bugs on the [beta] Itanium2's E1000 UNDI driver.

Bug#1: The GetStatus() function returns radically different pointers that
do not match any packets we transmitted. I think it might be pointing to
a copy of the packet or something. Since we do not transmit more than
one packet at a time, just wait for "anything".

Bug#2: The Receive() function takes a pointer and a length. However, it
either ignores the length or otherwise does bad things and writes outside
of ptr[0] through ptr[len-1]. This is bad and causes massive stack
corruption for us since we are receiving packets into small buffers on
the stack. Instead, Receive() into a large enough buffer and bcopy the
data to the requested area.


100388 20-Jul-2002 peter

Disable loader ufs support. It causes the loader to crash on the Itanium2
box that I have. We have no EFI disk drivers yet anyway (maybe that is the
problem).


100387 20-Jul-2002 peter

Fix printf format errors


100325 18-Jul-2002 nyan

Remove boot2 temporarily.


100318 18-Jul-2002 benno

Major rework of how we copy data into kernel space.

We now talk to the memory and mmu instances directly rather than using the
OpenFirmware "claim" method.


100187 16-Jul-2002 mp

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

MFC after: 3 days


100174 16-Jul-2002 nyan

Change include order.


100016 15-Jul-2002 keramida

Use present tense in all the verbs, when describing loader's startup.
Most of them are not in a future tense already.


99976 14-Jul-2002 charnier

The .Nm bootloader


99975 14-Jul-2002 charnier

The .Nm set of commands


99974 14-Jul-2002 charnier

The .Nm


99727 10-Jul-2002 benno

Add support for passing metadata.


99682 09-Jul-2002 iwasaki

Resolve conflicts arising from the ACPI CA 20020611 import.


99560 07-Jul-2002 jake

Enable netboot support by default, since it can now coexist with disk and
cdrom support. This avoids having to distribute separate loaders.


99546 07-Jul-2002 mp

Change help documentation for bootfile and module_path to reflect
the actual code. Both use a ";" (not a ",") to delimit entries.

PR: 39679
Submitted by: Cyrille Lefevre <cyrille.lefevre@laposte.net>
MFC after: 3 days


99541 07-Jul-2002 jake

Make building with ficl work. Unfortunately booting with it doesn't.


99539 07-Jul-2002 jake

Build ficl on sparc64 fwiw. It doesn't work.


99332 03-Jul-2002 mini

Add missing kernal tunables to loader.conf.

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


99170 30-Jun-2002 iwasaki

Fix a build problem for the ACPI CA 20020404 import.
Add definition of COMPILER_DEPENDENT_INT64 and also
fix definition of COMPILER_DEPENDENT_UINT64.

Pointed-out by: Michael Nottebrock <michaelnottebrock@gmx.net>


99013 29-Jun-2002 peter

Remove a couple of __P() stragglers.


98594 21-Jun-2002 jake

Enable cd9660 support by default.


98593 21-Jun-2002 jake

Enable UFS1_AND_UFS2 support for sparc64 by default. Booting from ufs1 or
ufs2 filesystems seems to work fine.


98556 21-Jun-2002 phk

Revert the part of Kirks UFS2 commit which added divdi3.c and moddi3.c
to libi386, this issue was resolved already in a cleaner way.


98542 21-Jun-2002 mckusick

This commit adds basic support for the UFS2 filesystem. The UFS2
filesystem expands the inode to 256 bytes to make space for 64-bit
block pointers. It also adds a file-creation time field, an ability
to use jumbo blocks per inode to allow extent like pointer density,
and space for extended attributes (up to twice the filesystem block
size worth of attributes, e.g., on a 16K filesystem, there is space
for 32K of attributes). UFS2 fully supports and runs existing UFS1
filesystems. New filesystems built using newfs can be built in either
UFS1 or UFS2 format using the -O option. In this commit UFS1 is
the default format, so if you want to build UFS2 format filesystems,
you must specify -O 2. This default will be changed to UFS2 when
UFS2 proves itself to be stable. In this commit the boot code for
reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c)
as there is insufficient space in the boot block. Once the size of the
boot block is increased, this code can be defined.

Things to note: the definition of SBSIZE has changed to SBLOCKSIZE.
The header file <ufs/ufs/dinode.h> must be included before
<ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and
ufs_lbn_t.

Still TODO:
Verify that the first level bootstraps work for all the architectures.
Convert the utility ffsinfo to understand UFS2 and test growfs.
Add support for the extended attribute storage. Update soft updates
to ensure integrity of extended attribute storage. Switch the
current extended attribute interfaces to use the extended attribute
storage. Add the extent like functionality (framework is there,
but is currently never used).

Sponsored by: DARPA & NAI Labs.
Reviewed by: Poul-Henning Kamp <phk@freebsd.org>


98472 20-Jun-2002 peter

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


98113 11-Jun-2002 phk

#include <sys/disklabel.h> to get BBSIZE.


98110 11-Jun-2002 phk

Make the alpha architecture use the common ufsread().

Submitted by: ticso


98014 07-Jun-2002 benno

Uncomment some bits that we now need.


98013 07-Jun-2002 benno

Fix up the DMA buffer allocation call.


97867 05-Jun-2002 phk

Add explicit dependency on ufsread.c


97865 05-Jun-2002 phk

Remove UFS related #includes, they're read in ufsread.c now.


97864 05-Jun-2002 phk

Make sparc64 share ufsread.c with i386.

Sponsored by: DARPA & NAI Labs.


97863 05-Jun-2002 phk

Avoid entering IOCCC with a memcpy turned bcopy.


97861 05-Jun-2002 phk

Indent this file more like style(9).

Sponsored by: DARPA & NAI Labs.


97860 05-Jun-2002 phk

Preparation for UFS2 commit:

Factor the ufs reading code out of the i386/boot2 loader so it can
be reused by for instance sparc64.

Sponsored by: DARPA and NAI Labs.


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


97525 29-May-2002 schweikh

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

MFC after: 2 weeks


97510 29-May-2002 jake

Add needed include of queue.h. Remove unneeded include of smp.h.


97445 29-May-2002 jake

Use a contrived 'tlb_entry' structure for passing the mappings for the
kernel text and data from the loader to the kernel, so that the tte format
is not part of the loader->kernel ABI.


97432 28-May-2002 jake

Sync with i386. The loader was being installed before the beforeinstall
target, which conventiently moved it to loader.old, leaving no loader.


97301 26-May-2002 n_hibma

Cosmetic change (align with other boot blocks):

CONSPEED -> COMSPEED

Approved by: nyan


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)


97065 21-May-2002 nyan

Fixed to conflict labels.

Submitted by: Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>


97060 21-May-2002 nyan

MFi386: revision 1.22


96962 19-May-2002 jake

MD ficl files for sparc64.


96912 19-May-2002 marcel

o Remove namespace pollution from param.h:
- Don't include ia64_cpu.h and cpu.h
- Guard definitions by _NO_NAMESPACE_POLLUTION
- Move definition of KERNBASE to vmparam.h

o Move definitions of IA64_RR_{BASE|MASK} to vmparam.h
o Move definitions of IA64_PHYS_TO_RR{6|7} to vmparam.h

o While here, remove some left-over Alpha references.


96893 19-May-2002 marcel

An almost mechanical sweep to replace C++ style comments with C
style comments. This is not an attempt to conform to style(9).
Such has lower priority.


96843 18-May-2002 phk

Fix one of the va_arg() with less than int sized type probelms.


96755 16-May-2002 trhodes

More s/file system/filesystem/g


96654 15-May-2002 jhay

DEV_BSIZE lives in sys/param.h and not in machine/param.h anymore.


96583 14-May-2002 ru

Even more BBSIZE related breakage.


96581 14-May-2002 nyan

Fixed to build for GCC 3.1


96579 14-May-2002 nyan

Add -ffreestanding to CFLAGS.


96533 13-May-2002 ru

Align CLEANFILES with revision 1.25 changes.


96532 13-May-2002 ru

Fixed CLEANFILES after bsd.lib.mk sweep.


96513 13-May-2002 ru

Removed now unused INTERNALSTATICLIB.
INTERNALLIB now implies NOPIC and NOPROFILE.
Removed gratuitous NOMAN.


96512 13-May-2002 ru

Major cleanup of bsd.lib.mk.

Get rid of the INTERNALSTATICLIB knob and just use plain INTERNALLIB.
INTERNALLIB now means to build static library only and don't install
anything. Added a NOINSTALLLIB knob for libpam/modules. To not
build any library at all, just do not set LIB.


96497 13-May-2002 obrien

Match the default newfs UFS block size.


96460 12-May-2002 bde

Saved 176 bytes by compiling with -fno-guess-branch-probability. The
default of -fguess-branch-probablility causes time optimizations (?)
like rewriting `if (foo) x++;' as
`if (!foo) goto forth; back: ; ...; forth: x++; goto back;". This is
pessimizes space especially well on i386's because one short branch
gets converted to 2 long ones.

Removed -fno-align-foo since it is implied by -Os. Previous commit
messages seem to have overstated the new alignment bugs in gcc. The
only case that affects boot2 is that -fno-align-functions (or
equivalently -falign-functions=1) actually gives -falign-functions=2.
This is caused by FUNCTION_BOUNDARY being 2 (bytes) instead of 1.
The default case where the optimization level is 1 and no alignment
options are given is more broken. All alignments are minimal, modulo
the bug in FUNCTION_BOUNDARY. This is caused by toplev.c setting
defaults too early.

Some hacks in previous commits ar not needed now, but may as well be
kept until gcc is fixed. The previous on in the Makefile saved 96
bytes of text due to the wrong FUNCTION_BOUNDARY and 32 bytes of data
due to unrelated bloat in the alignment of large objects. There aren't
even any options to control alignment of data.


96455 12-May-2002 obrien

Back out last commit. I expect our bsd.*.mk gods to remove the need for
defining so many extra things in addition to INTERNALLIB. We don't like
repetitive C code and we shouldn't for make code either.


96428 11-May-2002 jake

Attempt to not crash and burn on UltraSPARC III machines; the cpuid property
is named differently.


96426 11-May-2002 peter

Save about 60 bytes by #define memcpy __builtin_memcpy and removing
the function we provided. Restore the Keyboard: yes/no printf for the
probe diagnostics. We end up with 40 bytes free.


96425 11-May-2002 peter

Reconnect boot2. I'm sure I'll regret this though. :-)


96424 11-May-2002 peter

Use a crowbar and duct-tape to make boot2 fit again. This gets it down
to 4 bytes free. I removed a printf (the Keyboard yes/no) since it is of
marginal value and sed'ed the generated asm output to remove the unwanted
aligns. There's probably a better way to gain a few extra bytes than
losing the printf. Shortening strings is probably a better option but this
should get us over the hurdle.


96423 11-May-2002 jake

Change the disk probing so that it will actually find disks other
than the first one on a controller, and work for secondary
controllers.
Due to the prom not having nodes for each disk, but a catch-all one,
we have to iterate over each device, trying to open it to determine
whether it is actually present.
Since probing this way takese some time (and spews some spurious
warnings), it should maybe be short-circuited if we use the
device we were booted from.
Implement lazy device probing, and correct slice/partiniton
handling in the ofwd_open() code. With this, I can now actually boot
a kernel from disk, and the loader does not create unnecessary
delays.

Submitted by: tmm


96415 11-May-2002 obrien

NOPIC, NOPROFILE, NOMAN, and INTERNALSTATICLIB are redundant when using
INTERNALLIB now.


96342 10-May-2002 obrien

-ffreestanding is the word.
(also resort some CFLAGS such that the more "important" value are first so
they are easier to see)


96327 10-May-2002 jhb

- Axe -mpreferred-stack-boundary=2 as -Os turns this on by default.
- Axe -fdata-sections as turning it on or off makes no difference. If
it did make a difference it would serve to bloat boot2 even further with
extra padding.
- Axe -fforce-addr. This gets us 32 bytes so we are down to only being
64-bytes over.

We still can't compile this with gcc 3.1. The problem seems to be that
the -fno-align-foo options don't actually work. Comparing the new and
old output it turns out that gcc is 4-byte padding all the functions and
labels and what not despite the passed in arguments thus adding the
unfortunate bloat to boot2.


96310 10-May-2002 obrien

We don't need bootinfo any more, and sparc64 doesn't have it anyways.


96309 10-May-2002 obrien

Don't be redundant.


96306 10-May-2002 obrien

-ffreestanding is the word for /sys.


96305 10-May-2002 obrien

Turn off boot2 -- it gained over 96 bytes dieting on the in-tree Gcc 3.1.


96269 09-May-2002 obrien

Ficl doesn't build on sparc64.


96261 09-May-2002 obrien

Partical style cleanup.


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


95450 25-Apr-2002 nyan

MFi386: revision 1.56


95449 25-Apr-2002 nyan

MFi386: revision 1.8


95351 24-Apr-2002 jake

Split file system setup code out into a function called mount.
Implement vsnprintf. Implement panic in terms of it.


95346 24-Apr-2002 jake

Add support for loading files other than /boot/loader. Useful if you're
loader is screwed and you want loader.old.
Rewrite the scaled down printf so it actually works right, and add support
for more formats.


95342 24-Apr-2002 jake

Add an exit function.


95341 24-Apr-2002 jake

Add -Wno-unused.


95340 24-Apr-2002 jake

memcpy, memset -> bcopy, bzero.


95339 24-Apr-2002 jake

Clean up elf loading to not make assumptions about the ordering of sections.
Don't load the symbol table; this is only needed for loading kernels and we
load the loader.


95338 24-Apr-2002 jake

Remove xfsread. Just call fsread directly.


95337 24-Apr-2002 jake

Remove a bunch of unused variables, functions and macros. Allocate storage
statically instead of using a faked up malloc.


95190 21-Apr-2002 marcel

Improve self-relocation:
o We don't expect the PLT relocations to follow the .rela section
anymore. We still assume that PLT relocations are long formed,
o Document register usage,
o Improve ILP,
o Fix the FPTR relocation by creating unique OPDs per function.
Comparing functions is valid now,
o The IPLT relocation naturally handles the addend. Deal with it.
We ignore the addend for FPTR relocations for now. It's not at
all clear what it means anyway.

Fix ABI misinterpretation:
o For Elf_Rela relocations, the addend is explicit and should not
be loaded from the memory address we're relocating. Only do that
for Elf_Rel relocations (ie the short form).
o DIR64LSB is not the same as REL64LSB. DIR64LSB applies to a
symbol (S+A), whereas REL64LSB applies to the base address (BD+A),


95172 21-Apr-2002 obrien

o Use our own elf2aout now.
o Generalize a little.


95026 19-Apr-2002 marcel

Allocate sufficient pages to hold the bootinfo block and stop
hardwiring the location.


94956 17-Apr-2002 ru

Install files via FILES, there's no reason to compare them before installing.


94952 17-Apr-2002 ru

Really unbreak it this time (clean and install were still broken).


94765 15-Apr-2002 nyan

MFi386: revision 1.7.


94510 12-Apr-2002 ru

Unbreak this as well.
At the extra bonus of fixing the contents of the .depend file.

Not really my day.


94419 11-Apr-2002 peter

Bandaid for a buffer overrun in the module searching code. When breaking
up the module_path string, we would walk one past the end of the buffer.
This hurting ia64 originally, but it was probably also happening on i386
occasionally as well. The effects were usually harmless, it would add
bogus "binary" search directories to the places it actually looked for
files.


94418 11-Apr-2002 peter

Finally fix loader completely for IA64. efifs_stat() wasn't setting
the S_IFREG bit for regular files. This caused the path search code to
skip it when it finally did find the kernel (after the common/module.c
buffer overrun bug was fixed)


94411 11-Apr-2002 pb

Code cleanup, no functional change.
Patch adapted from PR.

PR: i386/36015
Submitted by: thomas@cuivre.fr.eu.org
MFC after: 1 week


94313 09-Apr-2002 dcs

Upgrade FICL to 3.02. Forgot this one, sorry.

PR: 36308
Submitted by: dcs


94290 09-Apr-2002 dcs

Upgrade to FICL version 3.02. Anything wrong is my fault, everything right is
due Jon Mini.

PR: 36308
Submitted by: Jon Mini <mini@haikugeek.com>
MFC after: 4 weeks


94248 09-Apr-2002 jake

Fix another unsigned long used to index the symbol table which should be
Elf_Hashelt.


94024 07-Apr-2002 peter

We must not let install(1) strip loader.efi when installing it, or the
resulting binary will be damaged and no longer work.


94023 07-Apr-2002 peter

Set BINDIR


94022 07-Apr-2002 peter

Add loader bootforth infrastructure and install it.


93926 06-Apr-2002 peter

Make it a bit closer to the EFI build and tie up some loose ends.


93925 06-Apr-2002 peter

Try and tidy up some very loose ends with paths to various libraries etc.


93924 06-Apr-2002 peter

Do not add the ficl/alpha subdir to the ia64 include path. Try ficl/ia64
instead.


93923 06-Apr-2002 peter

Do not assume that ${OBJCOPY} variable exists. It was hidden by the
fact that the 'ia64-make' wrapper explicitly set it.


93922 06-Apr-2002 peter

Use the correct elf hash table entry type. This matches a similar fix
in the kernel side of things some time ago. The hash table entries are
always 32 bits wide, even on 64 bit machines.


93921 06-Apr-2002 peter

Fix self hosted loader building. When you use a self configured gcc, it
detects and uses the gas section merge support. As a result, a whole bunch
of new sections arrive, including .rodata.str1.8, which was not included
in our custom ldscript.ia64. The result was a loader binary that EFI
rejected.

While here, collect the loader shell commands linker set and include it
in the data area rather than having its own section.

/boot/loader.efi was the last holdout for having a 100% self built ia64
system.


93753 04-Apr-2002 peter

Use a relative path to libstand.. /usr/src/lib/libstand may not exist
or may have the wrong header files.


93678 02-Apr-2002 tmm

Do not use semi-fixed TLB slots for the 4M kernel pages any more.


93677 02-Apr-2002 tmm

1.) Rename locore.s to locore.S (by repocopy), to be able to remove
special-case make rule
2.) Cleanups, remove superfluous expicit rules, add -nostdlib to LDFLAGS,
remove -X and -g, remove -g from CFLAGS
3.) Add BINDIR
4.) Build install the loader help file, add an empty help.sparc64
5.) Change the default configuration to only support booting from disk
6.) Get libofw.a from a path relative ${.OBJDIR}, not ${.CURDIR}

Submitted by: jake (1 - 5), obrien (6)


93606 01-Apr-2002 tmm

Add support for booting from CD-ROM. Make it possible to enable UFS
support using make arguments.


93605 01-Apr-2002 tmm

1.) Produce a boot1 disklabel template of the format disklabel(8) expects.
2.) Clean up and change over to using bsd.prog.mk

Submitted by: jake (2)


93485 31-Mar-2002 marcel

Only install the help file if we can find it. Use ${BASE}.help
in both the condition and for the install. We expect to find
the help file in ${.OBJDIR}.


93459 30-Mar-2002 marcel

Pass the address of the bootinfo block to the kernel in register
r8. Keep it at the hardwired address for now. Bump the version.


93454 30-Mar-2002 marcel

Pass the physical address of the bootinfo block to the kernel in
register r8. We continue to write the bootinfo block at the same
hardwired address, because the kernel still expects it there.
It is expected that future kernels use register r8 to get to the
bootinfo block and don't depend on the hardwired address anymore.

Bump the loader version once again due to the interface change.


93416 30-Mar-2002 nyan

MFi386: revision 1.55


93411 30-Mar-2002 marcel

Add a quick and dirty way to determine where we're loaded from. We
only care if it's network or not at this time. If we're loaded from
the network, we set currdev (=loaddev) so that the kernel is loaded
from the network as well. In all other cases we initialize to disk.
This makes netbooting more convenient and can easily be enhanced to
do more elaborate checking.


93410 30-Mar-2002 marcel

The EFI loader has been improved a lot since it was first added.
Most significantly (from an interfacing point of view) is the
support for the FPSWA pointer passing. Even though that was added
4 months ago, it's probably not a bad idea to bump the version
number to reflect this.


93409 30-Mar-2002 marcel

Fix the initialization of the protocol:
o Query the state field of the protocol mode to determine whether
we need to start and/or initialize the protocol. When we're
loaded across the network, the protocol has already been started
and is already initialized. When no networking has happened yet,
we have to start and initialize the protocol ourselves.
o After initialization, we have to set the receive filters. Not
doing this results in a deaf interface. We set the unicast and
broadcast filters. Multicast may not be supported. This specific
change fixes the problem we had that we could not netboot if
the loader was started from the EFI shell.
o To help future debugging, add a function that dumps the current
mode of the interface. It's conditional on EFINET_DEBUG.
o To help in runtime problems, emit a diagnostic message when we
could not initialize the protocol properly.


93405 30-Mar-2002 marcel

Don't blindly dereference f->f_devdata as if it's always a pointer to
an efi_devdesc structure. When we're netbooting, f->f_devdata holds
the address of the network socket variable. Dereferencing this caused
some very unpredictable behaviour, including proper functioning.
So, as a sanity check, we first make sure f->f_dev points to our
own devsw. If not, the open will fail before we use f->f_devdata.

This solves the netboot hangs I invariably got whenever I used the
latest toolchain to compile the EFI loader.


93403 29-Mar-2002 marcel

o Make efinet_put a blocking call by waiting for the protocol
layer to signal transmission of the packet. This resolves the
problem I'm seeing that an immediate call to net->Receive
after calling net->Transmit returns EFI_DEVICE_ERROR. This
condition seems to be sufficiently persistent that BOOTP and
RARP fail.
o While here, unify all functions to have 'nif' defined. Some
have it as arguments. The others now have them as locals. We
now always get the protocol interface by using the 'nif' var.

The current status of netbooting is that even though we now reliably
have BOOTP working (again), opening a file (ie loading a kernel)
across the network causes the loader to hang. I'm working on that now.


93400 29-Mar-2002 marcel

Fix the beforeinstall target. We install ${PROG}.help if loader.help
exists, otherwise we install it anyway. I interpret this as a very
high desire to install ${PROG}.help. Alas, ${PROG}.help doesn't exist
at the moment and neither does loader.help, so in practice this just
doesn't work, no matter how you interpret it. The compromise is to
install ${PROG}.help IFF it exists. I realize we lost creativity with
this commit, but style should have been preserved, AFAICT :-)


93352 28-Mar-2002 obrien

Needs a.out support built into the loader.


93321 28-Mar-2002 marcel

o Don't include sys/cdefs.h


93320 28-Mar-2002 marcel

o Add -L${DESTDIR}${LIBDIR} on the link line for -lstand.
o Add -j .dynstr to objcopy. This makes .efi binaries work
when built with a 3.x based toolchain.


93319 28-Mar-2002 marcel

Duplicate the logic used elsewhere to define LIBSTAND.


93313 28-Mar-2002 obrien

was repocopied to ../boot1


93311 28-Mar-2002 obrien

Apparently either gcc or ld, in their infinite wisdom, want to
put a bunch of crap before the code in .text. Since the firmware
doesn't seem to honour the a.out entry point, we need to include
a little assmbler file which jumps to where we want to be in C.

Submitted by: jake


93308 28-Mar-2002 obrien

Opps, bootblock component is no more.


93307 28-Mar-2002 obrien

sparc64 is an ofw consumer.


93306 28-Mar-2002 obrien

Not all platforms have and want a.out format support.


93302 28-Mar-2002 obrien

Add a Makefile for sparc64 at this level.


93044 23-Mar-2002 pb

Add option -n to i386 boot2 to disallow boot interruption by keypress.

PR: i386/36016
Submitted by: Thomas Quinot <thomas@cuivre.fr.eu.org>
Reviewed by: rnordier
MFC after: 1 week


92766 20-Mar-2002 alfred

Remove __P.


92731 19-Mar-2002 peter

Add EFI write support to loader


92658 19-Mar-2002 peter

Add -ffreestanding to avoid printf/puts/putchar conversions


92657 19-Mar-2002 peter

Boot from efifs first.


92656 19-Mar-2002 peter

gcc-3.1 likes to have extra { } around the internal array initializers in
the GUID templates.


92494 17-Mar-2002 sobomax

Add splitfs vfs layer into libstand, which allows loading big kernels and
modules split across several physical medias. Following is how it works:

The splitfs code, when asked to open "foo" looks for a file "foo.split"
which is a text file containing a list of filenames and media names, e.g.

foo.aa "Kernel floppy 1"
foo.ab "Kernel floppy 2"
foo.ac "Kernel and modules floppy"

For each file segment, the process is:

- try to open the file
- prompt "Insert the disk labelled <whatever> and press any key..."
- try to open the file
- return error if file could not be located

RE team is free to use this feature in the upcoming 5.0-DP1.

Reviewed by: msmith, dcs


92339 15-Mar-2002 ru

mdoc(7) police: fix a typo and markup.


92225 13-Mar-2002 ru

Implement -m and -p loader(8) "boot" command options in boot2.
(This is more useful for 4.x where boot blocks can still load
kernels, modulo the PR kern/17422.)


92224 13-Mar-2002 ru

Further document "console" (nullconsole).


92030 10-Mar-2002 sobomax

CG superfluous prototype.


91696 05-Mar-2002 robert

Change every occurrence of "bootblock" into "boot1" after
the repo-move from "src/sys/boot/sparc64/bootblock".


91678 05-Mar-2002 robert

- Fix seeking for offsets requiring more than 32 bits.
- Add sanity checks to lookup().
- Implement the 'l' modifier in printf().

Submitted by: tmm


91609 04-Mar-2002 alfred

Support for USB fm radio.

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


91519 01-Mar-2002 jake

Catch up to change in tte format.

Forgetten by: jake
Submitted by: tmm


91480 28-Feb-2002 nyan

Add -D_KERNEL to CFLAGS for ntohl().


91295 26-Feb-2002 robert

- Fix indentation and return statements to conform to style(9).
- Use the __FBSDID macro.
- Fix some warnings.

Submitted by: obrien (partly)


91219 25-Feb-2002 bde

Declare time(not3) instead of depending on namespace pollution 3 layers
deep in <stand.h> to eventually include <time.h> to declare the user
version.

This is not quite the right place to declare it, but <stand.h> would
be worse because time() is very MD so it isn't in libstand.

Many places in the boot sources still get the user version using only
1 layer of pollution (#include <sys/time.h>. Some pollute themselves
directly (#include <time.h>). But the boot Makefiles are too broken
to enable warnings for redeclarations.


91218 25-Feb-2002 bde

Removed mounds of unused variables.


91139 23-Feb-2002 jake

Keep track of the ttes used to map the kernel and pass them to it as loader
metadata. Modify tlb handling functions to take a tte, instead of virtual
address, physical address and flags.


91115 23-Feb-2002 jake

Add -ffreestanding to CFLAGS.


91114 23-Feb-2002 jake

Add make variables for fs support and propagate them to CFLAGS. Put
-ffreestanding in CFLAGS. Remove unnecessary LDFLAGS.


91113 23-Feb-2002 jake

Fix test for != 0 that should be > 0.


91112 23-Feb-2002 jake

Check the return values of index() and don't dereference it if its null;
the path may not have a ':' in it. The mac address property is called
mac-address for sparc64. Don't allocate a dma buffer for sparc64 either.


91111 23-Feb-2002 jake

#if 0 more bootinfo stuff.


91110 23-Feb-2002 jake

Fix fs support ifdefs. Add tftp support. Add physical and virtual
watchpoint support for debugging (under LOADER_DEBUG). Claim the
physical and virtual addresses used to map the kernel from the prom;
we map it ourselves behind the scenes though. Add a reboot command.

Submitted by: tmm


91109 23-Feb-2002 jake

Allocate a frame on our initial stack so that it doesn't run off into
random memory. Disable interrupts while loading the tlb.

Submitted by: tmm


91108 23-Feb-2002 jake

Add OF_claim_virt() and OF_release_phys().

Submitted by: tmm


91107 23-Feb-2002 jake

Include <machine/metadata.h>.


91008 21-Feb-2002 davidc

Document the hw.physmem kernel environment variable.

Reviewed by: alfred


90703 15-Feb-2002 robert

- Remove unneeded variable.
- Remove change for my local configuration that slipped in with
the last commit; I am having problems booting when multiple SCSI
disks are attached, so I will change this part as soon as I find
a solution, anyway.


90701 15-Feb-2002 robert

This file is now unneeded.


90700 15-Feb-2002 robert

- Do not include a NetBSD header as it is not needed anymore.
- Remove two constants that were needed in conjuction with the
NetBSD disklabel header. Use the FreeBSD equivalents.
To boot from NetBSD/sparc64 partitions, define LABELOFFSET to
be 128.
- Do not use the complete open firmware path to filter out cdrom drives.
No path containing "cdrom" is detected as a disk now.
- Simplify some code.


90699 15-Feb-2002 robert

Add the FreeBSD/sparc64 bootblock and its make file.


90063 01-Feb-2002 nyan

Expand COMBRD(x) macro.


89699 23-Jan-2002 sobomax

CG hard sentence breaks.

Submitted by: ru


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


89519 18-Jan-2002 iedowse

Cut more than 500 bytes off the size of the alpha boot1 by adding
a simple version of bcopy() so we avoid picking up the overly-complex
implementation in libc (via libstand). This is not necessary on
-current, but RELENG_4 has apparently just exceeded the 15-sector
limit for boot1.

Reviewed by: wilko


89495 18-Jan-2002 nyan

Added kgzldr for pc98.
crt.s is based on btx.s.


89481 17-Jan-2002 iedowse

Oops, the previous revision (1.35) broke booting from floppies
because the buffers we use could end up spanning a 64k boundary.
Unfortunately it causes too much bloat (228 -> 72 bytes free) to
just reinstate the old malloc() function.

Instead, define a structure that contains all 4 buffers which must
not cross 64k boundaries. We allocate a 64k-aligned instance in
main() using the magic that was in the old boot2 malloc() function.
This brings the free space down to 168 bytes, but that is still
better than it was before revision 1.35 (136 bytes).

Reported by: Mike Brancato <funnyguy@digitalsmackdown.net>
Pointy-hat to: iedowse


89368 14-Jan-2002 iedowse

Make the i386 boot2 fully blocksize-agnostic, as has already been
done with boot1 on the alpha. We use 4k buffers regardless of the
actual filesystem block size.

Remove the simple malloc() implementation, as it is no longer used.


89265 11-Jan-2002 iedowse

Make the alpha boot1 work on filesystems that have a block size
larger than 8k. We now use 4k buffers regardless of the filesystem
block size, so there is no longer a static limit.

Simply increasing the buffer size from 8k to 16k as done on the
i386 doesn't work on the alpha, probably because it causes us
to overshoot boot1's 48k runtime memory limit.

Tested by: naddy


89242 11-Jan-2002 jhb

Catch the netboot version up to the main loader. This is pretty bogus.
All the alpha loaders should use the same version file. Also, we might
should merge the various loaders (cdboot, loader, netboot) into one loader
that can boot off of disks, CD's, and network devices. The version bump
is needed so the FICL scripts won't bomb out thinking that the netboot
binary is too old.


89240 10-Jan-2002 jhb

Unrevert revision 1.12. Revision 1.14 backed this out saying it was
backing out the 1024 sector boot0, but revision 1.12 had nothing to do with
that. Instead, it documented various compile time options for boot0 and
allowed them to be overridden via make.conf or options on the make
command line.


89154 09-Jan-2002 iedowse

Increase BSIZEMAX from 8k to 16k, so that we can reliably boot from
filesystems with 16k blocks.


88874 04-Jan-2002 jhb

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


88597 28-Dec-2001 robert

Avoid having the text and data sections merged into one program
header table entry by removing the -N flag from the LDFLAGS.


88253 20-Dec-2001 jim

Add missing snd_ich_load entry.

Noticed by: will
MFC after: 2 days


87855 14-Dec-2001 ru

mdoc(7) police: remove hard sentence break which I didn't
submit to Jonathan Mini.


87734 12-Dec-2001 nyan

MFi386: revision 1.35 (Add support for writing to BIOS disks)


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.


87634 11-Dec-2001 jhb

Add support for writing blocks to the loader's disk cache.

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


87633 11-Dec-2001 jhb

Add support for writing to BIOS disks.

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


87620 10-Dec-2001 guido

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

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


87599 10-Dec-2001 obrien

Update to C99, s/__FUNCTION__/__func__/,
also don't use ANSI string concatenation.


87505 07-Dec-2001 rwatson

o Expand list of tunables documented in loader.8 to include kern.maxusers,
since other related tunables were also documented here. Add a cross
reference to tuning(7) for information on setting this value
appropriately.


87344 04-Dec-2001 des

The entry for the 'set' command no longer has a list of variables.

PR: 32454
Submitted by: Gary W. Swearingen <swear@blarg.net>
MFC after: 3 days


87265 03-Dec-2001 dcs

Remove unused filed.

PR: kern/32395
Submitted by: Jonathan Mini <mini@haikugeek.com>


87261 03-Dec-2001 murray

Fix typo.

PR: 32455
Submitted by: "Gary W. Swearingen" <swear@blarg.net>


87058 28-Nov-2001 dcs

Waits for a keypress before rebooting on panic.

PR: kern/32351
Submitted by: Jonathan Mini <mini@haikugeek.com>
MFC after: 1 week


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.


86753 21-Nov-2001 jhb

Bump the CD boot loader up to 1.1 so that the FICL upgrade a while back
will not fail thinking that the loader version is stale. This lets us
use the Forth code on the CD now.


86608 19-Nov-2001 obrien

Upper case the FreeBSD loader prompt.
On OFW based machines, it is just too confusing having the firmware and
OS loader giving the same prompt. This is a nice compromise that 99% of the
users on non-OFW platforms will probably not even notice.


86588 19-Nov-2001 peter

Lookup the EFI_FPSWA driver and pass the interface pointer through to the
kernel before we call ExitBootServices(). I've typed the definitions
in efifpswa.h from the Intel FPSWA manual (urk).


86586 19-Nov-2001 peter

Remove bootinfo.bi_kernel. It isn't used by the kernel. struct bootinfo
should go away on ia64, we should be loader metadata based since that is
the only way we can boot (loader, skiload).


86585 19-Nov-2001 peter

Fix a dependency violation, same as in libefi/elf_freebsd.c a while back.


86584 19-Nov-2001 peter

This is used in C, not C++. functions with no args have func(void) in our
kernel.


86497 17-Nov-2001 nyan

MFi386: revisions from 1.26 to 1.30.


86496 17-Nov-2001 nyan

MFi386: revision 1.12


86469 16-Nov-2001 iedowse

Fix a number of misspellings of "dependency" and "dependencies" in
comments and function names.

PR: kern/8589
Submitted by: Rajesh Vaidheeswarran <rv@fore.com>


86168 07-Nov-2001 fenner

Initialize first to -1; this will create a (nearly) empty file on failure,
instead of looping until the disk is full. This kind of failure can
especially happen when a version of awk that doesn't support POSIX
character classes is used.

Submitted by: David Wolfskill <david@catwhisker.org>


86164 07-Nov-2001 jhb

Remove a few more debugging bits and turn on twiddle output while reading
from the CD. This turns off the dual console output to COM1.


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.


86131 06-Nov-2001 nyan

MFi386: sys/boot/i386/loader/main.c revision 1.25


86130 06-Nov-2001 nyan

MFi386: sys/boot/i386/libi386/Makefile revision 1.21


86094 05-Nov-2001 jhb

- If we are booted via cdboot, use bc_add() to instantiate the cd0 device
from the loader.
- Cleanup extract_currdev() some and add support for setting the currdev
to cd0 when booted via cdboot.


86093 05-Nov-2001 jhb

Hook up the bioscd driver and the cd9660 filesystem.


86091 05-Nov-2001 jhb

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


86090 05-Nov-2001 jhb

Add a DEVT_CD type for CD drivers.


86001 04-Nov-2001 jhb

Trim all the extra debugging output including hexdumps, debug messages,
etc. The only bit of debugging left is performing dual output to both
the screen and COM1. Also, the twiddle is still disabled since it seems
to do weird things to the serial dump. cdboot now has 880 bytes to spare.


86000 04-Nov-2001 jhb

Axe the old cdldr.


85999 04-Nov-2001 jhb

Use the new cdboot instead of cdldr.


85998 04-Nov-2001 jhb

This is a new CD bootstrap utility designed to replace cdldr. According
to the El Torito standard for CD booting, a CD may boot in "No emulation"
mode without using a floppy image. In this mode, the BIOS loads a program
off of the CD into memory and creates a BIOS device using 2048 byte sectors
for the CD. According to the standard, this program can be up to 0xFFFF
virtual (512-byte) sectors long. The old cdldr depended on this by having
the BIOS load the entire loader and the small cdldr stub as one binary
similar to pxeboot so that cdldr didn't have to read the CD to find the
loader. However, the NT no emulation loader just uses 1 disk sector
(4 virtual sectors), so it seems that at least some BIOS writers just did
enough to get NT to boot by only loading 1 sector and ignoring the sector
count. Thus, while cdldr should have worked in theory, it doesn't in
practice. This replacment fits entirely in 1 sector and includes simple
ISO 9660 support. It looks for /boot/loader on the CD and loads it up
using the BIOS. This allows us to not have to depend on the limited size
of floppy images but use a full GENERIC kernel for CD-ROM installs in the
future, among other things.

This version of cdboot is a bit bloated as it includes some useful
debugging routines that people can pull to use in other x86 assembly
modules. Even with all the debugging cruft, we still have 272 bytes to
spare.


85997 04-Nov-2001 jhb

Print out 'foo devices:' as the line before displaying a group of
devices in 'lsdev' output rather than printing out a pointer to the
print function since the user really could care less about the pointer
value. Perhaps this was intended to be a debugging printf?


85995 03-Nov-2001 jhb

Whoops, missed these bits in the previous commit.


85994 03-Nov-2001 jhb

Add support for sending messages to the serial console which is helpful
when debugging boot problems. It is not on by default but is enabled via
the BTX_SERIAL variable. The port and speed can be set via the same
variables used by boot2 and the loader.


85993 03-Nov-2001 jhb

Add support for outputting multiple lines when dumping memory during the
register dump. Change the default to bump 2 lines of output (32 bytes)
instead of 1 line (16 byte).


85990 03-Nov-2001 jhb

Add support for trace traps by returning from them just as for breakpoint
traps rather than halting. Ideally, we should avoid printing the
'BTX halted' message for debug register dumps.


85989 03-Nov-2001 jhb

Output a newline at the end of a dump so that there are blank lines between
dumps when using breakpoints or tracing.


85935 03-Nov-2001 obrien

Revert rev 1.3 which moved us away from POSIX character classes.
The community feels our base AWK must handle them.


85934 03-Nov-2001 obrien

Revert rev 1.7 which moved us away from POSIX character classes.
The community feels our base AWK must handle them.


85892 02-Nov-2001 mike

o Add new header <sys/stdint.h>.
o Make <stdint.h> a symbolic link to <sys/stdint.h>.
o Move most of <sys/inttypes.h> into <sys/stdint.h>, as per C99.
o Remove <sys/inttypes.h>.
o Adjust includes in sys/types.h and boot/efi/include/ia64/efibind.h
to reflect new location of integer types in <sys/stdint.h>.
o Remove previously symbolicly linked <inttypes.h>, instead create a
new file.
o Add MD headers <machine/_inttypes.h> from NetBSD.
o Include <sys/stdint.h> in <inttypes.h>, as required by C99; and
include <machine/_inttypes.h> in <inttypes.h>, to fill in the
remaining requirements for <inttypes.h>.
o Add additional integer types in <machine/ansi.h> and
<machine/limits.h> which are included via <sys/stdint.h>.

Partially obtain from: NetBSD
Tested on: alpha, i386
Discussed on: freebsd-standards@bostonradio.org
Reviewed by: bde, fenner, obrien, wollman


85875 02-Nov-2001 nyan

Fixed sioreg.h path.


85842 01-Nov-2001 obrien

Substitute "[:space:]" with the character constants it expands to.
This was a silent 'failure' when using Bell-Labs awk.

Submitted by: David Wolfskill <david@catwhisker.org>


85808 01-Nov-2001 obrien

Bell-Labs AWK does not support POSIX "bracket expressions" (POSIXese for
"character classes", basically). So change them to their character
representation.

Submitted by: David Wolfskill <david@catwhisker.org>


85805 01-Nov-2001 peter

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

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


85720 30-Oct-2001 jake

Add code to copy the enironment and loader metadata into kernel space.


85719 30-Oct-2001 jake

Add definitions for network support, doesn't work yet.
Pass the right arguments to the kernel.
Replace magic numbers with symbolic constants.
Pass the real openfirmware entry point to OF_init.


85718 30-Oct-2001 jake

Use ENTRY() for defining functions in asm.
Remove asm functions to call the openfirmware and kernel entry points;
we can just call them directly.
Don't use the stack pointer for an intermediate result in setx.
Put the stack in the bss.


85717 30-Oct-2001 jake

Make the openfirmware entry point function pointer non-static so that it
can be passed to the kernel.


85652 29-Oct-2001 marcel

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


85477 25-Oct-2001 ru

Just use ${MACHINE}, it's already special-casing pc98.


85476 25-Oct-2001 dfr

Call ExitBootServices and disable interrupts before we start hacking
the VM registers. This ought to make things slightly more reliable here.


85475 25-Oct-2001 dfr

Add the two sections used for PLT entries to the text and sdata sections
respectively. This makes IPLTLSB relocations work properly (these are
generated for weak symbols, particularly for _longjmp).


85436 24-Oct-2001 dfr

Try to get the self-relocator to work with IPLTLSB relocations. Doesn't
work right though - I can't figure out why.


85376 23-Oct-2001 jlemon

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


85374 23-Oct-2001 jlemon

Allow the RBX_DUAL flag to appear in bootinfo.


85065 17-Oct-2001 nyan

Use a array to convert from a attribute for AT to one for PC98.
(merged from sys/pc98/pc98/scvtbpc98.c)


85063 17-Oct-2001 nyan

Merged from sys/boot/i386/libi386/vidconsole.c revisions 1.16, 1.17 and 1.18.


85061 17-Oct-2001 nyan

fix style(9)


85060 17-Oct-2001 nyan

Merged from sys/boot/i386/loader/Makefile revision 1.54.


84998 15-Oct-2001 robert

Add a prototype for OF_alloc_phys.


84997 15-Oct-2001 robert

Fix some warnings.


84996 15-Oct-2001 robert

Add the FreeBSD/sparc64 boot loader source files.


84975 15-Oct-2001 robert

Make the ofw_reg structure and ofw_alloc_heap 64-bit save.


84974 15-Oct-2001 robert

Add a Makefile for the sparc64 boot loader.


84973 15-Oct-2001 robert

Do not include openfirm.h; it is now included by libofw.h.


84972 15-Oct-2001 robert

- Use the cell_t type definition for Open Firmware arguments in
combination with requisite casts as this avoids fatal side
effects on 64-bit architectures.
- Add the OF_alloc_phys function.


84970 15-Oct-2001 robert

- Fill dummy functions with code to read from disk using Open
Firmware.
- Add a temporary disklabel header to boot off a NetBSD/sparc64
partition. This file can be deleted when we have got a FCode
bootblock.

The disklabel header was obtained from NetBSD.


84969 15-Oct-2001 robert

- Include openfirm.h for phandle_t.
- Add some necessary members to the ofwdisk structure.
- Add a prototype for ofw_parseofwdev.


84968 15-Oct-2001 robert

Add a function for parsing an Open Firmware boot path into the
ofw_devdesc structure.


84967 15-Oct-2001 robert

- Add an ifdef guard.
- Use unsigned types for the (32-bit) Open Firmware device handles
to avoid sign extension on 64-bit architectures.
- Add a standard type definition for Open Firmware arguments.


84802 11-Oct-2001 dfr

Fix typo in comment.


84644 08-Oct-2001 marcel

s/alpha/${MACHINE_ARCH}/g


84620 07-Oct-2001 benno

Whitespace fixes.


84619 07-Oct-2001 benno

Add new files needed by previous commit.


84617 07-Oct-2001 benno

Mega-patch for OpenFirmware loader support.

- Flesh out ofw_readin routine.
- Add OpenFirmware load and exec routines.
- Make sure memory allocation for the kernel is done correctly.
- Change the way the heap is allocated so as to make it easier to deallocate
when we hand over.
- Add a command to print memory maps similar to the one for ia64.

With this patch, I can now load and hand over to a kernel on my iMac. There
are some problems with OpenFirmware routines failing after the hand over that
still need to be addressed.


84461 04-Oct-2001 jhb

Whitespace fixes.


84371 02-Oct-2001 yokota

Fix the ANSI color escape sequence \E[m.

- Corretly map the ansi color number to a PC BIOS color.
- Handle multiple arguments to the escape sequence.


84354 02-Oct-2001 yokota

Fix the local macro: isvisible().

- The space char (0x20) IS a visible char :-)


84337 01-Oct-2001 silby

grammar fix: to -> too


84277 01-Oct-2001 yokota

Fix the function CD(): "Clear to the end of the screen".

- When the video BIOS is called to clear the region (x, y)-(79, 24)
(by scrolling), the slashed region in Fig.1 is cleared. CD() is
supposed to clear the region shown in Fig.2.
x x
+-------+ +-------+
| | | |
y| ////| y| ////|
| ////| |///////|
| ////| |///////|
+-------+ +-------+
Fig.1 Fig.2

- Don't move the cursor during this operation.


84276 01-Oct-2001 yokota

This is white-space only change. No functional difference.

- Be consistent about placing spaces around keywords and
operators; don't mix statements like "if(A==B)" and "if (X == Y)",
"return(0)" and "return (-1)", "P=10" and "Q = 0", etc.

- Consitently indent lines. It's not good to indent by 8 columns
in one part of the file, and by 4 columns in the other part.


83948 26-Sep-2001 peter

Make this 'make obj' safe


83939 25-Sep-2001 dfr

Calculate the valid flag for ITRs and DTRs correctly. Also fix a couple
of minor problems and remove some debugging code.


83904 24-Sep-2001 dfr

Add commands to dump the itrs and dtrs.


83903 24-Sep-2001 dfr

Return the mapkey which EFI gave us when we read the memory map - we need
it to call ExitBootServices.


83902 24-Sep-2001 dfr

Tidy up a little - don't try to print anything or enable interrupts after
we start changing translation registers. Also, call ExitBootServices
before we jump into the kernel.


83901 24-Sep-2001 dfr

Pick up pal.s from the kernel sources.


83857 23-Sep-2001 dfr

Add commands to dump the configuration tables and the SAL System Table.


83829 22-Sep-2001 dfr

Add EFI network support.


83828 22-Sep-2001 dfr

* Flesh out elf_exec and bootinfo.
* Add EFI network support.


83825 22-Sep-2001 dfr

Add getsecs() for the libstand network code.


83824 22-Sep-2001 dfr

Add a twiddle meter when reading from files. Gives me something to look
at when a kernel is loading from a floppy.


83710 20-Sep-2001 dfr

Add definition of SSC_GET_RTC.


83666 19-Sep-2001 dfr

Implement time().


83616 18-Sep-2001 sobomax

Add support for loading bzip2-compressed kernels and modules. This support
is turned off by default and could be enabled by defining LOADER_BZIP2_SUPPORT
make variable. Also make gzip support optional (turned on by default) -
it could be turned off via LOADER_NO_GZIP_SUPPORT make variable.

Please note, that due to limit on the amount of memory available to the
loader(8), it is possible to load modules/kernels compressed with the smallest
block size supported by the bzip2 - 100k (`-1' bzip2(1) option), however
even in this mode bzip2(1) usually provides better compression ratio than
gzip(1) in its best compression mode.

MFC after: 1 month


83532 16-Sep-2001 nyan

MFi386: sys/boot/i386/loader/main.c revision 1.24.


83531 16-Sep-2001 nyan

MFi386: sys/boot/i386/libi386/Makefile revision 1.20.


83521 15-Sep-2001 dfr

Add a fake memory descriptor for the I/O port space.


83502 15-Sep-2001 dfr

Fill in the bootinfo's memory map.


83498 15-Sep-2001 dfr

Remove dead code.


83439 14-Sep-2001 dfr

Plug in ELF backend.


83438 14-Sep-2001 dfr

Add ELF backend to the build.


83437 14-Sep-2001 dfr

Make this do the right thing (mostly). We should still reserve the pages
that the kernel loads into using the EFI AllocatePages call.


83408 13-Sep-2001 dfr

Update code which creates bootinfo.


83370 12-Sep-2001 dfr

A command file for SKI which runs the loader up to the first instruction
of the loaded kernel.


83368 12-Sep-2001 ru

Create backup copies using install(1).


83365 12-Sep-2001 dfr

Build ficl on all architectures.


83364 12-Sep-2001 dfr

Add a version of the loader which runs under SKI, the HP ia64 simulator.
This loader is quite functional and can load and run kernels. The kernels
don't quite work right after loading but that should be easily fixable.


83321 11-Sep-2001 peter

Implement the long-awaited module->file cache database. A userland
tool (kldxref(8)) keeps a cache of what modules and versions are inside
what .ko files. I have tested this on both Alpha and i386.

Submitted by: bp


83216 08-Sep-2001 dfr

Add missing entry to memory type name table and adjust field widths.


83215 08-Sep-2001 dfr

Add a command 'memmap' to print out the EFI memory map.


83193 07-Sep-2001 dfr

Hook up the native EFI filesystem reader.


83192 07-Sep-2001 dfr

Set currdev and loaddev variables.


83191 07-Sep-2001 dfr

Add a libstand filesystem for accessing EFI native filesystems.


83190 07-Sep-2001 dfr

Reformat.


83078 05-Sep-2001 dfr

Merge linker set relocations with the rest.


82965 04-Sep-2001 dfr

Enable bootforth.


82960 04-Sep-2001 dfr

Avoid an alignment fault on 64bit architectures.

Reviewed by: dcs


82942 04-Sep-2001 dfr

Make sure we copy over the linker set sections to the EFI executable.


82941 04-Sep-2001 dfr

Add definition for arch-ia64.


82940 04-Sep-2001 dfr

Add ia64 system dependancies.


82645 31-Aug-2001 bde

Don't clobber the default for CFLAGS.

Reviewed by: dfr


82542 30-Aug-2001 msmith

Mention that the ACPI module load can be disabled by unsetting $acpi_load


82531 30-Aug-2001 msmith

Teach the loader how to find the system ACPI information, and autoload
the ACPI module if the system apperars to be ACPI compliant.

This is an initial cut; the load should really be done by Forth support
code, and we should check both the BIOS build date and a blacklist.


82343 26-Aug-2001 benno

Pass NULL instead of MAXPHYS to the DMA allocation method. Be a bit more
verbose if we fail to allocate the DMA buffer.


82133 22-Aug-2001 peter

OK, now I am scared of pxeldr. It had /boot/loader appended onto
the end of it and decoded the headers.

Submitted by: jhb


82128 22-Aug-2001 peter

Generate an ELF /boot/loader instead of fake a.out. The fake a.out wrapper
did not work with old a.out-only bootblocks anyway. :-(


81955 20-Aug-2001 ru

mdoc(7) police: markup nits.


81933 20-Aug-2001 dillon

Limit the amount of KVM reserved for the buffer cache and for swap-meta
information. The default limits only effect machines with > 1GB of ram
and can be overriden with two new kernel conf variables VM_SWZONE_SIZE_MAX
and VM_BCACHE_SIZE_MAX, or with loader variables kern.maxswzone and
kern.maxbcache. This has the effect of leaving more KVM available for
sizing NMBCLUSTERS and 'maxusers' and should avoid tripups where a sysad
adds memory to a machine and then sees the kernel panic on boot due to
running out of KVM.

Also change the default swap-meta auto-sizing calculation to allocate half
of what it was previously allocating. The prior defaults were way too high.
Note that we cannot afford to run out of swap-meta structures so we still
stay somewhat conservative here.


81588 13-Aug-2001 ru

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


81488 10-Aug-2001 obrien

Style cleanup.


81462 10-Aug-2001 ru

mdoc(7) police: join split punctuation to macro calls.


81367 09-Aug-2001 mp

Allow for text section alignment to properly align the "end" symbol at the
actual end of the section. The new gas (binutils) puts in additional padding
which was misaligning the concatenated btx loader.

Reported by: Oliver Hartmann <ohartman@klima.physik.uni-mainz.de>,
Harti Brandt <brandt@fokus.gmd.de>
Tested by: Oliver Hartmann <ohartman@klima.physik.uni-mainz.de>,
David Wolfskill <dhw@whistle.com>, ps
Reviewed by: jhb
MFC after: 1 day


81363 09-Aug-2001 jhb

Trim trailing whitespace.


80751 31-Jul-2001 jhb

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

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


80203 23-Jul-2001 kris

s/adress/address/

Inspired by: OpenBSD
MFC After: 1 week


80084 21-Jul-2001 rnordier

Unset MAINTAINER.


79757 15-Jul-2001 dd

Remove whitespace at EOL.


79540 10-Jul-2001 dfr

Make this build again after breakage from previous commits.


79454 09-Jul-2001 dd

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


78696 24-Jun-2001 dwmalone

Get rid of some constness warnings.


78650 23-Jun-2001 kato

Merged from sys/boot/i386/btx/btx/btx.s revision 1.25.


78522 21-Jun-2001 peter

Remove -DNEW_LINKERSET, it is not used here anymore. This is now native.


78465 19-Jun-2001 peter

Convert the elf loader to the new linker set layout for elf files.
This should make dependencies at load time work like before. Oops.

Noticed by: markm


78463 19-Jun-2001 peter

Fix some of the worst formatting bug (seperate commit)


78335 16-Jun-2001 peter

Work around what looks like a bad make(1) bug. For some reason,
make(1) wants to build loader.sym *before* the .o files. Eliminating
one seeminly intermediate step avoids the problem. Somehow, it seems
that variables are not getting expanded at the right time.
Any explanations would be appreciated...

Changing:
${BASE}.sym: ${OBJS} ${LIBSTAND} ${LIBFICL} ${LIBALPHA} ${CRT} vers.o
${LD} ...
To:
BASEOBJS= ${OBJS} ${LIBSTAND} ${LIBFICL} ${LIBALPHA} ${CRT} vers.o

${BASE}.sym: ${BASEOBJS}
echo ${BASEOBJS}
${LD} ...
.. the echo only shows LIBFICL, CRT and vers.o. ${OBJS} is not included.


78332 16-Jun-2001 obrien

style(9) and remove a left over Alpha comment


78331 16-Jun-2001 obrien

style cleanup


78329 16-Jun-2001 obrien

style police


78328 16-Jun-2001 obrien

This Intel derived file uses C++ style comments.
(I'll be we know which compiler and platform they developed this on...)
Minimally change them to C89 comments to make GCC happy. (this is kinda funny
as the file has piece derived from FreeBDS 3.2)

Also fix FreeBSD id style.


78327 16-Jun-2001 obrien

Fix FreeBSD id style.


78326 16-Jun-2001 obrien

style(9)


78320 16-Jun-2001 obrien

style(9) + fix FreeBSD id's.


78195 14-Jun-2001 peter

Nuke old gensetdefs based linker sets with extreme prejudice


77979 10-Jun-2001 dfr

Move the first section up one page. The firmware bogusly uses the first
page of the image to load section headers and if we let the text section
start at zero, it corrupts the section table when its loaded. With this
change, the loader gets as far as the 'ok' prompt.


77978 10-Jun-2001 dfr

Remove a 'return' statement which I put in while I was trying to debug
the startup code.


77971 10-Jun-2001 jesper

Fix a minor style bug in the last commit.

Submitted by: Adrian Steinmann <ast@marabu.ch>
MFC after: 2 days


77943 09-Jun-2001 dfr

First approximation of an ia64 EFI loader. Not functional.


77575 01-Jun-2001 ru

Remove vestiges of MFS.


77444 29-May-2001 dcs

Go back to 1.20 again.


77443 29-May-2001 dcs

Turn dictthreshold and dictincrease into cell-sized variables, so
they can be used with cell operators like !.

As I did this, I noticed the whole CELL thing might have problems with
big endian architectures with sizeof(int)!=sizeof(void*).


77377 29-May-2001 obrien

Revert the ugly band-aide[tm] hack of rev 1.12.
The offending loader.4th commit (rev 1.20) has been backed out.


77376 29-May-2001 dcs

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


77327 28-May-2001 obrien

One needs to introduce things with a `.file' directive before trying to
do a .loc on it. BTW, the .loc needs to be in a .text section.
gas 2.11.0 catches these oversights where previous versions did not.


77297 28-May-2001 obrien

grep -v offending lines from loader.4th until the master version of it
is fixed.


77295 28-May-2001 obrien

Add the generated help files to CLEANDIRS.

Found by: rm -rf /usr/obj/usr/src/sys/boot ; make ; make clean ; cvs -q up


77285 27-May-2001 jesper

In sys/boot/common/module.c, near line 105 a request for a raw
file is processed by passing its name in argv[1]:
return(mod_loadobj(typestr, argv[1]));
however, it is not tested to see if argv[1] actually is defined.

At best, mod_loadobj() near line 244 returns an error like
"can't find 'garbage'" but if the "filename" entered is sufficiently
long, some buffer gets overrun. Of course, "load -t filename" is
actually a typo because we meant to type "load -t mfs_root filename";
nevertheless, a hung machine seems like too harsh a punishment for
such a small typo...

PR: i386/27693
Submitted by: Adrian Steinmann <ast@marabu.ch>
MFC after: 1 week


77273 27-May-2001 rnordier

Fix reboot buglet when BOOT_BTX_NOHANG is defined.

Submitted by: Umesh Krishnaswamy <umesh@juniper.net>


77268 27-May-2001 dcs

As in with ":", check dictionary space and increase it if necessary before
"create".


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


77125 24-May-2001 nyan

(Re-)enabled boot2.


77124 24-May-2001 nyan

Update boot[12] program to compile ELF binary.

Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp> and
kawanobe@st.rim.or.jp (Kawanobe Koh)


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>


76927 21-May-2001 nyan

Merged from sys/boot/i386/btx/btx/btx.s revision 1.24.


76714 17-May-2001 dcs

Allocate more memory if necessary.


76421 10-May-2001 dcs

FICL 2.05 has a flawed definition of BASE. Fix it.

Spotted by: Peter Jeremy <peter.jeremy@alcatel.com.au>


76224 02-May-2001 obrien

* include/elf.h has been repo copied to include/elf-hints.h, and it no
longer includes machine/elf.h.
* consumers of elf.h now use the minimalist elf header possible.

This change is motivated by Binutils 2.11.0 and too much clashing over
our base elf headers and the Binutils elf headers.


76116 29-Apr-2001 dcs

Bring in ficl 2.05.

This version has a step debugger, which now completely replaces the
old trace feature. Also, we moved all of the FreeBSD-specific MI
code to loader.c, reducing the diff between this and the official
FICL distribution.


75659 18-Apr-2001 ru

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


75300 08-Apr-2001 gallatin

no longer needed now that we are able to build cdboot from sources again


75299 07-Apr-2001 gallatin

build cdboot from sources now that the cd9660 fs support works
MFC candidate


75230 05-Apr-2001 dfr

Don't call prom_open() multiple times. This confuses some versions of SRM
and makes it impossible to boot from floppy and CD on some AlphaServer
platforms.

Detective work by: Michael Richards <michael@fastmail.ca>


74850 27-Mar-2001 ru

MAN[1-9] -> MAN.


74798 25-Mar-2001 obrien

Turn off building the ARC loader. I don't know of anyone currently working
on advancing this WIP.


74592 21-Mar-2001 jhb

Always disable paging when exiting back to real mode after receiving a
fatal trap. Also, reload the GDT register to point to BTX's GDT before
playing around with the segment registers to return to real mode. This is
helpful if the kernel causes a fatal exception before it has setup its own
IDT and fault handlers. For example, if one happens to break mtx_init().
Without these changes BTX would recursively page fault (if paging was not
disabled) or triple fault and reset the CPU (without the GDT reload)
instead of providing a potentially useful register dump.

Reviewed by: rnordier


74265 14-Mar-2001 ps

Don't set the gateway address if the netmask is zero or we're on
the same network. PXE does not do netmask calculations, so if the
gateway is set it will use it.

Submitted by: peter & FreeBSD cluster ACLs


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.


73403 04-Mar-2001 obrien

Fix whitespace.


73349 02-Mar-2001 ru

setlocale(3) has been fixed to match POSIX standard:
LC_ALL takes precedence over other LC_* envariables.


73233 28-Feb-2001 ru

Eliminate mdocNG warnings caused by misplaced or extraneous macro calls.


72879 22-Feb-2001 dcs

Whenever the user might be offered a chance to quit through
pager_output(), respect that choice.

PR: 15747


72640 18-Feb-2001 asmodai

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


72091 06-Feb-2001 asmodai

Fix typo: seperate -> separate.

Seperate does not exist in the english language.


71897 01-Feb-2001 des

Add atspeaker_load.


71895 01-Feb-2001 ru

mdoc(7) police: split punctuation characters + misc fixes.


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.


70519 30-Dec-2000 phk

Use <sys/queue.h> macro API.

Submitted by: "Jason" <jsmethers@pdq.net>
Reviewed by: /sbin/md5


70426 28-Dec-2000 des

Retire kernfs (kernel part).


70405 27-Dec-2000 ru

Prepare for mdoc(7)NG.


70333 24-Dec-2000 kato

Disabled boot2 for the moment, because it needs aout tools.


70177 19-Dec-2000 rnordier

Fix column alignment (whitespace-only change).


70082 16-Dec-2000 kato

Merged from sys/boot/i386/loader/Makefile revision 1.49.


70020 14-Dec-2000 ru

mdoc(7) police: removed duplicate .Os call.


69985 13-Dec-2000 rnordier

Strip the .comment and .note sections when stripping. There's no
point in retaining this info, particularly under BTX.


69921 12-Dec-2000 rnordier

Add a magic number, for easier identification of boot0. At present,
this is used only by libdisk.


69738 08-Dec-2000 marcel

Add "empty" makefile. Cross-building fails without it.


69430 01-Dec-2000 ache

Cosmetique: don't use localized `date`


69395 30-Nov-2000 jhb

Set the proper bit in the howto flags for a serial console rather than
setting the index of the bit. (0xc vs. 0x1000)


69391 30-Nov-2000 ps

Add support for probing the keyboard from pxeboot which will behave
exactly the same as passing -P to boot2.

Submitted by: jhb


69242 27-Nov-2000 obrien

`cdboot' is broken as it cannot load a kernel.
The release engineer keeps using the wrong /boot/cdboot when creating the
ISO images. So we'll add the 4.0-RELEASE cdboot to the tree until someone
bothers to fix the source so a working `cdboot' is built.


69027 22-Nov-2000 ru

mdoc(7) police: do not split author names in the AUTHORS section.


68961 20-Nov-2000 ru

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


68854 17-Nov-2000 ru

mdoc(7) police: use certified section headers wherever possible.


68851 17-Nov-2000 msmith

The default kernel filename is "kernel" again, not "kernel.ko".

Submitted by: mckusick


68755 15-Nov-2000 ben

remove period from SEE ALSO.


68729 14-Nov-2000 obrien

Don't use the Gawkism strftime(). Pass in the date stamp on the awk
command line instead.

Approved by: dcs


68716 14-Nov-2000 ru

Use Fx macro wherever possible.


68713 14-Nov-2000 mjacob

init booted_kernel from environment kernelname (if there)


68712 14-Nov-2000 mjacob

move init of booted_kernel to bootinfo.c


68548 10-Nov-2000 benno

OpenFirmware/PowerPC loader, part 2.

As of this patchset, the loader builds (under NetBSD/macppc), boots, interacts
and talks to BOOTP/NFS servers.

(main.c was moved from boot/ofw/libofw to boot/ofw/common but has no revision
history)

Reviewed by: obrien


68547 10-Nov-2000 benno

Give the network device a print method.

Reviewed by: obrien


68546 10-Nov-2000 benno

OpenFirmware/PowerPC loader, part 2.
This brings the loader up to the point where I can compile it under
NetBSD/macppc and have it boot, interact and talk to NFS servers.

sys/boot/ofw/libofw/main.c has been deleted (it has no revision history) and
replaced with sys/boot/ofw/common/main.c

Reviewed by: obrien


68362 05-Nov-2000 ps

Honor the ip address given in the root-path dhcp option.

PR: 21743
Submitted by: Brian Candler <B.Candler@pobox.com>


68358 05-Nov-2000 nyan

Merged from the following changes.

sys/boot/i386/btx/btx/Makefile 1.9
sys/boot/i386/btx/btx/btx.s 1.23
sys/boot/i386/libi386/biosdisk.c 1.32 and 1.33
sys/boot/i386/libi386/biosmem.c 1.5
sys/boot/i386/libi386/comconsole.c 1.8
sys/boot/i386/libi386/gatea20.c 1.3
sys/boot/i386/libi386/time.c 1.4
sys/boot/i386/libi386/vidconsole.c 1.13
sys/boot/i386/loader/Makefile 1.48
sys/boot/i386/loader/main.c 1.22


68314 04-Nov-2000 rnordier

Support a.out: avoid (%dx) in in/out instructions, and use an m4
macro to supply underscores for externals.


68310 04-Nov-2000 ps

MF4: Add LOADER_TFTP_SUPPORT make.conf flag.


68264 02-Nov-2000 jhb

The Number of Fixed Disks at memory location 0x475 is only 1 byte, not a
2 byte word. This fixes machines that probe 30-odd hard drives during boot
in the loader.

Submitted by: Helpful folks at Tyan via ps


68136 01-Nov-2000 mph

"it's" --> "its" (possessive).

Correct a malformed sentence.


67955 30-Oct-2000 n_hibma

Add entry for umodem


67699 27-Oct-2000 dfr

Backout revision 1.7 which was a bad idea since it would force people
to reinstall boot1 after a 'make world'.

Unfortunately this means that people who have already installed a new
boot1 from a 'make world' after 2000/09/18 *must* reinstall it after
their next build using something like:

# disklabel -B /dev/da0c


67655 26-Oct-2000 obrien

Install the loader manpages.


67593 25-Oct-2000 dfr

Move the call to extend_heap() from main to start so that if our BSS
expands beyond the limit we will extend the address space before trying
to zero the BSS. This should give us plenty of headroom for modest
expansion of the loader.


67592 25-Oct-2000 dfr

Don't build start.S as part of libalpha.a - its built specially.


67591 25-Oct-2000 dfr

Don't indirect through a null pointer if we run out of kernel filenames.


67590 25-Oct-2000 dfr

Make a few functions inline to save space.


67562 25-Oct-2000 n_hibma

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


67227 16-Oct-2000 obrien

Convert from the Alpha compontents to PowerPC ones.


67204 16-Oct-2000 obrien

"Ok, my loader's now up to putting up a prompt. It probes disks partially
but can't boot from them yet."

Thanks to Stephane Potvin for the some of the code in this set.

Submitted by: Benno Rice <benno@jeamland.net>


67136 15-Oct-2000 nyan

Merged from sys/boot/i386/loader/main.c revision 1.21.


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


66556 02-Oct-2000 rnordier

Go back to occupying just a single sector, reverting r1.17 - r1.20.
Taking over the sector following the MBR causes problems on some
machines, and the actual gains are fairly small in terms of how
the space is presently used.

Since we need a number of further features (eg. handling extended
partitions) that can't be readily accommodated in the basic boot0
design anyway, rather choose to implement the additional stuff
separately and concentrate on compatibility rather than features
here.


66555 02-Oct-2000 rnordier

Set MAINTAINER.


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


66246 22-Sep-2000 kato

Merged from sys/boot/i386/loader/main.c revision 1.23.


66245 22-Sep-2000 kato

Merged from sys/boot/i386/libi386/Makefile revision 1.19.


66133 20-Sep-2000 archie

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

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


66046 18-Sep-2000 dcs

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

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


66027 18-Sep-2000 mjacob

Steal 512KB more from system memory for heap instead of 256KB. We died
without the extra space. What a pity.


66026 18-Sep-2000 mjacob

Run SECONDARY_LOAD_ADDRESS down to 0x2000a000- this still leaves
(barely) enough room for boot1 and gives us 8KB more to play with
in the loader.


66025 18-Sep-2000 mjacob

Make the stack 12K- we seem to need a bit more.
Rename 'stack' to 'stackbase' as this variable
more correctly denotes what it is.


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.


65940 16-Sep-2000 dcs

The default search path for kernel and modules was bogus. It makes no
sense for /boot/kernel to come last.


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...


65881 15-Sep-2000 dcs

Start countdown only _after_ the kernel was loaded. Not very fair otherwise.


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.


65698 10-Sep-2000 dfr

Fix this so that we actually define HAVE_PNP when its available.


65689 10-Sep-2000 markm

The entropy driver module has changed name.


65685 10-Sep-2000 dcs

Bump up version as a result of the recent changes to kernel path,
and boot-conf&boot semantic changes.

Also, make it 1.0.

Reminded by: peter (even though he doesn't know it)


65684 10-Sep-2000 dcs

Bump up version as a result of the recent changes to kernel path,
and boot-conf&boot semantic changes.

Reminded by: peter (even though he doesn't know it)


65683 10-Sep-2000 dcs

Change NOFORTH comment character from # to \ followed by space,
to make things more interchangeable between it and the FORTH case.

Perhaps requiring the space is a bit too much, but...

Nothing in the tree seems to produce loader.rc files with comment
line, at this time.


65677 10-Sep-2000 dfr

Only build PnP parts if the platform supports PnP.


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.


65640 09-Sep-2000 rnordier

Correct BSD/OS slice type.

PR: 21099
Submitted by: Alan Clegg <abc@bsdi.com>


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.


65617 08-Sep-2000 dcs

Add the infrastructure necessary to handle PnP from a Forth script.

Also, export the file_findfile() function. Again, this is taken from
work in progress but frozen for the time being. Since it works, I'd
rather commit and remove any uglyness later than hide it on my tree.


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.


65614 08-Sep-2000 dcs

Make the pnp structure a global variable, so it can be used elsewhere.


65613 08-Sep-2000 dcs

Fix autoboot. Now autoboot *always* show the correct kernel name. It
gets the name from the environment variable kernelname, which is set
when a kernel is loaded. For this reason, autoboot will _first_ try
to load a kernel, and only proceed with the wait prompt after that
succeeds. If it fails, it will abort immediately.

While I understand some may think this behavior undesirable, I think
it is, overall, the best thing to do, even if we do not consider the
aesthetic issue. Notice that anyone using the default loader.rc
already has the kernel loaded before autoboot.

On unload, unset kernelname.

Separate the code that tries to load a kernel from the list of options
to the function loadakernel(). It is used by both boot() and
autoboot().


65607 08-Sep-2000 kato

Merged from sys/boot/i386/loader/Makefile revision 1.47.


65598 08-Sep-2000 imp

Look for libstand in the built tree rather than in /usr/lib. This
likely could be done better, but the tree is broken and I wanted to
get a fix into the tree.

Reviewed by: msmith


65549 06-Sep-2000 obrien

With the committed changes to the loaders modules path code, the kernel
path does not need to be hard coded.


65502 05-Sep-2000 obrien

Fix the kernel default load from "/boot/modules" to "/boot/kernel".

Reported by: dcs


65501 05-Sep-2000 obrien

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


65499 05-Sep-2000 msmith

Fix a bug which prevents parsing this Makefile without having a
previously-built loader binary elsewhere.


65498 05-Sep-2000 msmith

Export the salient configuration items in a non-pxe-specific namespace
to allow commonality between varying platforms. This is a step
towards parsing the diskless configuration information with MI code
inside the kernel.

Export the interface hardware address to the kernel, so that it is possible
to determine the boot interface with certainty.

Export the NFS filehandle for the root mount to the kernel, so that the
kernel does not need to perform a mount RPC call.


65385 03-Sep-2000 obrien

This is real released software, let people think that.


65271 31-Aug-2000 kato

The INT 1B BIOS call is used to obtain geometries of SASI/IDE hard
drives. Some IDE cards don't set propler information into BIOS work
are and their sector size were always recognized as 256 bytes/sector.

Pointed out by: jagarl@creator.club.ne.jp


65063 24-Aug-2000 jhb

Add a new compile-time tweak to BTX. If you set the make(1) variable
BOOT_BTX_NOHANG, then BTX will be compiled with the appropriate flags so
that it reboots after a fault instead of hanging forever.

Requested by: ps
Approved by: rnordier


65042 24-Aug-2000 sheldonh

List loader.conf and friends in the FILES section.

Requested by: obrien


64660 15-Aug-2000 kato

Fixed determination method for sector size of the 2nd IDE HDD.


64553 12-Aug-2000 kato

Merged from sys/boot/i386/Makefile.inc revision 1.2.


64550 11-Aug-2000 peter

Add -mpreferred-stack-boundary=2 to CFLAGS for i386. This and libstand
reduces /boot/loader from 163840 bytes to 155648 and pxeboot from 165888
bytes to 157696 bytes.


64532 11-Aug-2000 dcs

Add missing "is".

PR: 20524
Submitted by: Peter Pentchev <roam@orbitel.bg>


64527 11-Aug-2000 ps

Add support to send the string 'PXEClient' as the Vendor class
identifier to the DHCP server. Now you can check for this string
in your dhcp configuration to decide whether you will hand out a
lease to the client or not.


64522 11-Aug-2000 ps

Pass along the interesting variables we were given from DHCP so we
can utilize them in the kernel and with kenv.


64385 08-Aug-2000 rnordier

Typo/spelling fixes.


64295 06-Aug-2000 kato

- Fixed missing initialization of current device number.
- Fixed comment.

Pointed out by: nyan


64260 04-Aug-2000 jhb

Argh! Fix a brainfart of mine. In the old boot0, we relocated ourself
to 0x600 via a 'rep movsw'. Once that was done, %cx was zero, so we could
simply use 'movb' to update the lower byte of %cx in preparation for
zeroing out the fake partition entry used to boot to other drives via F5.
Well, in the new boot0, we don't actually relocate ourselves, instead it
is easier to create the fake partition entry first and then just use it to
get the BIOS to load all of boot0 into memory at 0x600. However, since we
aren't doing the relocate code anymore, we don't know that %cx == 0 when
we hit the 'movb' to setup %cx for clearning the fake partition entry.
Thus, if %ch != 0 when the BIOS started boot0, then it would end up zeroing
a lot more memory than just 8 words. The solution is to do a word move of
$8 into %cx.

Debugging help from: David Wolfskill <dhw@whistle.com>


64230 04-Aug-2000 obrien

Fix this so it is a Makefile and not a shell script -- now issuing `make'
a second time does not rebuild the binary.


64221 04-Aug-2000 jhb

Fix some of the arcdisk devsw functions to catch up with warning fixes in
<stand.h>. Also, since bcache_strategy() used to not have a prototype,
arcdisk happily called bcache_strategy() with 6 parameters instead of 7,
leaving out the disk unit number, which is the 2nd parameter. Add in the
unit number to the bcache_strategy() call to fix this.


64220 04-Aug-2000 jhb

Bring back the perform() function. However, conditionionalize it on
BOOT_FORTH as it is only used if BOOT_FORTH is not defined.


64190 03-Aug-2000 kato

- Fixed %si (offset to partition table) in boot.
- Fixed comment.


64188 03-Aug-2000 jhb

Fix the more obvious warnings to deal with my earlier warning cleanups.


64187 03-Aug-2000 jhb

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


64186 03-Aug-2000 jhb

Fix several BDECFLAGS warnings. Also, actually use the 'verbose' parameter
for lsdev when printing out slice information. Now, you only get the
sizes and LBA's of slices if you use 'lsdev -v'.


64183 03-Aug-2000 kato

- Fixed pointer to the partition table in the buffer.
- Use shift by %cl instead of five shifts by 1.


64123 02-Aug-2000 kato

Added PC-98 HDD boot manager. The boot0 is the `IPL' which occupies
sector 0 of a disk and boot0.5 is the `boot selector' which starts
from address 0x400. The IPL loads boot0.5 and boot0.5 loads bootblock
of a slice.

The boot manager stuff was developed by me (kato) with Borland C++,
and then, translated into bcc in the ports collection by Nokubi-san.
After that, boot0 has been translated into gas with the .code16
directive by Takahashi-san (nyan) and boot0.5 has been rewritten in
gas by me.


64019 30-Jul-2000 nyan

Merged from sys/boot/i386/btx/btx/btx.s revisions from 1.18 to 1.22.


63962 28-Jul-2000 sheldonh

Rename the loadable nullfs kernel module: null -> nullfs


63742 21-Jul-2000 jhb

Remove an unnecessary .PATH entry.


63373 18-Jul-2000 obrien

Declare our DEC Alpha cdboot to be a fully released version 1.0.


63328 17-Jul-2000 jhb

Oops. Remove some debugging code used to display a hexdump of the sector
we just loaded from the disk. The code to call it was commented out, and
it easily fit into the extra sector, but remove it anyway as it is
unneeded.


63321 17-Jul-2000 jlemon

Unbreak the build -- no manual page for this yet.


63315 17-Jul-2000 jlemon

Hook up liloldr


63314 17-Jul-2000 jlemon

This is `liloboot', which creates a file which can be treated like a
Linux kernel image, and is designed to be dropped into a Linux system
and booted via LILO. Once booted, the user is greeted by the FreeBSD
loader. This still isn't quite complete, as the the root= specification
from LILO isn't currently passed to the loader yet.


63101 14-Jul-2000 nyan

Merged from sys/boot/i386/libi386/biosdisk.c revision 1.31.


63032 12-Jul-2000 jhb

The new and improved boot0, v1.1. This version adds the following:
- Autodetection and support of the BIOS EDD extensions to work around the
1024 cylinder limit on all but really ancient BIOS's.
- To work around some BIOS's which break when EDD is used with older drives,
we only attempt to use EDD if the cylinder is > 1023.
- Since this new code required more space than we had left, expand boot0 to
2 sectors (1024 bytes) in length.
- Add support for boot0 being multiple sectors using predefined constants.
If boot0 needs to be extended in the future, all that is required is
bumping the NUM_SECTORS constant.
- Now that we have more room to work with, add a few more fs type
descriptions while making others more verbose.


62913 10-Jul-2000 jhb

Always install loader.4th, defaults/loader.conf, and support.4th instead of
only doing so if loader.rc does not exist. This fixes the problem where
installworld doesn't update /boot/loader.4th, resulting in device.hints not
being loaded after updating past the config(8) changes, which resulted in
mcclock0 not being probed, and a nice kernel panic during boot.


62874 10-Jul-2000 kris

Don't call printf with no format string.


62873 10-Jul-2000 kris

Don't call printf with no format string. This is technically a security
vulnerability and could in principle be used to upload a new kernel from the
bootloader :-)


62787 07-Jul-2000 jhb

Remove commented out NOMAN variable.


62665 06-Jul-2000 jhb

- Inline all the functions that are only called once. This results in a
savings of 68 bytes in boot2.
- Also add a comment warning that you can't remove the empty exit()
function.


62660 06-Jul-2000 jhb

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


62658 06-Jul-2000 jhb

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


62657 06-Jul-2000 jhb

Emulate the WBINVD instruction when it is called by the BIOS.


62242 29-Jun-2000 jhb

Change the fault message to say 'BTX halted' isntead of 'System halted' to
avoid confusion.

Submitted by: George Scott <George.Scott@its.monash.edu.au>


62233 29-Jun-2000 ache

Add randomdev_load="NO"


62229 29-Jun-2000 jhb

Rework the detecting of the rdmsr and wrmsr instructions in the v86
monitor so that the codepath is cleaner and easier to maintain in the
future.


62176 27-Jun-2000 jhb

- Don't blindly assume that there are 8 hard drives installed. Instead,
use the BIOS Equipment List to determine how many hard drives are
installed and if the drive number we received in %dl is valid.
- Don't bother to disable interrupts when setting up the stack. The 8086
and beyond implicitly disable interrupts after an instruction that sets
%ss (for example, a pop or a mov) so that you can safely set %ss and %sp
in two consecutive instructions. An exception to this is the lss
instruction, which can set both registers simultaneously and thus doesn't
need this hack.
- Add support for EDD BIOS extensions to support booting off of hard drives
of nearly arbitrary length.


62146 26-Jun-2000 jhb

Comment this.


62138 26-Jun-2000 jhb

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


62049 25-Jun-2000 mph

Typo fix: tunnable.
Backslash-parsing is not the role of printf(3), but is provided
by the C language.


61943 22-Jun-2000 sheldonh

Whitespace-only changes: apply accepted line breaking style as a
pre-cursor to other markup changes.

Accepted in principle by the author.


61836 19-Jun-2000 jhb

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


61823 19-Jun-2000 jhb

- Add some more details to the 'lsdev' output for FAT file systems.
- Add in support for the EDD (Enhanced Disk Drive) BIOS extensions to
use LBA mode for accessing drives past cylinder 1024. This should allow
us to load a kernel from anywhere on a newer drive up to 2 TB. Part
of this came from the PR below.

PR: i386/13847
Submitted by: Tor Egge <Tor.Egge@fast.no>


61757 17-Jun-2000 mjacob

Add wx and ispfw loadable module defaults.


61743 17-Jun-2000 jhb

Add support for emulating the RDMSR and WRMSR instructions into BTX. In
theory, this should allow the K7V Athlon motherboard to boot ok with boot
virus protection enabled. However, I have no hardware to test this. It
shouldn't break anything though. :)

Prodded by: Kelly Yancey <kbyanc@posi.net>


61720 16-Jun-2000 dcs

Fix vocabulary juggling so that builtins voc is always searched before
forth vocabulary when initially creating the builtins. FICL 2.05 has a
better way to do this, but this works for now.

Fixes "?".


61694 14-Jun-2000 dcs

Revert to 1.8


61693 14-Jun-2000 dcs

Remove the setting of sourceid from bf_vm(), as bf_vm() really has
no clue.

Set sourceid to 0 when booting, which is the correct setting for stdin.

Set sourceid to an arbitrary fd when include'ing, preserving and restoring
the previous sourceid. This is possibly broken(), as 0 is a valid fd. Maybe
we should +1 to this value.

This fixes the version problem widely reported.


61659 14-Jun-2000 ps

Delay calling the device cleanup routines until the absolute last
moment. We were cleaning up after PXE too early and the module
dependancy code would not be able to load any files if it needed
too.


61653 14-Jun-2000 ps

Make typing 'q' or 'Q' work for the show command as the pager prompt
says it should.


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


61627 13-Jun-2000 ru

Treat \t and \n inside /boot.config as whitespaces.

PR: 19215


61586 12-Jun-2000 dcs

Fix REFILL. It must throw RESTART instead of OUTOFTEXT so that
execution can take place at the point where it stopped after the
input buffer has been refilled.

Add ANS Forth CORE EXT and FILE word SOURCE-ID.


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.


61584 12-Jun-2000 dcs

Make abort" functional in interpret mode. This behavior is undefined
by ANS Forth standard, but it's useful.

Also, define the constant true in a more strict way. C might garantee
2-complement math, but Forth doesn't.


61583 12-Jun-2000 dcs

Make comment reflect reality.


61379 07-Jun-2000 dcs

Put some version checking.


61378 07-Jun-2000 dcs

Bump loader version due to FICL (duh!) and copyin, copyout, setenv&cia.


61377 07-Jun-2000 dcs

Bump loader version due to copyin, copyout, setenv&cia.


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


61374 07-Jun-2000 dcs

Add setenv, getenv, setenv?, unsetenv, copyin and copyout to FICL.


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.


61372 07-Jun-2000 dcs

Remove a bug that caused local variables declarations in the format
{ | internal -- } to be rejected.


61371 07-Jun-2000 dcs

Place original builtins in a vocabulary called "builtins". This
is intended mainly for debuging purposes, but it can be used by
other words if done carefully.


61353 07-Jun-2000 dcs

Remove residual printf.

Prodded by: msmith


61205 03-Jun-2000 dfr

Record the new PALcode revision in the pcs structure after changing to
run OSF/1 PALcode.

Obtained from: NetBSD


61182 02-Jun-2000 dcs

Apply a number of fixes for the Alpha platform.


61177 02-Jun-2000 dcs

Add something that was missing from the original 2.04 distribution.


61149 01-Jun-2000 dcs

Add "int" sized manipulation words.


61064 29-May-2000 nyan

Sync with the following changes.

sys/boot/i386/btx/btx/Makefile 1.8
sys/boot/i386/btx/btx/btx.s 1.16 and 1.17
sys/boot/i386/btx/btxldr/btxldr.s 1.10
sys/boot/i386/loader/Makefile 1.45


60962 26-May-2000 dcs

Strip spaces and comments more agressively.


60959 26-May-2000 dcs

Bring in FICL 2.04. No bump of loader version is required by this
commit.


60938 26-May-2000 jake

Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by: msmith and others


60846 24-May-2000 jhb

Convert the short stub of real-mode code into 16-bit assembly.


60833 23-May-2000 jake

Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by: phk
Reviewed by: phk
Approved by: mdodd


60823 23-May-2000 jhb

Grrr, fix a silly 'movl' -> 'movw' typo in both pxeldr and cdldr. Also,
remove unnecessary cruft from the Makefiles for both.


60822 23-May-2000 jhb

Clean up some more 16-bit code and get rid of more m4 macros.


60821 23-May-2000 jhb

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


60820 23-May-2000 dcs

Document abial's .#.


60752 21-May-2000 hoek

Make this compile in case anyone ever wants to use the PC98 booter
on an IBM machine. This fix matches i386/boot2/boot.c.

PR: kern/7903


60710 19-May-2000 dcs

One of loaders' bugs disappeared somewhere along the way.


60704 19-May-2000 dcs

Move man page directives to common/Makefile.inc.


60703 19-May-2000 dcs

This file got repo-copied to common/.


60702 19-May-2000 dcs

Move man page directives to common/Makefile.inc.


60701 19-May-2000 dcs

Remove INSTALL_FORTH stuff.


60700 19-May-2000 dcs

Move man page directives to common/Makefile.inc.
Remove INSTALL_FORTH stuff.


60684 18-May-2000 dcs

Make corrections to allow for Alpha.


60506 13-May-2000 dfr

Only probe network settings on the first open of the network device.
The alpha firmware takes a seriously long time to open the network device
the first time.


60490 13-May-2000 obrien

The loader was written so that if /kernel was missing /kernel.old would
be booted. Due to a bug, this wasn't happening.

There is still a lesser bug in that the loader decides which file to boot
after the 10sec count down. This means the bootfile listed in the count
down in is wrong in the case where the loader will boot /kernel.old.


60487 12-May-2000 peter

Install the bootforth config files for the Alpha too. loader.conf should
be functional now.


60482 12-May-2000 peter

Reactivate the FICL hooks to make it be compiled in, but also initialize
FICL. bootforth is now live on the Alpha!

**BEWARE** - you *MUST* build and install a current libstand or you will
most likely get zfree() panics at loader startup.

We should now be able to set up the loader.conf stuff on the Alpha too.


60480 12-May-2000 peter

Stop libficl from using floating point registers - this was cauing
dictDelete() to fault early on the Alpha and was the original cause of
the Alpha ficl failures.


60434 12-May-2000 peter

Fix the Alpha loader the rest of the way. If FICL is present in
/boot/loader (even though it is 100% dormant in the Alpha version),
then the loader panics with a zfree error:Loading /boot/loader.test
*** keyboard not plugged in...
Console: SRM firmware console
panic: zfree(0x2003cb58,4096): wild pointer
versus the exact same code but without FICL linked in:
Loading /boot/loader
Console: SRM firmware console
VMS PAL rev: 0x1000600010114
OSF PAL rev: 0x1000600020116
Switch to OSF PAL code succeeded.

FreeBSD/alpha SRM disk boot, Revision 0.1

This is almost certainly an alpha infrastructure bug, not a FICL
problem. It's probably the same thing that made FICL fail for no
apparent reason on the Alpha.


60432 12-May-2000 bp

long != int on Alphas.


60277 09-May-2000 dwhite

Remove metion of the 'magic options.' Apparently PXE doesn't require the
special options on 0.99c (it mumbles something about 'PXE server not found'
but works anyway), and it won't work at all with PXE 2.0.


60108 06-May-2000 msmith

Teach the alpha loader install process to make backup copies of the
boot programs when installing new versions.


60046 05-May-2000 jhb

Switch to using the .code16 as(1) directive and using 16-bit assembly
code instead of using 32-bit code and having to just "know" that it's
really 16-bit instructions when things run. This also allows the code
to use fewer macros and more actual assembly statements, which eases
maintenance. Unfortunately, due to as(1) brokenness, we still use m4
macros for all 16-bit addresses, and all short jumps (i.e., 8-bit
relative addresses in the jump instruction) must be wrapped in .code32
directives to avoid useless bloat by as(1). This also fixes a few
problems that were preventing boot0 from compiling with the latest
and greatest version of as(1).


60023 05-May-2000 ps

Remove the static heap. It is unknown why it was needed in the
beginning, but it no longer is required. This has been tested with
many different revisions of the PXE rom from Intel.


60014 05-May-2000 dcs

Lay the groundwork for on-demand dictionary expansion.


60007 04-May-2000 dcs

Correct a bug whereby allocations to the dictionary would not be allowed
unless four times the space requested was available.


60006 04-May-2000 dcs

Make documentation on recently added heap? command reflect reality.


60005 04-May-2000 dcs

Add "heap?" to loader's man page.


60003 04-May-2000 dcs

Further improve ordering.


60002 04-May-2000 dcs

Sort entries in FreeBSD-specific FICL commands.


60000 04-May-2000 dcs

Add heap?, so we can tell how much free space we have left.


59912 03-May-2000 nyan

- Removed hi-resolution mode supports.
- Added a dummy partition table.


59895 02-May-2000 n_hibma

Add the udbp module


59887 02-May-2000 dwhite

Add man page for pxeboot.

Reviewed By: asmodai


59874 01-May-2000 peter

Add $FreeBSD$


59857 01-May-2000 peter

GC unused variable (size)


59856 01-May-2000 peter

Fix some warnings on the Alpha. sizeof() returns different things on
x86 and Alpha. Sigh.


59855 01-May-2000 ps

Wrap the failure warnings around PXE_DEBUG in the cleanup routine.
It does not matter if they fail, so dont print anything about it
unless we are debugging.


59854 01-May-2000 bp

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

Reviewed by: peter


59777 30-Apr-2000 nyan

Sync with sys/boot/i386/libi386/biosdisk.c revision 1.30.


59768 29-Apr-2000 ps

Fall back to /pxeroot as the location of the NFS exported directory
if we are not given one by dhcp.
Remove extra includes while I am here.

Reminded by: jlemon


59767 29-Apr-2000 jlemon

Teach the loader about the ext2fs filesystem, extended partitions, and
the new readdir function.


59686 27-Apr-2000 ps

Make PXE do a dhcp request to find out where its files are. The
DHCP server is no longer required to also act as the NFS/TFTP
server.


59673 27-Apr-2000 ps

Don't report errors when we UDP_WRITE fails with a status of 1.


59659 26-Apr-2000 jhb

Now that we are compiling PXE into libi386, we don't need ../libi386 in
.PATH anymore.


59644 26-Apr-2000 ps

Bring support in for Intel Wired for Management 1.1 (PXE 0.99 and
below). This did not work previously because interrupts were
disabled when PXE calls were being made, and they must be enabled.
This should also allow us to be compliant with all newer PXE rom's
from Intel.

For PXE 0.99, this has been tested using the Intel N440BX motherboard
and I am confident it will work on the Intel L440GX motherboard.

Lots of help/information from: jhb, peter

I would like to thank Michael Johnston <michael.johnston@intel.com>,
Mike Henry <mike.henry@intel.com>, and all the other PXE developers
at Intel for their help, and information in helping solve this
problem.


59634 26-Apr-2000 jhb

Don't disable interrupts when calling a vm86 mode interrupt or routine
from user mode. Don't disable interrupts when returning from vm86 mode
to user mode either. Now, we only disable interrupts before calling a
hardware interrupt handler, which is the only time we _should_ be
disabling interrupts.

Because of this, err, feature, any routine that one called in vm86 mode
had to re-enable interrupts by setting the interrupt flag or interrupts
would remain disabled even after the routine returned. For example, I
have a simple debugging routine that uses a vm86 mode function to dump
any arbitrary memory word that I use to read the BIOS timer or any other
memory location. This function does 1 load instruction from memory and
then returns. Since it didn't re-enable interrupts, the first time I
called it to read the BIOS timer, it disabled interrupts. This also
affected the PXE bootstrap as it needs interrupts enabled while it is
processing. This patch fixes both of those situations so that those
functions do not worry about having to enable interrupts. Hardware
interrupt handlers worked fine with the old code because they always
enable interrupts as part of their routine.

If you have any problems with the loader after this commit, please
let me know. I'd like to MFC it in a week or two since PXE support
needs it.

Noticed by: ps, Michael Johnston <michael.johnston@intel.com>


59535 23-Apr-2000 nyan

Sync with the following changes.

sys/boot/i386/libi386/Makefile 1.16 and 1.17
sys/boot/i386/loader/Makefile 1.44
sys/boot/i386/loader/main.c 1.20


59473 21-Apr-2000 ps

Move the building of the PXE module into libi386.


59456 21-Apr-2000 ps

Make the loader a little smarter about when it is and is not allowed
to call PXE.


59455 21-Apr-2000 ps

Don't call the PXE cleanup routine if PXE is not enabled. This
should fix the "Invalid partition table" error people were seeing.


59408 20-Apr-2000 ps

Add a cleanup function. This is needed for PXE where you should
shutdown the UNDI and unload the stack.


59390 19-Apr-2000 ps

Use !PXE api over PXENV+ api.
Magic trampoline by: peter (at 4am and after a good whipping at airhockey)
Do a better job of returning and detecting errors.


59294 16-Apr-2000 msmith

Some more i386-only BIOS-friendliness:

- Add support for using the PCI BIOS functions for configuration space
accesses, and make this the default.

- Make PNPBIOS the default (obsoletes the PNPBIOS config option).

- Add two new boot-time tunables to disable each of the above.


59230 14-Apr-2000 nyan

The printf function of boot2 can't recognize "%lx" format.

Submitted by: Nobuyuki Koganemaru <kogane@koganemaru.co.jp>


59228 14-Apr-2000 nyan

Merged from sys/boot/i386/loader/Makefile revision 1.43.


59167 12-Apr-2000 kato

Merged from sys/boot/i386/loader/main.c rev 1.19.


59150 11-Apr-2000 jhb

Add a missing dependency: boot2 depends on the BTX kernel.


59100 08-Apr-2000 jkh

Nuke duplicate struct declaration from somebody's paste-o


59087 08-Apr-2000 ps

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

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


58999 04-Apr-2000 ps

Add a missing PXE API call and structure.


58993 04-Apr-2000 ps

Add all the PXE related structures from the 2.1 PXE spec from Intel.
Fix exsisting code to match the spec.


58871 31-Mar-2000 kato

Synced with following files:
src/sys/boot/i386/Makefile.inc 1.1
src/sys/boot/i386/btx/btx/btx.s 1.15
src/sys/boot/i386/btx/btxldr/Makefile 1.8
src/sys/boot/i386/btx/btxldr/btxldr.s 1.9
src/sys/boot/i386/libi386/biosdisk.c 1.29
src/sys/boot/i386/loader/Makefile 1.42
src/sys/boot/i386/loader/main.c 1.18
(entry point address of loader was not changed.)

Reviewed by: nyan


58829 30-Mar-2000 kato

Separated serial boot block interface routine into NS16550 stuff and
i8251 stuff.


58713 28-Mar-2000 jhb

Mega i386 loader commit.
- Don't hard code 0x10000 as the entry point for the loader. Instead add
src/sys/boot/i386/Makefile.inc which defines a make variable with the
entry point for the loader. Move the loader's entry point up to
0x20000, which makes PXE happy.
- Don't try to use cpp to parse btxldr for the optional BTXLDR_VERBOSE,
instead use m4 to achieve this. Also, add a BTXLDR_VERBOSE knob in the
btxldr Makefile to turn this option on.
- Redo parts of cdldr's Makefile so that it now builds and installs cdboot
instead of having i386/loader/Makefile do that. Also, add in some more
variables to make the pxeldr Makefile almost identical and thus to ease
maintainability.
- Teach cdldr about the a.out format. Cdldr now parsers the a.out header
of the loader binary and relocates it based on that. The entry point of
the loader no longer has to be hardcoded into cdldr. Also, the boot
info table from mkisofs is no longer required to get a useful cdboot.
- Update the lsdev function for BIOS disks to parse other file systems
(such as DOS FAT) that we currently support. This is still buggy as
it assumes that a floppy with a DOS boot sector actually has a MBR and
parses it as such. I'll be fixing this in the future.
- The biggie: Add in support for booting off of PXE-enabled network
adapters. Currently, we use the TFTP API provided by the PXE BIOS.
Eventually we will switch to using the low-level NIC driver thus
allowing both TFTP and NFS to be used, but for now it's just TFTP.

Submitted by: ps, alfred
Testing by: Benno Rice <benno@netizen.com.au>


58165 17-Mar-2000 nyan

Sync with sys/boot/i386/libi386/biosdisk.c revision 1.27 and 1.28.

Submitted by: Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>


58098 15-Mar-2000 jhb

Remove some extra spammage that made it into this commit. This will be
revisited later with a better fix, or at least one that compiles. :)

Approved by: dcs


58081 15-Mar-2000 dcs

Pass an unit number to bcache_strategy, so it can flush the cache when
necessary. Pass an absolute block number too, instead of receiving a
relative one in realstrategy(), as bcache_strategy() requires this.

The fix is sligthly different from the one in the PR.

PR: 17098
Submitted by: John Hood <jhood@sitaranetworks.com>


58080 15-Mar-2000 dcs

bcache_strategy() now receives an unit number, and keep track of what
was the last unit number received. If it changes, it flushes the cache.
Add bcache_flash().

The actual fix is sligthly different from the one in the PR.

PR: 17098
Submitted by: John Hood <jhood@sitaranetworks.com>


58079 15-Mar-2000 dcs

Pass unit number to bcache_strategy(), so that the cache can be
flushed if the unit changes. Compute the absolute offset before
bcache_strategy() instead of after.

The actual fix is sligthly different for the one in the PR.

PR: 17098
Submitted by: John Hood <jhood@sitaranetworks.com>


57468 25-Feb-2000 bp

Fix the loader to handle module dependencies properly. More fixes
will be provided after modmetadata appears in the kernel.

Reviewed by: msmith
Approved by: jkh


57269 17-Feb-2000 msmith

Close a file descriptor leak in the code which loads file objects.

Submitted by: Paul Saab <paul@mu.org>
Approved by: jkh


57254 16-Feb-2000 jhb

This patch to BTX fixes several small things:

1) Fix a bug in the int15 function 87 emulation where we only copied half
of what the BIOS asked for. This caused the Mylex RAID adapter to go
haywire and start trashing memory when you tried to boot from it.
2) Don't use interrupt 19 to reboot. Instead, set the reboot flag to a warm
boot and jump to the BIOS's reboot handler. int 19 doesn't clear memory
or restore the interrupt vector table, and thus really isn't safe. For
example, when booting off of PXE, the PXE BIOS eats up a chunk of memory
for its internal data and structures. Since we rebooted via int 19,
using the 'reboot' command in the loader resulted in that memory not
being reclaimed by the BIOS. Thus, after a few PXE boots, the system
was out of lower memory.
3) Catch any int 19 calls made by a BTX client or a user pressing
Ctrl-Alt-Delete and shutdown BTX and reboot the machine cleanly. This
fixes Ctrl-Alt-Delete in the loader and in boot2 instead of presenting
the user with a BTX fault.

Approved by: jkh
Found by: 1) by msmith


57090 09-Feb-2000 ru

Support the new ata(4) syntax, while providing backward compatibility for wd(4).

Reviewed by: jkh, msmith, sos
Approved by: jkh


56994 05-Feb-2000 kato

Synced with sys/boot/i386/loader/Makefile rev 1.41.


56992 04-Feb-2000 luigi

Add a NOFORTH variable so we can build a smaller loader without
Forth support, for use with PicoBSD

Approved-By: jordan


56903 30-Jan-2000 jhb

Fix bogon in previous commit. Re-enable Forth in the loader.

Noticed by: dcs
Approved by: jkh


56813 29-Jan-2000 kato

Synced with sys/boot/i386/btx/btx/btx.s rev 1.14.


56752 28-Jan-2000 jhb

Allow for cdldr to be built in ${.OBJDIR}/../cdldr/cdldr instead of
only looking for it in ${.CURDIR}/../cdldr/cdldr. This fixes world.


56719 28-Jan-2000 dcs

Implement a machine-independent (word size-independent) FICL_TRUE.


56718 28-Jan-2000 dcs

ANS Forth for logical not is 0=, not invert. Replace wrong usage.


56717 28-Jan-2000 dcs

Add testmain.o to CLEANFILES.


56716 28-Jan-2000 dcs

Try my hand again at removing ugly testmain target.


56693 27-Jan-2000 jhb

Add the new cdldr CD bootstrap loader. This patch includes the following:

- Fix btxldr to preserve a NULL bootinfo pointer when it copies the kernel
arguments.
- Add the cdldr bootstrap program. This program is tacked onto the
beginning of the standard 3rd stage boot loader (/boot/loader) to form
the CD boot loader (/boot/cdboot). When a CD is booted, the cdboot file
is copied into memory instead and executed. The cdldr stub emulates the
environment normally provided by boot2 and then starts the loader. This
booting method does not emulate a floppy drive, but boots directly off of
the CD. This should fix the problems some BIOS's have with emulating a
2.88 MB floppy image.
- Add support to the loader to recognize that it has been booted by cdldr
instead of boot2 and use a simpler method of extracting the BIOS boot
device.


56691 27-Jan-2000 jhb

Fix brokenness introduced with the PAGING conditional variable. The value
of %cr0 wasn't reloaded into %eax before being modified to turn protected
mode off if PAGING was not defined. The result was that the processor did
not exit protected mode, so when it tried to jump to segment 0x0 in the
next instruction to clear the prefetch cache like one should when leaving
protected mode, it actually tried to jump to a null selector, causing a
GPF.


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


55342 03-Jan-2000 nyan

Merge from the following changes.

sys/boot/i386/libi386/biosmem.c Rev 1.4
sys/boot/i386/libi386/time.c Rev 1.3
sys/boot/i386/loader/main.c Rev 1.16


55339 03-Jan-2000 nyan

Fixed to get the BIOS geometry.


55211 29-Dec-1999 msmith

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

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

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

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

Add copyrights to a couple of files I forgot.


55206 29-Dec-1999 peter

Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot). This is consistant with the other
BSD's who made this change quite some time ago. More commits to come.


55173 28-Dec-1999 msmith

Correctly handle a user-requested abort in the middle of displaying a
help subtopic.

PR: kern/13196
Submitted by: MIHIRA Sanpei Yoshiro <sanpei@sanpei.org>


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


55139 27-Dec-1999 peter

Connect up the bootforth glue and compile it, but don't initialize it
at runtime as it has a nasty habit of crashing on the Alpha :-(.
This is being done this way so we have a common starting point for
debugging.


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


54819 19-Dec-1999 nyan

- Supported the bd_getbigeom function and use this function to get BIOS
geometry.
- Use i386/libi386/bootinfo.c instead of pc98/libpc98/bootinfo.c.

Submitted by: IMAI Takeshi <take-i@ceres.dti.ne.jp>


54695 16-Dec-1999 marcel

Don't build gensetdefs when we can use /usr/bin/gensetdefs. The latter
also creates setdef{0|1}.c so there's no need to have those in the
repository. Using /usr/bin/gensetdefs has no consequences for the
output.


54649 15-Dec-1999 marcel

Add -L${DESTDIR}${LIBDIR} to ld's command line so that the right
libstand is used.


54294 08-Dec-1999 phk

Remove BAD144 support, it has already been disabled for some time.


54265 07-Dec-1999 msmith

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


54264 07-Dec-1999 msmith

Update to reflect use of : not ; as separator in paths passed to the
kernel.


54247 07-Dec-1999 dcs

Make some examples reflect defaults.


54086 03-Dec-1999 nyan

Supported to sound beep.

Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata)


54020 02-Dec-1999 dcs

Add bus suffix to mii.


54019 02-Dec-1999 dcs

Add if_ prefix to network drivers.


53993 01-Dec-1999 dcs

Add fairings. Do not depend on user actually supplying the arguments
he is supposed to supply.


53786 27-Nov-1999 dcs

Make the prompt look like on OpenBoot.


53777 27-Nov-1999 dcs

Zeroes structure before using it.


53708 26-Nov-1999 dcs

Belatedly add splash_pcx_load to the documented variables. Reword
splash_bmp_load.


53688 25-Nov-1999 nyan

Sync with sys/boot/i386/loader/Makefile revision 1.37.


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.


53637 23-Nov-1999 dcs

Add machine-specific include path to ficl's sysdep.h. Wishes I had
gone to bed earlier.

Pointed by: peter


53636 23-Nov-1999 dcs

Revert ill-considered simplification in 1.13.

Pointed by: peter


53635 23-Nov-1999 dcs

Improve Makefile by using .PATH.

Taught by: peter


53634 23-Nov-1999 dcs

Improve on ficl port to alpha.

Files sysdep.[ch] are now in ${MACHINE_ARCH} subdirectory. Internal
#if's used to identify the platform where removed.

Make rule for target testmain was greatly simplified, because it was
easier simplifying it than changing it to support the new location of
sysdep.[ch].

(a repo-copy was done on sysdep.[ch], of course)


53633 23-Nov-1999 dcs

(Hopefully) make all necessary changes for ficl to support alpha.


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.


53218 16-Nov-1999 nyan

Fixed warnings.


53217 16-Nov-1999 nyan

Remove -mno-486 option and add -mpreferred-stack-boundary=2 option.


53207 16-Nov-1999 nyan

Cosmetic changes.


53206 16-Nov-1999 nyan

Install loader.rc.


53181 15-Nov-1999 marcel

PC-98 has MACHINE_ARCH=i386 and MACHINE=pc98. Make it a special case.
This should fix the breakage reported by nyan.


53174 15-Nov-1999 obrien

Add -fdata-sections, which is a new GCC 2.95 optimization. Remove
-fschedule-insns as it wasn't such a big win with 2.95 after all.

Add the *BIG* win "-mpreferred-stack-boundary=2" optimiztion submitted by
Dima. GCC 2.95 ensures the stack frame is always properly [opitimally]
aligned by surrounding every function call by code simular to
"addl $-12, %esp" / "addl $12, %esp". Here we need the reduction in space,
with speed not an issue.


53159 14-Nov-1999 obrien

Return this file to its pre-spammed version. Thanks to some new compiler
optimizations, we can go from 3 bytes free with the spammed version, to
279 bytes free with the full version.


53152 14-Nov-1999 marcel

${MACHINE} -> ${MACHINE_ARCH}

All Makefiles now use MACHINE_ARCH for the target architecture.
Unification is required for cross-building.

Tags added to:
sys/boot/Makefile
sys/boot/arc/loader/Makefile
sys/kern/Makefile
usr.bin/cpp/Makefile
usr.bin/gcore/Makefile
usr.bin/truss/Makefile

usr.bin/gcore/Makefile:
fixed typo: MACHINDE -> MACHINE_ARCH


53135 14-Nov-1999 obrien

Enter complier upgrade mode again. We need to cut 169 bytes from this:
Remove some printf() calls, reduce size of buffers, and abbreviate
some strings.

Hopefully the boot people will fix this spamage after the cut over to
Gcc 2.95.2 as the system compiler.


53134 13-Nov-1999 obrien

Turn on the -fforce-addr and -fschedule-insns optimizations. Adding
either one gives us an additional 32 bytes of additional space available
when using EGCS 1.1.2. With GCC 2.95.2 -fforce-addr gives us 12 more bytes,
and adding -fschedule-insns gives us an additional 4 bytes.


52848 03-Nov-1999 dfr

Add back netboot since it compiles just fine. Note that you need a full
source tree to build netboot since it depends on headers from libstand.


52847 03-Nov-1999 dfr

* Don't wait forever for the boot2 filename if the PCC wraps.
* If the user presses return, load boot2 immediately.


52827 03-Nov-1999 nyan

Sync with sys/boot/i386/btx/btx/btx.s revision 1.13.


52825 03-Nov-1999 nyan

Sync with sys/boot/i386/libi386/Makefile revision 1.15.


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.


52748 01-Nov-1999 dcs

Changes the default prompt to "ok".

Mike says the whole idea of a current device was a bad idea in first place,
and will be doing away with currdev.

Anyway, people are not supposed to even notice this. :-)


52674 30-Oct-1999 phantom

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


52545 27-Oct-1999 jhb

If PAGING is defined then actually turn it on when entering protected
mode.


52395 19-Oct-1999 dcs

Make the "machine" target a prequisite to all source files.

Hinted-at by: bde


52202 13-Oct-1999 kato

Sync with sys/boot/i386/btx/btx/Makefile and btx.s revisions 1.7 and
1.12, respectively.


52173 12-Oct-1999 jhb

aThis patch updates the BTX to emulate the BIOS function "Copy Extended
Memory" called as function 0x87 of interrupt 0x15. Since the Mylex RAID
adapter's BIOS used this function to access memory (actually PCI bus
space) beyond 16 MB, this patch also allows BTX to address all 4 Gig of
possible address space on i386+. Since the loader does not have room for
4 MB of page tables, this was done by turning off paging.

Paging was turned off via a compile time setting which defaults to off.
To enable paging, simply define the make variable PAGING.

rnordier might want to clean this up later.

Submitted by: W. Gerald Hicks <wghicks@bellsouth.net>,
Bosko Milekic <bmilekic@ares.dsuper.net>
Reviewed by: msmith
Required by: Mylex RAID adapter's BIOS


52168 12-Oct-1999 dfr

Allow this driver to open disks with no labels (CDROMS don't).


52148 12-Oct-1999 brian

Blank out the twiddly thing when outputting the ``BTX loader'' message.


52058 09-Oct-1999 dfr

Fix build break.

Submitted by: Thomas Valentino Crimi <tcrimi+@andrew.cmu.edu>


52057 09-Oct-1999 dfr

Add net device to netboot.


51789 29-Sep-1999 dcs

Fix world-breaking bug, add $FreeBSD$ tag.

This happened to be my first "for real" broken world. I had broken
it once before, but nobody noticed, so it didn't count.

So, how do I get the "I broke world and all I got was the lousy t-shirt"
t-shirt?


51786 29-Sep-1999 dcs

Bring in ficl version 2.03. No version bump for loader.


51586 23-Sep-1999 kato

- Fixed DMA 64k boundary problem.
- Test the processor flag to detect disk I/O BIOS errors.

Submitted by: IMAI Takeshi <take-i@ceres.dti.ne.jp>


51104 09-Sep-1999 mjacob

netboot removed until somebody fixes it so it compiles


51053 07-Sep-1999 msmith

Add more missing files from the reorganisation.

Submitted by: dfr


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.


51029 06-Sep-1999 dfr

Change NetBSD/Alpha to FreeBSD/alpha.


51007 06-Sep-1999 msmith

Common Alpha loader Makefile, omitted accidentally from the previous set
of commits.


50959 05-Sep-1999 peter

$Id$ -> $FreeBSD$


50859 03-Sep-1999 msmith

Slight reorganisation of the Alpha/SRM loader build:

- Make as much of the makefile for each of the three flavours
(disk, CDROM, net) common.
- Special-case the libalpha startup module on its use in boot1, not
the other way around.
- Build the loader out of a "loader" directory

Reviewed by: mjacob, dfr


50822 03-Sep-1999 julian

Remove accidental cut&paste garbage in a comment.


50820 03-Sep-1999 julian

Comment the boot manager. So I don't have to work it all out again :-)

Reviewed by: rnordier@freebsd.org


50739 01-Sep-1999 dfr

Change $Id$ to $FreeBSD$


50737 01-Sep-1999 dfr

* Fix a stack of warnings.
* Make it possible to type a filename to boot1 so that it is possible to
recover from fatally broken versions of /boot/loader.
* Make a start at a CD boot program (not yet functional).


50477 28-Aug-1999 peter

$Id$ -> $FreeBSD$


50000 18-Aug-1999 chris

Fix a bunch of broken cross-references


49782 14-Aug-1999 jdp

Append the flags from the "boot" command to those which came from
the SRM environment. This makes the traditional "boot [/kernel] -s"
and similar things work on the Alpha. Since the flags are appended,
they augment and/or override those from the SRM environment.


49673 13-Aug-1999 kato

Merge from sys/boot/i386/libi386/bootinfo.c revision 1.21.


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.


49426 05-Aug-1999 kato

- Don't assume that SCSI ID numbers of HDD units are contiguous. That
is, don't assume that SCSI ID corresponds to a unit number of da
device. Unit number of da device is provided by 2nd stage loader
and 3rd stage loader now use it.
- Fix drive letter to display.

Submitted by: IMAI Takeshi <take-i@ceres.dti.ne.jp>


49425 05-Aug-1999 kato

Provides discontinuous unit number support to make external FDD
bootable on 1 FDD PC98 machines. (When an external FDD unit is
installed, unit numbers become discontinuous.)

Submitted by: IMAI Takeshi <take-i@ceres.dti.ne.jp>


49412 04-Aug-1999 green

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

Remove lkm.


49381 02-Aug-1999 dfr

Make this build if there is an obj directory.


49379 02-Aug-1999 se

Add missing "path mnemonics" as given in Table 4-3 of rev. 1.2 of the
ARC Specification.


49234 29-Jul-1999 se

Fix install target (install loader.exe, not loader).


49192 28-Jul-1999 se

Activate "arc" (ARC / AlphaBIOS loader) on Alpha.


49191 28-Jul-1999 nik

Fix some typos.

PR: docs/11955
Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>


49188 28-Jul-1999 se

This commit was generated by cvs2svn to compensate for changes in r49187,
which included commits to RCS files with non-trunk default branches.


49060 24-Jul-1999 rnordier

Recognise NetBSD slices.

Submitted by : Lars Koeller <lkoeller@cc.fh-lippe.de>
PR : 12772


48952 21-Jul-1999 msmith

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


48919 20-Jul-1999 rnordier

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


48913 19-Jul-1999 rnordier

Activate kgzldr.


48912 19-Jul-1999 rnordier

Use M4FLAGS for m4.


48908 19-Jul-1999 rnordier

This commit was generated by cvs2svn to compensate for changes in r48907,
which included commits to RCS files with non-trunk default branches.


48829 15-Jul-1999 n_hibma

The boot countdown timer says it will boot in 1 seconds,
which is grammatically incorrect.

PR: 12628
Submitted-By: R. Matthew Emerson <rme@nightfly.apk.net>


48477 02-Jul-1999 msmith

Document the hw.physmem tunable. (There should be arch-specific tunable
help sections.)


48352 29-Jun-1999 peter

Fix typo (wrong path)


48351 29-Jun-1999 peter

Reconcile all the loader newvers.sh's into one common one.


48350 29-Jun-1999 peter

Don't use head/tail - they don't exist in a 'make world' environment.
(Why do we have three copies of this script anyway?)


48243 26-Jun-1999 peter

ABS_SET() and BSS_SET() are no longer used. The sole remaining user of
TEXT_SET() is DDB's command tables.


48135 23-Jun-1999 ru

-mdoc fix.


48083 21-Jun-1999 rnordier

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


48037 19-Jun-1999 rnordier

Provide for enabling/disabling each slice individually.


48034 19-Jun-1999 rnordier

Fix use of e_phoff in place of e_phnum.


48033 19-Jun-1999 rnordier

Correct and clarify some comments.


48010 18-Jun-1999 rnordier

Change active flag handling; sanity check passed drive number; pass
partition pointer to bootstrap; optimise away 10 bytes; cosmetics.


47890 13-Jun-1999 roger

Add bktr_load for the loadable Bt848/Bt878 driver.


47780 06-Jun-1999 kato

Sync with sys/boot/i386/libi386/bootinfo.c revision 1.19.


47727 04-Jun-1999 ghelmer

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

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

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


47609 30-May-1999 dfr

Typo: "can't boot 'boot'" should be "can't boot 'kernel'"


47576 28-May-1999 brian

Always output a linefeed when we've decided whether to boot
or display a loader prompt; either we've said
"Booting [%s]..." or we've received a non-line-feed character
and need a '\n' anyway.


47473 24-May-1999 rnordier

Activate mbr.


47472 24-May-1999 rnordier

This commit was generated by cvs2svn to compensate for changes in r47471,
which included commits to RCS files with non-trunk default branches.


47395 22-May-1999 rnordier

Fix a reference to the mysterious Mike Smisth.


47332 20-May-1999 kato

Sync with sys/boot/i386/btx/Makefile revision 1.5.


47312 18-May-1999 rnordier

Drop some non-existent commented-out targets.


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.


47011 11-May-1999 jb

Found the needle in the haystack!

Use colons instead of semi-colons in the default init_path to behave like
UNIX instead of DOS.

Suggested by: bde
Reminded by: des (with no hint as to *which* man page).


46356 03-May-1999 dfr

Changes to support diskless booting on the alpha:
* Make the network code in the bootstrap more chatty (helps debugging)
* Add nfs root stuff to cpu_rootconf(). I also added a check to make sure
it really was netbooting which allows the use of the same kernel for local
and network boots.
* Tweak the de driver so that it takes the speed setting from the console
for the alpha (some PWSs have broken de chipsets). This is the same
behaviour as NetBSD/alpha.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>


46354 03-May-1999 jkoshy

Correct typos.

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


46352 03-May-1999 jkoshy

Correct misuse of .Nm.

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


46074 25-Apr-1999 dcs

Make man page reflect reality on parsing rules. Now I know Jordan
never read this man page... :-)


46043 25-Apr-1999 kato

Sync with sys/boot/i386/loader/Makefile revision 1.34.


46012 24-Apr-1999 dcs

Minor nit. It is probably still incorrect, but at least don't
claim to use i386-specific files on alpha...


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.


45983 24-Apr-1999 kato

Optimize better for space.

Submitted by: Takahashi Yoshihiro <nyan@wyvern.cc.kogakuin.ac.jp>


45945 22-Apr-1999 jdp

Update #include statements to reflect the new location of "sioreg.h".
With these changes plus the egcs fix I committed a few minutes ago,
"make -DWANT_AOUT world" works again. Most likely, "make upgrade"
is fixed too, though I haven't tested that.


45881 20-Apr-1999 des

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


45867 20-Apr-1999 joerg

Don't clobber the "prompt" variable if it has already been set (e. g.
from within loader.conf).

Reviewed by: dcs


45814 19-Apr-1999 kato

Sync with sys/boot/i386/loader/Makefile revision 1.32.


45759 18-Apr-1999 dcs

Installs a default loader.rc if none exists. Document loader.conf.


45758 18-Apr-1999 dcs

A default loader.rc to be installed.


45720 16-Apr-1999 peter

Bring the 'new-bus' to the i386. This extensively changes the way the
i386 platform boots, it is no longer ISA-centric, and is fully dynamic.
Most old drivers compile and run without modification via 'compatability
shims' to enable a smoother transition. eisa, isapnp and pccard* are
not yet using the new resource manager. Once fully converted, all drivers
will be loadable, including PCI and ISA.

(Some other changes appear to have snuck in, including a port of Soren's
ATA driver to the Alpha. Soren, back this out if you need to.)

This is a checkpoint of work-in-progress, but is quite functional.

The bulk of the work was done over the last few years by Doug Rabson and
Garrett Wollman.

Approved by: core


45355 06-Apr-1999 dcs

Reactivate trace! after making it egcs-friendly.


45335 05-Apr-1999 rnordier

Fix damage introduced in previous commit.


45334 05-Apr-1999 rnordier

Optimize better for space.
Thanks to: jdp


45309 04-Apr-1999 obrien

Remove the string ">>> FreeBSD/i386 BOOT". I need to reduce the size of
boot2 by 16 bytes. I expect this to be temperary until the boot2 authors
can do the proper fix.


45241 02-Apr-1999 kato

Use files under sys/boot/i386 instead of copying under sys/boot/pc98.

Submitted by: Takahashi Yoshihiro <nyan@dd.catv.ne.jp>


45175 31-Mar-1999 joerg

Make <DEL> an alternative rubout character for command input; many
serial terminals use this as their default rubout key.


44914 20-Mar-1999 dcs

Revert bootinfo to 1.4 and use a different solution to NULL m_args
instead (don't copy).


44912 20-Mar-1999 dcs

Fix a couple of nasty errors in the README.


44897 19-Mar-1999 kato

Sync with sys/boot/i386/loader/version revision 1.4.


44896 19-Mar-1999 kato

Sync with sys/boot/i386/libi386/bootinfo.c revision 1.18.


44861 18-Mar-1999 dcs

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


44859 18-Mar-1999 kato

Install the manual page in sys/boot/i386/loader.

Sumbmitted by: Takahashi Yoshihiro <nyan@dd.catv.ne.jp>


44858 18-Mar-1999 dfr

Don't choke in MOD_ARGS() if mp->m_args is NULL.


44842 17-Mar-1999 chuckr

This is a temporary README file, to help those trying to experiment
with the new boot loader configuration process. I got a lot of
help from Daniel Sobral, and both Dan and I got help from Mike
Smith. This really belongs in Warner's UPDATING, but he's not
been answering his email recently, so that will wait a little.

Robert Nordier also gave me a lot of help, but he hasn't seen the
last version, and can't be blamed for my errors.

Approved by: jkh

Reviewed by: Mike Smith


44840 17-Mar-1999 dcs

Version bump: kvm & dictionary size.


44839 17-Mar-1999 dcs

Disable trace! until it gets fixed.


44780 15-Mar-1999 dcs

The man page, version 0.1.


44774 15-Mar-1999 dcs

Remove redundant code.


44758 14-Mar-1999 dcs

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


44750 14-Mar-1999 msmith

Fix syntax for boot command

Noticed by: Ruslan Ermilov <ru@ucb.crimea.ua>


44630 10-Mar-1999 kato

Sync with sys/boot/i386/loader/Makefile revision 1.30.


44629 10-Mar-1999 kato

Sync with sys/boot/i386/libi386/bootinfo.c revision 1.17.


44622 10-Mar-1999 dcs

Install new loader.rc stuff.


44603 09-Mar-1999 dcs

New loader.rc stuff.

Reviewed by: jkh


44572 08-Mar-1999 dcs

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

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


44571 08-Mar-1999 dcs

Increase ficl's dictionary size, in preparation for the newer loader.rc.


44570 08-Mar-1999 dcs

Fix a number of memory leaks and other memory-related disorders.

Also, unbreak the breakage introduced at the last revision of module.c.
This changes the semantics of mod_searchfile() (and mod_searchmodule())
to make the caller's responsibility freeing the buffer returned. This
is different from other functions in loader's code, and was done as a
fix for kern/9631. If someone wants to revert this to the original
behavior, don't forget to fix kern/9631 in another way.

This should also fix bin/10462, which was introduced as a result of the
first try at kern/9631 (module.c last revision).

PR: bin/10462
Submitted by: Takanori Saneto <sanewo@ba2.so-net.ne.jp>


44467 04-Mar-1999 kato

Make loader be able to load 1.2MB fd on machines w/ 1.44MB fdd.

Sumbmitted by: IMAI Takeshi <take-i@ceres.dti.ne.jp>


44466 04-Mar-1999 kato

Added an entry for 1.44MB fd.

Submitted by: IMAI Takeshi <take-i@ceres.dti.ne.jp>


44465 04-Mar-1999 kato

Oops, forgot to read boot.config file.

Submitted by: IMAI Takeshi <take-i@ceres.dti.ne.jp>


44463 04-Mar-1999 kato

When SCSI IDs are not contiguous, the loader could not find correct
unit number for da device. This commit fixes this problem.

Submitted by: IMAI Takeshi <take-i@ceres.dti.ne.jp>


44462 04-Mar-1999 kato

boot2 doesn't need to say 'Can't find file boot.config.'

Submitted by: IMAI Takeshi <take-i@ceres.dti.ne.jp>


44461 04-Mar-1999 kato

Fix character code of backslash. PC98 should use 0xfc instead of 0x5c.

Submitted by: IMAI Takeshi <take-i@ceres.dti.ne.jp>


44427 02-Mar-1999 dcs

Don't treat empty lines as end-of-file in include(). (I can't
believe this bug is still here... :-( )


44368 01-Mar-1999 kato

Sync with sys/boot/i386/btx/btx/btx.s revision 1.10.


44357 01-Mar-1999 rnordier

Save option, rather than slice, selected. This permits unattended
booting from other than drive 0, as the F5 keypress is saved and
"replayed."

Requested (some time ago) by: archie


44322 28-Feb-1999 dcs

Make $ print different lines in, well, different lines.


44296 26-Feb-1999 rnordier

Implement "setdrv" option


44274 25-Feb-1999 rnordier

Emulate a V86 "movl %cr0,%eax" instruction.

Feedback and testing: Kurt Hopfensperger <kjhmdjd@ix.netcom.com>


44255 25-Feb-1999 kato

Sync with sys/boot/i386/loader/Makefile revision 1.29.


44243 24-Feb-1999 msmith

Don't try protecting page 0; it seems that BIOS writers now feel it's
appropriate to check for Windows95 by polling for state in low
memory, with fatal results.

Submitted by: rnordier@freebsd.org


44210 22-Feb-1999 dcs

Fix assorted memory leak/buffer reuse problems.

Not restricted to, but including:

PR: kern/9631
Submitted by: Bill Fenner <fenner@parc.xerox.com>


44069 15-Feb-1999 tegge

Enable load of i386 ELF kernels with larger KVA range (e.g. starting at
0xe0100000u or 0xc0100000u instead of the usual 0xf0100000u).


43801 09-Feb-1999 jkh

Remove dictHashSummary internal function; it used doubles.

Submitted by: Daniel C. Sobral <dcs@newsguy.com>


43768 08-Feb-1999 kato

Sync with sys/boot/i386/loader/version revision 1.3.


43759 08-Feb-1999 dcs

Bumb up loader's version.

Reviewed by: Michael Smith <msmith@freebsd.org>


43738 07-Feb-1999 dcs

Remove strange-looking quotes. This part of the code is #if'ed out,
and the variable doesn't even exist (though it is referenced elsewhere).
Just make sure it produces error messages when Mike get back to it.

PR: kern/9934
Submitted by: Adrian Filipi-Martin


43615 04-Feb-1999 dcs

Make FICL_TRACE default.

Add freebsd.fr, for FreeBSD specific forth source. Add $ and %, to
replace the lost @ and - functionality of include. $ has the opposite
behavior of @ though, since the default behavior was inverted.


43614 04-Feb-1999 dcs

Make use of prototypes to silence warnings.

Change include() so it will be able to load files with forth code,
instead of just builtins. Remove #@- from the include section of the
help file, since they don't work in the new version of include, unless
BOOT_FORTH is not defined.

Change bf_run() so it will return the result returned by ficlExec(). Also,
make bf_run() push "interpret" to be executed by ficlExec(), since ficlExec()
doesn't do it by itself. (Things worked previously because nothing
recursed through ficlExec() by the way of bf_run()).

Change/extend comments on builtin behavior.

Search for "interpret" at the end of bf_init(), so /boot/boot.4th can
provide it's own version.

Remove dead code.


43613 04-Feb-1999 dcs

Make ficlExec recursive. This removes vmReset and vmQuit from the
error cases, but the replacement should be doing everything they
did, except what did shouldn't be doing, and might do a little more
they ought to be doing.


43602 04-Feb-1999 dcs

Fix ficlExecFD to take kern/9412 changes into account. Also modify it
not to vmThrow errors. This is not what the comments say it does, and
it doesn't work when there is no ficlExec environment (like it's only
use in sys/boot/common/interp_forth.c).

PR: bin/9772


43601 04-Feb-1999 dcs

The trace facility was full of bugs. Correct that by using the
right variable.

PR: bin/9756


43600 04-Feb-1999 dcs

Silence a warning.
PR: bin/9754


43599 04-Feb-1999 dcs

The previous fix for "type" was absolutely lousy. Not only the buffer
allocated was not big enough, but it ended up to being used where it
was supposed to be used. The person who did that ought to be shot, but
since I'm a good person, I'll forgive myself...

PR: bin/9743


43598 04-Feb-1999 dcs

Add conditional compilation facilities to ficl. This had been previously
committed to RELENG_3 instead of HEAD, so let's HEAD catch up.

PR: bin/9662


43563 03-Feb-1999 msmith

Mention the net.inet.tcp.tcbhashsize tunable.


43561 03-Feb-1999 kato

PC98 version of new boot loader. Because boot2 has not yet ported,
files in boot2 directory are copies from legacy biosboot.

Submitted by: IMAI Takeshi <take-i@ceres.dti.ne.jp>


43491 01-Feb-1999 jkh

Whoops! Forgot to include Mr. Sobray's more command in the last set
of commits.

Submitted by: Daniel C. Sobral <dcs@newsguy.com>


43374 29-Jan-1999 rnordier

Check size of partition before using it.


43368 29-Jan-1999 msmith

Document the machdep.pccard.pcic_irq tunable, which allows the user to tune
the interrupt which will be given to the PCIC. If the value supplied is
illegal or not available, interrupts will be turned off and polled mode
used instead.


43321 28-Jan-1999 jkh

Make builtin's state-aware in loader.

Submitted by: Daniel C. Sobral
PR: 9663


43205 25-Jan-1999 rnordier

Fix a couple of further bugs: missing argument to sprintf() and
"==" used for "=".


43189 25-Jan-1999 rnordier

Correctly record the end of the a.out symbol table. In practice, a
bootinfo structure where bi_esymtab < bi_symtab was being passed
to the kernel. In the case of older 2.x kernels, this was causing
garbage to be printed to the video console, followed by an exception.

This should resolve a problem reported on -current by Peter Jeremy
<peter.jeremy@auss2.alcatel.com.au>.


43139 24-Jan-1999 msmith

From the PR:

I added a FICL_TRACE-conditioned trace facility based on "see".
It is ugly because words' functions are almost all static, and ficlExec,
where the trace has to be located, can't get their pointers. So, #ifdef
this staticization, and add most of see's body into ficlExec. Duplication
of code, uglyness, etc. But it is cleanly #ifdef'ed, and works like a
charm.

It does not provide "step" facility, though, just trace. It is
tunable at run-time through "trace!". If anyone (most likely me :) ever
wants a step facility, I'll add it. Should be easy.

PR: bin/9652
Submitted by: "Daniel C. Sobral" <dcs@newsguy.com>


43137 24-Jan-1999 msmith

Bleh. Missing 'unit =' doesn't help legacy num_ide_disks code.

PR: bin/9651
Submitted by: "Daniel C. Sobral" <dcs@newsguy.com>


43135 24-Jan-1999 msmith

From the PR:

FICL's TYPE copies the counted string to HERE, as abial has
remarked. Answering to abial's question, this is NOT garanteed to have
enough space.
...
We have dynamic memory. Even before memory-alloc got in, we
already had dynamic memory. Use it, then! (ficlMalloc is sysdep, so I
suppose that's why it was not used for TYPE; ficl is probably designed
to work without a working ficlFree).

Submitted by: "Daniel C. Sobral" <dcs@newsguy.com>


43115 24-Jan-1999 msmith

Document root_disk_unit


43114 24-Jan-1999 msmith

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

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


43113 24-Jan-1999 msmith

Fill in the bi_bios_dev field in the bootinfo struct; the loader doesn't
guess this value well in anything other than the simplest of situations.


43078 22-Jan-1999 msmith

Add EXCEPTION word set.

Make TIB handling use buffer size to conform with ANS Forth.

Add ANS MEMORY-ALLOC word set.

See the PRs for extensive details.

PR: kern/9412 kern/9442 kern/9514
Submitted by: PRs from Daniel Sobral <dcs@newsguy.com>


43077 22-Jan-1999 msmith

bootstrap.h
help.common
interp.c
Rename the 'source' command to 'include' in order to avoid conflict
with the ANS Forth command of the same name. (kern/9473)

interp_forth.c:
Changes from kern/9412 (EXCEPTION word), kern/9442 (TIB buffer
sizing) and an improved version of kern/9460 (set
version numbers).

load_aout.c:
Trim some obsolete #if 0'ed cruft.

pnp.c:
Tidy the pnpscan output, turn off the module scanning until we
sort out how to do it right.

PR: kern/9412 kern/9442 kern/9460 kern/9473
Submitted by: PRs from Daniel Sobral <dcs@newsguy.com>


43072 22-Jan-1999 rnordier

Fix extraneous free() on error.


43068 22-Jan-1999 rnordier

Fix read error not being detected.


43059 22-Jan-1999 rnordier

Push version numbers up to 1.00. This is just intended to reflect
that the BTX code can be regarded as stable: there are no associated
code changes.

Suggested by: obrien


43016 21-Jan-1999 msmith

Add 'set tunables' help, list the kernel tunable values that can currently
be overridden.


42807 18-Jan-1999 msmith

Transition from using Perl to using awk for our text-manipulation
needs. This removes the dependancy on Perl for the generation of the
loader, allowing the world to be built on a perl-free system.

Submitted by: Joe Abley <jabley@clear.co.nz>


42713 16-Jan-1999 jdp

Replace duplicated "old" linker set definitions with an include of
<sys/linker_set.h>. Note, this isn't used on the i386.


42682 15-Jan-1999 abial

Fall back to /boot/boot.conf, if /boot/loader.rc was not fount. This is
to cover the transition period.

Suggested by: msmith


42679 14-Jan-1999 abial

Change counter-intuitive pc@ and pc! to inb and outb.

Submitted by: jkh


42638 13-Jan-1999 rnordier

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


42636 13-Jan-1999 abial

Change /boot/boot.conf to /boot/loader.rc - this name reflects what it
really is.

Agreed upon by: jkh, msmith and many others


42634 13-Jan-1999 abial

Add words "pc!" and "pc@" which allow to manipulate I/O ports. This can
be helpful when directly fiddling with PC hardware.

Also, define "arch-i386" appropriately, as suggested by Daniel C. Sobral.


42620 13-Jan-1999 msmith

Typo in patch application.

PR: kern/9459
Submitted by: "Daniel C. Sobral" <dcs@newsguy.com>


42519 11-Jan-1999 rnordier

Drop boot.help support.


42512 11-Jan-1999 msmith

No builtin command resets getopt before using it, causing
problems in case a wrong option was given previously, and no option
is given to the next command.

PR: kern/9371
Submitted by: "Daniel C. Sobral" <dcs@newsguy.com>


42510 11-Jan-1999 msmith

Preserve the previous loader as loader.old.

Note no matching commit for the Alpha, as the alpha boot0 stage does
not have the ability to prompt for user input.

PR: kern/9406
Submitted by: "Daniel C. Sobral" <dcs@newsguy.com>


42493 10-Jan-1999 msmith

Disable kzipping the loader; it seems to be breaking the aout-to-elf build


42488 10-Jan-1999 steve

Remove redundant line of code.

PR: 9364
Submitted by: Daniel C. Sobral <dcs@newsguy.com>


42480 10-Jan-1999 rnordier

Use etc/make.conf settings for serial port and speed.

Submitted by: rvb
Reviewed by: bde


42478 10-Jan-1999 peter

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

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

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


42465 10-Jan-1999 msmith

Enable escapes for $ to make it possible to insert variable names into
other variable values.


42446 09-Jan-1999 msmith

Explicitly look for kzip in /usr/bin, again this is a stopgap, to avoid
making kzip a build tool.


42420 09-Jan-1999 msmith

kzip the loader, this shrinks it to about 60% of its original size.
Note that this is a stopgap with dependancies on the a.out tools.


42419 09-Jan-1999 msmith

Extend bd_print() so that it displays slices and partitions on disks.


42418 09-Jan-1999 msmith

Add a description for 'lsdev' so that it shows up in the '?' display


42318 05-Jan-1999 msmith

Alpha-specific help topics (currently empty)


42291 04-Jan-1999 peter

Fix a potential sign extension bug on 8-bit chars.
Outputting a backspace isn't supposed to be destructive.. It isn't on
most terminals, nor on the standard bios output (vs. TERM_EMU mode)


42290 04-Jan-1999 peter

Fix variable initialization.. It was written with '==' instead of '-'.
#include <string.h> for string prototypes.


42289 04-Jan-1999 peter

Clean some unused variables lint


42288 04-Jan-1999 peter

Don't forget a trailing \n when loading a kernel that has been stripped.
(This might make ELF_VERBOSE look funny, but I'm tempted to delete that
anyway)


42274 04-Jan-1999 msmith

Restore dependancy to build loader.help here


42273 04-Jan-1999 msmith

Add dependancy to build loader.help here


42269 03-Jan-1999 msmith

First cut at generating loader.help for the alpha


42268 03-Jan-1999 msmith

Reenable generation of the loader.help file


42255 02-Jan-1999 jkh

Update for new boot block location.


42209 31-Dec-1998 abial

Add support for some FACILITY words:

key? ( -- flag) \ check to see if there's a key to be read from input
ms ( u -- ) \ wait that many milliseconds
seconds ( -- u ) \ get number of seconds from midnight.

'words' now outputs the list page by page - this probably should go
through libstand's pager, but will have to wait for closer integration of
built-ins with Forth...

Submitted partially by: W Gerald Hicks <wghicks@bellsouth.net>


42207 31-Dec-1998 abial

Add back ability to make beeps when using new TERM_EMU.

Submitted by: W Gerald Hicks <wghicks@bellsouth.net>


42002 22-Dec-1998 abial

Add simple terminal emulator, compatible with cons25. Currently supported
capabilities are: AF, AB, cm, ho, me, cd. The code is hidden behind
-DTERM_EMU - should it cause any problems, you can remove this define
to get back the old behaviour.

You'll find some examples how to use it in src/share/examples/bootforth.

Reviewed by: jkh


42001 22-Dec-1998 abial

Add new word ".#" which acts like "." but doesn't output a space separator.
I found it impossible to output parametrized strings like "\033[%d;%dH"
without building them first in pad area.


42000 22-Dec-1998 abial

* Begin integration of built-ins with Forth: leave the exit code from
a built-in command on Forth stack.
* Fix a bug which was causing a panic when loading stripped aout kernels.

Reviewed by: jkh


41861 16-Dec-1998 n_hibma

Removed dynamic loading of FileHandle


41838 16-Dec-1998 msmith

Disable build/install of boot.help until we sort out how to construct it
in the makeworld environment.


41822 15-Dec-1998 msmith

Reformat help to improve subtopic display appearance, other minor
cleaning. The 'help' command in the loader should now be usable and
hopefully informative.


41821 15-Dec-1998 msmith

Build the composite help file from the generic and architecture-specific
help files, sorting topics and subtopics to allow maximum flexibility.


41810 15-Dec-1998 msmith

unlocalise build date (merge from i386)


41587 07-Dec-1998 ache

unlocalize date
Submitted by: Cejka Rudolf <cejkar@dcse.fee.vutbr.cz>


41540 05-Dec-1998 rnordier

Revise some comments and labels.


41412 29-Nov-1998 rnordier

Drop EDD support detection, though retain configurable use of disk
packet interface. Add booteasy-style F5 support. Add no-update
option. Implement various space optimizations and consistency fixes.


41285 22-Nov-1998 rnordier

Drop use of BIOS int 0x14 services in favor of direct port I/O.

Feedback and testing: Adrian Filipi-Martin <adrian@ubergeeks.com>


41259 20-Nov-1998 archie

Fix misallocation of buffer bug (too short)


41254 19-Nov-1998 paul

This fixes a bug in the bcache code whereby false cache hits occur
the first time block 0 is read. This fix initialises the block
numbers to -1 which isn't the most correct thing for a daddr_t but
it isn't likely to cause a problem in the boot blocks and it could
do with a more thought out fix later.

The bug is probably benign on the i386 but on the alpha it can
cause initial file opens to fail. This is the cause of the "can't
open /boot/boot.conf" errors.

It appears on the alpha because of a number of combining factors.
On the alpha the LABELSECTOR is 0 so block 0 needs to be read in
from the media. The first time this happens you get a false hit
because the bc_blkno field is zero initially. Also, the timestamp
check against this cache hit succeeds because on the alpha a hacked
getsecs() function can return 0 when it starts counting so that
the zero initial timestamp + BCACHE_TIMEOUT is greater than the
current time until getsecs() has counted passed BCACHE_TIMEOUT.

The overall effect is that the first open() that occurs gets a
false cache hit and returns garbage to the bd_strategy() function
which then fails the open() call. This false hit then stays in the
cache until BCACHE_TIMEOUT getsecs() ticks have passed; all open()
calls during this time fail.

This explains why you can generally access the media by the time
you get to interp() and start issuing commands but the earlier
attempts to run the boot scripts are failing.

It's possible that this is causing the problem switching to the
mfsroot floppy as well but I haven't confirmed that.


41140 13-Nov-1998 msmith

Add documentation for $rootdev.


41139 13-Nov-1998 msmith

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

Prompted by Kevin Street <street@iname.com>


41107 12-Nov-1998 jkh

bootforth seems to be working well enough for me and others to turn
on by default. If it causes trouble, it's very easy to switch off again.


41085 11-Nov-1998 rnordier

Revise error messages.


41013 08-Nov-1998 rnordier

Prevent boot.config being parsed more than once.


41010 08-Nov-1998 rnordier

Drop the familiar 'text=xxxx data=xxxx bss=xxxx ...' display while
loading. This eliminates noise when loading boot/loader; and when
loading a kernel, they generally flash by too fast to be
intelligible anyway.


41008 08-Nov-1998 rnordier

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

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


40995 07-Nov-1998 jkh

o Add proper stack checking to all file words
o add fkey and fread
o eliminate fexists now that this can be expressed in HLL forth
( : fexists fopen dup -1 <> if fclose 1 else drop 0 then ; ) :-)

Once we get the ability to write files, it should be possible to do
stand-alone rescue work from the 3rd stage boot. :)


40989 07-Nov-1998 jkh

Eliminate much code cruft by extending simple file I/O API to include
fopen and fclose.


40988 07-Nov-1998 jkh

Eliminate much code cruft by extending simple file I/O API to include
fopen and fclose. Also look for /boot/boot.4th now and, if found,
load its contents.


40987 07-Nov-1998 jkh

Take init out of here - it's a layering violation.


40984 07-Nov-1998 jkh

Don't have debugging on by default - it makes testing annoying. :)


40982 07-Nov-1998 jkh

OK, fload/fexec work properly when both compiling and interpreting
now. Gack.


40978 06-Nov-1998 jkh

switch words to default mode.


40977 06-Nov-1998 jkh

Submit better fix to the prompt bug.


40976 06-Nov-1998 jkh

Make fexists/fload work with existing string literals instead. Doing
my own string literal handling is just too wonky.


40971 06-Nov-1998 jkh

Argh, I had this right[er] before. More commits to follow.


40951 06-Nov-1998 jkh

Use proper literal names.


40950 06-Nov-1998 msmith

Ack. Create parseable command tail properly, and eat args out of the TIB.


40949 06-Nov-1998 msmith

Don't not print the prompt string; not doing this has funny side-effects.
Make the prompt an empty string instead.


40948 06-Nov-1998 msmith

Don't use the poxy vmGetString interface (who uses counted strings these
days?), get the input buffer ourselves. Add some debugging code.


40940 05-Nov-1998 rnordier

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


40929 05-Nov-1998 jkh

Remember a bit more of my forth and do:

o Add fexists word to check for the presence of a file
o make fexists and fload immediate words which DTRT both interpreted
and compiled (doh!)
o add an init word which gets run at bootstrapping time to do extra
post-coldload initialization (in the default implementation, we
look for /boot/boot.4th and load it if found).


40927 05-Nov-1998 jkh

1. rebuild all elements of testmain properly for safety.
2. add fload and key prims for doing simple file and terminal I/O, respectively


40924 05-Nov-1998 msmith

Explicitly invoke perl to run the softwords.pl script in case the
script is not executable.
Submitted by: Don Lewis <Don.Lewis@tsc.tdk.com>


40890 04-Nov-1998 msmith

Improve the assertion testing for successful softword compilation.
The excessive use of assert() vs. robust error checking is annoying.


40884 04-Nov-1998 msmith

Turn off -g accidentally left in from testing.


40883 04-Nov-1998 msmith

Fix includes; we were still pulling in <stdlib.h> in some places.
Support building a standalone interpreter with 'make testmain', remove
win32 and egregious gets() in testmain.c


40882 04-Nov-1998 msmith

Use a smaller default dictionary to waste less space.


40879 04-Nov-1998 jkh

Respect ${.OBJDIR} properly when looking for libficl.a


40877 04-Nov-1998 msmith

Add required parts for BootForth building (currently disabled and
untested). Only suitable for i386 at the moment, as we are missing
setjmp/longjmp on the Alpha.


40876 04-Nov-1998 msmith

Make this work in the libstand environment; don't use stdio/stdlib headers.


40875 04-Nov-1998 msmith

Add BootForth hooks; if BOOT_FORTH is defined, pass every line read
to the Forth interpreter. Instantiate all of our inbuilt commands
as Forth words, and handle them being called from there.

Add my copyright to the bcache module (oops).


40871 03-Nov-1998 msmith

Include "bootstrap.h" to get a definition for bcache_devdata.

Submitted by: jkh


40843 03-Nov-1998 msmith

Add the Ficl (Forth Inspired Command Language) interpreter. If all goes well,
this will allow us to manage bloat in the loader by using a bytecoded HLL
rather than lots of C code. It also offers an opportunity for vendors
or others with special applications to significantly customise the boot
process without having to commit to a divergent code branch.

This early commit is to allow others to experiment with the most effective
mechanisms for integrating FICL with the loader as it currently stands.

Ficl is distributed with the following license conditions:

"Ficl is freeware. Use it in any way that you like, with the understanding
that the code is not supported."

All source files contain authorship attributions.

Obtained from: John Sadler (john_sadler@alum.mit.edu)


40835 02-Nov-1998 msmith

Ok, the entry aging algorithm sucked; 1s time resolution is not enough for
LRU. Use a 31-bit counter instead. If we decide to do heavy I/O through
the bootloader this will have to be revisited.


40834 02-Nov-1998 msmith

Implement a simple LRU block cache. By default this is initialised to 16k,
and will bypass transfers for more than 8k. Blocks are invalidated after
2 seconds, so removable media should not confuse the cache.

The 8k threshold is a compromise; all UFS transfers performed by
libstand are 8k or less, so large file reads thrash the cache.
However many filesystem metadata operations are also performed using
8k blocks, so using a lower threshold gives poor performance.

Those of you with an eye for cache algorithms are welcome to tell me
how badly this one sucks; you can start with the 'bcachestats' command
which will print the contents of the cache and access statistics.


40833 02-Nov-1998 rnordier

Revise a few comments.


40832 02-Nov-1998 msmith

Standardise on ';' as a component separator; it seems to be a little more
common than ','.


40807 01-Nov-1998 rnordier

Ignore, rather than emulate, an i386 'hlt' instruction (though for
most practical purposes, this should be indistinguishable from a
more strictly correct approach).

Feedback and testing: msmith


40793 31-Oct-1998 dfr

* Extend the memory available for the heap from 256k to 512k.
* Embed the stack into the bss section for loader and netboot. This
is required for netboot since otherwise the stack would be inside our
heap.
* Install loader and netboot in /boot by default.
* Fix getbootfile so that it searches for a ',' instead of a ';'
when terminating the filename.


40775 31-Oct-1998 msmith

- Add a new command 'lsdev' to list devices which might be likely to host
filesystems.
- New 'help' command and data in the help.* files (not yet installed),
provides topic and subtopic help, indexes, etc.
- Don't crash if the user tries to set an invalid console. Be helpful
instead.
- Expand tabs (badly) on the i386 video console.
- Some minor cosmetic changes.


40753 30-Oct-1998 luoqi

Fix an uninitialized variable in the `dangerously dedicated disk' case.


40745 30-Oct-1998 msmith

Make the BTX loader much more quiet about what it's doing. This removes
most of the "what the (*^&%(*^ was that?" stuff that normally flies by.


40705 28-Oct-1998 msmith

Simplify the "is a character ready" test, so that we don't return a false
negative for keypresses with zero ascii values. This is in line with the
comconsole test, rather than being more ambitious.

Submitted by: rnordier


40675 27-Oct-1998 rnordier

Avoid interruptions while talking to keyboard controller.


40674 27-Oct-1998 rnordier

biosboot compatibility fix: change behavior of backspace in getstr().
Noticed by: abial

Optimize away a few bytes to make space for the above.


40621 24-Oct-1998 msmith

Reserve some space for the stack in the region we recover from the initial
bootloader.
Submitted by: dfr


40620 23-Oct-1998 msmith

Clean the ${BASE}.sym file as well.


40619 23-Oct-1998 msmith

Remove a debugging copy of offsetof() that snuck in.


40618 23-Oct-1998 msmith

Enable the PCI BIOS PnP enumerator.


40617 23-Oct-1998 msmith

PnP enumerator using the PCI BIOS. This is needlessly complex due to the
lack of a simple "enumerate all PCI devices" function.


40601 22-Oct-1998 msmith

PnP BIOS enumerator; mostly useful for hunting PnP devices that are supported
by the system BIOS rather than supporting ISA PnP.


40600 22-Oct-1998 msmith

Add a dependancy on the BTX crt0 object
Add the biospnp handler to the pnp handler array
Drop some old debugging code


40599 22-Oct-1998 msmith

Add biospnp.c


40598 22-Oct-1998 msmith

Pop the return address off the stack before making a V86_CALLF call;
this allows us to implement what look like C function calls from user
space "directly" to v86 mode code. (Used for calling the PnP BIOS)


40597 22-Oct-1998 msmith

Export an interface for presetting the ISA PnP read port address.
Make the EISA ID formatter generally available


40556 21-Oct-1998 msmith

Bye-bye setdefs.


40555 21-Oct-1998 msmith

- Enable PnP and ISA PnP code.
- Use the ISA PnP enumerator.
- Use the new linker set code, throw out the gensetdefs stuff.
- Produce an intermediate loader image that has symbols stripped, to aid
- in debugging.
- Supply ISA port access functions required for ISA PnP


40554 21-Oct-1998 msmith

Don't depend on being part of the kernel tree. If we are, use the kernel's
<machine> includes rather than the system's.


40553 21-Oct-1998 msmith

Make ISA PnP work. This successfully enumerates as many ISA devices as I
can fit into my test machine.

- Move to using STAILQs rather than ad-hoc singly-linked lists.
- Use a mostly procedural interface to the PnP information. This
improves data-hiding.

Implement a new linker-set technique (currently on i386 only but should work
on Alpha as well). This is a good candidate for replacing the current
gensetdefs cruft completely.


40541 20-Oct-1998 rnordier

Make serial port, data format, and bps configurable.


40531 20-Oct-1998 msmith

Hex constants should only have one '0x' prefix.


40524 19-Oct-1998 rnordier

Make configurable (a) whether to use int 0x13 extensions; (b) timeout
value. Ignore failure to update mbr sector. Disable interrupts while
using extended registers. Default to F1 not F2.


40521 19-Oct-1998 dfr

Reclaim the 48k used by the first bootstrap stage by adding it to the malloc
pool.


40518 18-Oct-1998 dfr

Rename boot2 to loader.


40493 17-Oct-1998 rnordier

Set BINMODE to 444.


40477 17-Oct-1998 rnordier

Fix some glitches in the input routine:
Don't display a \b if not acting on it.
Don't process binary zero chars (which result from pressing function
keys, etc. on the PC).


40476 17-Oct-1998 rnordier

Having probed the keyboard, turn off the -P flag.


40474 17-Oct-1998 rnordier

Treat all options as toggles (ie. -c -c is the same no -c). Since
the boot.config settings are persistent, this seems to provide a
useful override capability, and should break only on broken
boot.config's.

Output a cosmetic newline if booting with no input.


40472 17-Oct-1998 rnordier

biosboot compatibility fix:
If we have a boot.config command, display it.


40471 17-Oct-1998 rnordier

biosboot compatibility fix:
Read boot.help before parsing boot.config. We were parsing
boot.config first, which could result in boot.help being read
from a different location (or not found), which would probably
just cause surprise, without being useful.


40465 17-Oct-1998 peter

Load the first page of the file and use the headers in it. This should
avoid the need to seek back to offset zero which is causing trouble on
the Alpha with a gzipped kernel.


40459 16-Oct-1998 msmith

Turn of disk debugging by default (suppress annoying "partition marked as
unused" diagnostic on floppies).


40429 16-Oct-1998 peter

"fix" the gzipped kernel load problem by having the loader check that it
can seek back to the first PT_LOAD and doing a close/reopen if it cannot.
This is because the first PT_LOAD section includes the ELF headers.
This fixes gzipped kernels on the i386, it should solve mike's problem
for the Alpha.


40416 15-Oct-1998 rnordier

Fix path to sio.s


40414 15-Oct-1998 dfr

Change some printfs so that ELF_VERBOSE prints meaningful values on the alpha.


40413 15-Oct-1998 dfr

Fix the bootinfo so that the right values actual make it into the kernel.


40404 15-Oct-1998 rnordier

Add serial, dual, and probe-keyboard support.


40393 15-Oct-1998 peter

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


40358 14-Oct-1998 rnordier

Activate boot2.


40348 14-Oct-1998 peter

Link fdboot to boot1 as well.


40341 14-Oct-1998 peter

Initial attempt to update the Alpha loader and kernel to use the machine
independent elf loader and have access to kld modules. Jordan and I were
not sure how to create boot floppies, and the things we tried just made
SRM laugh in our faces - but it was upset at boot1 which was not touched
by these changes. Essentially this has been untested. :-(

What this does is to steal the last three slots from the nine spare longs
in the bootinfo_v1 struct to pass the module base pointer through.

The startup code now to set up and fills in the module and environment
structures, hopefully close enough to the i386 layout to be able to use
the same kernel code. We now pass though the updated end of the kernel
space used, rather than _end. (like the i386).

If this does not work, it needs to be beaten into shape pronto. Otherwise
it should be backed out before 3.0.

Pre-approved in principle by: dfr


40338 14-Oct-1998 peter

Try and get the sys/* and machine/* includes via relative paths. This
saves having to do a 'make includes' after touching any header file for
the boot code.


40336 14-Oct-1998 peter

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


40330 14-Oct-1998 rnordier

Fix btx include path.


40327 14-Oct-1998 peter

Tweak the output one more time again. The kernel or module pathname
is useful, and usually fits all on one line with the load sizes.


40326 14-Oct-1998 rnordier

Include <bsd.prog.mk>. Add install target (to /boot for now).


40325 13-Oct-1998 rnordier

Fix flow of control after directory listing; enable EDD support;
cosmetics.


40323 13-Oct-1998 rnordier

Make v86.ctl default more explicit; simplify read error-handling;
twiddle.


40320 13-Oct-1998 rnordier

Adjust NDEV value.
Optimize reading of system time.


40314 13-Oct-1998 rnordier

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


40308 13-Oct-1998 rnordier

Don't use an absolute path to objcopy.
Noticed by: Scott Mace <smace@intt.org>


40307 13-Oct-1998 rnordier

Improve drive recognition and handling.


40291 13-Oct-1998 peter

Make the ELF load messages cleaner.


40270 12-Oct-1998 rnordier

This commit was generated by cvs2svn to compensate for changes in r40269,
which included commits to RCS files with non-trunk default branches.


40269 12-Oct-1998 rnordier

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


40254 12-Oct-1998 peter

Only print kernel entry point during load.
Drastically quieten down the verbose load progress messages. They were
more useful for debugging than anything, but are beyond a joke when loading
a few dozen modules.
Simplify the ELF extended symbol table load format. Just take the main
symbol table and the string table that corresponds. This is what we will
be getting local symbols from. (needed for the alpha stack tracebacks).
Use the (optional) full symbol tables in lookups. This means we have to
furhter distinguish between symbols that can come from the dynamic linking
table and the complete table.
The alpha boot code now needs to be adapted as ddb/db_elf.c cannot use
the simpler format.
I have not implemented loading the extended symbol tables from the syscall
interface yet, just for preloaded modules.
I am not sure about the symbol resolution. I *think* it's possible that
a local symbol can be found in preference to a global, depending on the
search sequence and dependency tree.


40253 12-Oct-1998 peter

Only print filename and entry address for the kernel itself. The rest
have a meaningless entry as they are relocatable.


40245 12-Oct-1998 rnordier

Drop .MAKEFLAGS: hack.


40244 12-Oct-1998 rnordier

Do without head and tail: they're pretty unnecessary here anyway.


40243 12-Oct-1998 rnordier

Use rather than for linking. This allows the new rather
than stale version of libstand.a to be found.

After this change, the new boot code is apparently building correctly
in a make world.


40218 11-Oct-1998 rnordier

Override for ELF.


40217 11-Oct-1998 rnordier

Override for ELF. Override .s.o suffix rule.


40216 11-Oct-1998 peter

Fix a warning that's been bugging me for ages.


40215 11-Oct-1998 peter

Fix a warning


40214 11-Oct-1998 peter

Probe all consoles, not just the first. It doesn't make a lot of
difference, but might later on when we implement some sort of multi-head
console mode. Select a console after probing them all.
Don't strdup a potentially NULL return from getenv().
If we don't select an active console, choose the first regardless.
Call the console init function, at startup time and on a manual change.
The env_setenv() function needs EV_VOLATILE because it's pointing to
data that isn't malloc'ed and will cause a fault if it's freed later.


40213 11-Oct-1998 peter

Cosmetic: After the autoboot timeout, print a \n.


40212 11-Oct-1998 peter

Only call vidc_init() once (unless forced).
Cosmetic change to the init-time character eater (like, make it increment
the index counter - if there's a problem, it would sit there in an infinite
loop instead of only running 10 times).


40211 11-Oct-1998 peter

Fix comconsole mode. The int 0x14 read and status commands were reversed.
Also, make sure we set %dx each time around otherwise the commands
suddenly start trying to work on things like com92 instead of com1.
Make sure comc_init() is only run once.
Cosmetic change to init-time character eater.


40210 11-Oct-1998 peter

Warn that one of the DEBUG statements has a v86 recursion bug.


40209 11-Oct-1998 peter

Fix comment to match code


40195 11-Oct-1998 dima

add <sys/linker.h>


40182 10-Oct-1998 rnordier

Fix a typo.
Output another newline before invoking bootstrap.


40149 09-Oct-1998 rnordier

Turn off the new /sys/boot stuff (except boot0) unless OBJFORMAT
is elf. (The BTX client must be ELF, though it is packaged as a.out
for compatibility.)


40146 09-Oct-1998 peter

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


40145 09-Oct-1998 peter

Turn symbol table info passing back on, although it's probably not
particularly useful in this form. KLD can deal with it much better.
setenv kernelname moved earlier.


40144 09-Oct-1998 peter

Remove kernelname setenv, the common code does it.
Use the metadata for symtab pointers, mainly to keep it common with
elf_freebsd.c.


40143 09-Oct-1998 peter

Implement preloading for elf modules
- get dependency info from PT_DYNAMIC's DT_NEEDED tags.
- store MODINFOMD_DYNAMIC for the kernel's later use
setenv kernelname when we have it
Fix firstaddr/lastaddr calculation (duh! :-)
Explicitly skip string table with section names in it.


40142 09-Oct-1998 peter

Preload support for a.out KLD not implemented yet. (almost)
KLD modules are *not* PIC. (Shared libs are pic to avoid relocations
causing copy-on-write, that's irrelevant here).
setenv kernelname when we load it.
Use MODINFO_SSYM/ESYM for each symbol section when (if) there are
more than one being loaded.


40141 09-Oct-1998 peter

Use a consistant module search path (same as kernel will be).
Use new dependency mechanism.


40140 09-Oct-1998 peter

loader <-> kernel preload module interface constants moved to common file.
Remove Mike's explicit data structures for dependency info. This is
done via DT_NEEDED etc in the dynamic section for now. This may need
to be revisited later on.


40124 09-Oct-1998 rnordier

Get this building as a.out or ELF.

With thanks to: jdp


40107 09-Oct-1998 msmith

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


40106 09-Oct-1998 msmith

Sync the MODINFO constants with <sys/linker.h>
Remove debugging in command_read().
Correctly strip leading controls on script commands.
Make 'ls' more DWIM in regard to pathnames. We can still do better.


40034 07-Oct-1998 peter

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


40032 07-Oct-1998 msmith

Request the flags back when checking for keyboard status.
Submitted by: rnordier


40017 07-Oct-1998 msmith

Enable the DOS filesystem. NOTE: you will have to rebuild libstand in
order to be able to build again.


40016 07-Oct-1998 msmith

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


40015 07-Oct-1998 msmith

- VERBOSE_LS is obsolete, as the heap is much better behaved now.
- Don't whine about nodes we can't stat(); these are usually
symlinks that lead out of the filesystem.
- Autoboot is now controlled by $autoboot_delay, which is a value
in seconds or NO to disable autoboot.
- Don't autoboot at the end of boot.conf if we have already tried.
- Add a 'read' command to complement 'echo'. Both are still hidden.
- Improve the 'source' command/function so that it is possible to
source scripts off removable media. The entire script is read and
saved before beginning execution. Script lines beginning with
'@' will not be echoed when being executed. Script execution will
normally terminate at the first error, however if the script line
begins with '-' this behaviour is overriden for that command.


40014 07-Oct-1998 msmith

VERBOSE_LS is obsolete


39989 06-Oct-1998 msmith

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

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


39988 06-Oct-1998 rnordier

Fix for "get base memory" bug found and mostly fixed by Mike.


39987 06-Oct-1998 msmith

The BIOS memory size is only a word. Some BIOSsen have garbage in the other
16 bits we were reading here, causing loss of arguments.


39986 06-Oct-1998 msmith

Build boot0 as well.


39980 05-Oct-1998 rnordier

Install in /boot.


39974 05-Oct-1998 rnordier

This commit was generated by cvs2svn to compensate for changes in r39973,
which included commits to RCS files with non-trunk default branches.


39968 05-Oct-1998 msmith

Insert whitespace between unargv'd arguments.
Submitted by: "Louis A. Mamakos" <louie@TransSys.COM>


39962 04-Oct-1998 rnordier

Adjust setting of argument pointer for BTX 0.87.


39961 04-Oct-1998 rnordier

Allocate space for storing of arguments at the end of conventional
memory.


39960 04-Oct-1998 msmith

Don't include ELF symbol information yet - it causes the ELF DDB to
explode.


39944 04-Oct-1998 msmith

Improve the handling of the initial bootdev value from the previous loader.
Remove some unused code.


39943 04-Oct-1998 msmith

biosdisk.c
Allocate space for, and copy, NDOSPART slice entries from the
MBR, not just one. Add some extra debugging while we're at it.

elf_freebsd.c
Initialise the symbol table start/end pointers in case we don't
have them.


39931 03-Oct-1998 rnordier

Missing newline in heap command display.
Noticed by: jkh


39930 03-Oct-1998 rnordier

For system calls, reboot without prompting; for exceptions, display
message and await reset.


39921 03-Oct-1998 rnordier

Map all BTX system pages readable at ring 3.
This resolves the firmware problem first raised in connection
with PR 8105, although unrelated.


39919 03-Oct-1998 rnordier

bootinfo bi_vesa no longer exists.


39902 02-Oct-1998 msmith

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


39901 02-Oct-1998 msmith

Fix an egregious precedence bug.


39897 02-Oct-1998 msmith

Set $currdev according to our best guess at the BIOS device that the previous
bootstrap loaded us from.


39896 02-Oct-1998 msmith

aout_freebsd.c
Use bd_getdev() to work out a dev_t for the root device.
Allow $rootdev to override $currdev as the root device.

biosdisk.c
Save the slice table and disklabel when opening a disk.
Add bd_getdev(), which attempts to return a dev_t corresponding
to a given device. Cases which it still doesn't get right:
- The inevitable da-when-wd-also-exists
- Disks with no slice table (the slice number is not set correctly)
The first is difficult to get right, the second will be
fixed in an upcoming commit.

comconsole.c
vidconsole.c
getchar() should return an 8-bit value; some BIOSsen pack extra
information in %eax.

libi386.h
Remove some stale prototypes, add new ones.


39895 02-Oct-1998 msmith

Mark exit() as __attribute__((__noreturn__))


39894 02-Oct-1998 msmith

boot.c
Increase the robustness of the "is it time to boot yet" test;
if the time skipped the "when" time, we would miss it.
Don't spin in an endless loop if we don't find the first possible
kernel suggested. When we run out, don't try to load an empty
kernel name.

load_aout.c
printf format warnings


39887 02-Oct-1998 peter

First shot at loading elf symbols. Things are a bit strange because
of the ..umm.. "wierd" way binutils lays out the file. The section
headers are nearly at the end of the file and this is a problem when
loading from a .gz file which can't seek backwards (or has a limited
reverse seek, ~2K from memory).

This is intended to be compatable with the ddb/db_elf.c code and the
alpha/libalpha/elf_freebsd.c layout. I've studied these (which are NetBSD
derived) but did it a bit differently. Naturally the process is similar
since it's supposed to end up with the same result.


39857 01-Oct-1998 jkh

Override STRIP so installation doesn't try to strip the loader.


39851 30-Sep-1998 peter

Make 'make install' do something that might be useful.


39850 30-Sep-1998 peter

Stop libi386.a from being installed..


39834 30-Sep-1998 peter

Turn on i386-elf


39833 30-Sep-1998 peter

i386 ELF loader startup backend. On an ELF kernel booted with the 3-stage
bootblocks, the kernel shows up as the primary module:

[3:24am]~-100# kldstat
Id Refs Address Size Name
1 1 0xf0100000 ff00000 /kernel
^^^^ oops.. :-)

Based heavily on aout_freebsd.c. Hmm.. There's so much in common that
these could probably be combined and just check the metadata to see which
format it is.


39832 30-Sep-1998 peter

Save booted kernel name. Cosmetic cleanups.


39831 30-Sep-1998 peter

Fix typos.. The vector for "int 0x12" (get base mem) is not written in
hex as "0x1a". :-)
Fix a comment about the extended memory checks, that's int 0x15.


39830 30-Sep-1998 peter

ELF loader, part 1. It works with ELF kernels generated on the i386
so far, and should probably be able to be made to work for the alpha
without too much trouble once it's connected up and my assumptions tested.

I think (but have not tested) it will also load "old" ELF kernels that
were not linked with DYNAMIC headers.

The module glue is yet to come. (oh fun.. :-)

It does not explicitly load symbols [yet]. The _DYNAMIC data contains a
runtime symbol set that ddb can use via ddb/db_kld.c. It'll be missing
some detail that stabs normally provides (eg: number of args to a function,
line numbers, etc). On the other hand, those minimal symbols will always
be available even on a stripped kernel.

This is mostly stolen from load_aout.c with some ideas from
alpha/libalpha/elf_freebsd.c.


39828 30-Sep-1998 peter

s/out_loadmodule/aout_loadmodule/ in a printf diagnostic.


39827 30-Sep-1998 peter

Uncomment prototype for elf_loadmodule


39756 29-Sep-1998 peter

The bootinfo struct was getting clobbered or not passed through correctly.
Presumably VTOP doesn't work for static objects.
The easiest way to get it working was to reserve some space after the
environment strings and copy the bootinfo struct there.
Also, set RB_BOOTINFO, it's needed.

I got the code to load and run an unmolested kernel OK for the first time
with this system a few minutes ago - at last!. I did have to stop it
looking at the floppy though as BTX was trapping a mode 14 fault when
it look for /boot/boot.conf when no disk was in the drive. (I'm booting
from a scsi disk (bios disk 0x80)).

Now to teach it about ELF and modules :-)


39733 28-Sep-1998 peter

Only bcopy the correct amount of data from the buffer in case it is ever
in an overrun situation.


39732 28-Sep-1998 peter

Use the variable with the path in it for the error message.


39731 28-Sep-1998 peter

Reactivate the a.out kernel loader code.


39730 28-Sep-1998 peter

Missing return value that was kinda important.


39729 28-Sep-1998 peter

Argh, I don't believe how much time I wasted looking for this...
Bytes of extended memory = (extkb * 1024), not (extkb + 1024)


39725 28-Sep-1998 peter

The comconsole mode is accessed as 'comconsole' not 'com'.


39724 28-Sep-1998 peter

MBR magic is 0x55aa not 0xffaa.


39723 28-Sep-1998 peter

Precedence bug (?) causing probe problems.


39673 26-Sep-1998 dfr

* Add old UFS compatibility code to alpha/boot1.
* Fix a raft of warnings, printf and otherwise.
* Allocate the correct amount in mod_searchmodule to prevent an overflow.
* Fix the makefiles so they work outside my home directory (oops).


39664 26-Sep-1998 msmith

Recover the arguments passed in from the previous load stage, use them to set
the default console.
Print malloc stats from the new libstand allocator.


39662 26-Sep-1998 msmith

The BIOS can't perform a floppy operation where the destination crosses
a physical 64k boundary. Allocate a bounce buffer for such a transaction.


39660 26-Sep-1998 msmith

console.c
Allow the MI code to override the preferred console (eg. so that
an RB_SERIAL flag from the i386 boot2 can override the default
first active console)

isapnp.c
Use the standard format for ISA PnP IDs.

pnp.c
Allow trailing comments on lines, be less picky about line
contents.

ls.c
Cosmetic error message fix.

panic.c
Print the right arguments.


39646 25-Sep-1998 peter

Make these compile when there is an obj dir.


39530 20-Sep-1998 dfr

Make the alpha bootstrap build again, fix some warning and change sdboot to daboot.


39474 19-Sep-1998 msmith

Make libstand movable.

This completes the basic work required to make the loader work with BTX. We
now have a third-stage bootstrap shared by the i386 and Alpha.


39473 19-Sep-1998 msmith

- Improve debugging code.
- Make the "what do we do with a drunken disklabel" if-then-else-regardless
tangle easier to read.
- Don't count on the v86 structure being preserved between loop iterations,
as it may be trampled eg. by the DEBUG call.


39472 19-Sep-1998 msmith

Add a generic hexdump tool for debugging purposes.


39450 18-Sep-1998 msmith

Enable the biosdisk driver, duplicate -lstand as it both calls and is called
by the i386 platform library.


39449 18-Sep-1998 msmith

Synch with development version. Compiles and opens but doesn't work yet.


39448 18-Sep-1998 msmith

Remove 'panic' command (it works), don't ask for a keypress in panic, as
exit() does. Perhaps it shouldn't?


39447 18-Sep-1998 msmith

We lost all the files in crt/, so define the BIOS sector size here instead.


39446 18-Sep-1998 msmith

Use a.out.h to get all the correct bits in one place.


39444 18-Sep-1998 msmith

Oops, missed these. Machine-independant ISA PnP enumerator.


39441 17-Sep-1998 msmith

Initial integration of the i386 bootloader and BTX.

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


39274 15-Sep-1998 rnordier

Add exec syscall.


39178 14-Sep-1998 msmith

Resynch with working sources before BTX integration.

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


39165 14-Sep-1998 rnordier

Add BTX startup/interface code.


39125 13-Sep-1998 rnordier

Enable client entry point support.


39091 12-Sep-1998 rnordier

Add btxldr, a BTX loader for ELF clients.


39089 12-Sep-1998 rnordier

This commit was generated by cvs2svn to compensate for changes in r39088,
which included commits to RCS files with non-trunk default branches.


39088 12-Sep-1998 rnordier

BTX (aka the boot extender) is an i386 kernel that hosts 32-bit
bootstrap programs, and provides page-level protection, hardware
interrupt reflection, a virtual-8086 mode interface to BIOS, etc.


38789 04-Sep-1998 msmith

Generic plug-and-play enumerator infrastructure. Query supplied
enumerators, crossreference returned identifiers with a text-format
database and automatically load corresponding modules and dependancies.


38765 03-Sep-1998 jkh

Allow quoted strings (single or double) for grouping whitespace separated
items. Eliminate warnings.


38764 03-Sep-1998 msmith

Bootstrap updates.

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


38716 01-Sep-1998 msmith

New commandline/script parser, supports backslash quoting and environment
variable substitution.

Submitted by: Jordan Hubbard <jkh@freebsd.org>


38712 31-Aug-1998 msmith

Bootloader update.

- Implement a new copyin/readin interface for loading modules.
This allows the module loaders to become MI, reducing code duplication.
- Simplify the search for an image activator for the loaded kernel.
- Use the common module management code for all module metadata.
- Add an 'unload' command that throws everything away.
- Move the a.out module loader to MI code, add support for a.out
kld modules.

Submitted by: Alpha changes fixed by Doug Rabson <dfr@freebsd.org>


38475 22-Aug-1998 dfr

Minor tweaks to track a couple of i386 changes and to make it compile.


38466 21-Aug-1998 msmith

This commit was generated by cvs2svn to compensate for changes in r38465,
which included commits to RCS files with non-trunk default branches.


38465 21-Aug-1998 msmith

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

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

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