Commit Graph

3415 Commits

Author SHA1 Message Date
Scott Long
89147260d5 Move the aac driver from MI to MD NOTES. It is a long way from being
64-bit clean.
2002-09-26 18:16:28 +00:00
Scott Long
1da8092eea Do away with AAC_COMPAT_LINUX option entirely. The functionality will
automatically be enabled if the kernel is compiled with COMPAT_LINUX.

Submitted by:	jhb
MFC after:	3 days
2002-09-25 15:21:50 +00:00
Scott Long
7419815d60 The AAC_COMPAT_LINUX option was really annoying, since it made the
aac driver dependent on the linux emulation module.  This was
especially bad for the release engineers who tried to move the
aac driver from the kernel onto the drivers floppy.  The linux
compat bits for this driver are now in their own driver, aac_linux.
It can be loaded as a module or compiled into the kernel.  For
the latter case, the AAC_COMPAT_LINUX option is needed, along with
the COMPAT_LINUX option.

I've tested this in every configuration I can think of.  This is an
MFC candidate for 4.7.

Idea from:	rwatson
MFC after:	3 days
2002-09-25 05:00:25 +00:00
Warner Losh
679aabee94 OLDCARD -> NEWCARD
pccbb -> cbb

PR: 43263
2002-09-24 02:55:33 +00:00
Warner Losh
f0e8cf0d26 Two new majors. devd and watchdog 2002-09-24 02:46:46 +00:00
Yoshihiro Takahashi
c712cee242 MFi386: revision 1.419 2002-09-24 02:18:41 +00:00
John Baldwin
e8e951ce31 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.
2002-09-23 15:50:06 +00:00
Jeff Roberson
5bf6b6538e - Hook ALQ up to the build. 2002-09-22 07:19:37 +00:00
Jeff Roberson
4b124a4b8e - Add options ALQ and KTR_ALQ. 2002-09-22 07:14:27 +00:00
Jake Burkholder
e3b6e33c07 Moved netisr code from kern/kern_intr.c to net/netisr.c as threatened in a
comment.
2002-09-22 05:56:41 +00:00
Jake Burkholder
abc370fa85 Moved nfs_diskless setup code from autoconf.c to nfsclient/nfs_diskless.c
so that it is MI.  Allow nfs_mountroot to return an error if the nfs_diskless
struct is not valid, rather than panicing later on.  Call nfs_setup_diskless()
from nfs_mountroot if NFS_ROOT is defined, like bootpc_init().  Removed legacy
root mount support for sparc64, and enabled NFS_ROOT by default.
2002-09-22 00:59:02 +00:00
Nicolas Souchu
44e6ce01b9 Cleanup of amdpm(4).
Add of NVIDIA nForce (nfpm) smbus support.

Obtained from:	Thomas D. Dean <tomdean@speakeasy.org>
2002-09-21 21:43:49 +00:00
John Baldwin
0be15dec9a Ahem, actually add the DDB_TRACE option and finish changing DDB_UNATTENDED
to use its own header.
2002-09-19 18:52:37 +00:00
Peter Grehan
e1f89baeaa - added macio and psim files
- removed unused extintr.c

Approved by: benno
2002-09-19 05:11:15 +00:00
Peter Grehan
5f705a14b9 psim device support
Approved by: benno
2002-09-19 05:09:27 +00:00
Peter Wemm
a72f2b1a91 Add Yet Another Duplicate of the font.h and ukbdmap.h rules. Remove
the font8x16.o glue, since that appears to have died ages ago and has
no remaining references.
2002-09-19 03:36:25 +00:00
Peter Wemm
db2cfa1f86 move wl (isa wavelan card, not "wi") to i386-only 2002-09-19 03:10:23 +00:00
Peter Wemm
6938800ee2 move "profile 2" to i386 2002-09-19 03:04:07 +00:00
Peter Wemm
b80ad83e76 move ncv, nsp, stg to i386-only section (there is no pc98-specific version) 2002-09-19 03:02:42 +00:00
Peter Wemm
2b412989fe Move dgb to the i386 section 2002-09-19 02:58:41 +00:00
Alfred Perlstein
3ffb9fadc8 Regen for added syscalls. 2002-09-19 00:48:57 +00:00
Peter Wemm
d223099401 Make netatm/spans compile in the kernel without depending on userland
include files to provide functions for kernel source (spans_kxdr.c)
2002-09-17 08:57:52 +00:00
Peter Wemm
66422f5b7a Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports.  As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL.  It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha
2002-09-17 01:49:00 +00:00
Yoshihiro Takahashi
d145f81713 MFi386: revision 1.178. 2002-09-16 07:19:43 +00:00
Yoshihiro Takahashi
63d2c90b87 MFi386: revisions 1.417 and 1.418. 2002-09-16 07:17:43 +00:00
Peter Grehan
5268fdfbec geom_aes.c requires rijndael crypto
Approved by: phk, benno
2002-09-16 04:13:48 +00:00
Poul-Henning Kamp
85fee3197a 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.
2002-09-11 12:44:58 +00:00
Nate Lawson
8579e9cfbd Fix LINT build on alpha by completing move of cy and apm_saver to
i386/conf/NOTES rather than the global conf/NOTES.

Suggested by: bde
2002-09-11 05:33:15 +00:00
Maxim Sobolev
f367e2f24c Add `device gre'.
Reminded by:    bde
MFC after:      28 days
		(along with other if_gre stuff)
2002-09-09 08:31:04 +00:00
Jun Kuriyama
b37a9be231 Use "options " rather than "options<tab>". 2002-09-09 02:40:59 +00:00
Peter Wemm
e94ecf7338 Move the KSTACK_PAGES option from MD to MI. Although not all platforms
support this, we do have MI code that references it and is otherwise
unaware of an override.  The alternative is to put knowledge in these
MI files about which platforms have the opt_kstack_pages.h option file.
It is more likely that other platforms will gain the ability to tune the
kstack size.
2002-09-07 22:07:11 +00:00
Peter Wemm
f7749f924c Automatically enable CPU_ENABLE_SSE (detect and enable SSE instructions)
if compiling with I686_CPU as a target.  CPU_DISABLE_SSE will prevent
this from happening and will guarantee the code is not compiled in.

I am still not happy with this, but gcc is now generating code that uses
these instructions if you set CPUTYPE to p3/p4 or athlon-4/mp/xp or higher.
2002-09-07 07:02:12 +00:00
Peter Wemm
581968abc2 Add COMPAT_AOUT option so that config will not yell when you try and
compile it statically.
2002-09-07 01:43:58 +00:00
Peter Wemm
21ae145105 Make imgact_aout.c optional. It is i386 specific. 2002-09-07 01:30:36 +00:00
Maxim Sobolev
8e96e13e6a Add a new gre(4) driver, which could be used to create GRE (RFC1701)
and MOBILE (RFC2004) IP tunnels.

Obrained from:  NetBSD
2002-09-06 17:12:50 +00:00
Peter Wemm
c253d72f0a Bump the -mev56 to -mev6. Otherwise, when you compile with gcc using
ev6 or pca56 etc this downgrades the cpu specification passed to gas.
As a result, gas will fail when gcc generates media instructions (in
uipc_usrreq.c).  This only affects what gas will accept, not what gcc
generates or what our *.s file contain.
2002-09-06 07:27:41 +00:00
Bruce Evans
cd6d1d76b8 Uncommented MAC options so that they get linted. This exposes brokenness
in kern_mac.c.
2002-09-05 06:46:11 +00:00
Poul-Henning Kamp
bd8add3d61 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.
2002-09-04 19:43:22 +00:00
John Baldwin
1519d15caa - Move $FreeBSD$ to the top of the file.
- Fix a few grammar bogons.
- Add a small style guide.

Reviewed by:	bde (a while ago)
2002-09-03 19:21:39 +00:00
Brooks Davis
9c2060cdf4 Hook up libkern/strlcpy.c and libkern/strlcat.c after repocopy.
Obtained from:	OpenBSD
Discussed on:	-arch
2002-09-02 20:16:22 +00:00
Brooks Davis
3a93719872 Make SCSI_DELAY setable at boot time and runtime via the
kern.cam.scsi_delay tunable/sysctl.

Reviewed by:	mdodd, njl
2002-09-02 20:10:19 +00:00
Brooks Davis
5906e69ac2 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
2002-09-02 00:52:11 +00:00
Scott Long
43e9d8a3a4 Minor fixups 2002-09-01 22:50:08 +00:00
Bruce Evans
f4dcc04737 Unbreak LINT a little by not attempting to configure the nonexist option
AHC_DEBUG_SEQUENCER.
2002-09-01 15:11:06 +00:00
Scott Long
3636639d7b Remove options that don't actually exist (in this form). 2002-09-01 07:13:10 +00:00
Peter Wemm
f517797954 'aicasm optional ahc ahd' means 'build aicasm only if BOTH ahc and ahd
are specified'.  Ie: it is a logical and, not a logical or.
2002-08-31 23:30:16 +00:00
Poul-Henning Kamp
32f606d105 Split the puc driver in pci specific and generic parts.
Add a pccard frontend for it as well.

The PCcard stuff does not work yet because there is still some PCImagic
left in puc.c
2002-08-31 18:38:43 +00:00
Justin T. Gibbs
4e7bbbf96c Add support for ahd/ahc register pretty printing in diagnostics.
This feature can be disabled via the AHD/AHC_REG_PRETTY_PRINT kernel
option.

The ahc driver now uses the same debug options mechanism as ahd:
AHC_DEBUG 	- Compile in debugging code
AHC_DEBUG_OPTS	- String of debug options as listed in aic7xxx.h
2002-08-31 06:55:59 +00:00
Justin T. Gibbs
817bd00cec Reserve majors 171 and 172 for the "mide" (LSI MegaRAID IDE control device)
and "mided" (LSI MegaRAID IDE disk device).

Submitted by:	"Moore, Eric Dean" <emoore@lsil.com>
2002-08-30 16:54:02 +00:00
Peter Wemm
448a5139d4 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.
2002-08-29 01:48:09 +00:00
John Baldwin
e7f52ff8bb Hook up the new ACPI PCI bus and catch up to ACPI PCI bridge driver changes. 2002-08-26 18:32:00 +00:00
Bruce Evans
64fc62d407 Turned format checking back on. It was left turned off for too long after
the gcc lossage that caused it to be turned off was fixed.

Tested with:	i386/{GENERIC,LINT,...}, alpha/GENERIC
2002-08-25 08:05:02 +00:00
Murray Stokely
b1acc4a299 Add a belated entry for amdpm(4).
Submitted by:	marius@alchemy.franken.de
MFC After:	1 day
2002-08-23 08:00:31 +00:00
Peter Wemm
bbf7bd333d Many of the alpha low level console drivers still have bogus compile time
dependencies on syscons.  Bandaid for now.
2002-08-22 19:52:16 +00:00
Archie Cobbs
901fadf792 New L2TP netgraph node type.
Obtained from:	Packet Design
2002-08-20 21:59:50 +00:00
Peter Wemm
66efd5f568 Untangle this warning a bit:
COMPAT_SVR4 is broken and usage is, until fixed, not recommended
BTW; does anybody remember why this is here?
2002-08-20 00:29:16 +00:00
Peter Wemm
f453022cd9 remove unit counts from atkbdc, pckbd, sc 2002-08-20 00:10:22 +00:00
Peter Wemm
ca9cc66fbd de-count pcbkd 2002-08-20 00:09:16 +00:00
Peter Wemm
5452db4885 de-count atkbdc and sc. Folks, remove the '1' from 'device sc 1' and
'device atkbdc 1'.
2002-08-19 23:59:21 +00:00
Bruce Evans
49b2349b41 Added rules to generate .c files from .m files. Run mkdep on these .c
files.  This fixes at least "make" (without -j) after "make clean".
2002-08-19 01:00:37 +00:00
Bruce Evans
0f64e446fe Finished removing env(1) commands, as in rev.1.13 but non-broken. Set
the environment for the last command of the pipeline (xargs) instead
of too early in the broken version or using an extra env process for
each command spawned by xargs as in rev.1.12.  Fixed a nearby English
error.
2002-08-18 20:41:19 +00:00
Søren Schmidt
e3ffd6e93f Add dev# for pst driver 2002-08-18 12:19:32 +00:00
Orion Hodson
ae83180158 Support for VIA VT8233 audio controller. 2002-08-17 16:23:44 +00:00
Robert Watson
f050add5c1 Wrap maintenance of varios nmac{objectname} counters in MAC_DEBUG so we
can avoid the cost of a large number of atomic operations if we're not
interested in the object count statistics.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-08-16 14:21:38 +00:00
Nate Lawson
e2a5fdf911 Remove usage of cam_extend.c, replace with dev->si_drv1
PR:		kern/39809
Approved by:	gibbs
2002-08-15 20:54:03 +00:00
Warner Losh
6319263d7b pccbb->cbb 2002-08-15 08:05:40 +00:00
Juli Mallett
8a3e49fd52 Spell kenrel as 'kernel' for consistency with the rest of the universe.
Inspired by:	bde
2002-08-14 17:55:11 +00:00
Josef Karthauser
48b68edf14 Update for recent changes in the usb code. 2002-08-12 21:25:06 +00:00
Matt Jacob
9b63136347 Add support for the LSI-Logic Fusion/MP architecture.
This is an architecture that present a thing message passing interface
to the OS. You can query as to how many ports and what kind are attached
and enable them and so on.

A less grand view is that this is just another way to package SCSI (SPI or
FC) and FC-IP into a one-driver interface set.

This driver support the following hardware:

LSI FC909:	Single channel, 1Gbps, Fibre Channel (FC-SCSI only)
LSI FC929:	Dual Channel, 1-2Gbps, Fibre Channel (FC-SCSI only)
LSI 53c1020:	Single Channel, Ultra4 (320M) (Untested)
LSI 53c1030:	Dual Channel, Ultra4 (320M)

Currently it's in fair shape, but expect a lot of changes over the
next few weeks as it stabilizes.

Credits:

The driver is mostly from some folks from Jeff Roberson's company- I've
been slowly migrating it to broader support that I it came to me as.

The hardware used in developing support came from:

	FC909: LSI-Logic, Advansys (now Connetix)
	FC929: LSI-Logic
	53c1030: Antares Microsystems (they make a very fine board!)

MFC after:	3 weeks
2002-08-11 23:34:20 +00:00
Josef Karthauser
31f48889ad Add the uftdi ucom driver which supports the following adapters:
Inland UAS111
	QVS USC-1000
	HP USB-Serial adapter shipped with some HP laptops

Submitted by:	takawata
MFC After:	7 days
2002-08-11 23:32:33 +00:00
Søren Schmidt
fd4b4ecc73 Add the ability to use ATAPI devices via CAM.
The CAM<>ATAPI layer was submitted by "Thomas Quinot <thomas@cuivre.fr.eu.org>"
changes form the version on the net by me (formatting, ability to be used
alone without the ATAPI native device driver, proper speed reporting...)

See /sys/conf/NOTES for usage.

Submitted by: Thomas Quinot <thomas@cuivre.fr.eu.org>
2002-08-09 20:54:06 +00:00
Brooks Davis
05c872ad62 Make ppp(4) devices clonable and unloadable. 2002-08-09 15:30:48 +00:00
Ian Dowse
ab6fc18e52 Our awk does not implement the ARGIND variable, so we were attempting
to parse the binary .kld file as a list of symbols. Fix this by
simply deleting the unwanted argument from the ARGV[] array instead
of trying to skip over it.
2002-08-06 19:31:04 +00:00
Jake Burkholder
ab1cee3d3d se -> sab. 2002-08-04 19:07:15 +00:00
Jake Burkholder
ab9d7ec432 Remove this abortive attempt. 2002-08-04 18:24:09 +00:00
Warner Losh
073eef8ca2 Add code that will download firmware to a Symbol LA4100-series of CF
cards.  Since the firmware is hard coded into the kernel, I've made it
a kernel option (WI_SYMBOL_FIRMWARE).

Note: This only downloads into the RAM of these cards.  It doesn't
download into FLASH, and is somewhat limited.  There needs to be a
better way to deal, but this works for now.  My Symbol LA4132 CF card
works now.

Obtained from: NetBSD
2002-08-03 00:19:58 +00:00
Poul-Henning Kamp
007054391b typo. 2002-08-02 15:55:18 +00:00
Poul-Henning Kamp
927b6b099d Add the minimalist elan-mmcr device driver.
This driver allows a userland program to mmap the MMCR of the AMD
Elan sc520 CPU.
2002-08-02 15:53:04 +00:00
Robert Watson
1dbad969fe Demonstrate that MAC modules can also be linked statically as
well as loaded as modules by hooking up mac_none if
'options MAC_NONE' is defined.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-08-01 22:26:38 +00:00
Peter Wemm
8fe52021c2 Remove duplicate 'modules-tags' rule 2002-08-01 03:13:10 +00:00
Robert Watson
c1ff2d9baf Introduce support for Mandatory Access Control and extensible
kernel access control.

Modify procfs so that (when mounted multilabel) it exports process MAC
labels as the vnode labels of procfs vnodes associated with processes.

Approved by:	des
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-08-01 02:03:21 +00:00
Søren Schmidt
1d6213f9cc 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.
2002-07-31 18:27:30 +00:00
Jake Burkholder
7c467eb823 *.s -> *.S. 2002-07-31 15:52:04 +00:00
Jake Burkholder
ba37958b34 Moved the rule for locore.o from kern.post.mk to Makefile.$ARCH. 2002-07-31 14:59:05 +00:00
Warner Losh
abf24f80a6 Fix path to other files.<arch> files.
Fix disordering of libkern/crc32.c entry.

MFC after: 1 day
2002-07-30 22:28:43 +00:00
Mitsuru IWASAKI
b69ed3f4c6 Resolve conflicts arising from the ACPI CA 20020725 import. 2002-07-30 19:35:32 +00:00
Josef Karthauser
ca095220db Commit a version of the uvisor driver for connecting Handspring
Visors via USB.

Submitted by:	Chia-liang Kao <clkao@clkao.org>
2002-07-30 17:44:28 +00:00
Robert Watson
e35b3494da Hook up kern_mac.c to the build.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-07-30 02:04:56 +00:00
Ruslan Ermilov
d2893b161b Drop support for COPY, -c has been the default mode of install(1)
for a long time now.

Approved by:	bde
2002-07-29 09:40:17 +00:00
Jake Burkholder
55328d51ba Add routines needed for high resolution profiling. 2002-07-29 00:45:13 +00:00
Robert Watson
12e9f256e3 Kernel options for Mandatory Access Control (MAC).
MAC support will be merged into the main tree over the next week in
reasonable size chunks; much more to follow.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-07-27 19:50:28 +00:00
Warner Losh
a850203de0 Make PCI_ENABLE_IO_MODES a sysctl hw.pci.enable_io_modes. It can also
be set at boot time.  It defaults to 1 now since it can be set in the
boot loader.  If this proves unwise, we can reset it to defaulting to 0.
2002-07-26 07:58:16 +00:00
Peter Wemm
93c9745e20 gethints.awk is a machine-specific 4.x->5.x transition aid. We cannot
use a common one because pc98 has got very different values.  This only
needs to exist on platforms that existed under 4.x.
2002-07-26 03:52:30 +00:00
John Baldwin
a2959ac694 Move sio's ebus attachment to the MI files section so it is compiled in
for any machines that use ebus.
2002-07-24 12:43:27 +00:00
John Baldwin
ba268f0312 Move sio_isa.c back to MD files files due to PC98 brain damage. 2002-07-24 12:35:52 +00:00
Yoshihiro Takahashi
ebe3c68929 MFi386: revision 1.407 (move the em driver entry to MI file) 2002-07-24 12:33:39 +00:00
Peter Wemm
ec7892680f pci is (finally) no longer a 'count' device. ahc/ahd were the last
holdouts.
2002-07-23 06:33:08 +00:00
Peter Wemm
0cd59a38ce Move 'em' from files.i386 to files so that it is within reach of the
ia64 (tested) and pc98 (i386 based) platforms.
2002-07-22 01:11:16 +00:00
Peter Wemm
c19a8e0670 The transition time for -Werror has been gone for a while. We are now
sufficiently clean that we can fix any new problems or mark individual
files as not being ready for -Werror.
2002-07-22 00:15:01 +00:00
Peter Wemm
ee739cd16c Add unit count to 'card' 2002-07-21 23:20:29 +00:00
Peter Wemm
d76dc9c3f3 pci/cy_pci.c is still MD, it needs i386/isa/cy.c for the core. 2002-07-21 23:15:41 +00:00
Peter Wemm
c06a33507a The following devices do not take a static unit 'count' argument:
ar, fe, lnc, sr, wl, fpa, bktr, sbni
2002-07-21 22:28:43 +00:00
Peter Wemm
995e4431de Change bktr and smbus from 'count' back to 'optional' 2002-07-21 21:47:07 +00:00
Peter Wemm
b5d0be8951 Remove dependency on NPCI. Use 'options ATA_NOPCI' to compile without
pci support.  This really needs to be fixed properly some day, but judging
by the fact that the nopci case hasn't compiled for quite a while, there
does not seem to be much urgency.

Reviewed by:	sos
2002-07-21 21:37:09 +00:00
Nick Sayer
d807a231a2 Add uaudio -- a USB audio device driver.
This driver actually works slightly better on -stable than on -current
(the system locks on detach on -current), so it should be MFC'd somewhat
sooner.

This driver currently points out a difficulty in the sound device framework.
The PCM unregister routine is allowed to refuse the detach if the device is
in use. In the case of a USB device, however, this unregistration is much more
mandatory in nature, since the device is *actually* gone when this call is
made. The sound subsystem really should not refuse an unregistration and
should take its own steps to reject further I/O. As a result, if you detach
a USB sound device while it is in use, you can expect a panic shortly
thereafter.

This device cannot currently record audio. Some routines are unwritten as
of yet in uaudio.c to support recording.

This device hangs my -current box on detach. I don't know why. This does
not happen on my -stable machine.

Obtained from:	Hiroyuki Aizu
MFC after:	2 weeks
2002-07-21 17:28:50 +00:00
Peter Wemm
1c4f51fde0 ebus is not a 'count' device. There are no NEBUS references. 2002-07-20 08:16:51 +00:00
Peter Wemm
3ebc124838 Infrastructure tweaks to allow having both an Elf32 and an Elf64 executable
handler in the kernel at the same time.  Also, allow for the
exec_new_vmspace() code to build a different sized vmspace depending on
the executable environment.  This is a big help for execing i386 binaries
on ia64.   The ELF exec code grows the ability to map partial pages when
there is a page size difference, eg: emulating 4K pages on 8K or 16K
hardware pages.

Flesh out the i386 emulation support for ia64.  At this point, the only
binary that I know of that fails is cvsup, because the cvsup runtime
tries to execute code in pages not marked executable.

Obtained from:  dfr (mostly, many tweaks from me).
2002-07-20 02:56:12 +00:00
David E. O'Brien
5959d16036 Add the ebus sio attachment. 2002-07-19 08:03:14 +00:00
Ruslan Ermilov
7f3c93b7de s/install -c/${INSTALL} ${COPY}/ 2002-07-18 12:02:20 +00:00
Ruslan Ermilov
2b06260dfa Handle installation of links through bsd.links.mk.
Removed comments that no longer directly apply here.
2002-07-17 08:21:50 +00:00
Warner Losh
b946901ca7 pccard_common.c is no longer necssary 2002-07-17 05:22:00 +00:00
Dima Dorfman
a1dc209638 Introduce the DEVFS "rule" subsystem. DEVFS rules permit the
administrator to define certain properties of new devfs nodes before
they become visible to the userland.  Both static (e.g., /dev/speaker)
and dynamic (e.g., /dev/bpf*, some removable devices) nodes are
supported.  Each DEVFS mount may have a different ruleset assigned to
it, permitting different policies to be implemented for things like
jails.

Approved by:	phk
2002-07-17 01:46:48 +00:00
John Baldwin
dde0429505 Various comment and minor style fixes. No actual content changes.
Inspired by:	bde
2002-07-16 18:20:17 +00:00
Mark Murray
e9b24da3d5 Retire the perl gethints.conf in favour of an awk version. Move
the awk version to a central place for maintenance.

Submitted by:	Cyrille Lefevre <cyrille.lefevre@laposte.net>
2002-07-16 09:28:25 +00:00
John Baldwin
5e4fa8916d KSTACK_PAGES is only an option on i386, so move it to the i386 NOTES file. 2002-07-15 19:24:50 +00:00
John Baldwin
b928585573 Whitespace fix. 2002-07-15 19:14:13 +00:00
John Baldwin
fbfee3f615 Move SMBFS from i386 and pc98 files and options files to MI files and
options files.
2002-07-15 19:11:21 +00:00
John Baldwin
522a5d72bd The hardware bus configuration section is now empty, so axe it. The
architecture specific NOTES files define which hardware busses each
architecture supports.
2002-07-15 19:00:21 +00:00
John Baldwin
f309f881ad Move NTIMECOUNTER and PPS_SYNC from the ISA bus section to the clock
options section.
2002-07-15 18:59:00 +00:00
John Baldwin
601969b9aa The EISA_SLOTS option appears to be i386-only. 2002-07-15 18:55:07 +00:00
John Baldwin
122b088a2a COMPAT_OLDISA is only used on i386. 2002-07-15 18:50:13 +00:00
John Baldwin
6c519e3898 Sync up syscons options from options.i386. 2002-07-15 18:43:09 +00:00
John Baldwin
bdff575a42 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.
2002-07-15 15:47:34 +00:00
John Baldwin
47a3594e8e The puc(4) driver/bridge is MI, so don't bury it in MD options and files
config files.  It also depends on PCI.
2002-07-15 15:39:10 +00:00
John Baldwin
0b9113359f Sort all the SYSV IPC options. They are still all clumped together, but
at least they are sorted relative to themselves now.
2002-07-15 15:28:16 +00:00
John Baldwin
404b3dcf21 - Properly sort GEOM and NODEVFS.
- GEOM doesn't need to specify a filename, the correct one is chosen by
  default.
2002-07-15 15:25:08 +00:00
John Baldwin
97fef0a119 Make WLCACHE and WLDEBUG MI options. 2002-07-15 15:21:51 +00:00
John Baldwin
7f01180e4e Make NDGBPORTS an MI option since the dgb(4) driver is an MI driver.
Remove comments about NDGBPORTS from the options* files.  Please document
options in NOTES, not in the options* files.
2002-07-15 15:18:34 +00:00
John Baldwin
7b52958662 Properly document NDGBPORTS and use a better value in NOTES. The normal
values for settings in NOTES is to use the default value + 1.
2002-07-15 15:17:22 +00:00
John Baldwin
e03e67ef3b Remove SIMOS option from here. It will be moving to a new home shortly. 2002-07-15 15:07:51 +00:00
John Baldwin
722e959358 Adjust a comment, the vga device only supports VGA cards. 2002-07-15 14:56:44 +00:00
John Baldwin
cb8881c3df Alpha does not support the PERFMON kernel option and does not have a
perfmon.c.
2002-07-15 14:45:32 +00:00
John Baldwin
319c5598e3 Neither options SLICE or sys/alpha/alpha/mountroot.c exist anymore. 2002-07-15 14:43:40 +00:00
John Baldwin
a916ce1acc Move ACPI device and options from MI NOTES to the i386 MD NOTES file. 2002-07-15 14:28:20 +00:00
Mark Murray
bbf09ad887 Upgrade the random device to use a "real" hash instead of building
one out of a block cipher. This has 2 advantages:
1) The code is _much_ simpler
2) We aren't committing our security to one algorithm (much as we
   may think we trust AES).

While I'm here, make an explicit reseed do a slow reseed instead
of a fast; this is in line with what the original paper suggested.
2002-07-15 13:58:35 +00:00
Bruce Evans
3c9d896571 Quick fix for high resolution kernel profiling on i386's. Use
-finstrument-functions instead of -mprofiler-epilogue.  The former
works essentially the same as the latter but has a higher overhead
(about 22 more bytes per function for passing unused args to the
profiling functions).

Removed all traces of the IDENT Makefile variable, which had been
reduced to just a place for holding profiling's contribution to CFLAGS
(the IDENT that gives the kernel identity was renamed to KERN_IDENT).
2002-07-13 22:28:34 +00:00
Bruce Evans
8365569883 Moved the setting of all profiling-related variables except the key one
(PROFLEVEL) to kern.pre.mk so that it is easier to manage.  Bumped config
version to match.

Moved the check for cputype being configured to a less bogus place in
mkmakefile.c.
2002-07-13 19:36:14 +00:00
Alfred Perlstein
f0eb293e88 Move COMPAT_FREEBSD4 to arch-neutral sys/conf/NOTES.
Add COMPAT_FREEBSD4 to GENERIC for arches that existed in FreeBSD 4's time,
not just i386. (alpha and pc98)

Requested by: bde
2002-07-13 16:43:53 +00:00
Peter Wemm
f1b665c8fe Revive backed out pmap related changes from Feb 2002. The highlights are:
- It actually works this time, honest!
- Fine grained TLB shootdowns for SMP on i386.  IPI's are very expensive,
  so try and optimize things where possible.
- Introduce ranged shootdowns that can be done as a single IPI.
- PG_G support for i386
- Specific-cpu targeted shootdowns.  For example, there is no sense in
  globally purging the TLB cache for where we are stealing a page from
  the local unshared process on the local cpu.  Use pm_active to track
  this.
- Add some instrumentation for the tlb shootdown code.
- Rip out SMP code from <machine/cpufunc.h>
- Try and fix some very bogus PG_G and PG_PS interactions that were bad
  enough to cause vm86 bios calls to break.  vm86 depended on our existing
  bugs and this was the cause of the VESA panics last time.
- Fix the silly one-line error that caused the 'panic: bad pte' last time.
- Fix a couple of other silly one-line errors that should have caused more
  pain than they did.

Some more work is needed:
- pmap_{zero,copy}_page[_idle].  These can be done without IPI's if we
  have a hook in cpu_switch.
- The IPI handlers need some cleanup.  I have a bogus %ds load that can
  be avoided.
- APTD handling is rather bogus and appears to be a large source of
  global TLB IPI shootdowns for no really good reason.

I see speedups of between 1.5% and ~4% on buildworlds in a while 1 loop.
I expect to see a bigger difference when there is significant pageout
activity or the system otherwise has memory shortages.

I have backed out a few optimizations that I had been using over the last
few days in order to be a little more conservative.  I'll revisit these
again over the next few days as the dust settles.

New option:  DISABLE_PG_G - In case I missed something.
2002-07-12 07:56:11 +00:00
Alfred Perlstein
074453c230 Introduce syscall.master option 'COMPAT4' which allows one to wrap
syscalls for FreeBSD 4 compatibility.
Add kernel option COMPAT_FREEBSD4 to enable these syscalls.
2002-07-12 06:38:34 +00:00
Bruce Evans
b147fcf936 Fixed misspelling of "hint." as "hints." in the description of the "hint."
keyword and in the description of rp's hints.

Didn't fix rp's hints being mostly in comments so that they are harder to
use (they don't get linted either way because makeLINT.sh strips them and
there is no compile-time syntax checking of hints anyway).
2002-07-11 20:43:37 +00:00
Ruslan Ermilov
6dc6a04be5 Do not override the standard `distribute' target that is currently
available from bsd.obj.mk.

The native version was identical (and pretty much unused except in
the -DMODULES_WITH_WORLD case, which it is not for "make release")
except that the "bin" -> "base" change of the default DISTRIBUTION
name did not propagate here.
2002-07-11 14:13:37 +00:00
Kenneth D. Merry
2c8f5a28bb Move the MSIZE and MCLSHIFT options out of the undocumented section in
NOTES.  Add some comments about the potential problems associated with NIC
driver modules and changing these options.

Fix sorting problems in sys/conf/options with the MSIZE and MCLSHIFT
options.

Reviewed by:	bde
2002-07-11 04:15:53 +00:00
Matt Jacob
e05ec8935c Enable ISP SBus support. 2002-07-11 03:26:39 +00:00
Benno Rice
99bc8c72f7 Add setjmp (needed for DDB). 2002-07-10 12:26:17 +00:00
Benno Rice
45b4eca56d Add DDB support. 2002-07-10 12:21:54 +00:00
Josef Karthauser
04b401aa8a It's not "usio" anymore, it's "ucom".
Submitted by:	nsayer
2002-07-10 01:42:25 +00:00
David E. O'Brien
8442e07371 Desupport the TurboChannel Alpha's. This means the DEC3000/300* Pelic*
and DEC3000/[4-9]00 Flamingo/Sandpiper families.
2002-07-09 19:20:18 +00:00
Mitsuru IWASAKI
98479b041b Resolve conflicts arising from the ACPI CA 20020611 import. 2002-07-09 17:54:02 +00:00
Benno Rice
98f8e6c099 Driver for the Apple UniNorth Host-PCI bridge.
This is in a PowerMac-specific subdirectory as it is hoped that we will support
more than just the PowerMac platform.
2002-07-09 13:34:09 +00:00
Benno Rice
3008110e16 Add ofw_pci.c in the pci case. 2002-07-09 13:29:18 +00:00
Benno Rice
25b60a3b49 1) Add busdma machdep code.
2) Add bus_pio.h and bus_memio.h (which do nothing).

Submitted by:	Peter Grehan <peterg@ptree32.com.au> (1)
2002-07-09 12:47:14 +00:00
Benno Rice
ca01920852 Driver for OpenPIC compatible interrupt controllers.
It's fairly PowerMac specific at the moment, but that should be fixable.
2002-07-09 11:26:10 +00:00
Benno Rice
f6a7723dff Add interrupt handling support code.
I've tried to make this fairly platform-independant as some PowerPC platforms
may not have openpic-style interrupt controllers.  This may not have the best
performance but it works for now.
2002-07-09 11:12:20 +00:00
Mark Peek
b7c5c8fb06 Back out previous TCBHASHSIZE change. This should not be a kernel option.
Pointed out by:	bde
2002-07-08 22:00:43 +00:00
Mark Peek
08d6c46194 Document TCBHASHSIZE in NOTES and add it to the allowable kernel options.
PR:		32912
Submitted by:	Carl Schmidt <carl@slackerbsd.org>
MFC after:	3 days
2002-07-08 02:53:59 +00:00
Benno Rice
f00abca0c4 Add bmtphy.c 2002-07-05 11:08:55 +00:00
Maxime Henrion
2b4edb69f1 Move every code related to mount(2) in a new file, vfs_mount.c.
The file vfs_conf.c which was dealing with root mounting has
been repo-copied into vfs_mount.c to preserve history.
This makes nmount related development easier, and help reducing
the size of vfs_syscalls.c, which is still an enormous file.

Reviewed by:	rwatson
Repo-copy by:	peter
2002-07-02 17:09:22 +00:00
David E. O'Brien
d2be885e99 This is the start of the FreeBSD/x86_64 kernel. 2002-06-30 08:05:21 +00:00
Julian Elischer
e602ba25fd Part 1 of KSE-III
The ability to schedule multiple threads per process
(one one cpu) by making ALL system calls optionally asynchronous.
to come: ia64 and power-pc patches, patches for gdb, test program (in tools)

Reviewed by:	Almost everyone who counts
	(at various times, peter, jhb, matt, alfred, mini, bernd,
	and a cast of thousands)

	NOTE: this is still Beta code, and contains lots of debugging stuff.
	expect slight instability in signals..
2002-06-29 17:26:22 +00:00
Benno Rice
825467cae1 Add in_cksum.c 2002-06-29 09:50:20 +00:00
Benno Rice
6c2a062580 Many fixes to low-level trap and interrupt handling:
- Tidy up clock code.  Don't repeatedly call hardclock().
- Remove intrnames, decrnest and intrcnt from locore.s
- Coalesce all trap handling into a single stub that then calls a dispatch
  function.

Submitted by:	Peter Grehan <peterg@ptree32.com.au>
2002-06-29 09:28:21 +00:00
Luigi Rizzo
9758b77ff1 The new ipfw code.
This code makes use of variable-size kernel representation of rules
(exactly the same concept of BPF instructions, as used in the BSDI's
firewall), which makes firewall operation a lot faster, and the
code more readable and easier to extend and debug.

The interface with the rest of the system is unchanged, as witnessed
by this commit. The only extra kernel files that I am touching
are if_fw.h and ip_dummynet.c, which is quite tied to ipfw. In
userland I only had to touch those programs which manipulate the
internal representation of firewall rules).

The code is almost entirely new (and I believe I have written the
vast majority of those sections which were taken from the former
ip_fw.c), so rather than modifying the old ip_fw.c I decided to
create a new file, sys/netinet/ip_fw2.c .  Same for the user
interface, which is in sbin/ipfw/ipfw2.c (it still compiles to
/sbin/ipfw).  The old files are still there, and will be removed
in due time.

I have not renamed the header file because it would have required
touching a one-line change to a number of kernel files.

In terms of user interface, the new "ipfw" is supposed to accepts
the old syntax for ipfw rules (and produce the same output with
"ipfw show". Only a couple of the old options (out of some 30 of
them) has not been implemented, but they will be soon.

On the other hand, the new code has some very powerful extensions.
First, you can put "or" connectives between match fields (and soon
also between options), and write things like

ipfw add allow ip from { 1.2.3.4/27 or 5.6.7.8/30 } 10-23,25,1024-3000 to any

This should make rulesets slightly more compact (and lines longer!),
by condensing 2 or more of the old rules into single ones.

Also, as an example of how easy the rules can be extended, I have
implemented an 'address set' match pattern, where you can specify
an IP address in a format like this:

        10.20.30.0/26{18,44,33,22,9}

which will match the set of hosts listed in braces belonging to the
subnet 10.20.30.0/26 . The match is done using a bitmap, so it is
essentially a constant time operation requiring a handful of CPU
instructions (and a very small amount of memmory -- for a full /24
subnet, the instruction only consumes 40 bytes).

Again, in this commit I have focused on functionality and tried
to minimize changes to the other parts of the system. Some performance
improvement can be achieved with minor changes to the interface of
ip_fw_chk_t. This will be done later when this code is settled.

The code is meant to compile unmodified on RELENG_4 (once the
PACKET_TAG_* changes have been merged), for this reason
you will see #ifdef __FreeBSD_version in a couple of places.
This should minimize errors when (hopefully soon) it will be time
to do the MFC.
2002-06-27 23:02:18 +00:00
Kenneth D. Merry
98cb733c67 At long last, commit the zero copy sockets code.
MAKEDEV:	Add MAKEDEV glue for the ti(4) device nodes.

ti.4:		Update the ti(4) man page to include information on the
		TI_JUMBO_HDRSPLIT and TI_PRIVATE_JUMBOS kernel options,
		and also include information about the new character
		device interface and the associated ioctls.

man9/Makefile:	Add jumbo.9 and zero_copy.9 man pages and associated
		links.

jumbo.9:	New man page describing the jumbo buffer allocator
		interface and operation.

zero_copy.9:	New man page describing the general characteristics of
		the zero copy send and receive code, and what an
		application author should do to take advantage of the
		zero copy functionality.

NOTES:		Add entries for ZERO_COPY_SOCKETS, TI_PRIVATE_JUMBOS,
		TI_JUMBO_HDRSPLIT, MSIZE, and MCLSHIFT.

conf/files:	Add uipc_jumbo.c and uipc_cow.c.

conf/options:	Add the 5 options mentioned above.

kern_subr.c:	Receive side zero copy implementation.  This takes
		"disposable" pages attached to an mbuf, gives them to
		a user process, and then recycles the user's page.
		This is only active when ZERO_COPY_SOCKETS is turned on
		and the kern.ipc.zero_copy.receive sysctl variable is
		set to 1.

uipc_cow.c:	Send side zero copy functions.  Takes a page written
		by the user and maps it copy on write and assigns it
		kernel virtual address space.  Removes copy on write
		mapping once the buffer has been freed by the network
		stack.

uipc_jumbo.c:	Jumbo disposable page allocator code.  This allocates
		(optionally) disposable pages for network drivers that
		want to give the user the option of doing zero copy
		receive.

uipc_socket.c:	Add kern.ipc.zero_copy.{send,receive} sysctls that are
		enabled if ZERO_COPY_SOCKETS is turned on.

		Add zero copy send support to sosend() -- pages get
		mapped into the kernel instead of getting copied if
		they meet size and alignment restrictions.

uipc_syscalls.c:Un-staticize some of the sf* functions so that they
		can be used elsewhere.  (uipc_cow.c)

if_media.c:	In the SIOCGIFMEDIA ioctl in ifmedia_ioctl(), avoid
		calling malloc() with M_WAITOK.  Return an error if
		the M_NOWAIT malloc fails.

		The ti(4) driver and the wi(4) driver, at least, call
		this with a mutex held.  This causes witness warnings
		for 'ifconfig -a' with a wi(4) or ti(4) board in the
		system.  (I've only verified for ti(4)).

ip_output.c:	Fragment large datagrams so that each segment contains
		a multiple of PAGE_SIZE amount of data plus headers.
		This allows the receiver to potentially do page
		flipping on receives.

if_ti.c:	Add zero copy receive support to the ti(4) driver.  If
		TI_PRIVATE_JUMBOS is not defined, it now uses the
		jumbo(9) buffer allocator for jumbo receive buffers.

		Add a new character device interface for the ti(4)
		driver for the new debugging interface.  This allows
		(a patched version of) gdb to talk to the Tigon board
		and debug the firmware.  There are also a few additional
		debugging ioctls available through this interface.

		Add header splitting support to the ti(4) driver.

		Tweak some of the default interrupt coalescing
		parameters to more useful defaults.

		Add hooks for supporting transmit flow control, but
		leave it turned off with a comment describing why it
		is turned off.

if_tireg.h:	Change the firmware rev to 12.4.11, since we're really
		at 12.4.11 plus fixes from 12.4.13.

		Add defines needed for debugging.

		Remove the ti_stats structure, it is now defined in
		sys/tiio.h.

ti_fw.h:	12.4.11 firmware.

ti_fw2.h:	12.4.11 firmware, plus selected fixes from 12.4.13,
		and my header splitting patches.  Revision 12.4.13
		doesn't handle 10/100 negotiation properly.  (This
		firmware is the same as what was in the tree previously,
		with the addition of header splitting support.)

sys/jumbo.h:	Jumbo buffer allocator interface.

sys/mbuf.h:	Add a new external mbuf type, EXT_DISPOSABLE, to
		indicate that the payload buffer can be thrown away /
		flipped to a userland process.

socketvar.h:	Add prototype for socow_setup.

tiio.h:		ioctl interface to the character portion of the ti(4)
		driver, plus associated structure/type definitions.

uio.h:		Change prototype for uiomoveco() so that we'll know
		whether the source page is disposable.

ufs_readwrite.c:Update for new prototype of uiomoveco().

vm_fault.c:	In vm_fault(), check to see whether we need to do a page
		based copy on write fault.

vm_object.c:	Add a new function, vm_object_allocate_wait().  This
		does the same thing that vm_object allocate does, except
		that it gives the caller the opportunity to specify whether
		it should wait on the uma_zalloc() of the object structre.

		This allows vm objects to be allocated while holding a
		mutex.  (Without generating WITNESS warnings.)

		vm_object_allocate() is implemented as a call to
		vm_object_allocate_wait() with the malloc flag set to
		M_WAITOK.

vm_object.h:	Add prototype for vm_object_allocate_wait().

vm_page.c:	Add page-based copy on write setup, clear and fault
		routines.

vm_page.h:	Add page based COW function prototypes and variable in
		the vm_page structure.

Many thanks to Drew Gallatin, who wrote the zero copy send and receive
code, and to all the other folks who have tested and reviewed this code
over the years.
2002-06-26 03:37:47 +00:00
Warner Losh
6b891daaa5 Partially back out the "make all interfaces standard" commit. There's
a small chance that it might have broken loading the miibus, so err on
the side of caution until I can figure out what is going on.  This
backs out all but the PCI, PCIB and ISA bus interfaces being
"standard," which have been well tested...
2002-06-24 01:53:26 +00:00
Warner Losh
8c575e95cd plxcard for OLDCARD almost certainly isn't going to happen. 2002-06-23 07:31:29 +00:00
Warner Losh
f24cd27f4f As disclosed to arch@, make more interfaces standard. This allows for
easier loading of modules that might refer to these interfaces.  None
of the code that implements them is standard, just the glue.  This
bloats the kernel a whopping 8k.

Silence on: arch@
2002-06-23 07:27:24 +00:00
Robert Watson
e35e7abac0 Remove CAPABILITIES from NOTES 2002-06-21 19:53:04 +00:00
Julian Elischer
a835396035 A node that creates a device entry in /dev (yay devfs)
so that /dev/mumble can be the entrypoint to some networking graph,
e.g. a tunnel or a remote tape drive or whatever...

Not fully tested (by me) yet.

Submitted by:	Mark Santcroos <marks@ripe.net>
MFC after:	3 weeks
2002-06-18 21:32:33 +00:00
Nick Hibma
d8dbc77c56 Make the speed used by gdb over serial settable in the kernel configuration.
This facilitates the use in circumstances where you are using a serial
console as well. GDB doesn't support anything higher than 9600 baud (19k2
if you are lucky), but the console does.
2002-06-18 21:30:37 +00:00
David E. O'Brien
97f9c29ef3 Allow one to configure `sio'. 2002-06-18 01:14:54 +00:00
Nick Hibma
dba3dc7bdc Use OBJDIR instead of CURDIR. This unbreaks loading modules through
'make load' if an object dir was, like it is used in /sys/modules. I.e.

	cd /sys/modules/umass
	make obj
	make
	make load

works again without having to install the module.

If no objdir was used the module in the current directory is used.
2002-06-17 20:01:06 +00:00
John Hay
cd669cef39 sppp needs slcompress.c nowadays.
PR:		39369
2002-06-17 05:40:49 +00:00
Maxime Henrion
2812d7722d Removed a duplicate -ffreestanding. It's already set in bsd.kern.mk.
Approved by:	bde
2002-06-16 10:42:05 +00:00
Robert Watson
a3cce19f7d kern_cap.c no longer needed. 2002-06-13 23:19:34 +00:00
Robert Watson
1bde53c130 POSIX.1e capabilities aren't here yet, don't put an option for it
in the options file.
2002-06-13 22:41:23 +00:00
Brooks Davis
22afbb6bb0 Remote pci.h/NPCI usage from i4b code.
Approved by:	hm
2002-06-13 06:04:28 +00:00
Poul-Henning Kamp
11b2dcdbbe Put geom_gpt.c under the GEOM option instead of having a special GEOM_GPT
option for it.
2002-06-10 18:49:41 +00:00
Jake Burkholder
f5ee661c9b Remove code from trap which is handled in userland now. 2002-06-08 07:17:19 +00:00
John Baldwin
363ba2bcfd According to Bruce, this file shouldn't have comments to describe what
options do.  Comments should be in NOTES and having the comments in two
places usually means that one place will just bitrot.  Thus, remove the
comment for KTRACE_REQUEST_POOL from the previous revision.

Requested by:	bde
2002-06-07 14:33:23 +00:00
John Baldwin
ea3fc8e4cd Overhaul the ktrace subsystem a bit. For the most part, the actual vnode
operations to dump a ktrace event out to an output file are now handled
asychronously by a ktrace worker thread.  This enables most ktrace events
to not need Giant once p_tracep and p_traceflag are suitably protected by
the new ktrace_lock.

There is a single todo list of pending ktrace requests.  The various
ktrace tracepoints allocate a ktrace request object and tack it onto the
end of the queue.  The ktrace kernel thread grabs requests off the head of
the queue and processes them using the trace vnode and credentials of the
thread triggering the event.

Since we cannot assume that the user memory referenced when doing a
ktrgenio() will be valid and since we can't access it from the ktrace
worker thread without a bit of hassle anyways, ktrgenio() requests are
still handled synchronously.  However, in order to ensure that the requests
from a given thread still maintain relative order to one another, when a
synchronous ktrace event (such as a genio event) is triggered, we still put
the request object on the todo list to synchronize with the worker thread.
The original thread blocks atomically with putting the item on the queue.
When the worker thread comes across an asynchronous request, it wakes up
the original thread and then blocks to ensure it doesn't manage to write a
later event before the original thread has a chance to write out the
synchronous event.  When the original thread wakes up, it writes out the
synchronous using its own context and then finally wakes the worker thread
back up.  Yuck.  The sychronous events aren't pretty but they do work.

Since ktrace events can be triggered in fairly low-level areas (msleep()
and cv_wait() for example) the ktrace code is designed to use very few
locks when posting an event (currently just the ktrace_mtx lock and the
vnode interlock to bump the refcoun on the trace vnode).  This also means
that we can't allocate a ktrace request object when an event is triggered.
Instead, ktrace request objects are allocated from a pre-allocated pool
and returned to the pool after a request is serviced.

The size of this pool defaults to 100 objects, which is about 13k on an
i386 kernel.  The size of the pool can be adjusted at compile time via the
KTRACE_REQUEST_POOL kernel option, at boot time via the
kern.ktrace_request_pool loader tunable, or at runtime via the
kern.ktrace_request_pool sysctl.

If the pool of request objects is exhausted, then a warning message is
printed to the console.  The message is rate-limited in that it is only
printed once until the size of the pool is adjusted via the sysctl.

I have tested all kernel traces but have not tested user traces submitted
by utrace(2), though they should work fine in theory.

Since a ktrace request has several properties (content of event, trace
vnode, details of originating process, credentials for I/O, etc.), I chose
to drop the first argument to the various ktrfoo() functions.  Currently
the functions just assume the event is posted from curthread.  If there is
a great desire to do so, I suppose I could instead put back the first
argument but this time make it a thread pointer instead of a vnode pointer.

Also, KTRPOINT() now takes a thread as its first argument instead of a
process.  This is because the check for a recursive ktrace event is now
per-thread instead of process-wide.

Tested on:	i386
Compiles on:	sparc64, alpha
2002-06-07 05:32:59 +00:00
Matthew N. Dodd
26837af419 'device hea' is no longer broken.
Add 'nowerror' to a few 'hea' files to ignore warnings on volatiles.
2002-06-07 02:04:09 +00:00
Justin T. Gibbs
cdd49e97b4 Hook up the ahd driver. 2002-06-06 16:35:58 +00:00
Prafulla Deuskar
a7fabc2b60 Added support for 82545EM and 82546EB based adapters.
Added Vlan support.

MFC after:	1 week
2002-06-03 22:30:51 +00:00
Matthew N. Dodd
26c1165dce Add new 'hea' driver files. 2002-06-03 09:14:12 +00:00
Alfred Perlstein
6e330f3e36 bde noticed that SOMAXCONN breaks pretty badly as an option for LINT.
so back it out.
2002-06-02 04:32:52 +00:00
Brooks Davis
09d225d8c3 The loop back device hasn't been a count device for a while so remove
the number of interfaces.
2002-05-31 06:28:13 +00:00
Takanori Watanabe
80f1001813 Make oldcard and newcard kernel module work. 2002-05-30 17:38:00 +00:00
David E. O'Brien
31741f8a9e PHK claims there is a crc32.c now. 2002-05-29 21:58:56 +00:00
David E. O'Brien
22f24d720a Back out revision 1.639. PHK filed to commit the libkern file. 2002-05-29 21:57:27 +00:00
Poul-Henning Kamp
f4258597dc Add one copy of crc32() and crc32_tab[] in libkern, and remove it two other
places.

Comment out crc32 related definitions in zlib.h, we don't seem to have the
corresponding code in our kernel.
2002-05-29 20:24:09 +00:00
Jake Burkholder
1982efc5c2 Merge the code in pv.c into pmap.c directly. Place all page mappings onto
the pv lists in the vm_page, even unmanaged kernel mappings.  This is so
that the virtual cachability of these mappings can be tracked when a page
is mapped to more than one virtual address.  All virtually cachable
mappings of a physical page must have the same virtual colour, or illegal
alises can be created in the data cache.  This is a bit tricky because we
still have to recognize managed and unmanaged mappings, even though they
are all on the pv lists.
2002-05-29 06:08:45 +00:00
Marcel Moolenaar
bcd46c600a Add support to GEOM for GUID Partition Tables (GPTs). The support
is currently conditional on both the GEOM and GEOM_GPT options to
avoid getting GPT by default and having the MBR and GPT classes
clash.
The correct behaviour of the MBR class would be to back-off (reject)
a MBR if it's a Protective MBR (a MBR with a single partition of type
0xEE that spans the whole disk (as far as the MBR is concerned).
The correct behaviour if the GPT class would be to back-off (reject)
a GPT if there's a MBR that's not a Protective MBR.

At this stage it's inconvenient to destroy a good MBR when working
with GPTs that it's more convenient to have the MBR class back-off
when it detects the GPT signature on disk and have the GPT class
ignore the MBR.

In sys/gpt.h UUIDs (GUIDs) for the following FreeBSD partitions
have been defined:

GPT_ENT_TYPE_FREEBSD
	FreeBSD slice with disklabel. This is the equivalent of
	the well-known FreeBSD MBR partition type.
GPT_ENT_TYPE_FREEBSD_{SWAP|UFS|UFS2|VINUM}
	FreeBSD partitions in the context of disklabel. This is
	speculating on the idea to use the GPT to hold partitions
	instead if slices and removing the fixed (and low) limits
	we have on the number of partitions.

This commit lacks a GPT image for the regression suite.
2002-05-28 09:04:48 +00:00
Marcel Moolenaar
52183d0145 Add uuidgen(2) and uuidgen(1).
The uuidgen command, by means of the uuidgen syscall, generates one
or more Universally Unique Identifiers compatible with OSF/DCE 1.1
version 1 UUIDs.

From the Perforce logs (change 11995):

Round of cleanups:
o  Give uuidgen() the correct prototype in syscalls.master
o  Define struct uuid according to DCE 1.1 in sys/uuid.h
o  Use struct uuid instead of uuid_t. The latter is defined
   in sys/uuid.h but should not be used in kernel land.
o  Add snprintf_uuid(), printf_uuid() and sbuf_printf_uuid()
   to kern_uuid.c for use in the kernel (currently geom_gpt.c).
o  Rename the non-standard struct uuid in kern/kern_uuid.c
   to struct uuid_private and give it a slightly better definition
   for better byte-order handling. See below.
o  In sys/gpt.h, fix the broken uuid definitions to match the now
   compliant struct uuid definition. See below.
o  In usr.bin/uuidgen/uuidgen.c catch up with struct uuid change.

A note about byte-order:
        The standard failed to provide a non-conflicting and
unambiguous definition for the binary representation. My initial
implementation always wrote the timestamp as a 64-bit little-endian
(2s-complement) integral. The clock sequence was always written
as a 16-bit big-endian (2s-complement) integral. After a good
nights sleep and couple of Pan Galactic Gargle Blasters (not
necessarily in that order :-) I reread the spec and came to the
conclusion that the time fields are always written in the native
by order, provided the the low, mid and hi chopping still occurs.
The spec mentions that you "might need to swap bytes if you talk
to a machine that has a different byte-order". The clock sequence
is always written in big-endian order (as is the IEEE 802 address)
because its division is resulting in bytes, making the ordering
unambiguous.
2002-05-28 06:16:08 +00:00
Poul-Henning Kamp
291daf5735 Add a proof-of-concept encryption class.
"The only hard problem in cryptography is key-management."

All sectors are encrypted with AES in CBC mode using a constant key,
currently compiled in and all zero.

To activate this module, write the magic header on the partition:

	echo "<<FreeBSD-GEOM-AES>>" | dd conv=sync of=/dev/md98

The encrypted device will be one sector shorter and have ".aes"
appended to its name.

Sponsored by: DARPA & NAI Labs.
2002-05-26 18:14:38 +00:00
Jake Burkholder
a6b82b31b1 Remove a hack for using an external compiler if cross compiling. 2002-05-26 15:55:28 +00:00
Peter Wemm
e09d00a880 For now, make the .ifdef GCC3 case default. We should change -Wno-format
back to -fformat-extensions (or whatever) when we have the functionality.
We are gaining warnings again that should be fixed but the are being hidden
by NO_WERROR and all the -Wformat noise.
2002-05-24 01:02:45 +00:00
Ruslan Ermilov
1cd1fdeaf5 Fixed broken ``make -jX install''.
Spotted by:	make release TARGET_ARCH=ia64
2002-05-23 07:25:01 +00:00
John Baldwin
2498cf8c42 Add code to make default mutexes adaptive if the ADAPTIVE_MUTEXES kernel
option is used (not on by default).

- In the case of trying to lock a mutex, if the MTX_CONTESTED flag is set,
  then we can safely read the thread pointer from the mtx_lock member while
  holding sched_lock.  We then examine the thread to see if it is currently
  executing on another CPU.  If it is, then we keep looping instead of
  blocking.
- In the case of trying to unlock a mutex, it is now possible for a mutex
  to have MTX_CONTESTED set in mtx_lock but to not have any threads
  actually blocked on it, so we need to handle that case.  In that case,
  we just release the lock as if MTX_CONTESTED was not set and return.
- We do not adaptively spin on Giant as Giant is held for long times and
  it slows SMP systems down to a crawl (it was taking several minutes,
  like 5-10 or so for my test alpha and sparc64 SMP boxes to boot up when
  they adaptively spinned on Giant).
- We only compile in the code to do this for SMP kernels, it doesn't make
  sense for UP kernels.

Tested on:	i386, alpha, sparc64
2002-05-21 20:47:11 +00:00
Noriaki Mitsunaga
15e19cbbe8 MFi386: 1.398-1.399 (${MACHINE_ARCH}_dump.c -> dump_machdep.c) 2002-05-21 04:13:08 +00:00
Jake Burkholder
f7c81a5182 De-inline the tlb demap functions. These were so big that gcc3.1 refused
to inline them anyway.  ;)
2002-05-20 16:10:17 +00:00
Yoshihiro Takahashi
db39e02e6b MFi386: revision 1.400. 2002-05-19 13:20:05 +00:00
Yoshihiro Takahashi
05012df834 Remove unneeded entries. 2002-05-19 13:18:10 +00:00
Marcel Moolenaar
1a4a595c4b Remove CWARNFLAGS and add GCC3. We handle GCC3.x specific flags
centrally now that we have GCC3 in the tree. The GCC3 variable
is a helper during the switch.
2002-05-19 03:41:48 +00:00
Marcel Moolenaar
c444f61706 Hook up the new linux_ptrace implementation.
PR: 33299
Submitted by: Alexander N. Kabaev <ak03@gte.com>
2002-05-19 01:27:14 +00:00
Robert Watson
2bab796d96 Remove IFS from 5.0-CURRENT. This facilitates introducing UFS2 as
IFS had its fingers deep in the belly of the UFS/FFS split.  IFS
will be reimplemented by the maintainer at a later date.

Requested by:	adrian (maintainer)
2002-05-19 00:11:08 +00:00
Tom Rhodes
d394511de3 More s/file system/filesystem/g 2002-05-16 21:28:32 +00:00
Ian Dowse
2bf6dd18ba The ufs/ffs files are no longer required by ext2fs. 2002-05-16 20:54:44 +00:00
Ian Dowse
9504abaad7 Complete the separation of ext2fs from ufs by copying the remaining
shared code and converting all ufs references. Originally it may
have made sense to share common features between the two filesystems,
but recently it has only caused problems, the UFS2 work being the
final straw.

All UFS_* indirect calls are now direct calls to ext2_* functions,
and ext2fs-specific mount and inode structures have been introduced.
2002-05-16 19:08:03 +00:00
Jeff Roberson
0e2d6cc899 Disable the shared locking namei() code for now. It breaks several stacking
filesystems.  This is on hold until the rest of VFS Locking is reviewed and
deemed safe.  It can be enabled with 'options LOOKUP_SHARED'.
2002-05-14 21:59:49 +00:00
Ruslan Ermilov
be1d673d24 Check that kldxref(8) exists before running it. 2002-05-14 07:49:12 +00:00
Benno Rice
289fc68db6 Build the fpu support routines. 2002-05-13 07:53:22 +00:00
Jake Burkholder
60b22c6d62 ${MACHINE_ARCH}dump.c -> dump_machdep.c. 2002-05-13 02:40:21 +00:00
Bruce Evans
26e5d4d14f Translated -malign-functions=4 to -falign-functions=16 for the new gcc. 2002-05-12 15:51:38 +00:00
Andrew Gallatin
338a21a47a Restore the ability to take crashdumps on alpha. This was cut and pasted
nearly in its entirety from i386, so it retains the phk/nati copyright.

Savecore likes the results, but I have no way to test it as gdb is
still broken.
2002-05-11 21:53:46 +00:00
Dima Dorfman
b90faaf350 sysctl -w -> sysctl 2002-05-11 06:06:11 +00:00
John Baldwin
2065f9d26e Add a dummy cleandir target to the kernel section so that make buildkernel
actually works on a kernel config with NO_MODULES set.
2002-05-11 02:25:02 +00:00
Bruce Evans
7085e70878 Reconnect db_elf.c to the build (now under "options DDB_NOKLDSYM"). It
doesn't actually build yet.
2002-05-07 10:59:52 +00:00
David E. O'Brien
856f29cf94 Use -ffreestanding for kernel bits unconditionally. 2002-05-04 20:07:33 +00:00
Dag-Erling Smørgrav
cff135d87c Join the pissing contest: generate LINT with a single sed(1) command.
Smaller script, smaller (though equivalent) output.
2002-05-02 16:34:47 +00:00
Warner Losh
3498b5ed09 We don't need no stinkin' echos here.
Instead, don't run kldxref if you don't have one on your system.
2002-05-01 19:24:26 +00:00
David E. O'Brien
9fa411ae4a Use makeobjops.awk rather than makeobjops.pl.
(with big thanks to Oliver Fromme <olli@fromme.com>)
2002-05-01 03:28:14 +00:00
Peter Wemm
06639be707 Catch any stray KMODDEPS entries to make sure they do not keep turning up. 2002-05-01 01:32:28 +00:00
Scott Long
44b00b1df3 Note that the aacp device requires CAM 2002-04-30 22:47:26 +00:00
Julian Elischer
9a27ef0da4 Add the myson controllers to LINT
MFC after:	2 weeks
2002-04-30 16:08:16 +00:00
Benno Rice
b23e18d688 Add sigcode.S 2002-04-30 11:13:16 +00:00
Jeff Roberson
8efc4eff00 Add a new UMA debugging facility. This will overwrite freed memory with
0xdeadc0de and then check for it just before memory is handed off as part
of a new request.  This will catch any post free/pre alloc modification of
memory, as well as introduce errors for anything that tries to dereference
it as a pointer.

This code takes the form of special init, fini, ctor and dtor routines that
are specificly used by malloc.  It is in a seperate file because additional
debugging aids will want to live here as well.
2002-04-30 07:54:25 +00:00
David E. O'Brien
f3320cac13 Barrow something from the `nmap' port to help the ENOCLUE people upgrading
from releng4 and are not able to properly read make(1) output.
2002-04-29 06:35:25 +00:00
Marcel Moolenaar
4ee5409b54 Add mca.c. 2002-04-28 08:43:47 +00:00
Eric Anholt
67a2a28fe4 Hook the DRM up to the build and add it to NOTES.
Approved by:	des
2002-04-28 04:58:40 +00:00
Scott Long
fe3cb0e1ec Add a CAM interface to the aac driver. This is useful in case you should
ever connect a SCSI Cdrom/Tape/Jukebox/Scanner/Printer/kitty-litter-scooper
to your high-end RAID controller.  The interface to the arrays is still
via the block interface; this merely provides a way to circumvent the
RAID functionality and access the SCSI buses directly.  Note that for
somewhat obvious reasons, hard drives are not exposed to the da driver
through this interface, though you can still talk to them via the pass
driver.  Be the first on your block to low-level format unsuspecting
drives that are part of an array!

To enable this, add the 'aacp' device to your kernel config.

MFC after:	3 days
2002-04-27 01:31:17 +00:00
Justin T. Gibbs
e905720a60 aic7xxx_freebsd.c -> aic7xxx_osm.c 2002-04-24 16:59:47 +00:00
Ruslan Ermilov
2cbc81ffe4 The install.debug and reinstall.debug targets are needed solely
to build kernel and kernel modules so stop supporting them in
bsd.subdir.mk and reimplement them in kern.post.mk and kmod.mk
as special versions of the install and reinstall targets, and
only define them if DEBUG is also defined (when debug versions
are really built).

Prompted by:	bde
2002-04-24 11:26:19 +00:00
Ruslan Ermilov
b25a566d47 Merge bsd.obj.mk's version of the _SUBDIR target with bsd.subdir.mk.
Ensure all standard targets honor SUBDIR.  Now `make obj' descends into
SUBDIRs even if NOOBJ is set (some descendants may still need an object
directory, but we do not have such precedents).  Now `make install' in
non-bsd.subdir.mk makefiles runs `afterinstall' target _after_ `install'
in SUBDIRs, like we do in bsd.subdir.mk.  Nothing depended on the wrong
order anyway.

Fixed `distribute' targets (except for the bsd.subdir.mk version) so that
they do not depend on _SUBDIR; `distribute' calls `install' which already
depends on _SUBDIR.

De-standardize `maninstall', otherwise manpages would be installed twice.
(To be revised later.)
2002-04-23 09:03:56 +00:00
Ruslan Ermilov
05276e5f8c Back out remnants of revision 1.97: we don't need TARGET_ARCH here. 2002-04-22 15:53:04 +00:00
Ruslan Ermilov
0ac2fc87d2 Use standard bsd.init.mk prologue. 2002-04-22 15:47:11 +00:00
Mike Barcroft
04961ff8be Reenable the newly unbroken hfa device. 2002-04-20 19:44:38 +00:00
Mike Barcroft
b4ff0fb0f7 Comment out and mark broken the hea and hfa devices until someone has
time to fix them.
2002-04-20 00:51:30 +00:00
Semen Ustimenko
9cd64fb3dd Move tx(4) driver to sys/dev/tx. BTW split hardware structures and constants
into if_txreg.h.

MFC after:	1 week
2002-04-19 22:43:57 +00:00
Marcel Moolenaar
81b22b1dfd Respect setting of NM to allow cross-building. 2002-04-19 09:04:53 +00:00
Robert Watson
aa4019efa1 Witness doesn't just track mutexes, so don't say mutexes specifically. It
also tracks sxlocks, etc.
2002-04-18 03:41:49 +00:00
Matthew N. Dodd
906cf7526c - Convert the 'hfa' ATM interface driver to newbus.
- Add stubs for EISA and SBUS cards.
  (VME, FutureBUS, and TurboChannel stubs not provided.)
- Add infrastructure to build driver and bus front-end modules.
2002-04-17 00:26:09 +00:00
Julian Elischer
440d3f4df5 Add entry for the myson ethernet driver
Submitted by:	Myson , Taiwan
2002-04-16 20:23:58 +00:00
David E. O'Brien
89de0c9cbf pal.s is no longer needed for the kernel to build with Gcc. We now use
in-line macros.  pal.s remains however for use by Compaq 'ccc' some day.
2002-04-15 23:28:10 +00:00
Dag-Erling Smørgrav
4db0d7f16f Document WITNESS_PROFILING.
Submitted by:	Hiten Pandya <hiten@uk.FreeBSD.org>
2002-04-15 19:42:15 +00:00
Benno Rice
2819d0ade2 Add ofwd to the GENERIC config for powerpc. 2002-04-15 12:30:18 +00:00
Benno Rice
f8f889484a Grab a major number for OpenFirmware disk devices. 2002-04-15 10:41:47 +00:00
Scott Long
df263cbd02 Add a filesystem driver for the Universal Disk Format. For more info,
see http://people.freebsd.org/~scottl/udf

 MFC after:	when asmodai gets the backport done
 Prodded by:	phk asmodai des
2002-04-14 16:36:49 +00:00
Peter Wemm
421f855923 Allow a kernel to be compiled with both SKI and acpica and still
work on real hardware.  (SKI used to break the sapic probes)
2002-04-14 04:33:41 +00:00
David E. O'Brien
0301e9c83b Turn on TGA support.
Submitted by:	Andrew M. Miklic <AndrwMklc@cs.com>
2002-04-13 22:34:16 +00:00