History log of /freebsd-current/sys/conf/files.i386
Revision Date Author Comments
# b9c6fa33 12-Apr-2024 John Baldwin <jhb@FreeBSD.org>

files.x86: Pull in some more duplicate lines from files.{amd64,i386}

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44759


# 031beb4e 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# a8926207 06-Jul-2023 Mitchell Horne <mhorne@FreeBSD.org>

Consistently provide ffs/fls using builtins

Use of compiler builtin ffs/ctz functions will result in optimized
instruction sequences when possible, and fall back to calling a function
provided by the compiler run-time library. We have slowly shifted our
platforms to take advantage of these builtins in 60645781d613 (arm64),
1c76d3a9fbef (arm), 9e319462a03a (powerpc, partial).

Some platforms still rely on the libkern implementations of these
functions provided by libkern, namely riscv, powerpc (ffs*, flsll), and
i386 (ffsll and flsll). These routines are slow, as they perform a
linear search for the bit in question. Even on platforms lacking
dedicated bit-search instructions, such as riscv, the compiler library
will provide better-optimized routines, e.g. by using binary search.

Consolidate all definitions of these functions (whether currently using
builtins or not) to libkern.h. This should result in equivalent or
better performing routines in all cases.

One wart in all of this is the existing HAVE_INLINE_F*** macros, which
we use in a few places to conditionally avoid the slow libkern routines.
These aren't easily removed in one commit. For now, provide these
defines unconditionally, but marked for removal after subsequent
cleanup.

Removal of the now unused libkern routines will follow in the next
commit.

Reviewed by: dougm, imp (previous version)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40698


# cc4f247f 01-Jul-2023 John Baldwin <jhb@FreeBSD.org>

sys: Add [u]divmoddi4 intrinsics on i386.

GCC 12 uses these in several places when building the i386 kernel.
They are very similar to [u]divdiv3 except that they return both
the quotient and the remainder.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D40817


# 99aeb219 03-Jan-2023 Takanori Watanabe <takawata@FreeBSD.org>

wdatwd: Add support for ACPI WDAT based watchdog timer.

Simply said, WDAT is an abstraction for the real WDT hardware. For
instance, to add a newer generation WDT to ichwd(4), one must know the
detailed hardware registers, etc..

With WDAT, the necessary IO accesses to operate the WDT are comprehensively
described in it and no hardware knowledge is required.

With this driver, the WDT on Advantech ARK-1124C, Dell R210 and Dell R240 are
detected and operated flawlessly.
* While R210 is also supported by ichwd(4), others are not supported yet.

The unfortunate thing is that not all systems have WDAT defined.

Submitted by: t_uemura at macome.co.jp
Reviewed by: hrs
Differential Revision: https://reviews.freebsd.org/D37493


# 76f67518 02-Feb-2020 Ed Maste <emaste@FreeBSD.org>

retire ce(4) driver

Sync serial (e.g. T1/T1/G.703) interfaces are obsolete, this driver
includes obfuscated source, and has reported potential security issues.

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


# ccd9b49f 24-Jul-2022 Elliott Mitchell <ehem+freebsd@m5p.com>

sys: use .S for assembly language files that use the preprocessor

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/609
Differential Revision: https://reviews.freebsd.org/D35908


# b367bd19 08-Apr-2022 John Baldwin <jhb@FreeBSD.org>

ce: Disable -Wunused-but-set-variable for obfuscated tau32-ddk.c.


# c2705cea 09-Jan-2022 Colin Percival <cperciva@FreeBSD.org>

x86: Speed up clock calibration

Prior to this commit, the TSC and local APIC frequencies were calibrated
at boot time by measuring the clocks before and after a one-second sleep.
This was simple and effective, but had the disadvantage of *requiring a
one-second sleep*.

Rather than making two clock measurements (before and after sleeping) we
now perform many measurements; and rather than simply subtracting the
starting count from the ending count, we calculate a best-fit regression
between the target clock and the reference clock (for which the current
best available timecounter is used). While we do this, we keep track
of an estimate of the uncertainty in the regression slope (aka. the ratio
of clock speeds), and stop measuring when we believe the uncertainty is
less than 1 PPM.

In order to avoid the risk of aliasing resulting from the data-gathering
loop synchronizing with (a multiple of) the frequency of the reference
clock, we add some additional spinning depending upon the iteration number.

For numerical stability and simplicity of implementation, we make use of
floating-point arithmetic for the statistical calculations.

On the author's Dell laptop, this reduces the time spent in calibration
from 2000 ms to 29 ms; on an EC2 c5.xlarge instance, it is reduced from
2000 ms to 2.5 ms.

Reviewed by: bde (previous version), kib
MFC after: 1 month
Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D33802


# ecbbe831 24-Nov-2021 Mark Johnston <markj@FreeBSD.org>

netinet: Deduplicate most in_cksum() implementations

in_cksum() and related routines are implemented separately for each
platform, but only i386 and arm have optimized versions. Other
platforms' copies of in_cksum.c are identical except for style
differences and support for big-endian CPUs.

Deduplicate the implementations for the rest of the platforms. This
will make it easier to implement in_cksum() for unmapped mbufs. On arm
and i386, define HAVE_MD_IN_CKSUM to mean that the MI implementation is
not to be compiled.

No functional change intended.

Reviewed by: kp, glebius
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33095


# 197ff4c3 01-Nov-2021 Kornel Duleba <mindal@semihalf.com>

ossl: Add support for AES-CBC cipher

AES-CBC OpenSSL assembly is used underneath.
The glue layer(ossl_aes.c) is based on CHACHA20 implementation.
Contrary to the SHA and CHACHA20, AES OpenSSL assembly logic
does not have a fallback implementation in case CPU doesn't
support required instructions.
Because of that CPU caps are checked during initialization and AES
support is advertised only if available.
The feature is available on all architectures that ossl supports:
i386, amd64, arm64.

The biggest advantage of this patch over existing solutions
(aesni(4) and armv8crypto(4)) is that it supports SHA,
allowing for ETA operations.

Sponsored by: Stormshield
Obtained from: Semihalf
Reviewed by: jhb (previous version)
Differential revision: https://reviews.freebsd.org/D32099


# 200bc589 06-Nov-2021 Wojciech Macek <wma@FreeBSD.org>

Revert "ossl: Add support for AES-CBC cipher"

This reverts commit 849faf4e0ba9a8b8f24ff34da93a0fd46c14eda9.


# 849faf4e 01-Nov-2021 Kornel Duleba <mindal@semihalf.com>

ossl: Add support for AES-CBC cipher

AES-CBC OpenSSL assembly is used underneath.
The glue layer(ossl_aes.c) is based on CHACHA20 implementation.
Contrary to the SHA and CHACHA20, AES OpenSSL assembly logic
does not have a fallback implementation in case CPU doesn't
support required instructions.
Because of that CPU caps are checked during initialization and AES
support is advertised only if available.
The feature is available on all architectures that ossl supports:
i386, amd64, arm64.

The biggest advantage of this patch over existing solutions
(aesni(4) and armv8crypto(4)) is that it supports SHA,
allowing for ETA operations.

Sponsored by: Stormshield
Obtained from: Semihalf
Reviewed by: jhb
Differential revision: https://reviews.freebsd.org/D32099


# 6aae3517 20-Oct-2021 Gleb Smirnoff <glebius@FreeBSD.org>

Retire synchronous PPP kernel driver sppp(4).

The last two drivers that required sppp are cp(4) and ce(4).

These devices are still produced and can be purchased
at Cronyx <http://cronyx.ru/hardware/wan.html>.

Since Roman Kurakin <rik@FreeBSD.org> has quit them, they no
longer support FreeBSD officially. Later they have dropped
support for Linux drivers to. As of mid-2020 they don't even
have a developer to maintain their Windows driver. However,
their support verbally told me that they could provide aid to
a FreeBSD developer with documentaion in case if there appears
a new customer for their devices.

These drivers have a feature to not use sppp(4) and create an
interface, but instead expose the device as netgraph(4) node.
Then, you can attach ng_ppp(4) with help of ports/net/mpd5 on
top of the node and get your synchronous PPP. Alternatively
you can attach ng_frame_relay(4) or ng_cisco(4) for HDLC.
Actually, last time I used cp(4) back in 2004, using netgraph(4)
instead of sppp(4) was already the right way to do.

Thus, remove the sppp(4) related part of the drivers and enable
by default the negraph(4) part. Further maintenance of these
drivers in the tree shouldn't be a big deal.

While doing that, remove some cruft and enable cp(4) compilation
on amd64. The ce(4) for some unknown reason marks its internal
DDK functions with __attribute__ fastcall, which most likely is
safe to remove, but without hardware I'm not going to do that, so
ce(4) remains i386-only.

Reviewed by: emaste, imp, donner
Differential Revision: https://reviews.freebsd.org/D32590
See also: https://reviews.freebsd.org/D23928


# 4c5bf591 03-Oct-2021 Konstantin Belousov <kib@FreeBSD.org>

i386: move signal delivery code to exec_machdep.c

also move ptrace-related helpers to ptrace_machdep.c
Apply some style. Use ANSI C function definitions.
Remove MPSAFE annotations.

Reviewed by: emaste, imp
Discussed with: jrtc27
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D32310


# cf0ee873 12-Sep-2021 Konstantin Belousov <kib@FreeBSD.org>

Drop cloudabi

According to https://github.com/NuxiNL/cloudlibc:
CloudABI is no longer being maintained. It was an awesome experiment,
but it never got enough traction to be sustainable.

There is no reason to keep it in FreeBSD.

Approved by: ed (private mail)
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D31923


# 2b6eec53 12-Sep-2021 Konstantin Belousov <kib@FreeBSD.org>

x86: duplicate acpi_wakeup.c per i386 and amd64

The file as is is the maze of #ifdef passages, all slightly different.
Divorcing i386 and amd64 version actually makes changing the code
easier, also no changes for i386 are planned.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31931


# 7af4475a 02-Sep-2021 Alexander Motin <mav@FreeBSD.org>

vmd(4): Major driver refactoring

- Re-implement pcib interface to use standard pci bus driver on top of
vmd(4) instead of custom one.
- Re-implement memory/bus resource allocation to properly handle even
complicated configurations.
- Re-implement interrupt handling to evenly distribute children's MSI/
MSI-X interrupts between available vmd(4) MSI-X vectors and setup them
to be handled by standard OS mechanisms with minimal overhead, except
sharing when unavoidable.

Successfully tested on Dell XPS 13 laptop with Core i7-1185G7 CPU (VMD
device ID 0x9a0b) and single NVMe SSD, dual-booting with Windows 10.

Successfully tested on Supermicro X11DPI-NT motherboard with Xeon(R)
Gold 6242R CPUs (VMD device ID 0x201d), simultaneously handling NVMe
SSD on one PCIe port and PLX bridge with 3 NVMe and 1 AHCI SSDs on
another. Handles SSD hot-plug (except Optane 905p for some reason,
which are not detected until manual bus rescan) and enabled IOMMU
(directly connected SSDs work, but ones connected to the PLX fail
without errors from IOMMU).

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
Differential revision: https://reviews.freebsd.org/D31762


# 469884cf 31-Jul-2021 Hans Petter Selasky <hselasky@FreeBSD.org>

LinuxKPI: Make FPU sections thread-safe and use the NOCTX flag.

Reviewed by: kib
Submitted by: greg@unrelenting.technology
Differential Revision: https://reviews.freebsd.org/D29921
MFC after: 1 week
Sponsored by: NVIDIA Networking


# e0229c51 27-Jul-2021 Alexander Motin <mav@FreeBSD.org>

Remove opensolaris_atomic.S dependency.

This file is no longer there, so this broke static zfs build.

MFC after: 1 week


# e013e369 21-Jun-2021 Dmitry Chagin <dchagin@FreeBSD.org>

linux(4): Get rid of Linuxulator kernel build options.

Stop confusing people, retire COMPAT_LINUX and COMPAT_LINUX32 kernel
build options. Since we have 32 and 64 bit Linux emulators, we can't build both
emulators together into the kernel. I don't think it matters, Linux emulation
depends on loadable modules (via rc).

Cut LINPROCFS and LINSYSFS for consistency.

PR: 215061
Reviewed by: bcr (manpages), trasz
Differential Revision: https://reviews.freebsd.org/D30751
MFC after: 2 weeks


# 97993d1e 08-Jun-2021 Mark Johnston <markj@FreeBSD.org>

hyperv: Fix vmbus after the i386 4/4 split

The vmbus ISR needs to live in a trampoline. Dynamically allocating a
trampoline at driver initialization time poses some difficulties due to
the fact that the KENTER macro assumes that the offset relative to
tramp_idleptd is fixed at static link time. Another problem is that
native_lapic_ipi_alloc() uses setidt(), which assumes a fixed trampoline
offset.

Rather than fight this, move the Hyper-V ISR to i386/exception.s. Add a
new HYPERV kernel option to make this optional, and configure it by
default on i386. This is sufficient to make use of vmbus(4) after the
4/4 split. Note that vmbus cannot be loaded dynamically and both the
HYPERV option and device must be configured together. I think this is
not too onerous a requirement, since vmbus(4) was previously
non-functional.

Reported by: Harry Schmalzbauer <freebsd@omnilan.de>
Tested by: Harry Schmalzbauer <freebsd@omnilan.de>
Reviewed by: whu, kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30577


# 24042910 19-May-2021 Marcin Wojtas <mw@FreeBSD.org>

Rename ofwpci.c to ofw_pcib.c

It's a class0 driver that implements some pcib methods and creates
a pci bus as its children.
The "ofw_pci" name will be used by a new driver that will be a subclass
of the pci bus.
No functional changes intended.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Reviewed by: andrew
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential Revision: https://reviews.freebsd.org/D30226


# aa3ea612 31-Mar-2021 Konstantin Belousov <kib@FreeBSD.org>

x86: remove gcov kernel support

Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D29529


# 92aecd1e 03-Mar-2021 John Baldwin <jhb@FreeBSD.org>

ossl: Add ChaCha20 cipher support.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D28756


# a079e38b 03-Mar-2021 John Baldwin <jhb@FreeBSD.org>

ossl: Add Poly1305 digest support.

Reviewed by: cem
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D28754


# af366d35 08-Feb-2021 Mateusz Guzik <mjg@FreeBSD.org>

amd64: implement strlen in assembly

The C variant in libkern performs excessive branching to find the
non-zero byte instead of using the bsfq instruction. The same code
patched to use it is still slower than the routine implemented here
as the compiler keeps neglecting to perform certain optimizations
(like using leaq).

On top of that the routine can is a starting point for copyinstr
which operates on words instead of bytes.

Tested with glibc test suite.

Sample results (calls/s):

Haswell:
$(perl -e "print 'A' x 3"):
stock: 211198039
patched:338626619
asm: 465609618

$(perl -e "print 'A' x 100"):
stock: 83151997
patched: 98285919
asm: 120719888

AMD EPYC 7R32:
$(perl -e "print 'A' x 3"):
stock: 282523617
asm: 491498172

$(perl -e "print 'A' x 100"):
stock: 114857172
asm: 112082057


# bfc99943 25-Jan-2021 Brooks Davis <brooks@one-eyed-alien.net>

ndis(4): remove as previous announced

nids(4) was a clever idea in the early 2000's when the market was
flooded with 10/100 NICs with Windows-only drivers, but that hasn't been
the case for ages and the driver has had no meaningful maintenance in
ages. It only supports Windows-XP era drivers.

Also remove:
- ndis support from wpa_supplicant
- ndiscvt(8)

Reviewed By: emaste, bcr (manpages)
Differential Revision: https://reviews.freebsd.org/D27609


# 11d62b6f 11-Jan-2021 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: add kernel_fpu_begin/kernel_fpu_end

With newer AMD GPUs (>=Navi,Renoir) there is FPU context usage in the
amdgpu driver.
The `kernel_fpu_begin/end` implementations in drm did not even allow nested
begin-end blocks.

Submitted by: Greg V
Reviewed By: manu, hselasky
Differential Revision: https://reviews.freebsd.org/D28061


# c4df8cbf 23-Dec-2020 Robert Wing <rew@FreeBSD.org>

Remove bvmconsole and bvmdebug.

Now that bhyve(8) supports UART, bvmconsole and bvmdebug are no longer needed.

This also removes the '-b' and '-g' flag from bhyve(8). These two flags were
marked deprecated in r368519.

Reviewed by: grehan, kevans
Approved by: kevans (mentor)
Differential Revision: https://reviews.freebsd.org/D27490


# 77fb6b66 06-Dec-2020 Tijl Coosemans <tijl@FreeBSD.org>

Move V4L feature declarations and DTrace provider definitions from
linux_common.c to linux_util.c so they become available on i386.

linux_common.c defines the linux_common kernel module but this module does
not exist on i386 and linux_common.c is not included in the linux module.
linux_util.c is included in the linux_common module on amd64 and the linux
module on i386.

Remove linux_common.c from files.i386 again. It was added recently in
r367433 when the DTrace provider definitions were moved.

The V4L feature declarations were moved to linux_common in r283423.


# 2e58ec01 18-Nov-2020 Mark Johnston <markj@FreeBSD.org>

Move kern_clocksource.c to sys/conf/files

Sponsored by: The FreeBSD Foundation


# 76b2bfed 06-Nov-2020 Conrad Meyer <cem@FreeBSD.org>

linux(4): Fix loadable modules after r367395

Move dtrace SDT definitions into linux_common module code. Also, build
linux_dummy.c into the linux_common kld -- we don't need separate
versions of these stubs for 32- and 64-bit emulation.

Reported by: several
PR: 250897
Discussed with: emaste, trasz
Tested by: John Kennedy, Yasuhiro KIMURA, Oleg Sidorkin
X-MFC-With: r367395
Differential Revision: https://reviews.freebsd.org/D27124


# e9b13c66 05-Nov-2020 Conrad Meyer <cem@FreeBSD.org>

linux(4): Deduplicate unimpl/dummy syscall handlers

No functional change.

Reviewed by: emaste, trasz
Differential Revision: https://reviews.freebsd.org/D27099


# ba610be9 20-Oct-2020 John Baldwin <jhb@FreeBSD.org>

Add a kernel crypto driver using assembly routines from OpenSSL.

Currently, this supports SHA1 and SHA2-{224,256,384,512} both as plain
hashes and in HMAC mode on both amd64 and i386. It uses the SHA
intrinsics when present similar to aesni(4), but uses SSE/AVX
instructions when they are not.

Note that some files from OpenSSL that normally wrap the assembly
routines have been adapted to export methods usable by 'struct
auth_xform' as is used by existing software crypto routines.

Reviewed by: gallatin, jkim, delphij, gnn
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D26821


# acb4cf9d 15-Oct-2020 Ed Maste <emaste@FreeBSD.org>

move vmware pv drivers to sys/conf/files

VMware now has arm64 support; move these to MI files in advance of
building them on arm64.

PR: 250308
Reported by: Vincent Milum Jr
MFC after: 1 week
Sponsored by: The FreeBSD Foundation


# 8c576a27 08-Oct-2020 Warner Losh <imp@FreeBSD.org>

Remove APM BIOS support

APM BIOS was relevant only to early laptops (approximately P166 or
P200 and slower). These have not been relevant for a long time, and
this code has been untested for a long time (as far as I can
tell). The APM compat code in ACPI and the apm(8) command is not being
retired. Both of these items are still in use (apm(8) is more
scriptable than the replacement acpiconf, for the most part). This has
been commented out of i386 GENERIC since 2002. This code is not
relevant to any other port.

Discussed on: arch@


# 28942db8 08-Oct-2020 Warner Losh <imp@FreeBSD.org>

Remove apm screen saver.

APM BIOS support is about to be removed. Remove the apm screen saver
and its module. They are about to be irrelevant.


# 0e00c709 11-May-2020 John Baldwin <jhb@FreeBSD.org>

Remove support for DES and Triple DES from OCF.

It no longer has any in-kernel consumers via OCF. smbfs still uses
single DES directly, so sys/crypto/des remains for that use case.

Reviewed by: cem
Relnotes: yes
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D24773


# 32075647 11-May-2020 John Baldwin <jhb@FreeBSD.org>

Remove support for the Blowfish algorithm from OCF.

It no longer has any in-kernel consumers.

Reviewed by: cem
Relnotes: yes
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D24772


# 4db3ef4c 17-Apr-2020 Alex Richardson <arichardson@FreeBSD.org>

More fixes to build the kernel with a compiler that defaults to -fno-common

Using the same approach as the last commit for the files used by genassym.sh.

Obtained from: CheriBSD


# 2733d8c9 20-Mar-2020 Ed Maste <emaste@FreeBSD.org>

retire cx,ctau drivers

The devices supported by these drivers are obsolete ISA cards, and the
sync serial protocols they supported are essentially obsolete too.

Sponsored by: The FreeBSD Foundation


# bc7d20c4 13-Feb-2020 Dimitry Andric <dim@FreeBSD.org>

Disable new clang 10.0.0 warnings about misleading indentation in ce(4)
and cp(4).

These are false positives, since some of the driver source has been
deliberately obfuscated.


# bb9c7e26 02-Feb-2020 Warner Losh <imp@FreeBSD.org>

Move font.h generation to conf/files from conf/files.*

Use ${SRCTOP} instead of /usr/share.
Prefer to depend on option sc_dflt_fnt instead of sc.
gc the 4 otherwise identical instances in the tree.
Platforms that don't need this won't included it.


# e17b7f1a 02-Feb-2020 Warner Losh <imp@FreeBSD.org>

Fix old-style build

Fix the old-style build by using ${SRCTOP} instead of a weird
construct that only works for new-style build.
Simplify the building of keymap files by using macros
Move atkbdmap.h in files.x86
This has been broken since r296899 which removed the implicit
dependency on /usr/share.


# 71f00776 20-Nov-2019 Gleb Smirnoff <glebius@FreeBSD.org>

Remove sio(4).
It had been disconnected from build in r181233 in 2008.

Reviewed by: imp


# 052e12a5 14-Nov-2019 Josh Paetzel <jpaetzel@FreeBSD.org>

Add the pvscsi driver to the tree.

This driver allows to usage of the paravirt SCSI controller
in VMware products like ESXi. The pvscsi driver provides a
substantial performance improvement in block devices versus
the emulated mpt and mps SCSI/SAS controllers.

Error handling in this driver has not been extensively tested
yet.

Submitted by: vbhakta@vmware.com
Relnotes: yes
Sponsored by: VMware, Panzura
Differential Revision: D18613


# 2a4300e9 30-Oct-2019 Warner Losh <imp@FreeBSD.org>

Move all the sys/dev/[a-j]* that are common to files.x86

All these device entries are common between the two files. Move them to
files.x86. Also sort entries from this range into proper order in files.amd64.


# 7d65d420 25-Aug-2019 Warner Losh <imp@FreeBSD.org>

Fix bogusly declared WERRORs in kernel build

Many arm kernel configs bogusly specified WERROR=-Werror. There's no
reason for this because the default is that and there's no reason to
override. These date from a time when we needed to add additional
warning->error suppression. They are obsolete and were cut and paste
propagated from file to file.

Comment out all the WERROR=.... lines in powerpc. They aren't bogus,
but were appropriate for the old defaults for gcc4.2.1. Now that we've
made the policy decision to suppress -Werror by default on these
platforms, it is appropriate to comment these out. People wishing to
fix these errors can still un-comment them out, or say WERROR=-Werror
on the command line.

Fix two instances (cut and paste propagation) of hard-coded -Werror
in x86 code. Replace with ${WERROR} instead. This is a no-op change
except for people who build WERROR=-Wno-error :).

This should fix tinderbox / CI breakage.


# 96f556f5 16-Aug-2019 Alexander Motin <mav@FreeBSD.org>

NTB Tool: Test driver for NTB hardware drivers.

NTB Tool driver is meant for testing NTB hardware driver functionalities,
such as doorbell interrupts, link events, scratchpad registers and memory
windows. This is a port of ntb_tool driver from Linux. It has been
verified on top of AMD and PLX NTB HW drivers.

Submitted by: Arpan Palit <arpan.palit@amd.com>
Cleaned up by: mav
MFC after: 2 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D18819


# 041f5b36 14-Aug-2019 Warner Losh <imp@FreeBSD.org>

Move the common x86 ipmi files to files.x86. The powerpc file list is different
enough that unification will have to wait for the next pass.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248


# b38e67c9 14-Aug-2019 Warner Losh <imp@FreeBSD.org>

The x86 part of hwpmc is shared, so move it to files.x86.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248


# ff45348b 14-Aug-2019 Warner Losh <imp@FreeBSD.org>

Windows ndis support is x86 only. Move the MI parts there.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248


# cfb592fa 14-Aug-2019 Warner Losh <imp@FreeBSD.org>

Intel's isci is part of the chipset, so it is x86 specific.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248


# 43602a9c 14-Aug-2019 Warner Losh <imp@FreeBSD.org>

Move hyperv to files.x86

Move the comomon part of hyperv to files.x86.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248


# ca46f711 14-Aug-2019 Warner Losh <imp@FreeBSD.org>

The bxe driver, QLogic NetXtreme II Ethernet 10Gb PCIe adapter driver, is x86
specific, and only builds there. Likewise the module is built there. Move it to
the x86-only files.x86.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248


# 5f82f736 14-Aug-2019 Warner Losh <imp@FreeBSD.org>

The ACPI parts are identical between i386 and amd64

Apart from one MD file, ACPI is a x86 implementation, not specific to either
i386 or amd64, so put it into files.x86. Other architectures include fewer
files for the same options, so it can't move into the MI files file.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248


# 439fd246 14-Aug-2019 Warner Losh <imp@FreeBSD.org>

Move via padlock files to files.x86.

VIA Padlock support is for VIA C3, C7 and Eden processors, which are 64bit x86
processors.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248


# 807e7867 14-Aug-2019 Warner Losh <imp@FreeBSD.org>

Apart from one MD file, aesni is common to x86. Move it into files.x86.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248


# e80d8265 14-Aug-2019 Warner Losh <imp@FreeBSD.org>

Move all the hp* drivers too files.x86

The HPT drivers are all x86 only. Move them to files.x86. Because of the way we
run uudecode, we can use $M instead of needing entries for them in separate
files.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248


# 286b4bed 14-Aug-2019 Warner Losh <imp@FreeBSD.org>

Move the identical x86 lines to files.x86

Move all the identical x86 lines to files.x86. The non-identical ones should be
unified and moved as well, but that would require additional changes that would
need a more careful review and may not be MFCable, so I'll do them
separately. I'll delete the mildly snarky comment when things are unified.

Reviewed by: jhb (verbal OK on irc)
Differential Revision: https://reviews.freebsd.org/D21248


# a7a2cae1 13-Aug-2019 Warner Losh <imp@FreeBSD.org>

r350976 accidentally removed nvram device. Restore it.


# a52927a5 13-Aug-2019 Warner Losh <imp@FreeBSD.org>

fe(4) driver has been removed from the tree in r347914. Remove stray reference.


# 3b4afdbe 13-Aug-2019 Warner Losh <imp@FreeBSD.org>

nvme has been moved to 'files' so shouldn't be here anymore. It works on
powerpc64 and arm64 these days as well as amd64/i386.


# b6fcc3a4 13-Aug-2019 Warner Losh <imp@FreeBSD.org>

ed(4) has been removed from the tree, but these were forgotten in r347911.


# 09813007 12-Aug-2019 Warner Losh <imp@FreeBSD.org>

ukbdmap.h rule was identical on all platforms, so move them into sys/conf/files.

This allows us to remove 'nodevice ukbd' from the arm64 NOTES file.


# 9246a83c 12-Aug-2019 Warner Losh <imp@FreeBSD.org>

Create files.x86

files.x86 is for the parts of the system that are common to both i386 and amd64
due too their nature. First up, to get the ball rolling, is fdc, the floppy disk
support. It works only on amd64 and i386 these days, and that's unlikely to
change.

Reviewed by: jhb, cem (earlier versrions)
Differential Revision: https://reviews.freebsd.org/D21210


# 305b9efe 30-Jul-2019 Ed Maste <emaste@FreeBSD.org>

linuxulator: rename linux_locore.s to .asm

It is assembled using "${CC} -x assembler-with-cpp", which by convention
(bsd.suffixes.mk) uses the .asm extension.

This is a portion of the review referenced below (D18344). That review
also renamed linux_support.s to .S, but that is a functional change
(using the compiler's integrated assembler instead of as) and will be
revisited separately.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D18344


# d4565741 29-Jul-2019 Xin LI <delphij@FreeBSD.org>

Remove gzip'ed a.out support.

The current implementation of gzipped a.out support was based
on a very old version of InfoZIP which ships with an ancient
modified version of zlib, and was removed from the GENERIC
kernel in 1999 when we moved to an ELF world.

PR: 205822
Reviewed by: imp, kib, emaste, Yoshihiro Ota <ota at j.email.ne.jp>
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D21099


# 6683132d 01-Jul-2019 Alexander Motin <mav@FreeBSD.org>

Add driver for NTB in AMD SoC.

This patch is the driver for NTB hardware in AMD SoCs (ported from Linux)
and enables the NTB infrastructure like Doorbells, Scratchpads and Memory
window in AMD SoC. This driver has been validated using ntb_transport and
if_ntb driver already available in FreeBSD.

Submitted by: Rajesh Kumar <rajesh1.kumar@amd.com>
MFC after: 1 month
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D18774


# e3722b78 01-Jul-2019 Andriy Gapon <avg@FreeBSD.org>

add superio driver

The goal of this driver is consolidate information about SuperIO chips
and to provide for peaceful coexistence of drivers that need to access
SuperIO configuration registers.

While SuperIO chips can host various functions most of them are
discoverable and accessible without any knowledge of the SuperIO.
Examples are: keyboard and mouse controllers, UARTs, floppy disk
controllers. SuperIO-s also provide non-standard functions such as
GPIO, watchdog timers and hardware monitoring. Such functions do
require drivers with a knowledge of a specific SuperIO.

At this time the driver supports a number of ITE and Nuvoton (fka
Winbond) SuperIO chips.
There is a single driver for all devices. So, I have not done the usual
split between the hardware driver and the bus functionality. Although,
superio does act as a bus for devices that represent known non-standard
functions of a SuperIO chip. The bus provides enumeration of child
devices based on the hardcoded knowledge of such functions. The
knowledge as extracted from datasheets and other drivers.
As there is a single driver, I have not defined a kobj interface for it.
So, its interface is currently made of simple functions.
I think that we can the flexibility (and complications) when we actually
need it.

I am planning to convert nctgpio and wbwd to superio bus very soon.
Also, I am working on itwd driver (watchdog in ITE SuperIO-s).
Additionally, there is ithwm driver based on the reverted sensors
import, but I am not sure how to integrate it given that we still lack
any sensors interface.

Discussed with: imp, jhb
MFC after: 7 weeks
Differential Revision: https://reviews.freebsd.org/D8175


# 5ca5dfe9 31-May-2019 Conrad Meyer <cem@FreeBSD.org>

random(4): Fix RANDOM_LOADABLE build

I introduced an obvious compiler error in r346282, so this change fixes
that.

Unfortunately, RANDOM_LOADABLE isn't covered by our existing tinderbox, and
it seems like there were existing latent linking problems. I believe these
were introduced on accident in r338324 during reduction of the boolean
expression(s) adjacent to randomdev.c and hash.c. It seems the
RANDOM_LOADABLE build breakage has gone unnoticed for nine months.

This change correctly annotates randomdev.c and hash.c with !random_loadable
to match the pre-r338324 logic; and additionally updates the HWRNG drivers
in MD 'files.*', which depend on random_device symbols, with
!random_loadable (it is invalid for the kernel to depend on symbols from a
module).

(The expression for both randomdev.c and hash.c was the same, prior to
r338324: "optional random random_yarrow | random !random_yarrow
!random_loadable". I.e., "random && (yarrow || !loadable)." When Yarrow
was removed ("yarrow := False"), the expression was incorrectly reduced to
"optional random" when it should have retained "random && !loadable".)

Additionally, I discovered that virtio_random was missing a MODULE_DEPEND on
random_device, which breaks kld load/link of the driver on RANDOM_LOADABLE
kernels. Address that issue as well.

PR: 238223
Reported by: Eir Nym <eirnym AT gmail.com>
Reviewed by: delphij, markm
Approved by: secteam(delphij)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D20466


# 7cff9f37 25-May-2019 Sean Eric Fagan <sef@FreeBSD.org>

Add an AESNI-optimized version of the CCM/CBC cryptographic and authentication
code. The primary client of this is probably going to be ZFS encryption.

Reviewed by: jhb, cem
Sponsored by: iXsystems Inc, Kithrup Enterprises
Differential Revision: https://reviews.freebsd.org/D19298


# e153ee66 17-May-2019 Brooks Davis <brooks@FreeBSD.org>

FCP-101: Remove ep(4).

Relnotes: yes
FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D20230


# 61ebc359 21-Feb-2019 Bruce Evans <bde@FreeBSD.org>

Move scterm_teken.c from 6 MD files lists to the MI files list so that it
is easier to configure. It is MI, unlike some of the other syscons files
already in the MI list.

Move scvtb.c similarly. It is needed whenever sc is configured, and is
more MI than most of the files already in the MI list.

This only changes the combined list for arm64 and mips. These arches
already cannot build sc or even NOTES.


# 9a527560 29-Jan-2019 Konstantin Belousov <kib@FreeBSD.org>

i386: Merge PAE and non-PAE pmaps into same kernel.

Effectively all i386 kernels now have two pmaps compiled in: one
managing PAE pagetables, and another non-PAE. The implementation is
selected at cold time depending on the CPU features. The vm_paddr_t is
always 64bit now. As result, nx bit can be used on all capable CPUs.

Option PAE only affects the bus_addr_t: it is still 32bit for non-PAE
configs, for drivers compatibility. Kernel layout, esp. max kernel
address, low memory PDEs and max user address (same as trampoline
start) are now same for PAE and for non-PAE regardless of the type of
page tables used.

Non-PAE kernel (when using PAE pagetables) can handle physical memory
up to 24G now, larger memory requires re-tuning the KVA consumers and
instead the code caps the maximum at 24G. Unfortunately, a lot of
drivers do not use busdma(9) properly so by default even 4G barrier is
not easy. There are two tunables added: hw.above4g_allow and
hw.above24g_allow, the first one is kept enabled for now to evaluate
the status on HEAD, second is only for dev use.

i386 now creates three freelists if there is any memory above 4G, to
allow proper bounce pages allocation. Also, VM_KMEM_SIZE_SCALE changed
from 3 to 1.

The PAE_TABLES kernel config option is retired.

In collaboarion with: pho
Discussed with: emaste
Reviewed by: markj
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D18894


# 628888f0 19-Dec-2018 Mateusz Guzik <mjg@FreeBSD.org>

Remove iBCS2, part2: general kernel

Reviewed by: kib (previous version)
Sponsored by: The FreeBSD Foundation


# 9417fa9e 08-Dec-2018 Jayachandran C. <jchandra@FreeBSD.org>

acpica : move SRAT/SLIT parsing to sys/dev/acpica

This moves the architecture independent parts of sys/x86/acpica/srat.c
to sys/dev/acpica/acpi_pxm.c, to be used later on arm64. The function
declarations are moved to sys/dev/acpica/acpivar.h

We also need to update sys/conf/files.{i386,amd64} to use the new file.
No functional changes.

Reviewed by: markj, imp
Differential Revision: https://reviews.freebsd.org/D17941


# 43b16da8 21-Oct-2018 Warner Losh <imp@FreeBSD.org>

Remove adv(4) and adw(4)

Remove the advanssy drivers (both adv and adw). They were tagged as
gone in 12 a while qgo. The nycbug dmesg database shows this was last
seen in 6 and there were only a few adv sightings then (none for adw).

Relnotes: yes


# c24bd33d 21-Oct-2018 Warner Losh <imp@FreeBSD.org>

Remove aic(4) driver

aic was marked to be gone in 12 a while ago. Go ahead and remove it.
nycbug's dmesg database shows this was last seen in 6 and one more
time in 4.x. It never was popular, and what popularity it had was over
before the nycbug databse got going in 2004.

Relnotes: yes


# c1cdf6a4 21-Oct-2018 Warner Losh <imp@FreeBSD.org>

Remove mse(4) from tree

Remove mse and all support for bus and inport devices from the tree.
Data from nycbug's dmesg database shows the last sighting of this
driver was in 4.10 on only one machine.

Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D17628


# a8e3f99e 27-Sep-2018 Mateusz Guzik <mjg@FreeBSD.org>

amd64: implement memcmp in assembly

Both the in-kernel C variant and libc asm variant have very poor performance.
The former compiles to a single byte comparison loop, which breaks down even
for small sizes. The latter uses rep cmpsq/b which turn out to have very poor
throughput and are slower than a hand-coded 32-byte comparison loop.

Depending on size this is about 3-4 times faster than the current routines.

Reviewed by: kib
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D17328


# 97edfc1b 13-Aug-2018 Mark Johnston <markj@FreeBSD.org>

Implement kernel support for early loading of Intel microcode updates.

Updates in the format described in section 9.11 of the Intel SDM can
now be applied as one of the first steps in booting the kernel. Updates
that are loaded this way are automatically re-applied upon exit from
ACPI sleep states, in contrast with the existing cpucontrol(8)-based
method. For the time being only Intel updates are supported.

Microcode update files are passed to the kernel via loader(8). The
file type must be "cpu_microcode" in order for the file to be recognized
as a candidate microcode update. Updates for multiple CPU types may be
concatenated together into a single file, in which case the kernel
will select and apply a matching update. Memory used to store the
update file will be freed back to the system once the update is applied,
so this approach will not consume more memory than required.

Reviewed by: kib
MFC after: 6 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D16370


# ccca101f 03-Jul-2018 Bryan Drewery <bdrewery@FreeBSD.org>

All genassym.sh usage need offset.inc


# f4b36404 02-Jul-2018 Matt Macy <mmacy@FreeBSD.org>

inline atomics and allow tied modules to inline locks

- inline atomics in modules on i386 and amd64 (they were always
inline on other arches)
- allow modules to opt in to inlining locks by specifying
MODULE_TIED=1 in the makefile

Reviewed by: kib
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D16079


# e92a1350 31-May-2018 Matt Macy <mmacy@FreeBSD.org>

hwpmc: remove unused pre-table driven bits for intel

Intel now provides comprehensive tables for all performance counters
and the various valid configuration permutations as text .json files.
Libpmc has been converted to use these and hwpmc_core has been greatly
simplified by moving to passthrough of the table values.

The one gotcha is that said tables don't support pentium pro and and pentium
IV. There's very few users of hwpmc on _amd64_ kernels on new hardware. It is
unlikely that anyone is doing low level optimization on 15 year old Intel
hardware. Nonetheless, if someone feels strongly enough to populate the
corresponding tables for p4 and ppro I will reinstate the files in to the
build.

Code for the K8 counters and !x86 architectures remains unchanged.


# fb3bfdf1 24-May-2018 Warner Losh <imp@FreeBSD.org>

Make memmove and bcopy share code

Make memmove the primary interface, but have bcopy be an alternative
entry point that jumps into memmove. This will slightly pessimize
bcopy calls, but those are about to get much rarer. Return dst always,
but it will be ignored by bcopy callers. We can remove just the alt
entry point if we ever remove bcopy entirely.

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


# 0cde66af 23-Apr-2018 Konstantin Belousov <kib@FreeBSD.org>

Fix futexes on i386 after the 4/4G split.

Use proper method to access userspace. For now, only the slow copyout
path is implemented.

Reported and tested by: tijl (previous version)
Sponsored by: The FreeBSD Foundation


# 3a4fc8a8 13-Apr-2018 Brooks Davis <brooks@FreeBSD.org>

Remove support for the Arcnet protocol.

While Arcnet has some continued deployment in industrial controls, the
lack of drivers for any of the PCI, USB, or PCIe NICs on the market
suggests such users aren't running FreeBSD.

Evidence in the PR database suggests that the cm(4) driver (our sole
Arcnet NIC) was broken in 5.0 and has not worked since.

PR: 182297
Reviewed by: jhibbits, vangyzen
Relnotes: yes
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D15057


# d86c1f0d 13-Apr-2018 Konstantin Belousov <kib@FreeBSD.org>

i386 4/4G split.

The change makes the user and kernel address spaces on i386
independent, giving each almost the full 4G of usable virtual addresses
except for one PDE at top used for trampoline and per-CPU trampoline
stacks, and system structures that must be always mapped, namely IDT,
GDT, common TSS and LDT, and process-private TSS and LDT if allocated.

By using 1:1 mapping for the kernel text and data, it appeared
possible to eliminate assembler part of the locore.S which bootstraps
initial page table and KPTmap. The code is rewritten in C and moved
into the pmap_cold(). The comment in vmparam.h explains the KVA
layout.

There is no PCID mechanism available in protected mode, so each
kernel/user switch forth and back completely flushes the TLB, except
for the trampoline PTD region. The TLB invalidations for userspace
becomes trivial, because IPI handlers switch page tables. On the other
hand, context switches no longer need to reload %cr3.

copyout(9) was rewritten to use vm_fault_quick_hold(). An issue for
new copyout(9) is compatibility with wiring user buffers around sysctl
handlers. This explains two kind of locks for copyout ptes and
accounting of the vslock() calls. The vm_fault_quick_hold() AKA slow
path, is only tried after the 'fast path' failed, which temporary
changes mapping to the userspace and copies the data to/from small
per-cpu buffer in the trampoline. If a page fault occurs during the
copy, it is short-circuit by exception.s to not even reach C code.

The change was motivated by the need to implement the Meltdown
mitigation, but instead of KPTI the full split is done. The i386
architecture already shows the sizing problems, in particular, it is
impossible to link clang and lld with debugging. I expect that the
issues due to the virtual address space limits would only exaggerate
and the split gives more liveness to the platform.

Tested by: pho
Discussed with: bde
Sponsored by: The FreeBSD Foundation
MFC after: 1 month
Differential revision: https://reviews.freebsd.org/D14633


# 63a93856 24-Mar-2018 Mark Peek <mp@FreeBSD.org>

Add VMCI (Virtual Machine Communication Interface) driver

In a virtual machine, VMCI is exposed as a regular PCI device. The primary
communication mechanisms supported are a point-to-point bidirectional
transport based on a pair of memory-mapped queues, and asynchronous
notifications in the form of datagrams and doorbells. These features are
available to kernel level components such as vSockets through the VMCI
kernel API. In addition to this, the VMCI kernel API provides support for
receiving events related to the state of the VMCI communication channels,
and the virtual machine itself.

Submitted by: Vishnu Dasa <vdasa@vmware.com>
Reviewed by: bcr, imp
Obtained from: VMware
Differential Revision: https://reviews.freebsd.org/D14289


# fc2a8776 20-Mar-2018 Ed Maste <emaste@FreeBSD.org>

Rename assym.s to assym.inc

assym is only to be included by other .s files, and should never
actually be assembled by itself.

Reviewed by: imp, bdrewery (earlier)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D14180


# 6e481f83 16-Mar-2018 Ed Maste <emaste@FreeBSD.org>

Share a single bsd-linux errno table across MD consumers

Three copies of the linuxulator linux_sysvec.c contained identical
BSD to Linux errno translation tables, and future work to support other
architectures will also use the same table. Move the table to a common
file to be used by all. Make it 'const int' to place it in .rodata.

(Some existing Linux architectures use MD errno values, but x86 and Arm
share the generic set.)

This change should introduce no functional change; a followup will add
missing errno values.

MFC after: 3 weeks
Sponsored by: Turing Robotic Industries Inc.
Differential Revision: https://reviews.freebsd.org/D14665


# 24f93aa0 02-Mar-2018 Ravi Pokala <rpokala@FreeBSD.org>

imcsmb(4): Intel integrated Memory Controller (iMC) SMBus controller driver

imcsmb(4) provides smbus(4) support for the SMBus controller functionality
in the integrated Memory Controllers (iMCs) embedded in Intel Sandybridge-
Xeon, Ivybridge-Xeon, Haswell-Xeon, and Broadwell-Xeon CPUs. Each CPU
implements one or more iMCs, depending on the number of cores; each iMC
implements two SMBus controllers (iMC-SMBs).

*** IMPORTANT NOTE ***
Because motherboard firmware or the BMC might try to use the iMC-SMBs for
monitoring DIMM temperatures and/or managing an NVDIMM, the driver might
need to temporarily disable those functions, or take a hardware interlock,
before using the iMC-SMBs. Details on how to do this may vary from board to
board, and the procedure may be proprietary. It is strongly suggested that
anyone wishing to use this driver contact their motherboard vendor, and
modify the driver as described in the manual page and in the driver itself.
(For what it's worth, the driver as-is has been tested on various SuperMicro
motherboards.)

Reviewed by: avg, jhb
MFC after: 1 week
Relnotes: yes
Sponsored by: Panasas
Differential Revision: https://reviews.freebsd.org/D14447
Discussed with: avg, ian, jhb
Tested by: allanjude (previous version), Panasas


# 94b8a54a 22-Feb-2018 Oleksandr Tymoshenko <gonzo@FreeBSD.org>

[chvgpio] add GPIO driver for Intel Z8xxx SoC family

Add chvgpio(4) driver for Intel Z8xxx SoC family. This product
was formerly known as Cherry Trail but Linux and OpenBSD drivers
refer to it as Cherry View. This driver is derived from OpenBSD
one so the name is kept for alignment with another BSD system.

Submitted by: Tom Jones <tj@enoti.me>
Reviewed by: gonzo, wblock(man page)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D13086


# 5370a081 05-Feb-2018 Konstantin Belousov <kib@FreeBSD.org>

Move signal trampolines out of locore.s into separate source file.

Similar to other arches, the move makes the subject of locore.s only
the kernel startup.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week


# 68f18f30 29-Jan-2018 Benno Rice <benno@FreeBSD.org>

Remove some duplicated sys/conf/files* entries.

net80211/ieee80211_ageq.c was present twice in sys/conf/files so leave the
correctly sorted one. dev/wpi/if_wpi.c was present in sys/conf/files as well
as sys/conf/files.amd64 and sys/conf/files.i386 so prefer the sys/conf/files
entry.

Reviewed by: allanjude, rstone


# 41add9e2 10-Jan-2018 Warner Losh <imp@FreeBSD.org>

Move prof_machdep.c to it's more traditional place under i386/i386.


# 695d2543 10-Jan-2018 Warner Losh <imp@FreeBSD.org>

Retire pmtimer driver. Move time fixing into apm driver. Move
Iwasaki-san's copyright over. Remove FIXME code that couldn't possibly
work. Call tc_settime() with our estimate of the delta we've been
alseep (the one we print) to adjust the time. Not sure what to do
about callouts, so keep the small #ifdef in place there.

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


# abbfe9e5 30-Dec-2017 Konstantin Belousov <kib@FreeBSD.org>

Move i386/isa/elink.[hc] to dev/ep.

The ep(4) driver is the only consumer of the two functions from
elink.c. I removed the standalone module as well, and most likely,
the module metadata is not needed anywhere, but this is for later
cleanup.

Discussed with: imp, jhb
Sponsored by: The FreeBSD Foundation


# 0cc997d2 30-Dec-2017 Konstantin Belousov <kib@FreeBSD.org>

Move i386/isa/npx.c to i386i386/npx.c.

The i386 FPU (AKA npx) code does not depend on ISA devices at all,
after the support for IRQ13 FPU exceptions was removed. Put the file
into the expected place in the kernel source tree.

Discussed with: jhb
Sponsored by: The FreeBSD Foundation


# c2ab6ce5 28-Dec-2017 John Baldwin <jhb@FreeBSD.org>

Remove a stale reference to ie(4).

This was missed in r304513.

Submitted by: kib


# 4e421792 16-Nov-2017 Konstantin Belousov <kib@FreeBSD.org>

Remove i386 XBOX support.

It is for console presented at 2001 and featuring Pentium III
processor. Even if any of them are still alive and run FreeBSD, we do
not have any sign of life from their users. While removing another
dozens of #ifdefs from the i386 sources reduces the aversion from
looking at the code and improves the platform vitality.

Reviewed by: cem, pfg, rink (XBOX support author)
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D13016


# fe182ba1 26-Sep-2017 Conrad Meyer <cem@FreeBSD.org>

aesni(4): Add support for x86 SHA intrinsics

Some x86 class CPUs have accelerated intrinsics for SHA1 and SHA256.
Provide this functionality on CPUs that support it.

This implements CRYPTO_SHA1, CRYPTO_SHA1_HMAC, and CRYPTO_SHA2_256_HMAC.

Correctness: The cryptotest.py suite in tests/sys/opencrypto has been
enhanced to verify SHA1 and SHA256 HMAC using standard NIST test vectors.
The test passes on this driver. Additionally, jhb's cryptocheck tool has
been used to compare various random inputs against OpenSSL. This test also
passes.

Rough performance averages on AMD Ryzen 1950X (4kB buffer):
aesni: SHA1: ~8300 Mb/s SHA256: ~8000 Mb/s
cryptosoft: ~1800 Mb/s SHA256: ~1800 Mb/s

So ~4.4-4.6x speedup depending on algorithm choice. This is consistent with
the results the Linux folks saw for 4kB buffers.

The driver borrows SHA update code from sys/crypto sha1 and sha256. The
intrinsic step function comes from Intel under a 3-clause BSDL.[0] The
intel_sha_extensions_sha<foo>_intrinsic.c files were renamed and lightly
modified (added const, resolved a warning or two; included the sha_sse
header to declare the functions).

[0]: https://software.intel.com/en-us/articles/intel-sha-extensions-implementations

Reviewed by: jhb
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D12452


# a03d621b 05-Sep-2017 Conrad Meyer <cem@FreeBSD.org>

amdtemp(4): Add support for Family 17h temperature sensor

The sensor value is formatted similarly to previous models (same
bitfield sizes, same units), but must be read off of the internal
System Management Network (SMN) from the System Management Unit (SMU)
co-processor.

PR: 218264
Reported and tested by: Nils Beyer <nbe AT renzel.net>
Reviewed by: avg (no +1), mjoras, truckman
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D12217


# 907f50fe 05-Sep-2017 Conrad Meyer <cem@FreeBSD.org>

Add smn(4) driver for AMD System Management Network

AMD Family 17h CPUs have an internal network used to communicate between
the host CPU and the PSP and SMU coprocessors. It exposes a simple
32-bit register space.

Reviewed by: avg (no +1), mjoras, truckman
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D12217


# 03782c83 01-Sep-2017 Alexander Motin <mav@FreeBSD.org>

Sync NTB options between amd64 and i386.

Somehow they happen to become different.

MFC after: 13 days


# ed9652da 30-Aug-2017 Alexander Motin <mav@FreeBSD.org>

Add NTB driver for PLX/Avago/Broadcom PCIe switches.

This driver supports both NTB-to-NTB and NTB-to-Root Port modes (though
the second with predictable complications on hot-plug and reboot events).
I tested it with PEX 8717 and PEX 8733 chips, but expect it should work
with many other compatible ones too. It supports up to two NT bridges
per chip, each of which can have up to 2 64-bit or 4 32-bit memory windows,
6 or 12 scratchpad registers and 16 doorbells. There are also 4 DMA engines
in those chips, but they are not yet supported.

While there, rename Intel NTB driver from generic ntb_hw(4) to more specific
ntb_hw_intel(4), so now it is on par with this new ntb_hw_plx(4) driver and
alike to Linux naming.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.


# 873ed6f0 02-Jun-2017 Ed Maste <emaste@FreeBSD.org>

linux vdso: pass -fPIC to the assembler, not linker

-fPIC has no effect on linking although it seems to be ignored by
GNU ld.bfd. However, it causes ld.lld to terminate with an invalid
argument error.

This is equivalent to r296057 but for the kernel (not modules) case.

MFC after: 2 months
Sponsored by: The FreeBSD Foundation


# 554e6778 09-May-2017 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv/vmbus: Reorganize vmbus device tree

For GEN1 Hyper-V, vmbus is attached to pcib0, which contains the
resources for PCI passthrough and SR-IOV. There is no
acpi_syscontainer0 on GEN1 Hyper-V.

For GEN2 Hyper-V, vmbus is attached to acpi_syscontainer0, which
contains the resources for PCI passthrough and SR-IOV. There is
no pcib0 on GEN2 Hyper-V.

The ACPI VMBUS device now only holds its _CRS, which is empty as
of this commit; its existence is mainly for upward compatibility.

Device tree structure is suggested by jhb@.

Tested-by: dexuan@
Collabrated-wth: dexuan@
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D10565


# b14e3bd2 30-Mar-2017 Nick Hibma <n_hibma@FreeBSD.org>

Add nctgpio conf lines so it can be compiled into the kernel.

MFC after: 2 days


# 864c28cf 26-Mar-2017 Bruce Evans <bde@FreeBSD.org>

Use inline asm instead of unportable intrinsics for the SSE4 crc32
optimization.

This fixes building with gcc-4.2.1 (it doesn't support SSE4).
gas-2.17.50 [FreeBSD] supports SSE4 instructions, so this doesn't
need using .byte directives.

This fixes depending on host user headers in the kernel.

Fix user includes (don't depend on namespace pollution in <nmmintrin.h>
that is not included now).

The instrinsics had no advantages except to sometimes avoid compiler
pessimixations. clang understands them a bit better than inline asm,
and generates better looking code which also runs better for cem, but
for me it just at the same speed or slower by doing excessive
unrollowing in all the wrong places. gcc-4.2.1 also doesn't understand
what it is doing with unrolling, but with -O3 somehow it does more
unrolling that helps.

Reduce 1 of the the compiler pessimizations (copying a variable which
already satisfies an "rm" constraint in a good way by being in memory
and not used again, to different memory and accessing it there. Force
copying it to a register instead).

Try to optimize the inner loops significantly, so as to run at full
speed on smaller inputs. The algorithm is already very MD, and was
tuned for the throughput of 3 crc32 instructions per cycle found on
at least Sandybridge through Haswell. Now it is even more tuned for
this, so depends more on the compiler not rearranging or unrolling
things too much. The main inner loop for should have no difficulty
runing at full speed on these CPUs unless the compiler unrolls it too
much. However, the main inner loop wasn't even used for buffers smaller
than 24K. Now it is used for buffers larger than 384 bytes. Now it
is not so long, and the main outer loop is used more. The new
optimization is to try to arrange that the outer loop runs in parallel
with the next inner loop except for the final iteration; then reduce
the loop sizes significantly to take advantage of this.

Approved by: cem
Not tested in production by: bde


# efe3b0de 27-Feb-2017 Gleb Smirnoff <glebius@FreeBSD.org>

Remove SVR4 (System V Release 4) binary compatibility support.

UNIX System V Release 4 is operating system released in 1988. It ceased
to exist in early 2000-s.


# 0e8b3ab3 21-Feb-2017 Ed Maste <emaste@FreeBSD.org>

Exclude -flto when building *genassym.o

The build process generates *assym.h using nm from *genassym.o (which is
in turn created from *genassym.c).

When compiling with link-time optimization (LTO) using -flto, .o files
are LLVM bitcode, not ELF objects. This is not usable by genassym.sh,
so remove -flto from those ${CC} invocations.

Submitted by: George Rimar
Reviewed by: dim
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D9659


# b1fa9878 17-Feb-2017 Konstantin Belousov <kib@FreeBSD.org>

Merge i386 and amd64 mtrr drivers.

Reviewed by: royger, jhb
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D9648


# 5625fe92 15-Feb-2017 Warner Losh <imp@FreeBSD.org>

Remove Micro Channel Architecture support. Of the commonly available
machines, only a few 486 machines that used it, and those haven't had
enough memory to run FreeBSD for quite some time (often limited to
16MB).

Not to be confused with the Machine Check Architecture, which is still
very much alive and used (and untouched by this commit).

No Objection From: arch@


# db6a9c12 06-Feb-2017 Andrew Turner <andrew@FreeBSD.org>

Only build the ACPI PCI drivers on x86, they are unlikely to be used on
arm64 without dignificant changes.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation


# fcf59617 06-Feb-2017 Andrey V. Elsukov <ae@FreeBSD.org>

Merge projects/ipsec into head/.

Small summary
-------------

o Almost all IPsec releated code was moved into sys/netipsec.
o New kernel modules added: ipsec.ko and tcpmd5.ko. New kernel
option IPSEC_SUPPORT added. It enables support for loading
and unloading of ipsec.ko and tcpmd5.ko kernel modules.
o IPSEC_NAT_T option was removed. Now NAT-T support is enabled by
default. The UDP_ENCAP_ESPINUDP_NON_IKE encapsulation type
support was removed. Added TCP/UDP checksum handling for
inbound packets that were decapsulated by transport mode SAs.
setkey(8) modified to show run-time NAT-T configuration of SA.
o New network pseudo interface if_ipsec(4) added. For now it is
build as part of ipsec.ko module (or with IPSEC kernel).
It implements IPsec virtual tunnels to create route-based VPNs.
o The network stack now invokes IPsec functions using special
methods. The only one header file <netipsec/ipsec_support.h>
should be included to declare all the needed things to work
with IPsec.
o All IPsec protocols handlers (ESP/AH/IPCOMP protosw) were removed.
Now these protocols are handled directly via IPsec methods.
o TCP_SIGNATURE support was reworked to be more close to RFC.
o PF_KEY SADB was reworked:
- now all security associations stored in the single SPI namespace,
and all SAs MUST have unique SPI.
- several hash tables added to speed up lookups in SADB.
- SADB now uses rmlock to protect access, and concurrent threads
can do SA lookups in the same time.
- many PF_KEY message handlers were reworked to reflect changes
in SADB.
- SADB_UPDATE message was extended to support new PF_KEY headers:
SADB_X_EXT_NEW_ADDRESS_SRC and SADB_X_EXT_NEW_ADDRESS_DST. They
can be used by IKE daemon to change SA addresses.
o ipsecrequest and secpolicy structures were cardinally changed to
avoid locking protection for ipsecrequest. Now we support
only limited number (4) of bundled SAs, but they are supported
for both INET and INET6.
o INPCB security policy cache was introduced. Each PCB now caches
used security policies to avoid SP lookup for each packet.
o For inbound security policies added the mode, when the kernel does
check for full history of applied IPsec transforms.
o References counting rules for security policies and security
associations were changed. The proper SA locking added into xform
code.
o xform code was also changed. Now it is possible to unregister xforms.
tdb_xxx structures were changed and renamed to reflect changes in
SADB/SPDB, and changed rules for locking and refcounting.

Reviewed by: gnn, wblock
Obtained from: Yandex LLC
Relnotes: yes
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D9352


# 57f6622f 02-Feb-2017 Konstantin Belousov <kib@FreeBSD.org>

For i386, remove config options CPU_DISABLE_CMPXCHG, CPU_DISABLE_SSE
and device npx.

This means that FPU is always initialized and handled when available,
and SSE+ register file and exception are handled when available. This
makes the kernel FPU code much easier to maintain by the cost of
slight bloat for CPUs older than 25 years.

CPU_DISABLE_CMPXCHG outlived its usefulness, see the removed comment
explaining the original purpose.

Suggested by and discussed with: bde
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks


# 6be2ff7d 30-Jan-2017 Conrad Meyer <cem@FreeBSD.org>

calculate_crc32c: Add SSE4.2 implementation on x86

Derived from an implementation by Mark Adler.

The fast loop performs three simultaneous CRCs over subsets of the data
before composing them. This takes advantage of certain properties of
the CRC32 implementation in Intel hardware. (The CRC instruction takes 1
cycle but has 2-3 cycles of latency.)

The CRC32 instruction does not manipulate FPU state.

i386 does not have the crc32q instruction, so avoid it there. Otherwise
the implementation is identical to amd64.

Add basic userland tests to verify correctness on a variety of inputs.

PR: 216467
Reported by: Ben RUBSON <ben.rubson at gmail.com>
Reviewed by: kib@, markj@ (earlier version)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9342


# 2b375b4e 27-Jan-2017 Yoshihiro Takahashi <nyan@FreeBSD.org>

Remove pc98 support completely.
I thank all developers and contributors for pc98.

Relnotes: yes


# d786719d 27-Dec-2016 Oleksandr Tymoshenko <gonzo@FreeBSD.org>

[intelspi] Add SPI driver for Intel BayTrail SoC

Add SPI mode (PIO-only) support for Intel Synchronous Serial Port that
can be found in several Intel's products starting from PXA family.
Most of implementations have slight differences in behavior and in
addresses for registers subset. This driver covers only BayTrail SoC
implementation for it's the only hardware I have to test it on.

Driver attaches to ACPI bus only and does not have PCI or FDT support
for now due to lack of hardware to test it on.

"intelspi" is the best name I've managed to come up with. Linux driver
name (spi-pxa2xx) does not make sense because current implementation
does not support actual PXA2xx SoCs. And as far as I know there is no
codename assigned to Intel SSP chip.

Reviewed by: br, manu
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D8896


# 5c072c8e 20-Dec-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv/ic: Rename cleaned up files.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8850


# 9ff08654 20-Dec-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv/ic: Rname cleaned up file.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8848


# f63f5057 22-Nov-2016 Andrew Turner <andrew@FreeBSD.org>

Only build acpi_timer.c on x86, it fails on arm64 as it attempts to access
an invalid address. It is also unneeded on arm64 as we use the ARM Generic
Timer driver.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation


# 8c582c7c 17-Nov-2016 Dexuan Cui <dexuan@FreeBSD.org>

hyperv/pcib: change the file name: pcib.c -> vmbus_pcib.c

This makes the file name and the variable naming in the file consistent.

Reviewed by: sephe
Approved by: sephe (mentor)
MFC after: 1 week
Sponsored by: Microsoft


# 531582f5 17-Nov-2016 Dexuan Cui <dexuan@FreeBSD.org>

hyperv/pcib: Fix the build for some kernel configs

Add the dependency on pci explicitly for the pcib and vmbus drivers.
The related Makefiles are updated accordingly too.

Reviewed by: sephe
Approved by: sephe (mentor)
MFC after: 1 week
Sponsored by: Microsoft


# 871c968b 16-Nov-2016 Dexuan Cui <dexuan@FreeBSD.org>

hyperv/pcib: enable PCIe pass-through (a.k.a. Discrete Device Assignment)

The feature enables us to pass through physical PCIe devices to FreeBSD VM
running on Hyper-V (Windows Server 2016) to get near-native performance with
low CPU utilization.

The patch implements a PCI bridge driver to support the feature:

1) The pcib driver talks to the host to discover device(s) and presents
the device(s) to FreeBSD's pci driver via PCI configuration space (note:
to access the configuration space, we don't use the standard I/O port
0xCF8/CFC method; instead, we use an MMIO-based method supplied by Hyper-V,
which is very similar to the 0xCF8/CFC method).

2) The pcib driver allocates resources for the device(s) and initialize
the related BARs, when the device driver's attach method is invoked;

3) The pcib driver talks to the host to create MSI/MSI-X interrupt
remapping between the guest and the host;

4) The pcib driver supports device hot add/remove.

Reviewed by: sephe
Approved by: sephe (mentor)
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8332


# 168fce73 14-Nov-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv/vss: Add driver and tools for VSS

VSS stands for "Volume Shadow Copy Service". Unlike virtual machine
snapshot, it only takes snapshot for the virtual disks, so both
filesystem and applications have to aware of it, and cooperate the
whole VSS process.

This driver exposes two device files to the userland:

/dev/hv_fsvss_dev

Normally userland programs should _not_ mess with this device file.
It is currently used by the hv_vss_daemon(8), which freezes and
thaws the filesystem. NOTE: currently only UFS is supported, if
the system mounts _any_ other filesystems, the hv_vss_daemon(8)
will veto the VSS process.

If hv_vss_daemon(8) was disabled, then this device file must be
opened, and proper ioctls must be issued to keep the VSS working.

/dev/hv_appvss_dev

Userland application can opened this device file to receive the
VSS freeze notification, hold the VSS for a while (mainly to flush
application data to filesystem), release the VSS process, and
receive the VSS thaw notification i.e. applications can run again.

The VSS will still work, even if this device file is not opened.
However, only filesystem consistency is promised, if this device
file is not opened or is not operated properly.

hv_vss_daemon(8) is started by devd(8) by default. It can be disabled
by editting /etc/devd/hyperv.conf.

Submitted by: Hongjiang Zhang <honzhan microsoft com>
Reviewed by: kib, mckusick
MFC after: 3 weeks
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8224


# 95a36367 04-Nov-2016 Oleksandr Tymoshenko <gonzo@FreeBSD.org>

[gpio] Add GPIO driver for Intel Bay Trail SoC

Bay Trail has three banks of GPIOs exposed to userland as /dev/gpiocN,
where N is 1, 2, and 3. Pins in each bank are pre-named to match names
on boards schematics: GPIO_S0_SCnn, GPIO_S0_NCnn, and GPIO_S5_nn.

Controller supports edge-triggered and level-triggered interrupts but
current version of the driver does not have interrupts support


# 15516c77 01-Nov-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv/hn: Rename cleaned up file.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8390


# e6ed06f9 30-Oct-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv/hn: Rename cleaned up RNDIS source file.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8361


# 68468712 28-Oct-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv/hn: Rename cleaned up NVS source file.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8354


# cdf2c7a5 28-Sep-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv/storvsc: Fix the blkvsc disk attachment issues.

- The original 'disengage' ATA controller model does not work properly
for all possible disk configurations. Use the newly added ATA disk
veto eventhandler to fit into all possible disk configuration.
- If the 'invalid LUN' happens on blkvsc controllers, return
CAM_DEV_NOT_THERE so that CAM will not destroy attached disks under
the blkvsc controllers.

Submitted by: Hongjiang Zhang <honzhan microsoft com>
Discussed with: mav
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7693


# 8b0a83cc 22-Aug-2016 Ed Schouten <ed@FreeBSD.org>

Make CloudABI work on i386.

Copy over amd64's cloudabi64_sysvec.c into i386 and tailor it to work.
Again, we use a system call convention similar to FreeBSD, except that
there is no support for indirect system calls (%eax == 0).

Where i386 differs from amd64 is that we have to store thread/process
entry arguments on the stack instead of using registers. We also have to
put an extra pointer on the stack for TLS (for GSBASE). Place that
pointer in the empty slot that is normally used to hold return
addresses. That seems to keep the code simple.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D7590


# 354b6f0f 19-Aug-2016 John Baldwin <jhb@FreeBSD.org>

Remove the spic(4) driver for the Sony Vaoi Jogdial.

This hardware is not present on any modern systems. The driver is quite
hackish (raw inb/outb instead of bus_space, and raw inb/outb to random
I/O ports to enable ACPI since it predated proper ACPI support).

Relnotes: yes


# 6212aa15 10-Aug-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv/vmbus: Add APIs for various types of transactions.

Reviewed by: Jun Su <junsu microsoft com>
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7456


# fa03524a 03-Aug-2016 Konstantin Belousov <kib@FreeBSD.org>

Merge i386 and amd64 variants of mp_watchdog.c into x86/, there is no
difference between files.
For pc98, put x86/mp_x86.c into the same place as used by i386 file list.
Fix typo in comment.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week


# dc831186 27-Jul-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv/vmbus: Rename cleaned up bufring code

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7318


# e86e17af 19-Jul-2016 Mark Johnston <markj@FreeBSD.org>

Merge {amd64,i386}/instr_size.c into x86_instr_size.c.

Also reduce the diff between us and upstream: the input data model will
always be DATAMODEL_NATIVE because of a bug (p_model is never set but is
always initialized to 0), so we don't need to override the caller anyway.
This change is also necessary to support the pid provider for 32-bit
processes on amd64.

MFC after: 2 weeks


# e6240996 19-Jul-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv/vmbus: Rename laundered vmbus channel code

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7232


# 7d590c73 14-Jul-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv/vmbus: Merge hv_channel_mgmt.c into hv_channel.c

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7126


# e71d1719 12-Jul-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv/vmbus: Merge hv_connection.c into hv_channel.c

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7004


# 38d19df6 12-Jul-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv/vmbus: Rework vmbus version accessing.

Instead of global variable, vmbus version is accessed through
a vmbus DEVMETHOD now.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6953


# d09bf884 10-Jul-2016 Dmitry Chagin <dchagin@FreeBSD.org>

Add linux_mmap.c to the appropriate conf/files.

Reported by: kib@
MFC after: 1 week


# 9a5325c2 09-Jul-2016 Alexander Motin <mav@FreeBSD.org>

NewBus'ify NTB subsystem.

This follows NTB subsystem modularization in Linux, tuning it to FreeBSD
native NewBus interfaces. This change allows to support different types
of hardware with different drivers, support multiple NTB instances in a
system, ntb_transport module use for needs other then if_ntb, etc.

Sponsored by: iXsystems, Inc.


# d8bf5168 05-Jun-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv: Move machine dependent bits into machine dependent files.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6701


# b7bb4816 01-Jun-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv: Rename some cleaned up/almost cleaned up files

MFC after: 1 week
Sponsored by: Microsoft OSTC


# 7e118515 23-May-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv: Add helpers for busdma(9) operation

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6443


# 0c29fe6d 14-Apr-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv: Deprecate HYPERV option by moving Hyper-V IDT vector into vmbus

Submitted by: Jun Su <junsu microsoft com>
Reviewed by: jhb, kib, sephe
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5910


# 2b1e924b 03-Apr-2016 John Baldwin <jhb@FreeBSD.org>

Move i386/i386/autoconf.c to sys/x86/x86 and use it on both amd64 and i386.


# c43a8674 29-Mar-2016 Zbigniew Bodek <zbb@FreeBSD.org>

Reduce OFW PCI code duplication - involves ARM, PPC and SPARC64

Import portions of the PowerPC OF PCI implementation into new file
"ofwpci.c", common for other platforms. The files ofw_pci.c and ofw_pci.h
from sys/powerpc/ofw no longer exist. All required declarations are moved
to sys/dev/ofw/ofwpci.h. This creates a new ofw_pci_write_ivar() function
and modifies some others methods. Most functions contain existing ppc
implementations in the majority unchanged. Now there is no need to have
multiple identical copies of methods for various architectures.

Requested by: jhibbits
Reviewed by: jhibbits, marius
Submitted by: Marcin Mazurek <mma@semihalf.com>
Obtained from: Semihalf
Sponsored by: Annapurna Labs
Differential Revision: https://reviews.freebsd.org/D4879


# 915d57ae 28-Mar-2016 Ed Maste <emaste@FreeBSD.org>

simplify compile-time default keyboard map generation

In r296926 the -P <path> option was added to kbdcontrol, which enables
this change for a simplified compile-time default keymap build process.

PR: 193865
Reviewed by: Oliver Pinter
Tested by: Oliver Pinter
MFC After: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5708


# 3aa274f7 15-Mar-2016 Ed Maste <emaste@FreeBSD.org>

Fix atkbdmap.h generation for sc/vt consoles

Keymap header files have historically been generated using the build
host's /usr/sbin/kbdcontrol and using the host's keymap files.

However, that introduces an issue when building a kernel to use vt(4)
on a system using sc(4), or vice versa: kbdcontrol searches for keymap
files in the /usr/share subdirectory appropriate for the host, not the
target.

With this change the build searches both the and sc keymap directories
from the source tree.

PR: 193865
Submitted by: Harald Schmalzbauer


# 0bc2abdd 23-Feb-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv/utils: Code rearrange and cleanup

Split heartbeat, shutdown and timesync out of utils code
and name them properly.

Submitted by: Jun Su <junsu microsoft com>
Reviewed by: adrian, sephe, Hongjiang Zhang <honzhan microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5216


# 252a329b 21-Jan-2016 Andrew Turner <andrew@FreeBSD.org>

Remove fdt_fixup_table from architectures where it's unneeded. We only make
use of fdt_fixup_table on PowerPC and ARM. As such we can remove it from
other architectures as it's unneeded.

Reviewed by: nwhitehorn
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D5013


# 99781cb3 13-Jan-2016 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv: implement an event timer

Submitted by: Howard Su <howard0su@gmail.com>
Reviewed by: delphij, royger, adrian
Approved by: adrian (mentor)
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D4676


# 3d3e385e 22-Oct-2015 Conrad Meyer <cem@FreeBSD.org>

Add libkern ffsll() for parity with flsll()

Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3962


# 150be743 13-Oct-2015 Conrad Meyer <cem@FreeBSD.org>

NTB: Enable 32-bit support

Sponsored by: EMC / Isilon Storage Division


# 67da38c5 21-Sep-2015 Ed Maste <emaste@FreeBSD.org>

Move kbd.c to main sys/conf/files list

It is (optionally) used on all architectures.

Sponsored by: The FreeBSD Foundation


# 4db79feb 10-Sep-2015 Mark Johnston <markj@FreeBSD.org>

Merge stack(9) implementations for i386 and amd64 under x86/.

Reviewed by: jhb, kib
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3255


# 7ef5e8bc 12-Aug-2015 Marcel Moolenaar <marcel@FreeBSD.org>

Better support memory mapped console devices, such as VGA and EFI
frame buffers and memory mapped UARTs.

1. Delay calling cninit() until after pmap_bootstrap(). This makes
sure we have PMAP initialized enough to add translations. Keep
kdb_init() after cninit() so that we have console when we need
to break into the debugger on boot.
2. Unfortunately, the ATPIC code had be moved as well so as to
avoid a spurious trap #30. The reason for which is not known
at this time.
3. In pmap_mapdev_attr(), when we need to map a device prior to the
VM system being initialized, use virtual_avail as the KVA to map
the device at. In particular, avoid using the direct map on amd64
because we can't demote by virtue of not being able to allocate
yet. Keep track of the translation.
Re-use the translation after the VM has been initialized to not
waste KVA and to satisfy the assumption in uart(4) that the handle
returned for the low-level console is the same as later returned
when the device is probed and attached.
4. In pmap_unmapdev() remove the mapping from the table when called
pre-init. Otherwise keep the mapping. During bus probe and attach
device resources are mapped and unmapped multiple times, which
would have us destroy the mapping used by the low-level console.
5. In pmap_init(), set pmap_initialized to signal that we're not
pre-init anymore. On amd64, bring the direct map in sync with the
translations created at that time.
6. Implement bus_space_map() and bus_space_unmap() for real: when
the tag corresponds to memory space, call the corresponding
pmap_mapdev() and pmap_unmapdev() functions to construct and
actual handle.
7. In efifb.c and vt_vga.c, remove the crutches and hacks and simply
call pmap_mapdev_attr() or bus_space_map() as desired.

Notes:
1. uart(4) already used bus_space_map() during low-level console
setup but since serial ports have traditionally been I/O port
based, the lack of a proper implementation for said function
was not a problem. It has always supported memory mapped UARTs
for low-level consoles by setting hw.uart.console accordingly.
2. The use of the direct map on amd64 without setting caching
attributes has been a bigger problem than previously thought.
This change has the fortunate (and unexpected) side-effect of
fixing various EFI frame buffer problems (though not all).

PR: 191564, 194952

Special thanks to:
1. XipLink, Inc -- generously donated an Intel Bay Trail E3800
based eval board (ADLE3800PC).
2. The FreeBSD Foundation, in particular emaste@ -- for UEFI
support in general and testing.
3. Everyone who tested the proposed for PR 191564.
4. jhb@ and kib@ for being a soundboard and applying a clue bat
if so needed.


# 4f4d15f0 10-Jun-2015 Ruslan Bukin <br@FreeBSD.org>

Allow DTrace to be compiled-in to the kernel.
This will require for AArch64 as we dont have modules yet.

Sponsored by: HEIF5
Sponsored by: ARM Ltd.
Differential Revision: https://reviews.freebsd.org/D1997


# c5d87f33 24-May-2015 Craig Rodrigues <rodrigc@FreeBSD.org>

For objcopy, use --input-target and --output-target

When building with gcc 4.9 and binutils 2.25,
using '--input' and '--output' returns an error
message:
objcopy: option `--input' is ambiguous

Reported by: Jenkins


# 4ab7403b 24-May-2015 Dmitry Chagin <dchagin@FreeBSD.org>

Rework signal code to allow using it by other modules, like linprocfs:

1. Linux sigset always 64 bit on all platforms. In order to move Linux
sigset code to the linux_common module define it as 64 bit int. Move
Linux sigset manipulation routines to the MI path.

2. Move Linux signal number definitions to the MI path. In general, they
are the same on all platforms except for a few signals.

3. Map Linux RT signals to the FreeBSD RT signals and hide signal conversion
tables to avoid conversion errors.

4. Emulate Linux SIGPWR signal via FreeBSD SIGRTMIN signal which is outside
of allowed on Linux signal numbers.

PR: 197216


# e16fe1c7 24-May-2015 Dmitry Chagin <dchagin@FreeBSD.org>

Implement epoll family system calls. This is a tiny wrapper
around kqueue() to implement epoll subset of functionality.
The kqueue user data are 32bit on i386 which is not enough for
epoll user data, so we keep user data in the proc emuldata.

Initial patch developed by rdivacky@ in 2007, then extended
by Yuri Victorovich @ r255672 and finished by me
in collaboration with mjg@ and jillies@.

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


# bdc37934 24-May-2015 Dmitry Chagin <dchagin@FreeBSD.org>

Implement vdso - virtual dynamic shared object. Through vdso Linux
exposes functions from kernel with proper DWARF CFI information so that
it becomes easier to unwind through them.
Using vdso is a mandatory for a thread cancelation && cleanup
on a modern glibc.

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


# 59023e6c 30-Apr-2015 Jung-uk Kim <jkim@FreeBSD.org>

Remove leftover from r282269.

MFC after: 2 weeks
X-MFC with: r282269


# ed95805e 30-Apr-2015 John Baldwin <jhb@FreeBSD.org>

Remove support for Xen PV domU kernels. Support for HVM domU kernels
remains. Xen is planning to phase out support for PV upstream since it
is harder to maintain and has more overhead. Modern x86 CPUs include
virtualization extensions that support HVM guests instead of PV guests.
In addition, the PV code was i386 only and not as well maintained recently
as the HVM code.
- Remove the i386-only NATIVE option that was used to disable certain
components for PV kernels. These components are now standard as they
are on amd64.
- Remove !XENHVM bits from PV drivers.
- Remove various shims required for XEN (e.g. PT_UPDATES_FLUSH, LOAD_CR3,
etc.)
- Remove duplicate copy of <xen/features.h>.
- Remove unused, i386-only xenstored.h.

Differential Revision: https://reviews.freebsd.org/D2362
Reviewed by: royger
Tested by: royger (i386/amd64 HVM domU and amd64 PVH dom0)
Relnotes: yes


# d588c3d6 28-Apr-2015 Andrew Turner <andrew@FreeBSD.org>

Only enable the hpet driver on x86 hardware, it doesn't exist on arm64.

Sponsored by: The FreeBSD Foundation


# 02c26f81 24-Apr-2015 Konstantin Belousov <kib@FreeBSD.org>

Move common code from sys/i386/i386/mp_machdep.c and
sys/amd64/amd64/mp_machdep.c, to the new common x86 source
sys/x86/x86/mp_x86.c.

Proposed and reviewed by: jhb
Review: https://reviews.freebsd.org/D2347
Sponsored by: The FreeBSD Foundation


# dfe7b3bf 21-Apr-2015 Konstantin Belousov <kib@FreeBSD.org>

Move some common code from sys/amd64/amd64/machdep.c and
sys/i386/i386/machdep.c to new file sys/x86/x86/cpu_machdep.c. Most
of the code is related to the idle handling.

Discussed with: pluknet
Sponsored by: The FreeBSD Foundation


# 0a110d5b 19-Mar-2015 Konstantin Belousov <kib@FreeBSD.org>

Use VT-d interrupt remapping block (IR) to perform FSB messages
translation. In particular, despite IO-APICs only take 8bit apic id,
IR translation structures accept 32bit APIC Id, which allows x2APIC
mode to function properly. Extend msi_cpu of struct msi_intrsrc and
io_cpu of ioapic_intsrc to full int from one byte.

KPI of IR is isolated into the x86/iommu/iommu_intrmap.h, to avoid
bringing all dmar headers into interrupt code. The non-PCI(e) devices
which generate message interrupts on FSB require special handling. The
HPET FSB interrupts are remapped, while DMAR interrupts are not.

For each msi and ioapic interrupt source, the iommu cookie is added,
which is in fact index of the IRE (interrupt remap entry) in the IR
table. Cookie is made at the source allocation time, and then used at
the map time to fill both IRE and device registers. The MSI
address/data registers and IO-APIC redirection registers are
programmed with the special values which are recognized by IR and used
to restore the IRE index, to find proper delivery mode and target.
Map all MSI interrupts in the block when msi_map() is called.

Since an interrupt source setup and dismantle code are done in the
non-sleepable context, flushing interrupt entries cache in the IR
hardware, which is done async and ideally waits for the interrupt,
requires busy-wait for queue to drain. The dmar_qi_wait_for_seq() is
modified to take a boolean argument requesting busy-wait for the
written sequence number instead of waiting for interrupt.

Some interrupts are configured before IR is initialized, e.g. ACPI
SCI. Add intr_reprogram() function to reprogram all already
configured interrupts, and call it immediately before an IR unit is
enabled. There is still a small window after the IO-APIC redirection
entry is reprogrammed with cookie but before the unit is enabled, but
to fix this properly, IR must be started much earlier.

Add workarounds for 5500 and X58 northbridges, some revisions of which
have severe flaws in handling IR. Use the same identification methods
as employed by Linux.

Review: https://reviews.freebsd.org/D1892
Reviewed by: neel
Discussed with: jhb
Tested by: glebius, pho (previous versions)
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks


# 6be291e4 14-Mar-2015 Dimitry Andric <dim@FreeBSD.org>

Amend r277940, by also disabling -Wcast-qual warnings for a few specific
aesni files on i386.


# 3d7f3c9d 01-Mar-2015 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

Record the dependency to x86bios in vga_pci

This fixes the build of XEN and XBOX kernels on i386, which was broken
in r279487.

While here, do not build vga_pci_repost() on PC98.

Reported by: bz@


# d3ccddf3 04-Feb-2015 Bryan Venteicher <bryanv@FreeBSD.org>

Generalized parts of the XEN timer code into a generic pvclock

KVM clock shares the same data structures between the guest and the host
as Xen so it makes sense to just have a single copy of this code.

Differential Revision: https://reviews.freebsd.org/D1429
Reviewed by: royger (eariler version)
MFC after: 1 month


# 08fca7a5 12-Dec-2014 John-Mark Gurney <jmg@FreeBSD.org>

Add some new modes to OpenCrypto. These modes are AES-ICM (can be used
for counter mode), and AES-GCM. Both of these modes have been added to
the aesni module.

Included is a set of tests to validate that the software and aesni
module calculate the correct values. These use the NIST KAT test
vectors. To run the test, you will need to install a soon to be
committed port, nist-kat that will install the vectors. Using a port
is necessary as the test vectors are around 25MB.

All the man pages were updated. I have added a new man page, crypto.7,
which includes a description of how to use each mode. All the new modes
and some other AES modes are present. It would be good for someone
else to go through and document the other modes.

A new ioctl was added to support AEAD modes which AES-GCM is one of them.
Without this ioctl, it is not possible to test AEAD modes from userland.

Add a timing safe bcmp for use to compare MACs. Previously we were using
bcmp which could leak timing info and result in the ability to forge
messages.

Add a minor optimization to the aesni module so that single segment
mbufs don't get copied and instead are updated in place. The aesni
module needs to be updated to support blocked IO so segmented mbufs
don't have to be copied.

We require that the IV be specified for all calls for both GCM and ICM.
This is to ensure proper use of these functions.

Obtained from: p4: //depot/projects/opencrypto
Relnotes: yes
Sponsored by: FreeBSD Foundation
Sponsored by: NetGate


# c97038fa 25-Nov-2014 Ruslan Bukin <br@FreeBSD.org>

o Add Virtio MMIO bus driver to config
o Move Virtio-related to common config file


# 217eb125 03-Nov-2014 Bryan Venteicher <bryanv@FreeBSD.org>

Add VirtIO console to the x86 NOTES and files

Requested by: jhb


# 44e06d15 30-Sep-2014 Roger Pau Monné <royger@FreeBSD.org>

msi: add Xen MSI implementation

This patch adds support for MSI interrupts when running on Xen. Apart
from adding the Xen related code needed in order to register MSI
interrupts this patch also makes the msi_init function a hook in
init_ops, so different MSI implementations can have different
initialization functions.

Sponsored by: Citrix Systems R&D

xen/interface/physdev.h:
- Add the MAP_PIRQ_TYPE_MULTI_MSI to map multi-vector MSI to the Xen
public interface.

x86/include/init.h:
- Add a hook for setting custom msi_init methods.

amd64/amd64/machdep.c:
i386/i386/machdep.c:
- Set the default msi_init hook to point to the native MSI
initialization method.

x86/xen/pv.c:
- Set the Xen MSI init hook when running as a Xen guest.

x86/x86/local_apic.c:
- Call the msi_init hook instead of directly calling msi_init.

xen/xen_intr.h:
x86/xen/xen_intr.c:
- Introduce support for registering/releasing MSI interrupts with
Xen.
- The MSI interrupts will use the same PIC as the IO APIC interrupts.

xen/xen_msi.h:
x86/xen/xen_msi.c:
- Introduce a Xen MSI implementation.

x86/xen/xen_nexus.c:
- Overwrite the default MSI hooks in the Xen Nexus to use the Xen MSI
implementation.

x86/xen/xen_pci.c:
- Introduce a Xen specific PCI bus that inherits from the ACPI PCI
bus and overwrites the native MSI methods.
- This is needed because when running under Xen the MSI messages used
to configure MSI interrupts on PCI devices are written by Xen
itself.

dev/acpica/acpi_pci.c:
- Lower the quality of the ACPI PCI bus so the newly introduced Xen
PCI bus can take over when needed.

conf/files.i386:
conf/files.amd64:
- Add the newly created files to the build process.


# 0a041f3b 18-Sep-2014 Bjoern A. Zeeb <bz@FreeBSD.org>

Implement most of timer_{create,settime,gettime,getoverrun,delete}
for amd64/linux32. Fix the entirely bogus (untested) version from
r161310 for i386/linux using the same shared code in compat/linux.

It is unclear to me if we could support more clock mappings but
the current set allows me to successfully run commercial
32bit linux software under linuxolator on amd64.

Reviewed by: jhb
Differential Revision: D784
MFC after: 3 days
Sponsored by: DARPA, AFRL


# e72055b7 12-Sep-2014 Xin LI <delphij@FreeBSD.org>

Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft,
many thanks for their continued support of FreeBSD.

While I'm there, also implement a new build knob, WITHOUT_HYPERV to
disable building and installing of the HyperV utilities when necessary.

The HyperV utilities are only built for i386 and amd64 targets.

This is a stable/10 candidate for inclusion with 10.1-RELEASE.

Submitted by: Wei Hu <weh microsoft com>
MFC after: 1 week


# 33a50f1b 04-Sep-2014 John Baldwin <jhb@FreeBSD.org>

Merge the amd64 and i386 identcpu.c into a single x86 implementation.
This brings the structured extended features mask and VT-x reporting to
i386 and Intel cache and TLB info (under bootverbose) to amd64.


# c8d2ffd6 05-Aug-2014 Gleb Smirnoff <glebius@FreeBSD.org>

Merge all MD sf_buf allocators into one MI, residing in kern/subr_sfbuf.c
The MD allocators were very common, however there were some minor
differencies. These differencies were all consolidated in the MI allocator,
under ifdefs. The defines from machine/vmparam.h turn on features required
for a particular machine. For details look in the comment in sys/sf_buf.h.

As result no MD code left in sys/*/*/vm_machdep.c. Some arches still have
machine/sf_buf.h, which is usually quite small.

Tested by: glebius (i386), tuexen (arm32), kevlo (arm32)
Reviewed by: kib
Sponsored by: Netflix
Sponsored by: Nginx, Inc.


# 5c949e1b 18-Jun-2014 Aleksandr Rybalko <ray@FreeBSD.org>

Remove stale link to deleted vt(4) xboxfb driver.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation


# e048c706 16-Jun-2014 Roger Pau Monné <royger@FreeBSD.org>

xen: create a Xen nexus to use in PV/PVH

Introduce a Xen specific nexus that is going to be used by Xen PV/PVH
guests.

Sponsored by: Citrix Systems R&D
Approved by: gibbs

x86/xen/xen_nexus.c:
- Introduce a Nexus to use on Xen PV(H) guests, this prevents PV(H)
guests from using the legacy Nexus.

conf/files.amd64:
conf/files.i386:
- Add the xen nexus to the build.


# aa64d12b 16-Jun-2014 Roger Pau Monné <royger@FreeBSD.org>

xen: introduce xenpv bus

Create a dummy bus so top level Xen devices can attach to it (instead
of attaching directly to the nexus). This allows to have all the Xen
related devices grouped under a single bus.

Sponsored by: Citrix Systems R&D
Approved by: gibbs

x86/xen/xenpv.c:
- Attach the xenpv bus when running as a Xen guest.
- Attach the ISA bus if needed, in order to attach syscons.

conf/files.amd6:
conf/files.i386:
- Include the xenpv.c file in the build of i386/amd64 kernels using
XENHVM.

dev/xen/console/console.c:
dev/xen/timer/timer.c:
xen/xenstore/xenstore.c:
- Attach to the xenpv bus instead of the Nexus.

dev/xen/xenpci/xenpci.c:
- Xen specific devices on PVHVM guests are no longer attached to the
xenpci device, they are instead attached to the xenpv bus, remove
the now unused methods.


# 842471b3 16-Jun-2014 Roger Pau Monné <royger@FreeBSD.org>

xen: add hooks for Xen PV APIC

Create the necessary hooks in order to provide a Xen PV APIC
implementation that can be used on PVH. Most of the lapic ops
shouldn't be called on Xen, since we trap those operations at a higher
layer.

Sponsored by: Citrix Systems R&D
Approved by: gibbs

x86/xen/hvm.c:
x86/xen/xen_apic.c:
- Move IPI related code to xen_apic.c

x86/xen/xen_apic.c:
- Introduce Xen PV APIC implementation, most of the functions of the
lapic interface should never be called when running as PV(H) guest,
so make sure FreeBSD panics when trying to use one of those.
- Define the Xen APIC implementation in xen_apic_ops.

xen/xen_pv.h:
- Extern declaration of the xen_apic struct.

x86/xen/pv.c:
- Use xen_apic_ops as apic_ops when running as PVH guest.

conf/files.amd64:
conf/files.i386:
- Include the xen_apic.c file in the build of i386/amd64 kernels
using XENHVM.


# 81e3caaf 21-May-2014 Justin Hibbits <jhibbits@FreeBSD.org>

imagact_binmisc builds for all supported architectures, so enable it for all.

Any bugs in execution will be dealt with as they crop up.

MFC after: 3 weeks
Relnotes: Yes


# 804e0170 02-May-2014 Eitan Adler <eadler@FreeBSD.org>

lindev(4): finish the partial commit in r265212

lindev(4) was only used to provide /dev/full which is now a standard feature of
FreeBSD. /dev/full was never linux-specific and provides a generally useful
feature.

Document this in UPDATING and bump __FreeBSD_version. This will be documented
in the PH shortly.

Reported by: jkim


# 6d756449 08-Apr-2014 Sean Bruno <sbruno@FreeBSD.org>

Add Stacey Son's binary activation patches that allow remapping of
execution to a emumation program via parsing of ELF header information.

With this kernel module and userland tool, poudriere is able to build
ports packages via the QEMU userland tools (or another emulator program)
in a different architecture chroot, e.g. TARGET=mips TARGET_ARCH=mips

I'm not connecting this to GENERIC for obvious reasons, but this should
allow the kernel module to be built by default and enable the building
of the userland tool (which automatically loads the kernel module).

Submitted by: sson@
Reviewed by: jhb@


# 5f05c794 11-Mar-2014 Roger Pau Monné <royger@FreeBSD.org>

xen: implement an early timer for Xen PVH

When running as a PVH guest, there's no emulated i8254, so we need to
use the Xen PV timer as the early source for DELAY. This change allows
for different implementations of the early DELAY function and
implements a Xen variant for it.

Approved by: gibbs
Sponsored by: Citrix Systems R&D

dev/xen/timer/timer.c:
dev/xen/timer/timer.h:
- Implement Xen early delay functions using the PV timer and declare
them.

x86/include/init.h:
- Add hooks for early clock source initialization and early delay
functions.

i386/i386/machdep.c:
pc98/pc98/machdep.c:
amd64/amd64/machdep.c:
- Set early delay hooks to use the i8254 on bare metal.
- Use clock_init (that will in turn make use of init_ops) to
initialize the early clock source.

amd64/include/clock.h:
i386/include/clock.h:
- Declare i8254_delay and clock_init.

i386/xen/clock.c:
- Rename DELAY to i8254_delay.

x86/isa/clock.c:
- Introduce clock_init that will take care of initializing the early
clock by making use of the init_ops hooks.
- Move non ISA related delay functions to the newly introduced delay
file.

x86/x86/delay.c:
- Add moved delay related functions.
- Implement generic DELAY function that will use the init_ops hooks.

x86/xen/pv.c:
- Set PVH hooks for the early delay related functions in init_ops.

conf/files.amd64:
conf/files.i386:
conf/files.pc98:
- Add delay.c to the kernel build.


# 7f47cbd3 15-Feb-2014 Christian Brueffer <brueffer@FreeBSD.org>

Retire the nve(4) driver; nfe(4) has been the default driver for NVIDIA
nForce MCP adapters for a long time.

Yays: jhb, remko, yongari
Nays: none on the current and stable lists


# f25e50cf 14-Feb-2014 Andriy Gapon <avg@FreeBSD.org>

provide fast versions of ffsl and flsl for i386; ffsll and flsll for amd64

Reviewed by: jhb
MFC after: 10 days
X-MFC note: consider thirdparty modules depending on these symbols
Sponsored by: HybridCluster


# c97492d0 07-Feb-2014 John Baldwin <jhb@FreeBSD.org>

Now that FreeBSD/i386 works as a bhyve guest, allow i386 kernels to
include bvmconsole and bvmdebug.


# 10c40180 17-Jan-2014 Bryan Venteicher <bryanv@FreeBSD.org>

Add very simple virtio_random(4) driver to harvest entropy from host

Reviewed by: markm (random bits only)


# 27cf7d04 05-Dec-2013 Aleksandr Rybalko <ray@FreeBSD.org>

Merge VT(9) project (a.k.a. newcons).

Reviewed by: nwhitehorn
MFC_to_10_after: re approval

Sponsored by: The FreeBSD Foundation


# 0ad3455e 04-Dec-2013 Xin LI <delphij@FreeBSD.org>

Support Hyper-V on i386:

- Add 'hyperv' module into build;
- Allow building Hyper-V support as part of the kernel;
- Hook Hyper-V build into NOTES.

This is intended for MFC if re@ permits.

MFC after: 3 days


# 68eeb96a 01-Nov-2013 Konstantin Belousov <kib@FreeBSD.org>

Add support for queued invalidation.

Right now, the semaphore write is scheduled after each batch, which is
not optimal and must be tuned.

Discussed with: alc
Tested by: pho
MFC after: 1 month


# 86be9f0d 28-Oct-2013 Konstantin Belousov <kib@FreeBSD.org>

Import the driver for VT-d DMAR hardware, as specified in the revision
1.3 of Intelб╝ Virtualization Technology for Directed I/O Architecture
Specification. The Extended Context and PASIDs from the rev. 2.2 are
not supported, but I am not aware of any released hardware which
implements them. Code does not use queued invalidation, see comments
for the reason, and does not provide interrupt remapping services.

Code implements the management of the guest address space per domain
and allows to establish and tear down arbitrary mappings, but not
partial unmapping. The superpages are created as needed, but not
promoted. Faults are recorded, fault records could be obtained
programmatically, and printed on the console.

Implement the busdma(9) using DMARs. This busdma backend avoids
bouncing and provides security against misbehaving hardware and driver
bad programming, preventing leaks and corruption of the memory by wild
DMA accesses.

By default, the implementation is compiled into amd64 GENERIC kernel
but disabled; to enable, set hw.dmar.enable=1 loader tunable. Code is
written to work on i386, but testing there was low priority, and
driver is not enabled in GENERIC. Even with the DMAR turned on,
individual devices could be directed to use the bounce busdma with the
hw.busdma.pci<domain>:<bus>:<device>:<function>.bounce=1 tunable. If
DMARs are capable of the pass-through translations, it is used,
otherwise, an identity-mapping page table is constructed.

The driver was tested on Xeon 5400/5500 chipset legacy machine,
Haswell desktop and E5 SandyBridge dual-socket boxes, with ahci(4),
ata(4), bce(4), ehci(4), mfi(4), uhci(4), xhci(4) devices. It also
works with em(4) and igb(4), but there some fixes are needed for
drivers, which are not committed yet. Intel GPUs do not work with
DMAR (yet).

Many thanks to John Baldwin, who explained me the newbus integration;
Peter Holm, who did all testing and helped me to discover and
understand several incredible bugs; and to Jim Harris for the access
to the EDS and BWG and for listening when I have to explain my
findings to somebody.

Sponsored by: The FreeBSD Foundation
MFC after: 1 month


# 3f9d41ed 27-Oct-2013 Konstantin Belousov <kib@FreeBSD.org>

Add a virtual table for the busdma methods on x86, to allow different
busdma implementations to coexist. Copy busdma_machdep.c to
busdma_bounce.c, which is still a single implementation of the busdma
interface on x86 for now. The busdma_machdep.c only contains common
and dispatch code.

Tested by: pho (as part of the larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 1 month


# 1a3c1f06 06-Oct-2013 Mark Murray <markm@FreeBSD.org>

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.


# f02e47dc 04-Oct-2013 Mark Murray <markm@FreeBSD.org>

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)


# 4e400768 20-Sep-2013 David Christensen <davidch@FreeBSD.org>

Substantial rewrite of bxe(4) to add support for the BCM57712 and
BCM578XX controllers.

Approved by: re
MFC after: 4 weeks


# b12698e1 18-Sep-2013 Roman Divacky <rdivacky@FreeBSD.org>

Revert r255672, it has some serious flaws, leaking file references etc.

Approved by: re (delphij)


# 253c75c0 18-Sep-2013 Roman Divacky <rdivacky@FreeBSD.org>

Implement epoll support in Linuxulator. This is a tiny wrapper around kqueue
to implement epoll subset of functionality. The kqueue user data are 32bit
on i386 which is not enough for epoll user data so this patch overrides
kqueue fileops to maintain enough space in struct file.

Initial patch developed by me in 2007 and then extended and finished
by Yuri Victorovich.

Approved by: re (delphij)
Sponsored by: Google Summer of Code
Submitted by: Yuri Victorovich <yuri at rawbw dot com>
Tested by: Yuri Victorovich <yuri at rawbw dot com>


# a74e05dd 10-Sep-2013 David E. O'Brien <obrien@FreeBSD.org>

Back out r255440. /usr/bin/gcc @r255185 (2013-09-03) can build this.

Approved by: re (kib)


# 9dc29a3c 09-Sep-2013 David E. O'Brien <obrien@FreeBSD.org>

Only use a clang'ism if ${CC} is clang.

Reviewed by: sjg
Approved by: re (kib)


# ff6c7bf5 03-Sep-2013 John-Mark Gurney <jmg@FreeBSD.org>

Use the fact that the AES-NI instructions can be pipelined to improve
performance... Use SSE2 instructions for calculating the XTS tweek
factor... Let the compiler do more work and handle register allocation
by using intrinsics, now only the key schedule is in assembly...

Replace .byte hard coded instructions w/ the proper instructions now
that both clang and gcc support them...

On my machine, pulling the code to userland I saw performance go from
~150MB/sec to 2GB/sec in XTS mode. GELI on GNOP saw a more modest
increase of about 3x due to other system overhead (geom and
opencrypto)...

These changes allow almost full disk io rate w/ geli...

Reviewed by: -current, -security
Thanks to: Mike Hamburg for the XTS tweek algorithm


# 9f40021f 29-Aug-2013 Justin T. Gibbs <gibbs@FreeBSD.org>

Introduce a new, HVM compatible, paravirtualized timer driver for Xen.
Use this new driver for both PV and HVM instances.

This driver requires a Xen hypervisor that supports vector callbacks,
VCPUOP hypercalls, and reports that it has a "safe PV clock".

New timer driver:
Submitted by: will
Sponsored by: Spectra Logic Corporation

PV port to new driver, and bug fixes:
Submitted by: Roger Pau Monné
Sponsored by: Citrix Systems R&D

sys/dev/xen/timer/timer.c:
- Register a PV timer device driver which (currently)
implements device_{identify,probe,attach} and stubs
device_detach. The detach routine requires functionality
not provided by timecounters(4). The suspend and resume
routines need additional work (due to Xen requiring that
the hypercalls be executed on the target VCPU), and aren't
needed for our purposes.

- Make sure there can only be one device instance of this
driver, and that it only registers one eventtimers(4) and
one timecounters(4) device interface. Make both interfaces
use PCPU data as needed.

- Match, with a few style cleanups & API differences, the
Xen versions of the "fetch time" functions.

- Document the magic scale_delta() better for the i386 version.

- When registering the event timer, bind a separate event
channel for the timer VIRQ to the device's event timer
interrupt handler for each active VCPU. Describe each
interrupt as "xen_et:c%d", so they can be identified per
CPU in "vmstat -i" or "show intrcnt" in KDB.

- When scheduling a timer into the hypervisor, try up to
60 times if the hypervisor rejects the time as being in
the past. In the common case, this retry shouldn't happen,
and if it does, it should only happen once. This is
because the event timer advertises a minimum period of
100usec, which is only less than the usual hypercall round
trip time about 1 out of every 100 tries. (Unlike other
similar drivers, this one actually checks whether the
hypervisor accepted the singleshot timer set hypercall.)

- Implement a RTC PV clock based on the hypervisor wallclock.

sys/conf/files:
- Add dev/xen/timer/timer.c if the kernel configuration
includes either the XEN or XENHVM options.

sys/conf/files.i386:
sys/i386/include/xen/xen_clock_util.h:
sys/i386/xen/clock.c:
sys/i386/xen/xen_clock_util.c:
sys/i386/xen/mp_machdep.c:
sys/i386/xen/xen_rtc.c:
- Remove previous PV timer used in i386 XEN PV kernels, the
new timer introduced in this change is used instead (so
we share the same code between PVHVM and PV).

MFC after: 2 weeks


# 76acc41f 29-Aug-2013 Justin T. Gibbs <gibbs@FreeBSD.org>

Implement vector callback for PVHVM and unify event channel implementations

Re-structure Xen HVM support so that:
- Xen is detected and hypercalls can be performed very
early in system startup.
- Xen interrupt services are implemented using FreeBSD's native
interrupt delivery infrastructure.
- the Xen interrupt service implementation is shared between PV
and HVM guests.
- Xen interrupt handlers can optionally use a filter handler
in order to avoid the overhead of dispatch to an interrupt
thread.
- interrupt load can be distributed among all available CPUs.
- the overhead of accessing the emulated local and I/O apics
on HVM is removed for event channel port events.
- a similar optimization can eventually, and fairly easily,
be used to optimize MSI.

Early Xen detection, HVM refactoring, PVHVM interrupt infrastructure,
and misc Xen cleanups:

Sponsored by: Spectra Logic Corporation

Unification of PV & HVM interrupt infrastructure, bug fixes,
and misc Xen cleanups:

Submitted by: Roger Pau Monné
Sponsored by: Citrix Systems R&D

sys/x86/x86/local_apic.c:
sys/amd64/include/apicvar.h:
sys/i386/include/apicvar.h:
sys/amd64/amd64/apic_vector.S:
sys/i386/i386/apic_vector.s:
sys/amd64/amd64/machdep.c:
sys/i386/i386/machdep.c:
sys/i386/xen/exception.s:
sys/x86/include/segments.h:
Reserve IDT vector 0x93 for the Xen event channel upcall
interrupt handler. On Hypervisors that support the direct
vector callback feature, we can request that this vector be
called directly by an injected HVM interrupt event, instead
of a simulated PCI interrupt on the Xen platform PCI device.
This avoids all of the overhead of dealing with the emulated
I/O APIC and local APIC. It also means that the Hypervisor
can inject these events on any CPU, allowing upcalls for
different ports to be handled in parallel.

sys/amd64/amd64/mp_machdep.c:
sys/i386/i386/mp_machdep.c:
Map Xen per-vcpu area during AP startup.

sys/amd64/include/intr_machdep.h:
sys/i386/include/intr_machdep.h:
Increase the FreeBSD IRQ vector table to include space
for event channel interrupt sources.

sys/amd64/include/pcpu.h:
sys/i386/include/pcpu.h:
Remove Xen HVM per-cpu variable data. These fields are now
allocated via the dynamic per-cpu scheme. See xen_intr.c
for details.

sys/amd64/include/xen/hypercall.h:
sys/dev/xen/blkback/blkback.c:
sys/i386/include/xen/xenvar.h:
sys/i386/xen/clock.c:
sys/i386/xen/xen_machdep.c:
sys/xen/gnttab.c:
Prefer FreeBSD primatives to Linux ones in Xen support code.

sys/amd64/include/xen/xen-os.h:
sys/i386/include/xen/xen-os.h:
sys/xen/xen-os.h:
sys/dev/xen/balloon/balloon.c:
sys/dev/xen/blkback/blkback.c:
sys/dev/xen/blkfront/blkfront.c:
sys/dev/xen/console/xencons_ring.c:
sys/dev/xen/control/control.c:
sys/dev/xen/netback/netback.c:
sys/dev/xen/netfront/netfront.c:
sys/dev/xen/xenpci/xenpci.c:
sys/i386/i386/machdep.c:
sys/i386/include/pmap.h:
sys/i386/include/xen/xenfunc.h:
sys/i386/isa/npx.c:
sys/i386/xen/clock.c:
sys/i386/xen/mp_machdep.c:
sys/i386/xen/mptable.c:
sys/i386/xen/xen_clock_util.c:
sys/i386/xen/xen_machdep.c:
sys/i386/xen/xen_rtc.c:
sys/xen/evtchn/evtchn_dev.c:
sys/xen/features.c:
sys/xen/gnttab.c:
sys/xen/gnttab.h:
sys/xen/hvm.h:
sys/xen/xenbus/xenbus.c:
sys/xen/xenbus/xenbus_if.m:
sys/xen/xenbus/xenbusb_front.c:
sys/xen/xenbus/xenbusvar.h:
sys/xen/xenstore/xenstore.c:
sys/xen/xenstore/xenstore_dev.c:
sys/xen/xenstore/xenstorevar.h:
Pull common Xen OS support functions/settings into xen/xen-os.h.

sys/amd64/include/xen/xen-os.h:
sys/i386/include/xen/xen-os.h:
sys/xen/xen-os.h:
Remove constants, macros, and functions unused in FreeBSD's Xen
support.

sys/xen/xen-os.h:
sys/i386/xen/xen_machdep.c:
sys/x86/xen/hvm.c:
Introduce new functions xen_domain(), xen_pv_domain(), and
xen_hvm_domain(). These are used in favor of #ifdefs so that
FreeBSD can dynamically detect and adapt to the presence of
a hypervisor. The goal is to have an HVM optimized GENERIC,
but more is necessary before this is possible.

sys/amd64/amd64/machdep.c:
sys/dev/xen/xenpci/xenpcivar.h:
sys/dev/xen/xenpci/xenpci.c:
sys/x86/xen/hvm.c:
sys/sys/kernel.h:
Refactor magic ioport, Hypercall table and Hypervisor shared
information page setup, and move it to a dedicated HVM support
module.

HVM mode initialization is now triggered during the
SI_SUB_HYPERVISOR phase of system startup. This currently
occurs just after the kernel VM is fully setup which is
just enough infrastructure to allow the hypercall table
and shared info page to be properly mapped.

sys/xen/hvm.h:
sys/x86/xen/hvm.c:
Add definitions and a method for configuring Hypervisor event
delievery via a direct vector callback.

sys/amd64/include/xen/xen-os.h:
sys/x86/xen/hvm.c:

sys/conf/files:
sys/conf/files.amd64:
sys/conf/files.i386:
Adjust kernel build to reflect the refactoring of early
Xen startup code and Xen interrupt services.

sys/dev/xen/blkback/blkback.c:
sys/dev/xen/blkfront/blkfront.c:
sys/dev/xen/blkfront/block.h:
sys/dev/xen/control/control.c:
sys/dev/xen/evtchn/evtchn_dev.c:
sys/dev/xen/netback/netback.c:
sys/dev/xen/netfront/netfront.c:
sys/xen/xenstore/xenstore.c:
sys/xen/evtchn/evtchn_dev.c:
sys/dev/xen/console/console.c:
sys/dev/xen/console/xencons_ring.c
Adjust drivers to use new xen_intr_*() API.

sys/dev/xen/blkback/blkback.c:
Since blkback defers all event handling to a taskqueue,
convert this task queue to a "fast" taskqueue, and schedule
it via an interrupt filter. This avoids an unnecessary
ithread context switch.

sys/xen/xenstore/xenstore.c:
The xenstore driver is MPSAFE. Indicate as much when
registering its interrupt handler.

sys/xen/xenbus/xenbus.c:
sys/xen/xenbus/xenbusvar.h:
Remove unused event channel APIs.

sys/xen/evtchn.h:
Remove all kernel Xen interrupt service API definitions
from this file. It is now only used for structure and
ioctl definitions related to the event channel userland
device driver.

Update the definitions in this file to match those from
NetBSD. Implementing this interface will be necessary for
Dom0 support.

sys/xen/evtchn/evtchnvar.h:
Add a header file for implemenation internal APIs related
to managing event channels event delivery. This is used
to allow, for example, the event channel userland device
driver to access low-level routines that typical kernel
consumers of event channel services should never access.

sys/xen/interface/event_channel.h:
sys/xen/xen_intr.h:
Standardize on the evtchn_port_t type for referring to
an event channel port id. In order to prevent low-level
event channel APIs from leaking to kernel consumers who
should not have access to this data, the type is defined
twice: Once in the Xen provided event_channel.h, and again
in xen/xen_intr.h. The double declaration is protected by
__XEN_EVTCHN_PORT_DEFINED__ to ensure it is never declared
twice within a given compilation unit.

sys/xen/xen_intr.h:
sys/xen/evtchn/evtchn.c:
sys/x86/xen/xen_intr.c:
sys/dev/xen/xenpci/evtchn.c:
sys/dev/xen/xenpci/xenpcivar.h:
New implementation of Xen interrupt services. This is
similar in many respects to the i386 PV implementation with
the exception that events for bound to event channel ports
(i.e. not IPI, virtual IRQ, or physical IRQ) are further
optimized to avoid mask/unmask operations that aren't
necessary for these edge triggered events.

Stubs exist for supporting physical IRQ binding, but will
need additional work before this implementation can be
fully shared between PV and HVM.

sys/amd64/amd64/mp_machdep.c:
sys/i386/i386/mp_machdep.c:
sys/i386/xen/mp_machdep.c
sys/x86/xen/hvm.c:
Add support for placing vcpu_info into an arbritary memory
page instead of using HYPERVISOR_shared_info->vcpu_info.
This allows the creation of domains with more than 32 vcpus.

sys/i386/i386/machdep.c:
sys/i386/xen/clock.c:
sys/i386/xen/xen_machdep.c:
sys/i386/xen/exception.s:
Add support for new event channle implementation.


# e3c97c2c 23-Aug-2013 Bryan Venteicher <bryanv@FreeBSD.org>

Add vmx(4), a VMware VMXNET3 ethernet driver ported from OpenBSD


# 38441bd9 19-Jul-2013 Jim Harris <jimharris@FreeBSD.org>

Add message when nvd disks are attached and detached.

As part of this commit, add an nvme_strvis() function which borrows
heavily from cam_strvis(). This will allow stripping of
leading/trailing whitespace and also handle unprintable characters
in model/serial numbers. This function goes into a new nvme_util.c
file which is used by both the driver and nvmecontrol.

Sponsored by: Intel
Reviewed by: carl
MFC after: 3 days


# 1fdeb165 06-Jul-2013 Xin LI <delphij@FreeBSD.org>

Import HighPoint DC Series Data Center HBA (DC7280 and R750) driver.
This driver works for FreeBSD/i386 and FreeBSD/amd64 platforms.

Many thanks to HighPoint for providing this driver.

MFC after: 1 day


# 237abf0c 28-Jun-2013 Davide Italiano <davide@FreeBSD.org>

- Trim an unused and bogus Makefile for mount_smbfs.
- Reconnect with some minor modifications, in particular now selsocket()
internals are adapted to use sbintime units after recent'ish calloutng
switch.


# cb34ed44 20-May-2013 Marcel Moolenaar <marcel@FreeBSD.org>

Add basic support for FDT to i386 & amd64. This change includes:
1. Common headers for fdt.h and ofw_machdep.h under x86/include
with indirections under i386/include and amd64/include.
2. New modinfo for loader provided FDT blob.
3. Common x86_init_fdt() called from hammer_time() on amd64 and
init386() on i386.
4. Split-off FDT specific low-level console functions from FDT
bus methods for the uart(4) driver. The low-level console
logic has been moved to uart_cpu_fdt.c and is used for arm,
mips & powerpc only. The FDT bus methods are shared across
all architectures.
5. Add dev/fdt/fdt_x86.c to hold the fdt_fixup_table[] and the
fdt_pic_table[] arrays. Both are empty right now.

FDT addresses are I/O ports on x86. Since the core FDT code does
not handle different address spaces, adding support for both I/O
ports and memory addresses requires some thought and discussion.
It may be better to use a compile-time option that controls this.

Obtained from: Juniper Networks, Inc.


# 933c7bc9 12-Apr-2013 Jung-uk Kim <jkim@FreeBSD.org>

Unbreak tinderbox build after r249420.


# 0cfbcf8c 06-Mar-2013 Bryan Venteicher <bryanv@FreeBSD.org>

Remove the virtio dependency entry for the VirtIO device drivers. This
will prevent the kernel from linking if the device driver are included
without the virtio module. Remove pci and scbus for the same reason.

Also explain the relationship and necessity of the virtio and virtio_pci
modules. Currently in FreeBSD, we only support VirtIO PCI, but it could
be replaced with a different interface (like MMIO) and the device
(network, block, etc) will still function.

Requested by: luigi
Approved by: grehan (mentor)
MFC after: 3 days


# 8ec81e39 21-Jan-2013 Xin LI <delphij@FreeBSD.org>

- Don't include date and time the driver is built, this is useful for
generating binary diffs.
- Constify a few strings used in the driver.
- Style changes to make the driver compile with default clang settings.

Approved by: HighPoint Technologies
MFC after: 3 days


# ae366ffc 13-Jan-2013 Bryan Venteicher <bryanv@FreeBSD.org>

Add VirtIO to the i386 and amd64 GENERIC kernels

This also removes the kludge from r239009 that covered only
the network driver.

Reviewed by: grehan
Approved by: grehan (mentor)
MFC after: 1 week


# 2e564269 17-Oct-2012 Attilio Rao <attilio@FreeBSD.org>

Disconnect non-MPSAFE SMBFS from the build in preparation for dropping
GIANT from VFS. In addition, disconnect also netsmb, which is a base
requirement for SMBFS.

In the while SMBFS regular users can use FUSE interface and smbnetfs
port to work with their SMBFS partitions.

Also, there are ongoing efforts by vendor to support in-kernel smbfs,
so there are good chances that it will get relinked once properly locked.

This is not targeted for MFC.


# eb85d44f 17-Sep-2012 Jim Harris <jimharris@FreeBSD.org>

Integrate nvme(4) and nvd(4) into the amd64 and i386 builds.

Sponsored by: Intel


# c5e3d0ab 13-Sep-2012 Konstantin Belousov <kib@FreeBSD.org>

Rename the IVY_RNG option to RDRAND_RNG.

Based on submission by: Arthur Mesh <arthurmesh@gmail.com>
MFC after: 2 weeks


# 7e2fcdff 12-Sep-2012 Jim Harris <jimharris@FreeBSD.org>

Remove some trailing whitespace.


# 72bacdc5 12-Sep-2012 David E. O'Brien <obrien@FreeBSD.org>

Replace a bare use of 'objcopy' with ${OBJCOPY} for easier cross compilation
in environments where 'objcopy' is spelled differently.

Submitted by: John Van Horne <jvanhorne@juniper.net>


# b8c0bcd2 05-Sep-2012 Dimitry Andric <dim@FreeBSD.org>

After r240104, make sure the hpt27xx driver also compiles with clang,
when it is statically linked into the kernel.

MFC after: 2 weeks
X-MFC-With: r240104


# ef9461ba 05-Sep-2012 Konstantin Belousov <kib@FreeBSD.org>

Add support for new Intel on-CPU Bull Mountain random number
generator, found on IvyBridge and supposedly later CPUs, accessible
with RDRAND instruction.

From the Intel whitepapers and articles about Bull Mountain, it seems
that we do not need to perform post-processing of RDRAND results, like
AES-encryption of the data with random IV and keys, which was done for
Padlock. Intel claims that sanitization is performed in hardware.

Make both Padlock and Bull Mountain random generators support code
covered by kernel config options, for the benefit of people who prefer
minimal kernels. Also add the tunables to disable hardware generator
even if detected.

Reviewed by: markm, secteam (simon)
Tested by: bapt, Michael Moll <kvedulv@kvedulv.de>
MFC after: 3 weeks


# 8a6c6fad 09-Jun-2012 Mitsuru IWASAKI <iwasaki@FreeBSD.org>

Some fixes for r236772.

- Remove cpuset stopped_cpus which is no longer used.
- Add a short comment for cpuset suspended_cpus clearing.
- Fix the un-ordered x86/acpica/acpi_wakeup.c in conf/files.amd64 and i386.

Pointed-out by: attilio@


# fb864578 08-Jun-2012 Mitsuru IWASAKI <iwasaki@FreeBSD.org>

Add x86/acpica/acpi_wakeup.c for amd64 and i386. Difference of
suspend/resume procedures are minimized among them.

common:
- Add global cpuset suspended_cpus to indicate APs are suspended/resumed.
- Remove acpi_waketag and acpi_wakemap from acpivar.h (no longer used).
- Add some variables in acpi_wakecode.S in order to minimize the difference
among amd64 and i386.
- Disable load_cr3() because now CR3 is restored in resumectx().

amd64:
- Add suspend/resume related members (such as MSR) in PCB.
- Modify savectx() for above new PCB members.
- Merge acpi_switch.S into cpu_switch.S as resumectx().

i386:
- Merge(and remove) suspendctx() into savectx() in order to match with
amd64 code.

Reviewed by: attilio@, acpi@


# 2059ee3c 10-Apr-2012 Marcel Moolenaar <marcel@FreeBSD.org>

uart_cpu_amd64.c and uart_cpu_i386.c (under sys/dev/uart) are
identical now that the bus spaces are unified under sys/x86.
Replace them with a single uart_cpu_x86.c.
o delete uart_cpu_i386.c
o move uart_cpu_amd64.c to uart_cpu_x86.c
o update files.amd64 and files.i386 accordingly.


# 435803f3 30-Mar-2012 John Baldwin <jhb@FreeBSD.org>

Move the legacy(4) driver to x86.


# 88c7c434 27-Mar-2012 Peter Wemm <peter@FreeBSD.org>

Allow (with a license warning) "options ZFS" to work in static kernels.

The 'make depend' rules have to use custom -I paths for the special compat
includes for the opensolaris/zfs headers.

This option will pull in the couple of files that are shared with dtrace,
but they appear to correctly use the MODULE_VERSION/MODULE_DEPEND rules
so loader should do the right thing, as should kldload.

Reviewed by: pjd (glanced at)


# 646af7c6 09-Mar-2012 John Baldwin <jhb@FreeBSD.org>

Move i386's intr_machdep.c to the x86 tree and share it with amd64.


# ad47abd2 09-Mar-2012 John Baldwin <jhb@FreeBSD.org>

Allow a native i386 kernel to be built with 'nodevice atpic'. Just as on
amd64, if 'device isa' is present quiesce the 8259A's during boot and
resume from suspend.

While here, be more selective on amd64 about which kernel configurations
need elcr.c.

MFC after: 2 weeks


# 0566170f 06-Mar-2012 Bjoern A. Zeeb <bz@FreeBSD.org>

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


# f11c7f63 31-Jan-2012 Jim Harris <jimharris@FreeBSD.org>

Add isci(4) driver for amd64 and i386 targets.

The isci driver is for the integrated SAS controller in the Intel C600
(Patsburg) chipset. Source files in sys/dev/isci directory are
FreeBSD-specific, and sys/dev/isci/scil subdirectory contains
an OS-agnostic library (SCIL) published by Intel to control the SAS
controller. This library is used primarily as-is in this driver, with
some post-processing to better integrate into the kernel build
environment.

isci.4 and a README in the sys/dev/isci directory contain a few
additional details.

This driver is only built for amd64 and i386 targets.

Sponsored by: Intel
Reviewed by: scottl
Approved by: scottl


# e0b124a6 29-Dec-2011 Dimitry Andric <dim@FreeBSD.org>

For sys/dev/ce/tau32-ddk.c, disable the following warning when building
with clang:

sys/dev/ce/tau32-ddk.c:1228:37: warning: implicit truncation from 'int' to bitfield changes value from 65532 to 8188 [-Wconstant-conversion]

Since this file is obfuscated C, we can never determine (in a sane way,
at least :) if this points to a real problem or not. The driver has
been in the tree for more than five years, so it most likely isn't.

MFC after: 1 week


# 81966bce 28-Dec-2011 Xin LI <delphij@FreeBSD.org>

Import the first release of HighPoint RocketRAID 27xx SAS 6Gb/s HBA card
driver. This driver works for FreeBSD/i386 and FreeBSD/amd64 platforms.

Many thanks to HighPoint for providing this driver.

MFC after: 2 weeks


# 61af1d13 12-Dec-2011 Fabien Thomas <fabient@FreeBSD.org>

Add watchdog support for VIA south bridge chipset.
Tested on VT8251, VX900 but CX700, VX800, VX855 should works.

MFC after: 1 month
Sponsored by: NETASQ


# 4089603c 16-Jul-2011 John Baldwin <jhb@FreeBSD.org>

Don't include mptable_pci.c in Xen kernels. It is only meant for systems
that truly have an MPTable. The MPTable code in Xen is really a Xen
specific CPU enumerator and probably shouldn't be using the mptable name
at all.


# 1368987a 22-Jun-2011 John Baldwin <jhb@FreeBSD.org>

Move {amd64,i386}/pci/pci_bus.c and {amd64,i386}/include/pci_cfgreg.h to
the x86 tree. The $PIR code is still only enabled on i386 and not amd64.
While here, make the qpi(4) driver on conditional on 'device pci'.


# 149d1c89 15-May-2011 Henrik Brix Andersen <brix@FreeBSD.org>

Add I2C bus driver for the AMD Geode LX series CS5536 Companion
Device.

Reviewed by: jhb (newbus bits only), adrian


# 70df4233 19-Apr-2011 Bjoern A. Zeeb <bz@FreeBSD.org>

Compile in in_cksum* implementations for both IPv6 and IPv6.
While in_pseudo() etc. is often used in offloading feature support,
in_cksum() is mostly used to fix some broken hardware.

Keeping both around for the moment allows us to compile NIC drivers
even in an IPv6 only environment without the need to mangle them
with #ifdef INETs in a way they are not prepared for. This will
leave some dead code paths that will not be exercised for IPv6.

Reviewed by: gnn
Sponsored by: The FreeBSD Foundation
Sponsored by: iXsystems
MFC after: 3 days


# 222198ab 12-Feb-2011 Dmitry Chagin <dchagin@FreeBSD.org>

Move linux_clone(), linux_fork(), linux_vfork() to a MI path.


# 2fea6431 17-Jan-2011 Jung-uk Kim <jkim@FreeBSD.org>

Add reader/writer lock around mem_range_attr_get() and mem_range_attr_set().
Compile sys/dev/mem/memutil.c for all supported platforms and remove now
unnecessary dev_mem_md_init(). Consistently define mem_range_softc from
mem.c for all platforms. Add missing #include guards for machine/memdev.h
and sys/memrange.h. Clean up some nearby style(9) nits.

MFC after: 1 month


# 91ff9dc0 08-Dec-2010 Colin Percival <cperciva@FreeBSD.org>

Replace i386/i386/busdma_machdep.c and amd64/amd64/busdma_machdep.c
(which are identical) with a single x86/x86/busdma_machdep.c.


# dd7d207d 07-Dec-2010 Jung-uk Kim <jkim@FreeBSD.org>

Merge sys/amd64/amd64/tsc.c and sys/i386/i386/tsc.c and move to sys/x86/x86.

Discussed with: avg


# a3c464fb 12-Nov-2010 Jung-uk Kim <jkim@FreeBSD.org>

MFamd64: (based on) r209957

Move logic of building ACPI headers for acpi_wakeup.c into better places,
remove intermediate makefile and shell script, and reduce diff between i386
and amd64.


# 7c2bf852 09-Nov-2010 Jung-uk Kim <jkim@FreeBSD.org>

Refactor acpi_machdep.c for amd64 and i386, move APM emulation into a new
file acpi_apm.c, and place it on sys/x86/acpica.


# cedd86ca 08-Nov-2010 Jung-uk Kim <jkim@FreeBSD.org>

Now OsdEnvironment.c is identical on amd64 and i386. Move it to a new home.


# 13e25cb7 08-Nov-2010 John Baldwin <jhb@FreeBSD.org>

Move the MADT parser for amd64 and i386 to sys/x86/acpica now that it is
identical on both platforms.


# ba2a2735 28-Oct-2010 Attilio Rao <attilio@FreeBSD.org>

Merge nexus.c from amd64 and i386 to x86 subtree.

Sponsored by: Sandvine Incorporated
Tested by: gianni


# a3da9792 28-Oct-2010 Attilio Rao <attilio@FreeBSD.org>

Merge the mptable support from MD bits to x86 subtree.

Sponsored by: Sandvine Incorporated
Discussed with: jhb


# 256439c9 25-Oct-2010 Attilio Rao <attilio@FreeBSD.org>

Merge dump_machdep.c i386/amd64 under the x86 subtree.

Sponsored by: Sandvine Incorporated
Tested by: gianni


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# c2175767 25-Aug-2010 John Baldwin <jhb@FreeBSD.org>

Intel QPI chipsets actually provide two extra "non-core" PCI buses that
provide PCI devices for various hardware such as memory controllers, etc.
These PCI buses are not enumerated via ACPI however. Add qpi(4) psuedo
bus and Host-PCI bridge drivers to enumerate these buses. Currently the
driver uses the CPU ID to determine the bridges' presence.

In collaboration with: Joseph Golio @ Isilon Systems
MFC after: 2 weeks


# 97f24f66 11-Aug-2010 Takanori Watanabe <takawata@FreeBSD.org>

Add tpm(4) driver for Trusted Platform Module.
You may want to look at http://bsssd.sourceforge.net/ .

Submitted by: Hans-Joerg Hoexer <Hans-Joerg_Hoexer@genua.de>


# 3bf2fc85 08-Aug-2010 Jung-uk Kim <jkim@FreeBSD.org>

Do not build real mode emulator for i386. We use VM86 again since r210877.


# dd540b46 27-Jul-2010 John Baldwin <jhb@FreeBSD.org>

Add a parser for the ACPI SRAT table for amd64 and i386. It sets
PCPU(domain) for each CPU and populates a mem_affinity array suitable
for the NUMA support in the physical memory allocator.

Reviewed by: alc


# 5f270659 23-Jul-2010 Konstantin Belousov <kib@FreeBSD.org>

Crypto(4) driver for AESNI.

The aeskeys_{amd64,i386}.S content was mostly obtained from OpenBSD,
no objections to the license from core.

Hardware provided by: Sentex Communications
Tested by: fabient, pho (previous versions)
MFC after: 1 month


# 43fe7d45 14-Jul-2010 Alexander Motin <mav@FreeBSD.org>

Rename timeevents.c to kern_clocksource.c.

Suggested by: jhb@


# 28ab822d 14-Jul-2010 Alexander Motin <mav@FreeBSD.org>

Move timeevents.c to MI code, as it is not x86-specific. I already have
it working on Marvell ARM SoCs, and it would be nice to unify timer code
between more platforms.


# 25eb1b8c 22-Jun-2010 Alexander Motin <mav@FreeBSD.org>

Some style fixes for r209371.

Submitted by: jhb@


# 875b8844 20-Jun-2010 Alexander Motin <mav@FreeBSD.org>

Implement new event timers infrastructure. It provides unified APIs for
writing event timer drivers, for choosing best possible drivers by machine
independent code and for operating them to supply kernel with hardclock(),
statclock() and profclock() events in unified fashion on various hardware.

Infrastructure provides support for both per-CPU (independent for every CPU
core) and global timers in periodic and one-shot modes. MI management code
at this moment uses only periodic mode, but one-shot mode use planned for
later, as part of tickless kernel project.

For this moment infrastructure used on i386 and amd64 architectures. Other
archs are welcome to follow, while their current operation should not be
affected.

This patch updates existing drivers (i8254, RTC and LAPIC) for the new
order, and adds event timers support into the HPET driver. These drivers
have different capabilities:
LAPIC - per-CPU timer, supports periodic and one-shot operation, may
freeze in C3 state, calibrated on first use, so may be not exactly precise.
HPET - depending on hardware can work as per-CPU or global, supports
periodic and one-shot operation, usually provides several event timers.
i8254 - global, limited to periodic mode, because same hardware used also
as time counter.
RTC - global, supports only periodic mode, set of frequencies in Hz
limited by powers of 2.

Depending on hardware capabilities, drivers preferred in following orders,
either LAPIC, HPETs, i8254, RTC or HPETs, LAPIC, i8254, RTC.
User may explicitly specify wanted timers via loader tunables or sysctls:
kern.eventtimer.timer1 and kern.eventtimer.timer2.
If requested driver is unavailable or unoperational, system will try to
replace it. If no more timers available or "NONE" specified for second,
system will operate using only one timer, multiplying it's frequency by few
times and uing respective dividers to honor hz, stathz and profhz values,
set during initial setup.


# b9cd2f77 08-Jun-2010 John Baldwin <jhb@FreeBSD.org>

Move the MD support for PCI message signalled interrupts to the x86 tree
as it is identical for i386 and amd64.


# 2465e30f 08-Jun-2010 John Baldwin <jhb@FreeBSD.org>

Move the machine check support code to the x86 tree since it is identical
on i386 and amd64.

Requested by: alc


# 53a908cb 08-Jun-2010 John Baldwin <jhb@FreeBSD.org>

Move the I/O APIC code to the x86 tree since it is identical on i386 and
amd64.


# fa1ed4bd 23-May-2010 Alexander Motin <mav@FreeBSD.org>

Unify local_apic.c for x86 archs,


# c8d050b5 16-Apr-2010 Fabien Thomas <fabient@FreeBSD.org>

MFC r206089, r206684:

- Support for uncore counting events: one fixed PMC with the uncore
domain clock, 8 programmable PMC.
- Westmere based CPU (Xeon 5600, Corei7 980X) support.
- New man pages with events list for core and uncore.
- Updated Corei7 events with Intel 253669-033US December 2009 doc.
There is some removed events in the documentation, they have been
kept in the code but documented in the man page as obsolete.
- Offcore response events can be setup with rsp token.

Sponsored by: NETASQ


# 1fa7f10b 02-Apr-2010 Fabien Thomas <fabient@FreeBSD.org>

- Support for uncore counting events: one fixed PMC with the uncore
domain clock, 8 programmable PMC.
- Westmere based CPU (Xeon 5600, Corei7 980X) support.
- New man pages with events list for core and uncore.
- Updated Corei7 events with Intel 253669-033US December 2009 doc.
There is some removed events in the documentation, they have been
kept in the code but documented in the man page as obsolete.
- Offcore response events can be setup with rsp token.

Sponsored by: NETASQ


# aa3d547d 01-Mar-2010 Xin LI <delphij@FreeBSD.org>

MFC x86emu/x86bios emulator and make previously i386 only dpms and vesa
framebuffer driver, etc. work on FreeBSD/amd64.

A significant amount of improvements were done by jkim@ during the recent
months to make vesa(4) work better, over the initial code import. This
work is based on OpenBSD's x86emu implementation and contributed by
paradox <ddkprog yahoo com> and swell.k at gmail com.

Hopefully I have stolen all their work to 8-STABLE :)

All bugs in this commit are mine, as usual.


# 32580301 25-Feb-2010 Attilio Rao <attilio@FreeBSD.org>

Introduce the new kernel sub-tree x86 which should contain all the code
shared and generalized between our current amd64, i386 and pc98.

This is just an initial step that should lead to a more complete effort.
For the moment, a very simple porting of cpufreq modules, BIOS calls and
the whole MD specific ISA bus part is added to the sub-tree but ideally
a lot of code might be added and more shared support should grow.

Sponsored by: Sandvine Incorporated
Reviewed by: emaste, kib, jhb, imp
Discussed on: arch
MFC: 3 weeks


# 646b3953 18-Feb-2010 Rebecca Cran <brucec@FreeBSD.org>

MFC r203679:

Remove the usb2_input_kbd directive that was missed during the renaming of the
drivers in the usb2 stack.

Approved by: rrs (mentor)


# ac6be749 08-Feb-2010 Rebecca Cran <brucec@FreeBSD.org>

Remove the usb2_input_kbd directive that was missed during the renaming of the drivers in the usb2 stack.

Approved by: rrs (mentor)


# 5e860e7b 20-Dec-2009 Andriy Gapon <avg@FreeBSD.org>

MFC r199969: amdsbwd: new driver for AMD SB600/SB7xx watchdog timer


# a1778929 05-Dec-2009 Bjoern A. Zeeb <bz@FreeBSD.org>

MFC r197518:

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


# 5022f21b 30-Nov-2009 Andriy Gapon <avg@FreeBSD.org>

amdsbwd: new driver for AMD SB600/SB7xx watchdog timer

The hardware is compliant with WDRT specification, so I originally
considered including generic WDRT watchdog support, but decided
against it, because I couldn't find anyone to the code for me.
WDRT seems to be not very popular.
Besides, generic WDRT porbably requires a slightly different driver
approach.

Reviewed by: des, gavin, rpaulo
MFC after: 3 weeks


# 3219f535 19-Oct-2009 Jung-uk Kim <jkim@FreeBSD.org>

Rewrite x86bios and update its dependent drivers.

- Do not map entire real mode memory (1MB). Instead, we map IVT/BDA and
ROM area separately. Most notably, ROM area is mapped as device memory
(uncacheable) as it should be. User memory is dynamically allocated and
free'ed with contigmalloc(9) and contigfree(9). Remove now redundant and
potentially dangerous x86bios_alloc.c. If this emulator ever grows to
support non-PC hardware, we may implement it with rman(9) later.
- Move all host-specific initializations from x86emu_util.c to x86bios.c and
remove now unnecessary x86emu_util.c. Currently, non-PC hardware is not
supported. We may use bus_space(9) later when the KPI is fixed.
- Replace all bzero() calls for emulated registers with more obviously named
x86bios_init_regs(). This function also initializes DS and SS properly.
- Add x86bios_get_intr(). This function checks if the interrupt vector is
available for the platform. It is not necessary for PC-compatible hardware
but it may be needed later. ;-)
- Do not try turning off monitor if DPMS does not support the state.
- Allocate stable memory for VESA OEM strings instead of just holding
pointers to them. They may or may not be accessible always. Fix a memory
leak of video mode table while I am here.
- Add (experimental) BIOS POST call for vesa(4). This function calls VGA
BIOS POST code from the current VGA option ROM. Some video controllers
cannot save and restore the state properly even if it is claimed to be
supported. Usually the symptom is blank display after resuming from suspend
state. If the video mode does not match the previous mode after restoring,
we try BIOS POST and force the known good initial state. Some magic was
taken from NetBSD (and it was taken from vbetool, I believe.)
- Add a loader tunable for vgapci(4) to give a hint to dpms(4) and vesa(4)
to identify who owns the VESA BIOS. This is very useful for multi-display
adapter setup. By default, the POST video controller is automatically
probed and the tunable "hw.pci.default_vgapci_unit" is set to corresponding
vgapci unit number. You may override it from loader but it is very unlikely
to be necessary. Unfortunately only AGP/PCI/PCI-E controllers can be
matched because ISA controller does not have necessary device IDs.
- Fix a long standing bug in state save/restore function. The state buffer
pointer should be ES:BX, not ES:DI according to VBE 3.0. If it ever worked,
that's because BX was always zero. :-)
- Clean up register initializations more clearer per VBE 3.0.
- Fix a lot of style issues with vesa(4).


# bbaa712c 11-Oct-2009 Marcel Moolenaar <marcel@FreeBSD.org>

Scan for option ROMs on i386 and amd64 only.


# 4507f02e 25-Sep-2009 Bjoern A. Zeeb <bz@FreeBSD.org>

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


# ed89577f 24-Sep-2009 Jung-uk Kim <jkim@FreeBSD.org>

r197444 unnecessarily changed positions of these files. Re-sort.


# 19de5df5 23-Sep-2009 Jung-uk Kim <jkim@FreeBSD.org>

Move sys/dev/x86bios to sys/compat/x86bios.

It may not be optimal but it is clearly better than the old place.

OK'ed by: delphij, paradox (ddkprog yahoo com)


# 2f66eb1e 22-Sep-2009 Xin LI <delphij@FreeBSD.org>

Hide x86bios stuff in i386/amd64 specific files as atkbdc would get
these stuff into build.


# 6abad12d 21-Sep-2009 Xin LI <delphij@FreeBSD.org>

Automatically depend on x86emu when vesa or dpms is being built into
kernel. With this change the user no longer need to remember building
this option.

Submitted by: swell.k at gmail.com


# 372c7337 21-Sep-2009 Xin LI <delphij@FreeBSD.org>

Enable s3pci on amd64 which works on top of VESA, and allow
static building it into kernel on i386 and amd64.

Submitted by: swell.k at gmail.com


# ee5e90da 09-Sep-2009 Xin LI <delphij@FreeBSD.org>

- Teach vesa(4) and dpms(4) about x86emu. [1]
- Add vesa kernel options for amd64.
- Connect libvgl library and splash kernel modules to amd64 build.
- Connect manual page dpms(4) to amd64 build.
- Remove old vesa/dpms files.

Submitted by: paradox <ddkprog yahoo com> [1], swell k at gmail.com
(with some minor tweaks)


# 9b934d09 03-Sep-2009 Ed Schouten <ed@FreeBSD.org>

Move libteken out of the syscons directory.

I initially committed libteken to sys/dev/syscons/teken, but now that
I'm working on a console driver myself, I noticed this was not a good
decision. Move it to sys/teken to make it easier for other drivers to
use a terminal emulator.

Also list teken.c in sys/conf/files, instead of listing it in all the
files.arch files separately.


# df849145 23-Jun-2009 Rui Paulo <rpaulo@FreeBSD.org>

* Driver for ACPI WMI (Windows Management Instrumentation)
* Driver for ACPI HP extra functionations, which required
ACPI WMI driver.

Submitted by: Michael <freebsdusb at bindone.de>
Approved by: re
MFC after: 2 weeks


# 7d18ff9a 29-May-2009 Adrian Chadd <adrian@FreeBSD.org>

Migrate the Xen hypervisor clock reading routines into something
sharable.


# 58e3a119 27-May-2009 Adrian Chadd <adrian@FreeBSD.org>

Say hello to a very basic, read-only, Xen Hypervisor RTC.

The hypervisor doesn't provide a single "TOD" - it instead provides a
"start time" and a "running time". These are added together to form
the current TOD. The TOD is in UTC.

This RTC is only (initially) designed to be read at startup. There's
some further poking that needs to happen to pick up hypervisor time
changes (ie, by the Dom0 time being adjusted by something). This
time adjustment currently can cause "weird stuff" in the DomU clock;
I'll begin investigating and repairing that in subsequent commits.

PR: 135008


# 9dc0b3d5 13-May-2009 John Baldwin <jhb@FreeBSD.org>

Implement simple machine check support for amd64 and i386.
- For CPUs that only support MCE (the machine check exception) but not MCA
(i.e. Pentium), all this does is print out the value of the machine check
registers and then panic when a machine check exception occurs.
- For CPUs that support MCA (the machine check architecture), the support is
a bit more involved.
- First, there is limited support for decoding the CPU-independent MCA
error codes in the kernel, and the kernel uses this to output a short
description of any machine check events that occur.
- When a machine check exception occurs, all of the MCx banks on the
current CPU are scanned and any events are reported to the console
before panic'ing.
- To catch events for correctable errors, a periodic timer kicks off a
task which scans the MCx banks on all CPUs. The frequency of these
checks is controlled via the "hw.mca.interval" sysctl.
- Userland can request an immediate scan of the MCx banks by writing
a non-zero value to "hw.mca.force_scan".
- If any correctable events are encountered, the appropriate details
are stored in a 'struct mca_record' (defined in <machine/mca.h>).
The "hw.mca.count" is a count of such records and each record may
be queried via the "hw.mca.records" tree by specifying the record
index (0 .. count - 1) as the next name in the MIB similar to using
PIDs with the kern.proc.* sysctls. The idea is to export machine
check events to userland for more detailed processing.
- The periodic timer and hw.mca sysctls are only present if the CPU
supports MCA.

Discussed with: emaste (briefly)
MFC after: 1 month


# 51e6ba0f 08-May-2009 Ed Schouten <ed@FreeBSD.org>

Burn TTY ioctl bridges in compat layers.

I really don't want any pieces of code to include ioctl_compat.h, so let
the ibcs2 and svr4 compat leave sgtty alone. If they want to support
sgtty, they should emulate it on top of termios, not sgtty.

The code has been marked with BURN_BRIDGES for a long time. ibcs2 and
svr4 are not really popular pieces of code anyway.


# 24cd3710 28-Mar-2009 Michael Reifenberger <mr@FreeBSD.org>

Add support for Phenom (Family 10h) to cpufreq.
Its a newer version provided by the author than in the PR.

PR: kern/128575
Submitted by: Gen Otsuji annona2 [at] gmail.com


# b78d0925 26-Mar-2009 Doug Ambrisko <ambrisko@FreeBSD.org>

Sigh, not my day. Check-in the update version that didn't have
the linux_compat mistakes.


# d2b2128a 26-Mar-2009 Doug Ambrisko <ambrisko@FreeBSD.org>

Add stuff to support upcoming BMC/IPMI flashing of newer Dell machine
via the Linux tool.
- Add Linux shim to ipmi(4)
- Create a partitions file to linprocfs to make Linux fdisk see
disks. This file is dynamic so we can see disks come and go.
- Convert msdosfs to vfat in mtab since Linux uses that for
msdosfs.
- In the Linux mount path convert vfat passed in to msdosfs
so Linux mount works on FreeBSD. Note that tasting works
so that if da0 is a msdos file system
/compat/linux/bin/mount /dev/da0 /mnt
works.
- fix a 64it bug for l_off_t.
Grabing sh, mount, fdisk, df from Linux, creating a symlink of mtab to
/compat/linux/etc/mtab and then some careful unpacking of the Linux bmc
update tool and hacking makes it work on newer Dell boxes. Note, probably
if you can't figure out how to do this, then you probably shouldn't be
doing it :-)


# e5adda3d 15-Mar-2009 Robert Watson <rwatson@FreeBSD.org>

Remove IFF_NEEDSGIANT, a compatibility infrastructure introduced
in FreeBSD 5.x to allow network device drivers to run with Giant
despite the network stack being Giant-free. This significantly
simplifies calls into ioctl() on network interfaces, especially
in the multicast code, as well as eliminates deferred invocation
of interface if_start routines.

Disable the build on device drivers still depending on
IFF_NEEDSGIANT as they no longer compile. They will be removed
in a few weeks if they haven't been made MPSAFE in that time.
Disabled drivers:

if_ar
if_axe
if_aue
if_cdce
if_cue
if_kue
if_ray
if_rue
if_rum
if_sr
if_udav
if_ural
if_zyd

Drivers that were already disabled because of tty changes:

if_ppp
if_sl

Discussed on: arch@


# fc1f75e5 13-Mar-2009 Rui Paulo <rpaulo@FreeBSD.org>

Rename the k8temp driver to amdtemp.

MFC after: 2 weeks


# 802cb57e 28-Feb-2009 Ed Schouten <ed@FreeBSD.org>

Add memmove() to the kernel, making the kernel compile with Clang.

When copying big structures, LLVM generates calls to memmove(), because
it may not be able to figure out whether structures overlap. This caused
linker errors to occur. memmove() is now implemented using bcopy().
Ideally it would be the other way around, but that can be solved in the
future. On ARM we don't do add anything, because it already has
memmove().

Discussed on: arch@
Reviewed by: rdivacky


# 719085d9 15-Feb-2009 Andrew Thompson <thompsa@FreeBSD.org>

Pull in kbd.c with usb2_input_kbd, just like ukbd.


# 129dec42 23-Jan-2009 Jung-uk Kim <jkim@FreeBSD.org>

- Add few VIA bridges to agp_via.c and connect it to amd64 build
as they support Intel Core/Core 2 and VIA Nano processors.
- Align "optional agp" in conf/files.* for consistency while I am here.


# b4b1c516 01-Jan-2009 Ed Schouten <ed@FreeBSD.org>

Replace syscons terminal renderer by a new renderer that uses libteken.

Some time ago I started working on a library called libteken, which is
terminal emulator. It does not buffer any screen contents, but only
keeps terminal state, such as cursor position, attributes, etc. It
should implement all escape sequences that are implemented by the
cons25 terminal emulator, but also a fair amount of sequences that are
present in VT100 and xterm.

A lot of random notes, which could be of interest to users/developers:

- Even though I'm leaving the terminal type set to `cons25', users can
do experiments with placing `xterm-color' in /etc/ttys. Because we
only implement a subset of features of xterm, this may cause
artifacts. We should consider extending libteken, because in my
opinion xterm is the way to go. Some missing features:

- Keypad application mode (DECKPAM)
- Character sets (SCS)

- libteken is filled with a fair amount of assertions, but unfortunately
we cannot go into the debugger anymore if we fail them. I've done
development of this library almost entirely in userspace. In
sys/dev/syscons/teken there are two applications that can be helpful
when debugging the code:

- teken_demo: a terminal emulator that can be started from a regular
xterm that emulates a terminal using libteken. This application can
be very useful to debug any rendering issues.

- teken_stress: a stress testing application that emulates random
terminal output. libteken has literally survived multiple terabytes
of random input.

- libteken also includes support for UTF-8, but unfortunately our input
layer and font renderer don't support this. If users want to
experiment with UTF-8 support, they can enable `TEKEN_UTF8' in
teken.h. If you recompile your kernel or the teken_demo application,
you can hold some nice experiments.

- I've left PC98 the way it is right now. The PC98 platform has a custom
syscons renderer, which supports some form of localised input. Maybe
we should port PC98 to libteken by the time syscons supports UTF-8?

- I've removed the `dumb' terminal emulator. It has been broken for
years. It hasn't survived the `struct proc' -> `struct thread'
conversion.

- To prevent confusion among people that want to hack on libteken:
unlike syscons, the state machines that parse the escape sequences are
machine generated. This means that if you want to add new escape
sequences, you have to add an entry to the `sequences' file. This will
cause new entries to be added to `teken_state.h'.

- Any rendering artifacts that didn't occur prior to this commit are by
accident. They should be reported to me, so I can fix them.

Discussed on: current@, hackers@
Discussed with: philip (at 25C3)


# 33644623 01-Dec-2008 Sam Leffler <sam@FreeBSD.org>

Switch to ath hal source code. Note this removes the ath_hal
module; the ath module now brings in the hal support. Kernel
config files are almost backwards compatible; supplying

device ath_hal

gives you the same chip support that the binary hal did but you
must also include

options AH_SUPPORT_AR5416

to enable the extended format descriptors used by 11n parts.
It is now possible to control the chip support included in a
build by specifying exactly which chips are to be supported
in the config file; consult ath_hal(4) for information.


# 0cfab8dd 27-Nov-2008 Joseph Koshy <jkoshy@FreeBSD.org>

- Add support for PMCs in Intel CPUs of Family 6, model 0xE (Core Solo
and Core Duo), models 0xF (Core2), model 0x17 (Core2Extreme) and
model 0x1C (Atom).

In these CPUs, the actual numbers, kinds and widths of PMCs present
need to queried at run time. Support for specific "architectural"
events also needs to be queried at run time.

Model 0xE CPUs support programmable PMCs, subsequent CPUs
additionally support "fixed-function" counters.

- Use event names that are close to vendor documentation, taking in
account that:
- events with identical semantics on two or more CPUs in this family
can have differing names in vendor documentation,
- identical vendor event names may map to differing events across
CPUs,
- each type of CPU supports a different subset of measurable
events.

Fixed-function and programmable counters both use the same vendor
names for events. The use of a class name prefix ("iaf-" or
"iap-" respectively) permits these to be distinguished.

- In libpmc, refactor pmc_name_of_event() into a public interface
and an internal helper function, for use by log handling code.

- Minor code tweaks: staticize a global, freshen a few comments.

Tested by: gnn


# e829eb6d 09-Nov-2008 Joseph Koshy <jkoshy@FreeBSD.org>

- Separate PMC class dependent code from other kinds of machine
dependencies. A 'struct pmc_classdep' structure describes operations
on PMCs; 'struct pmc_mdep' contains one or more 'struct pmc_classdep'
structures depending on the CPU in question.

Inside PMC class dependent code, row indices are relative to the
PMCs supported by the PMC class; MI code in "hwpmc_mod.c" translates
global row indices before invoking class dependent operations.

- Augment the OP_GETCPUINFO request with the number of PMCs present
in a PMC class.

- Move code common to Intel CPUs to file "hwpmc_intel.c".

- Move TSC handling to file "hwpmc_tsc.c".


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 0c6e0345 22-Sep-2008 Kip Macy <kmacy@FreeBSD.org>

Update to xen specific files for SMP

MFC after: 1 month


# 26e46883 10-Sep-2008 John Baldwin <jhb@FreeBSD.org>

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

Tested by: friends of yar


# d315eab2 09-Sep-2008 Rui Paulo <rpaulo@FreeBSD.org>

Allow building k8temp on i386.

MFC after: 1 week


# aa7c1c05 23-Aug-2008 John Baldwin <jhb@FreeBSD.org>

Add a very simple dpms(4) driver that uses the VESA BIOS DPMS calls to
turn off the external display during suspend and restore it to its
original state on resume.

MFC after: 2 weeks


# 326f8c34 17-Aug-2008 Kip Macy <kmacy@FreeBSD.org>

disable "legacy" device on xen domU

MFC after: 1 month


# 10dc76a3 15-Aug-2008 Kip Macy <kmacy@FreeBSD.org>

Integrate configuration bits for compling xen.

MFC after: 1 month


# a51aa5d1 09-Aug-2008 Philip Paeps <philip@FreeBSD.org>

Add glxsb(4) driver for the Security Block in AMD Geode LX processors (as
found in Soekris hardware, for instance). The hardware supports acceleration
of AES-128-CBC accessible through crypto(4) and supplies entropy to random(4).

TODO:

o Implement rndtest(4) support
o Performance enhancements

Submitted by: Patrick Lamaizière <patfbsd -at- davenulle.org>
Reviewed by: jhb, sam
MFC after: 1 week


# e085f869 08-Aug-2008 Stanislav Sedov <stas@FreeBSD.org>

- Add cpuctl(4) pseudo-device driver to provide access to some low-level
features of CPUs like reading/writing machine-specific registers,
retrieving cpuid data, and updating microcode.
- Add cpucontrol(8) utility, that provides userland access to
the features of cpuctl(4).
- Add subsequent manpages.

The cpuctl(4) device operates as follows. The pseudo-device node cpuctlX
is created for each cpu present in the systems. The pseudo-device minor
number corresponds to the cpu number in the system. The cpuctl(4) pseudo-
device allows a number of ioctl to be preformed, namely RDMSR/WRMSR/CPUID
and UPDATE. The first pair alows the caller to read/write machine-specific
registers from the correspondent CPU. cpuid data could be retrieved using
the CPUID call, and microcode updates are applied via UPDATE.

The permissions are inforced based on the pseudo-device file permissions.
RDMSR/CPUID will be allowed when the caller has read access to the device
node, while WRMSR/UPDATE will be granted only when the node is opened
for writing. There're also a number of priv(9) checks.

The cpucontrol(8) utility is intened to provide userland access to
the cpuctl(4) device features. The utility also allows one to apply
cpu microcode updates.

Currently only Intel and AMD cpus are supported and were tested.

Approved by: kib
Reviewed by: rpaulo, cokane, Peter Jeremy
MFC after: 1 month


# e9a31041 04-Jul-2008 John Baldwin <jhb@FreeBSD.org>

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


# 2c629857 04-Jul-2008 John Baldwin <jhb@FreeBSD.org>

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.


# 94f923b6 04-Jul-2008 John Baldwin <jhb@FreeBSD.org>

Remove the arl(4) driver. It is reported to not work on 6.x or later
even though the driver hasn't changed since 4.x (last known working
release).


# 53a609f0 13-Jun-2008 Wojciech A. Koszek <wkoszek@FreeBSD.org>

Remove obselete PECOFF image activator support.

PRs assigned at the time of removal: kern/80742

Discussed on: freebsd-current (silence), IRC
Tested by: make universe
Approved by: cognet (mentor)


# 2e598474 26-May-2008 Bjoern A. Zeeb <bz@FreeBSD.org>

Remove ISDN4BSD (I4B) from HEAD as it is not MPSAFE and
parts relied on the now removed NET_NEEDS_GIANT.
Most of I4B has been disconnected from the build
since July 2007 in HEAD/RELENG_7.

This is what was removed:
- configuration in /etc/isdn
- examples
- man pages
- kernel configuration
- sys/i4b (drivers, layers, include files)
- user space tools
- i4b support from ppp
- further documentation

Discussed with: rwatson, re


# 0051271e 21-Apr-2008 Poul-Henning Kamp <phk@FreeBSD.org>

Make genclock standard on all platforms.

Thanks to: grehan & marcel for platform support on ia64 and ppc.


# 36bff1eb 14-Apr-2008 Poul-Henning Kamp <phk@FreeBSD.org>

Convert amd64 and i386 to share the atrtc device driver.


# 29464352 12-Apr-2008 Poul-Henning Kamp <phk@FreeBSD.org>

Move i386 to generic RTC handling code.

Make clock_if.m and subr_rtc.c standard on i386

Add hints for "atrtc" driver, for non-PnP, non-ACPI systems.
NB: Make sure to install GENERIC.hints into /boot/device.hints in these!

Nuke MD inittodr(), resettodr() functions.

Don't attach to PHP0B00 in the "attimer" dummy driver any more, and remove
comments that no longer apply for that reason.

Add new "atrtc" device driver, which handles IBM PC AT Real Time
Clock compatible devices using subr_rtc and clock_if.

This driver is not entirely clean: other code still fondles the
hardware to get a statclock interrupt on non-ACPI timer systems.

Wrap some overly long lines.

After it has settled in -current, this will be ported to amd64.

Technically this is MFC'able, but I fail to see a good reason.


# 593c8734 03-Feb-2008 Scott Long <scottl@FreeBSD.org>

Remove the rr232x driver. It has been superceded by the hptrr driver.


# 45044461 25-Dec-2007 Wojciech A. Koszek <wkoszek@FreeBSD.org>

"vt" doesn't refer to any existing device anymore. Remove it.

Reviewed by: cognet@ (mentor)
Approved by: cognet@ (mentor)


# b063a422 14-Dec-2007 Scott Long <scottl@FreeBSD.org>

Add the 'hptrr' driver for supporting the following Highpoint RocketRAID
cards:

o RocketRAID 172x series
o RocketRAID 174x series
o RocketRAID 2210
o RocketRAID 222x series
o RocketRAID 2240
o RocketRAID 230x series
o RocketRAID 231x series
o RocketRAID 232x series
o RocketRAID 2340
o RocketRAID 2522

Many thanks to Highpoint for their continued support of FreeBSD.

Submitted by: Highpoint


# dbfb54ff 09-Dec-2007 Alan Cox <alc@FreeBSD.org>

Eliminate compilation warnings due to the use of non-static inlines
through the introduction and use of the __gnu89_inline attribute.

Submitted by: bde (i386)
MFC after: 3 days


# 3c90d1ea 02-Dec-2007 Robert Watson <rwatson@FreeBSD.org>

Break out stack(9) from ddb(4):

- Introduce per-architecture stack_machdep.c to hold stack_save(9).
- Introduce per-architecture machine/stack.h to capture any common
definitions required between db_trace.c and stack_machdep.c.
- Add new kernel option "options STACK"; we will build in stack(9) if it is
defined, or also if "options DDB" is defined to provide compatibility
with existing users of stack(9).

Add new stack_save_td(9) function, which allows the capture of a stacktrace
of another thread rather than the current thread, which the existing
stack_save(9) was limited to. It requires that the thread be neither
swapped out nor running, which is the responsibility of the consumer to
enforce.

Update stack(9) man page.

Build tested: amd64, arm, i386, ia64, powerpc, sparc64, sun4v
Runtime tested: amd64 (rwatson), arm (cognet), i386 (rwatson)


# dbac8ff4 12-Nov-2007 John Baldwin <jhb@FreeBSD.org>

Move the agp(4) driver from sys/pci to sys/dev/agp. __FreeBSD_version was
bumped to 800004 to note the change though userland apps should not be
affected since they use <sys/agpio.h> rather than the headers in
sys/dev/agp.

Discussed with: anholt
Repocopy by: simon


# 03734771 08-Nov-2007 Benjamin Close <benjsc@FreeBSD.org>

Link wpi(4) into the build.

This includes:
o mtree (for legal/intel_wpi)
o manpage for i386/amd64 archs
o module for i386/amd64 archs
o NOTES for i386/amd64 archs

Approved by: mlaier (comentor)


# e702bc74 07-Nov-2007 Rui Paulo <rpaulo@FreeBSD.org>

Connect asmc to the build infrastructure.

Approved by: njl (mentor)
Reviewed by: njl (mentor)


# d5566384 25-Oct-2007 Peter Wemm <peter@FreeBSD.org>

Split /dev/nvram driver out of isa/clock.c for i386 and amd64. I have not
refactored it to be a generic device.
Instead of being part of the standard kernel, there is now a 'nvram' device
for i386/amd64. It is in DEFAULTS like io and mem, and can be turned off
with 'nodevice nvram'. This matches the previous behavior when it was
first committed.


# a9d185b2 25-Oct-2007 David E. O'Brien <obrien@FreeBSD.org>

Align.


# 9f05d312 15-Oct-2007 Alexander Leidinger <netchild@FreeBSD.org>

Backout sensors framework.

Requested by: phk
Discussed on: cvs-all


# 989500bf 14-Oct-2007 Alexander Leidinger <netchild@FreeBSD.org>

Import it(4) and lm(4), supporting most popular Super I/O Hardware Monitors.

Submitted by: Constantine A. Murenin <cnst@FreeBSD.org>
Sponsored by: Google Summer of Code 2007 (GSoC2007/cnst-sensors)
Mentored by: syrinx
Tested by: many
OKed by: kensmith
Obtained from: OpenBSD (parts)


# 83d18f22 15-Aug-2007 Dag-Erling Smørgrav <des@FreeBSD.org>

Add a driver for the on-die digital thermal sensor found on Intel Core
and newer CPUs (including Core 2 and Core / Core 2 based Xeons). The
driver attaches to each cpu device and creates a sysctl node in that
device's sysctl context (dev.cpu.N.temperature). When invoked, the
handler binds to the appropriate CPU to ensure a correct reading.

Submitted by: Rui Paulo <rpaulo@fnop.net>
Sponsored by: Google Summer of Code 2007
Tested by: des, marcus, Constantine A. Murenin, Ian FREISLICH
Approved by: re (kensmith)
MFC after: 3 weeks


# a9431a52 05-Jul-2007 Peter Wemm <peter@FreeBSD.org>

Temporarily turn nowerror on for i386 and amd64 pmap.c. I'd like to study
exactly what effect the options cause to the code with gcc these days.

Approved by: re (rwatson)


# b2630c29 02-Jul-2007 George V. Neville-Neil <gnn@FreeBSD.org>

Commit the change from FAST_IPSEC to IPSEC. The FAST_IPSEC
option is now deprecated, as well as the KAME IPsec code.
What was FAST_IPSEC is now IPSEC.

Approved by: re
Sponsored by: Secure Computing


# 2b39bb4f 10-Jun-2007 Marcel Moolenaar <marcel@FreeBSD.org>

Use default options for default partitioning schemes, rather than
making the relevant files standard. This avoids duplication and
makes it easier to override/disable unwanted schemes. Since ARM
doesn't have a DEFAULTS configuration file, leave the source
files for the BSD and MBR partitioning schemes in files.arm for
now.


# a96811b1 23-May-2007 Konstantin Belousov <kib@FreeBSD.org>

Fix the dependency for the linux_support.s, explicitely add linux_assym.h.

Reported by: rwatson
In collaboration with: rdivacky
Sponsored by: Google SoC 2007


# 1c182de9 23-May-2007 Konstantin Belousov <kib@FreeBSD.org>

Move futex support code from <arch>/support.s into linux compat directory.
Implement all futex atomic operations in assembler to not depend on the
fuword() that does not allow to distinguish between -1 and failure return.
Correctly return 0 from atomic operations on success.

In collaboration with: rdivacky
Tested by: Scot Hetzel <swhetzel gmail com>, Milos Vyletel <mvyletel mzm cz>
Sponsored by: Google SoC 2007


# 9f94082e 06-Apr-2007 Yoshihiro Takahashi <nyan@FreeBSD.org>

sort.


# 89c40e5f 05-Apr-2007 Alexander Kabaev <kan@FreeBSD.org>

Be more conservative and compile libkern/memset.c only on architectures
than need it. These are i386, amd64 and powerpc so far.


# 2c298b17 17-Dec-2006 Matt Jacob <mjacob@FreeBSD.org>

opt_ah.h ends up copied into a kernelcompile directory in some
aches as a read-only file. In a number of cases this has led to
compiles failing- usually due to some strange NFS drift which thinks
that the opt_ah.h in the compile directory is out of date wrt the
source it is copied from. When the copy is executed again, it fails
because the target is read-only. Oops. Modify the compile hooks
avoid this.

Discussed with a while back with: Sam Leffler


# 41849009 13-Nov-2006 John Baldwin <jhb@FreeBSD.org>

MD support for PCI Message Signalled Interrupts on amd64 and i386:
- Add a new apic_alloc_vectors() method to the local APIC support code
to allocate N contiguous IDT vectors (aligned on a M >= N boundary).
This function is used to allocate IDT vectors for a group of MSI
messages.
- Add MSI and MSI-X PICs. The PIC code here provides methods to manage
edge-triggered MSI messages as x86 interrupt sources. In addition to
the PIC methods, msi.c also includes methods to allocate and release
MSI and MSI-X messages. For x86, we allow for up to 128 different
MSI IRQs starting at IRQ 256 (IRQs 0-15 are reserved for ISA IRQs,
16-254 for APIC PCI IRQs, and IRQ 255 is reserved).
- Add pcib_(alloc|release)_msi[x]() methods to the MD x86 PCI bridge
drivers to bubble the request up to the nexus driver.
- Add pcib_(alloc|release)_msi[x]() methods to the x86 nexus drivers that
ask the MSI PIC code to allocate resources and IDT vectors.

MFC after: 2 months


# 3680a419 29-Oct-2006 Alexander Leidinger <netchild@FreeBSD.org>

Backout the linux aio stuff. Several problems where identified and the
dynamic nature (if no native aio code is available, the linux part
returns ENOSYS because of missing requisites) should be solved differently
than it is.

All this will be done in P4.

Not included in this commit is a backout of the changes to the native aio
code (removing static in some places). Those changes (and some more) will
also be needed when the reworked linux aio stuff will reenter the tree.

Requested by: rwatson
Discussed with: rwatson


# 837f167e 23-Oct-2006 Ruslan Ermilov <ru@FreeBSD.org>

Move "device splash" back to MI NOTES and "files", it's MI.


# 663cf7fe 23-Oct-2006 Ruslan Ermilov <ru@FreeBSD.org>

Move MI parts of syscons into MI "files".


# 6a1162d4 15-Oct-2006 Alexander Leidinger <netchild@FreeBSD.org>

MFP4 (with some minor changes):

Implement the linux_io_* syscalls (AIO). They are only enabled if the native
AIO code is available (either compiled in to the kernel or as a module) at
the time the functions are used. If the AIO stuff is not available there
will be a ENOSYS.

From the submitter:
---snip---
DESIGN NOTES:

1. Linux permits a process to own multiple AIO queues (distinguished by
"context"), but FreeBSD creates only one single AIO queue per process.
My code maintains a request queue (STAILQ of queue(3)) per "context",
and throws all AIO requests of all contexts owned by a process into
the single FreeBSD per-process AIO queue.

When the process calls io_destroy(2), io_getevents(2), io_submit(2) and
io_cancel(2), my code can pick out requests owned by the specified context
from the single FreeBSD per-process AIO queue according to the per-context
request queues maintained by my code.

2. The request queue maintained by my code stores contrast information between
Linux IO control blocks (struct linux_iocb) and FreeBSD IO control blocks
(struct aiocb). FreeBSD IO control block actually exists in userland memory
space, required by FreeBSD native aio_XXXXXX(2).

3. It is quite troubling that the function io_getevents() of libaio-0.3.105
needs to use Linux-specific "struct aio_ring", which is a partial mirror
of context in user space. I would rather take the address of context in
kernel as the context ID, but the io_getevents() of libaio forces me to
take the address of the "ring" in user space as the context ID.

To my surprise, one comment line in the file "io_getevents.c" of
libaio-0.3.105 reads:

Ben will hate me for this

REFERENCE:

1. Linux kernel source code: http://www.kernel.org/pub/linux/kernel/v2.6/
(include/linux/aio_abi.h, fs/aio.c)

2. Linux manual pages: http://www.kernel.org/pub/linux/docs/manpages/
(io_setup(2), io_destroy(2), io_getevents(2), io_submit(2), io_cancel(2))

3. Linux Scalability Effort: http://lse.sourceforge.net/io/aio.html
The design notes: http://lse.sourceforge.net/io/aionotes.txt

4. The package libaio, both source and binary:
http://rpmfind.net/linux/rpm2html/search.php?query=libaio
Simple transparent interface to Linux AIO system calls.

5. Libaio-oracle: http://oss.oracle.com/projects/libaio-oracle/
POSIX AIO implementation based on Linux AIO system calls (depending on
libaio).
---snip---

Submitted by: Li, Xiao <intron@intron.ac>


# d72a0786 22-Sep-2006 John Baldwin <jhb@FreeBSD.org>

Update the ipmi(4) driver:
- Split out the communication protocols into their own files and use
a couple of function pointers in the softc that the commuication
protocols setup in their own attach routine.
- Add support for the SSIF interface (talking to IPMI over SMBus).
- Add an ACPI attachment.
- Add a PCI attachment that attaches to devices with the IPMI interface
subclass.
- Split the ISA attachment out into its own file: ipmi_isa.c.
- Change the code to probe the SMBIOS table for an IPMI entry to just use
pmap_mapbios() to map the table in rather than trying to setup a fake
resource on an isa device and then activating the resource to map in the
table.
- Make bus attachments leaner by adding attach functions for each
communication interface (ipmi_kcs_attach(), ipmi_smic_attach(), etc.)
that setup per-interface data.
- Formalize the model used by the driver to handle requests by adding an
explicit struct ipmi_request object that holds the state of a given
request and reply for the entire lifetime of the request. By bundling
the request into an object, it is easier to add retry logic to the various
communication backends (as well as eventually support BT mode which uses
a slightly different message format than KCS, SMIC, and SSIF).
- Add a per-softc lock and remove D_NEEDGIANT as the driver is now MPSAFE.
- Add 32-bit compatibility ioctl shims so you can use a 32-bit ipmitool
on FreeBSD/amd64.
- Add ipmi(4) to i386 and amd64 NOTES.

Submitted by: ambrisko (large portions of 2 and 3)
Sponsored by: IronPort Systems, Yahoo!
MFC after: 6 days


# 9b44bfc5 14-Aug-2006 Alexander Leidinger <netchild@FreeBSD.org>

Add the linux 2.6.x stuff (not used by default!):
- TLS - complete
- pid/tid mangling - complete
- thread area - complete
- futexes - complete with issues
- clone() extension - complete with some possible minor issues
- mq*/timer*/clock* stuff - complete but untested and the mq* stuff is
disabled when not build as part of the kernel with native FreeBSD mq*
support (module support for this will come later)

Tested with:
- linux-firefox - works, tested
- linux-opera - works, tested
- linux-realplay - doesnt work, issue with futexes
- linux-skype - doesnt work, issue with futexes
- linux-rt2-demo - works, tested
- linux-acroread - doesnt work, unknown reason (coredump) and sometimes
issue with futexes
- various unix utilities in linux-base-gentoo3 and linux-base-fc4:
everything tried worked

On amd64 not everything is supported like on i386, the catchup is planned for
later when the remaining bugs in the new functions are fixed.

To test this new stuff, you have to run
sysctl compat.linux.osrelease=2.6.16
to switch back use
sysctl compat.linux.osrelease=2.4.2

Don't switch while running a linux program, strange things may or may not
happen.

Sponsored by: Google SoC 2006
Submitted by: rdivacky
Some suggestions/help by: jhb, kib, manu@NetBSD.org, netchild


# 302981e7 29-Jul-2006 Marcel Moolenaar <marcel@FreeBSD.org>

Remove sio(4) and related options from MI files to amd64, i386
and pc98 MD files. Remove nodevice and nooption lines specific
to sio(4) from ia64, powerpc and sparc64 NOTES. There were no
such lines for arm yet.
sio(4) is usable on less than half the platforms, not counting
a future mips platform. Its presence in MI files is therefore
increasingly becoming a burden.


# 5333bd47 22-Jul-2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Implement support for HMAC/SHA1 and HMAC/SHA256 acceleration found in
new VIA CPUs.
For older CPUs HMAC/SHA1 and HMAC/SHA256 (and others) will still be done
in software.

Move symmetric cryptography (currently only AES-CBC 128/192/256) to
padlock_cipher.c file. Move HMAC cryptography to padlock_hash.c file.

Hardware from: Centaur Technologies


# bfc788c2 26-Jun-2006 David E. O'Brien <obrien@FreeBSD.org>

Add a pure open source nForce Ethernet driver, under BSDL.
This driver was ported from OpenBSD by Shigeaki Tagashira
<shigeaki@se.hiroshima-u.ac.jp> and posted at
http://www.se.hiroshima-u.ac.jp/~shigeaki/software/freebsd-nfe.html
It was additionally cleaned up by me.
It is still a work-in-progress and thus is purposefully not in GENERIC.
And it conflicts with nve(4), so only one should be loaded.


# 136eda1d 17-May-2006 Marius Strobl <marius@FreeBSD.org>

- Add C-bus and ISA front-ends for le(4) so it can actually replace
lnc(4) on PC98 and i386. The ISA front-end supports the same non-PNP
network cards as lnc(4) did and additionally a couple of PNP ones.
Like lnc(4), the C-bus front-end of le(4) only supports C-NET(98)S
and is untested due to lack of such hardware, but given that's it's
based on the respective lnc(4) and not too different from the ISA
front-end it should be highly likely to work.
- Remove the descriptions of le(4), which where converted from lnc(4),
from sys/i386/conf/NOTES and sys/pc98/conf/NOTES as there's a common
one in sys/conf/NOTES.


# f6ce2a64 17-May-2006 Poul-Henning Kamp <phk@FreeBSD.org>

Send the pcvt(4) driver off to retirement.


# 990e7e2b 13-May-2006 George V. Neville-Neil <gnn@FreeBSD.org>

Removed the deprecated lance driver, lnc, from files.


# 32397ce0 09-May-2006 Doug Ambrisko <ambrisko@FreeBSD.org>

Add in linsysfs. A linux 2.6 like sys filesystem to pacify the Linux
LSI MegaRAID SAS utility.

Sponsored by: IronPort Systems
Man page help from: brueffer


# f4eb4717 07-May-2006 Alexander Leidinger <netchild@FreeBSD.org>

- change the example of compiling only specific modules to not contain
the linux module, since it is not cross-platform
- move linprocfs from "files" and "options" to architecture specific files,
since it only makes sense to build this for those architectures, where we
also have a linuxolator
- disable the build of the linuxolator on our tier-2 architecture "Alpha":
* we don't have a linux_base port which supports Alpha and at the
same time is not outdated/obsoleted upstream/in a good condition/
currently working
* the upcomming new default linux base port is based upon Fedora
Core 3 (security support via http://www.fedoralegacy.org), which
isn't available for Alpha (like the current default linux base
port which is based upon Red Hat 8)
* nobody answered my request for testing it ~1 month ago on
current@ and alpha@ (it doesn't surprises me, see above)
* a SoC student wouldn't have to waste time on something which
nobody is willing to test

This does not remove the alpha specific MD files of the linuxolator yet.

Discussed on: arch (mostly silence)
Spiritual support by: scottl


# 9bcb2750 27-Apr-2006 Scott Long <scottl@FreeBSD.org>

Add the 'rr232x' driver for the HighPoint RocketRAID 2320 series of cards.
This driver was generously developed and donated by Highpoint.

It is enabled for i386 only at the moment. I will enable it for amd64
shortly.

Obtained from: HighPoint Technologies, Inc.


# cea4d875 24-Apr-2006 Marcel Moolenaar <marcel@FreeBSD.org>

o Move ISA specific code from ppc.c to ppc_isa.c -- a bus front-
end for isa(4).
o Add a seperate bus frontend for acpi(4) and allow ISA DMA for
it when ISA is configured in the kernel. This allows acpi(4)
attachments in non-ISA configurations, as is possible for ia64.
o Add a seperate bus frontend for pci(4) and detect known single
port parallel cards.
o Merge PC98 specific changes under pc98/cbus into the MI driver.
The changes are minor enough for conditional compilation and
in this form invites better abstraction.
o Have ppc(4) usabled on all platforms, now that ISA specifics
are untangled enough.


# 4503a06e 20-Apr-2006 Peter Wemm <peter@FreeBSD.org>

Merge minidumps from amd64 where they were originally developed.

Major differences:
* since there is no direct map region, there is no custom uma memory
allocator to modify to include its pages in the dumps.
* Various data entries are reduced from 64 bit to 32 bit to match the
native size.

dump_add_page() and dump_drop_page() are still present in case one wants to
arrange for arbitary pages to be dumped. This is of marginal use though
because libkvm+kgdb cannot address physical memory that isn't mapped into
kvm.


# 8d96e455 05-Mar-2006 Yaroslav Tykhiy <ytykhiy@gmail.com>

Retire NETSMBCRYPTO as a kernel option and make its functionality
enabled by default in NETSMB and smbfs.ko.

With the most of modern SMB providers requiring encryption by
default, there is little sense left in keeping the crypto part
of NETSMB optional at the build time.

This will also return smbfs.ko to its former properties users
are rather accustomed to.

Discussed with: freebsd-stable, re (scottl)
Not objected by: bp, tjr (silence)
MFC after: 5 days


# 1c204a57 13-Feb-2006 Doug Ambrisko <ambrisko@FreeBSD.org>

Tie the ipmi driver into the i386/amd64 builds.


# f2ca64ca 31-Jan-2006 Roman Kurakin <rik@FreeBSD.org>

Attach ce(4) to the build.

MFC after: 3 days


# 848c454c 07-Dec-2005 Jung-uk Kim <jkim@FreeBSD.org>

Add BPF Just-In-Time compiler support for ng_bpf(4).

The sysctl is changed from net.bpf.jitter.enable to net.bpf_jitter.enable
and this controls both bpf(4) and ng_bpf(4) now.


# ae275efc 05-Dec-2005 Jung-uk Kim <jkim@FreeBSD.org>

Add experimental BPF Just-In-Time compiler for amd64 and i386.

Use the following kernel configuration option to enable:

options BPF_JITTER

If you want to use bpf_filter() instead (e. g., debugging), do:

sysctl net.bpf.jitter.enable=0

to turn it off.

Currently BIOCSETWF and bpf_mtap2() are unsupported, and bpf_mtap() is
partially supported because 1) no need, 2) avoid expensive m_copydata(9).

Obtained from: WinPcap 3.1 (for i386)


# 9f7e6c7c 27-Nov-2005 Ruslan Ermilov <ru@FreeBSD.org>

Reduction.


# a8e06f2a 27-Nov-2005 Ruslan Ermilov <ru@FreeBSD.org>

Make config(8) understand ORed dependecies in "files*" and
improve tracking of known devices. Bump config(8) version.


# abb6a9b8 26-Nov-2005 Ruslan Ermilov <ru@FreeBSD.org>

Remove duplicates.


# 33b61b67 21-Nov-2005 Ruslan Ermilov <ru@FreeBSD.org>

Pull up sys/modules/acpi/acpi/Makefile,v 1.10 change by iedowse@.
This should fix another parallel make breakage, reported by pjd@.


# 6d8200ff 11-Nov-2005 Ruslan Ermilov <ru@FreeBSD.org>

Add /dev/speaker support to amd64.

The following repo-copies were made (by Mark Murray):

sys/i386/isa/spkr.c -> sys/dev/speaker/spkr.c
sys/i386/include/speaker.h -> sys/dev/speaker/speaker.h
share/man/man4/man4.i386/spkr.4 -> share/man/man4/spkr.4


# 51ef421d 08-Nov-2005 Warner Losh <imp@FreeBSD.org>

Add support for XBOX to the FreeBSD port. The xbox architecture is
nearly identical to wintel/ia32, with a couple of tweaks. Since it is
so similar to ia32, it is optionally added to a i386 kernel. This
port is preliminary, but seems to work well. Further improvements
will improve the interaction with syscons(4), port Linux nforce driver
and future versions of the xbox.

This supports the 64MB and 128MB boxes. You'll need the most recent
CVS version of Cromwell (the Linux BIOS for the XBOX) to boot.

Rink will be maintaining this port, and is interested in feedback.
He's setup a website http://xbox-bsd.nl to report the latest
developments.

Any silly mistakes are my fault.

Submitted by: Rink P.W. Springer rink at stack dot nl and
Ed Schouten ed at fxq dot nl


# 9b229abc 28-Oct-2005 Joerg Wunsch <joerg@FreeBSD.org>

Finally complete some work on generalizing the PCF8584-based I2C
drivers I started quite some time before.

Retire the old i386-only pcf driver, and activate the new general
driver that has been sitting in the tree already for quite some
time.

Build the i2c modules for sparc64 architectures as well (where I've
been developing all this on).


# e3e1ac86 16-Sep-2005 Eric Anholt <anholt@FreeBSD.org>

Add a new AGP driver for ATI IGP chipsets. The driver is based on reading of
the Linux driver, since specs are unavailable. Many thanks to Adam Kirchhoff
for multiple useful testing cycles, and Ralf Wostrack for the final fix to get
it working.

PR: i386/75251
Submitted by: anholt


# 721be80c 26-Aug-2005 John Baldwin <jhb@FreeBSD.org>

Remove the el(4) driver for 3Com 3c501 ISA NICs from HEAD as threatened
earlier as no one has stepped up to test recent changes to the driver.
Oddly, the module was actually turned on on ia64 though I'm fairly certain
that no ia64 machine has ever had or will ever have an ISA slot.

Axe borrowed from: phk


# ef0a6e20 17-Aug-2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Add VIA/ACE "PadLock" support as a crypto(9) driver.

HW donated by: Mike Tancsa <mike@sentex.net>
Most of the code obtained from: OpenBSD
MFC after: 3 days


# fe98fb32 21-Jun-2005 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

Connect reiserfs build to every platforms, not only i386 and pc98.

Reviewed by: mux (mentor)
Approved by: re (dougb)


# d6d3f5ac 18-Jun-2005 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

Moving reiserfs from sys/gnu to sys/gnu/fs. This was discussed on arch@.

Reviewed by: mux (mentor)
Approved by: re (scottl)


# b16d349f 11-Jun-2005 Marcel Moolenaar <marcel@FreeBSD.org>

Refactor the NETSMBCRYPTO option so that it does the same on all
platforms. ARM is excluded as it doesn't yet have any crypto
sources.

Approved by: re (dwhite)
MFC after: 1 day


# 520b6353 10-Jun-2005 Marius Strobl <marius@FreeBSD.org>

- Hook up the new locations of the atkbdc(4), atkbd(4) and psm(4) source
files after they were repo-copied to sys/dev/atkbdc. The sources of
atkbdc(4) and its children were moved to the new location in preparation
for adding an EBus front-end to atkbdc(4) for use on sparc64; i.e. in
order to not further scatter them over the whole tree which would have
been the result of adding atkbdc_ebus.c in e.g. sys/sparc64/ebus. Another
reason for the repo-copies was that some of the sources were misfiled,
e.g. sys/isa/atkbd_isa.c wasn't ISA-specific at all but for hanging
atkbd(4) off of atkbdc(4) and was renamed to atkbd_atkbdc.c accordingly.
Most of sys/isa/psm.c, i.e. expect for its PSMC PNP part, also isn't
ISA-specific.
- Separate the parts of atkbdc_isa.c which aren't actually ISA-specific
but are shareable between different atkbdc(4) bus front-ends into
atkbdc_subr.c (repo-copied from atkbdc_isa.c). While here use
bus_generic_rl_alloc_resource() and bus_generic_rl_release_resource()
respectively in atkbdc_isa.c instead of rolling own versions.
- Add sparc64 MD bits to atkbdc(4) and atkbd(4) and an EBus front-end for
atkbdc(4). PS/2 controllers and input devices are used on a couple of
Sun OEM boards and occur on either the EBus or the ISA bus. Depending on
the board it's either the only on-board mean to connect a keyboard and
mouse or an alternative to either RS232 or USB devices.
- Wrap the PSMC PNP part of psm.c in #ifdef DEV_ISA so it can be compiled
without isa(4) (e.g. for EBus-only machines). This ISA-specific part
isn't separated into its own source file, yet, as it requires more work
than was feasible for 6.0 in order to do it in a clean way. Actually
philip@ is working on a rewrite of psm(4) so a more comprehensive
clean-up and separation of hardware dependent and independent parts is
expected to happen after 6.0.

Tested on: i386, sparc64 (AX1105, AXe and AXi boards)
Reviewed by: philip


# f263522a 09-Jun-2005 Joseph Koshy <jkoshy@FreeBSD.org>

MFP4:

- Implement sampling modes and logging support in hwpmc(4).

- Separate MI and MD parts of hwpmc(4) and allow sharing of
PMC implementations across different architectures.
Add support for P4 (EMT64) style PMCs to the amd64 code.

- New pmcstat(8) options: -E (exit time counts) -W (counts
every context switch), -R (print log file).

- pmc(3) API changes, improve our ability to keep ABI compatibility
in the future. Add more 'alias' names for commonly used events.

- bug fixes & documentation.


# 8d7681bb 31-May-2005 Doug Rabson <dfr@FreeBSD.org>

Add support for XMM registers in GDB for x86 processors that support
SSE (or its successors).

Reviewed by: marcel, davidxu
MFC After: 2 weeks


# fc7a25fd 23-May-2005 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

Connect the ReiserFS filesystem to the build (i386 only).

Approved by: mux (mentor)


# 9fa98e70 28-Apr-2005 Scott Long <scottl@FreeBSD.org>

Update the file.* entries for the new home of hwpmc


# 96b50ea3 24-Apr-2005 Bill Paul <wpaul@FreeBSD.org>

Throw the switch on the new driver generation/loading mechanism. From
here on in, if_ndis.ko will be pre-built as a module, and can be built
into a static kernel (though it's not part of GENERIC). Drivers are
created using the new ndisgen(8) script, which uses ndiscvt(8) under
the covers, along with a few other tools. The result is a driver module
that can be kldloaded into the kernel.

A driver with foo.inf and foo.sys files will be converted into
foo_sys.ko (and foo_sys.o, for those who want/need to make static
kernels). This module contains all of the necessary info from the
.INF file and the driver binary image, converted into an ELF module.
You can kldload this module (or add it to /boot/loader.conf) to have
it loaded automatically. Any required firmware files can be bundled
into the module as well (or converted/loaded separately).

Also, add a workaround for a problem in NdisMSleep(). During system
bootstrap (cold == 1), msleep() always returns 0 without actually
sleeping. The Intel 2200BG driver uses NdisMSleep() to wait for
the NIC's firmware to come to life, and fails to load if NdisMSleep()
doesn't actually delay. As a workaround, if msleep() (and hence
ndis_thsuspend()) returns 0, use a hard DELAY() to sleep instead).
This is not really the right thing to do, but we can't really do much
else. At the very least, this makes the Intel driver happy.

There are probably other drivers that fail in this way during bootstrap.
Unfortunately, the only workaround for those is to avoid pre-loading
them and kldload them once the system is running instead.


# 108311ba 22-Apr-2005 Ruslan Ermilov <ru@FreeBSD.org>

Clean generated os+%DIKED-nve.h.


# 79a416e9 19-Apr-2005 Warner Losh <imp@FreeBSD.org>

Need more files for i386, need all the files for pc98.


# 8cb4b638 19-Apr-2005 Nate Lawson <njl@FreeBSD.org>

Hook smist up to the kernel build.


# ebccf1e3 18-Apr-2005 Joseph Koshy <jkoshy@FreeBSD.org>

Bring a working snapshot of hwpmc(4), its associated libraries, userland utilities
and documentation into -CURRENT.

Bump FreeBSD_version.

Reviewed by: alc, jhb (kernel changes)


# c1972c49 11-Apr-2005 Bill Paul <wpaul@FreeBSD.org>

Add winx32_wrap.S to files.i386 for the NDISulator.


# c6a37e84 04-Apr-2005 John Baldwin <jhb@FreeBSD.org>

Divorce critical sections from spinlocks. Critical sections as denoted by
critical_enter() and critical_exit() are now solely a mechanism for
deferring kernel preemptions. They no longer have any affect on
interrupts. This means that standalone critical sections are now very
cheap as they are simply unlocked integer increments and decrements for the
common case.

Spin mutexes now use a separate KPI implemented in MD code: spinlock_enter()
and spinlock_exit(). This KPI is responsible for providing whatever MD
guarantees are needed to ensure that a thread holding a spin lock won't
be preempted by any other code that will try to lock the same lock. For
now all archs continue to block interrupts in a "spinlock section" as they
did formerly in all critical sections. Note that I've also taken this
opportunity to push a few things into MD code rather than MI. For example,
critical_fork_exit() no longer exists. Instead, MD code ensures that new
threads have the correct state when they are created. Also, we no longer
try to fixup the idlethreads for APs in MI code. Instead, each arch sets
the initial curthread and adjusts the state of the idle thread it borrows
in order to perform the initial context switch.

This change is largely a big NOP, but the cleaner separation it provides
will allow for more efficient alternative locking schemes in other parts
of the kernel (bare critical sections rather than per-CPU spin mutexes
for per-CPU data for example).

Reviewed by: grehan, cognet, arch@, others
Tested on: i386, alpha, sparc64, powerpc, arm, possibly more


# d0885ac3 31-Mar-2005 Scott Long <scottl@FreeBSD.org>

Glue the arcmsr driver into the tree.


# bc4c8712 27-Mar-2005 Nate Lawson <njl@FreeBSD.org>

Add powernow to kernel build target.


# 1b1a07ad 11-Mar-2005 David E. O'Brien <obrien@FreeBSD.org>

FreeBSD consumer bits of the nForce MCP NIC binary blob.

Demanded by: DES
Encouraged by: scottl
Obtained from: q@onthenet.com.au (partially)
KNF'ed by: obrien


# d38d9c9e 01-Mar-2005 Scott Long <scottl@FreeBSD.org>

Move all of the hptmv files to /sys/dev/hptmv so that they won't be mistaken
for being on a CVS vendor branch. The files were moved via a repo-copy.


# 63ba67b6 24-Feb-2005 Bill Paul <wpaul@FreeBSD.org>

- Correct one aspect of the driver_object/device_object/IRP framework:
when we create a PDO, the driver_object associated with it is that
of the parent driver, not the driver we're trying to attach. For
example, if we attach a PCI device, the PDO we pass to the NdisAddDevice()
function should contain a pointer to fake_pci_driver, not to the NDIS
driver itself. For PCI or PCMCIA devices this doesn't matter because
the child never needs to talk to the parent bus driver, but for USB,
the child needs to be able to send IRPs to the parent USB bus driver, and
for that to work the parent USB bus driver has to be hung off the PDO.

This involves modifying windrv_lookup() so that we can search for
bus drivers by name, if necessary. Our fake bus drivers attach themselves
as "PCI Bus," "PCCARD Bus" and "USB Bus," so we can search for them
using those names.

The individual attachment stubs now create and attach PDOs to the
parent bus drivers instead of hanging them off the NDIS driver's
object, and in if_ndis.c, we now search for the correct driver
object depending on the bus type, and use that to find the correct PDO.

With this fix, I can get my sample USB ethernet driver to deliver
an IRP to my fake parent USB bus driver's dispatch routines.

- Add stub modules for USB support: subr_usbd.c, usbd_var.h and
if_ndis_usb.c. The subr_usbd.c module is hooked up the build
but currently doesn't do very much. It provides the stub USB
parent driver object and a dispatch routine for
IRM_MJ_INTERNAL_DEVICE_CONTROL. The only exported function at
the moment is USBD_GetUSBDIVersion(). The if_ndis_usb.c stub
compiles, but is not hooked up to the build yet. I'm putting
these here so I can keep them under source code control as I
flesh them out.


# badee853 23-Feb-2005 Nate Lawson <njl@FreeBSD.org>

Remove CPU_ENABLE_TCC and hook the cpufreq p4tcc up to the build.


# f5a3ee30 20-Feb-2005 Nate Lawson <njl@FreeBSD.org>

Hook EST up to the build.


# 969eaf21 09-Feb-2005 Warner Losh <imp@FreeBSD.org>

Break out obscure ISA cards into their own files, as well as ne2000
and wd80x3 support. Make the obscure ISA cards optional, and add
those options to NOTES on i386 (note: the ifdef around the whole code
is for module building). Tweak pc98 ed support to include wd80x3 too.
Add goo for alpha too.

The affected cards are the 3Com 3C503, HP LAN+ and SIC (whatever that
is). I couldn't find any of these for sale on ebay, so they are
untested. If you have one of these cards, and send it to me, I'll
ensure that you have no future problems with it...

Minor cleanups as well by using functions rather than cut and paste
code for some probing operations (where the function call overhead is
lost in the noise).

Remove use of kvtop, since they aren't required anymore. This driver
needs to get its memory mapped act together, however, and use bus
space. It doesn't right now.

This reduces the size of if_ed.ko from about 51k to 33k on my laptop.


# b545a3b8 08-Feb-2005 Bill Paul <wpaul@FreeBSD.org>

Next step on the road to IRPs: create and use an imitation of the
Windows DRIVER_OBJECT and DEVICE_OBJECT mechanism so that we can
simulate driver stacking.

In Windows, each loaded driver image is attached to a DRIVER_OBJECT
structure. Windows uses the registry to match up a given vendor/device
ID combination with a corresponding DRIVER_OBJECT. When a driver image
is first loaded, its DriverEntry() routine is invoked, which sets up
the AddDevice() function pointer in the DRIVER_OBJECT and creates
a dispatch table (based on IRP major codes). When a Windows bus driver
detects a new device, it creates a Physical Device Object (PDO) for
it. This is a DEVICE_OBJECT structure, with semantics analagous to
that of a device_t in FreeBSD. The Windows PNP manager will invoke
the driver's AddDevice() function and pass it pointers to the DRIVER_OBJECT
and the PDO.

The AddDevice() function then creates a new DRIVER_OBJECT structure of
its own. This is known as the Functional Device Object (FDO) and
corresponds roughly to a private softc instance. The driver uses
IoAttachDeviceToDeviceStack() to add this device object to the
driver stack for this PDO. Subsequent drivers (called filter drivers
in Windows-speak) can be loaded which add themselves to the stack.
When someone issues an IRP to a device, it travel along the stack
passing through several possible filter drivers until it reaches
the functional driver (which actually knows how to talk to the hardware)
at which point it will be completed. This is how Windows achieves
driver layering.

Project Evil now simulates most of this. if_ndis now has a modevent
handler which will use MOD_LOAD and MOD_UNLOAD events to drive the
creation and destruction of DRIVER_OBJECTs. (The load event also
does the relocation/dynalinking of the image.) We don't have a registry,
so the DRIVER_OBJECTS are stored in a linked list for now. Eventually,
the list entry will contain the vendor/device ID list extracted from
the .INF file. When ndis_probe() is called and detectes a supported
device, it will create a PDO for the device instance and attach it
to the DRIVER_OBJECT just as in Windows. ndis_attach() will then call
our NdisAddDevice() handler to create the FDO. The NDIS miniport block
is now a device extension hung off the FDO, just as it is in Windows.
The miniport characteristics table is now an extension hung off the
DRIVER_OBJECT as well (the characteristics are the same for all devices
handled by a given driver, so they don't need to be per-instance.)
We also do an IoAttachDeviceToDeviceStack() to put the FDO on the
stack for the PDO. There are a couple of fake bus drivers created
for the PCI and pccard buses. Eventually, there will be one for USB,
which will actually accept USB IRP.s

Things should still work just as before, only now we do things in
the proper order and maintain the correct framework to support passing
IRPs between drivers.

Various changes:

- corrected the comments about IRQL handling in subr_hal.c to more
accurately reflect reality
- update ndiscvt to make the drv_data symbol in ndis_driver_data.h a
global so that if_ndis_pci.o and/or if_ndis_pccard.o can see it.
- Obtain the softc pointer from the miniport block by referencing
the PDO rather than a private pointer of our own (nmb_ifp is no
longer used)
- implement IoAttachDeviceToDeviceStack(), IoDetachDevice(),
IoGetAttachedDevice(), IoAllocateDriverObjectExtension(),
IoGetDriverObjectExtension(), IoCreateDevice(), IoDeleteDevice(),
IoAllocateIrp(), IoReuseIrp(), IoMakeAssociatedIrp(), IoFreeIrp(),
IoInitializeIrp()
- fix a few mistakes in the driver_object and device_object definitions
- add a new module, kern_windrv.c, to handle the driver registration
and relocation/dynalinkign duties (which don't really belong in
kern_ndis.c).
- made ndis_block and ndis_chars in the ndis_softc stucture pointers
and modified all references to it
- fixed NdisMRegisterMiniport() and NdisInitializeWrapper() so they
work correctly with the new driver_object mechanism
- changed ndis_attach() to call NdisAddDevice() instead of ndis_load_driver()
(which is now deprecated)
- used ExAllocatePoolWithTag()/ExFreePool() in lookaside list routines
instead of kludged up alloc/free routines
- added kern_windrv.c to sys/modules/ndis/Makefile and files.i386.


# 1f005b67 03-Feb-2005 Matthew N. Dodd <mdodd@FreeBSD.org>

- Split out PCI support.
- Add previously removed ISA support.

Submitted by: David S. Madole <david AT madole.net>


# 1307b81e 09-Jan-2005 Warner Losh <imp@FreeBSD.org>

Sort entries.
Remove a couple of 'card' lines that were somehow missed when OLDCARD was
desupported.


# 944d0f0f 03-Jan-2005 Warner Losh <imp@FreeBSD.org>

move all the card entries to files.pc98
style change: regularize tabbing


# 6c5c0a5a 12-Dec-2004 Warner Losh <imp@FreeBSD.org>

Separate mse driver into a core driver and a bus attachments. Separate out
the ISA and CBUS (called isa on pc98) attachments. Eliminate all PC98
ifdefs in the process (the driver in pc98/pc98/mse.c was a copy of the one
in i386/isa/mse.c with PC98 ifdefs). Create a module for this driver.

I've tested this my PC-9821RaS40 with moused. I've not tested this on i386
because I have no InPort cards, or similar such things. NEC standardized
on bus mice very early, long before ps/2 mice ports apeared, so all PC-98
machines supported by FreeBSD/pc98 have bus mice, I believe.

Reviewed by: nyan-san


# d487b9ed 08-Dec-2004 Sam Leffler <sam@FreeBSD.org>

update for new ath hal


# 685e7002 22-Nov-2004 Warner Losh <imp@FreeBSD.org>

It appears that 'kbd' device has never been used and isn't needed.
Build tests show that this isn't used for GENERIC or LINT, and nobody
seemed to know why they existed.


# c2aed512 14-Nov-2004 Warner Losh <imp@FreeBSD.org>

After discussions with Nate, repo copy the acpi assist drivers from
i386 to dev/acpi_support. In theory, these devices could be found
other than in i386 machines only as amd64 becomes more popular. These
drivers don't appear to do anything i386 specific, so move them to
dev/acpi_support. Move config lines to files so that those
architectures that don't support kernel modules can build them into
the kernel. At the same time, rename acpi_snc to acpi_sony to follow
the lead of all the other specialty devices.


# c8c8f27a 10-Nov-2004 Warner Losh <imp@FreeBSD.org>

pbio has moved to dev/pbio

Prodded by: peter


# 085f35d6 24-Oct-2004 Scott Long <scottl@FreeBSD.org>

Hook the hptmv driver up to the build.


# bacb482d 07-Oct-2004 Warner Losh <imp@FreeBSD.org>

Port pbio to HEAD.

OK'd by: dds


# 3c749e3f 15-Aug-2004 David E. O'Brien <obrien@FreeBSD.org>

AMD64 on-CPU GART support.
This also applies to AMD64 HW running 'i386' OS.

Submitted by: Jung-uk Kim <jkim@niksun.com>
Integration by: obrien


# a632deec 15-Aug-2004 Robert Watson <rwatson@FreeBSD.org>

Add an "options MP_WATCHDOG" to i386. This option allows one of the
logical CPUs on a system to be used as a dedicated watchdog to cause a
drop to the debugger and/or generate an NMI to the boot processor if
the kernel ceases to respond. A sysctl enables the watchdog running
out of the processor's idle thread; a callout is launched to reset a
timer in the watchdog. If the callout fails to reset the timer for ten
seconds, the watchdog will fire. The sysctl allows you to select which
CPU will run the watchdog.

A sample "debug.leak_schedlock" is included, which causes a sysctl to
spin holding sched_lock in order to trigger the watchdog. On my Xeons,
the watchdog is able to detect this failure mode and break into the
debugger, which cannot otherwise be done without an NMI button.

This option does not currently work with sched_ule due to ule's push
notion of scheduling, similar to machdep.hlt_logical_cpus failing to
work with that scheduler.

On face value, this might seem somewhat inefficient, but there are a
lot of dual-processor Xeons with HTT around, so using one as a watchdog
for testing is not as inefficient as one might fear.


# 29fe871d 04-Aug-2004 Mark Murray <markm@FreeBSD.org>

Oops. Didn't commit this as part of the mem module fix.


# 8ab2f5ec 01-Aug-2004 Mark Murray <markm@FreeBSD.org>

Break out the MI part of the /dev/[k]mem and /dev/io drivers into
their own directory and module, leaving the MD parts in the MD
area (the MD parts _are_ part of the modules). /dev/mem and /dev/io
are now loadable modules, thus taking us one step further towards
a kernel created entirely out of modules. Of course, there is nothing
preventing the kernel from having these statically compiled.


# ee6020c9 21-Jul-2004 Yoshihiro Takahashi <nyan@FreeBSD.org>

Add the ACPI Panasonic extras driver.

Submitted by: OGAWA Takaya <t-ogawa@triaez.kaisei.org> and nyan


# 32cfa665 15-Jul-2004 Nate Lawson <njl@FreeBSD.org>

Hook up fdc_acpi for the kernel build.


# ec712659 13-Jul-2004 Poul-Henning Kamp <phk@FreeBSD.org>

Desupport M-Systems DiskOnChip driver "fla"


# 5971a234 10-Jul-2004 Marcel Moolenaar <marcel@FreeBSD.org>

Hook the GDB backend into the build.


# 8ade021a 07-Jul-2004 Warner Losh <imp@FreeBSD.org>

Break out the isa and pccard front ends to the fdc controller device.
This should allow us to more easily break out the acpi and 'legacy pc'
front ends as well (so only the bus front end would touch rtc, for
example).

This isn't a great separation, since isa dma routines are still called
from the MI code, but it is a start.


# f1ca765c 30-Jun-2004 Nate Lawson <njl@FreeBSD.org>

Move acpi_if.m to files.{amd64,i386,ia64}. This should fix the alpha build.

Pointed out by: gallatin


# 14b3b293 23-Jun-2004 Brooks Davis <brooks@FreeBSD.org>

el(4) stopped needing to me a count device in December 2000.


# 30346936 26-May-2004 Bruce Evans <bde@FreeBSD.org>

MFamd64:

Fixed profiling of trap, syscall and interrupt handlers and some
ordinary functions, essentially by backing out half of rev.1.106 of
i386/exception.s. The handlers must be between certain labels for
the purposes of profiling, and this was broken by scattering them in
separately compiled .s files, especially for ordinary functions that
ended up between the labels. Merge the files by #including them as
before, except with different pathnames and better comments and
organization. Changes to the scattered files are minimal -- just
move the labels to the file that does the #includes.

This also partly fixes profiling of IPIs -- all IPI handlers are now
correctly classified as interrupt handlers, but many are still missing
mcount calls.

vm86bios.s is included as before, but it is now between the labels for
interrupt handlers again, which seems to be wrong since half of it is
for a non-interrupt handler.


# a18da911 17-May-2004 Roman Kurakin <rik@FreeBSD.org>

Connect Cronyx Tau-PCI to the system.


# 6cd91141 16-May-2004 Warner Losh <imp@FreeBSD.org>

Move fdc from isa/fd.c to dev/fdc/fdc.c. The old files were
repocopied. Soon there will be additional bus attachments and
specialization for isa, acpi and pccard (and maybe pc98's cbus).

This was approved by nate, joerg and myself. bde dissented on the new
location, but appeared to be OK after some discussion.


# cae8da61 11-May-2004 Dag-Erling Smørgrav <des@FreeBSD.org>

Add a driver for the watchdog timer function present on the LPC interface
bridge in Intel ICH-series chipsets.

The original implementation was by W. Daryl Hawkins of Texas A&M, but I
have made substantial modifications.


# 38f92448 05-May-2004 Bruce Evans <bde@FreeBSD.org>

Fixed some insertion sort errors.


# 7b829949 05-May-2004 Bruce Evans <bde@FreeBSD.org>

Fixed unformatting of svr4 entries in rev.1.326 and consistent misformatting
of them in rev.1.358.


# 030b156b 04-May-2004 John Baldwin <jhb@FreeBSD.org>

Add a simple mini-driver for the ELCR register. Originally, the ELCR
register controlled the trigger mode and polarity of EISA interrupts.
However, it appears that most (all?) PCI systems use the ELCR to manage
the trigger mode and polarity of ISA interrupts as well since ISA IRQs used
to route PCI interrupts need to be level triggered with active low
polarity. We check to see if the ELCR exists by sanity checking the value
we get back ensuring that IRQS 0 (8254), 1 (atkbd), 2 (the link from the
slave PIC), and 8 (RTC) are all clear indicating edge trigger and active
high polarity.

This mini-driver will be used by the atpic driver to manage the trigger and
polarity of ISA IRQs. Also, the mptable parsing code will use this mini
driver rather than examining the ELCR directly.


# e0871faf 01-May-2004 Bruce Evans <bde@FreeBSD.org>

Switch to using the moved cy driver (adjust pathnames and remove "count"
parameter).

Keep using it only in the i386 NOTES for now. It is fairly MI, but it
doesn't use bus-space and has a couple of i386 i/o instructions in pci
intitialization.


# 9a1fc77e 22-Apr-2004 Philip Paeps <philip@FreeBSD.org>

Add the ACPI Asus extras driver. Provides support for cool ACPI-controled
gadgets (hotkeys, lcd, ...) on Asus laptops. I aim to closely track the
acpi4asus project which implements these features in the Linux kernel.

If this breaks your laptop, please let me know how it does it :-)

Approved by: njl (mentor)


# 6292a186 10-Apr-2004 Marcel Moolenaar <marcel@FreeBSD.org>

Unbreak alpha kernel build and unbreak any non-i386 runtime brokenness.
The VIA Nehemias is so obviously specific to i386 that it should not
be compiled on non-i386 platforms. The obviousness is in the fact that
all functions in nehemias.c are purely i386 inline assembly, guarded
by #ifdef __i386__


# 7eb17244 01-Apr-2004 Dag-Erling Smørgrav <des@FreeBSD.org>

Move twa from files.i386 to files. This unbreaks LINT on !i386.

Pointy hat to: vkashyap, ps


# 99635d6c 29-Mar-2004 Vinod Kashyap <vkashyap@FreeBSD.org>

Initial check-in of the device driver for 3ware's 9000 series
PATA/SATA RAID controllers. This driver is a SIM under CAM, and
so, behaves like a driver for a SCSI controller.


# 3ccc038a 22-Mar-2004 Bill Paul <wpaul@FreeBSD.org>

if_ndis.c no longer depends on either pci or pccard. Also, add an
extra entry for if_ndis_pci.c that depends on cardbus, just to cover
all the bases. (I don't think you can have cardbus without PCI, but
just in case...)


# 00cfafd7 21-Mar-2004 Alan Cox <alc@FreeBSD.org>

Add an implementation of uiomove_fromphys() for i386. This implementation
uses sf_buf_alloc() and sf_buf_free() to create and destroy the necessary
ephemeral mappings.


# 798f0e16 15-Mar-2004 Max Khon <fjoe@FreeBSD.org>

Add arl(4): driver for Aironet Arlan 655 wireless adapters.

MFC after: 2 weeks


# 69ef3621 14-Mar-2004 Warner Losh <imp@FreeBSD.org>

Remove isa compat stuff.

Only cy, bs and wd in the tree still use it. I have a replacement for
cy that I need to test on ISA and PCI cards. bs and wd are pc98 only
drivers that appear to no longer be necessary. I'll be removing them
when I hear back from the pc98 people.


# e9dd5834 14-Mar-2004 Warner Losh <imp@FreeBSD.org>

The gsc driver uses the old COMPAT_ISA api. Retire it so we can
retire the COMPAT_ISA shims. If someone were to redo this driver with
the new APIs and test it, it can return.


# 721745e3 14-Mar-2004 Warner Losh <imp@FreeBSD.org>

The rdp driver uses the COMPAT_OLD api. This is being retired, so
this driver is being retired. Remove it from the tree. If someone
wants to update it to the latest APIs and can test the hardware, it
can return to the tree.


# 1cf01aa3 14-Mar-2004 Warner Losh <imp@FreeBSD.org>

The spigot driver uses the old COMPAT_ISA interface. Retire it since
that's going away soon. Should someone reimplement it using modern
APIs and can test the driver, it can return.


# 974f74fc 14-Mar-2004 Warner Losh <imp@FreeBSD.org>

The le driver uses ISA_COMPAT, which is going away soon. Retire it
and releated files. If someone wants to fix it to use the new APIs
and test it, it can be brought back.


# a0988ce1 13-Mar-2004 Warner Losh <imp@FreeBSD.org>

stl and stli use the old COMPAT_ISA api. slt also uses the really old
COMPAT_PCI api. This API is going away, so this driver is going away
also.

If users are interested in updating this, please contact the author
since he has some preliminary work to move this to newer APIs.


# bbde09fb 13-Mar-2004 Warner Losh <imp@FreeBSD.org>

Remove gp driver. It uses the old COMPAT_ISA shims.

If this driver is rewritten using newer APIs it can return.


# 8822b756 13-Mar-2004 Warner Losh <imp@FreeBSD.org>

Remove ctx driver. another scanner. This one uses COMPAT_ISA shims
which is going away soon.

If someone updates this to the latest APIs and tests it, it can return.


# 9ddf1ac9 13-Mar-2004 Warner Losh <imp@FreeBSD.org>

Remove asc driver, support for GI1904 based hand scanners. This
driver uses COMPAT_ISA shims, and those shims are going away.

It can be brought back if someone updates it to the latest APIs, and
moves it to the appropriate place in the tree.


# e08b187c 13-Mar-2004 Warner Losh <imp@FreeBSD.org>

Remove wt driver. It still uses COMPAT_ISA_DRIVER which is going away
very soon.

Users needing this driver should update it to a newer API.


# fc9a4791 12-Mar-2004 Bill Paul <wpaul@FreeBSD.org>

Add if_ndis_pci.c and if_ndis_pccard.c so that building the NDISulator
directly into the kernel works again. Also make the 'ndisapi' entries
not depend on pccard anymore.

Forgotten by: me
Noticed by: sos


# 3551b582 02-Mar-2004 Roman Kurakin <rik@FreeBSD.org>

1. Connect Cronyx Tau/ISA driver (ctau) to kernel.

Approved by: imp (mentor)


# 77fa00fa 18-Feb-2004 John Baldwin <jhb@FreeBSD.org>

Switch to using the new $PIR interrupt routing code and remove the old
code. The pci_cfgreg.c file now just controls reading/writing PCI config
registers.


# 386a89ed 31-Jan-2004 Takeshi Shibagaki <shiba@FreeBSD.org>

Compiled longrun.c when defined options CPU_ENABLE_LONGRUN,
and fixed wrong comparation in cpu vendor. Longrun function
was re-enabled.


# 556c5b97 19-Jan-2004 David E. O'Brien <obrien@FreeBSD.org>

Fix sort misordering.


# e7846ad7 18-Jan-2004 Maxim Sobolev <sobomax@FreeBSD.org>

Add new CPU_ENABLE_TCC option, from NOTES:

CPU_ENABLE_TCC enables Thermal Control Circuitry (TCC) found in some
Pentium(tm) 4 and (possibly) later CPUs. When enabled and detected,
TCC allows to restrict power consumption by using machdep.cpuperf*
sysctls. This operates independently of SpeedStep and is useful on
systems where other mechanisms such as apm(4) or acpi(4) don't work.

Given the fact that many, even modern, notebooks don't work properly
with Intel ACPI, this is indeed very useful option for notebook owners.

Obtained from: OpenBSD
MFC after: 2 weeks


# 1de30b60 13-Jan-2004 Dag-Erling Smørgrav <des@FreeBSD.org>

Add ffsl(), fls() flsl() to platforms that don't already have them.


# 4fd3a4fd 11-Jan-2004 Nate Lawson <njl@FreeBSD.org>

Add the ACPI Toshiba extras driver (hotkeys, LCD backlight, video output,
forced fan control, and CPU throttling).

Submitted by: Hiroyuki Aizu <aizu@navi.org>


# c854fc10 11-Dec-2003 Bill Paul <wpaul@FreeBSD.org>

Commit the first cut of Project Evil, also known as the NDISulator.

Yes, it's what you think it is. Yes, you should run away now.

This is a special compatibility module for allowing Windows NDIS
miniport network drivers to be used with FreeBSD/x86. This provides
_binary_ NDIS compatibility (not source): you can run NDIS driver
code, but you can't build it. There are three main parts:

sys/compat/ndis: the NDIS compat API, which provides binary
compatibility functions for many routines in NDIS.SYS, HAL.dll
and ntoskrnl.exe in Windows (these are the three modules that
most NDIS miniport drivers use). The compat module also contains
a small PE relocator/dynalinker which relocates the Windows .SYS
image and then patches in our native routines.

sys/dev/if_ndis: the if_ndis driver wrapper. This module makes
use of the ndis compat API and can be compiled with a specially
prepared binary image file (ndis_driver_data.h) containing the
Windows .SYS image and registry key information parsed out of the
accompanying .INF file. Once if_ndis.ko is built, it can be loaded
and unloaded just like a native FreeBSD kenrel module.

usr.sbin/ndiscvt: a special utility that converts foo.sys and foo.inf
into an ndis_driver_data.h file that can be compiled into if_ndis.o.
Contains an .inf file parser graciously provided by Matt Dodd (and
mercilessly hacked upon by me) that strips out device ID info and
registry key info from a .INF file and packages it up with a binary
image array. The ndiscvt(8) utility also does some manipulation of
the segments within the .sys file to make life easier for the kernel
loader. (Doing the manipulation here saves the kernel code from having
to move things around later, which would waste memory.)

ndiscvt is only built for the i386 arch. Only files.i386 has been
updated, and none of this is turned on in GENERIC. It should probably
work on pc98. I have no idea about amd64 or ia64 at this point.

This is still a work in progress. I estimate it's about %85 done, but
I want it under CVS control so I can track subsequent changes. It has
been tested with exactly three drivers: the LinkSys LNE100TX v4 driver
(Lne100v4.sys), the sample Intel 82559 driver from the Windows DDK
(e100bex.sys) and the Broadcom BCM43xx wireless driver (bcmwl5.sys). It
still needs to have a net80211 stuff added to it. To use it, you would
do something like this:

# cd /sys/modules/ndis
# make; make load
# cd /sys/modules/if_ndis
# ndiscvt -i /path/to/foo.inf -s /path/to/foo.sys -o ndis_driver_data.h
# make; make load
# sysctl -a | grep ndis

All registry keys are mapped to sysctl nodes. Sometimes drivers refer
to registry keys that aren't mentioned in foo.inf. If this happens,
the NDIS API module creates sysctl nodes for these keys on the fly so
you can tweak them.

An example usage of the Broadcom wireless driver would be:

# sysctl hw.ndis0.EnableAutoConnect=1
# sysctl hw.ndis0.SSID="MY_SSID"
# sysctl hw.ndis0.NetworkType=0 (0 for bss, 1 for adhoc)
# ifconfig ndis0 <my ipaddr> netmask 0xffffff00 up

Things to be done:

- get rid of debug messages
- add in ndis80211 support
- defer transmissions until after a status update with
NDIS_STATUS_CONNECTED occurs
- Create smarter lookaside list support
- Split off if_ndis_pci.c and if_ndis_pccard.c attachments
- Make sure PCMCIA support works
- Fix ndiscvt to properly parse PCMCIA device IDs from INF files
- write ndisapi.9 man page


# 6ee2f106 06-Dec-2003 Warner Losh <imp@FreeBSD.org>

The dgb driver is redundant with the digi driver in the tree. It uses
lots of old interfaces, and digi now supports all cards that dgb
supported. The author of the driver says that this is no longer
necessary.

Approved by: babkin@


# 66314719 06-Dec-2003 Warner Losh <imp@FreeBSD.org>

First part of the removal of drivers for hardware that isn't relevant
or whose drivers haven't even compiled for years.

The loran hardware was very unique, and only a few copies of it ever
existed. It used the old COMPAT_ISA_DRIVER and when the author was
contacted, he indicated that he had no intention of ever updating this
driver and it was no longer relevant to the FreeBSD world and can be
removed without impact to anybody.

Approved by: phk


# ac44076d 03-Dec-2003 Warner Losh <imp@FreeBSD.org>

Connect the cx driver to its new location in the tree.
Update notes to reflect that cx is no longer a counted device
Update options for new cx option
# commented out ELAN_PPS and ELAN_XTAL since they produced errors

Submitted by: rik@cronyx.ru
Approved by: re@ <scottl>


# 7058adba 03-Nov-2003 John Baldwin <jhb@FreeBSD.org>

- Remove references to old interrupt and SMP code.
- Add entries for new interrupt and SMP code.


# 1c66457e 03-Nov-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Introduce new CPU_SOEKRIS option to tell soekris hardware from other
hardware based on similar chipsets.


# 2bec1c89 06-Sep-2003 Marcel Moolenaar <marcel@FreeBSD.org>

Hook-up the uart(4) driver to the build. For a detailed description
of what uart(4) is and/or is not see the initial commit log of one
of the files in sys/dev/uart (or see share/man/man4/uart.4).

Note that currently pc98 shares the MD file with i386. This needs
to change when pc98 support is fleshed-out to properly support the
various UARTs. A good example is sparc64 in this respect.

We build uart(4) as a module on all platforms. This may break
the ppc port. That depends on whether they do actually build
modules.

To use uart(4) on alpha, one must use the NO_SIO option.


# f633e006 31-Aug-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Detect Geode CPUs and initialize the 27MHz timecounter "Geode".

This timecounter is 2usec faster than the i8254 and has 22 times
better resolution.


# 34345c08 23-Aug-2003 Matthew N. Dodd <mdodd@FreeBSD.org>

AGP GART driver for NVIDIA nForce/nForce2 chipsets.


# c43001fc 15-Aug-2003 Poul-Henning Kamp <phk@FreeBSD.org>

As warned: Initiate deorbit burn for the pcaudio driver.


# 11dc7df1 03-Aug-2003 Warner Losh <imp@FreeBSD.org>

fix disordering of filenames. Place the dev/ppc files in alphabetical
order.


# a3732274 31-Jul-2003 Doug Ambrisko <ambrisko@FreeBSD.org>

Add printer support to puc(4) driver.
- Move isa/ppc* to sys/dev/ppc (repo-copy)
- Add an attachment method to ppc for puc
- In puc we need to walk the chain of parents.
Still to do, is to make ppc(4) & puc(4) work on other platforms. Testers
wanted.

PR: 38372 (in spirit done differently)
Verified by: Make universe (if I messed up a platform please fix)


# c4aebdb0 22-Jul-2003 Bernd Walter <ticso@FreeBSD.org>

relocate eisa into MI files.

Suggested by: jhb


# a35b3386 22-Jul-2003 Peter Wemm <peter@FreeBSD.org>

Initiate de-orbit burn for fpu-less operation. 386+387 is still
theoretically supportable, but you'd really be happier with FreeBSD 2.1.8
on it.


# 167f409f 25-Jun-2003 Sam Leffler <sam@FreeBSD.org>

config+build glue for Atheros support


# 03841f4e 31-May-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Eliminate potential overflows by allocating softc dynamically,
removing at the same time the need for this to be a "count" config
option.

Found by: FlexeLint


# 02aa843a 26-Apr-2003 Warner Losh <imp@FreeBSD.org>

Update to reflect tw removal.

Approved by: re@ (scottl)


# daabb372 17-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Separate the encoding/decoding functions for struct disklabel into a
separate source file which can be used from both kernel and userland code.


# 6e03422a 12-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Move the functions for encoding decoding struct dos_partition into
a separate .c file so they can be used from userland as well.


# 96aa4252 24-Mar-2003 Matthew N. Dodd <mdodd@FreeBSD.org>

- Consolidate smapi driver.
- Attach to nexus.
- Use null{open,close}() instead of rolling our own.


# 863463c1 24-Mar-2003 Matthew N. Dodd <mdodd@FreeBSD.org>

Add the 'vpd' and 'smbios' drivers. The 'smbios' driver is just a
stub right now.


# b7b5ae3e 24-Mar-2003 Matthew N. Dodd <mdodd@FreeBSD.org>

Use repo-copied files in sys/i386/bios.


# 5d1b6a85 28-Feb-2003 Ruslan Ermilov <ru@FreeBSD.org>

Standardize handling of locore.[sS] etc. files.

Submitted by: jake, bde, ru


# b9a49f7e 23-Feb-2003 David E. O'Brien <obrien@FreeBSD.org>

pst(4) should be portable across all our platforms.


# 05d1e23a 13-Feb-2003 Eric Anholt <anholt@FreeBSD.org>

Split the arch-specific AGP files into the appropriate files.* and do the same
for the agp module, and add agp to the list of modules to compile for alpha.
Add an alpha_mb() to agp_flush_cache for alpha -- it's not correct but may
improve the situation, and it's what linux and NetBSD do.


# 5628bf69 11-Feb-2003 Yoshihiro Takahashi <nyan@FreeBSD.org>

Sort.


# 70d8e2e9 11-Feb-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Switch to using the TSC code in i386/i386/tsc.c.


# a9ba7b30 29-Jan-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Remove files which don't exist


# 7704eaef 28-Jan-2003 Poul-Henning Kamp <phk@FreeBSD.org>

NO_GEOM cleanup: Don't pull subr_disk{slice,label,mbr}.c into i386
kernels anymore, they are not needed.


# 2a2c7962 17-Jan-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Move subr_disklabel.c and subr_diskslice.c from being MI to MD files,
so that they can be left out where they are unneeded.


# 7534ac7a 17-Jan-2003 Matthew N. Dodd <mdodd@FreeBSD.org>

A driver for the System Management Application Program
Interface (SMAPI) BIOS, which is present on some IBM
Thinkpad models (560, 600, 770 to name a few.)

The SMAPI BIOS provides access to System Information,
System Configuration, and Power Management.


# 69e58e12 08-Nov-2002 John Baldwin <jhb@FreeBSD.org>

- Move netsmb entries over to MI files. netsmb appears to be MI code.
- Add 'nowerror' to pci/simos.c to help LINT builds.


# 820a843d 06-Nov-2002 John Baldwin <jhb@FreeBSD.org>

dgb(4) currently is i386-only.


# 8a651d2c 06-Nov-2002 John Baldwin <jhb@FreeBSD.org>

Make the ar(4) driver i386-only for now. It has lots of sizeof(int) ==
sizeof(void *) assumptions and doesn't use busdma yet (it uses kvtop()
which is not an MI interface).

Recommended by: jake, mux


# 6fe8789d 05-Nov-2002 Matthew N. Dodd <mdodd@FreeBSD.org>

- Convert to newbus, bus_space etc.
- Move to MI space.

Tested on: i386


# d2ec391b 24-Oct-2002 John Baldwin <jhb@FreeBSD.org>

Rename 'device acpica' to 'device acpi'.

Approved by: msmith, iwasaki


# 599c57a9 23-Oct-2002 John Baldwin <jhb@FreeBSD.org>

- New-bussify the rc(4) device driver.
- Add detach support to the driver so that you can kldunload the module.
Note that currently rc_detach() fails to detach a unit if any of its
child devices are open, thus a kldunload will fail if any of the tty
devices are currently open.
- sys/i386/isa/ic/cd180.h was moved to sys/dev/ic/cd180.h as part of
this change.

Requested by: rwatson
Tested by: rwatson


# 3bd65612 05-Oct-2002 Poul-Henning Kamp <phk@FreeBSD.org>

NB: This commit does *NOT* make GEOM the default in FreeBSD
NB: But it will enable it in all kernels not having options "NO_GEOM"

Put the GEOM related options into the intended order.

Add "options NO_GEOM" to all kernel configs apart from NOTES.

In some order of controlled fashion, the NO_GEOM options will be
removed, architecture by architecture in the coming days.

There are currently three known issues which may force people to
need the NO_GEOM option:

boot0cfg/fdisk:
Tries to update the MBR while it is being used to control
slices. GEOM does not allow this as a direct operation.

SCSI floppy drives:
Appearantly the scsi-da driver return "EBUSY" if no media
is inserted. This is wrong, it should return ENXIO.

PC98:
It is unclear if GEOM correctly recognizes all variants of
PC98 disklabels. (Help Wanted! I have neither docs nor HW)

These issues are all being worked.

Sponsored by: DARPA & NAI Labs.


# 8b7ce2ff 04-Oct-2002 Sam Leffler <sam@FreeBSD.org>

hookup new crypto support to the config/build process


# 3ae5b532 04-Oct-2002 Matthew N. Dodd <mdodd@FreeBSD.org>

newbus & bus_space the mcd(4) driver.


# 0910374b 04-Oct-2002 Scott Long <scottl@FreeBSD.org>

Alas, poor matcd, I knew ye well.

It doesn't work.
It cannot be made to work.
Goodbye.

X-MFC after: ASAP


# e8e951ce 23-Sep-2002 John Baldwin <jhb@FreeBSD.org>

Add a new legacy(4) device driver for use on machines that do not have
ACPI or for when ACPI support is disabled or not present in the kernel.
Basically, the nexus device is now split into two with some parts
(such as adding default ISA, MCA, and EISA busses if they aren't found
as well as support for PCI bus device ivars) being moved to the legacy
driver.


# 85fee319 10-Sep-2002 Poul-Henning Kamp <phk@FreeBSD.org>

It's bad enough people can't figure out to use the same code, or in
this case, ugly macros, but the data tables can be reused:

Put one copy of the software HDLC tables in its own file.


# 21ae1451 06-Sep-2002 Peter Wemm <peter@FreeBSD.org>

Make imgact_aout.c optional. It is i386 specific.


# bd8add3d 04-Sep-2002 Poul-Henning Kamp <phk@FreeBSD.org>

Change the support for AMDs ElanSC520 CPU from being a device driver to
be
options CPU_ELAN
(NB: Soekris.com users!)

It is cleaner this way. We still recognize the cpu on the host-pci bridge.


# 5906e69a 01-Sep-2002 Brooks Davis <brooks@FreeBSD.org>

Continue de-counting i4b. Devices i4bctl, i4bcapi, iavc, i4bq921,
i4bq931, i4b, isic, iwic, ifpi, ifpi2, ifpnp, ihfc, and itjc are
no longer count devices. Also remove a few other instances of N<DEVICE>
being used to control compilation of whole files.

Reviewed by: hm


# 448a5139 28-Aug-2002 Peter Wemm <peter@FreeBSD.org>

Initiate deorbit burn for sys/kern/link_aout.c. We never shipped a.out
kld's anywhere, and it was always possible to load ELF kld's even in an
a.out kernel. There is no reason for this to exist anymore, and a.out
kld support has been suffering serious bitrot over the years. They have
not been fully functional for quite some time.


# 66efd5f5 19-Aug-2002 Peter Wemm <peter@FreeBSD.org>

Untangle this warning a bit:
COMPAT_SVR4 is broken and usage is, until fixed, not recommended
BTW; does anybody remember why this is here?


# 5452db48 19-Aug-2002 Peter Wemm <peter@FreeBSD.org>

de-count atkbdc and sc. Folks, remove the '1' from 'device sc 1' and
'device atkbdc 1'.


# 00705439 02-Aug-2002 Poul-Henning Kamp <phk@FreeBSD.org>

typo.


# 927b6b09 02-Aug-2002 Poul-Henning Kamp <phk@FreeBSD.org>

Add the minimalist elan-mmcr device driver.

This driver allows a userland program to mmap the MMCR of the AMD
Elan sc520 CPU.


# 1d6213f9 31-Jul-2002 Søren Schmidt <sos@FreeBSD.org>

Finally first shot at a driver for the Promise SuperTrak SX6000 ATA RAID
controller. Some testing has already been done, but its still greenish.
RAID's has to be setup via the BIOS on the SuperTrak, but all RAID
types are supported by the driver. The SuperTrak rebuilds failed arrays
on the fly and supports spare disks etc etc...

Add "device pst" to your config file to use.

As usual bugsreports, suggestions etc are welcome...

Development sponsored by: Advanis
Hardware donated by: Promise Inc.


# ba268f03 23-Jul-2002 John Baldwin <jhb@FreeBSD.org>

Move sio_isa.c back to MD files files due to PC98 brain damage.


# 0cd59a38 21-Jul-2002 Peter Wemm <peter@FreeBSD.org>

Move 'em' from files.i386 to files so that it is within reach of the
ia64 (tested) and pc98 (i386 based) platforms.


# d76dc9c3 21-Jul-2002 Peter Wemm <peter@FreeBSD.org>

pci/cy_pci.c is still MD, it needs i386/isa/cy.c for the core.


# fbfee3f6 15-Jul-2002 John Baldwin <jhb@FreeBSD.org>

Move SMBFS from i386 and pc98 files and options files to MI files and
options files.


# bdff575a 15-Jul-2002 John Baldwin <jhb@FreeBSD.org>

Move all the sio(4) attachments (except for pc98's cbus attachment) to the
MI files file. We can't move sio.c because pc98 uses a custom version.


# 47a3594e 15-Jul-2002 John Baldwin <jhb@FreeBSD.org>

The puc(4) driver/bridge is MI, so don't bury it in MD options and files
config files. It also depends on PCI.


# 22afbb6b 13-Jun-2002 Brooks Davis <brooks@FreeBSD.org>

Remote pci.h/NPCI usage from i4b code.

Approved by: hm


# a7fabc2b 03-Jun-2002 Prafulla Deuskar <pdeuskar@FreeBSD.org>

Added support for 82545EM and 82546EB based adapters.
Added Vlan support.

MFC after: 1 week


# c444f617 18-May-2002 Marcel Moolenaar <marcel@FreeBSD.org>

Hook up the new linux_ptrace implementation.

PR: 33299
Submitted by: Alexander N. Kabaev <ak03@gte.com>


# 60b22c6d 12-May-2002 Jake Burkholder <jake@FreeBSD.org>

${MACHINE_ARCH}dump.c -> dump_machdep.c.


# c971041e 31-Mar-2002 Poul-Henning Kamp <phk@FreeBSD.org>

Add the i386dump.c dumpsys() source file.


# d74ac681 26-Mar-2002 Matthew Dillon <dillon@FreeBSD.org>

Compromise for critical*()/cpu_critical*() recommit. Cleanup the interrupt
disablement assumptions in kern_fork.c by adding another API call,
cpu_critical_fork_exit(). Cleanup the td_savecrit field by moving it
from MI to MD. Temporarily move cpu_critical*() from <arch>/include/cpufunc.h
to <arch>/<arch>/critical.c (stage-2 will clean this up).

Implement interrupt deferral for i386 that allows interrupts to remain
enabled inside critical sections. This also fixes an IPI interlock bug,
and requires uses of icu_lock to be enclosed in a true interrupt disablement.

This is the stage-1 commit. Stage-2 will occur after stage-1 has stabilized,
and will move cpu_critical*() into its own header file(s) + other things.
This commit may break non-i386 architectures in trivial ways. This should
be temporary.

Reviewed by: core
Approved by: core


# 255fc25a 24-Mar-2002 David E. O'Brien <obrien@FreeBSD.org>

Remove a FMT that was buried in here.
I have no idea why the original committer even used it (in its KERNFORMAT
spelling) as there is no a.out version.


# b5a8f767 05-Mar-2002 Hajimu UMEMOTO <ume@FreeBSD.org>

- Speedup 3DES by using assembly code for i386.
- Sync des/blowfish to more recent openssl.

Obtained from: KAME/NetBSD
MFC after: 2 weeks


# 9d69d7b8 27-Feb-2002 Peter Wemm <peter@FreeBSD.org>

Tag istallion.c with nowerror (third party)


# da0d93cf 27-Feb-2002 Peter Wemm <peter@FreeBSD.org>

Mark stallion.c as nowerror (known broken, this is a #warning)


# 9c564b6c 16-Feb-2002 John Hay <jhay@FreeBSD.org>

Add the puc (PCI "Universal" Communications) driver. The idea and some of
the structure definitions come from NetBSD to make it easier to share card
definitions. The driver only acts as a shim between the pci bus and the
sio driver. Later pci parallel ports could also be supported through this
driver. Support for most single and multiport pci serial cards should be
as simple as adding its definition to pucdata.c

Tested with the following pci cards:
Moxa Industio CP-114, 4 port RS-232,RS-422/485
Syba Tech Ltd. PCI-4S2P-550-ECP, 4 port RS-232 + 2 parallel ports
Netmos NM9835 PCI-2S-550, 2 port RS-232


# 0483b1a8 11-Feb-2002 Andrew Gallatin <gallatin@FreeBSD.org>

Enable polling to be configured into kernels on non i386 platforms. Note that
poll_in_trap is only implemented on i386. I've tested this on alpha.

Approved by: luigi


# c920faa6 30-Jan-2002 Bruce Evans <bde@FreeBSD.org>

Removed the one use of the mandatory keyword (for npx).

npx is no more mandatory than sc. Its mandatoryness went away in
rev.1.226 of i386/machdep.c 9 months before it was made mandatory in
rev.1.24 of config/mkmakefile.c.

This change is mainly to test building of minimal kernel configurations.
npx should really be even more standard than clk. It was optional mainly
so that the usual device driver configuration info could be specified in
the usual way in config files, but this hasn't been necessary for a few
years.


# d9ec6741 11-Jan-2002 Peter Wemm <peter@FreeBSD.org>

genassym builds need the -fno-common stripped out.


# eda6ecb2 08-Jan-2002 Max Khon <fjoe@FreeBSD.org>

- generic Arcnet framework
- device driver for SMC COM90cx6 Arcnet network adapters

Obtained from: NetBSD


# b30a31e9 06-Jan-2002 Yoshihiro Takahashi <nyan@FreeBSD.org>

Sorted the lists.


# 1823355c 22-Dec-2001 Gary Jennejohn <gj@FreeBSD.org>

Add the ifpi2 driver.

MFC after: 4 weeks


# e4fc250c 14-Dec-2001 Luigi Rizzo <luigi@FreeBSD.org>

Device Polling code for -current.

Non-SMP, i386-only, no polling in the idle loop at the moment.

To use this code you must compile a kernel with

options DEVICE_POLLING

and at runtime enable polling with

sysctl kern.polling.enable=1

The percentage of CPU reserved to userland can be set with

sysctl kern.polling.user_frac=NN (default is 50)

while the remainder is used by polling device drivers and netisr's.
These are the only two variables that you should need to touch. There
are a few more parameters in kern.polling but the default values
are adequate for all purposes. See the code in kern_poll.c for
more details on them.

Polling in the idle loop will be implemented shortly by introducing
a kernel thread which does the job. Until then, the amount of CPU
dedicated to polling will never exceed (100-user_frac).
The equivalent (actually, better) code for -stable is at

http://info.iet.unipi.it/~luigi/polling/

and also supports polling in the idle loop.

NOTE to Alpha developers:
There is really nothing in this code that is i386-specific.
If you move the 2 lines supporting the new option from
sys/conf/{files,options}.i386 to sys/conf/{files,options} I am
pretty sure that this should work on the Alpha as well, just that
I do not have a suitable test box to try it. If someone feels like
trying it, I would appreciate it.

NOTE to other developers:
sure some things could be done better, and as always I am open to
constructive criticism, which a few of you have already given and
I greatly appreciated.
However, before proposing radical architectural changes, please
take some time to possibly try out this code, or at the very least
read the comments in kern_poll.c, especially re. the reason why I
am using a soft netisr and cannot (I believe) replace it with a
simple timeout.

Quick description of files touched by this commit:

sys/conf/files.i386
new file kern/kern_poll.c
sys/conf/options.i386
new option
sys/i386/i386/trap.c
poll in trap (disabled by default)
sys/kern/kern_clock.c
initialization and hardclock hooks.
sys/kern/kern_intr.c
minor swi_net changes
sys/kern/kern_poll.c
the bulk of the code.
sys/net/if.h
new flag
sys/net/if_var.h
declaration for functions used in device drivers.
sys/net/netisr.h
NETISR_POLL
sys/dev/fxp/if_fxp.c
sys/dev/fxp/if_fxpvar.h
sys/pci/if_dc.c
sys/pci/if_dcreg.h
sys/pci/if_sis.c
sys/pci/if_sisreg.h
device driver modifications


# e6770f4c 02-Dec-2001 Prafulla Deuskar <pdeuskar@FreeBSD.org>

This is the first commit of the Intel gigabit driver for
PRO/1000 cards.

Submitted by:Prafulla Deuskar
Reviewed by: Paul Saab
MFC after:1 week


# f703f3ea 25-Nov-2001 Warner Losh <imp@FreeBSD.org>

First part of patches to make sio grok 16-bit serial cards under
NEWCARD. Other patches may be reqiured to sio to prevent a hang on
eject. Also add commented out entries for sio_pccard.c in files.pc98
to match other architectures.

Submitted by: yamamoto shigeru-san


# ea38b939 21-Nov-2001 Max Khon <fjoe@FreeBSD.org>

Add driver for Granch SBNI12-xx ISA and PCI network adapters.

MFC after: 1 week


# e1a7c5c8 05-Nov-2001 Poul-Henning Kamp <phk@FreeBSD.org>

GC userconfig after Peter axed it 15 months ago.


# 0d60c3f5 05-Nov-2001 Poul-Henning Kamp <phk@FreeBSD.org>

Remove the old RocketPort driver which was left behind in favour
of the new driver. The new driver works, the old one is 1+ year behind.


# e282bb41 30-Oct-2001 Warner Losh <imp@FreeBSD.org>

Don't try to use sio with NEWCARD 16 bit yet. It eats all pccards :-)

Reported by: Marcell Moolenaar


# f86214b6 26-Oct-2001 Mitsuru IWASAKI <iwasaki@FreeBSD.org>

Add APM compatibility feature to ACPI.
This emulates APM device node interface APIs (mainly ioctl) and
provides APM services for the applications. The goal is to support
most of APM applications without any changes.
Implemented ioctls in this commit are:
- APMIO_SUSPEND (mapped ACPI S3 as default but changable by sysctl)
- APMIO_STANDBY (mapped ACPI S1 as default but changable by sysctl)
- APMIO_GETINFO and APMIO_GETINFO_OLD
- APMIO_GETPWSTATUS

With above, many APM applications which get batteries, ac-line
info. and transition the system into suspend/standby mode (such as
wmapm, xbatt) should work with ACPI enabled kernel (if ACPI works well :-)

Reviewed by: arch@, audit@ and some guys


# 2ce87d34 23-Oct-2001 Warner Losh <imp@FreeBSD.org>

Break out the bus front ends into their own files. Rewrite
sio_pccard_detach to use new siodetach. Add an extra arg to sioprobe
to tell driver to probe/not probe the device for IRQs.

This incorporates most of Bruce's review material. I'm at a good
checkpoint, but there will be more to come based on bde's further
reviews.

Reviewed by: bde


# d75c1b4a 21-Oct-2001 Warner Losh <imp@FreeBSD.org>

First commit after a repo copy of isa/sio* -> dev/sio:

Move sio from isa/sio.c to dev/sio/sio.c. The next step is to break
out the front end attachments, improve support for these parts on
different busses, and maybe, if we're lucky, merging in pc98 support.
It will also be MI and live in conf/files rather than files.*.

Approved by: bde
Tested with: i386, pc98


# 7c629906 21-Oct-2001 Dag-Erling Smørgrav <des@FreeBSD.org>

Move procfs_* from procfs_machdep.c into sys_process.c, and rename them to
proc_* in the process; procfs_machdep.c is no longer needed.

Run-tested on i386, build-tested on Alpha, untested on other platforms.


# e3611e18 08-Sep-2001 Marcel Moolenaar <marcel@FreeBSD.org>

Correct intended fix to my foul-up.

linux_uid16.c is in sys/compat/linux not in sys/i386/linux.


# 013e09a4 08-Sep-2001 Peter Wemm <peter@FreeBSD.org>

Add linux_sysctl.c, and linux_uid16.c to the x86 platforms.


# 2dc56b80 06-Sep-2001 Brian Feldman <green@FreeBSD.org>

Correct the path for OsdEnvironment.c.


# 0a8c6c7f 06-Sep-2001 Mike Smith <msmith@FreeBSD.org>

Move OsdEnvironment.c into MD code; searching for the ACPI tables is not
portable.


# 055d4956 29-Aug-2001 Andrew Gallatin <gallatin@FreeBSD.org>

Fix linux_getcwd() so that if the cwd isn't cached (__getcwd() fails),
the cwd is looked up inside the kernel. The native getcwd() in libc
handles this in userland if __getcwd() fails.

Obtained from: NetBSD via OpenBSD
Tested by: Chris Casey <chriss@phys.ksu.edu>, Markus Holmberg <markush@acc.umu.se>
Reviewed by: Darrell Anderson <anderson@cs.duke.edu>
PR: kern/24315


# 20d6258d 08-Aug-2001 Peter Wemm <peter@FreeBSD.org>

repo-copy the source files from modules/syscons to the normal tree
and connect them to the normal build infrastructure.


# 2fe5e0b1 02-Aug-2001 Kazutaka YOKOTA <yokota@FreeBSD.org>

Use #ifdef DEV_SPLASH (from opt_splash.h) rather than
#if NSPLASH > 0 (from splash.h) to test the presence
of the splash driver.


# 6161544c 20-Jul-2001 Takanori Watanabe <takawata@FreeBSD.org>

Add ACPI S2-S4BIOS Suspend/Resume code.
Some problems may remain.

Reviewed by:iwasaki


# f44a4f37 04-Jul-2001 Yoshihiro Takahashi <nyan@FreeBSD.org>

- Don't overwrite inb, inw and outw.
- Move the lance_probe function to if_lnc.c.
- Support C-NET(98)S again.

Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata) and nyan
No response from: Paul Richards


# cf8a1123 01-Jul-2001 Warner Losh <imp@FreeBSD.org>

Move wl driver to dev/wl. Repo copied to dev/wl, the old copies
removed and a minimal number of changes to make it compile in the new
location.

# I have a fully converted on a disk that may be crashed. If it is
# crashed, I'll redo the work.


# 2398f0cd 12-Jun-2001 Peter Wemm <peter@FreeBSD.org>

Hints overhaul:
- Replace some very poorly thought out API hacks that should have been
fixed a long while ago.
- Provide some much more flexible search functions (resource_find_*())
- Use strings for storage instead of an outgrowth of the rather
inconvenient temporary ioconf table from config(). We already had a
fallback to using strings before malloc/vm was running anyway.


# fb69758d 11-Jun-2001 Dag-Erling Smørgrav <des@FreeBSD.org>

Remove the old linprocfs code.


# a4b82094 24-May-2001 Peter Wemm <peter@FreeBSD.org>

Produce a config-time warning about EXT2FS and GPL_MATH_EMULATE


# 0d1b4aef 16-Apr-2001 John Hay <jhay@FreeBSD.org>

Move the isa parts to a separate file.


# bc9243be 11-Apr-2001 Boris Popov <bp@FreeBSD.org>

Add forgotten files for NETSMBCRYPTO option (may be DES based encryption
should be enabled by default, not sure).


# 681a5bbe 10-Apr-2001 Boris Popov <bp@FreeBSD.org>

Import kernel part of SMB/CIFS requester.
Add smbfs(CIFS) filesystem.

Userland part will be in the ports tree for a while.

Obtained from: smbfs-1.3.7-dev package.


# 52bcdc9a 27-Feb-2001 Peter Wemm <peter@FreeBSD.org>

Add and document the LINPROCFS option, so that we can build linprocfs
(either as a module or in the kernel) after sys/modules/* dies.


# 2fa72ea7 05-Feb-2001 Jeroen Ruigrok van der Werven <asmodai@FreeBSD.org>

Fix typo: compatability -> compatibility.

Compatability is not an existing english word.


# e1d756ce 04-Feb-2001 Poul-Henning Kamp <phk@FreeBSD.org>

Remove the LABPC driver.

Doesn't work, no maintainer, more promising code exists elsewhere.


# 8ab109d1 31-Jan-2001 Peter Wemm <peter@FreeBSD.org>

Remove count for NSIO. The only places it was used it were incorrect.
(alpha-gdbstub.c got sync'ed up a bit with the i386 version)


# b84bd585 31-Jan-2001 Mike Smith <msmith@FreeBSD.org>

Remove obsoleted files.

Temporarily turn off the processor and apic drivers until we sort out
what these are going to do now.


# 083b300f 30-Jan-2001 John Hay <jhay@FreeBSD.org>

Reflect the new location of the ar and sr devices.


# f444a0ef 29-Jan-2001 Peter Wemm <peter@FreeBSD.org>

Convert mca (microchannel bus support) from something that we count
(bogus) to something that we test for the presence of.


# 52a90b77 29-Jan-2001 Peter Wemm <peter@FreeBSD.org>

change 'count eisa' to 'optional eisa' and update the only consumer
of 'NEISA' - userconfig.c.
While there, send some defunct code to the file history.


# 4a29e8f9 26-Jan-2001 Hellmuth Michaelis <hm@FreeBSD.org>

Add experimental support for Eicon.Diehl DIVA 2.0 and 2.02 ISA PnP cards.


# 1b367556 23-Jan-2001 Jason Evans <jasone@FreeBSD.org>

Convert all simplelocks to mutexes and remove the simplelock implementations.


# 1467a651 19-Jan-2001 Peter Wemm <peter@FreeBSD.org>

Convert apm from a bogus 'count' into a plain option. Clean out some
other cruft from the files.alpha and files.ia64 that were related to this.


# a496358e 19-Jan-2001 Peter Wemm <peter@FreeBSD.org>

Remove the now-empty ipl_funcs.c file on all platforms.


# dc567da1 11-Jan-2001 Hellmuth Michaelis <hm@FreeBSD.org>

Add infrastructure for the itjc ISDN hardware driver
Submitted by: Sergio de Souza Prallon <prallon@tmp.com.br>


# df729d6f 11-Jan-2001 Jake Burkholder <jake@FreeBSD.org>

- Remove compatibility macros for accessing per-cpu variables.
__FreeBSD_version 500015 can be used to detect their disappearance.
- Move the symbols for SMP_prvspace and lapic from globals.s to
locore.s.
- Remove globals.s with extreme prejudice.


# ca1460dd 08-Jan-2001 Brian Feldman <green@FreeBSD.org>

Add a large _warning_ about using COMPAT_SVR4.


# 42383764 08-Jan-2001 Peter Wemm <peter@FreeBSD.org>

Move if_wl.c from sys/i386/isa to dev/wi - it is not i386 (or even isa)
specific.


# bf374e5b 07-Jan-2001 Sergey Babkin <babkin@FreeBSD.org>

Completed move of Digiboard drivers to dev/dgb


# bffb191e 19-Dec-2000 Takanori Watanabe <takawata@FreeBSD.org>

Add PECOFF (WIN32 Execution file format) support.
To use it, some dll is needed. And currently, the dll is only for NetBSD.
So one more kernel module is needed.
For more infomation,
http://chiharu.haun.org/peace/ .

Reviewed by: bp


# 4323578d 11-Dec-2000 Nick Sayer <nsayer@FreeBSD.org>

Add the spic driver, which is a simple first attempt at providing access
to the jog dial device.


# 1533a5cf 01-Dec-2000 Mike Smith <msmith@FreeBSD.org>

We need support for comparing quad_t's now (ACPI CA uses this).


# c69ab48d 08-Nov-2000 Takanori Watanabe <takawata@FreeBSD.org>

Farewell our code. We will switch acpica code from Intel.
This code has help us comprehence ACPI spec .

Contributors of this code is as follows(except for FreeBSD commiter):
Yasuo Yokoyama,
Munehiro Matsuda,
and ALL acpi-jp@jp.freebsd.org people.

Thanks.

R.I.P.


# 78531822 07-Nov-2000 Mike Smith <msmith@FreeBSD.org>

Don't build the ACPI CA debugger unless the ACPI_DEBUG option is present.

Only build the IA32 support on i386. Build the IA64 support on IA64.


# 00910f28 05-Nov-2000 David E. O'Brien <obrien@FreeBSD.org>

ELF kernels should use an ELF sysvec. This allows us to move a.out
specific files to those platforms that acutally support a.out.


# 36412d79 20-Oct-2000 John Baldwin <jhb@FreeBSD.org>

- Make the mutex code almost completely machine independent. This greatly
reducues the maintenance load for the mutex code. The only MD portions
of the mutex code are in machine/mutex.h now, which include the assembly
macros for handling mutexes as well as optionally overriding the mutex
micro-operations. For example, we use optimized micro-ops on the x86
platform #ifndef I386_CPU.
- Change the behavior of the SMP_DEBUG kernel option. In the new code,
mtx_assert() only depends on INVARIANTS, allowing other kernel developers
to have working mutex assertiions without having to include all of the
mutex debugging code. The SMP_DEBUG kernel option has been renamed to
MUTEX_DEBUG and now just controls extra mutex debugging code.
- Abolish the ugly mtx_f hack. Instead, we dynamically allocate
seperate mtx_debug structures on the fly in mtx_init, except for mutexes
that are initiated very early in the boot process. These mutexes
are declared using a special MUTEX_DECLARE() macro, and use a new
flag MTX_COLD when calling mtx_init. This is still somewhat hackish,
but it is less evil than the mtx_f filler struct, and the mtx struct is
now the same size with and without mutex debugging code.
- Add some micro-micro-operation macros for doing the actual atomic
operations on the mutex mtx_lock field to make it easier for other archs
to override/optimize mutex ops if needed. These new tiny ops also clean
up the code in some places by replacing long atomic operation function
calls that spanned 2-3 lines with a short 1-line macro call.
- Don't call mi_switch() from mtx_enter_hard() when we block while trying
to obtain a sleep mutex. Calling mi_switch() would bogusly release
Giant before switching to the next process. Instead, inline most of the
code from mi_switch() in the mtx_enter_hard() function. Note that when
we finally kill Giant we can back this out and go back to calling
mi_switch().


# 925be47c 09-Oct-2000 Hellmuth Michaelis <hm@FreeBSD.org>

update to i4b version 0.95.04


# a6bc3edb 03-Oct-2000 Peter Wemm <peter@FreeBSD.org>

Move the ata/atapi files to the common area. They were the same on all
platforms.

While here, work around a strange quirk in config(8) that I do not yet
understand. Rearrange which atapi* files have 'optional' vs. 'count'
so that you can have atapifd without atapicd. The only difference should
be that this works instead of having a link error because atapi-all.o got
left out of the kernel.


# 12a02d6e 02-Oct-2000 Mike Smith <msmith@FreeBSD.org>

Move the i386 PCI attachment code out of i386/isa back into i386/pci.

Split out the configuration space access primitives, as these are needed
elsewhere as well.


# 2da5dbec 01-Oct-2000 Peter Wemm <peter@FreeBSD.org>

Put on my nuclear-grade asbestos suit and cvs rm the old, broken, sound
drivers (again). These drivers have not compiled for 5-6 months.
Now that the new sound code supports MIDI, the major reason we had for
reviving it is gone. It is a far better investment polishing the new
midi code than trying to keep this on life support. Come 5.0-REL, if
there are major shortcomings in the pcm sound driver then maybe we can
rethink this, but until then we should focus on pcm.

Remember, these have not been compilable since ~April-May this year.


# f59f3733 30-Sep-2000 David E. O'Brien <obrien@FreeBSD.org>

The `ed' NIC driver has been changed to work on Alpha now. So enable it
on all platforms.

Submitted by: Alexander Langer <alex@big.endian.de>


# 2bfb7205 14-Sep-2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org>

Add Timer device driver for power management events.
The code for suspend/resume is derived from APM device driver.

Some people suggested the original code is somewhat buggy, but I'd
like to just move it from apm.c without any major changes for the
initial version. This code should be refined later.

To use pmtimer to adjust time at resume time, add
device pmtimer
in your kernel config file, and add
hint.pmtimer.0.at="isa"
in your device.hints

Reviewed by: -current, bde


# b14d7dac 13-Sep-2000 Yoshihiro Takahashi <nyan@FreeBSD.org>

- Newbus'ify and bus_space'ify.
- Separate bus dependent part and independent part.
- Moved source files to sys/dev/fe (repo copied).
- Fixed some comments by chi@bd.mbn.or.jp (Chiharu Shibata)

Tested by: bsd-nomads@clave.gr.jp and
FreeBSD98-testers@jp.freebsd.org


# 0384fff8 06-Sep-2000 Jason Evans <jasone@FreeBSD.org>

Major update to the way synchronization is done in the kernel. Highlights
include:

* Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The
alpha port is still in transition and currently uses both.)

* Per-CPU idle processes.

* Interrupts are run in their own separate kernel threads and can be
preempted (i386 only).

Partially contributed by: BSDi (BSD/OS)
Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh


# 339b4905 01-Sep-2000 Poul-Henning Kamp <phk@FreeBSD.org>

Move svr4 here as well...


# b1f12b61 31-Aug-2000 Takanori Watanabe <takawata@FreeBSD.org>

Merge rest piece of ACPI driver.To activate acpi driver ,add

device acpi

line. Merge finished. But still experimental phase.Need more hack!

Obtained from:ACPI for FreeBSD project


# 0ec24f5a 22-Aug-2000 Marcel Moolenaar <marcel@FreeBSD.org>

Connect the new sources in /sys/compat/linux and the new file
in /sys/i386/linux.


# e19f2fda 21-Aug-2000 Marcel Moolenaar <marcel@FreeBSD.org>

Style fixes:
o Put the backslash in a fixed column by preference,
o Sort the list of files.


# f71c01cc 13-Jun-2000 Peter Wemm <peter@FreeBSD.org>

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


# 1f82d2d7 11-Jun-2000 Seigo Tanimura <tanimura@FreeBSD.org>

1. Update Comtrol RocketPort driver(rp) to version 3.02.
2. Newbusify the driver.
3. Build as a module.

4. Use correct minor numbers when creating device files.
5. Correctly lock control characters.
6. Return ENXIO when device not configured.
Submitted by: Tor Egge <Tor.Egge@fast.no>

7. Fix the baud_table.
Submitted by: Elliot Dierksen <ebd@oau.org>

Note:
- the old driver still lives in src/sys/i386/isa, so that you can
revert to it if something goes wrong.
- The module does not detach very well. Attaching works fine.


# 3f664fc6 10-Jun-2000 Peter Wemm <peter@FreeBSD.org>

A checkpoint of a part of a work-in-progress. Some more cleanups for
config(8). This commit allows control of the creation of the
#include "foo.h" files. We now only create them explicitly when needed.
BTW; these are mostly bad because they usually imply static limits on
numbers of units for devices. eg: struct mysoftc sc[NFOO];
These static limits have Got To Go.


# f47f0edd 02-Jun-2000 Bruce Evans <bde@FreeBSD.org>

Use "nm | awk ..." instead of genassym(1) to generate symbol value headers.
Symbol values are now represented using array sizes (4 arrays per symbol
so that 16-bit machines can represent 64-bit values) instead of being raw
binary values.

Reviewed by: marcel


# ca9f5045 14-May-2000 Paul Richards <paul@FreeBSD.org>

Build lnc driver from /sys/dev from now on.


# b0e56cde 24-Apr-2000 David E. O'Brien <obrien@FreeBSD.org>

* Use sys/sys/random.h rather than a i386 specific one.
* There was nothing that should be machine dependant about
i386/isa/random_machdep.c, so it is now sys/kern/kern_random.c.


# 4b008951 07-Apr-2000 Yoshihiro Takahashi <nyan@FreeBSD.org>

Newbusify adv driver.

Reviewed by: imp


# 5664bf9c 29-Mar-2000 Warner Losh <imp@FreeBSD.org>

NewBus the cs driver.

Submitted by: max@rsu.ru


# 239fe111 29-Mar-2000 Yoshihiro Takahashi <nyan@FreeBSD.org>

- Added PC-98 Cbus frontend.
- Move dev/aic/aic_isa.c entry from conf/files to conf/files.MACHINE
because PC-98 uses different file.

Submitted by: nyan and IMAI Takeshi <take-i@ceres.dti.ne.jp>


# 822dcb81 23-Mar-2000 Bruce Evans <bde@FreeBSD.org>

Fixed most disordering (all except for targets with complicated rules).


# 07846156 23-Mar-2000 Bruce Evans <bde@FreeBSD.org>

Fixed clean rule for font.h.


# a063b13d 19-Mar-2000 Peter Wemm <peter@FreeBSD.org>

Tag a warning on the isa compat shims at config time.


# a3f7c5d1 19-Mar-2000 Brian Feldman <green@FreeBSD.org>

Enable the K6-2 MTRR driver again, since there are reports of it working
with the applied change.

Submitted by: Coleman Kane <cokane@one.net>


# 80060e88 19-Mar-2000 Peter Wemm <peter@FreeBSD.org>

Connect the ISA and PCI compatability shims to an option. In this case
it's options COMPAT_OLDISA and COMPAT_OLDPCI. This is meant to be a
fairly strong incentive to update the older drivers to newbus, but doesn't
(quite) leave anybody hanging with no hardware support. I was talking with
a few folks and I was encouraged to simply break or disable the shims but
that was a bit too drastic for my liking.


# b2381471 14-Mar-2000 Jeroen Ruigrok van der Werven <asmodai@FreeBSD.org>

Remove the wd driver from the i386 kernel options.


# 4f9d49f1 20-Feb-2000 Gary Jennejohn <gj@FreeBSD.org>

Newbus-ify the USR Sportster TA Intern driver.

Enable the driver in sys/conf/files.i386.

In isa/isavar.h increase ISA_NPORT from 32 to 50. This is required
because this brain-damaged card maps 49 (!) port ranges. This does
not have a negative impact because this value only specifies the maximum
number of entries in a linked list and not the size of an array which
is allocated in all drivers.

The register/fifo access routines were not newbus-ified because
1) I knew that the old code worked and is simpler and more efficient
2) the if_ed driver does something similar and
3) the newbus macros collapse to inb/outb anyway.

Reviewed and tested by: hm
Approved by: jkh


# ce0c0d9d 09-Feb-2000 Bill Fumerola <billf@FreeBSD.org>

kbdcontrol isn't in everyones path(read: non-root people), so specify
an absolute path for us mere mortals.

Approved by: jkh


# 5d021a76 29-Jan-2000 Peter Wemm <peter@FreeBSD.org>

Move the (duplicated exactly!) portable ISA pcm drivers to files and
tighten up the logic a little.


# db8ba2ef 29-Jan-2000 Peter Wemm <peter@FreeBSD.org>

Don't build the wdc atapi attachments unless wdc is also present.


# 08922a1c 29-Jan-2000 Peter Wemm <peter@FreeBSD.org>

Arrange for the following files to be compiled when the configuration
conditions are met rather than having to resort to #if's in the code.
> dev/syscons/scvgarndr.c optional sc vga
> dev/syscons/scvesactl.c optional sc vga vesa
> i386/isa/vesa.c optional vga vesa


# 9c26dc2b 25-Jan-2000 Doug Rabson <dfr@FreeBSD.org>

Get the ppc driver from sys/isa instead of sys/i386/isa.


# d224cddc 24-Jan-2000 Peter Wemm <peter@FreeBSD.org>

Copy i386/isa/atapi-cd.[ch] to a new name so that it doesn't have the
same object file (atapi-cd.o) as the ata drivers. I'd have called it
wcd.[ch], but there's already one of those in the Attic that we can't
clobber - the good names are taken.
Fix building so that it can be compiled into LINT alongside ata.

Requested by: bde


# 623c2467 24-Jan-2000 Peter Wemm <peter@FreeBSD.org>

Activate the newbusified version of si.


# 71d38539 18-Jan-2000 Peter Wemm <peter@FreeBSD.org>

Add a warning for the snd drivers and a pointer to pcm/sbc/etc.


# 2b944ee2 15-Jan-2000 Kazutaka YOKOTA <yokota@FreeBSD.org>

This is the 3rd stage of syscons code reorganization.

- Split terminal emulation code from the main part of the driver so
that we can have alternative terminal emulator modules if we like in
the future. (We are not quite there yet, though.)

- Put sysmouse related code in a separate file, thus, simplifying the
main part of the driver.

As some files are added to the source tree, you need to run config(8)
before you compile a new kernel next time.

You shouldn't see any functional change by this commit; this is only
internal code reorganization.


# c5191a98 14-Jan-2000 Peter Wemm <peter@FreeBSD.org>

Pre 4.0 tidy up.

Collect together the components of several drivers and export eisa from
the i386-only area (It's not, it's on some alphas too). The code hasn't
been updated to work on the Alpha yet, but that can come later.

Repository copies were done a while ago.
Moving these now keeps them in consistant place across the 4.x series
as the newbusification progresses.

Submitted by: mdodd


# 90bba6bf 10-Jan-2000 Warner Losh <imp@FreeBSD.org>

Move xe driver from dev/pccard to dev/xe. Convert driver to newbus.
Driver is not functional yet, but does compile. Tests with xe cards
indicates that it doesn't panic the machine when they are present, but
fail to probe. Interface help in the pcic/pccard layers are needed to
complete this driver.


# 68b683dc 09-Jan-2000 Bruce Evans <bde@FreeBSD.org>

Compile *_genassym.c with ordinary ${CFLAGS}. The (small) needs for
-U_KERNEL became negative when all all the genassym.c's were converted
to be cross-built. Related cleanups: PARAM went away, but was still
used here; KERNEL was renamed to _KERNEL, but was still KERNEL here;
the deprecated macros $@ and $< were still used here.

Use "genassym ... > ${.TARGET}", not "genassym -o $@ ...", so that
genassym(1) doesn't need to support -o.

Removed half-baked hard-coded dependencies of *_genassym.o on headers.
These objects should be added to the list of objects in the depend
rule to get full dependencies. This doesn't happen automatically
because they are not linked into the kernel. Half baked dependencies
don't really help.


# cfb95261 09-Jan-2000 Bruce Evans <bde@FreeBSD.org>

Quick fix for LINT breakage. KERNFORMAT went away, so don't use it
for trlld.o.


# a9d61af0 23-Dec-1999 Marcel Moolenaar <marcel@FreeBSD.org>

Update config rules for making {linux|svr4}_assym.h
Assembler symbols are now made using genassym(1).


# 5a81d0a5 21-Dec-1999 Peter Wemm <peter@FreeBSD.org>

Only compile gusc for isa (the #if NISA inside gusc effectively covers
the whole file)


# 0d553907 15-Dec-1999 Hellmuth Michaelis <hm@FreeBSD.org>

update to isdn4bsd beta release 0.90: add ELSA PCC-16 isic support file


# e5981bd1 14-Dec-1999 Hellmuth Michaelis <hm@FreeBSD.org>

update to isdn4bsd beta release 0.90
drivers which are likely to be ported to newbus are commented out for now


# 83c5d22d 13-Dec-1999 Kazutaka YOKOTA <yokota@FreeBSD.org>

- Pull in kbd.c when sc or vt is included in the kernel, even if
no keyboard driver is defined in the kernel config file.


# bfc8775a 12-Dec-1999 Peter Wemm <peter@FreeBSD.org>

Turn on warnings for the wd* driver with a loud pointer to ata*. This
doesn't break builds, but is difficult to miss..


# 5fe1db5b 10-Dec-1999 Poul-Henning Kamp <phk@FreeBSD.org>

Remove the if_ze and if_zp drivers.

These drivers were cloned from the ed and ep drivers back in 1994
when PCMCIA cards were a very new thing and we had no other support
for such devices. They treated the PCIC (the chip which controls the
PCCARD slot) as part of their device and generally hacked their way
to success. They have significantly bit-rotted relative to their
ancestor drivers (ed & ep) and they were a dead-end on the evolution
path to proper PCCARD support in FreeBSD.

They have been terminally broken since August 18 where mdodd forgot
them and nobody seems to have missed them enough to fix them since.

I found no outstanding PRs against these drivers.


# f2cbe161 09-Dec-1999 Archie Cobbs <archie@FreeBSD.org>

Move source files common to all platforms from <arch>/conf/files.<arch>
to conf/files. If/when these files are optimized for each platform,
they can be moved back.


# 9578442e 09-Dec-1999 Dan Moschuk <dan@FreeBSD.org>

Move libkern/arc4random.c into conf/files. I was planning on doing an
optimized alpha version, but I'll leave that alone for the time being.


# 09e5e156 07-Dec-1999 Mark Newton <newton@FreeBSD.org>

Add support for compiling SVR4 as a static module

("AND THE CROWD GOES... uh.")

Tested by: Joerg Wunsch <joerg_wunsch@interface-business.de>


# 46db6cf8 05-Dec-1999 Peter Wemm <peter@FreeBSD.org>

Switch over to using the generic joy driver


# ee3fd601 28-Nov-1999 Dan Moschuk <dan@FreeBSD.org>

Introduce OpenBSD-like Random PIDs. Controlled by a sysctl knob
(kern.randompid), which is currently defaulted off. Use ARC4 (RC4) for our
random number generation, which will not get me executed for violating
crypto laws; a Good Thing(tm).

Reviewed and Approved by: bde, imp


# dda0e6f5 25-Nov-1999 Bill Paul <wpaul@FreeBSD.org>

Update the WaveLAN/IEEE driver:

- Convert to new bus attachment scheme. Thanks to Blaz Zupan for doing
the initial work here. One thing I changed was to have the attach
and detach routines work like the PCI drivers, which means that in
theory you should be able to load and unload the driver like the PCI
NIC drivers, however the pccard support for this hasn't settled down
yet so it doesn't quite work. Once the pccard work is done, I'll have
to revisit this.

- Add device wi0 to PCCARD. If we're lucky, people should be able to
install via their WaveLAN cards now.

- Add support for signal strength caching. The wicontrol utility has
also been updated to allow zeroing and displaying the signal strength
cache.

- Add a /sys/modules/wi directory and fix a Makefile to builf if_wi.ko.
Currently this module is only built for the i386 platform, though once
the pccard stuff is done it should be able to work on the alpha too.
(Theoretically you should be able to plug one of the WaveLAN/IEEE ISA
cards into an alpha with an ISA slot, but we'll see how that turns out.

- Update LINT to use only device wi0. There is no true ISA version of
the WaveLAN/IEEE so we'll never use an ISA attachment.

- Update files.i386 so that if_wi is dependent on card.


# e2dc359f 21-Nov-1999 Seigo Tanimura <tanimura@FreeBSD.org>

- Introduce the bridge drivers for Sound Blaser, GUS and Crystal
Semiconductor CS461x/428x.
- Add support for GUS and CS461x/428x pcm.
- Move newpcm drivers for ISA cards to files.i386. The drivers for
PC98 would be something quite different from those for PC/AT.

Moving requested by: nyan


# 4f76d87b 24-Oct-1999 Warner Losh <imp@FreeBSD.org>

Massive rewrite of pccard to convert it to newbus.
o Gut the compatibility interface, you now must attach with newbus.
o Unit numbers from pccardd are now ignored. This may change the units
assigned to a card. It now uses the first available unit.
o kill old skeleton code that is now obsolete.
o Use newbus attachment code.
o cleanup interfile dependencies some.
o kill list of devices per slot. we use the device tree for what we need.
o Remove now obsolete code.
o The ep driver (and maybe ed) may need some config file tweaks to
allow it to attach. See config files that were committed for examples
on how to do this.

Drivers to be commited shortly.

This is an interrum fix until the new pccard. ed, ep and sio will be
supported by me with this release, although others are welcome to try
to support other devices before new pccard is working.

I plan on doing minimal further work on this code base. Be careful
when upgrading, since this code is known to work on my laptop and
those of a couple others as well, but your milage may vary.

BUGS TO BE FIXED:

o system memory isn't allocated yet, it will be soon.
o No devices actually have a pccard newbus attach in the tree.

BUGS THAT MIGHT BE FIXED:

o card removal, including suspend, usually hangs the system.

Many thanks to Peter Wemm and Doug Rabson for helping me to fill in
the missing bits of New Bus understanding at FreeBSD Con '99.


# 14bacef1 14-Oct-1999 Matthew N. Dodd <mdodd@FreeBSD.org>

- Remove the ISA, PCI, and PCCARD specific code from if_ed.c; it
now lives in the respective bus front end files.
- Add various function prototypes to if_edvar.h
- Clean up some debugging code that snuck into if_ed_isa.c
- Turn on the right bits in files.i386


# 3c624743 09-Oct-1999 Matthew N. Dodd <mdodd@FreeBSD.org>

- Point the right bits at the new location of the bus front ends.
The 'bt' SCSI driver now lives in sys/dev/buslogic.

- Correct a few comments.


# 5d47e22f 08-Oct-1999 Matthew N. Dodd <mdodd@FreeBSD.org>

Remove the DPT EISA driver entry.


# 6a025a98 30-Sep-1999 Matthew N. Dodd <mdodd@FreeBSD.org>

Turn off and remove the 'old' if_ep ISA/EISA/PCCARD driver.

Turn on the 'new' if_ep driver which supports:

ISA 3c509
MCA 3c529
EISA 3c579
PCCARD 3c589

I think all we're missing is support for the VME bus and S-100 bus
Etherlink III cards.

The new code has been tested by a number of people and all the important
bits work. I've not been able to test the EISA code but will do so once
my hardware arrives. Since I've changed nothing in the EISA code I suspect
it will perform the same manner as before.

Future changes involve whacking the ISA and PCCARD front ends to use
newbus and to convert the driver to bus_space and make it use ifmedia.

This is the first working network driver that supports MCA bus devices btw.

Enjoy.


# d611603d 26-Sep-1999 KATO Takenori <kato@FreeBSD.org>

Move if_ed.c back to files.i386 since pc98 has a special ed driver.

Reviewed by: peter


# b0d821b8 26-Sep-1999 Warner Losh <imp@FreeBSD.org>

Revert non-aha changes. They weren't supposed to go in.


# a78b40a5 26-Sep-1999 Warner Losh <imp@FreeBSD.org>

Move aha driver to dev/aha like the other drivers.

Code relocation only, no code changes.


# 30b7a8f1 22-Sep-1999 Søren Schmidt <sos@FreeBSD.org>

Oops, the syntax didn't work that way...


# fbf6ea79 21-Sep-1999 Søren Schmidt <sos@FreeBSD.org>

Support quad & max speeds in wormcontrol.
A bit more general cleanup.


# 24514292 20-Sep-1999 Poul-Henning Kamp <phk@FreeBSD.org>

On PIIX4 based SMP systems use the PMTMR register for timecounting.

It is about 2.5 microseconds or roughly 3 times faster to use this
"PIIX" timecounter than the "i8254" timecounter. Resolution is
also 3 times better.

The code cheats and don't register the PCI device, because other pieces
of code want to use it too.

Originally spotted by: msmith


# 814e1609 19-Sep-1999 Peter Wemm <peter@FreeBSD.org>

Make if_ed work again on pci, isa, isapnp. The hack to make it work on
PCCARD is pretty revolting but should buy us time while the pccard driver
angle is sorted out. A commit for the MCA ed attachment will follow
shortly.


# b720111c 08-Sep-1999 Peter Wemm <peter@FreeBSD.org>

Restore old sio driver for Bruce. We'll fix the bus problems in nsio
instead.


# e5174d14 06-Sep-1999 Peter Wemm <peter@FreeBSD.org>

Repo copy isa/sio* to dev/sio/sio* in preperation for extra bus methods
including pci.
Also, eliminate NSIOTOT and do it dynamically where it matters.


# 07f5372c 05-Sep-1999 Peter Wemm <peter@FreeBSD.org>

Temporarily disable k6_mem (k6 write combining) at Brian's request since
it appears to be causing problems under XFree3.9.16.


# 7612e4c1 02-Sep-1999 Matthew N. Dodd <mdodd@FreeBSD.org>

This adds the i386 specific support for systems with a MicroChannel
Architecture bus.

Reviewed by: msmith


# 4249382d 01-Sep-1999 Doug Rabson <dfr@FreeBSD.org>

This represents essentially a complete rewrite of the ISA PnP code. The
new system is integrated with the ISA bus code more cleanly and allows
the future addition of more enumerators such as PnPBIOS and ACPI.

This commit also enables the new pcm driver since it is somewhat tied to
the new PnP code.


# f054c290 29-Aug-1999 Poul-Henning Kamp <phk@FreeBSD.org>

Merge alpha and pc98 changes into i386 MBR handling code and replace all
three copies with one copy in MI land.


# c3aac50f 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# c6dfea0e 27-Aug-1999 Marcel Moolenaar <marcel@FreeBSD.org>

Add sysctl variables for the Linuxulator. These reside under `compat.linux' as
discussed on current.

The following variables are defined (for now):

osname (defaults to "Linux")
Allow users to change the name of the OS as returned by uname(2),
specially added for all those Linux Netscape users and statistics
maniacs :-) We now have what we all wanted!

osrelease (defaults to "2.2.5")
Allow users to change the version of the OS as returned by uname(2).
Since -current supports glibc2.1 now, change the default to 2.2.5
(was 2.0.36).

oss_version (defaults to 198144 [0x030600])
This one will be used by the OSS_GETVERSION ioctl (PR 12917) which I
can commit now that we have the MIB. The default version number is the
lowest version possible with the current 'encoding'.

A note about imprisoned processes (see jail(2)):
These variables are copy-on-write (as suggested by phk). This means that
imprisoned processes will use the system wide value unless it is written/set
by the process. From that moment on, a copy local to the prison will be
used.

A note about the implementation:
I choose to add a single pointer to struct prison, because I didn't like the
idea of changing struct prison every time I come up with a new variable. As
a side effect, the extra storage is only needed when a variable is set from
within the prison. This also minimizes kernel bloat when the Linuxulator is
not used; both compiled in or as a module.

Reviewed by: bde (first version only) and phk


# 08c40841 17-Aug-1999 Alan Cox <alc@FreeBSD.org>

Create callable (non-inline) versions of the atomic_OP_TYPE functions
that are linked into the kernel. The KLD compilation options are
changed to call these functions, rather than in-lining the
atomic operations.

This approach makes atomic operations from KLDs significantly
faster on UP systems (though somewhat slower on SMP systems).

PR: i386/13111
Submitted by: peter.jeremy@alcatel.com.au


# ce9edcf5 09-Aug-1999 Poul-Henning Kamp <phk@FreeBSD.org>

Merge the cons.c and cons.h to the best of my ability. alpha may or
may not compile, I can't test it.


# 307fae6b 06-Aug-1999 Peter Wemm <peter@FreeBSD.org>

Re-delete the (meaningless) device-driver tokens that came back in 1.256
after having been removed in 1.253 and turned into a warning.

Noticed by: bde


# 0df6adec 06-Aug-1999 Hellmuth Michaelis <hm@FreeBSD.org>

updating isdn4bsd to beta version 0.83


# 496027bf 28-Jul-1999 Mike Smith <msmith@FreeBSD.org>

Major update to the kernel's BIOS-calling ability.

- Add support for calling 32-bit code in other segments
- Add support for calling 16-bit protected mode code

Update APM to use this facility.

Submitted by: jlemon


# 8343d904 26-Jul-1999 Poul-Henning Kamp <phk@FreeBSD.org>

Pave the way for the fla driver.


# 6c205e59 03-Jul-1999 Peter Wemm <peter@FreeBSD.org>

Delete the 'device-driver' suffix. It's been meaningless for a long time.
On the VAX, it used to be used for special compilation to avoid the
optimizer which would mess with memory mapped devices etc. These days
we use 'volatile'.


# 0634d711 03-Jul-1999 Peter Wemm <peter@FreeBSD.org>

Only have the pci component compiled if pci is specified at config.
Remove #if NPCI > 0 as a result.


# dae36f14 03-Jul-1999 Peter Wemm <peter@FreeBSD.org>

Move bt_isa.c to the cpu-independent isa section.


# 28e1b413 29-Jun-1999 Peter Wemm <peter@FreeBSD.org>

sscape_mss is supposed to work..


# aa653b8f 29-Jun-1999 Peter Wemm <peter@FreeBSD.org>

(mostly) fix ordering.


# 6e8394b8 22-Jun-1999 Kazutaka YOKOTA <yokota@FreeBSD.org>

The second phase of syscons reorganization.

- Split syscons source code into manageable chunks and reorganize
some of complicated functions.

- Many static variables are moved to the softc structure.

- Added a new key function, PREV. When this key is pressed, the vty
immediately before the current vty will become foreground. Analogue
to PREV, which is usually assigned to the PrntScrn key.
PR: kern/10113
Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>

- Modified the kernel console input function sccngetc() so that it
handles function keys properly.

- Reorganized the screen update routine.

- VT switching code is reorganized. It now should be slightly more
robust than before.

- Added the DEVICE_RESUME function so that syscons no longer hooks the
APM resume event directly.

- New kernel configuration options: SC_NO_CUTPASTE, SC_NO_FONT_LOADING,
SC_NO_HISTORY and SC_NO_SYSMOUSE.
Various parts of syscons can be omitted so that the kernel size is
reduced.

SC_PIXEL_MODE
Made the VESA 800x600 mode an option, rather than a standard part of
syscons.

SC_DISABLE_DDBKEY
Disables the `debug' key combination.

SC_ALT_MOUSE_IMAGE
Inverse the character cell at the mouse cursor position in the text
console, rather than drawing an arrow on the screen.
Submitted by: Nick Hibma (n_hibma@FreeBSD.ORG)

SC_DFLT_FONT
makeoptions "SC_DFLT_FONT=_font_name_"
Include the named font as the default font of syscons. 16-line,
14-line and 8-line font data will be compiled in. This option replaces
the existing STD8X16FONT option, which loads 16-line font data only.

- The VGA driver is split into /sys/dev/fb/vga.c and /sys/isa/vga_isa.c.

- The video driver provides a set of ioctl commands to manipulate the
frame buffer.

- New kernel configuration option: VGA_WIDTH90
Enables 90 column modes: 90x25, 90x30, 90x43, 90x50, 90x60. These
modes are mot always supported by the video card.
PR: i386/7510
Submitted by: kbyanc@freedomnet.com and alexv@sui.gda.itesm.mx.

- The header file machine/console.h is reorganized; its contents is now
split into sys/fbio.h, sys/kbio.h (a new file) and sys/consio.h
(another new file). machine/console.h is still maintained for
compatibility reasons.

- Kernel console selection/installation routines are fixed and
slightly rebumped so that it should now be possible to switch between
the interanl kernel console (sc or vt) and a remote kernel console
(sio) again, as it was in 2.x, 3.0 and 3.1.

- Screen savers and splash screen decoders
Because of the header file reorganization described above, screen
savers and splash screen decoders are slightly modified. After this
update, /sys/modules/syscons/saver.h is no longer necessary and is
removed.


# 66e98eef 18-Jun-1999 Brian Feldman <green@FreeBSD.org>

K6-family MTRR support

This is tested, but I really can't say whether it works entirely. I
don't know exactly what to look for when testing it. So let's say this
is open for testing. Send any results to green@FreeBSD.org

Reviewed by: msmith (long ago)


# 77835954 01-Jun-1999 Jonathan Lemon <jlemon@FreeBSD.org>

Make vm86 a standard component

Reviewed by: silence on on -current


# e610a943 01-Jun-1999 Doug Rabson <dfr@FreeBSD.org>

Correct dumb mistake in previous commit.


# a92ac6bc 01-Jun-1999 Doug Rabson <dfr@FreeBSD.org>

Move fd driver back to files.${arch} since pc98 has a special fd driver.


# c77dda34 31-May-1999 Doug Rabson <dfr@FreeBSD.org>

The fd driver has moved from i386/isa to isa.


# 600829cd 14-May-1999 Justin T. Gibbs <gibbs@FreeBSD.org>

Nuke ucmpdi2.c from i386/libkern to serve as a reminder that switch
statements on 64bit values generate poor code.

Requested by: bde


# 007c45c2 13-May-1999 Justin T. Gibbs <gibbs@FreeBSD.org>

Add ucmpdi2.c to the i386 libkern build.


# 282462f9 13-May-1999 David E. O'Brien <obrien@FreeBSD.org>

Add the `xe' Xircom PC Card driver.


# b307e58f 09-May-1999 Poul-Henning Kamp <phk@FreeBSD.org>

Major lobotomy of config(8). The

config kernel mumble mumble

line has been obsoleted and removed and with it went all knowledge of
devices on the part of config.

You can still configure a root device (which is used if you give
the "-r" flag) but now with an option:

options ROOTDEVNAME=\"da0s2e\"

The string is parsed by the same code as at the "boot -a" prompt.

At the same time, make the "boot -a" prompt both more able and more
informative.

ALPHA/PC98 people: You will have to adapt a few simple changes
(defining rootdev and dumpdev somewhere else) before config works
for you again, sorry, but it's all in the name of progress.


# b5a1d3ab 08-May-1999 Peter Wemm <peter@FreeBSD.org>

Take a guess at a halfway reasonable fla entry so that the build
doesn't break on isa_compat.[ch]. phk - change this to what you need..


# 31a08ab0 05-May-1999 Bill Paul <wpaul@FreeBSD.org>

Add device driver support for the Lucent WaveLAN/IEEE 802.11 PCMCIA
adapter (and some workalikes). Also add man pages and a wicontrol
utility to manipulate some of the card parameters.

This driver was written using information gleaned from the Lucent HCF Light
library, though it does not use any of the HCF Light code itself, mainly
because it's contaminated by the GPL (but also because it's pretty gross).
The HCF Light lacks certain featurs from the full (but proprietary) HCF
library, including 802.11 frame encapsulation support, however it has
just enough register information about the Hermes chip to allow someone
with enough spare time and energy to implement a proper driver. (I would
have prefered getting my hands on the Hermes manual, but that's proprietary
too. For those who are wondering, the Linux driver uses the proprietary
HCF library, but it's provided in object code form only.)

Note that I do not have access to a WavePOINT access point, so I have
only been able to test ad-hoc mode. The wicontrol utility can turn on
BSS mode, but I don't know for certain that the NIC will associate with
an access point correctly. Testers are encouraged to send their results
to me so that I can find out if I screwed up or not.


# 6182fdbd 16-Apr-1999 Peter Wemm <peter@FreeBSD.org>

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


# e05da2e9 15-Apr-1999 Bruce Evans <bde@FreeBSD.org>

Made booting with -a work for all configurations. Previously it
only worked for configurations with "swap on generic".

usr.sbin/config/config.y:
- ignore all "swap [on] device ...' specifications except for
warning about them. They haven't done anything related to swap
for almost 4 years, and were previously silently ignored,
except for "swap on generic" which stopped swap${KERNEL}.c
from being generated. Code to support swapping is now deader
than before.

usr.sbin/config/mkswapconf.c:
- don't generate a dummy setconf() function in swap${KERNEL}.c.

sys/i386/conf/files.i386:
- swapgeneric.c is now standard. It should be merged into autoconf.c
so that it doesn't conflict with swap${KERNEL}.c for kernels named
"generic".

sys/i386/i386/autoconf.c:
- don't call setroot() for mfs roots. Since setroot() doesn't do anything
harmful, this was just a waste of time, except possibly for booting with
-a it may have helped prevent an undesireable call to setconf() by
finding a bogus rootdev.
- honor -a for ffs roots. -a now overrides all other ways of specifying
the root device. Previously, -r had precedence over -a, and the -a
handling was usually a no-op.
- don't honor -a for non-ffs roots, since it would currently just get in
the way of a clean panic.

sys/i386/i386/swapgeneric.c:
- don't declare things that are now always declared in swap${KERNEL}.c.
Don't decide things that are now decided in autoconf.c. Code to
support the "generic" case is now dead instead of useless.


# 3e3e4375 13-Apr-1999 Peter Wemm <peter@FreeBSD.org>

Shoot the LKM support in the old wd/wdc/atapi driver set in the head and
perform a cleanup/unifdef sweep over it to tidy things up. The atapi
code is permanently attached to the wd driver and is always probed.

I will add an extra option bit in the flags to disable an atapi probe on
either the master or slave if needed, if people want this.

Remember, this driver is destined to die some time. It's possible that
it will loose all atapi support down the track and only be used for
dumb non-ATA disks and all ata/atapi devices will be handled by the new
ata system.

ATAPI, ATAPI_STATIC and CMD640 are no longer options, all are implicit.

Previously discussed with: sos


# 90ea793a 06-Apr-1999 Mike Smith <msmith@FreeBSD.org>

Add i686_mem.c - memory range attribute support for P6 processors.


# e048f09f 30-Mar-1999 Eivind Eklund <eivind@FreeBSD.org>

Fix the oltr entries.


# 4a64714f 29-Mar-1999 Kenneth D. Merry <ken@FreeBSD.org>

Delete all references to the "aic" driver. It isn't in the tree, and
may not show up for a while, and I'm tired of people asking about it.

Perhaps this will eliminate some of the confusion.


# 55bfaed1 28-Mar-1999 Søren Schmidt <sos@FreeBSD.org>

Fourth update to the new ATA/ATAPI driver:

Well, better late than newer, but things has been hectic
around here, sorry for the long delay.

DMA support has been added to the ATA disk driver.
This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers.
The promise support works without the BIOS on the board,
and timing modes are set to support up to UDMA speed. This
solves the problems with having more than one promise controller
in the same system.
There is support for "generic" DMA, that might work on other
controllers, but now you have been warned :)
More chipset specific code will come soon, I have to find testers
with the approbiate HW, more on that when I have it ready.

The system now uses its own major numbers, please run MAKEDEV
with the devices you need (ad?, acd?, afd?, ast?).
For now the disk driver will also attach to the old wd major
so one can at least boot without this step, but be warned, this
will eventually go away. The bootblocks will have to be changed
before one can boot directly from an "ad" device though.

Fixed problems:

All known hang problems should be solved
The probe code has been sligthly changed, this should solve
the reports I have lying around (I hope).

Hangs when accessing ata & atapi device on the same channel simultaniously.
A real braino in ata_start caused this, fixed.

As usual USE AT YOUR OWN RISK!!, this is still pre alpha level code.
Especially the DMA support can hose your disk real bad if anything
goes wrong, agaiin you have been warned :)

But please tell me how it works for you!

Enjoy!

-Søren


# d99434fb 16-Mar-1999 Søren Schmidt <sos@FreeBSD.org>

Rewert the atapi CDROM driver's name to wcd.
This is to avoid confusion with the new system.
Also provide real entires in MAKEDEV for the new system.


# e9deda23 10-Mar-1999 Kazutaka YOKOTA <yokota@FreeBSD.org>

Keyboard driver update in preparation for the USB keyboard driver.

- Refined internal interface in keyboard drivers so that:
1. the side effect of device probe is kept minimal,
2. polling mode function is added,
3. and new ioctl and configuration options are added (see below).

- Added new ioctl: KDSETREPEAT
Set keyboard typematic rate. There has existed an ioctl command,
KDSETRAD, for the same purpose. However, KDSETRAD is dependent on
the AT keyboard. KDSETREPEAT provides more generic interface.
KDSETRAD will still be supported in the atkbd driver.

- Added new configuration options:
ATKBD_DFLT_KEYMAP
Specify a keymap to be used as the default, built-in keymap.
(There has been undocumented options, DKKEYMAP, UKKEYMAP, GRKEYMAP,
SWKEYMAP, RUKEYMAP, ESKEYMAP, and ISKEYMAP to set the default keymap.
These options are now gone for good. The new option is more general.)

KBD_DISABLE_KEYMAP_LOADING
Don't allow the user to change the keymap.


# fda82fc2 10-Mar-1999 Julian Elischer <julian@FreeBSD.org>

Submitted by: Larry Lile
Move the Olicom token ring driver to the officially sanctionned location of
/sys/contrib. Also fix some brokenness in the generic token ring support.

Be warned that if_dl.h has been changed and SOME programs might
like recompilation.


# c02553ce 07-Mar-1999 Hellmuth Michaelis <hm@FreeBSD.org>

add kernel config support for i4b driver for AVM Fritz PCI


# 61f625f0 04-Mar-1999 Søren Schmidt <sos@FreeBSD.org>

Add the atapi fd driver (LS120 & ZIP drive support)


# 8b89ef0a 01-Mar-1999 Søren Schmidt <sos@FreeBSD.org>

Finally!!

The much roumored replacement for our current IDE/ATA/ATAPI is
materialising in the CVS repositories around the globe.

So what does this bring us:

A new reengineered ATA/ATAPI subsystem, that tries to overcome
most of the deficiencies with the current drivers.

It supports PCI as well as ISA devices without all the hackery
in ide_pci.c to make PCI devices look like ISA counterparts.

It doesn't have the excessive wait problem on probe, in fact you
shouldn't notice any delay when your devices are getting probed.

Probing and attaching of devices are postponed until interrupts
are enabled (well almost, not finished yet for disks), making
things alot cleaner.

Improved performance, although DMA support is still WIP and not
in this pre alpha release, worldstone is faster with the new
driver compared to the old even with DMA.

So what does it take away:

There is NO support for old MFM/RLL/ESDI disks.
There is NO support for bad144, if your disk is bad, ditch it, it has
already outgrown its internal spare sectors, and is dying.

For you to try this out, you will have to modify your kernel config
file to use the "ata" controller instead of all wdc? entries.

example:

# for a PCI only system (most modern machines)
controller ata0
device atadisk0 # ATA disks
device atapicd0 # ATAPI CDROM's
device atapist0 # ATAPI tapes

#You should add the following on ISA systems:
controller ata1 at isa? port "IO_WD1" bio irq 14
controller ata2 at isa? port "IO_WD2" bio irq 15

You can leave it all in there, the system knows how to manage.

For now this driver reuses the device entries from the old system
(that will probably change later), but remember that disks are
now numbered in the sequence they are found (like the SCSI system)
not as absolute positions as the old system.

Although I have tested this on all the systems I can get my hands on,
there might very well be gremlins in there, so use AT YOU OWN RISK!!
This is still WIP, so there are lots of rough edges and unfinished
things in there, and what I have in my lab might look very different
from whats in CVS at any given time. So please have all eventual
changes go through me, or chances are they just dissapears...

I would very much like to hear from you, both good and bad news
are very welcome.

Enjoy!!

-Søren


# 722012cc 20-Feb-1999 Julian Elischer <julian@FreeBSD.org>

World, I'd like you to meet the first FreeBSD token Ring driver.
This is for various Olicom cards. An IBM driver is following.
This patch also adds support to tcpdump to decode packets on tokenring.
Congratulations to the proud father.. (below)

Submitted by: Larry Lile <lile@stdio.com>


# ef3c268f 11-Feb-1999 Justin T. Gibbs <gibbs@FreeBSD.org>

Make the ahc_eisa file also optional on 'eisa'.


# 807ef708 09-Feb-1999 Dag-Erling Smørgrav <des@FreeBSD.org>

Remove the lpt driver, as discussed on -hackers.


# 36b5facd 19-Jan-1999 Mike Smith <msmith@FreeBSD.org>

Remove 'alog'. G'bye Jamil.


# f359876f 19-Jan-1999 Kazutaka YOKOTA <yokota@FreeBSD.org>

syscons
- Bring down the splash screen when a vty is opened for the first
time.
- Make sure the splash screen/screen saver is stopped before
switching vtys.
- Read and save initial values in the BIOS data area early.
VESA BIOS may change BIOS data values when switching modes.
- Fix missing '&' operator.
- Move ISA specific part of driver initialization to syscons_isa.c.

atkbd
- kbdtables.h is now in /sys/dev/kbd.

all
- Adjust for forthcoming alpha port. Submitted by: dfr


# 2ad872c5 10-Jan-1999 Kazutaka YOKOTA <yokota@FreeBSD.org>

The first stage of console driver reorganization: activate new
keyboard and video card drivers.

Because of the changes, you are required to update your kernel
configuration file now!

The files in sys/dev/syscons are still i386-specific (but less so than
before), and won't compile for alpha and PC98 yet.

syscons still directly accesses the video card registers here and
there; this will be rectified in the later stages.


# c19da41e 01-Jan-1999 Peter Wemm <peter@FreeBSD.org>

Part 1 of pcvt/voxware revival. I hope I have not clobbered any other
deltas, but it is possible since I had a few merge conflicts over the last
few days while this has been sitting ready to go.

Approved by: core


# c28525ce 31-Dec-1998 Luigi Rizzo <luigi@FreeBSD.org>

Enable the ES1370 driver. You don't need any options for this,
the existing "device pcm..." entry will take care of that.


# 19c74962 27-Dec-1998 Poul-Henning Kamp <phk@FreeBSD.org>

Initial entry of ISDN4BSD into the FreeBSD tree.

ISDN4BSD is the work of our brand-new comitter: Hellmuth Michaelis,
who has done a tremendous amount of work to bring us this far.

There are still some outstanding issues and files to bring into
the tree, and for now it will be needed to pick up all the extra
docs from the isdn4bsd release.

It is probably also a very good idea to subscribe to the isdn@freebsd.org
mailing list before you try this out.

These files correspond to release "beta Version 0.70.00 / December
1998" from Hellmuth.


# 50bac46f 27-Dec-1998 Søren Schmidt <sos@FreeBSD.org>

Pre 3.0 branch cleanup sos#2: sound

Superceded by the snd driver...


# fe433548 27-Dec-1998 Søren Schmidt <sos@FreeBSD.org>

Pre 3.0 branch cleanup sos#1: wcd

Superceded by acd driver...


# fc47545e 27-Dec-1998 Poul-Henning Kamp <phk@FreeBSD.org>

Pre 3.0 branch cleanup casualty #6: ft


# 11ceeec2 27-Dec-1998 Poul-Henning Kamp <phk@FreeBSD.org>

Pre 3.0 branch cleanup casualty #5: nca, sea, wds, uha

No CAM drivers available. If somebody CAMifies one of these, they
will be welcome back in the tree


# 9034de81 26-Dec-1998 Poul-Henning Kamp <phk@FreeBSD.org>

Pre 3.0 branch cleanup casualty #4: pcvt


# e86310b9 26-Dec-1998 Poul-Henning Kamp <phk@FreeBSD.org>

Pre 3.0 branch cleanup casualty #3: 3c505 ethernet support


# 36b2d2c2 26-Dec-1998 Poul-Henning Kamp <phk@FreeBSD.org>

Pre 3.0 branch cleanup casualty #2: Transputer support


# 30cfb5b6 21-Dec-1998 Joerg Wunsch <joerg@FreeBSD.org>

Include rdp(4).

Should i also include it into GENERIC?


# c2ad65ca 09-Oct-1998 Peter Wemm <peter@FreeBSD.org>

elf_machdep.c and rindex.c are now standard


# 35b47c42 20-Sep-1998 Bruce Evans <bde@FreeBSD.org>

Remove vestiges of SLICE code.

Forgotten by: sos


# a8445737 15-Sep-1998 Søren Schmidt <sos@FreeBSD.org>

Add VESA support to syscons.

Kazu writes:

The VESA support code requires vm86 support. Make sure your kernel
configuration file has the following line.
options "VM86"
If you want to statically link the VESA support code to the kernel,
add the following option to the kernel configuration file.
options "VESA"

The vidcontrol command now accepts the following video mode names:
VESA_132x25, VESA_132x43, VESA_132x50, VESA_132x60, VESA_800x600

The VESA_800x600 mode is a raster display mode. The 80x25 text will
be displayed on the 800x600 screen. Useful for some laptop computers.

vidcontrol accepts the new `-i <info>' option, where <info> must be
either `adapter' or `mode'. When the `-i adapter' option is given,
vidcontrol will print basic information (not much) on the video
adapter. When the `-i mode' option is specified, vidcontrol will
list video modes which are actually supported by the video adapter.

Submitted by: Kazutaka YOKOTA yokota@FreeBSD.ORG


# 700daf5e 15-Sep-1998 Justin T. Gibbs <gibbs@FreeBSD.org>

sd->da, od is gone, no SCSI control devices.
new pass, xpt, and targ devices.

Nuke no longer used AHC options.


# eeded4d8 08-Sep-1998 Søren Schmidt <sos@FreeBSD.org>

Add new atapi-cd driver that supports atapi CD-R/RW drives.
This is only a stop-gab solution to get atapi burner support into 3.0.


# f25c58e0 04-Sep-1998 Nicolas Souchu <nsouch@FreeBSD.org>

pcf.c added, support for the Philips PCF8584 I2C bus controller
(this is part of the iicbus system)


# c35bda94 04-Aug-1998 Brian Somers <brian@FreeBSD.org>

Add driver dgm - for the Digiboard PC/Xem
Submitted by: "IBS / Andre Oppermann" <andre@pipeline.ch>
DEVFS additions: brian

dgm gets major number 101.


# b16d163d 20-Jul-1998 Mike Smith <msmith@FreeBSD.org>

Add the 'cs' driver for Crystal Semiconductor CS89x0 devices. This
supports PnP and if_media. I've been running a slightly older version
here for several weeks now.
Submitted by: Maxim Bolotin <max@rsu.ru>


# 2ebd0c37 16-Jun-1998 Bruce Evans <bde@FreeBSD.org>

Backed out rev.1.183, which had nothing to do with its log message.
It was to support a half-baked optimization of certain long long
divisions in gcc-2.8 and/or egcs. We now avoid these divisions.


# 3e425b96 19-Apr-1998 Julian Elischer <julian@FreeBSD.org>

Add changes and code to implement a functional DEVFS.
This code will be turned on with the TWO options
DEVFS and SLICE. (see LINT)
Two labels PRE_DEVFS_SLICE and POST_DEVFS_SLICE will deliniate these changes.

/dev will be automatically mounted by init (thanks phk)
on bootup. See /sys/dev/slice/slice.4 for more info.
All code should act the same without these options enabled.

Mike Smith, Poul Henning Kamp, Soeren, and a few dozen others

This code does not support the following:
bad144 handling.
Persistance. (My head is still hurting from the last time we discussed this)
ATAPI flopies are not handled by the SLICE code yet.

When this code is running, all major numbers are arbitrary and COULD
be dynamically assigned. (this is not done, for POLA only)
Minor numbers for disk slices ARE arbitray and dynamically assigned.


# e8b4f186 06-Apr-1998 Peter Wemm <peter@FreeBSD.org>

add globals.s for data that is treated differently on SMP.


# 59088db3 23-Mar-1998 Peter Wemm <peter@FreeBSD.org>

si driver has changed microcode file locations.


# fdc021ba 10-Mar-1998 Julian Elischer <julian@FreeBSD.org>

Add EISA support for DPT drivers
Submitted by: Matthew Dodd
Reviewd by: shimon@simon-shapiro.org (DPT author)


# cb7cfa35 24-Feb-1998 Poul-Henning Kamp <phk@FreeBSD.org>

Add the smallest and least useful device-driver by a fair margin...


# 7ec73f64 20-Feb-1998 Poul-Henning Kamp <phk@FreeBSD.org>

Replace TOD clock code with more systematic approach.

Highlights:
* Simple model for underlying hardware.
* Hardware basis for timekeeping can be changed on the fly.
* Only one hardware clock responsible for TOD keeping.
* Provides a real nanotime() function.
* Time granularity: .232E-18 seconds.
* Frequency granularity: .238E-12 s/s
* Frequency adjustment is continuous in time.
* Less overhead for frequency adjustment.
* Improves xntpd performance.

Reviewed by: bde, bde, bde


# 1f98b2eb 18-Feb-1998 Mike Smith <msmith@FreeBSD.org>

Remove the 'qcam' driver. Development has ceased, and the driver is
nonfunctional.
Submitted by: pst (conversation some time ago)


# ea38cb7f 17-Feb-1998 Søren Schmidt <sos@FreeBSD.org>

Add 'wst" atapi tape devicefile.


# a397086e 15-Feb-1998 Peter Wemm <peter@FreeBSD.org>

Update to support SI/XIO PCI host cards (Z280 based) and the enhanced
SXISA and SXPCI host cards (Transputer based).

PR: 4836, 5021, 5654
Submitted by: Nick Sayer <nick@specialix.com>


# 3458e54a 26-Jan-1998 Julian Elischer <julian@FreeBSD.org>

Move DPT related options out of i386 specific files
so DPT devices can be used on other PCI (alpha?) machines.

Suggested by: several people


# b37c91fd 25-Jan-1998 Julian Elischer <julian@FreeBSD.org>

Add Simon Shapiro's DPT driver
this shouldn't break anything existing.
Userland utilities to follow.


# aaf86206 16-Jan-1998 Paul Traina <pst@FreeBSD.org>

Bring in IDE ATAPI floppy support.
This is Junichi's v1.0 driver.

NOTE: Major device numbers have been changed to avoid conflict with other
FreeBSD 3.0 devices. The new numbers should be considered "official."
This driver is still considered "beta" quality, although we have been
playing with it. Please submit bugs to junichi and myself.

Submitted by: junichi@astec.co.jp


# c8877437 15-Jan-1998 Justin T. Gibbs <gibbs@FreeBSD.org>

Add entry for i386/i386/busdma_machdep.c


# 6cc3943f 08-Jan-1998 John-Mark Gurney <jmg@FreeBSD.org>

update the AWE32 wave table driver to Iwai's 0.4.2c version. This also
includes the patches to make it work under -current from Randall Hopper.

Remove the old AWE driver.


# 95e5e988 05-Jan-1998 John Dyson <dyson@FreeBSD.org>

Make our v_usecount vnode reference count work identically to the
original BSD code. The association between the vnode and the vm_object
no longer includes reference counts. The major difference is that
vm_object's are no longer freed gratuitiously from the vnode, and so
once an object is created for the vnode, it will last as long as the
vnode does.

When a vnode object reference count is incremented, then the underlying
vnode reference count is incremented also. The two "objects" are now
more intimately related, and so the interactions are now much less
complex.

When vnodes are now normally placed onto the free queue with an object still
attached. The rundown of the object happens at vnode rundown time, and
happens with exactly the same filesystem semantics of the original VFS
code. There is absolutely no need for vnode_pager_uncache and other
travesties like that anymore.

A side-effect of these changes is that SMP locking should be much simpler,
the I/O copyin/copyout optimizations work, NFS should be more ponderable,
and further work on layered filesystems should be less frustrating, because
of the totally coherent management of the vnode objects and vnodes.

Please be careful with your system while running this code, but I would
greatly appreciate feedback as soon a reasonably possible.


# 5eaf45f6 12-Dec-1997 Peter Wemm <peter@FreeBSD.org>

I've been using these tweaks to enable the sound driver to talk to the
(mutant) Crystal CSS4236 chip on the Intel PR440FX SMP motherboard.

XXX this uses some rather ugly PnP bootstrap code that is *NOT* compatable
with 'controller pnp0' or *ANY* other PnP devices. If you use some other
PnP devices, enabling css0 will burn your house down. :-] The
"simplified" PnP init sequence directly blats your config(8) settings onto
the chip. I'm pretty sure 'css0' will conflict with 'mss0', this whole
area desperately needs a cleanup.

I have been using the following with some success on the PR440FX:
controller snd0
device css0 at isa? port 0x534 irq 5 drq 1 flags 0x08 vector adintr
device opl0 at isa? port 0x388
device mpu0 at isa? port 0x330 irq 10 vector mpuintr


# a1e9e308 08-Dec-1997 Jamil J. Weatherbee <jamil@FreeBSD.org>

add entry in LINT for alog driver
added line to files.i386 to compile in alog.c optionally as a driver


# 9e41c7c3 01-Dec-1997 Amancio Hasty <ahasty@FreeBSD.org>

Include sound_timer.c for mss device and added
sound_timer.c, opl3.c, ad1848.c, adlib_card.c to trix device.
trix is a driver for an AudioTrix Pro.


# 61ca8499 25-Nov-1997 Mark Murray <markm@FreeBSD.org>

From the author:

Here are the remanding changes required to support the Ensoniq
Soundscape using FreeBSD 3.0-current.

Notes:

1) ad1848_init already has code to detect if DMA_DUPLEX should
be set so it is not necessary (and is in fact a mistake) to
hard code setting it. Not all soundcards (i.e. the current
sscape driver) are capable of using DMA_DUPLEX.

2) The other changes are hopefully self explanatory. Feel free
to let me know if you need additional information.

Submitted by: john@feith.com (John Wehle)


# ebc1f80c 28-Oct-1997 Joerg Wunsch <joerg@FreeBSD.org>

Use the new "mandatory" keyword for the npx driver.


# 168bbc99 21-Sep-1997 Justin T. Gibbs <gibbs@FreeBSD.org>

Move the rules for aicasm to the MI conf file.


# c7406082 14-Sep-1997 John-Mark Gurney <jmg@FreeBSD.org>

docment the new sound drivers in LINT and add the necessary files to
files.i386.

We aren't sure if this new code and the old sound code will co-exist in a
kernel, so the device pcm0 line is left commented out in LINT.

Submitted-by: Luigi Rizzo


# 53a7a570 08-Sep-1997 John-Mark Gurney <jmg@FreeBSD.org>

add pnp device entries...


# c66dbc92 02-Sep-1997 Justin T. Gibbs <gibbs@FreeBSD.org>

Make the aic7xxx sequencer assembler compile in the kernel's object
directory. Rename (via repository copy) some files so that the potential
for future conflicts is minimized.

PR: conf/4363


# 5f073933 28-Aug-1997 Jonathan Lemon <jlemon@FreeBSD.org>

Remove the vm86 support as an LKM, and link it directly into the kernel
if 'options "VM86"' is in the config file. The LKM was really for
development, and has probably outlived its usefulness.


# 3b577e1f 27-Aug-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

Add entries for Comtrol Rocketport serial card.
Submitted by: Amir Farah <amir@comtrol.com>


# ab4c624b 14-Aug-1997 Mike Smith <msmith@FreeBSD.org>

Add support for the new Parallel-Port Bus and devices thereon.
Submitted by: Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>


# e2c77d85 01-Aug-1997 Mike Smith <msmith@FreeBSD.org>

Add new BIOS-related files.


# 8b8a0b53 28-Jul-1997 Søren Schmidt <sos@FreeBSD.org>

Add support for busmaster DMA on some PCI IDE chipsets.

I changed a few bits here and there, mainly renaming wd82371.c
to ide_pci.c now that it's supposed to handle different chipsets.

It runs on my P6 natoma board with two Maxtor drives, and also
on a Fujitsu machine I have at work with an Opti chipset and
a Quantum drive.

Submitted by:cgull@smoke.marlboro.vt.us <John Hood>

Original readme:

*** WARNING ***

This code has so far been tested on exactly one motherboard with two
identical drives known for their good DMA support.

This code, in the right circumstances, could corrupt data subtly,
silently, and invisibly, in much the same way that older PCI IDE
controllers do. It's ALPHA-quality code; there's one or two major
gaps in my understanding of PCI IDE still. Don't use this code on any
system with data that you care about; it's only good for hack boxes.
Expect that any data may be silently and randomly corrupted at any
moment. It's a disk driver. It has bugs. Disk drivers with bugs
munch data. It's a fact of life.

I also *STRONGLY* recommend getting a copy of your chipset's manual
and the ATA-2 or ATA-3 spec and making sure that timing modes on your
disk drives and IDE controller are being setup correctly by the BIOS--
because the driver makes only the lamest of attempts to do this just
now.

*** END WARNING ***

that said, i happen to think the code is working pretty well...

WHAT IT DOES:

this code adds support to the wd driver for bus mastering PCI IDE
controllers that follow the SFF-8038 standard. (all the bus mastering
PCI IDE controllers i've seen so far do follow this standard.) it
should provide busmastering on nearly any current P5 or P6 chipset,
specifically including any Intel chipset using one of the PIIX south
bridges-- this includes the '430FX, '430VX, '430HX, '430TX, '440LX,
and (i think) the Orion '450GX chipsets. specific support is also
included for the VIA Apollo VP-1 chipset, as it appears in the
relabeled "HXPro" incarnation seen on cheap US$70 taiwanese
motherboards (that's what's in my development machine). it works out
of the box on controllers that do DMA mode2; if my understanding is
correct, it'll probably work on Ultra-DMA33 controllers as well.
it'll probably work on busmastering IDE controllers in PCI slots, too,
but this is an area i am less sure about.

it cuts CPU usage considerably and improves drive performance
slightly. usable numbers are difficult to come by with existing
benchmark tools, but experimentation on my K5-P90 system, with VIA
VP-1 chipset and Quantum Fireball 1080 drives, shows that disk i/o on
raw partitions imposes perhaps 5% cpu load. cpu load during
filesystem i/o drops a lot, from near 100% to anywhere between 30% and
70%. (the improvement may not be as large on an Intel chipset; from
what i can tell, the VIA VP-1 may not be very efficient with PCI I/O.)
disk performance improves by 5% or 10% with these drives.

real, visible, end-user performance improvement on a single user
machine is about nil. :) a kernel compile was sped up by a whole three
seconds. it *does* feel a bit better-behaved when the system is
swapping heavily, but a better disk driver is not the fix for *that*
problem.

THE CODE:

this code is a patch to wd.c and wd82371.c, and associated header
files. it should be considered alpha code; more work needs to be
done.

wd.c has fairly clean patches to add calls to busmaster code, as
implemented in wd82371.c and potentially elsewhere (one could imagine,
say, a Mac having a different DMA controller).

wd82371.c has been considerably reworked: the wddma interface that it
presents has been changed (expect more changes), many bugs have been
fixed, a new internal interface has been added for supporting
different chipsets, and the PCI probe has been considerably extended.

the interface between wd82371.c and wd.c is still fairly clean, but
i'm not sure it's in the right place. there's a mess of issues around
ATA/ATAPI that need to be sorted out, including ATAPI support, CD-ROM
support, tape support, LS-120/Zip support, SFF-8038i DMA, UltraDMA,
PCI IDE controllers, bus probes, buggy controllers, controller timing
setup, drive timing setup, world peace and kitchen sinks. whatever
happens with all this and however it gets partitioned, it is fairly
clear that wd.c needs some significant rework-- probably a complete
rewrite.

timing setup on disk controllers is something i've entirely punted on.
on my development machine, it appears that the BIOS does at least some
of the necessary timing setup. i chose to restrict operation to
drives that are already configured for Mode4 PIO and Mode2 multiword
DMA, since the timing is essentially the same and many if not most
chipsets use the same control registers for DMA and PIO timing.

does anybody *know* whether BIOSes are required to do timing setup for
DMA modes on drives under their care?

error recovery is probably weak. early on in development, i was
getting drive errors induced by bugs in the driver; i used these to
flush out the worst of the bugs in the driver's error handling, but
problems may remain. i haven't got a drive with bad sectors i can
watch the driver flail on.

complaints about how wd82371.c has been reindented will be ignored
until the FreeBSD project has a real style policy, there is a
mechanism for individual authors to match it (indent flags or an emacs
c-mode or whatever), and it is enforced. if i'm going to use a source
style i don't like, it would help if i could figure out what it *is*
(style(9) is about half of a policy), and a way to reasonably
duplicate it. i ended up wasting a while trying to figure out what
the right thing to do was before deciding reformatting the whole thing
was the worst possible thing to do, except for all the other
possibilities.

i have maintained wd.c's indentation; that was not too hard,
fortunately.

TO INSTALL:

my dev box is freebsd 2.2.2 release. fortunately, wd.c is a living
fossil, and has diverged very little recently. included in this
tarball is a patch file, 'otherdiffs', for all files except wd82371.c,
my edited wd82371.c, a patch file, 'wd82371.c-diff-exact', against the
2.2.2 dist of 82371.c, and another patch file,
'wd82371.c-diff-whitespace', generated with diff -b (ignore
whitespace). most of you not using 2.2.2 will probably have to use
this last patchfile with 'patch --ignore-whitespace'. apply from the
kernel source tree root. as far as i can tell, this should apply
cleanly on anything from -current back to 2.2.2 and probably back to
2.2.0. you, the kernel hacker, can figure out what to do from here.
if you need more specific directions, you probably should not be
experimenting with this code yet.

to enable DMA support, set flag 0x2000 for that drive in your config
file or in userconfig, as you would the 32-bit-PIO flag. the driver
will then turn on DMA support if your drive and controller pass its
tests. it's a bit picky, probably. on discovering DMA mode failures
or disk errors or transfers that the DMA controller can't deal with,
the driver will fall back to PIO, so it is wise to setup the flags as
if PIO were still important.

'controller wdc0 at isa? port "IO_WD1" bio irq 14 flags 0xa0ffa0ff
vector wdintr' should work with nearly any PCI IDE controller.

i would *strongly* suggest booting single-user at first, and thrashing
the drive a bit while it's still mounted read-only. this should be
fairly safe, even if the driver goes completely out to lunch. it
might save you a reinstall.

one way to tell whether the driver is really using DMA is to check the
interrupt count during disk i/o with vmstat; DMA mode will add an
extremely low number of interrupts, as compared to even multi-sector
PIO.

boot -v will give you a copious register dump of timing-related info
on Intel and VIAtech chipsets, as well as PIO/DMA mode information on
all hard drives. refer to your ATA and chipset documentation to
interpret these.

WHAT I'D LIKE FROM YOU and THINGS TO TEST:

reports. success reports, failure reports, any kind of reports. :)
send them to cgull+ide@smoke.marlboro.vt.us.

i'd also like to see the kernel messages from various BIOSes (boot -v;
dmesg), along with info on the motherboard and BIOS on that machine.

i'm especially interested in reports on how this code works on the
various Intel chipsets, and whether the register dump works
correctly. i'm also interested in hearing about other chipsets.

i'm especially interested in hearing success/failure reports for PCI
IDE controllers on cards, such as CMD's or Promise's new busmastering
IDE controllers.

UltraDMA-33 reports.

interoperation with ATAPI peripherals-- FreeBSD doesn't work with my
old Hitachi IDE CDROM, so i can't tell if I've broken anything. :)

i'd especially like to hear how the drive copes in DMA operation on
drives with bad sectors. i haven't been able to find any such yet.

success/failure reports on older IDE drives with early support for DMA
modes-- those introduced between 1.5 and 3 years ago, typically
ranging from perhaps 400MB to 1.6GB.

failure reports on operation with more than one drive would be
appreciated. the driver was developed with two drives on one
controller, the worst-case situation, and has been tested with one
drive on each controller, but you never know...

any reports of messages from the driver during normal operation,
especially "reverting to PIO mode", or "dmaverify odd vaddr or length"
(the DMA controller is strongly halfword oriented, and i'm curious to
know if any FreeBSD usage actually needs misaligned transfers).

performance reports. beware that bonnie's CPU usage reporting is
useless for IDE drives; the best test i've found has been to run a
program that runs a spin loop at an idle priority and reports how many
iterations it manages, and even that sometimes produces numbers i
don't believe. performance reports of multi-drive operation are
especially interesting; my system cannot sustain full throughput on
two drives on separate controllers, but that may just be a lame
motherboard.

THINGS I'M STILL MISSING CLUE ON:

* who's responsible for configuring DMA timing modes on IDE drives?
the BIOS or the driver?

* is there a spec for dealing with Ultra-DMA extensions?

* are there any chipsets or with bugs relating to DMA transfer that
should be blacklisted?

* are there any ATA interfaces that use some other kind of DMA
controller in conjunction with standard ATA protocol?

FINAL NOTE:

after having looked at the ATA-3 spec, all i can say is, "it's ugly".
*especially* electrically. the IDE bus is best modeled as an
unterminated transmission line, these days.

for maximum reliability, keep your IDE cables as short as possible and
as few as possible. from what i can tell, most current chipsets have
both IDE ports wired into a single buss, to a greater or lesser
degree. using two cables means you double the length of this bus.

SCSI may have its warts, but at least the basic analog design of the
bus is still somewhat reasonable. IDE passed beyond the veil two
years ago.

--John Hood, cgull@smoke.marlboro.vt.us


# 38d8a113 25-Jul-1997 Poul-Henning Kamp <phk@FreeBSD.org>

Add option for compiling in a 8x16 font.


# 64ab5394 24-Jul-1997 Steve Passe <fsmp@FreeBSD.org>

Added a new SMP specific file: i386/i386/simplelock.s.
This code was split off from apic_ipl.s.
It contains the Lite2 lock manager primitives:
- s_lock_init()
- s_lock()
- s_lock_try()
- s_unlock()


# 1013a13d 29-Jun-1997 Bruce Evans <bde@FreeBSD.org>

Fixed the fix for not using -fomit-frame-pointer with -pg. The previous
fix stopped it being used in all cases, because substitution on unset
variables does not work.

When profiling, put -malign-functions=4 in CFLAGS instead of in PROF.
This fixes the histogram counts for profiling support functions. It
gives bogus but harmless extra alignment for genassym etc.


# 68352337 02-Jun-1997 Doug Rabson <dfr@FreeBSD.org>

Move interrupt handling code from isa.c to a new file. This should make
isa.c (slightly) more portable and will make my life developing the really
portable version much easier.

Reviewed by: peter, fsmp


# 20c776a5 01-Jun-1997 Bruce Evans <bde@FreeBSD.org>

Don't use -fomit-frame-pointer for ipl_funcs.c if ${PROF} is nonempty,
is incompatible with -pg. (We use a different version of mcount for
profiling frame-pointer-less assembler functions, but gcc doesn't know
about this.)

Added a missing dependency.

Cleaned up trailing backslashes.

Added comment about config's limitations/bugs handling dependencies and
backslashe/newlines.

Finished removing support for isdn drivers.


# f5d66b9b 31-May-1997 Peter Wemm <peter@FreeBSD.org>

specify compile-with option to get -fomit-frame-pointer on ipl_funcs.c


# 49c6ff7d 31-May-1997 Peter Wemm <peter@FreeBSD.org>

add ipl_funcs.c (Hmm.. should probably use a "compile-with" arg rather
than a Makefile.i386 hook)


# 98d46ad0 22-May-1997 Mike Smith <msmith@FreeBSD.org>

Add the 'wl' ISA Wavelan driver.
Obtained from: Jim Binkley <jrb@cs.pdx.edu>


# 477a642c 26-Apr-1997 Peter Wemm <peter@FreeBSD.org>

Man the liferafts! Here comes the long awaited SMP -> -current merge!

There are various options documented in i386/conf/LINT, there is more to
come over the next few days.

The kernel should run pretty much "as before" without the options to
activate SMP mode.

There are a handful of known "loose ends" that need to be fixed, but
have been put off since the SMP kernel is in a moderately good condition
at the moment.

This commit is the result of the tinkering and testing over the last 14
months by many people. A special thanks to Steve Passe for implementing
the APIC code!


# c1aa7eb5 13-Apr-1997 Justin T. Gibbs <gibbs@FreeBSD.org>

GENERIC, LINT:
Add an ie entry that corresponds to the location the old ix entry used
to probe and kill the ix entry.

files.i386:
Remove entries for the ix driver.


# d9866739 02-Apr-1997 Justin T. Gibbs <gibbs@FreeBSD.org>

make obj before building the aic7xxx assembler. This puts the object
files in the right place.

The clean rule still isn't quite right since currently config doesn't
allow the specification of arbitrary clean rules.


# 4c024bbd 22-Mar-1997 KATO Takenori <kato@FreeBSD.org>

Improved CPU identification and initialization routines. This
supports All Cyrix CPUs, IBM Blue Lightning CPU and NexGen (now AMD)
Nx586 CPU, and initialize special registers of Cyrix CPU and msr of
IBM Blue Lightning CPU.

If revision of Cyrix 6x86 CPU < 2.7, CPU cache is enabled in
write-through mode. This can be disabled by kernel configuration
options.

Reviewed by: Bruce Evans <bde@freebsd.org> and
Jordan K. Hubbard <jkh@freebsd.org>


# 54c4d306 16-Mar-1997 Bruce Evans <bde@FreeBSD.org>

Fixed broken line continuation in the previous revision. Config apparently
has buggy backslash-newline handling. Avoid it by using whitespace before
backslash-newline.


# 8733b9a7 16-Mar-1997 Justin T. Gibbs <gibbs@FreeBSD.org>

Adapt build rules to new aic7xxx seqeuncer assembler.


# a30c77e8 10-Mar-1997 Mark Murray <markm@FreeBSD.org>

Move this files* entry for the Brooktree TV driver toi the right 'files*'.


# 51e053d6 09-Mar-1997 Mark Murray <markm@FreeBSD.org>

Initial import of the Brooktree PCI-TV drivers. I have not tested
these, they may not even compile. I am importing them on behalf
of the submitters.
Submitted by: amancio, smp


# 6875d254 22-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.


# e4107dcf 17-Jan-1997 Joerg Wunsch <joerg@FreeBSD.org>

This mega-merge brings Matt Thomas' 960801 FDDI driver (almost) up
to -current.

Thanks goes to Ulrike Nitzsche <ulrike@ifw-dresden.de> for giving me
a chance to test this. Only the PCI driver is tested though.

One final patch will follow in a separate commit. This is so that
everything up to here can be dragged into 2.2, if we decide so.

Reviewed by: joerg
Submitted by: Matt Thomas <matt@3am-software.com>


# 3b204261 15-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

Add the ex driver (Intel EtherExpress Pro/10).

I have no idea if this works since I don't have one of the cards to test.
I also don't know what the LINT and GENERIC entries should look like,
so I just made up some values for now and left them commented out.
Someone who knows the factory settings for a Pro/10, please contact me!

Submitted-By: Javier Martín Rueda <jmrueda@diatel.upm.es>


# b6b9dfa1 15-Jan-1997 Søren Schmidt <sos@FreeBSD.org>

Upgrade the kbdio rutines to provide queued kbd & mouse events.
Minor other updates to syscons by me.

Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>


# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 31461d3a 24-Nov-1996 Peter Wemm <peter@FreeBSD.org>

Back out my previous change here. aic7xxx_asm is only a stdio program
that runs in the host's build environment, not the kernel's environment.


# 2fa4e5a7 21-Nov-1996 Peter Wemm <peter@FreeBSD.org>

Set a more explicit #include path for building aix7xxx_asm, otherwise it
uses /usr/include/sys/*, which may point to a different build tree. I'm
not sure that this is necessary, but there was a question mark over what
/usr/include/sys points to when building the "user mode" binaries in the
kernel code, especially when building the smp tree.

I suspect that the "right" line here is to use ${INCLUDES}, but that
causes warnings about unused static inline functions in stdio.h and ctype.h


# 431995f1 15-Nov-1996 Jordan K. Hubbard <jkh@FreeBSD.org>

This is the new AWE32 driver, with support for the AWE32's fancy MIDI
synthesizer. The utilities for this will appear as port submissions soon
afterwards, according to the submitter.

Submitted-By: Randall Hopper <rhh@ct.picker.com>
Written-By: Takashi Iwai <iwai@dragon.mm.t.u-tokyo.ac.jp>


# 6a90d975 14-Nov-1996 Søren Schmidt <sos@FreeBSD.org>

Finally a start at sharing the kdb controller routines between
syscons and psm, curtesy Kazutaka Yokota with minor changes by
me. This contains an update of the psm driver as well.
This also fixes the breakage that I introduced to the psm driver by
making syscons poll for keyboard events in the atempt to fix the
hanging keyboard problem.

It works perfectly for me, and I'd like to hear from all that
have had keyboard/ps/2 mouse problems if this is the cure...

Submitted by: Kazutaka YOKOTA (yokota@zodiac.mech.utsunomiya-u.ac.jp)


# aebd5646 06-Nov-1996 Bruce Evans <bde@FreeBSD.org>

Compile linux_genassym with the same options as genassym. ${PARAM} and
- were missingUKERNEL. This was harmless until I declared the kernel's
main().


# b3ac88f1 04-Nov-1996 Guido van Rooij <guido@FreeBSD.org>

New vx driver for:

3COM 3C590 Etherlink III PCI,
3COM 3C595 Fast Etherlink PCI,
3COM 3C592 Etherlink III EISA,
3COM 3C590 Fast Etherlink EISA,
3COM 3C900 Etherlink XL PCI and
3COM 3C905 Fast Etherlink XL PCI.

This driver is based on OpenBSD's driver. I modified it to run under FreeBSd
and made it actually work usefully.
Afterwards, nao@tom-yam.or.jp (HAMADA Naoki) added EISA support as well as
early support for 3C900 Etherlink XL PCI and 3C905 Fast Etherlink XL PCI.
He also split up the driver in a bus independant and bus dependant parts.

Especially the 3c59X support should be pretty stable now.

Submitted by: partly nao@tom-yam.or.jp (HAMADA Naoki)
Obtained from:partly OpenBSD


# d6b9e17e 17-Oct-1996 Bruce Evans <bde@FreeBSD.org>

Improved non-statistical (GUPROF) profiling:
- use a more accurate and more efficient method of compensating for
overheads. The old method counted too much time against leaf
functions.
- normally use the Pentium timestamp counter if available.
On Pentiums, the times are now accurate to within a couple of cpu
clock cycles per function call in the (unlikely) event that there
are no cache misses in or caused by the profiling code.
- optionally use an arbitrary Pentium event counter if available.
- optionally regress to using the i8254 counter.
- scaled the i8254 counter by a factor of 128. Now the i8254 counters
overflow slightly faster than the TSC counters for a 150MHz Pentium :-)
(after about 16 seconds). This is to avoid fractional overheads.

files.i386:
permon.c temporarily has to be classified as a profiling-routine
because a couple of functions in it may be called from profiling code.

options.i386:
- I586_CTR_GUPROF is currently unused (oops).
- I586_PMC_GUPROF should be something like 0x70000 to enable (but not
use unless prof_machdep.c is changed) support for Pentium event
counters. 7 is a control mode and the counter number 0 is somewhere
in the 0000 bits (see perfmon.h for the encoding).

profile.h:
- added declarations.
- cleaned up separation of user mode declarations.

prof_machdep.c:
Mostly clock-select changes. The default clock can be changed by
editing kmem. There should be a sysctl for this.

subr_prof.c:
- added copyright.
- calibrate overheads for the new method.
- documented new method.
- fixed races and and machine dependencies in start/stop code.

mcount.c:
Use the new overhead compensation method.

gmon.h:
- changed GPROF4 counter type from unsigned to int. Oops, this should
be machine-dependent and/or int32_t.
- reorganized overhead counters.

Submitted by: Pentium event counter changes mostly by wollman


# 96fc6efb 11-Sep-1996 Poul-Henning Kamp <phk@FreeBSD.org>

Make userconfig two (default: on) options:
USERCONFIG to enable
VISUAL_USERCONFIG to get the gui stuff too.
Requested by: pst


# f8f0b479 27-Aug-1996 Paul Traina <pst@FreeBSD.org>

Support for GDB remote debug protocol.

Sponsored by: Juniper Networks, Inc. <pst@jnx.com>


# b184bc75 08-Jul-1996 Garrett Wollman <wollman@FreeBSD.org>

Fix something that's been bugging me for a long time: move the CPU
type identification code out of machdep.c and into a new file of its
own. Hopefully other grot can be moved out of machdep.c as well
(by other people) into more descriptively-named files.


# d805b866 05-Jul-1996 John Hay <jhay@FreeBSD.org>

This driver supports the SDL Communications RISCom/N2 ISA cards that is
based on the HD64570 chip. Both the 1 and 2 port cards is supported.

Line speeds of up to 2Mbps is possible. At this speed about 95% of the
bandwidth is usable with 486DX processors.

The standard FreeBSD sppp code is used for the link level layer. The
default protocol used is PPP. The Cisco HDLC protocol can be used by
adding "link2" to the ifconfig line in /etc/sysconfig or where ever
ifconfig is run.

At the moment only the X.21 interface is tested. The others may need
tweaks to the clock selection code.


# 3b17c1c3 07-Jun-1996 Nate Williams <nate@FreeBSD.org>

Added index as a 'standard' file. It could be added as 'optional' for
ibcs2, but I felt it might be useful in other code as well at a later
point.


# 98eba672 04-May-1996 Peter Wemm <peter@FreeBSD.org>

Add stl and stli drivers for the Stallion cards.


# f3e002a8 02-May-1996 Poul-Henning Kamp <phk@FreeBSD.org>

Rename the very bogus indeed option "LINUX" to "COMPAT_LINUX".
I can only presume that the brain behind this have never seen code
that says "#ifdef LINUX" :-(


# 98189b75 29-Mar-1996 Bruce Evans <bde@FreeBSD.org>

Removed references to nonexistent files.


# d69e8502 26-Mar-1996 Garrett Wollman <wollman@FreeBSD.org>

Add support for Pentium and Pentium Pro performance counters.
(This code is as yet untested; to come after man page is written.)
This also adds inlines to cpufunc.h for the RDTSC, RDMSR, WRMSR, and RDPMC
instructions. The user-mode interface is via a subdevice of mem.c;
there is also a kernel-size interface which might be used to aid
profiling.


# a8b0a554 15-Mar-1996 Peter Wemm <peter@FreeBSD.org>

Add "linux_assym.h" as a dependency for linux_locore.o when compiling
the kernel with the linux emulator statically configured (options LINUX)

Problem noticed by: Brian Litzinger


# d66a5066 02-Mar-1996 Peter Wemm <peter@FreeBSD.org>

Mega-commit for Linux emulator update.. This has been stress tested under
netscape-2.0 for Linux running all the Java stuff. The scrollbars are now
working, at least on my machine. (whew! :-)

I'm uncomfortable with the size of this commit, but it's too
inter-dependant to easily seperate out.

The main changes:

COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386
machine dependent section into the linux emulator itself. The int 0x80
syscall code was almost identical to the lcall 7,0 code and a minor tweak
allows them to both be used with the same C code. All kernels can now
just modload the lkm and it'll DTRT without having to rebuild the kernel
first. Like IBCS2, you can statically compile it in with "options LINUX".

A pile of new syscalls implemented, including getdents(), llseek(),
readv(), writev(), msync(), personality(). The Linux-ELF libraries want
to use some of these.

linux_select() now obeys Linux semantics, ie: returns the time remaining
of the timeout value rather than leaving it the original value.

Quite a few bugs removed, including incorrect arguments being used in
syscalls.. eg: mixups between passing the sigset as an int, vs passing
it as a pointer and doing a copyin(), missing return values, unhandled
cases, SIOC* ioctls, etc.

The build for the code has changed. i386/conf/files now knows how
to build linux_genassym and generate linux_assym.h on the fly.

Supporting changes elsewhere in the kernel:

The user-mode signal trampoline has moved from the U area to immediately
below the top of the stack (below PS_STRINGS). This allows the different
binary emulations to have their own signal trampoline code (which gets rid
of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so
that the emulator can provide the exact "struct sigcontext *" argument to
the program's signal handlers.

The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which
have the same values as the re-used SA_DISABLE and SA_ONSTACK which are
intended for sigaction only. This enables the support of a SA_RESETHAND
flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal
semantics where the signal handler is reset when it's triggered.

makesyscalls.sh no longer appends the struct sysentvec on the end of the
generated init_sysent.c code. It's a lot saner to have it in a seperate
file rather than trying to update the structure inside the awk script. :-)

At exec time, the dozen bytes or so of signal trampoline code are copied
to the top of the user's stack, rather than obtaining the trampoline code
the old way by getting a clone of the parent's user area. This allows
Linux and native binaries to freely exec each other without getting
trampolines mixed up.


# 9d2baf5c 01-Mar-1996 Paul Traina <pst@FreeBSD.org>

Update the Connectix QuickCam driver to match my current work.
- split driver into FreeBSD specific and camera specific portions
(qcamio.c can run in user mode, with a Linux "driver top" etc,
and qcam.c should be trivial to port to NetBSD and BSDI.)
- support for 4bppand bidirectional transfers working better
- start of interleaved data-transfers byte-stream decodes (some of this
stuff has been pulled out for the moment to make it easier to debug)

At this point, anyone who wants to port it to other platforms should feel
free to do so. Please feed changes directly back to me so that I can produce
a unified distribution.


# de0d93f5 25-Feb-1996 Justin T. Gibbs <gibbs@FreeBSD.org>

Add i386/eisa/3c5x9.c, the eisaconf probe for the 3Com 3c579 and the
3c509 when in eisa configuration mode.


# 4cf62360 01-Feb-1996 Paul Traina <pst@FreeBSD.org>

Add in hooks for quickcam driver


# 5dec5a00 28-Jan-1996 Garrett Wollman <wollman@FreeBSD.org>

Implement a prototype interface to bus-master IDE DMA on the Triton
chipset. This does not attempt to do anything special with the timing
on the hope that the BIOS will have done the right thing already. The
actual interface from the wd driver to the new facility is not
implemented yet (this commit being an attempt at prodding someone else
to do it because looking at the wd driver always confuses the h*** out of me).


# 15309069 24-Jan-1996 Peter Wemm <peter@FreeBSD.org>

procfs_machdep.c is now shared with ptrace as well. It is now no longer
optional.


# 2898c294 15-Jan-1996 Poul-Henning Kamp <phk@FreeBSD.org>

Make bin2bcd and bcd2bin global macroes instead of having local
implementations all over the place.


# cc4f672c 02-Jan-1996 Justin T. Gibbs <gibbs@FreeBSD.org>

The long awaited stability patch set for the aic7xxx driver:

aic7xxx.seq and aic7xxx.c depend on aic7xx_reg.h


# 912e6037 29-Dec-1995 Bruce Evans <bde@FreeBSD.org>

Implemented non-statistical kernel profiling. This is based on
looking at a high resolution clock for each of the following events:
function call, function return, interrupt entry, interrupt exit,
and interesting branches. The differences between the times of
these events are added at appropriate places in a ordinary histogram
(as if very fast statistical profiling sampled the pc at those
places) so that ordinary gprof can be used to analyze the times.

gmon.h:
Histogram counters need to be 4 bytes for microsecond resolutions.
They will need to be larger for the 586 clock.
The comments were vax-centric and wrong even on vaxes. Does anyone
disagree?

gprof4.c:
The standard gprof should support counters of all integral sizes
and the size of the counter should be in the gmon header. This
hack will do until then. (Use gprof4 -u to examine the results
of non-statistical profiling.)

config/*:
Non-statistical profiling is configured with `config -pp'.
`config -p' still gives ordinary profiling.

kgmon/*:
Non-statistical profiling is enabled with `kgmon -B'. `kgmon -b'
still enables ordinary profiling (and distables non-statistical
profiling) if non-statistical profiling is configured.


# 62394a63 26-Dec-1995 Bruce Evans <bde@FreeBSD.org>

Removed almost all traces of libkern.a. The objects that were in
libkern.a are now specified by listing their source files in
files.${MACHINE}. The list is machine-dependent to save space.
All the necessary object for each machine must be linked into the
kernel in case an lkm wants one.


# 337e9f0b 25-Dec-1995 Bruce Evans <bde@FreeBSD.org>

Renamed isa/random.c to isa/random_machdep.c to avoid a conflict with
libkern/random.c.


# 1dfcbb0c 21-Dec-1995 Julian Elischer <julian@FreeBSD.org>

i386/i386/conf.c is no longer needed.. remove it from files.i386
redistribute a few last routines to beter places and shoot the file

I haven't act actually 'deleted' the file yet togive people time
to
have done a config.. I.e. they are likely to have done one in a week or so
so I'll remove it then..
it's now empty.
makes the question of a USL copyright rather moot.


# b1529bda 14-Dec-1995 Peter Wemm <peter@FreeBSD.org>

GENERIC/LINT: Remove redundant quoting on some option lines.
LINT: add a couple of new/missing/undocumented options
files.i386: add linux code so that you can compile a kernel with static
linux emulation ("options LINUX")
i386/*: use #if defined(COMPAT_LINUX) || defined(LINUX) to enable static
support of linux emulation (just like "IBCS2" makes ibcs2 static)

The main thing this is going to make obvious, is that the LINUX code
(when compiled from LINT) has a lot of warnings, some of which dont look
too pleasant..


# a1d01daf 12-Dec-1995 Justin T. Gibbs <gibbs@FreeBSD.org>

Have bt0 entry specify "bt_isa_intr" for its vector. This one entry will
allow one EISA/ISA/PCI/VL Buslogic controller to be probed. The driver
is almost fully dynamic. It just needs some kdc work and for the SCSI code
to stop passing unit numbers up in the scsi_xfer struct.


# e7c234a1 20-Nov-1995 Peter Wemm <peter@FreeBSD.org>

Add and document the hooks for John Hay's Arnet sync driver...


# 41e7c9b7 17-Nov-1995 Bruce Evans <bde@FreeBSD.org>

Restored the device-driverness off wd.c. It got lost when wdc was
introduced.
Fixed the device-driverness of atapi.c and spkr.c.

These changes are actually no-ops because ${DRIVER_C} is the same as
${NORMAL_C} for the i386. I could do without magic CFLAGS. Special
handling should be in the sources if possible.


# 3501ce6d 09-Nov-1995 Justin T. Gibbs <gibbs@FreeBSD.org>

Convert Adaptec 1742 driver to new eisaconf interface.


# a20c1076 04-Nov-1995 Justin T. Gibbs <gibbs@FreeBSD.org>

Move aic7770.c to i386/eisa. It is the first driver to use the new eisaconf.


# dc9deb29 31-Oct-1995 Poul-Henning Kamp <phk@FreeBSD.org>

Get pccard stuff into LINT.
rename i386/isa/pcic.c to .../pcicx.c
this file will go away when the if_ze and if_zp dies.


# 1bb2d314 28-Oct-1995 Mark Murray <markm@FreeBSD.org>

Theodore Ts'po's random number gernerator for Linux, ported by me.
This code will only be included in your kernel if you have
'options DEVRANDOM', but that will fall away in a couple of days.
Obtained from: Theodore Ts'o, Linux


# 6a461b22 10-Oct-1995 Steven Wallace <swallace@FreeBSD.org>

Update files list to include new ibcs2 files needed to compile.


# 191e1a59 16-Sep-1995 Bruce Evans <bde@FreeBSD.org>

Remove transitory labelling code. Labels are now handled by essentially
the original 4.4lite code. Machine Specific Partitions are now handled
separately.


# a800f455 07-Sep-1995 Julian Elischer <julian@FreeBSD.org>

Submitted by: Luigi Rizzo (luigi@iet.unipi.it)
Obtained from: Luigi Rizzo and Gunther Schadow
config support for the asc driver and an example in LINT


# ad1472b2 07-Sep-1995 Steven Wallace <swallace@FreeBSD.org>

Change atapi.c to depend on the ATAPI option.
Add wd.c entry based on the wdc controller.
This will enable compilation of wcd device without wd.


# a50cd483 03-Sep-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

Bring the Digiboard driver (ALPHA version) into -current. Includes
latest patches for PC/Xe boards.
Submitted by: "Serge A. Babkin" <babkin@hq.icb.chel.su>


# d1a599c2 01-Sep-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

Something got spammed in my 2.2 work tree (don't know how :( ) and
had a 2.1 tag, thus sending these two changes into the 2.1 branch instead
of -current. Argh. I may bring these changes into the 2.1 anyway (they're
benign there) so I'm not going to admin them out of 2.1 for the time
being.


# 6788ce49 18-Aug-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

Bring in Serge Vakulenko's IDE CDROM (ATAPI) driver. A number of
people have now indicated to me that it's working more than well
enough to bring into -current.
Submitted by: Serge Vakulenko <vak@cronyx.ru>


# 958c15a0 05-Aug-1995 Peter Wemm <peter@FreeBSD.org>

Grab next major (68) for the Specialix SI/XIO driver which is due to
come in RSN. As Jordan said "First in, first served.."


# 550eed9c 28-Jul-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

Support for voxware 3.05.
Submitted by: Amancio Hasty and Jim Lowe


# d348ccec 22-Jul-1995 Bruce Evans <bde@FreeBSD.org>

Fix clean rule for aic7xxx_asm.


# cfb59727 20-Jul-1995 Paul Traina <pst@FreeBSD.org>

Remove vat_audio driver support


# 62f23575 04-Jul-1995 Justin T. Gibbs <gibbs@FreeBSD.org>

Add entry for i386/scsi/93cx6.c, the file that handles serial eeprom
routines for the aic7xxx driver. If and when other drivers start
to access similar serial eeproms, this file should probably be moved.


# 657e73c4 27-Apr-1995 Peter Dufault <dufault@FreeBSD.org>

Add National Instruments "LabPC" driver


# 1a7c583c 23-Apr-1995 Garrett Wollman <wollman@FreeBSD.org>

Substantially clean up LINT and add `fe'.


# fc5f6d13 23-Apr-1995 Julian Elischer <julian@FreeBSD.org>

include new files for EISA configuration


# c5874058 15-Apr-1995 Justin T. Gibbs <gibbs@FreeBSD.org>

Have the aic7xxx build rules point at the sequencer's new location.


# 08d5844c 09-Apr-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

This is the new submission of the matcd driver. In addition to the
new driver code, there are diffs to several other existing files
on the system and a man page.

This version of matcd implements the rest of the key ioctls related to
playing audio CDs and reading table of contents information from any
type of disc.

This update also corrects several problems detected since the original
version 1(10) was released. These include:
1. Jordons report on the kernel -c string problem.
2. A problem with the driver being confused by other types of
devices located at addresses it probes.
3. An old CD TOC wouldn't always be cleared after a disc change.
4. Cleaned up code so -Wall yields no warnings on 2.0 and later.
5. A problem with drive getting out of sync with the driver when
changing between CD-Data and CD-DA.

There have only been two reports from the field relating to problems
so either the first release isn't really being used or doesn't have
many problems.

If there are any problems with this submission, please let me know.

Submitted by: Frank Durda IV <uhclem%nemesis@fw.ast.com>


# 12cfa436 08-Apr-1995 Poul-Henning Kamp <phk@FreeBSD.org>

Added the "eg0" interface driver for the 3Com "3c505" or "etherlink/+"
card. This is the braindamaged card with the 80186 CPU on it. It is
slow, probably not very good after all, but hey, if you have one lying
around doing nothing anyway...

Added the "zp0" driver to GENERIC.


# 18dbbebe 27-Mar-1995 Andrey A. Chernov <ache@FreeBSD.org>

Add hooks for upcoming riscom/8 driver


# d9d53701 24-Mar-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

scd driver now lives in non-GPL land.


# 3bf0c362 16-Mar-1995 Bruce Evans <bde@FreeBSD.org>

Remove isa/prof_machdep.c. It doesn't exist yet.


# 12fd0853 12-Mar-1995 Steven Wallace <swallace@FreeBSD.org>

Remove old snd file configuration list and add new file list
for the snd controller and the different sound devices.

Update LINT to include all sound device drivers using new format.

Reviewed by: wollman


# edf16d15 07-Mar-1995 Søren Schmidt <sos@FreeBSD.org>

Added ata.c device driver file.

Just so I don't have to repatch files.i386 again & again...


# 3c034efc 02-Mar-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

Finish the matcd import. My face is red.


# 0bf316f5 01-Mar-1995 Justin T. Gibbs <gibbs@FreeBSD.org>

Fix "dependency" spelling error. Implement "clean" entries for device
config entries. Add clean rules to aic7xxx and aic7xxx_seq.h.

Submitted by: Pointed out by Bruce Evans <bde@zeta.org.au>


# 226d4c89 23-Feb-1995 Bruce Evans <bde@FreeBSD.org>

Make diskslice files standard and remove option DISKSLICE. ufs_disksubr.c
needed a diskslice function yesterday and all disk drivers will need it.
The diskslice initialization routine should be configurable (but isn't).


# 94a7cbb03 17-Feb-1995 Bruce Evans <bde@FreeBSD.org>

Restore alphabetical order (except gnu is last).


# 648c711b 16-Feb-1995 Poul-Henning Kamp <phk@FreeBSD.org>

This is the latest version of the APM stuff from HOSOKAWA, I have looked
briefly over it, and see some serious architectural issues in this stuff.

On the other hand, I doubt that we will have any solution to these issues
before 2.1, so we might as well leave this in.

Most of the stuff is bracketed by #ifdef's so it shouldn't matter too much
in the normal case.

Reviewed by: phk
Submitted by: HOSOKAWA, Tatsumi <hosokawa@mt.cs.keio.ac.jp>


# 53c1e538 14-Feb-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

Add the ISDN entries


# f0dbdbbf 14-Feb-1995 Poul-Henning Kamp <phk@FreeBSD.org>

Jordan forgot to move the scd in this file.


# 6469abd9 10-Feb-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

Remove dead sound blaster driver entry.


# cfc9f621 09-Feb-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

Add the Cyclades serial driver code (ALPHA) from Andrew Werple and
adapted to FreeBSD by Heikki Suonsivu <hsu@cs.hut.fi>.
Submitted by: Andrew Werple <andrew@werple.apana.org.au> and
Heikki Suonsivu <hsu@cs.hut.fi>
Obtained from: NetBSD


# 2cd01159 06-Feb-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

The very minimum driver required to support a Video Spigot. See the
copyright notices in the code for information on where to go to pick
up additional useful bits.
Submitted by: Jim Lowe <james@blatz.cs.uwm.edu>


# 70008bb1 01-Feb-1995 Stefan Eßer <se@FreeBSD.org>

Reviewed by: se
Submitted by: wolf (Wolfgang Stanglmeier)
Most PCI specific files moved from sys/i386/pci to sys/pci.
One PC specific file (pcibus.c) new in sys/i386/isa.


# 2e97cbe1 27-Jan-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

Tweak the location of the scd driver.


# e05407d8 27-Jan-1995 Poul-Henning Kamp <phk@FreeBSD.org>

New and far better NCR5380/NCR53400 scsi-driver.

Handles at least Trantor T130 and ProAudioSpectrum adapters.
The pas driver has consequently been removed.
This driver can be configured without without interrupts.

Manpage to follow when PAS16 has been edited in.

Reviewed by: phk
Submitted by: Serge Vakulenko, <vak@cronyx.ru>


# 2270d534 25-Jan-1995 Jean-Marc Zucconi <jmz@FreeBSD.org>

Add entry for the joystick driver


# 3691d2b9 22-Jan-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

Add support for Olof Johansson's WD7000 driver.
Submitted by: Olof Johansson <offe@ludd.luth.se>
Obtained from:


# b6b99cab 12-Jan-1995 Justin T. Gibbs <gibbs@FreeBSD.org>

Point dependancy to i386/scsi


# 451ab98f 12-Jan-1995 Justin T. Gibbs <gibbs@FreeBSD.org>

Add in aic7770.c (EISA/VL Adaptors) and aic7870.c (PCI adaptor) dependancies
for the ahc driver.


# c5d5269f 12-Jan-1995 Ugen J.S. Antsilevich <ugen@FreeBSD.org>

here ip_fw.c lived once..correct me if i am wrong but
i think it shopuld be in conf/files


# 2f6df264 07-Jan-1995 Jordan K. Hubbard <jkh@FreeBSD.org>

Gunther Schadow <gusw@fub46.zedat.fu-berlin.de>'s
driver for the Genius GS-4500 hand scanner.
Submitted by: gusw@fub46.zedat.fu-berlin.de


# 58e4304e 31-Dec-1994 Justin T. Gibbs <gibbs@FreeBSD.org>

Handle the aic7770 driver's dependancies correctly.

YOU MUST REBUILD CONFIG.


# 8c2f8d06 25-Dec-1994 Andreas Schulz <ats@FreeBSD.org>

Correct the devices.i386 for the major numbers. 8 was already used now
by the lkm driver, so put scd and pcd to the numbers they have now
in i386/conf.c.
Add the pcd.c file for the panasonic driver in files.i386.


# cdf25f37 17-Dec-1994 Jordan K. Hubbard <jkh@FreeBSD.org>

Add Fred Cawthorne's GPIB driver.
Submitted by: fcawth@delphi.umd.edu


# d98a0992 11-Dec-1994 Bruce Evans <bde@FreeBSD.org>

Add i386/isa/diskslice_machdep.c. This will eventually replace readMBR.c.
Sort.


# 83401efa 02-Dec-1994 Garrett Wollman <wollman@FreeBSD.org>

Add Cronyx/Sigma files and config information; delete outdated config files.


# b0c8ba6f 18-Nov-1994 Justin T. Gibbs <gibbs@FreeBSD.org>

Never but never have a bad hair day and go to the movies.

Go to a single dependancy in files.i386. Using a .c file for the
sequencer code won't work since I need to know the size of the program,
so we just include the generated .h file as:
"../../sys/gnu/misc/aic7770/aic7770_seq.h"
Reviewed by:
Submitted by:
Obtained from:


# a32a00c3 18-Nov-1994 Jordan K. Hubbard <jkh@FreeBSD.org>

aha2742.c was bogus - use aic7770.c instead.
Submitted by: gibbs


# 63286762 18-Nov-1994 Jordan K. Hubbard <jkh@FreeBSD.org>

Totally gut this thing and just use a precompiled gnu/misc/aha274x_seq.c
instead. The entire scheme just doesn't work as envisioned (hint: think
about make depend as well as all). Those extremely rare individuals who
actually hack on the sequencer code will know how to keep stuff in sync,
I *do* get the feeling!


# cbb8b164 17-Nov-1994 Justin T. Gibbs <gibbs@FreeBSD.org>

New device-driver entries for the aic7770 driver. These use new features
of config so YOU MUST RECOMPILE CONFIG. Modifying config was the cleanest
solution to integrating this driver into the tree which will become more
obvious in the next commit.


# b851eb15 03-Nov-1994 Jordan K. Hubbard <jkh@FreeBSD.org>

Eliminate USERCONFIG. This option is now standard.


# 5ea2be93 31-Oct-1994 Paul Traina <pst@FreeBSD.org>

Add kernel hooks for /dev/vatio -- a minimalistic BSD audio driver emulator
created by Amancio Hasty (specificly, this, in conjunction with his sound
driver mods for dual-mode DMA will allow VAT compiled for BSD/386 1.1 to
run under FreeBSD 2.x.)


# 100ba1a6 28-Oct-1994 Jordan K. Hubbard <jkh@FreeBSD.org>

IP Firewall code from Daniel Boulet and J.S.Antsilevich
Submitted by: danny ugen


# 54c7241b 27-Oct-1994 Jordan K. Hubbard <jkh@FreeBSD.org>

Julian Elischer's disklabel fixes.


# 8d8aa3c3 26-Oct-1994 Jordan K. Hubbard <jkh@FreeBSD.org>

Add userconfig.


# 5411ea9d 13-Oct-1994 Søren Schmidt <sos@FreeBSD.org>

Added ibcs2_socksys file.


# 8f7b2bb2 11-Oct-1994 Stefan Eßer <se@FreeBSD.org>

Name change: pci_intel.c -> pcisupport.c


# fae772f7 01-Oct-1994 David Greenman <dg@FreeBSD.org>

Added Cortex-I Frame Grabber by Paul S. LaFollette, Jr.

Submitted by: Paul S. LaFollette, Jr.


# 22414e53 30-Sep-1994 David Greenman <dg@FreeBSD.org>

Laptop Advanced Power Management support by HOSOKAWA Tatsumi.

Submitted by: HOSOKAWA Tatsumi


# 7f4295e3 30-Sep-1994 Steven Wallace <swallace@FreeBSD.org>

add new sound files to kernel config file list


# 31208007 26-Sep-1994 Jordan K. Hubbard <jkh@FreeBSD.org>

Jim Babb's port of the AIC6360 code.
Submitted by: babb
Obtained from: NetBSD


# db814a26 20-Sep-1994 Jordan K. Hubbard <jkh@FreeBSD.org>

Add entries for transputer driver.
Reviewed by: jkh
Submitted by: luigi


# 2c2006d8 11-Sep-1994 Andreas Schulz <ats@FreeBSD.org>

Deleted the pccons driver from the files.i386, added the seagate driver
into files.i386.
LINT:
Deleted the timezone line. Commented out the maxfdescs line and the
SYSVSHM and the SHMMAXPGS lines.


# e579efa2 06-Sep-1994 Stefan Eßer <se@FreeBSD.org>

Reviewed by: Stefan Esser <se>
Submitted by:
Added "i386/pci/pci_intel.c" for Intel PCI chip set specific driver code.


# 2ac8be82 05-Sep-1994 Andreas Schulz <ats@FreeBSD.org>

Reviewed by:
Delete the hints to the sg driver. This thing was never finished and
has now been beaten by the sea driver.


# 040071b2 02-Sep-1994 Paul Richards <paul@FreeBSD.org>

Added entry for if_lnc.c, soon to be added new Lancef amily ethernet
driver.
Reviewed by:
Submitted by:


# 9670686d 31-Aug-1994 David Greenman <dg@FreeBSD.org>

Added ze driver (brought over from 1.1.5).


# 96a09a30 31-Aug-1994 Stefan Eßer <se@FreeBSD.org>

Submitted by: Stefan Esser <se@ZPR.Uni-Koeln.DE>
Added entry for 'de' device in anticipation of Matt Thomas'
PCI Ethernet driver (required by the PCI autoconfig code).


# 2c57cee5 31-Aug-1994 Stefan Eßer <se@FreeBSD.org>

Reviewed by:
Submitted by:
Added lines for 'pci' and 'ncr' devices (found under i386/pci).


# 694292e3 30-Aug-1994 David Greenman <dg@FreeBSD.org>

Moved gpl'd fpemul into 2.0 cvs tree. Changed it's location to
sys/gnu/i386/fpemul/.


# 292cf0fd 30-Aug-1994 Bruce Evans <bde@FreeBSD.org>

Add conf.c, machdep.c, exception,s, support.s and swtch.s so that config
will do most of the work for handling them. Only one extra flag and one
bogus dependency was used for machdep.c and there was never anything
special about the others.

Add locore.s, but commented out. It's still special.

Remove com.c and lpa.c.


# a5585c6f 24-Aug-1994 Andreas Schulz <ats@FreeBSD.org>

Reviewed by:
Submitted by:
Add the elink.c file to the necessary modules for the ie and ep driver.


# c0856742 24-Aug-1994 Søren Schmidt <sos@FreeBSD.org>

Added iBCS2 files
Reviewed by:
Submitted by:


# e9d16791 18-Aug-1994 Poul-Henning Kamp <phk@FreeBSD.org>

Added my ProAudioSpectum SCSI driver for cards with the 5380 SCSI-chip.
This is the slowest and most stupid of our SCSI-drivers, but it is there
and it works. It has been tested with CD-ROM and disk.
It uses no interrupts, no DMA, just polled I/0.
Transfer-rate is <= 100Kbyte/sec.
If you set the jumpers on the board, you can change the unit-number and
you will be able to have four of these co-exist in one computer, why one
would do that is somewhat unclear though.
If I ever get my hand on the docs for this, I will improve it of course,
but for now we can install and access those CD-ROMs.


# 79525846 12-Aug-1994 David Greenman <dg@FreeBSD.org>

New ethernet device driver from Matt Thomas:

This driver supports all the DEC EtherWORKS III NICs (DE203, DE204,
and DE205) and the later DEC EtherWORKS II NICs (DE200, DE201, DE202,
DE422). DEPCA-style boards prior to the DE200 have not been tested
and may not work.

Submitted by: Matt Thomas (thomas@lkg.dec.com)


# 26f9a767 25-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.

Reviewed by: Rodney W. Grimes
Submitted by: John Dyson and David Greenman


# 3c7e7a69 29-Apr-1994 Gary Clark II <gclarkii@FreeBSD.org>

Almost had problems. The directory on my system is gpl not gnu.
corrected error


# a5a7a6cd 29-Apr-1994 Gary Clark II <gclarkii@FreeBSD.org>

Added files for option gpl_math_emulate


# db2fd867 22-Apr-1994 Andrey A. Chernov <ache@FreeBSD.org>

Sound driver updated to version 2.5


# f847be1a 21-Apr-1994 Søren Schmidt <sos@FreeBSD.org>

pcaudio.c added


# 32128f4c 06-Apr-1994 David Greenman <dg@FreeBSD.org>

from kimmel@varese.cs.umass.edu (Matt Kimmel):
"el" driver for 3COM 3C501. This driver has some serious performance
problems and drops packets on the floor like hot potatos.


# 16a6a708 21-Mar-1994 Andreas Schulz <ats@FreeBSD.org>

Makefile.i386:
put vers.o at the end of the loader line. We are simply jumping in the
moment into the first location of the text segment in 386bsd. So the
linking order is very important :-). With the addition of the const
types in newvers.sh we jumped into them. I have experimented with an
entry point specification, but was unsuccessfull. Someone else should
look at this.
devices.i386:
files.i386:
Added entries for a Sony cdrom driver.


# 62d15ccc 11-Mar-1994 Steven Wallace <swallace@FreeBSD.org>

Added appropriate entries into files.i386 for snd drivers in /sys/i386/isa/sound
Added new snd drivers and EXCLUDE_<driver> options to LINT.


# 9b73b5a0 27-Feb-1994 Poul-Henning Kamp <phk@FreeBSD.org>

dcfclk driver obsoleted, sio/TIOCTIMESTAMP took over.


# 97acce82 06-Feb-1994 Andrew Moore <alm@FreeBSD.org>

Add floppy tape support


# 91f58093 06-Feb-1994 Jordan K. Hubbard <jkh@FreeBSD.org>

Patches to allow the pcvt port to simply "drop in" with a minimum of
effort.


# 62167953 15-Jan-1994 Andreas Schulz <ats@FreeBSD.org>

Documented the drivers more in the LINT file. Added a line in files.i386
and LINT for the integration of a Seagate ST01/02 SCSI controller.


# 1668b3a8 09-Jan-1994 Andreas Schulz <ats@FreeBSD.org>

Added lines for an Etherlink III ( 3C509 ) driver.


# dd807b39 04-Jan-1994 Nate Williams <nate@FreeBSD.org>

Removed wx driver hooks.


# d6e9fac5 26-Oct-1993 Nate Williams <nate@FreeBSD.org>

Added alternative wd driver (called wx due to device name limitations)

This will be removed when a single driver that works on all hardware can
be verified


# f13a87bc 26-Oct-1993 Nate Williams <nate@FreeBSD.org>

Added ps/2 mouse driver file to finish off what Jordan started before

The driver will have to come after it's probe routine has been written.


# 9c2d9218 23-Oct-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

Put the sound stuff in alpabetic order.


# ce551cce 23-Oct-1993 Jordan K. Hubbard <jkh@FreeBSD.org>

Add config + files information for new Linux soundcard driver


# 9a91485c 14-Oct-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

Remove machdep.c from files.i386 and put machdep.o in the SYSTEM_OBJS
line of Makefile.i386. Fixes the extra rule that gmake complains about
for machdep.o. This fix is from Joans 0lsson.

Rework the depends and rules for assym.s and genassym so that we now use
the .depend rule for genassym.o such that if you change any header files
that are included by genassym.c the right things happen. This is probably
what has caused more bad kernel builds than any other thing in the
Makefile.i386!


# 46034637 11-Oct-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

Add support for mitsumi cd rom driver from Holger Viet, as fixed up by
Gary Clark II.


# 0d0a2b19 10-Oct-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

Added if_ie entry for Garett Wollmans ATT driver, the drives will be imported
soon.


# 08ac2785 09-Oct-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

Put sound blaster in alaphabetic order


# 0216aa9b 09-Oct-1993 Jordan K. Hubbard <jkh@FreeBSD.org>

Added sb entries for upcoming sound blaster driver


# 1af37a7b 30-Sep-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

Remove old ethernet drivers if_ec, if_ne, and if_we from config files
and from files.i386, they are no longer supported.


# 34f949ae 28-Aug-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

Added options MATH_EMULTATE to the kernel config files to pull in the
387 math emulator (sys/i386/i386/math_emulate.c). Made that file only
get compiled if options MATH_EMULATE is in the kernel.


# de3755e7 21-Aug-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

Moved if_we.c to be back in alphabetic order..


# c3e72289 21-Aug-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

Removed patch kit header, added Id:


# b648f67a 20-Aug-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

Moved /sys/scsi code files information to independed files file where it
should have always been.


# fc1fd086 09-Aug-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

Removal of support for old scsi as.c driver, removal off old unneeded
kernel config files since AH?TEST are now supported by GENERICISA,
and the others used the old as driver they are no longer valid.


# e483a5b2 29-Jul-1993 Jordan K. Hubbard <jkh@FreeBSD.org>

Removed entries for codrv, nuked sample config file since no longer necessary.


# 37338777 26-Jul-1993 Jordan K. Hubbard <jkh@FreeBSD.org>

Added entry for syscons.


# e51a2feb 08-Jul-1993 Jordan K. Hubbard <jkh@FreeBSD.org>

Put if_we driver well and truly back into the kernel.


# 16f43917 18-Jun-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

Changed all we0's to ed0's. Obsoleting if_we.c driver.


# 5b81b6b3 12-Jun-1993 Rodney W. Grimes <rgrimes@FreeBSD.org>

Initial import, 0.1 + pk 0.2.4-B1