Commit Graph

5133 Commits

Author SHA1 Message Date
Rafal Jaworowski
8e321b7943 Support kernel crash mini dumps on ARM architecture.
Obtained from:	Juniper Networks, Semihalf
2008-11-06 16:20:27 +00:00
Ed Schouten
932ef5b5cd Reintroduce the snp(4) driver.
Because the TTY hooks interface was not finished when I imported the
MPSAFE TTY layer, I had to disconnect the snp(4) driver. This snp(4)
implementation has been sitting in my P4 branch for some time now.
Unfortunately it still doesn't use the same error handling as snp(4)
(returning codes through FIONREAD), but it should already be usable.

I'm committing this to SVN, hoping someone else could polish off its
rough edges. It's always better than having a broken driver sitting in
the tree.
2008-11-05 15:04:03 +00:00
Alfred Perlstein
c63c25015a add usb2_if.m to mfiles to unbreak build of modules. 2008-11-04 03:42:01 +00:00
Alfred Perlstein
eabe30fc9c Bring in USB4BSD, Hans Petter Selasky rework of the USB stack
that includes significant features and SMP safety.

This commit includes a more or less complete rewrite of the *BSD USB
stack, including Host Controller and Device Controller drivers and
updating all existing USB drivers to use the new USB API:

1) A brief feature list:

  - A new and mutex enabled USB API.

  - Many USB drivers are now running Giant free.

  - Linux USB kernel compatibility layer.

  - New UGEN backend and libusb library, finally solves the "driver
    unloading" problem. The new BSD licensed libusb20 library is fully
    compatible with libusb-0.1.12 from sourceforge.

  - New "usbconfig" utility, for easy configuration of USB.

  - Full support for Split transactions, which means you can use your
    full speed USB audio device on a high speed USB HUB.

  - Full support for HS ISOC transactions, which makes writing drivers
    for various HS webcams possible, for example.

  - Full support for USB on embedded platforms, mostly cache flushing
    and buffer invalidating stuff.

  - Safer parsing of USB descriptors.

  - Autodetect of annoying USB install disks.

  - Support for USB device side mode, also called USB gadget mode,
    using the same API like the USB host side. In other words the new
    USB stack is symmetric with regard to host and device side.

  - Support for USB transfers like I/O vectors, means more throughput
    and less interrupts.

  - ... see the FreeBSD quarterly status reports under "USB project"

2) To enable the driver in the default kernel build:

2.a) Remove all existing USB device options from your kernel config
file.

2.b) Add the following USB device options to your kernel configuration
file:

# USB core support
device          usb2_core

# USB controller support
device		usb2_controller
device		usb2_controller_ehci
device		usb2_controller_ohci
device		usb2_controller_uhci

# USB mass storage support
device		usb2_storage
device		usb2_storage_mass

# USB ethernet support, requires miibus
device		usb2_ethernet
device		usb2_ethernet_aue
device		usb2_ethernet_axe
device		usb2_ethernet_cdce
device		usb2_ethernet_cue
device		usb2_ethernet_kue
device		usb2_ethernet_rue
device		usb2_ethernet_dav

# USB wireless LAN support
device		usb2_wlan
device		usb2_wlan_rum
device		usb2_wlan_ral
device		usb2_wlan_zyd

# USB serial device support
device		usb2_serial
device		usb2_serial_ark
device		usb2_serial_bsa
device		usb2_serial_bser
device		usb2_serial_chcom
device		usb2_serial_cycom
device		usb2_serial_foma
device		usb2_serial_ftdi
device		usb2_serial_gensa
device		usb2_serial_ipaq
device		usb2_serial_lpt
device		usb2_serial_mct
device		usb2_serial_modem
device		usb2_serial_moscom
device		usb2_serial_plcom
device		usb2_serial_visor
device		usb2_serial_vscom

# USB bluetooth support
device		usb2_bluetooth
device		usb2_bluetooth_ng

# USB input device support
device		usb2_input
device		usb2_input_hid
device		usb2_input_kbd
device		usb2_input_ms

# USB sound and MIDI device support
device		usb2_sound

2) To enable the driver at runtime:

2.a) Unload all existing USB modules. If USB is compiled into the
kernel then you might have to build a new kernel.

2.b) Load the "usb2_xxx.ko" modules under /boot/kernel having the same
base name like the kernel device option.

Submitted by: Hans Petter Selasky hselasky at c2i dot net
Reviewed by: imp, alfred
2008-11-04 02:31:03 +00:00
Doug Rabson
a9148abd9d Implement support for RPCSEC_GSS authentication to both the NFS client
and server. This replaces the RPC implementation of the NFS client and
server with the newer RPC implementation originally developed
(actually ported from the userland sunrpc code) to support the NFS
Lock Manager.  I have tested this code extensively and I believe it is
stable and that performance is at least equal to the legacy RPC
implementation.

The NFS code currently contains support for both the new RPC
implementation and the older legacy implementation inherited from the
original NFS codebase. The default is to use the new implementation -
add the NFS_LEGACYRPC option to fall back to the old code. When I
merge this support back to RELENG_7, I will probably change this so
that users have to 'opt in' to get the new code.

To use RPCSEC_GSS on either client or server, you must build a kernel
which includes the KGSSAPI option and the crypto device. On the
userland side, you must build at least a new libc, mountd, mount_nfs
and gssd. You must install new versions of /etc/rc.d/gssd and
/etc/rc.d/nfsd and add 'gssd_enable=YES' to /etc/rc.conf.

As long as gssd is running, you should be able to mount an NFS
filesystem from a server that requires RPCSEC_GSS authentication. The
mount itself can happen without any kerberos credentials but all
access to the filesystem will be denied unless the accessing user has
a valid ticket file in the standard place (/tmp/krb5cc_<uid>). There
is currently no support for situations where the ticket file is in a
different place, such as when the user logged in via SSH and has
delegated credentials from that login. This restriction is also
present in Solaris and Linux. In theory, we could improve this in
future, possibly using Brooks Davis' implementation of variant
symlinks.

Supporting RPCSEC_GSS on a server is nearly as simple. You must create
service creds for the server in the form 'nfs/<fqdn>@<REALM>' and
install them in /etc/krb5.keytab. The standard heimdal utility ktutil
makes this fairly easy. After the service creds have been created, you
can add a '-sec=krb5' option to /etc/exports and restart both mountd
and nfsd.

The only other difference an administrator should notice is that nfsd
doesn't fork to create service threads any more. In normal operation,
there will be two nfsd processes, one in userland waiting for TCP
connections and one in the kernel handling requests. The latter
process will create as many kthreads as required - these should be
visible via 'top -H'. The code has some support for varying the number
of service threads according to load but initially at least, nfsd uses
a fixed number of threads according to the value supplied to its '-n'
option.

Sponsored by:	Isilon Systems
MFC after:	1 month
2008-11-03 10:38:00 +00:00
Scott Long
64c71632bf Move the CAM passthrough code into a true module so that it doesn't have to be
compiled into the main AMR driver.  It's code that is nice to have but not
required for normal operation, and it is reported to cause problems for some
people.
2008-11-03 00:53:54 +00:00
Konstantin Belousov
e0dec6ebb1 Revert r184516. Option RL_TWISTER_ENABLE is no more after it became
loader tunable.

Pointy hat to:	me
2008-11-02 19:40:24 +00:00
Warner Losh
972f68aeab Move mn over. One of the last stragglers in sys/pci. There's no
module built for this hardware, so no changes needed.
2008-11-02 17:04:54 +00:00
Warner Losh
4a8cdcaf87 Make RL_TWISTER_ENABLE a tunable/sysctl. Eliminate it as an option.
Fix module build.

Submitted by:	Kostik Belousov
2008-11-02 16:50:57 +00:00
Ed Schouten
c9dba40cc8 Reimplement the /dev/console device node.
One of the pieces of code that I had left alone during the development
of the MPSAFE TTY layer, was tty_cons.c. This file actually has two
different functions:

- It contains low-level console input/output routines (cnputc(), etc).

- It creates /dev/console and wraps all its cdevsw calls to the
  appropriate TTY.

This commit reimplements the second set of functions by moving it
directly into the TTY layer. /dev/console is now a character device node
that's basically a regular TTY, but does a lookup of `si_drv1' each time
you open it. d_write has also been changed to call log_console().
d_close() is not present, because we must make sure we don't revoke the
TTY after writing a log message to it.

Even though I'm not convinced this is in line with the future directions
of our console code, it is a good move for now. It removes recursive
locking from the top half of the TTY layer. The previous implementation
called into the TTY layer with Giant held.

I'm renaming tty_cons.c to kern_cons.c now. The code hardly contains any
TTY related bits, so we'd better give it a less misleading name.

Tested by:	Andrzej Tobola <ato iem pw edu pl>,
		Carlos A.M. dos Santos <unixmania gmail com>,
		Eygene Ryabinkin <rea-fbsd codelabs ru>
2008-11-01 08:35:28 +00:00
Warner Losh
5702451cd5 Add RL_TWISTER_ENABLE. 2008-11-01 00:28:44 +00:00
Warner Losh
9b27478be4 Add RL_TWISTER_ENABLE option. This enables the magic bits to do long
cable tuning.  This has helped in some installations for hardware
deployed by a former employer.  Made optional because the lists aren't
full of complaints about these cards... even when they were wildly
popular.

Reviewed by:	attilio@, jhb@, trhodes@ (all an older version of the patch)
2008-10-31 23:24:13 +00:00
Maxim Sobolev
b0606bd11a Make it possible to compile kernel with KTR but without DDB. 2008-10-30 21:48:28 +00:00
Robert Watson
564f8f0fee Break out strictly credential-related portions of mac_process.c into a
new file, mac_cred.c.

Obtained from:	TrustedBSD Project
2008-10-28 21:53:10 +00:00
Bjoern A. Zeeb
d90e0bbe81 Add the files missed with r184331 to make mac_bsdextended compile again. 2008-10-27 17:57:03 +00:00
Nathan Whitehorn
b4dbc59983 Add ADB support. This provides support for the external ADB bus on the PowerMac
G3 as well as the internal ADB keyboard and mice in PowerBooks and iBooks. This
also brings in Mac GPIO support, for which we should eventually have a better
interface.

Obtained from:  NetBSD (CUDA and PMU drivers)
2008-10-26 19:37:38 +00:00
Marcel Moolenaar
e00251b7ed Add a driver for flash memory that implements to the Common Flash
Memory Interface (CFI). The flash memory can be read and written
to through /dev/cfi# and an ioctl() exists so processes can read
the query information.
The driver supports the AMD and Intel command set, though only
the AMD command has been tested.

Obtained from:	Juniper Networks, Inc.
2008-10-25 06:18:12 +00:00
Marcel Moolenaar
08077f589c Add a driver for the Local Bus Controller.
Obtained from:	Juniper Networks, Inc.
2008-10-25 06:03:40 +00:00
Nick Hibma
fe75118b0f Add U3G_DEBUG to LINT 2008-10-24 07:16:13 +00:00
Marcel Moolenaar
fd872be586 Add mips/conf/DEFAULTS and populate it with:
machine arm
        device  mem
	device  uart_ns8250
        options GEOM_BSD
        options GEOM_MBR

Remove the first three from all kernel configuration files
(sometimes commented-out) and change geom_bsd and geom_mbr
from standard to optional.
2008-10-23 02:16:38 +00:00
Marcel Moolenaar
1706f03059 Add arm/conf/DEFAULTS and populate it with:
machine arm
        device  mem
        options GEOM_BSD
        options GEOM_MBR

Remove the first two from all kernel configuration files and
change geom_bsd and geom_mbr from standard to optional.
2008-10-23 01:51:55 +00:00
David E. O'Brien
5e21b51b37 Clarify the PREEMPTION description a little. 2008-10-22 17:50:45 +00:00
Alexander Motin
831f5dcf12 Import sdhci (PCI SD Host Controller) driver.
Driver supports PCI devices with class 8 and subclass 5 according to
SD Host Controller Specification.

Update NOTES, enable module and static build.
Enable related mmc and mmcsd modules build.

Discussed on:   mobile@, current@
2008-10-21 20:33:40 +00:00
Nathan Whitehorn
51d163d3e9 Convert PowerPC AIM PCI and nexus busses to standard OFW bus interface. This
simplifies certain device attachments (Kauai ATA, for instance), and makes
possible others on new hardware.

On G5 systems, there are several otherwise standard PCI devices
(Serverworks SATA) that will not allow their interrupt properties to be
written, so this information must be supplied directly from Open Firmware.

Obtained from:	sparc64
2008-10-14 14:54:14 +00:00
Rafal Jaworowski
373bbe25ff Introduce basic support for Marvell families of system-on-chip ARM devices:
*  Orion
     - 88F5181
     - 88F5182
     - 88F5281

  * Kirkwood
     - 88F6281

  * Discovery
     - MV78100

The above families of SOCs are built around CPU cores compliant with ARMv5TE
instruction set architecture definition. They share a number of integrated
peripherals. This commit brings support for the following basic elements:

  * GPIO
  * Interrupt controller
  * L1, L2 cache
  * Timers, watchdog, RTC
  * TWSI (I2C)
  * UART

Other peripherals drivers will be introduced separately.

Reviewed by:	imp, marcel, stass (Thanks guys!)
Obtained from:	Marvell, Semihalf
2008-10-13 20:07:13 +00:00
Bruce M Simpson
7051a3c69d Fix the CFE ldscript after the cutover to tradmips.
Diff minimization against ldscript.mips.

Note: CFE will not load PT_DYNAMIC segments, therefore the dynamic
sections have been placed in a PT_LOAD segment for now. This is not
too efficient in terms of memory use, they should probably get
placed in the text segment.
2008-10-13 06:07:58 +00:00
Nick Hibma
483b9e4739 Say hello to the u3g driver, implementing support for 3G modems.
This was located in the ubsa driver, but should be moved into a separate
driver:

- 3G modems provide multiple serial ports to allow AT commands while the PPP
  connection is up.
- 3G modems do not provide baud rate or other serial port settings.
- Huawei cards need specific initialisation.
- ubsa is for Belkin adapters, an Linuxy choice for another device like 3G.

Speeds achieved here with a weak signal at best is ~40kb/s (UMTS). No spooky
STALLED messages as well.

Next: Move over all entries for Sierra and Novatel cards once I have found
testers, and implemented serial port enumeration for Sierra (or rather have
Andrea Guzzo do it). They list all endpoints in 1 iface instead of 4 ifaces.

Submitted by:	aguzzo@anywi.com
MFC after:	3 weeks
2008-10-09 21:25:01 +00:00
Søren Schmidt
13014ca04a This is the roumored ATA modulerisation works, and it needs a little explanation.
If you just config KERNEL as usual there should be no apparent changes, you'll get all chipset support code compiled in.

However there is now a way to only compile in code for chipsets needed on a pr vendor basis. ATA now has the following "device" entries:

atacore:	ATA core functionality, always needed for any ATA setup

atacard:	CARDBUS support
atacbus:	PC98 cbus support
ataisa:		ISA bus support
atapci:		PCI bus support only generic chipset support.

ataahci:	AHCI support, also pulled in by some vendor modules.

ataacard, ataacerlabs, ataadaptec, ataamd, ataati, atacenatek, atacypress, atacyrix, atahighpoint, ataintel, ataite, atajmicron, atamarvell, atamicron, atanational, atanetcell, atanvidia, atapromise, ataserverworks, atasiliconimage, atasis, atavia;	Vendor support, ie atavia for VIA chipsets

atadisk:	ATA disk driver
ataraid:	ATA softraid driver

atapicd:	ATAPI cd/dvd driver
atapifd:	ATAPI floppy/flashdisk driver
atapist:	ATAPI tape driver

atausb:		ATA<>USB bridge
atapicam:	ATA<>CAM bridge

This makes it possible to config a kernel with just VIA chipset support by having the following ATA lines in the kernel config file:

device          atacore
device          atapci
device          atavia

And then you need the atadisk, atapicd etc lines in there just as usual.

If you use ATA as modules loaded at boot there is few changes except the rename of the "ata" module to "atacore", things looks just as usual.
However under atapci you now have a whole bunch of vendor specific drivers, that you can kldload individually depending on you needs. Drivers have the same names as used in the kernel config explained above.
2008-10-09 12:56:57 +00:00
Antoine Brodin
61d9c8fa17 - Spell cam correctly (scbus), this makes it possible to compile hptiop
in GENERIC and LINT. [1]
- Rename hpt_dbg_level to hpt_iop_dbg_level to avoid multiple definition
of hpt_dbg_level (hptmv also has hpt_dbg_level).

PR:		127551 [1]
Reviewed by:	scottl@
MFC after:	1 month
2008-10-04 10:39:31 +00:00
Stanislav Sedov
ba26d470bd - Add driver for Attansic L2 FastEthernet controller found on
Asus EeePC and some Asus mainboards.

Reviewed by:	yongari, rpaulo, jhb
Tested by:	many
Approved by:	kib (mentor)
MFC after:	1 week
2008-10-03 10:31:31 +00:00
Bjoern A. Zeeb
fa89f89ca6 Backout svn r183528.
SRCDIR is seeded from `pwd` which not only means src/sys/ but
also src/include/ (and possibly src/usr.sbin/amd/include/ ?).
Trying to build world resulted in

  ===> include (includes)
  cd /usr/src/include; make buildincludes; make installincludes
  creating osreldate.h from newvers.sh
  cd: can't cd to /usr/src/include/sys
  *** Error code 2

as there is apparently no src/include/sys.

There are multiple possible solutions ranging from seeding SRCDIR from
the environment to adding more substitution patterns.

Reported by:						sam, bz
Proper solution to be implemented and tested by:	peter
2008-10-03 10:08:36 +00:00
Bruce M Simpson
04ec403dd8 Allow clock_if.m to be referenced by kernel modules, this is useful
for testing that RTC drivers compile, though they generally aren't
set up for unload.
2008-10-02 14:45:29 +00:00
Peter Wemm
944e61bf88 Reduce the impact of svnversion. Just scan the src/sys tree, not all of
src.
2008-10-01 22:52:20 +00:00
John Baldwin
d59701d07d Remove the LOOKUP_SHARED kernel option. Instead, make vfs.lookup_shared
a loader tunable (it was already a sysctl).
2008-10-01 19:24:16 +00:00
Marius Strobl
20284fcdd9 Add a driver for Schizo' Fireplane/Safari to PCI 2.1 and Tomatillo'
JBus to PCI 2.2 bridges. In theory, this driver should also handle
`XMITS' Fireplane/Safari to PCI-X bridges but due to lack of access
to such hardware, support for these hasn't be fleshed out, yet.
2008-09-28 00:07:05 +00:00
Nathan Whitehorn
b7382e099d Add DMA support for Apple built-in ATA controllers.
Tested by:	grehan, marcotrillo@gmail.com
MFC after:	1 month
2008-09-27 15:13:44 +00:00
David E. O'Brien
ae72afe0f2 The kernel implemented 'memcmp' is an alias for 'bcmp'. However, memcmp
and bcmp are not the same thing.  'man bcmp' states that the return is
"non-zero" if the two byte strings are not identical.  Where as,
'man memcmp' states that the return is the "difference between the
first two differing bytes (treated as unsigned char values" if the
two byte strings are not identical.

So provide a proper memcmp(9), but it is a C implementation not a tuned
assembly implementation.  Therefore bcmp(9) should be preferred over memcmp(9).
2008-09-23 14:45:10 +00:00
Kip Macy
79775f8f1b Update cxgb include paths to not require prefixing with dev/cxgb
Submitted by:	Chelsio Inc.
2008-09-23 03:16:54 +00:00
Kip Macy
0c6e0345b7 Update to xen specific files for SMP
MFC after:	1 month
2008-09-23 03:13:33 +00:00
David E. O'Brien
ae528485c4 Add freebsd32 compat shims for ioctl(2)
MDIOCATTACH, MDIOCDETACH, MDIOCQUERY, and MDIOCLIST requests.
2008-09-22 16:09:16 +00:00
Marius Strobl
3aeb70f799 Revert this part of r183203 which wasn't meant to be committed, yet. 2008-09-20 11:46:07 +00:00
Marius Strobl
794748e37a Remove duplicate entry accidentally introduced with r183202. 2008-09-20 11:34:18 +00:00
Marius Strobl
36543717f7 Some of the assembly files depend on v9a/v9b-only instructions so
compile these with -mcpu=ultrasparc (which is the hard-coded default
of our system compiler), which allows the remainder of the kernel to
be compiled with "only" -mcpu=v9 for reference and testing purposes.
2008-09-20 11:28:42 +00:00
Warner Losh
f93ed32a82 Add atheros HAL building so the IDT kernel can build. 2008-09-19 19:46:11 +00:00
Warner Losh
04dd9464a4 mips_subr.c was in the Juniper code drop, but didn't have any
functions used by other code in the tree.  As such it was removed from
the merged tree until the functions were needed in the future.  The
file was missing from the FreeBSD import, but it was listed in the
files.mips file as being standard.  Remove it from there until such
time as we need one.
2008-09-19 19:26:38 +00:00
Warner Losh
1ca5d948a3 Merge from p4: add Juniper license statement. 2008-09-19 03:36:37 +00:00
Bjoern A. Zeeb
5164136d25 Turn on TCP_SIGNATURE for LINT builds. This should catch situations
we ran into in the past where places hidden by TCP_SIGNATURE were
missed.

It is possible to turn it on now that FAST_IPSEC (now know as IPSEC)
is enabled for LINT and the default and only IPsec implementation.
2008-09-13 14:06:36 +00:00
Marius Strobl
9fe27860ff Add drivers for the power management devices found on Fireplane/
Safari- and JBus-based machines. Currently the main purpose of
these drivers is debugging of the resource allocation on nexus(4)
and the register content of these devices though.
2008-09-10 20:22:27 +00:00
John Baldwin
26e4688329 Resurrect the sbni(4) driver. Someone finally tested the MPSAFE patches and
the driver worked ok with them.

Tested by:	friends of yar
2008-09-10 18:36:58 +00:00
Rui Paulo
d315eab224 Allow building k8temp on i386.
MFC after:	1 week
2008-09-09 22:37:29 +00:00
Rafal Jaworowski
286fa44565 ds133x: Introduce device_identify method; update NOTES.
Obtained from:	Semihalf
2008-09-08 10:40:48 +00:00
Marius Strobl
b898f38ce7 Switch sun4v to back to using its own clock.c, which was ressurected
in 182691, as the sparc64 version is going to be rototilled and sun4v
currently can't be verified to still work with the new sparc64 one
due to its overall state.
2008-09-03 17:31:13 +00:00
Warner Losh
55b418d32b Minor tweaks to remove references to files that aren't present in the
current FreeBSD/mips source base.  Make phases consistent.  Remove
comment that's no longer relevant.
2008-08-27 01:41:32 +00:00
Warner Losh
2da4559fe0 Sort the network options alphabetically. They were mostly
alphabetical before.
2008-08-27 01:31:42 +00:00
Warner Losh
7af423b34d Remove left-over divot from wi driver cleanup Sam did a while ago.
Since Symbol Firmware support was removed, it makes little sense to
have an option to enable loading of Symbol Firmware.
2008-08-27 01:26:14 +00:00
Rafal Jaworowski
321e12c82e tsec: Refactor driver's structure.
Split the driver into the core functionality part (sys/dev/tsec/if_tsec.c) and
the bus attachment (sys/dev/tsec/if_tsec_ocp.c).

This lets better integrate and maintain the driver in other environments with
different attachment abstractions (there is at least one other FreeBSD port --
MPC83xx -- which uses this TSEC driver, but with different local bus model
i.e. some OF derivative). While there, clean up and fix minor cosmetics.

Obtained from:	Semihalf
2008-08-26 10:41:49 +00:00
Warner Losh
e36dee2c86 MFp4: Sort a couple options alphabetically. 2008-08-26 07:28:27 +00:00
Julian Elischer
457af16631 VIMAGE is a global option 2008-08-24 21:33:10 +00:00
John Baldwin
aa7c1c059f 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
2008-08-23 21:00:40 +00:00
Robert Noland
a2a2d95441 Update drm kernel drivers.
This is a sync to mesa/drm pre-gem, with a few fixes on top of that.
It also contains one local patch supplied by kib@ that I can't apply to
git.master shared code.

Approved by:	flz
Obtained from:	mesa/drm git.master
MFC after:	2 weeks
2008-08-23 20:59:12 +00:00
Robert Watson
6356dba0b4 Introduce two related changes to the TrustedBSD MAC Framework:
(1) Abstract interpreter vnode labeling in execve(2) and mac_execve(2)
    so that the general exec code isn't aware of the details of
    allocating, copying, and freeing labels, rather, simply passes in
    a void pointer to start and stop functions that will be used by
    the framework.  This change will be MFC'd.

(2) Introduce a new flags field to the MAC_POLICY_SET(9) interface
    allowing policies to declare which types of objects require label
    allocation, initialization, and destruction, and define a set of
    flags covering various supported object types (MPC_OBJECT_PROC,
    MPC_OBJECT_VNODE, MPC_OBJECT_INPCB, ...).  This change reduces the
    overhead of compiling the MAC Framework into the kernel if policies
    aren't loaded, or if policies require labels on only a small number
    or even no object types.  Each time a policy is loaded or unloaded,
    we recalculate a mask of labeled object types across all policies
    present in the system.  Eliminate MAC_ALWAYS_LABEL_MBUF option as it
    is no longer required.

MFC after:	1 week ((1) only)
Reviewed by:	csjp
Obtained from:	TrustedBSD Project
Sponsored by:	Apple, Inc.
2008-08-23 15:26:36 +00:00
Marius Strobl
9888af9c4e Remove clkbrd(4) as a separate device and compile it solely based
on the presence of fhc(4) instead; we by far don't support all of
the functionality provide by the clock board but in general it's
an integral part of FireHose-based systems which shouldn't be
possible to omit.
2008-08-23 14:28:44 +00:00
Marius Strobl
898112a7dc cosmetic changes and style fixes 2008-08-22 20:28:19 +00:00
Ed Schouten
bc093719ca Integrate the new MPSAFE TTY layer to the FreeBSD operating system.
The last half year I've been working on a replacement TTY layer for the
FreeBSD kernel. The new TTY layer was designed to improve the following:

- Improved driver model:

  The old TTY layer has a driver model that is not abstract enough to
  make it friendly to use. A good example is the output path, where the
  device drivers directly access the output buffers. This means that an
  in-kernel PPP implementation must always convert network buffers into
  TTY buffers.

  If a PPP implementation would be built on top of the new TTY layer
  (still needs a hooks layer, though), it would allow the PPP
  implementation to directly hand the data to the TTY driver.

- Improved hotplugging:

  With the old TTY layer, it isn't entirely safe to destroy TTY's from
  the system. This implementation has a two-step destructing design,
  where the driver first abandons the TTY. After all threads have left
  the TTY, the TTY layer calls a routine in the driver, which can be
  used to free resources (unit numbers, etc).

  The pts(4) driver also implements this feature, which means
  posix_openpt() will now return PTY's that are created on the fly.

- Improved performance:

  One of the major improvements is the per-TTY mutex, which is expected
  to improve scalability when compared to the old Giant locking.
  Another change is the unbuffered copying to userspace, which is both
  used on TTY device nodes and PTY masters.

Upgrading should be quite straightforward. Unlike previous versions,
existing kernel configuration files do not need to be changed, except
when they reference device drivers that are listed in UPDATING.

Obtained from:		//depot/projects/mpsafetty/...
Approved by:		philip (ex-mentor)
Discussed:		on the lists, at BSDCan, at the DevSummit
Sponsored by:		Snow B.V., the Netherlands
dcons(4) fixed by:	kan
2008-08-20 08:31:58 +00:00
Attilio Rao
51b93e474d Bufferize the output for DDB printouts.
In order to CATER this, DDB buffered output can be choosen at compile
time through the option DDB_BUFR_SIZE=nbytes where nbytes choose the size
of the buffer (suggested size is 128 bytes), which should be manually
specified in any interested config file.

Sponsored by:	Nokia
2008-08-18 16:48:09 +00:00
Kip Macy
326f8c34b0 disable "legacy" device on xen domU
MFC after:	1 month
2008-08-17 23:44:09 +00:00
Bjoern A. Zeeb
603724d3ab Commit step 1 of the vimage project, (network stack)
virtualization work done by Marko Zec (zec@).

This is the first in a series of commits over the course
of the next few weeks.

Mark all uses of global variables to be virtualized
with a V_ prefix.
Use macros to map them back to their global names for
now, so this is a NOP change only.

We hope to have caught at least 85-90% of what is needed
so we do not invalidate a lot of outstanding patches again.

Obtained from:	//depot/projects/vimage-commit2/...
Reviewed by:	brooks, des, ed, mav, julian,
		jamie, kris, rwatson, zec, ...
		(various people I forgot, different versions)
		md5 (with a bit of help)
Sponsored by:	NLnet Foundation, The FreeBSD Foundation
X-MFC after:	never
V_Commit_Message_Reviewed_By:	more people than the patch
2008-08-17 23:27:27 +00:00
Kip Macy
10dc76a3f6 Integrate configuration bits for compling xen.
MFC after:	1 month
2008-08-15 20:58:57 +00:00
Warner Losh
7e5dc2f88f Move wb driver from sys/pci to sys/dev/wb. 2008-08-14 21:26:29 +00:00
Warner Losh
5d5325f82c Move pcn driver from sys/pci to sys/dev/pcn. 2008-08-14 20:34:46 +00:00
Warner Losh
c8befdd5b6 Move the ste driver from sys/pci to sys/dev/ste. 2008-08-14 20:09:58 +00:00
Warner Losh
2bd7d759a6 Move the tl driver form sys/pci to sys/dev/tl. 2008-08-14 20:02:34 +00:00
Kip Macy
25292deb42 Remove cxgb private lro implementation and switch to using system implementation.
Obtained from:	Chelsio Inc.
MFC after:	1 week
2008-08-12 00:27:32 +00:00
Rafal Jaworowski
9884d99e9b Rename ds1339 -> ds133x to better fit the upcoming driver extensions. 2008-08-11 19:26:55 +00:00
Warner Losh
d2155f2f19 Move sis to sys/dev/sis for consistency. 2008-08-10 10:00:14 +00:00
Warner Losh
83825b7109 Move the xl driver form sys/pci to sys/dev/xl for consistency. 2008-08-10 09:45:52 +00:00
Philip Paeps
a51aa5d1f6 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
2008-08-09 14:52:31 +00:00
Stanislav Sedov
e085f869d5 - 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
2008-08-08 16:26:53 +00:00
Olivier Houchard
ae33434c7f We need -I$S to compile the elf trampoline.
MFC after:	3 days
2008-08-04 14:38:38 +00:00
Ed Schouten
200d80cd74 Disconnect drivers that haven't been ported to MPSAFE TTY yet.
As clearly mentioned on the mailing lists, there is a list of drivers
that have not been ported to the MPSAFE TTY layer yet. Remove them from
the kernel configuration files. This means people can now still use
these drivers if they explicitly put them in their kernel configuration
file, which is good.

People should keep in mind that after August 10, these drivers will not
work anymore. Even though owners of the hardware are capable of getting
these drivers working again, I will see if I can at least get them to a
compilable state (if time permits).
2008-08-03 10:32:17 +00:00
Maksim Yevmenkin
a0bac9cc1b Fix LINT
MFC after:	3 months
2008-07-31 03:51:53 +00:00
Jack F Vogel
06248ffcc6 Alter kernel build to work with new dev/e1000 structure.
This makes both em and igb, or either alone build and
work in the static kernel.

MFC after:ASAP
2008-07-30 22:01:32 +00:00
Pyun YongHyeon
1f8287f868 Unbreak build.
Remove nfe(4). The driver applies to i386/amd64 only.
2008-07-30 00:39:25 +00:00
Pyun YongHyeon
0587cad886 Add missing jme(4), msk(4), nfe(4), re(4) and stge(4) in NOTES and
ensure that LINT builds include these devices.

Reported by:	Peter Jeremy
2008-07-29 01:15:11 +00:00
John Baldwin
02f3c16fa5 Re-enable em(4) and igb(4) in NOTES.
PR:		conf/112081
2008-07-28 22:16:58 +00:00
John Baldwin
12d3da872c Remove a stale reference to sys/dev/ixgbe/tcp_lro.c. 2008-07-28 21:47:04 +00:00
Stanislav Sedov
32c5ce374b - Connect ds1339 to the build infrastructure.
Reviewed by:	raj
Approved by:	imp
2008-07-25 19:35:40 +00:00
Ed Schouten
bea45cdda3 Move ttyinfo() into its own C file.
The ttyinfo() routine generates the fancy output when pressing ^T. Right
now it is stored in tty.c. In the MPSAFE TTY code it is already stored
in tty_info.c. To make integration of the MPSAFE TTY code a little
easier, take the same approach.

This makes the TTY code a little bit more readable, because having the
proc_*/thread_* routines in tty.c is very distractful.

Approved by:	philip (mentor)
2008-07-25 14:31:00 +00:00
Warner Losh
a30c29f9f5 Disable SSP for mips until support is added to the base architecture. 2008-07-23 06:16:34 +00:00
Olivier Houchard
7cff8ceafb Disable SSP for the kernel on arm as well (see rev 180605).
I overlooked this because a SSP kernel booted for me.

Apologises to:	ticso
2008-07-22 09:38:12 +00:00
David Malone
744eaff7e6 Add an accept filter for TCP based DNS requests. It waits until the
whole first request is present before returning from accept.
2008-07-18 14:44:51 +00:00
Kip Macy
4af83c8cff import vendor fixes to cxgb 2008-07-18 06:12:31 +00:00
Doug Barton
9335f224bb Change the character prefixed to the svn version to "r" since that seems
to be how they are commonly referred to.
2008-07-13 20:08:38 +00:00
John Birrell
3a877a1d93 Add CTF conversion to the objects compiled from generated code.
This allows DTrace scripts to access variables like 'ostype'.
2008-07-05 06:12:14 +00:00
John Baldwin
a78c3ed89c Remove the sbsh(4) driver. No one responded to requests for testing the
MPSAFE patches on current@ and stable@.  This driver also has a fundamental
issue in that it sleeps when sending commands to the card including in the
if_init/if_start routines (which can be called from interrupt context).  As
such, the driver shouldn't be working reliably even on 4.x.
2008-07-04 21:24:35 +00:00
John Baldwin
e9a31041c0 Remove the sbni(4) driver. No one responded to calls to test it on
current@ and stable@.
2008-07-04 21:06:57 +00:00
John Baldwin
67c58e8a6e Remove the cnw(4) driver. No one responded to calls to test it on current@
and stable@.  It also is a driver for an older non-802.11 wireless PC card
that is quite slow in comparison to say, wi(4).  I know Warner wants this
driver axed as well.
2008-07-04 19:13:15 +00:00
John Baldwin
2c6298572e 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.
2008-07-04 18:58:53 +00:00
John Baldwin
94f923b69d 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).
2008-07-04 18:15:36 +00:00
Philip Paeps
01895a25f3 Remove stray "miibus0" reference from ancient kernel config file times.
MFC after:	1 day
2008-06-28 13:38:53 +00:00