From 3e732791dc5be0163e2b6107cd440188becc86f1 Mon Sep 17 00:00:00 2001 From: gjb Date: Sun, 11 Dec 2011 19:53:11 +0000 Subject: Document the SVN variable needs to be set in make.conf(5) when SVN_UPDATE is set. PR: 163162 Submitted by: Oliver Hartmann Patch by: Benjamin Kaduk (original) MFC after: 1 week --- share/man/man5/make.conf.5 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'share/man') diff --git a/share/man/man5/make.conf.5 b/share/man/man5/make.conf.5 index c424a1e..a0b362f 100644 --- a/share/man/man5/make.conf.5 +++ b/share/man/man5/make.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 2011 +.Dd December 11, 2011 .Dt MAKE.CONF 5 .Os .Sh NAME @@ -333,6 +333,12 @@ to update your .Pa src tree with .Dq Li "make update" . +Note that since a subversion client is not included in the base system, +you will need to set +.Va SVN +to the full path of a +.Xr svn 1 +binary. .It Va WWWSUPFILE .Pq Vt str The www -- cgit v1.1 From 405220fbc9446f7196efe65977d840b4009367ea Mon Sep 17 00:00:00 2001 From: gjb Date: Sun, 11 Dec 2011 20:01:37 +0000 Subject: Minor whitespace cleanup to make.conf(5). MFC after: 1 week X-MFC-With: 228418 --- share/man/man5/make.conf.5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'share/man') diff --git a/share/man/man5/make.conf.5 b/share/man/man5/make.conf.5 index a0b362f..d9967ea 100644 --- a/share/man/man5/make.conf.5 +++ b/share/man/man5/make.conf.5 @@ -500,7 +500,7 @@ rather than load the server's kernel. .Pq Vt bool Defining this and recompiling .Pa /usr/src/sys/boot/i386 -will add +will add .Xr dcons 4 console driver to .Xr loader 8 @@ -640,7 +640,7 @@ The default value is 0640. .Pq Vt str Additional maps to rebuild when using .Pa /etc/mail/Makefile . -The +The .Pa access , .Pa bitdomain , .Pa domaintable , -- cgit v1.1 From e31b2d85e24e129e3299181446c2edb578c54938 Mon Sep 17 00:00:00 2001 From: fabient Date: Mon, 12 Dec 2011 09:50:33 +0000 Subject: Add watchdog support for VIA south bridge chipset. Tested on VT8251, VX900 but CX700, VX800, VX855 should works. MFC after: 1 month Sponsored by: NETASQ --- share/man/man4/Makefile | 2 ++ share/man/man4/viawd.4 | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 share/man/man4/viawd.4 (limited to 'share/man') diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index b366dd5..5b41aea 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -499,6 +499,7 @@ MAN= aac.4 \ vga.4 \ vge.4 \ viapm.4 \ + ${_viawd.4} \ vinum.4 \ vkbd.4 \ vlan.4 \ @@ -711,6 +712,7 @@ _speaker.4= speaker.4 _spkr.4= spkr.4 _tpm.4= tpm.4 _urtw.4= urtw.4 +_viawd.4= viawd.4 _wpi.4= wpi.4 _xen.4= xen.4 diff --git a/share/man/man4/viawd.4 b/share/man/man4/viawd.4 new file mode 100644 index 0000000..47473cf --- /dev/null +++ b/share/man/man4/viawd.4 @@ -0,0 +1,79 @@ +.\"- +.\" Copyright (c) 2011 Fabien Thomas +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS `AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 7, 2011 +.Dt VIAWD 4 +.Os +.Sh NAME +.Nm viawd +.Nd device driver for VIA south bridge watchdog timer +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device viawd" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +viawd_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides +.Xr watchdog 4 +support for the watchdog interrupt timer present on +VIA south bridge chipset (VT8251, CX700, VX800, VX855, VX900). +.Pp +The VIA south bridge have a built-in watchdog timer, +which can be enabled and disabled by user's program and set between +1 to 1023 seconds. +.Pp +The +.Nm +driver when unloaded with running watchdog will reschedule the watchdog +to 5 minutes. +.Sh SEE ALSO +.Xr watchdog 4 , +.Xr watchdog 8 , +.Xr watchdogd 8 , +.Xr watchdog 9 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 10.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver and this manual page were written by +.An Fabien Thomas Aq fabient@FreeBSD.org . -- cgit v1.1 From 805302f0990bd298651e1bbad8237f88d86255f6 Mon Sep 17 00:00:00 2001 From: eadler Date: Mon, 12 Dec 2011 21:12:07 +0000 Subject: - Add support for ASCII art splash screens in TheDraw format PR: kern/143370 Submitted by: Antony Mawer Reviewed by: gjb (doc) Reviewed by: des (style) Approved by: ed MFC after: 1 month --- share/man/man4/splash.4 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'share/man') diff --git a/share/man/man4/splash.4 b/share/man/man4/splash.4 index 29a9693..4b5f224 100644 --- a/share/man/man4/splash.4 +++ b/share/man/man4/splash.4 @@ -74,6 +74,14 @@ Bitmaps of other color depths will not be displayed. ZSoft PCX decoder. This decoder currently only supports version 5 8-bpp single-plane images. +.It Pa splash_txt.ko +TheDraw binary ASCII drawing file decoder. +Displays a text-mode 80x25 ASCII drawing, such as that produced by +the Binary save format in TheDraw. +This format consists of a sequence +of two byte pairs representing the 80x25 display, where the first byte +is the ASCII character to draw and the second byte indicates the +colors/attributes to use when drawing the character. .El .Pp The @@ -223,6 +231,16 @@ If the VESA support is statically linked to the kernel, it is not necessary to load the VESA module. Just load the bitmap file and the splash decoder module as in the first example above. +.Pp +To load a binary ASCII drawing and display this while booting, include the +following into your +.Pa /boot/loader.conf +: +.Bd -literal -offset indent +splash_txt_load="YES" +bitmap_load="YES" +bitmap_name="/boot/splash.bin" +.Ed .\".Sh DIAGNOSTICS .Sh SEE ALSO .Xr vidcontrol 1 , @@ -256,6 +274,15 @@ module was written by based on the .Pa splash_bmp code. +The +.Pa splash_txt +module was written by +.An Antony Mawer Aq antony@mawer.org +based on the +.Pa splash_bmp +code, with some additional inspiration from the +.Pa daemon_saver +code. .Sh CAVEATS Both the splash screen and the screen saver work with .Xr syscons 4 -- cgit v1.1 From 6487a966c893ce051413fd3dc82e9a1469109d43 Mon Sep 17 00:00:00 2001 From: ru Date: Tue, 13 Dec 2011 08:23:03 +0000 Subject: The "inet" keyword in the "ifconfig_IF_aliasN" is mandatory for IPv4 aliases to work since network.subr@197139. MFC after: 3 days --- share/man/man5/rc.conf.5 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'share/man') diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index e4a058a..47a325b 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 23, 2011 +.Dd December 13, 2011 .Dt RC.CONF 5 .Os .Sh NAME @@ -1101,7 +1101,9 @@ ipv4_addrs_ed0="192.0.2.129/27 192.0.2.1-5/28" .Pp It is also possible to add IP alias entries using .Xr ifconfig 8 -syntax. +syntax with the +.Dq Li inet +keyword. Assuming that the interface in question was .Li ed0 , it might look @@ -1114,7 +1116,9 @@ ifconfig_ed0_alias1="inet 127.0.0.254 netmask 0xffffffff" And so on. For each .Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n -entry that is found, +entry with the +.Dq Li inet +keyword that is found, its contents are passed to .Xr ifconfig 8 . Execution stops at the first unsuccessful access, so if -- cgit v1.1 From 145914e3e7153161b6dd67fdcd58c7a8201845bc Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 13 Dec 2011 21:26:33 +0000 Subject: Change targ(4) to use cdevpriv, instead of multiple character devices. Also update the manpage and the scsi_target example program accordingly. Discussed on: scsi@ Tested by: Chuck Tuffli --- share/man/man4/targ.4 | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'share/man') diff --git a/share/man/man4/targ.4 b/share/man/man4/targ.4 index 5e78200..6c61735 100644 --- a/share/man/man4/targ.4 +++ b/share/man/man4/targ.4 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 15, 2002 +.Dd December 13, 2011 .Dt TARG 4 .Os .Sh NAME @@ -49,16 +49,8 @@ can be found in .Pp The .Nm -driver supplies control devices, -.Pa /dev/targ0 , -.Pa /dev/targ1 , -etc. -If a device is already in use, -.Xr open 2 -will fail and -.Va errno -will be set to -.Er EBUSY . +driver supplies the control device +.Pa /dev/targ . After opening the device, the file descriptor must be bound to a specific bus/target/LUN and enabled to process CCBs using the .Dv TARGIOCENABLE @@ -123,8 +115,8 @@ it. describes the usermode interface. .It Pa /sys/cam/scsi/scsi_target.c is the driver source file. -.It Pa /dev/targ* -are the control devices. +.It Pa /dev/targ +is the control device. .El .Sh SEE ALSO .Pa /usr/share/examples/scsi_target , -- cgit v1.1 From 3c35ef76bc22af433cddf684c023a14e91e11604 Mon Sep 17 00:00:00 2001 From: glebius Date: Wed, 14 Dec 2011 14:52:50 +0000 Subject: Update this page to describe modern interfaces. --- share/man/man9/rtalloc.9 | 261 ++++++++++++++++++++++++++--------------------- 1 file changed, 147 insertions(+), 114 deletions(-) (limited to 'share/man') diff --git a/share/man/man9/rtalloc.9 b/share/man/man9/rtalloc.9 index 31d5ebb..ab5379a 100644 --- a/share/man/man9/rtalloc.9 +++ b/share/man/man9/rtalloc.9 @@ -28,160 +28,163 @@ .\" .\" $FreeBSD$ .\" -.Dd December 11, 2008 +.Dd December 14, 2011 .Dt RTALLOC 9 .Os .Sh NAME -.Nm rtalloc , -.Nm rtalloc_ign , -.Nm rtalloc1 , -.Nm rtfree +.Nm rtalloc1_fib , +.Nm rtalloc_ign_fib , +.Nm rtalloc_fib .Nd look up a route in the kernel routing table .Sh SYNOPSIS .In sys/types.h .In sys/socket.h .In net/route.h -.Ft void -.Fn rtalloc "struct route *ro" -.Ft void -.Fn rtalloc_ign "struct route *ro" "u_long flags" .Ft "struct rtentry *" -.Fn rtalloc1 "struct sockaddr *sa" "int report" "u_long flags" +.Fn rtalloc1_fib "struct sockaddr *dst" "int report" "u_long flags" "u_int fibnum" .Ft void -.Fn rtfree "struct rt_entry *rt" +.Fn rtalloc_fib "struct route *ro" "u_int fibnum" +.Ft void +.Fn rtalloc_ign_fib "struct route *ro" "u_long flags" "u_int fibnum" +.Fn RTFREE_LOCKED "struct rt_entry *rt" .Fn RTFREE "struct rt_entry *rt" .Fn RT_LOCK "struct rt_entry *rt" .Fn RT_UNLOCK "struct rt_entry *rt" .Fn RT_ADDREF "struct rt_entry *rt" .Fn RT_REMREF "struct rt_entry *rt" +.Ft void +.Fn rtfree "struct rt_entry *rt" +.Ft "struct rtentry *" +.Fn rtalloc1 "struct sockaddr *dst" "int report" "u_long flags" +.Ft void +.Fn rtalloc "struct route *ro" +.Ft void +.Fn rtalloc_ign "struct route *ro" "u_long flags" +.Pp +.Cd options RADIX_MPATH .Sh DESCRIPTION The kernel uses a radix tree structure to manage routes for the networking subsystem. +If compiled with +.Cd options RADIX_MPATH +kernel may maintain several independent forwarding information databases (FIBs). The .Fn rtalloc -family of routines is used by protocols to query this structure for a +family of routines is used by protocols to query these structures for a route corresponding to a particular end-node address, and to cause certain protocol\- and interface-specific actions to take place. -.\" XXX - -mdoc should contain a standard request for getting em and -.\" en dashes. .Pp -.Dv RTF_PRCLONING -flag is obsolete and thus ignored by facility. -If the -.Dv RTF_XRESOLVE -flag is set, then the -.Dv RTM_RESOLVE -message is sent instead on the -.Xr route 4 -socket interface, requesting that an external program resolve the -address in question and modify the route appropriately. +The +.Fn rtalloc1_fib +function is the most general form of +.Fn rtalloc , +and all of the other forms are implemented as calls to it. +It takes a +.Fa "struct sockaddr *" +directly as the +.Fa dst +argument. +The second argument, +.Fa report , +controls whether the routing sockets are notified when a lookup fails. +The third argument, +.Fa flags , +is a combination of +the following values: +.Bl -item -offset indent +.It +.Dv RTF_RNH_LOCKED +indicates that the radix tree lock is already held +.El +.Pp +The last argument +.Fa fibnum +specifies number of forwarding information database (FIB) on which +the lookup should be performed. +In case of success the +.Fn rtalloc1_fib +function returns a pointer to a locked +.Vt "struct rtentry" +with an additional reference. .Pp -The default interface is -.Fn rtalloc . -Its only argument is +The +.Fn rtalloc_fib +is the most simple variant. +Its main argument is .Fa ro , a pointer to a -.Dq Li "struct route" , +.Fa "struct route" , which is defined as follows: .Bd -literal -offset indent struct route { - struct sockaddr ro_dst; struct rtentry *ro_rt; + struct llentry *ro_lle; + struct sockaddr ro_dst; }; .Ed .Pp Thus, this function can only be used for address families which are smaller than the default -.Dq Li "struct sockaddr" . +.Ft "struct sockaddr" . Before calling -.Fn rtalloc +.Fn rtalloc_fib for the first time, callers should ensure that unused bits of the structure are set to zero. +The second argument +.Fa fibnum +is FIB number. +In case of success of the +.Fn rtalloc_fib +the +.Fa ro_rt +points to a valid and unlocked +.Xr rtentry 9 , +which has an additional reference put on it, freeing which is +responsibility of the caller. On subsequent calls, -.Fn rtalloc +.Fn rtalloc_fib returns without performing a lookup if .Fa ro->ro_rt is non-null and the .Dv RTF_UP -flag is set in the route's -.Li rt_flags +flag is set in the rtentry's +.Fa rt_flags field. .Pp The -.Fn rtalloc_ign -interface can be used when the caller does not want to receive -the returned -.Fa rtentry -locked. -The -.Fa ro -argument is the same as -.Fn rtalloc , -but there is additionally a +.Fn rtalloc_ign_fib +function is the same as the +.Fn rtalloc_fib , +but there is additional .Fa flags -argument, which is now only used to pass -.Dv RTF_RNH_LOCKED -indicating that the radix tree lock is already held. -Both -.Fn rtalloc -and -.Fn rtalloc_ign -functions return a pointer to an unlocked -.Vt "struct rtentry" . +argument, which is same as in +.Fn rtalloc1_fib . .Pp The -.Fn rtalloc1 -function is the most general form of -.Fn rtalloc -(and both of the other forms are implemented as calls to rtalloc1). -It does not use the -.Dq Li "struct route" , -and is therefore suitable for address families which require more -space than is in a traditional -.Dq Li "struct sockaddr" . -Instead, it takes a -.Dq Li "struct sockaddr *" -directly as the -.Fa sa -argument. -The second argument, -.Fa report , -controls whether the lower layers are notified when a lookup fails. -The third argument, -.Fa flags , -is a set of flags to ignore, as in -.Fn rtalloc_ign . -The -.Fn rtalloc1 -function returns a pointer to a locked -.Vt "struct rtentry" . -.Pp -The -.Fn rtfree -function frees a locked route entry, e.g., a previously allocated by -.Fn rtalloc1 . +.Fn RTFREE_LOCKED +macro is used to unref and possibly free a locked routing entry +with one our reference, for example previously allocated by +.Fn rtalloc1_fib . .Pp The .Fn RTFREE -macro is used to free unlocked route entries, previously allocated by -.Fn rtalloc +macro is used to unref and possibly free an unlocked route entries with +one our reference, for example previously allocated by +.Fn rtalloc_fib or -.Fn rtalloc_ign . -The -.Fn RTFREE -macro decrements the reference count on the routing table entry (see below), -and frees it if the reference count has reached zero. +.Fn rtalloc_ign_fib . .Pp -The preferred usage is allocating a route using -.Fn rtalloc -or -.Fn rtalloc_ign -and freeing using -.Fn RTFREE . +Both +.Fn RTFREE_LOCKED +and +.Fn RTFREE +macros decrement the reference count on the routing table entry, +and proceed with actual freeing if the reference count has reached zero. .Pp The .Fn RT_LOCK macro is used to lock a routing table entry. +.Pp The .Fn RT_UNLOCK macro is used to unlock a routing table entry. @@ -189,20 +192,53 @@ macro is used to unlock a routing table entry. The .Fn RT_ADDREF macro increments the reference count on a previously locked route entry. +It should be used whenever a reference to an +.Xr rtentry 9 +is going to be stored outside the routing table. +.Pp The .Fn RT_REMREF macro decrements the reference count on a previously locked route entry. -.Sh RETURN VALUES +Its usage is contrary to +.Fn RT_ADDREF . +.Pp The -.Fn rtalloc , -.Fn rtalloc_ign -and .Fn rtfree -functions do not return a value. +function does the actual free of the routing table entry, and shouldn't +be called directly by facilities, that just perform routing table lookups. +.Sh LEGACY INTERFACE +Prior to introduction of multiple routing tables functions did not +require the +.Fa "u_int fibnum" +argument. +Legacy +.Fn rtalloc1 , +.Fn rtalloc +and +.Fn rtalloc_ign +functions are kept for compatibility, and are equivalent to +calling new interface with +.Fa fibnum +argument equal to +.Va 0 , +which implies default forwarding table. +.Sh RETURN VALUES The -.Fn rtalloc1 -function returns a pointer to a routing-table entry if it succeeds, +.Fn rtalloc1_fib +function returns a pointer to a locked routing-table entry if it succeeds, otherwise a null pointer. +The +.Fn rtalloc_fib +and +.Fn rtalloc_ign_fib +functions do not return a value, but they fill in the +.Fa *ro_rt +member of the +.Fa *ro +argument with a pointer to an unlocked routing-table entry if they +succeed, otherwise a null pointer. +In a case of success all functions put a reference on the +routing-table entry, freeing of which is responsibility of the caller. Lack of a route should in most cases be translated to the .Xr errno 2 @@ -213,7 +249,7 @@ value .Xr rtentry 9 .Sh HISTORY The -.Nm +.Nm rtalloc facility first appeared in .Bx 4.2 , although with much different internals. @@ -227,14 +263,11 @@ first appeared in .Fx 2.0 . Routing table locking was introduced in .Fx 5.2 . +Multiple routing tables were introduced in +.Fx 8.0 . .Sh AUTHORS -This manual page was written by -.An Garrett Wollman , -as were the changes to implement -.Dv RTF_PRCLONING -and the -.Fn rtalloc_ign -function and the -.Fa flags -argument to -.Fn rtalloc1 . +The original version of this manual page was written by +.An -nosplit +.An "Garrett Wollman" . +It was significantly updated by +.An "Gleb Smirnoff" . -- cgit v1.1 From a4234fdf185a5036101ba09c6631e87c3b0f242b Mon Sep 17 00:00:00 2001 From: glebius Date: Wed, 14 Dec 2011 14:55:19 +0000 Subject: More MLINKS for rtalloc.9 --- share/man/man9/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'share/man') diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 0870355..a577854 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1023,8 +1023,12 @@ MLINKS+=rmlock.9 rm_destroy.9 \ rmlock.9 rm_wunlock.9 MLINKS+=rtalloc.9 rtalloc1.9 \ rtalloc.9 rtalloc_ign.9 \ + rtalloc.9 RTFREE_LOCKED.9 \ rtalloc.9 RTFREE.9 \ - rtalloc.9 rtfree.9 + rtalloc.9 rtfree.9 \ + rtalloc.9 rtalloc1_fib.9 \ + rtalloc.9 rtalloc_ign_fib.9 \ + rtalloc.9 rtalloc_fib.9 MLINKS+=runqueue.9 choosethread.9 \ runqueue.9 procrunnable.9 \ runqueue.9 remrunqueue.9 \ -- cgit v1.1 From 93b09a6b44a3801ddf5a9f12291a430a2147ee83 Mon Sep 17 00:00:00 2001 From: mav Date: Wed, 14 Dec 2011 15:19:40 +0000 Subject: After several suggestions from people, move eventtimers page from 7 to 4. --- share/man/man4/Makefile | 1 + share/man/man4/atrtc.4 | 2 +- share/man/man4/attimer.4 | 2 +- share/man/man4/eventtimers.4 | 133 +++++++++++++++++++++++++++++++++++++++++++ share/man/man4/hpet.4 | 2 +- share/man/man7/Makefile | 1 - share/man/man7/eventtimers.7 | 133 ------------------------------------------- 7 files changed, 137 insertions(+), 137 deletions(-) create mode 100644 share/man/man4/eventtimers.4 delete mode 100644 share/man/man7/eventtimers.7 (limited to 'share/man') diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 5b41aea..69e9a7c 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -116,6 +116,7 @@ MAN= aac.4 \ epair.4 \ esp.4 \ et.4 \ + eventtimers.4 \ exca.4 \ faith.4 \ fatm.4 \ diff --git a/share/man/man4/atrtc.4 b/share/man/man4/atrtc.4 index 51d6f05..2a75d03 100644 --- a/share/man/man4/atrtc.4 +++ b/share/man/man4/atrtc.4 @@ -53,4 +53,4 @@ Event timer provided by the driver is irrelevant to CPU power states. .Sh SEE ALSO .Xr attimer 4 , .Xr hpet 4 , -.Xr eventtimers 7 +.Xr eventtimers 4 diff --git a/share/man/man4/attimer.4 b/share/man/man4/attimer.4 index 67d001e..6dd4ee2 100644 --- a/share/man/man4/attimer.4 +++ b/share/man/man4/attimer.4 @@ -72,4 +72,4 @@ Event timer provided by the driver is irrelevant to CPU power states. .Sh SEE ALSO .Xr atrtc 4 , .Xr hpet 4 , -.Xr eventtimers 7 +.Xr eventtimers 4 diff --git a/share/man/man4/eventtimers.4 b/share/man/man4/eventtimers.4 new file mode 100644 index 0000000..37d5fc8 --- /dev/null +++ b/share/man/man4/eventtimers.4 @@ -0,0 +1,133 @@ +.\" Copyright (c) 2010 Alexander Motin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 15, 2010 +.Dt EVENTTIMERS 4 +.Os +.Sh NAME +.Nm eventtimers +.Nd kernel event timers subsystem +.Sh SYNOPSIS +Kernel uses several types of time-related devices, such as: real time clocks, +time counters and event timers. +Real time clocks responsible for tracking real world time, mostly when system +is down. +Time counters are responsible for generation of monotonically increasing +timestamps for precise uptime tracking purposes, when system is running. +Event timers are responsible for generating interrupts at specified time or +periodically, to run different time-based events. +This page is about the last. +.Sh DESCRIPTION +Kernel uses time-based events for many different purposes: scheduling, +statistics, time keeping, profiling and many other things, based on +.Xr callout 9 +mechanism. +These purposes now grouped into three main callbacks: +.Bl -tag +.It hardclock() +.Xr callout 9 +and timekeeping events entry. Called with frequency defined by hz variable, +usually 1000Hz. +.It statclock() +statistics and scheduler events entry. Called with frequency about 128Hz. +.It profclock() +profiler events entry. When enabled, called with frequency about 8KHz. +.El +Different platforms provide different kinds of timer hardware. +The goal of the event timers subsystem is to provide unified way to control +that hardware, and to use it, supplying kernel with all required time-based +events. +.Pp +Each driver implementing event timers, registers them at the subsystem. +It is possible to see the list of present event timers, like this, via +.Va kern.eventtimer +sysctl: +.Bd -literal +kern.eventtimer.choice: HPET(550) LAPIC(400) i8254(100) RTC(0) +kern.eventtimer.et.LAPIC.flags: 15 +kern.eventtimer.et.LAPIC.frequency: 0 +kern.eventtimer.et.LAPIC.quality: 400 +kern.eventtimer.et.i8254.flags: 1 +kern.eventtimer.et.i8254.frequency: 1193182 +kern.eventtimer.et.i8254.quality: 100 +kern.eventtimer.et.RTC.flags: 17 +kern.eventtimer.et.RTC.frequency: 32768 +kern.eventtimer.et.RTC.quality: 0 +kern.eventtimer.et.HPET.flags: 7 +kern.eventtimer.et.HPET.frequency: 14318180 +kern.eventtimer.et.HPET.quality: 550 +.Ed +, where: +.Bl -tag +.It Va kern.eventtimer.et. Ns Ar X Ns Va .flags +bitmask, defining event timer capabilities: +.Bl -tag -compact +.It 1 +periodic mode supported, +.It 2 +one-shot mode supported, +.It 4 +timer is per-CPU, +.It 8 +timer may stop when CPU goes to sleep state, +.It 16 +timer supports only power-of-2 divisors. +.El +.It Va kern.eventtimer.et. Ns Ar X Ns Va .frequency +timer base frequency, +.It Va kern.eventtimer.et. Ns Ar X Ns Va .quality +integral value, defining how good is this timer, comparing to others. +.El +.Pp +Timers management code of the kernel chooses one timer from that list. +Current choice can be read and affected via +.Va kern.eventtimer.timer +tunable/sysctl. +Several other tunables/sysctls are affecting how exactly this timer is used: +.Bl -tag +.It Va kern.eventtimer.periodic +allows to choose periodic and one-shot operation mode. +In periodic mode, periodic interrupts from timer hardware are taken as the +only source of time for time events. +One-shot mode instead uses currently selected time counter to precisely +schedule all needed events and programs event timer to generate interrupt +exactly in specified time. +Default value depends of chosen timer capabilities, but one-shot mode is +preferred, until other is forced by user or hardware. +.It Va kern.eventtimer.singlemul +in periodic mode specifies how much times higher timer frequency should be, +to not strictly alias hardclock() and statclock() events. Default values are +1, 2 or 4, depending on configured HZ value. +.It Va kern.eventtimer.idletick +makes each CPU to receive every timer interrupt independently of whether they +busy or not. By default this options is disabled. If chosen timer is per-CPU +and runs in periodic mode, this option has no effect - all interrupts are +always generating. +.El +.Sh SEE ALSO +.Xr attimer 4 , +.Xr atrtc 4 , +.Xr hpet 4 diff --git a/share/man/man4/hpet.4 b/share/man/man4/hpet.4 index f501e0b..bcfea1c 100644 --- a/share/man/man4/hpet.4 +++ b/share/man/man4/hpet.4 @@ -96,7 +96,7 @@ of these comparators has own unsharable IRQ. .Xr acpi 4 , .Xr atrtc 4 , .Xr attimer 4 , -.Xr eventtimers 7 +.Xr eventtimers 4 .Sh HISTORY The .Nm diff --git a/share/man/man7/Makefile b/share/man/man7/Makefile index e279b37..011fbaf 100644 --- a/share/man/man7/Makefile +++ b/share/man/man7/Makefile @@ -10,7 +10,6 @@ MAN= adding_user.7 \ c99.7 \ development.7 \ environ.7 \ - eventtimers.7 \ ffs.7 \ firewall.7 \ hier.7 \ diff --git a/share/man/man7/eventtimers.7 b/share/man/man7/eventtimers.7 deleted file mode 100644 index 37d5fc8..0000000 --- a/share/man/man7/eventtimers.7 +++ /dev/null @@ -1,133 +0,0 @@ -.\" Copyright (c) 2010 Alexander Motin -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" $FreeBSD$ -.\" -.Dd September 15, 2010 -.Dt EVENTTIMERS 4 -.Os -.Sh NAME -.Nm eventtimers -.Nd kernel event timers subsystem -.Sh SYNOPSIS -Kernel uses several types of time-related devices, such as: real time clocks, -time counters and event timers. -Real time clocks responsible for tracking real world time, mostly when system -is down. -Time counters are responsible for generation of monotonically increasing -timestamps for precise uptime tracking purposes, when system is running. -Event timers are responsible for generating interrupts at specified time or -periodically, to run different time-based events. -This page is about the last. -.Sh DESCRIPTION -Kernel uses time-based events for many different purposes: scheduling, -statistics, time keeping, profiling and many other things, based on -.Xr callout 9 -mechanism. -These purposes now grouped into three main callbacks: -.Bl -tag -.It hardclock() -.Xr callout 9 -and timekeeping events entry. Called with frequency defined by hz variable, -usually 1000Hz. -.It statclock() -statistics and scheduler events entry. Called with frequency about 128Hz. -.It profclock() -profiler events entry. When enabled, called with frequency about 8KHz. -.El -Different platforms provide different kinds of timer hardware. -The goal of the event timers subsystem is to provide unified way to control -that hardware, and to use it, supplying kernel with all required time-based -events. -.Pp -Each driver implementing event timers, registers them at the subsystem. -It is possible to see the list of present event timers, like this, via -.Va kern.eventtimer -sysctl: -.Bd -literal -kern.eventtimer.choice: HPET(550) LAPIC(400) i8254(100) RTC(0) -kern.eventtimer.et.LAPIC.flags: 15 -kern.eventtimer.et.LAPIC.frequency: 0 -kern.eventtimer.et.LAPIC.quality: 400 -kern.eventtimer.et.i8254.flags: 1 -kern.eventtimer.et.i8254.frequency: 1193182 -kern.eventtimer.et.i8254.quality: 100 -kern.eventtimer.et.RTC.flags: 17 -kern.eventtimer.et.RTC.frequency: 32768 -kern.eventtimer.et.RTC.quality: 0 -kern.eventtimer.et.HPET.flags: 7 -kern.eventtimer.et.HPET.frequency: 14318180 -kern.eventtimer.et.HPET.quality: 550 -.Ed -, where: -.Bl -tag -.It Va kern.eventtimer.et. Ns Ar X Ns Va .flags -bitmask, defining event timer capabilities: -.Bl -tag -compact -.It 1 -periodic mode supported, -.It 2 -one-shot mode supported, -.It 4 -timer is per-CPU, -.It 8 -timer may stop when CPU goes to sleep state, -.It 16 -timer supports only power-of-2 divisors. -.El -.It Va kern.eventtimer.et. Ns Ar X Ns Va .frequency -timer base frequency, -.It Va kern.eventtimer.et. Ns Ar X Ns Va .quality -integral value, defining how good is this timer, comparing to others. -.El -.Pp -Timers management code of the kernel chooses one timer from that list. -Current choice can be read and affected via -.Va kern.eventtimer.timer -tunable/sysctl. -Several other tunables/sysctls are affecting how exactly this timer is used: -.Bl -tag -.It Va kern.eventtimer.periodic -allows to choose periodic and one-shot operation mode. -In periodic mode, periodic interrupts from timer hardware are taken as the -only source of time for time events. -One-shot mode instead uses currently selected time counter to precisely -schedule all needed events and programs event timer to generate interrupt -exactly in specified time. -Default value depends of chosen timer capabilities, but one-shot mode is -preferred, until other is forced by user or hardware. -.It Va kern.eventtimer.singlemul -in periodic mode specifies how much times higher timer frequency should be, -to not strictly alias hardclock() and statclock() events. Default values are -1, 2 or 4, depending on configured HZ value. -.It Va kern.eventtimer.idletick -makes each CPU to receive every timer interrupt independently of whether they -busy or not. By default this options is disabled. If chosen timer is per-CPU -and runs in periodic mode, this option has no effect - all interrupts are -always generating. -.El -.Sh SEE ALSO -.Xr attimer 4 , -.Xr atrtc 4 , -.Xr hpet 4 -- cgit v1.1 From c6a888391d3df4701756499ff831b8e9400e4fec Mon Sep 17 00:00:00 2001 From: joel Date: Wed, 14 Dec 2011 19:48:21 +0000 Subject: Add SEE ALSO. --- share/man/man8/yp.8 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'share/man') diff --git a/share/man/man8/yp.8 b/share/man/man8/yp.8 index f57c8df..db5610b 100644 --- a/share/man/man8/yp.8 +++ b/share/man/man8/yp.8 @@ -28,7 +28,7 @@ .\" from: @(#)yp.8 1.0 (deraadt) 4/26/93 .\" $FreeBSD$ .\" -.Dd June 25, 2009 +.Dd December 14, 2011 .Dt YP 8 .Os .Sh NAME @@ -519,6 +519,20 @@ a v1 and v2 server. .Xr ypserv 8 manual page for a detailed description of these special features and flags.) +.Sh SEE ALSO +.Xr domainname 1 , +.Xr ypcat 1 , +.Xr ypmatch 1 , +.Xr ypwhich 1 , +.Xr nsswitch.conf 5 , +.Xr yp_mkdb 8 , +.Xr ypbind 8 , +.Xr ypinit 8 , +.Xr yppoll 8 , +.Xr yppush 8 , +.Xr ypserv 8 , +.Xr ypset 8 , +.Xr ypxfr 8 .Sh HISTORY The .Nm YP -- cgit v1.1 From 6d1299a388490b22f5d0619237868efafa3f3428 Mon Sep 17 00:00:00 2001 From: jhb Date: Wed, 14 Dec 2011 22:22:19 +0000 Subject: Add a helper API to allow in-kernel code to map portions of shared memory objects created by shm_open(2) into the kernel's address space. This provides a convenient way for creating shared memory buffers between userland and the kernel without requiring custom character devices. --- share/man/man9/Makefile | 2 + share/man/man9/shm_map.9 | 187 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 189 insertions(+) create mode 100644 share/man/man9/shm_map.9 (limited to 'share/man') diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index a577854..b150b64 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -234,6 +234,7 @@ MAN= accept_filter.9 \ sema.9 \ sf_buf.9 \ sglist.9 \ + shm_map.9 \ signal.9 \ sleep.9 \ sleepqueue.9 \ @@ -1111,6 +1112,7 @@ MLINKS+=sglist.9 sglist_alloc.9 \ sglist.9 sglist_reset.9 \ sglist.9 sglist_slice.9 \ sglist.9 sglist_split.9 +MLINKS+=shm_map.9 shm_unmap.9 MLINKS+=signal.9 cursig.9 \ signal.9 execsigs.9 \ signal.9 issignal.9 \ diff --git a/share/man/man9/shm_map.9 b/share/man/man9/shm_map.9 new file mode 100644 index 0000000..6f61147 --- /dev/null +++ b/share/man/man9/shm_map.9 @@ -0,0 +1,187 @@ +.\" +.\" Copyright (c) 2011 Advanced Computing Technologies LLC +.\" Written by: John H. Baldwin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 14, 2011 +.Dt SHM_MAP 9 +.Os +.Sh NAME +.Nm shm_map , +.Nm shm_unmap +.Nd map shared memory objects into the kernel's address space +.Sh SYNOPSIS +.In sys/types.h +.In sys/mman.h +.Ft int +.Fn shm_map "struct file *fp" "size_t size" "off_t offset" "void **memp" +.Ft int +.Fn shm_unmap "struct file *fp" "void *mem" "size_t size" +.Sh DESCRIPTION +The +.Nm shm_map +and +.Nm shm_unmap +functions provide an API for mapping shared memory objects into the kernel. +Shared memory objects are created by +.Xr shm_open 2 . +These objects can then be passed into the kernel via file descriptors. +.Pp +A shared memory object cannot be shrunk while it is mapped into the kernel. +This is to avoid invalidating any pages that may be wired into the kernel's +address space. +Shared memory objects can still be grown while mapped into the kernel. +.Pp +To simplify the accounting needed to enforce the above requirement, +callers of this API are required to unmap the entire region mapped by +.Nm shm_map +when calling +.Nm shm_unmap . +Unmapping only a portion of the region is not permitted. +.Pp +The +.Nm shm_map +function locates the shared memory object associated with the open file +.Fa fp . +It maps the region of that object described by +.Fa offset +and +.Fa size +into the kernel's address space. +If it succeeds, +.Fa *memp +will be set to the start of the mapping. +All pages for the range will be wired into memory upon successful return. +.Pp +The +.Nm shm_unmap +function unmaps a region previously mapped by +.Nm shm_map . +The +.Fa mem +argument should match the value previously returned in +.Fa *memp , +and the +.Fa size +argument should match the value passed to +.Nm shm_map . +.Pp +Note that +.Nm shm_map +will not hold an extra reference on the open file +.Fa fp +for the lifetime of the mapping. +Instead, +the calling code is required to do this if it wishes to use +.Nm shm_unmap +on the region in the future. +.Sh RETURN VALUES +The +.Nm shm_map +and +.Nm shm_unmap +functions return zero on success or an error on failure. +.Sh EXAMPLES +The following function accepts a file descriptor for a shared memory +object. +It maps the first sixteen kilobytes of the object into the kernel, +performs some work on that address, +and then unmaps the address before returning. +.Bd -literal +int +shm_example(int fd) +{ + struct file *fp; + void *mem; + int error; + + error = fget(curthread, fd, CAP_MMAP, &fp) + if (error) + return (error); + error = shm_map(fp, 16384, 0, &mem); + if (error) { + fdrop(fp, curthread); + return (error); + } + + /* Do something with 'mem'. */ + + error = shm_unmap(fp, mem, 16384); + fdrop(fp, curthread); + return (error); +} +.Ed +.Sh ERRORS +The +.Nm shm_map +function returns the following errors on failure: +.Bl -tag -width Er +.It Bq Er EINVAL +The open file +.Fa fp +is not a shared memory object. +.It Bq Er EINVAL +The requested region described by +.Fa offset +and +.Fa size +extends beyond the end of the shared memory object. +.It Bq Er ENOMEM +Insufficient address space was available. +.It Bq Er EACCES +The shared memory object could not be mapped due to a protection error. +.It Bq Er EINVAL +The shared memory object could not be mapped due to some other VM error. +.El +.Pp +The +.Nm shm_unmap +function returns the following errors on failure: +.Bl -tag -width Er +.It Bq Er EINVAL +The open file +.Fa fp +is not a shared memory object. +.It Bq Er EINVAL +The address range described by +.Fa mem +and +.Fa size +is not a valid address range. +.It Bq Er EINVAL +The address range described by +.Fa mem +and +.Fa size +is not backed by the shared memory object associated with the open file +.Fa fp , +or the address range does not cover the entire mapping of the object. +.El +.Sh SEE ALSO +.Xr shm_open 2 +.Sh HISTORY +This API was first introduced in +.Fx 10.0 . -- cgit v1.1 From 65b6b4fa8f3369ae8f1ddf883233883607f6abb8 Mon Sep 17 00:00:00 2001 From: np Date: Fri, 16 Dec 2011 02:09:51 +0000 Subject: Many updates to cxgbe(4) - Device configuration via plain text config file. Also able to operate when not attached to the chip as the master driver. - Generic "work request" queue that serves as the base for both ctrl and ofld tx queues. - Generic interrupt handler routine that can process any event on any kind of ingress queue (via a dispatch table). - A couple of new driver ioctls. cxgbetool can now install a firmware to the card ("loadfw" command) and can read the card's memory ("memdump" and "tcb" commands). - Lots of assorted information within dev.t4nex.X.misc.* This is primarily for debugging and won't show up in sysctl -a. - Code to manage the L2 tables on the chip. - Updates to cxgbe(4) man page to go with the tunables that have changed. - Updates to the shared code in common/ - Updates to the driver-firmware interface (now at fw 1.4.16.0) MFC after: 1 month --- share/man/man4/cxgbe.4 | 78 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 66 insertions(+), 12 deletions(-) (limited to 'share/man') diff --git a/share/man/man4/cxgbe.4 b/share/man/man4/cxgbe.4 index ab2979a..4bf5ac3 100644 --- a/share/man/man4/cxgbe.4 +++ b/share/man/man4/cxgbe.4 @@ -99,18 +99,29 @@ Tunables can be set at the prompt before booting the kernel or stored in .Xr loader.conf 5 . .Bl -tag -width indent -.It Va hw.cxgbe.max_ntxq_10G_port -The maximum number of tx queues to use for a 10Gb port. -The default value is 8. -.It Va hw.cxgbe.max_nrxq_10G_port -The maximum number of rx queues to use for a 10Gb port. -The default value is 8. -.It Va hw.cxgbe.max_ntxq_1G_port -The maximum number of tx queues to use for a 1Gb port. -The default value is 2. -.It Va hw.cxgbe.max_nrxq_1G_port -The maximum number of rx queues to use for a 1Gb port. -The default value is 2. +.It Va hw.cxgbe.ntxq10g +The number of tx queues to use for a 10Gb port. The default is 16 or the number +of CPU cores in the system, whichever is less. +.It Va hw.cxgbe.nrxq10g +The number of rx queues to use for a 10Gb port. The default is 8 or the number +of CPU cores in the system, whichever is less. +.It Va hw.cxgbe.ntxq1g +The number of tx queues to use for a 1Gb port. The default is 4 or the number +of CPU cores in the system, whichever is less. +.It Va hw.cxgbe.nrxq1g +The number of rx queues to use for a 1Gb port. The default is 2 or the number +of CPU cores in the system, whichever is less. +.It Va hw.cxgbe.nofldtxq10g +The number of TOE tx queues to use for a 10Gb port. The default is 8 or the +number of CPU cores in the system, whichever is less. +.It Va hw.cxgbe.nofldrxq10g +The number of TOE rx queues to use for a 10Gb port. The default is 2 or the +number of CPU cores in the system, whichever is less. +.It Va hw.cxgbe.nofldtxq1g +The number of TOE tx queues to use for a 1Gb port. The default is 2 or the +number of CPU cores in the system, whichever is less. +.It Va hw.cxgbe.nofldrxq1g +The number of TOE rx queues to use for a 1Gb port. The default is 1. .It Va hw.cxgbe.holdoff_timer_idx_10G .It Va hw.cxgbe.holdoff_timer_idx_1G The timer index value to use to delay interrupts. @@ -119,6 +130,8 @@ by default (all values are in microseconds) and the index selects a value from this list. The default value is 1 for both 10Gb and 1Gb ports, which means the timer value is 5us. +Different cxgbe interfaces can be assigned different values at any time via the +dev.cxgbe.X.holdoff_tmr_idx sysctl. .It Va hw.cxgbe.holdoff_pktc_idx_10G .It Va hw.cxgbe.holdoff_pktc_idx_1G The packet-count index value to use to delay interrupts. @@ -127,6 +140,11 @@ and the index selects a value from this list. The default value is 2 for both 10Gb and 1Gb ports, which means 16 packets (or the holdoff timer going off) before an interrupt is generated. +-1 disables packet counting. +Different cxgbe interfaces can be assigned different values via the +dev.cxgbe.X.holdoff_pktc_idx sysctl. +This sysctl works only when the interface has never been marked up (as done by +ifconfig up). .It Va hw.cxgbe.qsize_txq The size, in number of entries, of the descriptor ring used for a tx queue. @@ -134,10 +152,46 @@ A buf_ring of the same size is also allocated for additional software queuing. See .Xr ifnet 9 . The default value is 1024. +Different cxgbe interfaces can be assigned different values via the +dev.cxgbe.X.qsize_txq sysctl. +This sysctl works only when the interface has never been marked up (as done by +ifconfig up). .It Va hw.cxgbe.qsize_rxq The size, in number of entries, of the descriptor ring used for an rx queue. The default value is 1024. +Different cxgbe interfaces can be assigned different values via the +dev.cxgbe.X.qsize_rxq sysctl. +This sysctl works only when the interface has never been marked up (as done by +ifconfig up). +.It Va hw.cxgbe.interrupt_types +The interrupt types that the driver is allowed to use. +Bit 0 represents INTx (line interrupts), bit 1 MSI, bit 2 MSI-X. +The default is 7 (all allowed). +The driver will select the best possible type out of the allowed types by +itself. +.It Va hw.cxgbe.config_file +Select a pre-packaged device configuration file. +A configuration file contains a recipe for partitioning and configuring the +hardware resources on the card. +This tunable is for specialized applications only and should not be used in +normal operation. +The configuration profile currently in use is available in the dev.t4nex.X.cf +and dev.t4nex.X.cfcsum sysctls. +.It Va hw.cxgbe.linkcaps_allowed +.It Va hw.cxgbe.niccaps_allowed +.It Va hw.cxgbe.toecaps_allowed +.It Va hw.cxgbe.rdmacaps_allowed +.It Va hw.cxgbe.iscsicaps_allowed +.It Va hw.cxgbe.fcoecaps_allowed +Disallowing capabilities provides a hint to the driver and firmware to not +reserve hardware resources for that feature. +Each of these is a bit field with a bit for each sub-capability within the +capability. +This tunable is for specialized applications only and should not be used in +normal operation. +The capabilities for which hardware resources have been reserved are listed in +dev.t4nex.X.*caps sysctls. .El .Sh SUPPORT For general information and support, -- cgit v1.1 From b646d3f6998d3f539bcda6f94be4926461780cf7 Mon Sep 17 00:00:00 2001 From: kib Date: Fri, 16 Dec 2011 11:52:33 +0000 Subject: Document 'findstack'. MFC after: 1 week --- share/man/man4/ddb.4 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'share/man') diff --git a/share/man/man4/ddb.4 b/share/man/man4/ddb.4 index b9a8c82..c174b51 100644 --- a/share/man/man4/ddb.4 +++ b/share/man/man4/ddb.4 @@ -60,7 +60,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 5, 2010 +.Dd December 16, 2011 .Dt DDB 4 .Os .Sh NAME @@ -523,6 +523,16 @@ The optional argument limits the search. .\" .Pp +.It Xo +.Ic findstack +.Ar addr +.Xc +Prints the thread address for a thread kernel-mode stack of which contains the +specified address. +If the thread is not found, search the thread stack cache and prints the +cached stack address. +Otherwise, prints nothing. +.Pp .It Ic show Cm all procs Ns Op Li / Ns Cm m .It Ic ps Ns Op Li / Ns Cm m Display all process information. -- cgit v1.1 From 27a36f6ac8242750daa092abd7180b10d16f4508 Mon Sep 17 00:00:00 2001 From: glebius Date: Fri, 16 Dec 2011 12:16:56 +0000 Subject: A major overhaul of the CARP implementation. The ip_carp.c was started from scratch, copying needed functionality from the old implemenation on demand, with a thorough review of all code. The main change is that interface layer has been removed from the CARP. Now redundant addresses are configured exactly on the interfaces, they run on. The CARP configuration itself is, as before, configured and read via SIOCSVH/SIOCGVH ioctls. A new prefix created with SIOCAIFADDR or SIOCAIFADDR_IN6 may now be configured to a particular virtual host id, which makes the prefix redundant. ifconfig(8) semantics has been changed too: now one doesn't need to clone carpXX interface, he/she should directly configure a vhid on a Ethernet interface. To supply vhid data from the kernel to an application the getifaddrs(8) function had been changed to pass ifam_data with each address. [1] The new implementation definitely closes all PRs related to carp(4) being an interface, and may close several others. It also allows to run a single redundant IP per interface. Big thanks to Bjoern Zeeb for his help with inet6 part of patch, for idea on using ifam_data and for several rounds of reviewing! PR: kern/117000, kern/126945, kern/126714, kern/120130, kern/117448 Reviewed by: bz Submitted by: bz [1] --- share/man/man4/carp.4 | 246 +++++++++++++++++++++++--------------------------- 1 file changed, 115 insertions(+), 131 deletions(-) (limited to 'share/man') diff --git a/share/man/man4/carp.4 b/share/man/man4/carp.4 index 4064c6c..7c214ff 100644 --- a/share/man/man4/carp.4 +++ b/share/man/man4/carp.4 @@ -1,6 +1,7 @@ .\" $OpenBSD: carp.4,v 1.16 2004/12/07 23:41:35 jmc Exp $ .\" .\" Copyright (c) 2003, Ryan McBride. All rights reserved. +.\" Copyright (c) 2011, Gleb Smirnoff .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -25,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 15, 2011 +.Dd December 16, 2011 .Dt CARP 4 .Os .Sh NAME @@ -34,33 +35,17 @@ .Sh SYNOPSIS .Cd "device carp" .Sh DESCRIPTION -The -.Nm -interface is a pseudo-device that implements and controls the -CARP protocol. -CARP allows multiple hosts on the same local network to share a set of IP addresses. +The CARP allows multiple hosts on the same local network to share a set of +IPv4 and/or IPv6 addresses. Its primary purpose is to ensure that these -addresses are always available, but in some configurations -.Nm -can also provide load balancing functionality. -.Pp -A -.Nm -interface can be created at runtime using the -.Nm ifconfig Li carp Ns Ar N Cm create -command or by configuring -it via -.Va cloned_interfaces -in the -.Pa /etc/rc.conf -file. +addresses are always available. .Pp To use .Nm , -the administrator needs to configure at minimum a common virtual host ID (VHID) -and virtual host IP address on each machine which is to take part in the virtual -group. -Additional parameters can also be set on a per-interface basis: +the administrator needs to configure at minimum a common virtual host ID +(vhid) and attach at least one IP address to this vhid on each machine which +is to take part in the virtual group. +Additional parameters can also be set on a per-vhid basis: .Cm advbase and .Cm advskew , @@ -93,9 +78,20 @@ or through the .Dv SIOCSVH .Xr ioctl 2 . .Pp +CARP virtual hosts can be configured on multicast capable interfaces: Ethernet, +layer 2 VLAN, FDDI and Token Ring. +An arbitrary number of virtual host IDs can be configured on an interface. +An arbitrary number of IPv4 or IPv6 addresses can be attached to a particular +vhid. +It is important that all hosts participating in a vhid have the same list +of prefixes configured on the vhid, since all prefixes are included in the +cryptographic checksum supplied in each advertisement. +Multiple vhids running on one interface participate in master/backup +elections independently. +.Pp Additionally, there are a number of global parameters which can be set using .Xr sysctl 8 : -.Bl -tag -width ".Va net.inet.carp.arpbalance" +.Bl -tag -width ".Va net.inet.carp.preempt" .It Va net.inet.carp.allow Accept incoming .Nm @@ -125,9 +121,6 @@ Values above 1 enable logging of bad .Nm packets. Default value is 1. -.It Va net.inet.carp.arpbalance -Balance local traffic using ARP (see below). -Disabled by default. .It Va net.inet.carp.suppress_preempt A read only value showing the status of preemption suppression. Preemption can be suppressed if link on an interface is down @@ -138,36 +131,36 @@ Value of 0 means that preemption is not suppressed, since no problems are detected. Every problem increments suppression counter. .El -.Sh ARP level load balancing -The -.Nm -has limited abilities for load balancing the incoming connections -between hosts in Ethernet network. -For load balancing operation, one needs several CARP interfaces that -are configured to the same IP address, but to a different VHIDs. -Once an ARP request is received, the CARP protocol will use a hashing -function against the source IP address in the ARP request to determine -which VHID should this request belong to. -If the corresponding CARP interface is in master state, the ARP request -will be replied, otherwise it will be ignored. -See the -.Sx EXAMPLES -section for a practical example of load balancing. -.Pp -The ARP load balancing has some limitations. -First, ARP balancing only works on the local network segment. -It cannot balance traffic that crosses a router, because the -router itself will always be balanced to the same virtual host. -Second, ARP load balancing can lead to asymmetric routing -of incoming and outgoing traffic, and thus combining it with -.Xr pfsync 4 -is dangerous, because this creates a race condition between -balanced routers and a host they are serving. -Imagine an incoming packet creating state on the first router, being -forwarded to its destination, and destination replying faster -than the state information is packed and synced with the second router. -If the reply would be load balanced to second router, it will be -dropped due to no state. +.\".Sh ARP level load balancing +.\"The +.\".Nm +.\"has limited abilities for load balancing the incoming connections +.\"between hosts in Ethernet network. +.\"For load balancing operation, one needs several CARP interfaces that +.\"are configured to the same IP address, but to a different vhids. +.\"Once an ARP request is received, the CARP protocol will use a hashing +.\"function against the source IP address in the ARP request to determine +.\"which vhid should this request belong to. +.\"If the corresponding CARP interface is in master state, the ARP request +.\"will be replied, otherwise it will be ignored. +.\"See the +.\".Sx EXAMPLES +.\"section for a practical example of load balancing. +.\".Pp +.\"The ARP load balancing has some limitations. +.\"First, ARP balancing only works on the local network segment. +.\"It cannot balance traffic that crosses a router, because the +.\"router itself will always be balanced to the same virtual host. +.\"Second, ARP load balancing can lead to asymmetric routing +.\"of incoming and outgoing traffic, and thus combining it with +.\".Xr pfsync 4 +.\"is dangerous, because this creates a race condition between +.\"balanced routers and a host they are serving. +.\"Imagine an incoming packet creating state on the first router, being +.\"forwarded to its destination, and destination replying faster +.\"than the state information is packed and synced with the second router. +.\"If the reply would be load balanced to second router, it will be +.\"dropped due to no state. .Sh STATE CHANGE NOTIFICATIONS Sometimes it is useful to get notified about .Nm @@ -175,13 +168,10 @@ status change events. This can be accomplished by using .Xr devd 8 hooks. -Master/slave events are signalled as -.Nm -interface -.Dv LINK_UP -or -.Dv LINK_DOWN -event. +Master/slave events are signalled under system +.Dv CARP . +Subsystem specifies vhid and name of interface, where event occured. +Type of the message displays new state of vhid. Please see .Xr devd.conf 5 and @@ -197,23 +187,19 @@ Enable it on both host A and B: .Pp .Dl sysctl net.inet.carp.preempt=1 .Pp -Assume that host A is the preferred master and 192.168.1.x/24 is -configured on one physical interface and 192.168.2.y/24 on another. +Assume that host A is the preferred master and we are running the +192.168.1.0/24 prefix on em0 and 192.168.2.0/24 on em1. This is the setup for host A: .Bd -literal -offset indent -ifconfig carp0 create -ifconfig carp0 vhid 1 pass mekmitasdigoat 192.168.1.1/24 -ifconfig carp1 create -ifconfig carp1 vhid 2 pass mekmitasdigoat 192.168.2.1/24 +ifconfig em0 vhid 1 pass mekmitasdigoat 192.168.1.1/24 +ifconfig em1 vhid 2 pass mekmitasdigoat 192.168.2.1/24 .Ed .Pp The setup for host B is identical, but it has a higher .Cm advskew : .Bd -literal -offset indent -ifconfig carp0 create -ifconfig carp0 vhid 1 advskew 100 pass mekmitasdigoat 192.168.1.1/24 -ifconfig carp1 create -ifconfig carp1 vhid 2 advskew 100 pass mekmitasdigoat 192.168.2.1/24 +ifconfig em0 vhid 1 advskew 100 pass mekmitasdigoat 192.168.1.1/24 +ifconfig em1 vhid 2 advskew 100 pass mekmitasdigoat 192.168.2.1/24 .Ed .Pp Because of the preempt option, when one of the physical interfaces of @@ -224,67 +210,60 @@ is adjusted to 240 on all its interfaces. This will cause host B to preempt on both interfaces instead of just the failed one. -.Pp -In order to set up an ARP balanced virtual host, it is necessary to configure -one virtual host for each physical host which would respond to ARP requests -and thus handle the traffic. -In the following example, two virtual hosts are configured on two hosts to -provide balancing and failover for the IP address 192.168.1.10. -.Pp -First the -.Nm -interfaces on host A are configured. -The -.Cm advskew -of 100 on the second virtual host means that its advertisements will be sent -out slightly less frequently. -.Bd -literal -offset indent -ifconfig carp0 create -ifconfig carp0 vhid 1 pass mekmitasdigoat 192.168.1.10/24 -ifconfig carp1 create -ifconfig carp1 vhid 2 advskew 100 pass mekmitasdigoat 192.168.1.10/24 -.Ed -.Pp -The configuration for host B is identical, except the -.Cm advskew -is on virtual host 1 rather than virtual host 2. -.Bd -literal -offset indent -ifconfig carp0 create -ifconfig carp0 vhid 1 advskew 100 pass mekmitasdigoat 192.168.1.10/24 -ifconfig carp1 create -ifconfig carp1 vhid 2 pass mekmitasdigoat 192.168.1.10/24 -.Ed -.Pp -Finally, the ARP balancing feature must be enabled on both hosts: -.Pp -.Dl sysctl net.inet.carp.arpbalance=1 -.Pp -When the hosts receive an ARP request for 192.168.1.10, the source IP address -of the request is used to compute which virtual host should answer the request. -The host which is master of the selected virtual host will reply to the -request, the other(s) will ignore it. -.Pp -This way, locally connected systems will receive different ARP replies and -subsequent IP traffic will be balanced among the hosts. -If one of the hosts fails, the other will take over the virtual MAC address, -and begin answering ARP requests on its behalf. +.\".Pp +.\"In order to set up an ARP balanced virtual host, it is necessary to configure +.\"one virtual host for each physical host which would respond to ARP requests +.\"and thus handle the traffic. +.\"In the following example, two virtual hosts are configured on two hosts to +.\"provide balancing and failover for the IP address 192.168.1.10. +.\".Pp +.\"First the +.\".Nm +.\"interfaces on host A are configured. +.\"The +.\".Cm advskew +.\"of 100 on the second virtual host means that its advertisements will be sent +.\"out slightly less frequently. +.\".Bd -literal -offset indent +.\"ifconfig carp0 create +.\"ifconfig carp0 vhid 1 pass mekmitasdigoat 192.168.1.10/24 +.\"ifconfig carp1 create +.\"ifconfig carp1 vhid 2 advskew 100 pass mekmitasdigoat 192.168.1.10/24 +.\".Ed +.\".Pp +.\"The configuration for host B is identical, except the +.\".Cm advskew +.\"is on virtual host 1 rather than virtual host 2. +.\".Bd -literal -offset indent +.\"ifconfig carp0 create +.\"ifconfig carp0 vhid 1 advskew 100 pass mekmitasdigoat 192.168.1.10/24 +.\"ifconfig carp1 create +.\"ifconfig carp1 vhid 2 pass mekmitasdigoat 192.168.1.10/24 +.\".Ed +.\".Pp +.\"Finally, the ARP balancing feature must be enabled on both hosts: +.\".Pp +.\".Dl sysctl net.inet.carp.arpbalance=1 +.\".Pp +.\"When the hosts receive an ARP request for 192.168.1.10, the source IP address +.\"of the request is used to compute which virtual host should answer the request. +.\"The host which is master of the selected virtual host will reply to the +.\"request, the other(s) will ignore it. +.\".Pp +.\"This way, locally connected systems will receive different ARP replies and +.\"subsequent IP traffic will be balanced among the hosts. +.\"If one of the hosts fails, the other will take over the virtual MAC address, +.\"and begin answering ARP requests on its behalf. .Pp Processing of .Nm -status change events can be set up by using the following devd.conf rules: +status change events can be set up by using the following devd.conf rule: .Bd -literal -offset indent notify 0 { - match "system" "IFNET"; - match "type" "LINK_UP"; - match "subsystem" "carp*"; - action "/root/carpcontrol.sh $type $subsystem"; -}; - -notify 0 { - match "system" "IFNET"; - match "type" "LINK_DOWN"; - match "subsystem" "carp*"; - action "/root/carpcontrol.sh $type $subsystem"; + match "system" "CARP"; + match "subsystem" "[0-9]+@"; + match "type" "(MASTER|BACKUP)"; + action "/root/carpcontrol.sh $subsystem $type"; }; .Ed .Sh SEE ALSO @@ -303,3 +282,8 @@ The .Nm device was imported into .Fx 5.4 . +In +.Fx 10 +the +.Nm +was significantly rewritten, and is no longer a pseudo-interface. -- cgit v1.1 From bdf9f67646239b0d85ac3d47928768aefa05f164 Mon Sep 17 00:00:00 2001 From: mav Date: Fri, 16 Dec 2011 14:19:46 +0000 Subject: Some formatting fixes. Submitted by: ru --- share/man/man4/eventtimers.4 | 45 ++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) (limited to 'share/man') diff --git a/share/man/man4/eventtimers.4 b/share/man/man4/eventtimers.4 index 37d5fc8..f5ce95f 100644 --- a/share/man/man4/eventtimers.4 +++ b/share/man/man4/eventtimers.4 @@ -46,16 +46,22 @@ statistics, time keeping, profiling and many other things, based on .Xr callout 9 mechanism. These purposes now grouped into three main callbacks: -.Bl -tag -.It hardclock() +.Bl -tag -width ".Fn hardclock" +.It Fn hardclock .Xr callout 9 -and timekeeping events entry. Called with frequency defined by hz variable, +and timekeeping events entry. +Called with frequency defined by +.Va hz +variable, usually 1000Hz. -.It statclock() -statistics and scheduler events entry. Called with frequency about 128Hz. -.It profclock() -profiler events entry. When enabled, called with frequency about 8KHz. +.It Fn statclock +statistics and scheduler events entry. +Called with frequency about 128Hz. +.It Fn profclock +profiler events entry. +When enabled, called with frequency about 8KHz. .El +.Pp Different platforms provide different kinds of timer hardware. The goal of the event timers subsystem is to provide unified way to control that hardware, and to use it, supplying kernel with all required time-based @@ -80,11 +86,13 @@ kern.eventtimer.et.HPET.flags: 7 kern.eventtimer.et.HPET.frequency: 14318180 kern.eventtimer.et.HPET.quality: 550 .Ed -, where: -.Bl -tag +.Pp +where: +.Bl -inset .It Va kern.eventtimer.et. Ns Ar X Ns Va .flags +is a bitmask, defining event timer capabilities: -.Bl -tag -compact +.Bl -tag -offset indent -width indent -compact .It 1 periodic mode supported, .It 2 @@ -97,8 +105,10 @@ timer may stop when CPU goes to sleep state, timer supports only power-of-2 divisors. .El .It Va kern.eventtimer.et. Ns Ar X Ns Va .frequency +is a timer base frequency, .It Va kern.eventtimer.et. Ns Ar X Ns Va .quality +is an integral value, defining how good is this timer, comparing to others. .El .Pp @@ -107,7 +117,7 @@ Current choice can be read and affected via .Va kern.eventtimer.timer tunable/sysctl. Several other tunables/sysctls are affecting how exactly this timer is used: -.Bl -tag +.Bl -inset .It Va kern.eventtimer.periodic allows to choose periodic and one-shot operation mode. In periodic mode, periodic interrupts from timer hardware are taken as the @@ -119,15 +129,22 @@ Default value depends of chosen timer capabilities, but one-shot mode is preferred, until other is forced by user or hardware. .It Va kern.eventtimer.singlemul in periodic mode specifies how much times higher timer frequency should be, -to not strictly alias hardclock() and statclock() events. Default values are +to not strictly alias +.Fn hardclock +and +.Fn statclock +events. +Default values are 1, 2 or 4, depending on configured HZ value. .It Va kern.eventtimer.idletick makes each CPU to receive every timer interrupt independently of whether they -busy or not. By default this options is disabled. If chosen timer is per-CPU +busy or not. +By default this options is disabled. +If chosen timer is per-CPU and runs in periodic mode, this option has no effect - all interrupts are always generating. .El .Sh SEE ALSO -.Xr attimer 4 , .Xr atrtc 4 , +.Xr attimer 4 , .Xr hpet 4 -- cgit v1.1 From a6ba1663e403051d36000b3b14ac9e5c92576a29 Mon Sep 17 00:00:00 2001 From: ru Date: Sat, 17 Dec 2011 06:57:35 +0000 Subject: Fixed some of markup. Reviewed by: jhb --- share/man/man9/shm_map.9 | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'share/man') diff --git a/share/man/man9/shm_map.9 b/share/man/man9/shm_map.9 index 6f61147..a711fb6 100644 --- a/share/man/man9/shm_map.9 +++ b/share/man/man9/shm_map.9 @@ -30,9 +30,8 @@ .Dt SHM_MAP 9 .Os .Sh NAME -.Nm shm_map , -.Nm shm_unmap -.Nd map shared memory objects into the kernel's address space +.Nm shm_map , shm_unmap +.Nd "map shared memory objects into the kernel's address space" .Sh SYNOPSIS .In sys/types.h .In sys/mman.h @@ -42,9 +41,9 @@ .Fn shm_unmap "struct file *fp" "void *mem" "size_t size" .Sh DESCRIPTION The -.Nm shm_map +.Fn shm_map and -.Nm shm_unmap +.Fn shm_unmap functions provide an API for mapping shared memory objects into the kernel. Shared memory objects are created by .Xr shm_open 2 . @@ -57,13 +56,13 @@ Shared memory objects can still be grown while mapped into the kernel. .Pp To simplify the accounting needed to enforce the above requirement, callers of this API are required to unmap the entire region mapped by -.Nm shm_map +.Fn shm_map when calling -.Nm shm_unmap . +.Fn shm_unmap . Unmapping only a portion of the region is not permitted. .Pp The -.Nm shm_map +.Fn shm_map function locates the shared memory object associated with the open file .Fa fp . It maps the region of that object described by @@ -77,9 +76,9 @@ will be set to the start of the mapping. All pages for the range will be wired into memory upon successful return. .Pp The -.Nm shm_unmap +.Fn shm_unmap function unmaps a region previously mapped by -.Nm shm_map . +.Fn shm_map . The .Fa mem argument should match the value previously returned in @@ -87,22 +86,22 @@ argument should match the value previously returned in and the .Fa size argument should match the value passed to -.Nm shm_map . +.Fn shm_map . .Pp Note that -.Nm shm_map +.Fn shm_map will not hold an extra reference on the open file .Fa fp for the lifetime of the mapping. Instead, the calling code is required to do this if it wishes to use -.Nm shm_unmap +.Fn shm_unmap on the region in the future. .Sh RETURN VALUES The -.Nm shm_map +.Fn shm_map and -.Nm shm_unmap +.Fn shm_unmap functions return zero on success or an error on failure. .Sh EXAMPLES The following function accepts a file descriptor for a shared memory @@ -110,7 +109,7 @@ object. It maps the first sixteen kilobytes of the object into the kernel, performs some work on that address, and then unmaps the address before returning. -.Bd -literal +.Bd -literal -offset indent int shm_example(int fd) { @@ -118,7 +117,7 @@ shm_example(int fd) void *mem; int error; - error = fget(curthread, fd, CAP_MMAP, &fp) + error = fget(curthread, fd, CAP_MMAP, &fp); if (error) return (error); error = shm_map(fp, 16384, 0, &mem); @@ -136,7 +135,7 @@ shm_example(int fd) .Ed .Sh ERRORS The -.Nm shm_map +.Fn shm_map function returns the following errors on failure: .Bl -tag -width Er .It Bq Er EINVAL @@ -158,7 +157,7 @@ The shared memory object could not be mapped due to some other VM error. .El .Pp The -.Nm shm_unmap +.Fn shm_unmap function returns the following errors on failure: .Bl -tag -width Er .It Bq Er EINVAL -- cgit v1.1 From 68a134710c655dcf316d05f6071b84d881abde0b Mon Sep 17 00:00:00 2001 From: jhb Date: Mon, 19 Dec 2011 18:55:13 +0000 Subject: Add a TASK_INITIALIZER() macro that can be used to statically initialize a task structure. Reviewed by: gj MFC after: 2 weeks --- share/man/man9/Makefile | 1 + share/man/man9/taskqueue.9 | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'share/man') diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index b150b64..124fae9 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1250,6 +1250,7 @@ MLINKS+=sysctl_ctx_init.9 sysctl_ctx_entry_add.9 \ sysctl_ctx_init.9 sysctl_ctx_free.9 MLINKS+=SYSINIT.9 SYSUNINIT.9 MLINKS+=taskqueue.9 TASK_INIT.9 \ + taskqueue.9 TASK_INITIALIZER.9 \ taskqueue.9 taskqueue_cancel.9 \ taskqueue.9 taskqueue_create.9 \ taskqueue.9 taskqueue_create_fast.9 \ diff --git a/share/man/man9/taskqueue.9 b/share/man/man9/taskqueue.9 index 40d64af..056ee66 100644 --- a/share/man/man9/taskqueue.9 +++ b/share/man/man9/taskqueue.9 @@ -80,6 +80,7 @@ struct timeout_task; .Ft void .Fn taskqueue_run "struct taskqueue *queue" .Fn TASK_INIT "struct task *task" "int priority" "task_fn_t func" "void *context" +.Fn TASK_INITIALIZER "int priority" "task_fn_t func" "void *context" .Fn TASKQUEUE_DECLARE "name" .Fn TASKQUEUE_DEFINE "name" "taskqueue_enqueue_fn enqueue" "void *context" "init" .Fn TASKQUEUE_FAST_DEFINE "name" "taskqueue_enqueue_fn enqueue" "void *context" "init" @@ -243,9 +244,14 @@ A convenience macro, is provided to initialise a .Va task structure. +The +.Fn TASK_INITIALIZER +macro generates an initializer for a task structure. A macro .Fn TIMEOUT_TASK_INIT "queue" "timeout_task" "priority" "func" "context" -initializes the timeout_task structure. +initializes the +.Va timeout_task +structure. The values of .Va priority , .Va func , -- cgit v1.1 From cb7060fb0090efad0fe7704e6ab3c8c43aa1ab3f Mon Sep 17 00:00:00 2001 From: mav Date: Tue, 20 Dec 2011 11:40:22 +0000 Subject: Add eventtimers(9) man page, describing related KPIs. Sponsored by: iXsystems, Inc. MFC after: 1 month --- share/man/man4/eventtimers.4 | 3 +- share/man/man9/Makefile | 11 ++ share/man/man9/eventtimers.9 | 236 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 249 insertions(+), 1 deletion(-) create mode 100644 share/man/man9/eventtimers.9 (limited to 'share/man') diff --git a/share/man/man4/eventtimers.4 b/share/man/man4/eventtimers.4 index f5ce95f..c74c3c4 100644 --- a/share/man/man4/eventtimers.4 +++ b/share/man/man4/eventtimers.4 @@ -147,4 +147,5 @@ always generating. .Sh SEE ALSO .Xr atrtc 4 , .Xr attimer 4 , -.Xr hpet 4 +.Xr hpet 4 , +.Xr eventtimers 9 diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 124fae9..2b9f3bb 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -102,6 +102,7 @@ MAN= accept_filter.9 \ driver.9 \ DRIVER_MODULE.9 \ EVENTHANDLER.9 \ + eventtimers.9 \ extattr.9 \ fail.9 \ fetch.9 \ @@ -614,6 +615,16 @@ MLINKS+=EVENTHANDLER.9 EVENTHANDLER_DECLARE.9 \ EVENTHANDLER.9 eventhandler_prune_list.9 \ EVENTHANDLER.9 EVENTHANDLER_REGISTER.9 \ EVENTHANDLER.9 eventhandler_register.9 +MLINKS+=eventtimers.9 et_register.9 \ + eventtimers.9 et_deregister.9 \ + eventtimers.9 et_ban.9 \ + eventtimers.9 et_find.9 \ + eventtimers.9 et_free.9 \ + eventtimers.9 et_init.9 \ + eventtimers.9 ET_LOCK.9 \ + eventtimers.9 ET_UNLOCK.9 \ + eventtimers.9 et_start.9 \ + eventtimers.9 et_stop.9 MLINKS+=fetch.9 fubyte.9 \ fetch.9 fuswintr.9 \ fetch.9 fuword.9 \ diff --git a/share/man/man9/eventtimers.9 b/share/man/man9/eventtimers.9 new file mode 100644 index 0000000..db530a9 --- /dev/null +++ b/share/man/man9/eventtimers.9 @@ -0,0 +1,236 @@ +.\" +.\" Copyright (c) 2011 Alexander Motin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 14, 2011 +.Dt EVENTTIMERS 9 +.Os +.Sh NAME +.Nm eventtimers +.Nd kernel event timers subsystem +.Sh SYNOPSIS +.In sys/timeet.h +.Bd -literal +struct eventtimer; + +typedef int et_start_t(struct eventtimer *et, + struct bintime *first, struct bintime *period); +typedef int et_stop_t(struct eventtimer *et); +typedef void et_event_cb_t(struct eventtimer *et, void *arg); +typedef int et_deregister_cb_t(struct eventtimer *et, void *arg); + +struct eventtimer { + SLIST_ENTRY(eventtimer) et_all; + char *et_name; + int et_flags; +#define ET_FLAGS_PERIODIC 1 +#define ET_FLAGS_ONESHOT 2 +#define ET_FLAGS_PERCPU 4 +#define ET_FLAGS_C3STOP 8 +#define ET_FLAGS_POW2DIV 16 + int et_quality; + int et_active; + u_int64_t et_frequency; + struct bintime et_min_period; + struct bintime et_max_period; + et_start_t *et_start; + et_stop_t *et_stop; + et_event_cb_t *et_event_cb; + et_deregister_cb_t *et_deregister_cb; + void *et_arg; + void *et_priv; + struct sysctl_oid *et_sysctl; +}; +.Ed +.Ft int +.Fn et_register "struct eventtimer *et" +.Ft int +.Fn et_deregister "struct eventtimer *et" +.Fn ET_LOCK +.Fn ET_UNLOCK +.Ft struct eventtimer * +.Fn et_find "const char *name" "int check" "int want" +.Ft int +.Fn et_init "struct eventtimer *et" "et_event_cb_t *event" "et_deregister_cb_t *deregister" "void *arg" +.Ft int +.Fn et_start "struct eventtimer *et" "struct bintime *first" "struct bintime *period" +.Ft int +.Fn et_stop "struct eventtimer *et" +.Ft int +.Fn et_ban "struct eventtimer *et" +.Ft int +.Fn et_free "struct eventtimer *et" +.Sh DESCRIPTION +Event timers are responsible for generating interrupts at specified time +or periodically, to run different time-based events. +Subsystem consists of three main parts: +.Bl -tag +.It Drivers +Manage hardware to generate requested time events. +.It Consumers +.Pa sys/kern/kern_clocksource.c +uses event timers to supply kernel with +.Fn hardclock , +.Fn statclock +and +.Fn profclock +time events. +.It Glue code +.Pa sys/sys/timeet.h , +.Pa sys/kern/kern_et.c +provide APIs for event timer drivers and consumers. +.El +.Sh DRIVER API +Driver API is built around eventtimer structure. +To register its functionality driver allocates that structure and calls +.Fn et_register . +Driver should fill following fields there: +.Bl -tag +.It Va et_name +Unique name of the event timer for management purposes. +.It Va et_flags +Set of flags, describing timer capabilities: +.Bl -tag -width "ET_FLAGS_PERIODIC" -compact +.It ET_FLAGS_PERIODIC +Periodic mode supported. +.It ET_FLAGS_ONESHOT +One-shot mode supported. +.It ET_FLAGS_PERCPU +Timer is per-CPU. +.It ET_FLAGS_C3STOP +Timer may stop in CPU sleep state. +.It ET_FLAGS_POW2DIV +Timer supports only 2^n divisors. +.El +.It Va et_quality +Abstract value to certify whether this timecounter is better than the others. +Higher value means better. +.It Va et_frequency +Timer oscillator's base frequency, if applicable and known. +Used by consumers to predict set of possible frequencies that could be +obtained by dividing it. +Should be zero if not applicable or unknown. +.It Va et_min_period , et_max_period +Minimal and maximal reliably programmable time periods. +.It Va et_start +Driver's timer start function pointer. +.It Va et_stop +Driver's timer stop function pointer. +.It Va et_priv +Driver's private data storage. +.El +.Pp +After the event timer functionality is registered, it is controlled via +.Va et_start +and +.Va et_stop +methods. +.Va et_start +method is called to start the specified event timer. +The last two arguments are used to specify time when events should be +generated. +.Va first +argument specifies time period before the first event generated. +In periodic mode NULL value specifies that first period is equal to the +.Va period +argument value. +.Va period +argument specifies the time period between following events for the +periodic mode. +The NULL value there specifies the one-shot mode. +At least one of these two arguments should be not NULL. +When event time arrive, driver should call +.Va et_event_cb +callback function, passing +.Va et_arg +as the second argument. +.Va et_stop +method is called to stop the specified event timer. +For the per-CPU event timers +.Va et_start +and +.Va et_stop +methods control timers associated with the current CPU. +.Pp +Driver may deregister its functionality by calling +.Fn et_deregister . +.Sh CONSUMER API +.Fn et_find +allows consumer to find available event timer, optionally matching specific +name and/or capability flags. +Consumer may read returned eventtimer structure, but should not modify it. +When wanted event timer is found, +.Fn et_init +should be called for it, submitting +.Va event +and optionally +.Va deregister +callbacks functions, and the opaque argument +.Va arg . +That argument will be passed as argument to the callbacks. +Event callback function will be called on scheduled time events. +It is called from the hardware interrupt context, so no sleep is permitted +there. +Deregister callback function may be called to report consumer that the event +timer functionality is no longer available. +On this call, consumer should stop using event timer before the return. +.Pp +After the timer is found and initialized, it can be controlled via +.Fn et_start +and +.Fn et_stop . +The arguments are the same as described in driver API. +Per-CPU event timers can be controlled only from specific CPUs. +.Pp +.Fn et_ban +allows consumer to mark event timer as broken via clearing both one-shot and +periodic capability flags, if it was somehow detected. +.Fn et_free +is the opposite to +.Fn et_init . +It releases the event timer for other consumers use. +.Pp +.Fn ET_LOCK +and +.Fn ET_UNLOCK +macros should be used to manage +.Xr mutex 9 +lock around +.Fn et_find , +.Fn et_init +and +.Fn et_free +calls to serialize access to the list of the registered event timers and the +pointers returned by +.Fn et_find . +.Fn et_start +and +.Fn et_stop +calls should be serialized in consumer's internal way to avoid concurrent +timer hardware access. +.Sh SEE ALSO +.Xr eventtimers 4 +.Sh AUTHORS +.An Alexander Motin Aq mav@FreeBSD.org -- cgit v1.1 From 7cd583b49ab304c1a94bc8e9c2be06e7634dc2bf Mon Sep 17 00:00:00 2001 From: mav Date: Tue, 20 Dec 2011 13:49:52 +0000 Subject: Add apic(4) man page, now mostly to cover its event timer functionality. --- share/man/man4/Makefile | 2 ++ share/man/man4/apic.4 | 78 ++++++++++++++++++++++++++++++++++++++++++++ share/man/man4/atrtc.4 | 5 +-- share/man/man4/attimer.4 | 5 +-- share/man/man4/eventtimers.4 | 1 + share/man/man4/hpet.4 | 1 + 6 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 share/man/man4/apic.4 (limited to 'share/man') diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 69e9a7c..4c93cfc 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -38,6 +38,7 @@ MAN= aac.4 \ ${_amdtemp.4} \ amr.4 \ an.4 \ + ${_apic.4} \ arcmsr.4 \ ${_asmc.4} \ asr.4 \ @@ -673,6 +674,7 @@ _acpi_sony.4= acpi_sony.4 _acpi_toshiba.4=acpi_toshiba.4 _acpi_wmi.4= acpi_wmi.4 _aesni.4= aesni.4 +_apic.4= apic.4 _atrtc.4= atrtc.4 _attimer.4= attimer.4 _aibs.4= aibs.4 diff --git a/share/man/man4/apic.4 b/share/man/man4/apic.4 new file mode 100644 index 0000000..89a869d --- /dev/null +++ b/share/man/man4/apic.4 @@ -0,0 +1,78 @@ +.\" Copyright (c) 2011 Alexander Motin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 20, 2011 +.Dt APIC 4 +.Os +.Sh NAME +.Nm apic +.Nd Advanced Programmable Interrupt Controller (APIC) driver +.Sh SYNOPSIS +This driver is a mandatory part of amd64 kernel. +To compile this driver into i386 or pc98 kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device apic" +.Ed +.Pp +The following tunable is settable from the +.Xr loader 8 : +.Bl -ohang +.It Va hint.apic. Ns Ar X Ns Va .clock +controls event timers functionality support. Setting to 0, disables it. +Default value is 1. +.It Va hint.apic. Ns Ar X Ns Va .disabled +Set this to 1 to disable APIC support, falling back to the legacy PIC. +.El +.Sh DESCRIPTION +There are two components in the Intel APIC system, the local APIC (LAPIC) +and the I/O APIC. +There is one LAPIC in each CPU in the system. +There is typically one I/O APIC for each peripheral bus in the system. +.Pp +LAPICs manage all external and interrupts for specific processor in an +SMP system. +In addition, they are able to accept and generate inter-processor interrupts +(IPIs). +.Pp +I/O APICs contain a redirection table, which is used to route the interrupts +they receive from peripheral buses to one or more local APICs. +.Pp +Each LAPIC includes one 32-bit programable timer. +This driver uses them to supply kernel with one event timer named "LAPIC". +Event timer provided by the driver supports both one-shot an periodic modes. +Because of LAPIC nature it is per-CPU. +The timer frequency is not reported by the platform and so automatically +measured by the driver on the first use. +Depending on CPU model this timer may stop in C3 and deeper CPU sleep states. +Driver automatically adjusts event timer priority and reports it to prevent +entering dangerous sleep states when it is used. +.Sh SEE ALSO +.Xr atrtc 4 , +.Xr attimer 4 , +.Xr eventtimers 4 , +.Xr hpet 4 diff --git a/share/man/man4/atrtc.4 b/share/man/man4/atrtc.4 index 2a75d03..0b0dd8f 100644 --- a/share/man/man4/atrtc.4 +++ b/share/man/man4/atrtc.4 @@ -51,6 +51,7 @@ divisors. .Pp Event timer provided by the driver is irrelevant to CPU power states. .Sh SEE ALSO +.Xr apic 4 , .Xr attimer 4 , -.Xr hpet 4 , -.Xr eventtimers 4 +.Xr eventtimers 4 , +.Xr hpet 4 diff --git a/share/man/man4/attimer.4 b/share/man/man4/attimer.4 index 6dd4ee2..78d40d4 100644 --- a/share/man/man4/attimer.4 +++ b/share/man/man4/attimer.4 @@ -70,6 +70,7 @@ functionality is disabled. .Pp Event timer provided by the driver is irrelevant to CPU power states. .Sh SEE ALSO +.Xr apic 4 , .Xr atrtc 4 , -.Xr hpet 4 , -.Xr eventtimers 4 +.Xr eventtimers 4 , +.Xr hpet 4 diff --git a/share/man/man4/eventtimers.4 b/share/man/man4/eventtimers.4 index c74c3c4..e29d32f8 100644 --- a/share/man/man4/eventtimers.4 +++ b/share/man/man4/eventtimers.4 @@ -145,6 +145,7 @@ and runs in periodic mode, this option has no effect - all interrupts are always generating. .El .Sh SEE ALSO +.Xr apic 4 , .Xr atrtc 4 , .Xr attimer 4 , .Xr hpet 4 , diff --git a/share/man/man4/hpet.4 b/share/man/man4/hpet.4 index bcfea1c..092996c 100644 --- a/share/man/man4/hpet.4 +++ b/share/man/man4/hpet.4 @@ -94,6 +94,7 @@ group is bound to specific CPU core. This is possible only when each of these comparators has own unsharable IRQ. .Sh SEE ALSO .Xr acpi 4 , +.Xr apic 4 , .Xr atrtc 4 , .Xr attimer 4 , .Xr eventtimers 4 -- cgit v1.1 From 8c74bad9f352ee33107ec1cbfa7273cb27d41a98 Mon Sep 17 00:00:00 2001 From: glebius Date: Tue, 20 Dec 2011 13:53:31 +0000 Subject: Restore a feature that was present in 5.x and 6.x, and was cleared in 7.x, 8.x and 9.x with pf(4) imports: pfsync(4) should suppress CARP preemption, while it is running its bulk update. However, reimplement the feature in more elegant manner, that is partially inspired by newer OpenBSD: - Rename term "suppression" to "demotion", to match with OpenBSD. - Keep a global demotion factor, that can be raised by several conditions, for now these are: - interface goes down - carp(4) has problems with ip_output() or ip6_output() - pfsync performs bulk update - Unlike in OpenBSD the demotion factor isn't a counter, but is actual value added to advskew. The adjustment values for particular error conditions are also configurable, and their defaults are maximum advskew value, so a single failure bumps demotion to maximum. This is for POLA compatibility, and should satisfy most users. - Demotion factor is a writable sysctl, so user can do foot shooting, if he desires to. --- share/man/man4/carp.4 | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) (limited to 'share/man') diff --git a/share/man/man4/carp.4 b/share/man/man4/carp.4 index 7c214ff..1b59e72 100644 --- a/share/man/man4/carp.4 +++ b/share/man/man4/carp.4 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 16, 2011 +.Dd December 20, 2011 .Dt CARP 4 .Os .Sh NAME @@ -121,15 +121,38 @@ Values above 1 enable logging of bad .Nm packets. Default value is 1. -.It Va net.inet.carp.suppress_preempt -A read only value showing the status of preemption suppression. -Preemption can be suppressed if link on an interface is down -or when +.It Va net.inet.carp.demotion +This value shows current level of CARP demotion. +The value is added to the actual advskew sent in announcements for +all vhids. +At normal system operation the demotion factor is zero. +However, problematic conditions raise its level: when +.Nm +experiences problem with sending announcements, when an interface +running a vhid goes down, or while the .Xr pfsync 4 interface is not synchronized. -Value of 0 means that preemption is not suppressed, since no -problems are detected. -Every problem increments suppression counter. +The demotion value is writable, so that user may alter it +depending on some external conditions, for example on status of some +daemon utility. +However, altering the value should be performed with care, do +not conflict with subsystems that adjust demotion factor +automatically: +.Nm +and +.Xr pfsync 4 . +.It Va net.inet.carp.ifdown_demotion_factor +Value added to +.Va net.inet.carp.demotion +when interface running a vhid goes down. +Default value is 240 (maximum advskew value). +.It Va net.inet.carp.senderr_demotion_factor +Value added to +.Va net.inet.carp.demotion +when +.Nm +experiences errors sending its announcements. +Default value is 240 (maximum advskew value). .El .\".Sh ARP level load balancing .\"The -- cgit v1.1 From 1eeaa2989fb2285b0318968605f3fe7826f8e863 Mon Sep 17 00:00:00 2001 From: mav Date: Tue, 20 Dec 2011 14:12:50 +0000 Subject: Remove extra "and" left from earlier version. --- share/man/man4/apic.4 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'share/man') diff --git a/share/man/man4/apic.4 b/share/man/man4/apic.4 index 89a869d..bcd9c3f 100644 --- a/share/man/man4/apic.4 +++ b/share/man/man4/apic.4 @@ -54,8 +54,7 @@ and the I/O APIC. There is one LAPIC in each CPU in the system. There is typically one I/O APIC for each peripheral bus in the system. .Pp -LAPICs manage all external and interrupts for specific processor in an -SMP system. +LAPICs manage all external interrupts for specific processor in an SMP system. In addition, they are able to accept and generate inter-processor interrupts (IPIs). .Pp -- cgit v1.1 From 49c984362d622d868ec5b0bbdac3ea63cb9add25 Mon Sep 17 00:00:00 2001 From: mav Date: Tue, 20 Dec 2011 15:19:33 +0000 Subject: s/LAPIC/local APIC/ to closer follow Intel documents. Submitted by: jhb --- share/man/man4/apic.4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'share/man') diff --git a/share/man/man4/apic.4 b/share/man/man4/apic.4 index bcd9c3f..224e4f6 100644 --- a/share/man/man4/apic.4 +++ b/share/man/man4/apic.4 @@ -51,20 +51,20 @@ Set this to 1 to disable APIC support, falling back to the legacy PIC. .Sh DESCRIPTION There are two components in the Intel APIC system, the local APIC (LAPIC) and the I/O APIC. -There is one LAPIC in each CPU in the system. +There is one local APIC in each CPU in the system. There is typically one I/O APIC for each peripheral bus in the system. .Pp -LAPICs manage all external interrupts for specific processor in an SMP system. +Local APICs manage all external interrupts for a specific processor. In addition, they are able to accept and generate inter-processor interrupts (IPIs). .Pp I/O APICs contain a redirection table, which is used to route the interrupts they receive from peripheral buses to one or more local APICs. .Pp -Each LAPIC includes one 32-bit programable timer. +Each local APIC includes one 32-bit programable timer. This driver uses them to supply kernel with one event timer named "LAPIC". Event timer provided by the driver supports both one-shot an periodic modes. -Because of LAPIC nature it is per-CPU. +Because of local APIC nature it is per-CPU. The timer frequency is not reported by the platform and so automatically measured by the driver on the first use. Depending on CPU model this timer may stop in C3 and deeper CPU sleep states. -- cgit v1.1 From 46767d49f7d233a5bd8e2fc157a4ca7c84d338e1 Mon Sep 17 00:00:00 2001 From: mav Date: Tue, 20 Dec 2011 17:10:34 +0000 Subject: Add timecounters(4) man page alike to eventtimers(4). --- share/man/man4/Makefile | 1 + share/man/man4/attimer.4 | 3 +- share/man/man4/eventtimers.4 | 1 + share/man/man4/hpet.4 | 3 +- share/man/man4/timecounters.4 | 105 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 111 insertions(+), 2 deletions(-) create mode 100644 share/man/man4/timecounters.4 (limited to 'share/man') diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 4c93cfc..d13d348 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -445,6 +445,7 @@ MAN= aac.4 \ termios.4 \ textdump.4 \ ti.4 \ + timecounters.4 \ tl.4 \ tnt4882.4 \ ${_tpm.4} \ diff --git a/share/man/man4/attimer.4 b/share/man/man4/attimer.4 index 78d40d4..751b9ea 100644 --- a/share/man/man4/attimer.4 +++ b/share/man/man4/attimer.4 @@ -73,4 +73,5 @@ Event timer provided by the driver is irrelevant to CPU power states. .Xr apic 4 , .Xr atrtc 4 , .Xr eventtimers 4 , -.Xr hpet 4 +.Xr hpet 4 , +.Xr timecounters 4 diff --git a/share/man/man4/eventtimers.4 b/share/man/man4/eventtimers.4 index e29d32f8..c935c3e 100644 --- a/share/man/man4/eventtimers.4 +++ b/share/man/man4/eventtimers.4 @@ -149,4 +149,5 @@ always generating. .Xr atrtc 4 , .Xr attimer 4 , .Xr hpet 4 , +.Xr timecounters 4 , .Xr eventtimers 9 diff --git a/share/man/man4/hpet.4 b/share/man/man4/hpet.4 index 092996c..cd1b766 100644 --- a/share/man/man4/hpet.4 +++ b/share/man/man4/hpet.4 @@ -97,7 +97,8 @@ of these comparators has own unsharable IRQ. .Xr apic 4 , .Xr atrtc 4 , .Xr attimer 4 , -.Xr eventtimers 4 +.Xr eventtimers 4 , +.Xr timecounters 4 .Sh HISTORY The .Nm diff --git a/share/man/man4/timecounters.4 b/share/man/man4/timecounters.4 new file mode 100644 index 0000000..8cbcdc1 --- /dev/null +++ b/share/man/man4/timecounters.4 @@ -0,0 +1,105 @@ +.\" Copyright (c) 2011 Alexander Motin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 20, 2011 +.Dt TIMECOUNTERS 4 +.Os +.Sh NAME +.Nm timecounters +.Nd kernel time counters subsystem +.Sh SYNOPSIS +Kernel uses several types of time-related devices, such as: real time clocks, +time counters and event timers. +Real time clocks responsible for tracking real world time, mostly when system +is down. +Time counters are responsible for tracking purposes, when system is running. +Event timers are responsible for generating interrupts at specified time or +periodically, to run different time-based events. +This page is about the second. +.Sh DESCRIPTION +Time counters are the lowest level of time tracking in kernel. +They provide monotonically increasing timestamps with known width and +update frequency. +They can overflow, drift, etc and so in raw form used only in very limited +performance-critical places like process scheduler. +.Pp +More usable time is created by scaling the values read from the selected +time counter and combining it with some offset, regularly updated by +.Fn tc_windup +on +.Fn hardclock +invocation. +.Pp +Different platforms provide different kinds of timer hardware. +The goal of the time counters subsystem is to provide unified way to access +that hardware. +.Pp +Each driver implementing time counters, registers them at the subsystem. +It is possible to see the list of present time counters, like this, via +.Va kern.timecounter +sysctl: +.Bd -literal +kern.timecounter.choice: TSC-low(-100) HPET(950) i8254(0) ACPI-fast(900) dummy(-1000000) +kern.timecounter.tc.ACPI-fast.mask: 16777215 +kern.timecounter.tc.ACPI-fast.counter: 13467909 +kern.timecounter.tc.ACPI-fast.frequency: 3579545 +kern.timecounter.tc.ACPI-fast.quality: 900 +kern.timecounter.tc.i8254.mask: 65535 +kern.timecounter.tc.i8254.counter: 62692 +kern.timecounter.tc.i8254.frequency: 1193182 +kern.timecounter.tc.i8254.quality: 0 +kern.timecounter.tc.HPET.mask: 4294967295 +kern.timecounter.tc.HPET.counter: 3013495652 +kern.timecounter.tc.HPET.frequency: 14318180 +kern.timecounter.tc.HPET.quality: 950 +kern.timecounter.tc.TSC-low.mask: 4294967295 +kern.timecounter.tc.TSC-low.counter: 4067509463 +kern.timecounter.tc.TSC-low.frequency: 11458556 +kern.timecounter.tc.TSC-low.quality: -100 +.Ed +.Pp +where: +.Bl -inset +.It Va kern.timecounter.tc. Ns Ar X Ns Va .mask +is a bitmask, defining valid counter bits, +.It Va kern.timecounter.tc. Ns Ar X Ns Va .counter +is a present counter value, +.It Va kern.eventtimer.tc. Ns Ar X Ns Va .frequency +is a counter update frequency, +.It Va kern.eventtimer.tc. Ns Ar X Ns Va .quality +is an integral value, defining how good is this time counter, +comparing to others. +Negative value means that this time counter is broken and should not be used. +.El +.Pp +Time management code of the kernel chooses one time counter from that list. +Current choice can be read and affected via +.Va kern.timecounter.hardware +tunable/sysctl. +.Sh SEE ALSO +.Xr attimer 4 , +.Xr eventtimers 4 , +.Xr hpet 4 -- cgit v1.1 From dff6a31a10f81950594ad7bc25e226040cfc8290 Mon Sep 17 00:00:00 2001 From: mav Date: Tue, 20 Dec 2011 17:32:13 +0000 Subject: Fix copy-paste typo. --- share/man/man4/timecounters.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'share/man') diff --git a/share/man/man4/timecounters.4 b/share/man/man4/timecounters.4 index 8cbcdc1..340512e 100644 --- a/share/man/man4/timecounters.4 +++ b/share/man/man4/timecounters.4 @@ -87,9 +87,9 @@ where: is a bitmask, defining valid counter bits, .It Va kern.timecounter.tc. Ns Ar X Ns Va .counter is a present counter value, -.It Va kern.eventtimer.tc. Ns Ar X Ns Va .frequency +.It Va kern.timecounter.tc. Ns Ar X Ns Va .frequency is a counter update frequency, -.It Va kern.eventtimer.tc. Ns Ar X Ns Va .quality +.It Va kern.timecounter.tc. Ns Ar X Ns Va .quality is an integral value, defining how good is this time counter, comparing to others. Negative value means that this time counter is broken and should not be used. -- cgit v1.1 From 0517523a4ff441ede1240cd8858b14e49eecf87b Mon Sep 17 00:00:00 2001 From: mav Date: Tue, 20 Dec 2011 17:44:25 +0000 Subject: Add some more cross-references. --- share/man/man4/cpufreq.4 | 1 + share/man/man4/ffclock.4 | 1 + share/man/man4/man4.i386/CPU_ELAN.4 | 1 + share/man/man4/timecounters.4 | 1 + 4 files changed, 4 insertions(+) (limited to 'share/man') diff --git a/share/man/man4/cpufreq.4 b/share/man/man4/cpufreq.4 index bd6885e..d4a2a3f 100644 --- a/share/man/man4/cpufreq.4 +++ b/share/man/man4/cpufreq.4 @@ -286,6 +286,7 @@ then it should set all elements to .Dv CPUFREQ_VAL_UNKNOWN . .Sh SEE ALSO .Xr acpi 4 , +.Xr timecounters 4 , .Xr powerd 8 , .Xr sysctl 8 .Sh AUTHORS diff --git a/share/man/man4/ffclock.4 b/share/man/man4/ffclock.4 index d47edb2..9110c16 100644 --- a/share/man/man4/ffclock.4 +++ b/share/man/man4/ffclock.4 @@ -110,6 +110,7 @@ but currently does nothing. .Xr clock_gettime 2 , .Xr ffclock 2 , .Xr bpf 4 , +.Xr timecounters 4 , .Xr sysctl 8 .Sh HISTORY Feed-forward clock support first appeared in diff --git a/share/man/man4/man4.i386/CPU_ELAN.4 b/share/man/man4/man4.i386/CPU_ELAN.4 index 7fe7741..4a0611f 100644 --- a/share/man/man4/man4.i386/CPU_ELAN.4 +++ b/share/man/man4/man4.i386/CPU_ELAN.4 @@ -148,6 +148,7 @@ and the GPIO pins which are not available will be disabled. .Sh SEE ALSO .Xr led 4 , +.Xr timecounters 4 , .Xr sysctl 8 .Sh HISTORY The diff --git a/share/man/man4/timecounters.4 b/share/man/man4/timecounters.4 index 340512e..b6fc85e 100644 --- a/share/man/man4/timecounters.4 +++ b/share/man/man4/timecounters.4 @@ -102,4 +102,5 @@ tunable/sysctl. .Sh SEE ALSO .Xr attimer 4 , .Xr eventtimers 4 , +.Xr ffclock 4 , .Xr hpet 4 -- cgit v1.1 From c2dfd4451c331c3e687830de21030c8793557162 Mon Sep 17 00:00:00 2001 From: jh Date: Wed, 21 Dec 2011 17:03:30 +0000 Subject: Follow style(9) more closely in the example. --- share/man/man9/sbuf.9 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'share/man') diff --git a/share/man/man9/sbuf.9 b/share/man/man9/sbuf.9 index 4ee05f4..7336c42 100644 --- a/share/man/man9/sbuf.9 +++ b/share/man/man9/sbuf.9 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 9, 2011 +.Dd December 21, 2011 .Dt SBUF 9 .Os .Sh NAME @@ -495,8 +495,8 @@ TAILQ_FOREACH(foo, &foolist, list) { sbuf_printf(sb, " Address: %s\en", foo->address); sbuf_printf(sb, " Zip: %s\en", foo->zipcode); } -if (sbuf_finish(sb)) /* Check for any and all errors */ - err(1,"Could not generate message"); +if (sbuf_finish(sb) != 0) /* Check for any and all errors */ + err(1, "Could not generate message"); transmit_msg(sbuf_data(sb), sbuf_len(sb)); sbuf_delete(sb); .Ed -- cgit v1.1 From f175ea262c7e6109950c12c5b712387bf8fb078f Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 27 Dec 2011 12:58:54 +0000 Subject: Add manual page for atomic operations. --- share/man/man3/ATOMIC_VAR_INIT.3 | 295 +++++++++++++++++++++++++++++++++++++++ share/man/man3/Makefile | 25 +++- 2 files changed, 319 insertions(+), 1 deletion(-) create mode 100644 share/man/man3/ATOMIC_VAR_INIT.3 (limited to 'share/man') diff --git a/share/man/man3/ATOMIC_VAR_INIT.3 b/share/man/man3/ATOMIC_VAR_INIT.3 new file mode 100644 index 0000000..6f20b84 --- /dev/null +++ b/share/man/man3/ATOMIC_VAR_INIT.3 @@ -0,0 +1,295 @@ +.\" Copyright (c) 2011 Ed Schouten +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 27, 2011 +.Dt ATOMIC_VAR_INIT 3 +.Os +.Sh NAME +.Nm ATOMIC_VAR_INIT , +.Nm atomic_init , +.Nm atomic_load , +.Nm atomic_store , +.Nm atomic_exchange , +.Nm atomic_compare_exchange_strong , +.Nm atomic_compare_exchange_weak , +.Nm atomic_fetch_add , +.Nm atomic_fetch_and , +.Nm atomic_fetch_or , +.Nm atomic_fetch_sub , +.Nm atomic_fetch_xor , +.Nm atomic_is_lock_free +.Nd type-generic atomic operations +.Sh SYNOPSIS +.In stdatomic.h +.Pp +_Atomic(T) +.Fa v += ATOMIC_VAR_INIT(c); +.Ft void +.Fn atomic_init "_Atomic(T) *object" "T value" +.Ft T +.Fn atomic_load "_Atomic(T) *object" +.Ft T +.Fn atomic_load_explicit "_Atomic(T) *object" "memory_order order" +.Ft void +.Fn atomic_store "_Atomic(T) *object" "T desired" +.Ft void +.Fn atomic_store_explicit "_Atomic(T) *object" "T desired" "memory_order order" +.Ft T +.Fn atomic_exchange "_Atomic(T) *object" "T desired" +.Ft T +.Fn atomic_exchange_explicit "_Atomic(T) *object" "T desired" "memory_order order" +.Ft _Bool +.Fn atomic_compare_exchange_strong "_Atomic(T) *object" "T *expected" "T desired" +.Ft _Bool +.Fn atomic_compare_exchange_strong_explicit "_Atomic(T) *object" "T *expected" "T desired" "memory_order success" "memory_order failure" +.Ft _Bool +.Fn atomic_compare_exchange_weak "_Atomic(T) *object" "T *expected" "T desired" +.Ft _Bool +.Fn atomic_compare_exchange_weak_explicit "_Atomic(T) *object" "T *expected" "T desired" "memory_order success" "memory_order failure" +.Ft T +.Fn atomic_fetch_add "_Atomic(T) *object" "T operand" +.Ft T +.Fn atomic_fetch_add_explicit "_Atomic(T) *object" "T operand" "memory_order order" +.Ft T +.Fn atomic_fetch_and "_Atomic(T) *object" "T operand" +.Ft T +.Fn atomic_fetch_and_explicit "_Atomic(T) *object" "T operand" "memory_order order" +.Ft T +.Fn atomic_fetch_or "_Atomic(T) *object" "T operand" +.Ft T +.Fn atomic_fetch_or_explicit "_Atomic(T) *object" "T operand" "memory_order order" +.Ft T +.Fn atomic_fetch_sub "_Atomic(T) *object" "T operand" +.Ft T +.Fn atomic_fetch_sub_explicit "_Atomic(T) *object" "T operand" "memory_order order" +.Ft T +.Fn atomic_fetch_xor "_Atomic(T) *object" "T operand" +.Ft T +.Fn atomic_fetch_xor_explicit "_Atomic(T) *object" "T operand" "memory_order order" +.Ft _Bool +.Fn atomic_is_lock_free "const _Atomic(T) *object" +.Sh DESCRIPTION +The header +.In stdatomic.h +provides type-generic macros for atomic operations. +Atomic operations can be used by multithreaded programs to provide +shared variables between threads that in most cases may be modified +without acquiring locks. +.Pp +Atomic variables are declared using the +.Fn _Atomic +type specifier. +These variables are not type-compatible with their non-atomic +counterparts. +Depending on the compiler used, atomic variables may be opaque and can +therefore only be influenced using the macros described. +.Pp +The +.Fn atomic_init +macro initializes the atomic variable +.Fa object +with a +.Fa value . +Atomic variables can be initialized while being declared using +.Fn ATOMIC_VAR_INIT . +.Pp +The +.Fn atomic_load +macro returns the value of atomic variable +.Fa object . +The +.Fn atomic_store +macro sets the atomic variable +.Fa object +to its +.Fa desired +value. +.Pp +The +.Fn atomic_exchange +macro combines the behaviour of +.Fn atomic_load +and +.Fn atomic_store . +It sets the atomic variable +.Fa object +to its desired +.Fa value +and returs the original contents of the atomic variable. +.Pp +The +.Fn atomic_compare_exchange_strong +macro stores a +.Fa desired +value into atomic variable +.Fa object , +only if the atomic variable is equal to its +.Fa expected +value. +Upon success, the macro returns +.Dv true . +Upon failure, the +.Fa desired +value is overwritten with the value of the atomic variable and +.Dv false +is returned. +The +.Fn atomic_compare_exchange_weak +macro is identical to +.Fn atomic_compare_exchange_strong , +but is allowed to fail even if atomic variable +.Fa object +is equal to its +.Fa expected +value. +.Pp +The +.Fn atomic_fetch_add +macro adds the value +.Fa operand +to atomic variable +.Fa object +and returns the original contents of the atomic variable. +.Pp +The +.Fn atomic_fetch_and +macro applies the +.Em and +operator to atomic variable +.Fa object +and +.Fa operand +and stores the value into +.Fa object , +while returning the original contents of the atomic variable. +.Pp +The +.Fn atomic_fetch_or +macro applies the +.Em or +operator to atomic variable +.Fa object +and +.Fa operand +and stores the value into +.Fa object , +while returning the original contents of the atomic variable. +.Pp +The +.Fn atomic_fetch_sub +macro subtracts the value +.Fa operand +to atomic variable +.Fa object +and returns the original contents of the atomic variable. +.Pp +The +.Fn atomic_fetch_xor +macro applies the +.Em xor +operator to atomic variable +.Fa object +and +.Fa operand +and stores the value into +.Fa object , +while returning the original contents of the atomic variable. +.Pp +The +.Fn atomic_is_lock_free +macro returns whether atomic variable +.Fa object +uses locks when using atomic operations. +.Sh BARRIERS +The atomic operations described previously are implemented in such a way +that they disallow both the compiler and the executing processor to +re-order any nearby memory operations across the atomic operation. +In certain cases this behaviour may cause suboptimal performance. +To mitigate this, every atomic operation has an +.Fn _explicit +version that allows the re-ordering to be configured. +.Pp +The +.Fa order +parameter of these +.Fn _explicit +macros can have one of the following values. +.Bl -tag -width memory_order_relaxed +.It Dv memory_order_relaxed +No operation orders memory. +.It Dv memory_order_consume +Perform consume operation. +.It Dv memory_order_acquire +Acquire fence. +.It Dv memory_order_release +Release fence. +.It Dv memory_order_acq_rel +Acquire and release fence. +.It Dv memory_order_seq_cst +Sequentially consistent acquire and release fence. +.El +.Pp +The previously described macros are identical to the +.Fn _explicit +macros, when +.Fa order +is +.Dv memory_order_seq_cst . +.Sh COMPILER SUPPORT +These atomic operations are typically implemented by the compiler, as +they must be implemented type-generically and must often use special +hardware instructions. +As this interface has not been adopted by most compilers yet, the +.In stdatomic.h +header implements these macros on top of existing compiler intrinsics to +provide forward compatibility. +.Pp +This means that certain aspects of the interface, such as support for +different barrier types may simply be ignored. +When using GCC, all atomic operations are executed as if they are using +.Dv memory_order_seq_cst . +.Pp +Instead of using the atomic operations provided by this interface, +.St -isoC-11 +allows the atomic variables to be modified directly using built-in +language operators. +This behaviour cannot be emulated for older compilers. +To prevent unintended non-atomic access to these variables, this header +file places the atomic variable in a structure when using an older +compiler. +.Sh SEE ALSO +.Xr pthread 3 , +.Xr atomic 9 +.Sh STANDARDS +These macros attempt to conform to +.St -isoC-11 . +.Sh HISTORY +These macros appeared in +.Fx 10.0 . +.Sh AUTHORS +.An Ed Schouten Aq ed@FreeBSD.org , +.An David Chisnall Aq theraven@FreeBSD.org diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile index 148f460..6b47b23 100644 --- a/share/man/man3/Makefile +++ b/share/man/man3/Makefile @@ -4,6 +4,7 @@ .include MAN= assert.3 \ + ATOMIC_VAR_INIT.3 \ bitstring.3 \ end.3 \ fpgetround.3 \ @@ -18,7 +19,29 @@ MAN= assert.3 \ timeradd.3 \ tree.3 -MLINKS= bitstring.3 bit_alloc.3 \ +MLINKS= ATOMIC_VAR_INIT.3 atomic_compare_exchange_strong.3 \ + ATOMIC_VAR_INIT.3 atomic_compare_exchange_strong_explicit.3 \ + ATOMIC_VAR_INIT.3 atomic_compare_exchange_weak.3 \ + ATOMIC_VAR_INIT.3 atomic_compare_exchange_weak_explicit.3 \ + ATOMIC_VAR_INIT.3 atomic_exchange.3 \ + ATOMIC_VAR_INIT.3 atomic_exchange_explicit.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_add.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_add_explicit.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_and.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_and_explicit.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_or.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_or_explicit.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_sub.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_sub_explicit.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_xor.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_xor_explicit.3 \ + ATOMIC_VAR_INIT.3 atomic_init.3 \ + ATOMIC_VAR_INIT.3 atomic_is_lock_free.3 + ATOMIC_VAR_INIT.3 atomic_load.3 \ + ATOMIC_VAR_INIT.3 atomic_load_explicit.3 \ + ATOMIC_VAR_INIT.3 atomic_store.3 \ + ATOMIC_VAR_INIT.3 atomic_store_explicit.3 +MLINKS+= bitstring.3 bit_alloc.3 \ bitstring.3 bit_clear.3 \ bitstring.3 bit_decl.3 \ bitstring.3 bit_ffc.3 \ -- cgit v1.1 From cbd2bf6e793e1dc43e2689a160600f207eca1eff Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 27 Dec 2011 13:01:10 +0000 Subject: Add missing \. While sorting the MLINKS by name, I forgot to re-add it. --- share/man/man3/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share/man') diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile index 6b47b23..4706506 100644 --- a/share/man/man3/Makefile +++ b/share/man/man3/Makefile @@ -36,7 +36,7 @@ MLINKS= ATOMIC_VAR_INIT.3 atomic_compare_exchange_strong.3 \ ATOMIC_VAR_INIT.3 atomic_fetch_xor.3 \ ATOMIC_VAR_INIT.3 atomic_fetch_xor_explicit.3 \ ATOMIC_VAR_INIT.3 atomic_init.3 \ - ATOMIC_VAR_INIT.3 atomic_is_lock_free.3 + ATOMIC_VAR_INIT.3 atomic_is_lock_free.3 \ ATOMIC_VAR_INIT.3 atomic_load.3 \ ATOMIC_VAR_INIT.3 atomic_load_explicit.3 \ ATOMIC_VAR_INIT.3 atomic_store.3 \ -- cgit v1.1 From 88405d6b4db506be77862821665c43143a4c5c4b Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 27 Dec 2011 22:14:35 +0000 Subject: Document restriction on 32-bits and 64-bits datatypes. --- share/man/man3/ATOMIC_VAR_INIT.3 | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'share/man') diff --git a/share/man/man3/ATOMIC_VAR_INIT.3 b/share/man/man3/ATOMIC_VAR_INIT.3 index 6f20b84..41f28db 100644 --- a/share/man/man3/ATOMIC_VAR_INIT.3 +++ b/share/man/man3/ATOMIC_VAR_INIT.3 @@ -281,6 +281,12 @@ This behaviour cannot be emulated for older compilers. To prevent unintended non-atomic access to these variables, this header file places the atomic variable in a structure when using an older compiler. +.Pp +When using GCC on architectures on which it lacks support for built-in +atomic intrinsics, these macros may emit function calls to fallback +routines. +These fallback routines are only implemented for 32-bits and 64-bits +datatypes, if supported by the CPU. .Sh SEE ALSO .Xr pthread 3 , .Xr atomic 9 -- cgit v1.1 From 4b4e03aec0d7f0c6cb2aea32d60176814567d049 Mon Sep 17 00:00:00 2001 From: delphij Date: Wed, 28 Dec 2011 23:26:58 +0000 Subject: Import the first release of HighPoint RocketRAID 27xx SAS 6Gb/s HBA card driver. This driver works for FreeBSD/i386 and FreeBSD/amd64 platforms. Many thanks to HighPoint for providing this driver. MFC after: 2 weeks --- share/man/man4/Makefile | 2 + share/man/man4/hpt27xx.4 | 101 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 share/man/man4/hpt27xx.4 (limited to 'share/man') diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index d13d348..01c75ca 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -150,6 +150,7 @@ MAN= aac.4 \ hifn.4 \ hme.4 \ hpet.4 \ + ${_hpt27xx.4} \ ${_hptiop.4} \ ${_hptmv.4} \ ${_hptrr.4} \ @@ -687,6 +688,7 @@ _atp.4= atp.4 _coretemp.4= coretemp.4 _cpuctl.4= cpuctl.4 _dpms.4= dpms.4 +_hpt27xx.4= hpt27xx.4 _hptiop.4= hptiop.4 _hptmv.4= hptmv.4 _hptrr.4= hptrr.4 diff --git a/share/man/man4/hpt27xx.4 b/share/man/man4/hpt27xx.4 new file mode 100644 index 0000000..01f9ba5 --- /dev/null +++ b/share/man/man4/hpt27xx.4 @@ -0,0 +1,101 @@ +.\" +.\" Copyright (c) 2011 iXsystems, Inc. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 28, 2011 +.Dt HPT27XX 4 +.Os +.Sh NAME +.Nm hpt27xx +.Nd "HighPoint RocketRAID 27xx SAS 6Gb/s HBA card driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device hpt27xx" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +hpt27xx_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for HighPoint's RocketRAID 27xx based RAID controller. +.Pp +These devices support SAS disk drives +and provide RAID0 (striping), RAID1 (mirroring), and RAID5 functionality. +.Sh HARDWARE +The +.Nm +driver supports the following SAS +controllers: +.Pp +.Bl -bullet -compact +.It +HighPoint's RocketRAID 271x series +.It +HighPoint's RocketRAID 272x series +.It +HighPoint's RocketRAID 274x series +.It +HighPoint's RocketRAID 276x series +.It +HighPoint's RocketRAID 278x series +.El +.Sh NOTES +The +.Nm +driver only works on the i386 and amd64 platforms as it requires a binary +blob object from the manufacturer which they only supply for these platforms. +The +.Nm +driver does +.Em not +work on i386 with +.Xr pae 4 +enabled. +.Sh SEE ALSO +.Xr kld 4 , +.Xr kldload 8 , +.Xr loader 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 10.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +device driver was written by +.An HighPoint Technologies, Inc. . +This manual page was written by +.An Xin LI Aq delphij@FreeBSD.org +for iXsystems, Inc. -- cgit v1.1 From 1b1510811a06578c05771a8149372df5665231b7 Mon Sep 17 00:00:00 2001 From: lstewart Date: Fri, 30 Dec 2011 08:57:58 +0000 Subject: - Introduce the net.bpf.tscfg sysctl tree and associated code so as to make one aspect of time stamp configuration per interface rather than per BPF descriptor. Prior to this, the order in which BPF devices were opened and the per descriptor time stamp configuration settings could cause non-deterministic and unintended behaviour with respect to time stamping. With the new scheme, a BPF attached interface's tscfg sysctl entry can be set to "default", "none", "fast", "normal" or "external". Setting "default" means use the system default option (set with the net.bpf.tscfg.default sysctl), "none" means do not generate time stamps for tapped packets, "fast" means generate time stamps for tapped packets using a hz granularity system clock read, "normal" means generate time stamps for tapped packets using a full timecounter granularity system clock read and "external" (currently unimplemented) means use the time stamp provided with the packet from an underlying source. - Utilise the recently introduced sysclock_getsnapshot() and sysclock_snap2bintime() KPIs to ensure the system clock is only read once per packet, regardless of the number of BPF descriptors and time stamp formats requested. Use the per BPF attached interface time stamp configuration to control if sysclock_getsnapshot() is called and whether the system clock read is fast or normal. The per BPF descriptor time stamp configuration is then used to control how the system clock snapshot is converted to a bintime by sysclock_snap2bintime(). - Remove all FAST related BPF descriptor flag variants. Performing a "fast" read of the system clock is now controlled per BPF attached interface using the net.bpf.tscfg sysctl tree. - Update the bpf.4 man page. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ In collaboration with: Julien Ridoux (jridoux at unimelb edu au) --- share/man/man4/bpf.4 | 101 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 65 insertions(+), 36 deletions(-) (limited to 'share/man') diff --git a/share/man/man4/bpf.4 b/share/man/man4/bpf.4 index e69456a..54d1a59 100644 --- a/share/man/man4/bpf.4 +++ b/share/man/man4/bpf.4 @@ -49,7 +49,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 15, 2010 +.Dd December 30, 2011 .Dt BPF 4 .Os .Sh NAME @@ -516,61 +516,48 @@ by default. .It Dv BIOCSTSTAMP .It Dv BIOCGTSTAMP .Pq Li u_int -Set or get format and resolution of the time stamps returned by BPF. +Set or get the format and resolution of time stamps returned by BPF. +The per-BPF descriptor configuration provided by the +.Dv BIOCSTSTAMP +IOCTL complements the per-interface time stamp configuration detailed in the +.Sx CONFIGURATION +section. +.Pp Set to -.Dv BPF_T_MICROTIME , -.Dv BPF_T_MICROTIME_FAST , -.Dv BPF_T_MICROTIME_MONOTONIC , +.Dv BPF_T_MICROTIME or -.Dv BPF_T_MICROTIME_MONOTONIC_FAST +.Dv BPF_T_MICROTIME_MONOTONIC to get time stamps in 64-bit .Vt struct timeval format. Set to -.Dv BPF_T_NANOTIME , -.Dv BPF_T_NANOTIME_FAST , -.Dv BPF_T_NANOTIME_MONOTONIC , +.Dv BPF_T_NANOTIME or -.Dv BPF_T_NANOTIME_MONOTONIC_FAST +.Dv BPF_T_NANOTIME_MONOTONIC to get time stamps in 64-bit .Vt struct timespec format. Set to -.Dv BPF_T_BINTIME , -.Dv BPF_T_BINTIME_FAST , -.Dv BPF_T_NANOTIME_MONOTONIC , +.Dv BPF_T_BINTIME or -.Dv BPF_T_BINTIME_MONOTONIC_FAST +.Dv BPF_T_BINTIME_MONOTONIC to get time stamps in 64-bit .Vt struct bintime format. Set to .Dv BPF_T_NONE -to ignore time stamp. +to not set a time stamp. +By default, time stamps are initilized to +.Dv BPF_T_MICROTIME . +.Pp All 64-bit time stamp formats are wrapped in .Vt struct bpf_ts . The -.Dv BPF_T_MICROTIME_FAST , -.Dv BPF_T_NANOTIME_FAST , -.Dv BPF_T_BINTIME_FAST , -.Dv BPF_T_MICROTIME_MONOTONIC_FAST , -.Dv BPF_T_NANOTIME_MONOTONIC_FAST , -and -.Dv BPF_T_BINTIME_MONOTONIC_FAST -are analogs of corresponding formats without _FAST suffix but do not perform -a full time counter query, so their accuracy is one timer tick. -The .Dv BPF_T_MICROTIME_MONOTONIC , .Dv BPF_T_NANOTIME_MONOTONIC , -.Dv BPF_T_BINTIME_MONOTONIC , -.Dv BPF_T_MICROTIME_MONOTONIC_FAST , -.Dv BPF_T_NANOTIME_MONOTONIC_FAST , and -.Dv BPF_T_BINTIME_MONOTONIC_FAST +.Dv BPF_T_BINTIME_MONOTONIC store the time elapsed since kernel boot. -This setting is initialized to -.Dv BPF_T_MICROTIME -by default. .It Dv BIOCFEEDBACK .Pq Li u_int Set packet feedback mode. @@ -692,14 +679,14 @@ Currently, .Vt bpf_hdr is used when the time stamp is set to .Dv BPF_T_MICROTIME , -.Dv BPF_T_MICROTIME_FAST , .Dv BPF_T_MICROTIME_MONOTONIC , -.Dv BPF_T_MICROTIME_MONOTONIC_FAST , or .Dv BPF_T_NONE -for backward compatibility reasons. Otherwise, +for backward compatibility reasons. +Otherwise, .Vt bpf_xhdr -is used. However, +is used. +However, .Vt bpf_hdr may be deprecated in the near future. Suitable precautions @@ -952,6 +939,48 @@ array initializers: .Fn BPF_STMT opcode operand and .Fn BPF_JUMP opcode operand true_offset false_offset . +.Sh CONFIGURATION +Per-interface BPF time stamp configuration is possible via the +.Va net.bpf.tscfg +.Xr sysctl 8 +tree which provides the following variables: +.Bl -tag -width " " -offset indent +.It Va net.bpf.tscfg.default +The default time stamp configuration setting used by all BPF attached interfaces +which have not been explicitly changed. +Valid values are "none", "fast", "normal" and "external". +The default is "normal". +.It Va net.bpf.tscfg. +The time stamp configuration setting used by a specific BPF attached interface. +There will be a separate entry in the +.Va net.bpf.tscfg +sysctl tree for each BPF attached interface. +Valid values are "default", "none", "fast", "normal" and "external". +The default is "default", which means the system wide default setting specified +by the +.Va net.bpf.tscfg.default +sysctl is used. +.El +.Pp +The meaning of each per-interface time stamp configuration option is as follows: +.Bl -tag -width " " -offset indent +.It none +Do not generate a time stamp for all packets tapped from this interface. +.It fast +Generate a time stamp for all packets tapped from this interface by doing a fast +read of the system clock. +Fast reads have a granularity equivalent to the underlying kernel tick rate. +.It normal +Generate a time stamp for all packets tapped from this interface by doing a full +read of the system clock. +Full reads are slower than fast reads, but provide full hardware time counter +granularity for the time stamp. +.It external +Something external to BPF is capable of generating time stamps for all packets +tapped from this interface and BPF should use these external time stamps. +Currently unimplemented, but will become useful when drivers for NICs which +support hardware packet time stamping add support for this feature. +.El .Sh FILES .Bl -tag -compact -width /dev/bpf .It Pa /dev/bpf -- cgit v1.1 From 8a799f2a2fc40cc67b9553f01a90520534216440 Mon Sep 17 00:00:00 2001 From: lstewart Date: Sat, 31 Dec 2011 07:21:28 +0000 Subject: Revert r228986 until it can be reworked to avoid panicing the kernel when the same interface is attached multiple times with different DLTs, as is done in net80211 for example. Reported by: adrian --- share/man/man4/bpf.4 | 101 ++++++++++++++++++--------------------------------- 1 file changed, 36 insertions(+), 65 deletions(-) (limited to 'share/man') diff --git a/share/man/man4/bpf.4 b/share/man/man4/bpf.4 index 54d1a59..e69456a 100644 --- a/share/man/man4/bpf.4 +++ b/share/man/man4/bpf.4 @@ -49,7 +49,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 30, 2011 +.Dd June 15, 2010 .Dt BPF 4 .Os .Sh NAME @@ -516,48 +516,61 @@ by default. .It Dv BIOCSTSTAMP .It Dv BIOCGTSTAMP .Pq Li u_int -Set or get the format and resolution of time stamps returned by BPF. -The per-BPF descriptor configuration provided by the -.Dv BIOCSTSTAMP -IOCTL complements the per-interface time stamp configuration detailed in the -.Sx CONFIGURATION -section. -.Pp +Set or get format and resolution of the time stamps returned by BPF. Set to -.Dv BPF_T_MICROTIME +.Dv BPF_T_MICROTIME , +.Dv BPF_T_MICROTIME_FAST , +.Dv BPF_T_MICROTIME_MONOTONIC , or -.Dv BPF_T_MICROTIME_MONOTONIC +.Dv BPF_T_MICROTIME_MONOTONIC_FAST to get time stamps in 64-bit .Vt struct timeval format. Set to -.Dv BPF_T_NANOTIME +.Dv BPF_T_NANOTIME , +.Dv BPF_T_NANOTIME_FAST , +.Dv BPF_T_NANOTIME_MONOTONIC , or -.Dv BPF_T_NANOTIME_MONOTONIC +.Dv BPF_T_NANOTIME_MONOTONIC_FAST to get time stamps in 64-bit .Vt struct timespec format. Set to -.Dv BPF_T_BINTIME +.Dv BPF_T_BINTIME , +.Dv BPF_T_BINTIME_FAST , +.Dv BPF_T_NANOTIME_MONOTONIC , or -.Dv BPF_T_BINTIME_MONOTONIC +.Dv BPF_T_BINTIME_MONOTONIC_FAST to get time stamps in 64-bit .Vt struct bintime format. Set to .Dv BPF_T_NONE -to not set a time stamp. -By default, time stamps are initilized to -.Dv BPF_T_MICROTIME . -.Pp +to ignore time stamp. All 64-bit time stamp formats are wrapped in .Vt struct bpf_ts . The +.Dv BPF_T_MICROTIME_FAST , +.Dv BPF_T_NANOTIME_FAST , +.Dv BPF_T_BINTIME_FAST , +.Dv BPF_T_MICROTIME_MONOTONIC_FAST , +.Dv BPF_T_NANOTIME_MONOTONIC_FAST , +and +.Dv BPF_T_BINTIME_MONOTONIC_FAST +are analogs of corresponding formats without _FAST suffix but do not perform +a full time counter query, so their accuracy is one timer tick. +The .Dv BPF_T_MICROTIME_MONOTONIC , .Dv BPF_T_NANOTIME_MONOTONIC , +.Dv BPF_T_BINTIME_MONOTONIC , +.Dv BPF_T_MICROTIME_MONOTONIC_FAST , +.Dv BPF_T_NANOTIME_MONOTONIC_FAST , and -.Dv BPF_T_BINTIME_MONOTONIC +.Dv BPF_T_BINTIME_MONOTONIC_FAST store the time elapsed since kernel boot. +This setting is initialized to +.Dv BPF_T_MICROTIME +by default. .It Dv BIOCFEEDBACK .Pq Li u_int Set packet feedback mode. @@ -679,14 +692,14 @@ Currently, .Vt bpf_hdr is used when the time stamp is set to .Dv BPF_T_MICROTIME , +.Dv BPF_T_MICROTIME_FAST , .Dv BPF_T_MICROTIME_MONOTONIC , +.Dv BPF_T_MICROTIME_MONOTONIC_FAST , or .Dv BPF_T_NONE -for backward compatibility reasons. -Otherwise, +for backward compatibility reasons. Otherwise, .Vt bpf_xhdr -is used. -However, +is used. However, .Vt bpf_hdr may be deprecated in the near future. Suitable precautions @@ -939,48 +952,6 @@ array initializers: .Fn BPF_STMT opcode operand and .Fn BPF_JUMP opcode operand true_offset false_offset . -.Sh CONFIGURATION -Per-interface BPF time stamp configuration is possible via the -.Va net.bpf.tscfg -.Xr sysctl 8 -tree which provides the following variables: -.Bl -tag -width " " -offset indent -.It Va net.bpf.tscfg.default -The default time stamp configuration setting used by all BPF attached interfaces -which have not been explicitly changed. -Valid values are "none", "fast", "normal" and "external". -The default is "normal". -.It Va net.bpf.tscfg. -The time stamp configuration setting used by a specific BPF attached interface. -There will be a separate entry in the -.Va net.bpf.tscfg -sysctl tree for each BPF attached interface. -Valid values are "default", "none", "fast", "normal" and "external". -The default is "default", which means the system wide default setting specified -by the -.Va net.bpf.tscfg.default -sysctl is used. -.El -.Pp -The meaning of each per-interface time stamp configuration option is as follows: -.Bl -tag -width " " -offset indent -.It none -Do not generate a time stamp for all packets tapped from this interface. -.It fast -Generate a time stamp for all packets tapped from this interface by doing a fast -read of the system clock. -Fast reads have a granularity equivalent to the underlying kernel tick rate. -.It normal -Generate a time stamp for all packets tapped from this interface by doing a full -read of the system clock. -Full reads are slower than fast reads, but provide full hardware time counter -granularity for the time stamp. -.It external -Something external to BPF is capable of generating time stamps for all packets -tapped from this interface and BPF should use these external time stamps. -Currently unimplemented, but will become useful when drivers for NICs which -support hardware packet time stamping add support for this feature. -.El .Sh FILES .Bl -tag -compact -width /dev/bpf .It Pa /dev/bpf -- cgit v1.1 From a201da71788983b3f0445aa46bca32751fc7393c Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 1 Jan 2012 20:26:11 +0000 Subject: Introducing memcchr(3). It seems two of the file system drivers we have in the tree, namely ufs and ext3, use a function called `skpc()'. The meaning of this function does not seem to be documented in FreeBSD, but it turns out one needs to be a VAX programmer to understand what it does. SPKC is an instruction on the VAX that does the opposite of memchr(). It searches for the non-equal character. Add a new function called memcchr() to the tree that has the following advantages over skpc(): - It has a name that makes more sense than skpc(). Just like strcspn() matches the complement of strspn(), memcchr() is the complement of memchr(). - It is faster than skpc(). Similar to our strlen() in libc, it compares entire words, instead of single bytes. It seems that for this routine this yields a sixfold performance increase on amd64. - It has a man page. --- share/man/man9/memcchr.3 | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 share/man/man9/memcchr.3 (limited to 'share/man') diff --git a/share/man/man9/memcchr.3 b/share/man/man9/memcchr.3 new file mode 100644 index 0000000..a3ade21 --- /dev/null +++ b/share/man/man9/memcchr.3 @@ -0,0 +1,59 @@ +.\" Copyright (c) 2012 Ed Schouten +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 1, 2012 +.Dt MEMCCHR 9 +.Os +.Sh NAME +.Nm memcchr +.Nd locate the complement of a byte in byte string +.Sh SYNOPSIS +.In sys/libkern.h +.Ft void * +.Fn memcchr "const void *b" "int c" "size_t len" +.Sh DESCRIPTION +The +.Fn memcchr +function locates the first occurrence of a byte unequal to +.Fa c +(converted to an +.Vt "unsigned char" ) +in string +.Fa b . +.Sh RETURN VALUES +The +.Fn memcchr +function return a pointer to the byte located, or NULL if no such byte +exists within +.Fa len +bytes. +.Sh SEE ALSO +.Xr memchr 3 +.Sh HISTORY +The +.Fn memcchr +function first appeared in +.Fx 10.0 . -- cgit v1.1 From 5f479a9ff5848e7febb91161677e846f8167d4ea Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 1 Jan 2012 20:30:48 +0000 Subject: Fix typo; return -> returns. --- share/man/man9/memcchr.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share/man') diff --git a/share/man/man9/memcchr.3 b/share/man/man9/memcchr.3 index a3ade21..0be3b79 100644 --- a/share/man/man9/memcchr.3 +++ b/share/man/man9/memcchr.3 @@ -46,7 +46,7 @@ in string .Sh RETURN VALUES The .Fn memcchr -function return a pointer to the byte located, or NULL if no such byte +function returns a pointer to the byte located, or NULL if no such byte exists within .Fa len bytes. -- cgit v1.1 From eed6691a080145735804eccfd9d2deced720d642 Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 1 Jan 2012 20:59:42 +0000 Subject: Fix sloppyness in memcchr() man page. I was considering adding it to libc as well, but last minute I thought it would be good enough to add it to libkern exclusively. I forgot to rename the man page and hook it up. --- share/man/man9/Makefile | 1 + share/man/man9/memcchr.3 | 59 ------------------------------------------------ share/man/man9/memcchr.9 | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 59 deletions(-) delete mode 100644 share/man/man9/memcchr.3 create mode 100644 share/man/man9/memcchr.9 (limited to 'share/man') diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 2b9f3bb..7d2af8a 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -164,6 +164,7 @@ MAN= accept_filter.9 \ mbuf_tags.9 \ MD5.9 \ mdchain.9 \ + memcchr.9 \ memguard.9 \ microseq.9 \ microtime.9 \ diff --git a/share/man/man9/memcchr.3 b/share/man/man9/memcchr.3 deleted file mode 100644 index 0be3b79..0000000 --- a/share/man/man9/memcchr.3 +++ /dev/null @@ -1,59 +0,0 @@ -.\" Copyright (c) 2012 Ed Schouten -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" $FreeBSD$ -.\" -.Dd January 1, 2012 -.Dt MEMCCHR 9 -.Os -.Sh NAME -.Nm memcchr -.Nd locate the complement of a byte in byte string -.Sh SYNOPSIS -.In sys/libkern.h -.Ft void * -.Fn memcchr "const void *b" "int c" "size_t len" -.Sh DESCRIPTION -The -.Fn memcchr -function locates the first occurrence of a byte unequal to -.Fa c -(converted to an -.Vt "unsigned char" ) -in string -.Fa b . -.Sh RETURN VALUES -The -.Fn memcchr -function returns a pointer to the byte located, or NULL if no such byte -exists within -.Fa len -bytes. -.Sh SEE ALSO -.Xr memchr 3 -.Sh HISTORY -The -.Fn memcchr -function first appeared in -.Fx 10.0 . diff --git a/share/man/man9/memcchr.9 b/share/man/man9/memcchr.9 new file mode 100644 index 0000000..0be3b79 --- /dev/null +++ b/share/man/man9/memcchr.9 @@ -0,0 +1,59 @@ +.\" Copyright (c) 2012 Ed Schouten +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 1, 2012 +.Dt MEMCCHR 9 +.Os +.Sh NAME +.Nm memcchr +.Nd locate the complement of a byte in byte string +.Sh SYNOPSIS +.In sys/libkern.h +.Ft void * +.Fn memcchr "const void *b" "int c" "size_t len" +.Sh DESCRIPTION +The +.Fn memcchr +function locates the first occurrence of a byte unequal to +.Fa c +(converted to an +.Vt "unsigned char" ) +in string +.Fa b . +.Sh RETURN VALUES +The +.Fn memcchr +function returns a pointer to the byte located, or NULL if no such byte +exists within +.Fa len +bytes. +.Sh SEE ALSO +.Xr memchr 3 +.Sh HISTORY +The +.Fn memcchr +function first appeared in +.Fx 10.0 . -- cgit v1.1 From 0494e8ff396fa7b13e09da8c014c574e6a72e67f Mon Sep 17 00:00:00 2001 From: rwatson Date: Mon, 2 Jan 2012 21:57:58 +0000 Subject: Add WITHOUT_CAPSICUM src.conf(5) define, which can be used to compile out use of Capsicum by userspace applications. MFC after: 3 weeks Sponsored by: Google, Inc. --- share/man/man5/src.conf.5 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'share/man') diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index ab5adc5..37f490f 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru .\" $FreeBSD$ -.Dd December 2, 2011 +.Dd December 30, 2011 .Dt SRC.CONF 5 .Os .Sh NAME @@ -251,6 +251,9 @@ Set to build some programs without optional bzip2 support. .\" from FreeBSD: head/tools/build/options/WITHOUT_CALENDAR 156932 2006-03-21 07:50:50Z ru Set to not build .Xr calendar 1 . +.It Va WITHOUT_CAPSICUM +.\" $FreeBSD$ +Set to not build Capsicum support into system programs. .It Va WITHOUT_CDDL .\" from FreeBSD: head/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb Set to not build code licensed under Sun's CDDL. @@ -821,7 +824,7 @@ Set to not build .Xr ppp 8 and related programs. .It Va WITHOUT_PROFILE -.\" from FreeBSD: head/tools/build/options/WITH_PROFILE 228143 2011-11-29 19:46:17Z fjoe +.\" from FreeBSD: head/tools/build/options/WITHOUT_PROFILE 228196 2011-12-02 09:09:54Z fjoe Set to avoid compiling profiled libraries. .It Va WITHOUT_QUOTAS .\" from FreeBSD: head/tools/build/options/WITHOUT_QUOTAS 183242 2008-09-21 22:02:26Z sam -- cgit v1.1 From 3e678d58aa7b47e823702aead47cf69982d3d270 Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 5 Jan 2012 10:46:22 +0000 Subject: Reimplement on top of __generic(). The macro construction used now, is almost identical to the code provided in C11 proposal N1404. This new version doesn't seem to introduce any regressions according to the regression test in tools/, but still seems to malfunction with Clang on certain aspects. The new code does work successfully with GCC 4.2, 4.6 and 4.7. With 4.7, it also works when __generic() is implemented on top of _Generic(). Discussed with: stefanf --- share/man/man3/tgmath.3 | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'share/man') diff --git a/share/man/man3/tgmath.3 b/share/man/man3/tgmath.3 index f8faf26..e86b141 100644 --- a/share/man/man3/tgmath.3 +++ b/share/man/man3/tgmath.3 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 14, 2004 +.Dd January 4, 2012 .Dt TGMATH 3 .Os .Sh NAME @@ -139,15 +139,24 @@ The header .In tgmath.h first appeared in .Fx 5.3 . -.Sh BUGS -The header +.Sh COMPILER SUPPORT +Before +.St -isoC-11 , +the header .In tgmath.h -cannot be implemented with strictly conforming C code and needs +could not be implemented with strictly conforming C code and needed special compiler support. -The current implementation only works for GCC. -.Pp +As of +.St -isoC-11 , +this header file can be implemented using the +.Fn _Generic +language keyword. +In addition to compilers that support this keyword, this header file +works with GCC. +.Sh BUGS Many of the functions mentioned here are not prototyped in .In math.h or .In complex.h as they are not yet implemented. +This prevents the corresponding type-generic macro from working at all. -- cgit v1.1 From 8952a0a413cffae99db7587034450cc04ca30726 Mon Sep 17 00:00:00 2001 From: brueffer Date: Thu, 5 Jan 2012 11:16:42 +0000 Subject: Fix typo. MFC after: 1 week --- share/man/man4/bce.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share/man') diff --git a/share/man/man4/bce.4 b/share/man/man4/bce.4 index 0bca57b..cbad861 100644 --- a/share/man/man4/bce.4 +++ b/share/man/man4/bce.4 @@ -251,7 +251,7 @@ status block. .It "bce%d: Could not allocate status block DMA memory!" The driver could not allocate DMA addressable memory for the controller's status block. -.It "bce_d: Could not map status block DMA memory!" +.It "bce%d: Could not map status block DMA memory!" The driver could not map the status block memory into the controller's DMA address space. .It "bce%d: Could not allocate statistics block DMA tag!" -- cgit v1.1 From 962d9f7018174ba31dee0955e96d5c4caf550748 Mon Sep 17 00:00:00 2001 From: uqs Date: Thu, 5 Jan 2012 21:36:12 +0000 Subject: Pull up vendor changes to mdoc(7) This switches us to using -isoC-2011 as the symbol name which is used by groff and mdocml. It follows the change to 4 digit years as done with IEEE Std 1003 post-1999. MFC after: 2 weeks (groff changes only) --- share/man/man3/ATOMIC_VAR_INIT.3 | 4 ++-- share/man/man3/tgmath.3 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'share/man') diff --git a/share/man/man3/ATOMIC_VAR_INIT.3 b/share/man/man3/ATOMIC_VAR_INIT.3 index 41f28db..1f85d3b 100644 --- a/share/man/man3/ATOMIC_VAR_INIT.3 +++ b/share/man/man3/ATOMIC_VAR_INIT.3 @@ -274,7 +274,7 @@ When using GCC, all atomic operations are executed as if they are using .Dv memory_order_seq_cst . .Pp Instead of using the atomic operations provided by this interface, -.St -isoC-11 +.St -isoC-2011 allows the atomic variables to be modified directly using built-in language operators. This behaviour cannot be emulated for older compilers. @@ -292,7 +292,7 @@ datatypes, if supported by the CPU. .Xr atomic 9 .Sh STANDARDS These macros attempt to conform to -.St -isoC-11 . +.St -isoC-2011 . .Sh HISTORY These macros appeared in .Fx 10.0 . diff --git a/share/man/man3/tgmath.3 b/share/man/man3/tgmath.3 index e86b141..70e4a81 100644 --- a/share/man/man3/tgmath.3 +++ b/share/man/man3/tgmath.3 @@ -141,13 +141,13 @@ first appeared in .Fx 5.3 . .Sh COMPILER SUPPORT Before -.St -isoC-11 , +.St -isoC-2011 , the header .In tgmath.h could not be implemented with strictly conforming C code and needed special compiler support. As of -.St -isoC-11 , +.St -isoC-2011 , this header file can be implemented using the .Fn _Generic language keyword. -- cgit v1.1 From a6fa5fdce7a3d98f7eceb931e20460d08dc642a4 Mon Sep 17 00:00:00 2001 From: uqs Date: Thu, 5 Jan 2012 21:43:33 +0000 Subject: Apply Typo-B-Gone 2000 [TM] --- share/man/man4/apic.4 | 2 +- share/man/man4/carp.4 | 2 +- share/man/man5/ar.5 | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'share/man') diff --git a/share/man/man4/apic.4 b/share/man/man4/apic.4 index 224e4f6..0856232 100644 --- a/share/man/man4/apic.4 +++ b/share/man/man4/apic.4 @@ -61,7 +61,7 @@ In addition, they are able to accept and generate inter-processor interrupts I/O APICs contain a redirection table, which is used to route the interrupts they receive from peripheral buses to one or more local APICs. .Pp -Each local APIC includes one 32-bit programable timer. +Each local APIC includes one 32-bit programmable timer. This driver uses them to supply kernel with one event timer named "LAPIC". Event timer provided by the driver supports both one-shot an periodic modes. Because of local APIC nature it is per-CPU. diff --git a/share/man/man4/carp.4 b/share/man/man4/carp.4 index 1b59e72..5a761ec 100644 --- a/share/man/man4/carp.4 +++ b/share/man/man4/carp.4 @@ -193,7 +193,7 @@ This can be accomplished by using hooks. Master/slave events are signalled under system .Dv CARP . -Subsystem specifies vhid and name of interface, where event occured. +Subsystem specifies vhid and name of interface, where event occurred. Type of the message displays new state of vhid. Please see .Xr devd.conf 5 diff --git a/share/man/man5/ar.5 b/share/man/man5/ar.5 index 81bc7e6..2acbde4 100644 --- a/share/man/man5/ar.5 +++ b/share/man/man5/ar.5 @@ -126,7 +126,7 @@ The BSD and SVR4/GNU variants use different schemes for encoding file names for members. .Bl -tag -width "SVR4/GNU" .It "BSD" -File names that are upto 16 bytes long and which do not contain +File names that are up to 16 bytes long and which do not contain embedded spaces are stored directly in the .Ar ar_name field of the archive header. @@ -164,7 +164,7 @@ ASCII .Dq "A BC D" .Pc . .It "SVR4/GNU" -File names that are upto 15 characters long are stored directly in the +File names that are up to 15 characters long are stored directly in the .Ar ar_name field of the header, terminated by a .Dq Li / -- cgit v1.1 From 0730e7f5bed7d8a8c749f0b81c900c9dc3f0b5c9 Mon Sep 17 00:00:00 2001 From: melifaro Date: Tue, 10 Jan 2012 12:45:24 +0000 Subject: Add setsockopt(2) example to ng_ksocket(4). While here, fix formatting a bit Approved by: kib(mentor) MFC after: 2 weeks --- share/man/man4/ng_ksocket.4 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'share/man') diff --git a/share/man/man4/ng_ksocket.4 b/share/man/man4/ng_ksocket.4 index d20ee46..e74f61a 100644 --- a/share/man/man4/ng_ksocket.4 +++ b/share/man/man4/ng_ksocket.4 @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 28, 2005 +.Dd January 09, 2012 .Dt NG_KSOCKET 4 .Os .Sh NAME @@ -199,7 +199,7 @@ For the address is the pathname as a doubly quoted string. .Pp Examples: -.Bl -tag -width XXXXXXXXXX +.Bl -tag -width "PF_LOCAL" .It Dv PF_LOCAL local/"/tmp/foo.socket" .It Dv PF_INET @@ -215,6 +215,12 @@ the normal form for that structure is used. In the future, more convenient encoding of the more common socket options may be supported. +.Pp +Setting socket options example: +.Bl -tag -width "PF_LOCAL" +.It Set FIB 2 for a socket (SOL_SOCKET, SO_SETFIB): +.Dv "setopt \&{ level=0xffff name=0x1014 data=[ 2 ] \&}" +.El .Sh SHUTDOWN This node shuts down upon receipt of a .Dv NGM_SHUTDOWN -- cgit v1.1 From c797a8475bbecf74b84ac55cdb264fba23feba0f Mon Sep 17 00:00:00 2001 From: rea Date: Thu, 12 Jan 2012 06:48:11 +0000 Subject: rc.d: document 'quiet' prefix and fix dhclient/devd interaction Document the current semantics of the 'quiet' command prefix in the rc.subr(8). Fix dhclient rc.d script: it should not call err() for non-DHCP-enabled interface when it is called from devd, because the latter just blindly calls 'service dhclient quietstart' on each "link up" event. Since the 'quietstart' will silence the message "Cannot 'start' . Set _enable to YES in /etc/rc.conf or use 'onestart' instead of 'start'." and running dhclient on the non-DHCP-enabled interface is the same thing as running the service without _enable set, such modification is in sync with the current semantics of the 'quiet' prefix. Approved by: glebius Reviewed by: freebsd-rc list MFC after: 2 weeks --- share/man/man8/rc.subr.8 | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'share/man') diff --git a/share/man/man8/rc.subr.8 b/share/man/man8/rc.subr.8 index 9f6c7fa..a3c759a 100644 --- a/share/man/man8/rc.subr.8 +++ b/share/man/man8/rc.subr.8 @@ -339,7 +339,7 @@ with being the list of valid arguments prefixed by .Sm off -.Dq Bq Li fast | force | one . +.Dq Bq Li fast | force | one | quiet . .Sm on .It Ic reverse_list Ar item ... Print the list of @@ -427,6 +427,22 @@ Skip the checks for being set to .Dq Li YES , but performs all the other prerequisite tests. +.It Li quiet +Inhibits some verbose diagnostics. +Currently, this includes messages +.Qq Starting ${name} +(as checked by +.Ic check_startmsgs +inside +.Nm ) +and errors about usage of services that are not enabled in +.Xr rc.conf 5 . +This prefix also sets +.Va rc_quiet Ns = Ns Li YES . +.Em Please, note: +.Va rc_quiet +is not intended to completely mask all debug and warning messages, +but only certain small classes of them. .El .Pp .Ic run_rc_command -- cgit v1.1 From 1d219ec710a2ecb30cd10629844c8ba61cbfc478 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 13 Jan 2012 15:43:01 +0000 Subject: Regenerate src.conf(5). --- share/man/man5/src.conf.5 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'share/man') diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 37f490f..68a93cd 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru .\" $FreeBSD$ -.Dd December 30, 2011 +.Dd January 13, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -252,7 +252,7 @@ Set to build some programs without optional bzip2 support. Set to not build .Xr calendar 1 . .It Va WITHOUT_CAPSICUM -.\" $FreeBSD$ +.\" from FreeBSD: head/tools/build/options/WITHOUT_CAPSICUM 229319 2012-01-02 21:57:58Z rwatson Set to not build Capsicum support into system programs. .It Va WITHOUT_CDDL .\" from FreeBSD: head/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb @@ -930,12 +930,11 @@ When set, it also enforces the following options: .\" from FreeBSD: head/tools/build/options/WITHOUT_USB 156932 2006-03-21 07:50:50Z ru Set to not build USB-related programs and libraries. .It Va WITHOUT_UTMPX -.\" from FreeBSD: head/tools/build/options/WITHOUT_UTMPX 223209 2011-06-17 21:30:21Z ed +.\" from FreeBSD: head/tools/build/options/WITHOUT_UTMPX 230060 2012-01-13 15:40:49Z ed Set to not build user accounting tools such as .Xr last 1 , .Xr users 1 , .Xr who 1 , -.Xr wtmpcvt 1 , .Xr ac 8 , .Xr lastlogin 8 and -- cgit v1.1 From a64dcf26c8fdd3be98274f2c948254bd1d683cb9 Mon Sep 17 00:00:00 2001 From: glebius Date: Sat, 14 Jan 2012 18:16:10 +0000 Subject: No need to run buildworld before generate-release.sh. --- share/man/man7/release.7 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'share/man') diff --git a/share/man/man7/release.7 b/share/man/man7/release.7 index f527c24..2d66691 100644 --- a/share/man/man7/release.7 +++ b/share/man/man7/release.7 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 18, 2011 +.Dd January 14, 2012 .Dt RELEASE 7 .Os .Sh NAME @@ -316,9 +316,7 @@ The following sequence of commands can be used to build a .Dq "-CURRENT snapshot" in a clean environment, including ports and documentation: .Bd -literal -offset indent -cd /usr/src -make buildworld -cd release +cd /usr/src/release export CVSUP_HOST=cvsupN.freebsd.org sh generate-release.sh head /local3/release .Ed -- cgit v1.1 From c578dd940cf46033db16e2a6545bdf221612b85b Mon Sep 17 00:00:00 2001 From: dougb Date: Sat, 14 Jan 2012 21:51:44 +0000 Subject: Remove documentation for set_rcvar() now that it has been removed. --- share/man/man8/rc.8 | 6 +++--- share/man/man8/rc.subr.8 | 30 +----------------------------- 2 files changed, 4 insertions(+), 32 deletions(-) (limited to 'share/man') diff --git a/share/man/man8/rc.8 b/share/man/man8/rc.8 index 82737d4..56a33ce 100644 --- a/share/man/man8/rc.8 +++ b/share/man/man8/rc.8 @@ -35,7 +35,7 @@ .\" @(#)rc.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd November 17, 2009 +.Dd January 14, 2012 .Dt RC 8 .Os .Sh NAME @@ -485,7 +485,7 @@ Most scripts require little more than the following. \&. /etc/rc.subr name="foo" -rcvar=`set_rcvar` +rcvar=foo_enable command="/usr/local/bin/foo" load_rc_config $name @@ -506,7 +506,7 @@ The script may list and define as many commands at it needs. \&. /etc/rc.subr name="foo" -rcvar=`set_rcvar` +rcvar=foo_enable command="/usr/local/bin/foo" extra_commands="nop hello" hello_cmd="echo Hello World." diff --git a/share/man/man8/rc.subr.8 b/share/man/man8/rc.subr.8 index a3c759a..8ed2470 100644 --- a/share/man/man8/rc.subr.8 +++ b/share/man/man8/rc.subr.8 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 18, 2007 +.Dd January 14, 2012 .Dt RC.SUBR 8 .Os .Sh NAME @@ -73,8 +73,6 @@ .It .Ic run_rc_script Ar file Ar argument .It -.Ic set_rcvar Op Ar base -.It .Ic wait_for_pids Op Ar pid ... .It .Ic warn Ar message @@ -832,32 +830,6 @@ signal is sent to the parent process, which is assumed to be .Xr rc 8 . Otherwise, the shell exits with a non-zero status. -.It Ic set_rcvar Op Ar base -Set the variable name required to start a service. -In -.Fx -a daemon is usually controlled by an -.Xr rc.conf 5 -variable consisting of a daemon's name postfixed by the string -.Dq Li "_enable" . -This is not the case in -.Nx . -When the following line is included in a script: -.Pp -.Dl "rcvar=`set_rcvar`" -.Pp -this function will use the value of the -.Va $name -variable, which should be defined by the calling script, -to construct the appropriate -.Xr rc.conf 5 -knob. -If the -.Ar base -argument is set it will use -.Ar base -instead of -.Va $name . .It Ic wait_for_pids Op Ar pid ... Wait until all of the provided .Ar pids -- cgit v1.1 From a84af1b28cf33f23a875d32dc0f9a4ce3069588f Mon Sep 17 00:00:00 2001 From: mav Date: Sun, 15 Jan 2012 13:21:36 +0000 Subject: Major snd_hda driver rewrite: - Huge old hdac driver was split into three independent pieces: HDA controller driver (hdac), HDA CODEC driver (hdacc) and HDA sudio function driver (hdaa). - Support for multichannel recording was added. Now, as specification defines, driver checks input associations for pins with sequence numbers 14 and 15, and if found (usually) -- works as before, mixing signals together. If it doesn't, it configures input association as multichannel. - Signal tracer was improved to look for cases where several DACs/ADCs in CODEC can work with the same audio signal. If such case found, driver registers additional playback/record stream (channel) for the pcm device. - New controller streams reservation mechanism was implemented. That allows to have more pcm devices then streams supported by the controller (usually 4 in each direction). Now it limits only number of simultaneously transferred audio streams, that is rarely reachable and properly reported if happens. - Codec pins and GPIO signals configuration was exported via set of writable sysctls. Another sysctl dev.hdaa.X.reconfig allows to trigger driver reconfiguration in run-time. - Driver now decodes pins location and connector type names. In some cases it allows to hint user where on the system case connectors, related to the pcm device, are located. Number of channels supported by pcm device, reported now (if it is not 2), should also make search easier. - Added workaround for digital mic on some Asus laptops/netbooks. MFC after: 2 months Sponsored by: iXsystems, Inc. --- share/man/man4/snd_hda.4 | 343 +++++++++++++++++++---------------------------- 1 file changed, 136 insertions(+), 207 deletions(-) (limited to 'share/man') diff --git a/share/man/man4/snd_hda.4 b/share/man/man4/snd_hda.4 index 6dedb02..270a9f5 100644 --- a/share/man/man4/snd_hda.4 +++ b/share/man/man4/snd_hda.4 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 22, 2010 +.Dd January 11, 2012 .Dt SND_HDA 4 .Os .Sh NAME @@ -53,8 +53,9 @@ support for several logical audio devices, and general purpose DMA channels. .Pp The .Nm -driver is a HDA bus controller driver and HDA codecs audio functions bridge -driver that allows the generic audio driver, +driver includes HDA bus controller driver (hdac), HDA codec driver (hdacc) +and HDA codecs audio functions bridge driver (hdaa) that allows +the generic audio driver, .Xr sound 4 , to be used with this hardware. Only audio functions are supported by @@ -77,7 +78,9 @@ For example, one device for main rear 7.1 output and inputs, one device for independent headset connectors at front and one device for SPDIF or HDMI audio input/output. The assignment of audio inputs and outputs may be tuned with -.Xr device.hints 5 . +.Xr device.hints 5 +or +.Xr sysctl 8 . The driver's verbose boot messages provide a lot of information about the operation of the driver and present audio setup. .Pp @@ -92,19 +95,26 @@ The following variables are available at boot-time through the file: .Bl -tag -width ".Va hint.hdac.%d.config"-offset indent .It Va hint.hdac.%d.config -Configures a range of possible options. +Configures a range of possible controller options. Possible values are: +.Dq Li 64bit , .Dq Li dmapos , +.Dq Li msi . +An option prefixed with +.Dq Li no , +such as +.Dq Li nomsi , +will do the opposite and takes precedence. +Options can be separated by whitespace and commas. +.It Va hint.hdac.%d.msi +Controls MSI (Message Signaled Interrupts) support. +.It Va hint.hdac.%d.cad%d.nid%d.config +Same as +.Va hint.hdaa.%d.nid%d.config +.It Va hint.hdaa.%d.config +Configures a range of possible audio function options. +Possible values are: .Dq Li eapdinv , -.Dq Li gpio0 , -.Dq Li gpio1 , -.Dq Li gpio2 , -.Dq Li gpio3 , -.Dq Li gpio4 , -.Dq Li gpio5 , -.Dq Li gpio6 , -.Dq Li gpio7 , -.Dq Li gpioflush , .Dq Li ivref , .Dq Li ivref50 , .Dq Li ivref80 , @@ -126,22 +136,47 @@ such as will do the opposite and takes precedence. Options can be separated by whitespace and commas. .Pp +The +.Dq Li eapdinv +option inverts External Amplifier Power Down signal. +The +.Dq Li fixedrate +denies all sampling rates except 48KHz. +The +.Dq Li forcestereo +denies mono playback/recording. +The +.Dq Li senseinv +option inverts jack sensing logic. +The +.Dq Li ivref Ns Ar X +and +.Dq Li ovref Ns Ar X +options control the voltage used to power external microphones. +.It Va hint.hdaa.%d.gpio_config +Overrides audio function GPIO pins configuration set by BIOS. +May be specified as a set of space-separated +.Dq Ar num Ns = Ns Ar value +pairs, where +.Ar num +is GPIO line number, and +.Ar value +is one of: +.Dq Li keep , +.Dq Li set , +.Dq Li clear , +.Dq Li disable +and +.Dq Li input . +.Pp .Dq Li GPIO Ns s are a codec's General Purpose I/O pins which system integrators sometimes use to control external muters, amplifiers and so on. If you have no sound, or sound volume is not adequate, you may have to experiment a bit with the GPIO setup to find the optimal setup for your system. -.Pp -The -.Dq Li ivref Ns Ar X -and -.Dq Li ovref Ns Ar X -options control the voltage used to power external microphones. -.It Va hint.hdac.%d.msi -Controls MSI (Message Signaled Interrupts) support. -.It Va hint.hdac.%d.cad%d.nid%d.config -Overrides codec pin configuration set by BIOS. +.It Va hint.hdaa.%d.nid%d.config +Overrides audio function pin configuration set by BIOS. May be specified as a 32-bit hexadecimal value with a leading .Dq 0x , or as a set of space-separated @@ -165,7 +200,7 @@ The following options are supported: Association number. Associations are used to group individual pins to form a complex multi-pin device. -For example, to group 4 connectors for 7.1 output, or to treat several +For example, to group 4 connectors for 7.1 input/output, or to treat several input connectors as sources for the same input device. Association numbers can be specified as numeric values from 0 to 15. A value of 0 means disabled pin. @@ -180,16 +215,22 @@ A unique, per-association number used to order pins inside the particular association. Sequence numbers can be specified as numeric values from 0 to 15. .Pp -For output assotiations sequence numbers encode speaker pairs positions: -0 - Front, 1 - Center/LFE, 2 - Back, 3 - Front Wide Center, 4 - Side. -Standard combinations are: (0) - Stereo; (0, 2), (0, 4) - Quadro; -(0, 1, 2), (0, 1, 4) - 5.1; (0, 1, 2, 4) - 7.1. -.Pp The sequence number 15 has a special meaning for output associations. Output pins with this number and device type .Dq Ar Headphones will duplicate (with automatic mute if jack detection is supported) the first pin in that association. +.Pp +The sequence numbers 14 and 15 has a special meaning for input associations. +Their presence in association defines it as multiplexed or mixed respectively. +If none of them present and there are more then one pin in association, +the association will provide multichannel input. +.Pp +For multichannel input/output assotiations sequence numbers encode +channel pairs positions: +0 - Front, 1 - Center/LFE, 2 - Back, 3 - Front Wide Center, 4 - Side. +Standard combinations are: (0) - Stereo; (0, 2), (0, 4) - Quadro; +(0, 1, 2), (0, 1, 4) - 5.1; (0, 1, 2, 4) - 7.1. .It Va device Device type. Can be specified as a number from 0 to 15 or as a name: @@ -278,7 +319,11 @@ The following variables are available in addition to those available to all .Xr sound 4 devices: -.Bl -tag -width ".Va dev.hdac.%d.polling" -offset indent +.Bl -tag -width ".Va dev.hdaa.%d.nid%d_original" -offset indent +.It Va dev.hdac.%d.pindump +Setting this to a non-zero value dumps the current pin configuration, main +capabilities and jack sense status of all audio functions on the controller +to console and syslog. .It Va dev.hdac.%d.polling Enables polling mode. In this mode the driver operates by querying the device state on timer @@ -288,11 +333,30 @@ instead of interrupts. Polling is disabled by default. Do not enable it unless you are facing weird interrupt problems or if the device cannot generate interrupts at all. -.It Va dev.hdac.%d.polling_interval -Controller/Jack Sense polling interval (1-1000 ms) -.It Va dev.hdac.%d.pindump -Setting this to a non-zero value dumps the current pin configuration, main -capabilities and jack sense status to console and syslog. +.It Va dev.hdaa.%d.config +Run-time equivalent of the +.Va hint.hdaa.%d.config +tunable. +.It Va dev.hdaa.%d.gpi_state +Current state of GPI lines. +.It Va dev.hdaa.%d.gpio_state +Current state of GPIO lines. +.It Va dev.hdaa.%d.gpio_config +Run-time equivalent of the +.Va hint.hdaa.%d.gpio.config +tunable. +.It Va dev.hdaa.%d.gpo_state +Current state of GPO lines. +.It Va dev.hdaa.%d.nid%d_config +Run-time equivalent of the +.Va hint.hdaa.%d.nid%d.config +tunable. +.It Va dev.hdaa.%d.nid%d_original +Original pin configuration written by BIOS. +.It Va dev.hdaa.%d.reconfig +Setting this to a non-zero value makes driver to destroy existing pcm devices +and process new pins configuration set via +.Va dev.hdaa.%d.nid%d_config. .El .Sh EXAMPLES Taking HP Compaq DX2300 with Realtek ALC888 HDA codec for example. @@ -307,22 +371,23 @@ So high codec uniformity and flexibility allow driver to configure it in many different ways, depending on requested pins usage described by pins configuration. The driver reports such default pin configuration when verbose messages enabled: .Bd -literal -hdac0: nid 20 0x01014020 as 2 seq 0 Line-out Jack jack 1 loc 1 color Green misc 0 -hdac0: nid 21 0x99130110 as 1 seq 0 Speaker Fixed jack 3 loc 25 color Unknown misc 1 -hdac0: nid 22 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 -hdac0: nid 23 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 -hdac0: nid 24 0x01a19830 as 3 seq 0 Mic Jack jack 1 loc 1 color Pink misc 8 -hdac0: nid 25 0x02a1983f as 3 seq 15 Mic Jack jack 1 loc 2 color Pink misc 8 -hdac0: nid 26 0x01813031 as 3 seq 1 Line-in Jack jack 1 loc 1 color Blue misc 0 -hdac0: nid 27 0x0221401f as 1 seq 15 Headphones Jack jack 1 loc 2 color Green misc 0 -hdac0: nid 28 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 -hdac0: nid 30 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 -hdac0: nid 31 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 +hdaa0: nid 0x as seq device conn jack loc color misc +hdaa0: 20 01014020 2 0 Line-out Jack 1/8 Rear Green 0 +hdaa0: 21 99130110 1 0 Speaker Fixed ATAPI Onboard Unknown 1 +hdaa0: 22 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA +hdaa0: 23 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA +hdaa0: 24 01a19830 3 0 Mic Jack 1/8 Rear Pink 8 +hdaa0: 25 02a1983f 3 15 Mic Jack 1/8 Front Pink 8 +hdaa0: 26 01813031 3 1 Line-in Jack 1/8 Rear Blue 0 +hdaa0: 27 0221401f 1 15 Headphones Jack 1/8 Front Green 0 +hdaa0: 28 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA +hdaa0: 30 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA +hdaa0: 31 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA .Ed .Pp Here we can see, that the nodes with ID (nid) 25 and 27 are front panel -connectors (Jack, loc 2), nids 20, 24 and 26 are rear panel connectors -(Jack, loc 1) and nid 21 is a built-in speaker (Fixed, loc 25). +connectors (Jack, Front), nids 20, 24 and 26 are rear panel connectors +(Jack, Rear) and nid 21 is a built-in speaker (Fixed, Onboard). Pins with nids 22, 23, 28, 30 and 31 will be disabled by driver due to "None" connectivity. So the pin count and description matches to connectors that we have. @@ -330,15 +395,15 @@ we have. Using association (as) and sequence (seq) fields values pins are grouped into 3 associations: .Bd -literal -hdac0: Association 0 (1) out: -hdac0: Pin nid=21 seq=0 -hdac0: Pin nid=27 seq=15 -hdac0: Association 1 (2) out: -hdac0: Pin nid=20 seq=0 -hdac0: Association 2 (3) in: -hdac0: Pin nid=24 seq=0 -hdac0: Pin nid=26 seq=1 -hdac0: Pin nid=25 seq=15 +hdaa0: Association 0 (1) out: +hdaa0: Pin nid=21 seq=0 +hdaa0: Pin nid=27 seq=15 +hdaa0: Association 1 (2) out: +hdaa0: Pin nid=20 seq=0 +hdaa0: Association 2 (3) in: +hdaa0: Pin nid=24 seq=0 +hdaa0: Pin nid=26 seq=1 +hdaa0: Pin nid=25 seq=15 .Ed .Pp Each @@ -497,148 +562,14 @@ Most of controls use logarithmic scale. .Sh HARDWARE The .Nm -driver supports many Intel HDA compatible audio chipsets including the -following: -.Pp -.Bl -bullet -compact -.It -ATI SB450 -.It -ATI SB600 -.It -Intel 631x/632xESB -.It -Intel 82801F (ICH6) -.It -Intel 82801G (ICH7) -.It -Intel 82801H (ICH8) -.It -Intel 82801I (ICH9) -.It -Intel 82801J (ICH10) -.It -Intel US15W (SCH) -.It -nVidia MCP51 -.It -nVidia MCP55 -.It -nVidia MCP61A -.It -nVidia MCP61B -.It -nVidia MCP63 -.It -nVidia MCP65A -.It -nVidia MCP65B -.It -nVidia MCP67A -.It -nVidia MCP67B -.It -nVidia MCP68 -.It -nVidia MCP69 -.It -nVidia MCP73 -.It -nVidia MCP78 -.It -nVidia MCP79 -.It -nVidia MCP89 -.It -SiS 966 -.It -VIA VT8251/8237A -.El -.Pp -The following and many other codecs have been verified to work: +driver supports controllers having PCI class 4 (multimedia) and +subclass 3 (HDA), compatible with Intel HDA specification. .Pp -.Bl -bullet -compact -.It -Analog Devices AD1981HD -.It -Analog Devices AD1983 -.It -Analog Devices AD1984 -.It -Analog Devices AD1986A -.It -Analog Devices AD1988 -.It -Analog Devices AD1988B -.It -CMedia CMI9880 -.It -Conexant CX20549 (Venice) -.It -Conexant CX20551 (Waikiki) -.It -Conexant CX20561 (Hermosa) -.It -Realtek ALC260 -.It -Realtek ALC262 -.It -Realtek ALC268 -.It -Realtek ALC660 -.It -Realtek ALC861 -.It -Realtek ALC861VD -.It -Realtek ALC880 -.It -Realtek ALC882 -.It -Realtek ALC883 -.It -Realtek ALC885 -.It -Realtek ALC888 -.It -Realtek ALC889 -.It -Sigmatel STAC9205 -.It -Sigmatel STAC9220 -.It -Sigmatel STAC9220D / 9223D -.It -Sigmatel STAC9221 -.It -Sigmatel STAC9221D -.It -Sigmatel STAC9227D -.It -Sigmatel STAC9227X -.It -Sigmatel STAC9228D -.It -Sigmatel STAC9228X -.It -Sigmatel STAC9229D -.It -Sigmatel STAC9229X -.It -Sigmatel STAC9230D -.It -Sigmatel STAC9230X -.It -Sigmatel STAC9271D -.It -Sigmatel STAC9872AK -.It -VIA VT1708 -.It -VIA VT1708B -.It -VIA VT1709 -.El +The +.Nm +driver supports more then two hundred different controllers and CODECs. +There is no sense to list all of them here, as in most cases specific CODEC +configuration and wiring are more important then type of the CODEC itself. .Sh SEE ALSO .Xr sound 4 , .Xr snd_ich 4 , @@ -665,19 +596,17 @@ This manual page was written by and .An Giorgos Keramidas Aq keramida@FreeBSD.org . .Sh BUGS -A few Hardware/OEM vendors tend to screw up BIOS settings, thus -rendering the -.Nm -driver useless. -This usually results in a state where the +Some Hardware/OEM vendors tend to screw up BIOS settings or use custom +unusual CODEC wiring that create problems to the driver. +This may result in missing pcm devices, or a state where the .Nm driver seems to attach and work, but no sound is played. Some cases can be solved by tuning .Pa loader.conf variables. -Before trying to fix problem that way, make sure that there really is a problem -and that the PCM audio device in use really corresponds to the expected -audio connector. +But before trying to fix problem that way, make sure that there really is +a problem and that the PCM audio device in use really corresponds to the +expected audio connector. .Pp Some vendors use non-standardized General Purpose I/O (GPIO) pins of the codec to control external amplifiers. -- cgit v1.1 From a5c88f4732cc58341150fbb685858567a8fa7489 Mon Sep 17 00:00:00 2001 From: yongari Date: Tue, 17 Jan 2012 22:17:11 +0000 Subject: Document dev.bge.%d.msi_disable tunable. --- share/man/man4/bge.4 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'share/man') diff --git a/share/man/man4/bge.4 b/share/man/man4/bge.4 index 13a4aa6..7a20d2a 100644 --- a/share/man/man4/bge.4 +++ b/share/man/man4/bge.4 @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 2, 2011 +.Dd January 17, 2012 .Dt BGE 4 .Os .Sh NAME @@ -188,7 +188,7 @@ SysKonnect SK-9D21 (10/100/1000baseTX) SysKonnect SK-9D41 (1000baseSX) .El .Sh LOADER TUNABLES -The following tunable can be set at the +The following tunables can be set at the .Xr loader 8 prompt before booting the kernel, or stored in .Xr loader.conf 5 . @@ -197,6 +197,9 @@ prompt before booting the kernel, or stored in Allow the ASF feature for cooperating with IPMI. Can cause system lockup problems on a small number of systems. Enabled by default. +.It Va dev.bge.%d.msi_disable +Non-zero value disables MSI support on the Ethernet hardware. +The default value is 0. .El .Sh SYSCTL VARIABLES The following variables are available as both -- cgit v1.1 From 13ac35b1854f976ab055d43f9aacc540992a1615 Mon Sep 17 00:00:00 2001 From: kevlo Date: Wed, 18 Jan 2012 02:27:09 +0000 Subject: vfs_object_create() function is obsolete. Use vnode_create_vobject() to create the backing object. Reviewed by: kib --- share/man/man9/vnode.9 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'share/man') diff --git a/share/man/man9/vnode.9 b/share/man/man9/vnode.9 index cfc6f7d..eba208f 100644 --- a/share/man/man9/vnode.9 +++ b/share/man/man9/vnode.9 @@ -119,13 +119,13 @@ No type. .It Dv VREG A regular file; may be with or without VM object backing. If you want to make sure this get a backing object, call -.Xr vfs_object_create 9 . +.Fn vnode_create_vobject . .It Dv VDIR A directory. .It Dv VBLK A block device; may be with or without VM object backing. If you want to make sure this get a backing object, call -.Xr vfs_object_create 9 . +.Fn vnode_create_vobject . .It Dv VCHR A character device. .It Dv VLNK -- cgit v1.1 From 6ac4c5fe321a5eebc8362b1b424749e90f182419 Mon Sep 17 00:00:00 2001 From: kevlo Date: Wed, 18 Jan 2012 02:29:11 +0000 Subject: NOOBJ is long time dead Reviewed by: kib --- share/man/man9/namei.9 | 4 ---- 1 file changed, 4 deletions(-) (limited to 'share/man') diff --git a/share/man/man9/namei.9 b/share/man/man9/namei.9 index c941004..f643a3f 100644 --- a/share/man/man9/namei.9 +++ b/share/man/man9/namei.9 @@ -196,10 +196,6 @@ With this flag, will follow the symbolic link if the last part of the path supplied is a symbolic link (i.e., it will return a vnode for whatever the link points at, instead for the link itself). -.It Dv NOOBJ -Do not call -.Fn vfs_object_create -for the returned vnode, even though it meets required criteria for VM support. .It Dv NOFOLLOW Do not follow symbolic links (pseudo). This flag is not looked for by the actual code, which looks for -- cgit v1.1 From 623ee56937b7b5667a6079f6c1bb83c2ed2ecbbc Mon Sep 17 00:00:00 2001 From: lstewart Date: Wed, 18 Jan 2012 03:03:21 +0000 Subject: Specify the correct section (4 instead of 9) in the h_ertt man page's title and bump the document date. MFC after: 3 days --- share/man/man4/h_ertt.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'share/man') diff --git a/share/man/man4/h_ertt.4 b/share/man/man4/h_ertt.4 index 70ed36d..3dbedab 100644 --- a/share/man/man4/h_ertt.4 +++ b/share/man/man4/h_ertt.4 @@ -29,8 +29,8 @@ .\" .\" $FreeBSD$ .\" -.Dd February 15, 2011 -.Dt H_ERTT 9 +.Dd January 18, 2012 +.Dt H_ERTT 4 .Os .Sh NAME .Nm h_ertt -- cgit v1.1 From 1e5d8b382dc92a9fe55fa15415eeaaccdc6539d9 Mon Sep 17 00:00:00 2001 From: sbruno Date: Wed, 18 Jan 2012 21:27:49 +0000 Subject: Update man page to show that ciss(4) now support the P420 MFC with r230313 Caught by: brueffer Obtained from: Yahoo! Inc MFC after: 2 weeks --- share/man/man4/ciss.4 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'share/man') diff --git a/share/man/man4/ciss.4 b/share/man/man4/ciss.4 index f975707..fb080af 100644 --- a/share/man/man4/ciss.4 +++ b/share/man/man4/ciss.4 @@ -131,6 +131,8 @@ HP Smart Array P410i .It HP Smart Array P411 .It +HP Smart Array P420 +.It HP Smart Array P600 .It HP Smart Array P800 -- cgit v1.1 From e9eb3a867cff40b2681bf414f051e9a3edcbc591 Mon Sep 17 00:00:00 2001 From: sbruno Date: Wed, 18 Jan 2012 22:52:02 +0000 Subject: Update .Dd date on this man page. MFC with r230313 and r230316 Caught by: bz Obtained from: Yahoo! Inc. --- share/man/man4/ciss.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share/man') diff --git a/share/man/man4/ciss.4 b/share/man/man4/ciss.4 index fb080af..bf9ce87 100644 --- a/share/man/man4/ciss.4 +++ b/share/man/man4/ciss.4 @@ -2,7 +2,7 @@ .\" Written by Tom Rhodes .\" This file is in the public domain. .\" -.Dd November 3, 2005 +.Dd January 18, 2012 .Dt CISS 4 .Os .Sh NAME -- cgit v1.1 From bb9610f591b07845e5a6537a35493f46defabb90 Mon Sep 17 00:00:00 2001 From: kevlo Date: Thu, 19 Jan 2012 02:49:21 +0000 Subject: Add missing MLINKS to INDEX.5 --- share/man/man5/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'share/man') diff --git a/share/man/man5/Makefile b/share/man/man5/Makefile index fdf3b33..b05c1eb 100644 --- a/share/man/man5/Makefile +++ b/share/man/man5/Makefile @@ -76,6 +76,7 @@ MLINKS+=fs.5 inode.5 MLINKS+=hosts.equiv.5 rhosts.5 MLINKS+=msdosfs.5 msdos.5 MLINKS+=passwd.5 master.passwd.5 +MLINKS+=portindex.5 INDEX.5 MLINKS+=quota.user.5 quota.group.5 MLINKS+=rc.conf.5 rc.conf.local.5 MLINKS+=resolver.5 resolv.conf.5 -- cgit v1.1 From ea418e7d74ca6f7d3f1b25f6adc283124297c9d0 Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 19 Jan 2012 09:51:07 +0000 Subject: Remove remnants of dev_t. These functions take a `struct cdev *' -- not a dev_t. Inside the kernel, dev_t has the same use as in userspace, namely to store a device identifier. MFC after: 2 weeks --- share/man/man9/DEV_MODULE.9 | 4 ++-- share/man/man9/devtoname.9 | 6 +++--- share/man/man9/physio.9 | 4 ++-- share/man/man9/uio.9 | 4 ++-- share/man/man9/vcount.9 | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'share/man') diff --git a/share/man/man9/DEV_MODULE.9 b/share/man/man9/DEV_MODULE.9 index 13a81c1..28465b3 100644 --- a/share/man/man9/DEV_MODULE.9 +++ b/share/man/man9/DEV_MODULE.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 11, 2001 +.Dd January 19, 2012 .Dt DEV_MODULE 9 .Os .Sh NAME @@ -68,7 +68,7 @@ on load and to destroy it when it is unloaded using static struct cdevsw foo_devsw = { ... }; -static dev_t sdev; +static struct cdev *sdev; static int foo_load(module_t mod, int cmd, void *arg) diff --git a/share/man/man9/devtoname.9 b/share/man/man9/devtoname.9 index f93e77b..0e6e0db 100644 --- a/share/man/man9/devtoname.9 +++ b/share/man/man9/devtoname.9 @@ -24,17 +24,17 @@ .\" .\" $FreeBSD$ .\" -.Dd September 25, 1999 +.Dd January 19, 2012 .Dt DEVTONAME 9 .Os .Sh NAME .Nm devtoname -.Nd "converts dev_t data into a string indicating the device name" +.Nd "converts character device into a string indicating the device name" .Sh SYNOPSIS .In sys/param.h .In sys/conf.h .Ft const char * -.Fn devtoname "dev_t dev" +.Fn devtoname "struct cdev *dev" .Sh DESCRIPTION The .Fn devtoname diff --git a/share/man/man9/physio.9 b/share/man/man9/physio.9 index 7d7174e..977c467 100644 --- a/share/man/man9/physio.9 +++ b/share/man/man9/physio.9 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2004 +.Dd January 19, 2012 .Dt PHYSIO 9 .Os .Sh NAME @@ -41,7 +41,7 @@ .In sys/bio.h .In sys/buf.h .Ft int -.Fn physio "dev_t dev" "struct uio *uio" "int ioflag" +.Fn physio "struct cdev *dev" "struct uio *uio" "int ioflag" .Sh DESCRIPTION The .Fn physio diff --git a/share/man/man9/uio.9 b/share/man/man9/uio.9 index 9d569b7..fd66e3d 100644 --- a/share/man/man9/uio.9 +++ b/share/man/man9/uio.9 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 9, 2011 +.Dd January 19, 2012 .Dt UIO 9 .Os .Sh NAME @@ -154,7 +154,7 @@ static char buffer[BUFSIZE]; static int data_available; /* amount of data that can be read */ static int -fooread(dev_t dev, struct uio *uio, int flag) +fooread(struct cdev *dev, struct uio *uio, int flag) { int rv, amnt; diff --git a/share/man/man9/vcount.9 b/share/man/man9/vcount.9 index 41263b9..186a350 100644 --- a/share/man/man9/vcount.9 +++ b/share/man/man9/vcount.9 @@ -32,7 +32,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 6, 2001 +.Dd January 19, 2012 .Dt VCOUNT 9 .Os .Sh NAME @@ -47,7 +47,7 @@ .Ft int .Fn vcount "struct vnode *vp" .Ft int -.Fn count_dev "dev_t dev" +.Fn count_dev "struct cdev *dev" .Sh DESCRIPTION .Fn vcount is used to get the number of references to a particular device. @@ -56,7 +56,7 @@ It allows for the fact that multiple vnodes may reference the same device. does the same thing as .Fn vcount , but takes a -.Vt dev_t +.Vt "struct cdev" rather than a .Vt "struct vnode" pointer as an argument. -- cgit v1.1 From 4e8b44a024a885568ac9b29289d2d8637925925b Mon Sep 17 00:00:00 2001 From: yongari Date: Thu, 19 Jan 2012 20:31:29 +0000 Subject: Reflect tunable name change made in r230337. --- share/man/man4/bge.4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'share/man') diff --git a/share/man/man4/bge.4 b/share/man/man4/bge.4 index 7a20d2a..dc31ff6 100644 --- a/share/man/man4/bge.4 +++ b/share/man/man4/bge.4 @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 17, 2012 +.Dd January 19, 2012 .Dt BGE 4 .Os .Sh NAME @@ -197,9 +197,9 @@ prompt before booting the kernel, or stored in Allow the ASF feature for cooperating with IPMI. Can cause system lockup problems on a small number of systems. Enabled by default. -.It Va dev.bge.%d.msi_disable -Non-zero value disables MSI support on the Ethernet hardware. -The default value is 0. +.It Va dev.bge.%d.msi +Non-zero value enables MSI support on the Ethernet hardware. +The default value is 1. .El .Sh SYSCTL VARIABLES The following variables are available as both -- cgit v1.1 From 5d0a4619603c5a23a070725ec7221cd056bbc559 Mon Sep 17 00:00:00 2001 From: brueffer Date: Sun, 22 Jan 2012 10:16:24 +0000 Subject: General cleanup. Prodded by: grehan --- share/man/man4/virtio.4 | 21 +++++++++++---------- share/man/man4/virtio_balloon.4 | 6 +++--- share/man/man4/virtio_blk.4 | 6 +++--- share/man/man4/vtnet.4 | 15 ++++++++------- 4 files changed, 25 insertions(+), 23 deletions(-) (limited to 'share/man') diff --git a/share/man/man4/virtio.4 b/share/man/man4/virtio.4 index 7787051..030f0aa 100644 --- a/share/man/man4/virtio.4 +++ b/share/man/man4/virtio.4 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 4, 2011 +.Dd January 22, 2012 .Dt VIRTIO 4 .Os .Sh NAME @@ -48,24 +48,25 @@ virtio_pci_load="YES" .Sh DESCRIPTION VirtIO is a specification for para-virtualized I/O in a virtual machine (VM). Traditionally, the hypervisor emulated real devices such as an Ethernet -interface or disk controller to provide the VM with I/O. This emulation is -often inefficient. +interface or disk controller to provide the VM with I/O. +This emulation is often inefficient. .Pp VirtIO defines an interface for efficient I/O between the hypervisor and VM. -The -.Xr virtio 4 +The +.Xr virtio 4 module provides a shared memory transport called a virtqueue. The .Xr virtio_pci 4 device driver represents an emulated PCI device that the hypervisor makes -available to the VM. This device provides the probing, configuration, and -interrupt notifications need to interact with the hypervisor. +available to the VM. +This device provides the probing, configuration, and +interrupt notifications needed to interact with the hypervisor. .Fx supports the following VirtIO devices: .Bl -hang -offset indent -width xxxxxxxx .It Nm Ethernet An emulated Ethernet device is provided by the -.Xr if_vtnet 4 +.Xr vtnet 4 device driver. .It Nm Block An emulated disk controller is provided by the @@ -78,9 +79,9 @@ provided by the device driver. .El .Sh SEE ALSO -.Xr if_vtnet 4 , +.Xr virtio_balloon 4 , .Xr virtio_blk 4 , -.Xr virtio_balloon 4 +.Xr vtnet 4 .Sh HISTORY Support for VirtIO first appeared in .Fx 9.0 . diff --git a/share/man/man4/virtio_balloon.4 b/share/man/man4/virtio_balloon.4 index 4053f78..96e8c73 100644 --- a/share/man/man4/virtio_balloon.4 +++ b/share/man/man4/virtio_balloon.4 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 4, 2011 +.Dd January 22, 2012 .Dt VIRTIO_BALLOON 4 .Os .Sh NAME @@ -51,8 +51,8 @@ device driver provides support for VirtIO memory balloon devices. .Pp The memory balloon allows the guest to, at the request of the hypervisor, return memory allocated to the hypervisor so it can -be made available to other guests. The hypervisor can later -signal the balloon to return the memory. +be made available to other guests. +The hypervisor can later signal the balloon to return the memory. .Sh SEE ALSO .Xr virtio 4 .Sh HISTORY diff --git a/share/man/man4/virtio_blk.4 b/share/man/man4/virtio_blk.4 index 4250141..7be4425 100644 --- a/share/man/man4/virtio_blk.4 +++ b/share/man/man4/virtio_blk.4 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 4, 2011 +.Dd January 22, 2012 .Dt VIRTIO_BLK 4 .Os .Sh NAME @@ -48,7 +48,6 @@ virtio_blk_load="YES" The .Nm device driver provides support for VirtIO block devices. -.Pp .Sh LOADER TUNABLES Tunables can be set at the .Xr loader 8 @@ -57,7 +56,8 @@ prompt before booting the kernel or stored in .Bl -tag -width "xxxxxx" .It Va hw.vtblk.no_ident This tunable disables retrieving the device identification string -from the hypervisor. The default value is 0. +from the hypervisor. +The default value is 0. .El .Sh SEE ALSO .Xr virtio 4 diff --git a/share/man/man4/vtnet.4 b/share/man/man4/vtnet.4 index 900d12d..febb0ac 100644 --- a/share/man/man4/vtnet.4 +++ b/share/man/man4/vtnet.4 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 4, 2011 +.Dd January 22, 2012 .Dt VTNET 4 .Os .Sh NAME @@ -62,7 +62,6 @@ utility configures the adapter to receive and transmit Jumbo Frames. .Pp For more information on configuring this device, see .Xr ifconfig 8 . -.El .Sh LOADER TUNABLES Tunables can be set at the .Xr loader 8 @@ -70,19 +69,21 @@ prompt before booting the kernel or stored in .Xr loader.conf 5 . .Bl -tag -width "xxxxxx" .It Va hw.vtnet.csum_disable -This tunable disables receive and send checksum offload. The default -value is 0. +This tunable disables receive and send checksum offload. +The default value is 0. .It Va hw.vtnet.tso_disable -This tunable disables TSO. The default value is 0. +This tunable disables TSO. +The default value is 0. .It Va hw.vtnet.lro_disable -This tunable disables LRO. The default value is 0. +This tunable disables LRO. +The default value is 0. .El .Sh SEE ALSO .Xr arp 4 , .Xr netintro 4 , .Xr ng_ether 4 , -.Xr vlan 4 , .Xr virtio 4 , +.Xr vlan 4 , .Xr ifconfig 8 .Sh HISTORY The -- cgit v1.1 From f317ff0f6559bac3c7a0ee926ba002b29cdf2d53 Mon Sep 17 00:00:00 2001 From: brueffer Date: Sun, 22 Jan 2012 13:51:20 +0000 Subject: Connect VirtIO-related manpages to the build. --- share/man/man4/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'share/man') diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 01c75ca..e935472 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -505,11 +505,15 @@ MAN= aac.4 \ viapm.4 \ ${_viawd.4} \ vinum.4 \ + ${_virtio.4} \ + ${_virtio_balloon.4} \ + ${_virtio_blk.4} \ vkbd.4 \ vlan.4 \ vpo.4 \ vr.4 \ vte.4 \ + ${_vtnet.4} \ ${_vxge.4} \ watchdog.4 \ wb.4 \ @@ -656,6 +660,7 @@ MLINKS+=vge.4 if_vge.4 MLINKS+=vlan.4 if_vlan.4 MLINKS+=vpo.4 imm.4 MLINKS+=vr.4 if_vr.4 +MLINKS+=${_vtnet.4} ${_if_vtnet.4} MLINKS+=${_vxge.4} ${_if_vxge.4} MLINKS+=watchdog.4 SW_WATCHDOG.4 MLINKS+=wb.4 if_wb.4 @@ -699,6 +704,7 @@ _if_nfe.4= if_nfe.4 _if_nve.4= if_nve.4 _if_nxge.4= if_nxge.4 _if_urtw.4= if_urtw.4 +_if_vtnet.4= if_vtnet.4 _if_vxge.4= if_vxge.4 _if_wpi.4= if_wpi.4 _ipmi.4= ipmi.4 @@ -711,6 +717,10 @@ _nfsmb.4= nfsmb.4 _nve.4= nve.4 _nvram.4= nvram.4 _nxge.4= nxge.4 +_virtio.4= virtio.4 +_virtio_balloon.4=virtio_balloon.4 +_virtio_blk.4= virtio_blk.4 +_vtnet.4= vtnet.4 _vxge.4= vxge.4 _padlock.4= padlock.4 _rr232x.4= rr232x.4 -- cgit v1.1 From 47a267281a18c3ec6dae857fa3d241f0291d5d7e Mon Sep 17 00:00:00 2001 From: stefanf Date: Sun, 22 Jan 2012 14:04:42 +0000 Subject: Document the values for hw.snd.default_auto. --- share/man/man4/pcm.4 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'share/man') diff --git a/share/man/man4/pcm.4 b/share/man/man4/pcm.4 index 333033d..268e784 100644 --- a/share/man/man4/pcm.4 +++ b/share/man/man4/pcm.4 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 31, 2011 +.Dd January 22, 2012 .Dt SOUND 4 .Os .Sh NAME @@ -324,8 +324,17 @@ for Linux applications, and deny for everything else. Always allow PROT_EXEC page mappings. .El .It Va hw.snd.default_auto -Enable to automatically assign default sound unit to the most recent -attached device. +Automatically assign the default sound unit. +The following values are supported (default is 1): +.Bl -tag -width 2n +.It 0 +Do not assign the default sound unit automatically. +.It 1 +Use the best available sound device based on playing and recording +capabilities of the device. +.It 2 +Use the most recently attached device. +.El .It Va hw.snd.default_unit Default sound card for systems with multiple sound cards. When using -- cgit v1.1 From cdbeb8d33063265e76190128852d224f1e09acb9 Mon Sep 17 00:00:00 2001 From: imp Date: Wed, 25 Jan 2012 04:45:29 +0000 Subject: Some minor additions to the list of supported devices... --- share/man/man4/ed.4 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'share/man') diff --git a/share/man/man4/ed.4 b/share/man/man4/ed.4 index 6217669..d002b96 100644 --- a/share/man/man4/ed.4 +++ b/share/man/man4/ed.4 @@ -139,7 +139,7 @@ Allied Telesis SIC-98, SIC-98NOTE (110pin), SIU-98 (flags 0x600000) (PC-98) .It Allied Telesis SIU-98-D (flags 0x610000) (PC-98) .It -AmbiCom 10BaseT card +AmbiCom 10BaseT card (8002, 8002T, 8010 and 8610) .It Bay Networks NETGEAR FA410TXC Fast Ethernet .It @@ -147,11 +147,15 @@ Belkin F5D5020 PC Card Fast Ethernet .It Billionton LM5LT-10B Ethernet/Modem PC Card .It +Billionton LNT-10TB, LNT-10TN Ethernet PC Card +.It Bromax iPort 10/100 Ethernet PC Card .It Bromax iPort 10 Ethernet PC Card .It -Buffalo LPC2-CLT, LPC3-CLT, LPC3-CLX, LPC4-TX PC Card +Buffalo LPC2-CLT, LPC3-CLT, LPC3-CLX, LPC4-TX, LPC-CTX PC Card +.It +Buffalo LPC-CF-CLT CF Card .It CNet BC40 adapter .It -- cgit v1.1 From 30761935c6caad4e8f25453ffd5804be83563d02 Mon Sep 17 00:00:00 2001 From: mav Date: Wed, 25 Jan 2012 20:46:10 +0000 Subject: Rewrite jack presence detection and implement automatic recording source selection in snd_hda(4) driver. Now driver tracks jack presence detection status for every CODEC pin. For playback associations, when configured, that information, same as before, can be used to automatically redirect audio to headphones. Also same as before, these events are used to track digital display connection status and fetch ELD. Now in addition to that driver uses that information to automatically switch recording source of the mixer to the connected input. When there are devices with no jack detection and with one both connected, last ones will have the precedence. As result, on most laptops after boot internal microphone should be automatically selected. But if external one (for example, headset) connected, it will be selected automatically. When external mic disconnected, internal one will be selected again. Automatic recording source selection is enabled by default now to make recording work out of the box without touching mixer. But it can be disabled or limited only to attach time using hint.pcm.X.rec.autosrc loader tunables or dev.pcm.X.rec.autosrc sysctls. MFC after: 2 months Sponsored by: iXsystems, Inc. --- share/man/man4/snd_hda.4 | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'share/man') diff --git a/share/man/man4/snd_hda.4 b/share/man/man4/snd_hda.4 index 270a9f5..bcdd95a 100644 --- a/share/man/man4/snd_hda.4 +++ b/share/man/man4/snd_hda.4 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 11, 2012 +.Dd January 25, 2012 .Dt SND_HDA 4 .Os .Sh NAME @@ -182,6 +182,18 @@ May be specified as a 32-bit hexadecimal value with a leading or as a set of space-separated .Dq Ar option Ns = Ns Ar value pairs. +.It Va hint.pcm.%d.rec.autosrc +Controls automatic recording source feature: +.Bl -tag -compact +.It 0 +disabled, +.It 1 +once on attach, +.It 2 +enabled. +.El +When enabled, driver will automatically set recording source of the mixer to +connected input using jack presence detection statuses. .El .Pp Pin configuration is the UAA driver's main source of information about codec @@ -357,6 +369,16 @@ Original pin configuration written by BIOS. Setting this to a non-zero value makes driver to destroy existing pcm devices and process new pins configuration set via .Va dev.hdaa.%d.nid%d_config. +.It Va dev.pcm.%d.play.32bit , dev.pcm.%d.rec.32bit +HDA controller uses 32bit representation for all samples of more then 16 bits. +These variables allow to specify how many bits of these 32 should be +used by CODEC. +Depending on codec capabilities, possible values are 20, 24 and 32 bit. +The default value is 24. +.It Va dev.pcm.%d.rec.autosrc +Run-time equivalent of the +.Va hint.pcm.%d.rec.autosrc +tunable. .El .Sh EXAMPLES Taking HP Compaq DX2300 with Realtek ALC888 HDA codec for example. -- cgit v1.1