diff options
Diffstat (limited to 'share/man')
1495 files changed, 25524 insertions, 15235 deletions
diff --git a/share/man/Makefile b/share/man/Makefile index 59a1ab9dbc36..51e560e199a5 100644 --- a/share/man/Makefile +++ b/share/man/Makefile @@ -1,6 +1,3 @@ -# @(#)Makefile 8.2 (Berkeley) 4/16/94 -# $FreeBSD$ - .include <src.opts.mk> # XXX MISSING: man3f @@ -12,8 +9,16 @@ MAKEWHATIS?= makewhatis makedb: .if ${MK_MAN_UTILS} != "no" ${MAKEWHATIS} ${DESTDIR}${BINDIR}/man +.if defined(NO_ROOT) && defined(METALOG) + echo ".${DISTBASE}${BINDIR}/man/mandoc.db type=file mode=0644 uname=root gname=wheel" | \ + cat -l >> ${METALOG} +.endif .if ${MK_OPENSSL} != "no" ${MAKEWHATIS} ${DESTDIR}${BINDIR}/openssl/man +.if defined(NO_ROOT) && defined(METALOG) + echo ".${DISTBASE}${BINDIR}/openssl/man/mandoc.db type=file mode=0644 uname=root gname=wheel" | \ + cat -l >> ${METALOG} +.endif .endif .endif diff --git a/share/man/man1/Makefile b/share/man/man1/Makefile index fb94799dc18b..e5ab6597ead2 100644 --- a/share/man/man1/Makefile +++ b/share/man/man1/Makefile @@ -1,6 +1,3 @@ -# @(#)Makefile 8.1 (Berkeley) 6/5/93 -# $FreeBSD$ - .include <src.opts.mk> MAN= builtin.1 intro.1 diff --git a/share/man/man1/Makefile.depend b/share/man/man1/Makefile.depend index f80275d86ab1..11aba52f82cf 100644 --- a/share/man/man1/Makefile.depend +++ b/share/man/man1/Makefile.depend @@ -1,4 +1,3 @@ -# $FreeBSD$ # Autogenerated - do NOT edit! DIRDEPS = \ diff --git a/share/man/man1/builtin.1 b/share/man/man1/builtin.1 index 1eda275ae2ae..d546548ab4e5 100644 --- a/share/man/man1/builtin.1 +++ b/share/man/man1/builtin.1 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 21, 2010 .Dt BUILTIN 1 .Os diff --git a/share/man/man1/intro.1 b/share/man/man1/intro.1 index 8fa293efe6f6..65e77ac606b7 100644 --- a/share/man/man1/intro.1 +++ b/share/man/man1/intro.1 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -25,10 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)intro.1 8.2 (Berkeley) 12/30/93 -.\" $FreeBSD$ -.\" -.Dd October 21, 2001 +.Dd April 12, 2024 .Dt INTRO 1 .Os .Sh NAME @@ -37,9 +37,9 @@ .Sh DESCRIPTION Section one of the manual contains most of the commands which comprise the -.Bx +.Fx user environment. -Some of the commands included in section one are +Some of the commands included with the system in section one are text editors, command shell interpreters, searching and sorting tools, file manipulation commands, @@ -49,6 +49,16 @@ compilers and compiler tools, formatted output tools, and line printer commands. .Pp +Tens of thousands of additional commands are available to be installed +with +.Xr pkg 8 , +or compiled with the +.Xr ports 7 +collection. +Some of which include web browsers, office suites, calendars, +conferencing utilities, integrated development environments, +media players, audio and video processing suites, etc. +.Pp All commands set a status value upon exit which may be tested to see if the command completed normally. Traditionally, the value 0 signifies successful @@ -56,10 +66,23 @@ completion of the command, while a value >0 indicates an error. Some commands attempt to describe the nature of the failure by using exit codes as defined in .Xr sysexits 3 , -while others simply set the status to an arbitrary value >0 (typically 1). +while others simply set the status to an arbitrary value >0 +.Pq typically 1 . +.Sh FILES +.Bl -tag -width "/usr/local/bin/tab" -compact +.It Pa /bin/ +Commands fundamental to single- and multi-user modes. +.It Pa /usr/bin/ +General commands included with the base system. +.It Pa /usr/local/bin/ +Locally installed commands from +.Xr pkg 8 or +.Xr ports 7 . +.El .Sh SEE ALSO .Xr apropos 1 , .Xr man 1 , +.Xr which 1 , .Xr intro 2 , .Xr intro 3 , .Xr sysexits 3 , @@ -67,14 +90,16 @@ while others simply set the status to an arbitrary value >0 (typically 1). .Xr intro 5 , .Xr intro 6 , .Xr intro 7 , +.Xr ports 7 , .Xr security 7 , .Xr intro 8 , +.Xr pkg 8 , .Xr intro 9 .Pp Tutorials in the .%T "UNIX User's Manual Supplementary Documents" . .Sh HISTORY The -.Nm -manual page appeared in +.Nm Ns Pq 1 +manual page first appeared in .At v6 . diff --git a/share/man/man3/ATOMIC_VAR_INIT.3 b/share/man/man3/ATOMIC_VAR_INIT.3 index e2786027a423..b3dd242342f7 100644 --- a/share/man/man3/ATOMIC_VAR_INIT.3 +++ b/share/man/man3/ATOMIC_VAR_INIT.3 @@ -22,8 +22,6 @@ .\" 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 diff --git a/share/man/man3/CMSG_DATA.3 b/share/man/man3/CMSG_DATA.3 index 92c5b9736da3..27e15613217e 100644 --- a/share/man/man3/CMSG_DATA.3 +++ b/share/man/man3/CMSG_DATA.3 @@ -1,7 +1,5 @@ .\" Written by Jared Yanovich <jaredy@openbsd.org> .\" Public domain, July 3, 2005 -.\" -.\" $FreeBSD$ .Dd March 13, 2020 .Dt CMSG_DATA 3 .Os @@ -165,7 +163,7 @@ main() close(hellofd[1]); if (read(hellofd[0], buf, HELLOLEN) == -1) - err(EX_IOERR, "faild to receive 'hello'"); + err(EX_IOERR, "failed to receive 'hello'"); printf("parent: received '%s'\\n", buf); break; } diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile index fa4f751ce553..6cdd443ec067 100644 --- a/share/man/man3/Makefile +++ b/share/man/man3/Makefile @@ -1,9 +1,7 @@ -# @(#)Makefile 8.2 (Berkeley) 12/13/93 -# $FreeBSD$ - .include <src.opts.mk> -MAN= arb.3 \ +MAN= alloca.3 \ + arb.3 \ assert.3 \ ATOMIC_VAR_INIT.3 \ bitstring.3 \ @@ -27,8 +25,10 @@ MAN= arb.3 \ queue.3 \ sigevent.3 \ siginfo.3 \ + snl.3 \ stats.3 \ stdarg.3 \ + stdckdint.3 \ sysexits.3 \ tgmath.3 \ timeradd.3 \ @@ -215,6 +215,8 @@ MLINKS+= queue.3 LIST_CLASS_ENTRY.3 \ queue.3 LIST_NEXT.3 \ queue.3 LIST_PREV.3 \ queue.3 LIST_REMOVE.3 \ + queue.3 LIST_REPLACE.3 \ + queue.3 LIST_SPLIT_AFTER.3 \ queue.3 LIST_SWAP.3 \ queue.3 SLIST_CLASS_ENTRY.3 \ queue.3 SLIST_CLASS_HEAD.3 \ @@ -235,6 +237,7 @@ MLINKS+= queue.3 LIST_CLASS_ENTRY.3 \ queue.3 SLIST_REMOVE_AFTER.3 \ queue.3 SLIST_REMOVE_HEAD.3 \ queue.3 SLIST_REMOVE_PREVPTR.3 \ + queue.3 SLIST_SPLIT_AFTER.3 \ queue.3 SLIST_SWAP.3 \ queue.3 STAILQ_CLASS_ENTRY.3 \ queue.3 STAILQ_CLASS_HEAD.3 \ @@ -257,6 +260,8 @@ MLINKS+= queue.3 LIST_CLASS_ENTRY.3 \ queue.3 STAILQ_REMOVE.3 \ queue.3 STAILQ_REMOVE_AFTER.3 \ queue.3 STAILQ_REMOVE_HEAD.3 \ + queue.3 STAILQ_REVERSE.3 \ + queue.3 STAILQ_SPLIT_AFTER.3 \ queue.3 STAILQ_SWAP.3 \ queue.3 TAILQ_CLASS_ENTRY.3 \ queue.3 TAILQ_CLASS_HEAD.3 \ @@ -283,6 +288,8 @@ MLINKS+= queue.3 LIST_CLASS_ENTRY.3 \ queue.3 TAILQ_NEXT.3 \ queue.3 TAILQ_PREV.3 \ queue.3 TAILQ_REMOVE.3 \ + queue.3 TAILQ_REPLACE.3 \ + queue.3 TAILQ_SPLIT_AFTER.3 \ queue.3 TAILQ_SWAP.3 MLINKS+= stats.3 stats_tpl_alloc.3 \ stats.3 stats_tpl_fetch_allocid.3 \ @@ -310,6 +317,9 @@ MLINKS+= stdarg.3 va_arg.3 \ stdarg.3 va_end.3 \ stdarg.3 varargs.3 \ stdarg.3 va_start.3 +MLINKS+= stdckdint.3 ckd_add.3 \ + stdckdint.3 ckd_sub.3 \ + stdckdint.3 ckd_mul.3 MLINKS+= timeradd.3 timerclear.3 \ timeradd.3 timercmp.3 \ timeradd.3 timerisset.3 \ @@ -320,6 +330,7 @@ MLINKS+= timeradd.3 timerclear.3 \ timeradd.3 timespecisset.3 \ timeradd.3 timespeccmp.3 MLINKS+= tree.3 RB_AUGMENT.3 \ + tree.3 RB_AUGMENT_CHECK.3 \ tree.3 RB_EMPTY.3 \ tree.3 RB_ENTRY.3 \ tree.3 RB_FIND.3 \ @@ -446,11 +457,12 @@ PTHREAD_MAN= pthread.3 \ pthread_set_name_np.3 \ pthread_setspecific.3 \ pthread_sigmask.3 \ + pthread_sigqueue.3 \ + pthread_signals_block_np.3 \ pthread_spin_init.3 \ pthread_spin_lock.3 \ pthread_suspend_all_np.3 \ pthread_suspend_np.3 \ - pthread_switch_add_np.3 \ pthread_testcancel.3 \ pthread_yield.3 @@ -512,10 +524,11 @@ PTHREAD_MLINKS+=pthread_schedparam.3 pthread_getschedparam.3 \ PTHREAD_MLINKS+=pthread_set_name_np.3 pthread_get_name_np.3 \ pthread_set_name_np.3 pthread_getname_np.3 \ pthread_set_name_np.3 pthread_setname_np.3 +PTHREAD_MLINKS+=pthread_signals_block_np.3 \ + pthread_signals_unblock_np.3 PTHREAD_MLINKS+=pthread_spin_init.3 pthread_spin_destroy.3 \ pthread_spin_lock.3 pthread_spin_trylock.3 \ pthread_spin_lock.3 pthread_spin_unlock.3 -PTHREAD_MLINKS+=pthread_switch_add_np.3 pthread_switch_delete_np.3 PTHREAD_MLINKS+=pthread_testcancel.3 pthread_setcancelstate.3 \ pthread_testcancel.3 pthread_setcanceltype.3 PTHREAD_MLINKS+=pthread_join.3 pthread_peekjoin_np.3 \ diff --git a/share/man/man3/Makefile.depend b/share/man/man3/Makefile.depend index f80275d86ab1..11aba52f82cf 100644 --- a/share/man/man3/Makefile.depend +++ b/share/man/man3/Makefile.depend @@ -1,4 +1,3 @@ -# $FreeBSD$ # Autogenerated - do NOT edit! DIRDEPS = \ diff --git a/share/man/man3/Q_FRAWMASK.3 b/share/man/man3/Q_FRAWMASK.3 index d4def82300be..4d03b2596c80 100644 --- a/share/man/man3/Q_FRAWMASK.3 +++ b/share/man/man3/Q_FRAWMASK.3 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 8, 2018 .Dt Q_FRAWMASK 3 .Os diff --git a/share/man/man3/Q_IFRAWMASK.3 b/share/man/man3/Q_IFRAWMASK.3 index 522b2b480ea3..b6885084ff43 100644 --- a/share/man/man3/Q_IFRAWMASK.3 +++ b/share/man/man3/Q_IFRAWMASK.3 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 8, 2018 .Dt Q_IFRAWMASK 3 .Os diff --git a/share/man/man3/Q_INI.3 b/share/man/man3/Q_INI.3 index 867d5e20031c..b7794d729f48 100644 --- a/share/man/man3/Q_INI.3 +++ b/share/man/man3/Q_INI.3 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 8, 2018 .Dt Q_INI 3 .Os diff --git a/share/man/man3/Q_IRAWMASK.3 b/share/man/man3/Q_IRAWMASK.3 index 16a47e06a733..a15b885c946e 100644 --- a/share/man/man3/Q_IRAWMASK.3 +++ b/share/man/man3/Q_IRAWMASK.3 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 8, 2018 .Dt Q_IRAWMASK 3 .Os diff --git a/share/man/man3/Q_QABS.3 b/share/man/man3/Q_QABS.3 index 8d5c2883d4a5..31219e1f9218 100644 --- a/share/man/man3/Q_QABS.3 +++ b/share/man/man3/Q_QABS.3 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 8, 2018 .Dt Q_QABS 3 .Os diff --git a/share/man/man3/Q_QADDI.3 b/share/man/man3/Q_QADDI.3 index 2e03b2e7a424..5b1bc8c26023 100644 --- a/share/man/man3/Q_QADDI.3 +++ b/share/man/man3/Q_QADDI.3 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 8, 2018 .Dt Q_QADDI 3 .Os diff --git a/share/man/man3/Q_QADDQ.3 b/share/man/man3/Q_QADDQ.3 index 26db644f34e3..d6a7df7f5e98 100644 --- a/share/man/man3/Q_QADDQ.3 +++ b/share/man/man3/Q_QADDQ.3 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 8, 2018 .Dt Q_QADDQ 3 .Os diff --git a/share/man/man3/Q_SIGNED.3 b/share/man/man3/Q_SIGNED.3 index e8f79c55cbc3..528757dccbd5 100644 --- a/share/man/man3/Q_SIGNED.3 +++ b/share/man/man3/Q_SIGNED.3 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 8, 2018 .Dt Q_SIGNED 3 .Os diff --git a/share/man/man3/Q_SIGNSHFT.3 b/share/man/man3/Q_SIGNSHFT.3 index a12a182fe7d1..ce355560a656 100644 --- a/share/man/man3/Q_SIGNSHFT.3 +++ b/share/man/man3/Q_SIGNSHFT.3 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 8, 2018 .Dt Q_SIGNSHFT 3 .Os diff --git a/share/man/man3/alloca.3 b/share/man/man3/alloca.3 new file mode 100644 index 000000000000..fd88014dbb33 --- /dev/null +++ b/share/man/man3/alloca.3 @@ -0,0 +1,83 @@ +.\" Copyright (c) 1980, 1991, 1993 +.\" The Regents of the University of California. 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. +.\" 3. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. +.\" +.Dd April 29, 2025 +.Dt ALLOCA 3 +.Os +.Sh NAME +.Nm alloca +.Nd memory allocator +.Sh SYNOPSIS +.In stdlib.h +.Ft void * +.Fn alloca "size_t size" +.Sh DESCRIPTION +The +.Fn alloca +function +allocates +.Fa size +bytes of space in the stack frame of the caller. +This temporary space is automatically freed on +return. +.Sh RETURN VALUES +The +.Fn alloca +function returns a pointer to the beginning of the allocated space. +.Sh SEE ALSO +.Xr brk 2 , +.Xr calloc 3 , +.Xr getpagesize 3 , +.Xr malloc 3 , +.Xr realloc 3 +.Sh HISTORY +The +.Fn alloca +function appeared in +.At 32v . +.\" .Bx ?? . +.\" The function appeared in 32v, pwb and pwb.2 and in 3bsd 4bsd +.\" The first man page (or link to a man page that I can find at the +.\" moment is 4.3... +.Sh BUGS +The +.Fn alloca +function +is machine and compiler dependent; +its use is discouraged. +.Pp +The +.Fn alloca +function is slightly unsafe because it cannot ensure that the pointer +returned points to a valid and usable block of memory. +The allocation made may exceed the bounds of the stack, or even go +further into other objects in memory, and +.Fn alloca +cannot determine such an error. +Avoid +.Fn alloca +with large unbounded allocations. diff --git a/share/man/man3/arb.3 b/share/man/man3/arb.3 index 14ea77c2b35a..e33ef3a37f7d 100644 --- a/share/man/man3/arb.3 +++ b/share/man/man3/arb.3 @@ -29,8 +29,6 @@ .\" (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 October 14, 2019 .Dt ARB 3 .Os @@ -266,7 +264,7 @@ variant includes a suffix denoting the signed integer data type size used to store array indices. For example, .Fn ARB_HEAD8 -creates a red-black tree head strucutre with 8-bit signed array indices capable +creates a red-black tree head structure with 8-bit signed array indices capable of indexing up to 128 entries. .Pp The diff --git a/share/man/man3/assert.3 b/share/man/man3/assert.3 index cc23f96360f0..f219aa1d6743 100644 --- a/share/man/man3/assert.3 +++ b/share/man/man3/assert.3 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)assert.3 8.1 (Berkeley) 6/9/93 -.\" $FreeBSD$ -.\" .Dd April 20, 2021 .Dt ASSERT 3 .Os @@ -123,19 +120,15 @@ If none is provided, it only points at the constraint. .Xr abort2 2 , .Xr abort 3 .Sh STANDARDS -.Rs The .Fn assert macro conforms to .St -isoC-99 . -.Re .Pp -.Rs The .Fn static_assert macro conforms to .St -isoC-2011 . -.Re .Sh HISTORY An .Nm diff --git a/share/man/man3/bitstring.3 b/share/man/man3/bitstring.3 index c6f0dfe45c12..07558bd41ec3 100644 --- a/share/man/man3/bitstring.3 +++ b/share/man/man3/bitstring.3 @@ -55,10 +55,7 @@ .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGES. .\" -.\" @(#)bitstring.3 8.1 (Berkeley) 7/19/93 -.\" $FreeBSD$ -.\" -.Dd August 8, 2021 +.Dd November 21, 2023 .Dt BITSTRING 3 .Os .Sh NAME @@ -86,49 +83,49 @@ .Sh SYNOPSIS .In bitstring.h .Ft bitstr_t * -.Fn bit_alloc "int nbits" +.Fn bit_alloc "size_t nbits" .Ft void -.Fn bit_decl "bitstr_t *name" "int nbits" +.Fn bit_decl "bitstr_t *name" "size_t nbits" .Ft void -.Fn bit_clear "bitstr_t *name" "int bit" +.Fn bit_clear "bitstr_t *name" "size_t bit" .Ft void -.Fn bit_count "bitstr_t *name" "int count" "int nbits" "int *value" +.Fn bit_count "bitstr_t *name" "size_t count" "size_t nbits" "ssize_t *value" .Ft void -.Fn bit_ffc "bitstr_t *name" "int nbits" "int *value" +.Fn bit_ffc "bitstr_t *name" "size_t nbits" "ssize_t *value" .Ft void -.Fn bit_ffs "bitstr_t *name" "int nbits" "int *value" +.Fn bit_ffs "bitstr_t *name" "size_t nbits" "ssize_t *value" .Ft void -.Fn bit_ffc_at "bitstr_t *name" "int start" "int nbits" "int *value" +.Fn bit_ffc_at "bitstr_t *name" "size_t start" "size_t nbits" "ssize_t *value" .Ft void -.Fn bit_ffs_at "bitstr_t *name" "int start" "int nbits" "int *value" +.Fn bit_ffs_at "bitstr_t *name" "size_t start" "size_t nbits" "ssize_t *value" .Ft void -.Fn bit_ff_at "bitstr_t *name" "int start" "int nbits" "int match" "int *value" +.Fn bit_ff_at "bitstr_t *name" "size_t start" "size_t nbits" "int match" "ssize_t *value" .Ft void -.Fn bit_ffc_area "bitstr_t *name" "int nbits" "int size" "int *value" +.Fn bit_ffc_area "bitstr_t *name" "size_t nbits" "size_t size" "ssize_t *value" .Ft void -.Fn bit_ffs_area "bitstr_t *name" "int nbits" "int size" "int *value" +.Fn bit_ffs_area "bitstr_t *name" "size_t nbits" "size_t size" "ssize_t *value" .Ft void -.Fn bit_ffc_area_at "bitstr_t *name" "int start" "int nbits" "int size" "int *value" +.Fn bit_ffc_area_at "bitstr_t *name" "size_t start" "size_t nbits" "size_t size" "ssize_t *value" .Ft void -.Fn bit_ffs_area_at "bitstr_t *name" "int start" "int nbits" "int size" "int *value" +.Fn bit_ffs_area_at "bitstr_t *name" "size_t start" "size_t nbits" "size_t size" "ssize_t *value" .Ft void -.Fn bit_ff_area_at "bitstr_t *name" "int start" "int nbits" "int size" "int match" "int *value" -.Fn bit_foreach "bitstr_t *name" "int nbits" "int var" -.Fn bit_foreach_at "bitstr_t *name" "int start" "int nbits" "int var" -.Fn bit_foreach_unset "bitstr_t *name" "int nbits" "int var" -.Fn bit_foreach_unset_at "bitstr_t *name" "int start" "int nbits" "int var" +.Fn bit_ff_area_at "bitstr_t *name" "size_t start" "size_t nbits" "size_t size" "int match" "ssize_t *value" +.Fn bit_foreach "bitstr_t *name" "size_t nbits" "size_t var" +.Fn bit_foreach_at "bitstr_t *name" "size_t start" "size_t nbits" "size_t var" +.Fn bit_foreach_unset "bitstr_t *name" "size_t nbits" "size_t var" +.Fn bit_foreach_unset_at "bitstr_t *name" "size_t start" "size_t nbits" "size_t var" .Ft void -.Fn bit_nclear "bitstr_t *name" "int start" "int stop" +.Fn bit_nclear "bitstr_t *name" "size_t start" "size_t stop" .Ft void -.Fn bit_nset "bitstr_t *name" "int start" "int stop" +.Fn bit_nset "bitstr_t *name" "size_t start" "size_t stop" .Ft int -.Fn bit_ntest "bitstr_t *name" "int start" "int stop" "int match" +.Fn bit_ntest "bitstr_t *name" "size_t start" "size_t stop" "int match" .Ft void -.Fn bit_set "bitstr_t *name" "int bit" +.Fn bit_set "bitstr_t *name" "size_t bit" .Ft int -.Fn bitstr_size "int nbits" +.Fn bitstr_size "size_t nbits" .Ft int -.Fn bit_test "bitstr_t *name" "int bit" +.Fn bit_test "bitstr_t *name" "size_t bit" .Sh DESCRIPTION These macros operate on strings of bits. .Pp @@ -372,7 +369,7 @@ bits in the array of bits referenced by .Fa name , at or after the zero-based bit index -.Fa start +.Fa start in which all bits have the value .Fa match . If no sequence of contiguous such bits of the specified diff --git a/share/man/man3/end.3 b/share/man/man3/end.3 index 66ad47b5a528..538003424724 100644 --- a/share/man/man3/end.3 +++ b/share/man/man3/end.3 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)end.3 6.4 (Berkeley) 1/24/94 -.\" $FreeBSD$ -.\" .Dd August 28, 2000 .Dt END 3 .Os diff --git a/share/man/man3/fpgetround.3 b/share/man/man3/fpgetround.3 index c6f013072143..c827122e462f 100644 --- a/share/man/man3/fpgetround.3 +++ b/share/man/man3/fpgetround.3 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)fpgetround.3 1.0 (Berkeley) 9/23/93 -.\" $FreeBSD$ -.\" .Dd December 3, 2010 .Dt FPGETROUND 3 .Os diff --git a/share/man/man3/intro.3 b/share/man/man3/intro.3 index d6dff3ab3782..0cecdcab4069 100644 --- a/share/man/man3/intro.3 +++ b/share/man/man3/intro.3 @@ -24,11 +24,7 @@ .\" 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. -.\" -.\" @(#)intro.3 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" -.Dd December 18, 2021 +.Dd November 27, 2024 .Dt INTRO 3 .Os .Sh NAME @@ -231,6 +227,13 @@ See The POSIX threads library. See .Xr pthread 3 . +.It Em libstdthreads +.Pq Fl l Ns Ar stdthreads +The ISO C11 standard +.In threads.h +library. +See +.Xr thrd_create 3 . .It Em libsysdecode .Pq Fl l Ns Ar sysdecode The system argument decoding library. @@ -265,20 +268,108 @@ See .Bl -tag -width /usr/lib/libm_p.a -compact .It Pa /usr/lib/libc.a the C library -.It Pa /usr/lib/libc_p.a -the C library compiled for profiling .It Pa /usr/lib/libm.a the math library -.It Pa /usr/lib/libm_p.a -the math library compiled for profiling .El +.Sh LIBRARY TYPES +The system libraries are located in +.Pa /lib +and +.Pa /usr/lib . +A library has the following naming convention: +.Bd -unfilled -offset indent +libc.so.7 +.Ed +.Pp +Libraries with an +.Sq .a +suffix are static. +When a program is linked against a static library, all necessary library code +will be included in the binary. +This means the binary can be run even when the libraries are unavailable. +However, it can be inefficient with both disk space and memory usage +during execution. +The C compiler, +.Xr cc 1 , +can be instructed to link statically by specifying the +.Fl static +flag. +.Pp +Libraries with a +.Sq .so.X +suffix are dynamic libraries. +When code is linked dynamically, the library code that the application needs +is not included in the binary. +Instead, data structures are added containing information about which dynamic +libraries to link with. +When the binary is executed, the run-time linker +.Xr ld.so 1 +reads these data structures and loads them into the +process virtual address space. +.Xr rtld 1 +loads the shared libraries when the program is executed. +.Pp +.Sq X +represents the library version number of the library. +In the example above, a binary linked with +.Pa libc.so.8 +would not be usable on a system where only +.Pa libc.so.7 +is available. +.Pp +The advantages of dynamic libraries are that multiple instances of the same +library can share address space, and the physical size of the binary is +smaller. +A namespace per shared library is available via hidden visibility, +allowing multiple compilation units in a library to share things without +making them available to other libraries. +It is possible to load libraries dynamically via +.Xr dlopen 3 . +The disadvantage is the added complexity that comes with loading the +libraries dynamically, and the extra time taken to load the libraries. +Of course, if the libraries are not available, the binary will be unable +to execute. +Calls across shared libraries are also slightly slower and cannot be +inlined, not even with link time optimization. +The C compiler, +.Xr cc 1 , +can be instructed to link dynamically by specifying the +.Fl shared +flag. +.Pp +Shared libraries, as well as static libraries on architectures which produce +position-independent executables +.Pq PIEs +by default, contain position-independent code +.Pq PIC . +Normally, compilers produce relocatable code. +Relocatable code needs to be modified at run-time, depending on where in +memory it is to be run. +The C compiler, +.Xr cc 1 , +can be instructed to generate PIC code by specifying the +.Fl fPIC +flag. +.Pp +Static libraries are generated using the +.Xr ar 1 +utility. +The libraries contain an index to the contents of the library, +stored within the library itself. +The index lists each symbol defined by a member of a library that is a +relocatable object file. +This speeds up linking to the library, and allows routines in the library +to call each other regardless of their placement within the library. .Sh SEE ALSO +.Xr ar 1 , .Xr cc 1 , .Xr ld 1 , .Xr nm 1 , .Xr intro 2 , .Xr math 3 , -.Xr stdio 3 +.Xr stdio 3 , +.Xr make.conf 5 , +.Xr src.conf 5 .Sh HISTORY An .Nm diff --git a/share/man/man3/makedev.3 b/share/man/man3/makedev.3 index 8ce9c554a094..3c0e176a0621 100644 --- a/share/man/man3/makedev.3 +++ b/share/man/man3/makedev.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 3, 2017 .Dt MAKEDEV 3 .Os @@ -99,4 +97,4 @@ macros return numbers whose value can span the complete range of an .Sh SEE ALSO .Xr mknod 2 , .Xr devname 3 , -.Xr devfs 5 +.Xr devfs 4 diff --git a/share/man/man3/offsetof.3 b/share/man/man3/offsetof.3 index ee5958f7b932..f757d58ac53d 100644 --- a/share/man/man3/offsetof.3 +++ b/share/man/man3/offsetof.3 @@ -14,8 +14,6 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" .Dd February 18, 2010 .Dt OFFSETOF 3 .Os diff --git a/share/man/man3/pthread.3 b/share/man/man3/pthread.3 index 6b7b82eb27f5..1cb13981e18c 100644 --- a/share/man/man3/pthread.3 +++ b/share/man/man3/pthread.3 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 12, 2021 .Dt PTHREAD 3 .Os diff --git a/share/man/man3/pthread_affinity_np.3 b/share/man/man3/pthread_affinity_np.3 index 0a52add2ee3c..86c43d2255b9 100644 --- a/share/man/man3/pthread_affinity_np.3 +++ b/share/man/man3/pthread_affinity_np.3 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd October 12, 2021 +.Dd January 29, 2023 .Dt PTHREAD_AFFINITY_NP 3 .Os .Sh NAME @@ -50,14 +48,19 @@ Masks of type are composed using the .Dv CPU_SET macros. -The kernel tolerates large sets as long as all CPUs specified -in the set exist. -Sets smaller than the kernel uses generate an error on calls to +If the user-supplied mask is not large enough to fit all of the matching CPUs, .Fn pthread_getaffinity_np -even if the result set would fit within the user supplied set. +fails with +.Er ERANGE . Calls to .Fn pthread_setaffinity_np -tolerate small sets with no restrictions. +tolerate masks of any size with no restrictions. +The kernel uses the meaningful part of the mask, where the upper bound is +the maximum CPU id present in the system. +If bits for non-existing CPUs are set, calls to +.Fn pthread_setaffinity_np +fail with +.Er EINVAL . .Pp The supplied mask should have a size of .Fa cpusetsize @@ -96,6 +99,12 @@ and .Fn pthread_setaffinity_np functions may fail if: .Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa cpusetp +argument specified when calling +.Fn pthread_setaffinity_np +was not a valid value. .It Bq Er EDEADLK The .Fn pthread_setaffinity_np @@ -112,7 +121,7 @@ argument could not be found. .It Bq Er ERANGE The .Fa cpusetsize -was either preposterously large or smaller than the kernel set size. +was smaller than needed to fit all of the matching CPUs. .It Bq Er EPERM The calling thread did not have the credentials required to complete the operation. diff --git a/share/man/man3/pthread_atfork.3 b/share/man/man3/pthread_atfork.3 index 2e783caccd54..5edec13e9cf5 100644 --- a/share/man/man3/pthread_atfork.3 +++ b/share/man/man3/pthread_atfork.3 @@ -32,8 +32,6 @@ .\" the referee document. The original Standard can be obtained online at .\" http://www.opengroup.org/unix/online.html. .\" -.\" $FreeBSD$ -.\" .Dd June 21, 2004 .Dt PTHREAD_ATFORK 3 .Os diff --git a/share/man/man3/pthread_attr.3 b/share/man/man3/pthread_attr.3 index 6ce889386d5c..828195c260a5 100644 --- a/share/man/man3/pthread_attr.3 +++ b/share/man/man3/pthread_attr.3 @@ -24,8 +24,6 @@ .\" 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 August 17, 2018 .Dt PTHREAD_ATTR 3 .Os diff --git a/share/man/man3/pthread_attr_affinity_np.3 b/share/man/man3/pthread_attr_affinity_np.3 index 2c85aee9ac19..0589213c6171 100644 --- a/share/man/man3/pthread_attr_affinity_np.3 +++ b/share/man/man3/pthread_attr_affinity_np.3 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 27, 2022 +.Dd January 29, 2023 .Dt PTHREAD_ATTR_AFFINITY_NP 3 .Os .Sh NAME @@ -52,17 +50,18 @@ are composed using the .Dv CPU_SET macros. If the user-supplied mask is not large enough to fit all of the matching CPUs, -.Fn cpuset_getaffinity +.Fn pthread_attr_getaffinity_np fails with .Er ERANGE . Calls to -.Fn cpuset_setaffinity +.Fn pthread_attr_setaffinity_np tolerate masks of any size with no restrictions. -The kernel uses the meaningful part of the mask, where the upper bound is +.Fn pthread_attr_setaffinity_np +uses the meaningful part of the mask, where the upper bound is the maximum CPU id present in the system. If bits for non-existing CPUs are set, calls to -.Fn cpuset_setaffinity -fails with +.Fn pthread_attr_setaffinity_np +fail with .Er EINVAL . .Pp The supplied mask should have a size of diff --git a/share/man/man3/pthread_attr_get_np.3 b/share/man/man3/pthread_attr_get_np.3 index 336c3626a27c..07153586c1b2 100644 --- a/share/man/man3/pthread_attr_get_np.3 +++ b/share/man/man3/pthread_attr_get_np.3 @@ -1,5 +1,10 @@ .\" Copyright (c) 2002,2003 Alexey Zelkin <phantom@FreeBSD.org> .\" All rights reserved. +.\" Copyright (c) 2024 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Olivier Certner +.\" <olce@FreeBSD.org> at Kumacom SARL under sponsorship from the +.\" FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -22,14 +27,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd October 12, 2021 +.Dd January 5, 2024 .Dt PTHREAD_ATTR_GET_NP 3 .Os .Sh NAME .Nm pthread_attr_get_np -.Nd get attributes of existent thread +.Nd get attributes of an existing thread .Sh LIBRARY .Lb libpthread .Sh SYNOPSIS @@ -39,51 +42,54 @@ .Sh DESCRIPTION The .Fn pthread_attr_get_np -function is used to get existent thread's attributes. -Most fields of -.Vt pthread_attr_t -structure are exact values of attributes provided at thread creation -time (as parameter to -.Xr pthread_create 3 -function), except for the stack address. -.Pp -Value returned as -.Fa dst -is supposed to be used in conjunction with -.Fn pthread_attr_get* -functions to retrieve individual values from +function is used to retrieve the attributes of the specified thread into an +existing .Vt pthread_attr_t structure. -Parameter -.Fa dst -should point to allocated memory area big enough to fit this structure. +The attributes' values are the current ones for the target thread, except for +the stack top address if not properly aligned for the architecture, since in +this case its value has been adjusted internally before use. .Pp -It is HIGHLY RECOMMENDED to use +Argument +.Fa dst +must be a pointer to a valid attributes object +.Po +it was initialized at some point by .Xr pthread_attr_init 3 -function to allocate attribute storage. -.Sh IMPLEMENTATION NOTES -The -.Fn pthread_attr_get_np -function will always return a pointer to the thread's real stack address, -regardless of its value in the original attributes structure. +and was not destroyed since then +.Pc . +After a successful call to +.Fn pthread_attr_get_np , +the individual attributes' values can be retrieved as usual via the +corresponding accessor functions as documented in +.Xr pthread_attr 3 . +After a failed call to +.Fn pthread_attr_get_np , +the object pointed to by +.Fa dst +is left unmodified, and can continue to be used as if the failed call never +happened. .Sh RETURN VALUES If successful, .Fn pthread_attr_get_np function returns 0. Otherwise, an error number is returned to indicate the error. .Sh EXAMPLES +This function retrieves the stack size of the thread specified by the +.Fa pid +argument: .Bd -literal size_t -my_thread_stack_size(pthread_t pid) +my_thread_stack_size(pthread_t tid) { - pthread_attr_t attr; - size_t size; + pthread_attr_t attr; + size_t size; - pthread_attr_init(&attr); - pthread_attr_get_np(pid, &attr); - pthread_attr_getstacksize(&attr, &size); - pthread_attr_destroy(&attr); - return(size); + pthread_attr_init(&attr); + pthread_attr_get_np(tid, &attr); + pthread_attr_getstacksize(&attr, &size); + pthread_attr_destroy(&attr); + return (size); } .Ed .Sh ERRORS @@ -92,12 +98,16 @@ The function will fail if: .Bl -tag -width Er .It Bq Er EINVAL -Invalid value for one of given parameters. +One of the arguments has an invalid value. .It Bq Er ESRCH No thread could be found corresponding to that specified by the given thread ID. +.It Bq Er ENOMEM +There was not enough memory to allocate additional storage needed by the attributes +object's implementation. .El .Sh SEE ALSO +.Xr pthread_attr 3 , .Xr pthread_attr_destroy 3 , .Xr pthread_attr_getdetachstate 3 , .Xr pthread_attr_getinheritsched 3 , @@ -113,4 +123,6 @@ thread ID. The .Fn pthread_attr_get_np function and this manual page were written by -.An Alexey Zelkin Aq Mt phantom@FreeBSD.org . +.An Alexey Zelkin Aq Mt phantom@FreeBSD.org , +and the latter was revised by +.An Olivier Certner Aq Mt olce@FreeBSD.org . diff --git a/share/man/man3/pthread_attr_setcreatesuspend_np.3 b/share/man/man3/pthread_attr_setcreatesuspend_np.3 index d2c6a6f74694..3d2f84a4ad46 100644 --- a/share/man/man3/pthread_attr_setcreatesuspend_np.3 +++ b/share/man/man3/pthread_attr_setcreatesuspend_np.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 12, 2021 .Dt PTHREAD_ATTR_SETCREATESUSPEND_NP 3 .Os diff --git a/share/man/man3/pthread_barrier_destroy.3 b/share/man/man3/pthread_barrier_destroy.3 index fbbf88c00e9b..06c8b97e81ed 100644 --- a/share/man/man3/pthread_barrier_destroy.3 +++ b/share/man/man3/pthread_barrier_destroy.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 17, 2018 .Dt PTHREAD_BARRIER 3 .Os diff --git a/share/man/man3/pthread_barrierattr.3 b/share/man/man3/pthread_barrierattr.3 index 3836186ef4fd..1f5243f99873 100644 --- a/share/man/man3/pthread_barrierattr.3 +++ b/share/man/man3/pthread_barrierattr.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 17, 2018 .Dt PTHREAD_BARRIERATTR 3 .Os diff --git a/share/man/man3/pthread_cancel.3 b/share/man/man3/pthread_cancel.3 index e737f5e36429..33a00300cd65 100644 --- a/share/man/man3/pthread_cancel.3 +++ b/share/man/man3/pthread_cancel.3 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .Dd January 17, 1999 .Dt PTHREAD_CANCEL 3 .Os diff --git a/share/man/man3/pthread_cleanup_pop.3 b/share/man/man3/pthread_cleanup_pop.3 index 2b7756a24903..2747624b0947 100644 --- a/share/man/man3/pthread_cleanup_pop.3 +++ b/share/man/man3/pthread_cleanup_pop.3 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 25, 2014 .Dt PTHREAD_CLEANUP_POP 3 .Os diff --git a/share/man/man3/pthread_cleanup_push.3 b/share/man/man3/pthread_cleanup_push.3 index 47f35db98d8a..327c2fc3ce59 100644 --- a/share/man/man3/pthread_cleanup_push.3 +++ b/share/man/man3/pthread_cleanup_push.3 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 25, 2014 .Dt PTHREAD_CLEANUP_PUSH 3 .Os diff --git a/share/man/man3/pthread_cond_broadcast.3 b/share/man/man3/pthread_cond_broadcast.3 index bbd274103ac3..77c1a2c2b216 100644 --- a/share/man/man3/pthread_cond_broadcast.3 +++ b/share/man/man3/pthread_cond_broadcast.3 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 28, 1998 .Dt PTHREAD_COND_BROADCAST 3 .Os diff --git a/share/man/man3/pthread_cond_destroy.3 b/share/man/man3/pthread_cond_destroy.3 index 4ea7a87d8a26..ec07b030c1dd 100644 --- a/share/man/man3/pthread_cond_destroy.3 +++ b/share/man/man3/pthread_cond_destroy.3 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 28, 1998 .Dt PTHREAD_COND_DESTROY 3 .Os diff --git a/share/man/man3/pthread_cond_init.3 b/share/man/man3/pthread_cond_init.3 index 8f13a34fd759..8d3dd79db42d 100644 --- a/share/man/man3/pthread_cond_init.3 +++ b/share/man/man3/pthread_cond_init.3 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 17, 2018 .Dt PTHREAD_COND_INIT 3 .Os diff --git a/share/man/man3/pthread_cond_signal.3 b/share/man/man3/pthread_cond_signal.3 index 8ab801f91997..5eb656500ddb 100644 --- a/share/man/man3/pthread_cond_signal.3 +++ b/share/man/man3/pthread_cond_signal.3 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 28, 1998 .Dt PTHREAD_COND_SIGNAL 3 .Os diff --git a/share/man/man3/pthread_cond_timedwait.3 b/share/man/man3/pthread_cond_timedwait.3 index 071f690be195..d955bf8546cd 100644 --- a/share/man/man3/pthread_cond_timedwait.3 +++ b/share/man/man3/pthread_cond_timedwait.3 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 9, 2010 .Dt PTHREAD_COND_TIMEDWAIT 3 .Os diff --git a/share/man/man3/pthread_cond_wait.3 b/share/man/man3/pthread_cond_wait.3 index 9fcbc2267fd9..c09e7aa68738 100644 --- a/share/man/man3/pthread_cond_wait.3 +++ b/share/man/man3/pthread_cond_wait.3 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 7, 2019 .Dt PTHREAD_COND_WAIT 3 .Os diff --git a/share/man/man3/pthread_condattr.3 b/share/man/man3/pthread_condattr.3 index b2f14c5452d0..33ad904f9a3d 100644 --- a/share/man/man3/pthread_condattr.3 +++ b/share/man/man3/pthread_condattr.3 @@ -24,9 +24,7 @@ .\" 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 May 31, 2016 +.Dd October 27, 2023 .Dt PTHREAD_CONDATTR 3 .Os .Sh NAME @@ -54,7 +52,7 @@ .Ft int .Fo pthread_condattr_getpshared .Fa "pthread_condattr_t * restrict attr" "int * restrict pshared" -.Fc +.Fc .Ft int .Fn pthread_condattr_setpshared "pthread_condattr_t *attr" "int pshared" .Sh DESCRIPTION @@ -87,7 +85,8 @@ in .Xr pthread_cond_timedwait 3 and may be set to .Dv CLOCK_REALTIME -(default) +(default), +.Dv CLOCK_TAI , or .Dv CLOCK_MONOTONIC . .Pp @@ -114,6 +113,10 @@ threads in the same process as the one that created the object. The condition variable it is attached to may be accessed by threads in processes other than the one that created the object. .El +See +.Xr libthr 3 +for details of the implementation of shared condition variables, +and their limitations. .Sh RETURN VALUES If successful, these functions return 0. Otherwise, an error number is returned to indicate the error. @@ -155,6 +158,7 @@ The value specified in is not one of the allowed values. .El .Sh SEE ALSO +.Xr libthr 3 , .Xr pthread_cond_init 3 , .Xr pthread_cond_timedwait 3 .Sh STANDARDS diff --git a/share/man/man3/pthread_create.3 b/share/man/man3/pthread_create.3 index 3cb7760e26bc..2d43ac7b2ef9 100644 --- a/share/man/man3/pthread_create.3 +++ b/share/man/man3/pthread_create.3 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 17, 2018 .Dt PTHREAD_CREATE 3 .Os diff --git a/share/man/man3/pthread_detach.3 b/share/man/man3/pthread_detach.3 index dba4aec433c1..93bead1c86cb 100644 --- a/share/man/man3/pthread_detach.3 +++ b/share/man/man3/pthread_detach.3 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 4, 1996 .Dt PTHREAD_DETACH 3 .Os diff --git a/share/man/man3/pthread_equal.3 b/share/man/man3/pthread_equal.3 index 1ed85319b961..6ef861bc016e 100644 --- a/share/man/man3/pthread_equal.3 +++ b/share/man/man3/pthread_equal.3 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 4, 1996 .Dt PTHREAD_EQUAL 3 .Os diff --git a/share/man/man3/pthread_exit.3 b/share/man/man3/pthread_exit.3 index f50947112c17..5c8f6ac44f51 100644 --- a/share/man/man3/pthread_exit.3 +++ b/share/man/man3/pthread_exit.3 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 15, 2014 .Dt PTHREAD_EXIT 3 .Os diff --git a/share/man/man3/pthread_getconcurrency.3 b/share/man/man3/pthread_getconcurrency.3 index c4b23c96dbc5..c94e7b9ed17b 100644 --- a/share/man/man3/pthread_getconcurrency.3 +++ b/share/man/man3/pthread_getconcurrency.3 @@ -21,8 +21,6 @@ .\" 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 April 11, 2003 .Dt PTHREAD_GETCONCURRENCY 3 .Os diff --git a/share/man/man3/pthread_getcpuclockid.3 b/share/man/man3/pthread_getcpuclockid.3 index c36be81e58dc..b372d2dfeab7 100644 --- a/share/man/man3/pthread_getcpuclockid.3 +++ b/share/man/man3/pthread_getcpuclockid.3 @@ -32,8 +32,6 @@ .\" the referee document. The original Standard can be obtained online at .\" http://www.opengroup.org/unix/online.html. .\" -.\" $FreeBSD$ -.\" .Dd August 21, 2012 .Dt PTHREAD_GETCPUCLOCKID 3 .Os diff --git a/share/man/man3/pthread_getspecific.3 b/share/man/man3/pthread_getspecific.3 index 3657e13515f4..c9a46729a918 100644 --- a/share/man/man3/pthread_getspecific.3 +++ b/share/man/man3/pthread_getspecific.3 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 4, 1996 .Dt PTHREAD_GETSPECIFIC 3 .Os diff --git a/share/man/man3/pthread_getthreadid_np.3 b/share/man/man3/pthread_getthreadid_np.3 index 562f6a7ae91a..da7ae5455e6f 100644 --- a/share/man/man3/pthread_getthreadid_np.3 +++ b/share/man/man3/pthread_getthreadid_np.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 12, 2021 .Dt PTHREAD_GETTHREADID_NP 3 .Os diff --git a/share/man/man3/pthread_join.3 b/share/man/man3/pthread_join.3 index 4cd04eade0aa..716b171e1295 100644 --- a/share/man/man3/pthread_join.3 +++ b/share/man/man3/pthread_join.3 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 12, 2021 .Dt PTHREAD_JOIN 3 .Os diff --git a/share/man/man3/pthread_key_create.3 b/share/man/man3/pthread_key_create.3 index a818e1a52364..0faf0a07cac5 100644 --- a/share/man/man3/pthread_key_create.3 +++ b/share/man/man3/pthread_key_create.3 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 4, 1996 .Dt PTHREAD_KEY_CREATE 3 .Os diff --git a/share/man/man3/pthread_key_delete.3 b/share/man/man3/pthread_key_delete.3 index c7861af50ce2..884b261c54fb 100644 --- a/share/man/man3/pthread_key_delete.3 +++ b/share/man/man3/pthread_key_delete.3 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 4, 1996 .Dt PTHREAD_KEY_DELETE 3 .Os diff --git a/share/man/man3/pthread_kill.3 b/share/man/man3/pthread_kill.3 index 1ef879a2f765..cb2d76c6aa9a 100644 --- a/share/man/man3/pthread_kill.3 +++ b/share/man/man3/pthread_kill.3 @@ -24,8 +24,6 @@ .\" 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 April 27, 2000 .Dt PTHREAD_KILL 3 .Os diff --git a/share/man/man3/pthread_main_np.3 b/share/man/man3/pthread_main_np.3 index c386cb224a9b..58e3b11dfe66 100644 --- a/share/man/man3/pthread_main_np.3 +++ b/share/man/man3/pthread_main_np.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 12, 2021 .Dt PTHREAD_MAIN_NP 3 .Os diff --git a/share/man/man3/pthread_multi_np.3 b/share/man/man3/pthread_multi_np.3 index 065b53c49b1f..62c4fb454fb2 100644 --- a/share/man/man3/pthread_multi_np.3 +++ b/share/man/man3/pthread_multi_np.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 12, 2021 .Dt PTHREAD_MULTI_NP 3 .Os diff --git a/share/man/man3/pthread_mutex_consistent.3 b/share/man/man3/pthread_mutex_consistent.3 index ae614f768099..e22be52ba618 100644 --- a/share/man/man3/pthread_mutex_consistent.3 +++ b/share/man/man3/pthread_mutex_consistent.3 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2016 The FreeBSD Foundation, Inc. +.\" Copyright (c) 2016 The FreeBSD Foundation .\" .\" This documentation was written by .\" Konstantin Belousov <kib@FreeBSD.org> under sponsorship @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 27, 2017 .Dt PTHREAD_MUTEX_CONSISTENT 3 .Os diff --git a/share/man/man3/pthread_mutex_destroy.3 b/share/man/man3/pthread_mutex_destroy.3 index d6c4bcd5e446..3627a6c8af8b 100644 --- a/share/man/man3/pthread_mutex_destroy.3 +++ b/share/man/man3/pthread_mutex_destroy.3 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 29, 1998 .Dt PTHREAD_MUTEX_DESTROY 3 .Os diff --git a/share/man/man3/pthread_mutex_init.3 b/share/man/man3/pthread_mutex_init.3 index 934a323d3a3d..4133cf07713c 100644 --- a/share/man/man3/pthread_mutex_init.3 +++ b/share/man/man3/pthread_mutex_init.3 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 17, 2018 .Dt PTHREAD_MUTEX_INIT 3 .Os diff --git a/share/man/man3/pthread_mutex_lock.3 b/share/man/man3/pthread_mutex_lock.3 index cd55ef8699af..ba54cd45b99c 100644 --- a/share/man/man3/pthread_mutex_lock.3 +++ b/share/man/man3/pthread_mutex_lock.3 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 7, 2019 .Dt PTHREAD_MUTEX_LOCK 3 .Os diff --git a/share/man/man3/pthread_mutex_timedlock.3 b/share/man/man3/pthread_mutex_timedlock.3 index 006357659e14..b6e95edbe46e 100644 --- a/share/man/man3/pthread_mutex_timedlock.3 +++ b/share/man/man3/pthread_mutex_timedlock.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 7, 2019 .Dt PTHREAD_MUTEX_TIMEDLOCK 3 .Os diff --git a/share/man/man3/pthread_mutex_trylock.3 b/share/man/man3/pthread_mutex_trylock.3 index 131b81653580..cd08d760595a 100644 --- a/share/man/man3/pthread_mutex_trylock.3 +++ b/share/man/man3/pthread_mutex_trylock.3 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 7, 2019 .Dt PTHREAD_MUTEX_TRYLOCK 3 .Os diff --git a/share/man/man3/pthread_mutex_unlock.3 b/share/man/man3/pthread_mutex_unlock.3 index 4d3badd8aa0e..eb6866a2c90d 100644 --- a/share/man/man3/pthread_mutex_unlock.3 +++ b/share/man/man3/pthread_mutex_unlock.3 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 29, 2016 .Dt PTHREAD_MUTEX_UNLOCK 3 .Os diff --git a/share/man/man3/pthread_mutexattr.3 b/share/man/man3/pthread_mutexattr.3 index 2a2c5c8d133e..b18d93e2e13e 100644 --- a/share/man/man3/pthread_mutexattr.3 +++ b/share/man/man3/pthread_mutexattr.3 @@ -1,5 +1,5 @@ .\" Copyright (C) 2000 Jason Evans <jasone@FreeBSD.org>. -.\" Copyright (c) 2021 The FreeBSD Foundation, Inc. +.\" Copyright (c) 2021 The FreeBSD Foundation .\" All rights reserved. .\" .\" Part of this documentation was written by @@ -29,9 +29,7 @@ .\" 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 October 1, 2021 +.Dd October 27, 2023 .Dt PTHREAD_MUTEXATTR 3 .Os .Sh NAME @@ -134,6 +132,30 @@ all threads waiting on any mutex owned by this thread. .El .Pp The +.Fn pthread_mutexattr_setpshared +function sets the process-shared attribute of +.Fa attr +to the value specified in +.Fa pshared . +The argument +.Fa pshared +may have one of the following values: +.Bl -tag -width ".Dv PTHREAD_PROCESS_PRIVATE" +.It Dv PTHREAD_PROCESS_PRIVATE +The mutex may only be used by threads in the same process as the one +that created the object. +.It Dv PTHREAD_PROCESS_SHARED +The mutex may be used by +threads in processes other than the one that created the object, +assuming other processes share access to the memory where the mutex +was allocated. +.El +See +.Xr libthr 3 +for details of the implementation of the shared mutexes, +and their limitations. +.Pp +The .Fn pthread_mutexattr_setrobust function specifies robustness attribute of the mutex. Possible values for the @@ -316,6 +338,7 @@ Invalid value for .Fa attr . .El .Sh SEE ALSO +.Xr libthr 3 , .Xr pthread_mutex_init 3 .Sh STANDARDS The diff --git a/share/man/man3/pthread_mutexattr_getkind_np.3 b/share/man/man3/pthread_mutexattr_getkind_np.3 index cc3cc3df20ae..15eb7061b20e 100644 --- a/share/man/man3/pthread_mutexattr_getkind_np.3 +++ b/share/man/man3/pthread_mutexattr_getkind_np.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 12, 2021 .Dt PTHREAD_MUTEXATTR_GETKIND_NP 3 .Os diff --git a/share/man/man3/pthread_np.3 b/share/man/man3/pthread_np.3 index caab8cc13209..c6f0efac7415 100644 --- a/share/man/man3/pthread_np.3 +++ b/share/man/man3/pthread_np.3 @@ -116,6 +116,11 @@ Sets the specified thread's name. .Xc Sets the specified thread's name. .It Xo +.Ft void +.Fn pthread_signals_block_np void +.Xc +Blocks all asynchronous signals, quickly. +.It Xo .Ft int .Fn pthread_single_np void .Xc @@ -132,16 +137,6 @@ Suspend the specified thread. Suspend all active threads. .It Xo .Ft int -.Fn pthread_switch_add_np "pthread_switch_routine_t routine" -.Xc -Install a routine that is called every time a thread context switches. -.It Xo -.Ft int -.Fn pthread_switch_delete_np "pthread_switch_routine_t routine" -.Xc -Remove a routine that is called every time a thread context switches. -.It Xo -.Ft int .Fo pthread_timedjoin_np .Fa "pthread_t thread" "void **value_ptr" "const struct timespec *abstime" .Fc @@ -223,6 +218,7 @@ instead. .Xr pthread_resume_all_np 3 , .Xr pthread_resume_np 3 , .Xr pthread_set_name_np 3 , +.Xr pthread_signals_block_np 3 , .Xr pthread_suspend_all_np 3 , .Xr pthread_suspend_np 3 , .Xr pthread_switch_add_np 3 diff --git a/share/man/man3/pthread_once.3 b/share/man/man3/pthread_once.3 index fe234187730c..1ff0a74bc1c2 100644 --- a/share/man/man3/pthread_once.3 +++ b/share/man/man3/pthread_once.3 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 4, 1996 .Dt PTHREAD_ONCE 3 .Os diff --git a/share/man/man3/pthread_resume_all_np.3 b/share/man/man3/pthread_resume_all_np.3 index 40df03a07af1..411d5a570f4b 100644 --- a/share/man/man3/pthread_resume_all_np.3 +++ b/share/man/man3/pthread_resume_all_np.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 12, 2021 .Dt PTHREAD_RESUME_ALL_NP 3 .Os diff --git a/share/man/man3/pthread_resume_np.3 b/share/man/man3/pthread_resume_np.3 index 16833872c010..546e133657b6 100644 --- a/share/man/man3/pthread_resume_np.3 +++ b/share/man/man3/pthread_resume_np.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 12, 2021 .Dt PTHREAD_RESUME_NP 3 .Os diff --git a/share/man/man3/pthread_rwlock_destroy.3 b/share/man/man3/pthread_rwlock_destroy.3 index 0129222866b2..9c50e71fea81 100644 --- a/share/man/man3/pthread_rwlock_destroy.3 +++ b/share/man/man3/pthread_rwlock_destroy.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 4, 1998 .Dt PTHREAD_RWLOCK_DESTROY 3 .Os diff --git a/share/man/man3/pthread_rwlock_init.3 b/share/man/man3/pthread_rwlock_init.3 index 3b99032889d8..e6474199c564 100644 --- a/share/man/man3/pthread_rwlock_init.3 +++ b/share/man/man3/pthread_rwlock_init.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 17, 2018 .Dt PTHREAD_RWLOCK_INIT 3 .Os diff --git a/share/man/man3/pthread_rwlock_rdlock.3 b/share/man/man3/pthread_rwlock_rdlock.3 index 7a197f210ba0..f8403fc8f279 100644 --- a/share/man/man3/pthread_rwlock_rdlock.3 +++ b/share/man/man3/pthread_rwlock_rdlock.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 4, 1998 .Dt PTHREAD_RWLOCK_RDLOCK 3 .Os diff --git a/share/man/man3/pthread_rwlock_timedrdlock.3 b/share/man/man3/pthread_rwlock_timedrdlock.3 index 2f012f516c1f..2b7365298323 100644 --- a/share/man/man3/pthread_rwlock_timedrdlock.3 +++ b/share/man/man3/pthread_rwlock_timedrdlock.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 17, 2018 .Dt PTHREAD_RWLOCK_TIMEDRDLOCK 3 .Os diff --git a/share/man/man3/pthread_rwlock_timedwrlock.3 b/share/man/man3/pthread_rwlock_timedwrlock.3 index 041c0e54cd46..4543eff46d92 100644 --- a/share/man/man3/pthread_rwlock_timedwrlock.3 +++ b/share/man/man3/pthread_rwlock_timedwrlock.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 17, 2018 .Dt PTHREAD_RWLOCK_TIMEDWRLOCK 3 .Os diff --git a/share/man/man3/pthread_rwlock_unlock.3 b/share/man/man3/pthread_rwlock_unlock.3 index 8ad891ea4545..8e348e927a29 100644 --- a/share/man/man3/pthread_rwlock_unlock.3 +++ b/share/man/man3/pthread_rwlock_unlock.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 4, 1998 .Dt PTHREAD_RWLOCK_UNLOCK 3 .Os diff --git a/share/man/man3/pthread_rwlock_wrlock.3 b/share/man/man3/pthread_rwlock_wrlock.3 index 602b54fd029f..58416b27de64 100644 --- a/share/man/man3/pthread_rwlock_wrlock.3 +++ b/share/man/man3/pthread_rwlock_wrlock.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 4, 1998 .Dt PTHREAD_RWLOCK_WRLOCK 3 .Os diff --git a/share/man/man3/pthread_rwlockattr_destroy.3 b/share/man/man3/pthread_rwlockattr_destroy.3 index bff808fdbbd9..eabfbad7e0f2 100644 --- a/share/man/man3/pthread_rwlockattr_destroy.3 +++ b/share/man/man3/pthread_rwlockattr_destroy.3 @@ -22,14 +22,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 4, 1998 .Dt PTHREAD_RWLOCKATTR_DESTROY 3 .Os .Sh NAME .Nm pthread_rwlockattr_destroy -.Nd destroy a read/write lock +.Nd destroy a read/write lock attributes object .Sh LIBRARY .Lb libpthread .Sh SYNOPSIS @@ -39,7 +37,7 @@ .Sh DESCRIPTION The .Fn pthread_rwlockattr_destroy -function is used to destroy a read/write lock attribute object +function is used to destroy a read/write lock attributes object previously created with .Fn pthread_rwlockattr_init . .Sh RETURN VALUES diff --git a/share/man/man3/pthread_rwlockattr_getpshared.3 b/share/man/man3/pthread_rwlockattr_getpshared.3 index 8e65be3ce391..33d7cd3229f0 100644 --- a/share/man/man3/pthread_rwlockattr_getpshared.3 +++ b/share/man/man3/pthread_rwlockattr_getpshared.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 17, 2018 .Dt PTHREAD_RWLOCKATTR_GETPSHARED 3 .Os diff --git a/share/man/man3/pthread_rwlockattr_init.3 b/share/man/man3/pthread_rwlockattr_init.3 index 1cce9cd02554..031d010ae81a 100644 --- a/share/man/man3/pthread_rwlockattr_init.3 +++ b/share/man/man3/pthread_rwlockattr_init.3 @@ -22,14 +22,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 4, 1998 .Dt PTHREAD_RWLOCKATTR_INIT 3 .Os .Sh NAME .Nm pthread_rwlockattr_init -.Nd initialize a read/write lock +.Nd initialize a read/write lock attributes object .Sh LIBRARY .Lb libpthread .Sh SYNOPSIS @@ -52,7 +50,7 @@ The function will fail if: .Bl -tag -width Er .It Bq Er ENOMEM -Insufficient memory exists to initialize the attribute object. +Insufficient memory exists to initialize the attributes object. .El .Sh SEE ALSO .Xr pthread_rwlock_init 3 , diff --git a/share/man/man3/pthread_rwlockattr_setpshared.3 b/share/man/man3/pthread_rwlockattr_setpshared.3 index bf2ddac0285a..3ed86f411ef4 100644 --- a/share/man/man3/pthread_rwlockattr_setpshared.3 +++ b/share/man/man3/pthread_rwlockattr_setpshared.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 31, 2016 .Dt PTHREAD_RWLOCKATTR_SETPSHARED 3 .Os diff --git a/share/man/man3/pthread_schedparam.3 b/share/man/man3/pthread_schedparam.3 index 9d8b98a89d96..3ba175781f48 100644 --- a/share/man/man3/pthread_schedparam.3 +++ b/share/man/man3/pthread_schedparam.3 @@ -25,9 +25,7 @@ .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd August 17, 2018 +.Dd October 17, 2022 .Dt PTHREAD_SCHEDPARAM 3 .Os .Sh NAME @@ -75,6 +73,8 @@ Invalid value for .Fa policy . .It Bq Er ENOTSUP Invalid value for scheduling parameters. +.It Bq Er EPERM +The calling thread does not have sufficient privilege to perform the operation. .It Bq Er ESRCH Non-existent thread .Fa thread . diff --git a/share/man/man3/pthread_self.3 b/share/man/man3/pthread_self.3 index 8b346836c631..1c4853006fb1 100644 --- a/share/man/man3/pthread_self.3 +++ b/share/man/man3/pthread_self.3 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 4, 1996 .Dt PTHREAD_SELF 3 .Os diff --git a/share/man/man3/pthread_set_name_np.3 b/share/man/man3/pthread_set_name_np.3 index 5423ef898f58..69adcad2bd81 100644 --- a/share/man/man3/pthread_set_name_np.3 +++ b/share/man/man3/pthread_set_name_np.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 12, 2021 .Dt PTHREAD_SET_NAME_NP 3 .Os diff --git a/share/man/man3/pthread_setspecific.3 b/share/man/man3/pthread_setspecific.3 index 3153c991f90b..59079e35890d 100644 --- a/share/man/man3/pthread_setspecific.3 +++ b/share/man/man3/pthread_setspecific.3 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 4, 1996 .Dt PTHREAD_SETSPECIFIC 3 .Os diff --git a/share/man/man3/pthread_sigmask.3 b/share/man/man3/pthread_sigmask.3 index 013ba7cb6844..8d2a5d6519d5 100644 --- a/share/man/man3/pthread_sigmask.3 +++ b/share/man/man3/pthread_sigmask.3 @@ -24,8 +24,6 @@ .\" 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 February 19, 2011 .Dt PTHREAD_SIGMASK 3 .Os diff --git a/share/man/man3/pthread_signals_block_np.3 b/share/man/man3/pthread_signals_block_np.3 new file mode 100644 index 000000000000..de33f4e6189e --- /dev/null +++ b/share/man/man3/pthread_signals_block_np.3 @@ -0,0 +1,81 @@ +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" This documentation was written by +.\" Konstantin Belousov <kib@FreeBSD.org> under sponsorship +.\" from the FreeBSD Foundation. +.\" +.Dd May 16, 2025 +.Dt PTHREAD_SIGNALS_BLOCK_NP 3 +.Os +.Sh NAME +.Nm pthread_signals_block_np , +.Nm pthread_signals_unblock_np +.Nd fast asynchronous signals blocking and unblocking +.Sh LIBRARY +.Lb libpthread +.Sh SYNOPSIS +.In pthread_np.h +.Ft void +.Fn pthread_signals_block_np "void" +.Ft void +.Fn pthread_signals_unblock_np "void" +.Sh DESCRIPTION +The +.Fn pthread_signals_block_np +and +.Fn pthread_signals_unblock_np +functions provide user programs an interface to the fast asynchronous +signals blocking facility +.Xr sigfastblock 2 . +.Pp +Blocking signals with +.Fn pthread_signals_block_np +disables delivery of any asynchronous signal, until unblocked. +Signal blocking establishes a critical section where the execution +flow of the thread cannot be diverted into a signal handler. +Blocking signals is fast, it is performed by a single memory write into +a location established with the kernel. +.Pp +Synchronous signal delivery cannot be blocked in general, including with +these functions. +.Pp +The blocked state established by the +.Fn pthread_signals_block_np +is not completely POSIX-compliant. +Specifically, system calls executed while in a blocked section, +might abort sleep and return +.Er EINTR +upon queuing of an asynchronous signal to the thread, +but the signal handler is not called until the last unblock is done. +.Pp +Calls to +.Nm pthread_signals_block_np +can be nested, and must be complemented by an equal count of +calls to +.Nm pthread_signals_unblock_np +to return the calling thread to the standard mode of signal receiving. +.Pp +An example use of these function might be the construction of the CPU +state that cannot be done atomically, and which includes stages where +the state of the thread is not ABI compliant. +If a signal is delivered while such state is not yet finished, signal +handlers would misbehave. +Using standard functions +.Pq Fn sigprocmask +to establish critical section might be much slower, because +.Fn sigprocmask +is system call, while +.Fn pthread_signals_block_np +consists of a single atomic memory write. +.Sh RETURN VALUES +The functions do not return a value. +.Sh ERRORS +There are no errors reported by the functions. +.Sh SEE ALSO +.Xr sigfastblock 2 , +.Xr sigprocmask 2 , +.Xr pthread_sigmask 3 , +.Xr pthread_np 3 diff --git a/share/man/man3/pthread_sigqueue.3 b/share/man/man3/pthread_sigqueue.3 new file mode 100644 index 000000000000..852f6314e9d0 --- /dev/null +++ b/share/man/man3/pthread_sigqueue.3 @@ -0,0 +1,102 @@ +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright 2024 The FreeBSD Foundation +.\" +.\" This documentation was written by +.\" Konstantin Belousov <kib@FreeBSD.org> under sponsorship +.\" from the FreeBSD Foundation. +.\" +.\" 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(s), this list of conditions and the following disclaimer as +.\" the first lines of this file unmodified other than the possible +.\" addition of one or more copyright notices. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice(s), 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 COPYRIGHT HOLDER(S) ``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 COPYRIGHT HOLDER(S) 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. +.\" +.Dd April 21, 2024 +.Dt PTHREAD_SIGQUEUE 3 +.Os +.Sh NAME +.Nm pthread_sigqueue +.Nd queue a signal to a specified thread +.Sh LIBRARY +.Lb libpthread +.Sh SYNOPSIS +.In pthread.h +.In signal.h +.Ft int +.Fn pthread_sigqueue "pthread_t thread" "int sig" "const union sigval value" +.Sh DESCRIPTION +The +.Fn pthread_queue +function queues a signal, specified by +.Fa sig , +to a thread, specified by +.Fa thread . +If +.Fa sig +is 0, error checking is performed, but no signal is actually sent. +The +.Fa value +is queued together with the signal, and becomes available in +.Vt siginfo_t +data passed to the signal handler. +.Pp +The +.Nm +function is similar to +.Xr sigqueue 2 , +but targets a thread in the current process instead of a process. +See +.Xr sigqueue 2 +for details about signal queueing and delivery selection. +.Sh RETURN VALUES +If successful, +.Fn pthread_sigqueue +returns 0. +Otherwise, an error number is returned. +.Sh ERRORS +The +.Fn pthread_sigqueue +function will fail if: +.Bl -tag -width Er +.It Bq Er EAGAIN +No resources are available to queue the signal. +The current process has already queued +.Brq Dv SIGQUEUE_MAX +signals that are still pending, +or a system-wide resource limit has been exceeded. +.It Bq Er ESRCH +.Fa thread +is an invalid thread ID. +.It Bq Er EINVAL +.Fa sig +is an invalid or unsupported signal number. +.El +.Sh SEE ALSO +.Xr sigqueue 2 +.Sh STANDARDS +The +.Fn pthread_sigqueue +function is a +.Fx +extension. +An identical function with the same semantic is available in other +operating systems. diff --git a/share/man/man3/pthread_spin_init.3 b/share/man/man3/pthread_spin_init.3 index 3ef67add5248..4820ddcf7885 100644 --- a/share/man/man3/pthread_spin_init.3 +++ b/share/man/man3/pthread_spin_init.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 31, 2016 .Dt PTHREAD_SPIN_INIT 3 .Os diff --git a/share/man/man3/pthread_spin_lock.3 b/share/man/man3/pthread_spin_lock.3 index 24dea92d2397..4308271a384f 100644 --- a/share/man/man3/pthread_spin_lock.3 +++ b/share/man/man3/pthread_spin_lock.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 22, 2004 .Dt PTHREAD_SPIN_LOCK 3 .Os diff --git a/share/man/man3/pthread_suspend_all_np.3 b/share/man/man3/pthread_suspend_all_np.3 index 2821c7360786..c99a08a05b6c 100644 --- a/share/man/man3/pthread_suspend_all_np.3 +++ b/share/man/man3/pthread_suspend_all_np.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 12, 2021 .Dt PTHREAD_SUSPEND_ALL_NP 3 .Os diff --git a/share/man/man3/pthread_suspend_np.3 b/share/man/man3/pthread_suspend_np.3 index 58bcf56964b6..8e05bac0d985 100644 --- a/share/man/man3/pthread_suspend_np.3 +++ b/share/man/man3/pthread_suspend_np.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 12, 2021 .Dt PTHREAD_SUSPEND_NP 3 .Os diff --git a/share/man/man3/pthread_switch_add_np.3 b/share/man/man3/pthread_switch_add_np.3 deleted file mode 100644 index ddfa630ffd9a..000000000000 --- a/share/man/man3/pthread_switch_add_np.3 +++ /dev/null @@ -1,88 +0,0 @@ -.\" Copyright (c) 2003 Alexey Zelkin <phantom@FreeBSD.org> -.\" 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 October 12, 2021 -.Dt PTHREAD_SWITCH_ADD_NP 3 -.Os -.Sh NAME -.Nm pthread_switch_add_np , -.Nm pthread_switch_delete_np -.Nd thread context switches debugging primitives -.Sh LIBRARY -.Lb libpthread -.Sh SYNOPSIS -.In pthread_np.h -.Ft int -.Fn pthread_switch_add_np "pthread_switch_routine_t routine" -.Ft int -.Fn pthread_switch_delete_np "pthread_switch_routine_t routine" -.Sh DESCRIPTION -An application is allowed to monitor the thread context switches inside -the threading library. -An application can install a routine that gets called every time a thread -(explicitly created by an application with the -.Xr pthread_create 3 -function) gets the context switched. -The routine is passed the thread IDs of the threads that are -being switched in and out. -Installation and removal of these hooks may be done using the -.Fn pthread_switch_add_np -and -.Fn pthread_switch_delete_np -functions respectively. -.Sh RETURN VALUES -If successful, -these functions return 0. -Otherwise, an error number is returned to indicate the error. -.Sh ERRORS -The -.Fn pthread_switch_add_np -may fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -.Dv NULL -pointer was passed in the -.Fa routine -argument. -.El -.Pp -The -.Fn pthread_switch_delete_np -may fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The -.Fa routine -argument is different from the argument previously passed to the -.Fn pthread_switch_add_np -function. -.El -.Sh SEE ALSO -.Xr pthread_create 3 , -.Xr pthread_np 3 -.Sh AUTHORS -This manual page was written by -.An Alexey Zelkin Aq Mt phantom@FreeBSD.org . diff --git a/share/man/man3/pthread_testcancel.3 b/share/man/man3/pthread_testcancel.3 index 9ba1403dffdc..c74cdcfe943b 100644 --- a/share/man/man3/pthread_testcancel.3 +++ b/share/man/man3/pthread_testcancel.3 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .Dd March 18, 2017 .Dt PTHREAD_TESTCANCEL 3 .Os @@ -35,6 +34,7 @@ are .Dv PTHREAD_CANCEL_ENABLE and .Dv PTHREAD_CANCEL_DISABLE . +The function is async-signal-safe. .Pp The .Fn pthread_setcanceltype @@ -249,6 +249,11 @@ function conforms to .St -p1003.1-96 . The standard allows implementations to make many more functions cancellation points. +.Pp +The +.Fn pthread_setcancelstate +function is async-signal-safe as required by +.St -p1003.1-2024 . .Sh AUTHORS This manual page was written by .An David Leonard Aq Mt d@openbsd.org diff --git a/share/man/man3/pthread_yield.3 b/share/man/man3/pthread_yield.3 index e47c033acfb7..e9ef649109a7 100644 --- a/share/man/man3/pthread_yield.3 +++ b/share/man/man3/pthread_yield.3 @@ -2,8 +2,6 @@ .\" .\" PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org> .\" -.\" $FreeBSD$ -.\" .Dd September 18, 2006 .Dt PTHREAD_YIELD 3 .Os diff --git a/share/man/man3/qmath.3 b/share/man/man3/qmath.3 index 3e874ab704e6..5c2332f0bc55 100644 --- a/share/man/man3/qmath.3 +++ b/share/man/man3/qmath.3 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 4, 2019 .Dt QMATH 3 .Os diff --git a/share/man/man3/queue.3 b/share/man/man3/queue.3 index 2e2ddec0c555..79c8d92decbe 100644 --- a/share/man/man3/queue.3 +++ b/share/man/man3/queue.3 @@ -25,10 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)queue.3 8.2 (Berkeley) 1/24/94 -.\" $FreeBSD$ -.\" -.Dd September 8, 2016 +.Dd April 28, 2025 .Dt QUEUE 3 .Os .Sh NAME @@ -36,6 +33,7 @@ .Nm SLIST_CLASS_HEAD , .Nm SLIST_CONCAT , .Nm SLIST_EMPTY , +.Nm SLIST_EMPTY_ATOMIC , .Nm SLIST_ENTRY , .Nm SLIST_FIRST , .Nm SLIST_FOREACH , @@ -51,11 +49,13 @@ .Nm SLIST_REMOVE , .Nm SLIST_REMOVE_AFTER , .Nm SLIST_REMOVE_HEAD , +.Nm SLIST_SPLIT_AFTER , .Nm SLIST_SWAP , .Nm STAILQ_CLASS_ENTRY , .Nm STAILQ_CLASS_HEAD , .Nm STAILQ_CONCAT , .Nm STAILQ_EMPTY , +.Nm STAILQ_EMPTY_ATOMIC , .Nm STAILQ_ENTRY , .Nm STAILQ_FIRST , .Nm STAILQ_FOREACH , @@ -73,11 +73,14 @@ .Nm STAILQ_REMOVE , .Nm STAILQ_REMOVE_AFTER , .Nm STAILQ_REMOVE_HEAD , +.Nm STAILQ_REVERSE , +.Nm STAILQ_SPLIT_AFTER , .Nm STAILQ_SWAP , .Nm LIST_CLASS_ENTRY , .Nm LIST_CLASS_HEAD , .Nm LIST_CONCAT , .Nm LIST_EMPTY , +.Nm LIST_EMPTY_ATOMIC , .Nm LIST_ENTRY , .Nm LIST_FIRST , .Nm LIST_FOREACH , @@ -93,11 +96,14 @@ .Nm LIST_NEXT , .Nm LIST_PREV , .Nm LIST_REMOVE , +.Nm LIST_REPLACE , +.Nm LIST_SPLIT_AFTER , .Nm LIST_SWAP , .Nm TAILQ_CLASS_ENTRY , .Nm TAILQ_CLASS_HEAD , .Nm TAILQ_CONCAT , .Nm TAILQ_EMPTY , +.Nm TAILQ_EMPTY_ATOMIC , .Nm TAILQ_ENTRY , .Nm TAILQ_FIRST , .Nm TAILQ_FOREACH , @@ -119,6 +125,8 @@ .Nm TAILQ_NEXT , .Nm TAILQ_PREV , .Nm TAILQ_REMOVE , +.Nm TAILQ_REPLACE , +.Nm TAILQ_SPLIT_AFTER , .Nm TAILQ_SWAP .Nd implementations of singly-linked lists, singly-linked tail queues, lists and tail queues @@ -129,6 +137,7 @@ lists and tail queues .Fn SLIST_CLASS_HEAD "HEADNAME" "CLASSTYPE" .Fn SLIST_CONCAT "SLIST_HEAD *head1" "SLIST_HEAD *head2" "TYPE" "SLIST_ENTRY NAME" .Fn SLIST_EMPTY "SLIST_HEAD *head" +.Fn SLIST_EMPTY_ATOMIC "SLIST_HEAD *head" .Fn SLIST_ENTRY "TYPE" .Fn SLIST_FIRST "SLIST_HEAD *head" .Fn SLIST_FOREACH "TYPE *var" "SLIST_HEAD *head" "SLIST_ENTRY NAME" @@ -144,12 +153,14 @@ lists and tail queues .Fn SLIST_REMOVE "SLIST_HEAD *head" "TYPE *elm" "TYPE" "SLIST_ENTRY NAME" .Fn SLIST_REMOVE_AFTER "TYPE *elm" "SLIST_ENTRY NAME" .Fn SLIST_REMOVE_HEAD "SLIST_HEAD *head" "SLIST_ENTRY NAME" +.Fn SLIST_SPLIT_AFTER "SLIST_HEAD *head" "TYPE *elm" "SLIST_HEAD *rest" "SLIST_ENTRY NAME" .Fn SLIST_SWAP "SLIST_HEAD *head1" "SLIST_HEAD *head2" "TYPE" .\" .Fn STAILQ_CLASS_ENTRY "CLASSTYPE" .Fn STAILQ_CLASS_HEAD "HEADNAME" "CLASSTYPE" .Fn STAILQ_CONCAT "STAILQ_HEAD *head1" "STAILQ_HEAD *head2" .Fn STAILQ_EMPTY "STAILQ_HEAD *head" +.Fn STAILQ_EMPTY_ATOMIC "STAILQ_HEAD *head" .Fn STAILQ_ENTRY "TYPE" .Fn STAILQ_FIRST "STAILQ_HEAD *head" .Fn STAILQ_FOREACH "TYPE *var" "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" @@ -167,12 +178,15 @@ lists and tail queues .Fn STAILQ_REMOVE "STAILQ_HEAD *head" "TYPE *elm" "TYPE" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE_AFTER "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE_HEAD "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" +.Fn STAILQ_REVERSE "STAILQ_HEAD *head" "TYPE" "STAILQ_ENTRY NAME" +.Fn STAILQ_SPLIT_AFTER "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_HEAD *rest" "STAILQ_ENTRY NAME" .Fn STAILQ_SWAP "STAILQ_HEAD *head1" "STAILQ_HEAD *head2" "TYPE" .\" .Fn LIST_CLASS_ENTRY "CLASSTYPE" .Fn LIST_CLASS_HEAD "HEADNAME" "CLASSTYPE" .Fn LIST_CONCAT "LIST_HEAD *head1" "LIST_HEAD *head2" "TYPE" "LIST_ENTRY NAME" .Fn LIST_EMPTY "LIST_HEAD *head" +.Fn LIST_EMPTY_ATOMIC "LIST_HEAD *head" .Fn LIST_ENTRY "TYPE" .Fn LIST_FIRST "LIST_HEAD *head" .Fn LIST_FOREACH "TYPE *var" "LIST_HEAD *head" "LIST_ENTRY NAME" @@ -188,12 +202,15 @@ lists and tail queues .Fn LIST_NEXT "TYPE *elm" "LIST_ENTRY NAME" .Fn LIST_PREV "TYPE *elm" "LIST_HEAD *head" "TYPE" "LIST_ENTRY NAME" .Fn LIST_REMOVE "TYPE *elm" "LIST_ENTRY NAME" +.Fn LIST_REPLACE "TYPE *elm" "TYPE *new" "LIST_ENTRY NAME" +.Fn LIST_SPLIT_AFTER "LIST_HEAD *head" "TYPE *elm" "LIST_HEAD *rest" "LIST_ENTRY NAME" .Fn LIST_SWAP "LIST_HEAD *head1" "LIST_HEAD *head2" "TYPE" "LIST_ENTRY NAME" .\" .Fn TAILQ_CLASS_ENTRY "CLASSTYPE" .Fn TAILQ_CLASS_HEAD "HEADNAME" "CLASSTYPE" .Fn TAILQ_CONCAT "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TAILQ_ENTRY NAME" .Fn TAILQ_EMPTY "TAILQ_HEAD *head" +.Fn TAILQ_EMPTY_ATOMIC "TAILQ_HEAD *head" .Fn TAILQ_ENTRY "TYPE" .Fn TAILQ_FIRST "TAILQ_HEAD *head" .Fn TAILQ_FOREACH "TYPE *var" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" @@ -215,6 +232,8 @@ lists and tail queues .Fn TAILQ_NEXT "TYPE *elm" "TAILQ_ENTRY NAME" .Fn TAILQ_PREV "TYPE *elm" "HEADNAME" "TAILQ_ENTRY NAME" .Fn TAILQ_REMOVE "TAILQ_HEAD *head" "TYPE *elm" "TAILQ_ENTRY NAME" +.Fn TAILQ_REPLACE "TAILQ_HEAD *head" "TYPE *elm" "TYPE *new" "TAILQ_ENTRY NAME" +.Fn TAILQ_SPLIT_AFTER "TAILQ_HEAD *head" "TYPE *elm" "TAILQ_HEAD *rest" "TAILQ_ENTRY NAME" .Fn TAILQ_SWAP "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TYPE" "TAILQ_ENTRY NAME" .\" .Sh DESCRIPTION @@ -241,6 +260,8 @@ O(1) removal of an entry from the head of the list. .It Forward traversal through the list. .It +Splitting a list in two after any element in the list. +.It Swapping the contents of two lists. .El .Pp @@ -424,6 +445,10 @@ high-usage code paths or to operate on long lists. The macro .Nm SLIST_EMPTY evaluates to true if there are no elements in the list. +The +.Nm SLIST_EMPTY_ATOMIC +variant has the same behavior, but can be safely used in contexts where it is +possible that a different thread is concurrently updating the list. .Pp The macro .Nm SLIST_ENTRY @@ -534,6 +559,17 @@ A doubly-linked list should be used if this macro is needed in high-usage code paths or to operate on long lists. .Pp The macro +.Nm SLIST_SPLIT_AFTER +splits the list referenced by +.Fa head , +making +.Fa rest +reference the list formed by elements after +.Fa elm +in +.Fa head . +.Pp +The macro .Nm SLIST_SWAP swaps the contents of .Fa head1 @@ -632,6 +668,10 @@ removing all entries from the former. The macro .Nm STAILQ_EMPTY evaluates to true if there are no items on the tail queue. +The +.Nm STAILQ_EMPTY_ATOMIC +variant has the same behavior, but can be safely used in contexts where it is +possible that a different thread is concurrently updating the queue. .Pp The macro .Nm STAILQ_ENTRY @@ -753,6 +793,21 @@ A doubly-linked tail queue should be used if this macro is needed in high-usage code paths or to operate on long tail queues. .Pp The macro +.Nm STAILQ_REVERSE +reverses the queue in place. +.Pp +The macro +.Nm STAILQ_SPLIT_AFTER +splits the tail queue referenced by +.Fa head , +making +.Fa rest +reference the tail queue formed by elements after +.Fa elm +in +.Fa head . +.Pp +The macro .Nm STAILQ_SWAP swaps the contents of .Fa head1 @@ -865,6 +920,10 @@ high-usage code paths or to operate on long lists. The macro .Nm LIST_EMPTY evaluates to true if there are no elements in the list. +The +.Nm LIST_EMPTY_ATOMIC +variant has the same behavior, but can be safely used in contexts where it is +possible that a different thread is concurrently updating the list. .Pp The macro .Nm LIST_ENTRY @@ -966,6 +1025,28 @@ removes the element from the list. .Pp The macro +.Fn LIST_REPLACE +replaces the element +.Fa elm +with +.Fa new +in the list. +The element +.Fa new +must not already be on a list. +.Pp +The macro +.Nm LIST_SPLIT_AFTER +splits the list referenced by +.Fa head , +making +.Fa rest +reference the list formed by elements after +.Fa elm +in +.Fa head . +.Pp +The macro .Nm LIST_SWAP swaps the contents of .Fa head1 @@ -1072,6 +1153,10 @@ removing all entries from the former. The macro .Nm TAILQ_EMPTY evaluates to true if there are no items on the tail queue. +The +.Nm TAILQ_EMPTY_ATOMIC +variant has the same behavior, but can be safely used in contexts where it is +possible that a different thread is concurrently updating the queue. .Pp The macro .Nm TAILQ_ENTRY @@ -1224,6 +1309,28 @@ removes the element from the tail queue. .Pp The macro +.Fn TAILQ_REPLACE +replaces the element +.Fa elm +with +.Fa new +in the tail queue. +The element +.Fa new +must not already be on a list. +.Pp +The macro +.Nm TAILQ_SPLIT_AFTER +splits the tail queue referenced by +.Fa head , +making +.Fa rest +reference the tail queue formed by elements after +.Fa elm +in +.Fa head . +.Pp +The macro .Nm TAILQ_SWAP swaps the contents of .Fa head1 @@ -1238,7 +1345,7 @@ struct entry { ... TAILQ_ENTRY(entry) entries; /* Tail queue. */ ... -} *n1, *n2, *n3, *np; +} *n1, *n2, *n3, *n4, *np; TAILQ_INIT(&head); /* Initialize the queue. */ @@ -1256,6 +1363,10 @@ TAILQ_INSERT_BEFORE(n2, n3, entries); TAILQ_REMOVE(&head, n2, entries); /* Deletion. */ free(n2); + +n4 = malloc(sizeof(struct entry)); /* Replacement. */ +TAILQ_REPLACE(&head, n3, n4, entries); +free(n3); /* Forward traversal. */ TAILQ_FOREACH(np, &head, entries) np-> ... @@ -1285,49 +1396,87 @@ while (n1 != NULL) { TAILQ_INIT(&head); .Ed .Sh DIAGNOSTICS -When debugging -.Nm queue(3) , -it can be useful to trace queue changes. -To enable tracing, define the macro -.Va QUEUE_MACRO_DEBUG_TRACE -at compile time. -.Pp -It can also be useful to trash pointers that have been unlinked from a queue, -to detect use after removal. -To enable pointer trashing, define the macro -.Va QUEUE_MACRO_DEBUG_TRASH -at compile time. -The macro -.Fn QMD_IS_TRASHED "void *ptr" -returns true if -.Fa ptr -has been trashed by the -.Va QUEUE_MACRO_DEBUG_TRASH -option. +.Nm queue(3) +provides several diagnostic and debugging facilities. +.Pp +Check code that performs basic integrity and API conformance checks is +automatically inserted when using queue macros in the kernel if compiling it +with +.Va INVARIANTS . +One can request insertion or elision of check code by respectively defining one +of the macros +.Va QUEUE_MACRO_DEBUG_ASSERTIONS +or +.Va QUEUE_MACRO_NO_DEBUG_ASSERTIONS +before first inclusion of +.In sys/queue.h . +When check code encounters an anomaly, it panics the kernel or aborts the +program. +To this end, in the kernel or in +.Va _STANDALONE +builds, it by default calls +.Fn panic , +while in userland builds it prints the diagnostic message on +.Dv stderr +and then calls +.Fn abort . +These behaviors can be overriden by defining a custom +.Fn QMD_PANIC +macro before first inclusion of +.In sys/queue.h . +The diagnostic messages automatically include the source file, line and function +where the failing check occured. +This behavior can be overriden by defining a custom +.Fn QMD_ASSERT +macro before first inclusion of +.In sys/queue.h . .Pp -In the kernel (with -.Va INVARIANTS -enabled), the +The .Fn SLIST_REMOVE_PREVPTR macro is available to aid debugging: .Bl -hang -offset indent .It Fn SLIST_REMOVE_PREVPTR "TYPE **prev" "TYPE *elm" "SLIST_ENTRY NAME" .Pp -Removes +Removes element .Fa elm , which must directly follow the element whose .Va &SLIST_NEXT() is .Fa prev , -from the SLIST. -This macro validates that +from the list. +This macro may insert, under conditions detailed above, check code that +validates that .Fa elm -follows +indeed follows .Fa prev -in -.Va INVARIANTS -mode. +in the list +.Po +through the +.Fn QMD_SLIST_CHECK_PREVPTR +macro +.Pc . .El +.Pp +When debugging, it can be useful to trace queue changes. +To enable tracing, define the macro +.Va QUEUE_MACRO_DEBUG_TRACE . +Note that, at the moment, only macros for regular tail queues have been +instrumented. +.Pp +It can also be useful to trash pointers that have been unlinked from a queue, +to detect use after removal. +To enable pointer trashing, define the macro +.Va QUEUE_MACRO_DEBUG_TRASH +at compile time. +Note that, at the moment, only a limited number of macros have been +instrumented. +The macro +.Fn QMD_IS_TRASHED "void *ptr" +returns true if +.Fa ptr +has been trashed by the +.Va QUEUE_MACRO_DEBUG_TRASH +option. .Sh SEE ALSO .Xr arb 3 , .Xr tree 3 diff --git a/share/man/man3/sigevent.3 b/share/man/man3/sigevent.3 index fea8e621f3ea..731b365801cc 100644 --- a/share/man/man3/sigevent.3 +++ b/share/man/man3/sigevent.3 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 25, 2020 .Dt SIGEVENT 3 .Os diff --git a/share/man/man3/siginfo.3 b/share/man/man3/siginfo.3 index 7f8a809cdfa5..f57cf5f7d706 100644 --- a/share/man/man3/siginfo.3 +++ b/share/man/man3/siginfo.3 @@ -25,8 +25,6 @@ .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 17, 2021 .Dt SIGINFO 3 .Os diff --git a/share/man/man3/snl.3 b/share/man/man3/snl.3 new file mode 100644 index 000000000000..9a6eceb66a32 --- /dev/null +++ b/share/man/man3/snl.3 @@ -0,0 +1,309 @@ +.\" +.\" Copyright (C) 2022 Alexander Chernikov <melifaro@FreeBSD.org>. +.\" +.\" 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. +.Dd December 16, 2022 +.Dt SNL 3 +.Os +.Sh NAME +.Nm snl_init , +.Nm snl_free , +.Nm snl_read_message , +.Nm snl_send , +.Nm snl_get_seq , +.Nm snl_allocz , +.Nm snl_clear_lb , +.Nm snl_parse_nlmsg , +.Nm snl_parse_header , +.Nm snl_parse_attrs , +.Nm snl_parse_attrs_raw , +.Nm snl_attr_get_flag , +.Nm snl_attr_get_ip , +.Nm snl_attr_get_uint16 , +.Nm snl_attr_get_uint32 , +.Nm snl_attr_get_string , +.Nm snl_attr_get_stringn , +.Nm snl_attr_get_nla , +.Nm snl_field_get_uint8 , +.Nm snl_field_get_uint16 , +.Nm snl_field_get_uint32 +.Nd "simple netlink library" +.Sh SYNOPSIS +.In netlink/netlink_snl.h +.In netlink/netlink_snl_route.h +.Ft "bool" +.Fn snl_init "struct snl_state *ss" "int netlink_family" +.Fn snl_free "struct snl_state *ss" +.Ft "struct nlmsghdr *" +.Fn snl_read_message "struct snl_state *ss" +.Ft "bool" +.Fn snl_send "struct snl_state *ss" "void *data" "int sz" +.Ft "uint32_t" +.Fn snl_get_seq "struct snl_state *ss" +.Ft "void *" +.Fn snl_allocz "struct snl_state *ss" "int len" +.Fn snl_clear_lb "struct snl_state *ss" +.Ft "bool" +.Fn snl_parse_nlmsg "struct snl_state *ss" "struct nlmsghdr *hdr" "const struct snl_hdr_parser *ps" "void *target" +.Ft "bool" +.Fn snl_parse_header "struct snl_state *ss" "void *hdr" "int len" "const struct snl_hdr_parser *ps" "int pslen" "void *target" +.Ft "bool" +.Fn snl_parse_attrs "struct snl_state *ss" "struct nlmsghdr *hdr" "int hdrlen" "const struct snl_attr_parser *ps" "int pslen" "void *target" +.Ft "bool" +.Fn snl_parse_attrs_raw "struct snl_state *ss" "struct nlattr *nla_head" "int len" "const struct snl_attr_parser *ps" "int pslen" "void *target" +.Ft "bool" +.Fn snl_attr_get_flag "struct snl_state *ss" "struct nlattr *nla" "void *target" +.Ft "bool" +.Fn snl_attr_get_uint8 "struct snl_state *ss" "struct nlattr *nla" "void *target" +.Ft "bool" +.Fn snl_attr_get_uint16 "struct snl_state *ss" "struct nlattr *nla" "void *target" +.Ft "bool" +.Fn snl_attr_get_uint32 "struct snl_state *ss" "struct nlattr *nla" "void *target" +.Ft "bool" +.Fn snl_attr_get_uint64 "struct snl_state *ss" "struct nlattr *nla" "void *target" +.Ft "bool" +.Fn snl_attr_get_string "struct snl_state *ss" "struct nlattr *nla" "void *target" +.Ft "bool" +.Fn snl_attr_get_stringn "struct snl_state *ss" "struct nlattr *nla" "void *target" +.Ft "bool" +.Fn snl_attr_get_nla "struct snl_state *ss" "struct nlattr *nla" "void *target" +.Ft "bool" +.Fn snl_attr_get_ip "struct snl_state *ss" "struct nlattr *nla" "void *target" +.Ft "bool" +.Fn snl_attr_get_ipvia "struct snl_state *ss" "struct nlattr *nla" "void *target" +.Sh DESCRIPTION +The +.Xr snl 3 +library provides an easy way of sending and receiving Netlink messages, +taking care of serialisation and deserialisation. +.Ss INITIALISATION +Call +.Fn snl_init +with a pointer to the +.Dv struct snl_state +and the desired Netlink family to initialise the library instance. +To free the library instance, call +.Fn snl_free . +.Pp +The library functions are NOT multithread-safe. +If multithreading is desired, consider initializing an instance +per thread. +.Ss MEMORY ALLOCATION +The library uses pre-allocated extendable memory buffers to handle message parsing. +The typical usage pattern is to allocate the necessary data structures during the +message parsing or writing process via +.Fn snl_allocz +and free all allocated data at once using +.Fn snl_clear_lb +after handling the message. +.Ss COMPOSING AND SENDING MESSAGES +The library does not currently offer any wrappers for writing netlink messages. +Simple request messages can be composed by filling in all needed fields directly. +Example for constructing an interface dump request: +.Bd -literal + struct { + struct nlmsghdr hdr; + struct ifinfomsg ifmsg; + } msg = { + .hdr.nlmsg_type = RTM_GETLINK, + .hdr.nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST, + .hdr.nlmsg_seq = snl_get_seq(ss), + }; + msg.hdr.nlmsg_len = sizeof(msg); +.Ed +.Fn snl_get_seq +can be used to generate a unique message number. +To send the resulting message, +.Fn snl_send +can be used. +.Ss RECEIVING AND PARSING MESSAGES +To receive a message, use +.Fn snl_read_message . +Currently, this call is blocking. +.Pp +The library provides an easy way to convert the message to the pre-defined C +structure. +For each message type, one needs to define rules, converting the protocol header +fields and the desired attributes to the specified structure. +It can be accomplished by using message parsers. +Each message parser consists of an array of attribute getters and an array of +header field getters. +The former array needs to be sorted by the attribute type. +There is a +.Fn SNL_VERIFY_PARSERS +macro to check if the order is correct. +.Fn SNL_DECLARE_PARSER "parser_name" "family header type" "struct snl_field_parser[]" "struct snl_attr_parser[]" +can be used to create a new parser. +.Fn SNL_DECLARE_ATTR_PARSER "parser_name" "struct snl_field_parser[]" +can be used to create an attribute-only message parser. +.Pp +Each attribute getter needs to be embedded in the following structure: +.Bd -literal +typedef bool snl_parse_attr_f(struct snl_state *ss, struct nlattr *attr, const void *arg, void *target); +struct snl_attr_parser { + uint16_t type; /* Attribute type */ + uint16_t off; /* field offset in the target structure */ + snl_parse_attr_f *cb; /* getter function to call */ + const void *arg; /* getter function custom argument */ +}; +.Ed +The generic attribute getter has the following signature: +.Ft "bool" +.Fn snl_attr_get_<type> "struct snl_state *ss" "struct nlattr *nla" "const void *arg" "void *target" . +nla contains the pointer of the attribute to use as the datasource. +The target field is the pointer to the field in the target structure. +It is up to the getter to know the type of the target field. +The getter must check the input attribute and return +false if the attribute is not formed correctly. +Otherwise, the getter fetches the attribute value and stores it in the target, +then returns true. +It is possible to use +.Fn snl_allocz +to create the desired data structure . +A number of predefined getters for the common data types exist. +.Fn snl_attr_get_flag +converts a flag-type attribute to an uint8_t value of 1 or 0, depending on the +attribute presence. +.Fn snl_attr_get_uint8 +stores a uint8_t type attribute into the uint8_t target field. +.Fn snl_attr_get_uint16 +stores a uint16_t type attribute into the uint16_t target field. +.Fn snl_attr_get_uint32 +stores a uint32_t type attribute into the uint32_t target field. +.Fn snl_attr_get_uint64 +stores a uint64_t type attribute into the uint64_t target field. +.Fn snl_attr_get_ip +and +.Fn snl_attr_get_ipvia +stores a pointer to the sockaddr structure with the IPv4/IPv6 address contained +in the attribute. +Sockaddr is allocated using +.Fn snl_allocz . +.Fn snl_attr_get_string +stores a pointer to the NULL-terminated string. +The string itself is allocated using +.Fn snl_allocz . +.Fn snl_attr_get_nla +stores a pointer to the specified attribute. +.Fn snl_attr_get_stringn +stores a pointer to the non-NULL-terminated string. +.Pp +Similarly, each family header getter needs to be embedded in the following structure: +.Bd -literal +typedef void snl_parse_field_f(struct snl_state *ss, void *hdr, void *target); +struct snl_field_parser { + uint16_t off_in; /* field offset in the input structure */ + uint16_t off_out;/* field offset in the target structure */ + snl_parse_field_f *cb; /* getter function to call */ +}; +.Ed +The generic field getter has the following signature: +.Ft "void" +snl_field_get_<type> "struct snl_state *ss" "void *src" "void *target" . +A number of pre-defined getters for the common data types exist. +.Fn "snl_field_get_uint8" +fetches an uint8_t value and stores it in the target. +.Fn "snl_field_get_uint16" +fetches an uint8_t value and stores it in the target. +.Fn "snl_field_get_uint32" +fetches an uint32_t value and stores it in the target. +.Sh EXAMPLES +The following example demonstrates how to list all system interfaces +using netlink. +.Bd -literal +#include <stdio.h> + +#include <netlink/netlink.h> +#include <netlink/netlink_route.h> +#include "netlink/netlink_snl.h" +#include "netlink/netlink_snl_route.h" + +struct nl_parsed_link { + uint32_t ifi_index; + uint32_t ifla_mtu; + char *ifla_ifname; +}; + +#define _IN(_field) offsetof(struct ifinfomsg, _field) +#define _OUT(_field) offsetof(struct nl_parsed_link, _field) +static const struct snl_attr_parser ap_link[] = { + { .type = IFLA_IFNAME, .off = _OUT(ifla_ifname), .cb = snl_attr_get_string }, + { .type = IFLA_MTU, .off = _OUT(ifla_mtu), .cb = snl_attr_get_uint32 }, +}; +static const struct snl_field_parser fp_link[] = { + {.off_in = _IN(ifi_index), .off_out = _OUT(ifi_index), .cb = snl_field_get_uint32 }, +}; +#undef _IN +#undef _OUT +SNL_DECLARE_PARSER(link_parser, struct ifinfomsg, fp_link, ap_link); + + +int +main(int ac, char *argv[]) +{ + struct snl_state ss; + + if (!snl_init(&ss, NETLINK_ROUTE)) + return (1); + + struct { + struct nlmsghdr hdr; + struct ifinfomsg ifmsg; + } msg = { + .hdr.nlmsg_type = RTM_GETLINK, + .hdr.nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST, + .hdr.nlmsg_seq = snl_get_seq(&ss), + }; + msg.hdr.nlmsg_len = sizeof(msg); + + if (!snl_send(&ss, &msg, sizeof(msg))) { + snl_free(&ss); + return (1); + } + + struct nlmsghdr *hdr; + while ((hdr = snl_read_message(&ss)) != NULL && hdr->nlmsg_type != NLMSG_DONE) { + if (hdr->nlmsg_seq != msg.hdr.nlmsg_seq) + break; + + struct nl_parsed_link link = {}; + if (!snl_parse_nlmsg(&ss, hdr, &link_parser, &link)) + continue; + printf("Link#%u %s mtu %u\n", link.ifi_index, link.ifla_ifname, link.ifla_mtu); + } + + return (0); +} +.Ed +.Sh SEE ALSO +.Xr genetlink 4 , +.Xr netlink 4 , +and +.Xr rtnetlink 4 +.Sh HISTORY +The +.Dv SNL +library appeared in +.Fx 13.2 . +.Sh AUTHORS +This library was implemented by +.An Alexander Chernikov Aq Mt melifaro@FreeBSD.org . diff --git a/share/man/man3/stats.3 b/share/man/man3/stats.3 index 2a63febef1d6..7fe1fa613def 100644 --- a/share/man/man3/stats.3 +++ b/share/man/man3/stats.3 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 2, 2019 .Dt STATS 3 .Os @@ -104,17 +102,17 @@ .Fc .Ft struct voistatspec .Fo "STATS_VSS_CRHIST<32|64>_USR" -.Fa Sy "HBKTS" Ns Pq Sy "CRBKT" Ns ( Em "lb" ) , "..." Pc , +.Fa Sy "HBKTS" Ns Pq Sy "CRBKT" Ns ( Em "lb" ) , "..." , .Fa "vsdflags" .Fc .Ft struct voistatspec .Fo "STATS_VSS_DRHIST<32|64>_USR" -.Fa Sy "HBKTS" Ns Pq Sy "DRBKT" Ns ( Em "lb" , "ub" ) , "..." Pc , +.Fa Sy "HBKTS" Ns Pq Sy "DRBKT" Ns ( Em "lb" , "ub" ) , "..." , .Fa "vsdflags" .Fc .Ft struct voistatspec .Fo "STATS_VSS_DVHIST<32|64>_USR" -.Fa Sy "HBKTS" Ns Pq Sy "DVBKT" Ns ( Em "val" ) , "..." Pc , +.Fa Sy "HBKTS" Ns Pq Sy "DVBKT" Ns ( Em "val" ) , "..." , .Fa "vsdflags" .Fc .Ft struct voistatspec @@ -318,16 +316,16 @@ The maximum VOI value. The minimum VOI value. .It Dv VS_STYPE_HIST A static bucket histogram of VOI values, including a count of -.Dq out-of-band/bucket Dc +.Dq out-of-band/bucket values which did not match any bucket. Histograms can be specified as -.Dq Em C Ns ontinuous Em R Ns ange Dc -.Pq CRHIST Pc , -.Dq Em D Ns iscrete Em R Ns ange Dc -.Pq DRHIST Pc +.Dq Em C Ns ontinuous Em R Ns ange +.Pq CRHIST , +.Dq Em D Ns iscrete Em R Ns ange +.Pq DRHIST or -.Dq Em D Ns iscrete Em V Ns alue Dc -.Pq DVHIST Pc , +.Dq Em D Ns iscrete Em V Ns alue +.Pq DVHIST , with 32 or 64 bit bucket counters, depending on the VOI semantics. .It Dv VS_STYPE_TDGST A dynamic bucket histogram of VOI values based on the t-digest method @@ -435,15 +433,15 @@ Where templates need to be referenced via textual means, for example via a MIB variable, the following string based template spec formats can be used: .Bl -enum .It -.Qq <tplname> Qc Ns +.Qq <tplname> Ns :<tplhash> .Ns , for example -.Qq TCP_DEFAULT Qc Ns +.Qq TCP_DEFAULT Ns :1731235399 .It -.Qq <tplname> Qc +.Qq <tplname> .Ns , for example -.Qq TCP_DEFAULT Qc +.Qq TCP_DEFAULT .It :<tplhash> .Ns , for example diff --git a/share/man/man3/stdarg.3 b/share/man/man3/stdarg.3 index 3b47eee70ff0..71409508e6a8 100644 --- a/share/man/man3/stdarg.3 +++ b/share/man/man3/stdarg.3 @@ -29,10 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)stdarg.3 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" -.Dd February 25, 2020 +.Dd October 18, 2024 .Dt STDARG 3 .Os .Sh NAME @@ -205,9 +202,6 @@ void foo(char *fmt, ...) These macros are .Em not compatible with the historic macros they replace. -A backward compatible version can be found in the include -file -.In varargs.h . .Sh STANDARDS The .Fn va_start , diff --git a/share/man/man3/stdckdint.3 b/share/man/man3/stdckdint.3 new file mode 100644 index 000000000000..e3593472c08b --- /dev/null +++ b/share/man/man3/stdckdint.3 @@ -0,0 +1,106 @@ +.\"- +.\" Copyright (c) 2023 Dag-Erling Smørgrav +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd September 5, 2023 +.Dt STDCKDINT 3 +.Os +.Sh NAME +.Nm stdckdint +.Nd checked integer arithmetic +.Sh SYNOPSIS +.In stdckdint.h +.Ft bool +.Fn ckd_add "type1 *result" "type2 a" "type3 b" +.Ft bool +.Fn ckd_sub "type1 *result" "type2 a" "type3 b" +.Ft bool +.Fn ckd_mul "type1 *result" "type2 a" "type3 b" +.Sh DESCRIPTION +The function-like macros +.Nm ckd_add , +.Nm ckd_sub , +and +.Nm ckd_mul +perform checked integer addition, subtraction, and multiplication, +respectively. +If the result of adding, subtracting, or multiplying +.Fa a +and +.Fa b +as if their respective types had infinite range fits in +.Ft type1 , +it is stored in the location pointed to by +.Fa result +and the macro evaluates to +.Dv false . +Otherwise, the macro evaluates to +.Dv true +and the contents of the location pointed to by +.Fa result +is the result of the operation wrapped to the range of +.Ft type1 . +.Sh RETURN VALUES +The +.Nm ckd_add , +.Nm ckd_sub , +and +.Nm ckd_mul +macros evaluate to +.Dv true +if the requested operation overflowed the result type and +.Dv false +otherwise. +.Sh EXAMPLES +.Bd -literal -offset indent +#include <assert.h> +#include <limits.h> +#include <stdckdint.h> + +int main(void) +{ + int result; + + assert(!ckd_add(&result, INT_MAX, 0)); + assert(result == INT_MAX); + assert(ckd_add(&result, INT_MAX, 1)); + assert(result == INT_MIN); + + assert(!ckd_sub(&result, INT_MIN, 0)); + assert(result == INT_MIN); + assert(ckd_sub(&result, INT_MIN, 1)); + assert(result == INT_MAX); + + assert(!ckd_mul(&result, INT_MAX / 2, 2)); + assert(result == INT_MAX - 1); + assert(ckd_mul(&result, INT_MAX / 2 + 1, 2)); + assert(result == INT_MIN); + + return 0; +} +.Ed +.\" .Sh STANDARDS +.\" The +.\" .Nm ckd_add , +.\" .Nm ckd_sub , +.\" and +.\" .Nm ckd_mul +.\" macros conform to +.\" .St -isoC-23 . +.Sh HISTORY +The +.Nm ckd_add , +.Nm ckd_sub , +and +.Nm ckd_mul +macros were first introduced in +.Fx 14.0 . +.Sh AUTHORS +The +.Nm ckd_add , +.Nm ckd_sub , +and +.Nm ckd_mul +macros and this manual page were written by +.An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org . diff --git a/share/man/man3/sysexits.3 b/share/man/man3/sysexits.3 index a0f9af98d42e..62f79b286a16 100644 --- a/share/man/man3/sysexits.3 +++ b/share/man/man3/sysexits.3 @@ -1,7 +1,7 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause .\" -.\" Copyright (c) 1996 Joerg Wunsch -.\" -.\" All rights reserved. +.\" Copyright (c) 1996 Joerg Wunsch. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -23,29 +23,20 @@ .\" (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 21, 2010 +.Dd May 9, 2024 .Dt SYSEXITS 3 .Os .Sh NAME .Nm sysexits -.Nd preferable exit codes for programs +.Nd legacy exit status codes for system programs .Sh SYNOPSIS .In sysexits.h .Sh DESCRIPTION -According to -.Xr style 9 , -it is not a good practice to call -.Xr exit 3 -with arbitrary values to indicate a failure condition when ending -a program. -Instead, the pre-defined exit codes from -.Nm -should be used, so the caller of the process can get a rough -estimation about the failure class without looking up the source code. -.Pp +Some commands attempt to describe the nature of a failure condition +by using these pre-defined exit codes. +This interface has been deprecated and is retained only for compatibility. +Its use is discouraged. +.Sh ERRORS The successful exit is always indicated by a status of 0, or .Sy EX_OK . Error numbers begin at @@ -114,8 +105,7 @@ The remote system returned something that was during a protocol exchange. .It Sy EX_NOPERM Pq 77 You did not have sufficient permission to perform the operation. -This -is not intended for file system problems, which should use +This is not intended for file system problems, which should use .Sy EX_NOINPUT or .Sy EX_CANTCREAT , @@ -133,12 +123,13 @@ parenthesis for easy reference. .Sh HISTORY The .Nm -file appeared somewhere after -.Bx 4.3 . +file first appeared in +.Bx 4 . .Sh AUTHORS This manual page was written by -.An J\(:org Wunsch -after the comments in -.In sysexits.h . +.An J\(:org Wunsch . .Sh BUGS -The choice of an appropriate exit value is often ambiguous. +.Bl -tag -width 0 -compact +.It This interface is not portable. +.It The choice of an appropriate exit value is often ambiguous. +.El diff --git a/share/man/man3/tgmath.3 b/share/man/man3/tgmath.3 index be49dfa87b18..98dbb7439793 100644 --- a/share/man/man3/tgmath.3 +++ b/share/man/man3/tgmath.3 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 4, 2012 .Dt TGMATH 3 .Os diff --git a/share/man/man3/timeradd.3 b/share/man/man3/timeradd.3 index 055bef9668f2..9720267883ef 100644 --- a/share/man/man3/timeradd.3 +++ b/share/man/man3/timeradd.3 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 30, 2018 .Dt TIMERADD 3 .Os @@ -87,6 +85,7 @@ struct timeval { long tv_usec; /* and microseconds */ }; .Ed +.Pp And the .Fa timespec structure is defined in diff --git a/share/man/man3/tree.3 b/share/man/man3/tree.3 index 7e3727b2c365..83d005a5e481 100644 --- a/share/man/man3/tree.3 +++ b/share/man/man3/tree.3 @@ -28,9 +28,7 @@ .\" (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 July 27, 2020 +.Dd August 2, 2024 .Dt TREE 3 .Os .Sh NAME @@ -97,9 +95,12 @@ .Nm RB_FOREACH_REVERSE_SAFE , .Nm RB_INIT , .Nm RB_INSERT , +.Nm RB_INSERT_NEXT , +.Nm RB_INSERT_PREV , .Nm RB_REMOVE , .Nm RB_REINSERT , .Nm RB_AUGMENT +.Nm RB_AUGMENT_CHECK, .Nm RB_UPDATE_AUGMENT .Nd "implementations of splay and rank-balanced (wavl) trees" .Sh SYNOPSIS @@ -192,11 +193,17 @@ .Ft "struct TYPE *" .Fn RB_INSERT NAME "RB_HEAD *head" "struct TYPE *elm" .Ft "struct TYPE *" +.Fn RB_INSERT_NEXT NAME "RB_HEAD *head" "struct TYPE *elm" "struct TYPE *next" +.Ft "struct TYPE *" +.Fn RB_INSERT_PREV NAME "RB_HEAD *head" "struct TYPE *elm" "struct TYPE *prev" +.Ft "struct TYPE *" .Fn RB_REMOVE NAME "RB_HEAD *head" "struct TYPE *elm" .Ft "struct TYPE *" .Fn RB_REINSERT NAME "RB_HEAD *head" "struct TYPE *elm" .Ft "void" .Fn RB_AUGMENT NAME "struct TYPE *elm" +.Ft "bool" +.Fn RB_AUGMENT_CHECK NAME "struct TYPE *elm" .Ft "void" .Fn RB_UPDATE_AUGMENT NAME "struct TYPE *elm" .Sh DESCRIPTION @@ -512,6 +519,18 @@ macro inserts the new element into the tree. .Pp The +.Fn RB_INSERT_NEXT +macro inserts the new element +.Fa elm +into the tree immediately after a given element. +.Pp +The +.Fn RB_INSERT_PREV +macro inserts the new element +.Fa elm +into the tree immediately before a given element. +.Pp +The .Fn RB_REMOVE macro removes the element .Fa elm @@ -620,6 +639,22 @@ It is typically used to maintain some associative accumulation of tree elements, such as sums, minima, maxima, and the like. .Pp The +.Fn RB_AUGMENT_CHECK +macro updates augmentation data of the element +.Fa elm +in the tree. +By default, it does nothing and returns false. +If +.Fn RB_AUGMENT_CHECK +is defined, then when an element is inserted or removed from the tree, +it is invoked for every element in the tree that is the root of an +altered subtree, working from the bottom of the tree up toward the +top, until it returns false to indicate that it did not change the +element and so working further up the tree would change nothing. +It is typically used to maintain some associative accumulation of tree +elements, such as sums, minima, maxima, and the like. +.Pp +The .Fn RB_UPDATE_AUGMENT macro updates augmentation data of the element .Fa elm @@ -640,6 +675,8 @@ To maintain the sum of the values in the tree, each element maintains the sum of its value and the sums from its left and right subtrees. Lastly, the internal structure of the tree is printed. .Bd -literal -offset 3n +#define RB_AUGMENT(entry) sumaug(entry) + #include <sys/tree.h> #include <err.h> #include <stdio.h> @@ -656,7 +693,7 @@ intcmp(struct node *e1, struct node *e2) return (e1->i < e2->i ? -1 : e1->i > e2->i); } -int +void sumaug(struct node *e) { e->sum = e->i; @@ -665,7 +702,6 @@ sumaug(struct node *e) if (RB_RIGHT(e, entry) != NULL) e->sum += RB_RIGHT(e, entry)->sum; } -#define RB_AUGMENT(entry) sumaug(entry) RB_HEAD(inttree, node) head = RB_INITIALIZER(&head); RB_GENERATE(inttree, node, entry, intcmp) @@ -714,8 +750,7 @@ main(void) printf("%d\en", n->i); } print_tree(RB_ROOT(&head)); - printf("Sum of values = %d\n", RB_ROOT(&head)->sum); - printf("\en"); + printf("\enSum of values = %d\en", RB_ROOT(&head)->sum); return (0); } .Ed diff --git a/share/man/man3lua/Makefile b/share/man/man3lua/Makefile index 751d559adfb5..6f95a27ac303 100644 --- a/share/man/man3lua/Makefile +++ b/share/man/man3lua/Makefile @@ -1,5 +1,3 @@ -# $FreeBSD$ - .include <src.opts.mk> MAN= intro.3lua diff --git a/share/man/man3lua/intro.3lua b/share/man/man3lua/intro.3lua index 854865a5ca42..50594c6ad179 100644 --- a/share/man/man3lua/intro.3lua +++ b/share/man/man3lua/intro.3lua @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2020, Ryan Moeller <freqlabs@FreeBSD.org> .\" @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 24, 2020 .Dt INTRO 3lua .Os diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 192bab4155a2..4f12e70f2ae4 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -1,8 +1,10 @@ -# @(#)Makefile 8.1 (Berkeley) 6/18/93 -# $FreeBSD$ - .include <src.opts.mk> +# If you add a new file here, please consider adding an entry to the +# hardware notes template (website/archetypes/release/hardware.adoc in +# the doc repository); otherwise the automatically generated hardware +# notes will not include your driver. + MAN= aac.4 \ aacraid.4 \ acpi.4 \ @@ -15,6 +17,7 @@ MAN= aac.4 \ ${_acpi_panasonic.4} \ ${_acpi_rapidstart.4} \ ${_acpi_sony.4} \ + acpi_ged.4 \ acpi_thermal.4 \ acpi_battery.4 \ ${_acpi_toshiba.4} \ @@ -35,10 +38,6 @@ MAN= aac.4 \ alc.4 \ ale.4 \ alpm.4 \ - altera_atse.4 \ - altera_avgen.4 \ - altera_jtag_uart.4 \ - altera_sdcard.4 \ altq.4 \ amdpm.4 \ ${_amdsbwd.4} \ @@ -54,11 +53,10 @@ MAN= aac.4 \ at45d.4 \ ata.4 \ ath.4 \ - ath_ahb.4 \ ath_hal.4 \ - ath_pci.4 \ atkbd.4 \ atkbdc.4 \ + ${_atopcase.4} \ atp.4 \ ${_atf_test_case.4} \ ${_atrtc.4} \ @@ -102,6 +100,7 @@ MAN= aac.4 \ cc_vegas.4 \ ${_ccd.4} \ ccr.4 \ + cd9660.4 \ cd.4 \ cdce.4 \ cdceem.4 \ @@ -129,6 +128,7 @@ MAN= aac.4 \ dcons_crom.4 \ ddb.4 \ devctl.4 \ + devfs.4 \ disc.4 \ disk.4 \ divert.4 \ @@ -136,42 +136,50 @@ MAN= aac.4 \ ds1307.4 \ ds3231.4 \ ${_dtrace_provs} \ + dummymbuf.4 \ dummynet.4 \ edsc.4 \ ehci.4 \ em.4 \ ena.4 \ enc.4 \ + enic.4 \ epair.4 \ est.4 \ et.4 \ etherswitch.4 \ eventtimers.4 \ exca.4 \ + ext2fs.4 \ + e6000sw.4 \ e6060sw.4 \ fd.4 \ fdc.4 \ + fdescfs.4 \ fdt.4 \ fdt_pinctrl.4 \ fdtbus.4 \ ffclock.4 \ + ffs.4 \ filemon.4 \ firewire.4 \ + ${_ftgpio.4} \ ${_ftwd.4} \ full.4 \ + fusefs.4 \ fwe.4 \ fwip.4 \ fwohci.4 \ fxp.4 \ - gbde.4 \ gdb.4 \ gem.4 \ genet.4 \ + genetlink.4 \ geom.4 \ geom_linux_lvm.4 \ - geom_map.4 \ geom_uzip.4 \ gif.4 \ + ${_gve.4} \ gpio.4 \ gpioiic.4 \ gpiokeys.4 \ @@ -206,7 +214,9 @@ MAN= aac.4 \ ${_hv_vss.4} \ hwpmc.4 \ ${_hwpstate_intel.4} \ + i2ctinyusb.4 \ iavf.4 \ + ice.4 \ ichsmb.4 \ ${_ichwd.4} \ icmp.4 \ @@ -234,6 +244,7 @@ MAN= aac.4 \ ${_io.4} \ ${_ioat.4} \ ip.4 \ + ip17x.4 \ ip6.4 \ ipfirewall.4 \ ipheth.4 \ @@ -256,7 +267,8 @@ MAN= aac.4 \ iwnfw.4 \ iwlwifi.4 \ iwlwififw.4 \ - ixgbe.4 \ + ${_iwx.4} \ + ix.4 \ ixl.4 \ jedec_dimm.4 \ jme.4 \ @@ -269,11 +281,17 @@ MAN= aac.4 \ ktls.4 \ ktr.4 \ kue.4 \ + ${_kvmclock.4} \ lagg.4 \ le.4 \ led.4 \ lge.4 \ + lindebugfs.4 \ + linprocfs.4 \ + linsysfs.4 \ ${_linux.4} \ + linuxkpi.4 \ + linuxkpi_wlan.4 \ liquidio.4 \ lm75.4 \ lo.4 \ @@ -284,7 +302,10 @@ MAN= aac.4 \ mac.4 \ mac_biba.4 \ mac_bsdextended.4 \ + mac_ddb.4 \ + mac_do.4 \ mac_ifoff.4 \ + mac_ipacl.4 \ mac_lomac.4 \ mac_mls.4 \ mac_none.4 \ @@ -313,12 +334,16 @@ MAN= aac.4 \ mod_cc.4 \ mos.4 \ mouse.4 \ + mpi3mr.4 \ mpr.4 \ mps.4 \ mpt.4 \ + mqueuefs.4 \ mrsas.4 \ + msdosfs.4 \ msk.4 \ mtio.4 \ + mtkswitch.4 \ multicast.4 \ muge.4 \ mvs.4 \ @@ -333,17 +358,16 @@ MAN= aac.4 \ netgdb.4 \ netgraph.4 \ netintro.4 \ + netlink.4 \ netmap.4 \ ${_nfe.4} \ + nfslockd.4 \ ${_nfsmb.4} \ ng_async.4 \ - ngatmbase.4 \ - ng_atmllc.4 \ ng_bpf.4 \ ng_bridge.4 \ ng_btsocket.4 \ ng_car.4 \ - ng_ccatm.4 \ ng_checksum.4 \ ng_cisco.4 \ ng_deflate.4 \ @@ -382,15 +406,12 @@ MAN= aac.4 \ ng_socket.4 \ ng_source.4 \ ng_split.4 \ - ng_sscfu.4 \ - ng_sscop.4 \ ng_tag.4 \ ng_tcpmss.4 \ ng_tee.4 \ ng_tty.4 \ ng_ubt.4 \ ng_UI.4 \ - ng_uni.4 \ ng_vjc.4 \ ng_vlan.4 \ ng_vlan_rotate.4 \ @@ -403,12 +424,15 @@ MAN= aac.4 \ ${_nda.4} \ ${_if_ntb.4} \ null.4 \ + nullfs.4 \ numa.4 \ - ${_nvd.4} \ + nvd.4 \ ${_nvdimm.4} \ - ${_nvme.4} \ + nvme.4 \ + nvmf.4 \ + nvmf_tcp.4 \ + nvmft.4 \ ${_nvram.4} \ - ${_nvram2env.4} \ oce.4 \ ocs_fc.4\ ohci.4 \ @@ -420,6 +444,7 @@ MAN= aac.4 \ owc.4 \ ovpn.4 \ ${_padlock.4} \ + p9fs.4 \ pass.4 \ pca954x.4 \ pccard.4 \ @@ -434,6 +459,7 @@ MAN= aac.4 \ pcm.4 \ ${_pf.4} \ ${_pflog.4} \ + ${_pflow.4} \ ${_pfsync.4} \ pim.4 \ pms.4 \ @@ -442,6 +468,7 @@ MAN= aac.4 \ ppc.4 \ ppi.4 \ procdesc.4 \ + procfs.4 \ proto.4 \ ps4dshock.4 \ psm.4 \ @@ -452,6 +479,8 @@ MAN= aac.4 \ pty.4 \ puc.4 \ pwmc.4 \ + ${_pvscsi.4} \ + ${_qat.4} \ ${_qat_c2xxx.4} \ ${_qlxge.4} \ ${_qlxgb.4} \ @@ -466,9 +495,10 @@ MAN= aac.4 \ rl.4 \ rndtest.4 \ route.4 \ + rtnetlink.4 \ rtsx.4 \ rtw88.4 \ - rtw88fw.4 \ + rtw89.4 \ rtwn.4 \ rtwnfw.4 \ rtwn_pci.4 \ @@ -489,6 +519,7 @@ MAN= aac.4 \ send.4 \ ses.4 \ ${_sfxge.4} \ + sg.4 \ sge.4 \ siba.4 \ siftr.4 \ @@ -498,6 +529,7 @@ MAN= aac.4 \ sk.4 \ ${_smartpqi.4} \ smb.4 \ + smbfs.4 \ smbios.4 \ smbus.4 \ smp.4 \ @@ -507,6 +539,7 @@ MAN= aac.4 \ snd_cmi.4 \ snd_cs4281.4 \ snd_csa.4 \ + snd_dummy.4 \ snd_emu10k1.4 \ snd_emu10kx.4 \ snd_envy24.4 \ @@ -514,6 +547,7 @@ MAN= aac.4 \ snd_es137x.4 \ snd_fm801.4 \ snd_hda.4 \ + snd_hdsp.4 \ snd_hdspe.4 \ snd_ich.4 \ snd_maestro3.4 \ @@ -541,22 +575,25 @@ MAN= aac.4 \ syscons.4 \ sysmouse.4 \ tap.4 \ + tarfs.4 \ targ.4 \ tcp.4 \ tcp_bbr.4 \ + tcp_rack.4 \ tdfx.4 \ termios.4 \ textdump.4 \ ti.4 \ timecounters.4 \ + tmpfs.4 \ ${_tpm.4} \ tslog.4 \ tty.4 \ tun.4 \ - twe.4 \ tws.4 \ udp.4 \ udplite.4 \ + unionfs.4 \ ure.4 \ vale.4 \ vga.4 \ @@ -567,6 +604,7 @@ MAN= aac.4 \ virtio_balloon.4 \ virtio_blk.4 \ virtio_console.4 \ + virtio_gpu.4 \ virtio_random.4 \ virtio_scsi.4 \ ${_vmci.4} \ @@ -582,11 +620,14 @@ MAN= aac.4 \ vtnet.4 \ watchdog.4 \ ${_wbwd.4} \ + ${_wdatwd.4} \ + wg.4 \ witness.4 \ wlan.4 \ wlan_acl.4 \ wlan_amrr.4 \ wlan_ccmp.4 \ + wlan_gcmp.4 \ wlan_tkip.4 \ wlan_wep.4 \ wlan_xauth.4 \ @@ -612,11 +653,8 @@ MLINKS+=age.4 if_age.4 MLINKS+=agp.4 agpgart.4 MLINKS+=alc.4 if_alc.4 MLINKS+=ale.4 if_ale.4 -MLINKS+=altera_atse.4 atse.4 -MLINKS+=altera_sdcard.4 altera_sdcardc.4 MLINKS+=altq.4 ALTQ.4 MLINKS+=ath.4 if_ath.4 -MLINKS+=ath_pci.4 if_ath_pci.4 MLINKS+=aue.4 if_aue.4 MLINKS+=axe.4 if_axe.4 MLINKS+=bce.4 if_bce.4 @@ -654,10 +692,13 @@ MLINKS+=disc.4 if_disc.4 MLINKS+=edsc.4 if_edsc.4 MLINKS+=em.4 if_em.4 \ em.4 igb.4 \ - em.4 if_igb.4 + em.4 if_igb.4 \ + em.4 lem.4 \ + em.4 if_lem.4 MLINKS+=enc.4 if_enc.4 MLINKS+=epair.4 if_epair.4 MLINKS+=et.4 if_et.4 +MLINKS+=ext2fs.4 ext4fs.4 MLINKS+=fd.4 stderr.4 \ fd.4 stdin.4 \ fd.4 stdout.4 @@ -675,20 +716,24 @@ MLINKS+=gpioths.4 dht11.4 MLINKS+=gpioths.4 dht22.4 MLINKS+=gre.4 if_gre.4 MLINKS+=hpet.4 acpi_hpet.4 +MLINKS+=${_hv_netvsc.4} ${_hn.4} \ + ${_hv_netvsc.4} ${_if_hn.4} MLINKS+=${_hptrr.4} ${_rr232x.4} MLINKS+=${_attimer.4} ${_i8254.4} MLINKS+=ip.4 rawip.4 MLINKS+=ipfirewall.4 ipaccounting.4 \ ipfirewall.4 ipacct.4 \ ipfirewall.4 ipfw.4 +MLINKS+=ice.4 if_ice.4 MLINKS+=ipheth.4 if_ipheth.4 MLINKS+=ipw.4 if_ipw.4 MLINKS+=iwi.4 if_iwi.4 +MLINKS+=iwlwifi.4 if_iwlwifi.4 MLINKS+=iwm.4 if_iwm.4 MLINKS+=iwn.4 if_iwn.4 -MLINKS+=ixgbe.4 ix.4 -MLINKS+=ixgbe.4 if_ix.4 -MLINKS+=ixgbe.4 if_ixgbe.4 +MLINKS+=ix.4 if_ix.4 +MLINKS+=ix.4 if_ixgbe.4 +MLINKS+=ix.4 ixgbe.4 MLINKS+=ixl.4 if_ixl.4 MLINKS+=iavf.4 if_iavf.4 MLINKS+=jme.4 if_jme.4 @@ -706,6 +751,7 @@ MLINKS+=mfi.4 mfi_linux.4 \ mfi.4 mfip.4 MLINKS+=mlx5en.4 mce.4 MLINKS+=mos.4 if_mos.4 +MLINKS+=msdosfs.4 msdos.4 MLINKS+=msk.4 if_msk.4 MLINKS+=mwl.4 if_mwl.4 MLINKS+=mxge.4 if_mxge.4 @@ -725,12 +771,13 @@ MLINKS+=ptnet.4 if_ptnet.4 MLINKS+=ral.4 if_ral.4 MLINKS+=re.4 if_re.4 MLINKS+=rl.4 if_rl.4 -MLINKS+=rtwn_pci.4 if_rtwn_pci.4 +MLINKS+=rtw88.4 if_rtw88.4 +MLINKS+=rtw89.4 if_rtw89.4 +MLINKS+=rtwn.4 if_rtwn.4 MLINKS+=rue.4 if_rue.4 -MLINKS+=scsi.4 CAM.4 \ - scsi.4 cam.4 \ - scsi.4 scbus.4 \ - scsi.4 SCSI.4 +MLINKS+=scsi.4 cam.4 +MLINKS+=scsi.4 scbus.4 +MLINKS+=scsi.4 SCSI.4 MLINKS+=sge.4 if_sge.4 MLINKS+=sis.4 if_sis.4 MLINKS+=sk.4 if_sk.4 @@ -759,6 +806,8 @@ MLINKS+=vr.4 if_vr.4 MLINKS+=vte.4 if_vte.4 MLINKS+=vtnet.4 if_vtnet.4 MLINKS+=watchdog.4 SW_WATCHDOG.4 +MLINKS+=wg.4 if_wg.4 +MLINKS+=wlan.4 wifi.4 MLINKS+=${_wpi.4} ${_if_wpi.4} MLINKS+=xl.4 if_xl.4 @@ -785,13 +834,16 @@ _amdsmb.4= amdsmb.4 _amdsmn.4= amdsmn.4 _amdtemp.4= amdtemp.4 _asmc.4= asmc.4 +_atopcase.4= atopcase.4 _bxe.4= bxe.4 _bytgpio.4= bytgpio.4 _chvgpio.4= chvgpio.4 _coretemp.4= coretemp.4 _cpuctl.4= cpuctl.4 _dpms.4= dpms.4 +_ftgpio.4= ftgpio.4 _ftwd.4= ftwd.4 +_hn.4= _hn.4 _hpt27xx.4= hpt27xx.4 _hptiop.4= hptiop.4 _hptmv.4= hptmv.4 @@ -807,14 +859,15 @@ _hwpstate_intel.4= hwpstate_intel.4 _i8254.4= i8254.4 _ichwd.4= ichwd.4 _if_bxe.4= if_bxe.4 +_if_hn.4= if_hn.4 _if_nfe.4= if_nfe.4 _if_urtw.4= if_urtw.4 -_if_vmx.4= if_vmx.4 _if_wpi.4= if_wpi.4 _igc.4= igc.4 _imcsmb.4= imcsmb.4 _io.4= io.4 _itwd.4= itwd.4 +_kvmclock.4= kvmclock.4 _mgb.4= mgb.4 _nda.4= nda.4 _nfe.4= nfe.4 @@ -825,11 +878,10 @@ _ntb_hw_amd.4= ntb_hw_amd.4 _ntb_hw_intel.4= ntb_hw_intel.4 _ntb_hw_plx.4= ntb_hw_plx.4 _ntb_transport.4=ntb_transport.4 -_nvd.4= nvd.4 -_nvme.4= nvme.4 _nvram.4= nvram.4 _padlock.4= padlock.4 _pchtherm.4= pchtherm.4 +_qat.4= qat.4 _qat_c2xxx.4= qat_c2xxx.4 _rr232x.4= rr232x.4 _speaker.4= speaker.4 @@ -840,8 +892,8 @@ _urtw.4= urtw.4 _viawd.4= viawd.4 _vmci.4= vmci.4 _vmd.4= vmd.4 -_vmx.4= vmx.4 _wbwd.4= wbwd.4 +_wdatwd.4= wdatwd.4 _wpi.4= wpi.4 _xen.4= xen.4 _xnb.4= xnb.4 @@ -850,6 +902,7 @@ _xnb.4= xnb.4 .if ${MACHINE_CPUARCH} == "amd64" _ioat.4= ioat.4 +_iwx.4= iwx.4 _nvdimm.4= nvdimm.4 _qlxge.4= qlxge.4 _qlxgb.4= qlxgb.4 @@ -859,6 +912,7 @@ _sfxge.4= sfxge.4 _smartpqi.4= smartpqi.4 _sume.4= sume.4 +MLINKS+=iwx.4 if_iwx.4 MLINKS+=qlxge.4 if_qlxge.4 MLINKS+=qlxgb.4 if_qlxgb.4 MLINKS+=qlxgbe.4 if_qlxgbe.4 @@ -872,20 +926,15 @@ _vmm.4= vmm.4 .endif .endif -.if ${MACHINE_CPUARCH} == "mips" -_nvram2env.4= nvram2env.4 -.endif - -.if ${MACHINE_CPUARCH} == "powerpc" -_nvd.4= nvd.4 -_nvme.4= nvme.4 -.endif - .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \ ${MACHINE_CPUARCH} == "aarch64" +_gve.4= gve.4 +_if_vmx.4= if_vmx.4 _ipmi.4= ipmi.4 _linux.4= linux.4 _ossl.4= ossl.4 +_pvscsi.4= pvscsi.4 +_vmx.4= vmx.4 .endif .if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "aarch64" || \ @@ -905,6 +954,10 @@ SUBDIR+= man4.${__arch} .endif .endfor +.if ${MK_AUTOFS} != "no" +MAN+= autofs.4 +.endif + .if ${MK_BLUETOOTH} != "no" MAN+= ng_bluetooth.4 .endif @@ -917,6 +970,7 @@ _ccd.4= ccd.4 _dtrace_provs= dtrace_audit.4 \ dtrace_io.4 \ dtrace_ip.4 \ + dtrace_kinst.4 \ dtrace_lockstat.4 \ dtrace_proc.4 \ dtrace_sched.4 \ @@ -958,11 +1012,13 @@ _atf_test_case.4= atf-test-case.4 .if ${MK_PF} != "no" _pf.4= pf.4 _pflog.4= pflog.4 +_pflow.4= pflow.4 _pfsync.4= pfsync.4 .endif .if ${MK_USB} != "no" MAN+= \ + mtw.4 \ otus.4 \ otusfw.4 \ rsu.4 \ @@ -997,6 +1053,7 @@ MAN+= \ uled.4 \ ulpt.4 \ umass.4 \ + umb.4 \ umcs.4 \ umct.4 \ umodem.4 \ @@ -1017,8 +1074,10 @@ MAN+= \ uslcom.4 \ uvisor.4 \ uvscom.4 \ + veriexec.4 \ zyd.4 +MLINKS+=mtw.4 if_mtw.4 MLINKS+=otus.4 if_otus.4 MLINKS+=rsu.4 if_rsu.4 MLINKS+=rtwn_usb.4 if_rtwn_usb.4 diff --git a/share/man/man4/Makefile.depend b/share/man/man4/Makefile.depend index f80275d86ab1..11aba52f82cf 100644 --- a/share/man/man4/Makefile.depend +++ b/share/man/man4/Makefile.depend @@ -1,4 +1,3 @@ -# $FreeBSD$ # Autogenerated - do NOT edit! DIRDEPS = \ diff --git a/share/man/man4/aac.4 b/share/man/man4/aac.4 index eec5bc1671ca..7a7d0350dcdb 100644 --- a/share/man/man4/aac.4 +++ b/share/man/man4/aac.4 @@ -21,8 +21,6 @@ .\" 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 July 10, 2009 .Dt AAC 4 .Os diff --git a/share/man/man4/aacraid.4 b/share/man/man4/aacraid.4 index 3f2e023a7a00..3bf683ac40c8 100644 --- a/share/man/man4/aacraid.4 +++ b/share/man/man4/aacraid.4 @@ -21,8 +21,6 @@ .\" 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 June 19, 2015 .Dt AACRAID 4 .Os diff --git a/share/man/man4/acpi.4 b/share/man/man4/acpi.4 index e7265654839a..cdad3ceeedfc 100644 --- a/share/man/man4/acpi.4 +++ b/share/man/man4/acpi.4 @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd October 12, 2021 +.Dd July 15, 2024 .Dt ACPI 4 .Os .Sh NAME @@ -258,6 +256,12 @@ is a valid list of two interfaces .Qq Li FreeBSD and .Qq Li Linux . +.It Va hw.acpi.hw.acpi.override_isa_irq_polarity (x86) +Forces active-lo polarity for edge-triggered ISA interrupts. +Some older systems incorrectly specify active-lo polarity for ISA +interrupts and this override fixes those systems. +This override is enabled by default on systems with Intel CPUs, +but can be enabled or disabled by setting the tunable explicitly. .It Va hw.acpi.reset_video Enables calling the VESA reset BIOS vector on the resume path. This can fix some graphics cards that have problems such as LCD white-out diff --git a/share/man/man4/acpi_asus.4 b/share/man/man4/acpi_asus.4 index 124999a72cc6..25c1df9599b2 100644 --- a/share/man/man4/acpi_asus.4 +++ b/share/man/man4/acpi_asus.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 8, 2010 .Dt ACPI_ASUS 4 .Os diff --git a/share/man/man4/acpi_asus_wmi.4 b/share/man/man4/acpi_asus_wmi.4 index 9949b3b63bcb..721b73833484 100644 --- a/share/man/man4/acpi_asus_wmi.4 +++ b/share/man/man4/acpi_asus_wmi.4 @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 2, 2012 +.Dd March 25, 2024 .Dt ACPI_ASUS_WMI 4 .Os .Sh NAME @@ -65,7 +63,7 @@ handled inside the driver. The following sysctls are currently implemented: .Bl -tag -width indent .It Va dev.acpi_asus_wmi.0.handle_keys -Specifies whether driver should handle some harwdare keys, such as keyboard +Specifies whether driver should handle some hardware keys, such as keyboard backlight, internally. .El .Pp @@ -74,11 +72,19 @@ Number of other variables under the same sysctl branch are model-specific. Defaults for these variables can be set in .Xr sysctl.conf 5 , which is parsed at boot-time. +.Sh FILES +.Bl -tag -width "/dev/backlight/acpi_asus_wmi0" -compact +.It Pa /dev/backlight/acpi_asus_wmi0 +Keyboard +.Xr backlight 8 +device node. +.El .Sh SEE ALSO .Xr acpi 4 , .Xr acpi_asus 4 , .Xr acpi_video 4 , .Xr sysctl.conf 5 , +.Xr backlight 8 , .Xr devd 8 , .Xr sysctl 8 .Sh HISTORY diff --git a/share/man/man4/acpi_battery.4 b/share/man/man4/acpi_battery.4 index 2b44ecbce2b7..3707cd125678 100644 --- a/share/man/man4/acpi_battery.4 +++ b/share/man/man4/acpi_battery.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 16, 2020 .Dt ACPI_BATTERY 4 .Os diff --git a/share/man/man4/acpi_dock.4 b/share/man/man4/acpi_dock.4 index db23b3b7f21e..b2c58627a55e 100644 --- a/share/man/man4/acpi_dock.4 +++ b/share/man/man4/acpi_dock.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 20, 2006 .Dt ACPI_DOCK 4 .Os diff --git a/share/man/man4/acpi_fujitsu.4 b/share/man/man4/acpi_fujitsu.4 index 5a8271823610..da74e671dd67 100644 --- a/share/man/man4/acpi_fujitsu.4 +++ b/share/man/man4/acpi_fujitsu.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 8, 2010 .Dt ACPI_FUJITSU 4 .Os diff --git a/share/man/man4/acpi_ged.4 b/share/man/man4/acpi_ged.4 new file mode 100644 index 000000000000..98baabdde796 --- /dev/null +++ b/share/man/man4/acpi_ged.4 @@ -0,0 +1,62 @@ +.\" Copyright (c) 2022 Takanori Watanabe +.\" +.\" 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. +.\" +.Dd October 18, 2022 +.Dt ACPI_GED 4 +.Os +.Sh NAME +.Nm acpi_ged +.Nd "ACPI Generic Event Device" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device acpi_ged" +.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 +acpi_ged_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for generic events interface. +This handles interrupts and evaluates the specific ACPI method. +This may generate optionally ACPI notify for another device. +.Sh SEE ALSO +.Xr acpi 4 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 13.3 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Takanori Watanabe Aq Mt takawata@FreeBSD.org diff --git a/share/man/man4/acpi_hp.4 b/share/man/man4/acpi_hp.4 index a3f320e4b3d8..660d66f53a1c 100644 --- a/share/man/man4/acpi_hp.4 +++ b/share/man/man4/acpi_hp.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 19, 2015 .Dt ACPI_HP 4 .Os diff --git a/share/man/man4/acpi_ibm.4 b/share/man/man4/acpi_ibm.4 index 434a1a7cba2c..6b808b77c521 100644 --- a/share/man/man4/acpi_ibm.4 +++ b/share/man/man4/acpi_ibm.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 13, 2022 .Dt ACPI_IBM 4 .Os diff --git a/share/man/man4/acpi_panasonic.4 b/share/man/man4/acpi_panasonic.4 index 160656b7a1db..de9663b5fe41 100644 --- a/share/man/man4/acpi_panasonic.4 +++ b/share/man/man4/acpi_panasonic.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 19, 2015 .Dt ACPI_PANASONIC 4 .Os diff --git a/share/man/man4/acpi_rapidstart.4 b/share/man/man4/acpi_rapidstart.4 index 0bfa1bd12ca7..606a55d202d5 100644 --- a/share/man/man4/acpi_rapidstart.4 +++ b/share/man/man4/acpi_rapidstart.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 8, 2013 .Dt ACPI_RAPIDSTART 4 .Os diff --git a/share/man/man4/acpi_sony.4 b/share/man/man4/acpi_sony.4 index c40ffcf1173d..33c988fba68c 100644 --- a/share/man/man4/acpi_sony.4 +++ b/share/man/man4/acpi_sony.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 8, 2010 .Dt ACPI_SONY 4 .Os diff --git a/share/man/man4/acpi_thermal.4 b/share/man/man4/acpi_thermal.4 index d1cf8ee60ef2..86efaafed6b5 100644 --- a/share/man/man4/acpi_thermal.4 +++ b/share/man/man4/acpi_thermal.4 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd March 17, 2007 +.Dd November 21, 2022 .Dt ACPI_THERMAL 4 .Os .Sh NAME @@ -84,6 +82,9 @@ Current temperature for this zone. .It Va hw.acpi.thermal.tz%d._PSV Temperature to start passive cooling by throttling down CPU, etc. This value can be overridden by the user. +.It Va hw.acpi.thermal.tz%d._CR3 +Temperature to start critical suspend to RAM (S3). +This value can be overridden by the user. .It Va hw.acpi.thermal.tz%d._HOT Temperature to start critical suspend to disk (S4). This value can be overridden by the user. diff --git a/share/man/man4/acpi_toshiba.4 b/share/man/man4/acpi_toshiba.4 index 3bf19d41bdb3..0d8514ebe7b7 100644 --- a/share/man/man4/acpi_toshiba.4 +++ b/share/man/man4/acpi_toshiba.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 8, 2010 .Dt ACPI_TOSHIBA 4 .Os diff --git a/share/man/man4/acpi_video.4 b/share/man/man4/acpi_video.4 index 537c47ebd045..c51c3ff1047f 100644 --- a/share/man/man4/acpi_video.4 +++ b/share/man/man4/acpi_video.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 8, 2004 .Dt ACPI_VIDEO 4 .Os diff --git a/share/man/man4/acpi_wmi.4 b/share/man/man4/acpi_wmi.4 index eaf85440702c..e5c5517ba4ac 100644 --- a/share/man/man4/acpi_wmi.4 +++ b/share/man/man4/acpi_wmi.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2009 Michael Gmelin .\" All rights reserved. .\" @@ -22,49 +25,45 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd September 5, 2019 +.Dd June 12, 2025 .Dt ACPI_WMI 4 .Os .Sh NAME .Nm acpi_wmi -.Nd "ACPI to WMI mapping driver" +.Nd ACPI to WMI mapping 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 acpi_wmi" -.Ed +.Pp +.Dl Cd "device acpi_wmi" .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 -acpi_wmi_load="YES" -.Ed +.Pp +.Dl acpi_wmi_load="YES" .Sh DESCRIPTION The .Nm driver provides an interface for vendor specific WMI implementations -(e.g. HP and Acer laptops). -It creates /dev/wmistat%d, which can be read to get -information about GUIDs found in the system. +.Pq e.g. HP and Acer laptops . +It creates +.Pa /dev/wmistat%d , +which can be read to get information about GUIDs found in the system. .Sh FILES .Bl -tag -width /dev/wmistat%d -compact .It Pa /dev/wmistat%d -WMI status device. +WMI status devices. .El .Sh SYSCTLS The following sysctl node is currently implemented: -.Bl -tag +.Bl -tag -width "dev.acpi_wmi.%d.bmof" .It Va dev.acpi_wmi.%d.bmof -Managed Object Format (MOF) blob. -You can obtain human readable output by bmf2mof in bmfdec tool. -(https://github.com/pali/bmfdec) +binary Managed Object Format (MOF) buffer .El .Sh EXAMPLES +Read GUIDs from the first WMI interface found in the system: .Bd -literal # cat /dev/wmistat0 GUID INST EXPE METH STR EVENT OID @@ -80,7 +79,14 @@ GUID INST EXPE METH STR EVENT OID {8232DE3D-663D-4327-A8F4-E293ADB9BF05} 0 NO NO NO NO BG {8F1F6436-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BH {8F1F6435-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BI -# sysctl -b dev.acpi_wmi.0.bmof |bmf2mof +.Ed +.Pp +Read first WMI interface description with +.Sy bmf2mof +from +.Pa ports/converters/bmfdec : +.Bd -literal +# sysctl -b dev.acpi_wmi.0.bmof | bmf2mof [abstract] class Lenovo_BIOSElement { }; @@ -93,10 +99,15 @@ class Lenovo_BiosSetting : Lenovo_BiosElement { [WmiDataId(1), Description("BIOS setting")] String CurrentSetting; }; ... - .Ed .Sh SEE ALSO .Xr acpi 4 +.Sh STANDARDS +.Rs +.%T Windows Instrumentation: WMI and ACPI +.%I Microsoft Corporation +.%U https://github.com/microsoft/Windows-driver-samples/tree/main/wmi/wmiacpi +.Re .Sh HISTORY The .Nm @@ -109,13 +120,13 @@ The driver was written by .An Michael Gmelin Aq Mt freebsd@grem.de . .Pp -Work has been inspired by the Linux acpi-wmi driver written by Carlos Corbacho. -.Pp -See http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx for -the specification of ACPI-WMI. +Work inspired by the Linux +.Sy acpi-wmi +driver written by Carlos Corbacho. .Pp -MOF part has been inspired by the Linux wmi-bmof driver -written by Andy Lutomirski. +MOF handling inspired by the Linux +.Sy wmi-bmof +driver written by Andy Lutomirski. .Pp This manual page was written by .An Michael Gmelin Aq Mt freebsd@grem.de . diff --git a/share/man/man4/ada.4 b/share/man/man4/ada.4 index 0d1c0506425f..6536be44680b 100644 --- a/share/man/man4/ada.4 +++ b/share/man/man4/ada.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 20, 2017 .Dt ADA 4 .Os diff --git a/share/man/man4/adm6996fc.4 b/share/man/man4/adm6996fc.4 index 81b96a1f6c68..af9d19b8450a 100644 --- a/share/man/man4/adm6996fc.4 +++ b/share/man/man4/adm6996fc.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 5, 2017 .Dt ADM6996FC 4 .Os diff --git a/share/man/man4/ads111x.4 b/share/man/man4/ads111x.4 index 82f0d8601553..03468a4442da 100644 --- a/share/man/man4/ads111x.4 +++ b/share/man/man4/ads111x.4 @@ -22,8 +22,6 @@ .\" (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 2, 2019 .Dt ADS111x 4 .Os @@ -73,7 +71,7 @@ For example, if the sample rate were configured as 125 samples per second, a single measurement would require 8 milliseconds. .Pp For devices that support multiple input pins, the device datasheet -describes mux settings to control how those pins are interpeted when +describes mux settings to control how those pins are interpreted when making either single-ended or differential measurements. There are eight possible ways to combine the inputs from the four pins. The diff --git a/share/man/man4/ae.4 b/share/man/man4/ae.4 index b1707d5b4c83..a871986b2c70 100644 --- a/share/man/man4/ae.4 +++ b/share/man/man4/ae.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 17, 2019 .Dt AE 4 .Os diff --git a/share/man/man4/aesni.4 b/share/man/man4/aesni.4 index 08465bdf5e88..fbc0c0e59442 100644 --- a/share/man/man4/aesni.4 +++ b/share/man/man4/aesni.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 29, 2020 .Dt AESNI 4 .Os diff --git a/share/man/man4/age.4 b/share/man/man4/age.4 index 054627fec4eb..0cd841477cbb 100644 --- a/share/man/man4/age.4 +++ b/share/man/man4/age.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 18, 2008 .Dt AGE 4 .Os diff --git a/share/man/man4/agp.4 b/share/man/man4/agp.4 index 5504a1d80a83..2aeb01850085 100644 --- a/share/man/man4/agp.4 +++ b/share/man/man4/agp.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 28, 2007 .Dt AGP 4 .Os @@ -32,6 +30,11 @@ .Nd "generic interface to the Accelerated Graphics Port (AGP)" .Sh SYNOPSIS .Cd "device agp" +.Sh DEPRECATION NOTICE +The +.Nm +driver is slated to be removed in +.Fx 15.0 . .Sh DESCRIPTION The .Nm diff --git a/share/man/man4/ahc.4 b/share/man/man4/ahc.4 index 1e7a9fdb3607..38712c1f08b6 100644 --- a/share/man/man4/ahc.4 +++ b/share/man/man4/ahc.4 @@ -24,8 +24,6 @@ .\" (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 February 15, 2017 .Dt AHC 4 .Os @@ -42,12 +40,6 @@ kernel configuration file: .Pp For one or more PCI cards: .Cd "device pci" -.Pp -To allow PCI adapters to use memory mapped I/O if enabled: -.Cd options AHC_ALLOW_MEMIO -.Pp -To configure one or more controllers to assume the target role: -.Cd options AHC_TMODE_ENABLE <bitmask of units> .Ed .Pp Alternatively, to load the driver as a @@ -68,29 +60,6 @@ Driver features include support for twin and wide busses, fast, ultra or ultra2 synchronous transfers depending on controller type, tagged queueing, SCB paging, and target mode. .Pp -Memory mapped I/O can be enabled for PCI devices with the -.Dq Dv AHC_ALLOW_MEMIO -configuration option. -Memory mapped I/O is more efficient than the alternative, programmed I/O. -Most PCI BIOSes will map devices so that either technique for communicating -with the card is available. -In some cases, -usually when the PCI device is sitting behind a PCI->PCI bridge, -the BIOS may fail to properly initialize the chip for memory mapped I/O. -The typical symptom of this problem is a system hang if memory mapped I/O -is attempted. -Most modern motherboards perform the initialization correctly and work fine -with this option enabled. -.Pp -Individual controllers may be configured to operate in the target role -through the -.Dq Dv AHC_TMODE_ENABLE -configuration option. -The value assigned to this option should be a bitmap -of all units where target mode is desired. -For example, a value of 0x25, would enable target mode on units 0, 2, and 5. -A value of 0x8a enables it for units 1, 3, and 7. -.Pp Per target configuration performed in the .Tn SCSI-Select menu, accessible at boot @@ -158,6 +127,48 @@ Multiple Target IDs - Allows the controller to respond to selection as a target on multiple SCSI IDs. .El .Ed +.Sh CONFIGURATION OPTIONS +.Pp +To allow PCI adapters to use memory mapped I/O if enabled: +.Pp +.Cd options AHC_ALLOW_MEMIO=(0 -- disabled, 1 -- enabled) +.Bd -ragged -offset indent +Memory mapped I/O is more efficient than the alternative, programmed I/O. +Most PCI BIOSes will map devices so that either technique for communicating +with the card is available. In some cases, usually when the PCI device is +sitting behind a PCI->PCI bridge, the BIOS may fail to properly initialize +the chip for memory mapped I/O. The typical symptom of this problem is a +system hang if memory mapped I/O is attempted. +.Pp +Most modern motherboards perform the initialization correctly and work fine +with this option enabled and it is the default. This option can also be +dynamically configued through a device hint documented below. +.Ed +.Pp +To statically configure one or more controllers to assume the target role: +.Pp +.Cd options AHC_TMODE_ENABLE=<bitmask of units> +.Bd -ragged -offset indent +The value assigned to this option should be a bitmap of all units where target +mode is desired. For example, a value of 0x25, would enable target mode on +units 0, 2, and 5. A value of 0x8a enables it for units 1, 3, and 7. +.Pp +Note that controllers can be dynamically configured through a device hint +documented below. +.Ed +.Sh BOOT OPTIONS +The following options are switchable by setting values in +.Pa /boot/device.hints . +.Pp +They are: +.Bl -tag -width indent +.It Va hint.ahc. Ns Ar N Ns Va .tmode_enable +A hint to define whether the SCSI target mode is enabled, defaults to disabled +(0 -- disabled, 1 -- enabled). +.It Va hint.ahc. Ns Ar N Ns Va .allow_memio +A hint to define whether memory mapped io is enabled or disabled for this +adapter, defaults to enabled (0 -- disabled, 1 -- enabled). +.El .Sh HARDWARE The .Nm diff --git a/share/man/man4/ahci.4 b/share/man/man4/ahci.4 index ba2bde4e34bd..70fe34904e63 100644 --- a/share/man/man4/ahci.4 +++ b/share/man/man4/ahci.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 17, 2021 .Dt AHCI 4 .Os diff --git a/share/man/man4/ahd.4 b/share/man/man4/ahd.4 index e00c42758ea7..c173a8cef619 100644 --- a/share/man/man4/ahd.4 +++ b/share/man/man4/ahd.4 @@ -26,8 +26,6 @@ .\" (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 July 4, 2004 .Dt AHD 4 .Os @@ -47,9 +45,6 @@ To compile in debugging code: .Cd options AHD_DEBUG .Cd options AHD_DEBUG_OPTS=<bitmask of options> .Cd options AHD_REG_PRETTY_PRINT -.Pp -To configure one or more controllers to assume the target role: -.Cd options AHD_TMODE_ENABLE=<bitmask of units> .Ed .Pp Alternatively, to load the driver as a @@ -101,15 +96,6 @@ that is printed by the debugging code. However, it also bloats the compiled size of the driver by approximately 215KB. .Pp -Individual controllers may be configured to operate in the target role -through the -.Dv AHD_TMODE_ENABLE -configuration option. -The value assigned to this option should be a bitmap -of all units where target mode is desired. -For example, a value of 0x25 would enable target mode on units 0, 2, and 5. -Note that target mode is only supported for ultra160 speeds and below. -.Pp Per target configuration performed in the .Tn SCSI-Select menu, accessible at boot, @@ -121,6 +107,28 @@ disconnection, and the host adapter's .Tn SCSI ID. +.Sh CONFIGURATION OPTIONS +To statically configure one or more controllers to assume the target role: +.Pp +.Cd options AHD_TMODE_ENABLE <bitmask of units> +.Bd -ragged -offset indent +The value assigned to this option should be a bitmap of all units where target +mode is desired. For example, a value of 0x25, would enable target mode on +units 0, 2, and 5. A value of 0x8a enables it for units 1, 3, and 7. +.Pp +Note that controllers can be dynamically configured through a device hint +documented below. + +.Ed +.Sh BOOT OPTIONS +The following options are switchable by setting values in +.Pa /boot/device.hints . +.Pp +They are: +.Bl -tag -width indent +.It Va hint.ahd. Ns Ar N Ns Va .tmode_enable +A hint to define whether the SCSI target mode is enabled (0 -- disabled, 1 -- enabled). +.El .Sh HARDWARE The .Nm diff --git a/share/man/man4/aibs.4 b/share/man/man4/aibs.4 index c760465ae638..f3bba5fbc586 100644 --- a/share/man/man4/aibs.4 +++ b/share/man/man4/aibs.4 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" $NetBSD: aibs.4,v 1.2 2010/02/09 05:37:25 cnst Exp $ .\" $OpenBSD: aibs.4,v 1.4 2009/07/30 06:30:45 jmc Exp $ .\" diff --git a/share/man/man4/aio.4 b/share/man/man4/aio.4 index 513a5728defc..21332a3b1037 100644 --- a/share/man/man4/aio.4 +++ b/share/man/man4/aio.4 @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2002 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2002 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 2, 2021 .Dt AIO 4 .Os diff --git a/share/man/man4/alc.4 b/share/man/man4/alc.4 index 6398f79ae1d1..5ce5ce97d68a 100644 --- a/share/man/man4/alc.4 +++ b/share/man/man4/alc.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 22, 2016 .Dt ALC 4 .Os @@ -138,7 +136,11 @@ This tunable disables MSI support on the Ethernet hardware. The default value is 0. .It Va hw.alc.msix_disable This tunable disables MSI-X support on the Ethernet hardware. -The default value is 0. +The default value is 2, which means to enable or disable MSI-X based on the +card type; for "Killer" cards (E2x00) MSI-X will be disabled, while on other +cards it will be enabled. +Set this to 0 to force MSI-X to be enabled, or 1 to force it to be disabled +regardless of card type. .El .Sh SYSCTL VARIABLES The following variables are available as both diff --git a/share/man/man4/ale.4 b/share/man/man4/ale.4 index 85fc6e24424c..fe48357c94f4 100644 --- a/share/man/man4/ale.4 +++ b/share/man/man4/ale.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 12, 2008 .Dt ALE 4 .Os diff --git a/share/man/man4/alpm.4 b/share/man/man4/alpm.4 index 5bfa8774a81f..5f8be9432de4 100644 --- a/share/man/man4/alpm.4 +++ b/share/man/man4/alpm.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 13, 1999 .Dt ALPM 4 .Os diff --git a/share/man/man4/altera_atse.4 b/share/man/man4/altera_atse.4 deleted file mode 100644 index 1cff0d05482f..000000000000 --- a/share/man/man4/altera_atse.4 +++ /dev/null @@ -1,119 +0,0 @@ -.\"- -.\" Copyright (c) 2013-2014 SRI International -.\" All rights reserved. -.\" -.\" This software was developed by SRI International and the University of -.\" Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) -.\" ("CTSRD"), as part of the DARPA CRASH research programme. -.\" -.\" 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 May 21, 2014 -.Dt ALTERA_ATSE 4 -.Os -.Sh NAME -.Nm atse -.Nd driver for the Altera Triple-Speed Ethernet MegaCore -.Sh SYNOPSIS -.Cd "device atse" -.Cd "options ATSE_CFI_HACK" -.Pp -In -.Pa /boot/device.hints : -.Cd hint.atse.0.at="nexus0" -.Cd hint.atse.0.maddr=0x7f007000 -.Cd hint.atse.0.msize=0x540 -.Cd hint.atse.0.rc_irq=1 -.Cd hint.atse.0.rx_maddr=0x7f007500 -.Cd hint.atse.0.rx_msize=0x8 -.Cd hint.atse.0.rxc_maddr=0x7f007520 -.Cd hint.atse.0.rxc_msize=0x20 -.Cd hint.atse.0.tx_irq=2 -.Cd hint.atse.0.tx_maddr=0x7f007400 -.Cd hint.atse.0.tx_msize=0x8 -.Cd hint.atse.0.txc_maddr=0x7f007420 -.Cd hint.atse.0.txc_msize=0x20 -.Cd hint.e1000phy.0.at="miibus0" -.Cd hint.e1000phy.0.phyno=0 -.Sh DESCRIPTION -The -.Nm -device driver provides support for the Altera Triple-Speed Ethernet -MegaCore. -.Sh HARDWARE -The current version of the -.Nm -driver supports the Ethernet MegaCore as described in version 11.1 of -Altera's documentation when the device is configured with internal FIFOs. -.Sh MAC SELECTION -The default MAC address for each -.Nm -interface is derived from a value stored in -.Xr cfi 4 -flash. -The value is managed by the -.Xr atsectl 8 -utility. -.Pp -Only a single MAC address may be stored in flash. -If the address begins with the Altera prefix 00:07:ed and ends in 00 then -up to 16 addresses will be derived from it by adding the unit number of -the interface to the stored address. -For other prefixes, the address will be assigned to atse0 and random -addresses will be used for other interfaces. -If the stored address is invalid, for example all zero's, multicast, or the -default address shipped on all DE4 boards (00:07:ed:ff:ed:15) then a random -address is generated when the device is attached. -.Sh SEE ALSO -.Xr miibus 4 , -.Xr netintro 4 , -.Xr ifconfig 8 -.Rs -.%T Triple-Speed Ethernet MegaCore Function User Guide -.%D November 2011 -.%I Altera Corporation -.Re -.Sh HISTORY -The -.Nm -device driver first appeared in -.Fx 10.0 . -.Sh AUTHORS -The -.Nm -device driver and this manual page were -developed by SRI International and the University of Cambridge Computer -Laboratory under DARPA/AFRL contract -.Pq FA8750-10-C-0237 -.Pq Do CTSRD Dc , -as part of the DARPA CRASH research programme. -This device driver was written by -.An Bjoern A. Zeeb . -.Sh BUGS -The -.Nm -driver only supports a single configuration of the MegaCore as installed -on the Terasic Technologies Altera DE4 Development and Education Board. -.Pp -Only gigabit Ethernet speeds are currently supported. diff --git a/share/man/man4/altera_avgen.4 b/share/man/man4/altera_avgen.4 deleted file mode 100644 index 2ba9360b7fc7..000000000000 --- a/share/man/man4/altera_avgen.4 +++ /dev/null @@ -1,155 +0,0 @@ -.\"- -.\" Copyright (c) 2012 Robert N. M. Watson -.\" All rights reserved. -.\" -.\" This software was developed by SRI International and the University of -.\" Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) -.\" ("CTSRD"), as part of the DARPA CRASH research programme. -.\" -.\" 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 August 18, 2012 -.Dt ALTERA_AVGEN 4 -.Os -.Sh NAME -.Nm altera_avgen -.Nd driver for generic Altera Avalon-bus-attached, memory-mapped devices -.Sh SYNOPSIS -.Cd "device altera_avgen" -.Pp -In -.Pa /boot/device.hints : -.Cd hint.altera_avgen.0.at="nexus0" -.Cd hint.altera_avgen.0.maddr=0x7f00a000 -.Cd hint.altera_avgen.0.msize=20 -.Cd hint.altera_avgen.0.width=4 -.Cd hint.altera_avgen.0.fileio="rw" -.Cd hint.altera_avgen.0.devname="berirom" -.Sh DESCRIPTION -The -.Nm -device driver provides generic support for memory-mapped devices on the -Altera Avalon bus. -.Pa device.hints -entries configure the address, size, I/O disposition, and -.Pa /dev -device node name that will be used. -The -.Xr open 2 , -.Xr read 2 , -.Xr write 2 , -and -.Xr mmap 2 -system calls (and variations) may be used on -.Nm -device nodes, subject to constraints imposed using -.Pa device.hints -entries. -Although reading and writing mapped memory is supported, -.Nm -does not currently support directing device interrupts to userspace. -.Pp -A number of -.Pa device.hints -sub-fields are available to configure -.Nm -device instances: -.Bl -tag -width devunit -.It maddr -base physical address of the memory region to export; must be aligned to -.Li width -.It msize -length of the memory region export; must be aligned to -.Li width -.It width -Granularity at which -.Xr read 2 -and -.Xr write 2 -operations will be performed. -Larger requests will be broken down into -.Li width -sized -operations; smaller requests will be rejected. -I/O operations must be aligned to -.Li width . -.It fileio -allowed file descriptor operations; -.Li r -authorizes -.Xr read 2 ; -.Li w -authorizes -.Xr write 2 . -.It mmapio -allowed -.Xr mmap 2 -permissions; -.Li w -authorizes -.Dv PROT_WRITE ; -.Li r -authorizes -.Dv PROT_READ ; -.Li x -authorizes -.Dv PROT_EXEC . -.It devname -specifies a device name relative to -.Pa /dev . -.It devunit -specifies a device unit number; no unit number is used if this is unspecified. -.El -.Sh SEE ALSO -.Xr mmap 2 , -.Xr open 2 , -.Xr read 2 , -.Xr write 2 -.Sh HISTORY -The -.Nm -device driver first appeared in -.Fx 10.0 . -.Sh AUTHORS -The -.Nm -device driver and this manual page were -developed by SRI International and the University of Cambridge Computer -Laboratory under DARPA/AFRL contract -.Pq FA8750-10-C-0237 -.Pq Do CTSRD Dc , -as part of the DARPA CRASH research programme. -This device driver was written by -.An Robert N. M. Watson . -.Sh BUGS -.Nm -is intended to support the writing of userspace device drivers; however, it -does not permit directing interrupts to userspace, only memory-mapped I/O. -.Pp -.Nm -supports only a -.Li nexus -bus attachment, which is appropriate for system-on-chip busses such as -Altera's Avalon bus. -If the target device is off of another bus type, then additional bus -attachments will be required. diff --git a/share/man/man4/altera_jtag_uart.4 b/share/man/man4/altera_jtag_uart.4 deleted file mode 100644 index 5b5a25f58f7d..000000000000 --- a/share/man/man4/altera_jtag_uart.4 +++ /dev/null @@ -1,121 +0,0 @@ -.\"- -.\" Copyright (c) 2012 Robert N. M. Watson -.\" All rights reserved. -.\" -.\" This software was developed by SRI International and the University of -.\" Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) -.\" ("CTSRD"), as part of the DARPA CRASH research programme. -.\" -.\" 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 August 18, 2012 -.Dt ALTERA_JTAG_UART 4 -.Os -.Sh NAME -.Nm altera_jtag_uart -.Nd driver for the Altera JTAG UART Core -.Sh SYNOPSIS -.Cd "device altera_jtag_uart" -.Pp -In -.Pa /boot/device.hints : -.Cd hint.altera_jtag_uart.0.at="nexus0" -.Cd hint.altera_jtag_uart.0.maddr=0x7f000000 -.Cd hint.altera_jtag_uart.0.msize=0x40 -.Cd hint.altera_jtag_uart.0.irq=0 -.Cd hint.altera_jtag_uart.1.at="nexus0" -.Cd hint.altera_jtag_uart.1.maddr=0x7f001000 -.Cd hint.altera_jtag_uart.1.msize=0x40 -.Sh DESCRIPTION -The -.Nm -device driver provides support for the Altera JTAG UART core, which allows -multiple UART-like streams to be carried over JTAG. -.Nm -allows JTAG UART streams to be attached to both the low-level console -interface, used for direct kernel input and output, and the -.Xr tty 4 -layer, to be used with -.Xr ttys 5 -and -.Xr login 1 . -Sequential Altera JTAG UART devices will appear as -.Li ttyu0 , -.Li ttyu1 , -etc. -.Sh HARDWARE -Altera JTAG UART devices can be connected to using Altera's -.Pa nios2-terminal -program, with the instance selected using the -.Li --instance -argument on the management host. -.Nm -supports JTAG UART cores with or without interrupt lines connected; if the -.Li irq -portion of the -.Pa device.hints -entry is omitted, the driver will poll rather than configure interrupts. -.Sh SEE ALSO -.Xr login 1 , -.Xr tty 4 , -.Xr ttys 5 -.Rs -.%T Altera Embedded Peripherals IP User Guide -.%D June 2011 -.%I Altera Corporation -.%U http://www.altera.com/literature/ug/ug_embedded_ip.pdf -.Re -.Sh HISTORY -The -.Nm -device driver first appeared in -.Fx 10.0 . -.Sh AUTHORS -The -.Nm -device driver and this manual page were -developed by SRI International and the University of Cambridge Computer -Laboratory under DARPA/AFRL contract -.Pq FA8750-10-C-0237 -.Pq Do CTSRD Dc , -as part of the DARPA CRASH research programme. -This device driver was written by -.An Robert N. M. Watson . -.Sh BUGS -.Nm -must dynamically poll to detect when JTAG is present, in order to disable flow -control in the event that there is no receiving endpoint. -Otherwise, the boot may hang waiting for the JTAG client to be attached, and -user processes attached to JTAG UART devices might block indefinitely. -However, there is no way to flush the output buffer once JTAG is detected to -have disappeared; this means that a small amount of stale output data will -remain in the output buffer, being displayed by -.Li nios2-terminal -when it is connected. -Loss of JTAG will not generate a hang-up event, as that is rarely the desired -behaviour. -.Pp -.Li nios2-terminal -does not place the client-side TTY in raw mode, and so by default will not -pass all control characters through to the UART. diff --git a/share/man/man4/altera_sdcard.4 b/share/man/man4/altera_sdcard.4 deleted file mode 100644 index 4155dcbd2c60..000000000000 --- a/share/man/man4/altera_sdcard.4 +++ /dev/null @@ -1,118 +0,0 @@ -.\"- -.\" Copyright (c) 2012 Robert N. M. Watson -.\" All rights reserved. -.\" -.\" This software was developed by SRI International and the University of -.\" Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) -.\" ("CTSRD"), as part of the DARPA CRASH research programme. -.\" -.\" 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 August 18, 2012 -.Dt ALTERA_SDCARD 4 -.Os -.Sh NAME -.Nm altera_sdcard -.Nd driver for the Altera University Program Secure Data Card IP Core -.Sh SYNOPSIS -.Cd "device altera_sdcard" -.Pp -In -.Pa /boot/device.hints : -.Cd hint.altera_sdcardc.0.at="nexus0" -.Cd hint.altera_sdcardc.0.maddr=0x7f008000 -.Cd hint.altera_sdcardc.0.msize=0x400 -.Sh DESCRIPTION -The -.Nm -device driver provides support for the Altera University Program Secure Data -Card (SD Card) IP Core device. -A controller device, -.Li altera_sdcardcX , -will be attached during boot. -Inserted disks are presented as -.Xr disk 9 -devices, -.Li altera_sdcardX , -corresponding to the controller number. -.Sh HARDWARE -The current version of the -.Nm -driver supports the SD Card IP core as described in the August 2011 version of -Altera's documentation. -The core supports only cards up to 2G (CSD 0); larger cards, or cards using -newer CSD versions, will not be detected. -The IP core has two key limitations: a lack of interrupt support, requiring -timer-driven polling to detect I/O completion, and support for only single -512-byte block read and write operations at a time. -The combined effect of those two limits is that the system clock rate, -.Dv HZ , -must be set to at least 200 in order to accomplish the maximum 100KB/s data -rate supported by the IP core. -.Sh SEE ALSO -.Xr disk 9 -.Rs -.%T Altera University Program Secure Data Card IP Core -.%D August 2011 -.%I Altera Corporation - University Program -.%U ftp://ftp.altera.com/up/pub/Altera_Material/11.0/University_Program_IP_Cores/Memory/SD_Card_Interface_for_SoPC_Builder.pdf -.Re -.Sh HISTORY -The -.Nm -device driver first appeared in -.Fx 10.0 . -.Sh AUTHORS -The -.Nm -device driver and this manual page were -developed by SRI International and the University of Cambridge Computer -Laboratory under DARPA/AFRL contract -.Pq FA8750-10-C-0237 -.Pq Do CTSRD Dc , -as part of the DARPA CRASH research programme. -This device driver was written by -.An Robert N. M. Watson . -.Sh BUGS -.Nm -contains a number of work-arounds for IP core bugs. -Perhaps most critically, -.Nm -ignores the CRC error bit returned in the RR1 register, which appears to be -unexpectedly set by the IP core. -.Pp -.Nm -uses fixed polling intervals are used for card insertion/removal and -I/O completion detection; an adaptive strategy might improve performance by -reducing the latency to detecting completed I/O. -However, in our experiments, using polling rates greater than 200 times a -second did not improve performance. -.Pp -.Nm -supports only a -.Li nexus -bus attachment, which is appropriate for system-on-chip busses such as -Altera's Avalon bus. -If the IP core is configured off of another bus type, then additional bus -attachments will be required. diff --git a/share/man/man4/altq.4 b/share/man/man4/altq.4 index 5e8989025cb3..a613802248a4 100644 --- a/share/man/man4/altq.4 +++ b/share/man/man4/altq.4 @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd January 26, 2021 +.Dd January 21, 2024 .Dt ALTQ 4 .Os .Sh NAME @@ -130,7 +128,6 @@ They have been applied to the following hardware drivers: .Xr age 4 , .Xr alc 4 , .Xr ale 4 , -.Xr an 4 , .Xr aue 4 , .Xr axe 4 , .Xr bce 4 , @@ -138,7 +135,6 @@ They have been applied to the following hardware drivers: .Xr bge 4 , .Xr bxe 4 , .Xr cas 4 , -.Xr cxgbe 4 , .Xr dc 4 , .Xr em 4 , .Xr epair 4 , @@ -146,7 +142,7 @@ They have been applied to the following hardware drivers: .Xr fxp 4 , .Xr gem 4 , .Xr igb 4 , -.Xr ixgbe 4 , +.Xr ix 4 , .Xr jme 4 , .Xr le 4 , .Xr liquidio 4 , @@ -155,7 +151,6 @@ They have been applied to the following hardware drivers: .Xr my 4 , .Xr nfe 4 , .Xr nge 4 , -.Xr npe 4 , .Xr qlxgb 4 , .Xr re 4 , .Xr rl 4 , @@ -173,19 +168,14 @@ and .Xr xl 4 . .Pp The -.Xr tun 4 +.Xr tun 4 , +.Xr if_bridge 4 , +.Xr if_vlan 4 , and .Xr ng_iface 4 pseudo drivers also do support .Nm . .Pp -The -.Xr vlan 4 -driver does not directly support -.Nm , -but as packets (mbufs) are passed to the underlying interface, a queue -can be defined for the underlying interface, and any packets directed -to the queue will be processed at the interface level. An example: .Bd -literal -offset indent altq on igb0 cbq queue { def aq } diff --git a/share/man/man4/amdpm.4 b/share/man/man4/amdpm.4 index a872d90b25d3..65d2706e5682 100644 --- a/share/man/man4/amdpm.4 +++ b/share/man/man4/amdpm.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 31, 2005 .Dt AMDPM 4 .Os diff --git a/share/man/man4/amdsbwd.4 b/share/man/man4/amdsbwd.4 index 5535f7c7b508..676b06fc1d03 100644 --- a/share/man/man4/amdsbwd.4 +++ b/share/man/man4/amdsbwd.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 8, 2016 .Dt AMDSBWD 4 .Os diff --git a/share/man/man4/amdsmb.4 b/share/man/man4/amdsmb.4 index 83a3176e9cb1..7f4b471a722d 100644 --- a/share/man/man4/amdsmb.4 +++ b/share/man/man4/amdsmb.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 31, 2005 .Dt AMDSMB 4 .Os diff --git a/share/man/man4/amdsmn.4 b/share/man/man4/amdsmn.4 index 8e279cc00319..fd3e247ac813 100644 --- a/share/man/man4/amdsmn.4 +++ b/share/man/man4/amdsmn.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 5, 2017 .Dt AMDSMN 4 .Os diff --git a/share/man/man4/amdtemp.4 b/share/man/man4/amdtemp.4 index 8d1764f7e877..cd876f5c67da 100644 --- a/share/man/man4/amdtemp.4 +++ b/share/man/man4/amdtemp.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 5, 2017 .Dt AMDTEMP 4 .Os @@ -83,6 +81,7 @@ tunable: Add the given offset to the temperature of the sensor. Default is 0. .Sh SEE ALSO +.Xr coretemp 4 , .Xr loader 8 , .Xr sysctl 8 .Sh HISTORY diff --git a/share/man/man4/aout.4 b/share/man/man4/aout.4 index 960ae25dd0b7..78c18e0c5f42 100644 --- a/share/man/man4/aout.4 +++ b/share/man/man4/aout.4 @@ -20,8 +20,6 @@ .\" (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 August 14, 2012 .Dt AOUT 4 .Os diff --git a/share/man/man4/apic.4 b/share/man/man4/apic.4 index da9b71ef6798..022acd878a51 100644 --- a/share/man/man4/apic.4 +++ b/share/man/man4/apic.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 19, 2020 .Dt APIC 4 .Os diff --git a/share/man/man4/arcmsr.4 b/share/man/man4/arcmsr.4 index 4efb946f6ddf..9356f4f23c8b 100644 --- a/share/man/man4/arcmsr.4 +++ b/share/man/man4/arcmsr.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 15, 2020 .Dt ARCMSR 4 .Os diff --git a/share/man/man4/arswitch.4 b/share/man/man4/arswitch.4 index 481a3a08f339..5bcd6c6810ee 100644 --- a/share/man/man4/arswitch.4 +++ b/share/man/man4/arswitch.4 @@ -22,14 +22,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd October 19, 2021 +.Dd May 11, 2025 .Dt ARSWITCH 4 .Os .Sh NAME .Nm arswitch -.Nd driver for Atheros Fast Ethernet switch +.Nd Atheros AR8000 series Ethernet switch driver .Sh SYNOPSIS .Cd "device mdio" .Cd "device etherswitch" @@ -37,22 +35,8 @@ .Sh DESCRIPTION The .Nm -device driver provides a management interface to multiple Atheros -fast ethernet switch chips: -.Bl -tag -compact -width "AR7240" -.It AR7240 -Wireless Network Processor SOC with five Fast Ethernet PHYs -.It AR8216 -Fast Ethernet Switch -.It AR8226 -.It AR8316 -Six-port Gigabit Ethernet Switch -.It AR8327 -Seven-port Gigabit Ethernet Switch -.It AR9340 -Wireless networking SoC -.El -.Pp +driver provides a management interface to Atheros AR8000 series Ethernet +switch controllers. The driver uses an .Xr mdio 4 or @@ -76,6 +60,23 @@ and are mutually exclusive. .Pp Setting the switch MAC address is not supported. +.Sh HARDWARE +The +.Nm +driver supports the following Ethernet switch controllers: +.Pp +.Bl -bullet -compact +.It +Atheros AR8327 Seven-port Gigabit Ethernet Switch +.It +Atheros AR8316 Six-port Gigabit Ethernet Switch +.It +Atheros AR8236 Six-port Fast Ethernet Switch +.It +Atheros AR8226 Six-port Fast Ethernet Switch +.It +Atheros AR8216 Six-port Fast Ethernet Switch +.El .Sh SEE ALSO .Xr etherswitch 4 , .Xr etherswitchcfg 8 diff --git a/share/man/man4/asmc.4 b/share/man/man4/asmc.4 index bd7720a96583..4bc2a040bbce 100644 --- a/share/man/man4/asmc.4 +++ b/share/man/man4/asmc.4 @@ -23,8 +23,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 2, 2019 .Dt ASMC 4 .Os diff --git a/share/man/man4/at45d.4 b/share/man/man4/at45d.4 index e0240e28f3d7..3b49f5cf7e40 100644 --- a/share/man/man4/at45d.4 +++ b/share/man/man4/at45d.4 @@ -22,8 +22,6 @@ .\" (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 March 2, 2019 .Dt AT45D 4 .Os diff --git a/share/man/man4/ata.4 b/share/man/man4/ata.4 index 4fb7a3a75874..feea1dd3cc85 100644 --- a/share/man/man4/ata.4 +++ b/share/man/man4/ata.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 23, 2015 .Dt ATA 4 .Os diff --git a/share/man/man4/ath.4 b/share/man/man4/ath.4 index 564238fd396e..e731277e4e75 100644 --- a/share/man/man4/ath.4 +++ b/share/man/man4/ath.4 @@ -25,10 +25,8 @@ .\" 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 DAMAGES. -.\" -.\" $FreeBSD$ .\"/ -.Dd June 16, 2020 +.Dd August 7, 2023 .Dt ATH 4 .Os .Sh NAME @@ -40,7 +38,6 @@ place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device ath" -.Cd "device ath_pci" .Cd "device ath_hal" .Cd "device ath_rate_sample" .Cd "device wlan" @@ -51,7 +48,6 @@ module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent if_ath_load="YES" -if_ath_pci_load="YES" .Ed .Sh DESCRIPTION The @@ -65,19 +61,6 @@ Supported features include 802.11 and 802.3 frames, power management, BSS, IBSS, MBSS, WDS/DWDS TDMA, and host-based access point operation modes. All host/device interaction is via DMA. .Pp -Please note that from FreeBSD-9.0, the -.Nm -driver does not include the PCI/PCIe bus glue. -The same driver supports multiple underlying bus types, including PCI/PCIe, -but also embedded (AHB) and USB in the future. -.Pp -To enable use for PCI/PCIe systems, see the -.Xr ath_pci 4 -driver. -For embedded systems which use the AHB to connect the wireless MAC, see the -.Xr ath_ahb 4 -driver. -.Pp The .Nm driver encapsulates all IP and ARP traffic as 802.11 frames, however diff --git a/share/man/man4/ath10k.4 b/share/man/man4/ath10k.4 new file mode 100644 index 000000000000..4e23382e2450 --- /dev/null +++ b/share/man/man4/ath10k.4 @@ -0,0 +1,103 @@ +.\"- +.\" Copyright (c) 2022-2024 Bjoern A. Zeeb +.\" +.\" 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. +.\" +.Dd September 30, 2024 +.Dt ATH10K 4 +.Os +.Sh NAME +.Nm ath10k +.Nd Qualcomm Atheros IEEE 802.11ac wireless network driver +.Sh SYNOPSIS +The driver will auto-load without any user interaction using +.Xr devmatch 8 +if enabled in +.Xr rc.conf 5 . +.Pp +Only if auto-loading is explicitly disabled, place the following +lines in +.Xr rc.conf 5 +to manually load the driver as a module at boot time: +.Bd -literal -offset indent +kld_list="${kld_list} if_ath10k" +.Ed +.Pp +It is discouraged to load the driver from +.Xr loader 8 . +.Sh DESCRIPTION +The +.Nm +driver is derived from Qualcomm Atheros' Linux ath10k driver +.Pp +This driver requires firmware to be loaded before it will work. +The package +.Pa wifi-firmware-ath10k-kmod +from the +.Pa ports/net/wifi-firmware-ath10k-kmod +port needs to be installed before the driver is loaded. +Otherwise no +.Xr wlan 4 +interface can be created using +.Xr ifconfig 8 . +The driver uses the +.\" No LinuxKPI man pages so no .Xr here. +.Em linuxkpi_wlan +and +.Em linuxkpi +compat framework to bridge between the Linux and +native +.Fx +driver code as well as to the native +.Xr net80211 4 +wireless stack. +.Pp +While +.Nm +supports all 802.11 a/b/g/n and ac +the compatibility code currently only supports 802.11 a/b/g modes. +Support for 802.11 n/ac is to come. +.Sh HARDWARE +The +.Nm +driver supports PCIe devices with the following chipsets: +.Pp +.Bl -tag -width Ds -offset indent -compact +.It QCA6174 +.It QCA9377 +.It QCA9887 +.It QCA9888 +.It QCA988X +.It QCA9984 +.It QCA99X0 +.El +.Sh SEE ALSO +.Xr wlan 4 , +.Xr ifconfig 8 , +.Xr wpa_supplicant 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 14.0 . +.Sh BUGS +Certainly. diff --git a/share/man/man4/ath_ahb.4 b/share/man/man4/ath_ahb.4 deleted file mode 100644 index 52aceb760657..000000000000 --- a/share/man/man4/ath_ahb.4 +++ /dev/null @@ -1,60 +0,0 @@ -.\"- -.\" Copyright (c) 2011 Adrian Chadd, Xenion Pty Ltd -.\" 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, -.\" without modification. -.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer -.\" similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any -.\" redistribution must be conditioned upon including a substantially -.\" similar Disclaimer requirement for further binary redistribution. -.\" -.\" NO WARRANTY -.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -.\" LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY -.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL -.\" THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. -.\" -.\" $FreeBSD$ -.\"/ -.Dd May 30, 2011 -.Dt ATH_AHB 4 -.Os -.Sh NAME -.Nm ath_ahb -.Nd "Atheros AHB device glue" -.Sh SYNOPSIS -.Cd "device ath_ahb" -.Sh DESCRIPTION -This module provides the AHB bus glue needed for the devices supported -by the -.Xr ath 4 -and -.Xr ath_hal 4 -drivers. -.Pp -This is only relevant for embedded System-on-Chip (SoC) devices such as -the Atheros AR913x series, which include an Atheros wireless MAC on-die. -.Sh SEE ALSO -.Xr ath 4 , -.Xr ath_hal 4 -.Sh HISTORY -The -.Nm -module first appeared in -.Fx 9.0 . -.Sh BUGS -See -.Xr ath 4 -for known bugs. diff --git a/share/man/man4/ath_hal.4 b/share/man/man4/ath_hal.4 index 940809a9c3c9..cc5349119244 100644 --- a/share/man/man4/ath_hal.4 +++ b/share/man/man4/ath_hal.4 @@ -25,10 +25,8 @@ .\" 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 DAMAGES. -.\" -.\" $FreeBSD$ .\"/ -.Dd January 25, 2019 +.Dd August 7, 2023 .Dt ATH_HAL 4 .Os .Sh NAME @@ -50,7 +48,6 @@ or .\".Cd "device ath_ar5312" .\".Cd "device ath_rf2136" .\".Cd "device ath_rf2137" -.Cd "device ath_ar9130" .Cd "device ath_ar9160" .Cd "device ath_ar9280" .Cd "device ath_ar9285" @@ -59,7 +56,7 @@ or .Sh DESCRIPTION The hal provides hardware support for wireless network adapters based on the Atheros AR5210, AR5211, AR5212, AR5213, AR2413, AR2417, AR2425, -AR5413, AR5416, AR5418, AR5424, AR9130, AR9160, AR9220, AR9280, AR9285, +AR5413, AR5416, AR5418, AR5424, AR9160, AR9220, AR9280, AR9285, AR9287, AR9380, AR9390, AR9580, AR9590, AR9562 and QCA9565 chips (and companion RF/baseband parts). This code is part of the diff --git a/share/man/man4/ath_pci.4 b/share/man/man4/ath_pci.4 deleted file mode 100644 index 0cc36d7268f3..000000000000 --- a/share/man/man4/ath_pci.4 +++ /dev/null @@ -1,57 +0,0 @@ -.\"- -.\" Copyright (c) 2011 Adrian Chadd, Xenion Pty Ltd -.\" 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, -.\" without modification. -.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer -.\" similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any -.\" redistribution must be conditioned upon including a substantially -.\" similar Disclaimer requirement for further binary redistribution. -.\" -.\" NO WARRANTY -.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -.\" LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY -.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL -.\" THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. -.\" -.\" $FreeBSD$ -.\"/ -.Dd May 30, 2011 -.Dt ATH_PCI 4 -.Os -.Sh NAME -.Nm ath_pci -.Nd "Atheros PCI device glue" -.Sh SYNOPSIS -.Cd "device ath_pci" -.Sh DESCRIPTION -This module provides the PCI/PCIe bus glue needed for the devices supported -by the -.Xr ath 4 -and -.Xr ath_hal 4 -drivers. -.Sh SEE ALSO -.Xr ath 4 , -.Xr ath_hal 4 -.Sh HISTORY -The -.Nm -module first appeared in -.Fx 9.0 . -.Sh BUGS -See -.Xr ath 4 -for known bugs. diff --git a/share/man/man4/atkbd.4 b/share/man/man4/atkbd.4 index 7ce99e70e467..84087364d779 100644 --- a/share/man/man4/atkbd.4 +++ b/share/man/man4/atkbd.4 @@ -24,8 +24,6 @@ .\" (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 29, 2008 .Dt ATKBD 4 .Os diff --git a/share/man/man4/atkbdc.4 b/share/man/man4/atkbdc.4 index d0fc50d145a5..48067c98a5be 100644 --- a/share/man/man4/atkbdc.4 +++ b/share/man/man4/atkbdc.4 @@ -24,9 +24,7 @@ .\" (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 February 9, 1999 +.Dd February 26, 2023 .Dt ATKBDC 4 .Os .Sh NAME @@ -35,6 +33,8 @@ .Sh SYNOPSIS .Cd "options KBD_RESETDELAY=N" .Cd "options KBD_MAXWAIT=N" +.Cd "options KBD_DELAY1=N" +.Cd "options KBD_DELAY2=N" .Cd "options KBDIO_DEBUG=N" .Cd "device atkbdc" .Pp @@ -90,6 +90,13 @@ The default values are and 5 for .Fa Y . +.It Em KBD_DELAY1=X, KBD_DELAY2=Y +DELAY1 sets the initial key repeat delay to +.Fa X . +The default value is 500ms. +DELAY2 sets the key repeat delay to +.Fa Y . +The default value is 100ms. .It Em KBDIO_DEBUG=N Sets the debug level to .Fa N . diff --git a/share/man/man4/atopcase.4 b/share/man/man4/atopcase.4 new file mode 100644 index 000000000000..a0c95a9e218f --- /dev/null +++ b/share/man/man4/atopcase.4 @@ -0,0 +1,134 @@ +.\" Copyright (c) 2023 Vladimir Kondratyev <wulf@FreeBSD.org> +.\" +.\" 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. +.\" +.Dd August 17, 2023 +.Dt ATOPCASE 4 +.Os +.Sh NAME +.Nm atopcase +.Nd Apple HID-over-SPI transport driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device atopcase" +.Cd "device intelspi" +.Cd "device spibus" +.Cd "device hidbus" +.Cd "device hkbd" +.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 +atopcase_load="YES" +hkbd_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for Human Interface Devices (HID) on +Serial Peripheral Interface (SPI) buses on Apple Intel Macs. +.Sh HARDWARE +The +.Nm +driver supports the following MacBooks produced in 2015-2018 years: +.Pp +.Bl -bullet -compact +.It +Macbook8,1 +.It +Macbook9,1 +.It +Macbook10,1 +.It +MacbookPro11,4 +.It +MacbookPro12,1 +.It +MacbookPro13,1 +.It +MacbookPro13,2 +.It +MacbookPro13,3 +.It +MacbookPro14,1 +.It +MacbookPro14,2 +.It +MacbookPro14,3 +.El +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width indent +.It Va hw.hid.atopcase.debug +Debug output level, where 0 is debugging disabled and larger values increase +debug message verbosity. +Default is 0. +.El +.Sh FILES +.Bl -tag -width ".Pa /dev/backlight/atopcase0" -compact +.It Pa /dev/backlight/atopcase0 +Keyboard +.Xr backlight 8 +device node. +.El +.Sh SEE ALSO +.Xr acpi 4 , +.Xr loader.conf 5 , +.Xr backlight 8 , +.Xr loader 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 14.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was originally written by +.An Val Packett Aq Mt val@packett.cool +and marginally improved upon by +.An Vladimir Kondratyev Aq Mt wulf@FreeBSD.org . +.Pp +This manual page was written by +.An Vladimir Kondratyev Aq Mt wulf@FreeBSD.org . +.Sh BUGS +Device interrupts are not acknowledged on some hardware that results in +interrupt storm. +Installation of Darwin OSI in +.Xr acpi 4 +driver fixes the issue. +To install Darwin OSI add following lines to +.Xr loader.conf 5 : +.Bl -tag -width indent +.It Va hw.acpi.install_interface="Darwin" +.It Va hw.acpi.remove_interface="Windows 2009, Windows 2012" +.El diff --git a/share/man/man4/atp.4 b/share/man/man4/atp.4 index b622bb0b6380..3c0c59348847 100644 --- a/share/man/man4/atp.4 +++ b/share/man/man4/atp.4 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 24, 2014 .Dt ATP 4 .Os diff --git a/share/man/man4/atrtc.4 b/share/man/man4/atrtc.4 index 3a046a34a587..942d6fe09f73 100644 --- a/share/man/man4/atrtc.4 +++ b/share/man/man4/atrtc.4 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd September 17, 2010 +.Dd December 15, 2022 .Dt ATRTC 4 .Os .Sh NAME @@ -40,7 +38,7 @@ The following tunables are settable from the controls event timers functionality support. Setting to 0, disables it. Default value is 1. -.It Va hw.atrtc.enable +.It Va hw.atrtc.enabled Forces enabling or disabling of the device(s). Setting to 0 disables it, setting to 1 enables it, bypassing any platform configuration hints. diff --git a/share/man/man4/attimer.4 b/share/man/man4/attimer.4 index 097e07335978..a24cc6fe9243 100644 --- a/share/man/man4/attimer.4 +++ b/share/man/man4/attimer.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 26, 2014 .Dt ATTIMER 4 .Os diff --git a/share/man/man4/audit.4 b/share/man/man4/audit.4 index f8430edf348b..54434101f490 100644 --- a/share/man/man4/audit.4 +++ b/share/man/man4/audit.4 @@ -27,8 +27,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 28, 2019 .Dt AUDIT 4 .Os diff --git a/share/man/man4/auditpipe.4 b/share/man/man4/auditpipe.4 index 7dc9cdaff509..415216f51dcd 100644 --- a/share/man/man4/auditpipe.4 +++ b/share/man/man4/auditpipe.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 28, 2019 .Dt AUDITPIPE 4 .Os diff --git a/share/man/man4/aue.4 b/share/man/man4/aue.4 index 043200e857b0..9b82fdc4ba55 100644 --- a/share/man/man4/aue.4 +++ b/share/man/man4/aue.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-4-Clause +.\" .\" Copyright (c) 1997, 1998, 1999 .\" Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. .\" @@ -28,14 +31,12 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd November 24, 2015 +.Dd May 26, 2025 .Dt AUE 4 .Os .Sh NAME .Nm aue -.Nd ADMtek AN986 Pegasus USB Ethernet driver +.Nd ADMtek AN986 Pegasus USB Fast Ethernet driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -58,8 +59,8 @@ if_aue_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for USB Ethernet adapters based on the ADMtek -AN986 Pegasus chipset. +driver provides support for USB Fast Ethernet adapters based on the +ADMtek AN986 Pegasus chipset. .Pp The LinkSys USB10T adapters that contain the AN986 Pegasus chipset will operate at 100Base-TX and full-duplex. @@ -127,9 +128,10 @@ half duplex mode if this media option is not specified. For more information on configuring this device, see .Xr ifconfig 8 . .Sh HARDWARE -Adapters supported by the +The .Nm -driver include: +driver supports the following USB Fast Ethernet adapters based on the +ADMtek AN986 Pegasus chipset: .Pp .Bl -bullet -compact .It diff --git a/share/man/man5/autofs.5 b/share/man/man4/autofs.4 index 8ab302e339b3..a721a6e27a53 100644 --- a/share/man/man5/autofs.5 +++ b/share/man/man4/autofs.4 @@ -24,10 +24,8 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 2, 2017 -.Dt AUTOFS 5 +.Dt AUTOFS 4 .Os .Sh NAME .Nm autofs diff --git a/share/man/man4/axe.4 b/share/man/man4/axe.4 index 060dcc9d72bf..023175fe3946 100644 --- a/share/man/man4/axe.4 +++ b/share/man/man4/axe.4 @@ -28,8 +28,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 24, 2015 .Dt AXE 4 .Os diff --git a/share/man/man4/axge.4 b/share/man/man4/axge.4 index 47a10a82606f..7133ee3253eb 100644 --- a/share/man/man4/axge.4 +++ b/share/man/man4/axge.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-4-Clause +.\" .\" Copyright (c) 1997, 1998, 1999, 2000-2003 .\" Bill Paul <wpaul@windriver.com>. All rights reserved. .\" @@ -28,14 +31,12 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd November 24, 2015 +.Dd May 25, 2025 .Dt AXGE 4 .Os .Sh NAME .Nm axge -.Nd "ASIX Electronics AX88178A/AX88179 USB Gigabit Ethernet driver" +.Nd "ASIX Electronics AX88178A/179/179A USB Gigabit Ethernet driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -61,13 +62,13 @@ if_axge_load="YES" The .Nm driver provides support for USB Gigabit Ethernet adapters based on the ASIX -Electronics AX88179 USB 3.0 and AX88178A USB 2.0 chipsets. +Electronics AX88179/AX88179A USB 3.0 and AX88178A USB 2.0 chipsets. .Pp -The AX88179 and AX88178A contain a 10/100/1000 Ethernet MAC with a GMII -interface for interfacing with the Gigabit Ethernet PHY. +The AX88179, AX88179A and AX88178A contain a 10/100/1000 Ethernet MAC with a +GMII interface for interfacing with the Gigabit Ethernet PHY. .Pp These devices will operate with both USB 1.x and USB 2.0 controllers, and the -AX88179 will operate with USB 3.0 controllers. +AX88179/AX88179A will operate with USB 3.0 controllers. Packets are received and transmitted over separate USB bulk transfer endpoints. .Pp The @@ -123,6 +124,19 @@ Force half duplex operation. .Pp For more information on configuring this device, see .Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports the following USB Gigabit Ethernet controllers: +.Pp +.Bl -bullet -compact +.It +ASIX Electronics AX88179A +.It +ASIX Electronics AX88179 +.It +ASIX Electronics AX88178A +.El .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , diff --git a/share/man/man4/bce.4 b/share/man/man4/bce.4 index 9d7fc9dd19c0..ab979f371b66 100644 --- a/share/man/man4/bce.4 +++ b/share/man/man4/bce.4 @@ -22,8 +22,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 4, 2012 .Dt BCE 4 .Os diff --git a/share/man/man4/bcm5974.4 b/share/man/man4/bcm5974.4 index 48659754b4e5..378a2c939f9e 100644 --- a/share/man/man4/bcm5974.4 +++ b/share/man/man4/bcm5974.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 27, 2022 .Dt BCM5974 4 .Os diff --git a/share/man/man4/bcma.4 b/share/man/man4/bcma.4 index fe416c63a218..de1a25bff0d8 100644 --- a/share/man/man4/bcma.4 +++ b/share/man/man4/bcma.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 3, 2016 .Dt BCMA 4 .Os diff --git a/share/man/man4/bfe.4 b/share/man/man4/bfe.4 index 307813b7ab4f..c961683a2091 100644 --- a/share/man/man4/bfe.4 +++ b/share/man/man4/bfe.4 @@ -23,8 +23,6 @@ .\" (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 July 16, 2005 .Dt BFE 4 .Os @@ -46,6 +44,13 @@ module at boot time, place the following line in .Bd -literal -offset indent if_bfe_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is unmaintained and may be removed from +.Fx +in a future release. +.Fx . .Sh DESCRIPTION The .Nm diff --git a/share/man/man4/bge.4 b/share/man/man4/bge.4 index 50c0cf9c9b8c..de559c16df3c 100644 --- a/share/man/man4/bge.4 +++ b/share/man/man4/bge.4 @@ -29,8 +29,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 18, 2017 .Dt BGE 4 .Os diff --git a/share/man/man4/bhnd.4 b/share/man/man4/bhnd.4 index f008794d9c75..1bf1039868a9 100644 --- a/share/man/man4/bhnd.4 +++ b/share/man/man4/bhnd.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 3, 2016 .Dt BHND 4 .Os diff --git a/share/man/man4/bhnd_chipc.4 b/share/man/man4/bhnd_chipc.4 index ea87b4bf5930..b4fbeea9d278 100644 --- a/share/man/man4/bhnd_chipc.4 +++ b/share/man/man4/bhnd_chipc.4 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 16, 2017 .Dt BHND_CHIPC 4 .Os diff --git a/share/man/man4/bhnd_pmu.4 b/share/man/man4/bhnd_pmu.4 index 8894f4f22856..6ad913e40527 100644 --- a/share/man/man4/bhnd_pmu.4 +++ b/share/man/man4/bhnd_pmu.4 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 16, 2017 .Dt BHND_PMU 4 .Os diff --git a/share/man/man4/bhndb.4 b/share/man/man4/bhndb.4 index a55082039fdf..683ae4678d47 100644 --- a/share/man/man4/bhndb.4 +++ b/share/man/man4/bhndb.4 @@ -26,8 +26,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 16, 2017 .Dt BHNDB 4 .Os diff --git a/share/man/man4/bhndb_pci.4 b/share/man/man4/bhndb_pci.4 index 1713c5f3d41f..53b2d42fa1b3 100644 --- a/share/man/man4/bhndb_pci.4 +++ b/share/man/man4/bhndb_pci.4 @@ -26,8 +26,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 16, 2017 .Dt BHNDB_PCI 4 .Os diff --git a/share/man/man4/bhyve.4 b/share/man/man4/bhyve.4 index f65485592651..a87acaf20fab 100644 --- a/share/man/man4/bhyve.4 +++ b/share/man/man4/bhyve.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 5, 2013 .Dt BHYVE 4 .Os diff --git a/share/man/man4/blackhole.4 b/share/man/man4/blackhole.4 index 17d1286525e4..bb955fd4497d 100644 --- a/share/man/man4/blackhole.4 +++ b/share/man/man4/blackhole.4 @@ -10,9 +10,7 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.\" -.\" $FreeBSD$ -.Dd November 3, 2021 +.Dd May 25, 2024 .Dt BLACKHOLE 4 .Os .Sh NAME @@ -23,7 +21,7 @@ MIB for manipulating behaviour in respect of refused SCTP, TCP, or UDP connectio attempts .Sh SYNOPSIS .Cd sysctl net.inet.sctp.blackhole Ns Op = Ns Brq "0 | 1 | 2" -.Cd sysctl net.inet.tcp.blackhole Ns Op = Ns Brq "0 | 1 | 2" +.Cd sysctl net.inet.tcp.blackhole Ns Op = Ns Brq "0 | 1 | 2 | 3" .Cd sysctl net.inet.tcp.blackhole_local Ns Op = Ns Brq "0 | 1" .Cd sysctl net.inet.udp.blackhole Ns Op = Ns Brq "0 | 1" .Cd sysctl net.inet.udp.blackhole_local Ns Op = Ns Brq "0 | 1" @@ -32,7 +30,8 @@ The .Nm .Xr sysctl 8 MIB is used to control system behaviour when connection requests -are received on SCTP, TCP, or UDP ports where there is no socket listening. +are received on SCTP, TCP, or UDP ports where there is no socket listening +or unexpected packets are received on listening sockets. .Pp The blackhole behaviour is useful to slow down an attacker who is port-scanning a system in an attempt to detect vulnerable services. @@ -53,7 +52,7 @@ when unexpected packets are received. .Ss TCP Normal behaviour, when a TCP SYN segment is received on a port where there is no socket accepting connections, is for the system to return -a RST segment, and drop the connection. +a RST segment, and drop the incoming SYN segment. The connecting system will see this as a .Dq Connection refused . @@ -63,6 +62,9 @@ is merely dropped, and no RST is sent, making the system appear as a blackhole. By setting the MIB value to two, any segment arriving on a closed port is dropped without returning a RST. +Setting the MIB value to three, any segment arriving on a closed port +or an unexpected segment on a listening port is dropped without sending a +RST in reply. This provides some degree of protection against stealth port scans. .Ss UDP Enabling blackhole behaviour turns off the sending diff --git a/share/man/man4/bnxt.4 b/share/man/man4/bnxt.4 index a7b3615437fb..0900a11cecea 100644 --- a/share/man/man4/bnxt.4 +++ b/share/man/man4/bnxt.4 @@ -23,8 +23,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 18, 2020 .Dt BNXT 4 .Os @@ -50,7 +48,7 @@ if_bnxt_load="YES" The .Nm driver provides support for various NICs based on the Broadcom BCM57301/2/4, -and BCM57402/4/6 Ethernet controller chips. +BCM57402/4/6, and BCM57502/4/8 Ethernet controller chips. .Pp For more information on configuring this device, see .Xr ifconfig 8 . @@ -104,6 +102,12 @@ Broadcom BCM57416 NetXtreme-E Partition Broadcom BCM57417 NetXtreme-E Ethernet Partition .It Broadcom BCM57454 NetXtreme-E 10Gb/25Gb/40Gb/50Gb/100Gb Ethernet +.It +Broadcom BCM57502 NetXtreme-E 10Gb/25Gb/50Gb/100Gb/200Gb Ethernet +.It +Broadcom BCM57504 NetXtreme-E 10Gb/25Gb/50Gb/100Gb/200Gb Ethernet +.It +Broadcom BCM57508 NetXtreme-E 10Gb/25Gb/50Gb/100Gb/200Gb Ethernet .El .Sh SYSCTL VARIABLES These variables must be set before loading the driver, either via diff --git a/share/man/man4/bnxt_re.4 b/share/man/man4/bnxt_re.4 new file mode 100644 index 000000000000..e2bb87c320b1 --- /dev/null +++ b/share/man/man4/bnxt_re.4 @@ -0,0 +1,91 @@ +.\" Copyright (c) 2024 Broadcom, 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 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 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. +.\" +.Dd May 15, 2024 +.Dt BNXT_RE 4 +.Os +.Sh NAME +.Nm bnxt_re +.Nd "Broadcom NetXtreme-E RoCE driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place these lines in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "options COMPAT_LINUXKPI" +.Cd "device bnxt" +.Cd "device bnxt_re" +.Ed +.Pp +To load the driver as a module at run-time, +run this command as root: +.Bd -literal -offset indent +kldload bnxt_re +.Ed +.Pp +To load the driver as a +module at boot time, place this line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +bnxt_re_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for Remote Direct Memory Access (RDMA) over +Converged Ethernet (RoCE) for Broadcom NetXtreme-E PCI Express network +adapters. +.Sh HARDWARE +The +.Nm +driver provides support for NetXtreme-E BCM575xx 10/20/25/40/50/100/200Gb +network adapters, including: +.Pp +.Bl -bullet -compact +.It +Broadcom BCM57502 NetXtreme-E 10Gb/25Gb/50Gb/100Gb/200Gb Ethernet +.It +Broadcom BCM57504 NetXtreme-E 10Gb/25Gb/50Gb/100Gb/200Gb Ethernet +.It +Broadcom BCM57508 NetXtreme-E 10Gb/25Gb/50Gb/100Gb/200Gb Ethernet +.El +.Sh SUPPORT +For general information and support, +go to the Broadcom support website at: +.Pa http://www.broadcom.com/ . +.Pp +Report driver issues with supported adapters to +.Aq Mt freebsd.pdl@broadcom.com . +.Sh SEE ALSO +.Xr bnxt_re 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 15.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Broadcom <freebsd.pdl@broadcom.com> . diff --git a/share/man/man4/boottrace.4 b/share/man/man4/boottrace.4 index 2a6c9764eb04..01cce4c4e84a 100644 --- a/share/man/man4/boottrace.4 +++ b/share/man/man4/boottrace.4 @@ -1,4 +1,4 @@ -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2022 NetApp, Inc. .\" diff --git a/share/man/man4/bpf.4 b/share/man/man4/bpf.4 index f07279566ee4..8082f6eac39a 100644 --- a/share/man/man4/bpf.4 +++ b/share/man/man4/bpf.4 @@ -47,8 +47,6 @@ .\" This document is derived in part from the enet man page (enet.4) .\" distributed with 4.3BSD Unix. .\" -.\" $FreeBSD$ -.\" .Dd October 13, 2021 .Dt BPF 4 .Os @@ -667,7 +665,7 @@ Set the VLAN PCP bits to the supplied value. now supports several standard .Xr ioctl 2 Ns 's which allow the user to do async and/or non-blocking I/O to an open -.I bpf +.Em bpf file descriptor. .Bl -tag -width SIOCGIFADDR .It Dv FIONREAD diff --git a/share/man/man4/bridge.4 b/share/man/man4/bridge.4 index e193724928ca..2dff393ebc29 100644 --- a/share/man/man4/bridge.4 +++ b/share/man/man4/bridge.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-4-Clause +.\" .\" $NetBSD: bridge.4,v 1.5 2004/01/31 20:14:11 jdc Exp $ .\" .\" Copyright 2001 Wasabi Systems, Inc. @@ -33,9 +36,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd November 17, 2021 +.Dd July 5, 2025 .Dt IF_BRIDGE 4 .Os .Sh NAME @@ -78,10 +79,12 @@ command or using the variable in .Xr rc.conf 5 . .Pp -The +When it is created, the .Nm -interface randomly chooses a link (MAC) address in the range reserved for -locally administered addresses when it is created. +interface gets assigned a link (MAC) address in the range of universally +administered addresses reserved for the FreeBSD Foundation by hashing +the host UUID, jail name, and the interface name. +If this fails, a random, locally administered address is generated instead. This address is guaranteed to be unique .Em only across all @@ -118,7 +121,17 @@ interfaces that are part of the bridge. For unicast traffic, the bridge learns which MAC addresses are associated with which interfaces and will forward the traffic selectively. .Pp -All the bridged member interfaces need to be up in order to pass network traffic. +By default the bridge logs MAC address port flapping to +.Xr syslog 3 . +This behavior can be disabled by setting the +.Xr sysctl 8 +variable +.Va net.link.bridge.log_mac_flap +to +.Li 0 . +.Pp +All the bridged member interfaces need to be up +in order to pass network traffic. These can be enabled using .Xr ifconfig 8 or @@ -127,7 +140,9 @@ in .Xr rc.conf 5 . .Pp The MTU of the first member interface to be added is used as the bridge MTU. -All additional members are required to have exactly the same MTU value. +All additional members will have their MTU changed to match. +If the MTU of a bridge is changed after its creation, the MTU of all member +interfaces is also changed to match. .Pp The TOE, TSO, TXCSUM and TXCSUM6 capabilities on all interfaces added to the bridge are disabled if any of the interfaces do not support/enable them. @@ -145,6 +160,25 @@ This can be used to multiplex the input of two or more interfaces into a single stream. This is useful for reconstructing the traffic for network taps that transmit the RX/TX signals out through two separate interfaces. +.Pp +To allow the host to communicate with bridge members, IP addresses +should be assigned to the +.Nm +interface itself, not to the bridge's member interfaces. +Attempting to assign an IP address to a bridge member interface, or add +a member interface with an assigned IP address to a bridge, will return +an +.Dv EINVAL +.Dq ( "Invalid argument" ) +error. +For compatibility with older releases where this was permitted, setting +the +.Xr sysctl 8 +variable +.Va net.link.bridge.member_ifaddrs +to 1 will permit this configuration. +This sysctl variable will be removed in +.Fx 16.0. .Sh IPV6 SUPPORT .Nm supports the @@ -156,11 +190,6 @@ variable configures an IPv6 link-local address on .Li bridge0 interface: .Bd -literal -offset indent -ifconfig_bridge0_ipv6="up" -.Ed -.Pp -or in a more explicit manner: -.Bd -literal -offset indent ifconfig_bridge0_ipv6="inet6 auto_linklocal" .Ed .Pp @@ -242,6 +271,54 @@ by setting the .Va net.link.bridge.log_stp node using .Xr sysctl 8 . +.Sh VLAN SUPPORT +The +.Nm +driver has full support for virtual LANs (VLANs). +The bridge implements independent VLAN learning, i.e. MAC addresses are +learned on a per-VLAN basis, and the same MAC address may be learned on +multiple interfaces on different VLANs. +Incoming frames with an 802.1Q tag will be assigned to the appropriate +VLAN. +.Pp +Traffic sent to or from the host is not assigned to a VLAN by default. +To allow the host to communicate on a VLAN, configure a +.Xr vlan 4 +interface on the bridge and (if necessary) assign IP addresses there. +.Pp +By default no access control is enabled, so any interface may +participate in any VLAN. +.Pp +VLAN filtering may be enabled on an interface using the +.Xr ifconfig 8 +.Cm vlanfilter +option. +When VLAN filtering is enabled, an interface may only send and receive +frames based on its configured VLAN access list. +.Pp +The interface's untagged VLAN ID may be configured using the +.Xr ifconfig 8 +.Cm untagged +option. +If an untagged VLAN ID is configured, incoming frames will be assigned +to that VLAN, and the interface may receive outgoing untagged frames +in that VLAN. +.Pp +The tagged VLAN access list may be configured using the +.Cm tagged , +.Cm +tagged +and +.Cm -tagged +options to +.Xr ifconfig 8 . +An interface may send and receive tagged frames for any VLAN in its +access list. +.Pp +The bridge will automatically insert or remove 802.1q tags as needed, +based on the interface configuration, when forwarding frames between +interfaces. +This tag processing is only done for interfaces with VLAN filtering +enabled. .Sh PACKET FILTERING Packet filtering can be used with any firewall package that hooks in via the .Xr pfil 9 @@ -252,7 +329,7 @@ the appropriate interfaces. Either stage can be disabled. The filtering behavior can be controlled using .Xr sysctl 8 : -.Bl -tag -width ".Va net.link.bridge.pfil_onlyip" +.Bl -tag -width indent .It Va net.link.bridge.pfil_onlyip Controls the handling of non-IP packets which are not passed to .Xr pfil 9 . @@ -410,6 +487,29 @@ interface and not to the bridge members. Enabling .Va net.link.bridge.pfil_local_phys will let you do the additional filtering on the physical interface. +.Sh NETMAP +.Xr netmap 4 +applications may open a bridge interface in emulated mode. +The netmap application will receive all packets which arrive from member +interfaces. +In particular, packets which would otherwise be forwarded to another +member interface will be received by the netmap application. +.Pp +When the +.Xr netmap 4 +application transmits a packet to the host stack via the bridge interface, +.Nm +receive it and attempts to determine its +.Ql source +interface by looking up the source MAC address in the interface's learning +tables. +Packets for which no matching source interface is found are dropped and the +input error counter is incremented. +If a matching source interface is found, +.Nm +treats the packet as though it was received from the corresponding interface +and handles it normally without passing the packet back to +.Xr netmap 4 . .Sh EXAMPLES The following when placed in the file .Pa /etc/rc.conf @@ -438,8 +538,8 @@ ifconfig_fxp0="up" .Ed .Pp Consider a system with two 4-port Ethernet boards. -The following will cause a bridge consisting of all 8 ports with Rapid Spanning -Tree enabled to be created: +The following will cause a bridge consisting of all 8 ports with +Rapid Spanning Tree enabled to be created: .Bd -literal -offset indent ifconfig bridge0 create ifconfig bridge0 \e @@ -484,7 +584,9 @@ ifconfig bridge0 addm fxp0 addm gif0 up .Xr gif 4 , .Xr ipf 4 , .Xr ipfw 4 , +.Xr netmap 4 , .Xr pf 4 , +.Xr vlan 4 , .Xr ifconfig 8 .Sh HISTORY The @@ -511,4 +613,5 @@ Rapid Spanning Tree Protocol (RSTP) support was added by The .Nm driver currently supports only Ethernet and Ethernet-like (e.g., 802.11) -network devices, with exactly the same interface MTU size as the bridge device. +network devices, which can be configured with the same MTU size as the bridge +device. diff --git a/share/man/man4/bwi.4 b/share/man/man4/bwi.4 index eeccca16c1dd..81e8ef12b023 100644 --- a/share/man/man4/bwi.4 +++ b/share/man/man4/bwi.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 7, 2015 .Dt BWI 4 .Os diff --git a/share/man/man4/bwn.4 b/share/man/man4/bwn.4 index 6301b7aba46f..a602dea5bdec 100644 --- a/share/man/man4/bwn.4 +++ b/share/man/man4/bwn.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 16, 2017 .Dt BWN 4 .Os diff --git a/share/man/man4/bxe.4 b/share/man/man4/bxe.4 index 98d3040ef454..c82565e19583 100644 --- a/share/man/man4/bxe.4 +++ b/share/man/man4/bxe.4 @@ -22,8 +22,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 29, 2012 .Dt BXE 4 .Os @@ -144,7 +142,7 @@ scheduled taskqueue. .It Va hw.bxe.max_aggregation_size DEFAULT = 32768 .br -Sets the maximum LRO aggregration byte size. +Sets the maximum LRO aggregation byte size. The higher the value the more packets the hardware will aggregate. Maximum is 65K. diff --git a/share/man/man4/bytgpio.4 b/share/man/man4/bytgpio.4 index e6a7fac54977..7050191436f0 100644 --- a/share/man/man4/bytgpio.4 +++ b/share/man/man4/bytgpio.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 9, 2017 .Dt BYTGPIO 4 .Os diff --git a/share/man/man4/capsicum.4 b/share/man/man4/capsicum.4 index d9ff9c489fd0..1de8e4531f4f 100644 --- a/share/man/man4/capsicum.4 +++ b/share/man/man4/capsicum.4 @@ -24,9 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 19, 2022 +.Dd June 17, 2025 .Dt CAPSICUM 4 .Os .Sh NAME @@ -39,6 +37,12 @@ .Nm is a lightweight OS capability and sandbox framework implementing a hybrid capability system model. +.Nm +is designed to blend capabilities with UNIX. +This approach achieves many of the benefits of least-privilege operation, while +preserving existing UNIX APIs and performance, and presents application authors +with an adoption path for capability-oriented design. +.Pp Capabilities are unforgeable tokens of authority that can be delegated and must be presented to perform an action. .Nm @@ -61,6 +65,34 @@ namespaces) is restricted; only explicitly delegated rights, referenced by memory mappings or file descriptors, may be used. Once set, the flag is inherited by future children processes, and may not be cleared. +.Pp +Access to system calls in capability mode is restricted: some system calls +requiring global namespace access are unavailable, while others are +constrained. +For instance, +.Xr sysctl 2 +can be used to query process-local information such as address space layout, +but also to monitor a system’s network connections. +.Xr sysctl 2 +is constrained by explicitly marking \(~~60 of over 15000 parameters as permitted +in capability mode; all others are denied. +.Pp +The system calls which require constraints are +.Xr sysctl 2 , +.Xr shm_open 2 +.Pq which is permitted to create anonymous memory objects but not named ones +and the +.Xr openat 2 +family of system calls. +The +.Xr openat 2 +calls already accept a file descriptor argument as the directory to perform the +.Xr open 2 , +.Xr rename 2 , +etc. relative to; in capability mode the +.Xr openat 2 +family of system calls are constrained so that they can only operate on +objects “under” the provided file descriptor. .It capabilities Limit operations that can be called on file descriptors. For example, a file descriptor returned by @@ -103,6 +135,20 @@ restrict access to global namespaces: Processes can only act upon their own process ID with syscalls such as .Xr cpuset_setaffinity 2 . .El +.Pp +.Fx +provides some additional functionality to support application sandboxing that +is not part of +.Nm +itself: +.Bl -tag -width indent +.It Xr capsicum_helpers 3 +A set of a inline functions which simplify modifying programs to use +.Nm . +.It Xr libcasper 3 +A library that provides services for sandboxed applications, such as operating +on files specified on a command line or establishing network connections. +.El .Sh SEE ALSO .Xr cap_enter 2 , .Xr cap_fcntls_limit 2 , @@ -119,6 +165,7 @@ Processes can only act upon their own process ID with syscalls such as .Xr shm_open 2 , .Xr write 2 , .Xr cap_rights_get 3 , +.Xr capsicum_helpers 3 , .Xr libcasper 3 , .Xr procdesc 4 .Sh HISTORY @@ -139,3 +186,14 @@ and .An Kris Kennaway Aq Mt kris@FreeBSD.org at Google, Inc., and .An Pawel Jakub Dawidek Aq Mt pawel@dawidek.net . +Portions of this manual page are drawn from +.Rs +.%A Robert N. M. Watson +.%A Jonathan Anderson +.%A Ben Laurie +.%A Kris Kennaway +.%T Capsicum: practical capabilities for UNIX +.%J USENIX Security Symposium +.%D August 2010 +.%O DOI: 10.5555/1929820.1929824 +.Re diff --git a/share/man/man4/cardbus.4 b/share/man/man4/cardbus.4 index ddd886dde9bb..3b422b44c464 100644 --- a/share/man/man4/cardbus.4 +++ b/share/man/man4/cardbus.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 9, 2002 .Dt CARDBUS 4 .Os diff --git a/share/man/man4/carp.4 b/share/man/man4/carp.4 index 2785b97e76ac..c972e0288791 100644 --- a/share/man/man4/carp.4 +++ b/share/man/man4/carp.4 @@ -24,9 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 1, 2018 +.Dd April 12, 2024 .Dt CARP 4 .Os .Sh NAME @@ -78,6 +76,34 @@ or through the .Dv SIOCSVH .Xr ioctl 2 . .Pp +CARP defaults to using multicast messages, but can be configured to unicast +announcements to peers using the +.Cm peer +and +.Cm peer6 +parameters. Default addresses can be restored using +.Cm mcast +and +.Cm mcast6 . +Note that TTL verification is disabled if the peer address is not a multicast +address. +These values can be configured using +.Xr ifconfig 8 , +or through the +.Dv SIOCSPEER +.Xr ioctl 2 . +.Pp +.Xr carp 4 +can be configured to use either the non-standard CARP protocol, or VRRPv3 (RFC 5798). +Use the +.Cm carpver +parameter to select either 2 (CARP) or 3 (VRRPv3). +VRRPv3 specific parameters can be configured using the +.Cm vrrpprio +and +.Cm vrrpinterval +parameters. +.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. diff --git a/share/man/man4/cas.4 b/share/man/man4/cas.4 index fa19cc33c2ab..3032dae585d7 100644 --- a/share/man/man4/cas.4 +++ b/share/man/man4/cas.4 @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd December 26, 2020 +.Dd April 18, 2023 .Dt CAS 4 .Os .Sh NAME @@ -50,8 +48,7 @@ if_cas_load="YES" The .Nm driver provides support for the Sun Cassini/Cassini+ and National -Semiconductor DP83065 Saturn Gigabit Ethernet controllers found -on-board in Sun UltraSPARC machines and as add-on cards. +Semiconductor DP83065 Saturn Gigabit Ethernet controllers. .Pp All controllers supported by the .Nm diff --git a/share/man/man4/cc_cdg.4 b/share/man/man4/cc_cdg.4 index 1b14e094ff84..b75cc76626aa 100644 --- a/share/man/man4/cc_cdg.4 +++ b/share/man/man4/cc_cdg.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 13, 2021 .Dt CC_CDG 4 .Os diff --git a/share/man/man4/cc_chd.4 b/share/man/man4/cc_chd.4 index f4f042952847..82a44dd2169d 100644 --- a/share/man/man4/cc_chd.4 +++ b/share/man/man4/cc_chd.4 @@ -26,8 +26,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 13, 2021 .Dt CC_CHD 4 .Os diff --git a/share/man/man4/cc_cubic.4 b/share/man/man4/cc_cubic.4 index 806d6aec2441..9a145ce3a1bc 100644 --- a/share/man/man4/cc_cubic.4 +++ b/share/man/man4/cc_cubic.4 @@ -28,9 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd May 13, 2021 +.Dd February 4, 2023 .Dt CC_CUBIC 4 .Os .Sh NAME @@ -39,6 +37,7 @@ .Sh DESCRIPTION The CUBIC congestion control algorithm was designed to provide increased throughput in fast and long-distance networks. +The CUBIC congestion control algorithm is the default for TCP. It attempts to maintain fairness when competing with legacy NewReno TCP in lower speed scenarios where NewReno is able to operate adequately. .Pp @@ -100,6 +99,11 @@ The congestion control module first appeared in .Fx 9.0 . .Pp +This became the default congestion algorithm for FreeBSD in version +.Fx 14.0 , +replacing +.Xr cc_newreno 4 . +.Pp The module was first released in 2009 by Lawrence Stewart whilst studying at Swinburne University of Technology's Centre for Advanced Internet Architectures, Melbourne, Australia. diff --git a/share/man/man4/cc_dctcp.4 b/share/man/man4/cc_dctcp.4 index 8c23f2eaa134..4095cd1eccd5 100644 --- a/share/man/man4/cc_dctcp.4 +++ b/share/man/man4/cc_dctcp.4 @@ -26,9 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd May 13, 2021 +.Dd November 8, 2022 .Dt CC_DCTCP 4 .Os .Sh NAME @@ -91,6 +89,11 @@ gain of 1 / ( 2 ^ .It Va slowstart A flag if the congestion window should be reduced by one half after slow start. Valid settings 0 and 1, default 0. +.It Va ect1 +Controls if a DCTCP session should use IP ECT(0) marking when sending out +segments (default), or ECT(1) marking making use of L4S infrastructure. +Changes to this setting will only affect new sessions, existing sessions will +retain their previous marking value. .El .Sh SEE ALSO .Xr cc_cdg 4 , diff --git a/share/man/man4/cc_hd.4 b/share/man/man4/cc_hd.4 index 9f14ee301538..f401e150315d 100644 --- a/share/man/man4/cc_hd.4 +++ b/share/man/man4/cc_hd.4 @@ -26,8 +26,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 13, 2021 .Dt CC_HD 4 .Os diff --git a/share/man/man4/cc_htcp.4 b/share/man/man4/cc_htcp.4 index fd223ca8b2d3..2441925df8ea 100644 --- a/share/man/man4/cc_htcp.4 +++ b/share/man/man4/cc_htcp.4 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 13, 2021 .Dt CC_HTCP 4 .Os diff --git a/share/man/man4/cc_newreno.4 b/share/man/man4/cc_newreno.4 index 76dd3b2559bb..0730024aaff8 100644 --- a/share/man/man4/cc_newreno.4 +++ b/share/man/man4/cc_newreno.4 @@ -28,9 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd May 13, 2021 +.Dd February 4, 2023 .Dt CC_NEWRENO 4 .Os .Sh NAME @@ -39,7 +37,6 @@ .Sh SYNOPSIS .In netinet/cc/cc_newreno.h .Sh DESCRIPTION -The NewReno congestion control algorithm is the default for TCP. Details about the algorithm can be found in RFC5681. .Sh Socket Options The @@ -145,6 +142,13 @@ The congestion control algorithm first appeared in its modular form in .Fx 9.0 . .Pp +This was the default congestion control algorithm in FreeBSD before +version +.Fx 14.0 , +after which +.Xr cc_cubic 4 +replaced it. +.Pp The module was first released in 2007 by James Healy and Lawrence Stewart whilst working on the NewTCP research project at Swinburne University of Technology's Centre for Advanced Internet Architectures, Melbourne, Australia, which was made diff --git a/share/man/man4/cc_vegas.4 b/share/man/man4/cc_vegas.4 index e1e1aff5ecdf..ba755dbc62bb 100644 --- a/share/man/man4/cc_vegas.4 +++ b/share/man/man4/cc_vegas.4 @@ -26,8 +26,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 13, 2021 .Dt CC_VEGAS 4 .Os diff --git a/share/man/man4/ccd.4 b/share/man/man4/ccd.4 index 4c95fb8ec890..0c2bc99682a0 100644 --- a/share/man/man4/ccd.4 +++ b/share/man/man4/ccd.4 @@ -32,9 +32,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd August 9, 1995 +.Dd January 23, 2025 .Dt CCD 4 .Os .Sh NAME @@ -230,7 +228,7 @@ without mounting does not write anything to the .Tn Linux RAID. Then you do a -.Nm fsck.ext2fs Pq Pa ports/sysutils/e2fsprogs +.Nm fsck.ext2fs Pq Pa ports/filesystems/e2fsprogs on the .Nm device using the @@ -279,7 +277,6 @@ device special files .Xr config 8 , .Xr disklabel 8 , .Xr fsck 8 , -.Xr gvinum 8 , .Xr mount 8 , .Xr newfs 8 .Sh HISTORY diff --git a/share/man/man4/ccr.4 b/share/man/man4/ccr.4 index c4fe301c7222..de3f3609a285 100644 --- a/share/man/man4/ccr.4 +++ b/share/man/man4/ccr.4 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd June 3, 2019 +.Dd November 25, 2024 .Dt CCR 4 .Os .Sh NAME @@ -54,7 +52,10 @@ The driver accelerates AES-CBC, AES-CCM, AES-CTR, AES-GCM, AES-XTS, SHA1, SHA2-224, SHA2-256, SHA2-384, SHA2-512, SHA1-HMAC, SHA2-224-HMAC, SHA2-256-HMAC, SHA2-384-HMAC, and SHA2-512-HMAC operations for -.Xr crypto 4 +.Xr crypto 9 +consumers such as +.Xr ktls 4 , +.Xr geli 4 , and .Xr ipsec 4 . The driver also supports chaining one of AES-CBC, AES-CTR, or AES-XTS with @@ -99,7 +100,11 @@ email all the specific information related to the issue to .Sh SEE ALSO .Xr crypto 4 , .Xr cxgbe 4 , -.Xr ipsec 4 +.Xr geli 4 , +.Xr ipsec 4 , +.Xr ktls 4 , +.Xr crypto 7 , +.Xr crypto 9 .Sh HISTORY The .Nm diff --git a/share/man/man4/cd.4 b/share/man/man4/cd.4 index fe9072bc5ec8..02bf96dbfc97 100644 --- a/share/man/man4/cd.4 +++ b/share/man/man4/cd.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 8, 2022 .Dt CD 4 .Os @@ -338,8 +336,8 @@ devices None. .Sh SEE ALSO .Xr cam 4 , +.Xr cd9660 4 , .Xr da 4 , -.Xr cd9660 5 , .Xr disklabel 8 , .Xr cd 9 .Sh HISTORY diff --git a/share/man/man5/cd9660.5 b/share/man/man4/cd9660.4 index 54f26738bc4f..a684df37bab9 100644 --- a/share/man/man5/cd9660.5 +++ b/share/man/man4/cd9660.4 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 2017 Enji Cooper .\" .\" Redistribution and use in source and binary forms, with or without @@ -23,10 +25,8 @@ .\" (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 April 8, 2022 -.Dt CD9660 5 +.Dd January 18, 2025 +.Dt CD9660 4 .Os .Sh NAME .Nm cd9660 @@ -59,6 +59,7 @@ volume located on .Pp .Dl "mount -t cd9660 /dev/cd0 /mnt" .Sh SEE ALSO +.Xr etdump 1 , .Xr nmount 2 , .Xr unmount 2 , .Xr cd 4 , @@ -69,7 +70,7 @@ volume located on The .Nm driver first appeared in -.Fx 4.4 Lite +.Bx 4.4 Lite . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/cdce.4 b/share/man/man4/cdce.4 index b27d89bc1639..8c5dbb36d197 100644 --- a/share/man/man4/cdce.4 +++ b/share/man/man4/cdce.4 @@ -26,9 +26,8 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .\" $NetBSD: cdce.4,v 1.4 2004/12/08 18:35:56 peter Exp $ -.\" $FreeBSD$ .\" -.Dd July 10, 2019 +.Dd May 26, 2025 .Dt CDCE 4 .Os .Sh NAME @@ -47,6 +46,13 @@ kernel configuration file: .Cd "device cdce" .Ed .Pp +Mobile Devices (eg. Huawei E3372, E5573 and others) +may need additionally the u3g command port: +.Bd -ragged -offset indent +.Cd "device ucom" +.Cd "device u3g" +.Ed +.Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : @@ -77,22 +83,37 @@ received and transmitted over separate USB bulk transfer endpoints. The .Nm driver does not support different media types or options. +.Pp +Mobile +.Nm +Network Devices may need a connect command sequence via u3g +serial command port before they activate the NCM/ECM/ACM network +interface. +For example: +.Dl echo 'AT^NDISUP=1,1,"internet"' > /dev/cuaU[0].0 +where +.Dq internet +is your providers apn name. .Sh HARDWARE -The following devices are supported by the +The .Nm -driver: +driver supports USB Ethernet interfaces implementing the +USB Communication Device Class Ethernet Control Model (CDC ECM) or +Network Control Model (CDC NCM) protocol, such as: .Pp .Bl -bullet -compact .It +Android USB tethering +.It +iPhone USB tethering +.It Prolific PL-2501 Host-to-Host Bridge Controller .It Sharp Zaurus PDA .It Terayon TJ-715 DOCSIS Cable Modem .It -Realtek RTL8156 USB GBE/2.5G Ethernet Family Controller -.It -Planex USB-LAN2500R +Huawei 3G/4G LTE (eg. E3372, E5573) and other mobile network devices .El .Sh DIAGNOSTICS .Bl -diag @@ -125,6 +146,8 @@ is running low on mbufs. .Xr intro 4 , .Xr ipheth 4 , .Xr netintro 4 , +.Xr u3g 4 , +.Xr ucom 4 , .Xr urndis 4 , .Xr usb 4 , .Xr ifconfig 8 diff --git a/share/man/man4/cdceem.4 b/share/man/man4/cdceem.4 index ad936543b33f..6d8caf53cc02 100644 --- a/share/man/man4/cdceem.4 +++ b/share/man/man4/cdceem.4 @@ -20,8 +20,6 @@ .\" 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 November 7, 2019 .Dt CDCEEM 4 .Os diff --git a/share/man/man4/cfi.4 b/share/man/man4/cfi.4 index 7dee561d7c81..3527047e12d5 100644 --- a/share/man/man4/cfi.4 +++ b/share/man/man4/cfi.4 @@ -27,8 +27,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 20, 2016 .Dt CFI 4 .Os diff --git a/share/man/man4/cfiscsi.4 b/share/man/man4/cfiscsi.4 index 5880c03540a1..dbf8ed5f5efe 100644 --- a/share/man/man4/cfiscsi.4 +++ b/share/man/man4/cfiscsi.4 @@ -22,8 +22,6 @@ .\" 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 May 28, 2017 .Dt CFISCSI 4 .Os diff --git a/share/man/man4/cfumass.4 b/share/man/man4/cfumass.4 index 7870ab197484..bde9b2d6a598 100644 --- a/share/man/man4/cfumass.4 +++ b/share/man/man4/cfumass.4 @@ -23,8 +23,6 @@ .\" 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 April 21, 2018 .Dt CFUMASS 4 .Os @@ -59,7 +57,7 @@ To use .Nm : .Bl -bullet .It -.Xr cfumass 4 +.Nm cfumass must be loaded as a module or compiled into the kernel. .It The USB Mass Storage template must be chosen by setting the diff --git a/share/man/man4/cgem.4 b/share/man/man4/cgem.4 index f9f525dc4554..1ca4f8fae9e8 100644 --- a/share/man/man4/cgem.4 +++ b/share/man/man4/cgem.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 10, 2021 .Dt CGEM 4 .Os @@ -201,7 +199,7 @@ Counter of broadcast frames receive without error excluding pause frames. .It Va dev.cgem.%d.stats.rx_frames_multi Counter of multicast frames receive without error excluding pause frames. .It Va dev.cgem.%d.stats.rx_frames_pause -Counter of pause frames recevied without error. +Counter of pause frames received without error. .It Va dev.cgem.%d.stats.rx_frames_64b Counter of 64-byte frames received without error. .It Va dev.cgem.%d.stats.rx_frames_65to127b diff --git a/share/man/man4/ch.4 b/share/man/man4/ch.4 index 312a0f1f59fa..a0a5f97b5201 100644 --- a/share/man/man4/ch.4 +++ b/share/man/man4/ch.4 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Copyright (c) 1996 .\" Julian Elischer <julian@FreeBSD.org>. All rights reserved. .\" diff --git a/share/man/man4/chromebook_platform.4 b/share/man/man4/chromebook_platform.4 index e4cd8fc799b9..932986ef2fd5 100644 --- a/share/man/man4/chromebook_platform.4 +++ b/share/man/man4/chromebook_platform.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 13, 2016 .Dt CHROMEBOOK_PLATFORM 4 .Os diff --git a/share/man/man4/chvgpio.4 b/share/man/man4/chvgpio.4 index b6265cf3787c..976ca49dc8d9 100644 --- a/share/man/man4/chvgpio.4 +++ b/share/man/man4/chvgpio.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 17, 2017 .Dt CHVGPIO 4 .Os diff --git a/share/man/man4/ciss.4 b/share/man/man4/ciss.4 index f79efe89a22a..28d6556ecd85 100644 --- a/share/man/man4/ciss.4 +++ b/share/man/man4/ciss.4 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Written by Tom Rhodes .\" This file is in the public domain. .\" diff --git a/share/man/man4/coretemp.4 b/share/man/man4/coretemp.4 index 91a975861a0a..210b9d0fae62 100644 --- a/share/man/man4/coretemp.4 +++ b/share/man/man4/coretemp.4 @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2007 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 23, 2007 .Dt CORETEMP 4 .Os @@ -57,6 +55,7 @@ driver reports each core's temperature through a sysctl node in the corresponding CPU device's sysctl tree, named .Va dev.cpu.%d.temperature . .Sh SEE ALSO +.Xr amdtemp 4 , .Xr sysctl 8 .Sh HISTORY The diff --git a/share/man/man4/cp2112.4 b/share/man/man4/cp2112.4 index 39ac8dba114e..040aad4c1f16 100644 --- a/share/man/man4/cp2112.4 +++ b/share/man/man4/cp2112.4 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2020 Andriy Gapon <avg@FreeBSD.org> .\" @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 12, 2020 .Dt CP2112 4 .Os diff --git a/share/man/man4/cpuctl.4 b/share/man/man4/cpuctl.4 index c3f6271c5d7f..fc42cf14f254 100644 --- a/share/man/man4/cpuctl.4 +++ b/share/man/man4/cpuctl.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 20, 2014 .Dt CPUCTL 4 .Os diff --git a/share/man/man4/cpufreq.4 b/share/man/man4/cpufreq.4 index b1bf05fbe74e..beeef3fe4912 100644 --- a/share/man/man4/cpufreq.4 +++ b/share/man/man4/cpufreq.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 4, 2022 .Dt CPUFREQ 4 .Os diff --git a/share/man/man4/crypto.4 b/share/man/man4/crypto.4 index 5617bacd904a..b1423752718e 100644 --- a/share/man/man4/crypto.4 +++ b/share/man/man4/crypto.4 @@ -61,8 +61,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 6, 2021 .Dt CRYPTO 4 .Os @@ -130,7 +128,7 @@ Close the .Pa /dev/crypto device. This will automatically close any remaining sessions associated with the -file desriptor. +file descriptor. .El .Sh SYMMETRIC-KEY OPERATION .Nm cryptodev diff --git a/share/man/man4/ctl.4 b/share/man/man4/ctl.4 index e150d70665d2..cac9e616f9db 100644 --- a/share/man/man4/ctl.4 +++ b/share/man/man4/ctl.4 @@ -22,8 +22,6 @@ .\" 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 March 29, 2017 .Dt CTL 4 .Os @@ -201,7 +199,7 @@ Specifies the maximum number of LUNs we support, must be a power of 2. The default value is 1024. .It Va kern.cam.ctl.max_ports Specifies the maximum number of ports we support, must be a power of 2. -The default value is 256. +The default value is 1024. .El .Sh SEE ALSO .Xr cfiscsi 4 , diff --git a/share/man/man4/cue.4 b/share/man/man4/cue.4 index 72bea982a931..2d960e2e9927 100644 --- a/share/man/man4/cue.4 +++ b/share/man/man4/cue.4 @@ -28,8 +28,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 24, 2019 .Dt CUE 4 .Os diff --git a/share/man/man4/cxgb.4 b/share/man/man4/cxgb.4 index 5df049fc14d6..6eb2132275d2 100644 --- a/share/man/man4/cxgb.4 +++ b/share/man/man4/cxgb.4 @@ -29,8 +29,6 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.\" $FreeBSD$ -.\" .Dd March 14, 2007 .Dt CXGB 4 .Os diff --git a/share/man/man4/cxgbe.4 b/share/man/man4/cxgbe.4 index 5f959299d2ad..bfba202d1fec 100644 --- a/share/man/man4/cxgbe.4 +++ b/share/man/man4/cxgbe.4 @@ -29,9 +29,7 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.\" $FreeBSD$ -.\" -.Dd November 10, 2021 +.Dd November 10, 2022 .Dt CXGBE 4 .Os .Sh NAME @@ -263,7 +261,7 @@ The default is 1. Number of padding bytes inserted before the beginning of an Ethernet frame in the receive buffer. The default value is 0. -A value of of 2 would ensure that the Ethernet payload (usually the IP header) +A value of 2 would ensure that the Ethernet payload (usually the IP header) is at a 4 byte aligned address. 0-7 are all valid values. .It Va hw.cxgbe.fl_pad @@ -277,6 +275,7 @@ Controls the hardware response to congestion. 0 instructs the hardware to backpressure its pipeline on congestion. This usually results in the port emitting PAUSE frames. 1 instructs the hardware to drop frames destined for congested queues. +2 instructs the hardware to both backpressure the pipeline and drop frames. .It Va hw.cxgbe.pause_settings PAUSE frame settings. Bit 0 is rx_pause, bit 1 is tx_pause, bit 2 is pause_autoneg. @@ -397,7 +396,6 @@ If an issue is identified with this driver with a supported adapter, email all the specific information related to the issue to .Aq Mt support@chelsio.com . .Sh SEE ALSO -.Xr altq 4 , .Xr arp 4 , .Xr ccr 4 , .Xr cxgb 4 , diff --git a/share/man/man4/cxgbev.4 b/share/man/man4/cxgbev.4 index b2fcac6c632b..4ce67aeda0c3 100644 --- a/share/man/man4/cxgbev.4 +++ b/share/man/man4/cxgbev.4 @@ -29,9 +29,7 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.\" $FreeBSD$ -.\" -.Dd May 9, 2017 +.Dd November 10, 2022 .Dt CXGBEV 4 .Os .Sh NAME @@ -290,7 +288,6 @@ If an issue is identified with this driver with a supported adapter, email all the specific information related to the issue to .Aq Mt support@chelsio.com . .Sh SEE ALSO -.Xr altq 4 , .Xr arp 4 , .Xr cxgbe 4 , .Xr netintro 4 , diff --git a/share/man/man4/cyapa.4 b/share/man/man4/cyapa.4 index fa4527336f3e..d79878427df7 100644 --- a/share/man/man4/cyapa.4 +++ b/share/man/man4/cyapa.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 18, 2018 .Dt CYAPA 4 .Os diff --git a/share/man/man4/da.4 b/share/man/man4/da.4 index ed820c637750..b5a66f9c86bc 100644 --- a/share/man/man4/da.4 +++ b/share/man/man4/da.4 @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd December 20, 2017 +.Dd September 10, 2022 .Dt DA 4 .Os .Sh NAME @@ -133,6 +131,29 @@ variables and .Xr loader 8 tunables: .Bl -tag -width 12 +.It Va kern.cam.da.default_timeout +This variable determines how long the +.Nm +driver will wait before timing out an outstanding command. +The units for this value are seconds, and the default is currently 60 +seconds. +.It Va kern.cam.da.disable_wp_protection +Disable detection of write-protected disks. +Default is disabled. +.Po +detection of write-protected disks is enabled +.Pc . +.It Va kern.cam.da.enable_biospeedup +Enable +.Dv BIO_SPEEDUP +processing. +Default is enabled. +.It Va kern.cam.da.enable_uma_ccbs +Use UMA for CCBs. +Default is enabled. +.It Va kern.cam.da.poll_period +Media polling period in seconds. +Default is 3 seconds. .It Va kern.cam.da.retry_count This variable determines how many times the .Nm @@ -142,19 +163,20 @@ the .Nm driver dump routine. This value currently defaults to 4. -.It Va kern.cam.da.default_timeout -This variable determines how long the +.It Va kern.cam.da.send_ordered +Send Ordered Tags. +On shutdown, step through all the .Nm -driver will wait before timing out an outstanding command. -The units for this value are seconds, and the default is currently 60 -seconds. +peripheral drivers, and if the device is still open, +sync the disk to physical media. +Default is enabled. .It Va kern.cam.sort_io_queue -.It Va kern.cam.da. Ns Ar X Ns Va .sort_io_queue +.It Va kern.cam.da . Ns Ar X Ns Va .sort_io_queue These variables determine whether request queue should be sorted trying to optimize head seeks. Set to 1 to enable sorting, 0 to disable, -1 to leave it as-is. The default is sorting enabled for HDDs and disabled for SSDs. -.It Va kern.cam.da. Ns Ar X Ns Va .delete_method +.It Va kern.cam.da . Ns Ar X Ns Va .delete_method This variable specifies method to handle BIO_DELETE requests: .Bl -tag -width "ATA_TRIM" .It ATA_TRIM @@ -170,7 +192,7 @@ WRITE SAME(10) command without UNMAP flag, .It DISABLE disable BIO_DELETE support. .El -.It Va kern.cam.da. Ns Ar X Ns Va .minimum_cmd_size +.It Va kern.cam.da . Ns Ar X Ns Va .minimum_cmd_size This variable determines what the minimum READ/WRITE CDB size is for a given .Nm diff --git a/share/man/man4/dc.4 b/share/man/man4/dc.4 index 57ff604b3cf8..d8a7d7db8b20 100644 --- a/share/man/man4/dc.4 +++ b/share/man/man4/dc.4 @@ -28,8 +28,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 26, 2020 .Dt DC 4 .Os diff --git a/share/man/man4/dcons.4 b/share/man/man4/dcons.4 index d228ad5c16b9..6ef58ea00757 100644 --- a/share/man/man4/dcons.4 +++ b/share/man/man4/dcons.4 @@ -22,8 +22,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 26, 2008 .Dt DCONS 4 .Os @@ -84,7 +82,7 @@ signal to using .Xr kill 1 . .Bd -literal -offset indent -dcons "/usr/libexec/getty std.9600" vt100 on secure +dcons "/usr/libexec/getty std.115200" vt100 on secure .Ed .Pp Once the @@ -102,7 +100,7 @@ for more details. If you want to use .Nm as a -.Xr gdb 1 +.Xr gdb 1 Pq Pa ports/devel/gdb port, add the following line into .Xr loader.conf 5 : .Bd -literal -offset indent diff --git a/share/man/man4/dcons_crom.4 b/share/man/man4/dcons_crom.4 index eca479d5f99f..4eff05b6928f 100644 --- a/share/man/man4/dcons_crom.4 +++ b/share/man/man4/dcons_crom.4 @@ -22,8 +22,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 16, 2003 .Dt DCONS_CROM 4 .Os diff --git a/share/man/man4/ddb.4 b/share/man/man4/ddb.4 index d7b51b270877..3c4894c03d62 100644 --- a/share/man/man4/ddb.4 +++ b/share/man/man4/ddb.4 @@ -24,9 +24,7 @@ .\" any improvements or extensions that they make and grant Carnegie Mellon .\" the rights to redistribute these changes. .\" -.\" $FreeBSD$ -.\" -.Dd March 14, 2021 +.Dd June 10, 2025 .Dt DDB 4 .Os .Sh NAME @@ -58,7 +56,7 @@ representation, define: .Ed .Pp To enable the -.Xr gdb 1 +.Xr gdb 4 backend, so that remote debugging with .Xr kgdb 1 Pq Pa ports/devel/gdb is possible, include: @@ -69,7 +67,7 @@ is possible, include: The .Nm kernel debugger is an interactive debugger with a syntax inspired by -.Xr gdb 1 . +.Xr gdb 1 Pq Pa ports/devel/gdb . If linked into the running kernel, it can be invoked locally with the .Ql debug @@ -182,11 +180,8 @@ command line editing capabilities. In addition to the .Nm emacs -control keys, the usual -.Tn ANSI -arrow keys may be used to -browse through the history buffer, and move the cursor within the -current line. +control keys, the usual ANSI arrow keys may be used to browse through the +history buffer, and move the cursor within the current line. .Sh COMMANDS .Ss COMMON DEBUGGER COMMANDS .Bl -tag -width indent -compact @@ -246,8 +241,8 @@ The location is also displayed in hex at the beginning of each line. .It Cm i display as a disassembled instruction .It Cm I -display as an disassembled instruction with possible alternate formats depending on the -machine. +display as a disassembled instruction with possible alternate formats +depending on the machine. On i386, this selects the alternate format for the instruction decoding (16 bits in a 32-bit code segment and vice versa). .It Cm S @@ -294,6 +289,30 @@ eax = xxxxxx ecx = yyyyyy .Ed .Pp +.It Ic pprint Ns Oo Li / Ns Cm d depth Oc Oo Ar name Oc +Pretty-print symbol specified by +.Ar name +using CTF debugging data. Works for all symbols exported by the kernel and loaded kernel modules. +.Pp +If the +.Cm d +modifier has been specified, contents of structs nested up to +.Ar depth +levels deep will also be included in the output. +.Pp +.It Ic pprint struct Ns Oo Li / Ns Cm d depth Ic Oc Oo Ar name Oc Ns Op Ns Ar addr +Print memory at +.Ar addr +as struct +.Ar name Ns . +Works for all structs defined by the kernel and loaded kernel modules. +.Pp +If the +.Cm d +modifier has been specified, contents of structs nested up to +.Ar depth +levels deep will also be included in the output. +.Pp .It Xo .Ic write Ns Op Li / Ns Cm bhl .Ar addr expr1 Op Ar expr2 ... @@ -527,13 +546,23 @@ The optional argument limits the search. .\" .Pp -.It Ic reboot Op Ar seconds -.It Ic reset Op Ar seconds +.It Xo +.Ic Ic reboot Ns Op Li / Ns Cm s +.Op Ar seconds +.Xc +.It Xo +.Ic Ic reset Ns Op Li / Ns Cm s +.Op Ar seconds +.Xc Hard reset the system. If the optional argument .Ar seconds is given, the debugger will wait for this long, at most a week, before rebooting. +When the +.Cm s +modifier is given, the command will skip running any registered shutdown +handlers and attempt the most basic reset. .Pp .It Ic thread Ar addr | tid Switch the debugger to the thread with ID @@ -541,6 +570,14 @@ Switch the debugger to the thread with ID if the argument is a decimal number, or address .Ar addr , otherwise. +.Pp +.It Ic watchdog Op Ar exp +Program the +.Xr watchdog 4 +timer to fire in +.Pf 2^ Ar exp +seconds. +If no argument is provided, the watchdog timer is disabled. .El .Ss SPECIALIZED HELPER COMMANDS .Bl -tag -width indent -compact @@ -548,11 +585,13 @@ otherwise. .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. +Prints the address of the thread whose kernel-mode stack contains +.Ar addr , +if any. +.Pp +.It Ic show Cm active trace +.It Ic acttrace +Show a stack trace for every thread running on a CPU. .Pp .It Ic show Cm all procs Ns Op Li / Ns Cm a .It Ic ps Ns Op Li / Ns Cm a @@ -565,6 +604,17 @@ The modifier will print command line arguments for each process. .\" .Pp +.It Ic show Cm all tcpcbs Ns Op Li / Ns Cm b Ns Cm l +Show the same output as "show tcpcb" does, but for all +TCP control blocks within the system. +The +.Cm b +modifier will request BBLog entries to be printed. +Using the +.Cm l +modifier will limit the output to TCP control blocks, which are locked. +.\" +.Pp .It Ic show Cm all trace .It Ic alltrace Show a stack trace for every thread in the system. @@ -607,6 +657,15 @@ addresses, and Resource IDs. Dump data about APIC IDT vector mappings. .\" .Pp +.It Ic show Cm badstacks +Walk the +.Xr witness 4 +graph and print any lock-order violations. +This command is only available if +.Xr witness 4 +is included in the kernel. +.\" +.Pp .It Ic show Cm breaks Show breakpoints set with the "break" command. .\" @@ -640,19 +699,18 @@ present at .Ar addr . .\" .Pp -.It Ic show Cm cbstat -Show brief information about the TTY subsystem. -.\" -.Pp -.It Ic show Cm cdev -Without argument, show the list of all created cdev's, consisting of devfs -node name and struct cdev address. -When address of cdev is supplied, show some internal devfs state of the cdev. +.It Ic show Cm cdev Op Ar addr +Show the internal devfs state of the cdev structure located at +.Ar addr . +If no argument is provided, show the list of all created cdevs, consisting of +the devfs node name and the +.Vt struct cdev +address. .\" .Pp .It Ic show Cm conifhk Lists hooks currently waiting for completion in -run_interrupt_driven_config_hooks(). +.Fn run_interrupt_driven_config_hooks . .\" .Pp .It Ic show Cm cpusets @@ -729,6 +787,13 @@ present at .Ar addr . .\" .Pp +.It Ic show Cm iosched Ar addr +Show information about the I/O scheduler +.Vt struct cam_iosched_softc +located at +.Ar addr . +.\" +.Pp .It Ic show Cm inodedeps Op Ar addr Show brief information about each inodedep structure. If @@ -756,13 +821,20 @@ Dump the interrupt statistics. Show interrupt lines and their respective kernel threads. .\" .Pp -.It Ic show Cm jails -Show the list of -.Xr jail 8 -instances. -In addition to what -.Xr jls 8 -shows, also list kernel internal details. +.It Ic show Cm ktr Ns Op Li / Ns Cm a Ns Cm v Ns Cm V +Print the contents of the +.Xr ktr 4 +trace buffer. +The +.Cm v +modifier will request fully verbose output, causing the file, line number, and +timestamp to be printed for each trace entry. +The +.Cm V +modifier will request only the timestamps to be printed. +The +.Cm a +modifier will request that the output be unpaginated. .\" .Pp .It Ic show Cm lapic @@ -773,24 +845,24 @@ Show information from the local APIC registers for this CPU. Show lock structure. The output format is as follows: .Bl -tag -width "flags" -.It Ic class: +.It Ic class : Class of the lock. Possible types include .Xr mutex 9 , .Xr rmlock 9 , .Xr rwlock 9 , .Xr sx 9 . -.It Ic name: +.It Ic name : Name of the lock. -.It Ic flags: +.It Ic flags : Flags passed to the lock initialization function. .Em flags values are lock class specific. -.It Ic state: +.It Ic state : Current state of a lock. .Em state values are lock class specific. -.It Ic owner: +.It Ic owner : Lock owner. .El .\" @@ -870,11 +942,14 @@ It is useful if you got a kernel panic, attached a serial cable to the machine and want to get the boot messages from before the system hang. .\" -.It Ic show Cm mount -Displays short info about all currently mounted file systems. .Pp -.It Ic show Cm mount Ar addr -Displays details about the given mount point. +.It Ic show Cm mount Op Ar addr +Displays details about the mount point located at +.Ar addr . +If no +.Ar addr +is specified, +displays short info about all currently mounted file systems. .\" .Pp .It Ic show Cm object Ns Oo Li / Ns Cm f Oc Ar addr @@ -932,16 +1007,24 @@ Names of spin locks held. Dump process groups present within the system. .\" .Pp -.It Ic show Cm proc Op Ar addr -If no -.Op Ar addr -is specified, print information about the current process. -Otherwise, show information about the process at address +.It Ic show Cm prison Op Ar addr +Show the prison structure located at .Ar addr . +If no +.Ar addr +argument is specified, show information about all prisons in the system. +.\" +.Pp +.It Ic show Cm proc Op Ar addr +Show information about the process structure located at address +.Ar addr , +or the current process if no argument is specified. .\" .Pp -.It Ic show Cm procvm -Show process virtual memory layout. +.It Ic show Cm procvm Op Ar addr +Show process virtual memory layout for the process located at +.Ar addr , +or the current process if no argument is specified. .\" .Pp .It Ic show Cm protosw Ar addr @@ -994,36 +1077,26 @@ Now an alias for .Ic show Cm lockchain . .\" .Pp -.It Ic show Cm sleepq -.It Ic show Cm sleepqueue -Both commands provide the same functionality. -They show sleepqueue -.Vt struct sleepqueue -structure. -Sleepqueues are used within the -.Fx -kernel to implement sleepable -synchronization primitives (thread holding a lock might sleep or -be context switched), which at the time of writing are: -.Xr condvar 9 , -.Xr sx 9 -and standard -.Xr msleep 9 -interface. +.It Ic show Cm sleepq Ar addr +.It Ic show Cm sleepqueue Ar addr +Show the +.Xr sleepqueue 9 +structure located at +.Ar addr . .\" .Pp .It Ic show Cm sockbuf Ar addr +Show the socket buffer +.Va struct sockbuf +located at +.Ar addr . +.\" +.Pp .It Ic show Cm socket Ar addr -Those commands print -.Vt struct sockbuf -and +Show the socket object .Vt struct socket -objects placed at +located at .Ar addr . -Output consists of all values present in structures mentioned. -For exact interpretation and more details, visit -.Pa sys/socket.h -header file. .\" .Pp .It Ic show Cm sysregs @@ -1033,7 +1106,7 @@ on i386.) Not present on some platforms. .\" .Pp -.It Ic show Cm tcpcb Ar addr +.It Ic show Cm tcpcb Ns Oo Li / Ns Cm b Oc Ar addr Print TCP control block .Vt struct tcpcb lying at address @@ -1041,6 +1114,9 @@ lying at address For exact interpretation of output, visit .Pa netinet/tcp.h header file. +The +.Cm b +modifier will request BBLog entries to be printed. .\" .Pp .It Ic show Cm thread Op Ar addr | tid @@ -1141,11 +1217,8 @@ and none have zero ref counts. .\" .Pp .It Ic show Cm vmopag -This is supposed to show physical addresses consumed by a -VM object. -Currently, it is not possible to use this command when -.Xr witness 4 -is compiled in the kernel. +Walk the list of VM objects in the system, printing the indices and physical +addresses of the VM pages belonging to each object. .\" .Pp .It Ic show Cm vnet Ar addr @@ -1155,11 +1228,11 @@ structure present at the address .Ar addr . .\" .Pp -.It Ic show Cm vnode Op Ar addr +.It Ic show Cm vnode Ar addr Prints vnode .Vt struct vnode structure lying at -.Op Ar addr . +.Ar addr . For the exact interpretation of the output, look at the .Pa sys/vnode.h header file. @@ -1187,10 +1260,14 @@ subsystem. .El .Ss OFFLINE DEBUGGING COMMANDS .Bl -tag -width indent -compact +.It Ic dump +Initiate a kernel core dump to the device(s) configured by +.Xr dumpon 8 . +.Pp .It Ic gdb Switches to remote GDB mode. In remote GDB mode, another machine is required that runs -.Xr gdb 1 +.Xr gdb 1 Pq Pa ports/devel/gdb using the remote debug feature, with a connection to the serial console port on the target machine. .Pp @@ -1552,8 +1629,8 @@ CR TILDE CTRL-R causes an immediate reboot. In all these sequences, CR represents Carriage Return and is usually sent by pressing the Enter or Return key. TILDE is the ASCII tilde character (~). -CTRL-x is Control x, send by pressing the Control key, then x, then releasing both. -and then releasing both. +CTRL-x is Control x, sent by pressing the Control key, then x, then releasing +both. .Pp The break-to-debugger behavior can be enabled by setting .Xr sysctl 8 @@ -1598,10 +1675,11 @@ directory. .Pa sys/vnode.h .El .Sh SEE ALSO -.Xr gdb 1 , +.Xr gdb 1 Pq Pa ports/devel/gdb , .Xr kgdb 1 Pq Pa ports/devel/gdb , .Xr acpi 4 , .Xr CAM 4 , +.Xr gdb 4 , .Xr mac_ddb 4 , .Xr mac_test 4 , .Xr netgraph 4 , diff --git a/share/man/man4/devctl.4 b/share/man/man4/devctl.4 index 4403cb4fdd71..bf1e5fe20c9b 100644 --- a/share/man/man4/devctl.4 +++ b/share/man/man4/devctl.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 21, 2020 .Dt DEVCTL 4 .Os diff --git a/share/man/man5/devfs.5 b/share/man/man4/devfs.4 index 193cc0b4445f..3022a23dfe9a 100644 --- a/share/man/man5/devfs.5 +++ b/share/man/man4/devfs.4 @@ -32,10 +32,8 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 30, 2022 -.Dt DEVFS 5 +.Dt DEVFS 4 .Os .Sh NAME .Nm devfs @@ -67,13 +65,13 @@ tool can be used to recover deleted device entries under .Nm . .Pp The -.Xr fdescfs 5 +.Xr fdescfs 4 filesystem is an alternate means for populating .Pa /dev/fd . The character devices that both .Nm and -.Xr fdescfs 5 +.Xr fdescfs 4 present in .Pa /dev/fd correspond to the open file descriptors of the process @@ -84,7 +82,7 @@ only creates files for the standard file descriptors .Pa 1 and .Pa 2 . -.Xr fdescfs 5 +.Xr fdescfs 4 creates files for all open descriptors. .Pp The options are as follows: @@ -125,7 +123,7 @@ volume located on .Pp .Dl "mount -t devfs devfs /mychroot/dev" .Sh SEE ALSO -.Xr fdescfs 5 , +.Xr fdescfs 4 , .Xr devfs 8 , .Xr mount 8 , .Xr make_dev 9 diff --git a/share/man/man4/disc.4 b/share/man/man4/disc.4 index 1a4eae190ff4..b767c24fc4fe 100644 --- a/share/man/man4/disc.4 +++ b/share/man/man4/disc.4 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" From: @(#)lo.4 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" .Dd May 25, 2002 .Dt DISC 4 .Os diff --git a/share/man/man4/disk.4 b/share/man/man4/disk.4 index 69796059fc1e..97eeb9b718d4 100644 --- a/share/man/man4/disk.4 +++ b/share/man/man4/disk.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 20, 2020 .Dt disk 4 .Os @@ -59,7 +57,7 @@ Operations to block devices such as .Xr lseek 2 , .Xr read 2 , and -.Xr write +.Xr write 2 may only be performed at file offsets that are integral multiple of this size. .It Dv DIOCGMEDIASIZE @@ -113,8 +111,6 @@ the case for multipathing for example, GEOM classes that consume a single provider and provide single provider, like .Xr geli 8 , -and -.Xr gbde 8 , the identifier should be formed by attaching that provider's class name to the ident of the underlying provider, .It diff --git a/share/man/man4/divert.4 b/share/man/man4/divert.4 index d8296995ca97..5732099bd447 100644 --- a/share/man/man4/divert.4 +++ b/share/man/man4/divert.4 @@ -1,6 +1,5 @@ -.\" $FreeBSD$ .\" -.Dd December 17, 2004 +.Dd August 30, 2022 .Dt DIVERT 4 .Os .Sh NAME @@ -11,7 +10,7 @@ .In sys/socket.h .In netinet/in.h .Ft int -.Fn socket PF_INET SOCK_RAW IPPROTO_DIVERT +.Fn socket PF_DIVERT SOCK_RAW 0 .Pp To enable support for divert sockets, place the following lines in the kernel configuration file: @@ -30,24 +29,30 @@ ipfw_load="YES" ipdivert_load="YES" .Ed .Sh DESCRIPTION -Divert sockets are similar to raw IP sockets, except that they -can be bound to a specific +Divert sockets allow to intercept and re-inject packets flowing through +the +.Xr ipfw 4 +firewall. +A divert socket can be bound to a specific .Nm port via the .Xr bind 2 system call. -The IP address in the bind is ignored; only the port -number is significant. +The sockaddr argument shall be sockaddr_in with sin_port set to the +desired value. +Note that the +.Nm +port has nothing to do with TCP/UDP ports. +It is just a cookie number, that allows to differentiate between different +divert points in the +.Xr ipfw 4 +ruleset. A divert socket bound to a divert port will receive all packets diverted -to that port by some (here unspecified) kernel mechanism(s). -Packets may also be written to a divert port, in which case they -re-enter kernel IP packet processing. +to that port by +.Xr ipfw 4 . +Packets may also be written to a divert port, in which case they re-enter +firewall processing at the next rule. .Pp -Divert sockets are normally used in conjunction with -.Fx Ns 's -packet filtering implementation and the -.Xr ipfw 8 -program. By reading from and writing to a divert socket, matching packets can be passed through an arbitrary ``filter'' as they travel through the host machine, special routing tricks can be done, etc. @@ -153,8 +158,9 @@ with the correct value. Packets written as incoming and having incorrect checksums will be dropped. Otherwise, all header fields are unchanged (and therefore in network order). .Pp -Binding to port numbers less than 1024 requires super-user access, as does -creating a socket of type SOCK_RAW. +Creating a +.Nm +socket requires super-user access. .Sh ERRORS Writing to a divert socket can return these errors, along with the usual errors possible when writing raw packets: diff --git a/share/man/man4/dpms.4 b/share/man/man4/dpms.4 index 7f7af3ed5f33..ebc99c7c96ad 100644 --- a/share/man/man4/dpms.4 +++ b/share/man/man4/dpms.4 @@ -26,8 +26,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 23, 2008 .Dt DPMS 4 .Os diff --git a/share/man/man4/ds1307.4 b/share/man/man4/ds1307.4 index 7f03116cbd7b..46d22663e50c 100644 --- a/share/man/man4/ds1307.4 +++ b/share/man/man4/ds1307.4 @@ -22,14 +22,12 @@ .\" (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 March 7, 2015 +.Dd December 10, 2024 .Dt DS1307 4 .Os .Sh NAME .Nm ds1307 -.Nd 64 x 8, serial, i2c real-time clock +.Nd 64 x 8, serial, i2c real-time clock (RTC) .Sh SYNOPSIS .Cd "device iic" .Cd "device iicbus" diff --git a/share/man/man4/ds3231.4 b/share/man/man4/ds3231.4 index 4059a88ca815..52322eec6eb9 100644 --- a/share/man/man4/ds3231.4 +++ b/share/man/man4/ds3231.4 @@ -22,14 +22,12 @@ .\" (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 February 12, 2016 +.Dd December 10, 2024 .Dt DS3231 4 .Os .Sh NAME .Nm ds3231 -.Nd Extremely Accurate i2c-integrated RTC/TCXO/Crystal +.Nd Extremely Accurate i2c-integrated real-time clock (RTC)/TCXO/Crystal .Sh SYNOPSIS .Cd "device iic" .Cd "device iicbus" diff --git a/share/man/man4/dtrace_audit.4 b/share/man/man4/dtrace_audit.4 index 5869eb97f99a..e12d1d932357 100644 --- a/share/man/man4/dtrace_audit.4 +++ b/share/man/man4/dtrace_audit.4 @@ -29,8 +29,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 28, 2019 .Dt DTRACE_AUDIT 4 .Os diff --git a/share/man/man4/dtrace_io.4 b/share/man/man4/dtrace_io.4 index ed5c56f316c5..30ec44768fbf 100644 --- a/share/man/man4/dtrace_io.4 +++ b/share/man/man4/dtrace_io.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 18, 2015 .Dt DTRACE_IO 4 .Os diff --git a/share/man/man4/dtrace_ip.4 b/share/man/man4/dtrace_ip.4 index 56958b6bfe34..e9fbdfa3cf43 100644 --- a/share/man/man4/dtrace_ip.4 +++ b/share/man/man4/dtrace_ip.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 14, 2015 .Dt DTRACE_IP 4 .Os diff --git a/share/man/man4/dtrace_kinst.4 b/share/man/man4/dtrace_kinst.4 new file mode 100644 index 000000000000..9debbc1bd106 --- /dev/null +++ b/share/man/man4/dtrace_kinst.4 @@ -0,0 +1,91 @@ +.\" Copyright (c) 2022 Christos Margiolis <christos@FreeBSD.org> +.\" 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. +.\" +.Dd February 27, 2023 +.Dt DTRACE_KINST 4 +.Os +.Sh NAME +.Nm dtrace_kinst +.Nd a DTrace provider for tracing arbitrary instructions in a given kernel function +.Sh SYNOPSIS +kinst::<function>:<instruction> +.Sh DESCRIPTION +The DTrace +.Nm kinst +provider allows the user to trace any instruction in a given kernel function. +<function> corresponds to the function to be traced, and <instruction> is the +offset to the specific instruction, and can be obtained from the function's +disassembly using kgdb from the gdb package. +.Pp +.Nm kinst +creates probes on-demand, meaning it searches for and parses the function's +instructions each time +.Xr dtrace 1 +is run, and not at module load time. +This is in contrast to FBT's load-time parsing, since +.Nm kinst +can potentially create thousands of probes for just a single function, instead +of up to two (entry and return) in the case of FBT. +A result of this is that +.Cm dtrace -l -P kinst +will not match any probes. +.Sh IMPLEMENTATION NOTES +The provider is currently implemented only for amd64. +.Sh EXAMPLES +Find the offset corresponding to the third instruction in +.Fn vm_fault +and trace it, printing the contents of the RSI register: +.Bd -literal -offset indent +# kgdb +(kgdb) disas /r vm_fault +Dump of assembler code for function vm_fault: + 0xffffffff80876df0 <+0>: 55 push %rbp + 0xffffffff80876df1 <+1>: 48 89 e5 mov %rsp,%rbp + 0xffffffff80876df4 <+4>: 41 57 push %r15 + +# dtrace -n 'kinst::vm_fault:4 {printf("%#x", regs[R_RSI]);}' + 2 81500 vm_fault:4 0x827c56000 + 2 81500 vm_fault:4 0x827878000 + 2 81500 vm_fault:4 0x1fab9bef0000 + 2 81500 vm_fault:4 0xe16cf749000 + 0 81500 vm_fault:4 0x13587c366000 + ... +.Ed +.Pp +Trace all instructions in +.Fn amd64_syscall : +.Bd -literal -offset indent +# dtrace -n 'kinst::amd64_syscall:' +.Ed +.Sh SEE ALSO +.Xr dtrace 1 +.Sh HISTORY +The +.Nm kinst +provider first appeared in +.Fx +14.0. +.Sh AUTHORS +This manual page was written by +.An Christos Margiolis Aq Mt christos@FreeBSD.org . diff --git a/share/man/man4/dtrace_lockstat.4 b/share/man/man4/dtrace_lockstat.4 index 8ed2af14f811..e308ca6c22ce 100644 --- a/share/man/man4/dtrace_lockstat.4 +++ b/share/man/man4/dtrace_lockstat.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 20, 2019 .Dt DTRACE_LOCKSTAT 4 .Os diff --git a/share/man/man4/dtrace_proc.4 b/share/man/man4/dtrace_proc.4 index 9e2c784e7845..5e217eb0e205 100644 --- a/share/man/man4/dtrace_proc.4 +++ b/share/man/man4/dtrace_proc.4 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 17, 2016 +.Dd March 3, 2023 .Dt DTRACE_PROC 4 .Os .Sh NAME @@ -188,7 +186,7 @@ Real scheduling priority of the thread. Currently always 0. .It Vt char pr_sname Currently always -.Ql ? . +.Ql \&? . .It Vt short pr_syscall Currently always 0. .It Vt uintptr_t pr_addr diff --git a/share/man/man4/dtrace_sched.4 b/share/man/man4/dtrace_sched.4 index 5c45f401d052..b085ffe43e3c 100644 --- a/share/man/man4/dtrace_sched.4 +++ b/share/man/man4/dtrace_sched.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 18, 2015 .Dt DTRACE_SCHED 4 .Os diff --git a/share/man/man4/dtrace_sctp.4 b/share/man/man4/dtrace_sctp.4 index 7da53ca1f383..6e2f1ed31969 100644 --- a/share/man/man4/dtrace_sctp.4 +++ b/share/man/man4/dtrace_sctp.4 @@ -21,9 +21,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd August 22, 2018 +.Dd June 29, 2023 .Dt DTRACE_SCTP 4 .Os .Sh NAME @@ -150,20 +148,20 @@ A script that logs SCTP packets in real time: dtrace:::BEGIN { - printf(" %3s %15s:%-5s %15s:%-5s\n", "CPU", + printf(" %3s %15s:%-5s %15s:%-5s\\n", "CPU", "LADDR", "LPORT", "RADDR", "RPORT"); } sctp:::send { - printf(" %3d %16s:%-5d -> %16s:%-5d\n", cpu, + printf(" %3d %16s:%-5d -> %16s:%-5d\\n", cpu, args[2]->ip_saddr, args[4]->sctp_sport, args[2]->ip_daddr, args[4]->sctp_dport); } sctp:::receive { - printf(" %3d %16s:%-5d <- %16s:%-5d\n", cpu, + printf(" %3d %16s:%-5d <- %16s:%-5d\\n", cpu, args[2]->ip_daddr, args[4]->sctp_dport, args[2]->ip_saddr, args[4]->sctp_sport); } @@ -177,7 +175,7 @@ int last[int]; dtrace:::BEGIN { - printf(" %3s %12s %-25s %-25s\n", + printf(" %3s %12s %-25s %-25s\\n", "CPU", "DELTA(us)", "OLD", "NEW"); } @@ -185,7 +183,7 @@ sctp:::state-change / last[args[1]->cs_cid] / { this->elapsed = (timestamp - last[args[1]->cs_cid]) / 1000; - printf(" %3d %12d %-25s -> %-25s\n", cpu, this->elapsed, + printf(" %3d %12d %-25s -> %-25s\\n", cpu, this->elapsed, sctp_state_string[args[5]->sctps_state], sctp_state_string[args[3]->sctps_state]); last[args[1]->cs_cid] = timestamp; @@ -194,7 +192,7 @@ sctp:::state-change sctp:::state-change / last[args[1]->cs_cid] == 0 / { - printf(" %3d %12s %-25s -> %-25s\n", cpu, "-", + printf(" %3d %12s %-25s -> %-25s\\n", cpu, "-", sctp_state_string[args[5]->sctps_state], sctp_state_string[args[3]->sctps_state]); last[args[1]->cs_cid] = timestamp; diff --git a/share/man/man4/dtrace_tcp.4 b/share/man/man4/dtrace_tcp.4 index dbe3dd7ac099..af57f6e94a63 100644 --- a/share/man/man4/dtrace_tcp.4 +++ b/share/man/man4/dtrace_tcp.4 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd August 1, 2018 +.Dd July 2, 2023 .Dt DTRACE_TCP 4 .Os .Sh NAME @@ -49,6 +47,7 @@ protocol "tcpinfo_t *" .Fn tcp:::state-change "void *" "csinfo_t *" "void *" "tcpsinfo_t *" "void *" \ "tcplsinfo_t *" +.Fn tcp:::siftr "siftrinfo_t *" .Sh DESCRIPTION The DTrace .Nm tcp @@ -65,6 +64,8 @@ All .Nm tcp probes except for .Fn tcp:::state-change +and +.Fn tcp:::siftr have the same number and type of arguments. The last three arguments are used to describe a TCP segment: the .Vt ipinfo_t @@ -136,6 +137,15 @@ Its first, third and fifth arguments are currently always Its last argument describes the from-state in the transition, and the to-state can be obtained from .Dv args[3]->tcps_state . +.Pp +The +.Fn tcp:::siftr +probe fires when a TCP segment is sent or received by the host. +For a detailed description see +.Xr siftr 4 . +The +.Vt siftrinfo_t +argument provides the information about the TCP connection. .Sh ARGUMENTS The .Vt pktinfo_t @@ -285,10 +295,107 @@ The valid TCP state values are given by the constants prefixed with in .Pa /usr/lib/dtrace/tcp.d . .El +.Pp +The +.Vt siftrinfo_t +type is used by the +.Fn tcp:::siftr +probe to provide the state of the TCP connection. +Its fields are: +.Bl -tag -width "u_int sent_inflight_bytes" -offset indent +.It Vt uint8_t direction +Direction of packet that triggered the log message. +Either +.Qq 0 +for in, or +.Qq 1 +for out. +.It Vt uint8_t ipver +The version of the IP protocol being used. +Either +.Qq 1 +for IPv4, or +.Qq 2 +for IPv6. +.It Vt uint16_t lport +The TCP port that the local host is communicating via. +.It Vt uint16_t rport +The TCP port that the remote host is communicating via. +.It Vt string laddr +The IPv4 or IPv6 address of the local host. +.It Vt string raddr +The IPv4 or IPv6 address of the remote host. +.It Vt uint32_t snd_cwnd +The current congestion window (CWND) for the flow, in bytes. +.It Vt uint32_t snd_wnd +The current sending window for the flow, in bytes. +The post scaled value is reported, except during the initial handshake (first +few packets), during which time the unscaled value is reported. +.It Vt uint32_t rcv_wnd +The current receive window for the flow, in bytes. +The post scaled value is always reported. +.It Vt uint32_t t_flags2 +The current value of the t_flags2 for the flow. +.It Vt uint32_t snd_ssthresh +The slow start threshold (SSTHRESH) for the flow, in bytes. +.It Vt int conn_state +A TCP state. +The valid TCP state values are given by the constants prefixed with +.Ql TCPS_ +in +.Pa /usr/lib/dtrace/tcp.d . +.It Vt uint32_t mss +The maximum segment size (MSS) for the flow, in bytes. +.It Vt uint32_t srtt +The current smoothed RTT (SRTT) for the flow in microseconds. +.It Vt u_char sack_enabled +SACK enabled indicator. 1 if SACK enabled, 0 otherwise. +.It Vt u_char snd_scale +The current window scaling factor for the sending window. +.It Vt u_char rcv_scale +The current window scaling factor for the receiving window. +.It Vt u_int t_flags +The current value of the t_flags for the flow. +.It Vt uint32_t rto +The current retransmission timeout (RTO) for the flow in microseconds. +Divide by HZ to get the timeout length in seconds. +.It Vt u_int snd_buf_hiwater +The current size of the socket send buffer in bytes. +.It Vt u_int snd_buf_cc +The current number of bytes in the socket send buffer. +.It Vt u_int rcv_buf_hiwater +The current size of the socket receive buffer in bytes. +.It Vt u_int rcv_buf_cc +The current number of bytes in the socket receive buffer. +.It Vt u_int sent_inflight_bytes +The current number of unacknowledged bytes in-flight. +Bytes acknowledged via SACK are not excluded from this count. +.It Vt int t_segqlen +The current number of segments in the reassembly queue. +.It Vt u_int flowid +Flowid for the connection. +A caveat: Zero '0' either represents a valid flowid or a default value when +the flowid is not being set. +.It Vt u_int flowtype +Flow type for the connection. +Flowtype defines which protocol fields are hashed to produce the flowid. +A complete listing is available in +.Pa /usr/include/sys/mbuf.h +under +.Dv M_HASHTYPE_* . +.El .Sh FILES -.Bl -tag -width "/usr/lib/dtrace/tcp.d" -compact +.Bl -tag -width "/usr/lib/dtrace/siftr.d" -compact .It Pa /usr/lib/dtrace/tcp.d +DTrace type and translator definitions for all the probes of the +.Nm tcp +provider except the +.Nm siftr +probe. +.It Pa /usr/lib/dtrace/siftr.d DTrace type and translator definitions for the +.Nm siftr +probe of the .Nm tcp provider. .El @@ -317,7 +424,7 @@ tcp:::send printf("%s", args[4]->tcp_flags & TH_ACK ? "ACK|" : ""); printf("%s", args[4]->tcp_flags & TH_URG ? "URG|" : ""); printf("%s", args[4]->tcp_flags == 0 ? "null " : ""); - printf("\b)\\n"); + printf("\\b)\\n"); } tcp:::receive @@ -333,7 +440,7 @@ tcp:::receive printf("%s", args[4]->tcp_flags & TH_ACK ? "ACK|" : ""); printf("%s", args[4]->tcp_flags & TH_URG ? "URG|" : ""); printf("%s", args[4]->tcp_flags == 0 ? "null " : ""); - printf("\b)\\n"); + printf("\\b)\\n"); } .Ed The following script logs TCP connection state changes as they occur: @@ -367,6 +474,26 @@ tcp:::state-change last[args[1]->cs_cid] = timestamp; } .Ed +The following script uses the siftr probe to show the current value of CWND +and SSTHRESH when a packet is sent or received: +.Bd -literal -offset indent +#pragma D option quiet +#pragma D option switchrate=10hz + +dtrace:::BEGIN +{ + printf(" %3s %16s:%-5s %16s:%-5s %10s %10s\\n", + "DIR", "LADDR", "LPORT", "RADDR", "RPORT", "CWND", "SSTHRESH"); +} + +tcp:::siftr +{ + printf(" %3s %16s:%-5d %16s:%-5d %10u %10u\\n", + siftr_dir_string[args[0]->direction], + args[0]->laddr, args[0]->lport, args[0]->raddr, args[0]->rport, + args[0]->snd_cwnd, args[0]->snd_ssthresh); +} +.Ed .Sh COMPATIBILITY This provider is compatible with the .Nm tcp @@ -377,6 +504,7 @@ provider in Solaris. .Xr dtrace_sctp 4 , .Xr dtrace_udp 4 , .Xr dtrace_udplite 4 , +.Xr siftr 4 , .Xr tcp 4 , .Xr SDT 9 .Sh HISTORY diff --git a/share/man/man4/dtrace_udp.4 b/share/man/man4/dtrace_udp.4 index ee5b7acffe6b..2e5c40cc1e7f 100644 --- a/share/man/man4/dtrace_udp.4 +++ b/share/man/man4/dtrace_udp.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 1, 2018 .Dt DTRACE_UDP 4 .Os diff --git a/share/man/man4/dtrace_udplite.4 b/share/man/man4/dtrace_udplite.4 index 05a514d01f32..768de0951d25 100644 --- a/share/man/man4/dtrace_udplite.4 +++ b/share/man/man4/dtrace_udplite.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 1, 2018 .Dt DTRACE_UDPLITE 4 .Os diff --git a/share/man/man4/dummymbuf.4 b/share/man/man4/dummymbuf.4 new file mode 100644 index 000000000000..08926d2824c6 --- /dev/null +++ b/share/man/man4/dummymbuf.4 @@ -0,0 +1,211 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024 Igor Ostapenko <pm@igoro.pro> +.\" +.\" 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. +.\" +.\" Note: The date here should be updated whenever a non-trivial +.\" change is made to the manual page. +.Dd January 6, 2025 +.Dt DUMMYMBUF 4 +.Os +.Sh NAME +.Nm dummymbuf +.Nd "mbuf alteration pfil hooks" +.Sh SYNOPSIS +To compile the driver into the kernel, +place the following line in the +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device dummymbuf" +.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 +dummymbuf_load="YES" +.Ed +.Sh DESCRIPTION +This module is intended to test networking code in the face of unusual mbuf +layouts. +The special +.Xr pfil 9 +hooks are provided for mbuf alteration and can be listed with +.Xr pfilctl 8 +as follows: +.Bd -literal -offset indent + Hook Type + dummymbuf:ethernet Ethernet + dummymbuf:inet6 IPv6 + dummymbuf:inet IPv4 +.Ed +.Pp +To activate a hook it must be linked to the respective +.Xr pfil 9 +head. +.Xr pfilctl 8 +can be used for the linking. +.Pp +Each time a hook is invoked it reads a single shared set of +.Sx RULES +from +.Va net.dummymbuf.rules +sysctl. +The rules are evaluated sequentially and each matching rule performs the +specified operation over the mbuf. +.Pp +After every successfully applied operation the +.Va net.dummymbuf.hits +sysctl counter is increased. +.Pp +A hook returns an altered mbuf for further processing, but it drops a packet +if rules parsing or an operation fails. +Also, the first mbuf of the original chain may be changed. +.Pp +The module is +.Xr VNET 9 +based, hence every +.Xr jail 2 +provides its own set of hooks and sysctl variables. +.Sh RULES +The set of rules is a semicolon separated list. +An empty string is treated as a parsing failure. +A rule conceptually has two parts, filter and operation, with the following +syntax: +.Bd -literal -offset indent +{inet | inet6 | ethernet} {in | out} <ifname> <opname>[ <opargs>]; +.Ed +.Ss Filter +The first word of a rule matches +.Xr pfil 9 +type. +The second matches packet's direction, and the third matches the network +interface a packet is coming from. +.Ss Operation +An operation may have arguments separated from its name by space. +The available operations are: +.Bl -tag -width indent +.It pull-head <number-of-bytes> +Unconditionally creates a brand new cluster-based mbuf and links it to be the +first mbuf of the original mbuf chain, with respective packet header moving. +After, the given number of bytes are pulled from the original mbuf chain. +.Pp +If it is asked to pull 0 bytes then the first mbuf of the resulting chain will +be left empty. +Asking to pull more than +.Dv MCLBYTES +is treated as an operation failure. +If a mbuf chain has less data than asked then the entire packet is pulled with +tail mbuf(s) left empty. +.Pp +As a result, only the layout of a mbuf chain is altered, its content logically +is left intact. +.It enlarge <number-of-bytes> +Unconditionally replace the mbuf with an mbuf of the specified size. +.El +.Sh SYSCTL VARIABLES +The following variables are available: +.Bl -tag -width indent +.It Va net.dummymbuf.rules +A string representing a single set of +.Sx RULES +shared among all +.Nm +hooks. +.It Va net.dummymbuf.hits +Number of times a rule has been applied. +It is reset to zero upon writing. +.El +.Sh EXAMPLES +As it was intended, +.Nm +can be found useful for firewall testing. +A mbuf chain could be altered before it hits a firewall to test that the latter +can handle a case respectively. +Thus, it is important to have correct sequence of hooks. +A test case should prepare and enable a firewall first to get its hooks linked. +After, the +.Xr pfilctl 8 +should be used to link +.Nm +hook(s) to put them in front of a firewall. +.Pp +The following links +.Va dummymbuf:inet6 +hook for inbound and puts it in front of other hooks: +.Bd -literal -offset indent +pfilctl link -i dummymbuf:inet6 inet6 +.Ed +.Pp +And this does the same for outbound: +.Bd -literal -offset indent +pfilctl link -o -a dummymbuf:inet6 inet6 +.Ed +.Pp +For instance, we want to test a scenario in which the very first mbuf in a +chain has zero m_len, to verify that a firewall can correctly read the +packet data despite that. +The following set of rules does it for inbound and outbound: +.Bd -literal -offset indent +sysctl net.dummymbuf.rules="inet6 in em0 pull-head 0; inet6 out em0 pull-head 0;" +.Ed +.Pp +It is encouraged to verify +.Va net.dummymbuf.hits +sysctl counter along with other test assertions to make sure that +.Nm +really does its work and there is no false positive due to misconfiguration. +It is a good idea to reset it before the action: +.Bd -literal -offset indent +sysctl net.dummymbuf.hits=0 +.Ed +.Pp +It is equally important to cleanup the things after the test case: +.Bd -literal -offset indent +pfilctl unlink -i dummymbuf:inet6 inet6 +pfilctl unlink -o dummymbuf:inet6 inet6 +sysctl net.dummymbuf.rules="" +.Ed +.Pp +If a test case operates within a temporary vnet then explicit cleanup can be +omitted, the +.Nm +facilities will vanish along with its vnet instance. +.Sh DIAGNOSTICS +.Bl -diag +.It "dummymbuf: <filter match>: rule parsing failed: <the rule in question>" +If everything looks fine then extra spaces removal may help due to the parser +is kept very simple. +.It "dummymbuf: <filter match>: mbuf operation failed: <the rule in question>" +Incorrect operation argument has been found, mbuf allocation has failed, etc. +.El +.Sh SEE ALSO +.Xr jail 2 , +.Xr pfilctl 8 , +.Xr mbuf 9 , +.Xr pfil 9 , +.Xr VNET 9 +.Sh AUTHORS +The module and this manual page were written by +.An Igor Ostapenko Aq Mt pm@igoro.pro . diff --git a/share/man/man4/dummynet.4 b/share/man/man4/dummynet.4 index ca5d33c51b73..ad82cb80011d 100644 --- a/share/man/man4/dummynet.4 +++ b/share/man/man4/dummynet.4 @@ -1,6 +1,4 @@ .\" -.\" $FreeBSD$ -.\" .Dd September 10, 2021 .Dt DUMMYNET 4 .Os @@ -61,9 +59,9 @@ pipes. .Xr setsockopt 2 , .Xr if_bridge 4 , .Xr ip 4 , -.Xr ipfw 8 , -.Xr dnctl 8 , .Xr pf.conf 5 , +.Xr dnctl 8 , +.Xr ipfw 8 , .Xr sysctl 8 .Sh HISTORY The diff --git a/share/man/man4/e6000sw.4 b/share/man/man4/e6000sw.4 new file mode 100644 index 000000000000..92a3b5c8ed0b --- /dev/null +++ b/share/man/man4/e6000sw.4 @@ -0,0 +1,46 @@ +.\" +.\" Copyright (c) 2025 Alexander Ziaee +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd May 10, 2025 +.Dt E6000SW 4 +.Sh NAME +.Nm e6000sw +.Nd Marvell 88E6000 series Gigabit Ethernet switch driver +.Sh SYNOPSIS +.Cd device mdio +.Cd etherswitch +.Cd e6000sw +.Sh DESCRIPTION +The +.Nm +driver supports Marvell Gigabit Ethernet switch controllers. +.Sh HARDWARE +The +.Nm +driver supports the following Gigabit Ethernet switch controllers: +.Pp +.Bl -bullet -compact +.It +Marvell 88E6190X +.It +Marvell 88E6190 +.It +Marvell 88E6176 +.It +Marvell 88E6172 +.It +Marvell 88E6341 +.It +Marvell 88E6141 +.El +.Sh SEE ALSO +.Xr e6060sw 4 , +.Xr etherswitch 4 , +.Xr etherswitchcfg 8 +.Sh HISTORY +The +.Nm +driver appeared in +.Fx 11.0 . diff --git a/share/man/man4/e6060sw.4 b/share/man/man4/e6060sw.4 index c5394106f5b9..74736f65fe80 100644 --- a/share/man/man4/e6060sw.4 +++ b/share/man/man4/e6060sw.4 @@ -23,14 +23,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 5, 2017 +.Dd May 10, 2025 .Dt E6060SW 4 .Os .Sh NAME .Nm e6060sw -.Nd driver for Marvell 88E6060 and 88E6065 fast ethernet switch chip +.Nd Marvell 88E6060/88E6063/88E6065 Fast Ethernet switch driver .Sh SYNOPSIS .Cd "device mdio" .Cd "device etherswitch" @@ -46,6 +44,19 @@ This driver use smi interface by ethernet interface. 88E6060 support is only port vlan. 88E6065 support is port and dot1q vlan. dot1q support group base tag/untag. +.Sh HARDWARE +The +.Nm +driver supports the following Fast Ethernet switch controllers: +.Pp +.Bl -bullet -compact +.It +Marvell 88E6060 +.It +Marvell 88E6063 +.It +Marvell 88E6065 +.El .Sh EXAMPLES Configure dot1q vlan on 88E6065 by etherswitchcfg command. .Pp diff --git a/share/man/man4/edsc.4 b/share/man/man4/edsc.4 index a25cee3a4143..f7ee4ca5c204 100644 --- a/share/man/man4/edsc.4 +++ b/share/man/man4/edsc.4 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" From: @(#)lo.4 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" .Dd March 25, 2007 .Dt EDSC 4 .Os diff --git a/share/man/man4/efidev.4 b/share/man/man4/efidev.4 index 2cadada51e9c..defae1f31bea 100644 --- a/share/man/man4/efidev.4 +++ b/share/man/man4/efidev.4 @@ -1,5 +1,5 @@ .\"- -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org> .\" @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 18, 2021 .Dt EFIDEV 4 .Os @@ -36,7 +34,7 @@ .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: -.Bd -ragged -offset -indent +.Bd -ragged -offset indent .Cd "options EFIRT" .Ed .Pp diff --git a/share/man/man4/ehci.4 b/share/man/man4/ehci.4 index 17186a797ddf..eb7029f30f51 100644 --- a/share/man/man4/ehci.4 +++ b/share/man/man4/ehci.4 @@ -27,8 +27,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 24, 2018 .Dt EHCI 4 .Os diff --git a/share/man/man4/em.4 b/share/man/man4/em.4 index a1fa22c2d0d3..0e9c08560545 100644 --- a/share/man/man4/em.4 +++ b/share/man/man4/em.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 2001-2003, Intel Corporation .\" All rights reserved. .\" @@ -29,13 +32,13 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.\" $FreeBSD$ -.\" -.Dd January 30, 2019 +.Dd March 20, 2024 .Dt EM 4 .Os .Sh NAME -.Nm em +.Nm em , +.Nm lem , +.Nm igb .Nd "Intel(R) PRO/1000 Gigabit Ethernet adapter driver" .Sh SYNOPSIS To compile this driver into the kernel, @@ -55,21 +58,35 @@ if_em_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for PCI Gigabit Ethernet adapters based on +driver provides support for PCI/PCI-X Gigabit Ethernet adapters based on the Intel 82540, 82541ER, 82541PI, 82542, 82543, 82544, 82545, 82546, -82546EB, 82546GB, 82547, 82571, 81572, 82573, and 82574 Ethernet +82546EB, 82546GB, and 82547 controller chips. +.Pp +The +.Nm +driver provides support for PCI Express Gigabit Ethernet adapters +based on the Intel 82571, 82572, 82573, 82574, and 82583 Ethernet controller chips. .Pp The .Nm -driver also provides support for PCI Express Gigabit Ethernet adapters -based on the Intel 82575, 82576, 82580, i21x and i35x. +driver provides support for Gigabit Ethernet adapters connected to I/O +Controller Hub (ICH) and Platform Controller Hub (PCH) including Intel +80003ES2LAN, 82562, 82566, 82567, 82577, 82578, 82579, i217, i218, and i219. +.Pp +The +.Nm +driver provides support for PCI Express Gigabit Ethernet adapters +based on the Intel 82575, 82576, 82580, i210, i211, and i35x. +These appear as +.Nm igb +interfaces to maintain compatibility with existing infrastructure. .Pp The driver supports Transmit/Receive checksum offload and Jumbo Frames on all but 82542-based adapters. .Pp Furthermore it supports TCP segmentation offload (TSO) on all adapters but -those based on the 82543, 82544 and 82547 controller chips. +those based on the 82542, 82543, 82544 and 82547 controller chips. The identification LEDs of the adapters supported by the .Nm driver can be controlled via the @@ -215,6 +232,9 @@ Tunables can be set at the .Xr loader 8 prompt before booting the kernel or stored in .Xr loader.conf 5 . +See +.Xr iflib 4 +for per-instance variables. .Bl -tag -width indent .It Va hw.em.disable_crc_stripping Disable or enable hardware stripping of CRC field. @@ -224,27 +244,12 @@ Default 0 (enabled). .It Va hw.em.eee_setting Disable or enable Energy Efficient Ethernet. Default 1 (disabled). -.It Va hw.em.msix -Enable or disable MSI-X style interrupts. -Default 1 (enabled). .It Va hw.em.smart_pwr_down Enable or disable smart power down features on newer adapters. Default 0 (disabled). .It Va hw.em.sbp Show bad packets when in promiscuous mode. Default 0 (off). -.It Va hw.em.rxd -Number of receive descriptors allocated by the driver. -The default value is 1024 for adapters newer than 82547, -and 256 for older ones. -The 82542 and 82543-based adapters can handle up to 256 descriptors, -while others can have up to 4096. -.It Va hw.em.txd -Number of transmit descriptors allocated by the driver. -The default value is 1024 for adapters newer than 82547, -and 256 for older ones. -The 82542 and 82543-based adapters can handle up to 256 descriptors, -while others can have up to 4096. .It Va hw.em.rx_int_delay This value delays the generation of receive interrupts in units of 1.024 microseconds. @@ -264,6 +269,12 @@ If .Va hw.em.tx_int_delay is non-zero, this tunable limits the maximum delay in which a transmit interrupt is generated. +.It Va hw.em.max_interrupt_rate +Maximum interrupts per second. +The default value is 8000. +.It Va hw.em.rx_process_limit +Maximum number of received packets to process at a time, -1 means unlimited. +The default value is 100. .El .Sh FILES .Bl -tag -width /dev/led/em* @@ -313,7 +324,13 @@ The device driver first appeared in .Fx 4.4 . .Nm -was merged with the igb device driver and converted to the iflib framework in +was merged with the +.Nm lem +and +.Nm igb +device drivers and converted to the +.Xr iflib 4 +framework in .Fx 12.0 . .Sh AUTHORS .An -nosplit @@ -321,7 +338,11 @@ The .Nm driver was originally written by .An Intel Corporation Aq Mt freebsd@intel.com . -It was merged with igb driver and converted to the iflib framework by +It was merged with the +.Nm igb +driver and converted to the +.Xr iflib 4 +framework by .An Matthew Macy Aq Mt mmacy@mattmacy.io and .An Sean Bruno Aq Mt sbruno@FreeBSD.org . diff --git a/share/man/man4/ena.4 b/share/man/man4/ena.4 index ba9654c8c19a..cb5b9367da43 100644 --- a/share/man/man4/ena.4 +++ b/share/man/man4/ena.4 @@ -1,6 +1,6 @@ .\" SPDX-License-Identifier: BSD-2-Clause .\" -.\" Copyright (c) 2015-2020 Amazon.com, Inc. or its affiliates. +.\" Copyright (c) 2015-2024 Amazon.com, Inc. or its affiliates. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -27,14 +27,12 @@ .\" (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 June 4, 2021 +.Dd November 14, 2024 .Dt ENA 4 .Os .Sh NAME .Nm ena -.Nd "FreeBSD kernel driver for Elastic Network Adapter (ENA) family" +.Nd AWS EC2 Elastic Network Adapter (ENA) driver .Sh SYNOPSIS To compile this driver into the kernel, place the following line in the @@ -95,7 +93,9 @@ framework is provided by the driver. Kernel must be built with the DEV_NETMAP option to be able to use this feature. .Sh HARDWARE -Supported PCI vendor ID/device IDs: +The +.Nm +driver supports the following PCI vendor ID/device IDs: .Pp .Bl -bullet -compact .It @@ -135,17 +135,17 @@ This can further lead to OS instability, together with ENA driver reset and NVMe timeouts. If network performance is critical and memory capacity is sufficient, the 9k mbufs can be used. -.It Va hw.ena.force_large_llq_headers -Force the driver to use large LLQ headers (224 bytes). -The default is 0. +.It Va hw.ena.force_large_llq_header +Force the driver to use large (224 bytes) or regular (96 bytes) LLQ header size. +The default value is 2 and the recommended LLQ header size will be used. If the node value is set to 0, the regular size LLQ header will be used, which is 96B. In some cases, the packet header can be bigger than this (for example - IPv6 with multiple extensions). -In such a situation, the large LLQ headers should be used by setting this node -value to 1. -This will take effect only if the device supports both LLQ and large LLQ -headers. +In such a situation, the large LLQ header size which is 224B should be used, +and can be forced by setting this node value to 1. +Using large LLQ header size will take effect only if the device supports +both LLQ and large LLQ headers. Otherwise, it will fallback to the no LLQ mode or regular header size. .Pp Increasing LLQ header size reduces the size of the Tx queue by half, so it may @@ -516,10 +516,10 @@ for more details. .Sh SUPPORT If an issue is identified with the released source code with a supported adapter, please email the specific information related to the issue to -.Aq Mt mk@semihalf.com , -.Aq Mt dgr@semihalf.com +.Aq Mt akiyano@amazon.com , +.Aq Mt osamaabb@amazon.com and -.Aq Mt mw@semihalf.com . +.Aq Mt darinzon@amazon.com . .Sh SEE ALSO .Xr netmap 4 , .Xr vlan 4 , @@ -532,5 +532,5 @@ driver first appeared in .Sh AUTHORS The .Nm -driver was written by +driver was developed by Amazon and originally written by .An Semihalf . diff --git a/share/man/man4/enc.4 b/share/man/man4/enc.4 index 42e014304b25..86f14d2bf290 100644 --- a/share/man/man4/enc.4 +++ b/share/man/man4/enc.4 @@ -29,8 +29,6 @@ .\" (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 August 9, 2017 .Dt ENC 4 .Os @@ -128,7 +126,7 @@ The special value 0x4 can be configured in the .Ar ipsec_bpf_mask and packets will be also captured after firewall processing. .Sh EXAMPLES -To see the packets the processed via +To see the packets processed via .Xr ipsec 4 , adjust the .Xr sysctl 8 diff --git a/share/man/man4/man4.i386/ce.4 b/share/man/man4/enic.4 index 451f9fb22da0..1783b05dfa12 100644 --- a/share/man/man4/man4.i386/ce.4 +++ b/share/man/man4/enic.4 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2006 Roman Kurakin <rik@FreeBSD.org> +.\" Copyright 2008-2017 Cisco Systems, Inc. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -10,7 +10,7 @@ .\" 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" THIS SOFTWARE IS PROVIDED BY 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 AUTHOR OR CONTRIBUTORS BE LIABLE @@ -22,70 +22,67 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd October 22, 2021 -.Dt CE 4 i386 +.Dd September 7, 2022 +.Dt ENIC 4 .Os .Sh NAME -.Nm ce -.Nd "driver for synchronous Cronyx Tau-PCI/32 WAN adapters" +.Nm enic +.Nd "VIC Ethernet NIC driver" .Sh SYNOPSIS To compile this driver into the kernel, -place the following line in your +place the following lines in your kernel configuration file: .Bd -ragged -offset indent -.Cd "device ce" +.Cd "device iflib" +.Cd "device enic" +.Ed +.Pp +To load the driver as a module at run-time, +run the following command as root: +.Bd -literal -offset indent +kldload if_enic .Ed .Pp -Alternatively, to load the driver as a -module at boot time, place the following line in +To load the driver as a +module at boot time, place the following lines in .Xr loader.conf 5 : .Bd -literal -offset indent -if_ce_load="YES" +if_enic_load="YES" .Ed .Sh DESCRIPTION The .Nm -driver creates a -.Xr netgraph 4 -node for each device found. -The node is usually paired with -.Xr ng_async 4 , -.Xr ng_cisco 4 , -.Xr ng_frame_relay 4 -or with -.Xr ng_ppp 4 -under control of net/mpd5 port. -.Pp -Refer to -.Xr sconfig 8 -for information about the -.Nm -adapter configuration. +driver provides support for Cisco Virtual Interface Card. +Support is limited to basic network connectivity. +Media is controlled by the NIC itself since there can be multiple +virtual PCI NIC devices exposed to the PCI bus. .Sh HARDWARE The .Nm -driver supports the following models of Tau-PCI/32 WAN adapters: -.Pp -.Bl -tag -width 20n -compact -.It Cronyx Tau-PCI/32 -two fractional/unframed E1 interfaces, -with 32 HDLC channels shared between them with total adapter throughput -2048 kbps. -.It Cronyx Tau-PCI/32-Lite -single fractional/unframed E1 interface, -with 32 HDLC channels. -.El +driver should supports all known Cisco VIC cards. +.Sh CONFIGURATION +The +.Nm +network interface is configured using +.Xr ifconfig 8 +and the +.Xr sysctl 8 +tree at +.Dv dev.enic.<N> . +All configurable entries are also tunables, and can be put directly into the +.Xr loader.conf 5 +for persistent configuration. .Sh SEE ALSO -.Xr cp 4 , -.Xr netgraph 4 , -.Xr sconfig 8 +.Xr ifconfig 8 .Sh HISTORY The .Nm -driver was added in -.Fx 6.2 , -.Fx 5.5 -and -.Fx 4.11 . +device driver first appeared in +.Fx 14.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Cisco UCS team +based of the DPDK driver. diff --git a/share/man/man4/epair.4 b/share/man/man4/epair.4 index e1018e4b177f..4bcb54c936cb 100644 --- a/share/man/man4/epair.4 +++ b/share/man/man4/epair.4 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 18, 2015 .Dt EPAIR 4 .Os diff --git a/share/man/man4/est.4 b/share/man/man4/est.4 index 0470721fca61..6452f1d40f11 100644 --- a/share/man/man4/est.4 +++ b/share/man/man4/est.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 21, 2020 .Dt EST 4 .Os diff --git a/share/man/man4/et.4 b/share/man/man4/et.4 index 7a0a92e7d534..6f9e37e0a56d 100644 --- a/share/man/man4/et.4 +++ b/share/man/man4/et.4 @@ -28,8 +28,6 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 9, 2011 .Dt ET 4 .Os diff --git a/share/man/man4/etherswitch.4 b/share/man/man4/etherswitch.4 index ea7ef49e6f4c..ba8e32c00750 100644 --- a/share/man/man4/etherswitch.4 +++ b/share/man/man4/etherswitch.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 5, 2017 .Dt ETHERSWITCH 4 .Os @@ -50,14 +48,13 @@ driver provides a framework for Ethernet switch devices. device nodes .El .Sh SEE ALSO +.Xr adm6996fc 4 , +.Xr ar40xx 4 , .Xr arswitch 4 , -.Xr iicbus 4 , -.Xr ip17x 4 , -.Xr rtl8366rb 4 , +.Xr e6000sw 4 , .Xr e6060sw 4 , -.Xr adm6996fc 4 , +.Xr iicbus 4 , .Xr ksz8995ma 4 , -.Xr ukswitch 4 , .Xr etherswitchcfg 8 .Sh HISTORY The diff --git a/share/man/man4/eventtimers.4 b/share/man/man4/eventtimers.4 index 656c8e011d29..fee3a3264f5b 100644 --- a/share/man/man4/eventtimers.4 +++ b/share/man/man4/eventtimers.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 13, 2012 .Dt EVENTTIMERS 4 .Os diff --git a/share/man/man4/exca.4 b/share/man/man4/exca.4 index d659593b577d..555e459b7db4 100644 --- a/share/man/man4/exca.4 +++ b/share/man/man4/exca.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 23, 2003 .Dt EXCA 4 .Os diff --git a/share/man/man5/ext2fs.5 b/share/man/man4/ext2fs.4 index e02be0e4a945..816ea942d29f 100644 --- a/share/man/man5/ext2fs.5 +++ b/share/man/man4/ext2fs.4 @@ -24,10 +24,8 @@ .\" (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 30, 2018 -.Dt EXT2FS 5 +.Dt EXT2FS 4 .Os .Sh NAME .Nm ext2fs @@ -94,7 +92,7 @@ merged important parts of the allocation code from a clean-room implementation. .An Zheng Liu and -.An Fedor Upurov +.An Fedor Uporov implemented the read and write support respectively for .Em ext4 filesystems. diff --git a/share/man/man4/fd.4 b/share/man/man4/fd.4 index 0becf5140308..06cc12d25696 100644 --- a/share/man/man4/fd.4 +++ b/share/man/man4/fd.4 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)fd.4 8.1 (Berkeley) 6/9/93 -.\" $FreeBSD$ -.\" .Dd June 9, 1993 .Dt FD 4 .Os @@ -81,11 +78,11 @@ are ignored. By default, .Pa /dev/fd is provided by -.Xr devfs 5 , +.Xr devfs 4 , which provides nodes for the first three file descriptors. Some sites may require nodes for additional file descriptors; these can be made available by mounting -.Xr fdescfs 5 +.Xr fdescfs 4 on .Pa /dev/fd . .Sh FILES @@ -96,6 +93,6 @@ on .It Pa /dev/stderr .El .Sh SEE ALSO -.Xr tty 4 , -.Xr devfs 5 , -.Xr fdescfs 5 +.Xr devfs 4 , +.Xr fdescfs 4 , +.Xr tty 4 diff --git a/share/man/man4/fdc.4 b/share/man/man4/fdc.4 index 1580fc067771..929baf3a234b 100644 --- a/share/man/man4/fdc.4 +++ b/share/man/man4/fdc.4 @@ -25,9 +25,7 @@ .\" (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 April 7, 2017 +.Dd October 10, 2023 .Dt FDC 4 .Os .Sh NAME @@ -313,6 +311,61 @@ Third argument is a pointer to This type is the same as being used in the per-drive configuration flags, or in the CMOS configuration data or ACPI namespace on IA32 systems. .El +.Sh SYSCTL VARIABLES +.Bl -tag -width "debug.fdc.debugflags" +.It Dv debug.fdc.debugflags +Selectively enable debugging by setting one or more flags. +.Bl -tag -width "0x40" +.It Dv 0x01 +Dump device registers on reset. +.It Dv 0x02 +When an IO operation completes, print the number of retries +when that number is greater than zero. +.It Dv 0x04 +Print when the number of retries exceeds +.Dv debug.fdc.retries +.Pq Dv EIO . +Print when the option +.Dv FDOPT_NOERROR +is set and an error would have returned from a write operation. +.It Dv 0x08 +Print detailed IO command information. +.It Dv 0x10 +Print status registers. +.It Dv 0x20 +Print detailed status registers when interrupts complete. +Print the source code line number close to the source of a +non-zero return from a thread worker operation. +.It Dv 0x40 +Print when the disk appears to be lost. +Print cylinder, head, sector, and sector shift information +after a request to read an ID field. +Notify whether a disk probe resulted in finding a disk. +When detecting the density of media present, indicate whether +the autosensing was successful, and if so, the size of the +medium in kilobytes. +Print detailed type information when setting the drive type. +.It Dv 0x80 +Print when an unknown IOCTL is used. +.El +.It Dv debug.fdc.fifo +For enhanced controllers, allows a non-default FIFO +threshold setting. The default is 8 bytes. +.It Dv debug.fdc.retries +Maximum number of retries to attempt. The default is 10. +.It Dv debug.fdc.spec1 +Specification byte one (step-rate + head unload). +The default step rate is 6 ms. The default head unload +time is 240 ms. +.It Dv debug.fdc.spec2 +Specification byte two (head load time + no-dma). +The default head load time is 16 ms, and no-dma is 0 +.Pq disabled . +.It Dv debug.fdc.settle +Head settling time in +.Sy settle +/ hz seconds. The default value is set during device attach. +.El .Sh FILES .Bl -tag -width ".Pa /dev/fd*" -compact .It Pa /dev/fd* diff --git a/share/man/man5/fdescfs.5 b/share/man/man4/fdescfs.4 index f2abda2bb4c2..f8bf413fc274 100644 --- a/share/man/man5/fdescfs.5 +++ b/share/man/man4/fdescfs.4 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2021 The FreeBSD Foundation, Inc. +.\" Copyright (c) 2021 The FreeBSD Foundation .\" .\" Copyright (c) 1996 .\" Mike Pritchard <mpp@FreeBSD.org>. All rights reserved. @@ -38,10 +38,8 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd May 17, 2021 -.Dt FDESCFS 5 +.Dd Jul 11, 2023 +.Dt FDESCFS 4 .Os .Sh NAME .Nm fdescfs @@ -94,6 +92,18 @@ ABI compatibility mount volume with the .Cm linrdlnk option. +.It Cm rdlnk +Treat +.Nm +vnodes as symbolic links consistently, in particular, follow +the resolved name for the name lookups. +This option is strictly stronger than the +.Cm linrdlnk +option, it changes not only the type returned by +.Xr stat 2 , +but also causes the +.Nm +files to behave as symlinks. .El .Pp For @@ -186,7 +196,7 @@ flag use: .Pp .Dl "mount -t fdescfs -o nodup none /dev/fdpath" .Sh SEE ALSO -.Xr devfs 5 , +.Xr devfs 4 , .Xr mount 8 .Sh HISTORY The diff --git a/share/man/man4/fdt.4 b/share/man/man4/fdt.4 index 8501ec03e56e..2ac570a5223c 100644 --- a/share/man/man4/fdt.4 +++ b/share/man/man4/fdt.4 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 28, 2019 .Dt FDT 4 .Os diff --git a/share/man/man4/fdt_pinctrl.4 b/share/man/man4/fdt_pinctrl.4 index 7c387ded9069..0eab8f82209d 100644 --- a/share/man/man4/fdt_pinctrl.4 +++ b/share/man/man4/fdt_pinctrl.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 3, 2018 .Dt "FDT_PINCTRL" 4 .Os diff --git a/share/man/man4/fdtbus.4 b/share/man/man4/fdtbus.4 index e5943c44f9e6..7fb13b01b3b9 100644 --- a/share/man/man4/fdtbus.4 +++ b/share/man/man4/fdtbus.4 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 12, 2010 .Dt FDTBUS 4 .Os diff --git a/share/man/man4/ffclock.4 b/share/man/man4/ffclock.4 index d2ca5756e197..150d0efb9a40 100644 --- a/share/man/man4/ffclock.4 +++ b/share/man/man4/ffclock.4 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 1, 2011 .Dt FFCLOCK 4 .Os diff --git a/share/man/man7/ffs.7 b/share/man/man4/ffs.4 index 13924b936a9e..5f8787d6fefc 100644 --- a/share/man/man7/ffs.7 +++ b/share/man/man4/ffs.4 @@ -28,10 +28,8 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd May 3, 2020 -.Dt FFS 7 +.Dd January 19, 2025 +.Dt FFS 4 .Os .Sh NAME .Nm ffs @@ -287,6 +285,10 @@ upon reallocating file system blocks to be contiguous. Enable support for the rearrangement of blocks to be contiguous. .Pq Default: 1 . +.It Va vfs.ffs.prttimechgs +Print a console message when timestamps for UFS1 filesystems are found +to be in the future and are changed to be the present time. +.Pq Default: 0 . .El .Sh HISTORY The diff --git a/share/man/man4/filemon.4 b/share/man/man4/filemon.4 index 9fb2fe10a2ec..34cb322dec90 100644 --- a/share/man/man4/filemon.4 +++ b/share/man/man4/filemon.4 @@ -29,15 +29,15 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd February 1, 2022 +.Dd April 19, 2025 .Dt FILEMON 4 .Os .Sh NAME .Nm filemon .Nd the filemon device .Sh SYNOPSIS +.Cd device filemon +.Pp .In dev/filemon/filemon.h .Sh DESCRIPTION The @@ -72,7 +72,7 @@ The next log entry may be lacking an absolute path or be inaccurate. .It Ql D .Xr unlink 2 .It Ql E -.Xr exec 2 +.Xr execve 2 .It Ql F .Xr fork 2 , .Xr vfork 2 @@ -193,12 +193,13 @@ no log entry for the system call. #include <dev/filemon/filemon.h> #include <fcntl.h> #include <err.h> +#include <errno.h> #include <unistd.h> static void open_filemon(void) { - pid_t child; + pid_t child, wait_rv; int fm_fd, fm_log; if ((fm_fd = open("/dev/filemon", O_RDWR | O_CLOEXEC)) == -1) @@ -215,8 +216,14 @@ open_filemon(void) if (ioctl(fm_fd, FILEMON_SET_PID, &child) == -1) err(1, "Cannot set filemon PID"); /* Do something here. */ - } else { - wait(&child); + } else if (child == -1) + err(1, "Cannot fork child"); + else { + while ((wait_rv = wait(&child)) == -1 && + errno == EINTR) + ; + if (wait_rv == -1) + err(1, "cannot wait for child"); close(fm_fd); } } diff --git a/share/man/man4/firewire.4 b/share/man/man4/firewire.4 index 147af36b145d..99aadb308fc3 100644 --- a/share/man/man4/firewire.4 +++ b/share/man/man4/firewire.4 @@ -10,7 +10,7 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software -.\" must display the acknowledgement as bellow: +.\" must display the acknowledgement as below: .\" .\" This product includes software developed by K. Kobayashi and H. Shimokawa .\" @@ -29,9 +29,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd June 6, 2022 +.Dd January 23, 2025 .Dt FIREWIRE 4 .Os .Sh NAME @@ -51,6 +49,11 @@ module at boot time, place the following line in .Bd -literal -offset indent firewire_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is slated to be removed prior to +.Fx 16.0 . .Sh DESCRIPTION .Fx provides machine-independent bus support and raw drivers for diff --git a/share/man/man4/rtw88fw.4 b/share/man/man4/ftgpio.4 index 1bf756d67e57..7a5562841732 100644 --- a/share/man/man4/rtw88fw.4 +++ b/share/man/man4/ftgpio.4 @@ -1,5 +1,5 @@ -.\"- -.\" Copyright (c) 2022 Bjoern A. Zeeb +.\" Copyright (c) 2022, Stormshield +.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -22,35 +22,33 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd March 31, 2022 -.Dt rtw88fw 4 +.Dd December 28, 2022 +.Dt FTGPIO 4 .Os .Sh NAME -.Nm rtw88fw -.Nd Firmware modules for Realtek rtw88 wireless network driver +.Nm ftgpio +.Nd GPIO Controller on Fintek Super I/O", .Sh SYNOPSIS -The -.Xr rtw88 4 -driver should auto-load any firmware needed. -It is discouraged to load the driver or firmware manually from -.Xr loader 8 . +.Cd "device ftgpio" +.Cd "device gpio" +.Cd "device gpioled" .Sh DESCRIPTION -Multiple modules provide access to firmware for the various chipset -models supported by the -.Xr rtw88 4 -driver. -.Sh FILES -A copy of the -.Xr rtw88 4 -firmware license is installed at -.Em /usr/share/doc/legal/realtek_rtw88_firmware.LICENCE . +The +.Nm +is a driver for the GPIO controller found on Fintek Super I/O chips. .Sh SEE ALSO -.Xr rtw88 4 , -.Xr firmware 9 +.Xr gpio 3 , +.Xr gpio 4 , +.Xr gpioled 4 , +.Xr superio 4 , +.Xr gpioctl 8 .Sh HISTORY The .Nm -firmware modules first appeared in +manual page first appeared in .Fx 14.0 . +.Sh AUTHORS +The +.Nm +driver was partially written by +.An Stéphane Rochoy Aq Mt stéphane.rochoy@stormshield.eu . diff --git a/share/man/man4/ftwd.4 b/share/man/man4/ftwd.4 index 6acef6698ac1..4d157b689e27 100644 --- a/share/man/man4/ftwd.4 +++ b/share/man/man4/ftwd.4 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2012 Bjoern A. Zeeb <bz@FreeBSD.org> .\" Copyright (c) 2019 Andriy Gapon <avg@FreeBSD.org> @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 26, 2020 .Dt FTWD 4 .Os diff --git a/share/man/man4/full.4 b/share/man/man4/full.4 index 6f1b3606258d..75b0da22ea8e 100644 --- a/share/man/man4/full.4 +++ b/share/man/man4/full.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 9, 2021 .Dt FULL 4 .Os diff --git a/share/man/man5/fusefs.5 b/share/man/man4/fusefs.4 index 24858b2ac4e7..33c31f355e09 100644 --- a/share/man/man5/fusefs.5 +++ b/share/man/man4/fusefs.4 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2019 The FreeBSD Foundation .\" @@ -26,10 +26,8 @@ .\" 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 July 31, 2019 -.Dt FUSEFS 5 +.Dt FUSEFS 4 .Os .Sh NAME .Nm fusefs diff --git a/share/man/man4/fwe.4 b/share/man/man4/fwe.4 index 76fc1ac4f667..68d92595f851 100644 --- a/share/man/man4/fwe.4 +++ b/share/man/man4/fwe.4 @@ -22,8 +22,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .\" .Dd July 16, 2005 .Dt FWE 4 diff --git a/share/man/man4/fwip.4 b/share/man/man4/fwip.4 index c2c9f05bb7eb..fdd01f1ba9d9 100644 --- a/share/man/man4/fwip.4 +++ b/share/man/man4/fwip.4 @@ -23,8 +23,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 16, 2005 .Dt FWIP 4 .Os diff --git a/share/man/man4/fwohci.4 b/share/man/man4/fwohci.4 index a4f7d42be5b2..ec14ddfdec85 100644 --- a/share/man/man4/fwohci.4 +++ b/share/man/man4/fwohci.4 @@ -10,7 +10,7 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software -.\" must display the acknowledgement as bellow: +.\" must display the acknowledgement as below: .\" .\" This product includes software developed by K. Kobayashi and H. Shimokawa .\" @@ -29,8 +29,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .\" .Dd December 24, 2020 .Dt FWOHCI 4 diff --git a/share/man/man4/fxp.4 b/share/man/man4/fxp.4 index 26367a51a984..6eae399684ad 100644 --- a/share/man/man4/fxp.4 +++ b/share/man/man4/fxp.4 @@ -23,8 +23,6 @@ .\" (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 November 26, 2010 .Dt FXP 4 .Os diff --git a/share/man/man4/gbde.4 b/share/man/man4/gbde.4 deleted file mode 100644 index ada799729ca7..000000000000 --- a/share/man/man4/gbde.4 +++ /dev/null @@ -1,304 +0,0 @@ -.\" -.\" Copyright (c) 2002 Poul-Henning Kamp -.\" Copyright (c) 2002 Networks Associates Technology, Inc. -.\" All rights reserved. -.\" -.\" This software was developed for the FreeBSD Project by Poul-Henning Kamp -.\" and NAI Labs, the Security Research Division of Network Associates, Inc. -.\" under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the -.\" DARPA CHATS research program. -.\" -.\" 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 October 19, 2002 -.Dt GBDE 4 -.Os -.Sh NAME -.Nm gbde -.Nd Geom Based Disk Encryption -.Sh SYNOPSIS -.Cd "options GEOM_BDE" -.Sh DESCRIPTION -.Bf -symbolic -NOTICE: -Please be aware that this code has not yet received much review -and analysis by qualified cryptographers and therefore should be considered -a slightly suspect experimental facility. -.Pp -We cannot at this point guarantee that the on-disk format will not change -in response to reviews or bug-fixes, so potential users are advised to -be prepared that -.Xr dump 8 Ns / Ns Xr restore 8 -based migrations may be called for in the future. -.Ef -.Pp -The objective of this facility is to provide a high degree of -denial of access to the contents of a -.Dq cold -storage device. -.Pp -Be aware that if the computer is compromised while up and running -.Em and -the storage device is actively attached and opened with a valid -pass-phrase, this facility offers no protection or denial of access -to the contents of the storage device. -.Pp -If, on the other hand, the device is -.Dq cold , -it should present a formidable -challenge for an attacker to gain access to the contents in the absence of -a valid pass-phrase. -.Pp -Four cryptographic barriers must be passed to gain access to the data, -and only a valid pass-phrase will yield this access. -.Pp -When the pass-phrase is entered, it is hashed with SHA2 into a 512 bit -.Dq key-material . -This is a way of producing cryptographic usable keys from a typically -.No all- Ns Tn ASCII -pass-phrase of an unpredictable user-selected length. -.Ss First barrier: the location of the \&"lock-sector". -During initialization, up to four independent but mutually aware -.Dq lock -sectors are written to the device in randomly chosen -locations. -These lock-sectors contain the 2048 random bit master-key and a number -of parameters of the layout geometry (more on this later). -Since the entire device will contain isotropic data, there is no -short-cut to rapidly determine which sequence of bytes contain a lock-sector. -.Pp -To locate a lock-sector, a small piece of data called the -.Dq metadata -and the key-material must be available. -The key-material decrypts the -metadata, which contains the byte offset on the device where the -corresponding lock-sector is located. -If the metadata is lost or unavailable but the key-material is at -hand, it would be feasible to do a brute force scan where each byte offset -of the device is checked to see if it contains the lock-sector data. -.Ss Second barrier: decryption of the master-key using key-material. -The lock-sector contains an encrypted copy of an architecture neutral -byte-sequence which encodes the fields of the lock-structure. -The order in which these fields are encoded is determined from the key-material. -The encoded byte stream is encrypted with 256bit AES in CBC mode. -.Ss Third barrier: decryption of the sector key. -For each sector, an MD5 hash over a -.Dq salt -from the lock-sector and the sector number is used to -.Dq cherry-pick -a subset of the master key, -which hashed together with the sector offset through MD5 produces the -.Dq kkey , -the key which encrypts the sector key. -.Ss Fourth barrier: decryption of the sector data. -The actual payload of the sector is encrypted with 128 bit AES in CBC mode -using a single-use random bits key. -.Ss Examining the reverse path -Assuming an attacker knows an amount of plaintext and has managed to -locate the corresponding encrypted sectors on the device, gaining access -to the plaintext context of other sectors is a daunting task: -.Pp -First he will have to derive from the encrypted sector and the known plain -text the sector key(s) used. -At the time of writing, it has been speculated that it could maybe be -possible to break open AES in only 2^80 operations; even so, that is still -a very impossible task. -.Pp -Armed with one or more sector keys, our patient attacker will then go -through essentially the same exercise, using the sector key and the -encrypted sector key to find the key used to encrypt the sector key. -.Pp -Armed with one or more of these -.Dq kkeys , -our attacker has to -run them backwards through MD5. -Even though he knows that the input to MD5 was 24 bytes and has the value -of 8 of these bytes from the sector number, he is still faced with 2^128 -equally likely possibilities. -.Pp -Having successfully done that, our attacker has successfully discovered -up to 16 bytes of the master-key, but is still unaware which 16 bytes, -and in which other sectors any of these known bytes contribute to the kkey. -.Pp -To unravel the last bit, the attacker has to guess the 16 byte random-bits -salt stored in the lock-sector to recover the indexes into the masterkey. -.Pp -Any attacker with access to the necessary machine power to even attempt -this attack will be better off attempting to brute-force the pass-phrase. -.Ss Positive denial facilities -Considering the infeasibility of the above attack, -gaining access to the pass-phrase will be of paramount importance for an -attacker, -and a number of scenarios can be imagined where undue pressure will be -applied to an individual to divulge the pass-phrase. -.Pp -A -.Dq Blackening -feature provides a way for the user, given a moment of -opportunity, to destroy the master-key in such a way that the pass-phrase -will be acknowledged as good but access to the data will still be -denied. -.Ss A practical analogy -For persons who think cryptography is only slightly more interesting than -watching silicon sublimate the author humbly offers this analogy to the -keying scheme for a protected device: -.Pp -Imagine an installation with a vault with walls of several hundred meters -thick solid steel. -This vault can only be feasibly accessed using the -single key, which has a complexity comparable to a number with 600 digits. -.Pp -This key exists in four copies, each of which is stored in one of -four small safes, each of which can be opened -with unique key which has a complexity comparable to an 80 digit -number. -.Pp -In addition to the masterkey, each of the four safes also contains -the exact locations of all four key-safes which are located in -randomly chosen places on the outside surface of the vault where they -are practically impossible to detect when they are closed. -.Pp -Finally, each safe contains four switches which are wired to a bar -of dynamite inside each of the four safes. -.Pp -In addition to this, a keyholder after opening his key-safe is -also able to install a copy of the master-key and re-key any of -key-safes (including his own). -.Pp -In normal use, the user will open the safe for which he has the key, -take out the master-key and access the vault. -When done, he will lock up the master-key in the safe again. -.Pp -If a keyholder-X for some reason distrusts keyholder-Y, she -has the option of opening her own safe, flipping one of the switches -and detonating the bar of dynamite in safe-Y. -This will obliterate the master-key in that safe and thereby deny -keyholder-Y access to the vault. -.Pp -Should the facility come under attack, any of the keyholders can detonate -all four bars of dynamite and thereby make sure that access to the -vault is denied to everybody, keyholders and attackers alike. -Should the facility fall to the enemy, and a keyholder be forced to apply -his personal key, he can do so in confidence that the contents of his safe -will not yield access to the vault, and the enemy will hopefully realize -that applying further pressure on the personnel will not give access to -the vault. -.Pp -The final point to make here is that it is perfectly possible to -make a detached copy of any one of these keys, including the master -key, and deposit or hide it as one sees fit. -.Ss Steganography support -When the device is initialized, it is possible to restrict the encrypted -data to a single contiguous area of the device. -If configured with care, this area could masquerade as some sort of -valid data or as random trash left behind by the systems operation. -.Pp -This can be used to offer a plausible deniability of existence, where -it will be impossible to prove that this specific area of the device -is in fact used to store encrypted data and not just random junk. -.Pp -The main obstacle in this is that the output from any encryption algorithm -worth its salt is so totally random looking that it stands out like a sore -thumb amongst practically any other sort of data which contains at least -some kind of structure or identifying byte sequences. -.Pp -Certain file formats like ELF contain multiple distinct sections, and it -would be possible to locate things just right in such a way that a device -contains a partition with a file system with a large executable, -.Pq Dq "a backup copy of my kernel" -where a non-loaded ELF section is laid out -consecutively on the device and thereby could be used to contain a -.Nm -encrypted device. -.Pp -Apart from the ability to instruct -.Nm -which those sectors are, no support is provided for creating such a setup. -.Ss Deployment suggestions -For personal use, it may be wise to make a backup copy of the masterkey -or use one of the four keys as a backup. -Fitting protection of this key is up to yourself, your local circumstances and -your imagination. -.Pp -For company or institutional use, it is strongly advised to make a copy -of the master-key and put it under whatever protection you have at your -means. -If you fail to do this, a disgruntled employee can deny you access to -the data -.Dq "by accident" . -(The employee can still intentionally deny access by applying another -encryption scheme to the data, but that problem has no technical solution.) -.Ss Cryptographic strength -This section lists the specific components which contribute to the cryptographic -strength of -.Nm . -.Pp -The payload is encrypted with AES in CBC mode using a 128 bit random -single-use key -.Pq Dq "the skey" . -AES is well documented. -.Pp -No IV is used in the encryption of the sectors, the assumption being -that since the key is random bits and single-use, an IV adds nothing to the -security of AES. -.Pp -The random key is produced with -.Xr arc4rand 9 -which is believed to do a respectable job at producing unpredictable bytes. -.Pp -The skey is stored on the device in a location which can be derived from -the location of the encrypted payload data. -The stored copy is encrypted with AES in CBC mode using a 128 bit key -.Pq Dq "the kkey" -derived -from a subset of the master key chosen by the output of an MD5 hash -over a 16 byte random bit static salt and the sector offset. -Up to 6.25% of the masterkey (16 bytes out of 2048 bits) will be selected -and hashed through MD5 with the sector offset to generate the kkey. -.Pp -Up to four copies of the master-key and associated geometry information -is stored on the device in static randomly chosen sectors. -The exact location inside the sector is randomly chosen. -The order in which the fields are encoded depends on the key-material. -The encoded byte-stream is encrypted with AES in CBC mode using 256 bit -key-material. -.Pp -The key-material is derived from the user-entered pass-phrase using -512 bit SHA2. -.Pp -No chain is stronger than its weakest link, which usually is poor pass-phrases. -.Sh SEE ALSO -.Xr gbde 8 -.Sh HISTORY -This software was developed for the -.Fx -Project by -.An Poul-Henning Kamp -and NAI Labs, the Security Research Division of Network Associates, Inc.\& -under DARPA/SPAWAR contract N66001-01-C-8035 -.Pq Dq CBOSS , -as part of the -DARPA CHATS research program. -.Sh AUTHORS -.An Poul-Henning Kamp Aq Mt phk@FreeBSD.org diff --git a/share/man/man4/gdb.4 b/share/man/man4/gdb.4 index de2f4d108048..2b18be2d14c4 100644 --- a/share/man/man4/gdb.4 +++ b/share/man/man4/gdb.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 17, 2016 .Dt GDB 4 .Os @@ -37,7 +35,7 @@ The .Nm kernel debugger is a variation of -.Xr gdb 1 +.Xr gdb 1 Pq Pa ports/devel/gdb which understands some aspects of the .Fx kernel environment. @@ -90,7 +88,7 @@ on, In this mode, you need the .Fl k flag to indicate to -.Xr gdb 1 +.Xr gdb 1 Pq Pa ports/devel/gdb that the .Dq "dump file" .Pa /dev/mem @@ -336,9 +334,9 @@ The remote system continues to run. The user interface to .Nm is via -.Xr gdb 1 , +.Xr gdb 1 Pq Pa ports/devel/gdb , so -.Xr gdb 1 +.Xr gdb 1 Pq Pa ports/devel/gdb commands also work. This section discusses only the extensions for kernel debugging that get installed in the kernel build directory. @@ -387,7 +385,7 @@ are convenience commands which invoke .Ss "The current process environment" The following macros are convenience functions intended to make things easier than the standard -.Xr gdb 1 +.Xr gdb 1 Pq Pa ports/devel/gdb commands. .Bl -tag -width indent .It Ic f0 @@ -467,7 +465,7 @@ Show some PCB contents of the process .El .Ss "Examining data structures" You can use standard -.Xr gdb 1 +.Xr gdb 1 Pq Pa ports/devel/gdb commands to look at most data structures. The macros in this section are convenience functions which typically display the data in a more readable @@ -568,7 +566,7 @@ It does nothing else except to print a warning message to remind you to remove it again. .El .Sh SEE ALSO -.Xr gdb 1 , +.Xr gdb 1 Pq Pa ports/devel/gdb , .Xr ps 1 , .Xr ddb 4 , .Xr firewire 4 , @@ -581,7 +579,7 @@ This man page was written by .An Greg Lehey Aq Mt grog@FreeBSD.org . .Sh BUGS The -.Xr gdb 1 +.Xr gdb 1 Pq Pa ports/devel/gdb debugger was never designed to debug kernels, and it is not a very good match. Many problems exist. diff --git a/share/man/man4/gem.4 b/share/man/man4/gem.4 index 9224920c07dc..62a8c7b18bf9 100644 --- a/share/man/man4/gem.4 +++ b/share/man/man4/gem.4 @@ -24,14 +24,12 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd December 26, 2020 +.Dd April 18, 2023 .Dt GEM 4 .Os .Sh NAME .Nm gem -.Nd ERI/GEM/GMAC Ethernet device driver +.Nd GEM/GMAC Ethernet device driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -51,8 +49,7 @@ if_gem_load="YES" The .Nm driver provides support for the GMAC Ethernet hardware found mostly in -the last Apple PowerBooks G3s and most G4-based Apple hardware, as -well as Sun UltraSPARC machines. +the last Apple PowerBooks G3s and most G4-based Apple hardware. .Pp All controllers supported by the .Nm @@ -69,8 +66,6 @@ driver include: .It Apple GMAC .It -Sun ERI 10/100 Mbps Ethernet -.It Sun GEM Gigabit Ethernet .El .Pp diff --git a/share/man/man4/genet.4 b/share/man/man4/genet.4 index bd6e2589d3f5..665aaff49507 100644 --- a/share/man/man4/genet.4 +++ b/share/man/man4/genet.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 8, 2021 .Dt GENET 4 .Os diff --git a/share/man/man4/genetlink.4 b/share/man/man4/genetlink.4 new file mode 100644 index 000000000000..9cc5f3b9cbc1 --- /dev/null +++ b/share/man/man4/genetlink.4 @@ -0,0 +1,145 @@ +.\" +.\" Copyright (C) 2022 Alexander Chernikov <melifaro@FreeBSD.org>. +.\" +.\" 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. +.\" +.Dd November 1, 2022 +.Dt GENETLINK 4 +.Os +.Sh NAME +.Nm genetlink +.Nd Generic Netlink +.Sh SYNOPSIS +.In netlink/netlink.h +.In netlink/netlink_generic.h +.Ft int +.Fn socket AF_NETLINK SOCK_DGRAM NETLINK_GENERIC +.Sh DESCRIPTION +The +.Dv NETLINK_GENERIC +is a "container" family, used for dynamic registration of other families +belonging to the various subsystems. +These subsystems provide a string family name during registration and +receive a dynamically-allocated family id. +Allocated family identifiers are then used by applications to get access to +functions provided by that subsystem via netlink. +There are standard methods for resolving string family names to family +identifiers. +A similar mechanism works for the notification groups provided by those +families. +.Pp +All generic netlink families share a common header: +.Bd -literal +struct genlmsghdr { + uint8_t cmd; /* command within the family */ + uint8_t version; /* ABI version for the cmd */ + uint16_t reserved; /* reserved: set to 0 */ +}; +.Ed +The family id is encoded in the +.Dv nlmsg_type +of the base netlink header. +The +.Va cmd +field is the command identifier within the family. +The +.Va version +field is the command version. +.Sh METHODS +The generic Netlink framework provides the base family, +.Dv GENL_ID_CTRL +("nlctrl") with a fixed family id. +This family is used to list the details of all registered families. +.Pp +The following messages are supported by the framework: +.Ss CTRL_CMD_GETFAMILY +Fetches a single family or all registered families, depending on the +.Dv NLM_F_DUMP +flag. +Each family is reported as +.Dv CTRL_CMD_NEWFAMILY +message. +The following filters are recognised by the kernel: +.Pp +.Bd -literal -offset indent -compact +CTRL_ATTR_FAMILY_ID (uint16_t) current family id assigned by kernel +CTRL_ATTR_FAMILY_NAME (string) family name +.Ed +.Ss TLVs +.Bl -tag -width indent +.It Dv CTRL_ATTR_FAMILY_ID +(uint16_t) Dynamically-assigned family identifier. +.It Dv CTRL_ATTR_FAMILY_NAME +(string) Family name. +.It Dv CTRL_ATTR_HDRSIZE +(uint32_t) Family mandatory header size (typically 0). +.It Dv CTRL_ATTR_MAXATTR +(uint32_t) Maximum attribute number valid for the family. +.It Dv CTRL_ATTR_OPS +(nested) List of the operations supported by the family. +The attribute consists of a list of nested TLVs, with attribute values +monotonically incremented, starting from 0. +The following attributes are present in each TLV: +.Bl -tag -width indent +.It Dv CTRL_ATTR_OP_ID +Operation (message) number. +.It Dv CTRL_ATTR_OP_FLAGS +Operation flags. +The following flags are supported: +.Bd -literal -offset indent -compact +GENL_ADMIN_PERM requires elevated permissions +GENL_CMD_CAP_DO operation is a modification request +GENL_CMD_CAP_DUMP operation is a get/dump request +.Ed +.El +.It Dv CTRL_ATTR_MCAST_GROUPS +(nested) List of the notification groups supported by the family. +The attribute consists of a list of nested TLVs, with attribute values +monotonically incremented, starting from 0. +The following attributes are present in each TLV: +.Bl -tag -width indent +.It Dv CTRL_ATTR_MCAST_GRP_ID +Group id that can be used in +.Dv NETLINK_ADD_MEMBERSHIP +.Xr setsockopt 2 . +.It Dv CTRL_ATTR_MCAST_GRP_NAME +(string) Human-readable name of the group. +.El +.El +.Ss Groups +The following groups are defined: +.Bd -literal -offset indent -compact +"notify" Notifies on family registrations/removal. +.Ed +.Sh SEE ALSO +.Xr netlink 4 +.Sh HISTORY +The +.Dv NETLINK_GENERIC +protocol family appeared in +.Fx 13.2 . +.Sh AUTHORS +The netlink was implemented by +.An -nosplit +.An Alexander Chernikov Aq Mt melifaro@FreeBSD.org . +It was derived from the Google Summer of Code 2021 project by +.An Ng Peng Nam Sean . diff --git a/share/man/man4/geom.4 b/share/man/man4/geom.4 index f6988c663f54..18ecf7e5f852 100644 --- a/share/man/man4/geom.4 +++ b/share/man/man4/geom.4 @@ -32,16 +32,13 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd August 13, 2019 +.Dd July 8, 2024 .Dt GEOM 4 .Os .Sh NAME .Nm GEOM .Nd "modular disk I/O request transformation framework" .Sh SYNOPSIS -.Cd options GEOM_BDE .Cd options GEOM_CACHE .Cd options GEOM_CONCAT .Cd options GEOM_ELI @@ -62,7 +59,6 @@ .Cd options GEOM_PART_GPT .Cd options GEOM_PART_LDM .Cd options GEOM_PART_MBR -.Cd options GEOM_PART_VTOC8 .Cd options GEOM_RAID .Cd options GEOM_RAID3 .Cd options GEOM_SHSEC @@ -229,6 +225,12 @@ Examine the rank number of the provider's geom. .It Examine the method name of the provider's geom. .El +.Pp +Tasting is controlled by the +.Va kern.geom.notaste +sysctl. +To disable tasting, set the sysctl to 1, to +re-enable tasting, set the sysctl to 0. .It Em ORPHANIZATION is the process by which a provider is removed while it potentially is still being used. @@ -445,6 +447,7 @@ Dump contents of gctl requests. .El .Sh SEE ALSO .Xr libgeom 3 , +.Xr geom 8 , .Xr DECLARE_GEOM_CLASS 9 , .Xr disk 9 , .Xr g_access 9 , @@ -493,8 +496,6 @@ Use .Cd GEOM_MULTIPATH , .It .Cd GEOM_PART_MBR , -.It -.Cd GEOM_PART_VTOC8 , and .It .Cd GEOM_LABEL diff --git a/share/man/man4/geom_linux_lvm.4 b/share/man/man4/geom_linux_lvm.4 index 2e1c8aa07ad1..0066a199ac1e 100644 --- a/share/man/man4/geom_linux_lvm.4 +++ b/share/man/man4/geom_linux_lvm.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 1, 2013 .Dt GEOM_LINUX_LVM 4 .Os diff --git a/share/man/man4/geom_map.4 b/share/man/man4/geom_map.4 deleted file mode 100644 index b84f90a71722..000000000000 --- a/share/man/man4/geom_map.4 +++ /dev/null @@ -1,211 +0,0 @@ -.\" -.\" Copyright (c) 2011 Aleksandr Rybalko -.\" 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 June 8, 2015 -.Dt GEOM_MAP 4 -.Os -.Sh NAME -.Nm geom_map -.Nd "GEOM module that maps defined items as separate partitions" -.Sh SYNOPSIS -To compile this driver into the kernel, -place the following line in your -kernel configuration file: -.Bd -ragged -offset indent -.Cd "options geom_map" -.Ed -.Sh DESCRIPTION -The -.Nm -framework provides support for mapping defined parts of the media. -Basically it is helpful for embedded devices where in the one continuous -flash are loader, kernel and rootfs parts. -.Nm -allows making them available as separate parts and protects the loader from -being overwritten. -.Pp -At boot time -.Nm -partitions are listed (only with bootverbose) as: -.Bd -literal -offset indent -MAP: 0x30000, data=0x30000 "/dev/map/bootloader" -MAP: 30000x10000, data=0x10000 "/dev/map/factory" -MAP: 40000x7a0000, data=0x7a0000 "/dev/map/upgrade" -MAP: search key ".!/bin/sh" from 0x100000, step 0x10000 -MAP: 40000x110000, data=0x110000 "/dev/map/kernel" -MAP: search key ".!/bin/sh" from 0x100000, step 0x10000 -MAP: 150000x690000, data=0x690000 "/dev/map/rootfs" -MAP: 7e0000x20000, data=0x20000 "/dev/map/config" -.Ed -.Pp -The current -.Nm -configuration can be accessed with the following -.Xr sysctl 8 -nodes: -.Va kern.geom.conftxt , kern.geom.confxml , -and -.Va kern.geom.confdot -or by using -.Dq Li "geom map list" . -.Bd -literal -offset indent -# sysctl -n kern.geom.conftxt -0 MD md0 10485760 512 u 0 s 512 f 0 fs 0 l 10485760 t malloc -0 DISK cfid0 8388608 4 hd 0 sc 0 -1 MAP map/config 131072 4 i 5 o 8257536 entry 0 dsize 131072 -1 MAP map/rootfs 6881280 4 i 4 o 1376256 entry 0 dsize 6881280 -2 UZIP map/rootfs.uzip 18677760 512 -1 MAP map/kernel 1114112 4 i 3 o 262144 entry 0 dsize 1114112 -1 MAP map/upgrade 7995392 4 i 2 o 262144 entry 0 dsize 7995392 -1 MAP map/factory 65536 4 i 1 o 196608 entry 0 dsize 65536 -1 MAP map/bootloader 196608 4 i 0 o 0 entry 0 dsize 196608 -.Ed -.Pp -Driver configuration can be done in -.Xr device.hints 5 . -List of used parameters: -.Bl -tag -width indent -.It Va at -select media to attach -.It Va name -name of partition (will create device -.Pa /dev/map/ Ns Ar that_name ) -.It Va start -offset from the beginning of the parent media to start of the mapped partition. -This field can also have a special value -.Qq Li search: Ns Ar searchstart Ns Li : Ns Ar searchstep Ns Li : Ns Ar searchkey , -where: -.Bl -tag -width indent -.It Ar searchstart -offset from the beginning of the parent media where search will be started -.It Ar searchstep -value of the increment used while searching for the partition boundary markers -.It Ar searchkey -key which will be used to find partition boundary markers. -The wildcard -.Ql .\& -can be used to match any character on that position -.El -.It Va end -offset from the beginning of the parent media to the end of the mapped partition. -This field can also have the special value -.Qq Li search: Ns Ar searchstart Ns Li : Ns Ar searchstep Ns Li : Ns Ar searchkey , -as described above. -.It Va offset -offset where the data of the mapped partition begins -.El -.Pp -Each record contains the start address (in bytes) from the media begin, size -(in bytes), offset where the data of mapped partition begins, and the name of -new device. -.Bd -literal -offset indent -MAP: 150000x690000, data=0x690000 "/dev/map/rootfs" -.Ed -.Bd -literal -00150000 - start address -00690000 - size -00000000 - data begin from zero offset -00690000 - data size -"map/rootfs" - new media will be accessible via /dev/map/rootfs dev. -.Ed -.Sh EXAMPLES -If we need to implement layout shown above, we need to define the following -hints: -.Bd -literal -offset indent -hint.map.0.at="cfid0" -hint.map.0.start=0x00000000 -hint.map.0.end=0x00030000 -hint.map.0.name="bootloader" -hint.map.0.readonly=1 -.Ed -.Pp -This defines -.Pa /dev/map/bootloader -at disk -.Pa cfid0 -starting at -.Li 0x00000000 -and ending at -.Li 0x00030000 , -it is also marked as readonly. -.Bd -literal -offset indent -hint.map.1.at="cfid0" -hint.map.1.start=0x00030000 -hint.map.1.end=0x00040000 -hint.map.1.name="factory" - -hint.map.2.at="cfid0" -hint.map.2.start=0x00040000 -hint.map.2.end=0x007e0000 -hint.map.2.name="upgrade" - -hint.map.3.at="cfid0" -hint.map.3.name="kernel" -hint.map.3.start=0x00040000 -hint.map.3.end="search:0x00100000:0x10000:.!/bin/sh" -.Ed -.Pp -This defines -.Pa /dev/map/kernel -at disk -.Pa cfid0 -starting at -.Li 0x00040000 , -but the end position must be searched by finding the key -.Dq Li ".!/bin/sh" , -from offset -.Li 0x00100000 -to the end of media with step -.Li 0x10000 . -The real marker in this case is -.Dq Li "#!/bin/sh" , -but -.Ql # -terminates the line when the hints file is parsed, so we need to use wildcard -.Ql .\& -instead of -.Ql # . -.Bd -literal -offset indent -hint.map.4.at="cfid0" -hint.map.4.name="rootfs" -hint.map.4.start="search:0x00100000:0x10000:.!/bin/sh" -hint.map.4.end=0x007e0000 - -hint.map.5.at="cfid0" -hint.map.5.start=0x007e0000 -hint.map.5.end=0x00800000 -hint.map.5.name="config" -.Ed -.Sh SEE ALSO -.Xr geom 4 , -.Xr geom 8 , -.Xr sysctl 8 -.Sh AUTHORS -The -.Nm -driver was written by -.An Aleksandr Rybalko Aq Mt ray@ddteam.net . diff --git a/share/man/man4/geom_uzip.4 b/share/man/man4/geom_uzip.4 index 4b8e8d355c81..bb6f20000344 100644 --- a/share/man/man4/geom_uzip.4 +++ b/share/man/man4/geom_uzip.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 28, 2021 .Dt GEOM_UZIP 4 .Os diff --git a/share/man/man4/gif.4 b/share/man/man4/gif.4 index 436e6f121e5a..959510451011 100644 --- a/share/man/man4/gif.4 +++ b/share/man/man4/gif.4 @@ -27,8 +27,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 21, 2018 .Dt GIF 4 .Os diff --git a/share/man/man4/gpio.4 b/share/man/man4/gpio.4 index 276d6855b49b..9a629ff402fd 100644 --- a/share/man/man4/gpio.4 +++ b/share/man/man4/gpio.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 27, 2019 .Dt GPIO 4 .Os diff --git a/share/man/man4/gpioiic.4 b/share/man/man4/gpioiic.4 index f5cea830ead0..f5a8fba937e0 100644 --- a/share/man/man4/gpioiic.4 +++ b/share/man/man4/gpioiic.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 1, 2019 .Dt GPIOIIC 4 .Os diff --git a/share/man/man4/gpiokeys.4 b/share/man/man4/gpiokeys.4 index 5af11cedb7e0..6d35c571697b 100644 --- a/share/man/man4/gpiokeys.4 +++ b/share/man/man4/gpiokeys.4 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2020 Andriy Gapon <avg@FreeBSD.org> .\" @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 5, 2020 .Dt GPIOKEYS 4 .Os diff --git a/share/man/man4/gpioled.4 b/share/man/man4/gpioled.4 index ca4bb591d0b2..646e2ff2a8f0 100644 --- a/share/man/man4/gpioled.4 +++ b/share/man/man4/gpioled.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 23, 2019 .Dt GPIOLED 4 .Os diff --git a/share/man/man4/gpioths.4 b/share/man/man4/gpioths.4 index 2712d6c570e2..8b9c799238fc 100644 --- a/share/man/man4/gpioths.4 +++ b/share/man/man4/gpioths.4 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 8, 2019 .Dt GPIOTHS 4 .Os diff --git a/share/man/man4/gre.4 b/share/man/man4/gre.4 index c44588cb9736..7f46e54e1207 100644 --- a/share/man/man4/gre.4 +++ b/share/man/man4/gre.4 @@ -27,8 +27,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 21, 2020 .Dt GRE 4 .Os diff --git a/share/man/man4/gve.4 b/share/man/man4/gve.4 new file mode 100644 index 000000000000..c5627e929044 --- /dev/null +++ b/share/man/man4/gve.4 @@ -0,0 +1,310 @@ +.\" SPDX-License-Identifier: BSD-3-Clause +.\" +.\" Copyright (c) 2023-2024 Google LLC +.\" +.\" 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. +.\" +.\" 3. Neither the name of the copyright holder nor the names of its contributors +.\" may be used to endorse or promote products derived from this software without +.\" specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. +.Dd May 20, 2025 +.Dt GVE 4 +.Os +.Sh NAME +.Nm gve +.Nd "Ethernet driver for Google Virtual NIC (gVNIC)" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device gve" +.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 +if_gve_load="YES" +.Ed +.Sh DESCRIPTION +gVNIC is a virtual network interface designed specifically for Google Compute Engine (GCE). +It is required to support per-VM Tier-1 networking performance, and for using certain VM shapes on GCE. +.Pp +.Nm +is the driver for gVNIC. +It supports the following features: +.Pp +.Bl -bullet -compact +.It +RX checksum offload +.It +TX chesksum offload +.It +TCP Segmentation Offload (TSO) +.It +Large Receive Offload (LRO) in software +.It +Jumbo frames +.It +Receive Side Scaling (RSS) +.El +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +.Nm +binds to a single PCI device ID presented by gVNIC: +.Pp +.Bl -bullet -compact +.It +0x1AE0:0x0042 +.El +.Sh EXAMPLES +.Pp +Change the TX queue count to 4 for the gve0 interface: +.D1 sysctl dev.gve.0.num_tx_queues=4 +.Pp +Change the RX queue count to 4 for the gve0 interface: +.D1 sysctl dev.gve.0.num_rx_queues=4 +.Pp +Change the TX ring size to 512 for the gve0 interface: +.D1 sysctl dev.gve.0.tx_ring_size=512 +.Pp +Change the RX ring size to 512 for the gve0 interface: +.D1 sysctl dev.gve.0.rx_ring_size=512 +.Sh DIAGNOSTICS +The following messages are recorded during driver initialization: +.Bl -diag +.It "Enabled MSIX with %d vectors" +.It "Configured device resources" +.It "Successfully attached %s" +.It "Deconfigured device resources" +.El +.Pp +These messages are seen if driver initialization fails. +Global (across-queues) allocation failures: +.Bl -diag +.It "Failed to configure device resources: err=%d" +.It "No compatible queue formats" +.It "Failed to allocate ifnet struct" +.It "Failed to allocate admin queue mem" +.It "Failed to alloc DMA mem for DescribeDevice" +.It "Failed to allocate QPL page" +.El +.Pp +irq and BAR allocation failures: +.Bl -diag +.It "Failed to acquire any msix vectors" +.It "Tried to acquire %d msix vectors, got only %d" +.It "Failed to setup irq %d for Tx queue %d " +.It "Failed to setup irq %d for Rx queue %d " +.It "Failed to allocate irq %d for mgmnt queue" +.It "Failed to setup irq %d for mgmnt queue, err: %d" +.It "Failed to allocate BAR0" +.It "Failed to allocate BAR2" +.It "Failed to allocate msix table" +.El +.Pp +Rx queue-specific allocation failures: +.Bl -diag +.It "No QPL left for rx ring %d" +.It "Failed to alloc queue resources for rx ring %d" +.It "Failed to alloc desc ring for rx ring %d" +.It "Failed to alloc data ring for rx ring %d" +.El +.Pp +Tx queue-specific allocation failures: +.Bl -diag +.It "No QPL left for tx ring %d" +.It "Failed to alloc queue resources for tx ring %d" +.It "Failed to alloc desc ring for tx ring %d" +.It "Failed to vmap fifo, qpl_id = %d" +.El +.Pp +The following messages are recorded when the interface detach fails: +.Bl -diag +.It "Failed to deconfigure device resources: err=%d" +.El +.Pp +If bootverbose is on, the following messages are recorded when the interface is being brought up: +.Bl -diag +.It "Created %d rx queues" +.It "Created %d tx queues" +.It "MTU set to %d" +.El +.Pp +The following messages are recorded when the interface is being brought down: +.Bl -diag +.It "Destroyed %d rx queues" +.It "Destroyed %d tx queues" +.El +.Pp +These messages are seen if errors are encountered when bringing the interface up or down: +.Bl -diag +.It "Failed to destroy rxq %d, err: %d" +.It "Failed to destroy txq %d, err: %d" +.It "Failed to create rxq %d, err: %d" +.It "Failed to create txq %d, err: %d" +.It "Failed to set MTU to %d" +.It "Invalid new MTU setting. new mtu: %d max mtu: %d min mtu: %d" +.It "Cannot bring the iface up when detached" +.It "Reached max number of registered pages %lu > %lu" +.It "Failed to init lro for rx ring %d" +.El +.Pp +These messages are seen if any admin queue command fails: +.Bl -diag +.It "AQ command(%u): failed with status %d" +.It "AQ command(%u): unknown status code %d" +.It "AQ commands timed out, need to reset AQ" +.It "Unknown AQ command opcode %d" +.El +.Pp +These messages appear if a TX timeout is detected: +.Bl -diag +.It "Found %d timed out packet(s) on txq%d, kicking it for completions" +.It "Found %d timed out packet(s) on txq%d with its last kick %ld sec ago which is less than the cooldown period %d. Resetting device" +.El +.Pp +These messages are recorded when the device is being reset due to an error: +.Bl -diag +.It "Scheduling reset task!" +.It "Waiting until admin queue is released." +.It "Admin queue released" +.El +.Pp +If it was the NIC that requested the reset, this message is recorded: +.Bl -diag +.It "Device requested reset" +.El +.Pp +If the reset fails during the reinitialization phase, this message is recorded: +.Bl -diag +.It "Restore failed!" +.El +.Pp +These two messages correspond to the NIC alerting the driver to link state changes: +.Bl -diag +.It "Device link is up." +.It "Device link is down." +.El +.Pp +Apart from these messages, the driver exposes per-queue packet and error counters as sysctl nodes. +Global (across queues) counters can be read using +.Xr netstat 1 . +.Sh SYSCTL VARIABLES +.Nm +exposes the following +.Xr sysctl 8 +variables: +.Bl -tag -width indent +.It Va hw.gve.driver_version +The driver version. +This is read-only. +.It Va hw.gve.queue_format +The queue format in use. +This is read-only. +.It Va hw.gve.disable_hw_lro +Setting this boot-time tunable to 1 disables Large Receive Offload (LRO) in the NIC. +The default value is 0, which means hardware LRO is enabled by default. +The software LRO stack in the kernel is always used. +This sysctl variable needs to be set before loading the driver, using +.Xr loader.conf 5 . +.It Va hw.gve.allow_4k_rx_buffers +Setting this boot-time tunable to 1 enables support for 4K RX Buffers. +The default value is 0, which means 2K RX Buffers will be used. +4K RX Buffers are only supported on DQO_RDA and DQO_QPL queue formats. +When enabled, 4K RX Buffers will be used either when HW LRO is enabled +or mtu is greated than 2048. +This sysctl variable needs to be set before loading the driver, using +.Xr loader.conf 5 . +.It Va dev.gve.X.num_rx_queues and dev.gve.X.num_tx_queues +Run-time tunables that represent the number of currently used RX/TX queues. +The default value is the max number of RX/TX queues the device can support. +.Pp +This call turns down the interface while setting up the new queues, +which may potentially cause any new packets to be dropped. +This call can fail if the system is not able to provide the driver with enough resources. +In that situation, the driver will revert to the previous number of RX/TX queues. +If this also fails, a device reset will be triggered. +.Pp +Note: sysctl nodes for queue stats remain available even if a queue is removed. +.Pp +.It Va dev.gve.X.rx_ring_size and dev.gve.X.tx_ring_size +Run-time tunables that represent the current ring size for RX/TX queues. +The default value is set to device defaults for ring size. +.Pp +This call turns down the interface while setting up the queues with the new ring size, +which may potentially cause any new packets to be dropped. +This call can fail if the system is not able to provide the driver with enough resources. +In that situation, the driver will try to revert to the previous ring size for RX/TX queues. +If this also fails, the device will be in an unhealthy state and will need to be reloaded. +This value must be a power of 2 and within the defined range. +.Pp +.El +.Sh LIMITATIONS +.Nm +does not support the transmission of VLAN-tagged packets. +All VLAN-tagged traffic is dropped. +.Sh QUEUE FORMATS +.Nm +features different datapath modes called queue formats: +.Pp +.Bl -bullet -compact +.It +GQI_QPL: "QPL" stands for "Queue Page List" and refers to the fact that +hardware expects a fixed bounce buffer and cannot access arbitrary memory. +GQI is the older descriptor format. +The G in "GQI" refers to an older generation of hardware, and the "QI" +stands for "Queue In-order" referring to the fact that the NIC sends +Tx and Rx completions in the same order as the one in which the corresponding +descriptors were posted by the driver. +.It +DQO_RDA: DQO is the descriptor format required to take full advantage of +next generation VM shapes. +"RDA" stands for "Raw DMA Addressing" and refers to the fact that hardware +can work with DMA-ed packets and does not expect them to be copied into or +out of a fixed bounce buffer. +The D in "DQO" refers to a newer generation of hardware, and the "QO" +stands for "Queue Out-of-order" referring to the fact that the NIC might +send Tx and Rx completions in an order different from the one in which +the corresponding descriptors were posted by the driver. +.It +DQO_QPL: The next generation descriptor format in the "QPL" mode. +.El +.Sh SUPPORT +Please email gvnic-drivers@google.com with the specifics of the issue encountered. +.Sh SEE ALSO +.Xr netstat 1 , +.Xr loader.conf 5 , +.Xr ifconfig 8 , +.Xr sysctl 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 13.3 . +.Sh AUTHORS +The +.Nm +driver was written by Google. diff --git a/share/man/man4/h_ertt.4 b/share/man/man4/h_ertt.4 index d2673b4b8169..86ff2285c214 100644 --- a/share/man/man4/h_ertt.4 +++ b/share/man/man4/h_ertt.4 @@ -26,8 +26,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 18, 2012 .Dt H_ERTT 4 .Os diff --git a/share/man/man4/hconf.4 b/share/man/man4/hconf.4 index 944f3376b187..179d95a29832 100644 --- a/share/man/man4/hconf.4 +++ b/share/man/man4/hconf.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 18, 2021 .Dt HCONF 4 .Os @@ -79,7 +77,7 @@ Default is 0. The .Nm driver first appeared in -.Fx 13.0. +.Fx 13.0 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/hcons.4 b/share/man/man4/hcons.4 index 68a920fba9d8..6cdf0a7dc170 100644 --- a/share/man/man4/hcons.4 +++ b/share/man/man4/hcons.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 23, 2021 .Dt HCONS 4 .Os @@ -89,7 +87,7 @@ input event device node. The .Nm driver first appeared in -.Fx 13.0. +.Fx 13.0 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/hgame.4 b/share/man/man4/hgame.4 index addf14d9f5c5..3309833c1720 100644 --- a/share/man/man4/hgame.4 +++ b/share/man/man4/hgame.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 14, 2020 .Dt HGAME 4 .Os @@ -93,13 +91,13 @@ input event device node. The .Nm driver first appeared in -.Fx 13.0. +.Fx 13.0 . .Sh AUTHORS .An -nosplit The .Nm driver was written by -.An Greg V Aq Mt greg@unrelenting.technology . +.An Val Packett Aq Mt val@packett.cool . .Pp This manual page was written by .An Vladimir Kondratyev Aq Mt wulf@FreeBSD.org . diff --git a/share/man/man4/hidbus.4 b/share/man/man4/hidbus.4 index 1ce17d449002..f8ebaca8d659 100644 --- a/share/man/man4/hidbus.4 +++ b/share/man/man4/hidbus.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 14, 2020 .Dt HIDBUS 4 .Os @@ -93,7 +91,7 @@ Default is 0. The .Nm driver first appeared in -.Fx 13.0. +.Fx 13.0 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/hidquirk.4 b/share/man/man4/hidquirk.4 index aa78e189765c..6474f2a99661 100644 --- a/share/man/man4/hidquirk.4 +++ b/share/man/man4/hidquirk.4 @@ -14,8 +14,6 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" .Dd September 16, 2020 .Dt HIDQUIRK 4 .Os @@ -53,6 +51,8 @@ doesn't identify properly mouse sends an unknown leading byte .It HQ_MS_REVZ mouse has Z-axis reversed +.It HQ_MS_VENDOR_BTN +mouse has buttons in vendor usage page .It HQ_SPUR_BUT_UP spurious mouse button up events .It HQ_MT_TIMESTAMP diff --git a/share/man/man4/hidraw.4 b/share/man/man4/hidraw.4 index c01b961e738d..0353e49a7425 100644 --- a/share/man/man4/hidraw.4 +++ b/share/man/man4/hidraw.4 @@ -27,9 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 1, 2018 +.Dd April 27, 2025 .Dt HIDRAW 4 .Os .Sh NAME @@ -65,9 +63,9 @@ calls: .Xr uhid 4 \-compatible calls: .Bl -tag -width indent -.It Dv HID_GET_REPORT_ID Pq Vt int +.It Dv HIDRAW_GET_REPORT_ID Pq Vt int Get the report identifier used by this HID report. -.It Dv HID_GET_REPORT_DESC Pq Vt "struct hidraw_gen_descriptor" +.It Dv HIDRAW_GET_REPORT_DESC Pq Vt "struct hidraw_gen_descriptor" Get the HID report descriptor. Copies a maximum of .Va hgd_maxlen @@ -91,7 +89,7 @@ struct hidraw_gen_descriptor { ... }; .Ed -.It Dv HID_SET_IMMED Pq Vt int +.It Dv HIDRAW_SET_IMMED Pq Vt int Sets the device in a mode where each .Xr read 2 will return the current value of the input report. @@ -102,7 +100,7 @@ will only return the data that the device reports on its interrupt pipe. This call may fail if the device does not support this feature. -.It Dv HID_GET_REPORT Pq Vt "struct hidraw_gen_descriptor" +.It Dv HIDRAW_GET_REPORT Pq Vt "struct hidraw_gen_descriptor" Get a report from the device without waiting for data on the interrupt pipe. Copies a maximum of @@ -126,7 +124,7 @@ The report data begins from the second byte. For devices which do not use numbered reports, the report data begins at the first byte. This call may fail if the device does not support this feature. -.It Dv HID_SET_REPORT Pq Vt "struct hidraw_gen_descriptor" +.It Dv HIDRAW_SET_REPORT Pq Vt "struct hidraw_gen_descriptor" Set a report in the device. The .Va hgd_report_type @@ -147,6 +145,9 @@ The report data begins from the second byte. For devices which do not use numbered reports, the report data begins at the first byte. This call may fail if the device does not support this feature. +.It Dv HIDRAW_GET_DEVICEINFO Pq Vt "struct hidraw_device_info" +Returns information about the device, like vendor ID and product ID. +This call will not issue any hardware transfers. .El .Pp Linux @@ -197,7 +198,7 @@ specified by .Va buf . .It Dv HIDIOCGRAWPHYS(len) Pq Vt "char[] buf" Get the newbus path to the device. -.\For Bluetooth devices, it returns the hardware (MAC) address of the device. +.\"For Bluetooth devices, it returns the hardware (MAC) address of the device. Copies a maximum of .Va len bytes of the newbus device path @@ -205,10 +206,12 @@ into the memory specified by .Va buf . .It Dv HIDIOCGFEATURE(len) Pq Vt "void[] buf" -Get a feature report from the device. +.It Dv HIDIOCGINPUT(len) Pq Vt "void[] buf" +.It Dv HIDIOCGOUTPUT(len) Pq Vt "void[] buf" +Get respectively a feature, input or output report from the device. Copies a maximum of .Va len -bytes of the feature report data into the memory specified by +bytes of the report data into the memory specified by .Va buf . The first byte of the supplied buffer should be set to the report number of the requested report. @@ -217,7 +220,9 @@ The report will be returned starting at the first byte of the buffer (ie: the report number is not returned). This call may fail if the device does not support this feature. .It Dv HIDIOCSFEATURE(len) Pq Vt "void[] buf" -Set a feature Report in the device. +.It Dv HIDIOCSINPUT(len) Pq Vt "void[] buf" +.It Dv HIDIOCSOUTPUT(len) Pq Vt "void[] buf" +Set respectively a feature, input or output Report in the device. The value of the report is specified by the .Va buf and the diff --git a/share/man/man4/hifn.4 b/share/man/man4/hifn.4 index a9a06c1fbd91..22494fcb6c6d 100644 --- a/share/man/man4/hifn.4 +++ b/share/man/man4/hifn.4 @@ -24,8 +24,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 29, 2020 .Dt HIFN 4 .Os diff --git a/share/man/man4/hkbd.4 b/share/man/man4/hkbd.4 index 400bf1d989cd..6e936b198618 100644 --- a/share/man/man4/hkbd.4 +++ b/share/man/man4/hkbd.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 12, 2020 .Dt HKBD 4 .Os diff --git a/share/man/man4/hms.4 b/share/man/man4/hms.4 index f3e798dc43aa..1f9738db883d 100644 --- a/share/man/man4/hms.4 +++ b/share/man/man4/hms.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 12, 2020 .Dt HMS 4 .Os diff --git a/share/man/man4/hmt.4 b/share/man/man4/hmt.4 index 7c8084e7b280..b2eb68d8672f 100644 --- a/share/man/man4/hmt.4 +++ b/share/man/man4/hmt.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 11, 2020 .Dt HMT 4 .Os diff --git a/share/man/man4/hpen.4 b/share/man/man4/hpen.4 index a043169895ec..d3b69ff1b332 100644 --- a/share/man/man4/hpen.4 +++ b/share/man/man4/hpen.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 14, 2020 .Dt HPEN 4 .Os @@ -100,13 +98,13 @@ Pen battery charge level reporting is not supported. The .Nm driver first appeared in -.Fx 13.0. +.Fx 13.0 . .Sh AUTHORS .An -nosplit The .Nm driver was written by -.An Greg V Aq Mt greg@unrelenting.technology . +.An Val Packett Aq Mt val@packett.cool . .Pp This manual page was written by .An Vladimir Kondratyev Aq Mt wulf@FreeBSD.org . diff --git a/share/man/man4/hpet.4 b/share/man/man4/hpet.4 index f006cde20f61..684549dfb1fa 100644 --- a/share/man/man4/hpet.4 +++ b/share/man/man4/hpet.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 14, 2010 .Dt HPET 4 .Os diff --git a/share/man/man4/hpt27xx.4 b/share/man/man4/hpt27xx.4 index 4ad5eaf1cffb..bec0c7110995 100644 --- a/share/man/man4/hpt27xx.4 +++ b/share/man/man4/hpt27xx.4 @@ -22,8 +22,6 @@ .\" (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 diff --git a/share/man/man4/hptiop.4 b/share/man/man4/hptiop.4 index 6d4a4a45ae7e..7ab8cf983776 100644 --- a/share/man/man4/hptiop.4 +++ b/share/man/man4/hptiop.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 5, 2013 .Dt HPTIOP 4 .Os diff --git a/share/man/man4/hptmv.4 b/share/man/man4/hptmv.4 index 240a32fb5505..75cf442bc07e 100644 --- a/share/man/man4/hptmv.4 +++ b/share/man/man4/hptmv.4 @@ -22,8 +22,6 @@ .\" (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 November 17, 2005 .Dt HPTMV 4 .Os diff --git a/share/man/man4/hptnr.4 b/share/man/man4/hptnr.4 index 47b691874896..3e0e4e56450a 100644 --- a/share/man/man4/hptnr.4 +++ b/share/man/man4/hptnr.4 @@ -22,8 +22,6 @@ .\" (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 July 5, 2013 .Dt HPTNR 4 .Os diff --git a/share/man/man4/hptrr.4 b/share/man/man4/hptrr.4 index 1f488f85c088..6f284ebab487 100644 --- a/share/man/man4/hptrr.4 +++ b/share/man/man4/hptrr.4 @@ -22,8 +22,6 @@ .\" (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 June 6, 2012 .Dt HPTRR 4 .Os diff --git a/share/man/man4/hsctrl.4 b/share/man/man4/hsctrl.4 index e4a44ce11630..fa8ae897e64c 100644 --- a/share/man/man4/hsctrl.4 +++ b/share/man/man4/hsctrl.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 26, 2021 .Dt HSCTRL 4 .Os @@ -89,7 +87,7 @@ input event device node. The .Nm driver first appeared in -.Fx 13.0. +.Fx 13.0 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/htu21.4 b/share/man/man4/htu21.4 index 17fbfb64b3a0..81af7518b3a7 100644 --- a/share/man/man4/htu21.4 +++ b/share/man/man4/htu21.4 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2021 Andriy Gapon <avg@FreeBSD.org> .\" @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 19, 2021 .Dt HTU21 4 .Os diff --git a/share/man/man4/hv_kvp.4 b/share/man/man4/hv_kvp.4 index 9aaf985dcc25..db16b4bc2e66 100644 --- a/share/man/man4/hv_kvp.4 +++ b/share/man/man4/hv_kvp.4 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" .\" Copyright (c) 2012 Microsoft Corp. .\" All rights reserved. diff --git a/share/man/man4/hv_netvsc.4 b/share/man/man4/hv_netvsc.4 index a619332d2937..e5c7004713c5 100644 --- a/share/man/man4/hv_netvsc.4 +++ b/share/man/man4/hv_netvsc.4 @@ -1,4 +1,5 @@ -.\" $FreeBSD$ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2012 Microsoft Corp. .\" All rights reserved. diff --git a/share/man/man4/hv_storvsc.4 b/share/man/man4/hv_storvsc.4 index 0941703180c7..dc77a822757f 100644 --- a/share/man/man4/hv_storvsc.4 +++ b/share/man/man4/hv_storvsc.4 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" .\" Copyright (c) 2012 Microsoft Corp. .\" All rights reserved. @@ -63,7 +62,7 @@ driver. The VSP in the root partition then forwards the storage related requests to the physical storage device. .Pp -This driver functions by presenting a SCSI HBA interface to the Comman Access +This driver functions by presenting a SCSI HBA interface to the Common Access Method (CAM) layer. CAM control blocks (CCBs) are converted into VSCSI protocol messages which are delivered to the root diff --git a/share/man/man4/hv_utils.4 b/share/man/man4/hv_utils.4 index e0053788b118..ae0a40aa780f 100644 --- a/share/man/man4/hv_utils.4 +++ b/share/man/man4/hv_utils.4 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" .\" Copyright (c) 2012 Microsoft Corp. .\" All rights reserved. diff --git a/share/man/man4/hv_vmbus.4 b/share/man/man4/hv_vmbus.4 index eb661b8c26e4..f4602c7642a6 100644 --- a/share/man/man4/hv_vmbus.4 +++ b/share/man/man4/hv_vmbus.4 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" .\" Copyright (c) 2012 Microsoft Corp. .\" All rights reserved. diff --git a/share/man/man4/hv_vss.4 b/share/man/man4/hv_vss.4 index 0ed1b1bf9217..33c7c2abb3c1 100644 --- a/share/man/man4/hv_vss.4 +++ b/share/man/man4/hv_vss.4 @@ -21,8 +21,6 @@ .\" 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 October 12, 2016 .Dt HV_VSS 4 .Os @@ -92,7 +90,7 @@ In addition, there is a default timeout limit before sending response to Hyper-V If the total response time from application and .Xr hv_vss_daemon 8 exceeds this value, timeout -will occurs and VSS unsupported is responsed to Hyper-V host. +will occur and VSS unsupported is responded to Hyper-V host. .Pp After Hyper-V host confirmed the .Fx diff --git a/share/man/man4/hwpmc.4 b/share/man/man4/hwpmc.4 index 806c2ee701c5..54a251dcca76 100644 --- a/share/man/man4/hwpmc.4 +++ b/share/man/man4/hwpmc.4 @@ -1,10 +1,12 @@ .\" Copyright (c) 2003-2008 Joseph Koshy -.\" Copyright (c) 2007 The FreeBSD Foundation -.\" All rights reserved. +.\" Copyright (c) 2007,2023 The FreeBSD Foundation .\" .\" Portions of this software were developed by A. Joseph Koshy under .\" sponsorship from the FreeBSD Foundation and Google, Inc. .\" +.\" Portions of this documentation were written by Mitchell Horne +.\" under sponsorship from the FreeBSD Foundation. +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -26,20 +28,43 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 3, 2021 +.Dd July 8, 2023 .Dt HWPMC 4 .Os .Sh NAME .Nm hwpmc .Nd "Hardware Performance Monitoring Counter support" .Sh SYNOPSIS +The following option must be present in the kernel configuration file: +.Bd -ragged -offset indent .Cd "options HWPMC_HOOKS" -.Cd "device hwpmc" +.Ed .Pp Additionally, for i386 systems: +.Bd -ragged -offset indent .Cd "device apic" +.Ed +.Pp +To load the driver as a module at boot time: +.Bd -literal -offset indent +sysrc kld_list+=hwpmc +.Ed +.Pp +Alternatively, to compile the driver into the kernel: +.Bd -ragged -offset indent +.Cd "device hwpmc" +.Ed +.Pp +To enable debugging features +.Po see +.Sx DEBUGGING +.Pc : +.Bd -ragged -offset indent +.Cd "options KTR" +.Cd "options KTR_COMPILE=(KTR_SUBSYS)" +.Cd "options KTR_MASK=(KTR_SUBSYS)" +.Cd "options HWPMC_DEBUG" +.Ed .Sh DESCRIPTION The .Nm @@ -265,14 +290,15 @@ Non-disabled hardware counters in such a row may be used for satisfying system scope allocation requests. No process scope PMCs will use hardware counters in this row. .El -.Sh PROGRAMMING API -The recommended way for application programs to use the facilities of -the -.Nm -driver is using the API provided by the +.Sh COMPATIBILITY +The API and ABI documented in this manual page may change in the future. +This interface is intended to be consumed by the .Xr pmc 3 -library. -.Pp +library; other consumers are unsupported. +Applications targeting PMCs should use the +.Xr pmc 3 +library API. +.Sh PROGRAMMING API The .Nm driver operates using a system call number that is dynamically @@ -473,28 +499,6 @@ PMCs, then the driver will reject allocation requests for process-private PMCs that request counting of hardware events that cannot be counted separately for each logical CPU. -.Ss Intel Pentium-Pro Handling -Writing a value to the PMC MSRs found in Intel Pentium-Pro style PMCs -(found in -.Tn "Intel Pentium Pro" , -.Tn "Pentium II" , -.Tn "Pentium III" , -.Tn "Pentium M" -and -.Tn "Celeron" -processors) will replicate bit 31 of the -value being written into the upper 8 bits of the MSR, -bringing down the usable width of these PMCs to 31 bits. -For process-virtual PMCs, the -.Nm -driver implements a workaround in software and makes the corrected 64 -bit count available via the -.Dv PMC_OP_RW -operation. -Processes that intend to use RDPMC instructions directly or -that intend to write values larger than 2^31 into these PMCs with -.Dv PMC_OP_RW -need to be aware of this hardware limitation. .Sh DIAGNOSTICS .Bl -diag .It "hwpmc: [class/npmc/capabilities]..." @@ -525,16 +529,126 @@ The value for tunable .Va kern.hwpmc.nsamples was negative or greater than 65535. .El -.Sh COMPATIBILITY +.Sh DEBUGGING The .Nm -driver is -.Ud -The API and ABI documented in this manual page may change in -the future. -The recommended method of accessing this driver is using the -.Xr pmc 3 -API. +module can be configured to record trace entries using the +.Xr ktr 4 +interface. +This is useful for debugging the driver's functionality, primarily during +development. +This debugging functionality is not enabled by default, and requires +recompiling the kernel and +.Nm +module after adding the following to the kernel config: +.Bd -literal -offset indent +.Cd options KTR +.Cd options KTR_COMPILE=(KTR_SUBSYS) +.Cd options KTR_MASK=(KTR_SUBSYS) +.Cd options HWPMC_DEBUG +.Ed +.Pp +This alone is not enough to enable tracing; one must also configure the +.Va kern.hwpmc.debugflags +.Xr sysctl 8 +variable, which provides fine-grained control over which types of events are +logged to the trace buffer. +.Pp +.Nm +trace events are grouped by 'major' and 'minor' flag types. +The major flag names are as follows: +.Pp +.Bl -tag -width "sampling" -compact -offset indent +.It cpu +CPU events +.It csw +Context switch events +.It logging +Logging events +.It md +Machine-dependent/class-dependent events +.It module +Miscellaneous events +.It owner +PMC owner events +.It pmc +PMC management events +.It process +Process events +.It sampling +Sampling events +.El +.Pp +The minor flags for each major flag group can vary. +The individual minor flag names are: +.Bd -ragged -offset indent +allocaterow, +allocate, +attach, +bind, +config, +exec, +exit, +find, +flush, +fork, +getbuf, +hook, +init, +intr, +linktarget, +mayberemove, +ops, +read, +register, +release, +remove, +sample, +scheduleio, +select, +signal, +swi, +swo, +start, +stop, +syscall, +unlinktarget, +write +.Ed +.Pp +The +.Va kern.hwpmc.debugflags +variable is a string with a custom format. +The string should contain a space-separated list of event specifiers. +Each event specifier consists of the major flag name, followed by an equal sign +(=), followed by a comma-separated list of minor event types. +To track all events for a major group, an asterisk (*) can be given instead of +minor event names. +.Pp +For example, to trace all allocation and release events, set +.Va debugflags +as follows: +.Bd -literal -offset indent +kern.hwpmc.debugflags="pmc=allocate,release md=allocate,release" +.Ed +.Pp +To trace all events in the process and context switch major flag groups: +.Bd -literal -offset indent +kern.hwpmc.debugflags="process=* csw=*" +.Ed +.Pp +To disable all trace events, set the variable to an empty string. +.Bd -literal -offset indent +kern.hwpmc.debugflags="" +.Ed +.Pp +Trace events are recorded by +.Xr ktr 4 , +and can be inspected at run-time using the +.Xr ktrdump 8 +utility, or at the +.Xr ddb 4 +prompt after a panic with the 'show ktr' command. .Sh ERRORS A command issued to the .Nm @@ -598,6 +712,12 @@ An invalid CPU number was passed in for a .Dv PMC_OP_GETPMCINFO operation. .It Bq Er EINVAL +The +.Ar pm_flags +argument to a +.Dv PMC_OP_CONFIGURELOG +request contained unknown flags. +.It Bq Er EINVAL A .Dv PMC_OP_CONFIGURELOG request to de-configure a log file was issued without a log file @@ -760,7 +880,10 @@ operation is not being monitored by .Xr kenv 1 , .Xr pmc 3 , .Xr pmclog 3 , +.Xr ddb 4 , +.Xr ktr 4 , .Xr kldload 8 , +.Xr ktrdump 8 , .Xr pmccontrol 8 , .Xr pmcstat 8 , .Xr sysctl 8 , diff --git a/share/man/man4/hwpstate_intel.4 b/share/man/man4/hwpstate_intel.4 index 4664dff8c264..5b9fbede855f 100644 --- a/share/man/man4/hwpstate_intel.4 +++ b/share/man/man4/hwpstate_intel.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 21, 2020 .Dt HWPSTATE_INTEL 4 .Os diff --git a/share/man/man4/i2ctinyusb.4 b/share/man/man4/i2ctinyusb.4 new file mode 100644 index 000000000000..78169a0506ff --- /dev/null +++ b/share/man/man4/i2ctinyusb.4 @@ -0,0 +1,85 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024 Denis Bodor <dbodor@rollmops.ninja> +.\" +.\" 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. +.\" +.Dd February 18, 2024 +.Dt I2CTINYUSB 4 +.Os +.Sh NAME +.Nm i2ctinyusb +.Nd driver for a USB / I2C bridge device +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device i2ctinyusb" +.Cd "device usb" +.Cd "device iicbus" +.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 +i2ctinyusb_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the device designed by Till Harbaum known +as i2c-tiny-usb. This is initially a very simple circuit built with +an Atmel AVR ATtiny45, but a Raspberry Pi Pico (RP2040) implementation +also exists. +.Pp +The +.Nm +driver creates a +.Xr iicbus 4 +child bus to expose the iic functions, enabling I2C sensors, converters +and displays to be connected to any computer with a USB port. +.Pp +More information about this device can be found at: +.Bd -literal -offset indent +https://github.com/harbaum/I2C-Tiny-USB +.Ed +.Pp +and (for the Raspberry Pi Pico version): +.Bd -literal -offset indent +https://github.com/Nicolai-Electronics/rp2040-i2c-interface +.Ed +.Pp +The I2C controller supports read and write transactions with up to 1024 +bytes of data, and a write followed by the repeated start followed by a +read transactions up to 1024 bytes. +Zero length transfers are not supported. +.Sh SEE ALSO +.Xr iicbus 4 , +.Xr usb 4 +.Sh HISTORY +The +.Nm +driver and this manual page was written by +.An Denis Bodor Aq Mt dbodor@rollmops.ninja . diff --git a/share/man/man4/iavf.4 b/share/man/man4/iavf.4 index c870284f2836..d55e084e82cc 100644 --- a/share/man/man4/iavf.4 +++ b/share/man/man4/iavf.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 2013-2018, Intel Corporation .\" All rights reserved. .\" @@ -29,14 +32,12 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.\" $FreeBSD$ -.\" -.Dd January 30, 2019 +.Dd May 21, 2024 .Dt IAVF 4 .Os .Sh NAME .Nm iavf -.Nd "Intel Adaptive Virtual Function driver" +.Nd "Intel Ethernet Adaptive Virtual Function Driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -53,87 +54,300 @@ if_iavf_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for the PCI Virtual Functions from the 700 Series of -ethernet devices and newer product families. -The driver supports Jumbo Frames, TX/RX checksum offload, -TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN -tag insertion/extraction, VLAN checksum offload, VLAN TSO, and -Receive Side Steering (RSS), all for both IPv4 and IPv6. -For further hardware information and questions related to hardware -requirements, see -.Pa http://support.intel.com/ . -.Pp -Support for Jumbo Frames is provided via the interface MTU setting. -Selecting an MTU larger than 1500 bytes with the +driver provides support for any PCI Virtual Function created from certain +Intel Ethernet devices. +This driver is compatible with virtual functions bound to devices based on the +following: +.Pp +.Bl -bullet -compact +.It +Intel\(rg Ethernet Controller E810\-C +.It +Intel\(rg Ethernet Controller E810\-XXV +.It +Intel\(rg Ethernet Connection E822\-C +.It +Intel\(rg Ethernet Connection E822\-L +.It +Intel\(rg Ethernet Connection E823\-C +.It +Intel\(rg Ethernet Connection E823\-L +.It +Intel\(rg Ethernet Controller I710 +.It +Intel\(rg Ethernet Controller X710 +.It +Intel\(rg Ethernet Controller XL710 +.It +Intel\(rg Ethernet Network Connection X722 +.It +Intel\(rg Ethernet Controller XXV710 +.It +Intel\(rg Ethernet Controller V710 +.El +.Pp +The associated Physical Function (PF) drivers for this VF driver are: +.Pp +.Bl -bullet -compact +.It +.Xr ice 4 +.It +.Xr ixl 4 +.El +.Pp +For questions related to hardware requirements, refer to the documentation +supplied with your Intel Ethernet Adapter. +All hardware requirements listed apply to use with +.Fx . +.Ss The VF Driver +The VF driver is normally used in a virtualized environment where a host driver +manages SR\-IOV, and provides a VF device to the guest. +.Pp +In the +.Fx +guest, the iavf driver would be loaded and will function using +the VF device assigned to it. +.Pp +The VF driver provides most of the same functionality as the core driver, but +is actually a subordinate to the host. +Access to many controls is accomplished by a request to the host via what is +called the "Admin queue." +These are startup and initialization events, however; once in operation, the +device is self\-contained and should achieve near native performance. +.Pp +Some notable limitations of the VF environment: +.Bl -bullet +.It +The PF can configure the VF to allow promiscuous mode, using a configuration +parameter in +.Xr iovctl.conf 5 ; +otherwise, promiscuous mode will not work +.It +Media info is not available from the PF, so the active media will always be +displayed as auto in .Xr ifconfig 8 -utility configures the adapter to receive and transmit Jumbo Frames. -The maximum MTU size for Jumbo Frames is 9706. +.El +.Ss Adaptive Virtual Function +Adaptive Virtual Function (AVF) allows the virtual function driver, or VF, to +adapt to changing feature sets of the physical function driver (PF) with which +it is associated. +This allows system administrators to update a PF without having to update all +the VFs associated with it. +All AVFs have a single common device ID and branding string. .Pp -Offloads are also controlled via the interface, for instance, -checksumming for both IPv4 and IPv6 can be set and unset, TSO4 -and/or TSO6, and finally LRO can be set and unset. +AVFs have a minimum set of features known as "base mode," but may provide +additional features depending on what features are available in the PF with +which the AVF is associated. +The following are base mode features: +.Bl -bullet -compact +.It +4 Queue Pairs (QP) and associated Configuration Status Registers (CSRs) +for Tx/Rx +.It +iavf descriptors and ring format +.It +Descriptor write\-back completion +.It +1 control queue, with iavf descriptors, CSRs and ring format +.It +5 MSI\-X interrupt vectors and corresponding iavf CSRs +.It +1 Interrupt Throttle Rate (ITR) index +.It +1 Virtual Station Interface (VSI) per VF +.It +1 Traffic Class (TC), TC0 +.It +Receive Side Scaling (RSS) with 64 entry indirection table and key, +configured through the PF +.It +1 unicast MAC address reserved per VF +.It +8 MAC address filters for each VF on an Intel\(rg Ethernet 800 Series device +.It +16 MAC address filters for each VF on an Intel\(rg Ethernet 700 Series device +.It +Stateless offloads \- non\-tunneled checksums +.It +AVF device ID +.It +HW mailbox is used for VF to PF communications +.El +.Sh CONFIGURATION AND TUNING +.Ss Important System Configuration Changes +It is important to note that 100G operation can generate high +numbers of interrupts, often incorrectly being interpreted as +a storm condition in the kernel. +It is suggested that this be resolved by setting +.Va hw.intr_storm_threshold +to 0. .Pp -For more information on configuring this device, see -.Xr ifconfig 8 . +The default is 1000. .Pp -.Em NOTE : -This +Best throughput results are seen with a large MTU; use 9706 if possible. +The default number of descriptors per ring is 1024. +Increasing this may improve performance, depending on your use case. +.Ss Configuring for no iflib +.Xr iflib 4 +is a common framework for network interface drivers for +.Fx +that uses a shared set of sysctl names. +.Pp +The default .Nm -driver is only for Virtual Functions. -For 700 series Physical Functions, use the -.Xr ixl 4 -driver. -.Sh LOADER TUNABLES -Tunables can be set at the -.Xr loader 8 -prompt before booting the kernel or stored in -.Xr loader.conf 5 . -.Bl -tag -width indent -.It Va hw.iavf.rx_itr -The RX interrupt rate value, set to 62 (124 usec) by default. -.It Va hw.iavf.tx_itr -The TX interrupt rate value, set to 122 (244 usec) by default. -.It Va hw.iavf.enable_head_writeback -When the driver is finding the last TX descriptor processed by the hardware, -use a value written to memory by the hardware instead of scanning the -descriptor ring for completed descriptors. -Disabled by default; this mimics the "legacy" TX behavior found in -.Xr ixgbe 4 . -to ensure compatibility with future, non-700 series VF devices. +driver depends on it, but it can be compiled without it. +.Ss Jumbo Frames +Jumbo Frames support is enabled by changing the Maximum Transmission Unit (MTU) +to a value larger than the default value of 1500. +.Pp +Use the +.Xr ifconfig 8 +command to increase the MTU size. +.Pp +To confirm the MTU used between two specific devices, use +.Xr route 8 : +.Bd -literal -offset indent +route get <destination_IP_address> +.Ed +.Pp +NOTE: +.Bl -bullet +.It +The maximum MTU setting for jumbo frames is 9706. +This corresponds to the maximum jumbo frame size of 9728 bytes. +.It +This driver will attempt to use multiple page-sized buffers to receive +each jumbo packet. +This should help to avoid buffer starvation issues when allocating receive +packets. +.It +Packet loss may have a greater impact on throughput when you use jumbo +frames. +If you observe a drop in performance after enabling jumbo frames, enabling +flow control may mitigate the issue. .El -.Sh SUPPORT -For general information and support, -go to the Intel support website at: -.Pa http://support.intel.com/ . +.Ss Checksum Offload +Checksum offloading supports both TCP and UDP packets and is supported for both +transmit and receive. +.Pp +TSO (TCP Segmentation Offload) supports both IPv4 and IPv6. +Both of these features are enabled and disabled via +.Xr ifconfig 8 . .Pp -If an issue is identified with this driver with a supported adapter, -email all the specific information related to the issue to -.Mt freebsd@intel.com . +NOTE: +.Bl -bullet -compact +.It +TSO requires Tx checksum; if Tx checksum is disabled then TSO will also +be disabled. +.El +.Ss LRO +LRO (Large Receive Offload) may provide Rx performance improvement. +However, it is incompatible with packet\-forwarding workloads. +You should carefully evaluate the environment and enable LRO when possible. +.Ss Rx and Tx Descriptor Rings +Allows you to set the Rx and Tx descriptor rings independently. +Set them via these +.Xr iflib 4 +sysctls: +.Bl -tag -width indent +.It dev.iavf.#.iflib.override_nrxds +.It dev.iavf.#.iflib.override_ntxds +.El +.Ss Link\-Level Flow Control (LFC) +The VF driver does not have access to flow control settings. +It must be managed from the host side. .Sh SEE ALSO .Xr arp 4 , +.Xr ice 4 , +.Xr iflib 4 , .Xr ixl 4 , .Xr netintro 4 , .Xr vlan 4 , -.Xr ifconfig 8 , -.Xr iflib 9 +.Xr ifconfig 8 +.Pp +See the +.Dq Intel\(rg Ethernet Adapters and Devices User Guide +for additional information on features. +It is available on the Intel website at either of the following: +.Bl -bullet +.It +.Lk https://cdrdv2.intel.com/v1/dl/getContent/705831 +.It +.Lk https://www.intel.com/content/www/us/en/download/19373/adapter\-user\-guide\-for\-intel\-ethernet\-adapters.html +.El +.Pp +For information on how to identify your adapter, and for the latest Intel +network drivers, refer to the Intel Support website: +.Aq Lk http://www.intel.com/support +.Sh CAVEATS +.Ss Driver Buffer Overflow Fix +The fix to resolve CVE\-2016\-8105, referenced in Intel SA\-00069 +.Aq Lk https://www.intel.com/content/www/us/en/security\-center/advisory/intel\-sa\-00069.html , +is included in this and future versions of the driver. +.Ss Network Memory Buffer Allocation +.Fx +may have a low number of network memory buffers (mbufs) by default. +If your mbuf value is too low, it may cause the driver to fail to initialize +and/or cause the system to become unresponsive. +You can check to see if the system is mbuf\-starved by running +.Li "netstat -m" . +Increase the number of mbufs by editing the lines below in +.Xr sysctl.conf 5 : +.Bd -literal -offset indent +kern.ipc.nmbclusters +kern.ipc.nmbjumbop +kern.ipc.nmbjumbo9 +kern.ipc.nmbjumbo16 +kern.ipc.nmbufs +.Ed +.Pp +The amount of memory that you allocate is system specific, and may require +some trial and error. +Also, increasing the following in +.Xr sysctl.conf 5 +could help increase +network performance: +.Bd -literal -offset indent +kern.ipc.maxsockbuf +net.inet.tcp.sendspace +net.inet.tcp.recvspace +net.inet.udp.maxdgram +net.inet.udp.recvspace +.Ed +.Ss UDP Stress Test Dropped Packet Issue +Under small packet UDP stress with the +.Nm +driver, the system may drop UDP packets due to socket buffers being full. +Setting the PF driver's Flow Control variables to the minimum may resolve the +issue. +.Ss Disable LRO when routing/bridging +LRO must be turned off when forwarding traffic. +.Sh SUPPORT +For general information, go to the Intel support website at +.Aq Lk http://www.intel.com/support/ . +.Pp +If an issue is identified with the released source code on a supported kernel +with a supported adapter, email the specific information related to the issue +to +.Aq Mt freebsd@intel.com . +.Sh LEGAL +Intel\(rg is a trademark or registered trademark of Intel Corporation +or its subsidiaries in the United States and / or other countries. +.Pp +Other names and brands may be claimed as the property of others. .Sh HISTORY The .Nm device driver first appeared in -.Fx 10.1 . -under the name "ixlv" +.Fx 10.1 +under the name +.Nm ixlv . It was converted to use -.Xr iflib 9 -and changed to its current name in -.Fx 12 . +.Xr iflib 4 +and renamed in +.Fx 12.4 . .Sh AUTHORS -.An -nosplit The .Nm -driver was written by -.An Jack Vogel Aq Mt jfv@freebsd.org -and -.An Eric Joyner Aq Mt erj@freebsd.org . -.Sh CAVEATS -This driver is supposed to function on VFs spawned from future network devices by Intel, -but at the time of this writing, has only been tested on the 700 series VFs. +driver was written by the +.An Intel Corporation Aq Mt freebsd@intel.com diff --git a/share/man/man4/ice.4 b/share/man/man4/ice.4 new file mode 100644 index 000000000000..63fdb244f3ed --- /dev/null +++ b/share/man/man4/ice.4 @@ -0,0 +1,253 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" +.\" Copyright (c) 2019-2020, Intel Corporation +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms of the Software, 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. +.\" +.\" 3. Neither the name of the Intel Corporation nor the names of its +.\" contributors may be used to endorse or promote products derived from +.\" this Software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. +.\" +.\" * Other names and brands may be claimed as the property of others. +.\" +.Dd May 20, 2024 +.Dt ICE 4 +.Os +.Sh NAME +.Nm ice +.Nd "Intel Ethernet 800 Series Driver" +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device iflib" +.Cd "device ice" +.Ed +.Pp +To load the driver as a module at boot time, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_ice_load="YES" +.Ed +.Sh DESCRIPTION +.Ss Features +The +.Nm +driver provides support for any PCI Express adapter or LOM +(LAN On Motherboard) +in the Intel Ethernet 800 Series. +As of this writing, the series includes devices with these model numbers: +.Pp +.Bl -bullet -compact +.It +Intel\(rg Ethernet Controller E810\-C +.It +Intel\(rg Ethernet Controller E810\-XXV +.It +Intel\(rg Ethernet Connection E822\-C +.It +Intel\(rg Ethernet Connection E822\-L +.It +Intel\(rg Ethernet Connection E823\-C +.It +Intel\(rg Ethernet Connection E823\-L +.El +.Pp +For questions related to hardware requirements, refer to the documentation +supplied with your adapter. +.Pp +Support for Jumbo Frames is provided via the interface MTU setting. +Selecting an MTU larger than 1500 bytes with the +.Xr ifconfig 8 +utility configures the adapter to receive and transmit Jumbo Frames. +The maximum MTU size for Jumbo Frames is 9706. +This value coincides with the maximum Jumbo Frame size of 9728. +.Pp +This driver version supports VLANs. +For information on enabling VLANs, see the +.Pa README . +.Pp +Offloads are also controlled via the interface, for instance, checksumming for +both IPv4 and IPv6 can be set and unset, TSO4 and/or TSO6, and finally LRO can +be set and unset. +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Ss Additional Utilities +There are additional tools available from Intel to help configure and update +the adapters covered by this driver. +These tools can be downloaded directly from Intel at +.Lk https://downloadcenter.intel.com , +by searching for their names, or by installing certain packages: +.Bl -bullet +.It +To change the behavior of the QSFP28 ports on E810-C adapters, use the +Intel EPCT (Ethernet Port configuration tool); installed by the +.Em sysutils/intel-epct +package. +.It +To update the firmware on an adapter, use the Intel Non-Volatile Memory (NVM) +Update Utility for Intel Network Adapter 800 series; installed by the +.Em sysutils/intel-nvmupdate-100g +package. +.El +.Sh HARDWARE +The +.Nm +driver supports the Intel Ethernet 800 series. +Most adapters in this series with SFP28/QSFP28 cages +have firmware that requires that Intel qualified modules are used; these +qualified modules are listed below. +This qualification check cannot be disabled by the driver. +.Pp +The +.Nm +driver supports 100Gb Ethernet adapters with these QSFP28 modules: +.Pp +.Bl -bullet -compact +.It +Intel\(rg 100G QSFP28 100GBASE-SR4 E100GQSFPSR28SRX +.It +Intel\(rg 100G QSFP28 100GBASE-SR4 SPTMBP1PMCDF +.It +Intel\(rg 100G QSFP28 100GBASE-CWDM4 SPTSBP3CLCCO +.It +Intel\(rg 100G QSFP28 100GBASE-DR SPTSLP2SLCDF +.El +.Pp +The +.Nm +driver supports 25Gb and 10Gb Ethernet adapters with these SFP28 modules: +.Pp +.Bl -bullet -compact +.It +Intel\(rg 10G/25G SFP28 25GBASE-SR E25GSFP28SR +.It +Intel\(rg 25G SFP28 25GBASE-SR E25GSFP28SRX (Extended Temp) +.It +Intel\(rg 25G SFP28 25GBASE-LR E25GSFP28LRX (Extended Temp) +.El +.Pp +The +.Nm +driver supports 10Gb and 1Gb Ethernet adapters with these SFP+ modules: +.Pp +.Bl -bullet -compact +.It +Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSR +.It +Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSRG1P5 +.It +Intel\(rg 1G/10G SFP+ 10GBASE-SR E10GSFPSRG2P5 +.It +Intel\(rg 10G SFP+ 10GBASE-SR E10GSFPSRX (Extended Temp) +.It +Intel\(rg 1G/10G SFP+ 10GBASE-LR E10GSFPLR +.El +.Pp +Note that adapters also support all passive and active +limiting direct attach cables that comply with SFF-8431 v4.1 and +SFF-8472 v10.4 specifications. +.Pp +This is not an exhaustive list; please consult product documentation for an +up-to-date list of supported media. +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +See the +.Xr iflib 4 +man page for more information on using iflib sysctl variables as tunables. +.Bl -tag -width indent +.It Va hw.ice.#.enable_health_events +TBW +.It Va hw.ice.#.debug.enable_tx_fc_filter +TBW +.It Va hw.ice.#.debug.enable_tx_lldp_filter +TBW +.It Va hw.ice.#.debug.enable_health_events +TBW +.El +.Sh SYSCTL PROCEDURES +.Bl -tag -width indent +.It Va dev.ice.#.fc +Allows one to set the flow control value. +A value of 0 disables flow control, 3 enables full, 1 is RX, and 2 is +TX pause. +.It Va dev.ice.#.advertise_speed +Allows one to set advertised link speeds, this will then cause a link +renegotiation. +.It Va dev.ice.#.current_speed +This is a display of the current setting. +.It Va dev.ice.#.fw_version +Displays the current firmware and NVM versions of the adapter. +.It Va dev.ice.#.ddp_version +TBW +.It Va dev.ice.#.requested_fec +TBW +.It Va dev.ice.#.negotiated_fec +TBW +.It Va dev.ice.#.fw_lldp_agent +TBW +.It Va dev.ice.#.ets_min_rate +TBW +.It Va dev.ice.#.up2tc_map +TBW +.It Va dev.ice.#.pfc +TBW +.El +.Sh INTERRUPT STORMS +It is important to note that 100G operation can generate high +numbers of interrupts, often incorrectly being interpreted as +a storm condition in the kernel. +It is suggested that this be resolved by setting +.Va hw.intr_storm_threshold +to 0. +.Sh SUPPORT +For general information and support, +go to the Intel support website at: +.Lk http://www.intel.com/support/ . +.Pp +If an issue is identified with this driver with a supported adapter, +email all the specific information related to the issue to +.Aq Mt freebsd@intel.com . +.Sh SEE ALSO +.Xr arp 4 , +.Xr iflib 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 12.2 . +.Sh AUTHORS +The +.Nm +driver was written by +.An Intel Corporation Aq Mt freebsd@intel.com . diff --git a/share/man/man4/ichsmb.4 b/share/man/man4/ichsmb.4 index 7cb94a84fa47..95b645b1b4ec 100644 --- a/share/man/man4/ichsmb.4 +++ b/share/man/man4/ichsmb.4 @@ -32,8 +32,6 @@ .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> .\" -.\" $FreeBSD$ -.\" .Dd July 20, 2016 .Dt ICHSMB 4 .Os diff --git a/share/man/man4/ichwd.4 b/share/man/man4/ichwd.4 index 35a5f7f1a6e4..cc6924f7f866 100644 --- a/share/man/man4/ichwd.4 +++ b/share/man/man4/ichwd.4 @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2007 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 20, 2008 .Dt ICHWD 4 .Os diff --git a/share/man/man4/icmp.4 b/share/man/man4/icmp.4 index 6836c614dfaf..c8c92a794e24 100644 --- a/share/man/man4/icmp.4 +++ b/share/man/man4/icmp.4 @@ -25,10 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)icmp.4 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" -.Dd August 1, 2022 +.Dd December 11, 2024 .Dt ICMP 4 .Os .Sh NAME @@ -172,10 +169,31 @@ Defaults to false. Enable/disable dropping of ICMP Redirect packets. Defaults to false. .It Va icmplim -.Pq Vt integer -Bandwidth limit for ICMP replies in packets/second. +.Pq Vt unsigned integer +Mean rate limit for replies in packets/second. +The actual limit is +.Va icmplim +plus a random jitter limited by +.Va icmplim_jitter . If set to zero, no limiting will occur. Defaults to 200. +.It Va icmplim_jitter +.Pq Vt unsigned integer +A random jitter between the negative of +.Va icmplim_jitter +and +.Va icmplim_jitter +is applied to +.Va icmplim +for limiting the sending rate of replies. +.Va icmplim_jitter +must be smaller than +.Va icmplim , +if +.Va icmplim +is not zero. +If set to zero, no jitter will be applied. +Defaults to 16. .It Va icmplim_output .Pq Vt boolean Enable/disable logging of ICMP replies bandwidth limiting. diff --git a/share/man/man4/icmp6.4 b/share/man/man4/icmp6.4 index c2ef91389b0b..8730e3fefacb 100644 --- a/share/man/man4/icmp6.4 +++ b/share/man/man4/icmp6.4 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 1, 2018 .Dt ICMP6 4 .Os diff --git a/share/man/man4/ida.4 b/share/man/man4/ida.4 index 9257496aef44..9c18994d1d7c 100644 --- a/share/man/man4/ida.4 +++ b/share/man/man4/ida.4 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Written by Tom Rhodes .\" This file is public domain .\" diff --git a/share/man/man4/ietp.4 b/share/man/man4/ietp.4 index 72ef865b7ba6..7c6c9eab4cae 100644 --- a/share/man/man4/ietp.4 +++ b/share/man/man4/ietp.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 27, 2022 .Dt IETP 4 .Os diff --git a/share/man/man4/if_ipsec.4 b/share/man/man4/if_ipsec.4 index 2e978c0cdb94..bd3ef5a29591 100644 --- a/share/man/man4/if_ipsec.4 +++ b/share/man/man4/if_ipsec.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 6, 2017 .Dt if_ipsec 4 .Os diff --git a/share/man/man4/if_ntb.4 b/share/man/man4/if_ntb.4 index 5629eb4fe4b4..62638d02c59d 100644 --- a/share/man/man4/if_ntb.4 +++ b/share/man/man4/if_ntb.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 2, 2017 .Dt IF_NTB 4 .Os diff --git a/share/man/man4/iflib.4 b/share/man/man4/iflib.4 index 4fea2676ece6..0114263e6ca2 100644 --- a/share/man/man4/iflib.4 +++ b/share/man/man4/iflib.4 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .Dd September 27, 2018 .Dt IFLIB 4 .Os @@ -140,7 +139,7 @@ no available space. Number of entries which have been enqueued to the MP ring for this queue. .It Va ring_state MP (soft) ring state. -This privides a snapshot of the current MP ring state, including the producer +This provides a snapshot of the current MP ring state, including the producer head and tail indexes, the consumer index, and the state. The state is one of "IDLE", "BUSY", "STALLED", or "ABDICATED". diff --git a/share/man/man4/ifmib.4 b/share/man/man4/ifmib.4 index 9ebdc59e461a..20b5613b6873 100644 --- a/share/man/man4/ifmib.4 +++ b/share/man/man4/ifmib.4 @@ -25,8 +25,6 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 26, 2020 .Dt IFMIB 4 .Os diff --git a/share/man/man4/ig4.4 b/share/man/man4/ig4.4 index 8220c0da0ffb..67bad68dfcc6 100644 --- a/share/man/man4/ig4.4 +++ b/share/man/man4/ig4.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 13, 2018 .Dt IG4 4 .Os diff --git a/share/man/man4/igc.4 b/share/man/man4/igc.4 index 9c80b3e1c4d3..a67ed1c15ee8 100644 --- a/share/man/man4/igc.4 +++ b/share/man/man4/igc.4 @@ -3,9 +3,7 @@ .\" Copyright 2021 Rubicon Communications, LLC (Netgate) .\" SPDX-License-Identifier: BSD-3-Clause .\" -.\" $FreeBSD$ -.\" -.Dd May 10, 2021 +.Dd January 9, 2023 .Dt IGC 4 .Os .Sh NAME @@ -83,13 +81,29 @@ driver supports the following models: .Pp .Bl -bullet -compact .It +I220-V +.It +I221-V +.It I225-LM .It +I225-LMvP(2) +.It I225-V .It -I225-IT +I225-IT, I225-IT(2) +.It +I225-K, I225-K(2) +.It +I226-LM +.It +I226-LMvP +.It +I226-V +.It +I226-IT .It -I225-K +I226-K .El .Sh LOADER TUNABLES Tunables can be set at the @@ -102,28 +116,9 @@ Disable or enable hardware stripping of CRC field. This is mostly useful on BMC/IPMI shared interfaces where stripping the CRC causes remote access over IPMI to fail. Default 0 (enabled). -.It Va hw.igc.rx_int_delay -This value delays the generation of receive interrupts in units -of 1.024 microseconds. -The default value is 0, since adapters may hang with this feature being -enabled. -.It Va hw.igc.rx_abs_int_delay -If hw.igc.rx_int_delay is non-zero, this tunable limits the -maximum delay in which a receive interrupt is generated. -.It Va hw.igc.tx_int_delay -This value delays the generation of transmit interrupts in units -of 1.024 microseconds. -The default value is 64. -.It Va hw.igc.tx_abs_int_delay -If hw.igc.tx_int_delay is non-zero, this tunable limits the -maximum delay in which a transmit interrupt is generated. .It Va hw.igc.sbp Show bad packets when in promiscuous mode. Default is false. -.It Va hw.igc.rx_process_limit -Maximum number of received packets to process at a time. -Default is 100. -A value of -1 means unlimited. .It Va hw.igc.eee_setting Disable or enable Energy Efficient Ethernet. Default 1 (disabled). @@ -153,7 +148,7 @@ address. The .Nm device driver first appeared in -.Fx 14.0 . +.Fx 13.1 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/igmp.4 b/share/man/man4/igmp.4 index 2e820483a067..c395be0f2a53 100644 --- a/share/man/man4/igmp.4 +++ b/share/man/man4/igmp.4 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 9, 2009 .Dt IGMP 4 .Os diff --git a/share/man/man4/iic.4 b/share/man/man4/iic.4 index 77a8177e5d1b..ddabb073c092 100644 --- a/share/man/man4/iic.4 +++ b/share/man/man4/iic.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 15, 2015 .Dt IIC 4 .Os diff --git a/share/man/man4/iic_gpiomux.4 b/share/man/man4/iic_gpiomux.4 index fe660b006b72..d6ebb35bbdcd 100644 --- a/share/man/man4/iic_gpiomux.4 +++ b/share/man/man4/iic_gpiomux.4 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 1, 2020 .Dt IIC_GPIOMUX 4 .Os diff --git a/share/man/man4/iicbb.4 b/share/man/man4/iicbb.4 index e048c5d9bc75..d446b4d57eb0 100644 --- a/share/man/man4/iicbb.4 +++ b/share/man/man4/iicbb.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 25, 1998 .Dt IICBB 4 .Os diff --git a/share/man/man4/iicbus.4 b/share/man/man4/iicbus.4 index b96e6eb2ab9b..8f0af2488a07 100644 --- a/share/man/man4/iicbus.4 +++ b/share/man/man4/iicbus.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 7, 2021 .Dt IICBUS 4 .Os diff --git a/share/man/man4/iichid.4 b/share/man/man4/iichid.4 index 526a6f444440..02a91d7811a2 100644 --- a/share/man/man4/iichid.4 +++ b/share/man/man4/iichid.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 21, 2020 .Dt IICHID 4 .Os @@ -76,13 +74,13 @@ In that case .Nm enables sampling mode with periodic polling of hardware by driver means. See dev.iichid.*.sampling_* -.Xr sysctl 4 +.Xr sysctl 8 variables for tuning of sampling parameters. .Sh HISTORY The .Nm driver first appeared in -.Fx 13.0. +.Fx 13.0 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/iicmux.4 b/share/man/man4/iicmux.4 index 981285052547..878d9d640a1e 100644 --- a/share/man/man4/iicmux.4 +++ b/share/man/man4/iicmux.4 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 1, 2020 .Dt IICMUX 4 .Os diff --git a/share/man/man4/iicsmb.4 b/share/man/man4/iicsmb.4 index 4fdf6d497b8c..ffa38000659f 100644 --- a/share/man/man4/iicsmb.4 +++ b/share/man/man4/iicsmb.4 @@ -1,5 +1,7 @@ -.\" Copyright (c) 1998, Nicolas Souchu -.\" All rights reserved. +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 1998, Nicolas Souchu. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -22,14 +24,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 10, 1998 .Dt IICSMB 4 .Os .Sh NAME .Nm iicsmb -.Nd I2C to SMB bridge +.Nd I2C to SMBus bridge .Sh SYNOPSIS .Cd "device iicsmb" .Pp diff --git a/share/man/man4/imcsmb.4 b/share/man/man4/imcsmb.4 index b1acb8bca00d..4a8f9e503e70 100644 --- a/share/man/man4/imcsmb.4 +++ b/share/man/man4/imcsmb.4 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2018 Panasas .\" @@ -23,8 +23,6 @@ .\" (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 March 2, 2018 .Dt IMCSMB 4 .Os diff --git a/share/man/man4/inet.4 b/share/man/man4/inet.4 index 31c80feecfaa..08ca67a7edad 100644 --- a/share/man/man4/inet.4 +++ b/share/man/man4/inet.4 @@ -25,10 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" From: @(#)inet.4 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" -.Dd August 1, 2022 +.Dd December 31, 2024 .Dt INET 4 .Os .Sh NAME @@ -172,11 +169,11 @@ The following general variables are defined: .It Va accept_sourceroute Boolean: enable/disable accepting of source-routed IP packets (default false). .It Va allow_net0 -Boolean: allow experimental use of addresses in 0.0.0.0/8 as endpoints, -and allow forwarding of packets with these addresses. +Boolean: allow forwarding of, and ICMP responses to, packets with addresses in +0.0.0.0/8. .It Va allow_net240 -Boolean: allow experimental use of addresses in 240.0.0.0/4 as endpoints, -and allow forwarding of packets with these addresses. +Boolean: allow forwarding of, and ICMP responses to, packets with addresses in +240.0.0.0/4. .It Va curfrags Integer: Current number of IPv4 fragments across all reassembly queues in all VNETs (read-only). @@ -186,6 +183,8 @@ Defaults to off. .It Va fragpackets Integer: Current number of IPv4 fragment reassembly queue entries for the VNET (read-only). +.It Va fragttl +Integer: time to live for IPv4 packet fragments in the per-VNET reassemby queue. .It Va loopback_prefixlen Integer: prefix length of the address space reserved for loopback purposes. The default is 8, meaning that 127.0.0.0/8 is reserved for loopback, @@ -278,6 +277,8 @@ The number must be between 512 and 32768 inclusive. This is a per-VNET value. .It Va random_id_total Integer: count of IP IDs created (read-only, per-VNET). +.It Va reass_hashsize +Number of hash slots in the IPv4 reassembly queue (loader tunable). .It Va redirect Boolean: enable/disable sending of ICMP redirects in response to .Tn IP diff --git a/share/man/man4/inet6.4 b/share/man/man4/inet6.4 index 87c57ea2c3d2..21bae5255d66 100644 --- a/share/man/man4/inet6.4 +++ b/share/man/man4/inet6.4 @@ -27,9 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd November 12, 2021 +.Dd February 22, 2023 .Dt INET6 4 .Os .Sh NAME @@ -185,7 +183,9 @@ The .Tn ICMPv6 message protocol is accessible from a raw socket. .Ss MIB Variables -A number of variables are implemented in the net.inet6 branch of the +A number of variables are implemented in the +.Va net.inet6 +branch of the .Xr sysctl 3 MIB. In addition to the variables supported by the transport protocols @@ -341,6 +341,11 @@ mapped address on .Dv AF_INET6 sockets. Defaults to on. +.It Va ip6.log_cannot_forward +Boolean: log packets that can't be forwarded because of unspecified source +address or destination address beyond the scope of the source address as +described in RFC4443. +Enabled by default. .It Va ip6.source_address_validation Boolean: perform source address validation for packets destined for the local host. @@ -440,6 +445,15 @@ sockets. .Xr ip6 4 , .Xr tcp 4 , .Xr udp 4 +.Rs +.%A A. Conta +.%A S. Deering +.%A M. Gupta +.%T "Internet Control Message Protocol (ICMPv6) for the Internet" \ + "Protocol Version 6 (IPv6) Specification" +.%R RFC 4443 +.%D March 2006 +.Re .Sh STANDARDS .Rs .%A Tatsuya Jinmei diff --git a/share/man/man4/intpm.4 b/share/man/man4/intpm.4 index 4ece9359c03f..d4b0195621aa 100644 --- a/share/man/man4/intpm.4 +++ b/share/man/man4/intpm.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 22, 2016 .Dt INTPM 4 .Os diff --git a/share/man/man4/intro.4 b/share/man/man4/intro.4 index dd5f1cada82d..e4caf6690efb 100644 --- a/share/man/man4/intro.4 +++ b/share/man/man4/intro.4 @@ -24,8 +24,6 @@ .\" (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 April 3, 2019 .Dt INTRO 4 .Os @@ -79,7 +77,7 @@ are accessed through sometimes also called .Em special files . They are located within instances of the -.Xr devfs 5 +.Xr devfs 4 filesystem, which is conventionally mounted on the directory .Pa /dev in the file system hierarchy @@ -87,7 +85,7 @@ in the file system hierarchy .Xr hier 7 ) . .Pp The -.Xr devfs 5 +.Xr devfs 4 filesystem creates or removes device nodes automatically according to the physical hardware recognized as present at any given time. For pseudo-devices, device nodes may be created and removed dynamically @@ -106,7 +104,7 @@ or set using the command. In the latter case, different rules may be used to make different sets of devices visible within different instances of the -.Xr devfs 5 +.Xr devfs 4 filesystem, which may be used, for example, to prevent jailed subsystems from accessing unsafe devices. Manual changes to device @@ -202,7 +200,7 @@ device. .Xr select 2 , .Xr socket 2 , .Xr write 2 , -.Xr devfs 5 , +.Xr devfs 4 , .Xr hier 7 , .Xr config 8 .Sh HISTORY diff --git a/share/man/man4/io.4 b/share/man/man4/io.4 index fa1c3f1d25c7..fa989f6498b7 100644 --- a/share/man/man4/io.4 +++ b/share/man/man4/io.4 @@ -25,8 +25,6 @@ .\" (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 June 1, 2010 .Dt IO 4 .Os diff --git a/share/man/man4/ioat.4 b/share/man/man4/ioat.4 index 3808945532b4..deef466c0ae0 100644 --- a/share/man/man4/ioat.4 +++ b/share/man/man4/ioat.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 3, 2016 .Dt IOAT 4 .Os diff --git a/share/man/man4/ip.4 b/share/man/man4/ip.4 index d1c3b34b51a6..c52715a43380 100644 --- a/share/man/man4/ip.4 +++ b/share/man/man4/ip.4 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)ip.4 8.2 (Berkeley) 11/30/93 -.\" $FreeBSD$ -.\" .Dd August 9, 2021 .Dt IP 4 .Os @@ -91,7 +88,7 @@ setsockopt(s, IPPROTO_IP, IP_OPTIONS, NULL, 0); .Pp .Dv IP_TOS may be used to set the differential service codepoint (DSCP) and the -explicit congestion notfication (ECN) codepoint. +explicit congestion notification (ECN) codepoint. Setting the ECN codepoint - the two least significant bits - on a socket using a transport protocol implementing ECN has no effect. .Pp @@ -230,7 +227,7 @@ The socket should be either bound to .Dv INADDR_ANY and a local port, and the address supplied with .Dv IP_SENDSRCADDR -should't be +shouldn't be .Dv INADDR_ANY , or the socket should be bound to a local address and the address supplied with .Dv IP_SENDSRCADDR @@ -453,21 +450,6 @@ In scenarios such as benchmarking, this behavior may be undesirable. In these cases, .Va net.inet.ip.portrange.randomized can be used to toggle randomization off. -If more than -.Va net.inet.ip.portrange.randomcps -ports have been allocated in the last second, then return to sequential -port allocation. -Return to random allocation only once the current port allocation rate -drops below -.Va net.inet.ip.portrange.randomcps -for at least -.Va net.inet.ip.portrange.randomtime -seconds. -The default values for -.Va net.inet.ip.portrange.randomcps -and -.Va net.inet.ip.portrange.randomtime -are 10 port allocations per second and 45 seconds correspondingly. .Ss "Multicast Options" .Tn IP multicasting is supported only on diff --git a/share/man/man4/ip17x.4 b/share/man/man4/ip17x.4 new file mode 100644 index 000000000000..ac5c989020a5 --- /dev/null +++ b/share/man/man4/ip17x.4 @@ -0,0 +1,42 @@ +.\" +.\" Copyright (c) 2025 Alexander Ziaee +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd May 18, 2025 +.Dt IP17X 4 +.Sh NAME +.Nm ip17x +.Nd IC Plus IP17x series Fast Ethernet switch driver +.Sh SYNOPSIS +.Cd device mdio +.Cd device etherswitch +.Cd device ip17x +.Sh DESCRIPTION +The +.Nm +driver supports the +IC Plus IP17X series Fast Ethernet switch controllers. +.Sh HARDWARE +The +.Nm +driver supports the following Fast Ethernet switch controllers: +.Pp +.Bl -bullet -compact +.It +IC Plus IP178C +.It +IC Plus IP175D +.It +IC Plus IP175C +.It +IC Plus IP175A +.El +.Sh SEE ALSO +.Xr etherswitch 4 , +.Xr etherswitchcfg 8 +.Sh HISTORY +The +.Nm +driver appeared in +.Fx 10.0 . diff --git a/share/man/man4/ip6.4 b/share/man/man4/ip6.4 index 9dd9007866a2..ce756854a47d 100644 --- a/share/man/man4/ip6.4 +++ b/share/man/man4/ip6.4 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 24, 2022 .Dt IP6 4 .Os @@ -229,7 +227,7 @@ Get or set whether a datagram's original destination address and port are returned as ancillary data along with the payload in subsequent .Xr recvmsg 2 calls. -The information is stored in the the ancillary data as a +The information is stored in the ancillary data as a .Tn sockaddr_in6 structure. .It Dv IPV6_PORTRANGE Fa "int *" diff --git a/share/man/man4/ipfirewall.4 b/share/man/man4/ipfirewall.4 index 981cefda8273..691ed3d331c0 100644 --- a/share/man/man4/ipfirewall.4 +++ b/share/man/man4/ipfirewall.4 @@ -1,6 +1,4 @@ .\" -.\" $FreeBSD$ -.\" .Dd August 19, 2020 .Dt IPFW 4 .Os @@ -151,11 +149,11 @@ man page for a complete description of the capabilities and how to use it. .Sh SEE ALSO .Xr setsockopt 2 , +.Xr libalias 3 , .Xr divert 4 , .Xr ip 4 , .Xr ip6 4 , .Xr ipfw 8 , -.Xr libalias 3 , .Xr natd 8 , .Xr sysctl 8 , .Xr syslogd 8 , diff --git a/share/man/man4/ipheth.4 b/share/man/man4/ipheth.4 index cedd60a3469a..85726dd6b30c 100644 --- a/share/man/man4/ipheth.4 +++ b/share/man/man4/ipheth.4 @@ -25,8 +25,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 29, 2022 .Dt IPHETH 4 .Os diff --git a/share/man/man4/ipmi.4 b/share/man/man4/ipmi.4 index f908911378da..0d2e32c01470 100644 --- a/share/man/man4/ipmi.4 +++ b/share/man/man4/ipmi.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 25, 2017 .Dt IPMI 4 .Os diff --git a/share/man/man4/ips.4 b/share/man/man4/ips.4 index ece0bc37ba8f..134e87dfef29 100644 --- a/share/man/man4/ips.4 +++ b/share/man/man4/ips.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 7, 2009 .Dt IPS 4 .Os diff --git a/share/man/man4/ipsec.4 b/share/man/man4/ipsec.4 index 9bee93153a54..9fd6207c2f14 100644 --- a/share/man/man4/ipsec.4 +++ b/share/man/man4/ipsec.4 @@ -27,9 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd February 6, 2017 +.Dd March 4, 2025 .Dt IPSEC 4 .Os .Sh NAME @@ -184,7 +182,7 @@ is synonymous with which requires that a security association must exist for the packets to move, and not be dropped. These terms are defined in -.Xr ipsec_set_policy 8 . +.Xr ipsec_set_policy 3 . .Bl -column net.inet6.ipsec6.esp_trans_deflev integerxxx .It Sy "Name Type Changeable" .It "net.inet.ipsec.esp_trans_deflev integer yes" @@ -241,6 +239,7 @@ for tweaking the kernel's IPsec behavior: .It "net.inet.ipsec.debug integer yes" .It "net.inet.ipsec.natt_cksum_policy integer yes" .It "net.inet.ipsec.check_policy_history integer yes" +.It "net.inet.ipsec.random_id integer yes" .It "net.inet6.ipsec6.ecn integer yes" .It "net.inet6.ipsec6.debug integer yes" .El @@ -300,6 +299,9 @@ have been decrypted and authenticated. If this variable is set to a non-zero value, each packet handled by IPsec is checked against the history of IPsec security associations. The IPsec security protocol, mode, and SA addresses must match. +.It Li ipsec.random_id +Enables randomization of encapsulated IPv4 packets ID. +By default, ID randomization is not enabled. .El .Pp Variables under the @@ -335,8 +337,8 @@ routines from looking into the IP payload. .Xr ipsec_set_policy 3 , .Xr crypto 4 , .Xr enc 4 , -.Xr if_ipsec 4 , .Xr icmp6 4 , +.Xr if_ipsec 4 , .Xr intro 4 , .Xr ip6 4 , .Xr setkey 8 , diff --git a/share/man/man4/ipw.4 b/share/man/man4/ipw.4 index 71ce5752836f..0ebee0f1e6eb 100644 --- a/share/man/man4/ipw.4 +++ b/share/man/man4/ipw.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2004-2006 .\" Damien Bergamini <damien.bergamini@free.fr>. All rights reserved. .\" @@ -23,14 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd October 15, 2015 +.Dd November 10, 2024 .Dt IPW 4 .Os .Sh NAME .Nm ipw -.Nd "Intel PRO/Wireless 2100 IEEE 802.11 driver" +.Nd Intel PRO/Wireless 2100 IEEE 802.11a/b driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -59,19 +60,14 @@ legal.intel_ipw.license_ack=1 .Sh DESCRIPTION The .Nm -driver provides support for the -.Tn Intel -PRO/Wireless 2100 MiniPCI network adapter. -.Nm -supports +driver provides support for Intel PRO/Wireless 2100 802.11a/b +wireless network devices in .Cm station , .Cm adhoc , and .Cm monitor mode operation. Only one virtual interface may be configured at any time. -For more information on configuring this device, see -.Xr ifconfig 8 . .Pp This driver requires the firmware built with the .Nm ipwfw @@ -82,28 +78,34 @@ must be agreed by adding the following line to .Xr loader.conf 5 : .Pp .Dl "legal.intel_ipw.license_ack=1" +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver provides support for the +Intel PRO/Wireless 2100a/b MiniPCI network adapter. .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/intel_ipw.LICENSE" -compact +.Bl -tag -width "/usr/share/doc/legal/intel_ipw.LICENSE" -compact .It Pa /usr/share/doc/legal/intel_ipw.LICENSE .Nm firmware license .El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev ipw0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev ipw0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev ipw0 ssid my_net up" +.Dl ifconfig wlan create wlandev ipw0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev ipw0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: @@ -146,6 +148,7 @@ This should not happen. .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , +.Xr networking 7 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh AUTHORS diff --git a/share/man/man4/ipwfw.4 b/share/man/man4/ipwfw.4 index 810fe2a32383..df1f1b776861 100644 --- a/share/man/man4/ipwfw.4 +++ b/share/man/man4/ipwfw.4 @@ -20,8 +20,6 @@ .\" (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 October 15, 2015 .Dt IPWFW 4 .Os diff --git a/share/man/man4/irdma.4 b/share/man/man4/irdma.4 index c8da2ad795dd..b7b78a08533c 100644 --- a/share/man/man4/irdma.4 +++ b/share/man/man4/irdma.4 @@ -29,8 +29,6 @@ .\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE .\" SOFTWARE. .\" -.\" $FreeBSD$ -.\" .Dd March 30, 2022 .Dt IRDMA 4 .Os @@ -39,8 +37,8 @@ .Nd RDMA FreeBSD driver for Intel(R) Ethernet Controller E810 .Sh SYNOPSIS This module relies on -.Xr if_ice 4 -.Bl -tag -nested-width indent +.Xr ice 4 +.Bl -tag -width indent .It The following kernel options should be included in the configuration: .Cd options OFED .Cd options OFED_DEBUG_INIT @@ -52,8 +50,9 @@ This module relies on .Ss Features The .Nm -driver provides RDMA protocol support on RDMA-capable Intel Ethernet 800 Series NICs which are supported by -.Xr if_ice 4 +driver provides RDMA protocol support on RDMA-capable Intel Ethernet 800 Series +NICs which are supported by +.Xr ice 4 . .Pp The driver supports both iWARP and RoCEv2 protocols. @@ -66,48 +65,65 @@ prompt before booting the kernel or stored in .Bl -tag -width indent .It Va dev.irdma<interface_number>.roce_enable enables RoCEv2 protocol usage on <interface_numer> interface. -.Pp By default RoCEv2 protocol is used. +.Pp +By default RoCEv2 protocol is used. .It Va dev.irdma<interface_number>.dcqcn_cc_cfg_valid -indicates that all DCQCN parameters are valid and should be updated in registers or QP context. +indicates that all DCQCN parameters are valid and should be updated in +registers or QP context. .Pp -Setting this parameter to 1 means that settings in -.Em dcqcn_min_dec_factor, dcqcn_min_rate_MBps, dcqcn_F, dcqcn_T, -.Em dcqcn_B, dcqcn_rai_factor, dcqcn_hai_factor, dcqcn_rreduce_mperiod -are taken into account. Otherwise default values are used. +Setting this parameter to 1 means that settings in +.Em dcqcn_min_dec_factor , dcqcn_min_rate_MBps , dcqcn_F , dcqcn_T , +.Em dcqcn_B, dcqcn_rai_factor, dcqcn_hai_factor, dcqcn_rreduce_mperiod +are taken into account. +Otherwise default values are used. .Pp Note: "roce_enable" must also be set for this tunable to take effect. .It Va dev.irdma<interface_number>.dcqcn_min_dec_factor -The minimum factor by which the current transmit rate can be changed when processing a CNP. Value is given as a percentage (1-100). +The minimum factor by which the current transmit rate can be changed when +processing a CNP. +Value is given as a percentage (1-100). .Pp -Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable to take effect. +Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable +to take effect. .It Va dev.irdma<interface_number>.dcqcn_min_rate_MBps The minimum value, in Mbits per second, for rate to limit. .Pp -Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable to take effect. +Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable +to take effect. .It Va dev.irdma<interface_number>.dcqcn_F The number of times to stay in each stage of bandwidth recovery. .Pp -Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable to take effect. +Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable +to take effect. .It Va dev.irdma<interface_number>.dcqcn_T -The number of microseconds that should elapse before increasing the CWND in DCQCN mode. +The number of microseconds that should elapse before increasing the CWND +in DCQCN mode. .Pp -Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable to take effect. +Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable +to take effect. .It Va dev.irdma<interface_number>.dcqcn_B The number of bytes to transmit before updating CWND in DCQCN mode. .Pp -Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable to take effect. +Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable +to take effect. .It Va dev.irdma<interface_number>.dcqcn_rai_factor The number of MSS to add to the congestion window in additive increase mode. .Pp -Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable to take effect. +Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable +to take effect. .It Va dev.irdma<interface_number>.dcqcn_hai_factor The number of MSS to add to the congestion window in hyperactive increase mode. .Pp -Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable to take effect. +Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable +to take effect. .It Va dev.irdma<interface_number>.dcqcn_rreduce_mperiod -The minimum time between 2 consecutive rate reductions for a single flow. Rate reduction will occur only if a CNP is received during the relevant time interval. +The minimum time between 2 consecutive rate reductions for a single flow. +Rate reduction will occur only if a CNP is received during the relevant time +interval. .Pp -Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable to take effect. +Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable +to take effect. +.El .Ss SYSCTL PROCEDURES Sysctl controls are available for runtime adjustments. .Bl -tag -width indent @@ -120,64 +136,60 @@ enables the DCQCN algorithm for RoCEv2. .Pp Note: "roce_enable" must also be set for this sysctl to take effect. .Pp -Note: The change may be set at any time, but it will be applied only to newly created QPs. +Note: The change may be set at any time, but it will be applied only to newly +created QPs. +.El .Ss TESTING .Bl -enum .It To load the irdma driver, run: -.Bl -tag -width indent -.It +.Bd -literal -offset indent kldload irdma -.El -If if_ice is not already loaded, the system will load it on its own. Please check whether the value of sysctl +.Ed +If if_ice is not already loaded, the system will load it on its own. +Please check whether the value of sysctl .Va hw.ice.irdma -is 1, if the irdma driver is not loading. To change the value put: -.Bl -tag -width indent -.It +is 1, if the irdma driver is not loading. +To change the value put: +.Bd -literal -offset indent hw.ice.irdma=1 -.El -to +.Ed +in .Pa /boot/loader.conf and reboot. .It To check that the driver was loaded, run: -.Bl -tag -width indent -.It +.Bd -literal -offset indent sysctl -a | grep infiniband -.El +.Ed Typically, if everything goes well, around 190 entries per PF will appear. .It -Each interface of the card may work in either iWARP or RoCEv2 mode. To enable RoCEv2 compatibility, add: -.Bl -tag -width indent -.It +Each interface of the card may work in either iWARP or RoCEv2 mode. +To enable RoCEv2 compatibility, add: +.Bd -literal -offset indent dev.irdma<interface_number>.roce_enable=1 -.El +.Ed where <interface_number> is a desired ice interface number on which -RoCEv2 protocol needs to be enabled, to: -.Bl -tag -width indent -.It +RoCEv2 protocol needs to be enabled, into: .Pa /boot/loader.conf -.El -for instance: +, for instance: .Bl -tag -width indent -.It -dev.irdma0.roce_enable=0 -.It -dev.irdma1.roce_enable=1 +.It dev.irdma0.roce_enable=0 +.It dev.irdma1.roce_enable=1 .El -will keep iWARP mode on ice0 and enable RoCEv2 mode on interface ice1. The RoCEv2 mode is the default. -.Dl +will keep iWARP mode on ice0 and enable RoCEv2 mode on interface ice1. +The RoCEv2 mode is the default. +.Pp To check irdma roce_enable status, run: -.Bl -tag -width indent -.It +.Bd -literal -offset indent sysctl dev.irdma<interface_number>.roce_enable -.El +.Ed for instance: -.Bl -tag -width indent -.It +.Bd -literal -offset indent sysctl dev.irdma2.roce_enable -.El -with returned value of '0' indicate the iWARP mode, and the value of '1' indicate the RoCEv2 mode. +.Ed +with returned value of '0' indicate the iWARP mode, and the value of '1' +indicate the RoCEv2 mode. .Pp Note: An interface configured in one mode will not be able to connect to a node configured in another mode. @@ -187,44 +199,42 @@ DCB and Priority Flow Controller (PFC) are not currently supported which may lead to significant performance loss or connectivity issues. .It Enable flow control in the ice driver: -.Bl -tag -width indent -.It +.Bd -literal -offset indent sysctl dev.ice.<interface_number>.fc=3 -.El -Enable flow control on the switch your system is connected to. See your -switch documentation for details. +.Ed +Enable flow control on the switch your system is connected to. +See your switch documentation for details. .It The source code for krping software is provided with the kernel in -/usr/src/sys/contrib/rdma/krping/. To compile the software, change -directory to /usr/src/sys/modules/rdma/krping/ and invoke the following: +/usr/src/sys/contrib/rdma/krping/. +To compile the software, change directory to +/usr/src/sys/modules/rdma/krping/ and invoke the following: .Bl -tag -width indent -.It -make clean -.It -make -.It -make install +.It make clean +.It make +.It make install +.It kldload krping .El .It Start a krping server on one machine: -.Bl -tag -width indent -.It - echo size=64,count=1,port=6601,addr=100.0.0.189,server > /dev/krping -.El +.Bd -literal -offset indent +echo size=64,count=1,port=6601,addr=100.0.0.189,server > /dev/krping +.Ed .It Connect a client from another machine: -.Bl -tag -width indent -.It - echo size=64,count=1,port=6601,addr=100.0.0.189,client > /dev/krping +.Bd -literal -offset indent +echo size=64,count=1,port=6601,addr=100.0.0.189,client > /dev/krping +.Ed .El .Sh SUPPORT For general information and support, go to the Intel support website at: .Lk http://support.intel.com/ . .Pp -If an issue is identified with this driver with a supported adapter, email all the specific information related to the issue to +If an issue is identified with this driver with a supported adapter, email all +the specific information related to the issue to .Mt freebsd@intel.com . .Sh SEE ALSO -.Xr if_ice 4 +.Xr ice 4 .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/isci.4 b/share/man/man4/isci.4 index 06e249b6dfc2..4d8115f0bbad 100644 --- a/share/man/man4/isci.4 +++ b/share/man/man4/isci.4 @@ -31,8 +31,6 @@ .\" .\" Author: Jim Harris <jimharris@FreeBSD.org> .\" -.\" $FreeBSD$ -.\" .Dd January 23, 2012 .Dt ISCI 4 .Os diff --git a/share/man/man4/iscsi.4 b/share/man/man4/iscsi.4 index c5f3f786f570..77a5e816294f 100644 --- a/share/man/man4/iscsi.4 +++ b/share/man/man4/iscsi.4 @@ -20,8 +20,6 @@ .\" 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 May 28, 2017 .Dt ISCSI 4 .Os diff --git a/share/man/man4/iser.4 b/share/man/man4/iser.4 index abaaa92d0762..496e7b4072e6 100644 --- a/share/man/man4/iser.4 +++ b/share/man/man4/iser.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" -.\" $FreeBSD$ .Dd June 6, 2016 .Dt ISER 4 .Os diff --git a/share/man/man4/isl.4 b/share/man/man4/isl.4 index ae081f3df01f..610c6e47a6e8 100644 --- a/share/man/man4/isl.4 +++ b/share/man/man4/isl.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 18, 2018 .Dt ISL 4 .Os diff --git a/share/man/man4/ismt.4 b/share/man/man4/ismt.4 index c32e04f5dec3..1c3beec5a950 100644 --- a/share/man/man4/ismt.4 +++ b/share/man/man4/ismt.4 @@ -31,8 +31,6 @@ .\" .\" Author: Jim Harris <jimharris@FreeBSD.org> .\" -.\" $FreeBSD$ -.\" .Dd March 4, 2020 .Dt ISMT 4 .Os diff --git a/share/man/man4/isp.4 b/share/man/man4/isp.4 index 78d20723f015..6fea63fdd5d5 100644 --- a/share/man/man4/isp.4 +++ b/share/man/man4/isp.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 2009-2020 Alexander Motin <mav@FreeBSD.org> .\" Copyright (c) 2006 Marcus Alves Grando .\" Copyright (c) 1998-2001 Matthew Jacob, for NASA/Ames Research Center @@ -24,9 +27,7 @@ .\" (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 November 19, 2020 +.Dd April 8, 2025 .Dt ISP 4 .Os .Sh NAME @@ -81,31 +82,33 @@ the tape drive. FC-Tape is automatically enabled when connecting controller that supports it to a target that supports it. It may be disabled using configuration and hint options described below. +.Sh HARDWARE +The +.Nm +driver supports the following optical Fibre Chanel adapters: +.Bl -column "Qlogic 2690/2692/2694 (2684/2692)" "Speed" "PCI-X" +.It Model: Ta Speed: Ta Bus: +.It Qlogic QLE2874 (2814) Ta 64Gb Ta PCIe +.It Qlogic QLE2870/QLE2872 (2812) Ta 64Gb Ta PCIe +.It Qlogic QLE2774 (2814) Ta 32Gb Ta PCIe +.It Qlogic QLE2770/QLE2772 (2812) Ta 32Gb Ta PCIe +.It Qlogic 2740/2742/2764 (2722/2714) Ta 32Gb Ta PCIe +.It Qlogic 2690/2692/2694 (2684/2692) Ta 16Gb Ta PCIe +.It Qlogic 267x/836x (2031/8031) FCoE Ta 16Gb Ta PCIe +.It Qlogic 256x (2532) Ta 8Gb Ta PCIe +.It Qlogic 246x (2432) Ta 4Gb Ta PCIe +.It Qlogic 2422 Ta 4Gb Ta PCI-X +.El .Sh FIRMWARE -Firmware loading is supported if the +Firmware loading is supported and handled by +.Xr firmware 9 . +The correct firmware is either loaded automatically, if available for this +type of adapter, or by manually loading the .Xr ispfw 4 -module is loaded. +module. It is strongly recommended that you use the firmware available from .Xr ispfw 4 -as it is the most likely to have been tested with this driver. -.Sh HARDWARE -Cards supported by the -.Nm -driver include: -.Bl -tag -width xxxxxx -offset indent -.It Qlogic 2422 -Optical 4Gb Fibre Channel PCI-X cards. -.It Qlogic 246x (aka 2432) -Optical 4Gb Fibre Channel PCIe cards. -.It Qlogic 256x (aka 2532) -Optical 8Gb Fibre Channel PCIe cards. -.It Qlogic 267x/836x (aka 2031/8031) -Optical 16Gb FC/FCoE PCIe cards. -.It Qlogic 2690/2692/2694 (aka 2684/2692) -Optical 16Gb Fibre Channel PCIe cards. -.It Qlogic 2740/2742/2764 (aka 2722/2714) -Optical 32Gb Fibre Channel PCIe cards. -.El +as it is the one that most likely has been tested with this driver. .Sh CONFIGURATION OPTIONS Target mode support for Fibre Channel adapters may be enabled with the .Pp @@ -130,8 +133,23 @@ Limit on number of Message Signaled Interrupts (MSI) to be used. .It Va hint.isp. Ns Ar N Ns Va .msix Limit on number of Extended Message Signaled Interrupts (MSI-X) to be used. .It Va hint.isp. Ns Ar N Ns Va .fwload_disable -A hint value to disable loading of firmware +A hint value to disable loading of firmware provided by .Xr ispfw 4 . +.It Va hint.isp. Ns Ar N Ns Va .fwload_force +A hint value to prefer firmware provided by +.Xr ispfw 4 , +even if it is older than the firmware in flash on the board. +If fwload_disable is also specified, fwload_force will be ignored. +.Pp +By default, with 27XX and newer controllers, the +.Xr isp 4 +driver will use the newer +firmware. +For older controllers, the +.Xr isp 4 +driver will use the firmware provided by +.Xr ispfw 4 +if it is available, and otherwise use the firmware in flash on the board. .It Va hint.isp. Ns Ar N Ns Va .ignore_nvram A hint value to ignore board NVRAM settings for. Otherwise use NVRAM settings. @@ -143,11 +161,11 @@ Supported values are: .Pp .Bl -tag -width ".Li lport-only" -compact .It Li lport -Prefer loopback and fallback to point to point. +Prefer arbitrated loop and fallback to point to point. .It Li nport -Prefer point to point and fallback to loopback. +Prefer point to point and fallback to arbitrated loop. .It Li lport-only -Loopback only. +Arbitrated loop only. .It Li nport-only Point to point only. .El @@ -204,6 +222,14 @@ The default is 1 (enabled). This is the readonly World Wide Node Name value for this port. .It Va dev.isp. Ns Ar N Ns Va .wwpn This is the readonly World Wide Port Name value for this port. +.It Va dev.isp. Ns Ar N Ns Va .fw_version_flash +The readonly flash firmware version value in the active region of the +controller. +.It Va dev.isp. Ns Ar N Ns Va .fw_version_ispfw +The readonly firmware version value provided by +.Xr ispfw 4 . +.It Va dev.isp. Ns Ar N Ns Va .fw_version_run +The readonly firmware version value currently executed on the controller. .El .Sh SEE ALSO .Xr da 4 , diff --git a/share/man/man4/ispfw.4 b/share/man/man4/ispfw.4 index 8353413fe280..b2f952ce4ba1 100644 --- a/share/man/man4/ispfw.4 +++ b/share/man/man4/ispfw.4 @@ -20,9 +20,7 @@ .\" (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 November 19, 2020 +.Dd October 27, 2023 .Dt ISPFW 4 .Os .Sh NAME diff --git a/share/man/man4/itwd.4 b/share/man/man4/itwd.4 index b050e9a43e74..fd53741825fc 100644 --- a/share/man/man4/itwd.4 +++ b/share/man/man4/itwd.4 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2012 Bjoern A. Zeeb <bz@FreeBSD.org> .\" Copyright (c) 2019 Andriy Gapon <avg@FreeBSD.org> @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 16, 2019 .Dt ITWD 4 .Os diff --git a/share/man/man4/iwi.4 b/share/man/man4/iwi.4 index 5d6b8f54247e..31ef4ec83d32 100644 --- a/share/man/man4/iwi.4 +++ b/share/man/man4/iwi.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2004-2006 .\" Damien Bergamini <damien.bergamini@free.fr>. All rights reserved. .\" @@ -23,14 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd October 15, 2015 +.Dd November 10, 2024 .Dt IWI 4 .Os .Sh NAME .Nm iwi -.Nd "Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 driver" +.Nd Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 network driver .Sh SYNOPSIS To compile this driver into the kernel, include the following lines in your @@ -59,19 +60,14 @@ legal.intel_iwi.license_ack=1 .Sh DESCRIPTION The .Nm -driver provides support for -.Tn Intel -PRO/Wireless 2200BG/2915ABG MiniPCI and 2225BG PCI network adapters. -.Nm -supports +driver provides support for Intel PRO/Wireless 2200BG/2225BG/2915ABG +IEEE 802.11a/b/g wireless network devices in .Cm station , .Cm adhoc , and .Cm monitor mode operation. Only one virtual interface may be configured at any time. -For more information on configuring this device, see -.Xr ifconfig 8 . .Pp This driver requires the firmware built with the .Nm iwifw @@ -82,28 +78,42 @@ must be agreed by adding the following line to .Xr loader.conf 5 : .Pp .Dl "legal.intel_iwi.license_ack=1" +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports the following wireless network devices: +.Pp +.Bl -bullet -compact +.It +Intel PRO/Wireless 2200BG MiniPCI Network Connection +.It +Intel PRO/Wireless 2225BG PCI Network Connection +.It +Intel PRO/Wireless 2915ABG MiniPCI Network Connection +.El .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/intel_iwi.LICENSE" -compact +.Bl -tag -width "/usr/share/doc/legal/intel_iwi.LICENSE" -compact .It Pa /usr/share/doc/legal/intel_iwi.LICENSE .Nm firmware license .El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev iwi0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev iwi0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev iwi0 ssid my_net up" +.Dl ifconfig wlan create wlandev iwi0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev iwi0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: @@ -151,6 +161,7 @@ This should not happen. .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , +.Xr networking 7 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh AUTHORS diff --git a/share/man/man4/iwifw.4 b/share/man/man4/iwifw.4 index 52f90e3ea6f2..d4bad24a51f6 100644 --- a/share/man/man4/iwifw.4 +++ b/share/man/man4/iwifw.4 @@ -20,8 +20,6 @@ .\" (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 October 15, 2015 .Dt IWIFW 4 .Os diff --git a/share/man/man4/iwlwifi.4 b/share/man/man4/iwlwifi.4 index bfb3c00d9217..4a251f239a55 100644 --- a/share/man/man4/iwlwifi.4 +++ b/share/man/man4/iwlwifi.4 @@ -1,5 +1,7 @@ -.\"- -.\" Copyright (c) 2021 The FreeBSD Foundation +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2021-2025 The FreeBSD Foundation .\" .\" This documentation was written by Bj\xc3\xb6rn Zeeb under sponsorship from .\" the FreeBSD Foundation. @@ -25,14 +27,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd June 3, 2022 -.Dt iwlwifi 4 +.Dd June 13, 2025 +.Dt IWLWIFI 4 .Os .Sh NAME .Nm iwlwifi -.Nd Intel IEEE 802.11a/b/g/n/ac/ax wireless network driver +.Nd Intel IEEE 802.11a/b/g/n/ac/ax/be wireless network driver .Sh SYNOPSIS The driver will auto-load without any user interaction using .Xr devmatch 8 @@ -50,22 +50,94 @@ kld_list="${kld_list} if_iwlwifi" The driver should automatically load any .Xr iwlwififw 4 firmware needed for the particular chipset. +See section +.Sx "FILES" +below for how to install the firmware. .Pp -It is discouraged to load the driver from +It is not possible to load the driver from .Xr loader 8 . .Sh DESCRIPTION The .Nm -driver is derived from Intel's Linux iwlwifi driver and provides support for -all chipsets supported by the -.Em mvm -part of that driver. +driver provides support for Intel Wireless network devices. +.Pp +.Nm +is derived from Intel's Linux iwlwifi driver. +The +.Xr iwm 4 +and +.Xr iwx 4 +drivers together are approximately equivalent to Intel's Linux iwlwifi/mvm +driver. +.Pp +In addition +.Nm +already supports Intel's Linux iwlwifi/mld chipsets. +.Pp +.Nm +still complements the +.Xr iwn 4 +driver which supports older chipsets and would be equivalent to +Intel's Linux iwlwifi/dvm, which +.Nm +does not support. +.Pp +The driver uses the +.\" No LinuxKPI man pages so no .Xr here. +.Sy linuxkpi_wlan +and +.Sy linuxkpi +compat framework to bridge between the Linux and +native +.Fx +driver code as well as to the native +.Xr net80211 4 +wireless stack. +.Sh HARDWARE +The +.Nm +driver supports PCIe devices from the +.Sy mvm +sub-driver with the following chipset generations: +.Pp +.\" awk -F\\t '{ print $5 }' ~/tmp/iwlwifi_pci_ids_name.txt | \ +.\" grep -v undefined | sort -V | uniq | grep -v ^$ | \ +.\" awk '{ printf ".It\n%s\n", $0 }' +.Bl -bullet -compact +.It +7000 +.It +8000 +.It +9000 +.It +22000 +.It +AX210 +.El +.Pp +The +.Nm +driver supports PCIe devices from the +.Sy mld +sub-driver with the following chipset generations: .Pp .Bl -bullet -compact -.% --------------------------------------------------------------------- -.% This list is manually generated from a sysctl and post-processing. -.% Edits will be overwritten on next update. -.% --------------------------------------------------------------------- +.It +BZ +.It +SC +.El +.Pp +These chipset generations match the following common device names: +.Pp +.Bl -bullet -compact +.\" -------------------------------------------------------------------- +.\" This list is manually generated from a sysctl and post-processing. +.\" Edits will be overwritten on next update. +.\" awk -F\\t '{ if ($2 == "") { next; } if (seen[$2]) { next; } \ +.\" seen[$2]=1; printf ".It\n%s\n", $2; }' iwlwifi_pci_ids_name.txt +.\" -------------------------------------------------------------------- .It Intel(R) Dual Band Wireless AC 7260 .It @@ -173,46 +245,82 @@ Intel(R) Wi-Fi 6 AX101 .It Intel(R) Wi-Fi 6 AX203 .It -Intel(R) Wi-Fi 6E AX221 160MHz -.It Intel(R) Wi-Fi 6E AX231 160MHz .It -Intel(R) TBD Bz device +Intel(R) Wi-Fi 7 BE201 320MHz +.It +Intel(R) Wi-Fi 7 BE200 320MHz .It -Intel(R) Wi-Fi 6 AX204 160MHz -.% --------------------------------------------------------------------- +Intel(R) Wi-Fi 7 BE202 160MHz +.It +Intel(R) TBD Sc device +.It +Intel(R) TBD Sc2 device +.It +Intel(R) TBD Sc2f device +.\" -------------------------------------------------------------------- .El -.Pp +.Sh LOADER TUNABLES +The .Nm -will be a successor to -.Xr iwm 4 -and may superseed that driver in the future. -It still complements the -.Xr iwn 4 -driver which supports older chipsets. +driver supports the following +.Xr loader 8 +tunable and read-only +.Xr sysctl 8 +variables: +.Bl -tag -width "compat.linuxkpi.iwlwifi_disable_11ac" +.It Va compat.linuxkpi.iwlwifi_11n_disable +Turn off 802.11n support in the driver. +Default +.Ql 1 . +.It Va compat.linuxkpi.iwlwifi_disable_11ac +Turn off 802.11ac support in the driver. +Default +.Ql 1 . +.El .Pp -The driver uses the -.\" No LinuxKPI man pages so no .Xr here. -.Em linuxkpi_wlan -and -.Em linuxkpi -compat framework to bridge between the Linux and -native FreeBSD driver code as well as to the native -.Xr net80211 4 -wireless stack. +The names of the tunables are derived from the Linux iwlwifi driver +module parameters and are mapped automatically by +.Sy linuxkpi . +They were not adjusted so that they stay consistent with upstream +Linux, e.g., for documentation available and problem investigations. +This left their names inconsistent between themselves and incosistent to +.Fx +style. .Pp -While +The tunables are automatically adjusted by the firmware package for +chipsets which can enable 11n and 11ac. +In case of problems a user may want to override the provided values +in +.Pa /boot/loader.conf.local +with the above defaults. +.Sh FILES +The .Nm -supports all 802.11 a/b/g/n/ac/ax -the compatibility code currently only supports 802.11 a/b/g modes. -Support for 802.11 n/ac is to come. 802.11ax and 6Ghz support are planned. -.Sh BUGS -Certainly. +driver requires firmware from +.Pa ports/net/wifi-firmware-iwlwifi-kmod . +This firmware package will be installed automatically with +.Xr fwget 8 +if the appropriate hardware is detected at installation or runtime. +.Pp +As a last resort for bootstrapping, individual firmware files can be +manually downloaded, e.g., on a different computer and transferred using a +.Xr umass 4 +device. +The firmware files can be found at +.Lk git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git +with names as requested by the driver. +Copies should be placed into the +.Pa /boot/firmware +directory. .Sh SEE ALSO .Xr iwlwififw 4 , .Xr iwm 4 , .Xr iwn 4 , +.Xr iwx 4 , .Xr wlan 4 , +.Xr networking 7 , +.Xr fwget 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh HISTORY @@ -220,3 +328,14 @@ The .Nm driver first appeared in .Fx 13.1 . +802.11n and 802.11ac support for the 22000 and later chipsets first appeared in +.Fx 14.3 . +.Sh BUGS +Certainly. +.Pp +While +.Nm +supports 802.11a/b/g/n/ac/ax/be modes, +the compatibility code currently only supports 802.11a/b/g/n/ac modes. +802.11n/ac is only available on the 22000 and later chipset generations. +802.11ax/be and 6Ghz support are planned. diff --git a/share/man/man4/iwlwififw.4 b/share/man/man4/iwlwififw.4 index d9e13e3cf147..45ee0e757c07 100644 --- a/share/man/man4/iwlwififw.4 +++ b/share/man/man4/iwlwififw.4 @@ -1,5 +1,7 @@ -.\"- -.\" Copyright (c) 2021 The FreeBSD Foundation +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2021-2025 The FreeBSD Foundation .\" .\" This documentation was written by Bj\xc3\xb6rn Zeeb under sponsorship from .\" the FreeBSD Foundation. @@ -25,14 +27,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd June 3, 2022 -.Dt iwlwififw 4 +.Dd May 12, 2025 +.Dt IWLWIFIFW 4 .Os .Sh NAME .Nm iwlwififw -.Nd Firmware modules for Intel iwlwifi wireless network driver +.Nd Firmware for Intel iwlwifi wireless network driver .Sh SYNOPSIS The .Xr iwlwifi 4 @@ -40,1445 +40,1544 @@ driver should auto-load any firmware needed. It is discouraged to load the driver or firmware manually from .Xr loader 8 . .Sh DESCRIPTION -Multiple modules provide access to firmware for the various chipset -models supported by the +Firmware files are available from +.Xr ports 7 +for the various chipset models supported +by the .Xr iwlwifi 4 driver. +Modern chipsets often require a +.Pa .ucode +and an accompanying +.Pa .pnvm +file. +.Pp +One can use +.Xr fwget 8 +to install the correct firmware package. .Pp -.Bl -column -compact "Vendor" "Device" "Subv. " "Subd. " "Firmware-Prefix" +The list is provided as a reference as to with file prefix is needed for +a specific card as far as it can be determined and the port flavor. +.Pp +.Bl -column -compact "Vendor" "Device" "Subv. " "Subd. " "Flavor" "Firmware-Prefix" .It Ar Name -.It Ar Vendor Ta Ar Device Ta Ar Subv. Ta Ar Subd. Ta Ar Firmware-Prefix -.% --------------------------------------------------------------------- -.% This list is manually generated from a sysctl and post-processing. -.% Edits will be overwritten on next update. -.% --------------------------------------------------------------------- +.It Ar Vendor Ta Ar Device Ta Ar Subv. Ta Ar Subd. Ta Ar Flavor Ta Ar Firmware-Prefix +.\" --------------------------------------------------------------------- +.\" This list is manually generated from a sysctl and post-processing +.\" by sys/contrib/dev/iwlwifi/zzz_fw_ports_fwget.sh generating the list. +.\" Edits will be overwritten on next update. +.\" --------------------------------------------------------------------- +.It "" +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4070 Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4072 Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4170 Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4c60 Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4c70 Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4060 Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x406a Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4160 Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4062 Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4162 Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b2 Ta any Ta 0x4270 Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b2 Ta any Ta 0x4272 Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b2 Ta any Ta 0x4260 Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b2 Ta any Ta 0x426a Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b2 Ta any Ta 0x4262 Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4470 Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4472 Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4460 Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x446a Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4462 Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4870 Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x486e Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4a70 Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4a6e Ta 7000 Ta iwlwifi-7260 +.It "" +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4a6c Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4070 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4570 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4072 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4560 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4170 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b2 Ta any Ta 0x4370 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4c60 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b2 Ta any Ta 0x4360 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4c70 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x5070 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4060 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x5072 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x406a Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x5170 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4160 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x5770 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4062 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4020 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4162 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x402a Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0x4270 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b2 Ta any Ta 0x4220 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0x4272 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0x4420 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0x4260 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc070 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0x426a Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc072 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Wireless N 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0x4262 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc170 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4470 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc060 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4472 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc06a Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4460 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc160 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x446a Ta iwlwifi-7260- +.It Intel(R) Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc062 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4462 Ta iwlwifi-7260- +.It Intel(R) Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc162 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4870 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc770 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x486e Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc760 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4a70 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b2 Ta any Ta 0xc270 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4a6e Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xcc70 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4a6c Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xcc60 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4570 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b2 Ta any Ta 0xc272 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4560 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b2 Ta any Ta 0xc260 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0x4370 Ta iwlwifi-7260- +.It Intel(R) Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b2 Ta any Ta 0xc26a Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0x4360 Ta iwlwifi-7260- +.It Intel(R) Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b2 Ta any Ta 0xc262 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x5070 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc470 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x5072 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc472 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x5170 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc460 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x5770 Ta iwlwifi-7260- +.It Intel(R) Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc462 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4020 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc570 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x402a Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc560 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0x4220 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b2 Ta any Ta 0xc370 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0x4420 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc360 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc070 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc020 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc072 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc02a Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc170 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b2 Ta any Ta 0xc220 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc060 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 7260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b1 Ta any Ta 0xc420 Ta 7000 Ta iwlwifi-7260 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc06a Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b3 Ta any Ta 0x0070 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc160 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b3 Ta any Ta 0x0072 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc062 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b3 Ta any Ta 0x0170 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc162 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b3 Ta any Ta 0x0172 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc770 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b3 Ta any Ta 0x0060 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc760 Ta iwlwifi-7260- +.It Intel(R) Wireless N 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b3 Ta any Ta 0x0062 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0xc270 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b4 Ta any Ta 0x0270 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xcc70 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b4 Ta any Ta 0x0272 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xcc60 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b3 Ta any Ta 0x0470 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0xc272 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b3 Ta any Ta 0x0472 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0xc260 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b4 Ta any Ta 0x0370 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Wireless N 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0xc26a Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b3 Ta any Ta 0x8070 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Wireless N 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0xc262 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b3 Ta any Ta 0x8072 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc470 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b3 Ta any Ta 0x8170 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc472 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b3 Ta any Ta 0x8172 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc460 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless N 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b3 Ta any Ta 0x8060 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc462 Ta iwlwifi-7260- +.It Intel(R) Wireless N 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b3 Ta any Ta 0x8062 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc570 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b4 Ta any Ta 0x8270 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc560 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b4 Ta any Ta 0x8370 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Dual Band Wireless AC 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0xc370 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b4 Ta any Ta 0x8272 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc360 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b3 Ta any Ta 0x8470 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc020 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b3 Ta any Ta 0x8570 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc02a Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b3 Ta any Ta 0x1070 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b2 Ta any Ta 0xc220 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3160 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x08b3 Ta any Ta 0x1170 Ta 7000 Ta iwlwifi-3160 .It "" -.It Intel(R) Dual Band Wireless N 7260 -.It 0x8086 Ta 0x08b1 Ta any Ta 0xc420 Ta iwlwifi-7260- +.It Intel(R) Dual Band Wireless AC 3165 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3165 Ta any Ta 0x4010 Ta 7000 Ta iwlwifi-7265D .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x0070 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 3165 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3165 Ta any Ta 0x4012 Ta 7000 Ta iwlwifi-7265D .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x0072 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 3165 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3166 Ta any Ta 0x4212 Ta 7000 Ta iwlwifi-7265D .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x0170 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 3165 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3165 Ta any Ta 0x4410 Ta 7000 Ta iwlwifi-7265D .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x0172 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 3165 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3165 Ta any Ta 0x4510 Ta 7000 Ta iwlwifi-7265D .It "" -.It Intel(R) Dual Band Wireless N 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x0060 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 3165 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3165 Ta any Ta 0x4110 Ta 7000 Ta iwlwifi-7265D .It "" -.It Intel(R) Wireless N 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x0062 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 3165 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3166 Ta any Ta 0x4310 Ta 7000 Ta iwlwifi-7265D .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b4 Ta any Ta 0x0270 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 3165 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3166 Ta any Ta 0x4210 Ta 7000 Ta iwlwifi-7265D .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b4 Ta any Ta 0x0272 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 3165 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3165 Ta any Ta 0x8010 Ta 7000 Ta iwlwifi-7265D .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x0470 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 3165 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3165 Ta any Ta 0x8110 Ta 7000 Ta iwlwifi-7265D .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x0472 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 3168 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fb Ta any Ta 0x2010 Ta 7000 Ta iwlwifi-3168 .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b4 Ta any Ta 0x0370 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 3168 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fb Ta any Ta 0x2110 Ta 7000 Ta iwlwifi-3168 .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x8070 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 3168 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fb Ta any Ta 0x2050 Ta 7000 Ta iwlwifi-3168 .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x8072 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 3168 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fb Ta any Ta 0x2150 Ta 7000 Ta iwlwifi-3168 .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x8170 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 3168 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fb Ta any Ta 000000 Ta 7000 Ta iwlwifi-3168 .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x8172 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x5010 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless N 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x8060 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x5110 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Wireless N 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x8062 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x5100 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b4 Ta any Ta 0x8270 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095b Ta any Ta 0x5310 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b4 Ta any Ta 0x8370 Ta iwlwifi-3160- +.It Intel(R) Wireless N 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095b Ta any Ta 0x5302 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b4 Ta any Ta 0x8272 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095b Ta any Ta 0x5210 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x8470 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x5c10 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x8570 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x5012 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x1070 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x5412 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3160 -.It 0x8086 Ta 0x08b3 Ta any Ta 0x1170 Ta iwlwifi-3160- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x5410 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3165 Ta any Ta 0x4010 Ta iwlwifi-7265D- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x5510 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3165 Ta any Ta 0x4012 Ta iwlwifi-7265D- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x5400 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3166 Ta any Ta 0x4212 Ta iwlwifi-7265D- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x1010 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3165 Ta any Ta 0x4410 Ta iwlwifi-7265D- +.It Intel(R) Dual Band Wireless N 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x5000 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3165 Ta any Ta 0x4510 Ta iwlwifi-7265D- +.It Intel(R) Dual Band Wireless N 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x500a Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3165 Ta any Ta 0x4110 Ta iwlwifi-7265D- +.It Intel(R) Dual Band Wireless N 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095b Ta any Ta 0x5200 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3166 Ta any Ta 0x4310 Ta iwlwifi-7265D- +.It Intel(R) Wireless N 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x5002 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3166 Ta any Ta 0x4210 Ta iwlwifi-7265D- +.It Intel(R) Wireless N 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x5102 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3165 Ta any Ta 0x8010 Ta iwlwifi-7265D- +.It Intel(R) Wireless N 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095b Ta any Ta 0x5202 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3165 -.It 0x8086 Ta 0x3165 Ta any Ta 0x8110 Ta iwlwifi-7265D- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x9010 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3168 -.It 0x8086 Ta 0x24fb Ta any Ta 0x2010 Ta iwlwifi-3168- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x9012 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3168 -.It 0x8086 Ta 0x24fb Ta any Ta 0x2110 Ta iwlwifi-3168- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x900a Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3168 -.It 0x8086 Ta 0x24fb Ta any Ta 0x2050 Ta iwlwifi-3168- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x9110 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3168 -.It 0x8086 Ta 0x24fb Ta any Ta 0x2150 Ta iwlwifi-3168- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x9112 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 3168 -.It 0x8086 Ta 0x24fb Ta any Ta 000000 Ta iwlwifi-3168- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095b Ta any Ta 0x9210 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5010 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095b Ta any Ta 0x9200 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5110 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x9510 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5100 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095b Ta any Ta 0x9310 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x5310 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x9410 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Wireless N 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x5302 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless N 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x5020 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x5210 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless N 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x502a Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5c10 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless N 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x5420 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5012 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x5090 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5412 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x5190 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5410 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x5590 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5510 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095b Ta any Ta 0x5290 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5400 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x5490 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x1010 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x5f10 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless N 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5000 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095b Ta any Ta 0x5212 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless N 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x500a Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095b Ta any Ta 0x520a Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Dual Band Wireless N 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x5200 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x9000 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Wireless N 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5002 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x9400 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Wireless N 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5102 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 7265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x095a Ta any Ta 0x9e10 Ta 7000 Ta iwlwifi-7265 .It "" -.It Intel(R) Wireless N 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x5202 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0010 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x9010 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x1010 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x9012 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x10b0 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x900a Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0130 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x9110 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x1130 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x9112 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0132 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x9210 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x1132 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x9200 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0110 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x9510 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x01f0 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x9310 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0012 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x9410 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x1012 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless N 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5020 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x1110 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless N 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x502a Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0050 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless N 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5420 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0250 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5090 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x1050 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5190 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0150 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5590 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x1150 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x5290 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f4 Ta any Ta 0x0030 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5490 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f4 Ta any Ta 0x1030 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x5f10 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0xc010 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x5212 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0xc110 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095b Ta any Ta 0x520a Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0xd010 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x9000 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0xc050 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x9400 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0xd050 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 7265 -.It 0x8086 Ta 0x095a Ta any Ta 0x9e10 Ta iwlwifi-7265- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0xd0b0 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0010 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0xb0b0 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x1010 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x8010 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x10b0 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x8110 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0130 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x9010 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x1130 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x9110 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0132 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f4 Ta any Ta 0x8030 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x1132 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f4 Ta any Ta 0x9030 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0110 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f4 Ta any Ta 0xc030 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x01f0 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f4 Ta any Ta 0xd030 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0012 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x8130 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x1012 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x9130 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x1110 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x8132 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0050 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x9132 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0250 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x8050 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x1050 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x8150 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0150 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x9050 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x1150 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x9150 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f4 Ta any Ta 0x0030 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless N 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0004 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f4 Ta any Ta 0x1030 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless N 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0044 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0xc010 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 4165 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f5 Ta any Ta 0x0010 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0xc110 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 4165 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f6 Ta any Ta 0x0030 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0xd010 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0810 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0xc050 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0910 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0xd050 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0850 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0xd0b0 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0950 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0xb0b0 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x0930 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x8010 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 000000 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x8110 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24f3 Ta any Ta 0x4010 Ta 8000 Ta iwlwifi-8000C .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x9010 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x0010 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x9110 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x0110 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f4 Ta any Ta 0x8030 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x1110 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f4 Ta any Ta 0x9030 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x1130 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f4 Ta any Ta 0xc030 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x0130 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f4 Ta any Ta 0xd030 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x1010 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x8130 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x10d0 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x9130 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x0050 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x8132 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x0150 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x9132 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x9010 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x8050 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x8110 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x8150 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x8050 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x9050 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x8010 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x9150 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x0810 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless N 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0004 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x9110 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless N 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0044 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x8130 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 4165 -.It 0x8086 Ta 0x24f5 Ta any Ta 0x0010 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x0910 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 4165 -.It 0x8086 Ta 0x24f6 Ta any Ta 0x0030 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x0930 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0810 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x0950 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0910 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x0850 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0850 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x1014 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0950 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8275 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x3e02 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x0930 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8275 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x3e01 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24f3 Ta any Ta 000000 Ta iwlwifi-8265- +.It Intel(R) Dual Band Wireless AC 8275 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x1012 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8260 -.It 0x8086 Ta 0x24f3 Ta any Ta 0x4010 Ta iwlwifi-8000C- +.It Intel(R) Dual Band Wireless AC 8275 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x0012 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0010 Ta iwlwifi-8265- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x0014 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0110 Ta iwlwifi-8265- +.It Intel(R) Dual Band Wireless AC 8265 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x24fd Ta any Ta 0x9074 Ta 8000 Ta iwlwifi-8265 .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x1110 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2526 Ta any Ta any Ta 9000 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x1130 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x271b Ta any Ta any Ta 9000 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0130 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x271c Ta any Ta any Ta 9000 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x1010 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x30dc Ta any Ta any Ta 9000 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x10d0 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x31dc Ta any Ta any Ta 9000 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0050 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x9df0 Ta any Ta any Ta 9000 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0150 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa370 Ta any Ta any Ta 9000 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x9010 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x02f0 Ta any Ta any Ta 22000 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x8110 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x06f0 Ta any Ta any Ta 22000 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x8050 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x34f0 Ta any Ta any Ta 22000 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x8010 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3df0 Ta any Ta any Ta 22000 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0810 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x4df0 Ta any Ta any Ta 22000 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x9110 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x43f0 Ta any Ta any Ta 22000 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x8130 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa0f0 Ta any Ta any Ta 22000 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0910 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2723 Ta any Ta any Ta 22000 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0930 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2725 Ta any Ta any Ta AX210 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0950 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7a70 Ta any Ta any Ta AX210 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0850 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7af0 Ta any Ta any Ta AX210 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x1014 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x51f0 Ta any Ta any Ta AX210 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8275 -.It 0x8086 Ta 0x24fd Ta any Ta 0x3e02 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x51f1 Ta any Ta any Ta AX210 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8275 -.It 0x8086 Ta 0x24fd Ta any Ta 0x3e01 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x54f0 Ta any Ta any Ta AX210 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8275 -.It 0x8086 Ta 0x24fd Ta any Ta 0x1012 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7f70 Ta any Ta any Ta AX210 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8275 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0012 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2729 Ta any Ta any Ta AX210 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x0014 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7e40 Ta any Ta any Ta AX210 Ta (unknown) .It "" -.It Intel(R) Dual Band Wireless AC 8265 -.It 0x8086 Ta 0x24fd Ta any Ta 0x9074 Ta iwlwifi-8265- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2727 Ta any Ta any Ta BZ Ta (unknown) .It "" -.It Killer (R) Wireless-AC 1550 Wireless Network Adapter (9260NGW) 160MHz -.It 0x8086 Ta 0x2526 Ta any Ta 0x1550 Ta iwlwifi-9260-th-b0-jf-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x272d Ta any Ta any Ta BZ Ta (unknown) .It "" -.It Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW) -.It 0x8086 Ta 0x2526 Ta any Ta 0x1551 Ta iwlwifi-9000-pu-b0-jf-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x272b Ta any Ta any Ta BZ Ta (unknown) .It "" -.It Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) -.It 0x8086 Ta 0x2526 Ta any Ta 0x1552 Ta iwlwifi-9000-pu-b0-jf-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 000000 Ta BZ Ta (unknown) .It "" -.It Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW) -.It 0x8086 Ta 0x30dc Ta any Ta 0x1551 Ta iwlwifi-9000-pu-b0-jf-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x0090 Ta BZ Ta (unknown) .It "" -.It Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) -.It 0x8086 Ta 0x30dc Ta any Ta 0x1552 Ta iwlwifi-9000-pu-b0-jf-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x0094 Ta BZ Ta (unknown) .It "" -.It Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW) -.It 0x8086 Ta 0x31dc Ta any Ta 0x1551 Ta iwlwifi-9000-pu-b0-jf-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x0098 Ta BZ Ta (unknown) .It "" -.It Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) -.It 0x8086 Ta 0x31dc Ta any Ta 0x1552 Ta iwlwifi-9000-pu-b0-jf-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x009c Ta BZ Ta (unknown) .It "" -.It Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW) -.It 0x8086 Ta 0xa370 Ta any Ta 0x1551 Ta iwlwifi-9000-pu-b0-jf-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x00c0 Ta BZ Ta (unknown) .It "" -.It Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) -.It 0x8086 Ta 0xa370 Ta any Ta 0x1552 Ta iwlwifi-9000-pu-b0-jf-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x00c4 Ta BZ Ta (unknown) .It "" -.It Killer(R) Wireless-AC 1550s Wireless Network Adapter (9560D2W) 160MHz -.It 0x8086 Ta 0x54f0 Ta any Ta 0x1551 Ta iwlwifi-9000-pu-b0-jf-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x00e0 Ta BZ Ta (unknown) .It "" -.It Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) -.It 0x8086 Ta 0x54f0 Ta any Ta 0x1552 Ta iwlwifi-9000-pu-b0-jf-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x00e4 Ta BZ Ta (unknown) .It "" -.It Killer(R) Wireless-AC 1550s Wireless Network Adapter (9560D2W) 160MHz -.It 0x8086 Ta 0x51f0 Ta any Ta 0x1552 Ta iwlwifi-9000-pu-b0-jf-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x00e8 Ta BZ Ta (unknown) .It "" -.It Killer(R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) 160MHz -.It 0x8086 Ta 0x51f0 Ta any Ta 0x1551 Ta iwlwifi-9000-pu-b0-jf-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x00ec Ta BZ Ta (unknown) .It "" -.It Killer(R) Wi-Fi 6E AX1690s 160MHz Wireless Network Adapter (411D2W) -.It 0x8086 Ta 0x51f0 Ta any Ta 0x1691 Ta iwlwifi-so-a0-gf4-a0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x0100 Ta BZ Ta (unknown) .It "" -.It Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW) -.It 0x8086 Ta 0x51f0 Ta any Ta 0x1692 Ta iwlwifi-so-a0-gf4-a0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x0110 Ta BZ Ta (unknown) .It "" -.It Killer(R) Wi-Fi 6E AX1690s 160MHz Wireless Network Adapter (411D2W) -.It 0x8086 Ta 0x54f0 Ta any Ta 0x1691 Ta iwlwifi-so-a0-gf4-a0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x0114 Ta BZ Ta (unknown) .It "" -.It Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW) -.It 0x8086 Ta 0x54f0 Ta any Ta 0x1692 Ta iwlwifi-so-a0-gf4-a0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x0118 Ta BZ Ta (unknown) .It "" -.It Killer(R) Wi-Fi 6E AX1690s 160MHz Wireless Network Adapter (411D2W) -.It 0x8086 Ta 0x7a70 Ta any Ta 0x1691 Ta iwlwifi-so-a0-gf4-a0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x011c Ta BZ Ta (unknown) .It "" -.It Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW) -.It 0x8086 Ta 0x7a70 Ta any Ta 0x1692 Ta iwlwifi-so-a0-gf4-a0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x0310 Ta BZ Ta (unknown) .It "" -.It Intel(R) Wireless-AC 9260-1 -.It 0x8086 Ta 0x271c Ta any Ta 0x0214 Ta iwlwifi-9260-th-b0-jf-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x0314 Ta BZ Ta (unknown) .It "" -.It Killer(R) Wi-Fi 6E AX1690s 160MHz Wireless Network Adapter (411D2W) -.It 0x8086 Ta 0x7e40 Ta any Ta 0x1691 Ta iwlwifi-ma-a0-gf4-a0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x0510 Ta BZ Ta (unknown) .It "" -.It Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW) -.It 0x8086 Ta 0x7e40 Ta any Ta 0x1692 Ta iwlwifi-ma-a0-gf4-a0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x0a10 Ta BZ Ta (unknown) .It "" -.It Intel(R) Wi-Fi 6 AX200 160MHz -.It 0x8086 Ta 0x2723 Ta any Ta any Ta iwlwifi-cc-a0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x1671 Ta BZ Ta (unknown) .It "" -.It Killer(R) Wi-Fi 6 AX1650w 160MHz Wireless Network Adapter (200D2W) -.It 0x8086 Ta 0x2723 Ta any Ta 0x1653 Ta iwlwifi-cc-a0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x1672 Ta BZ Ta (unknown) .It "" -.It Killer(R) Wi-Fi 6 AX1650x 160MHz Wireless Network Adapter (200NGW) -.It 0x8086 Ta 0x2723 Ta any Ta 0x1654 Ta iwlwifi-cc-a0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x1771 Ta BZ Ta (unknown) .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x43f0 Ta any Ta 0x0070 Ta iwlwifi-Qu-b0-hr-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x1772 Ta BZ Ta (unknown) .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x43f0 Ta any Ta 0x0074 Ta iwlwifi-Qu-b0-hr-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x1791 Ta BZ Ta (unknown) .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x43f0 Ta any Ta 0x0078 Ta iwlwifi-Qu-b0-hr-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x1792 Ta BZ Ta (unknown) .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x43f0 Ta any Ta 0x007c Ta iwlwifi-Qu-b0-hr-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x4090 Ta BZ Ta (unknown) .It "" -.It Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W) -.It 0x8086 Ta 0x43f0 Ta any Ta 0x1651 Ta iwlwifi-Qu-b0-hr-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x40c4 Ta BZ Ta (unknown) .It "" -.It Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW) -.It 0x8086 Ta 0x43f0 Ta any Ta 0x1652 Ta iwlwifi-Qu-b0-hr-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x40e0 Ta BZ Ta (unknown) .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x43f0 Ta any Ta 0x2074 Ta iwlwifi-Qu-b0-hr-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x4110 Ta BZ Ta (unknown) .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x43f0 Ta any Ta 0x4070 Ta iwlwifi-Qu-b0-hr-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa840 Ta any Ta 0x4314 Ta BZ Ta (unknown) .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0xa0f0 Ta any Ta 0x0070 Ta iwlwifi-Qu-b0-hr-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7740 Ta any Ta any Ta BZ Ta (unknown) .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0xa0f0 Ta any Ta 0x0074 Ta iwlwifi-Qu-b0-hr-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x4d40 Ta any Ta any Ta BZ Ta (unknown) .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0xa0f0 Ta any Ta 0x0078 Ta iwlwifi-Qu-b0-hr-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xe440 Ta any Ta any Ta SC Ta (unknown) .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0xa0f0 Ta any Ta 0x007c Ta iwlwifi-Qu-b0-hr-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xe340 Ta any Ta any Ta SC Ta (unknown) .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0xa0f0 Ta any Ta 0x0a10 Ta iwlwifi-Qu-b0-hr-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xd340 Ta any Ta any Ta SC Ta (unknown) .It "" -.It Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201NGW) -.It 0x8086 Ta 0xa0f0 Ta any Ta 0x1651 Ta iwlwifi-Qu-b0-hr-b0- +.It (unknown) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x6e70 Ta any Ta any Ta SC Ta (unknown) .It "" -.It Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201D2W) -.It 0x8086 Ta 0xa0f0 Ta any Ta 0x1652 Ta iwlwifi-Qu-b0-hr-b0- +.It Killer (R) Wireless-AC 1550 Wireless Network Adapter (9260NGW) 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2526 Ta any Ta 0x1550 Ta iwlwifi Ta iwlwifi-9260-th-b0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0xa0f0 Ta any Ta 0x2074 Ta iwlwifi-Qu-b0-hr-b0- +.It Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2526 Ta any Ta 0x1551 Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0xa0f0 Ta any Ta 0x4070 Ta iwlwifi-Qu-b0-hr-b0- +.It Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2526 Ta any Ta 0x1552 Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0xa0f0 Ta any Ta 0x6074 Ta iwlwifi-Qu-b0-hr-b0- +.It Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x30dc Ta any Ta 0x1551 Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x02f0 Ta any Ta 0x0070 Ta iwlwifi-QuZ-a0-hr-b0- +.It Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x30dc Ta any Ta 0x1552 Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x02f0 Ta any Ta 0x0074 Ta iwlwifi-QuZ-a0-hr-b0- +.It Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x31dc Ta any Ta 0x1551 Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x02f0 Ta any Ta 0x6074 Ta iwlwifi-QuZ-a0-hr-b0- +.It Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x31dc Ta any Ta 0x1552 Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x02f0 Ta any Ta 0x0078 Ta iwlwifi-QuZ-a0-hr-b0- +.It Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa370 Ta any Ta 0x1551 Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x02f0 Ta any Ta 0x007c Ta iwlwifi-QuZ-a0-hr-b0- +.It Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa370 Ta any Ta 0x1552 Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x02f0 Ta any Ta 0x0310 Ta iwlwifi-QuZ-a0-hr-b0- +.It Killer(R) Wireless-AC 1550s Wireless Network Adapter (9560D2W) 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x54f0 Ta any Ta 0x1551 Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W) -.It 0x8086 Ta 0x02f0 Ta any Ta 0x1651 Ta iwlwifi-QuZ-a0-hr-b0- +.It Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x54f0 Ta any Ta 0x1552 Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW) -.It 0x8086 Ta 0x02f0 Ta any Ta 0x1652 Ta iwlwifi-QuZ-a0-hr-b0- +.It Killer(R) Wireless-AC 1550s Wireless Network Adapter (9560D2W) 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x51f0 Ta any Ta 0x1552 Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x02f0 Ta any Ta 0x2074 Ta iwlwifi-QuZ-a0-hr-b0- +.It Killer(R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x51f0 Ta any Ta 0x1551 Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x02f0 Ta any Ta 0x4070 Ta iwlwifi-QuZ-a0-hr-b0- +.It Killer(R) Wi-Fi 6E AX1690s 160MHz Wireless Network Adapter (411D2W) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x51f0 Ta any Ta 0x1691 Ta AX210 Ta iwlwifi-so-a0-gf4-a0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x06f0 Ta any Ta 0x0070 Ta iwlwifi-QuZ-a0-hr-b0- +.It Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x51f0 Ta any Ta 0x1692 Ta AX210 Ta iwlwifi-so-a0-gf4-a0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x06f0 Ta any Ta 0x0074 Ta iwlwifi-QuZ-a0-hr-b0- +.It Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x51f1 Ta any Ta 0x1692 Ta AX210 Ta iwlwifi-so-a0-gf4-a0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x06f0 Ta any Ta 0x0078 Ta iwlwifi-QuZ-a0-hr-b0- +.It Killer(R) Wi-Fi 6E AX1690s 160MHz Wireless Network Adapter (411D2W) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x54f0 Ta any Ta 0x1691 Ta AX210 Ta iwlwifi-so-a0-gf4-a0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x06f0 Ta any Ta 0x007c Ta iwlwifi-QuZ-a0-hr-b0- +.It Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x54f0 Ta any Ta 0x1692 Ta AX210 Ta iwlwifi-so-a0-gf4-a0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x06f0 Ta any Ta 0x0310 Ta iwlwifi-QuZ-a0-hr-b0- +.It Killer(R) Wi-Fi 6E AX1690s 160MHz Wireless Network Adapter (411D2W) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7a70 Ta any Ta 0x1691 Ta AX210 Ta iwlwifi-so-a0-gf4-a0 .It "" -.It Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W) -.It 0x8086 Ta 0x06f0 Ta any Ta 0x1651 Ta iwlwifi-QuZ-a0-hr-b0- +.It Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7a70 Ta any Ta 0x1692 Ta AX210 Ta iwlwifi-so-a0-gf4-a0 .It "" -.It Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW) -.It 0x8086 Ta 0x06f0 Ta any Ta 0x1652 Ta iwlwifi-QuZ-a0-hr-b0- +.It Killer(R) Wi-Fi 6E AX1690s 160MHz Wireless Network Adapter (411D2W) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7af0 Ta any Ta 0x1691 Ta AX210 Ta iwlwifi-so-a0-gf4-a0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x06f0 Ta any Ta 0x2074 Ta iwlwifi-QuZ-a0-hr-b0- +.It Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7af0 Ta any Ta 0x1692 Ta AX210 Ta iwlwifi-so-a0-gf4-a0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x06f0 Ta any Ta 0x4070 Ta iwlwifi-QuZ-a0-hr-b0- +.It Intel(R) Wireless-AC 9260-1 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x271c Ta any Ta 0x0214 Ta iwlwifi Ta iwlwifi-9260-th-b0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x34f0 Ta any Ta 0x0070 Ta iwlwifi-Qu-b0-hr-b0- +.It Killer(R) Wi-Fi 6E AX1690s 160MHz Wireless Network Adapter (411D2W) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7e40 Ta any Ta 0x1691 Ta AX210 Ta (null) .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x34f0 Ta any Ta 0x0074 Ta iwlwifi-Qu-b0-hr-b0- +.It Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7e40 Ta any Ta 0x1692 Ta AX210 Ta (null) .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x34f0 Ta any Ta 0x0078 Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX200 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2723 Ta any Ta any Ta 22000 Ta iwlwifi-cc-a0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x34f0 Ta any Ta 0x007c Ta iwlwifi-Qu-b0-hr-b0- +.It Killer(R) Wi-Fi 6 AX1650w 160MHz Wireless Network Adapter (200D2W) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2723 Ta any Ta 0x1653 Ta 22000 Ta iwlwifi-cc-a0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x34f0 Ta any Ta 0x0310 Ta iwlwifi-Qu-b0-hr-b0- +.It Killer(R) Wi-Fi 6 AX1650x 160MHz Wireless Network Adapter (200NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2723 Ta any Ta 0x1654 Ta 22000 Ta iwlwifi-cc-a0 .It "" -.It Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201NGW) -.It 0x8086 Ta 0x34f0 Ta any Ta 0x1651 Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x43f0 Ta any Ta 0x0070 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201D2W) -.It 0x8086 Ta 0x34f0 Ta any Ta 0x1652 Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x43f0 Ta any Ta 0x0074 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x34f0 Ta any Ta 0x2074 Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x43f0 Ta any Ta 0x0078 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x34f0 Ta any Ta 0x4070 Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x43f0 Ta any Ta 0x007c Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x3df0 Ta any Ta 0x0070 Ta iwlwifi-Qu-b0-hr-b0- +.It Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x43f0 Ta any Ta 0x1651 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x3df0 Ta any Ta 0x0074 Ta iwlwifi-Qu-b0-hr-b0- +.It Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x43f0 Ta any Ta 0x1652 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x3df0 Ta any Ta 0x0078 Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x43f0 Ta any Ta 0x2074 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x3df0 Ta any Ta 0x007c Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x43f0 Ta any Ta 0x4070 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x3df0 Ta any Ta 0x0310 Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa0f0 Ta any Ta 0x0070 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201NGW) -.It 0x8086 Ta 0x3df0 Ta any Ta 0x1651 Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa0f0 Ta any Ta 0x0074 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201D2W) -.It 0x8086 Ta 0x3df0 Ta any Ta 0x1652 Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa0f0 Ta any Ta 0x0078 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x3df0 Ta any Ta 0x2074 Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa0f0 Ta any Ta 0x007c Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x3df0 Ta any Ta 0x4070 Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa0f0 Ta any Ta 0x0a10 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x4df0 Ta any Ta 0x0070 Ta iwlwifi-Qu-b0-hr-b0- +.It Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa0f0 Ta any Ta 0x1651 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x4df0 Ta any Ta 0x0074 Ta iwlwifi-Qu-b0-hr-b0- +.It Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201D2W) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa0f0 Ta any Ta 0x1652 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x4df0 Ta any Ta 0x0078 Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa0f0 Ta any Ta 0x2074 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x4df0 Ta any Ta 0x007c Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa0f0 Ta any Ta 0x4070 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x4df0 Ta any Ta 0x0310 Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0xa0f0 Ta any Ta 0x6074 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201NGW) -.It 0x8086 Ta 0x4df0 Ta any Ta 0x1651 Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x02f0 Ta any Ta 0x0070 Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201D2W) -.It 0x8086 Ta 0x4df0 Ta any Ta 0x1652 Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x02f0 Ta any Ta 0x0074 Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x4df0 Ta any Ta 0x2074 Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x02f0 Ta any Ta 0x6074 Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x4df0 Ta any Ta 0x4070 Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x02f0 Ta any Ta 0x0078 Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta 0x4df0 Ta any Ta 0x6074 Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x02f0 Ta any Ta 0x007c Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX211 160MHz -.It 0x8086 Ta 0x2725 Ta any Ta 0x0090 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x02f0 Ta any Ta 0x0310 Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX210 160MHz -.It 0x8086 Ta 0x2725 Ta any Ta 0x0020 Ta iwlwifi-ty-a0-gf-a0- +.It Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x02f0 Ta any Ta 0x1651 Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX210 160MHz -.It 0x8086 Ta 0x2725 Ta any Ta 0x2020 Ta iwlwifi-ty-a0-gf-a0- +.It Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x02f0 Ta any Ta 0x1652 Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX210 160MHz -.It 0x8086 Ta 0x2725 Ta any Ta 0x0024 Ta iwlwifi-ty-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x02f0 Ta any Ta 0x2074 Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX210 160MHz -.It 0x8086 Ta 0x2725 Ta any Ta 0x0310 Ta iwlwifi-ty-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x02f0 Ta any Ta 0x4070 Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX210 160MHz -.It 0x8086 Ta 0x2725 Ta any Ta 0x0510 Ta iwlwifi-ty-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x06f0 Ta any Ta 0x0070 Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX210 160MHz -.It 0x8086 Ta 0x2725 Ta any Ta 0x0a10 Ta iwlwifi-ty-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x06f0 Ta any Ta 0x0074 Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX210 160MHz -.It 0x8086 Ta 0x2725 Ta any Ta 0xe020 Ta iwlwifi-ty-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x06f0 Ta any Ta 0x0078 Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX210 160MHz -.It 0x8086 Ta 0x2725 Ta any Ta 0xe024 Ta iwlwifi-ty-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x06f0 Ta any Ta 0x007c Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX210 160MHz -.It 0x8086 Ta 0x2725 Ta any Ta 0x4020 Ta iwlwifi-ty-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x06f0 Ta any Ta 0x0310 Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX210 160MHz -.It 0x8086 Ta 0x2725 Ta any Ta 0x6020 Ta iwlwifi-ty-a0-gf-a0- +.It Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x06f0 Ta any Ta 0x1651 Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX210 160MHz -.It 0x8086 Ta 0x2725 Ta any Ta 0x6024 Ta iwlwifi-ty-a0-gf-a0- +.It Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x06f0 Ta any Ta 0x1652 Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Killer(R) Wi-Fi 6E AX1675w 160MHz Wireless Network Adapter (210D2W) -.It 0x8086 Ta 0x2725 Ta any Ta 0x1673 Ta iwlwifi-ty-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x06f0 Ta any Ta 0x2074 Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Killer(R) Wi-Fi 6E AX1675x 160MHz Wireless Network Adapter (210NGW) -.It 0x8086 Ta 0x2725 Ta any Ta 0x1674 Ta iwlwifi-ty-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x06f0 Ta any Ta 0x4070 Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX211 160MHz -.It 0x8086 Ta 0x7a70 Ta any Ta 0x0090 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x34f0 Ta any Ta 0x0070 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX211 160MHz -.It 0x8086 Ta 0x7a70 Ta any Ta 0x0098 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x34f0 Ta any Ta 0x0074 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX411 160MHz -.It 0x8086 Ta 0x7a70 Ta any Ta 0x00b0 Ta iwlwifi-so-a0-gf4-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x34f0 Ta any Ta 0x0078 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX211 160MHz -.It 0x8086 Ta 0x7a70 Ta any Ta 0x0310 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x34f0 Ta any Ta 0x007c Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX211 160MHz -.It 0x8086 Ta 0x7a70 Ta any Ta 0x0510 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x34f0 Ta any Ta 0x0310 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX211 160MHz -.It 0x8086 Ta 0x7a70 Ta any Ta 0x0a10 Ta iwlwifi-so-a0-gf-a0- +.It Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x34f0 Ta any Ta 0x1651 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX211 160MHz -.It 0x8086 Ta 0x7af0 Ta any Ta 0x0090 Ta iwlwifi-so-a0-gf-a0- +.It Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201D2W) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x34f0 Ta any Ta 0x1652 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX211 160MHz -.It 0x8086 Ta 0x7af0 Ta any Ta 0x0098 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x34f0 Ta any Ta 0x2074 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX411 160MHz -.It 0x8086 Ta 0x7af0 Ta any Ta 0x00b0 Ta iwlwifi-so-a0-gf4-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x34f0 Ta any Ta 0x4070 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX211 160MHz -.It 0x8086 Ta 0x7af0 Ta any Ta 0x0310 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3df0 Ta any Ta 0x0070 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX211 160MHz -.It 0x8086 Ta 0x7af0 Ta any Ta 0x0510 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3df0 Ta any Ta 0x0074 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX211 160MHz -.It 0x8086 Ta 0x7af0 Ta any Ta 0x0a10 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3df0 Ta any Ta 0x0078 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Killer(R) Wireless-AC 1550s Wireless Network Adapter (9560D2W) 160MHz -.It 0x8086 Ta 0x7a70 Ta any Ta 0x1551 Ta iwlwifi-9000-pu-b0-jf-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3df0 Ta any Ta 0x007c Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Killer(R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) 160MHz -.It 0x8086 Ta 0x7a70 Ta any Ta 0x1552 Ta iwlwifi-9000-pu-b0-jf-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3df0 Ta any Ta 0x0310 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Killer(R) Wireless-AC 1550s Wireless Network Adapter (9560D2W) 160MHz -.It 0x8086 Ta 0x7af0 Ta any Ta 0x1551 Ta iwlwifi-9000-pu-b0-jf-b0- +.It Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3df0 Ta any Ta 0x1651 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Killer(R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) 160MHz -.It 0x8086 Ta 0x7af0 Ta any Ta 0x1552 Ta iwlwifi-9000-pu-b0-jf-b0- +.It Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201D2W) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3df0 Ta any Ta 0x1652 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX411 160MHz -.It 0x8086 Ta 0x2725 Ta any Ta 0x00b0 Ta iwlwifi-SoSnj-a0-gf4-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3df0 Ta any Ta 0x2074 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX211 160MHz -.It 0x8086 Ta 0x2726 Ta any Ta 0x0090 Ta iwlwifi-SoSnj-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x3df0 Ta any Ta 0x4070 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX211 160MHz -.It 0x8086 Ta 0x2726 Ta any Ta 0x0098 Ta iwlwifi-SoSnj-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x4df0 Ta any Ta 0x0070 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX411 160MHz -.It 0x8086 Ta 0x2726 Ta any Ta 0x00b0 Ta iwlwifi-SoSnj-a0-gf4-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x4df0 Ta any Ta 0x0074 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX411 160MHz -.It 0x8086 Ta 0x2726 Ta any Ta 0x00b4 Ta iwlwifi-SoSnj-a0-gf4-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x4df0 Ta any Ta 0x0078 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX211 160MHz -.It 0x8086 Ta 0x2726 Ta any Ta 0x0510 Ta iwlwifi-SoSnj-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x4df0 Ta any Ta 0x007c Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W) -.It 0x8086 Ta 0x2726 Ta any Ta 0x1651 Ta iwlwifi-SoSnj-a0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x4df0 Ta any Ta 0x0310 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW) -.It 0x8086 Ta 0x2726 Ta any Ta 0x1652 Ta iwlwifi-SoSnj-a0-hr-b0- +.It Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x4df0 Ta any Ta 0x1651 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Killer(R) Wi-Fi 6E AX1690s 160MHz Wireless Network Adapter (411D2W) -.It 0x8086 Ta 0x2726 Ta any Ta 0x1691 Ta iwlwifi-SoSnj-a0-gf4-a0- +.It Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201D2W) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x4df0 Ta any Ta 0x1652 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW) -.It 0x8086 Ta 0x2726 Ta any Ta 0x1692 Ta iwlwifi-SoSnj-a0-gf4-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x4df0 Ta any Ta 0x2074 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Killer(R) Wi-Fi 6E AX1690s 160MHz Wireless Network Adapter (411D2W) -.It 0x8086 Ta 0x7f70 Ta any Ta 0x1691 Ta iwlwifi-so-a0-gf4-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x4df0 Ta any Ta 0x4070 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW) -.It 0x8086 Ta 0x7f70 Ta any Ta 0x1692 Ta iwlwifi-so-a0-gf4-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x4df0 Ta any Ta 0x6074 Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW) -.It 0x8086 Ta 0x2726 Ta any Ta 0x1671 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6E AX211 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2725 Ta any Ta 0x0090 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW) -.It 0x8086 Ta 0x2726 Ta any Ta 0x1672 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX210 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2725 Ta any Ta 0x0020 Ta AX210 Ta iwlwifi-ty-a0-gf-a0 .It "" -.It Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW) -.It 0x8086 Ta 0x51f0 Ta any Ta 0x1671 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX210 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2725 Ta any Ta 0x2020 Ta AX210 Ta iwlwifi-ty-a0-gf-a0 .It "" -.It Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW) -.It 0x8086 Ta 0x51f0 Ta any Ta 0x1672 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX210 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2725 Ta any Ta 0x0024 Ta AX210 Ta iwlwifi-ty-a0-gf-a0 .It "" -.It Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW) -.It 0x8086 Ta 0x54f0 Ta any Ta 0x1671 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX210 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2725 Ta any Ta 0x0310 Ta AX210 Ta iwlwifi-ty-a0-gf-a0 .It "" -.It Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW) -.It 0x8086 Ta 0x54f0 Ta any Ta 0x1672 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX210 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2725 Ta any Ta 0x0510 Ta AX210 Ta iwlwifi-ty-a0-gf-a0 .It "" -.It Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW) -.It 0x8086 Ta 0x7a70 Ta any Ta 0x1671 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX210 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2725 Ta any Ta 0x0a10 Ta AX210 Ta iwlwifi-ty-a0-gf-a0 .It "" -.It Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW) -.It 0x8086 Ta 0x7a70 Ta any Ta 0x1672 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX210 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2725 Ta any Ta 0xe020 Ta AX210 Ta iwlwifi-ty-a0-gf-a0 .It "" -.It Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW) -.It 0x8086 Ta 0x7af0 Ta any Ta 0x1671 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX210 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2725 Ta any Ta 0xe024 Ta AX210 Ta iwlwifi-ty-a0-gf-a0 .It "" -.It Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW) -.It 0x8086 Ta 0x7af0 Ta any Ta 0x1672 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX210 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2725 Ta any Ta 0x4020 Ta AX210 Ta iwlwifi-ty-a0-gf-a0 .It "" -.It Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW) -.It 0x8086 Ta 0x7f70 Ta any Ta 0x1671 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX210 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2725 Ta any Ta 0x6020 Ta AX210 Ta iwlwifi-ty-a0-gf-a0 .It "" -.It Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW) -.It 0x8086 Ta 0x7f70 Ta any Ta 0x1672 Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX210 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2725 Ta any Ta 0x6024 Ta AX210 Ta iwlwifi-ty-a0-gf-a0 .It "" -.It Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW) -.It 0x8086 Ta 0x7e40 Ta any Ta 0x1671 Ta iwlwifi-ma-a0-gf-a0- +.It Killer(R) Wi-Fi 6E AX1675w 160MHz Wireless Network Adapter (210D2W) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2725 Ta any Ta 0x1673 Ta AX210 Ta iwlwifi-ty-a0-gf-a0 .It "" -.It Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW) -.It 0x8086 Ta 0x7e40 Ta any Ta 0x1672 Ta iwlwifi-ma-a0-gf-a0- +.It Killer(R) Wi-Fi 6E AX1675x 160MHz Wireless Network Adapter (210NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2725 Ta any Ta 0x1674 Ta AX210 Ta iwlwifi-ty-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9461 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-9000-pu-b0-jf-b0- +.It Intel(R) Wi-Fi 6E AX211 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7a70 Ta any Ta 0x0090 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9461 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-9000-pu-b0-jf-b0- +.It Intel(R) Wi-Fi 6E AX211 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7a70 Ta any Ta 0x0098 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9462 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-9000-pu-b0-jf-b0- +.It Intel(R) Wi-Fi 6E AX411 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7a70 Ta any Ta 0x00b0 Ta AX210 Ta iwlwifi-so-a0-gf4-a0 .It "" -.It Intel(R) Wireless-AC 9462 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-9000-pu-b0-jf-b0- +.It Intel(R) Wi-Fi 6E AX211 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7a70 Ta any Ta 0x0310 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9560 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-9000-pu-b0-jf-b0- +.It Intel(R) Wi-Fi 6E AX211 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7a70 Ta any Ta 0x0510 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9560 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-9000-pu-b0-jf-b0- +.It Intel(R) Wi-Fi 6E AX211 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7a70 Ta any Ta 0x0a10 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9461 160MHz -.It 0x8086 Ta 0x2526 Ta any Ta any Ta iwlwifi-9260-th-b0-jf-b0- +.It Intel(R) Wi-Fi 6E AX211 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7af0 Ta any Ta 0x0090 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9461 -.It 0x8086 Ta 0x2526 Ta any Ta any Ta iwlwifi-9260-th-b0-jf-b0- +.It Intel(R) Wi-Fi 6E AX211 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7af0 Ta any Ta 0x0098 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9462 160MHz -.It 0x8086 Ta 0x2526 Ta any Ta any Ta iwlwifi-9260-th-b0-jf-b0- +.It Intel(R) Wi-Fi 6E AX411 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7af0 Ta any Ta 0x00b0 Ta AX210 Ta iwlwifi-so-a0-gf4-a0 .It "" -.It Intel(R) Wireless-AC 9462 -.It 0x8086 Ta 0x2526 Ta any Ta any Ta iwlwifi-9260-th-b0-jf-b0- +.It Intel(R) Wi-Fi 6E AX211 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7af0 Ta any Ta 0x0310 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9270 160MHz -.It 0x8086 Ta 0x2526 Ta any Ta any Ta iwlwifi-9260-th-b0-jf-b0- +.It Intel(R) Wi-Fi 6E AX211 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7af0 Ta any Ta 0x0510 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9270 -.It 0x8086 Ta 0x2526 Ta any Ta any Ta iwlwifi-9260-th-b0-jf-b0- +.It Intel(R) Wi-Fi 6E AX211 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7af0 Ta any Ta 0x0a10 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9162 160MHz -.It 0x8086 Ta 0x271b Ta any Ta any Ta iwlwifi-9260-th-b0-jf-b0- +.It Killer(R) Wireless-AC 1550s Wireless Network Adapter (9560D2W) 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7a70 Ta any Ta 0x1551 Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9162 -.It 0x8086 Ta 0x271b Ta any Ta any Ta iwlwifi-9260-th-b0-jf-b0- +.It Killer(R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7a70 Ta any Ta 0x1552 Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9260 160MHz -.It 0x8086 Ta 0x2526 Ta any Ta any Ta iwlwifi-9260-th-b0-jf-b0- +.It Killer(R) Wireless-AC 1550s Wireless Network Adapter (9560D2W) 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7af0 Ta any Ta 0x1551 Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9260 -.It 0x8086 Ta 0x2526 Ta any Ta any Ta iwlwifi-9260-th-b0-jf-b0- +.It Killer(R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7af0 Ta any Ta 0x1552 Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9461 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-Qu-b0-jf-b0- +.It Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2726 Ta any Ta 0x1671 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9461 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-Qu-b0-jf-b0- +.It Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2726 Ta any Ta 0x1672 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9462 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-Qu-b0-jf-b0- +.It Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x51f0 Ta any Ta 0x1671 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9462 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-Qu-b0-jf-b0- +.It Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x51f0 Ta any Ta 0x1672 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9560 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-Qu-b0-jf-b0- +.It Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x51f1 Ta any Ta 0x1671 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9560 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-Qu-b0-jf-b0- +.It Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x51f1 Ta any Ta 0x1672 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW) -.It 0x8086 Ta any Ta any Ta 0x1551 Ta iwlwifi-Qu-b0-jf-b0- +.It Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x54f0 Ta any Ta 0x1671 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) -.It 0x8086 Ta any Ta any Ta 0x1552 Ta iwlwifi-Qu-b0-jf-b0- +.It Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x54f0 Ta any Ta 0x1672 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9461 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-Qu-c0-jf-b0- +.It Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7a70 Ta any Ta 0x1671 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9461 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-Qu-c0-jf-b0- +.It Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7a70 Ta any Ta 0x1672 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9462 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-Qu-c0-jf-b0- +.It Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7af0 Ta any Ta 0x1671 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9462 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-Qu-c0-jf-b0- +.It Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7af0 Ta any Ta 0x1672 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9560 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-Qu-c0-jf-b0- +.It Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7f70 Ta any Ta 0x1671 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) Wireless-AC 9560 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-Qu-c0-jf-b0- +.It Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7f70 Ta any Ta 0x1672 Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW) -.It 0x8086 Ta any Ta any Ta 0x1551 Ta iwlwifi-Qu-c0-jf-b0- +.It Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7e40 Ta any Ta 0x1671 Ta AX210 Ta (null) .It "" -.It Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) -.It 0x8086 Ta any Ta any Ta 0x1552 Ta iwlwifi-Qu-c0-jf-b0- +.It Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x7e40 Ta any Ta 0x1672 Ta AX210 Ta (null) .It "" -.It Intel(R) Wireless-AC 9461 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-QuZ-a0-jf-b0- +.It Intel(R) Wireless-AC 9461 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9461 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-QuZ-a0-jf-b0- +.It Intel(R) Wireless-AC 9461 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9462 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-QuZ-a0-jf-b0- +.It Intel(R) Wireless-AC 9462 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9462 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-QuZ-a0-jf-b0- +.It Intel(R) Wireless-AC 9462 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9560 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-QuZ-a0-jf-b0- +.It Intel(R) Wireless-AC 9560 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9560 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-QuZ-a0-jf-b0- +.It Intel(R) Wireless-AC 9560 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta iwlwifi Ta iwlwifi-9000-pu-b0-jf-b0 .It "" -.It Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW) -.It 0x8086 Ta any Ta any Ta 0x1551 Ta iwlwifi-QuZ-a0-jf-b0- +.It Intel(R) Wireless-AC 9270 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2526 Ta any Ta any Ta iwlwifi Ta iwlwifi-9260-th-b0-jf-b0 .It "" -.It Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) -.It 0x8086 Ta any Ta any Ta 0x1552 Ta iwlwifi-QuZ-a0-jf-b0- +.It Intel(R) Wireless-AC 9270 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2526 Ta any Ta any Ta iwlwifi Ta iwlwifi-9260-th-b0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9461 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-QuQnj-b0-jf-b0- +.It Intel(R) Wireless-AC 9162 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x271b Ta any Ta any Ta iwlwifi Ta iwlwifi-9260-th-b0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9461 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-QuQnj-b0-jf-b0- +.It Intel(R) Wireless-AC 9162 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x271b Ta any Ta any Ta iwlwifi Ta iwlwifi-9260-th-b0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9462 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-QuQnj-b0-jf-b0- +.It Intel(R) Wireless-AC 9260 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2526 Ta any Ta any Ta iwlwifi Ta iwlwifi-9260-th-b0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9462 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-QuQnj-b0-jf-b0- +.It Intel(R) Wireless-AC 9260 Ta Ta Ta Ta Ta +.It 0x8086 Ta 0x2526 Ta any Ta any Ta iwlwifi Ta iwlwifi-9260-th-b0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9560 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-QuQnj-b0-jf-b0- +.It Intel(R) Wireless-AC 9461 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-Qu-b0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9560 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-QuQnj-b0-jf-b0- +.It Intel(R) Wireless-AC 9461 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-Qu-b0-jf-b0 .It "" -.It Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW) -.It 0x8086 Ta any Ta any Ta 0x1551 Ta iwlwifi-QuQnj-b0-jf-b0- +.It Intel(R) Wireless-AC 9462 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-Qu-b0-jf-b0 .It "" -.It Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) -.It 0x8086 Ta any Ta any Ta 0x1552 Ta iwlwifi-QuQnj-b0-jf-b0- +.It Intel(R) Wireless-AC 9462 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-Qu-b0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX101 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wireless-AC 9560 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-Qu-b0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX203 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-Qu-b0-hr-b0- +.It Intel(R) Wireless-AC 9560 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-Qu-b0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX101 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-Qu-c0-hr-b0- +.It Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta 0x1551 Ta 22000 Ta iwlwifi-Qu-b0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX203 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-Qu-c0-hr-b0- +.It Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta 0x1552 Ta 22000 Ta iwlwifi-Qu-b0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-Qu-c0-hr-b0- +.It Intel(R) Wireless-AC 9461 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-Qu-c0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX101 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-QuZ-a0-hr-b0- +.It Intel(R) Wireless-AC 9461 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-Qu-c0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX203 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-QuZ-a0-hr-b0- +.It Intel(R) Wireless-AC 9462 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-Qu-c0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-QuQnj-b0-hr-b0- +.It Intel(R) Wireless-AC 9462 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-Qu-c0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9461 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-SoSnj-a0-jf-b0- +.It Intel(R) Wireless-AC 9560 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-Qu-c0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9461 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-SoSnj-a0-jf-b0- +.It Intel(R) Wireless-AC 9560 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-Qu-c0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9462 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-SoSnj-a0-jf-b0- +.It Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta 0x1551 Ta 22000 Ta iwlwifi-Qu-c0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9462 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-SoSnj-a0-jf-b0- +.It Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta 0x1552 Ta 22000 Ta iwlwifi-Qu-c0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9560 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-SoSnj-a0-jf-b0- +.It Intel(R) Wireless-AC 9461 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-QuZ-a0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9560 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-SoSnj-a0-jf-b0- +.It Intel(R) Wireless-AC 9461 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-QuZ-a0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX101 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-SoSnj-a0-hr-b0- +.It Intel(R) Wireless-AC 9462 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-QuZ-a0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-SoSnj-a0-hr-b0- +.It Intel(R) Wireless-AC 9462 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-QuZ-a0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-ma-a0-hr-b0- +.It Intel(R) Wireless-AC 9560 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-QuZ-a0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6E AX211 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-ma-a0-gf-a0- +.It Intel(R) Wireless-AC 9560 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-QuZ-a0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6E AX211 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-ma-a0-gf4-a0- +.It Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta 0x1551 Ta 22000 Ta iwlwifi-QuZ-a0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6E AX221 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-ma-a0-mr-a0- +.It Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta 0x1552 Ta 22000 Ta iwlwifi-QuZ-a0-jf-b0 .It "" -.It Intel(R) Wi-Fi 6E AX231 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-ma-a0-fm-a0- +.It Intel(R) Wi-Fi 6 AX101 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX221 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-SoSnj-a0-mr-a0- +.It Intel(R) Wi-Fi 6 AX203 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-Qu-b0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX203 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-so-a0-hr-b0- +.It Intel(R) Wi-Fi 6 AX101 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-Qu-c0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX101 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-so-a0-hr-b0- +.It Intel(R) Wi-Fi 6 AX203 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-Qu-c0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6 AX201 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-so-a0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-Qu-c0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX211 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-so-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX101 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Intel(R) Wi-Fi 6E AX411 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-so-a0-gf4-a0- +.It Intel(R) Wi-Fi 6 AX203 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Intel(R) TBD Bz device -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-bz-a0-hr-b0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta 22000 Ta iwlwifi-QuZ-a0-hr-b0 .It "" -.It Intel(R) TBD Bz device -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-bz-a0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta AX210 Ta (null) .It "" -.It Intel(R) TBD Bz device -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-bz-a0-gf4-a0- +.It Intel(R) Wi-Fi 6E AX211 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta AX210 Ta (null) .It "" -.It Intel(R) TBD Bz device -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-bz-a0-mr-a0- +.It Intel(R) Wi-Fi 6E AX231 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta AX210 Ta (null) .It "" -.It Intel(R) TBD Bz device -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-bz-a0-fm-a0- +.It Intel(R) Wi-Fi 6 AX203 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta AX210 Ta iwlwifi-so-a0-hr-b0 .It "" -.It Intel(R) TBD Bz device -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-gl-a0-fm-a0- +.It Intel(R) Wi-Fi 6 AX101 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta AX210 Ta iwlwifi-so-a0-hr-b0 .It "" -.It Intel(R) TBD Bz device -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-bz-z0-gf-a0- +.It Intel(R) Wi-Fi 6 AX201 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta AX210 Ta iwlwifi-so-a0-hr-b0 .It "" -.It Intel(R) TBD Bz device -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-BzBnj-a0-fm-a0- +.It Intel(R) Wi-Fi 6E AX211 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta AX210 Ta iwlwifi-so-a0-gf-a0 .It "" -.It Intel(R) TBD Bz device -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-BzBnj-a0-fm4-a0- +.It Intel(R) Wi-Fi 6E AX411 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta AX210 Ta iwlwifi-so-a0-gf4-a0 .It "" -.It Intel(R) TBD Bz device -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-BzBnj-a0-gf-a0- +.It Intel(R) Wireless-AC 9560 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta AX210 Ta iwlwifi-so-a0-jf-b0 .It "" -.It Intel(R) TBD Bz device -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-BzBnj-a0-gf4-a0- +.It Intel(R) Wireless-AC 9560 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta AX210 Ta iwlwifi-so-a0-jf-b0 .It "" -.It Intel(R) TBD Bz device -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-BzBnj-a0-hr-b0- +.It Intel(R) Wireless-AC 9461 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta AX210 Ta iwlwifi-so-a0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9560 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-so-a0-jf-b0- +.It Intel(R) Wireless-AC 9462 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta AX210 Ta iwlwifi-so-a0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9560 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-so-a0-jf-b0- +.It Intel(R) Wireless-AC 9461 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta AX210 Ta iwlwifi-so-a0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9461 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-so-a0-jf-b0- +.It Intel(R) Wireless-AC 9462 Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta AX210 Ta iwlwifi-so-a0-jf-b0 .It "" -.It Intel(R) Wireless-AC 9462 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-so-a0-jf-b0- +.It Intel(R) Wi-Fi 7 BE201 320MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta BZ Ta (null) .It "" -.It Intel(R) Wireless-AC 9461 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-so-a0-jf-b0- +.It Intel(R) Wi-Fi 7 BE200 320MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta BZ Ta (null) .It "" -.It Intel(R) Wireless-AC 9462 -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-so-a0-jf-b0- +.It Intel(R) Wi-Fi 7 BE202 160MHz Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta BZ Ta (null) .It "" -.It Intel(R) Wi-Fi 6 AX204 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-so-a0-mr-a0- +.It Intel(R) TBD Sc device Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta SC Ta (null) .It "" -.It Intel(R) Wi-Fi 6 AX204 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-ma-a0-mr-a0- +.It Intel(R) TBD Sc2 device Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta SC Ta (null) .It "" -.It Intel(R) Wi-Fi 6 AX204 160MHz -.It 0x8086 Ta any Ta any Ta any Ta iwlwifi-SoSnj-a0-mr-a0- -.% --------------------------------------------------------------------- +.It Intel(R) TBD Sc2f device Ta Ta Ta Ta Ta +.It 0x8086 Ta any Ta any Ta any Ta SC Ta (null) +.\" --------------------------------------------------------------------- .El .Pp -.Em Note: +.Em Note : some devices can only be determined correctly at run-time based on hardware registers (or by other special magic not replicated in the above listing). .Sh FILES A copy of the .Xr iwlwifi 4 -firmware license is installed at -.Em /usr/share/doc/legal/intel_iwlwifi_firmware.LICENCE . +firmware license is installed along with the +.Pa wifi-firmware-iwlwifi-kmod +package or the +.Pa ports/net/wifi-firmware-iwlwifi-kmod +port (or each of its flavors). .Sh SEE ALSO .Xr iwlwifi 4 , +.Xr fwget 8 , .Xr firmware 9 .Sh HISTORY The .Nm firmware modules first appeared in -.Fx 13.1 . +.Fx 13.1 +and were removed before +.Fx 14.3 +and replaced by +.Xr ports 7 +based firmware packages. diff --git a/share/man/man4/iwm.4 b/share/man/man4/iwm.4 index 2eddcbc83e2a..5249959cd3f6 100644 --- a/share/man/man4/iwm.4 +++ b/share/man/man4/iwm.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2004-2006 .\" Damien Bergamini <damien.bergamini@free.fr>. All rights reserved. .\" @@ -23,9 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd June 28, 2020 +.Dd November 10, 2024 .Dt IWM 4 .Os .Sh NAME @@ -33,8 +34,7 @@ .Nd Intel IEEE 802.11ac wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, -include the following lines in your -kernel configuration file: +include the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device iwm" .Cd "device pci" @@ -49,6 +49,7 @@ Choose one from: .Cd "device iwm3168fw" .Cd "device iwm7260fw" .Cd "device iwm7265fw" +.Cd "device iwm7265Dfw" .Cd "device iwm8000Cfw" .Cd "device iwm8265fw" .Cd "device iwm9000fw" @@ -71,6 +72,7 @@ iwm3160fw_load="YES" iwm3168fw_load="YES" iwm7260fw_load="YES" iwm7265fw_load="YES" +iwm7265Dfw_load="YES" iwm8000Cfw_load="YES" iwm8265fw_load="YES" iwm9000fw_load="YES" @@ -79,55 +81,59 @@ iwm9260fw_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It Intel Dual Band Wireless AC 3160 -.It Intel Dual Band Wireless AC 3165 -.It Intel Dual Band Wireless AC 3168 -.It Intel Dual Band Wireless AC 7260 -.It Intel Dual Band Wireless AC 7265 -.It Intel Dual Band Wireless AC 8260 -.It Intel Dual Band Wireless AC 8265 -.It Intel Dual Band Wireless AC 9260 -.It Intel Dual Band Wireless AC 9270 -.It Intel Dual Band Wireless AC 946X -.It Intel Dual Band Wireless AC 9560 -.El -.Pp -.Nm -supports +driver supports running most Intel Wireless AC series network devices in .Cm station mode operation. Only one virtual interface may be configured at any time. -For more information on configuring this device, see -.Xr ifconfig 8 . -.Pp This driver requires the firmware built with the -.Nm iwmfw +.Xr iwmfw 4 module to work. .Pp -Currently, +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The .Nm -only supports 802.11b and 802.11g modes. -It will not associate to access points that are configured to operate only -in 802.11n or 802.11ac modes. +driver supports the following PCIe Wi-Fi devices: +.Pp +.Bl -bullet -compact +.It +Intel Dual Band Wireless AC 3160 +.It +Intel Dual Band Wireless AC 3165 +.It +Intel Dual Band Wireless AC 3168 +.It +Intel Dual Band Wireless AC 7260 +.It +Intel Dual Band Wireless AC 7265 +.It +Intel Dual Band Wireless AC 8260 +.It +Intel Dual Band Wireless AC 8265 +.It +Intel Dual Band Wireless AC 9260 +.It +Intel Dual Band Wireless AC 9270 +.It +Intel Dual Band Wireless AC 946X +.It +Intel Dual Band Wireless AC 9560 +.El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev iwm0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev iwm0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev iwm0 ssid my_net up" +.Dl ifconfig wlan create wlandev iwm0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev iwm0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: @@ -155,23 +161,32 @@ Verify the .Xr iwmfw 4 firmware module is present. .It "iwm%d: could not load boot firmware" -An attempt to upload the boot firmware image to the onboard microcontroller -failed. +An attempt to upload the boot firmware image +to the onboard microcontroller failed. This should not happen. .It "iwm%d: could not load microcode" -An attempt to upload the microcode image to the onboard microcontroller failed. +An attempt to upload the microcode image +to the onboard microcontroller failed. This should not happen. .It "iwm%d: could not load main firmware" -An attempt to upload the main firmware image to the onboard microcontroller -failed. +An attempt to upload the main firmware image +to the onboard microcontroller failed. This should not happen. .El .Sh SEE ALSO +.Xr iwlwifi 4 , .Xr iwmfw 4 , .Xr pci 4 , .Xr wlan 4 , .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , +.Xr networking 7 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 +.Sh BUGS +Currently, +.Nm +only supports 802.11a/b/g modes. +It will not associate to access points that are configured to operate +only in 802.11n/ac modes. diff --git a/share/man/man4/iwmfw.4 b/share/man/man4/iwmfw.4 index 1704c735f292..7c749f379a8e 100644 --- a/share/man/man4/iwmfw.4 +++ b/share/man/man4/iwmfw.4 @@ -20,9 +20,7 @@ .\" (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 June 28, 2020 +.Dd February 4, 2023 .Dt IWMFW 4 .Os .Sh NAME @@ -46,6 +44,7 @@ of the following: .Cd "device iwm3168fw" .Cd "device iwm7260fw" .Cd "device iwm7265fw" +.Cd "device iwm7265Dfw" .Cd "device iwm8000Cfw" .Cd "device iwm8265fw" .Cd "device iwm9000fw" diff --git a/share/man/man4/iwn.4 b/share/man/man4/iwn.4 index 6e9b774bb13d..55692a5386a5 100644 --- a/share/man/man4/iwn.4 +++ b/share/man/man4/iwn.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2004-2006 .\" Damien Bergamini <damien.bergamini@free.fr>. All rights reserved. .\" @@ -23,9 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd May 30, 2021 +.Dd October 17, 2024 .Dt IWN 4 .Os .Sh NAME @@ -89,38 +90,7 @@ iwn6050fw_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It Intel Centrino Advanced-N 6200 -.It Intel Centrino Advanced-N 6205 -.It Intel Centrino Advanced-N 6230 -.It Intel Centrino Advanced-N 6235 -.It Intel Centrino Advanced-N + WiMAX 6250 -.It Intel Centrino Ultimate-N 6300 -.It Intel Centrino Wireless-N 100 -.It Intel Centrino Wireless-N 105 -.It Intel Centrino Wireless-N 130 -.It Intel Centrino Wireless-N 135 -.It Intel Centrino Wireless-N 1000 -.It Intel Centrino Wireless-N 1030 -.It Intel Centrino Wireless-N 2200 -.It Intel Centrino Wireless-N 2230 -.It Intel Centrino Wireless-N 4965 -.It Intel Centrino Wireless-N 5100 -.It Intel Centrino Wireless-N 6150 -.It Intel Centrino Wireless-N 6200 -.It Intel Centrino Wireless-N 6250 -.It Intel Centrino Wireless-N + WiMAX 6150 -.It Intel Ultimate N WiFi Link 5300 -.It Intel Wireless WiFi Link 4965 -.It Intel WiFi Link 5100 -.It Intel WiMAX/WiFi Link 5150 -.It Intel WiMAX/WiFi Link 5350 -.El -.Pp -.Nm -supports +driver supports .Cm station and .Cm monitor @@ -132,27 +102,84 @@ For more information on configuring this device, see This driver requires the firmware built with the .Nm iwnfw module to work. +.Sh HARDWARE +The +.Nm +driver provides support for: +.Pp +.Bl -bullet -compact +.It +Intel Centrino Advanced-N 6200 +.It +Intel Centrino Advanced-N 6205 +.It +Intel Centrino Advanced-N 6230 +.It +Intel Centrino Advanced-N 6235 +.It +Intel Centrino Advanced-N + WiMAX 6250 +.It +Intel Centrino Ultimate-N 6300 +.It +Intel Centrino Wireless-N 100 +.It +Intel Centrino Wireless-N 105 +.It +Intel Centrino Wireless-N 130 +.It +Intel Centrino Wireless-N 135 +.It +Intel Centrino Wireless-N 1000 +.It +Intel Centrino Wireless-N 1030 +.It +Intel Centrino Wireless-N 2200 +.It +Intel Centrino Wireless-N 2230 +.It +Intel Centrino Wireless-N 4965 +.It +Intel Centrino Wireless-N 5100 +.It +Intel Centrino Wireless-N 6150 +.It +Intel Centrino Wireless-N 6200 +.It +Intel Centrino Wireless-N 6250 +.It +Intel Centrino Wireless-N + WiMAX 6150 +.It +Intel Ultimate N WiFi Link 5300 +.It +Intel Wireless WiFi Link 4965 +.It +Intel WiFi Link 5100 +.It +Intel WiMAX/WiFi Link 5150 +.It +Intel WiMAX/WiFi Link 5350 +.El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): .Bd -literal -offset indent -ifconfig wlan create wlandev iwn0 inet 192.168.0.20 \e +# ifconfig wlan create wlandev iwn0 inet 192.168.0.20 \e netmask 0xffffff00 .Ed .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ql my_net : .Pp -.Dl "ifconfig wlan create wlandev iwn0 ssid my_net up" +.Dl # ifconfig wlan create wlandev iwn0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent -ifconfig wlan create wlandev iwn0 ssid my_net \e +# ifconfig wlan create wlandev iwn0 ssid my_net \e wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: .Bd -literal -offset indent -ifconfig wlan create wlandev iwn0 wlanmode adhoc ssid my_net \e +# ifconfig wlan create wlandev iwn0 wlanmode adhoc ssid my_net \e wepmode on wepkey 0x01020304050607080910111213 weptxkey 1 .Ed .Sh DIAGNOSTICS @@ -193,6 +220,7 @@ This should not happen. .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , +.Xr networking 7 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh AUTHORS diff --git a/share/man/man4/iwnfw.4 b/share/man/man4/iwnfw.4 index 601ed035c23d..67101f512224 100644 --- a/share/man/man4/iwnfw.4 +++ b/share/man/man4/iwnfw.4 @@ -20,8 +20,6 @@ .\" (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 August 30, 2014 .Dt IWNFW 4 .Os diff --git a/share/man/man4/iwx.4 b/share/man/man4/iwx.4 new file mode 100644 index 000000000000..7cd54d61b920 --- /dev/null +++ b/share/man/man4/iwx.4 @@ -0,0 +1,157 @@ +.\" +.\" SPDX-License-Identifier: ISC +.\" +.\" $OpenBSD: iwx.4,v 1.21 2025/03/27 15:12:14 jmc Exp $ +.\" +.\" Copyright (c) 2020 Stefan Sperling <stsp@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd May 2, 2025 +.Dt IWX 4 +.Os +.Sh NAME +.Nm iwx +.Nd Intel WiFi 6 IEEE 802.11ax wireless network driver +.Sh SYNOPSIS +.Cd device iwx +.Cd device wlan +.Pp +In +.Xr rc.conf 5 : +.Cd devmatch_blocklist="if_iwlwifi" +.Cd kld_list="if_iwx" +.Pp +In +.Xr sysctl.conf 5 : +.Cd dev.iwx.?.debug=0xffffffff +.Sh DESCRIPTION +The +.Nm +driver supports the Intel Wi-Fi 6 series of M.2 +wireless network adapters. +If the appropriate hardware is detected, and +.Xr iwlwifi 4 +is blacklisted in +.Xr rc.conf 5 , +the driver will be automatically loaded with +.Xr devmatch 8 . +The +.Nm +driver can be configured at runtime with +.Xr ifconfig 8 +or at boot with +.Xr rc.conf 5 . +.Pp +These are the modes the +.Nm +driver can operate in: +.Bl -tag -width "monitor mode" +.It station mode +This is used when associating with an access point, +through which all traffic passes. +Background scanning is supported in this mode, see +.Xr ifconfig 8 . +Station mode is the default. +.It monitor mode +In this mode the driver is able to receive packets without +associating with an access point. +This disables the internal receive filter and enables the card to +capture packets from networks which it wouldn't normally have access to, +or to scan for access points. +.El +.Sh HARDWARE +The +.Nm +driver supports the following M.2 wireless network adapters: +.Pp +.Bl -bullet -offset indent -compact +.It +Intel Wi-Fi 6 AX200 +.It +Intel Wi-Fi 6 AX201 CNVi +.It +Intel Wi-Fi 6 AX210 +.It +Intel Wi-Fi 6 AX211 CNVi +.El +.Sh SYSCTL VARIABLES +The +.Nm +driver supports the following +.Xr sysctl 8 +variables: +.Bl -tag -width "hw.usb.mtw.debug" +.It Va dev.iwx.?.debug +Specify debug level as a bitmask. +Default +.Ql 0 . +.El +.Sh FILES +The +.Nm +driver requires firmware from +.Pa ports/net/wifi-firmware-iwlwifi-kmod . +This firmware package will be installed automatically with +.Xr fwget 8 +if the appropriate hardware is detected at installation or runtime. +.Sh DIAGNOSTICS +.Bl -diag +.It "iwx0: device timeout" +A frame dispatched to the hardware for transmission did not complete +in time. +The driver will reset the hardware. +This should not happen. +.It "iwx0: fatal firmware error" +For some reason, the firmware crashed. +The driver will reset the hardware. +This should not happen. +.It "iwx0: radio is disabled by hardware switch" +The radio transmitter is off and thus no packet can go out. +The driver will reset the hardware. +Make sure the laptop radio switch is on. +.It "iwx0: could not read firmware ... (error N)" +For some reason, the driver was unable to read the firmware image from +the filesystem. +The file might be missing or corrupted. +.It "iwx0: firmware too short: N bytes" +The firmware image is corrupted and can't be loaded into the adapter. +.It "iwx0: could not load firmware" +An attempt to load the firmware into the adapter failed. +The driver will reset the hardware. +.El +.Sh SEE ALSO +.Xr intro 4 , +.Xr iwlwifi 4 , +.Xr iwlwififw 4 , +.Xr wlan 4 , +.Xr networking 7 , +.Xr fwget 8 , +.Xr ifconfig 8 , +.Xr wpa_supplicant 8 +.Sh HISTORY +The +.Nm +driver appeared in +.Fx 15.0 . +.Sh CAVEATS +The +.Nm +driver does not support hardware encryption offload. +.Pp +The +.Nm +driver does not support 802.11ax. +Additional work is required in +.Xr ieee80211 9 +before those features can be supported. diff --git a/share/man/man4/ixgbe.4 b/share/man/man4/ix.4 index 54c9146d2630..418b6e1188ab 100644 --- a/share/man/man4/ixgbe.4 +++ b/share/man/man4/ix.4 @@ -29,34 +29,31 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.\" $FreeBSD$ -.\" -.Dd July 17, 2019 -.Dt IXGBE 4 +.Dd October 26, 2024 +.Dt IX 4 .Os .Sh NAME -.Nm ixgbe -.Nd "Intel(R) 10Gb Ethernet driver for the FreeBSD operating system" +.Nm ix +.Nd Intel 10Gb Ethernet driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device iflib" -.Cd "device ixgbe" +.Cd "device ix" .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 -if_ixgbe_load="YES" +if_ix_load="YES" .Ed .Sh DESCRIPTION The .Nm -driver provides support for PCI 10Gb Ethernet adapters based on -the Intel 82598EB Intel(R) Network Connections. +driver provides support for Intel(R) 10Gb Ethernet PCIe adapters. The driver supports Jumbo Frames, MSIX, TSO, and RSS. .Pp For questions related to hardware requirements, @@ -68,7 +65,7 @@ Support for Jumbo Frames is provided via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the .Xr ifconfig 8 utility configures the adapter to receive and transmit Jumbo Frames. -The maximum MTU size for Jumbo Frames is 16114. +The maximum MTU size for Jumbo Frames is 9710. .Pp This driver version supports VLANs. For information on enabling VLANs, see @@ -76,25 +73,70 @@ For information on enabling VLANs, see .Sh HARDWARE The .Nm -driver supports the following cards: +driver supports Intel 10Gb Ethernet PCIe adapters, +including: .Pp .Bl -bullet -compact .It -Intel(R) 10 Gigabit XF SR/AF Dual Port Server Adapter +Intel(R) Ethernet X553 +.It +Intel(R) Ethernet X552 +.It +Intel(R) Ethernet X550 +.It +Intel(R) Ethernet X540 Bypass +.It +Intel(R) Ethernet X540 .It -Intel(R) 10 Gigabit XF SR/LR Server Adapter +Intel(R) Ethernet X520 Bypass (82599) .It -Intel(R) 82598EB 10 Gigabit AF Network Connection +Intel(R) Ethernet X520 (82599) .It -Intel(R) 82598EB 10 Gigabit AT CX4 Network Connection +Intel(R) 10 Gigabit Server Adapter (82598EB) +.El +.Sh LOADER TUNABLES +The +.Nm +driver supports the following loader tunables: +.Bl -tag -width "hw.ix.allow_unsupported_sfp" +.It Va hw.ix.max_interrupt_rate +Maximum interrupts per second. +.It Va hw.ix.flow_control +Default flow control used for all adapters. +.It Va hw.ix.advertise_speed +Default advertised speed for all adapters. +.It Va hw.ix.enable_msix +Enable Message Signalled Interrupts (MSI-X). +.It Va hw.ix.allow_unsupported_sfp +Allow unsupported small form-factor pluggable +.Pq SFP +modules. +Use at your own risk. +.It Va hw.ix.enable_fdir +Enable Flow Director. +Flow Director directs Ethernet packets to the core where the +packet consuming process, application, container, +or microservice is running. +.It Va hw.ix.enable_rss +Enable Receive-Side Scaling (RSS). +When RSS is enabled, all of the receive data processing for +a particular TCP connection is shared across multiple processors +or processor cores. +Without RSS, all of the processing is performed by a single +processor, resulting in inefficient system cache utilization. +This has no effect if your system has only one processing unit. +.It Va hw.ix.enable_aim +Enable Adaptive Interrupt Moderation (AIM). +Vary the interrupt rate over time based on the traffic for +that interrupt vector. .El .Sh DIAGNOSTICS .Bl -diag -.It "ixgbe%d: Unable to allocate bus resource: memory" +.It "ix%d: Unable to allocate bus resource: memory" A fatal initialization error has occurred. -.It "ixgbe%d: Unable to allocate bus resource: interrupt" +.It "ix%d: Unable to allocate bus resource: interrupt" A fatal initialization error has occurred. -.It "ixgbe%d: watchdog timeout -- resetting" +.It "ix%d: watchdog timeout -- resetting" The device has stopped responding to the network, or there is a problem with the network connection (cable). .El @@ -115,7 +157,8 @@ issue to .Xr ng_ether 4 , .Xr polling 4 , .Xr vlan 4 , -.Xr ifconfig 8 +.Xr ifconfig 8 , +.Xr sysctl 8 .Sh HISTORY The .Nm @@ -126,3 +169,11 @@ The .Nm driver was written by .An Intel Corporation Aq Mt freebsd@intel.com . +.Sh CAVEATS +Intel (R) Flow director support is not fully implemented in +.Fx +at this time and additional work is required +before those features can be supported. +.Pp +Enabling flow director may route traffic to the wrong RX queue of the NIC, +resulting in sub-optimal performance on the receive side. diff --git a/share/man/man4/ixl.4 b/share/man/man4/ixl.4 index 320971a74f52..fb9d519b22a8 100644 --- a/share/man/man4/ixl.4 +++ b/share/man/man4/ixl.4 @@ -29,9 +29,7 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.\" $FreeBSD$ -.\" -.Dd January 19, 2021 +.Dd August 1, 2023 .Dt IXL 4 .Os .Sh NAME @@ -105,7 +103,10 @@ package. .It To update the firmware on an adapter, use the Intel Non-Volatile Memory (NVM) Update Utility; installed by the -.Em sysutils/intel-nvmupdate +.Em sysutils/intel-nvmupdate-10g , +.Em sysutils/intel-nvmupdate-40g , +or +.Em sysutils/intel-nvmupdate-100g , package. .It Drivers are provided by Intel outside of the @@ -115,7 +116,10 @@ kernel; install the package for the latest driver. .El .Sh HARDWARE -Most adapters in the Intel Ethernet 700 Series with SFP+/SFP28/QSFP+ cages +The +.Nm +driver supports the Intel Ethernet 700 series. +Most adapters in this series with SFP+/SFP28/QSFP+ cages have firmware that requires that Intel qualified modules are used; these qualified modules are listed below. This qualification check cannot be disabled by the driver. @@ -208,7 +212,7 @@ When the driver is finding the last TX descriptor processed by the hardware, use a value written to memory by the hardware instead of scanning the descriptor ring for completed descriptors. Enabled by default; disable to mimic the TX behavior found in -.Xr ixgbe 4 . +.Xr ix 4 . .El .Sh SYSCTL PROCEDURES .Bl -tag -width indent diff --git a/share/man/man4/jedec_dimm.4 b/share/man/man4/jedec_dimm.4 index ea4183fafc1a..30e89b0afd0c 100644 --- a/share/man/man4/jedec_dimm.4 +++ b/share/man/man4/jedec_dimm.4 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2016 Andriy Gapon <avg@FreeBSD.org> .\" Copyright (c) 2018 Ravi Pokala <rpokala@freebsd.org> @@ -24,9 +24,7 @@ .\" (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 July 31, 2018 +.Dd April 25, 2023 .Dt JEDEC_DIMM 4 .Os .Sh NAME @@ -76,6 +74,10 @@ interface; all values are read-only: a string description of the DIMM, including TSOD and slotid info if present. .It Va dev.jedec_dimm.X.capacity the DIMM's memory capacity, in megabytes +.It Va dev.jedec_dimm.X.mfg_week +the week within the year in which the DIMM was manufactured +.It Va dev.jedec_dimm.X.mfg_year +the year in which the DIMM was manufactured .It Va dev.jedec_dimm.X.part the manufacturer's part number of the DIMM .It Va dev.jedec_dimm.X.serial @@ -144,6 +146,8 @@ dev.jedec_dimm.0.%location: addr=0xa0 dev.jedec_dimm.0.%parent: smbus0 dev.jedec_dimm.0.%pnpinfo: dev.jedec_dimm.0.capacity: 16384 +dev.jedec_dimm.0.mfg_week: 30 +dev.jedec_dimm.0.mfg_year: 17 dev.jedec_dimm.0.part: 36ASF2G72PZ-2G1A2 dev.jedec_dimm.0.serial: 0ea815de dev.jedec_dimm.0.slotid: A1 @@ -156,6 +160,8 @@ dev.jedec_dimm.6.%location: addr=0xa8 dev.jedec_dimm.6.%parent: smbus1 dev.jedec_dimm.6.%pnpinfo: dev.jedec_dimm.6.capacity: 8192 +dev.jedec_dimm.6.mfg_week: 13 +dev.jedec_dimm.6.mfg_year: 19 dev.jedec_dimm.6.part: VRA9MR8B2H1603 dev.jedec_dimm.6.serial: 0c4c46ad dev.jedec_dimm.6.temp: 43.1C diff --git a/share/man/man4/jme.4 b/share/man/man4/jme.4 index 513c253e15ff..097c827cc97b 100644 --- a/share/man/man4/jme.4 +++ b/share/man/man4/jme.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 4, 2012 .Dt JME 4 .Os diff --git a/share/man/man4/kbdmux.4 b/share/man/man4/kbdmux.4 index 0815f054c8f5..7088a1583359 100644 --- a/share/man/man4/kbdmux.4 +++ b/share/man/man4/kbdmux.4 @@ -1,5 +1,4 @@ .\" $Id: kbdmux.4,v 1.1 2005/07/14 20:32:10 max Exp $ -.\" $FreeBSD$ .\" .Dd July 12, 2005 .Dt KBDMUX 4 diff --git a/share/man/man4/kcov.4 b/share/man/man4/kcov.4 index b3f8f42cfbfd..a9e5556835f7 100644 --- a/share/man/man4/kcov.4 +++ b/share/man/man4/kcov.4 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 18, 2020 .Dt KCOV 4 .Os diff --git a/share/man/man4/keyboard.4 b/share/man/man4/keyboard.4 index 4a71aa3828f3..8341ac2af3fd 100644 --- a/share/man/man4/keyboard.4 +++ b/share/man/man4/keyboard.4 @@ -1,6 +1,4 @@ .\" -.\" $FreeBSD$ -.\" .Dd January 8, 1995 .Dt KEYBOARD 4 .Os diff --git a/share/man/man4/kld.4 b/share/man/man4/kld.4 index 2d76d5128c1c..e0186dec9ccc 100644 --- a/share/man/man4/kld.4 +++ b/share/man/man4/kld.4 @@ -23,8 +23,6 @@ .\" (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 13, 2014 .Dt KLD 4 .Os @@ -98,7 +96,7 @@ drivers may be loaded into the system with .Nm . Device nodes for the loaded drivers are automatically created when a module is loaded and destroyed when it is unloaded by -.Xr devfs 5 . +.Xr devfs 4 . You can specify userland programs that will run when new devices become available as a result of loading modules, or existing devices go away when modules are unloaded, by configuring @@ -123,7 +121,7 @@ example source code implementing a sample kld module .Xr kldnext 2 , .Xr kldstat 2 , .Xr kldunload 2 , -.Xr devfs 5 , +.Xr devfs 4 , .Xr devd 8 , .Xr kldload 8 , .Xr kldstat 8 , diff --git a/share/man/man4/ksyms.4 b/share/man/man4/ksyms.4 index 4c70daec1e2f..1b905a9c68ad 100644 --- a/share/man/man4/ksyms.4 +++ b/share/man/man4/ksyms.4 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 2, 2017 .Dt KSYMS 4 .Os diff --git a/share/man/man4/ksz8995ma.4 b/share/man/man4/ksz8995ma.4 index 758d6697722f..cd1939cb8643 100644 --- a/share/man/man4/ksz8995ma.4 +++ b/share/man/man4/ksz8995ma.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 6, 2017 .Dt KSZ8995MA 4 .Os diff --git a/share/man/man4/ktls.4 b/share/man/man4/ktls.4 index efb5d7e3cc0a..56b03d45faf7 100644 --- a/share/man/man4/ktls.4 +++ b/share/man/man4/ktls.4 @@ -29,9 +29,7 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.\" $FreeBSD$ -.\" -.Dd December 14, 2021 +.Dd October 31, 2024 .Dt KTLS 4 .Os .Sh NAME @@ -222,8 +220,10 @@ mode. OpenSSL 3.0 and later include support for .Nm . The -.Fa security/openssl-devel -port may also be built with support for +.Fa security/openssl* +and +.Fa security/gnutls +ports may also be built with support for .Nm by enabling the .Dv KTLS diff --git a/share/man/man4/ktr.4 b/share/man/man4/ktr.4 index 175a7ac7e2af..f1a35c7d9662 100644 --- a/share/man/man4/ktr.4 +++ b/share/man/man4/ktr.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 26, 2021 .Dt KTR 4 .Os diff --git a/share/man/man4/kue.4 b/share/man/man4/kue.4 index 5b4a5987c919..a92af09f027e 100644 --- a/share/man/man4/kue.4 +++ b/share/man/man4/kue.4 @@ -28,8 +28,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 24, 2019 .Dt KUE 4 .Os diff --git a/share/man/man4/kvmclock.4 b/share/man/man4/kvmclock.4 new file mode 100644 index 000000000000..55ee5fc1cb42 --- /dev/null +++ b/share/man/man4/kvmclock.4 @@ -0,0 +1,96 @@ +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023 Klara, Inc. +.\" +.\" 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. +.\" +.Dd February 1, 2023 +.Dt KVMCLOCK 4 +.Os +.Sh NAME +.Nm kvmclock +.Nd Para-virtualized clock driver for x86 KVM guests +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device kvm_clock" +.Ed +.Sh DESCRIPTION +This driver reads time-keeping information from the para-virtualized clock +device provided by the KVM hypervisor on Linux hosts. +The +.Nm +driver is only implemented on i386 and amd64 platforms. +It acts as a +.Xr timecounters 4 +device and is preferred over the Time Stamp Counter (TSC) when available. +The driver exports timekeeping information via +.Pa /dev/pvclock , +enabling the implementation of +.Xr clock_gettime 2 +and related functions without entering the kernel. +.Pp +The +.Nm +driver works by accessing a per-vCPU timekeeping structure maintained by the +hypervisor. +It uses a combination of TSC readings and information from the shared structure +to produce a high-resolution timecounter which is invariant under hypervisor +events such as vCPU migration and live VM migration. +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width indent +.It Va dev.kvmclock.0.vdso_enable_without_rdtscp +By default, timekeeping information is exported to userspace only when the +(virtual) CPU announces support for the +.Dq rdtscp +instruction. +Setting this sysctl to 1 overrides this behavior, allowing timekeeping +information to be exported even in the absence of +.Dq rdtscp +support. +However, this breaks compatibility with copies of +.Pa /lib/libc.so.7 +released prior to +.Fx 14.0 , +and statically linked binaries which embed a copy of the system C library. +Thus, this sysctl value should not be changed if the system may execute +binaries older than +.Fx 14.0 . +.It Va dev.kvmclock.0.vdso_force_unstable +Mark the timecounter as unstable for userspace consumers. +This is mostly useful for debugging the driver and userspace timekeeping code, +and generally should not be touched. +.El +.Sh SEE ALSO +.Xr timecounters 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 13.1 . diff --git a/share/man/man4/lagg.4 b/share/man/man4/lagg.4 index f7d8e1c5e1f5..4eaed2cf3a88 100644 --- a/share/man/man4/lagg.4 +++ b/share/man/man4/lagg.4 @@ -14,9 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" -.Dd October 21, 2020 +.Dd January 16, 2023 .Dt LAGG 4 .Os .Sh NAME @@ -43,6 +41,18 @@ interface allows aggregation of multiple network interfaces as one virtual .Nm interface for the purpose of providing fault-tolerance and high-speed links. .Pp +Each +.Nm +interface is created at runtime using interface cloning. +This is +most easily done with the +.Xr ifconfig 8 +.Cm create +command or using the +.Va cloned_interfaces +variable in +.Xr rc.conf 5 . +.Pp A .Nm interface can be created using the @@ -79,7 +89,7 @@ the next active port is used. The first interface added is the master port; any interfaces added after that are used as failover devices. .Pp -By default, received traffic is only accepted when they are received +By default, received traffic is only accepted when it is received through the active port. This constraint can be relaxed by setting the .Va net.link.lagg.failover_rx_all @@ -123,18 +133,6 @@ disabling the interface itself. .El .Pp -Each -.Nm -interface is created at runtime using interface cloning. -This is -most easily done with the -.Xr ifconfig 8 -.Cm create -command or using the -.Va cloned_interfaces -variable in -.Xr rc.conf 5 . -.Pp The MTU of the first interface to be added is used as the lagg MTU. All additional interfaces are required to have exactly the same value. .Pp @@ -152,6 +150,17 @@ flag. The default for new interfaces is set via the .Va net.link.lagg.default_use_flowid .Xr sysctl 8 . +.Pp +When creating a +.Nm +interface, the +.Ic laggtype +can be specified as either +.Cm ethernet +or +.Cm infiniband . +If neither is specified then the default is +.Cm ethernet . .Sh EXAMPLES Create a link aggregation using LACP with two .Xr bge 4 @@ -182,16 +191,18 @@ between wired and wireless networks using two network devices. Whenever the wired master interface is unplugged, the wireless failover device will be used: .Bd -literal -offset indent -# ifconfig em0 up -# ifconfig ath0 ether 00:11:22:33:44:55 -# ifconfig create wlan0 wlandev ath0 ssid my_net up +# ifconfig em0 ether 00:11:22:33:44:55 up +# ifconfig wlan0 create wlandev ath0 ssid my_net up # ifconfig lagg0 create # ifconfig lagg0 laggproto failover laggport em0 laggport wlan0 \e 192.168.1.1 netmask 255.255.255.0 .Ed .Pp -(Note the mac address of the wireless device is forced to match the wired -device as a workaround.) +(Note the MAC address of the wired device is forced to match that of the +wireless device, +.Sq 00:11:22:33:44:55 +in this example, as some common wireless devices will not allow MAC +addresses to be changed.) .Pp The following example shows how to create an infiniband failover interface. .Bd -literal -offset indent @@ -201,8 +212,19 @@ The following example shows how to create an infiniband failover interface. # ifconfig lagg0 laggproto failover laggport ib0 laggport ib1 \e 1.1.1.1 netmask 255.255.255.0 .Ed +.Pp +Configure two ethernets for failover with static IP in +.Pa /etc/rc.conf : +.Bd -literal -offset indent +cloned_interfaces="lagg0" +ifconfig_lagg0="laggproto failover laggport bge0 laggport bge1 \e + 10.1.29.21/24" +ifconfig_bge0="up" +ifconfig_bge1="up" +.Ed .Sh SEE ALSO .Xr ng_one2many 4 , +.Xr rc.conf 5 , .Xr ifconfig 8 , .Xr sysctl 8 .Sh HISTORY diff --git a/share/man/man4/le.4 b/share/man/man4/le.4 index 2c7f9cc3e55e..ff39361a1780 100644 --- a/share/man/man4/le.4 +++ b/share/man/man4/le.4 @@ -33,10 +33,8 @@ .\" SUCH DAMAGE. .\" .\" from: Header: le.4,v 1.2 92/10/13 05:31:33 leres Exp -.\" from: @(#)le.4 8.1 (Berkeley) 6/9/93 -.\" $FreeBSD$ .\" -.Dd December 26, 2020 +.Dd June 21, 2023 .Dt LE 4 .Os .Sh NAME @@ -64,6 +62,12 @@ numbers have to be specified in .Cd hint.le.0.port="0x280" .Cd hint.le.0.irq="10" .Cd hint.le.0.drq="0" +.Sh DEPRECATION NOTICE +The +.Nm +driver may not be present in +.Fx 15.0 +and later. .Sh DESCRIPTION The .Nm diff --git a/share/man/man4/led.4 b/share/man/man4/led.4 index 1ae8f91690bb..cf1685f07c40 100644 --- a/share/man/man4/led.4 +++ b/share/man/man4/led.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 24, 2007 .Dt LED 4 .Os diff --git a/share/man/man4/lge.4 b/share/man/man4/lge.4 index 0e9ecbd421df..6d527b9c6cec 100644 --- a/share/man/man4/lge.4 +++ b/share/man/man4/lge.4 @@ -29,8 +29,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 16, 2005 .Dt LGE 4 .Os diff --git a/share/man/man4/lindebugfs.4 b/share/man/man4/lindebugfs.4 new file mode 100644 index 000000000000..34a196007086 --- /dev/null +++ b/share/man/man4/lindebugfs.4 @@ -0,0 +1,95 @@ +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2022, Jake Freeland <jfree@freebsd.org> +.\" +.\" 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. + +.Dd August 10, 2022 +.Dt LINDEBUGFS 4 +.Os +.Sh NAME +.Nm lindebugfs +.Nd Linux file system for debugging +.Sh SYNOPSIS +.Bd -literal +lindebugfs /sys/kernel/debug lindebugfs rw 0 0 +.Ed +.Sh DESCRIPTION +The debug file system, or debugfs, makes process debugging easier by +providing a simple API for data transfer between the kernel and user +space. +Debugfs is not a general-purpose file system and should not be used as +a storage medium. +Instead, developers can implement the debugfs interface in their code +to generate debug information about their program at runtime. +FreeBSD's +.Nm +uses the +.Xr pseudofs 9 +file system construction kit to model itself after Linux's debugfs. +The +.Nm +API is intended for use with programs that take advantage of FreeBSD's +LinuxKPI compatibility layer. +.Pp +When mounted, +.Nm +will populate with pseudo files from any running process that calls +.Nm debugfs_create_file() . +Since +.Nm +is a pseudo file system, file contents will be generated dynamically +based on program provided file operations. +The current +.Nm +implementation formally supports seq_file and simple_attr_file virtual +file formats. +.Sh EXAMPLES +Load the +.Nm +kernel module: +.Pp +.Dl "kldload lindebugfs" +.Pp +Mount the +.Nm +file system on +.Pa /sys/kernel/debug : +.Pp +.Dl "mount -t lindebugfs lindebugfs /sys/kernel/debug" +.Sh SEE ALSO +.Xr mount 1 , +.Xr linprocfs 4 , +.Xr linsysfs 4 , +.Xr linux 4 , +.Xr pseudofs 9 +.Sh HISTORY +The +.Nm +file system first appeared in +.Fx 12.1 . +.Sh AUTHORS +.An -nosplit +The initial implementation for +.Nm +was created by Matthew Macy. +This manual page was written by Jake Freeland. diff --git a/share/man/man4/linprocfs.4 b/share/man/man4/linprocfs.4 new file mode 100644 index 000000000000..53940d7c02b0 --- /dev/null +++ b/share/man/man4/linprocfs.4 @@ -0,0 +1,167 @@ +.\" Written by Garrett Wollman +.\" This file is in the public domain. +.\" +.Dd May 29, 2025 +.Dt LINPROCFS 4 +.Os +.Sh NAME +.Nm linprocfs +.Nd Linux process file system +.Sh SYNOPSIS +.Bd -literal +linproc /compat/linux/proc linprocfs rw 0 0 +.Ed +.Sh DESCRIPTION +The Linux process file system, or +.Nm , +emulates a subset of Linux' process file system and is required for +the complete operation of some Linux binaries. +.Pp +The +.Nm +provides a two-level view of process space. +At the highest level, processes themselves are named, according to +their process ids in decimal, with no leading zeros. +There is also a special node called +.Pa self +which always refers to the process making the lookup request. +.Pp +Each process node is a directory containing several files: +.Bl -tag -width oom_score_adj +.It Pa auxv +The auxiliary vector passed to the program. +.It Pa cmdline +The command line used to execute the process. +.It Pa cwd +A symbolic link pointing to the current work directory of the process. +.It Pa environ +The list of environment variables and values of the process. +Every variable and pair value is separated from the next by a NULL byte. +.It Pa exe +A reference to the vnode from which the process text was read. +This can be used to gain access to the process' symbol table, +or to start another copy of the process. +.It Pa limits +The soft and hard limits for the process along with the units used. +.It Pa maps +Memory map of the process. +.It Pa mem +The complete virtual memory image of the process. +Only those addresses which exist in the process can be accessed. +Reads and writes to this file modify the process. +Writes to the text segment remain private to the process. +.It Pa mountinfo +Information about mount points. +.It Pa mounts +Similar to the above. +.It Pa oom_score_adj +Score adjustment for the Out Of Memory killer. +.It Pa root +Symbolic link to the root directory for this process. +.It Pa stat +Process statistics. +It includes user, nice, system, idle, iowait, irq, softirq, +steal, guest and guest_nice. +.It Pa statm +Process size statistics. +It includes total program size, resident set size, number of resident shared +pages (unused), text size, library size (unused), data + stack and dirty pages +(unused). +.It Pa status +Process statistics in human readable form. +It includes process name, state, PID, +etc. +.It Pa task +Dummy directory to avoid problems in specific software such as Chromium. +.El +.Pp +Each node is owned by the process's user, and belongs to that user's +primary group, except for the +.Pa mem +node, which belongs to the +.Li kmem +group. +.Sh FILES +.Bl -tag -width /compat/linux/proc/filesystems -compact +.It Pa /compat/linux/proc +The normal mount point for +.Nm . +.It Pa /compat/linux/proc/cmdline +Contains the path of the kernel image used to boot the system. +.It Pa /compat/linux/proc/cpuinfo +CPU vendor and model information in human-readable form. +.It Pa /compat/linux/proc/devices +List of character and block devices. +The later is usually empty on +.Fx . +.It Pa /compat/linux/proc/filesystems +List of supported filesystems. +For pseudo filesystems, the first column contains +.Em nodev . +.It Pa /compat/linux/proc/meminfo +System memory information in human-readable form. +.It Pa /compat/linux/proc/modules +Loaded kernel modules. +Empty for now. +.It Pa /compat/linux/proc/mounts +Devices corresponding mount points. +.It Pa /compat/linux/proc/mtab +Same as above. +.It Pa /compat/linux/proc/partitions +Partition information including major and minor numbers, number of blocks and +name. +The rest of the fields are set to zero. +.It Pa /compat/linux/proc/stat +System statistics. +For each cpu it includes at most user time, nice time, system +time and idle time, iowait (time waiting for I/O to complete), times serving +irqs and softirq, steal, guest and guest_nice times that represent times spent +in different modes in a virtualized environment. +The last columns are set to zero. +This file also contains brief statistics for disks, context switches and +more. +.It Pa /compat/linux/proc/swap +Information about the swap device if any. +.It Pa /compat/linux/proc/uptime +Time since the last boot and time spent in idle state. +.It Pa /compat/linux/proc/version +Version of the emulated linux system. +.It Pa /compat/linux/proc/pid +A directory containing process information for process +.Pa pid . +.It Pa /compat/linux/proc/self +A directory containing process information for the current process. +.El +.Sh EXAMPLES +To mount a +.Nm +file system on +.Pa /compat/linux/proc : +.Pp +.Dl "mount -t linprocfs linproc /compat/linux/proc" +.Sh SEE ALSO +.Xr mount 2 , +.Xr unmount 2 , +.Xr auxv 3 , +.Xr linux 4 , +.Xr procfs 5 , +.Xr pseudofs 9 +.Sh HISTORY +The +.Nm +first appeared in +.Fx 4.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +was derived from +.Nm procfs +by +.An Pierre Beyssac . +This manual page was written by +.An Dag-Erling Sm\(/orgrav , +based on the +.Xr procfs 5 +manual page by +.An Garrett Wollman . diff --git a/share/man/man5/linsysfs.5 b/share/man/man4/linsysfs.4 index 99cf3fe2fe41..12729a814085 100644 --- a/share/man/man5/linsysfs.5 +++ b/share/man/man4/linsysfs.4 @@ -1,10 +1,8 @@ .\" Written by Garrett Wollman .\" This file is in the public domain. .\" -.\" $FreeBSD$ -.\" .Dd November 13, 2019 -.Dt LINSYSFS 5 +.Dt LINSYSFS 4 .Os .Sh NAME .Nm linsysfs @@ -76,8 +74,8 @@ is a mount point. .Sh SEE ALSO .Xr nmount 2 , .Xr unmount 2 , +.Xr linprocfs 4 , .Xr linux 4 , -.Xr linprocfs 5 , .Xr pseudofs 9 .Sh HISTORY The @@ -95,6 +93,6 @@ by This manual page was edited by .An Doug Ambrisko , based on the -.Xr linprocfs 5 +.Xr linprocfs 4 manual page by .An Garrett Wollman . diff --git a/share/man/man4/linux.4 b/share/man/man4/linux.4 index ecf633f39648..711ac11e8fce 100644 --- a/share/man/man4/linux.4 +++ b/share/man/man4/linux.4 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd January 9, 2022 +.Dd May 19, 2024 .Dt LINUX 4 .Os .Sh NAME @@ -63,11 +61,13 @@ under .Pa /compat/linux ) before .Pa / . -For example, when Linux process attempts to open +For example, when a Linux process attempts to open .Pa /etc/passwd , -it will really access +it will first access .Pa /compat/linux/etc/passwd , -unless the latter does not exist. +falling back to +.Pa /etc/passwd +if the compat path does not exist. This is used to make sure Linux processes load Linux shared libraries instead of their similarly-named FreeBSD counterparts, and also to provide alternative versions of certain other files and virtual @@ -158,30 +158,34 @@ Defaults to 0. Linux run-time environment .It Pa /compat/linux/dev device file system, see -.Xr devfs 5 +.Xr devfs 4 .It Pa /compat/linux/dev/fd file descriptor file system mounted with the .Cm linrdlnk option, see -.Xr fdescfs 5 +.Xr fdescfs 4 +.It Pa /compat/linux/dev/mqueue +symbolic link to a mqueuefs mount, see +.Xr mqueuefs 4 .It Pa /compat/linux/dev/shm in-memory file system, see -.Xr tmpfs 5 +.Xr tmpfs 4 .It Pa /compat/linux/proc Linux process file system, see -.Xr linprocfs 5 +.Xr linprocfs 4 .It Pa /compat/linux/sys Linux kernel objects file system, see -.Xr linsysfs 5 +.Xr linsysfs 4 .El .Sh SEE ALSO .Xr brandelf 1 , +.Xr fdescfs 4 , +.Xr linprocfs 4 , +.Xr linsysfs 4 , +.Xr mqueuefs 4 , .Xr pty 4 , -.Xr elf 5 , -.Xr fdescfs 5 , -.Xr linprocfs 5 , -.Xr linsysfs 5 , -.Xr tmpfs 5 +.Xr tmpfs 4 , +.Xr elf 5 .Sh HISTORY Linux ABI support first appeared for i386 in .Fx 2.1 . diff --git a/share/man/man4/linuxkpi.4 b/share/man/man4/linuxkpi.4 new file mode 100644 index 000000000000..cd4135c28d6d --- /dev/null +++ b/share/man/man4/linuxkpi.4 @@ -0,0 +1,42 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" This documentation was written by Bj\xc3\xb6rn Zeeb under sponsorship from +.\" the FreeBSD Foundation. +.\" +.Dd June 13, 2025 +.Dt LINUXKPI 4 +.Os +.Sh NAME +.Nm linuxkpi +.Nd Linux Kernel Programming Interface support +.Sh DESCRIPTION +The +.Nm +kernel module provides a limited KPI (kernel programming interface) to allow +Linux kernel drivers and other Linux kernel code to be compiled on +.Fx +and used along the +.Fx +kernel with little or no modification. +.Pp +While historically +.Em OpenFabrics Enterprise Distribution (Infiniband) , +and certain vendor drivers have used +.Nm . +.Em drm-kmod +for graphics driver support +and +.Xr linuxkpi_wlan 4 +for wireless drivers are prominent consumers. +.Pp +.Nm +is not to be confused with +.Xr linux 4 +which provides limited Linux ABI (application binary interface) compatibility +to allow running Linux application binaries unmodified on +.Fx . +.Sh SEE ALSO +.Xr linuxkpi_wlan 4 diff --git a/share/man/man4/linuxkpi_wlan.4 b/share/man/man4/linuxkpi_wlan.4 new file mode 100644 index 000000000000..136e04c32bb7 --- /dev/null +++ b/share/man/man4/linuxkpi_wlan.4 @@ -0,0 +1,134 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" This documentation was written by Bj\xc3\xb6rn Zeeb under sponsorship from +.\" the FreeBSD Foundation. +.\" +.Dd June 13, 2025 +.Dt LINUXKPI_WLAN 4 +.Os +.Sh NAME +.Nm linuxkpi_wlan +.Nd LinuxKPI 802.11 support +.Sh DESCRIPTION +The +.Nm +kernel module provides an 802.11 compat layer to translate between Linux +802.11 drivers and the native net8011 wireless stack. +It currently supports +.Em mac80211 +based drivers. +Parts of the +.Em cfg80211 +exist but there is no code for net80211 to drive it. +.Pp +.Nm +currently supports the following +.Em wlanmode +operating modes: +.Bl -tag -width monitor -compact +.It Cm sta +client station in an infrastructure bss (IBSS). +.El +.Pp +Compat code for 802.11n (HT) and 802.11ac (VHT) is implemented but +support may vary for different drivers due to different KPI usage. +.Pp +Crypto support for hardware acceleration needs to be enabled using the +.Va compat.linuxkpi.80211.hw_crypto +tunable. +The following cipher suites are supported: +.Bl -tag -width CCMP -compact +.It Cm tkip +Support for +.Xr wlan_tkip 4 +has to be manually enabled using the +.Va compat.linuxkpi.80211.tkip +tunable. +.It Cm ccmp +Support for +.Xr wlan_ccmp 4 +is available. +.It Cm gcmp +Support for +.Xr wlan_gcmp 4 +is available. +.El +Further cipher suites will be implemented as soon as +.Xr net80211 4 +grows support. +While it would be possible to implement +.Xr wlan_wep 4 +support, it was decided not to do so given +.Em Wired Equivalent Privacy (WEP) +has been deprecated since 2004. +.Pp +The list of supported drivers includes +.Xr iwlwifi 4 , +.Xr rtw88 4 , +and +.Xr rtw89 4 . +.Sh SYSCTL VARIABLES AND LOADER TUNABLES +The +.Nm +module supports the following +.Xr loader 8 +tunable and read-only +.Xr sysctl 8 +variables: +.Bl -tag -width "compat.linuxkpi.80211.hw_crypto" +.It Va compat.linuxkpi.80211.hw_crypto +Turn on hardware crypto offload support. +Default +.Ql 0 . +.It Va compat.linuxkpi.80211.tkip +Turn on support for +.Xr wlan_tkip 4 +offloading. +Default +.Ql 0 . +.El +.Pp +The +.Nm +module supports the following +.Xr sysctl 8 +variables: +.Bl -tag -width "compat.linuxkpi.80211.IF.dump_stas" +.It Va compat.linuxkpi.80211.debug +If the kernel is compiled with +.Dv IEEE80211_DEBUG +or +.Dv LINUXKPI_DEBUG_80211 +is manually enabled, the sysctl is a bitmask to turn on individual +debug messages. +See +.Pa sys/compat/linuxkpi/common/src/linux_80211.h +for details. +.It Va compat.linuxkpi.80211.IF.dump_stas +Print statistics for a given, associated +.Xr wlan 4 +interface; typically IF would be +.Em wlan0 . +.El +.Sh SEE ALSO +.Xr iwlwifi 4 , +.Xr linuxkpi 4 , +.Xr rtw88 4 , +.Xr rtw89 4 , +.Xr wlan 4 +.Sh HISTORY +The +.Nm +module first appeared in +.Fx 13.1 . +Support for IEEE 802.11n and 802.11ac in +.Nm +first appeared in +.Fx 14.3 . +.Sh AUTHORS +LinuxKPI 802.11 support was developed by +.An Bjoern A. Zeeb +under sponsorship from the FreeBSD Foundation. diff --git a/share/man/man4/liquidio.4 b/share/man/man4/liquidio.4 index 075b361605b9..27372e606212 100644 --- a/share/man/man4/liquidio.4 +++ b/share/man/man4/liquidio.4 @@ -28,14 +28,13 @@ .\" 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 August 17, 2017 .Dt LIQUIDIO 4 .Os .Sh NAME .Nm liquidio -.Nd "Cavium 10Gb/25Gb Ethernet driver for the FreeBSD operating system" +.Nd Cavium 10Gb/25Gb Ethernet driver .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your diff --git a/share/man/man4/lm75.4 b/share/man/man4/lm75.4 index 75f6907bda76..1eecdfad7a09 100644 --- a/share/man/man4/lm75.4 +++ b/share/man/man4/lm75.4 @@ -22,8 +22,6 @@ .\" (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 26, 2017 .Dt LM75 4 .Os diff --git a/share/man/man4/lo.4 b/share/man/man4/lo.4 index 808d93e01333..7bad739eec41 100644 --- a/share/man/man4/lo.4 +++ b/share/man/man4/lo.4 @@ -27,10 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)lo.4 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" -.Dd January 25, 2012 +.Dd June 23, 2024 .Dt LO 4 .Os .Sh NAME @@ -58,11 +55,11 @@ be configured first unless no hardware interfaces exist. .Pp If the transmit checksum offload capability flag is enabled on a loopback -interface, checksums will not be generated by IP, UDP, or TCP for packets +interface, checksums will not be generated by IP, UDP, TCP, or SCTP for packets sent on the interface. .Pp If the receive checksum offload capability flag is enabled on a loopback -interface, checksums will not be validated by IP, UDP, or TCP for packets +interface, checksums will not be validated by IP, UDP, TCP, or SCTP for packets received on the interface. .Pp By default, both receive and transmit checksum flags will be enabled, in diff --git a/share/man/man4/lp.4 b/share/man/man4/lp.4 index 221b9c97ca58..8ca65696a114 100644 --- a/share/man/man4/lp.4 +++ b/share/man/man4/lp.4 @@ -28,7 +28,6 @@ .\" SUCH DAMAGE. .\" .\" Id: man4.i386/lp.4,v 1.9 1999/02/14 12:06:16 nsouch Exp -.\" $FreeBSD$ .\" .Dd March 4, 1996 .Dt LP 4 diff --git a/share/man/man4/lpbb.4 b/share/man/man4/lpbb.4 index 89b2a07a2e77..73d9d60128a7 100644 --- a/share/man/man4/lpbb.4 +++ b/share/man/man4/lpbb.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 25, 1998 .Dt LPBB 4 .Os diff --git a/share/man/man4/lpt.4 b/share/man/man4/lpt.4 index 8b3dd578fa3c..aea1a83275c2 100644 --- a/share/man/man4/lpt.4 +++ b/share/man/man4/lpt.4 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 14, 1999 .Dt LPT 4 .Os diff --git a/share/man/man4/ltc430x.4 b/share/man/man4/ltc430x.4 index 0eba67e40fad..91a0fe5d35bc 100644 --- a/share/man/man4/ltc430x.4 +++ b/share/man/man4/ltc430x.4 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 2, 2020 .Dt LTC430X 4 .Os diff --git a/share/man/man4/mac.4 b/share/man/man4/mac.4 index 98d685143d88..134086139f53 100644 --- a/share/man/man4/mac.4 +++ b/share/man/man4/mac.4 @@ -28,9 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd June 29, 2022 +.Dd December 30, 2024 .Dt MAC 4 .Os .Sh NAME @@ -56,12 +54,15 @@ Currently, the following MAC policy modules are shipped with .It Xr mac_biba 4 Ta "Biba integrity policy" Ta yes Ta boot only .It Xr mac_bsdextended 4 Ta "File system firewall" Ta no Ta any time .It Xr mac_ddb 4 Ta "ddb(4) interface restrictions" Ta no Ta any time +.It Xr mac_do 4 Ta "Change command's uid/gid" Ta no Ta any time .It Xr mac_ifoff 4 Ta "Interface silencing" Ta no Ta any time +.It Xr mac_ipacl 4 Ta "IP Address access control" Ta no Ta any time .It Xr mac_lomac 4 Ta "Low-Watermark MAC policy" Ta yes Ta boot only .It Xr mac_mls 4 Ta "Confidentiality policy" Ta yes Ta boot only -.It Xr mac_none 4 Ta "Sample no-op policy" Ta no Ta any time +.It Xr mac_ntpd 4 Ta "Non-root NTP Daemon policy" Ta no Ta any time .It Xr mac_partition 4 Ta "Process partition policy" Ta yes Ta any time .It Xr mac_portacl 4 Ta "Port bind(2) access control" Ta no Ta any time +.It Xr mac_priority 4 Ta "Scheduling priority policy" Ta no Ta any time .It Xr mac_seeotheruids 4 Ta "See-other-UIDs policy" Ta no Ta any time .It Xr mac_test 4 Ta "MAC testing policy" Ta no Ta any time .El @@ -203,13 +204,18 @@ man page. .Xr mac_biba 4 , .Xr mac_bsdextended 4 , .Xr mac_ddb 4 , +.Xr mac_do 4 , .Xr mac_ifoff 4 , +.Xr mac_ipacl 4 , .Xr mac_lomac 4 , .Xr mac_mls 4 , .Xr mac_none 4 , +.Xr mac_ntpd 4 , .Xr mac_partition 4 , .Xr mac_portacl 4 , +.Xr mac_priority 4 , .Xr mac_seeotheruids 4 , +.Xr mac_stub 4 , .Xr mac_test 4 , .Xr login.conf 5 , .Xr maclabel 7 , diff --git a/share/man/man4/mac_biba.4 b/share/man/man4/mac_biba.4 index 7b7cf6eb0e8f..acab6b3eaac8 100644 --- a/share/man/man4/mac_biba.4 +++ b/share/man/man4/mac_biba.4 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 18, 2002 .Dt MAC_BIBA 4 .Os diff --git a/share/man/man4/mac_bsdextended.4 b/share/man/man4/mac_bsdextended.4 index a8f9aa2f786f..2131ca85282c 100644 --- a/share/man/man4/mac_bsdextended.4 +++ b/share/man/man4/mac_bsdextended.4 @@ -28,9 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd May 21, 2005 +.Dd October 11, 2024 .Dt MAC_BSDEXTENDED 4 .Os .Sh NAME @@ -89,7 +87,7 @@ This means that not all rules are applied, only the first matched rule; thus if Rule A allows access and Rule B blocks access, Rule B will never be applied. -.Ss Sysctls +.Sh SYSCTL VARIABLES The following sysctls may be used to tweak the behavior of .Nm : .Bl -tag -width indent diff --git a/share/man/man4/mac_do.4 b/share/man/man4/mac_do.4 new file mode 100644 index 000000000000..4dcb54c89673 --- /dev/null +++ b/share/man/man4/mac_do.4 @@ -0,0 +1,452 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024 Baptiste Daroussin <bapt@FreeBSD.org> +.\" Copyright (c) 2024 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Olivier Certner +.\" <olce@FreeBSD.org> at Kumacom SARL under sponsorship from the FreeBSD +.\" Foundation. +.\" +.Dd June 11, 2025 +.Dt MAC_DO 4 +.Os +.Sh NAME +.Nm mac_do +.Nd "policy allowing unprivileged users to change process credentials" +.Sh SYNOPSIS +To compile the +.Sy mac_do +policy into your kernel, place the following lines in your kernel configuration +file: +.Bd -ragged -offset indent +.Cd "options MAC" +.Cd "options MAC_DO" +.Ed +.Pp +Alternately, to load this policy module at boot time, place the following line +in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "options MAC" +.Ed +.Pp +and in +.Xr loader.conf 5 : +.Bd -literal -offset indent +mac_do_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +policy module allows unprivileged users to change process credentials according +to rules configured by the administrator. +It supports per-jail configuration. +.Pp +Currently, the +.Nm +policy module only produces effects to processes spawned from the +.Pa /usr/bin/mdo +executable, please see +.Xr mdo 1 +for more details on this program. +.Sh CREDENTIALS RULES +Rules specify which transitions of process credentials +.Nm +will allow, based on current process credentials and the desired final ones. +They are passed by an administrator in the form of a string having the specific +syntax described below in a top-bottom manner. +They have been designed to be able to finely describe the desired target +credentials in a safe and compact way. +.Ss Top-Level List of Rules +At the top, rules are a possibly empty list of individual rules separated by +a semi-colon +.Pq Ql ";" : +.Dl Ao rules Ac \ ⟶\ Oo Ao rule Ac Oo So ";" Sc Ao rule Ac Oc Ns * Oc +They form a disjunction, i.e., +.Nm +authorizes a credentials transition as soon as at least one rule in the list +matches. +.Pp +One rule is composed of a +.Li Aq from +part +.Pq also called Dq match +and a +.Li Aq to +part +.Pq also called Dq target , +in this order, separated by a greater-than sign +.Pq Ql > : +.Dl Ao rule Ac \ ⟶\ Ao from Ac So > Sc Ao to Ac +.Ss Rule's Ao from Ac Part +The first part of a rule, +.Li Aq from , +is matched against the credentials of the process requesting some credentials +transition. +It has the form: +.Dl Ao from Ac \ ⟶\ Ao type Ac So = Sc Ao id Ac +.Pp +.Li Aq type +must be: +.Dl Ao type Ac \ ⟶\ Op So uid Sc | So gid Sc +i.e., one of the literal strings +.Ql uid +or +.Ql gid . +.Li Aq id +must be the numerical ID of a user or group, and is matched with the current +process real ID of the corresponding type. +.Ss Rule's Ao to Ac Part +The second part of a rule, +.Li Aq to , +is a comma-separated +.Pq Ql "," +non-empty list of target clauses: +.Dl Ao to Ac \ ⟶\ Ao target_clause Ac Oo So "," Sc Ao target_clause Ac Oc Ns * +Target clauses of a given rule also form a disjunction, i.e., the IDs they +specify are alternatives for the target credentials, except in some cases +described below. +.Pp +The next subsections describe the syntax of target clauses, the defaults that +apply and the principle of non-redundancy and non-contradiction in each rule's +.Li Aq to +part. +.Ss Target Clauses +A target clause in a rule's +.Li Aq to +part must be of one of the following forms: +.Dl Ao target_clause Ac \ ⟶\ So any Sc +.Dl Ao target_clause Ac \ ⟶\ Ao flags Ac Ao type Ac So = Sc Ao id Ac +The first form is a compact way to specify that any target credentials are +allowed. +The second form is similar to that of +.Li Aq from +clauses, with the following extensions: +.Bl -bullet -compact +.It +.Li Aq id +may also be a literal +.Ql * +or +.Ql any +or +.Ql "." . +.Ql * +and +.Ql any +both designate any ID for the specified +.Li Aq type , +and are treated identically. +.Ql "." +designates the process' current IDs for the specified +.Li Aq type , +as explained below. +.It +.Li Aq flags +may contain at most one of the +.Ql + , +.Ql - +and +.Ql "!" +characters, and may be non-empty only when +.Li Aq type +is +.Ql gid . +Additionally, if +.Li Aq id +is +.Ql * +or +.Ql any , +only the +.Ql + +flag may appear. +.El +.Pp +For target clauses of +.Ql gid +type, an absence of flag indicates that the specified group ID is allowed as the +real, effective and/or saved group IDs +.Pq the Do primary Dc groups . +Conversely, the presence of any allowed flag indicates that the specification +concerns supplementary groups. +Each flag has a specific meaning: +.Bl -bullet -compact +.It +.Ql + +indicates that the group ID is allowed as a supplementary group. +.It +.Ql "!" +indicates that the group ID is mandatory, i.e., it must be listed in the +supplementary groups. +.It +.Ql - +indicates that the group ID must not be listed in the supplementary groups. +.El +A specification with +.Ql - +is only useful in conjunction with a +.Ql + Ns +-tagged specification where only one of them has +.Ql "." +as its +.Li Aq id . +Target clauses having the +.Ql "!" +or +.Ql - +flag are +.Dq forcing +clauses, and as such do not take part in the disjunction of the other +target clauses but rather unconditionally apply in their rule. +.Pp +.Ql "." +is a placeholder for IDs that the calling process already has on privilege +check. +For type +.Ql uid , +it designates any of the process' real, effective or +saved user IDs. +For type +.Ql gid , +its effect depends on whether flags are present. +If none is present, it designates any of the process' real, effective or saved +group IDs. +If one is present, it designates any of the process' supplementary groups. +.Ss Defaults for the Ao to Ac Part +If the +.Li Aq to +part does not list a target clause with type +.Ql uid , +any of the current user IDs of the calling process is accepted. +In other words, in this case, +.Nm +behaves as if a target clause of: +.Dl uid=. +had been listed. +.Pp +Similarly, if the +.Li Aq to +part does not list a target clause with type +.Ql gid , +all the groups of the calling process are assumed to be required. +More precisely, each of the desired real, effective and saved group IDs must be +one of the current real, effective or saved group ID, and all supplementary +groups must be the same as those that are current. +It is as if the +.Li Aq to +part had contained the following two clauses: +.Dl gid=.,!gid=. +.Ss Non-Redundancy and Non-Contradiction in a Ao to Ac Part +No two target clauses of a single rule may express the exact same logical intent +nor contradictory ones. +.Pp +In practice, no two clauses may display the same ID except for group IDs but +only if, each time the same ID appears, it does so with a different flag, or no +flags only once. +Additionally, the specified flags in multiple occurences must not be +contradictory. +For example, the same group ID appearing with both +.Ql + +and +.Ql - +will cause rejection of the rule. +.Ss Parsing Specifics +Any amount of whitespace is allowed around tokens of the above grammar, except +that there may be no spaces between +.Li Aq flags +and +.Li Aq id +in target clauses. +.Pp +For convenience, numerical IDs may be specified as negative integers, which are +then converted to unsigned ones as specified in the C standard for the +.Vt uid_t +and +.Vt gid_t +types, which are both 64-bit unsigned integers. +.Sh RUNTIME CONFIGURATION +The following +.Xr sysctl 8 +knobs are available: +.Bl -tag -width indent +.It Va security.mac.do.enabled +Enable the +.Nm +policy. +(Default: 1). +.It Va security.mac.do.rules +The list of credential rules, whose syntax is described in the +.Sx CREDENTIALS RULES +section above. +This list is specific to each jail. +Please see the +.Sx JAIL SUPPORT +section below for more details on the interaction of +.Nm +with jails. +.It Va security.mac.do.print_parse_error +Logs a message on trying to set incorrect rules via the +.Va security.mac.do.rules +.Xr sysctl 8 +knob. +.El +.Sh JAIL SUPPORT +.Nm +supports per-jail configuration of rules. +.Pp +By default, at creation, a new jail has no credentials rules, effectively +disabling +.Nm +for its processes. +.Pp +The following jail parameters are defined: +.Bl -tag -width indent +.It Va mac.do +Possible values are: +.Bl -tag -width "'disable'" -compact +.It Ql enable +.Nm +will enforce specific credential rules in the jail. +The +.Va mac.do.rules +jail parameter must also be set in this case. +.It Ql disable +Disables +.Nm +in the jail. +Strictly equivalent to jail creation's default behavior and to setting the rules +to an empty string. +.It Ql inherit +The jail's credentials rules are inherited from the jail's parent +.Pq which may themselves have been inherited . +Modified rules propagate to all children jails configured for inheritance. +.El +.It Va mac.do.rules +The credentials rules for the jail. +It is always equal to the value that can be retrieved by the +.Xr sysctl 8 +knob +.Va security.mac.do.rules +described in section +.Sx RUNTIME CONFIGURATION . +If set, and the jail parameter +.Va mac.do +is not so explicitly, the value of the latter will default to +.Ql disable +if empty, else to +.Ql enable . +.El +.Pp +Each jail must have +.Xr mdo 1 +installed at path +.Pa /usr/bin/mdo , +as this path is currently not configurable. +.Sh EXAMPLES +Here are several examples of single rules matching processes having a real user +ID of 10001: +.Bl -tag -width indent +.It Li uid=10001>uid=10002 +Allows the process to switch all of its real, effective or saved user ID to +10002, but keeping the groups it is already in, and with the same +primary/supplementary groups split. +.It Li uid=10001>uid=10002,uid=10003 +Same as the first example, but also allows to switch to UID 10003 instead of +10002, or possibly having both in different user IDs. +.It Li uid=10001>uid=10002,gid=10002 +Same as the first example, but the new primary groups must be set to 10002 and +no supplementary groups should be set. +.It Li uid=10001>uid=10002,gid=10002,+gid=.\& +Same as the previous example, but in addition allowing to retain any current +supplementary groups. +.It Li uid=10001>uid=10002,gid=10002,!gid=.\& +Same as the previous example, but with the additional constraint that all +current supplementary groups must be kept. +.It Li uid=10001>uid=10002,gid=10002,+gid=.,-gid=10001 +Same as +.Ql uid=10001>uid=10002,gid=10002,+gid=.\& +above, but 10001 cannot be retained as a supplementary group. +.It Li uid=10001>uid=10002,gid=10002,+gid=.,!gid=10003 +Same as +.Ql uid=10001>uid=10002,gid=10002,+gid=.\& +above, with the additional constraint that 10003 must appear in the +supplementary groups. +.It Li uid=10001>uid=10002,gid=*,+gid=* +Same as the first example, but lifting any constraints on groups, allowing the +process to become part of any groups it sees fit. +.El +.Pp +Here are several examples of single rules matching processes having a real group +ID of 10001: +.Bl -tag -width indent +.It Li gid=10001>uid=0 +Makes 10001 a more powerful +.Ql wheel +group, allowing its members to switch to root without password. +.It Li gid=10001>gid=10002 +Allows the process to enter GID 10002 as a primary group, but only if +giving up all its supplementary groups. +.It Li gid=10001>gid=10002,+gid=.\& +Same as the previous example, but allows to retain any current supplementary +groups. +.It Li gid=10001>gid=10002,!gid=.\& +Same as the previous example, but with the additional constraint that all +current supplementary groups must be kept. +.El +.Sh SEE ALSO +.Xr mdo 1 , +.Xr setcred 2 , +.Xr mac 4 , +.Xr jail 8 , +.Xr sysctl 8 +.Sh AUTHORS +.An Olivier Certner Aq Mt olce@FreeBSD.org +.An Baptiste Daroussin Aq Mt bapt@FreeBSD.org +.Sh BUGS +Currently, +.Nm +considers only credentials transitions requested through the +.Xr setcred 2 +system call. +This system call was in large part created so that +.Nm +can see whole credentials transitions to decide whether to authorize them, which +the traditional UNIX's piecewise approach of successively changing different +parts of them cannot allow. +.Pp +However, calls to traditional or standard credentials-changing functions can be +considered as full transitions on their own, however limited, and as such should +be equally monitored by +.Nm . +Future work will lift this restriction. +.Sh SECURITY CONSIDERATIONS +The threat model for +.Nm +is to consider userland programs as generally untrustable to decide upon which +credentials changes are acceptable. +It is in contrast with the traditional UNIX way to change credentials, in which +specialized programs are installed with the setuid bit, giving them full +administrator privileges so that they are effectively able to establish new +ones. +Vulnerabilities in such credentials-changing programs can have catastrophic +consequences on the integrity of the system. +.Pp +Consequently, +.Nm +does not rely on companion userland programs to decide whether some credentials +transition is acceptable. +Instead, it maintains its own configuration independently from the userland +password and group databases. +Establishing this configuration currently itself relies on userland programs +issuing calls to +.Xr sysctl 3 +or +.Xr jail 2 . +It should thus be established near system boot or jail start, before any +possible attacks could happen on the system, and further measures should be +taken to ensure that potential corruptions does not affect the configuration in +subsequent restarts, such as re-establishing pristine state or ensuring that the +boot procedure up to the configuration of +.Nm +can be trusted. diff --git a/share/man/man4/mac_ifoff.4 b/share/man/man4/mac_ifoff.4 index 3800eeaf4cb4..05332c8cabd8 100644 --- a/share/man/man4/mac_ifoff.4 +++ b/share/man/man4/mac_ifoff.4 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 25, 2015 .Dt MAC_IFOFF 4 .Os diff --git a/share/man/man4/mac_ipacl.4 b/share/man/man4/mac_ipacl.4 new file mode 100644 index 000000000000..5ff5ad3fdf55 --- /dev/null +++ b/share/man/man4/mac_ipacl.4 @@ -0,0 +1,164 @@ +.\" Copyright (c) 2019, 2023 Shivank Garg <shivank@FreeBSD.org> +.\" +.\" This code was developed as a Google Summer of Code 2019 project +.\" under the guidance of Bjoern A. Zeeb. +.\" +.\" 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 AUTHORS 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 AUTHORS 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. +.\" +.Dd July 25, 2023 +.Dt MAC_IPACL 4 +.Os +.Sh NAME +.Nm mac_ipacl +.Nd "IP Address access control policy" +.Sh SYNOPSIS +Add the following lines in your kernel configuration file to compile the +IP address access control policy into your kernel: +.Bd -ragged -offset indent +.Cd "options MAC" +.Cd "options MAC_IPACL" +.Ed +.Pp +To load the mac_ipacl policy module at boot time, add the +following line in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "options MAC" +.Ed +.Pp +and in +.Xr loader.conf 5 add: +.Pp +.Dl "mac_ipacl_load=""YES""" +.Sh DESCRIPTION +The +.Nm +policy allows the root of the host to use the +.Xr sysctl 8 +interface to limit the +.Xr VNET 9 +jail's ability to set IPv4 and IPv6 addresses. +So, the host can +define rules for jails and their interfaces about IP addresses +with +.Xr sysctl 8 +MIBs. +.Pp +Its default behavior is to deny all IP addresses for the jail if +.Nm +policy is enforced and allow/deny IP (or subnets) according to the +.Va security.mac.ipacl.rules +string specified with +.Xr sysctl 8 +.Ss Runtime Configuration +The following +.Xr sysctl 8 +MIBs are used to control enforcement and behavior of this MAC Policy. +.Bl -tag -width indent +.It Va security.mac.ipacl.ipv4 +Enforce +.Nm +for IPv4 addresses. +(Default: 1). +.It Va security.mac.ipacl.ipv6 +Enforce +.Nm +for IPv6 addresses. +(Default: 1). +.It Va security.mac.ipacl.rules +The IP address access control list is specified in the following format: +.Pp +.Sm off +.D1 jid , allow , interface , addr_family , IP_addr / prefix Op @ jid , ... +.Sm on +.Bl -tag -width "interface" +.It jid +Describe the jail id of the jail for which the rule is written. +.It allow +1 for allow and 0 for deny. +Decides action performed for the rule. +.It interface +Name of the interface the rule is enforced for. +If the interface is left empty then it is a wildcard to enforce the +rule for all interfaces. +.It addr_family +Address family of the IP_addr. +The input to be given as AF_INET or AF_INET6 +string only. +.It IP_addr +IP address (or subnet) to be allowed/denied. +Action depends on the prefix length. +.It prefix +Prefix length of the subnet to be enforced by the policy. +-1 implies the policy is enforced for the individual IP address. +For a non-negative value, a range of IP addresses (present in subnet) +which is calculated as subnet = IP_addr & mask. +.El +.El +.Sh EXAMPLES +Behavior of the +.Nm +policy module for different inputs of sysctl variable: +.Bl -tag -width "1." +.It 1. +Assign ipv4=1, ipv6=0 and rules="1,1,,AF_INET,169.254.123.123/-1" +.Pp +It allow only 169.254.123.123 IPv4 address for all interfaces (wildcard) of jail 1. +It allows all IPv6 addresses since the policy is not enforced for IPv6. +.It 2. +Assign ipv4=1, ipv6=1 and rules="1,1,epair0b,AF_INET6,fe80::/32@1,0,epair0b,AF_INET6,fe80::abcd/-1" +.Pp +It denies all IPv4 addresses as the policy is enforced but no rules are specified +about it. +It allows all IPv6 addresses in subnet fe80::/32 except +fe80::abcd for interface epair0b only. +.It 3. +Assign ipv4=1, ipv6=1, rules="2,1,,AF_INET6,fc00::/7@2,0,,AF_INET6,fc00::1111:2200/120@2,1,,AF_INET6,fc00::1111:2299/-1@1,1,,AF_INET,198.51.100.0/24" +.Pp +It allows IPv4 in subnet 198.51.100.0/24 for jail 2 and +all interfaces. +It allows IPv6 addresses in subnet fc00::/7 but +denies subnet fc00::1111:2200/120, and allows individual IP +fc00::1111:2299 from the denied subnet for all interfaces in jail 2. +.El +Please refer to mac/ipacl tests-framework for wide variety of examples on using +the ipacl module. +.Sh LIMITATIONS/PRECAUTIONS +In the case where multiple rules are applicable to an IP address or +a set of IP addresses, the rule that is defined later in the list +determines the outcome, disregarding any previous rule for that IP +address. +.Sh FUTURE WORKS +Rules are given with sysctl interface which gets very complex to give them +all in command line. +It has to be simplified with a better way to input those rules. +.Sh SEE ALSO +.Xr mac 4 , +.Xr mac 9 +.Sh AUTHORS +The +.Nm +policy module was developed as a Google Summer of Code Project in 2019 +by +.An -nosplit +.An "Shivank Garg" Aq Mt shivank@FreeBSD.org +under the guidance of +.An "Bjoern A. Zeeb" Aq Mt bz@FreeBSD.org . diff --git a/share/man/man4/mac_lomac.4 b/share/man/man4/mac_lomac.4 index 2085655ec40c..702646f9c233 100644 --- a/share/man/man4/mac_lomac.4 +++ b/share/man/man4/mac_lomac.4 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 25, 2012 .Dt MAC_LOMAC 4 .Os diff --git a/share/man/man4/mac_mls.4 b/share/man/man4/mac_mls.4 index 54502f96ab2c..608c1a7239ab 100644 --- a/share/man/man4/mac_mls.4 +++ b/share/man/man4/mac_mls.4 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 25, 2015 .Dt MAC_MLS 4 .Os diff --git a/share/man/man4/mac_none.4 b/share/man/man4/mac_none.4 index 45b4ae6b91e6..ee9309069cc0 100644 --- a/share/man/man4/mac_none.4 +++ b/share/man/man4/mac_none.4 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 25, 2015 .Dt MAC_NONE 4 .Os diff --git a/share/man/man4/mac_ntpd.4 b/share/man/man4/mac_ntpd.4 index 85abfd0c97c0..083af4b6e672 100644 --- a/share/man/man4/mac_ntpd.4 +++ b/share/man/man4/mac_ntpd.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 20, 2018 .Dt MAC_NTPD 4 .Os diff --git a/share/man/man4/mac_partition.4 b/share/man/man4/mac_partition.4 index ecf65ea8d518..f526601eee6c 100644 --- a/share/man/man4/mac_partition.4 +++ b/share/man/man4/mac_partition.4 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 25, 2015 .Dt MAC_PARTITION 4 .Os diff --git a/share/man/man4/mac_portacl.4 b/share/man/man4/mac_portacl.4 index fce539376b15..ca7be679aa70 100644 --- a/share/man/man4/mac_portacl.4 +++ b/share/man/man4/mac_portacl.4 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 9, 2004 .Dt MAC_PORTACL 4 .Os diff --git a/share/man/man4/mac_priority.4 b/share/man/man4/mac_priority.4 index 868d027d5233..c63197d5fc29 100644 --- a/share/man/man4/mac_priority.4 +++ b/share/man/man4/mac_priority.4 @@ -125,4 +125,4 @@ MAC first appeared in and .Nm first appeared in -.Fx 14.0 . +.Fx 13.1 . diff --git a/share/man/man4/mac_seeotheruids.4 b/share/man/man4/mac_seeotheruids.4 index 1b45d55614aa..5b1718bf83d4 100644 --- a/share/man/man4/mac_seeotheruids.4 +++ b/share/man/man4/mac_seeotheruids.4 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 25, 2015 .Dt MAC_SEEOTHERUIDS 4 .Os diff --git a/share/man/man4/mac_stub.4 b/share/man/man4/mac_stub.4 index 66c5b978b2ac..7126898e447d 100644 --- a/share/man/man4/mac_stub.4 +++ b/share/man/man4/mac_stub.4 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 25, 2015 .Dt MAC_STUB 4 .Os diff --git a/share/man/man4/mac_test.4 b/share/man/man4/mac_test.4 index 9039c4b46282..6c5c056e2c29 100644 --- a/share/man/man4/mac_test.4 +++ b/share/man/man4/mac_test.4 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 25, 2015 .Dt MAC_TEST 4 .Os diff --git a/share/man/man4/malo.4 b/share/man/man4/malo.4 index ea1ffb5c2fe9..00b4ce4cd9ba 100644 --- a/share/man/man4/malo.4 +++ b/share/man/man4/malo.4 @@ -28,8 +28,6 @@ .\" 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 DAMAGES. -.\" -.\" $FreeBSD$ .\"/ .Dd June 24, 2015 .Dt MALO 4 diff --git a/share/man/man4/man4.aarch64/Makefile b/share/man/man4/man4.aarch64/Makefile index d1fbced3b0a8..0e85aab8b770 100644 --- a/share/man/man4/man4.aarch64/Makefile +++ b/share/man/man4/man4.aarch64/Makefile @@ -1,5 +1,3 @@ -# $FreeBSD$ - .PATH: ${.CURDIR}/../man4.arm # Some manpages are common to arm and aarch64 MAN= \ @@ -8,6 +6,7 @@ MAN= \ felix.4 \ rk_gpio.4 \ rk_grf.4 \ + rk_grf_gpio.4 \ rk_i2c.4 \ rk_pinctrl.4 \ diff --git a/share/man/man4/man4.aarch64/Makefile.depend b/share/man/man4/man4.aarch64/Makefile.depend new file mode 100644 index 000000000000..f80275d86ab1 --- /dev/null +++ b/share/man/man4/man4.aarch64/Makefile.depend @@ -0,0 +1,11 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/share/man/man4/man4.aarch64/armv8crypto.4 b/share/man/man4/man4.aarch64/armv8crypto.4 index 375f3ca1a135..7b8704395daf 100644 --- a/share/man/man4/man4.aarch64/armv8crypto.4 +++ b/share/man/man4/man4.aarch64/armv8crypto.4 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 29, 2020 .Dt ARMV8CRYPTO 4 .Os diff --git a/share/man/man4/man4.aarch64/enetc.4 b/share/man/man4/man4.aarch64/enetc.4 index 4680fd478813..33f796347f96 100644 --- a/share/man/man4/man4.aarch64/enetc.4 +++ b/share/man/man4/man4.aarch64/enetc.4 @@ -1,5 +1,5 @@ .\" - -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2021 Alstom Group. .\" Copyright (c) 2021 Semihalf. diff --git a/share/man/man4/man4.aarch64/felix.4 b/share/man/man4/man4.aarch64/felix.4 index 738309a4cc84..15caef6d274f 100644 --- a/share/man/man4/man4.aarch64/felix.4 +++ b/share/man/man4/man4.aarch64/felix.4 @@ -1,5 +1,5 @@ .\" - -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2021 Alstom Group. .\" Copyright (c) 2021 Semihalf. diff --git a/share/man/man4/man4.aarch64/rk_gpio.4 b/share/man/man4/man4.aarch64/rk_gpio.4 index b0c9e50d81cf..b5648662cf5e 100644 --- a/share/man/man4/man4.aarch64/rk_gpio.4 +++ b/share/man/man4/man4.aarch64/rk_gpio.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd Apr 26, 2018 .Dt RK_GPIO 4 .Os @@ -49,7 +47,7 @@ rockchip,gpio-bank .El .Sh SEE ALSO .Xr gpiobus 4 , -.Xr gpioctl 8 , +.Xr gpioctl 8 .Sh HISTORY The .Nm diff --git a/share/man/man4/man4.aarch64/rk_grf.4 b/share/man/man4/man4.aarch64/rk_grf.4 index 792e9ef23ba6..64ed468c1983 100644 --- a/share/man/man4/man4.aarch64/rk_grf.4 +++ b/share/man/man4/man4.aarch64/rk_grf.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd Apr 26, 2018 .Dt RK_GRF 4 .Os diff --git a/share/man/man4/man4.aarch64/rk_grf_gpio.4 b/share/man/man4/man4.aarch64/rk_grf_gpio.4 new file mode 100644 index 000000000000..6a5ebbe19e3b --- /dev/null +++ b/share/man/man4/man4.aarch64/rk_grf_gpio.4 @@ -0,0 +1,42 @@ +.\" +.\" Copyright (c) 2025 Stephen Hurd <shurd@freebsd.org> +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd March 18, 2025 +.Dt RK_GRF_GPIO 4 +.Os +.Sh NAME +.Nm rk_grf_gpio +.Nd RockChip GPIO_MUTE pin driver +.Sh SYNOPSIS +.Cd "options SOC_ROCKCHIP_rk3328" +.Sh DESCRIPTION +The +.Nm +driver provides a single-pin, output-only +.Xr gpio 3 +unit whose single pin is named GPIO_MUTE. +This controls the output of the GPIO_MUTE pin on the SoC. +.Pp +This gpio is usually used to control another device on the board, +so is not usually available for user software. +.Sh HARDWARE +The +.Nm +driver supports the following GRF GPIO controller: +.Pp +.Bl -bullet -compact +.It +rockchip,rk3328-grf-gpio +.El +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 15.0 . +.Sh AUTHORS +The +.Nm +driver and manual were written by +.An Stephen Hurd Aq Mt shurd@freebsd.org . diff --git a/share/man/man4/man4.aarch64/rk_i2c.4 b/share/man/man4/man4.aarch64/rk_i2c.4 index 277c875aff7e..be1a0fab943e 100644 --- a/share/man/man4/man4.aarch64/rk_i2c.4 +++ b/share/man/man4/man4.aarch64/rk_i2c.4 @@ -1,5 +1,5 @@ .\"- -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2018 Emmanuel Vadot <manu@freebsd.org> .\" @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 14, 2018 .Dt RK_I2C 4 .Os @@ -51,7 +49,7 @@ rockchip,rk3328-i2c .El .Sh SEE ALSO .Xr iic 4 , -.Xr iicbus 4 , +.Xr iicbus 4 .Sh HISTORY The .Nm diff --git a/share/man/man4/man4.aarch64/rk_pinctrl.4 b/share/man/man4/man4.aarch64/rk_pinctrl.4 index 6135df66c7aa..519b3e793cd1 100644 --- a/share/man/man4/man4.aarch64/rk_pinctrl.4 +++ b/share/man/man4/man4.aarch64/rk_pinctrl.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd Apr 26, 2018 .Dt RK_PINCTRL 4 .Os @@ -48,7 +46,7 @@ compatible strings : rockchip,rk3328-pinctrl .El .Sh SEE ALSO -.Xr fdt_pinctrl 4 , +.Xr fdt_pinctrl 4 .Sh HISTORY The .Nm diff --git a/share/man/man4/man4.arm/Makefile b/share/man/man4/man4.arm/Makefile index 76146f4ebdb7..6b046a1002a2 100644 --- a/share/man/man4/man4.arm/Makefile +++ b/share/man/man4/man4.arm/Makefile @@ -1,6 +1,5 @@ -# $FreeBSD$ - MAN= \ + ar40xx.4 \ aw_gpio.4 \ aw_mmc.4 \ aw_rtc.4 \ diff --git a/share/man/man4/man4.arm/Makefile.depend b/share/man/man4/man4.arm/Makefile.depend index f80275d86ab1..11aba52f82cf 100644 --- a/share/man/man4/man4.arm/Makefile.depend +++ b/share/man/man4/man4.arm/Makefile.depend @@ -1,4 +1,3 @@ -# $FreeBSD$ # Autogenerated - do NOT edit! DIRDEPS = \ diff --git a/share/man/man4/man4.arm/am335x_dmtpps.4 b/share/man/man4/man4.arm/am335x_dmtpps.4 index fadd702a6174..d565c65e2cf1 100644 --- a/share/man/man4/man4.arm/am335x_dmtpps.4 +++ b/share/man/man4/man4.arm/am335x_dmtpps.4 @@ -23,8 +23,6 @@ .\" (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 August 12, 2015 .Dt AM335X_DMTPPS 4 .Os diff --git a/share/man/man4/man4.arm/ar40xx.4 b/share/man/man4/man4.arm/ar40xx.4 new file mode 100644 index 000000000000..e314d30dd4c6 --- /dev/null +++ b/share/man/man4/man4.arm/ar40xx.4 @@ -0,0 +1,35 @@ +.\" +.\" Copyright (c) 2025 Alexander Ziaee +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd May 10, 2025 +.Dt AR40XX 4 arm +.Sh NAME +.Nm ar40xx_switch +.Nd Qualcomm IPQ4018/IPQ4019 Gigabit Ethernet switch driver +.Sh SYNOPSIS +.Cd device mdio +.Cd etherswitch +.Cd ar40xx_switch +.Sh DESCRIPTION +The +.Nm +driver supports the Gigabit Ethernet switch inside the +Qualcomm IPQ4018/IPQ4019 SoC. +.Sh HARDWARE +The +.Nm +driver supports the following Gigabit Ethernet switch controllers: +.Pp +.Bl -bullet -compact +.It +Qualcomm IPQ 4019 Five-port Gigabit Ethernet Switch +.It +Qualcomm IPQ 4018 Five-port Gigabit Ethernet Switch +.El +.Sh SEE ALSO +.Xr etherswitch 4 , +.Xr etherswitchcfg 8 +.Sh CAVEATS +This driver currently only supports L2 port/VLAN mapping modes. diff --git a/share/man/man4/man4.arm/aw_gpio.4 b/share/man/man4/man4.arm/aw_gpio.4 index 0bac2a59bc69..5cbc7562d9bd 100644 --- a/share/man/man4/man4.arm/aw_gpio.4 +++ b/share/man/man4/man4.arm/aw_gpio.4 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd Dec 25, 2017 +.Dd October 8, 2024 .Dt AW_GPIO 4 .Os .Sh NAME @@ -43,6 +41,7 @@ .Cd "options SOC_ALLWINNER_H3" .Cd "options SOC_ALLWINNER_A64" .Cd "options SOC_ALLWINNER_H5" +.Cd "options SOC_ALLWINNER_D1" .Sh DESCRIPTION The .Nm @@ -83,6 +82,8 @@ allwinner,sun8i-h3-r-pinctrl allwinner,sun50i-a64-pinctrl .It allwinner,sun50i-a64-r-pinctrl +.It +allwinner,sun20i-d1-pinctrl .El .Sh SEE ALSO .Xr fdt 4 , diff --git a/share/man/man4/man4.arm/aw_mmc.4 b/share/man/man4/man4.arm/aw_mmc.4 index 27994e27c51f..eb7fc9ce020a 100644 --- a/share/man/man4/man4.arm/aw_mmc.4 +++ b/share/man/man4/man4.arm/aw_mmc.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd Dec 25, 2017 .Dt AW_MMC 4 .Os diff --git a/share/man/man4/man4.arm/aw_rtc.4 b/share/man/man4/man4.arm/aw_rtc.4 index 8fda671d6858..1296cd41da68 100644 --- a/share/man/man4/man4.arm/aw_rtc.4 +++ b/share/man/man4/man4.arm/aw_rtc.4 @@ -22,14 +22,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd Dec 25, 2017 +.Dd December 10, 2024 .Dt AW_RTC 4 .Os .Sh NAME .Nm aw_rtc -.Nd driver for the RTC controller in Allwinner SoC +.Nd driver for the real-time clock (RTC) controller in Allwinner SoC .Sh DESCRIPTION The .Nm @@ -37,8 +35,8 @@ device driver provides support for the Allwinner RTC controller. .Sh HARDWARE The current version of the .Nm -driver supports the RTC controller with one of the following compatible -strings : +driver supports the RTC controller with any of the following compatible +strings: .Pp .Bl -bullet -compact .It @@ -47,6 +45,14 @@ allwinner,sun4i-a10-rtc allwinner,sun7i-a20-rtc .It allwinner,sun6i-a31-rtc +.It +allwinner,sun8i-h3-rtc +.It +allwinner,sun20i-d1-rtc +.It +allwinner,sun50i-h5-rtc +.It +allwinner,sun50i-h6-rtc .El .Sh HISTORY The diff --git a/share/man/man4/man4.arm/aw_sid.4 b/share/man/man4/man4.arm/aw_sid.4 index a6e21207f0da..5cd2f3d5e072 100644 --- a/share/man/man4/man4.arm/aw_sid.4 +++ b/share/man/man4/man4.arm/aw_sid.4 @@ -1,5 +1,5 @@ .\"- -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org> .\" @@ -24,9 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd January 6, 2018 +.Dd October 8, 2024 .Dt AW_SID 4 .Os .Sh NAME @@ -55,6 +53,10 @@ allwinner,sun50i-a64-sid allwinner,sun8i-a83t-sid .It allwinner,sun8i-h3-sid +.It +allwinner,sun50i-h5-sid +.It +allwinner,sun20i-d1-sid .El .Sh SYSCTL VARIABLES The following read-only variables are available via diff --git a/share/man/man4/man4.arm/aw_spi.4 b/share/man/man4/man4.arm/aw_spi.4 index 630cfda95177..f8985e1c16bb 100644 --- a/share/man/man4/man4.arm/aw_spi.4 +++ b/share/man/man4/man4.arm/aw_spi.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 17, 2018 .Dt AW_SPI 4 .Os diff --git a/share/man/man4/man4.arm/aw_syscon.4 b/share/man/man4/man4.arm/aw_syscon.4 index 8430e63b8f14..e32f329e489a 100644 --- a/share/man/man4/man4.arm/aw_syscon.4 +++ b/share/man/man4/man4.arm/aw_syscon.4 @@ -1,5 +1,5 @@ .\"- -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org> .\" @@ -24,9 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd January 7, 2018 +.Dd November 11, 2024 .Dt AW_SYSCON 4 .Os .Sh NAME @@ -50,9 +48,17 @@ strings: .It allwinner,sun50i-a64-system-controller .It +allwinner,sun50i-a64-system-control +.It allwinner,sun8i-a83t-system-controller .It allwinner,sun8i-h3-system-controller +.It +allwinner,sun8i-h3-system-control +.It +allwinner,sun50i-h5-system-control +.It +allwinner,sun20i-d1-system-control .El .Sh AUTHORS The diff --git a/share/man/man4/man4.arm/bcm283x_pwm.4 b/share/man/man4/man4.arm/bcm283x_pwm.4 index 2b1266a7046a..1fb5a830ace7 100644 --- a/share/man/man4/man4.arm/bcm283x_pwm.4 +++ b/share/man/man4/man4.arm/bcm283x_pwm.4 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2017 Poul-Henning Kamp <phk@FreeBSD.org> .\" All rights reserved. @@ -24,8 +24,6 @@ .\" (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 10, 2018 .Dt BCM283X_PWM 4 .Os diff --git a/share/man/man4/man4.arm/devcfg.4 b/share/man/man4/man4.arm/devcfg.4 index f33044613077..ddf368a85f24 100644 --- a/share/man/man4/man4.arm/devcfg.4 +++ b/share/man/man4/man4.arm/devcfg.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 28, 2013 .Dt DEVCFG 4 .Os diff --git a/share/man/man4/man4.arm/imx6_ahci.4 b/share/man/man4/man4.arm/imx6_ahci.4 index df20e79b061d..9979cef50d79 100644 --- a/share/man/man4/man4.arm/imx6_ahci.4 +++ b/share/man/man4/man4.arm/imx6_ahci.4 @@ -23,8 +23,6 @@ .\" (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 July 7, 2018 .Dt IMX6_AHCI 4 .Os @@ -57,7 +55,7 @@ data and marshall resources for the standard driver. .Sh SEE ALSO .Xr ahci 4 , -.Xr fdt 4 , +.Xr fdt 4 .Sh HISTORY The .Nm diff --git a/share/man/man4/man4.arm/imx6_snvs.4 b/share/man/man4/man4.arm/imx6_snvs.4 index d372d067cb15..b36c3ddd91c1 100644 --- a/share/man/man4/man4.arm/imx6_snvs.4 +++ b/share/man/man4/man4.arm/imx6_snvs.4 @@ -23,8 +23,6 @@ .\" (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 July 8, 2018 .Dt IMX6_SNVS 4 .Os diff --git a/share/man/man4/man4.arm/imx_spi.4 b/share/man/man4/man4.arm/imx_spi.4 index 8ce5bc0e8b41..e7555ed20d94 100644 --- a/share/man/man4/man4.arm/imx_spi.4 +++ b/share/man/man4/man4.arm/imx_spi.4 @@ -23,8 +23,6 @@ .\" (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 July 9, 2018 .Dt IMX_SPI 4 .Os diff --git a/share/man/man4/man4.arm/imx_wdog.4 b/share/man/man4/man4.arm/imx_wdog.4 index 062c84b23b24..4b993e1d066b 100644 --- a/share/man/man4/man4.arm/imx_wdog.4 +++ b/share/man/man4/man4.arm/imx_wdog.4 @@ -23,8 +23,6 @@ .\" (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 July 7, 2018 .Dt IMX_WDOG 4 .Os diff --git a/share/man/man4/man4.arm/mge.4 b/share/man/man4/man4.arm/mge.4 index ddbacaf8c3f4..e949b36f4307 100644 --- a/share/man/man4/man4.arm/mge.4 +++ b/share/man/man4/man4.arm/mge.4 @@ -23,8 +23,6 @@ .\" (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 November 27, 2008 .Dt MGE 4 .Os diff --git a/share/man/man4/man4.arm/ti_adc.4 b/share/man/man4/man4.arm/ti_adc.4 index 7c70c27383d2..d71547231e4c 100644 --- a/share/man/man4/man4.arm/ti_adc.4 +++ b/share/man/man4/man4.arm/ti_adc.4 @@ -22,8 +22,6 @@ .\" (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 June 1, 2014 .Dt TI_ADC 4 .Os diff --git a/share/man/man4/man4.i386/CPU_ELAN.4 b/share/man/man4/man4.i386/CPU_ELAN.4 index 5405743ef325..c77b6cdc30a2 100644 --- a/share/man/man4/man4.i386/CPU_ELAN.4 +++ b/share/man/man4/man4.i386/CPU_ELAN.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 23, 2003 .Dt CPU_ELAN 4 i386 .Os diff --git a/share/man/man4/man4.i386/Makefile b/share/man/man4/man4.i386/Makefile index 3dfc5f151f9f..ad9b3a01828c 100644 --- a/share/man/man4/man4.i386/Makefile +++ b/share/man/man4/man4.i386/Makefile @@ -1,8 +1,4 @@ -# $FreeBSD$ - MAN= apm.4 \ - ce.4 \ - cp.4 \ CPU_ELAN.4 \ glxiic.4 \ glxsb.4 \ diff --git a/share/man/man4/man4.i386/Makefile.depend b/share/man/man4/man4.i386/Makefile.depend index f80275d86ab1..11aba52f82cf 100644 --- a/share/man/man4/man4.i386/Makefile.depend +++ b/share/man/man4/man4.i386/Makefile.depend @@ -1,4 +1,3 @@ -# $FreeBSD$ # Autogenerated - do NOT edit! DIRDEPS = \ diff --git a/share/man/man4/man4.i386/apm.4 b/share/man/man4/man4.i386/apm.4 index 706ab226df3a..48248e8a4cdd 100644 --- a/share/man/man4/man4.i386/apm.4 +++ b/share/man/man4/man4.i386/apm.4 @@ -9,8 +9,6 @@ .\" the author assume any responsibility for damages incurred with its .\" use. .\" -.\" $FreeBSD$ -.\" .Dd November 1, 1994 .Dt APM 4 i386 .Os diff --git a/share/man/man4/man4.i386/cp.4 b/share/man/man4/man4.i386/cp.4 deleted file mode 100644 index 2e86e03a7de3..000000000000 --- a/share/man/man4/man4.i386/cp.4 +++ /dev/null @@ -1,95 +0,0 @@ -.\" Copyright (c) 2003-2004 Roman Kurakin <rik@cronyx.ru> -.\" Copyright (c) 2003-2004 Cronyx Engineering -.\" All rights reserved. -.\" -.\" This software is distributed with NO WARRANTIES, not even the implied -.\" warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -.\" -.\" Authors grant any other persons or organisations a permission to use, -.\" modify and redistribute this software in source and binary forms, -.\" as long as this message is kept with the software, all derivative -.\" works or modified versions. -.\" -.\" Cronyx Id: cp.4,v 1.1.2.5 2004/06/21 17:47:40 rik Exp $ -.\" $FreeBSD$ -.\" -.Dd October 22, 2021 -.Dt CP 4 i386 -.Os -.Sh NAME -.Nm cp -.Nd "driver for synchronous Cronyx Tau-PCI WAN adapters" -.Sh SYNOPSIS -To compile this driver into the kernel, -place the following line in your -kernel configuration file: -.Bd -ragged -offset indent -.Cd "device cp" -.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 -if_cp_load="YES" -.Ed -.Pp -.Sh DESCRIPTION -The -.Nm -driver creates a -.Xr netgraph 4 -node for each device found. -The node is usually paired with -.Xr ng_async 4 , -.Xr ng_cisco 4 , -.Xr ng_frame_relay 4 -or with -.Xr ng_ppp 4 -under control of net/mpd5 port. -.Pp -Refer to -.Xr sconfig 8 -for information about the -.Nm -adapter configuration. -.Sh HARDWARE -The -.Nm -driver supports the following models of Tau-PCI WAN adapters: -.Pp -.Bl -tag -width 20n -compact -.It Cronyx Tau-PCI -V.35 and RS-232 interfaces -.It Cronyx Tau-PCI/R -RS-530(RS-449) and X.21 interfaces -.It Cronyx Tau-PCI-L -one V.35 and RS-232 interface, low profile -.It Cronyx Tau-PCI-L/R -one RS-530(RS-449) and X.21 interface, low profile -.It Cronyx Tau-PCI-E1 -fractional E1 interfaces -.It Cronyx Tau-PCI-G703 -unframed E1 interfaces -.It Cronyx Tau-PCI-2E1 -fractional E1 and unframed E1 interfaces -.It Cronyx Tau-PCI-4E1 -fractional E1 and unframed E1 interfaces -.It Cronyx Tau-PCI-E3 -E3 interface -.It Cronyx Tau-PCI-T3 -T3 interface -.It Cronyx Tau-PCI-STS1 -STS-1 interface -.El -.Sh SEE ALSO -.Xr ce 4 , -.Xr netgraph 4 , -.Xr sconfig 8 -.Sh HISTORY -The -.Nm -driver was added in -.Fx 5.3 -and -.Fx 4.11 . diff --git a/share/man/man4/man4.i386/glxiic.4 b/share/man/man4/man4.i386/glxiic.4 index 63f59dc1c092..5e193799296e 100644 --- a/share/man/man4/man4.i386/glxiic.4 +++ b/share/man/man4/man4.i386/glxiic.4 @@ -21,8 +21,6 @@ .\" (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 May 15, 2011 .Dt GLXIIC 4 i386 .Os diff --git a/share/man/man4/man4.i386/glxsb.4 b/share/man/man4/man4.i386/glxsb.4 index c08d57906136..3dbd650ac8ed 100644 --- a/share/man/man4/man4.i386/glxsb.4 +++ b/share/man/man4/man4.i386/glxsb.4 @@ -14,8 +14,6 @@ .\"ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\"OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" .Dd July 29, 2020 .Dt GLXSB 4 i386 .Os diff --git a/share/man/man4/man4.i386/longrun.4 b/share/man/man4/man4.i386/longrun.4 index 865bb8d35bc1..329fcd4f69e4 100644 --- a/share/man/man4/man4.i386/longrun.4 +++ b/share/man/man4/man4.i386/longrun.4 @@ -22,8 +22,6 @@ .\" 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 June 30, 2001 .Dt LONGRUN 4 i386 .Os diff --git a/share/man/man4/man4.i386/npx.4 b/share/man/man4/man4.i386/npx.4 index 14a8eef1d64b..982360c5df49 100644 --- a/share/man/man4/man4.i386/npx.4 +++ b/share/man/man4/man4.i386/npx.4 @@ -28,7 +28,6 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $Id: npx.4,v 1.1 1993/08/06 10:58:03 cgd Exp $ -.\" $FreeBSD$ .\" .Dd August 28, 1993 .Dt NPX 4 i386 diff --git a/share/man/man4/man4.i386/pae.4 b/share/man/man4/man4.i386/pae.4 index 55c2aa62cce2..3ebb2bffc9d6 100644 --- a/share/man/man4/man4.i386/pae.4 +++ b/share/man/man4/man4.i386/pae.4 @@ -29,8 +29,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 8, 2003 .Dt PAE 4 i386 .Os diff --git a/share/man/man4/man4.i386/pbio.4 b/share/man/man4/man4.i386/pbio.4 index d04eb325d169..927ac46c8209 100644 --- a/share/man/man4/man4.i386/pbio.4 +++ b/share/man/man4/man4.i386/pbio.4 @@ -24,8 +24,6 @@ .\" 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 14, 2005 .Dt PBIO 4 i386 .Os diff --git a/share/man/man4/man4.i386/perfmon.4 b/share/man/man4/man4.i386/perfmon.4 index b9a00f53fd82..7a899e863f1b 100644 --- a/share/man/man4/man4.i386/perfmon.4 +++ b/share/man/man4/man4.i386/perfmon.4 @@ -25,8 +25,6 @@ .\" 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 March 26, 1996 .Dt PERFMON 4 i386 .Os diff --git a/share/man/man4/man4.i386/pnp.4 b/share/man/man4/man4.i386/pnp.4 index fadde4fe20e3..3afa48ae3f09 100644 --- a/share/man/man4/man4.i386/pnp.4 +++ b/share/man/man4/man4.i386/pnp.4 @@ -20,8 +20,6 @@ .\" (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 20, 2001 .Dt PNP 4 i386 .Os diff --git a/share/man/man4/man4.i386/pnpbios.4 b/share/man/man4/man4.i386/pnpbios.4 index b386be21f629..20097fc580ba 100644 --- a/share/man/man4/man4.i386/pnpbios.4 +++ b/share/man/man4/man4.i386/pnpbios.4 @@ -23,8 +23,6 @@ .\" 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 20, 2001 .Dt PNPBIOS 4 i386 .Os diff --git a/share/man/man4/man4.i386/sbni.4 b/share/man/man4/man4.i386/sbni.4 index 779deba287dc..e311d82e84ef 100644 --- a/share/man/man4/man4.i386/sbni.4 +++ b/share/man/man4/man4.i386/sbni.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 8, 2002 .Dt SBNI 4 i386 .Os diff --git a/share/man/man4/man4.i386/smapi.4 b/share/man/man4/man4.i386/smapi.4 index 116c40197cac..494e4bcc3164 100644 --- a/share/man/man4/man4.i386/smapi.4 +++ b/share/man/man4/man4.i386/smapi.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 1, 2003 .Dt SMAPI 4 i386 .Os diff --git a/share/man/man4/man4.i386/vpd.4 b/share/man/man4/man4.i386/vpd.4 index ba7acd4aea2c..83970ee1a6d5 100644 --- a/share/man/man4/man4.i386/vpd.4 +++ b/share/man/man4/man4.i386/vpd.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 31, 2004 .Dt VPD 4 i386 .Os diff --git a/share/man/man4/man4.powerpc/Makefile b/share/man/man4/man4.powerpc/Makefile index e6ade9778db3..1762bf17b50d 100644 --- a/share/man/man4/man4.powerpc/Makefile +++ b/share/man/man4/man4.powerpc/Makefile @@ -1,5 +1,3 @@ -# $FreeBSD$ - MAN= adb.4 \ akbd.4 \ abtn.4 \ diff --git a/share/man/man4/man4.powerpc/Makefile.depend b/share/man/man4/man4.powerpc/Makefile.depend index f80275d86ab1..11aba52f82cf 100644 --- a/share/man/man4/man4.powerpc/Makefile.depend +++ b/share/man/man4/man4.powerpc/Makefile.depend @@ -1,4 +1,3 @@ -# $FreeBSD$ # Autogenerated - do NOT edit! DIRDEPS = \ diff --git a/share/man/man4/man4.powerpc/abtn.4 b/share/man/man4/man4.powerpc/abtn.4 index 670f5a270b5f..92d643d5cf32 100644 --- a/share/man/man4/man4.powerpc/abtn.4 +++ b/share/man/man4/man4.powerpc/abtn.4 @@ -24,8 +24,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 16, 2011 .Dt ABTN 4 .Os diff --git a/share/man/man4/man4.powerpc/adb.4 b/share/man/man4/man4.powerpc/adb.4 index 05a17a49b240..a781787995ab 100644 --- a/share/man/man4/man4.powerpc/adb.4 +++ b/share/man/man4/man4.powerpc/adb.4 @@ -23,8 +23,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 3, 2009 .Dt ADB 4 .Os diff --git a/share/man/man4/man4.powerpc/akbd.4 b/share/man/man4/man4.powerpc/akbd.4 index 2ecaaefd1022..44af08961122 100644 --- a/share/man/man4/man4.powerpc/akbd.4 +++ b/share/man/man4/man4.powerpc/akbd.4 @@ -23,8 +23,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 3, 2009 .Dt AKBD 4 .Os diff --git a/share/man/man4/man4.powerpc/ams.4 b/share/man/man4/man4.powerpc/ams.4 index 00ce975bac86..21be3c098920 100644 --- a/share/man/man4/man4.powerpc/ams.4 +++ b/share/man/man4/man4.powerpc/ams.4 @@ -23,8 +23,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 3, 2009 .Dt AMS 4 .Os diff --git a/share/man/man4/man4.powerpc/cuda.4 b/share/man/man4/man4.powerpc/cuda.4 index 021b6a18d94f..7171ebb42373 100644 --- a/share/man/man4/man4.powerpc/cuda.4 +++ b/share/man/man4/man4.powerpc/cuda.4 @@ -23,8 +23,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 3, 2009 .Dt CUDA 4 .Os diff --git a/share/man/man4/man4.powerpc/dtsec.4 b/share/man/man4/man4.powerpc/dtsec.4 index 93d5b5759fc3..4a60dd0b8824 100644 --- a/share/man/man4/man4.powerpc/dtsec.4 +++ b/share/man/man4/man4.powerpc/dtsec.4 @@ -23,8 +23,6 @@ .\" (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 October 31, 2017 .Dt DTSEC 4 .Os diff --git a/share/man/man4/man4.powerpc/llan.4 b/share/man/man4/man4.powerpc/llan.4 index b9bf49ae614f..c32ddbca6a00 100644 --- a/share/man/man4/man4.powerpc/llan.4 +++ b/share/man/man4/man4.powerpc/llan.4 @@ -23,8 +23,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 19, 2015 .Dt LLAN 4 .Os @@ -52,7 +50,7 @@ but these are not currently supported by the driver. The .Nm device driver appeared in -.Fx 10.0. +.Fx 10.0 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/man4.powerpc/ofw_console.4 b/share/man/man4/man4.powerpc/ofw_console.4 index eb73235c4970..fca85a1ffa9e 100644 --- a/share/man/man4/man4.powerpc/ofw_console.4 +++ b/share/man/man4/man4.powerpc/ofw_console.4 @@ -24,7 +24,6 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" from: OpenBSD: pcons.4,v 1.4 2003/06/02 16:16:26 miod Exp -.\" $FreeBSD$ .\" .Dd January 16, 2021 .Dt OFW_CONSOLE 4 powerpc diff --git a/share/man/man4/man4.powerpc/pmu.4 b/share/man/man4/man4.powerpc/pmu.4 index 30b2762fac06..6eac20cfa6b7 100644 --- a/share/man/man4/man4.powerpc/pmu.4 +++ b/share/man/man4/man4.powerpc/pmu.4 @@ -23,8 +23,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 6, 2008 .Dt PMU 4 .Os diff --git a/share/man/man4/man4.powerpc/powermac_nvram.4 b/share/man/man4/man4.powerpc/powermac_nvram.4 index 9af093f6ef83..ed15cb79fea3 100644 --- a/share/man/man4/man4.powerpc/powermac_nvram.4 +++ b/share/man/man4/man4.powerpc/powermac_nvram.4 @@ -23,8 +23,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 19, 2020 .Dt POWERMAC_NVRAM 4 powerpc .Os diff --git a/share/man/man4/man4.powerpc/smu.4 b/share/man/man4/man4.powerpc/smu.4 index 4916b956e577..ef2654746e62 100644 --- a/share/man/man4/man4.powerpc/smu.4 +++ b/share/man/man4/man4.powerpc/smu.4 @@ -23,8 +23,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 22, 2010 .Dt SMU 4 .Os diff --git a/share/man/man4/man4.powerpc/snd_ai2s.4 b/share/man/man4/man4.powerpc/snd_ai2s.4 index 2773b53c331f..3880751e65c9 100644 --- a/share/man/man4/man4.powerpc/snd_ai2s.4 +++ b/share/man/man4/man4.powerpc/snd_ai2s.4 @@ -23,8 +23,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 20, 2009 .Dt SND_AI2S 4 .Os diff --git a/share/man/man4/man4.powerpc/snd_davbus.4 b/share/man/man4/man4.powerpc/snd_davbus.4 index ed3f3edea4ff..6958ebd4b4b5 100644 --- a/share/man/man4/man4.powerpc/snd_davbus.4 +++ b/share/man/man4/man4.powerpc/snd_davbus.4 @@ -23,8 +23,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 20, 2009 .Dt SND_DAVBUS 4 .Os diff --git a/share/man/man4/man4.powerpc/tsec.4 b/share/man/man4/man4.powerpc/tsec.4 index 861e866d4c90..b3ccae648ab8 100644 --- a/share/man/man4/man4.powerpc/tsec.4 +++ b/share/man/man4/man4.powerpc/tsec.4 @@ -23,8 +23,6 @@ .\" (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 February 20, 2015 .Dt TSEC 4 .Os diff --git a/share/man/man4/max44009.4 b/share/man/man4/max44009.4 index fa399c52cec3..474bec7dc525 100644 --- a/share/man/man4/max44009.4 +++ b/share/man/man4/max44009.4 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2020 Andriy Gapon <avg@FreeBSD.org> .\" @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 6, 2021 .Dt MAX44009 4 .Os diff --git a/share/man/man4/md.4 b/share/man/man4/md.4 index d6b92d86507d..0c99d61f8392 100644 --- a/share/man/man4/md.4 +++ b/share/man/man4/md.4 @@ -5,8 +5,6 @@ .\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp .\" ---------------------------------------------------------------------------- .\" -.\" $FreeBSD$ -.\" .Dd January 8, 2020 .Dt MD 4 .Os @@ -100,7 +98,7 @@ disk found in the man page. Other tools will also create these images, such as NanoBSD. .Sh ARM KERNEL OPTIONS -On armv6 and armv7 architectures, an MD_ROOT image larger than +On the armv7 architecture, an MD_ROOT image larger than approximately 55 MiB may require building a custom kernel using several tuning options related to kernel memory usage. .Bl -tag -width indent diff --git a/share/man/man4/mdio.4 b/share/man/man4/mdio.4 index 8120b0748e75..b889dd6d5ed4 100644 --- a/share/man/man4/mdio.4 +++ b/share/man/man4/mdio.4 @@ -2,8 +2,6 @@ .\" Based on the miibus(4) manual page written by Tom Rhodes. .\" Please see the /usr/src/COPYRIGHT file for copyright information. .\" -.\" $FreeBSD$ -.\" .Dd December 17, 2015 .Dt MDIO 4 .Os diff --git a/share/man/man4/me.4 b/share/man/man4/me.4 index 668d346791ea..f10891c2fa8f 100644 --- a/share/man/man4/me.4 +++ b/share/man/man4/me.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 7, 2014 .Dt ME 4 .Os diff --git a/share/man/man4/mem.4 b/share/man/man4/mem.4 index 6370d2a95525..595cb8a60e5f 100644 --- a/share/man/man4/mem.4 +++ b/share/man/man4/mem.4 @@ -25,10 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)mem.4 5.3 (Berkeley) 5/2/91 -.\" $FreeBSD$ -.\" -.Dd March 11, 2022 +.Dd March 24, 2024 .Dt MEM 4 .Os .Sh NAME @@ -201,7 +198,6 @@ should be set to to update an existing or establish a new range, or to .Dv MEMRANGE_SET_REMOVE to remove a range. -.El .Ss Live Kernel Dumps .Pp The @@ -301,11 +297,13 @@ privilege. .Xr memcontrol 8 .Sh HISTORY The -.Nm mem +.Pa /dev/mem +file appeared in +.At v1 and -.Nm kmem -files appeared in -.At v6 . +.Pa /dev/kmem +in +.At v5 . The ioctl interface for memory range attributes was added in .Fx 3.2 . .Sh BUGS diff --git a/share/man/man4/mfi.4 b/share/man/man4/mfi.4 index 12a4ec5290da..4a55467d81f2 100644 --- a/share/man/man4/mfi.4 +++ b/share/man/man4/mfi.4 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd March 13, 2019 +.Dd April 19, 2023 .Dt MFI 4 .Os .Sh NAME @@ -81,14 +79,14 @@ If the tunable .Va hw.mfi.mrsas_enable is set to 1, then the driver will reduce its probe priority to allow -.Cd mrsas +.Xr mrsas 4 to attach to the card instead of .Nm . .Pp .Nm does not provide ATA TRIM support. Refer to -.Cd mrsas +.Xr mrsas 4 if TRIM support is required. .Sh HARDWARE The diff --git a/share/man/man4/mgb.4 b/share/man/man4/mgb.4 index 6b3cafa5c63d..cf0f7aaa688d 100644 --- a/share/man/man4/mgb.4 +++ b/share/man/man4/mgb.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 28, 2021 .Dt MGB 4 .Os diff --git a/share/man/man4/miibus.4 b/share/man/man4/miibus.4 index 62954146ea3d..f53abdb405f2 100644 --- a/share/man/man4/miibus.4 +++ b/share/man/man4/miibus.4 @@ -6,8 +6,6 @@ .\" Originally this file looked much like the NetBSD mii(4) manual page, but .\" I doubt you would ever notice due to large differences. .\" -.\" $FreeBSD$ -.\" .Dd December 26, 2020 .Dt MIIBUS 4 .Os diff --git a/share/man/man4/mld.4 b/share/man/man4/mld.4 index 8d35c050cc32..539138d86f5f 100644 --- a/share/man/man4/mld.4 +++ b/share/man/man4/mld.4 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 8, 2013 .Dt MLD 4 .Os diff --git a/share/man/man4/mlx.4 b/share/man/man4/mlx.4 index 4aca36eff422..4b9ab7070d72 100644 --- a/share/man/man4/mlx.4 +++ b/share/man/man4/mlx.4 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2003 David O'Brien .\" Copyright (c) 2000 Jeroen Ruigrok van der Werven .\" Copyright (c) 2000 Michael Smith @@ -23,14 +25,12 @@ .\" (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 February 15, 2017 +.Dd May 27, 2025 .Dt MLX 4 .Os .Sh NAME .Nm mlx -.Nd Mylex DAC-family RAID driver +.Nd Mylex DAC-family Parallel SCSI RAID driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -52,42 +52,35 @@ The driver provides support for Mylex DAC-family PCI to SCSI RAID controllers, including versions relabeled by Digital/Compaq. .Sh HARDWARE -Controllers supported by the +The .Nm -driver include: +driver supports the following Parallel SCSI RAID controllers: .Pp .Bl -bullet -compact .It -Mylex DAC960P +Mylex DAC960P (Wide Fast SCSI-2) .It -Mylex DAC960PD / DEC KZPSC (Fast Wide) +Mylex DAC960PD / DEC KZPSC (Wide Fast SCSI-2) .It -Mylex DAC960PDU +Mylex DAC960PDU (Ultra SCSI-3) .It -Mylex DAC960PL +Mylex DAC960PL (Wide Fast SCSI-2) .It -Mylex DAC960PJ +Mylex DAC960PJ (Wide Ultra SCSI-3) .It -Mylex DAC960PG +Mylex DAC960PG (Wide Ultra SCSI-3) .It -Mylex DAC960PU / DEC PZPAC (Ultra Wide) +Mylex DAC960PU / DEC PZPAC (Wide Ultra SCSI-3) .It -Mylex AcceleRAID 150 (DAC960PRL) +Mylex AcceleRAID 150 (DAC960PRL) (Wide Ultra2 SCSI) .It -Mylex AcceleRAID 250 (DAC960PTL1) +Mylex AcceleRAID 250 (DAC960PTL1) (Wide Ultra2 SCSI) .It -Mylex eXtremeRAID 1100 (DAC1164P) +Mylex eXtremeRAID 1100 (DAC1164P) (Wide Ultra2 SCSI) .It RAIDarray 230 controllers, aka the Ultra-SCSI DEC KZPAC-AA (1-ch, 4MB cache), KZPAC-CA (3-ch, 4MB), KZPAC-CB (3-ch, 8MB cache) .El -.Pp -All major firmware revisions (2.x, 3.x, 4.x and 5.x) are supported, however -it is always advisable to upgrade to the most recent firmware -available for the controller. -.Pp -Compatible Mylex controllers not listed should work, but have not been -verified. .Sh DIAGNOSTICS .Ss Controller initialisation phase .Bl -diag @@ -148,7 +141,6 @@ controller. The current status of all system drives could not be fetched; attachment of system drives will be aborted. .It mlx%d: device_add_child failed -.It mlx%d: bus_generic_attach returned %d .Pp Creation of the system drive instances failed; attachment of one or more system drives may have been aborted. diff --git a/share/man/man4/mlx4en.4 b/share/man/man4/mlx4en.4 index f9b1e3bfc8e2..69d2904508b8 100644 --- a/share/man/man4/mlx4en.4 +++ b/share/man/man4/mlx4en.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 1, 2017 .Dt MLX4EN 4 .Os @@ -86,7 +84,7 @@ please email the specific information to The .Nm device driver first appeared in -.Fx 9.x . +.Fx 9.0 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/mlx4ib.4 b/share/man/man4/mlx4ib.4 index e827ff6c51bb..536b8cab5280 100644 --- a/share/man/man4/mlx4ib.4 +++ b/share/man/man4/mlx4ib.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 1, 2017 .Dt MLX4IB 4 .Os @@ -86,7 +84,7 @@ please email the specific information to The .Nm device driver first appeared in -.Fx 9.x . +.Fx 9.0 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/mlx5en.4 b/share/man/man4/mlx5en.4 index 53470d894071..7d92e22275d6 100644 --- a/share/man/man4/mlx5en.4 +++ b/share/man/man4/mlx5en.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 20, 2021 .Dt MLX5EN 4 .Os diff --git a/share/man/man4/mlx5ib.4 b/share/man/man4/mlx5ib.4 index 092627596765..71d634b2f695 100644 --- a/share/man/man4/mlx5ib.4 +++ b/share/man/man4/mlx5ib.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 23, 2017 .Dt MLX5IB 4 .Os @@ -115,7 +113,7 @@ email all the specific information related to the issue to The .Nm device driver first appeared in -.Fx 12.x . +.Fx 12.0 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/mlx5io.4 b/share/man/man4/mlx5io.4 index 495cd6608f47..ebfbb41a0823 100644 --- a/share/man/man4/mlx5io.4 +++ b/share/man/man4/mlx5io.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 2, 2019 .Dt mlx5io 4 .Os @@ -95,7 +93,7 @@ struct mlx5_fwdump_get { }; .Ed .Pp -On successfull return, the +On successful return, the .Dv reg_filled field reports the number of the .Dv buf @@ -163,7 +161,7 @@ struct mlx5_eeprom_get { }; .Ed .Pp -On successfull return, the +On successful return, the .Dv eeprom_info_out_len field reports the length of the EEPROM information. .Dv eeprom_info_buf @@ -174,7 +172,7 @@ field reports the third page validity. .Sh FILES The .Pa /dev/mlx5ctl -.Xr devfs 5 +.Xr devfs 4 node is used to pass commands to the driver. .Sh RETURN VALUES If successful, the IOCTL returns zero. diff --git a/share/man/man4/mmc.4 b/share/man/man4/mmc.4 index 430bca983280..394f7bb37c41 100644 --- a/share/man/man4/mmc.4 +++ b/share/man/man4/mmc.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 10, 2021 .Dt MMC 4 .Os diff --git a/share/man/man4/mmcsd.4 b/share/man/man4/mmcsd.4 index 9779183c64d4..7466bc546b91 100644 --- a/share/man/man4/mmcsd.4 +++ b/share/man/man4/mmcsd.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 10, 2021 .Dt MMCSD 4 .Os diff --git a/share/man/man4/mod_cc.4 b/share/man/man4/mod_cc.4 index a00f17ede5e4..f17c6100ce23 100644 --- a/share/man/man4/mod_cc.4 +++ b/share/man/man4/mod_cc.4 @@ -27,9 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd August 6, 2019 +.Dd September 13, 2022 .Dt MOD_CC 4 .Os .Sh NAME @@ -47,7 +45,7 @@ using the .Xr kld 4 facility. .Pp -The default algorithm is NewReno, and all connections use the default unless +The default algorithm is CUBIC, and all connections use the default unless explicitly overridden using the .Dv TCP_CONGESTION socket option (see @@ -127,10 +125,10 @@ For further explanation please see the internet-draft. .Pp Each congestion control module may also expose other MIB variables to control their behaviour. -Note that both newreno and cubic now support hystart++ based on the version 3 of the internet-draft. +Note that both NewReno and CUBIC now support Hystart++ based on the version 3 of the internet-draft. .Sh Kernel Configuration All of the available congestion control modules may also be loaded -via kernel configutation options. +via kernel configuration options. A kernel configuration is required to have at least one congestion control algorithm built into it via kernel option and a system default specified. Compilation of the kernel will fail if these two conditions are not met. @@ -138,10 +136,10 @@ Compilation of the kernel will fail if these two conditions are not met. The framework exposes the following kernel configuration options. .Bl -tag -width ".Va CC_NEWRENO" .It Va CC_NEWRENO -This directive loads the newreno congestion control algorithm and is included -in GENERIC by default. +This directive loads the NewReno congestion control algorithm. .It Va CC_CUBIC -This directive loads the cubic congestion control algorithm. +This directive loads the CUBIC congestion control algorithm and is included +in GENERIC by default. .It Va CC_VEGAS This directive loads the vegas congestion control algorithm, note that this algorithm also requires the TCP_HHOOK option as well. @@ -160,7 +158,7 @@ this algorithm also requires the TCP_HHOOK option as well. This directive loads the htcp congestion control algorithm. .It Va CC_DEFAULT This directive specifies the string that represents the name of the system default algorithm, the GENERIC kernel -defaults this to newreno. +defaults this to CUBIC. .El .Sh SEE ALSO .Xr cc_cdg 4 , diff --git a/share/man/man4/mos.4 b/share/man/man4/mos.4 index e4ae8c44c1b9..da17306b5e19 100644 --- a/share/man/man4/mos.4 +++ b/share/man/man4/mos.4 @@ -13,8 +13,6 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" .Dd November 24, 2015 .Dt MOS 4 .Os diff --git a/share/man/man4/mouse.4 b/share/man/man4/mouse.4 index 9ee3eee0041b..affc7fb7ac9e 100644 --- a/share/man/man4/mouse.4 +++ b/share/man/man4/mouse.4 @@ -24,8 +24,6 @@ .\" (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 3, 1997 .Dt MOUSE 4 .Os diff --git a/share/man/man4/mpi3mr.4 b/share/man/man4/mpi3mr.4 new file mode 100644 index 000000000000..f07ce13d2f23 --- /dev/null +++ b/share/man/man4/mpi3mr.4 @@ -0,0 +1,81 @@ +.\" +.\" Copyright (c) 2023 Netflix, Inc +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" mpi3mr driver man page. +.\" +.Dd June 14, 2023 +.Dt MPI3MR 4 +.Os +.Sh NAME +.Nm mpi3mr +.Nd "Broadcom MPIMR 3.0 IT/IR 24Gb/s SAS Tri-Mode RAID PCIe 4.0 driver" +.Sh SYNOPSIS +.\" To compile this driver into the kernel, place these lines in the kernel +.\" configuration file: +.\" .Bd -ragged -offset indent +.\" .Cd "device pci" +.\" .Cd "device scbus" +.\" .Cd "device mpi3mr" +.\" .Ed +.\" .Pp +The driver can be loaded as a module at boot time by placing this line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +mpi3mr_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for Broadcom Ltd. MPIMR 3.0 IT/IR PCIe 4 controller. +.Sh HARDWARE +These controllers are supported by the +.Nm +driver: +.Pp +.Bl -bullet -compact +.It +Broadcom Ltd. SAS 4116 Tri-Mode RAID Adapter +.It +Broadcom Ltd. 9670W-16i 24G PCIe 4.0 Tri-Mode RAID Adapters +.It +Broadcom Ltd. 9670-24i 24G PCIe 4.0 Tri-Mode RAID Adapters +.It +Broadcom Ltd. 9660-16i 24G PCIe 4.0 Tri-Mode RAID Adapters +.It +Broadcom Ltd. 9620-16i 24G PCIe 4.0 Tri-Mode RAID Adapters +.It +Broadcom Ltd. 9600-24i 24G PCIe 4.0 Tri-Mode RAID Adapters +.It +Broadcom Ltd. 9600-16i 24G PCIe 4.0 Tri-Mode RAID Adapters +.It +Broadcom Ltd. 9600W-16e 24G PCIe 4.0 Tri-Mode RAID Adapters +.It +Broadcom Ltd. 9600-16e 24G PCIe 4.0 Tri-Mode RAID Adapters +.It +Broadcom Ltd. 9600-8i8e 24G PCIe 4.0 Tri-Mode RAID Adapters +.El +.Sh SEE ALSO +.Xr cam 4 , +.Xr cd 4 , +.Xr ch 4 , +.Xr da 4 , +.Xr mpr 4 , +.Xr pci 4 , +.Xr sa 4 , +.Xr scsi 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 14.0 . +.Sh AUTHORS +The +.Nm +driver was written by +.An Sumit Saxena Aq Mt sumit.saxena@broadcom.com , +and +.An Chandrakanth Patil Aq Mt chandrakanth.patil@broadcom.com . +This manual page was written by +.An Warner Losh Aq Mt imp@FreeBSD.org . diff --git a/share/man/man4/mpr.4 b/share/man/man4/mpr.4 index 3cc516397e33..e114ecfd077b 100644 --- a/share/man/man4/mpr.4 +++ b/share/man/man4/mpr.4 @@ -2,7 +2,7 @@ .\" Copyright (c) 2010 Spectra Logic Corporation .\" Copyright (c) 2014 LSI Corp .\" Copyright (c) 2015-2017 Avago Technologies -.\" Copyright (c) 2015-2017 Broadcom Ltd. +.\" Copyright (c) 2015-2022 Broadcom Ltd. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -36,7 +36,6 @@ .\" Author: Stephen McConnell <slm@FreeBSD.org> .\" .\" $Id$ -.\" $FreeBSD$ .\" .Dd June 1, 2019 .Dt MPR 4 @@ -99,6 +98,10 @@ Broadcom Ltd./Avago Tech (LSI) SAS 3616 (16 Port SAS/PCIe) Broadcom Ltd./Avago Tech (LSI) SAS 3708 (8 Port SAS/PCIe) .It Broadcom Ltd./Avago Tech (LSI) SAS 3716 (16 Port SAS/PCIe) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3816 (16 Port SAS/PCIe) +.It +Broadcom Ltd./Avago Tech (LSI) SAS 3916 (16 Port SAS/PCIe) .El .Sh CONFIGURATION In all tunable descriptions below, X represents the adapter number. @@ -388,6 +391,7 @@ The following levels are available: .Xr scsi 4 , .Xr targ 4 , .Xr loader.conf 5 , +.Xr mprutil 8 , .Xr sysctl 8 .Sh HISTORY The @@ -401,9 +405,9 @@ driver was originally written by .An -nosplit .An Scott Long Aq Mt scottl@FreeBSD.org . It has been improved and tested by LSI Corporation, -Avago Technologies (formally LSI), and Broadcom Ltd. (formally Avago). +Avago Technologies (formerly LSI), and Broadcom Ltd. (formerly Avago). .Pp -This man page was written by +This manual page was written by .An Ken Merry Aq Mt ken@FreeBSD.org with additional input from .An Stephen McConnell Aq Mt slm@FreeBSD.org . diff --git a/share/man/man4/mps.4 b/share/man/man4/mps.4 index fac131429fec..5bcb55a54599 100644 --- a/share/man/man4/mps.4 +++ b/share/man/man4/mps.4 @@ -36,7 +36,6 @@ .\" Author: Stephen McConnell <slm@FreeBSD.org> .\" .\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#6 $ -.\" $FreeBSD$ .\" .Dd June 1, 2019 .Dt MPS 4 @@ -364,6 +363,7 @@ The following levels are available: .Xr scsi 4 , .Xr targ 4 , .Xr loader.conf 5 , +.Xr mpsutil 8 , .Xr sysctl 8 .Sh HISTORY The @@ -377,9 +377,9 @@ driver was originally written by .An -nosplit .An Scott Long Aq Mt scottl@FreeBSD.org . It has been improved and tested by LSI Corporation, -Avago Technologies (formally LSI), and Broadcom Ltd. (formally Avago). +Avago Technologies (formerly LSI), and Broadcom Ltd. (formerly Avago). .Pp -This man page was written by +This manual page was written by .An Ken Merry Aq Mt ken@FreeBSD.org with additional input from .An Stephen McConnell Aq Mt slm@FreeBSD.org . diff --git a/share/man/man4/mpt.4 b/share/man/man4/mpt.4 index 4f243eb1823c..1f6fa3e33b14 100644 --- a/share/man/man4/mpt.4 +++ b/share/man/man4/mpt.4 @@ -33,8 +33,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 16, 2021 .Dt MPT 4 .Os @@ -154,7 +152,7 @@ Most controllers supported by the .Nm driver suffer from limitations on supported disk size (mostly <2TB). While most controllers will truncate usable disk size, others might -behave unexpetedly and can cause severe data loss. +behave unexpectedly and can cause severe data loss. Refer to the datasheet of the chipset and firmware version for information about supported disk size and limitations. .Sh SEE ALSO diff --git a/share/man/man5/mqueuefs.5 b/share/man/man4/mqueuefs.4 index dedec109cefc..384a3e3e6546 100644 --- a/share/man/man5/mqueuefs.5 +++ b/share/man/man4/mqueuefs.4 @@ -25,10 +25,8 @@ .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 30, 2005 -.Dt MQUEUEFS 5 +.Dt MQUEUEFS 4 .Os .Sh NAME .Nm mqueuefs diff --git a/share/man/man4/mrsas.4 b/share/man/man4/mrsas.4 index 0528ee2fa1bd..36e9a7b5c7e7 100644 --- a/share/man/man4/mrsas.4 +++ b/share/man/man4/mrsas.4 @@ -32,8 +32,6 @@ .\" are those of the authors and should not be interpreted as representing .\" official policies, either expressed or implied, of the FreeBSD Project. .\" -.\" $FreeBSD$ -.\" .Dd February 4, 2021 .Dt MRSAS 4 .Os diff --git a/share/man/man5/msdosfs.5 b/share/man/man4/msdosfs.4 index 7e8d31fa75c5..d823934dcfd1 100644 --- a/share/man/man5/msdosfs.5 +++ b/share/man/man4/msdosfs.4 @@ -1,13 +1,12 @@ -.\" $FreeBSD$ .\" Written by Tom Rhodes .\" This file is in the public domain. .\" .Dd September 27, 2018 -.Dt MSDOSFS 5 +.Dt MSDOSFS 4 .Os .Sh NAME .Nm msdosfs -.Nd MS-DOS file system +.Nd MS-DOS (FAT) file system .Sh SYNOPSIS .Cd "options MSDOSFS" .Sh DESCRIPTION @@ -66,8 +65,10 @@ may also be used to extract this information. .Sh SEE ALSO .Xr mount 2 , .Xr unmount 2 , +.Xr fsck_msdosfs 8 , .Xr mount 8 , .Xr mount_msdosfs 8 , +.Xr newfs_msdos 8 , .Xr umount 8 .Sh AUTHORS This manual page was written by diff --git a/share/man/man4/msk.4 b/share/man/man4/msk.4 index 6c2a030dfc19..f73299c516d7 100644 --- a/share/man/man4/msk.4 +++ b/share/man/man4/msk.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 23, 2011 .Dt MSK 4 .Os diff --git a/share/man/man4/mt7915.4 b/share/man/man4/mt7915.4 new file mode 100644 index 000000000000..ba67a77af735 --- /dev/null +++ b/share/man/man4/mt7915.4 @@ -0,0 +1,111 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023-2024 Bjoern A. Zeeb +.\" +.\" 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. +.\" +.Dd November 10, 2024 +.Dt MT7915 4 +.Os +.Sh NAME +.Nm mt7915 +.Nd MediaTek IEEE 802.11ax wireless network driver +.Sh SYNOPSIS +The driver will auto-load without any user interaction using +.Xr devmatch 8 +if enabled in +.Xr rc.conf 5 . +.Pp +Only if auto-loading is explicitly disabled, place the following +lines in +.Xr rc.conf 5 +to manually load the driver as a module at boot time: +.Bd -literal -offset indent +kld_list="${kld_list} if_mt7915" +.Ed +.Pp +The driver should automatically load any +firmware needed for the particular chipset. +.Pp +It is discouraged to load the driver from +.Xr loader 8 . +.Sh DESCRIPTION +The +.Nm +driver provides support for MediaTek MT7915E wireless network devices. +.Nm +is derived from MediaTek's Linux mt76 driver. +.Pp +This driver requires firmware to be loaded before it will work. +The package +.Pa wifi-firmware-mt76-kmod +from the +.Pa ports/net/wifi-firmware-mt76-kmod +port needs to be installed before the driver is loaded. +Otherwise no +.Xr wlan 4 +interface can be created using +.Xr ifconfig 8 . +One can use +.Xr fwget 8 +to install the correct firmware package. +.Pp +The driver uses the +.\" No LinuxKPI man pages so no .Xr here. +.Sy linuxkpi_wlan +and +.Sy linuxkpi +compat framework to bridge between the Linux and +native +.Fx +driver code as well as to the native +.Xr net80211 4 +wireless stack. +.Sh HARDWARE +The +.Nm +driver supports PCIe devices with the following chipsets: +.Pp +.Bl -bullet -offset indent -compact +.It +MediaTek MT7915E +.El +.Sh SEE ALSO +.Xr wlan 4 , +.Xr networking 7 , +.Xr fwget 8 , +.Xr ifconfig 8 , +.Xr wpa_supplicant 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 14.0 . +.Sh BUGS +Certainly. +.Pp +While +.Nm +supports 802.11a/b/g/n/ac/ax modes, +the compatibility code currently only supports 802.11a/b/g modes. +Support for 802.11n/ac/ax is yet to come. diff --git a/share/man/man4/mt7921.4 b/share/man/man4/mt7921.4 new file mode 100644 index 000000000000..fe9efa77e35d --- /dev/null +++ b/share/man/man4/mt7921.4 @@ -0,0 +1,111 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023-2024 Bjoern A. Zeeb +.\" +.\" 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. +.\" +.Dd November 10, 2024 +.Dt MT7921 4 +.Os +.Sh NAME +.Nm mt7921 +.Nd MediaTek IEEE 802.11ax wireless network driver +.Sh SYNOPSIS +The driver will auto-load without any user interaction using +.Xr devmatch 8 +if enabled in +.Xr rc.conf 5 . +.Pp +Only if auto-loading is explicitly disabled, place the following +lines in +.Xr rc.conf 5 +to manually load the driver as a module at boot time: +.Bd -literal -offset indent +kld_list="${kld_list} if_mt7921" +.Ed +.Pp +The driver should automatically load any +firmware needed for the particular chipset. +.Pp +It is discouraged to load the driver from +.Xr loader 8 . +.Sh DESCRIPTION +The +.Nm +driver provides support for MediaTek MT7921E wireless network devices. +.Nm +is derived from MediaTek's Linux mt76 driver. +.Pp +This driver requires firmware to be loaded before it will work. +The package +.Pa wifi-firmware-mt76-kmod +from the +.Pa ports/net/wifi-firmware-mt76-kmod +port needs to be installed before the driver is loaded. +Otherwise no +.Xr wlan 4 +interface can be created using +.Xr ifconfig 8 . +One can use +.Xr fwget 8 +to install the correct firmware package. +.Pp +The driver uses the +.\" No LinuxKPI man pages so no .Xr here. +.Sy linuxkpi_wlan +and +.Sy linuxkpi +compat framework to bridge between the Linux and +native +.Fx +driver code as well as to the native +.Xr net80211 4 +wireless stack. +.Sh HARDWARE +The +.Nm +driver supports PCIe devices with the following chipsets: +.Pp +.Bl -bullet -offset indent -compact +.It +MediaTek MT7921E +.El +.Sh SEE ALSO +.Xr wlan 4 , +.Xr networking 7 , +.Xr fwget 8 , +.Xr ifconfig 8 , +.Xr wpa_supplicant 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 14.0 . +.Sh BUGS +Certainly. +.Pp +While +.Nm +supports 802.11a/b/g/n/ac/ax modes, +the compatibility code currently only supports 802.11a/b/g modes. +Support for 802.11n/ac/ax is to come. diff --git a/share/man/man4/mtio.4 b/share/man/man4/mtio.4 index 558f02864777..34414e5f2a26 100644 --- a/share/man/man4/mtio.4 +++ b/share/man/man4/mtio.4 @@ -28,9 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)mtio.4 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" .Dd February 12, 2015 .Dt MTIO 4 .Os diff --git a/share/man/man4/mtkswitch.4 b/share/man/man4/mtkswitch.4 new file mode 100644 index 000000000000..c879df161791 --- /dev/null +++ b/share/man/man4/mtkswitch.4 @@ -0,0 +1,45 @@ +.\" +.\" Copyright (c) 2025 Alexander Ziaee +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd May 19, 2025 +.Dt MTKSWITCH 4 +.Sh NAME +.Nm mtkswitch +.Nd MediaTek/Ralink Ethernet switch driver +.Sh SYNOPSIS +.Cd device mdio +.Cd device etherswitch +.Cd device mtkswitch +.Sh DESCRIPTION +The +.Nm +driver supports MediaTek/Ralink Ethernet switch controllers. +.Sh HARDWARE +The +.Nm +driver supports the following Ethernet switch controllers: +.Pp +.Bl -bullet -compact +.It +MediaTek MT7628 (5 port Fast Ethernet) +.It +MediaTek MT7621 (5 port Gigabit Ethernet) +.It +MediaTek MT7620 (5 port Fast Ethernet) +.It +Ralink RT5350 (5 port Fast Ethernet) +.It +Ralink RT3352 (5 port Fast Ethernet) +.It +Ralink RT3050 (5 port Fast Ethernet) +.El +.Sh SEE ALSO +.Xr etherswitch 4 , +.Xr etherswitchcfg 8 +.Sh HISTORY +The +.Nm +driver appeared in +.Fx 11.0 . diff --git a/share/man/man4/mtw.4 b/share/man/man4/mtw.4 new file mode 100644 index 000000000000..17722be73203 --- /dev/null +++ b/share/man/man4/mtw.4 @@ -0,0 +1,74 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024 Jesper Schmitz Mouridsen <jsm@freebsd.org> +.\" +.\" 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. +.\" +.Dd Feb 03, 2025 +.Dt MTW 4 +.Os +.Sh NAME +.Nm if_mtw +.Nd "Mediatek MT7601U" +.Ed +.Sh DESCRIPTION +This module provides support for Mediatek MT7601U with the firmware from net/wifi-firmware-mtw-kmod + +.Sh HARDWARE +The +.Nm +driver supports Mediatek MT7601U +based USB wireless network adapters including (but not all of them tested): +.Pp +.Bl -column -compact +.It +ASUS USB-N10 v2 +.It +D-Link DWA-127 rev B1 +.It +Edimax EW-7711UAn v2 +.It +Foxconn WFU03 +.It +Tenda U2 +.It +Tenda W311MI v2 +.It +TP-LINK TL-WN727N v4 (tested working) +.It +Yealink WF40 +.El +.Sh SEE ALSO +.Xr usb 4 +.Sh BUGS +The +.Nm +only works in station mode and monitor mode. The firmware does not always reinitialize when reloading the module, or when rebooting, without first unplugging the device. +.Sh History +The mtw driver first appeared in OpenBSD 7.1. The mtw driver was ported to FreeBSD in FreeBSD 15.0. +.Sh AUTHORS +.An -nosplit +The mtw driver was written by +.An James Hastings Aq Mt hastings@openbsd.org +ported to FreeBSD by +.An Jesper Schmitz Mouridsen Aq Mt jsm@FreeBSD.org diff --git a/share/man/man4/muge.4 b/share/man/man4/muge.4 index 3bb8810d81b0..598106bf1855 100644 --- a/share/man/man4/muge.4 +++ b/share/man/man4/muge.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 11, 2018 .Dt MUGE 4 .Os diff --git a/share/man/man4/multicast.4 b/share/man/man4/multicast.4 index c0ce4599a02d..aa3293e107eb 100644 --- a/share/man/man4/multicast.4 +++ b/share/man/man4/multicast.4 @@ -23,8 +23,6 @@ .\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER .\" DEALINGS IN THE SOFTWARE. .\" -.\" $FreeBSD$ -.\" .Dd May 27, 2009 .Dt MULTICAST 4 .Os diff --git a/share/man/man4/mvs.4 b/share/man/man4/mvs.4 index 4d432e44c8b7..516a1ddcc1ac 100644 --- a/share/man/man4/mvs.4 +++ b/share/man/man4/mvs.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 23, 2015 .Dt MVS 4 .Os diff --git a/share/man/man4/mwl.4 b/share/man/man4/mwl.4 index 910ae083649f..9eecc080f710 100644 --- a/share/man/man4/mwl.4 +++ b/share/man/man4/mwl.4 @@ -25,8 +25,6 @@ .\" 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 DAMAGES. -.\" -.\" $FreeBSD$ .\"/ .Dd July 8, 2009 .Dt MWL 4 diff --git a/share/man/man4/mwlfw.4 b/share/man/man4/mwlfw.4 index 5e557bfc3073..e6fdc955a8f8 100644 --- a/share/man/man4/mwlfw.4 +++ b/share/man/man4/mwlfw.4 @@ -20,8 +20,6 @@ .\" (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 June 9, 2009 .Dt MWLFW 4 .Os diff --git a/share/man/man4/mx25l.4 b/share/man/man4/mx25l.4 index 4c69234c1095..5dffdebcf43e 100644 --- a/share/man/man4/mx25l.4 +++ b/share/man/man4/mx25l.4 @@ -22,9 +22,7 @@ .\" (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 February 26, 2019 +.Dd June 11, 2024 .Dt MX25L 4 .Os .Sh NAME @@ -62,7 +60,7 @@ such as block size, sector size, and device capacity. When a supported device is found, the .Nm driver creates a disk device and makes it accessible at -.Pa /dev/flash/mx25l? . +.Pa /dev/flash/spi? . The new disk device is then tasted by the available .Xr geom 4 modules as with any disk device. @@ -191,13 +189,9 @@ Set the high bit (1 << 31) to invert the logic level of the chip select line. The SPI mode (0-3) to use when communicating with this device. .El .Sh FILES -.Bl -tag -width /dev/flash/mx25l? -.It Pa /dev/flash/mx25l? -Provides read/write access to the storage device. +.Bl -tag -width /dev/flash/spi? .It Pa /dev/flash/spi? -An alias for the -.Pa /dev/mx25l? -device, for backwards compatibility with older versions of the driver. +Provides read/write access to the storage device. .El .Sh SEE ALSO .Xr fdt 4 , diff --git a/share/man/man4/mxge.4 b/share/man/man4/mxge.4 index 3e54062fd212..85cd79a4c90e 100644 --- a/share/man/man4/mxge.4 +++ b/share/man/man4/mxge.4 @@ -29,8 +29,6 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.\" $FreeBSD$ -.\" .Dd February 13, 2008 .Dt MXGE 4 .Os diff --git a/share/man/man4/my.4 b/share/man/man4/my.4 index f92fff79306e..fc2386317390 100644 --- a/share/man/man4/my.4 +++ b/share/man/man4/my.4 @@ -22,8 +22,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 26, 2020 .Dt MY 4 .Os diff --git a/share/man/man4/nctgpio.4 b/share/man/man4/nctgpio.4 new file mode 100644 index 000000000000..84eb1ccb7d3f --- /dev/null +++ b/share/man/man4/nctgpio.4 @@ -0,0 +1,54 @@ +.\" +.Dd Apr 18, 2023 +.Dt NCTGPIO 4 +.Os +.Sh NAME +.Nm nctgpio +.Nd GPIO controller on Nuvoton and Winbond Super I/Os +.Sh SYNOPSIS +.Cd "device gpio" +.Cd "device nctgpio" +.Cd "device superio" +.Sh DESCRIPTION +The +.Nm +is a driver for GPIO controller that can be found in Nuvoton and Winbond Super I/O chips. +.Pp +The +.Nm +driver supports the following chips: +.Pp +.Bl -bullet -compact +.It +Nuvoton NCT5104D +.It +Nuvoton NCT5104D (PC-Engines APU) +.It +Nuvoton NCT5104D (PC-Engines APU3) +.It +Nuvoton NCT5585D +.It +Nuvoton NCT6116D +.It +Nuvoton NCT6779 +.It +Nuvoton NCT6796D-E +.It +Winbond 83627DHG +.El + +.Sh SEE ALSO +.Xr gpio 3 , +.Xr gpio 4 , +.Xr gpioctl 8 +.Sh HISTORY +The driver first appeared in +.Fx 11.0 . +And the +manual page first appeared in +.Fx 14.0 . +.Sh AUTHORS +The driver was initially written by +.An Daniel Wyatt Aq Mt daniel@dewyatt.com . +This man page was written by +.An Stéphane Rochoy Aq Mt stephane.rochoy@stormshield.eu . diff --git a/share/man/man4/ncthwm.4 b/share/man/man4/ncthwm.4 new file mode 100644 index 000000000000..5076a8888046 --- /dev/null +++ b/share/man/man4/ncthwm.4 @@ -0,0 +1,52 @@ +.\" +.Dd Apr 18, 2023 +.Dt NCTHWM 4 +.Os +.Sh NAME +.Nm ncthwm +.Nd Hardware monitoring controller on Nuvoton Super I/Os +.Sh SYNOPSIS +.Cd "device ncthwm" +.Cd "device superio" +.Sh DESCRIPTION +The +.Nm +is a driver for hardware monitoring controller that can be found in Nuvoton +Super I/O chips. It expose fan speed via +.Xr sysctl 8 . + +.Pp +The +.Nm +driver supports the following chips: +.Pp +.Bl -bullet -compact +.It +Nuvoton NCT6779 +.It +Nuvoton NCT6796D-E +.El + +.Sh SYSCTL VARIABLES +These variables are available as read-only +.Xr sysctl 8 +variables: +.Bl -tag -width indent +.It Va dev.ncthwm.0.CPUFAN +CPU fan speed in RPM. +.It Va dev.ncthwm.0.SYSFAN +System fan speed in RPM. +.It Va dev.ncthwm.0.AUXFAN0 +AUX0 fan speed in RPM. +.It Va dev.ncthwm.0.AUXFAN1 +AUX1 fan speed in RPM. +.It Va dev.ncthwm.0.AUXFAN2 +AUX2 fan speed in RPM. +.El + +.Sh HISTORY +The driver first appeared in +.Fx 14.0 . +.Sh AUTHORS +The driver was initially written by +.An Stéphane Rochoy Aq Mt stephane.rochoy@stormshield.eu . diff --git a/share/man/man4/nda.4 b/share/man/man4/nda.4 index d08469dc7b90..c4fa157af851 100644 --- a/share/man/man4/nda.4 +++ b/share/man/man4/nda.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 6, 2020 .Dt NDA 4 .Os diff --git a/share/man/man4/net80211.4 b/share/man/man4/net80211.4 index 629e84c35566..912a6c3147cf 100644 --- a/share/man/man4/net80211.4 +++ b/share/man/man4/net80211.4 @@ -26,8 +26,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGES. .\" -.\" $FreeBSD$ -.\" .Dd August 7, 2020 .Dt NET80211 4 .Os diff --git a/share/man/man4/netdump.4 b/share/man/man4/netdump.4 index a6150eb758e3..daf0d6ae31dc 100644 --- a/share/man/man4/netdump.4 +++ b/share/man/man4/netdump.4 @@ -22,18 +22,18 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd August 25, 2020 +.Dd November 10, 2022 .Dt NETDUMP 4 .Os .Sh NAME .Nm netdump .Nd protocol for transmitting kernel dumps to a remote server .Sh SYNOPSIS -To compile netdump client support into the kernel, place the following line in +To compile netdump client support into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "options INET" +.Cd "options DEBUGNET" .Cd "options NETDUMP" .Ed .Sh DESCRIPTION diff --git a/share/man/man4/netfpga10g_nf10bmac.4 b/share/man/man4/netfpga10g_nf10bmac.4 index a2ee787de527..3a6fc363eebd 100644 --- a/share/man/man4/netfpga10g_nf10bmac.4 +++ b/share/man/man4/netfpga10g_nf10bmac.4 @@ -27,8 +27,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 17, 2014 .Dt NETFPGA10G_NF10BMAC 4 .Os diff --git a/share/man/man4/netgdb.4 b/share/man/man4/netgdb.4 index aaa2a2801ca7..a86431fa129f 100644 --- a/share/man/man4/netgdb.4 +++ b/share/man/man4/netgdb.4 @@ -22,20 +22,21 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd October 17, 2019 +.Dd November 10, 2022 .Dt NETGDB 4 .Os .Sh NAME .Nm netgdb .Nd protocol for debugging the kernel with GDB over the network .Sh SYNOPSIS -NetGDB support is compiled by default, if DDB, GDB, and INET are enabled. -To build a kernel without it, add the following line to your kernel -configuration file: +To compile NetGDB support into the kernel, place the following lines in your +kernel configuration file: .Bd -ragged -offset indent -.Cd "nooptions NETGDB" +.Cd "options DDB" +.Cd "options GDB" +.Cd "options INET" +.Cd "options DEBUGNET" +.Cd "options NETGDB" .Ed .Sh DESCRIPTION .Nm @@ -65,7 +66,7 @@ At this point, the server proxies traffic back and forth between and the ordinary GDB client, speaking the ordinary GDB remote protocol. The .Nm -session is identical to any other kernel GDB sesssion from the perspective +session is identical to any other kernel GDB session from the perspective of the GDB debugger. .Sh IMPLEMENTATION NOTES The UDP protocol is based on the same packet structure and a subset of the diff --git a/share/man/man4/netgraph.4 b/share/man/man4/netgraph.4 index 6d3679041e5c..154f8f1e5b82 100644 --- a/share/man/man4/netgraph.4 +++ b/share/man/man4/netgraph.4 @@ -34,7 +34,6 @@ .\" Archie Cobbs <archie@FreeBSD.org> .\" .\" $Whistle: netgraph.4,v 1.7 1999/01/28 23:54:52 julian Exp $ -.\" $FreeBSD$ .\" .Dd September 29, 2021 .Dt NETGRAPH 4 @@ -1417,8 +1416,6 @@ common networking problems, solved using .Xr socket 2 , .Xr netgraph 3 , .Xr ng_async 4 , -.Xr ng_atm 4 , -.Xr ng_atmllc 4 , .Xr ng_bluetooth 4 , .Xr ng_bpf 4 , .Xr ng_bridge 4 , @@ -1454,13 +1451,10 @@ common networking problems, solved using .Xr ng_rfc1490 4 , .Xr ng_socket 4 , .Xr ng_split 4 , -.Xr ng_sscfu 4 , -.Xr ng_sscop 4 , .Xr ng_tee 4 , .Xr ng_tty 4 , .Xr ng_ubt 4 , .Xr ng_UI 4 , -.Xr ng_uni 4 , .Xr ng_vjc 4 , .Xr ng_vlan 4 , .Xr ngctl 8 , diff --git a/share/man/man4/netintro.4 b/share/man/man4/netintro.4 index 6066c9e74176..c6f8966ee047 100644 --- a/share/man/man4/netintro.4 +++ b/share/man/man4/netintro.4 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)netintro.4 8.2 (Berkeley) 11/30/93 -.\" $FreeBSD$ -.\" .Dd October 14, 2020 .Dt NETINTRO 4 .Os diff --git a/share/man/man4/netlink.4 b/share/man/man4/netlink.4 new file mode 100644 index 000000000000..2fa974df0ddf --- /dev/null +++ b/share/man/man4/netlink.4 @@ -0,0 +1,357 @@ +.\" +.\" Copyright (C) 2022 Alexander Chernikov <melifaro@FreeBSD.org>. +.\" +.\" 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. +.\" +.Dd November 30, 2022 +.Dt NETLINK 4 +.Os +.Sh NAME +.Nm Netlink +.Nd Kernel network configuration protocol +.Sh SYNOPSIS +.In netlink/netlink.h +.In netlink/netlink_route.h +.Ft int +.Fn socket AF_NETLINK SOCK_RAW "int family" +.Sh DESCRIPTION +Netlink is a user-kernel message-based communication protocol primarily used +for network stack configuration. +Netlink is easily extendable and supports large dumps and event +notifications, all via a single socket. +The protocol is fully asynchronous, allowing one to issue and track multiple +requests at once. +Netlink consists of multiple families, which commonly group the commands +belonging to the particular kernel subsystem. +Currently, the supported families are: +.Pp +.Bd -literal -offset indent -compact +NETLINK_ROUTE network configuration, +NETLINK_GENERIC "container" family +.Ed +.Pp +The +.Dv NETLINK_ROUTE +family handles all interfaces, addresses, neighbors, routes, and VNETs +configuration. +More details can be found in +.Xr rtnetlink 4 . +The +.Dv NETLINK_GENERIC +family serves as a +.Do container Dc , +allowing registering other families under the +.Dv NETLINK_GENERIC +umbrella. +This approach allows using a single netlink socket to interact with +multiple netlink families at once. +More details can be found in +.Xr genetlink 4 . +.Pp +Netlink has its own sockaddr structure: +.Bd -literal +struct sockaddr_nl { + uint8_t nl_len; /* sizeof(sockaddr_nl) */ + sa_family_t nl_family; /* netlink family */ + uint16_t nl_pad; /* reserved, set to 0 */ + uint32_t nl_pid; /* automatically selected, set to 0 */ + uint32_t nl_groups; /* multicast groups mask to bind to */ +}; +.Ed +.Pp +Typically, filling this structure is not required for socket operations. +It is presented here for completeness. +.Sh PROTOCOL DESCRIPTION +The protocol is message-based. +Each message starts with the mandatory +.Va nlmsghdr +header, followed by the family-specific header and the list of +type-length-value pairs (TLVs). +TLVs can be nested. +All headers and TLVS are padded to 4-byte boundaries. +Each +.Xr send 2 or +.Xr recv 2 +system call may contain multiple messages. +.Ss BASE HEADER +.Bd -literal +struct nlmsghdr { + uint32_t nlmsg_len; /* Length of message including header */ + uint16_t nlmsg_type; /* Message type identifier */ + uint16_t nlmsg_flags; /* Flags (NLM_F_) */ + uint32_t nlmsg_seq; /* Sequence number */ + uint32_t nlmsg_pid; /* Sending process port ID */ +}; +.Ed +.Pp +The +.Va nlmsg_len +field stores the whole message length, in bytes, including the header. +This length has to be rounded up to the nearest 4-byte boundary when +iterating over messages. +The +.Va nlmsg_type +field represents the command/request type. +This value is family-specific. +The list of supported commands can be found in the relevant family +header file. +.Va nlmsg_seq +is a user-provided request identifier. +An application can track the operation result using the +.Dv NLMSG_ERROR +messages and matching the +.Va nlmsg_seq +. +The +.Va nlmsg_pid +field is the message sender id. +This field is optional for userland. +The kernel sender id is zero. +The +.Va nlmsg_flags +field contains the message-specific flags. +The following generic flags are defined: +.Pp +.Bd -literal -offset indent -compact +NLM_F_REQUEST Indicates that the message is an actual request to the kernel +NLM_F_ACK Request an explicit ACK message with an operation result +.Ed +.Pp +The following generic flags are defined for the "GET" request types: +.Pp +.Bd -literal -offset indent -compact +NLM_F_ROOT Return the whole dataset +NLM_F_MATCH Return all entries matching the criteria +.Ed +These two flags are typically used together, aliased to +.Dv NLM_F_DUMP +.Pp +The following generic flags are defined for the "NEW" request types: +.Pp +.Bd -literal -offset indent -compact +NLM_F_CREATE Create an object if none exists +NLM_F_EXCL Don't replace an object if it exists +NLM_F_REPLACE Replace an existing matching object +NLM_F_APPEND Append to an existing object +.Ed +.Pp +The following generic flags are defined for the replies: +.Pp +.Bd -literal -offset indent -compact +NLM_F_MULTI Indicates that the message is part of the message group +NLM_F_DUMP_INTR Indicates that the state dump was not completed +NLM_F_DUMP_FILTERED Indicates that the dump was filtered per request +NLM_F_CAPPED Indicates the original message was capped to its header +NLM_F_ACK_TLVS Indicates that extended ACK TLVs were included +.Ed +.Ss TLVs +Most messages encode their attributes as type-length-value pairs (TLVs). +The base TLV header: +.Bd -literal +struct nlattr { + uint16_t nla_len; /* Total attribute length */ + uint16_t nla_type; /* Attribute type */ +}; +.Ed +The TLV type +.Pq Va nla_type +scope is typically the message type or group within a family. +For example, the +.Dv RTN_MULTICAST +type value is only valid for +.Dv RTM_NEWROUTE +, +.Dv RTM_DELROUTE +and +.Dv RTM_GETROUTE +messages. +TLVs can be nested; in that case internal TLVs may have their own sub-types. +All TLVs are packed with 4-byte padding. +.Ss CONTROL MESSAGES +A number of generic control messages are reserved in each family. +.Pp +.Dv NLMSG_ERROR +reports the operation result if requested, optionally followed by +the metadata TLVs. +The value of +.Va nlmsg_seq +is set to its value in the original messages, while +.Va nlmsg_pid +is set to the socket pid of the original socket. +The operation result is reported via +.Vt "struct nlmsgerr": +.Bd -literal +struct nlmsgerr { + int error; /* Standard errno */ + struct nlmsghdr msg; /* Original message header */ +}; +.Ed +If the +.Dv NETLINK_CAP_ACK +socket option is not set, the remainder of the original message will follow. +If the +.Dv NETLINK_EXT_ACK +socket option is set, the kernel may add a +.Dv NLMSGERR_ATTR_MSG +string TLV with the textual error description, optionally followed by the +.Dv NLMSGERR_ATTR_OFFS +TLV, indicating the offset from the message start that triggered an error. +Some operations may return additional metadata encapsulated in the +.Dv NLMSGERR_ATTR_COOKIE +TLV. +The metadata format is specific to the operation. +If the operation reply is a multipart message, then no +.Dv NLMSG_ERROR +reply is generated, only a +.Dv NLMSG_DONE +message, closing multipart sequence. +.Pp +.Dv NLMSG_DONE +indicates the end of the message group: typically, the end of the dump. +It contains a single +.Vt int +field, describing the dump result as a standard errno value. +.Sh SOCKET OPTIONS +Netlink supports a number of custom socket options, which can be set with +.Xr setsockopt 2 +with the +.Dv SOL_NETLINK +.Fa level : +.Bl -tag -width indent +.It Dv NETLINK_ADD_MEMBERSHIP +Subscribes to the notifications for the specific group (int). +.It Dv NETLINK_DROP_MEMBERSHIP +Unsubscribes from the notifications for the specific group (int). +.It Dv NETLINK_LIST_MEMBERSHIPS +Lists the memberships as a bitmask. +.It Dv NETLINK_CAP_ACK +Instructs the kernel to send the original message header in the reply +without the message body. +.It Dv NETLINK_EXT_ACK +Acknowledges ability to receive additional TLVs in the ACK message. +.El +.Pp +Additionally, netlink overrides the following socket options from the +.Dv SOL_SOCKET +.Fa level : +.Bl -tag -width indent +.It Dv SO_RCVBUF +Sets the maximum size of the socket receive buffer. +If the caller has +.Dv PRIV_NET_ROUTE +permission, the value can exceed the currently-set +.Va kern.ipc.maxsockbuf +value. +.El +.Sh SYSCTL VARIABLES +A set of +.Xr sysctl 8 +variables is available to tweak run-time parameters: +.Bl -tag -width indent +.It Va net.netlink.sendspace +Default send buffer for the netlink socket. +Note that the socket sendspace has to be at least as long as the longest +message that can be transmitted via this socket. +.El +.Bl -tag -width indent +.It Va net.netlink.recvspace +Default receive buffer for the netlink socket. +Note that the socket recvspace has to be least as long as the longest +message that can be received from this socket. +.El +.Bl -tag -width indent +.It Va net.netlink.nl_maxsockbuf +Maximum receive buffer for the netlink socket that can be set via +.Dv SO_RCVBUF +socket option. +.El +.Sh DEBUGGING +Netlink implements per-functional-unit debugging, with different severities +controllable via the +.Va net.netlink.debug +branch. +These messages are logged in the kernel message buffer and can be seen in +.Xr dmesg 8 +. +The following severity levels are defined: +.Bl -tag -width indent +.It Dv LOG_DEBUG(7) +Rare events or per-socket errors are reported here. +This is the default level, not impacting production performance. +.It Dv LOG_DEBUG2(8) +Socket events such as groups memberships, privilege checks, commands and dumps +are logged. +This level does not incur significant performance overhead. +.It Dv LOG_DEBUG3(9) +All socket events, each dumped or modified entities are logged. +Turning it on may result in significant performance overhead. +.El +.Sh ERRORS +Netlink reports operation results, including errors and error metadata, by +sending a +.Dv NLMSG_ERROR +message for each request message. +The following errors can be returned: +.Bl -tag -width Er +.It Bq Er EPERM +when the current privileges are insufficient to perform the required operation; +.It Bo Er ENOBUFS Bc or Bo Er ENOMEM Bc +when the system runs out of memory for +an internal data structure; +.It Bq Er ENOTSUP +when the requested command is not supported by the family or +the family is not supported; +.It Bq Er EINVAL +when some necessary TLVs are missing or invalid, detailed info +may be provided in NLMSGERR_ATTR_MSG and NLMSGERR_ATTR_OFFS TLVs; +.It Bq Er ENOENT +when trying to delete a non-existent object. +.Pp +Additionally, a socket operation itself may fail with one of the errors +specified in +.Xr socket 2 +, +.Xr recv 2 +or +.Xr send 2 +. +.El +.Sh SEE ALSO +.Xr genetlink 4 , +.Xr rtnetlink 4 +.Rs +.%A "J. Salim" +.%A "H. Khosravi" +.%A "A. Kleen" +.%A "A. Kuznetsov" +.%T "Linux Netlink as an IP Services Protocol" +.%O "RFC 3549" +.Re +.Sh HISTORY +The netlink protocol appeared in +.Fx 13.2 . +.Sh AUTHORS +The netlink was implemented by +.An -nosplit +.An Alexander Chernikov Aq Mt melifaro@FreeBSD.org . +It was derived from the Google Summer of Code 2021 project by +.An Ng Peng Nam Sean . diff --git a/share/man/man4/netmap.4 b/share/man/man4/netmap.4 index 535b2dfdfb4e..6be0c8662d59 100644 --- a/share/man/man4/netmap.4 +++ b/share/man/man4/netmap.4 @@ -25,9 +25,7 @@ .\" This document is derived in part from the enet man page (enet.4) .\" distributed with 4.3BSD Unix. .\" -.\" $FreeBSD$ -.\" -.Dd March 6, 2022 +.Dd October 10, 2024 .Dt NETMAP 4 .Os .Sh NAME @@ -829,7 +827,7 @@ On .Xr em 4 , .Xr iflib 4 .Pq providing Xr igb 4 and Xr em 4 , -.Xr ixgbe 4 , +.Xr ix 4 , .Xr ixl 4 , .Xr re 4 , .Xr vtnet 4 . @@ -940,6 +938,16 @@ switches that can be created. This tunable can be specified at loader time. .It Va dev.netmap.ptnet_vnet_hdr: 1 Allow ptnet devices to use virtio-net headers +.It Va dev.netmap.port_numa_affinity: 0 +On +.Xr numa 4 +systems, allocate memory for netmap ports from the local NUMA domain when +possible. +This can improve performance by reducing the number of remote memory accesses. +However, when forwarding packets between ports attached to different NUMA +domains, this will prevent zero-copy forwarding optimizations and thus may hurt +performance. +Note that this setting must be specified as a loader tunable at boot time. .El .Sh SYSTEM CALLS .Nm @@ -1115,10 +1123,10 @@ with the network card or the host. .Sh SEE ALSO .Xr vale 4 , .Xr bridge 8 , -.Xr valectl 8 , .Xr lb 8 , .Xr nmreplay 8 , -.Xr pkt-gen 8 +.Xr pkt-gen 8 , +.Xr valectl 8 .Pp .Pa http://info.iet.unipi.it/~luigi/netmap/ .Pp diff --git a/share/man/man4/nfe.4 b/share/man/man4/nfe.4 index b9f91a20aa8f..1194923f51da 100644 --- a/share/man/man4/nfe.4 +++ b/share/man/man4/nfe.4 @@ -14,8 +14,6 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" .Dd January 15, 2011 .Dt NFE 4 .Os diff --git a/share/man/man4/nfslockd.4 b/share/man/man4/nfslockd.4 new file mode 100644 index 000000000000..770d9b8736b0 --- /dev/null +++ b/share/man/man4/nfslockd.4 @@ -0,0 +1,45 @@ +.\"- +.\" Copyright (c) 2024 Dag-Erling Smørgrav +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd May 8, 2024 +.Dt NFSLOCKD 4 +.Os +.Sh NAME +.Nm nfslockd +.Nd NFS advisory locking +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines in +your kernel configuration file: +.Bd -ragged -offset indent +.Cd "options NFSLOCKD" +.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 +nfslockd_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides kernel support for NFSv3 advisory locking. +It works in tandem with +.Xr rpc.lockd 8 , +which will normally load it on startup if it is not already loaded or +compiled-in. +.Sh SEE ALSO +.Xr rpc.lockd 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 6.4 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Doug Rabson Aq Mt dfr@FreeBSD.org . diff --git a/share/man/man4/nfsmb.4 b/share/man/man4/nfsmb.4 index f3022191ea8e..d19ac4dfe05e 100644 --- a/share/man/man4/nfsmb.4 +++ b/share/man/man4/nfsmb.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 31, 2005 .Dt NFSMB 4 .Os diff --git a/share/man/man4/ng_UI.4 b/share/man/man4/ng_UI.4 index f00cb63f117e..14ee8a43a8e6 100644 --- a/share/man/man4/ng_UI.4 +++ b/share/man/man4/ng_UI.4 @@ -31,8 +31,6 @@ .\" OF SUCH DAMAGE. .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> -.\" -.\" $FreeBSD$ .\" $Whistle: ng_UI.8,v 1.4 1999/01/25 02:37:56 archie Exp $ .\" .Dd January 19, 1999 diff --git a/share/man/man4/ng_async.4 b/share/man/man4/ng_async.4 index cf38b2ed8421..f1ccadd99786 100644 --- a/share/man/man4/ng_async.4 +++ b/share/man/man4/ng_async.4 @@ -31,8 +31,6 @@ .\" OF SUCH DAMAGE. .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> -.\" -.\" $FreeBSD$ .\" $Whistle: ng_async.8,v 1.6 1999/01/25 23:46:25 archie Exp $ .\" .Dd November 13, 2012 diff --git a/share/man/man4/ng_atmllc.4 b/share/man/man4/ng_atmllc.4 deleted file mode 100644 index 3c7cfa947fc7..000000000000 --- a/share/man/man4/ng_atmllc.4 +++ /dev/null @@ -1,96 +0,0 @@ -.\" Copyright (c) 2004 Benno Rice <benno@FreeBSD.org> -.\" 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 March 8, 2004 -.Dt NG_ATMLLC 4 -.Os -.Sh NAME -.Nm ng_atmllc -.Nd ATM LLC netgraph node type -.Sh SYNOPSIS -.In netgraph/ng_atmllc.h -.Sh DESCRIPTION -The -.Nm atmllc -node type translates frames in to and out of ATM LLC encapsulation, -as specified by RFC 1483. -In LLC encapsulation the protocol of a given protocol data unit (PDU) is -specified by an IEEE 802.2 LLC header, possibly followed by an IEEE 802.1a -SubNetwork Attachment Point (SNAP) header. -This node currently handles the Ethernet and FDDI protocols. -.Pp -The node transmits and receives ATM PDUs on the -.Va atm -hook. -Received PDUs are decoded and forwarded to the -.Va ether -or -.Va fddi -hooks as appropriate. -Data received on the -.Va ether -or -.Va fddi -hooks are assumed to be full Ethernet or FDDI packets as appropriate and are -encapsulated into a PDU and transmitted via the -.Va atm -hook. -.Sh HOOKS -This node type supports the following hooks: -.Bl -tag -width ".Va ether" -.It Va atm -ATM connection. -Typically, this hook would be connected to a -.Xr ng_atm 4 -node, which handles transmission of ATM PDUs over an ATM device. -.It Va ether -Ethernet connection. -This hook sends and receives Ethernet frames. -This would normally be connected to an -.Xr ng_eiface 4 -node if in use. -.It Va fddi -FDDI connection. -This hook sends and receives FDDI frames. -.El -.Sh CONTROL MESSAGES -This node type supports the generic control messages. -.Sh SHUTDOWN -This node shuts down upon receipt of a -.Dv NGM_SHUTDOWN -control message, or when all hooks have been disconnected. -.Sh SEE ALSO -.Xr netgraph 4 , -.Xr ng_atm 4 , -.Xr ng_eiface 4 , -.Xr ngctl 8 -.Rs -.%A J. Heinanen -.%T "Multiprotocol Encapsulation over ATM Adaptation Layer 5" -.%O RFC 1483 -.Re -.Sh AUTHORS -.An Benno Rice Aq Mt benno@FreeBSD.org diff --git a/share/man/man4/ng_bluetooth.4 b/share/man/man4/ng_bluetooth.4 index b19dee157ae6..d6d2f6f8d78e 100644 --- a/share/man/man4/ng_bluetooth.4 +++ b/share/man/man4/ng_bluetooth.4 @@ -23,7 +23,6 @@ .\" SUCH DAMAGE. .\" .\" $Id: ng_bluetooth.4,v 1.3 2003/05/21 19:37:35 max Exp $ -.\" $FreeBSD$ .\" .Dd November 9, 2002 .Dt NG_BLUETOOTH 4 diff --git a/share/man/man4/ng_bpf.4 b/share/man/man4/ng_bpf.4 index b04b57baf1dd..98b5cdf20d45 100644 --- a/share/man/man4/ng_bpf.4 +++ b/share/man/man4/ng_bpf.4 @@ -31,8 +31,6 @@ .\" OF SUCH DAMAGE. .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> -.\" -.\" $FreeBSD$ .\" $Whistle: ng_bpf.8,v 1.2 1999/12/03 01:57:12 archie Exp $ .\" .Dd September 20, 2020 diff --git a/share/man/man4/ng_bridge.4 b/share/man/man4/ng_bridge.4 index f83bacecce40..998c428cbad0 100644 --- a/share/man/man4/ng_bridge.4 +++ b/share/man/man4/ng_bridge.4 @@ -32,9 +32,7 @@ .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> .\" -.\" $FreeBSD$ -.\" -.Dd May 13, 2021 +.Dd April 8, 2024 .Dt NG_BRIDGE 4 .Os .Sh NAME @@ -109,13 +107,27 @@ hook of the bridge, and ignore the complexity of the outside world. Frames with unknown MACs are always sent out to .Ar uplink hooks, so no functionality is lost. +The +.Ar uplink0 +hook is not allowed. +.Pp +The +.Ar linkX +and +.Ar uplinkX +hook numbers can be autoassigned. +If a new hook name was specified as +.Ar link +or +.Ar uplink +the node will append lowest available valid number to the name of the new hook. .Pp Frames with unknown destination MAC addresses are replicated to any available hook, unless the first connected hook is an .Ar uplink hook. In this case the node assumes, that all unknown MAC addresses are -located soley on the +located solely on the .Ar uplink hooks and only those hooks will be used to send out frames with unknown destination MACs. @@ -268,3 +280,11 @@ node type was implemented in .Fx 4.2 . .Sh AUTHORS .An Archie Cobbs Aq Mt archie@FreeBSD.org +.Sh BUGS +The +.Nm +node refuses to create the +.Ar uplink0 +hook to avoid later ambiguity with the +.Dv NGM_BRIDGE_GET_STATS +message. diff --git a/share/man/man4/ng_btsocket.4 b/share/man/man4/ng_btsocket.4 index 27c77adad457..d16ccccbeb90 100644 --- a/share/man/man4/ng_btsocket.4 +++ b/share/man/man4/ng_btsocket.4 @@ -23,7 +23,6 @@ .\" SUCH DAMAGE. .\" .\" $Id: ng_btsocket.4,v 1.7 2003/05/21 19:37:35 max Exp $ -.\" $FreeBSD$ .\" .Dd November 13, 2012 .Dt NG_BTSOCKET 4 diff --git a/share/man/man4/ng_car.4 b/share/man/man4/ng_car.4 index abb522ae151b..e111a86b95d7 100644 --- a/share/man/man4/ng_car.4 +++ b/share/man/man4/ng_car.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 27, 2021 .Dt NG_CAR 4 .Os diff --git a/share/man/man4/ng_ccatm.4 b/share/man/man4/ng_ccatm.4 deleted file mode 100644 index 3d6778fa25d5..000000000000 --- a/share/man/man4/ng_ccatm.4 +++ /dev/null @@ -1,323 +0,0 @@ -.\" -.\" Copyright (c) 2001-2004 -.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). -.\" All rights reserved. -.\" Copyright (c) 2005 -.\" Hartmut Brandt. -.\" All rights reserved. -.\" -.\" Author: Harti Brandt <harti@FreeBSD.org> -.\" -.\" 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 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 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 March 10, 2005 -.Dt NG_CCATM 4 -.Os -.Sh NAME -.Nm ng_ccatm -.Nd "ATM Call Control netgraph node type" -.Sh SYNOPSIS -.In netnatm/unimsg.h -.In netnatm/msg/unistruct.h -.In netnatm/sig/unidef.h -.In netnatm/api/unisap.h -.In netnatm/api/atmapi.h -.In netnatm/api/ccatm.h -.In netgraph.h -.In netgraph/ng_uni.h -.In netgraph/ng_ccatm.h -.Sh DESCRIPTION -The -.Nm -node implements the API specified by the ATM Forum for access to ATM services -(see ATM-Forum document -.Pa af-saa-0108 ) . -This document specifies the semantics -of the API, not the exact language binding. -For this reason, it is expected that -this implementation is neither compile-time nor binary compatible with -other implementations of this API. -It should, however, be fairly straightforward -to convert between different API implementations. -.Pp -This node is usually stacked on top of one or more UNI nodes (see -.Xr ng_uni 4 ) . -Each of these hooks appears as a -.Dq port -to the user of the node. -It also has one hook connected to the ILMI daemon for management purposes. -.Pp -The node is removed when it receives a -.Dv NGM_SHUTDOWN -messages or when all hooks are disconnected. -.Sh HOOKS -The node understands a number of hooks with predefined names and an -unlimited number of hooks for user connections. -The predefined names are: -.Bl -tag -width ".Va orphans" -.It Va uni Ns Ar NNN -These hooks stack the -.Nm -node on top of a UNI stack. -The node expects the interface on these hooks -to conform to the upper interface specified in -.Xr ng_uni 4 . -These hooks are forced into queuing mode, so that there are no circular -calls from call control to UNI and UNI back to call control. -The -.Ar NNN -in the hook name is the decimal port number and should not be zero. -The port number is a 32-bit unsigned integer. -.It Va manage -This hook should be connected to the ILMI daemon. -No data is ever sent on this hook and all received data is discarded. -The hook is used to send control messages along. -.It Va dump -On receipt of a -.Dv NGM_CCATM_DUMP -command a textual description of the current state of the node is sent -out of this hook. -This text is sent as one large message consisting of more -than one -.Vt mbuf . -.El -.Pp -All other hook names are taken to be user hooks and correspond to an -ATM endpoint as specified in the ATM Forum document. -The interface on these hooks is defined in -.In atmapi.h -and uses a structure -.Bd -literal -struct ccatm_op { - uint32_t op; /* request code */ - u_char data[]; /* optional data */ -}; -.Ed -.Pp -This structure is followed directly by the data for the operation. -The opcode is one of the following: -.Bd -literal -enum atmop { - ATMOP_RESP, - ATMOP_ABORT_CONNECTION, - ATMOP_ACCEPT_INCOMING_CALL, - ATMOP_ADD_PARTY, - ATMOP_ADD_PARTY_REJECT, - ATMOP_ADD_PARTY_SUCCESS, - ATMOP_ARRIVAL_OF_INCOMING_CALL, - ATMOP_CALL_RELEASE, - ATMOP_CONNECT_OUTGOING_CALL, - ATMOP_DROP_PARTY, - ATMOP_GET_LOCAL_PORT_INFO, - ATMOP_P2MP_CALL_ACTIVE, - ATMOP_P2P_CALL_ACTIVE, - ATMOP_PREPARE_INCOMING_CALL, - ATMOP_PREPARE_OUTGOING_CALL, - ATMOP_QUERY_CONNECTION_ATTRIBUTES, - ATMOP_REJECT_INCOMING_CALL, - ATMOP_SET_CONNECTION_ATTRIBUTES, - ATMOP_WAIT_ON_INCOMING_CALL, - ATMOP_SET_CONNECTION_ATTRIBUTES_X, - ATMOP_QUERY_CONNECTION_ATTRIBUTES_X, - ATMOP_QUERY_STATE -}; -.Ed -.Pp -These codes correspond directly to the operations specified in the ATM -Forum document with the following exceptions: -.Bl -tag -width foo -.It Dv ATMOP_RESP -As discussed in -.Xr ng_uni 4 , -this is used to -.Dq synchronify -the interface. -The argument is a -.Bd -literal -struct atm_resp { - int32_t resp; - uint32_t data; /* type of attached data */ -}; -.Ed -.Pp -If the response code -.Va resp -is zero, the node has accepted the user request. -If something goes wrong, -.Va resp -contains an error code. -For requests that return data, -.Va data -contains a code describing the type of data and the data itself -starts immediately after the structure. -.It Dv ATMOP_QUERY_CONNECTION_ATTRIBUTES_X -This is the same as -.Dv ATMOP_QUERY_CONNECTION_ATTRIBUTES -except that it allows to query several attributes -within one request. -.It Dv ATMOP_SET_CONNECTION_ATTRIBUTES_X -This is the same as -.Dv ATMOP_SET_CONNECTION_ATTRIBUTES -except that it allows to set several attributes -within one request. -The list of attributes is followed directly by the attributes in the same -order as they appear in the list. -.El -.Pp -If a user hook is disconnected, an active connection on that hook is released. -Incoming connections waiting to be accepted are reoffered to other -listening hooks or rejected. -.Sh CONTROL MESSAGES -Besides the generic messages the node understands the following special -messages: -.Bl -tag -width foo -.It Dv NGM_CCATM_DUMP Pq Ic dump -This causes the internal state of the node to be dumped in ASCII to the -.Va dump -hook. -.It Dv NGM_CCATM_STOP Pq Ic stop -This message causes all connections on that port to be aborted (not released!\&) -and all ATM endpoints which are bound to that port to be closed. -It stops processing of all messages from the UNI stack on that port UNI stack. -The argument is a -.Bd -literal -struct ngm_ccatm_port { - uint32_t port; -}; -.Ed -.It Dv NGM_CCATM_START Pq Ic start -Start processing on the port. -The argument is a -.Vt ngm_ccatm_port -structure. -.It Dv NGM_CCATM_CLEAR Pq Ic clear -This message takes a -.Vt ngm_ccatm_port -structure and clears all prefixes and addresses on that port. -If the port number is zero, all ports are cleared. -.It Dv NGM_CCATM_GET_ADDRESSES Pq Ic get_addresses -Get the list of all registered addresses on the given port. -The argument is a -.Vt ngm_ccatm_port -structure and the result is a -.Vt ngm_ccatm_get_addresses -structure: -.Bd -literal -struct ngm_ccatm_get_addresses { - uint32_t count; - struct ngm_ccatm_address_req addr[0]; -}; -struct ngm_ccatm_address_req { - uint32_t port; - struct uni_addr addr; -}; -.Ed -.Pp -If the -.Va port -field is zero in the request, all addresses on all ports -are returned. -If it is not zero, only the addresses on that port are reported. -The number of addresses is returned in the -.Va count -field. -.It Dv NGM_CCATM_ADDRESS_REGISTERED Pq Ic address_reg -This message is used by ILMI to inform the -.Nm -node that a previous address registration request was successful. -This causes the node to activate that address. -The argument to the message is a -.Vt ngm_ccatm_address_req -structure. -.It Dv NGM_CCATM_ADDRESS_UNREGISTERED Pq Ic address_unreg -This message is used by ILMI to inform the -.Nm -node that an address has been unregistered. -The node clears that address from its tables. -The argument is a -.Vt ngm_ccatm_address_req -structure. -.It Dv NGM_CCATM_SET_PORT_PARAM Pq Ic set_port_param -This request sets the parameters on the given port. -The argument is a -.Bd -literal -struct ngm_ccatm_atm_port { - uint32_t port; /* port for which to set parameters */ - uint32_t pcr; /* port peak cell rate */ - uint32_t max_vpi_bits; - uint32_t max_vci_bits; - uint32_t max_svpc_vpi; - uint32_t max_svcc_vpi; - uint32_t min_svcc_vci; - uint8_t esi[6]; - uint32_t num_addr; -}; -.Ed -.Pp -This should be used only by ILMI and when that port is stopped and the -address and prefix tables of that port are empty. -The -.Va num_addr -field is ignored. -.It Dv NGM_CCATM_GET_PORT_PARAM Pq Ic get_port_param -Retrieve the parameters of the given port. -The argument is a -.Vt ngm_ccatm_port -and the result a -.Vt ngm_ccatm_atm_port . -.It Dv NGM_CCATM_GET_PORTLIST Pq Ic get_portlist -Get a list of all available ports on that node. -This is returned as a -.Bd -literal -struct ngm_ccatm_portlist { - uint32_t nports; - uint32_t ports[]; -}; -.Ed -.It Dv NGM_CCATM_GETSTATE Pq Ic getstate -Return the state of a port. -The argument is a -.Vt "struct ngm_ccatm_port" -and the return values as a -.Vt uint32_t . -.It Dv NGM_CCATM_SETLOG Pq Ic setlog -This requests sets a new logging level and returns the previous one. -The argument is either a -.Vt uint32_t -in which case it specifies the new logging level, or may be empty -in which case just the old level is returned as a -.Vt uint32_t . -.It Dv NGM_CCATM_RESET Pq Ic reset -Reset the node. -This is allowed only if the number of user hooks and connected UNI stacks is -zero. -.It Dv NGM_CCATM_GET_EXSTAT -Return extended status information from the node. -.El -.Sh SEE ALSO -.Xr netgraph 4 , -.Xr ng_uni 4 , -.Xr ngctl 8 -.Sh AUTHORS -.An Harti Brandt Aq Mt harti@FreeBSD.org diff --git a/share/man/man4/ng_checksum.4 b/share/man/man4/ng_checksum.4 index a0b67447db8a..d57f1b009dc7 100644 --- a/share/man/man4/ng_checksum.4 +++ b/share/man/man4/ng_checksum.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 29, 2015 .Dt NG_CHECKSUM 4 .Os diff --git a/share/man/man4/ng_cisco.4 b/share/man/man4/ng_cisco.4 index 3904176855b8..f32b13f92830 100644 --- a/share/man/man4/ng_cisco.4 +++ b/share/man/man4/ng_cisco.4 @@ -31,8 +31,6 @@ .\" OF SUCH DAMAGE. .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> -.\" -.\" $FreeBSD$ .\" $Whistle: ng_cisco.8,v 1.5 1999/01/25 23:46:26 archie Exp $ .\" .Dd January 19, 1999 diff --git a/share/man/man4/ng_deflate.4 b/share/man/man4/ng_deflate.4 index fef00ffefca7..397efe622edb 100644 --- a/share/man/man4/ng_deflate.4 +++ b/share/man/man4/ng_deflate.4 @@ -26,8 +26,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 23, 2006 .Dt NG_DEFLATE 4 .Os diff --git a/share/man/man4/ng_device.4 b/share/man/man4/ng_device.4 index 8b1ee32b8536..003c9bc95707 100644 --- a/share/man/man4/ng_device.4 +++ b/share/man/man4/ng_device.4 @@ -22,8 +22,6 @@ .\" (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 November 8, 2021 .Dt NG_DEVICE 4 .Os diff --git a/share/man/man4/ng_echo.4 b/share/man/man4/ng_echo.4 index ac05d54cae0e..2300b4d4a5eb 100644 --- a/share/man/man4/ng_echo.4 +++ b/share/man/man4/ng_echo.4 @@ -31,8 +31,6 @@ .\" OF SUCH DAMAGE. .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> -.\" -.\" $FreeBSD$ .\" $Whistle: ng_echo.8,v 1.4 1999/01/25 23:46:26 archie Exp $ .\" .Dd January 19, 1999 diff --git a/share/man/man4/ng_eiface.4 b/share/man/man4/ng_eiface.4 index 6e4239e70c2a..c2b644556686 100644 --- a/share/man/man4/ng_eiface.4 +++ b/share/man/man4/ng_eiface.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 14, 2019 .Dt NG_EIFACE 4 .Os diff --git a/share/man/man4/ng_etf.4 b/share/man/man4/ng_etf.4 index 5e78b3d0bab4..8aa4cdb85b67 100644 --- a/share/man/man4/ng_etf.4 +++ b/share/man/man4/ng_etf.4 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 13, 2012 .Dt NG_ETF 4 .Os diff --git a/share/man/man4/ng_ether.4 b/share/man/man4/ng_ether.4 index 6d579e8b9f55..79c30ca7788e 100644 --- a/share/man/man4/ng_ether.4 +++ b/share/man/man4/ng_ether.4 @@ -32,8 +32,6 @@ .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> .\" -.\" $FreeBSD$ -.\" .Dd June 23, 2011 .Dt NG_ETHER 4 .Os diff --git a/share/man/man4/ng_ether_echo.4 b/share/man/man4/ng_ether_echo.4 index a62c55320ccb..061c0ee833fc 100644 --- a/share/man/man4/ng_ether_echo.4 +++ b/share/man/man4/ng_ether_echo.4 @@ -31,8 +31,6 @@ .\" OF SUCH DAMAGE. .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> -.\" -.\" $FreeBSD$ .\" $Whistle: ng_echo.8,v 1.4 1999/01/25 23:46:26 archie Exp $ .\" .Dd December 24, 2008 diff --git a/share/man/man4/ng_frame_relay.4 b/share/man/man4/ng_frame_relay.4 index 7f7f0251ba62..91d9d4b5cae6 100644 --- a/share/man/man4/ng_frame_relay.4 +++ b/share/man/man4/ng_frame_relay.4 @@ -31,8 +31,6 @@ .\" OF SUCH DAMAGE. .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> -.\" -.\" $FreeBSD$ .\" $Whistle: ng_frame_relay.8,v 1.4 1999/01/25 23:46:26 archie Exp $ .\" .Dd January 19, 1999 diff --git a/share/man/man4/ng_gif.4 b/share/man/man4/ng_gif.4 index dcda5e651f15..405f34a0e254 100644 --- a/share/man/man4/ng_gif.4 +++ b/share/man/man4/ng_gif.4 @@ -26,8 +26,6 @@ .\" .\" Author: Brooks Davis <brooks@FreeBSD.org> .\" -.\" $FreeBSD$ -.\" .Dd September 18, 2001 .Dt NG_GIF 4 .Os diff --git a/share/man/man4/ng_gif_demux.4 b/share/man/man4/ng_gif_demux.4 index e827659b8f58..2855c2563492 100644 --- a/share/man/man4/ng_gif_demux.4 +++ b/share/man/man4/ng_gif_demux.4 @@ -26,8 +26,6 @@ .\" .\" Author: Brooks Davis <brooks@FreeBSD.org> .\" -.\" $FreeBSD$ -.\" .Dd September 18, 2001 .Dt NG_GIF_DEMUX 4 .Os diff --git a/share/man/man4/ng_hci.4 b/share/man/man4/ng_hci.4 index d5727ef83ea3..559d21cb3cde 100644 --- a/share/man/man4/ng_hci.4 +++ b/share/man/man4/ng_hci.4 @@ -23,7 +23,6 @@ .\" SUCH DAMAGE. .\" .\" $Id: ng_hci.4,v 1.3 2003/05/21 19:37:35 max Exp $ -.\" $FreeBSD$ .\" .Dd June 25, 2002 .Dt NG_HCI 4 diff --git a/share/man/man4/ng_hole.4 b/share/man/man4/ng_hole.4 index 227170d422e8..22945fb03e21 100644 --- a/share/man/man4/ng_hole.4 +++ b/share/man/man4/ng_hole.4 @@ -31,8 +31,6 @@ .\" OF SUCH DAMAGE. .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> -.\" -.\" $FreeBSD$ .\" $Whistle: ng_hole.8,v 1.4 1999/01/25 23:46:26 archie Exp $ .\" .Dd May 19, 2004 diff --git a/share/man/man4/ng_hub.4 b/share/man/man4/ng_hub.4 index bba9e1160577..9959cca926b5 100644 --- a/share/man/man4/ng_hub.4 +++ b/share/man/man4/ng_hub.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 5, 2010 .Dt NG_HUB 4 .Os diff --git a/share/man/man4/ng_iface.4 b/share/man/man4/ng_iface.4 index 2259ea1076d3..e2dee22b67b9 100644 --- a/share/man/man4/ng_iface.4 +++ b/share/man/man4/ng_iface.4 @@ -31,8 +31,6 @@ .\" OF SUCH DAMAGE. .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> -.\" -.\" $FreeBSD$ .\" $Whistle: ng_iface.8,v 1.5 1999/01/25 23:46:26 archie Exp $ .\" .Dd July 31, 2020 @@ -155,8 +153,8 @@ to the desired level of nesting. .Xr netgraph 4 , .Xr ng_cisco 4 , .Xr ifconfig 8 , -.Xr ngctl 8 -.Xr sysctl +.Xr ngctl 8 , +.Xr sysctl 8 .Sh HISTORY The .Nm iface diff --git a/share/man/man4/ng_ip_input.4 b/share/man/man4/ng_ip_input.4 index 0c4cbafd2f48..73893c3ff8a7 100644 --- a/share/man/man4/ng_ip_input.4 +++ b/share/man/man4/ng_ip_input.4 @@ -59,8 +59,6 @@ .\" Author: Brooks Davis <brooks@FreeBSD.org> .\" Derived from: ng_hole.4 .\" -.\" $FreeBSD$ -.\" .Dd September 27, 2001 .Dt NG_IP_INPUT 4 .Os diff --git a/share/man/man4/ng_ipfw.4 b/share/man/man4/ng_ipfw.4 index 19e8f7418884..eef30ffa5510 100644 --- a/share/man/man4/ng_ipfw.4 +++ b/share/man/man4/ng_ipfw.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 2, 2010 .Dt NG_IPFW 4 .Os diff --git a/share/man/man4/ng_ksocket.4 b/share/man/man4/ng_ksocket.4 index 0590bbf91f3d..bb653c3688ad 100644 --- a/share/man/man4/ng_ksocket.4 +++ b/share/man/man4/ng_ksocket.4 @@ -32,9 +32,7 @@ .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> .\" -.\" $FreeBSD$ -.\" -.Dd January 9, 2012 +.Dd January 9, 2025 .Dt NG_KSOCKET 4 .Os .Sh NAME @@ -185,7 +183,8 @@ in the argument field, the normal equivalent of the C structure is an acceptable form. For the -.Dv PF_INET +.Dv PF_INET , +.Dv PF_INET6 and .Dv PF_LOCAL address families, a more convenient form is also used, which is @@ -193,7 +192,11 @@ the protocol family name, followed by a slash, followed by the actual address. For .Dv PF_INET , -the address is an IP address followed by an optional colon and port number. +the address is an IPv4 address followed by an optional colon and port number. +For +.Dv PF_INET6 , +the address is an IPv6 address enclosed in square brackets followed +by an optional colon and port number. For .Dv PF_LOCAL , the address is the pathname as a doubly quoted string. @@ -204,6 +207,8 @@ Examples: local/"/tmp/foo.socket" .It Dv PF_INET inet/192.168.1.1:1234 +.It Dv PF_INET6 +inet6/[2001::1]:1234 .It Other .Dv "\&{ family=16 len=16 data=[0x70 0x00 0x01 0x23] \&}" .El diff --git a/share/man/man4/ng_l2cap.4 b/share/man/man4/ng_l2cap.4 index 63b2ede785a9..0fa3901a1ce5 100644 --- a/share/man/man4/ng_l2cap.4 +++ b/share/man/man4/ng_l2cap.4 @@ -23,7 +23,6 @@ .\" SUCH DAMAGE. .\" .\" $Id: ng_l2cap.4,v 1.4 2003/09/14 23:37:52 max Exp $ -.\" $FreeBSD$ .\" .Dd July 4, 2002 .Dt NG_L2CAP 4 diff --git a/share/man/man4/ng_l2tp.4 b/share/man/man4/ng_l2tp.4 index 11f3c5e515b1..becde35e2f1b 100644 --- a/share/man/man4/ng_l2tp.4 +++ b/share/man/man4/ng_l2tp.4 @@ -35,8 +35,6 @@ .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> .\" -.\" $FreeBSD$ -.\" .Dd November 13, 2012 .Dt NG_L2TP 4 .Os diff --git a/share/man/man4/ng_lmi.4 b/share/man/man4/ng_lmi.4 index 21a96d1628b4..691f00ad9bb4 100644 --- a/share/man/man4/ng_lmi.4 +++ b/share/man/man4/ng_lmi.4 @@ -31,8 +31,6 @@ .\" OF SUCH DAMAGE. .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> -.\" -.\" $FreeBSD$ .\" $Whistle: ng_lmi.8,v 1.4 1999/01/25 23:46:27 archie Exp $ .\" .Dd November 13, 2012 diff --git a/share/man/man4/ng_macfilter.4 b/share/man/man4/ng_macfilter.4 index 895d3560136b..904f194f7fec 100644 --- a/share/man/man4/ng_macfilter.4 +++ b/share/man/man4/ng_macfilter.4 @@ -26,8 +26,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 10, 2018 .Dt NG_MACFILTER 4 .Os @@ -69,7 +67,7 @@ hook, to be connected to the .Dv lower hook of the NIC, and a .Dv default -hook where packets are sent if the MAC adddress is not found in the table. +hook where packets are sent if the MAC address is not found in the table. .Nm macfilter supports up to .Dv NG_MACFILTER_UPPER_NUM diff --git a/share/man/man4/ng_mppc.4 b/share/man/man4/ng_mppc.4 index 0b06350d2ba6..fa000d87d57c 100644 --- a/share/man/man4/ng_mppc.4 +++ b/share/man/man4/ng_mppc.4 @@ -33,7 +33,6 @@ .\" Author: Archie Cobbs <archie@FreeBSD.org> .\" .\" $Whistle: ng_mppc.8,v 1.1 1999/12/08 20:20:39 archie Exp $ -.\" $FreeBSD$ .\" .Dd June 7, 2016 .Dt NG_MPPC 4 diff --git a/share/man/man4/ng_nat.4 b/share/man/man4/ng_nat.4 index e9c0f2acbcee..20042db7a1af 100644 --- a/share/man/man4/ng_nat.4 +++ b/share/man/man4/ng_nat.4 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd January 24, 2021 +.Dd December 6, 2024 .Dt NG_NAT 4 .Os .Sh NAME @@ -76,6 +74,7 @@ struct ng_nat_mode { #define NG_NAT_PROXY_ONLY 0x40 #define NG_NAT_REVERSE 0x80 #define NG_NAT_UNREGISTERED_CGN 0x100 +#define NG_NAT_UDP_EIM 0x200 .Ed .Pp The corresponding libalias flags can be found by replacing the @@ -267,7 +266,7 @@ In case of .Nm failed to retrieve a certain counter from its -.Xr libalias +.Xr libalias 3 instance, the corresponding field is returned as .Va UINT32_MAX . .It Dv NGM_NAT_SET_DLT Pq Ic setdlt @@ -398,8 +397,8 @@ SEQ .Xr libalias 3 , .Xr ng_ipfw 4 , .Xr natd 8 , -.Xr ngctl 8 , -.Xr ng_ether 8 +.Xr ng_ether 8 , +.Xr ngctl 8 .Sh HISTORY The .Nm diff --git a/share/man/man4/ng_netflow.4 b/share/man/man4/ng_netflow.4 index 5372f6cb8d1c..e313eb065710 100644 --- a/share/man/man4/ng_netflow.4 +++ b/share/man/man4/ng_netflow.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 10, 2012 .Dt NG_NETFLOW 4 .Os diff --git a/share/man/man4/ng_one2many.4 b/share/man/man4/ng_one2many.4 index 845254e19069..06bcbabedb63 100644 --- a/share/man/man4/ng_one2many.4 +++ b/share/man/man4/ng_one2many.4 @@ -32,8 +32,6 @@ .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> .\" -.\" $FreeBSD$ -.\" .Dd November 13, 2012 .Dt NG_ONE2MANY 4 .Os @@ -252,6 +250,7 @@ With a similar setup on a peer machine (using the address Ethernet connection with four times normal bandwidth is achieved. .Sh SEE ALSO +.Xr lagg 4 , .Xr netgraph 4 , .Xr ng_bridge 4 , .Xr ng_ether 4 , diff --git a/share/man/man4/ng_patch.4 b/share/man/man4/ng_patch.4 index f9f893fa3c0b..9c0d7a8ee512 100644 --- a/share/man/man4/ng_patch.4 +++ b/share/man/man4/ng_patch.4 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 17, 2015 .Dt NG_PATCH 4 .Os @@ -82,7 +80,7 @@ Sets the data link type on the .Va in hook (to help calculate relative offset). Currently, supported types are .Cm DLT_RAW -(raw IP datagrams , no offset applied, the default) and +(raw IP datagrams, no offset applied, the default) and .Cm DLT_EN10MB (Ethernet). DLT_ definitions can be found in .In net/bpf.h . @@ -137,6 +135,17 @@ corresponding checksum before transmitting packet on output interface. The .Nm node does not do any checksum correction by itself. +.Pp +The +.Va offset +value for the +.Vt ng_patch_op +structure is calculated from zero by default (the first byte of +packet headers). +If +.Va relative_offset +is enabled (set to 1) during configuration, the operation will have an +additional amount added to the offset based on the data link type. .It Dv NGM_PATCH_GETCONFIG Pq Ic getconfig This control message returns the current set of modify operations, in the form of a diff --git a/share/man/man4/ng_pipe.4 b/share/man/man4/ng_pipe.4 index 1700c893286f..0262213eefa0 100644 --- a/share/man/man4/ng_pipe.4 +++ b/share/man/man4/ng_pipe.4 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 17, 2019 .Dt NG_PIPE 4 .Os diff --git a/share/man/man4/ng_ppp.4 b/share/man/man4/ng_ppp.4 index 89e662cf81ff..c1b5b9092a2f 100644 --- a/share/man/man4/ng_ppp.4 +++ b/share/man/man4/ng_ppp.4 @@ -31,8 +31,6 @@ .\" OF SUCH DAMAGE. .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> -.\" -.\" $FreeBSD$ .\" $Whistle: ng_ppp.8,v 1.3 1999/01/25 23:46:27 archie Exp $ .\" .Dd November 13, 2012 diff --git a/share/man/man4/ng_pppoe.4 b/share/man/man4/ng_pppoe.4 index ff53d4ef3a95..5b5f0dd64de2 100644 --- a/share/man/man4/ng_pppoe.4 +++ b/share/man/man4/ng_pppoe.4 @@ -31,8 +31,6 @@ .\" OF SUCH DAMAGE. .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> -.\" -.\" $FreeBSD$ .\" $Whistle: ng_pppoe.8,v 1.1 1999/01/25 23:46:27 archie Exp $ .\" .Dd May 1, 2022 @@ -567,9 +565,9 @@ setup(char *ethername, char *service, char *sessname, .Xr ng_ether 4 , .Xr ng_ppp 4 , .Xr ng_socket 4 , +.Xr vlan 4 , .Xr ngctl 8 , -.Xr ppp 8 , -.Xr vlan 4 +.Xr ppp 8 .Rs .%A L. Mamakos .%A K. Lidl diff --git a/share/man/man4/ng_pptpgre.4 b/share/man/man4/ng_pptpgre.4 index 632bc7b555d4..935b9ec9334b 100644 --- a/share/man/man4/ng_pptpgre.4 +++ b/share/man/man4/ng_pptpgre.4 @@ -31,8 +31,6 @@ .\" OF SUCH DAMAGE. .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> -.\" -.\" $FreeBSD$ .\" $Whistle: ng_pptpgre.8,v 1.2 1999/12/08 00:20:53 archie Exp $ .\" .Dd November 4, 2018 @@ -160,7 +158,7 @@ in transit. Greater values allow the node to deliver packets being late after more packets in sequence at cost of increased kernel memory usage. .It Va net.graph.pptpgre.reorder_timeout: 1 -Defines time value in miliseconds used to wait for late packets. +Defines time value in milliseconds used to wait for late packets. .El .Sh SEE ALSO .Xr netgraph 4 , diff --git a/share/man/man4/ng_pred1.4 b/share/man/man4/ng_pred1.4 index 91a7103c3284..98634aea50e9 100644 --- a/share/man/man4/ng_pred1.4 +++ b/share/man/man4/ng_pred1.4 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 24, 2006 .Dt NG_PRED1 4 .Os diff --git a/share/man/man4/ng_rfc1490.4 b/share/man/man4/ng_rfc1490.4 index 51baa9e26a66..116604238a6a 100644 --- a/share/man/man4/ng_rfc1490.4 +++ b/share/man/man4/ng_rfc1490.4 @@ -31,8 +31,6 @@ .\" OF SUCH DAMAGE. .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> -.\" -.\" $FreeBSD$ .\" $Whistle: ng_rfc1490.8,v 1.4 1999/01/25 23:46:27 archie Exp $ .\" .Dd January 19, 1999 diff --git a/share/man/man4/ng_socket.4 b/share/man/man4/ng_socket.4 index d05802b0862e..b892498d842a 100644 --- a/share/man/man4/ng_socket.4 +++ b/share/man/man4/ng_socket.4 @@ -31,8 +31,6 @@ .\" OF SUCH DAMAGE. .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> -.\" -.\" $FreeBSD$ .\" $Whistle: ng_socket.8,v 1.5 1999/01/25 23:46:27 archie Exp $ .\" .Dd January 19, 1999 diff --git a/share/man/man4/ng_source.4 b/share/man/man4/ng_source.4 index 87b235bda2c8..38bf2d355964 100644 --- a/share/man/man4/ng_source.4 +++ b/share/man/man4/ng_source.4 @@ -30,7 +30,6 @@ .\" DAMAGE. .\" .\" Author: Dave Chapeskie -.\" $FreeBSD$ .\" .Dd January 18, 2021 .Dt NG_SOURCE 4 diff --git a/share/man/man4/ng_split.4 b/share/man/man4/ng_split.4 index 827ecb65500b..5bcdb7bbde69 100644 --- a/share/man/man4/ng_split.4 +++ b/share/man/man4/ng_split.4 @@ -32,8 +32,6 @@ .\" .\" Author: Julian Elischer <julian@FreeBSD.org> .\" -.\" $FreeBSD$ -.\" .Dd February 19, 2001 .Dt NG_SPLIT 4 .Os diff --git a/share/man/man4/ng_sscfu.4 b/share/man/man4/ng_sscfu.4 deleted file mode 100644 index 2c444dacd589..000000000000 --- a/share/man/man4/ng_sscfu.4 +++ /dev/null @@ -1,161 +0,0 @@ -.\" -.\" Copyright (c) 2001-2003 -.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). -.\" 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. -.\" -.\" Author: Hartmut Brandt <harti@FreeBSD.org> -.\" -.\" $FreeBSD$ -.\" -.\" ng_sscfu(4) man page -.\" -.Dd October 24, 2003 -.Dt NG_SSCFU 4 -.Os -.Sh NAME -.Nm ng_sscfu -.Nd netgraph SSCF at the UNI node type -.Sh SYNOPSIS -.In netnatm/saal/sscopdef.h -.In netnatm/saal/sscfudef.h -.In netgraph/atm/ng_sscfu.h -.Sh DESCRIPTION -The -.Nm sscfu -netgraph node type implements ITU-T recommendation Q.2130. -This recommendation specifies the Service Specific Coordination -Function at the UNI. -This is a thin sub-layer between the SSCOP (see -.Xr ng_sscop 4 ) -and the UNI signalling. -This node does not really implement a protocol but -provides a mapping between the signals at the upper layer of the SSCOP and -the signals the UNI expects at its lower layer. -It also provides default values for the parameters of the SSCOP. -.Pp -After creation of the node, the SSCF instance must be created by sending -an -.Dq enable -message to the node. -If the node is enabled, default SSCOP parameters -can be retrieved and set in the corresponding SSCOP instance. -.Pp -The node is shut down either by a -.Dv NGM_SHUTDOWN -message, or when all hooks are disconnected. -.Sh HOOKS -Each -.Nm sscfu -node has two hooks with fixed names: -.Bl -tag -width ".Va upper" -.It Va lower -This hook is the interface to the SSCOP. -The interface expected here is exactly -that which is exported by the -.Xr ng_sscop 4 -node type. -.It Va upper -This is the interface to the UNI. -It uses the following message format: -.Bd -literal -struct sscfu_arg { - uint32_t sig; - u_char data[]; -}; -.Ed -.Pp -The -.Va sig -field -is one of the following signals: -.Bd -literal -enum saal_sig { - SAAL_ESTABLISH_request, /* U -> SAAL: (UU) */ - SAAL_ESTABLISH_indication, /* SAAL -> U: (UU) */ - SAAL_ESTABLISH_confirm, /* SAAL -> U: (UU) */ - SAAL_RELEASE_request, /* U -> SAAL: (UU) */ - SAAL_RELEASE_confirm, /* SAAL -> U: */ - SAAL_RELEASE_indication, /* SAAL -> U: (UU) */ - SAAL_DATA_request, /* U -> SAAL: (DATA) */ - SAAL_DATA_indication, /* SAAL -> U: (DATA) */ - SAAL_UDATA_request, /* U -> SAAL: (UDATA) */ - SAAL_UDATA_indication, /* SAAL -> U: (UDATA) */ -}; -.Ed -.Pp -The arrows in the comment show the direction of the signal, whether it -is a signal that comes out of the node -.Pq Ql -> , -or is sent by the node user to the node -.Pq Ql <- . -The type of the data expected for the signal is specified in parentheses. -This data starts at the -.Va data -field of the message structure. -.El -.Pp -If the -.Va lower -hook is disconnected and the node is enabled, the protocol state is -reset. -.Sh CONTROL MESSAGES -The -.Nm sscfu -node understands the generic messages plus the following: -.Bl -tag -width foo -.It Dv NGM_SSCFU_GETDEFPARAM Pq Ic getdefparam -This message returns a -.Vt sscop_param -structure, which contains the default parameters for the SSCOP at the -UNI. -This structure should be used for a -.Dv NGM_SSCOP_SETPARAM -message to the SSCOP node below the SSCF. -.It Dv NGM_SSCFU_ENABLE Pq Ic enable -This message creates the actual SSCF instance and initializes it. -Until this is done, parameters may neither be retrieved nor set, -and all messages -received on any hook are discarded. -.It Dv NGM_SSCFU_DISABLE Pq Ic disable -Destroy the SSCF instance. -After this, all messages on any hooks are discarded. -.It Dv NGM_SSCFU_GETDEBUG Pq Ic getdebug -Retrieve the debugging flags in a -.Vt uint32_t . -.It Dv NGM_SSCFU_SETDEBUG Pq Ic setdebug -Set debugging flags. -The argument must be a -.Vt uint32_t . -.It Dv NGM_SSCFU_GETSTATE Pq Ic getstate -Retrieve the current state of the SSCFU instance in a -.Vt uint32_t . -If the node has not been enabled, 0 is returned. -.El -.Sh SEE ALSO -.Xr netgraph 4 , -.Xr ng_atm 4 , -.Xr ng_sscop 4 , -.Xr ngctl 8 -.Sh AUTHORS -.An Harti Brandt Aq Mt harti@FreeBSD.org diff --git a/share/man/man4/ng_sscop.4 b/share/man/man4/ng_sscop.4 deleted file mode 100644 index c98a43462581..000000000000 --- a/share/man/man4/ng_sscop.4 +++ /dev/null @@ -1,403 +0,0 @@ -.\" -.\" Copyright (c) 2001-2003 -.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). -.\" 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. -.\" -.\" Author: Hartmut Brandt <harti@FreeBSD.org> -.\" -.\" $FreeBSD$ -.\" -.\" ng_sscop(4) man page -.\" -.Dd October 24, 2003 -.Dt NG_SSCOP 4 -.Os -.Sh NAME -.Nm ng_sscop -.Nd netgraph SSCOP node type -.Sh SYNOPSIS -.In netnatm/saal/sscopdef.h -.In netgraph/atm/ng_sscop.h -.Sh DESCRIPTION -The -.Nm sscop -netgraph node type implements the ITU-T standard Q.2110. -This standard describes -the so called Service Specific Connection Oriented Protocol (SSCOP) that -is used to carry signalling messages over the private and public UNIs and -the public NNI. -This protocol is a transport protocol with selective -acknowledgements, and can be tailored to the environment. -This implementation is a full implementation of that standard. -.Pp -After creation of the node, the SSCOP instance must be created by sending -an -.Dq enable -message to the node. -If the node is enabled, the SSCOP parameters -can be retrieved and modified and the protocol can be started. -.Pp -The node is shut down either by a -.Dv NGM_SHUTDOWN -message, or when all hooks are disconnected. -.Sh HOOKS -Each -.Nm sscop -node has three hooks with fixed names: -.Bl -tag -width ".Va manage" -.It Va lower -This hook must be connected to a node that ensures -transport of packets to and from the remote peer node. -Normally this is a -.Xr ng_atm 4 -node with an AAL5 hook, but the -.Nm sscop -node is able to work on any packet-transporting layer, like, for example, -IP or UDP. -The node handles flow control messages received on -this hook: if it receives a -.Dv NGM_HIGH_WATER_PASSED -message, it declares the -.Dq "lower layer busy" -state. -If a -.Dv NGM_LOW_WATER_PASSED -message is received, the busy state is cleared. -Note that the node does not -look at the message contents of these flow control messages. -.It Va upper -This is the interface to the SSCOP user. -This interface uses the following message format: -.Bd -literal -struct sscop_arg { - uint32_t sig; - uint32_t arg; /* opt. sequence number or clear-buff */ - u_char data[]; -}; -.Ed -.Pp -The -.Va sig -field -is one of the signals defined in the standard: -.Bd -literal -enum sscop_aasig { - SSCOP_ESTABLISH_request, /* <- UU, BR */ - SSCOP_ESTABLISH_indication, /* -> UU */ - SSCOP_ESTABLISH_response, /* <- UU, BR */ - SSCOP_ESTABLISH_confirm, /* -> UU */ - - SSCOP_RELEASE_request, /* <- UU */ - SSCOP_RELEASE_indication, /* -> UU, SRC */ - SSCOP_RELEASE_confirm, /* -> */ - - SSCOP_DATA_request, /* <- MU */ - SSCOP_DATA_indication, /* -> MU, SN */ - - SSCOP_UDATA_request, /* <- MU */ - SSCOP_UDATA_indication, /* -> MU */ - - SSCOP_RECOVER_indication, /* -> */ - SSCOP_RECOVER_response, /* <- */ - - SSCOP_RESYNC_request, /* <- UU */ - SSCOP_RESYNC_indication, /* -> UU */ - SSCOP_RESYNC_response, /* <- */ - SSCOP_RESYNC_confirm, /* -> */ - - SSCOP_RETRIEVE_request, /* <- RN */ - SSCOP_RETRIEVE_indication, /* -> MU */ - SSCOP_RETRIEVE_COMPL_indication,/* -> */ -}; -.Ed -.Pp -The arrows in the comment show the direction of the signal, whether it -is a signal that comes out of the node -.Pq Ql -> , -or is sent by the node user to the node -.Pq Ql <- . -The -.Va arg -field contains the argument to some of the signals: it is either a PDU -sequence number, or the -.Dv CLEAR-BUFFER -flag. -There are a number of special sequence numbers for some operations: -.Pp -.Bl -tag -width ".Dv SSCOP_RETRIEVE_UNKNOWN" -offset indent -compact -.It Dv SSCOP_MAXSEQNO -maximum legal sequence number -.It Dv SSCOP_RETRIEVE_UNKNOWN -retrieve transmission queue -.It Dv SSCOP_RETRIEVE_TOTAL -retrieve transmission buffer and queue -.El -.Pp -For signals that carry user data (as, for example, -.Dv SSCOP_DATA_request ) -these two fields are followed by the variable sized user data. -.Pp -If the -.Va upper -hook is disconnected and the SSCOP instance is not in the idle -state, and the -.Va lower -hook is still connected, an -.Dv SSCOP_RELEASE_request -is executed to release the SSCOP connection. -.It Va manage -This is the management interface defined in the standard. -The data structure used here is: -.Bd -literal -struct sscop_marg { - uint32_t sig; - u_char data[]; -}; -.Ed -.Pp -Here -.Va sig -is one of -.Bd -literal -enum sscop_maasig { - SSCOP_MDATA_request, /* <- MU */ - SSCOP_MDATA_indication, /* -> MU */ - SSCOP_MERROR_indication, /* -> CODE, CNT */ -}; -.Ed -.Pp -The -.Dv SSCOP_MDATA -signals are followed by the actual management data, where the -.Dv SSCOP_MERROR -signal has the form: -.Bd -literal -struct sscop_merr { - uint32_t sig; - uint32_t err; /* error code */ - uint32_t cnt; /* error count */ -}; -.Ed -.El -.Sh CONTROL MESSAGES -The -.Nm sscop -node understands the generic control messages, plus the following: -.Bl -tag -width foo -.It Dv NGM_SSCOP_SETPARAM Pq Ic setparam -Sets operational parameters of the SSCOP instance and takes the -following structure: -.Bd -literal -struct ng_sscop_setparam { - uint32_t mask; - struct sscop_param param; -}; -.Ed -.Pp -The sub-structure -.Va param -contains the parameters to set, and the -.Va mask -field contains a bit mask, telling which of the parameters to set, and which -to ignore. -If a bit is set, the corresponding parameter is set. -The parameters are: -.Bd -literal -struct sscop_param { - uint32_t timer_cc; /* timer_cc in msec */ - uint32_t timer_poll; /* timer_poll im msec */ - uint32_t timer_keep_alive;/* timer_keep_alive in msec */ - uint32_t timer_no_response;/*timer_no_response in msec */ - uint32_t timer_idle; /* timer_idle in msec */ - uint32_t maxk; /* maximum user data in bytes */ - uint32_t maxj; /* maximum u-u info in bytes */ - uint32_t maxcc; /* max. retransmissions for control packets */ - uint32_t maxpd; /* max. vt(pd) before sending poll */ - uint32_t maxstat; /* max. number of elements in stat list */ - uint32_t mr; /* initial window */ - uint32_t flags; /* flags */ -}; -.Ed -.Pp -The -.Va flags -field contains the following flags influencing SSCOP operation: -.Pp -.Bl -tag -width ".Dv SSCOP_POLLREX" -offset indent -compact -.It Dv SSCOP_ROBUST -enable atmf/97-0216 robustness enhancement -.It Dv SSCOP_POLLREX -send POLL after each retransmission -.El -.Pp -The bitmap has the following bits: -.Pp -.Bl -tag -width ".Dv SSCOP_SET_POLLREX" -offset indent -compact -.It Dv SSCOP_SET_TCC -set -.Va timer_cc -.It Dv SSCOP_SET_TPOLL -set -.Va timer_poll -.It Dv SSCOP_SET_TKA -set -.Va timer_keep_alive -.It Dv SSCOP_SET_TNR -set -.Va timer_no_response -.It Dv SSCOP_SET_TIDLE -set -.Va timer_idle -.It Dv SSCOP_SET_MAXK -set -.Va maxk -.It Dv SSCOP_SET_MAXJ -set -.Va maxj -.It Dv SSCOP_SET_MAXCC -set -.Va maxcc -.It Dv SSCOP_SET_MAXPD -set -.Va maxpd -.It Dv SSCOP_SET_MAXSTAT -set -.Va maxstat -.It Dv SSCOP_SET_MR -set the initial window -.It Dv SSCOP_SET_ROBUST -set or clear -.Dv SSCOP_ROBUST -.It Dv SSCOP_SET_POLLREX -set or clear -.Dv SSCOP_POLLREX -.El -.Pp -The node responds to the -.Dv NGM_SSCOP_SETPARAM -message with the following response: -.Bd -literal -struct ng_sscop_setparam_resp { - uint32_t mask; - int32_t error; -}; -.Ed -.Pp -Here -.Va mask -contains a bitmask of the parameters that the user requested to set, -but that could not be set and -.Va error -is an -.Xr errno 2 -code describing why the parameter could not be set. -.It Dv NGM_SSCOP_GETPARAM Pq Ic getparam -This message returns the current operational parameters of the SSCOP -instance in a -.Vt sscop_param -structure. -.It Dv NGM_SSCOP_ENABLE Pq Ic enable -This message creates the actual SSCOP instance and initializes it. -Until this is done, parameters may neither be retrieved nor set, and all -messages received on any hook are discarded. -.It Dv NGM_SSCOP_DISABLE Pq Ic disable -Destroy the SSCOP instance. -After this, all messages on any hooks are -discarded. -.It Dv NGM_SSCOP_SETDEBUG Pq Ic setdebug -Set debugging flags. -The argument is a -.Vt uint32_t . -.It Dv NGM_SSCOP_GETDEBUG Pq Ic getdebug -Retrieve the actual debugging flags. -Needs no arguments and responds with a -.Vt uint32_t . -.It Dv NGM_SSCOP_GETSTATE Pq Ic getstate -Responds with the current state of the SSCOP instance in a -.Vt uint32_t . -If the node is not enabled, the retrieved state is 0. -.El -.Sh FLOW CONTROL -Flow control works on the upper and on the lower layer interface. -At the lower -layer interface, the two messages, -.Dv NGM_HIGH_WATER_PASSED -and -.Dv NGM_LOW_WATER_PASSED , -are used to declare or clear the -.Dq "lower layer busy" -state of the protocol. -.Pp -At the upper layer interface, the -.Nm sscop -node handles three types of flow control messages: -.Bl -tag -width foo -.It Dv NGM_HIGH_WATER_PASSED -If this message is received, the SSCOP stops moving the receive window. -Each time a data message is handed over to the upper layer, the receive -window is moved by one message. -Stopping these updates -means that the window will start to close and if the peer has sent -all messages allowed by the current window, it stops transmission. -This means that the upper layer must be able to still receive a full window -amount of messages. -.It Dv NGM_LOW_WATER_PASSED -This will re-enable the automatic window updates, and if the space indicated -in the message is larger than the current window, the window will be opened -by that amount. -The space is computed as the difference of the -.Va max_queuelen_packets -and -.Va current -members of the -.Vt ngm_queue_state -structure. -.It Dv NGM_SYNC_QUEUE_STATE -If the upper layer buffer filling state, as indicated by -.Va current , -is equal to or greater than -.Va high_watermark -then the message is ignored. -If this is not the case, the amount -of receiver space is computed as the difference of -.Va max_queuelen_packets -and -.Va current -if automatic window updates are currently allowed, and as the difference of -.Va high_water_mark -and -.Va current -if window updates are disabled. -If the resulting value is larger than the current window, the current window -is opened up to this value. -Automatic window updates are enabled if they -were disabled. -.El -.Sh SEE ALSO -.Xr netgraph 4 , -.Xr ng_atm 4 , -.Xr ng_sscfu 4 , -.Xr ngctl 8 -.Sh AUTHORS -.An Harti Brandt Aq Mt harti@FreeBSD.org diff --git a/share/man/man4/ng_tag.4 b/share/man/man4/ng_tag.4 index 76209f5a3337..58e736c1e00f 100644 --- a/share/man/man4/ng_tag.4 +++ b/share/man/man4/ng_tag.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 10, 2006 .Dt NG_TAG 4 .Os diff --git a/share/man/man4/ng_tcpmss.4 b/share/man/man4/ng_tcpmss.4 index e13c562e3eee..f2fc5038ea10 100644 --- a/share/man/man4/ng_tcpmss.4 +++ b/share/man/man4/ng_tcpmss.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 9, 2005 .Dt NG_TCPMSS 4 .Os diff --git a/share/man/man4/ng_tee.4 b/share/man/man4/ng_tee.4 index 426aaf99d012..5486201a9138 100644 --- a/share/man/man4/ng_tee.4 +++ b/share/man/man4/ng_tee.4 @@ -31,8 +31,6 @@ .\" OF SUCH DAMAGE. .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> -.\" -.\" $FreeBSD$ .\" $Whistle: ng_tee.8,v 1.4 1999/01/25 23:46:27 archie Exp $ .\" .Dd May 28, 2004 diff --git a/share/man/man4/ng_tty.4 b/share/man/man4/ng_tty.4 index c8d5b37e95c7..85ab98430d80 100644 --- a/share/man/man4/ng_tty.4 +++ b/share/man/man4/ng_tty.4 @@ -31,8 +31,6 @@ .\" OF SUCH DAMAGE. .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> -.\" -.\" $FreeBSD$ .\" $Whistle: ng_tty.8,v 1.5 1999/01/25 23:46:28 archie Exp $ .\" .Dd December 25, 2008 diff --git a/share/man/man4/ng_ubt.4 b/share/man/man4/ng_ubt.4 index 0036fa8cfd08..eff923aa2a47 100644 --- a/share/man/man4/ng_ubt.4 +++ b/share/man/man4/ng_ubt.4 @@ -23,7 +23,6 @@ .\" SUCH DAMAGE. .\" .\" $Id: ng_ubt.4,v 1.3 2003/05/21 19:37:35 max Exp $ -.\" $FreeBSD$ .\" .Dd December 26, 2012 .Dt NG_UBT 4 diff --git a/share/man/man4/ng_uni.4 b/share/man/man4/ng_uni.4 deleted file mode 100644 index da7028b0e015..000000000000 --- a/share/man/man4/ng_uni.4 +++ /dev/null @@ -1,420 +0,0 @@ -.\" -.\" Copyright (c) 2001-2003 -.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). -.\" All rights reserved. -.\" -.\" Author: Hartmut Brandt <harti@FreeBSD.org> -.\" -.\" 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 October 6, 2003 -.Dt NG_UNI 4 -.Os -.Sh NAME -.Nm ng_uni -.Nd netgraph UNI node type -.Sh SYNOPSIS -.In netnatm/msg/unistruct.h -.In netnatm/sig/unidef.h -.In netgraph/atm/ng_uni.h -.Sh DESCRIPTION -The -.Nm uni -netgraph node type implements ATM Forum signalling 4.0. -.Pp -After creation of the node, the UNI instance must be created by sending -an -.Dq enable -message to the node. -If the node is enabled, the UNI parameters -can be retrieved and modified, and the protocol can be started. -.Pp -The node is shut down either by an -.Dv NGM_SHUTDOWN -message, or when all hooks are disconnected. -.Sh HOOKS -Each -.Nm uni -node has three hooks with fixed names: -.Bl -tag -width ".Va upper" -.It Va lower -This hook is the interface of the UNI protocol to the transport layer of -the ATM control plane. -The node expects the interface exported by -.Xr ng_sscfu 4 -at this hook. -.It Va upper -This hook is the -.Dq user -interface of the UNI protocol. -Because there is no standardized interface -at this point, this implementation follows more or less the interface -specified by the SDL diagrams in ITU-T recommendations Q.2931 and Q.2971. -Normally either a -.Xr ng_ccatm 4 -or a switch CAC should be stacked at this interface. -The message format at the -.Va upper -hook is described below. -Because -.Xr netgraph 4 -is functional, it makes sometimes sense to switch this hook to queueing mode -from the peer node upon connection. -.El -.Pp -The -.Va upper -interface of the -.Nm uni -node is loosely modelled after the interface specified in the ITU-T signalling -standards. -There is however one derivation from this: normally there exists -four kinds of signals: requests, responses, indications and confirmations. -These signals are usually triggered either by external events (receiving a -message) or internal events (a timer or another signal). -This scheme works -fine for user APIs that are entirely asynchronous, and in cases where -error handling is not taken into account. -With synchronous APIs and error -handling however, there is a problem. -If, for example, the application -issues a request to set up a connection, -it may do it by sending a -.Dv SETUP.request -signal to the UNI. -Normally, the UNI stack will send a SETUP message and -receive a message from the switch (a RELEASE, CONNECT, CALL PROCEEDING or -ALERTING), or a timer in the UNI stack will time out. -In any of these cases, -the UNI stack is supposed to report an event back to the application, and -the application will unblock (in the case of a synchronous API) and handle -the event. -The problem occurs when an error happens. -Suppose there is no -memory to send the SETUP message and to start the timer. -In this case, the -application will block forever because no received message and no timer -will wake it up. -For this reason this implementation uses an additional message: -for each signal sent from the application to the stack, the stack will -respond with an error code. -If this code is zero, the stack has accepted -the signal and the application may block; if the code is non-zero, the signal -is effectively ignored and the code describes what was wrong. -This system -makes it very easy to make a blocking interface out of the message based -netgraph interface. -.Pp -The -.Va upper -interface uses the following structure: -.Bd -literal -struct uni_arg { - uint32_t sig; - uint32_t cookie; - u_char data[]; -}; -.Ed -The -.Va sig -field contains the actual signal that is sent from the user to UNI or from -UNI to the user. -The -.Va cookie -can be used by the user to correlate requests with events and responses. -If an error response, a confirmation or an indication was triggered by -a request or response, the cookie from that request or response is carried in -the message from the stack to the user. -The -.Va cookie -field is followed by the actual data for the signal. -.Pp -The signal is one of the following: -.Bd -literal -enum uni_sig { - UNIAPI_ERROR, /* UNI -> API */ - - UNIAPI_CALL_CREATED, /* UNI -> API */ - UNIAPI_CALL_DESTROYED, /* UNI -> API */ - UNIAPI_PARTY_CREATED, /* UNI -> API */ - UNIAPI_PARTY_DESTROYED, /* UNI -> API */ - - UNIAPI_LINK_ESTABLISH_request, /* API -> UNI */ - UNIAPI_LINK_ESTABLISH_confirm, /* UNI -> API */ - UNIAPI_LINK_RELEASE_request, /* API -> UNI */ - UNIAPI_LINK_RELEASE_confirm, /* UNI -> API */ - - UNIAPI_RESET_request, /* API -> UNI */ - UNIAPI_RESET_confirm, /* UNI -> API */ - UNIAPI_RESET_indication, /* UNI -> API */ - UNIAPI_RESET_ERROR_indication, /* UNI -> API */ - UNIAPI_RESET_response, /* API -> UNI */ - UNIAPI_RESET_ERROR_response, /* API -> UNI */ - UNIAPI_RESET_STATUS_indication, /* UNI -> API */ - - UNIAPI_SETUP_request, /* API -> UNI */ - UNIAPI_SETUP_indication, /* UNI -> API */ - UNIAPI_SETUP_response, /* API -> UNI */ - UNIAPI_SETUP_confirm, /* UNI -> API */ - UNIAPI_SETUP_COMPLETE_indication, /* UNI -> API */ - UNIAPI_ALERTING_request, /* API -> UNI */ - UNIAPI_ALERTING_indication, /* UNI -> API */ - UNIAPI_PROCEEDING_request, /* API -> UNI */ - UNIAPI_PROCEEDING_indication, /* UNI -> API */ - UNIAPI_RELEASE_request, /* API -> UNI */ - UNIAPI_RELEASE_indication, /* UNI -> API */ - UNIAPI_RELEASE_response, /* API -> UNI */ - UNIAPI_RELEASE_confirm, /* UNI -> API */ - UNIAPI_NOTIFY_request, /* API -> UNI */ - UNIAPI_NOTIFY_indication, /* UNI -> API */ - UNIAPI_STATUS_indication, /* UNI -> API */ - UNIAPI_STATUS_ENQUIRY_request, /* API -> UNI */ - - UNIAPI_ADD_PARTY_request, /* API -> UNI */ - UNIAPI_ADD_PARTY_indication, /* UNI -> API */ - UNIAPI_PARTY_ALERTING_request, /* API -> UNI */ - UNIAPI_PARTY_ALERTING_indication, /* UNI -> API */ - UNIAPI_ADD_PARTY_ACK_request, /* API -> UNI */ - UNIAPI_ADD_PARTY_ACK_indication, /* UNI -> API */ - UNIAPI_ADD_PARTY_REJ_request, /* API -> UNI */ - UNIAPI_ADD_PARTY_REJ_indication, /* UNI -> API */ - UNIAPI_DROP_PARTY_request, /* API -> UNI */ - UNIAPI_DROP_PARTY_indication, /* UNI -> API */ - UNIAPI_DROP_PARTY_ACK_request, /* API -> UNI */ - UNIAPI_DROP_PARTY_ACK_indication, /* UNI -> API */ - - UNIAPI_ABORT_CALL_request, /* API -> UNI */ - - UNIAPI_MAXSIG -}; -.Ed -.Pp -The meaning of most of the signals can be deduced from the ITU-T SDLs. -A number of signals, however, is unique to this implementation: -.Bl -tag -width foo -.It Dv UNIAPI_ERROR -This is the error response, mentioned earlier. -It carries an error code or -zero, if the signal was accepted by the stack. -.It Dv UNIAPI_CALL_CREATED -The UNI stack has created a call instance either from an incoming SETUP or -from the user requesting an outgoing SETUP. -This may be used to synchronize -the creation and destroying of call data between the UNI stack and the user. -.It Dv UNIAPI_CALL_DESTROYED -A call instance has been destroyed and all resources have been freed. -.It Dv UNIAPI_PARTY_CREATED -A new party has been created for an existing point-to-multipoint call. -This may be used to synchronize the creation and destroying of party data -between the UNI stack and the user. -.It Dv UNIAPI_PARTY_DESTROYED -A party has been destroyed and all resources have been freed. -.It Dv UNIAPI_ABORT_CALL_request -This requests the stack to destroy the call instance -and free all its resources, -without sending any messages to the network. -.It Dv UNIAPI_MAXSIG -This is not a signal, but rather a definition to get the number of defined -signals. -.El -.Pp -Each of the signals is followed by a fixed size structure defined in -.In netnatm/sig/unidef.h . -.Sh CONTROL MESSAGES -The -.Nm uni -node understands the standard control messages, plus the following: -.Bl -tag -width foo -.It Dv NGM_UNI_SETDEBUG Pq Ic setdebug -Set debugging facility levels. -The UNI stack defines a number of debugging -facilities, each one associated with a debugging level. -If the debugging level -of a facility is non-zero, text output will be generated to the console. -The message uses the following structure: -.Bd -literal -struct ngm_uni_debug { - uint32_t level[UNI_MAXFACILITY]; -}; -.Ed -.It Dv NGM_UNI_GETDEBUG Pq Ic getdebug -Get debugging facility levels. -This returns an -.Vt ngm_uni_debug -structure. -.It Dv NGM_UNI_GET_CONFIG Pq Ic get_config -Retrieve the current configuration of the UNI instance. -This message returns a -.Vt uni_config -structure: -.Bd -literal -struct uni_config { - uint32_t proto; /* which protocol */ - uint32_t popt; /* protocol option */ - uint32_t option; /* other options */ - uint32_t timer301; /* T301 */ - uint32_t timer303; /* T303 */ - uint32_t init303; /* T303 retransmission count */ - uint32_t timer308; /* T308 */ - uint32_t init308; /* T308 retransmission count */ - uint32_t timer309; /* T309 */ - uint32_t timer310; /* T310 */ - uint32_t timer313; /* T313 */ - uint32_t timer316; /* T316 */ - uint32_t init316; /* T316 retransmission count */ - uint32_t timer317; /* T317 */ - uint32_t timer322; /* T322 */ - uint32_t init322; /* T322 retransmission count */ - uint32_t timer397; /* T397 */ - uint32_t timer398; /* T398 */ - uint32_t timer399; /* T399 */ -}; -.Ed -.Pp -The field -.Va proto -specifies one of the following protocols: -.Bd -literal -enum uni_proto { - UNIPROTO_UNI40U, /* UNI4.0 user side */ - UNIPROTO_UNI40N, /* UNI4.0 network side */ - UNIPROTO_PNNI10, /* PNNI1.0 */ -}; -.Ed -.Pp -Some protocols may have options which can be set in -.Va popt : -.Bd -literal -enum uni_popt { - UNIPROTO_GFP, /* enable GFP */ -}; -.Ed -.Pp -The -.Va option -field controls parsing and checking of messages: -.Bd -literal -enum uni_option { - UNIOPT_GIT_HARD, /* harder check of GIT IE */ - UNIOPT_BEARER_HARD, /* harder check of BEARER IE */ - UNIOPT_CAUSE_HARD, /* harder check of CAUSE IE */ -}; -.Ed -.Pp -All timer values are given in milliseconds. -Note, however, that the actual -resolution of the timers depend on system configuration (see -.Xr timeout 9 ) . -.It Dv NGM_UNI_SET_CONFIG Pq Ic set_config -Change the UNI configuration. -This takes a -.Bd -literal -struct ngm_uni_set_config { - struct uni_config config; - struct ngm_uni_config_mask mask; -}; -struct ngm_uni_config_mask { - uint32_t mask; - uint32_t popt_mask; - uint32_t option_mask; -}; -.Ed -.Pp -The fields of the -.Vt ngm_uni_config_mask -specify which configuration parameter to change. -The -.Va mask -field contains bit definitions for all timers, retransmission counters -and the -.Va proto -field, -.Va popt_mask -selects which of the protocol options to change, and -.Va option_mask -specifies which options should be changed. -The following bits are defined: -.Bd -literal -enum uni_config_mask { - UNICFG_PROTO, - UNICFG_TIMER301, - UNICFG_TIMER303, - UNICFG_INIT303, - UNICFG_TIMER308, - UNICFG_INIT308, - UNICFG_TIMER309, - UNICFG_TIMER310, - UNICFG_TIMER313, - UNICFG_TIMER316, - UNICFG_INIT316, - UNICFG_TIMER317, - UNICFG_TIMER322, - UNICFG_INIT322, - UNICFG_TIMER397, - UNICFG_TIMER398, - UNICFG_TIMER399, -}; -.Ed -.Pp -For -.Va popt_mask -and -.Va option_mask , -the definitions from -.Vt "enum uni_popt" -and -.Vt "enum uni_option" -should be used. -.It Dv NGM_UNI_ENABLE Pq Ic enable -Create the UNI instance and enable processing. -Before the UNI is enabled parameters cannot be retrieved or set. -.It Dv NGM_UNI_DISABLE Pq Ic disable -Destroy the UNI instance and free all resources. -Note, that connections are not released. -.El -.Sh SEE ALSO -.Xr netgraph 4 , -.Xr ng_atm 4 , -.Xr ng_sscfu 4 , -.Xr ng_sscop 4 , -.Xr ngctl 8 -.Sh AUTHORS -The -.Nm uni -netgraph node -and this manual page were written by -.An Harti Brandt Aq Mt harti@FreeBSD.org -.Sh BUGS -.Bl -bullet -compact -.It -LIJ (leaf-initiated-join) is not implemented yet. -.It -GFP (generic functional protocol, Q.2932.1) is not yet implemented. -.It -More testing needed. -.It -PNNI not yet implemented. -.It -Need to implement connection modification and the Q.2931 amendments. -.El diff --git a/share/man/man4/ng_vjc.4 b/share/man/man4/ng_vjc.4 index bc4d562cd8bc..bce0933649bc 100644 --- a/share/man/man4/ng_vjc.4 +++ b/share/man/man4/ng_vjc.4 @@ -31,8 +31,6 @@ .\" OF SUCH DAMAGE. .\" .\" Author: Archie Cobbs <archie@FreeBSD.org> -.\" -.\" $FreeBSD$ .\" $Whistle: ng_vjc.8,v 1.4 1999/01/25 23:46:28 archie Exp $ .\" .Dd January 19, 1999 diff --git a/share/man/man4/ng_vlan.4 b/share/man/man4/ng_vlan.4 index 7b225fdef06c..0356d5f7e2dc 100644 --- a/share/man/man4/ng_vlan.4 +++ b/share/man/man4/ng_vlan.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 1, 2004 .Dt NG_VLAN 4 .Os diff --git a/share/man/man4/ng_vlan_rotate.4 b/share/man/man4/ng_vlan_rotate.4 index 4640737c7d54..37bd6c17122a 100644 --- a/share/man/man4/ng_vlan_rotate.4 +++ b/share/man/man4/ng_vlan_rotate.4 @@ -1,5 +1,5 @@ .\"- -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2019-2021 IKS Service GmbH .\" @@ -26,8 +26,6 @@ .\" .\" Author: Lutz Donnerhacke <lutz@donnerhacke.de> .\" -.\" $FreeBSD$ -.\" .Dd January 26, 2021 .Dt NG_VLAN_ROTATE 4 .Os @@ -159,7 +157,7 @@ The first example demonstrates how to rotate double or triple tagged frames so that the innermost C-VLAN can be used as service discriminator. The single or double tagged frames (C-VLAN removed) are sent out to an -interface pointing to different infrastucture. +interface pointing to different infrastructure. .Bd -literal #!/bin/sh diff --git a/share/man/man4/ngatmbase.4 b/share/man/man4/ngatmbase.4 deleted file mode 100644 index 0227b44347bd..000000000000 --- a/share/man/man4/ngatmbase.4 +++ /dev/null @@ -1,134 +0,0 @@ -.\" -.\" Copyright (c) 2004 -.\" Hartmut Brandt. -.\" All rights reserved. -.\" -.\" Author: Hartmut Brandt <harti@FreeBSD.org> -.\" -.\" 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$ -.\" -.\" ngatmbase(4) man page -.\" -.Dd August 24, 2004 -.Dt NGATMBASE 4 -.Os -.Sh NAME -.Nm ngatmbase -.Nd netgraph ATM utility module -.Sh SYNOPSIS -.In netnatm/unimsg.h -.In netgraph/atm/ngatmbase.h -.Ft "struct mbuf *" -.Fn uni_msg_pack_mbuf "struct uni_msg *msg" "void *hdr" "size_t len" -.Ft "struct uni_msg *" -.Fn uni_msg_alloc "size_t len" -.Ft "struct uni_msg *" -.Fn uni_msg_build "void *buf" ... -.Ft void -.Fn uni_msg_destroy "struct uni_msg *msg" -.Ft int -.Fn uni_msg_unpack_mbuf "struct mbuf *m" "struct uni_msg *msgp" -.Sh DESCRIPTION -This module provides utility functions for the handling of signalling -messages to the NgATM modules. -.Pp -The -.Fn uni_msg_pack_mbuf -function -packs a message into one or several -.Vt mbuf Ns s -optionally prepending a header. -The header is given by its address -.Fa hdr -and length -.Fa len . -If -.Fa hdr -is -.Dv NULL -or -.Fa len -equals 0, no header is prepended. -Either -.Fa msg -or -.Fa hdr -may be -.Dv NULL -but not both. -The -.Fn uni_msg_pack_mbuf -function -returns a pointer to the allocated -.Vt mbuf -chain or -.Dv NULL -in the case of an error. -.Pp -The -.Fn uni_msg_alloc -function -allocates a new message with space for at least -.Fa len -bytes. -In the case of an error -.Dv NULL -is returned. -.Pp -The -.Fn uni_msg_build -function constructs a message from pieces. -Each piece is given by a pair of -arguments, the first of type -.Vt "void *" -and the second a -.Vt size_t . -The list of pieces must be terminated by -.Po Vt "void *" Pc Ns Dv NULL . -.Pp -The -.Fn uni_msg_destroy -function -destroys the messages and frees all the messages's memory. -.Pp -The -.Fn uni_msg_unpack_mbuf -function -unpacks an -.Vt mbuf -chain info a -.Vt uni_msg . -A pointer to the newly allocated message is stored in -.Fa msgp -and 0 is returned. -In the case of an error (either when no packet header is found -in the first mbuf or memory cannot be allocated) the function -returns an appropriate error code. -.Sh SEE ALSO -.Xr ng_ccatm 4 , -.Xr ng_sscfu 4 , -.Xr ng_sscop 4 , -.Xr ng_uni 4 -.Sh AUTHORS -.An Harti Brandt Aq Mt harti@FreeBSD.org diff --git a/share/man/man4/nge.4 b/share/man/man4/nge.4 index 86631cfbc48c..74e0fa4f2c96 100644 --- a/share/man/man4/nge.4 +++ b/share/man/man4/nge.4 @@ -29,8 +29,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 23, 2010 .Dt NGE 4 .Os diff --git a/share/man/man4/nmdm.4 b/share/man/man4/nmdm.4 index 6f4b42253a8b..9ee610b2ae32 100644 --- a/share/man/man4/nmdm.4 +++ b/share/man/man4/nmdm.4 @@ -19,8 +19,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 11, 2020 .Dt NMDM 4 .Os diff --git a/share/man/man4/ntb.4 b/share/man/man4/ntb.4 index bb9e74ba9c4e..fd796d6e48e2 100644 --- a/share/man/man4/ntb.4 +++ b/share/man/man4/ntb.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 29, 2019 .Dt NTB 4 .Os diff --git a/share/man/man4/ntb_hw_amd.4 b/share/man/man4/ntb_hw_amd.4 index 6e6cbbf0fc90..56e0b3a741d4 100644 --- a/share/man/man4/ntb_hw_amd.4 +++ b/share/man/man4/ntb_hw_amd.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 29, 2019 .Dt NTB_HW_AMD 4 .Os diff --git a/share/man/man4/ntb_hw_intel.4 b/share/man/man4/ntb_hw_intel.4 index cb538b91511d..cc22cd96399d 100644 --- a/share/man/man4/ntb_hw_intel.4 +++ b/share/man/man4/ntb_hw_intel.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 11, 2020 .Dt NTB_HW_INTEL 4 .Os diff --git a/share/man/man4/ntb_hw_plx.4 b/share/man/man4/ntb_hw_plx.4 index a592f0b91b05..cb3c1623ff21 100644 --- a/share/man/man4/ntb_hw_plx.4 +++ b/share/man/man4/ntb_hw_plx.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 9, 2019 .Dt NTB_HW_PLX 4 .Os diff --git a/share/man/man4/ntb_transport.4 b/share/man/man4/ntb_transport.4 index c168d6798eb2..460e3bc1115f 100644 --- a/share/man/man4/ntb_transport.4 +++ b/share/man/man4/ntb_transport.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 9, 2019 .Dt NTB_TRANSPORT 4 .Os diff --git a/share/man/man4/null.4 b/share/man/man4/null.4 index fdbca2b102fe..68c91a8d1db5 100644 --- a/share/man/man4/null.4 +++ b/share/man/man4/null.4 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)null.4 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" .Dd August 30, 2019 .Dt NULL 4 .Os diff --git a/share/man/man5/nullfs.5 b/share/man/man4/nullfs.4 index 1cdd74bf53a1..5aca03071594 100644 --- a/share/man/man5/nullfs.5 +++ b/share/man/man4/nullfs.4 @@ -22,10 +22,8 @@ .\" (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 March 15, 2022 -.Dt NULLFS 5 +.Dt NULLFS 4 .Os .Sh NAME .Nm nullfs diff --git a/share/man/man4/numa.4 b/share/man/man4/numa.4 index 89f1bcb5684d..5a2108fb40e4 100644 --- a/share/man/man4/numa.4 +++ b/share/man/man4/numa.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 22, 2018 .Dt NUMA 4 .Os diff --git a/share/man/man4/nvd.4 b/share/man/man4/nvd.4 index 877bd10e52fd..d5145939e409 100644 --- a/share/man/man4/nvd.4 +++ b/share/man/man4/nvd.4 @@ -31,8 +31,6 @@ .\" .\" Author: Jim Harris <jimharris@FreeBSD.org> .\" -.\" $FreeBSD$ -.\" .Dd May 18, 2019 .Dt NVD 4 .Os diff --git a/share/man/man4/nvdimm.4 b/share/man/man4/nvdimm.4 index 04bf3a042c3a..5b7dbe435c46 100644 --- a/share/man/man4/nvdimm.4 +++ b/share/man/man4/nvdimm.4 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2019 The FreeBSD Foundation, Inc. +.\" Copyright (c) 2019 The FreeBSD Foundation .\" .\" This documentation was written by .\" Konstantin Belousov <kib@FreeBSD.org> under sponsorship @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 5, 2019 .Dt NVDIMM 4 .Os diff --git a/share/man/man4/nvme.4 b/share/man/man4/nvme.4 index a6e57358bac8..dcd2ec86f5fa 100644 --- a/share/man/man4/nvme.4 +++ b/share/man/man4/nvme.4 @@ -31,8 +31,6 @@ .\" .\" Author: Jim Harris <jimharris@FreeBSD.org> .\" -.\" $FreeBSD$ -.\" .Dd June 6, 2020 .Dt NVME 4 .Os @@ -241,6 +239,15 @@ detects that the AHCI device supports RST and when it is enabled. See .Xr ahci 4 for more details. +.Sh DIAGNOSTICS +.Bl -diag +.It "nvme%d: System interrupt issues?" +The driver found a timed-out transaction had a pending completion record, +indicating an interrupt had not been delivered. +The system is either not configuring interrupts properly, or the system drops +them under load. +This message will appear at most once per boot per controller. +.El .Sh SEE ALSO .Xr nda 4 , .Xr nvd 4 , diff --git a/share/man/man4/nvmf.4 b/share/man/man4/nvmf.4 new file mode 100644 index 000000000000..9ace67783351 --- /dev/null +++ b/share/man/man4/nvmf.4 @@ -0,0 +1,106 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024 Chelsio Communications, Inc. +.\" +.Dd May 7, 2025 +.Dt NVMF 4 +.Os +.Sh NAME +.Nm nvmf +.Nd "NVM Express over Fabrics host driver" +.Sh SYNOPSIS +To compile the driver into the kernel, +place the following line in the +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device nvmf" +.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 +nvmf_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides the kernel component of an NVM Express over Fabrics +host. +The NVMeoF host is the client which provides local access to +namespaces exported by a remote controller. +.Pp +Associations between the local host and remote controllers are managed +using +.Xr nvmecontrol 8 . +New associations are created via the +.Cm connect +command and destroyed via the +.Cm disconnect +command. +If an association's connection is interrupted, +the +.Cm reconnect +command creates a new association to replace the interrupted association. +.Pp +Similar to +.Xr nvme 4 , +.Nm +creates controller device nodes using the format +.Pa /dev/nvmeX +and namespace device nodes using the format +.Pa /dev/nvmeXnsY . +.Nm +also exports remote namespaces via the CAM +.Xr nda 4 +peripheral driver. +Unlike +.Xr nvme 4 , +.Nm +does not support the +.Xr nvd 4 +disk driver. +.Pp +Associations require a supported transport such as +.Xr nvmf_tcp 4 +for associations using TCP/IP. +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width indent +.It Va kern.nvmf.fail_on_disconnection +Determines the behavior when an association's connection is interrupted. +By default, input/output operations are suspended while a host is disconnected. +This includes operations pending at the time the association's connection was +interrupted as well as new requests submitted while the host is disconnected. +Once a new association is established, suspended I/O requests are retried. +When set to 1, input/output operations fail with +.Er EIO +while a host is disconnected and +.Xr nda 4 +peripherals are destroyed after the first failed I/O request. +Note that any destroyed +.Xr nda 4 +peripherals will be recreated after a new association is established. +.El +.Sh SEE ALSO +.Xr nda 4 , +.Xr nvme 4 , +.Xr nvmf_tcp 4 , +.Xr nvmft 4 , +.Xr nvmecontrol 8 +.Sh HISTORY +The +.Nm +module first appeared in +.Fx 15.0 . +.Sh AUTHORS +The +.Nm +driver was developed by +.An John Baldwin Aq Mt jhb@FreeBSD.org +under sponsorship from Chelsio Communications, Inc. diff --git a/share/man/man4/nvmf_tcp.4 b/share/man/man4/nvmf_tcp.4 new file mode 100644 index 000000000000..0a650e342f0e --- /dev/null +++ b/share/man/man4/nvmf_tcp.4 @@ -0,0 +1,64 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024 Chelsio Communications, Inc. +.\" +.Dd July 25, 2024 +.Dt NVMF_TCP 4 +.Os +.Sh NAME +.Nm nvmf_tcp +.Nd "TCP transport for NVM Express over Fabrics" +.Sh SYNOPSIS +To compile the module into the kernel, +place the following line in the +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device nvmf_tcp" +.Ed +.Pp +Alternatively, to load the +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +nvmf_tcp_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +module implements the software TCP/IP transport for NVM Express over Fabrics. +It can be used by either the in-kernel NVMeoF host driver or controller. +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width indent +.It Va kern.nvmf.tcp.max_transmit_data +The maximum data payload size of +.Va C2H_DATA +and +.Va H2C_DATA +PDUs. +A remote controller may enforce a lower limit on the size of +.Va H2C_DATA +PDUs via the +.Va MAXH2CDATA +parameter. +The default size is 256 kilobytes. +.El +.Sh SEE ALSO +.Xr nvmf 4 , +.Xr nvmft 4 +.Sh HISTORY +The +.Nm +module first appeared in +.Fx 15.0 . +.Sh AUTHORS +The +.Nm +module was developed by +.An John Baldwin Aq Mt jhb@FreeBSD.org +under sponsorship from Chelsio Communications, Inc. diff --git a/share/man/man4/nvmft.4 b/share/man/man4/nvmft.4 new file mode 100644 index 000000000000..d121fb97b514 --- /dev/null +++ b/share/man/man4/nvmft.4 @@ -0,0 +1,85 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024 Chelsio Communications, Inc. +.\" +.Dd May 2, 2024 +.Dt NVMFT 4 +.Os +.Sh NAME +.Nm nvmft +.Nd "NVM Express over Fabrics CAM Target Layer frontend" +.Sh SYNOPSIS +To compile the subsystem into the kernel, +place the following lines in the +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device nvmft" +.Cd "device ctl" +.Ed +.Pp +Alternatively, to load the subsystem as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +nvmft_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides the kernel component of an NVM Express over Fabrics +controller. +The NVMeoF controller is the server exporting namespaces backed by +local files and volumes to remote hosts. +.Nm +follows the dynamic controller model and creates a new dynamic controller +for each association. +.Pp +.Nm +is implemented as a +.Xr ctl 4 +frontend and exports CAM Target Layer LUNs as namespaces to remote hosts. +LUNs can be configured via +.Xr ctladm 8 . +.Pp +Associations between the local controller and remote hosts are managed +using both the +.Xr nvmfd 8 +daemon and the +.Xr ctladm 8 +utility. +The +.Xr nvmfd 8 +daemon listens for new associations and handles transport-specific +negotiation before handing off connected queue pairs to +.Nm +which associates queue pairs with a suitable controller instance. +The +.Cm nvlist +.Xr ctladm 8 +command lists active controllers. +The +.Cm nvterminate +command terminates one or more associations between a local controller +and a remote host. +.Pp +Associations require a supported transport such as +.Xr nvmf_tcp 4 +for associations using TCP/IP. +.Sh SEE ALSO +.Xr ctl 4 , +.Xr nvmf 4 , +.Xr nvmf_tcp 4 , +.Xr ctladm 8 , +.Xr nvmfd 8 +.Sh HISTORY +The +.Nm +module first appeared in +.Fx 15.0 . +.Sh AUTHORS +The +.Nm +subsystem was developed by +.An John Baldwin Aq Mt jhb@FreeBSD.org +under sponsorship from Chelsio Communications, Inc. diff --git a/share/man/man4/nvram.4 b/share/man/man4/nvram.4 index 25d6852b46bb..1ff2d0780a4f 100644 --- a/share/man/man4/nvram.4 +++ b/share/man/man4/nvram.4 @@ -24,8 +24,6 @@ .\"OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\"SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 8, 2010 .Dt NVRAM 4 .Os diff --git a/share/man/man4/nvram2env.4 b/share/man/man4/nvram2env.4 deleted file mode 100644 index 798e04e135e3..000000000000 --- a/share/man/man4/nvram2env.4 +++ /dev/null @@ -1,117 +0,0 @@ -.\" Copyright (c) 2011 Aleksandr Rybalko -.\" 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 April 3, 2011 -.Dt NVRAM2ENV 4 -.Os -.Sh NAME -.Nm nvram2env -.Nd "copy nvram-like data into kernel environment" -.Sh SYNOPSIS -.Cd "device nvram2env" -.Sh DESCRIPTION -.Nm -implements a simple method of reading the NVRAM-like data and information -stored in flash and storing it in the kernel environment. -It can then be used by various device drivers at boot-time. -.Pp -The NVRAM-like data is an array of zero terminated strings. -Each string contains the string name, "=" delimiter and the string value. -.Pp -.Nm -copies the environment values into kernel environment using the kernel setenv call. -.Pp -Configuration of -.Nm -is done in -.Xr device.hints 5 -defining the NVRAM base address, fallback base address, maxsize and flags. -.Pp -.Nm -is currently MIPS-specific. -.Ss base -base - physical address where data block is stored. -.Ss fallbackbase -fallbackbase - physical address where data block is stored, but only -if not found at base. -.Ss maxsize -maxsize - maximum size of data block. -.Ss flags -flags - control flags, used to select nvram type and enable/disable CRC check. -.Bl -tag -width indent -.It Fa 0x0001 -Avoid CRC checking. -Currently CRC checking is not implemented, so to be future -compatible, please set it to "1". -.It Fa 0x0002 -Use format "Generic", skip uint32_t field, then zero terminating array of -strings. -.It Fa 0x0004 -Use Broadcom CFE format, uint32_t signature "FLSH", uint32_t size, -three unused fields uint32_t, then data. -.It Fa 0x0008 -Use U-Boot format, uint32_t crc, then zero terminating array of strings. -.El -.Sh EXAMPLES -Usage in U-Boot case: -.Bd -literal -offset indent -hint.nvram.0.base=0x1f030000 -hint.nvram.0.maxsize=0x2000 -hint.nvram.0.flags=3 # 1 = No check, 2 = Format Generic -hint.nvram.1.base=0x1f032000 -hint.nvram.1.maxsize=0x4000 -hint.nvram.1.flags=3 # 1 = No check, 2 = Format Generic -.Ed -.Pp -CFE nvram with fallback: -.Bd -literal -offset indent -hint.nvram.0.base=0x1fff8000 -hint.nvram.0.fallbackbase=0x1fc00400 -hint.nvram.0.flags=4 # 4 = Format Broadcom -.Ed -.Pp -but seems for CFE nvram preferred to read both blocks: -.Pp -NVRAM partition: Static, CFE internal -.Bd -literal -offset indent -hint.nvram.0.flags=0x05 # Broadcom + nocheck -hint.nvram.0.base=0x1fc00400 -.Ed -.Pp -Dynamic, editable form CFE, override values from first -.Bd -literal -offset indent -hint.nvram.1.flags=0x05 # Broadcom + nocheck -hint.nvram.1.base=0x1cff8000 -.Ed -.Sh SEE ALSO -.Xr kenv 1 , -.Xr kenv 2 -.Sh HISTORY -.Nm -first appeared in -.Fx 9.0 . -.Sh AUTHORS -.An Aleksandr Rybalko Aq Mt ray@ddteam.net diff --git a/share/man/man4/oce.4 b/share/man/man4/oce.4 index c5022833e8b5..a8cd9ae80734 100644 --- a/share/man/man4/oce.4 +++ b/share/man/man4/oce.4 @@ -34,9 +34,7 @@ .\" 3333 Susan Street .\" Costa Mesa, CA 92626 .\" -.\" $FreeBSD$ -.\" -.Dd February 19, 2012 +.Dd January 27, 2025 .Dt OCE 4 .Os .Sh NAME diff --git a/share/man/man4/ocs_fc.4 b/share/man/man4/ocs_fc.4 index 5df0ef11070f..714bb2655c15 100644 --- a/share/man/man4/ocs_fc.4 +++ b/share/man/man4/ocs_fc.4 @@ -27,8 +27,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 29, 2021 .Dt OCS_FC 4 .Os diff --git a/share/man/man4/ohci.4 b/share/man/man4/ohci.4 index 1371928145ef..f8b7605ff6b4 100644 --- a/share/man/man4/ohci.4 +++ b/share/man/man4/ohci.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 24, 2020 .Dt OHCI 4 .Os diff --git a/share/man/man4/openfirm.4 b/share/man/man4/openfirm.4 index ef9755d0c49d..6c21c004160f 100644 --- a/share/man/man4/openfirm.4 +++ b/share/man/man4/openfirm.4 @@ -29,8 +29,6 @@ .\" 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. -.\" -.\" from: @(#)openprom.4 8.1 (Berkeley) 6/5/93 .\" from: OpenBSD: openprom.4,v 1.9 2004/03/22 22:07:21 miod Exp .\" .\"- @@ -58,8 +56,6 @@ .\" (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 16, 2021 .Dt OPENFIRM 4 .Os diff --git a/share/man/man4/orm.4 b/share/man/man4/orm.4 index ede8c7573a4a..e691c610af8d 100644 --- a/share/man/man4/orm.4 +++ b/share/man/man4/orm.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 15, 2000 .Dt ORM 4 .Os diff --git a/share/man/man4/ossl.4 b/share/man/man4/ossl.4 index 039ce301ac29..ce080cf2cd4f 100644 --- a/share/man/man4/ossl.4 +++ b/share/man/man4/ossl.4 @@ -24,9 +24,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGES. .\" -.\" $FreeBSD$ -.\" -.Dd September 24, 2021 +.Dd May 4, 2023 .Dt OSSL 4 .Os .Sh NAME @@ -76,6 +74,8 @@ driver includes support for the following algorithms: .It AES-CBC .It +AES-GCM (amd64 only) +.It ChaCha20 .It ChaCha20-Poly1305 (RFC 8439) diff --git a/share/man/man4/otus.4 b/share/man/man4/otus.4 index eb6048528a0d..06f73bfe3338 100644 --- a/share/man/man4/otus.4 +++ b/share/man/man4/otus.4 @@ -1,4 +1,5 @@ -.\" $FreeBSD$ +.\"- +.\" SPDX-License-Identifier: ISC .\" .\" Copyright (c) 2015 Adrian Chadd <adrian@FreeBSD.org> .\" @@ -14,12 +15,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd September 25, 2015 +.Dd November 10, 2024 .Dt OTUS 4 .Os .Sh NAME .Nm otus -.Nd Atheros AR9170 USB IEEE 802.11a/b/g/n wireless network device +.Nd Atheros AR9170 USB IEEE 802.11a/b/g/n wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -80,6 +81,51 @@ The .Nm driver can be configured at runtime with .Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver provides support for Atheros AR9170 USB IEEE 802.11b/g/n +wireless network adapters, including: +.Pp +.Bl -bullet -offset indent -compact +.It +3Com 3CRUSBN275 +.It +Arcadyan WN7512 +.\" .It AVM FRITZ!WLAN USB Stick N +.It +CACE AirPcap \&Nx +.It +D-Link DWA-130 rev \&D1 +.It +D-Link DWA-160 rev A1 +.It +D-Link DWA-160 rev A2 +.It +IO-Data WN-GDN/US2 +.It +NEC Aterm WL300NU-G +.It +Netgear WNDA3100 +.It +Netgear WN111 v2 +.It +Planex GW-US300 +.It +SMC Networks SMCWUSB-N2 +.It +TP-Link TL-WN821N v1, v2 +.It +Ubiquiti SR71 USB +.It +Unex DNUA-81 +.It +Z-Com UB81 +.It +Z-Com UB82 +.It +ZyXEL NWD-271N +.El .Sh FILES The driver needs at least version 1.0 of the following firmware files, which is loaded when an interface is attached: @@ -88,49 +134,20 @@ which is loaded when an interface is attached: .It Pa /boot/kernel/otusfw-init.ko .It Pa /boot/kernel/otusfw-main.ko .El -.Sh HARDWARE -The -.Nm -driver provices support for Atheros AR9170 USB IEEE 802.11b/g/n -wireless network adapters, including: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It 3Com 3CRUSBN275 -.It Arcadyan WN7512 -.\" .It AVM FRITZ!WLAN USB Stick N -.It CACE AirPcap \&Nx -.It D-Link DWA-130 rev \&D1 -.It D-Link DWA-160 rev A1 -.It D-Link DWA-160 rev A2 -.It IO-Data WN-GDN/US2 -.It NEC Aterm WL300NU-G -.It Netgear WNDA3100 -.It Netgear WN111 v2 -.It Planex GW-US300 -.It SMC Networks SMCWUSB-N2 -.It TP-Link TL-WN821N v1, v2 -.It Ubiquiti SR71 USB -.It Unex DNUA-81 -.It Z-Com UB81 -.It Z-Com UB82 -.It ZyXEL NWD-271N -.El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev otus0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev otus0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev otus0 ssid my_net up" +.Dl ifconfig wlan create wlandev otus0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev otus0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Sh DIAGNOSTICS .Bl -diag @@ -153,7 +170,9 @@ The file might be missing or corrupted. The .Nm driver first appeared in -.Ox 4.6 . +.Ox 4.6 +and +.Fx 11 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/otusfw.4 b/share/man/man4/otusfw.4 index 79966253bbc3..8810673e53b9 100644 --- a/share/man/man4/otusfw.4 +++ b/share/man/man4/otusfw.4 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Copyright (c) 2015 Adrian Chadd <adrian@FreeBSD.org> .\" .\" Permission to use, copy, modify, and distribute this software for any diff --git a/share/man/man4/ow.4 b/share/man/man4/ow.4 index 425b891a0c24..9b2f77d8cacc 100644 --- a/share/man/man4/ow.4 +++ b/share/man/man4/ow.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 20, 2015 .Dt OW 4 .Os diff --git a/share/man/man4/ow_temp.4 b/share/man/man4/ow_temp.4 index 291bb0ce471d..5afce6bd69d5 100644 --- a/share/man/man4/ow_temp.4 +++ b/share/man/man4/ow_temp.4 @@ -1,3 +1,5 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2015 M. Warner Losh <imp@FreeBSD.org> .\" @@ -21,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 20, 2015 +.Dd November 22, 2024 .Dt OW_TEMP 4 .Os .Sh NAME @@ -40,22 +40,17 @@ The sensor is read periodically and the results returned via a .Xr sysctl 3 as described below. .Sh HARDWARE -These temperature sensors are supported by the +The .Nm -driver: -.Bl -tag -width MAX31820 -compact -.It DS1820 -1-Wire Digital Thermometer -.It DS18S20 -High-Precision 1-Wire Digital Thermometer -.It DS18B20 -Programmable Resolution 1-Wire Digital Thermometer -.It DS1822 -Econo 1-Wire Digital Thermometer -.It DS1825 -Programmable Resolution 1-Wire Digital Thermometer with 4-bit ID -.It MAX31820 -1-Wire, Parasite-Power, Ambient Temperature Sensor +driver supports the following temperature sensors: +.Pp +.Bl -column "DS18S20" "Econo 1-Wire Digital Thermometer" -compact +.It DS1820 Ta 1-Wire Digital Thermometer +.It DS18S20 Ta High-Precision 1-Wire Digital Thermometer +.It DS18B20 Ta Programmable Resolution 1-Wire Digital Thermometer +.It DS1822 Ta Econo 1-Wire Digital Thermometer +.It DS1825 Ta Programmable Resolution 1-Wire Digital Thermometer with 4-bit ID +.It MAX31820 Ta 1-Wire, Parasite-Power, Ambient Temperature Sensor .El .Pp The driver supports Family codes 0x10, 0x22, 0x28, and 0x3b. @@ -67,11 +62,11 @@ driver reports data via entries in the device's node in the .Xr sysctl 8 tree: -.Bl -tag -width xxxxxxxxxx +.Bl -tag -width "reading_interval" .It temperature The last temperature read, in milli-Kelvin. .It badcrc -The number of CRC errors in reading the temperature form the +The number of CRC errors in reading the temperature from the device. Some CRC errors are to be expected. High rates of CRC errors, however, generally indicate a noisy diff --git a/share/man/man4/owc.4 b/share/man/man4/owc.4 index f1fbd4f3c8db..95269f97cf45 100644 --- a/share/man/man4/owc.4 +++ b/share/man/man4/owc.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 26, 2019 .Dt OWC 4 .Os diff --git a/share/man/man4/p9fs.4 b/share/man/man4/p9fs.4 new file mode 100644 index 000000000000..04f27abd2545 --- /dev/null +++ b/share/man/man4/p9fs.4 @@ -0,0 +1,127 @@ +.\" +.\" Copyright (c) 2022-present Doug Rabson +.\" 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 DOCUMENTATION IS PROVIDED BY THE AUTHOR ``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 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. +.\" +.Dd November 7, 2024 +.Dt P9FS 4 +.Os +.Sh NAME +.Nm p9fs +.Nd "9P file system" +.Sh SYNOPSIS +To use this filesystem, +either add the following to the kernel config: +.Bd -ragged -offset indent +.Cd "options P9FS" +.Cd "device virtio_p9fs" +.Ed +.Pp +Alternatively, load the driver as a kernel module, +either at boot time by adding the following to +.Xr loader.conf 5 : +.Bd -literal -offset indent +virtio_p9fs_load="YES" +.Ed +.Pp +or on system startup using the command: +.Pp +.Dl "# sysrc kld_list+=virtio_p9fs" +.Sh DESCRIPTION +The +.Nm +filesystem uses the 9P protocol to mount a host file system directory +into a +.Xr bhyve 8 +guest. +Multiple host directories can be accessed using the +.Xr bhyve 8 +virtio-9p virtual PCI device. +Each device is configured with a share name and a host directory path. +The share name can be used with +.Xr mount 8 +to mount the host directory in the guest: +.Pp +.Dl "# mount -t p9fs mysharename /mnt" +.Pp +Host directories can be mounted on system startup using +.Xr fstab 5 +like this: +.Pp +.Bd -literal -offset indent +mysharename /mnt p9fs rw 0 0 +.Ed +.Pp +Using +.Nm +as a root file system is supported by adding the following to +.Xr loader.conf 5 : +.Bd -literal -offset indent +vfs.root.mountfrom="p9fs:mysharename" +.Ed +.Sh LIMITATIONS +The 9P protocol relies on stateful file opens +which map protocol-level FIDs to host file descriptors. +The FreeBSD vnode interface doesn't support this and +.Nm +uses heuristics to guess the right FID to use for file operations. +.Pp +This can be confused by privilege lowering and +does not guarantee that the FID created for a +given file open is always used, +even if the calling process is using the file descriptor from +the original open call. +.Pp +In particular, accessing unlinked files using open file descriptor +may not work correctly. +If +.Nm +is the root filesystem, +it is recommented to use with +.Xr tmpfs 5 +to ensure that temporary files created in +.Pa /tmp +or +.Pa /var/tmp +have the expected semantics. +.Sh SEE ALSO +.Xr fstab 5 +.Sh HISTORY +The 9P protocol first appeared in the Plan 9 operating system. +More recently, the protocol has been widely used with virtual machines +to allow the use of host file resources inside a guest VM. +.Sh AUTHORS +This is derived from software released by Juniper Networks, Inc. +with many improvements and fixes from +.An Steve Wills . +.Pp +This manual page was written by +.An -nosplit +.An Doug Rabson Aq Mt dfr@FreeBSD.org . +.Sh BUGS +A better name for this filesystem would be +.Ar 9pfs +but for technical reasons, +the names of filesystems must be valid C identifiers. +As a compromise, +the filesystem is named +.Nm . diff --git a/share/man/man4/padlock.4 b/share/man/man4/padlock.4 index 44963d0fd140..cf362e58972e 100644 --- a/share/man/man4/padlock.4 +++ b/share/man/man4/padlock.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 29, 2020 .Dt PADLOCK 4 .Os diff --git a/share/man/man4/pass.4 b/share/man/man4/pass.4 index 4232190b0b27..0a5a58c28731 100644 --- a/share/man/man4/pass.4 +++ b/share/man/man4/pass.4 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 3, 2017 .Dt PASS 4 .Os diff --git a/share/man/man4/pca954x.4 b/share/man/man4/pca954x.4 index d845740f9b6c..698362347f56 100644 --- a/share/man/man4/pca954x.4 +++ b/share/man/man4/pca954x.4 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2020 Andriy Gapon <avg@FreeBSD.org> .\" @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 13, 2021 .Dt PCA954X 4 .Os diff --git a/share/man/man4/pccard.4 b/share/man/man4/pccard.4 index e929d46f1b16..cec07b2336cb 100644 --- a/share/man/man4/pccard.4 +++ b/share/man/man4/pccard.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 18, 2020 .Dt PCCARD 4 .Os diff --git a/share/man/man4/pccbb.4 b/share/man/man4/pccbb.4 index 0feabfb41370..3200e8b2d2e2 100644 --- a/share/man/man4/pccbb.4 +++ b/share/man/man4/pccbb.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 21, 2004 .Dt PCCBB 4 .Os diff --git a/share/man/man4/pcf.4 b/share/man/man4/pcf.4 index cc8915fa1222..f54e8c5d2e13 100644 --- a/share/man/man4/pcf.4 +++ b/share/man/man4/pcf.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 6, 1998 .Dt PCF 4 .Os diff --git a/share/man/man4/pcf8574.4 b/share/man/man4/pcf8574.4 index 9fdf71874063..900302a45bb2 100644 --- a/share/man/man4/pcf8574.4 +++ b/share/man/man4/pcf8574.4 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2020 Andriy Gapon <avg@FreeBSD.org> .\" @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 6, 2021 .Dt PCF8574 4 .Os diff --git a/share/man/man4/pcf8591.4 b/share/man/man4/pcf8591.4 index 2876ad057f90..9acaf6502b38 100644 --- a/share/man/man4/pcf8591.4 +++ b/share/man/man4/pcf8591.4 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2020 Andriy Gapon <avg@FreeBSD.org> .\" @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: head/share/man/man4/cp2112.4 364144 2020-08-12 09:42:05Z avg $ -.\" .Dd November 6, 2021 .Dt PCF8591 4 .Os diff --git a/share/man/man4/pchtherm.4 b/share/man/man4/pchtherm.4 index 098c1d459867..2248ebd815f6 100644 --- a/share/man/man4/pchtherm.4 +++ b/share/man/man4/pchtherm.4 @@ -21,8 +21,6 @@ .\" (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 March 15, 2020 .Dt pchtherm 4 .Os diff --git a/share/man/man4/pci.4 b/share/man/man4/pci.4 index 3c2c08afe466..91fbb557f644 100644 --- a/share/man/man4/pci.4 +++ b/share/man/man4/pci.4 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd August 13, 2021 +.Dd April 2, 2025 .Dt PCI 4 .Os .Sh NAME @@ -374,16 +372,18 @@ The input parameters and results are passed in the .Va pci_bar_mmap structure, which has the following fields: .Bl -tag -width Vt struct pcise pbm_sel -.It Vt uint64_t pbm_map_base +.It Vt void *pbm_map_base Reports the established mapping base to the caller. If .Va PCIIO_BAR_MMAP_FIXED flag was specified, then this field must be filled before the call with the desired address for the mapping. -.It Vt uint64_t pbm_map_length +.It Vt size_t pbm_map_length Reports the mapped length of the BAR, in bytes. -Its .Vt uint64_t value is always multiple of machine pages. -.It Vt int64_t pbm_bar_length +Its +.Vt size_t +value is always multiple of machine pages. +.It Vt uint64_t pbm_bar_length Reports length of the bar as exposed by the device. .It Vt int pbm_bar_off Reports offset from the mapped base to the start of the @@ -572,6 +572,8 @@ MSI interrupts can be disabled by setting this tunable to 0. Enable support for extended Message Signalled Interrupts .Pq MSI-X . MSI-X interrupts can be disabled by setting this tunable to 0. +.It Va hw.pci.enable_pcie_ei Pq Defaults to 0 +Enable support for PCI-express Electromechanical Interlock. .It Va hw.pci.enable_pcie_hp Pq Defaults to 1 Enable support for native PCI-express HotPlug. .It Va hw.pci.honor_msi_blacklist Pq Defaults to 1 @@ -624,7 +626,12 @@ pin identified by the tunable name. Mapping of IRQ values to platform interrupt sources is machine dependent. .El .Sh DEVICE WIRING -You can wire the device unit at a given location with device.hints. +You can wire the device unit at a given location with +.Xr device.hints 5 . +.Ss BSF Based Wiring +Devices may be wired to a Bus / Slot / Function (BSF) address. +This is the form reported by +.Xr pciconf 8 Entries of the form .Va hints.<name>.<unit>.at="pci<B>:<S>:<F>" or @@ -639,7 +646,7 @@ for any PCI device found to match the specification, where: The domain .Pq or segment of the PCI device in decimal. -Defaults to 0 if unspecified +Defaults to 0 if unspecified. .It <B> The bus address of the PCI device in decimal. .It <S> @@ -660,15 +667,18 @@ produces undefined results. .Ss Examples Given the following lines in .Pa /boot/device.hints : -.Cd hint.nvme.3.at="pci6:0:0" -.Cd hint.igb.8.at="pci14:0:0" +.Bd -literal +hint.nvme.3.at="pci6:0:0" +hint.igb.8.at="pci14:0:0" +.Ed +.Pp If there is a device that supports .Xr igb 4 at PCI bus 14 slot 0 function 0, then it will be assigned igb8 for probe and attach. Likewise, if there is an .Xr nvme 4 -card at PCI bus 6 slot 0 function 0, +device at PCI bus 6 slot 0 function 0, then it will be assigned nvme3 for probe and attach. If another type of card is in either of these locations, the name and unit of that card will be the default names and will be unaffected by @@ -676,6 +686,33 @@ these hints. If other igb or nvme cards are located elsewhere, they will be assigned their unit numbers sequentially, skipping the unit numbers that have 'at' hints. +.Ss Location Based Wiring +While simple to locate where to place a device for BSF wiring, the +bus number of that is not invariant. +Any number of changes to the devices within the system can cause +this value to vary from boot to boot. +The UEFI Standard defines a device path that's based only on the invariant parts +of the address: The root complex (domain), the slot number and the function. +These paths are hard to construct by hand, please see +.Xr devctl 8 +.Sq Cm getpath +command with a +.Sq Ar UEFI +locator. +The above example could also be expressed as +.Bd -literal +hint.nvme.3.at="PciRoot(0x2)/Pci(0x1,0x3)/Pci(0x0,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)" +hint.nvme.8.at="PciRoot(0x1)/Pci(0x2,0x2)/Pci(0x0,0x0)/Pci(0x0,0x0)" +.Ed +.Pp +The advantage of this notation is that you can specify the exact location a +device will be at. +For deployments of multiple systems with the same configuration, this can be +helpful in managing the devices. +However, even slight variation in motherboards can cause the path to change +substantially. +It is also less natural to think of the UEFI Device Paths since little else +will report it. .Sh FILES .Bl -tag -width /dev/pci -compact .It Pa /dev/pci @@ -684,6 +721,7 @@ Character device for the driver. .El .Sh SEE ALSO +.Xr device.hints 5 .Xr pciconf 8 .Sh HISTORY The diff --git a/share/man/man4/pcib.4 b/share/man/man4/pcib.4 index 22efe2f3e1cb..b9a27a56cb70 100644 --- a/share/man/man4/pcib.4 +++ b/share/man/man4/pcib.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 18, 2008 .Dt PCIB 4 .Os diff --git a/share/man/man4/pcic.4 b/share/man/man4/pcic.4 index 045b543b4189..1c5b0fc35554 100644 --- a/share/man/man4/pcic.4 +++ b/share/man/man4/pcic.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 9, 2002 .Dt PCIC 4 .Os diff --git a/share/man/man4/pcm.4 b/share/man/man4/pcm.4 index b4f55443f95c..518c37b54f1d 100644 --- a/share/man/man4/pcm.4 +++ b/share/man/man4/pcm.4 @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd December 26, 2020 +.Dd February 15, 2025 .Dt SOUND 4 .Os .Sh NAME @@ -103,6 +101,8 @@ The following bridge device drivers are available: .It .Xr snd_hda 4 (enabled by default on amd64, i386) .It +.Xr snd_hdsp 4 +.It .Xr snd_hdspe 4 .It .Xr snd_ich 4 (enabled by default on amd64, i386) @@ -115,7 +115,7 @@ The following bridge device drivers are available: .It .Xr snd_spicds 4 .It -.Xr snd_uaudio 4 (enabled by default on amd64, i386, powerpc) +.Xr snd_uaudio 4 (auto-loaded on device plug) .It .Xr snd_via8233 4 (enabled by default on amd64, i386) .It @@ -126,33 +126,6 @@ The following bridge device drivers are available: .Pp Refer to the manual page for each bridge device driver for driver specific settings and information. -.Ss Legacy Hardware -For old legacy -.Tn ISA -cards, the driver looks for -.Tn MSS -cards at addresses -.Dv 0x530 -and -.Dv 0x604 . -These values can be overridden in -.Pa /boot/device.hints . -Non-PnP sound cards require the following lines in -.Xr device.hints 5 : -.Bd -literal -offset indent -hint.pcm.0.at="isa" -hint.pcm.0.irq="5" -hint.pcm.0.drq="1" -hint.pcm.0.flags="0x0" -.Ed -.Pp -Apart from the usual parameters, the flags field is used to specify -the secondary -.Tn DMA -channel (generally used for capture in full duplex cards). -Flags are set to 0 for cards not using a secondary -.Tn DMA -channel, or to 0x10 + C to specify channel C. .Ss Boot Variables In general, the module .Pa snd_foo @@ -196,16 +169,16 @@ This will mute the input channel per default. Multichannel audio, popularly referred to as .Dq surround sound is supported and enabled by default. -The FreeBSD multichannel matrix processor supports up to 18 interleaved -channels, but the limit is currently set to 8 channels (as commonly used -for 7.1 surround sound). +The +.Fx +multichannel matrix processor supports up to 18 interleaved channels, but the +limit is currently set to 8 channels (as commonly used for 7.1 surround sound). The internal matrix mapping can handle reduction, expansion or re-routing of channels. This provides a base interface for related multichannel .Fn ioctl support. -Multichannel audio works both with and without -.Tn VCHANs . +Multichannel audio works both with and without VCHANs. .Pp Most bridge device drivers are still missing multichannel matrixing support, but in most cases this should be trivial to implement. @@ -231,21 +204,18 @@ tunable. Each device can optionally support more playback and recording channels than physical hardware provides by using .Dq virtual channels -or -.Tn VCHANs . -.Tn VCHAN -options can be configured via the +or VCHANs. +VCHAN options can be configured via the .Xr sysctl 8 interface but can only be manipulated while the device is inactive. .Ss VPC -FreeBSD supports independent and individual volume controls for each active +.Fx +supports independent and individual volume controls for each active application, without touching the master .Nm volume. This is sometimes referred to as Volume Per Channel (VPC). -The -.Tn VPC -feature is enabled by default. +The VPC feature is enabled by default. .Ss Loader Tunables The following loader tunables are used to set driver configuration at the .Xr loader 8 @@ -267,12 +237,9 @@ Enabling this will make bass and treble controls appear in mixer applications. This tunable is undefined by default. Equalizing is disabled by default. .It Va hint.pcm.%d.vpc -Set to 1 or 0 to explicitly enable (1) or disable (0) the -.Tn VPC -feature. +Set to 1 or 0 to explicitly enable (1) or disable (0) the VPC feature. This tunable is undefined by default. -.Tn VPC -is however enabled by default. +VPC is however enabled by default. .El .Ss Runtime Configuration There are a number of @@ -318,7 +285,7 @@ Use the most recently attached device. .It Va hw.snd.default_unit Default sound card for systems with multiple sound cards. When using -.Xr devfs 5 , +.Xr devfs 4 , the default device for .Pa /dev/dsp . Equivalent to a symlink from @@ -393,18 +360,12 @@ A value of 0 will use a low and aggressive latency profile which can result in possible underruns if the application cannot keep up with a rapid irq rate, especially during high workload. The default value is 1, which is considered a moderate/safe latency profile. -.It Va hw.snd.maxautovchans -Global -.Tn VCHAN -setting that only affects devices with at least one playback or recording channel available. -The sound system will dynamically create up to this many -.Tn VCHANs . -Set to -.Dq 0 -if no -.Tn VCHANs -are desired. -Maximum value is 256. +.It Va hw.snd.vchans_enable +Global VCHAN setting to enable (1) or disable (0) VCHANs. +This setting can be overridden for an individual device by using the +.Va dev.pcm.%d.[play|rec].vchans +tunables. +Default is enabled. .It Va hw.snd.report_soft_formats Controls the internal format conversion if it is available transparently to the application software. @@ -448,13 +409,11 @@ This means that any changes to the volume will be lost. Enabling this will preserve the volume, at the cost of possible confusion when applications tries to re-open the same device. .It Va hw.snd.vpc_mixer_bypass -The recommended way to use the -.Tn VPC -feature is to teach applications to use -the correct +The recommended way to use the VPC feature is to teach applications to use the +correct .Fn ioctl : -.Dv SNDCTL_DSP_GETPLAYVOL, SNDCTL_DSP_SETPLAYVOL, -.Dv SNDCTL_DSP_SETRECVOL, SNDCTL_DSP_SETRECVOL. +.Dv SNDCTL_DSP_GETPLAYVOL , SNDCTL_DSP_SETPLAYVOL , +.Dv SNDCTL_DSP_SETRECVOL , SNDCTL_DSP_SETRECVOL . This is however not always possible. Enable this to allow applications to use their own existing mixer logic to control their own channel volume. @@ -467,30 +426,16 @@ matrixing, rate converting and equalizing. The pure .Nm stream will be fed directly to the hardware. -If -.Tn VCHANs -are enabled, the bitperfect mode will use the -.Tn VCHAN -format/rate as the definitive format/rate target. -The recommended way to use bitperfect mode is to disable -.Tn VCHANs -and enable this sysctl. +If VCHANs are enabled, the bitperfect mode will use the VCHAN format/rate as +the definitive format/rate target. +The recommended way to use bitperfect mode is to disable VCHANs and enable this +sysctl. Default is disabled. .It Va dev.pcm.%d.[play|rec].vchans -The current number of -.Tn VCHANs -allocated per device. -This can be set to preallocate a certain number of -.Tn VCHANs . -Setting this value to -.Dq 0 -will disable -.Tn VCHANs -for this device. +Enable (1) or disable (0) VCHANs. +Default is enabled. .It Va dev.pcm.%d.[play|rec].vchanformat -Format for -.Tn VCHAN -mixing. +Format for VCHAN mixing. All playback paths will be converted to this format before the mixing process begins. By default only 2 channels are enabled. @@ -520,8 +465,7 @@ Quadraphonic, 4 channels (front/rear left and right). 8 channels (4.0 + center + LFE + left and right side). .El .It Va dev.pcm.%d.[play|rec].vchanmode -.Tn VCHAN -format/rate selection. +VCHAN format/rate selection. Available options include: .Bl -tag -width 2n .It fixed @@ -556,9 +500,7 @@ The downside is that the hardware DMA mode needs to be restarted, which may cause annoying pops or clicks. .El .It Va dev.pcm.%d.[play|rec].vchanrate -Sample rate speed for -.Tn VCHAN -mixing. +Sample rate speed for VCHAN mixing. All playback paths will be converted to this sample rate before the mixing process begins. .It Va dev.pcm.%d.polling @@ -568,30 +510,17 @@ device state on each tick using a mechanism. Disabled by default and currently only available for a few device drivers. .El -.Ss Recording Channels -On devices that have more than one recording source (ie: mic and line), -there is a corresponding -.Pa /dev/dsp%d.r%d -device. -The -.Xr mixer 8 -utility can be used to start and stop recording from an specific device. .Ss Statistics Channel statistics are only kept while the device is open. So with situations involving overruns and underruns, consider the output while the errant application is open and running. .Ss IOCTL Support -The driver supports most of the -.Tn OSS +The driver supports most of the OSS .Fn ioctl functions, and most applications work unmodified. A few differences exist, while memory mapped playback is -supported natively and in -.Tn Linux -emulation, memory mapped recording is -not due to -.Tn VM -system design. +supported natively and in Linux emulation, memory mapped recording is not due +to VM system design. As a consequence, some applications may need to be recompiled with a slightly modified audio module. See @@ -602,36 +531,24 @@ functions. .Sh FILES The .Nm -drivers may create the following -device nodes: +drivers may create the following device nodes: .Pp -.Bl -tag -width ".Pa /dev/audio%d.%d" -compact -.It Pa /dev/audio%d.%d -Sparc-compatible audio device. -.It Pa /dev/dsp%d.%d -Digitized voice device. -.It Pa /dev/dspW%d.%d -Like -.Pa /dev/dsp , -but 16 bits per sample. -.It Pa /dev/dsp%d.p%d -Playback channel. -.It Pa /dev/dsp%d.r%d -Record channel. -.It Pa /dev/dsp%d.vp%d -Virtual playback channel. -.It Pa /dev/dsp%d.vr%d -Virtual recording channel. +.Bl -tag -width ".Pa /dev/sndstat" -compact +.It Pa /dev/dsp%d +Audio device. +The number represents the unit number of the device. +.It Pa /dev/dsp +Alias of +.Pa /dev/dsp${hw.snd.default_unit} . +Available only if +.Pa hw.snd.basename_clone +is set. .It Pa /dev/sndstat Current .Nm status, including all channels and drivers. .El .Pp -The first number in the device node -represents the unit number of the -.Nm -device. All .Nm devices are listed @@ -641,15 +558,6 @@ Additional messages are sometimes recorded when the device is probed and attached, these messages can be viewed with the .Xr dmesg 8 utility. -.Pp -The above device nodes are only created on demand through the dynamic -.Xr devfs 5 -clone handler. -Users are strongly discouraged to access them directly. -For specific sound card access, please instead use -.Pa /dev/dsp -or -.Pa /dev/dsp%d . .Sh EXAMPLES Use the sound metadriver to load all .Nm @@ -674,7 +582,7 @@ This is handy if there are multiple .Nm devices available: .Pp -.Dl sysctl hw.snd.default_unit=1 +.Dl mixer -d pcm1 .Sh DIAGNOSTICS .Bl -diag .It pcm%d:play:%d:dsp%d.p%d: play interrupt timeout, channel dead @@ -684,6 +592,7 @@ or outgoing (record) data. A device node is not created properly. .El .Sh SEE ALSO +.Xr devfs 4 , .Xr snd_ai2s 4 , .Xr snd_als4000 4 , .Xr snd_atiixp 4 , @@ -698,6 +607,7 @@ A device node is not created properly. .Xr snd_es137x 4 , .Xr snd_fm801 4 , .Xr snd_hda 4 , +.Xr snd_hdsp 4 , .Xr snd_hdspe 4 , .Xr snd_ich 4 , .Xr snd_maestro3 4 , @@ -709,7 +619,6 @@ A device node is not created properly. .Xr snd_via8233 4 , .Xr snd_via82c686 4 , .Xr snd_vibes 4 , -.Xr devfs 5 , .Xr device.hints 5 , .Xr loader.conf 5 , .Xr dmesg 8 , @@ -764,3 +673,10 @@ It was then rewritten for .Sh BUGS Some features of your sound card (e.g., global volume control) might not be supported on all devices. +.Pp +Some audio devices might refuse to work properly unless the sample rate is +configured the same for both recording and playback, even if only simplex is +used. +See the +.Va dev.pcm.%d.[play|rec].vchanrate +sysctls. diff --git a/share/man/man4/pf.4 b/share/man/man4/pf.4 index 133e4d300043..03a4ba2bbe7f 100644 --- a/share/man/man4/pf.4 +++ b/share/man/man4/pf.4 @@ -26,9 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd May 7, 2021 +.Dd July 2, 2025 .Dt PF 4 .Os .Sh NAME @@ -37,6 +35,23 @@ .Sh SYNOPSIS .Cd "device pf" .Cd "options PF_DEFAULT_TO_DROP" +.Pp +In +.Xr rc.conf 5 : +.Cd pf_enable="YES" +.Pp +In +.Xr loader.conf 5 : +.Cd net.pf.states_hashsize +.Cd net.pf.source_nodes_hashsize +.Cd net.pf.rule_tag_hashsize +.Cd net.pf.udpendpoint_hashsize +.Cd net.pf.default_to_drop +.Pp +In +.Xr sysctl.conf 5 : +.Cd net.pf.request_maxcount +.Cd net.pf.filter_local .Sh DESCRIPTION Packet filtering takes place in the kernel. A pseudo-device, @@ -76,19 +91,54 @@ separated by characters, similar to how file system hierarchies are laid out. The final component of the anchor path is the anchor under which operations will be performed. -.Sh SYSCTL VARIABLES AND LOADER TUNABLES -The following +.Sh SYSCTL VARIABLES +The following variables can be entered at the .Xr loader 8 -tunables are available. +prompt, set in +.Xr loader.conf 5 , +.Xr sysctl.conf 5 , +or changed at runtime with +.Xr sysctl 8 : +.Bl -tag -width indent +.It Va net.pf.filter_local +This tells +.Nm +to also filter on the loopback output hook. +This is typically used to allow redirect rules to adjust the source address. +.It Va net.pf.request_maxcount +The maximum number of items in a single ioctl call. +.El +.Sh LOADER TUNABLES +The following tunables can be entered at the +.Xr loader 8 +prompt, or set in +.Xr loader.conf 5 : .Bl -tag -width indent .It Va net.pf.states_hashsize -Size of hash tables that store states. +Size of hash table that stores states. Should be power of 2. Default value is 131072. .It Va net.pf.source_nodes_hashsize -Size of hash table that store source nodes. +Size of hash table that stores source nodes. +Should be power of 2. +Default value is 32768. +.It Va net.pf.rule_tag_hashsize +Size of the hash table that stores tags. +.It Va net.pf.udpendpoint_hashsize +Size of hash table that store UDP endpoint mappings. Should be power of 2. Default value is 32768. +.It Va net.pf.default_to_drop +This value overrides +.Cd "options PF_DEFAULT_TO_DROP" +from kernel configuration file. +.It Va net.pf.filter_local +This tells +.Nm +to also filter on the loopback output hook. +This is typically used to allow redirect rules to adjust the source address. +.It Va net.pf.request_maxcount +The maximum number of items in a single ioctl call. .El .Pp Read only @@ -302,8 +352,10 @@ calls. Nested anchors, since they are not directly attached to the given anchor, will not be included. This ioctl returns -.Er EINVAL -if the given anchor does not exist. +.Er ENOENT +if the parent anchor given at +.Va path +does not exist. .It Dv DIOCGETRULESET Fa "struct pfioc_ruleset *pr" Get a ruleset (i.e., an anchor) .Va name @@ -315,10 +367,14 @@ the maximum number of which can be obtained from a preceding .Dv DIOCGETRULESETS call. This ioctl returns -.Er EINVAL -if the given anchor does not exist or +.Er ENOENT +if the parent anchor given by +.Va path +does not exist or .Er EBUSY -if another process is concurrently updating a ruleset. +if the index passed in by +.Va nr +is greater than the number of anchors. .It Dv DIOCADDSTATE Fa "struct pfioc_state *ps" Add a state entry. .Bd -literal @@ -334,35 +390,40 @@ and fields of the .Va state nvlist from the state table. -.It Dv DIOCKILLSTATES Fa "struct pfioc_state_kill *psk" +.It Dv DIOCKILLSTATESNV Fa "struct pfioc_nv nv" Remove matching entries from the state table. This ioctl returns the number of killed states in -.Va psk_killed . +.Va "killed" . .Bd -literal -struct pfioc_state_kill { - struct pf_state_cmp psk_pfcmp; - sa_family_t psk_af; - int psk_proto; - struct pf_rule_addr psk_src; - struct pf_rule_addr psk_dst; - char psk_ifname[IFNAMSIZ]; - char psk_label[PF_RULE_LABEL_SIZE]; - u_int psk_killed; +nvlist pf_state_cmp { + number id; + number creatorid; + number direction; +}; + +nvlist pf_kill { + nvlist pf_state_cmp cmp; + number af; + number proto; + nvlist pf_rule_addr src; + nvlist pf_rule_addr dst; + string ifname[IFNAMSIZ]; + string label[PF_RULE_LABEL_SIZE]; }; .Ed -.It Dv DIOCCLRSTATES Fa "struct pfioc_state_kill *psk" +.It Dv DIOCCLRSTATESNV Fa "struct pfioc_nv nv" Clear all states. It works like -.Dv DIOCKILLSTATES , +.Dv DIOCKILLSTATESNV , but ignores the -.Va psk_af , -.Va psk_proto , -.Va psk_src , +.Va af , +.Va proto , +.Va src , and -.Va psk_dst +.Va dst fields of the -.Vt pfioc_state_kill -structure. +.Vt pf_kill +nvlist. .It Dv DIOCSETSTATUSIF Fa "struct pfioc_if *pi" Specify the interface for which statistics are accumulated. .Bd -literal @@ -415,65 +476,60 @@ Set the debug level. enum { PF_DEBUG_NONE, PF_DEBUG_URGENT, PF_DEBUG_MISC, PF_DEBUG_NOISY }; .Ed -.It Dv DIOCGETSTATESNV Fa "struct pfioc_nv *nv" +.It Dv DIOCGETSTATESV2 Fa "struct pfioc_states_v2 *ps" Get state table entries. .Bd -literal -nvlist pf_state_key { - nvlist pf_addr addr[2]; - number port[2]; - number af; - number proto; -}; - -nvlist pf_state_scrub { - bool timestamp; - number ttl; - number ts_mod; -}; - -nvlist pf_state_peer { - nvlist pf_state_scrub scrub; - number seqlo; - number seqhi; - number seqdiff; - number max_win; - number mss; - number state; - number wscale; -}; - -nvlist pf_state { - number id; - string ifname; - nvlist pf_state_key stack_key; - nvlist pf_state_key wire_key; - nvlist pf_state_peer src; - nvlist pf_state_peer dst; - nvlist pf_addr rt_addr; - number rule; - number anchor; - number nat_rule; - number expire; - number packets[2]; - number bytes[2]; - number creatorid; - number direction; - number log; - number state_flags; - number timeout; - number sync_flags; +struct pfioc_states_v2 { + int ps_len; + uint64_t ps_req_version; + union { + void *ps_buf; + struct pf_state_export *ps_states; + }; }; -nvlist pf_states { - number count; - nvlist pf_state states[]; +struct pf_state_export { + uint64_t version; + uint64_t id; + char ifname[IFNAMSIZ]; + char orig_ifname[IFNAMSIZ]; + struct pf_state_key_export key[2]; + struct pf_state_peer_export src; + struct pf_state_peer_export dst; + struct pf_addr rt_addr; + uint32_t rule; + uint32_t anchor; + uint32_t nat_rule; + uint32_t creation; + uint32_t expire; + uint32_t spare0; + uint64_t packets[2]; + uint64_t bytes[2]; + uint32_t creatorid; + uint32_t spare1; + sa_family_t af; + uint8_t proto; + uint8_t direction; + uint8_t log; + uint8_t state_flags_compat; + uint8_t timeout; + uint8_t sync_flags; + uint8_t updates; + uint16_t state_flags; + uint16_t qid; + uint16_t pqid; + uint16_t dnpipe; + uint16_t dnrpipe; + int32_t rtableid; + uint8_t min_ttl; + uint8_t set_tos; + uint16_t max_mss; + uint8_t set_prio[2]; + uint8_t rt; + char rt_ifname[IFNAMSIZ]; + uint8_t spare[72]; }; .Ed -.Pp -If -.Va pfioc_nv.size -is insufficiently large, as many states as possible that can fit into this -size will be copied into the supplied buffer. .It Dv DIOCCHANGERULE Fa "struct pfioc_rule *pcr" Add or remove the .Va rule @@ -656,7 +712,7 @@ struct pfr_tstats { [PFR_DIR_MAX][PFR_OP_TABLE_MAX]; u_int64_t pfrts_match; u_int64_t pfrts_nomatch; - long pfrts_tzero; + time_t pfrts_tzero; int pfrts_cnt; int pfrts_refcnt[PFR_REFCNT_MAX]; }; @@ -796,7 +852,7 @@ struct pfr_astats { [PFR_DIR_MAX][PFR_OP_ADDR_MAX]; u_int64_t pfras_bytes [PFR_DIR_MAX][PFR_OP_ADDR_MAX]; - long pfras_tzero; + time_t pfras_tzero; }; .Ed .It Dv DIOCRCLRASTATS Fa "struct pfioc_table *io" @@ -1058,7 +1114,7 @@ will be set to the length of the buffer actually used. .It Dv DIOCCLRSRCNODES Clear the tree of source tracking nodes. .It Dv DIOCIGETIFACES Fa "struct pfioc_iface *io" -Get the list of interfaces and interface drivers known to +Get the list of interfaces and interface groups known to .Nm . All the ioctls that manipulate interfaces use the same structure described below: @@ -1075,7 +1131,7 @@ struct pfioc_iface { .Pp If not empty, .Va pfiio_name -can be used to restrict the search to a specific interface or driver. +can be used to restrict the search to a specific interface or group. .Va pfiio_buffer[pfiio_size] is the user-supplied buffer for returning the data. On entry, @@ -1094,20 +1150,18 @@ The data is returned in the structure described below: .Bd -literal struct pfi_kif { - RB_ENTRY(pfi_kif) pfik_tree; char pfik_name[IFNAMSIZ]; + union { + RB_ENTRY(pfi_kif) pfik_tree; + LIST_ENTRY(pfi_kif) pfik_list; + }; u_int64_t pfik_packets[2][2][2]; u_int64_t pfik_bytes[2][2][2]; u_int32_t pfik_tzero; - int pfik_flags; - struct pf_state_tree_lan_ext pfik_lan_ext; - struct pf_state_tree_ext_gwy pfik_ext_gwy; - TAILQ_ENTRY(pfi_kif) pfik_w_states; - void *pfik_ah_cookie; + u_int pfik_flags; struct ifnet *pfik_ifp; struct ifg_group *pfik_group; - int pfik_states; - int pfik_rules; + u_int pfik_rulerefs; TAILQ_HEAD(, pfi_dynaddr) pfik_dynaddrs; }; .Ed @@ -1217,6 +1271,9 @@ and then .Pp This implementation is derived from .Ox 4.5 . +A number of individual features, improvements, bug fixes and security fixes +have been ported from later versions of +.Ox . It has been heavily modified to be capable of running in multithreaded .Fx kernel and scale its performance on multiple CPUs. diff --git a/share/man/man4/pflog.4 b/share/man/man4/pflog.4 index 19eb7012bca3..c665268ed04d 100644 --- a/share/man/man4/pflog.4 +++ b/share/man/man4/pflog.4 @@ -23,8 +23,6 @@ .\" (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 October 29, 2021 .Dt PFLOG 4 .Os diff --git a/share/man/man4/pflow.4 b/share/man/man4/pflow.4 new file mode 100644 index 000000000000..320a7527dc2d --- /dev/null +++ b/share/man/man4/pflow.4 @@ -0,0 +1,123 @@ +.\" $OpenBSD: pflow.4,v 1.19 2014/03/29 11:26:03 florian Exp $ +.\" +.\" Copyright (c) 2008 Henning Brauer <henning@openbsd.org> +.\" Copyright (c) 2008 Joerg Goltermann <jg@osn.de> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: January 08 2024 $ +.Dt PFLOW 4 +.Os +.Sh NAME +.Nm pflow +.Nd kernel interface for pflow data export +.Sh SYNOPSIS +.Cd "pseudo-device pflow" +.Sh DESCRIPTION +The +.Nm +subsystem exports +.Nm +accounting data from the kernel using +.Xr udp 4 +packets. +.Nm +is compatible with netflow version 5 and IPFIX (10). +The data is extracted from the +.Xr pf 4 +state table. +.Pp +Multiple +.Nm +interfaces can be created at runtime using the +.Ic pflowctl Ns Ar N Ic -c +command. +Each interface must be configured with a flow receiver IP address +and a flow receiver port number. +.Pp +Only states created by a rule marked with the +.Ar pflow +keyword are exported by +.Nm . +.Pp +.Nm +will attempt to export multiple +.Nm +records in one +UDP packet, but will not hold a record for longer than 30 seconds. +.Pp +Each packet seen on this interface has one header and a variable number of +flows. +The header indicates the version of the protocol, number of +flows in the packet, a unique sequence number, system time, and an engine +ID and type. +Header and flow structs are defined in +.In net/pflow.h . +.Pp +The +.Nm +source and destination addresses are controlled by +.Xr pflowctl 8 . +.Cm src +is the sender IP address of the UDP packet which can be used +to identify the source of the data on the +.Nm +collector. +.Cm dst +defines the collector IP address and the port. +The +.Cm dst +IP address and port must be defined to enable the export of flows. +.Pp +For example, the following command sets 10.0.0.1 as the source +and 10.0.0.2:1234 as destination: +.Bd -literal -offset indent +# pflowctl -s pflow0 src 10.0.0.1 dst 10.0.0.2:1234 +.Ed +.Pp +The protocol is set to IPFIX with the following command: +.Bd -literal -offset indent +# pflowctl -s pflow0 proto 10 +.Ed +.Sh SEE ALSO +.Xr netintro 4 , +.Xr pf 4 , +.Xr udp 4 , +.Xr pf.conf 5 , +.Xr pflowctl 8 , +.Xr tcpdump 8 +.Sh STANDARDS +.Rs +.%A B. Claise +.%D January 2008 +.%R RFC 5101 +.%T "Specification of the IP Flow Information Export (IPFIX) Protocol for the Exchange of IP Traffic Flow Information" +.Re +.Sh HISTORY +The +.Nm +device first appeared in +.Ox 4.5 +and was imported into +FreeBSD 15.0 . +.Sh BUGS +A state created by +.Xr pfsync 4 +can have a creation or expiration time before the machine came up. +In this case, +.Nm +pretends such flows were created or expired when the machine came up. +.Pp +The IPFIX implementation is incomplete: +The required transport protocol SCTP is not supported. +Transport over TCP and DTLS protected flow export is also not supported. diff --git a/share/man/man4/pfsync.4 b/share/man/man4/pfsync.4 index 5b3159ff8292..cc9c350ea875 100644 --- a/share/man/man4/pfsync.4 +++ b/share/man/man4/pfsync.4 @@ -24,16 +24,22 @@ .\" (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 6, 2018 +.Dd November 08, 2023 .Dt PFSYNC 4 .Os .Sh NAME .Nm pfsync -.Nd packet filter state table sychronisation interface +.Nd packet filter state table synchronisation interface .Sh SYNOPSIS .Cd "device pfsync" +.Pp +In +.Xr loader.conf 5 : +.Cd net.pfsync.pfsync_buckets +.Pp +In +.Xr sysctl.conf 5 : +.Cd net.pfsync.carp_demotion_factor .Sh DESCRIPTION The .Nm @@ -115,11 +121,56 @@ dedicated to pfsync messages such as a crossover cable between two firewalls, or specify a peer address and protect the traffic with .Xr ipsec 4 . .Pp +Support for +.Nm +transport over IPv6 was introduced in +.Fx 14.0 . +To set up +.Nm +using multicast with IPv6 link-local addresses, the +.Ic syncpeer +must be set to the +.Nm +multicast address and the +.Ic syncdev +to the interface where +.Nm +traffic is expected. +.Bd -literal -offset indent +# ifconfig pfsync0 syncpeer ff12::f0 syncdev vtnet0 +.Ed +.Pp +When new features are introduced to +.Xr pf 4 +the format of messages used by .Nm -has the following -.Xr sysctl 8 -tunables: -.Bl -tag -width ".Va net.pfsync" +might change. +.Nm +will by default use the latest format. +If synchronization with a peer running an older version of FreeBSD is needed the +.Ar version +parameter can be used. +E.g.: +.Bd -literal -offset indent +# ifconfig pfsync0 version 1301 +.Ed +.Pp +Currently the following versions are supported: +.Bl -tag -width indent +.It Cm 1301 +FreeBSD releases 13.2 and older. +Compatibility with FreeBSD 13.1 has been verified. +.It Cm 1400 +FreeBSD release 14.0. +.El +.Sh SYSCTL VARIABLES +The following variables can be entered at the +.Xr loader 8 +prompt, set in +.Xr loader.conf 5 , +or changed at runtime with +.Xr sysctl 8 : +.Bl -tag -width indent .It Va net.pfsync.carp_demotion_factor Value added to .Va net.inet.carp.demotion @@ -130,6 +181,14 @@ See .Xr carp 4 for more information. Default value is 240. +.El +.Sh LOADER TUNABLES +The following tunable may be set in +.Xr loader.conf 5 +or at the +.Xr loader 8 +prompt: +.Bl -tag -width indent .It Va net.pfsync.pfsync_buckets The number of .Nm diff --git a/share/man/man4/pim.4 b/share/man/man4/pim.4 index 7e3046bfb4f9..695468bae8c4 100644 --- a/share/man/man4/pim.4 +++ b/share/man/man4/pim.4 @@ -23,8 +23,6 @@ .\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER .\" DEALINGS IN THE SOFTWARE. .\" -.\" $FreeBSD$ -.\" .Dd February 12, 2007 .Dt PIM 4 .Os diff --git a/share/man/man4/pms.4 b/share/man/man4/pms.4 index 05dd7bc09634..bf5a3f450ac7 100644 --- a/share/man/man4/pms.4 +++ b/share/man/man4/pms.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 30, 2015 .Dt PMS 4 .Os diff --git a/share/man/man4/polling.4 b/share/man/man4/polling.4 index eae6170f33b8..2556be2dd5dd 100644 --- a/share/man/man4/polling.4 +++ b/share/man/man4/polling.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 26, 2020 .Dt POLLING 4 .Os diff --git a/share/man/man4/ppbus.4 b/share/man/man4/ppbus.4 index 41810757735c..a52e88006e7d 100644 --- a/share/man/man4/ppbus.4 +++ b/share/man/man4/ppbus.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 1, 1998 .Dt PPBUS 4 .Os diff --git a/share/man/man4/ppc.4 b/share/man/man4/ppc.4 index 9b96625cb6ec..360ed538a0c6 100644 --- a/share/man/man4/ppc.4 +++ b/share/man/man4/ppc.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 5, 1998 .Dt PPC 4 .Os diff --git a/share/man/man4/ppi.4 b/share/man/man4/ppi.4 index a4084ad63648..f812a87c7c22 100644 --- a/share/man/man4/ppi.4 +++ b/share/man/man4/ppi.4 @@ -23,8 +23,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 2, 1998 .Dt PPI 4 .Os diff --git a/share/man/man4/procdesc.4 b/share/man/man4/procdesc.4 index 5252a23eda38..f1f3757aa836 100644 --- a/share/man/man4/procdesc.4 +++ b/share/man/man4/procdesc.4 @@ -27,8 +27,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 15, 2020 .Dt PROCDESC 4 .Os @@ -60,10 +58,10 @@ Given a process descriptor, it is possible to query its conventional PID using .Sh SEE ALSO .Xr fork 2 , .Xr kill 2 , +.Xr kqueue 2 , .Xr pdfork 2 , .Xr pdgetpid 2 , .Xr pdkill 2 , -.Xr kqueue 2 , .Xr wait4 2 , .Xr capsicum 4 .Sh HISTORY diff --git a/share/man/man5/procfs.5 b/share/man/man4/procfs.4 index 37da9cf82e4b..5a588004e37e 100644 --- a/share/man/man5/procfs.5 +++ b/share/man/man4/procfs.4 @@ -1,9 +1,8 @@ -.\" $FreeBSD$ .\" Written by Garrett Wollman .\" This file is in the public domain. .\" -.Dd October 17, 2021 -.Dt PROCFS 5 +.Dd June 23, 2024 +.Dt PROCFS 4 .Os .Sh NAME .Nm procfs @@ -69,7 +68,93 @@ in is only implemented on machines which have distinct general purpose and floating point register sets. .It Pa map -A map of the process' virtual memory. +A collection of lines describing the memory regions of the process, +where each line contains the following fields: +.Bl -tag -compact -width private-resident +.It start-address +The starting address for the region (inclusive). +.It end-address +The ending address for the region (exclusive). +.It resident +The number of resident pages. +.It private-resident +The number of resident pages that were private to the process. +.It obj +The virtual address of the +.Vt struct vm_object +kernel data structure describing the memory region. +.It access +A three character string comprising the characters +.Sq r , +.Sq w +and +.Sq x , +denoting read, write, and execute permissions respectively. +The lack of a permission is represented by +.Sq - . +.It ref_count +The number of references to the region. +.It shadow_count +The number of VM objects that this region is a shadow for. +.It flags +The flags for the object, see the flags named +.Sy OBJ_* +in +.In vm/vm_object.h . +.It copy-on-write +Whether the region is copy-on-write. +One of: +.Bl -tag -compact -width NCOW +.It COW +A copy-on-write region. +.It NCOW +A non-copy-on-write region. +.El +.It needs-copy +Whether the region needs a copy. +One of: +.Bl -tag -compact -width NNC +.It NC +The region needs a copy. +.It NNC +The region does not need a copy. +.El +.It type +The type of the region. +One of: +.Bl -tag -compact -width unknown +.It dead +A region associated with a dead VM object. +.It device +A region backed by device memory. +.It none +A region not backed by anything. +.It phys +A region backed by physical memory. +.It swap +A region backed by swap. +.It unknown +A region of unknown type. +.It vnode +A region backed by a file. +.El +.It fullpath +The path to the file backing the memory region, or +.Sq - +if there is no such file. +.It cred +One of: +.Bl -tag -compact -width NCH +.It CH +The region is being charged to the user specified in the +.Sq charged-uid +field. +.It NCH +The region is not being charged to any user. +.El +.It charged-uid +The UID of the user being charged, or -1 if no user is being charged. +.El .It Pa mem The complete virtual memory image of the process. Only those address which exist in the process can be accessed. @@ -144,11 +229,11 @@ comma separated. .It the wait channel message .It -the process credentials consisting of -the effective user id -and the list of groups (whose first member -is the effective group id) -all comma separated. +the process effective UID +.It +the process real UID +.It +group list, starting with the effective GID, comma-separated .It the hostname of the jail in which the process runs, or .Ql - @@ -168,10 +253,14 @@ directory containing process information for process .Pa pid . .It Pa /proc/curproc directory containing process information for the current process +.It Pa /proc/self +directory containing process information for the current process .It Pa /proc/curproc/cmdline the process executable name .It Pa /proc/curproc/etype executable type +.It Pa /proc/curproc/exe +executable image .It Pa /proc/curproc/file executable image .It Pa /proc/curproc/fpregs @@ -205,6 +294,8 @@ file system on .Xr mount 2 , .Xr sigaction 2 , .Xr unmount 2 , +.Xr kvm 3 , +.Xr libprocstat 3 , .Xr pseudofs 9 .Sh AUTHORS .An -nosplit diff --git a/share/man/man4/proto.4 b/share/man/man4/proto.4 index bd861697c10d..889c07cdef81 100644 --- a/share/man/man4/proto.4 +++ b/share/man/man4/proto.4 @@ -23,8 +23,6 @@ .\" (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 August 7, 2015 .Dt PROTO 4 .Os @@ -247,7 +245,7 @@ in the and .Va virt_size fields. -The number of contigous physical memory segments and the address of the first +The number of contiguous physical memory segments and the address of the first segment are returned in the .Va phys_nsegs and @@ -263,8 +261,8 @@ fields. The behaviour of this operation banks heavily on how .Xr bus_dmamem_alloc 9 is implemented, which means that memory is currently always allocated as a -single contigous region of physical memory. -In practice this also tends to give a single contigous region in bus space. +single contiguous region of physical memory. +In practice this also tends to give a single contiguous region in bus space. This may change over time. .It PROTO_IOC_BUSDMA_MEM_FREE Free previously allocated memory and destroy the memory descriptor. @@ -295,7 +293,7 @@ Destroy the previously created memory descriptor specified by the field. When the memory descriptor is still loaded, it is unloaded first. .It PROTO_IOC_BUSDMA_MD_LOAD -Load a contigous region of memory in the memory descriptor specified by the +Load a contiguous region of memory in the memory descriptor specified by the .Va key field. The size and address in the process' virtual address space are specified diff --git a/share/man/man4/ps4dshock.4 b/share/man/man4/ps4dshock.4 index e2295533989f..282a58c49e63 100644 --- a/share/man/man4/ps4dshock.4 +++ b/share/man/man4/ps4dshock.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 19, 2020 .Dt PS4DSHOCK 4 .Os @@ -100,7 +98,7 @@ does not support force-feedback events. The .Nm driver first appeared in -.Fx 13.0. +.Fx 13.0 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/psm.4 b/share/man/man4/psm.4 index 85d69b905162..50bcf53487a1 100644 --- a/share/man/man4/psm.4 +++ b/share/man/man4/psm.4 @@ -24,8 +24,6 @@ .\" (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 June 2, 2020 .Dt PSM 4 .Os diff --git a/share/man/man4/pst.4 b/share/man/man4/pst.4 index 549757731313..0f23f1450aea 100644 --- a/share/man/man4/pst.4 +++ b/share/man/man4/pst.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 14, 2004 .Dt PST 4 .Os diff --git a/share/man/man4/pt.4 b/share/man/man4/pt.4 index 4400af91a10b..e56c1a61b5cb 100644 --- a/share/man/man4/pt.4 +++ b/share/man/man4/pt.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 2, 1995 .Dt PT 4 .Os diff --git a/share/man/man4/ptnet.4 b/share/man/man4/ptnet.4 index b4a1a537975a..71efb3cddf56 100644 --- a/share/man/man4/ptnet.4 +++ b/share/man/man4/ptnet.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 11, 2018 .Dt PTNET 4 .Os diff --git a/share/man/man4/pts.4 b/share/man/man4/pts.4 index 2008482426ba..de04ca6e5b69 100644 --- a/share/man/man4/pts.4 +++ b/share/man/man4/pts.4 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)pty.4 8.2 (Berkeley) 11/30/93 -.\" $FreeBSD$ -.\" .Dd August 20, 2008 .Dt PTS 4 .Os diff --git a/share/man/man4/pty.4 b/share/man/man4/pty.4 index deceb62ab269..b9c5fce84ff4 100644 --- a/share/man/man4/pty.4 +++ b/share/man/man4/pty.4 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 28, 2019 .Dt PTY 4 .Os diff --git a/share/man/man4/puc.4 b/share/man/man4/puc.4 index eb76c36f4aff..a29376d3f2d5 100644 --- a/share/man/man4/puc.4 +++ b/share/man/man4/puc.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2002 John Hay. .\" All rights reserved. .\" @@ -22,9 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd January 24, 2008 +.Dd June 11, 2025 .Dt PUC 4 .Os .Sh NAME @@ -38,15 +39,245 @@ Communications driver .Cd "device uart" .Cd "device ppc" .Sh DESCRIPTION -This driver acts as a shim to connect PCI serial and parallel ports to the +The +.Nm +driver acts as a shim to connect +PCI multi-port serial and parallel adapters to the .Xr uart 4 and .Xr ppc 4 driver. +.Sh HARDWARE +The +.Nm +driver supports the following +PCI/PCIe multi-port serial and parallel adapters: .Pp -The list of supported devices is in -.Pa sys/dev/puc/pucdata.c . -Support for new cards should be added there. +.Bl -bullet -compact +.It +Advantech 2-port PCI PCI-1602/1603 Rev A/B1 +.It +Applied Micro Circuits PCI 8 Port UART +.It +Avlab Technology PCI IO 2S +.It +Avlab Low Profile PCI 4 Serial +.It +Boca Research PCI Turbo Serial 658/654 +.It +Brainboxes: +.Bl -dash -compact +.It +Instashield PCIe IX-400, IX-200, IX-100 +.It +Instashield PCI IS-400, IS-200 +.It +PX Series PCIe RS232/RS422/RS485/LPT +.It +UC Series Universal PCI RS232/RS422/RS485/LPT +.It +UP Series PCI Dual RS232 +.El +.It +Comtrol RocketPort 550 PCI 16/8/4 port +.It +Decision Computer PCCOM PCI 8/4/2 port +.It +Digi Neo PCIe 4 and 8 Port (with and without RJ45) +.It +Digi Neo PCI 4 and 8 Port +.It +Dolphin Peripherals PCI 4035/4014 +.It +Exar: +.Bl -dash -compact +.It +XR17C/D152 +.It +XR17C154 +.It +XR17C158 +.It +XR17V258IV +.It +XR17V352 +.It +XR17V354 +.It +XR17V358 +.El +.It +Feasso PCI FPP-02 2S1P +.It +HP Diva Serial [GSP] Multiport UART: +.Bl -dash -compact +.It +Tosca Console +.It +Tosca Secondary +.It +Maestro SP2 +.It +Superdome Console +.It +Keystone SP2 +.It +Everest SP2 +.El +.It +I-O DATA RSA-PCI2/R +.It +IBM SurePOS 300 Series (481033H) serial ports +.It +IC Book Labs: +.Bl -dash -compact +.It +Dreadnought x16 Pro/Lite +.It +Ironclad x8 Pro +.It +Gunboat x4 Pro/Lite/Low Profile +.It +Gunboat x2 Low Profile +.El +.It +Kuroutoshikou SERIAL4P-LPPCI2 +.It +Lava Computers: +.Bl -dash -compact +.It +Dual Serial PCI +.It +Quattro-PCIe +.It +Quattro-PCI +.It +Octopus-550 PCI +.El +.It +Moxa Technologies: +.Bl -dash -compact +.It +Smartio CP-102E/PCIe +.It +Smartio CP-102EL/PCIe +.It +Smartio C104H/PCI +.It +Smartio CP-104UL/PCI +.It +Smartio CP-104JU/PCI +.It +Smartio CP-104EL/PCIe +.It +Smartio CP-104EL-A/PCIe +.It +CP-112UL PCI +.It +Industio CP-114 +.It +Smartio CP-114EL/PCIe +.It +Smartio CP-118EL-A/PCIe +.It +C168H/PCI +.It +C168U/PCI +.It +CP-168EL/PCIe +.It +Smartio CP-168EL-A/PCIe +.El +.It +NetMos NM9815 Dual 1284 Printer port PCI +.It +NetMos NM9835 2/1 port UART + 1284 Printer PCI +.It +NetMos NM9845 4/6 port UART + 1284 Printer PCI +.It +NetMos NM9865 4/3/2 port UART + 1/2 port 1284 Printer PCI +.It +Oxford Semiconductor based boards: +.Bl -dash -compact +.It +OX16PCI952 UART (with and without Parallel port) +.It +OX16PCI954 UART +.It +OX9160/OX16PCI954 UARTs +.It +OX16PCI958 UART +.El +.It +Perle Ultraport4 Express PCIe Serial +.It +Perle Speed8/Speed4/Speed2 LE PCI Serial +.It +Quatech: +.Bl -dash -compact +.It +DSC-300/200/100 PCI +.It +DSCLP-300/200/100 PCI +.It +ESC-100/100D/100M PCI +.It +QSC-300/200/100 PCI +.It +QSCLP-100 PCI +.El +.It +SIIG Cyber Series of UART and parallel port boards: +.Bl -dash -compact +.It +Cyber 2S and 2SP1 PCI 16550 +.It +Cyber 4 and 4S PCI 16C650 (10x family and 20x family) +.It +Cyber I/O PCI (10x family and 20x family) +.It +Cyber Parallel Dual PCI (10x family and 20x family) +.It +Cyber Serial Dual PCI (10x family and 20x family) +.It +Cyber 2S1P PCI (10x family and 20x family) +.It +PS8000 8S PCI 16C650 (20x family) +.It +Quartet Serial 850 PCI +.El +.It +Sun 1040 PCI Quad Serial +.It +Sunix MIO5xxxx 4/2/1 port UART and 1284 Printer +.It +Sunix SUN1889/1888 PCI dual port serial +.It +Sunix SER5xxxx 8/4/2 port serial +.It +Syba Tech Ltd PCI-4S2P-550-ECP +.It +Titan PCI-800H/PCI-200H +.It +VScom: +.Bl -dash -compact +.It +PCIex-800H +.It +PCI-200HV2 +.It +200Li uPCI +.It +PCI-800L, PCI-200L, and PCI-100L +.It +PCI-800, PCI-400, and PCI-200 +.El +.El +.Sh FILES +.Bl -tag -width "sys/dev/puc/pucdata.c" +.It Pa sys/dev/puc/pucdata.c +list of supported devices +.El .Sh SEE ALSO .Xr ppc 4 , .Xr uart 4 @@ -55,3 +286,4 @@ This driver took the idea from the .Nx .Nm driver. +It uses a substantial amount of the same data. diff --git a/share/man/man4/pvscsi.4 b/share/man/man4/pvscsi.4 index 1e9b08f10250..19ca6cc555da 100644 --- a/share/man/man4/pvscsi.4 +++ b/share/man/man4/pvscsi.4 @@ -1,8 +1,6 @@ .\" Copyright (c) 2018 VMware, Inc. .\" .\" SPDX-License-Identifier: (BSD-2-Clause OR GPL-2.0) -.\" -.\" $FreeBSD$ .Dd December 5, 2018 .Dt PVSCSI 4 .Os diff --git a/share/man/man4/pwmc.4 b/share/man/man4/pwmc.4 index 06953d671a03..a3d6b1e93cdf 100644 --- a/share/man/man4/pwmc.4 +++ b/share/man/man4/pwmc.4 @@ -22,8 +22,6 @@ .\" (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 June 17, 2019 .Dt PWMC 4 .Os diff --git a/share/man/man4/qat.4 b/share/man/man4/qat.4 index c6082f873a44..613091df2e7e 100644 --- a/share/man/man4/qat.4 +++ b/share/man/man4/qat.4 @@ -1,12 +1,11 @@ .\" SPDX-License-Identifier: BSD-3-Clause -.\" Copyright(c) 2007-2022 Intel Corporation -.\" $FreeBSD$ -.Dd June 30, 2022 +.\" Copyright(c) 2007-2025 Intel Corporation +.Dd June 2, 2025 .Dt QAT 4 .Os .Sh NAME .Nm qat -.Nd Intel (R) QuickAssist Technology (QAT) driver +.Nd Intel QuickAssist Technology driver .Sh SYNOPSIS To load the driver call: .Pp @@ -30,6 +29,8 @@ qat_c62x_fw_load="YES" .It qat_dh895xcc_fw_load="YES" .It +qat_4xxx_fw_load="YES" +.It qat_load="YES" .El .Sh DESCRIPTION @@ -38,9 +39,20 @@ The driver supports cryptography and compression acceleration of the Intel (R) QuickAssist Technology (QAT) devices. .Pp +A complete API for offloading these operations is exposed in the kernel +and may be used by any other entity directly. +In addition to exposing a complete kernel API for +offloading cryptography and compression operations, the +.Nm +driver also integrates with +.Xr crypto 4 , +allowing offloading supported operations to Intel QuickAssist Technology +devices. +.Sh HARDWARE The .Nm -driver is intended for platforms that contain: +driver supports the following Intel QuickAssist Technology Engines: +.Pp .Bl -bullet -compact .It Intel (R) C62x Chipset @@ -53,16 +65,93 @@ Intel (R) QuickAssist Adapter 8960/Intel (R) QuickAssist Adapter 8970 Intel (R) Communications Chipset 8925 to 8955 Series .It Intel (R) Atom P5300 processor product family +.It +Intel (R) QAT 4xxx Series .El -.Pp -The +.Sh SYSCTL_VARIABLES +The following +.Xr sysctl 8 +variables may be used to reconfigure the .Nm -driver supports cryptography and compression acceleration. -A complete API for offloading these operations is exposed in the kernel and may -be used by any other entity directly. -For details of usage and supported operations and algorithms refer to the -following documentation available from -.Lk 01.org : +device. +For configuration persistence those variables may be set before loading +the driver, either via +.Xr kenv 1 +or +.Xr loader.conf 5 . +.Pp +The specific device needs to be in the "down" state +before changing the configuration. +.Bl -tag -width indent +.It Va dev.qat.X.state +Show or set current state of the device. +Possible values: "down", "up". +.Pp +NOTE: If the symmetric services are used for device the +.Sy qat_ocf +driver needs to be disabled prior the device reconfiguration. +.It Va dev.qat_ocf.0.enable +Enable/disable the QAT cryptographic framework connectivity. +Enabled by default. +.It Va dev.qat.X.cfg_services +Override the device services enabled, may be one of: +symmetric, asymmetric, data compression. +Possible values: "sym", "asym", "dc", "sym;dc", "asym;dc", "sym;asym". +Default services configured +are "sym;asym" for even and "dc" for odd devices. +.It Va dev.qat.X.cfg_mode +Override the device mode configuration +for kernel space and user space instances. +Possible values: "ks", "us", "ks;us". +Default value "ks;us". +.It Va dev.qat.X.num_user_processes +Override the number of uio user space processes +that can connect to the QAT device. +Default: 2 +.It Va dev.qat.X.disable_safe_dc_mode +Override history buffer mitigation. +Disabled by default. +If enabled, decompression throughput increases but may result in a data leak if +.Va dev.qat.X.num_user_processes +is more than 1. +Enable this option only if your system is not prone to user data leaks. +.El +.Pp +The following +.Xr sysctl 8 +variables are read-only: +.Bl -tag -width indent +.It Va dev.qat.X.frequency +QAT device frequency value. +.It Va dev.qat.X.mmp_version +QAT MMP Library revision number. +.It Va dev.qat.X.hw_version +QAT hardware revision number. +.It Va dev.qat.X.fw_version +QAT firmware revision number. +.It Va dev.qat.X.dev_cfg +Summary of device specific configuration. +.It Va dev.qat.X.heartbeat +QAT device heartbeat status. +Value '1' indicates that the device is operational. +Value '0' means that the device is not responsive. +Device requires restart. +.It Va dev.qat.X.heartbeat_failed +Number of QAT heartbeat failures received. +.It Va dev.qat.X.heartbeat_sent +Number of QAT heartbeat requests sent. +.El +.Sh SEE ALSO +.Xr crypto 4 , +.Xr ipsec 4 , +.Xr pci 4 , +.Xr crypto 7 , +.Xr crypto 9 +.Pp +For details of usage and supported operations and algorithms refer to +the following documentation available from Intel Download Center +.Lk https://downloadcenter.intel.com : +.Pp .Bl -bullet -compact .It .Rs @@ -85,41 +174,14 @@ following documentation available from .%T QuickAssist Technology Performance Optimization Guide .Re .El -.Pp -In addition to exposing complete kernel API for offloading cryptography and -compression operations, the -.Nm -driver also integrates with -.Xr crypto 4 , -allowing offloading supported cryptography operations to Intel (R) QuickAssist -Technology (QAT) devices. -For details of usage and supported operations and algorithms refer to the -documentation mentioned above and -.Sx SEE ALSO -section. -.Sh COMPATIBILITY -The -.Nm -driver replaced previous implementation introduced in -.Fx 13.0 . -Current version, in addition to -.Xr crypto 4 -integration, supports also data compression and exposes a complete API for -offloading data compression and cryptography operations. -.Sh SEE ALSO -.Xr crypto 4 , -.Xr ipsec 4 , -.Xr pci 4 , -.Xr crypto 7 , -.Xr crypto 9 .Sh HISTORY -This +A .Nm -driver was introduced in -.Fx 14.0 . -.Fx 13.0 included a different version of -.Nm -driver. +driver appeared in +.Fx 13.0 . +It was superseded in +.Fx 14.0 +by the upstream driver. .Sh AUTHORS The .Nm diff --git a/share/man/man4/qat_c2xxx.4 b/share/man/man4/qat_c2xxx.4 index 6f831fe94712..aad0c043e548 100644 --- a/share/man/man4/qat_c2xxx.4 +++ b/share/man/man4/qat_c2xxx.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 21, 2022 .Dt QAT_C2XXX 4 .Os diff --git a/share/man/man4/qlnxe.4 b/share/man/man4/qlnxe.4 index c5846a36d182..f545235ec1ff 100644 --- a/share/man/man4/qlnxe.4 +++ b/share/man/man4/qlnxe.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 9, 2017 .Dt QLNXE 4 .Os diff --git a/share/man/man4/qlxgb.4 b/share/man/man4/qlxgb.4 index c1e87e307d8b..4bf8000d15da 100644 --- a/share/man/man4/qlxgb.4 +++ b/share/man/man4/qlxgb.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 3, 2011 .Dt QLXGB 4 .Os diff --git a/share/man/man4/qlxgbe.4 b/share/man/man4/qlxgbe.4 index 5082829e1dc3..486a5ec0f682 100644 --- a/share/man/man4/qlxgbe.4 +++ b/share/man/man4/qlxgbe.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 1, 2013 .Dt QLXGBE 4 .Os diff --git a/share/man/man4/qlxge.4 b/share/man/man4/qlxge.4 index 2da3a8d68308..4723c56ff68b 100644 --- a/share/man/man4/qlxge.4 +++ b/share/man/man4/qlxge.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 21, 2013 .Dt QLXGE 4 .Os diff --git a/share/man/man4/ral.4 b/share/man/man4/ral.4 index 5b84bea00153..ad385e5f09d6 100644 --- a/share/man/man4/ral.4 +++ b/share/man/man4/ral.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: ISC +.\" .\" Copyright (c) 2005-2010 Damien Bergamini <damien.bergamini@free.fr> .\" .\" Permission to use, copy, modify, and distribute this software for any @@ -12,14 +15,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" -.Dd April 4, 2017 +.Dd November 10, 2024 .Dt RAL 4 .Os .Sh NAME .Nm ral -.Nd "Ralink Technology IEEE 802.11a/g/n wireless network device" +.Nd Ralink Technology IEEE 802.11a/g/n wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -121,7 +122,7 @@ The driver supports PCI/PCIe/CardBus wireless adapters based on Ralink Technology chipsets, including: .Pp -.Bl -column -compact ".Li Atlantis Land A02-PCM-W54" "RT2561S" "CardBus" +.Bl -column -offset indent -compact "Atlantis Land A02-PCM-W54" "RT2561S" "CardBus" .It Em Card Ta Em MAC/BBP Ta Em Bus .It "A-Link WL54H" Ta RT2560 Ta PCI .It "A-Link WL54PC" Ta RT2560 Ta CardBus @@ -214,26 +215,25 @@ chipsets, including: .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): .Pp -.Dl "ifconfig wlan create wlandev ral0 inet 192.168.0.20 netmask 0xffffff00" +.Dl ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Bd -literal -offset indent -ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e - netmask 0xffffff00 ssid my_net +ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 \e + ssid my_net .Ed .Pp Join a specific BSS network with 40-bit WEP encryption: .Bd -literal -offset indent -ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e - netmask 0xffffff00 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 +ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 \e + ssid my_net wepmode on wepkey 0x1234567890 weptxkey 1 .Ed .Pp Join a specific BSS network with 104-bit WEP encryption: .Bd -literal -offset indent -ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e - netmask 0xffffff00 ssid my_net \e +ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 \e + ssid my_net \e wepmode on wepkey 0x01020304050607080910111213 weptxkey 1 .Ed .Sh DIAGNOSTICS @@ -256,6 +256,7 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr wlan_xauth 4 , +.Xr networking 7 , .Xr hostapd 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 diff --git a/share/man/man4/random.4 b/share/man/man4/random.4 index fb851cdb7ba1..840bc0c3234b 100644 --- a/share/man/man4/random.4 +++ b/share/man/man4/random.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 19, 2019 .Dt RANDOM 4 .Os diff --git a/share/man/man4/rccgpio.4 b/share/man/man4/rccgpio.4 index 6c7bc7871b03..f790b003d862 100644 --- a/share/man/man4/rccgpio.4 +++ b/share/man/man4/rccgpio.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 18, 2015 .Dt RCCGPIO 4 .Os diff --git a/share/man/man4/rctl.4 b/share/man/man4/rctl.4 index 52e10994e045..12f0a8374a51 100644 --- a/share/man/man4/rctl.4 +++ b/share/man/man4/rctl.4 @@ -20,8 +20,6 @@ .\" 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 May 28, 2017 .Dt RCTL 4 .Os diff --git a/share/man/man4/re.4 b/share/man/man4/re.4 index 9b54c0c1f20b..ac33aa4c4e3c 100644 --- a/share/man/man4/re.4 +++ b/share/man/man4/re.4 @@ -28,9 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd September 21, 2016 +.Dd November 7, 2022 .Dt RE 4 .Os .Sh NAME @@ -285,3 +283,6 @@ avoid this problem. .Pp The RealTek 8169, 8169S and 8110S chips appear to only be capable of transmitting jumbo frames up to 7.5K in size. +.Pp +If this driver is causing problems then an updated driver from +the vendor can be found in ports under net/realtek-re-kmod. diff --git a/share/man/man4/rgephy.4 b/share/man/man4/rgephy.4 index f66856be05fc..2cc655aacb18 100644 --- a/share/man/man4/rgephy.4 +++ b/share/man/man4/rgephy.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 16, 2011 .Dt RGEPHY 4 .Os diff --git a/share/man/man4/rights.4 b/share/man/man4/rights.4 index 5334f3fc3c67..8f5f6ad9c2d2 100644 --- a/share/man/man4/rights.4 +++ b/share/man/man4/rights.4 @@ -30,9 +30,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd February 28, 2019 +.Dd May 22, 2025 .Dt RIGHTS 4 .Os .Sh NAME @@ -40,20 +38,22 @@ .Nd Capsicum capability rights for file descriptors .Sh DESCRIPTION When a file descriptor is created by a function such as -.Xr accept 2 , -.Xr accept4 2 , .Xr fhopen 2 , .Xr kqueue 2 , .Xr mq_open 2 , .Xr open 2 , -.Xr openat 2 , .Xr pdfork 2 , .Xr pipe 2 , .Xr shm_open 2 , .Xr socket 2 or .Xr socketpair 2 , -it is assigned all capability rights. +it is assigned all capability rights; for +.Xr accept 2 , +.Xr accept4 2 +or +.Xr openat 2 , +it inherits capability rights from the "parent" file descriptor. Those rights can be reduced (but never expanded) by using the .Xr cap_rights_limit 2 , .Xr cap_fcntls_limit 2 and @@ -70,7 +70,12 @@ The .Xr cap_rights_init 3 family of functions should be used to manage the structure. .Sh RIGHTS -The following rights may be specified in a rights mask: +Note that rights are not simple bitmasks (and cannot be bitwise-ORed together). +See +.Xr cap_rights_init 3 +for details. +.Pp +The following rights are available: .Bl -tag -width CAP_RENAMEAT_SOURCE .It Dv CAP_ACCEPT Permit @@ -204,6 +209,9 @@ An alias to .Dv CAP_FCHOWN and .Dv CAP_LOOKUP . +.It Dv CAP_FCHROOT +Permit +.Xr fchroot 2 . .It Dv CAP_FCNTL Permit .Xr fcntl 2 . @@ -311,6 +319,14 @@ Permit .It Dv CAP_GETSOCKOPT Permit .Xr getsockopt 2 . +.It Dv CAP_INOTIFY_ADD +Permit +.Xr inotify_add_watch 2 +and +.Xr inotify_add_watch_at 2 . +.It Dv CAP_INOTIFY_RM +Permit +.Xr inotify_rm_watch 2 . .It Dv CAP_IOCTL Permit .Xr ioctl 2 . @@ -498,7 +514,10 @@ with the is also required), .Xr preadv 2 .Dv ( CAP_SEEK -is also required) and related system calls. +is also required), +.Xr getdents 2 , +.Xr getdirentries 2 , +and related system calls. .It Dv CAP_RECV An alias to .Dv CAP_READ . @@ -608,6 +627,8 @@ with the .Dv O_WRONLY flag, but without the .Dv O_APPEND +or +.Dv O_TRUNC flag, .Dv CAP_SEEK is also required. @@ -654,6 +675,8 @@ is also required. .Xr fsync 2 , .Xr ftruncate 2 , .Xr futimes 2 , +.Xr getdents 2 , +.Xr getdirentries 2 , .Xr getpeername 2 , .Xr getsockname 2 , .Xr getsockopt 2 , diff --git a/share/man/man4/rl.4 b/share/man/man4/rl.4 index 8fa7b251fabd..9323e046a5e1 100644 --- a/share/man/man4/rl.4 +++ b/share/man/man4/rl.4 @@ -28,8 +28,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 16, 2013 .Dt RL 4 .Os diff --git a/share/man/man4/rndtest.4 b/share/man/man4/rndtest.4 index fd69ee8245c5..9ed16caf3b87 100644 --- a/share/man/man4/rndtest.4 +++ b/share/man/man4/rndtest.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 11, 2020 .Dt RNDTEST 4 .Os diff --git a/share/man/man4/route.4 b/share/man/man4/route.4 index f20e90dbd75a..5096c2784a12 100644 --- a/share/man/man4/route.4 +++ b/share/man/man4/route.4 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" From: @(#)route.4 8.6 (Berkeley) 4/19/94 -.\" $FreeBSD$ -.\" .Dd November 4, 2004 .Dt ROUTE 4 .Os diff --git a/share/man/man4/rsu.4 b/share/man/man4/rsu.4 index 1d38c4a1618d..1c4f9774ea53 100644 --- a/share/man/man4/rsu.4 +++ b/share/man/man4/rsu.4 @@ -1,5 +1,7 @@ +.\"- +.\" SPDX-License-Identifier: ISC +.\" .\" $OpenBSD: rsu.4,v 1.11 2013/02/14 07:40:42 jmc Exp $ -.\" $FreeBSD$ .\" .\" Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr> .\" @@ -15,12 +17,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd May 23, 2021 +.Dd April 1, 2025 .Dt RSU 4 .Os .Sh NAME .Nm rsu -.Nd Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n wireless network device +.Nd Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -94,8 +96,48 @@ The .Nm driver can be configured at runtime with .Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver provides support for Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n +wireless network adapters, including: +.Pp +.Bl -bullet -offset indent -compact +.It +ASUS USB-N10 +.It +ASUS WL-167G V3 +.It +Belkin F7D1101 v1 +.It +D-Link DWA-131 A1 +.It +EDUP EP-MS150N(W) +.It +Edimax EW-7622UMN +.It +Hercules HWGUn-54 +.It +Hercules HWNUm-300 +.It +Planex GW-USNano +.It +Sitecom WL-349 v1 +.It +Sitecom WL-353 +.It +Sitecom WLA-1100 v1001 +.It +Sweex LW154 +.It +TRENDnet TEW-646UBH +.It +TRENDnet TEW-648UB +.It +TRENDnet TEW-649UB +.El .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/realtek.LICENSE" -compact +.Bl -tag -width "/usr/share/doc/legal/realtek.LICENSE" -compact .It Pa /usr/share/doc/legal/realtek.LICENSE .Nm firmware license @@ -107,45 +149,20 @@ which is loaded when an interface is attached: .Bl -tag -width Ds -offset indent -compact .It Pa /boot/kernel/rsu-rtl8712fw.ko .El -.Sh HARDWARE -The -.Nm -driver provices support for Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n -wireless network adapters, including: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It ASUS USB-N10 -.It ASUS WL-167G V3 -.It Belkin F7D1101 v1 -.It D-Link DWA-131 A1 -.It EDUP EP-MS150N(W) -.It Edimax EW-7622UMN -.It Hercules HWGUn-54 -.It Hercules HWNUm-300 -.It Planex GW-USNano -.It Sitecom WL-349 v1 -.It Sitecom WL-353 -.It Sweex LW154 -.It TRENDnet TEW-646UBH -.It TRENDnet TEW-648UB -.It TRENDnet TEW-649UB -.El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev rsu0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev rsu0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev rsu0 ssid my_net up" +.Dl ifconfig wlan create wlandev rsu0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev rsu0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Sh DIAGNOSTICS .Bl -diag @@ -164,6 +181,7 @@ This should not happen. .Xr rsufw 4 , .Xr usb 4 , .Xr wlan 4 , +.Xr networking 7 , .Xr arp 8 , .Xr hostapd 8 , .Xr ifconfig 8 , diff --git a/share/man/man4/rsufw.4 b/share/man/man4/rsufw.4 index ef282ec8a0c0..f80891ea18fc 100644 --- a/share/man/man4/rsufw.4 +++ b/share/man/man4/rsufw.4 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Copyright (c) 2013 Idwer Vollering <vidwer@gmail.com> .\" .\" Permission to use, copy, modify, and distribute this software for any diff --git a/share/man/man4/rtnetlink.4 b/share/man/man4/rtnetlink.4 new file mode 100644 index 000000000000..83521b50c9b5 --- /dev/null +++ b/share/man/man4/rtnetlink.4 @@ -0,0 +1,539 @@ +.\" +.\" Copyright (C) 2022 Alexander Chernikov <melifaro@FreeBSD.org>. +.\" +.\" 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. +.\" +.Dd November 1, 2022 +.Dt RTNETLINK 4 +.Os +.Sh NAME +.Nm RTNetlink +.Nd Network configuration-specific Netlink family +.Sh SYNOPSIS +.In netlink/netlink.h +.In netlink/netlink_route.h +.Ft int +.Fn socket AF_NETLINK SOCK_RAW NETLINK_ROUTE +.Sh DESCRIPTION +The +.Dv NETLINK_ROUTE +family aims to be the primary configuration mechanism for all +network-related tasks. +Currently it supports configuring interfaces, interface addresses, routes, +nexthops and arp/ndp neighbors. +.Sh ROUTES +All route configuration messages share the common header: +.Bd -literal +struct rtmsg { + unsigned char rtm_family; /* address family */ + unsigned char rtm_dst_len; /* Prefix length */ + unsigned char rtm_src_len; /* Deprecated, set to 0 */ + unsigned char rtm_tos; /* Type of service (not used) */ + unsigned char rtm_table; /* deprecated, set to 0 */ + unsigned char rtm_protocol; /* Routing protocol id (RTPROT_) */ + unsigned char rtm_scope; /* Route distance (RT_SCOPE_) */ + unsigned char rtm_type; /* Route type (RTN_) */ + unsigned rtm_flags; /* Route flags (not supported) */ +}; +.Ed +.Pp +The +.Va rtm_family +specifies the route family to be operated on. +Currently, +.Dv AF_INET6 +and +.Dv AF_INET +are the only supported families. +The route prefix length is stored in +.Va rtm_dst_len +. +The caller should set the originator identity (one of the +.Dv RTPROT_ +values) in +.Va rtm_protocol +. +It is useful for users and for the application itself, allowing for easy +identification of self-originated routes. +The route scope has to be set via +.Va rtm_scope +field. +The supported values are: +.Bd -literal -offset indent -compact +RT_SCOPE_UNIVERSE Global scope +RT_SCOPE_LINK Link scope +.Ed +.Pp +Route type needs to be set. +The defined values are: +.Bd -literal -offset indent -compact +RTN_UNICAST Unicast route +RTN_MULTICAST Multicast route +RTN_BLACKHOLE Drops traffic towards destination +RTN_PROHIBIT Drops traffic and sends reject +.Ed +.Pp +The following messages are supported: +.Ss RTM_NEWROUTE +Adds a new route. +All NL flags are supported. +Extending a multipath route requires NLM_F_APPEND flag. +.Ss RTM_DELROUTE +Tries to delete a route. +The route is specified using a combination of +.Dv RTA_DST +TLV and +.Va rtm_dst_len . +.Ss RTM_GETROUTE +Fetches a single route or all routes in the current VNET, depending on the +.Dv NLM_F_DUMP +flag. +Each route is reported as +.Dv RTM_NEWROUTE +message. +The following filters are recognised by the kernel: +.Pp +.Bd -literal -offset indent -compact +rtm_family required family or AF_UNSPEC +RTA_TABLE fib number or RT_TABLE_UNSPEC to return all fibs +.Ed +.Ss TLVs +.Bl -tag -width indent +.It Dv RTA_DST +(binary) IPv4/IPv6 address, depending on the +.Va rtm_family . +.It Dv RTA_OIF +(uint32_t) transmit interface index. +.It Dv RTA_GATEWAY +(binary) IPv4/IPv6 gateway address, depending on the +.Va rtm_family . +.It Dv RTA_METRICS +(nested) Container attribute, listing route properties. +The only supported sub-attribute is +.Dv RTAX_MTU , which stores path MTU as uint32_t. +.It Dv RTA_MULTIPATH +This attribute contains multipath route nexthops with their weights. +These nexthops are represented as a sequence of +.Va rtnexthop +structures, each followed by +.Dv RTA_GATEWAY +or +.Dv RTA_VIA +attributes. +.Bd -literal +struct rtnexthop { + unsigned short rtnh_len; + unsigned char rtnh_flags; + unsigned char rtnh_hops; /* nexthop weight */ + int rtnh_ifindex; +}; +.Ed +.Pp +The +.Va rtnh_len +field specifies the total nexthop info length, including both +.Va struct rtnexthop +and the following TLVs. +The +.Va rtnh_hops +field stores relative nexthop weight, used for load balancing between group +members. +The +.Va rtnh_ifindex +field contains the index of the transmit interface. +.Pp +The following TLVs can follow the structure: +.Bd -literal -offset indent -compact +RTA_GATEWAY IPv4/IPv6 nexthop address of the gateway +RTA_VIA IPv6 nexthop address for IPv4 route +RTA_KNH_ID Kernel-specific index of the nexthop +.Ed +.It Dv RTA_KNH_ID +(uint32_t) (FreeBSD-specific) Auto-allocated kernel index of the nexthop. +.It Dv RTA_RTFLAGS +(uint32_t) (FreeBSD-specific) rtsock route flags. +.It Dv RTA_TABLE +(uint32_t) Fib number of the route. +Default route table is +.Dv RT_TABLE_MAIN . +To explicitly specify "all tables" one needs to set the value to +.Dv RT_TABLE_UNSPEC . +.It Dv RTA_EXPIRES +(uint32_t) seconds till path expiration. +.It Dv RTA_NH_ID +(uint32_t) useland nexthop or nexthop group index. +.El +.Ss Groups +The following groups are defined: +.Bd -literal -offset indent -compact +RTNLGRP_IPV4_ROUTE Notifies on IPv4 route arrival/removal/change +RTNLGRP_IPV6_ROUTE Notifies on IPv6 route arrival/removal/change +.Ed +.Sh NEXTHOPS +All nexthop/nexthop group configuration messages share the common header: +.Bd -literal +struct nhmsg { + unsigned char nh_family; /* transport family */ + unsigned char nh_scope; /* ignored on RX, filled by kernel */ + unsigned char nh_protocol; /* Routing protocol that installed nh */ + unsigned char resvd; + unsigned int nh_flags; /* RTNH_F_* flags from route.h */ +}; +.Ed +The +.Va nh_family +specifies the gateway address family. +It can be different from route address family for IPv4 routes with IPv6 +nexthops. +The +.Va nh_protocol +is similar to +.Va rtm_protocol +field, which designates originator application identity. +.Pp +The following messages are supported: +.Ss RTM_NEWNEXTHOP +Creates a new nexthop or nexthop group. +.Ss RTM_DELNEXTHOP +Deletes nexthop or nexthhop group. +The required object is specified by the +.Dv RTA_NH_ID +attribute. +.Ss RTM_GETNEXTHOP +Fetches a single nexthop or all nexthops/nexthop groups, depending on the +.Dv NLM_F_DUMP +flag. +The following filters are recognised by the kernel: +.Pp +.Bd -literal -offset indent -compact +RTA_NH_ID nexthop or nexthtop group id +NHA_GROUPS match only nexthtop groups +.Ed +.Ss TLVs +.Bl -tag -width indent +.It Dv RTA_NH_ID +(uint32_t) Nexthhop index used to identify particular nexthop or nexthop group. +Should be provided by userland at the nexthtop creation time. +.It Dv NHA_GROUP +This attribute designates the nexthtop group and contains all of its nexthtops +and their relative weights. +The attribute consists of a list of +.Va nexthop_grp +structures: +.Bd -literal +struct nexthop_grp { + uint32_t id; /* nexhop userland index */ + uint8_t weight; /* weight of this nexthop */ + uint8_t resvd1; + uint16_t resvd2; +}; +.Ed +.It Dv NHA_GROUP_TYPE +(uint16_t) Nexthtop group type, set to one of the following types: +.Bd -literal -offset indent -compact +NEXTHOP_GRP_TYPE_MPATH default multipath group +.Ed +.It Dv NHA_BLACKHOLE +(flag) Marks the nexthtop as blackhole. +.It Dv NHA_OIF +(uint32_t) Transmit interface index of the nexthtop. +.It Dv NHA_GATEWAY +(binary) IPv4/IPv6 gateway address +.It Dv NHA_GROUPS +(flag) Matches nexthtop groups during dump. +.El +.Ss Groups +The following groups are defined: +.Bd -literal -offset indent -compact +RTNLGRP_NEXTHOP Notifies on nexthop/groups arrival/removal/change +.Ed +.Sh INTERFACES +All interface configuration messages share the common header: +.Bd -literal +struct ifinfomsg { + unsigned char ifi_family; /* not used, set to 0 */ + unsigned char __ifi_pad; + unsigned short ifi_type; /* ARPHRD_* */ + int ifi_index; /* Interface index */ + unsigned ifi_flags; /* IFF_* flags */ + unsigned ifi_change; /* IFF_* change mask */ +}; +.Ed +.Ss RTM_NEWLINK +Creates a new interface. +The only mandatory TLV is +.Dv IFLA_IFNAME . +The following attributes are returned inside the nested +.Dv NLMSGERR_ATTR_COOKIE : +.Pp +.Bd -literal -offset indent -compact +IFLA_NEW_IFINDEX (uint32) created interface index +IFLA_IFNAME (string) created interface name +.Ed +.Ss RTM_DELLINK +Deletes the interface specified by +.Dv IFLA_IFNAME . +.Ss RTM_GETLINK +Fetches a single interface or all interfaces in the current VNET, depending on the +.Dv NLM_F_DUMP +flag. +Each interface is reported as a +.Dv RTM_NEWLINK +message. +The following filters are recognised by the kernel: +.Pp +.Bd -literal -offset indent -compact +ifi_index interface index +IFLA_IFNAME interface name +IFLA_ALT_IFNAME interface name +.Ed +.Ss TLVs +.Bl -tag -width indent +.It Dv IFLA_ADDRESS +(binary) Llink-level interface address (MAC). +.It Dv IFLA_BROADCAST +(binary) (readonly) Link-level broadcast address. +.It Dv IFLA_IFNAME +(string) New interface name. +.It Dv IFLA_IFALIAS +(string) Interface description. +.It Dv IFLA_LINK +(uint32_t) (readonly) Interface index. +.It Dv IFLA_MASTER +(uint32_t) Parent interface index. +.It Dv IFLA_LINKINFO +(nested) Interface type-specific attributes: +.Bd -literal -offset indent -compact +IFLA_INFO_KIND (string) interface type ("vlan") +IFLA_INFO_DATA (nested) custom attributes +.Ed +The following types and attributes are supported: +.Bl -tag -width indent +.It Dv vlan +.Bd -literal -offset indent -compact +IFLA_VLAN_ID (uint16_t) 802.1Q vlan id +IFLA_VLAN_PROTOCOL (uint16_t) Protocol: ETHERTYPE_VLAN or ETHERTYPE_QINQ +.Ed +.El +.It Dv IFLA_OPERSTATE +(uint8_t) Interface operational state per RFC 2863. +Can be one of the following: +.Bd -literal -offset indent -compact +IF_OPER_UNKNOWN status can not be determined +IF_OPER_NOTPRESENT some (hardware) component not present +IF_OPER_DOWN down +IF_OPER_LOWERLAYERDOWN some lower-level interface is down +IF_OPER_TESTING in some test mode +IF_OPER_DORMANT "up" but waiting for some condition (802.1X) +IF_OPER_UP ready to pass packets +.Ed +.It Dv IFLA_STATS64 +(readonly) Consists of the following 64-bit counters structure: +.Bd -literal +struct rtnl_link_stats64 { + uint64_t rx_packets; /* total RX packets (IFCOUNTER_IPACKETS) */ + uint64_t tx_packets; /* total TX packets (IFCOUNTER_OPACKETS) */ + uint64_t rx_bytes; /* total RX bytes (IFCOUNTER_IBYTES) */ + uint64_t tx_bytes; /* total TX bytes (IFCOUNTER_OBYTES) */ + uint64_t rx_errors; /* RX errors (IFCOUNTER_IERRORS) */ + uint64_t tx_errors; /* RX errors (IFCOUNTER_OERRORS) */ + uint64_t rx_dropped; /* RX drop (no space in ring/no bufs) (IFCOUNTER_IQDROPS) */ + uint64_t tx_dropped; /* TX drop (IFCOUNTER_OQDROPS) */ + uint64_t multicast; /* RX multicast packets (IFCOUNTER_IMCASTS) */ + uint64_t collisions; /* not supported */ + uint64_t rx_length_errors; /* not supported */ + uint64_t rx_over_errors; /* not supported */ + uint64_t rx_crc_errors; /* not supported */ + uint64_t rx_frame_errors; /* not supported */ + uint64_t rx_fifo_errors; /* not supported */ + uint64_t rx_missed_errors; /* not supported */ + uint64_t tx_aborted_errors; /* not supported */ + uint64_t tx_carrier_errors; /* not supported */ + uint64_t tx_fifo_errors; /* not supported */ + uint64_t tx_heartbeat_errors; /* not supported */ + uint64_t tx_window_errors; /* not supported */ + uint64_t rx_compressed; /* not supported */ + uint64_t tx_compressed; /* not supported */ + uint64_t rx_nohandler; /* dropped due to no proto handler (IFCOUNTER_NOPROTO) */ +}; +.Ed +.El +.Ss Groups +The following groups are defined: +.Bd -literal -offset indent -compact +RTNLGRP_LINK Notifies on interface arrival/removal/change +.Ed +.Sh INTERFACE ADDRESSES +All interface address configuration messages share the common header: +.Bd -literal +struct ifaddrmsg { + uint8_t ifa_family; /* Address family */ + uint8_t ifa_prefixlen; /* Prefix length */ + uint8_t ifa_flags; /* Address-specific flags */ + uint8_t ifa_scope; /* Address scope */ + uint32_t ifa_index; /* Link ifindex */ +}; +.Ed +.Pp +The +.Va ifa_family +specifies the address family of the interface address. +The +.Va ifa_prefixlen +specifies the prefix length if applicable for the address family. +The +.Va ifa_index +specifies the interface index of the target interface. +.Ss RTM_NEWADDR +Not supported +.Ss RTM_DELADDR +Not supported +.Ss RTM_GETADDR +Fetches interface addresses in the current VNET matching conditions. +Each address is reported as a +.Dv RTM_NEWADDR +message. +The following filters are recognised by the kernel: +.Pp +.Bd -literal -offset indent -compact +ifa_family required family or AF_UNSPEC +ifa_index matching interface index or 0 +.Ed +.Ss TLVs +.Bl -tag -width indent +.It Dv IFA_ADDRESS +(binary) masked interface address or destination address for p2p interfaces. +.It Dv IFA_LOCAL +(binary) local interface address. +Set for IPv4 and p2p addresses. +.It Dv IFA_LABEL +(string) interface name. +.It Dv IFA_BROADCAST +(binary) broadcast interface address. +.El +.Ss Groups +The following groups are defined: +.Bd -literal -offset indent -compact +RTNLGRP_IPV4_IFADDR Notifies on IPv4 ifaddr arrival/removal/change +RTNLGRP_IPV6_IFADDR Notifies on IPv6 ifaddr arrival/removal/change +.Ed +.Sh NEIGHBORS +All neighbor configuration messages share the common header: +.Bd -literal +struct ndmsg { + uint8_t ndm_family; + uint8_t ndm_pad1; + uint16_t ndm_pad2; + int32_t ndm_ifindex; + uint16_t ndm_state; + uint8_t ndm_flags; + uint8_t ndm_type; +}; +.Ed +.Pp +The +.Va ndm_family +field specifies the address family (IPv4 or IPv6) of the neighbor. +The +.Va ndm_ifindex +specifies the interface to operate on. +The +.Va ndm_state +represents the entry state according to the neighbor model. +The state can be one of the following: +.Bd -literal -offset indent -compact +NUD_INCOMPLETE No lladdr, address resolution in progress +NUD_REACHABLE reachable & recently resolved +NUD_STALE has lladdr but it's stale +NUD_DELAY has lladdr, is stale, probes delayed +NUD_PROBE has lladdr, is stale, probes sent +NUD_FAILED unused +.Ed +.Pp +The +.Va ndm_flags +field stores the options specific to this entry. +Available flags: +.Bd -literal -offset indent -compact +NTF_SELF local station (LLE_IFADDR) +NTF_PROXY proxy entry (LLE_PUB) +NTF_STICKY permanent entry (LLE_STATIC) +NTF_ROUTER dst indicated itself as a router +.Ed +.Ss RTM_NEWNEIGH +Creates new neighbor entry. +The mandatory options are +.Dv NDA_DST , +.Dv NDA_LLADDR +and +.Dv NDA_IFINDEX . +.Ss RTM_DELNEIGH +Deletes the neighbor entry. +The entry is specified by the combination of +.Dv NDA_DST +and +.Dv NDA_IFINDEX . +.Ss RTM_GETNEIGH +Fetches a single neighbor or all neighbors in the current VNET, depending on the +.Dv NLM_F_DUMP +flag. +Each entry is reported as +.Dv RTM_NEWNEIGH +message. +The following filters are recognised by the kernel: +.Pp +.Bd -literal -offset indent -compact +ndm_family required family or AF_UNSPEC +ndm_ifindex target ifindex +NDA_IFINDEX target ifindex +.Ed +.Ss TLVs +.Bl -tag -width indent +.It Dv NDA_DST +(binary) neighbor IPv4/IPv6 address. +.It Dv NDA_LLADDR +(binary) neighbor link-level address. +.It Dv NDA_IFINDEX +(uint32_t) interface index. +.It Dv NDA_FLAGS_EXT +(uint32_t) extended version of +.Va ndm_flags . +.El +.Ss Groups +The following groups are defined: +.Bd -literal -offset indent -compact +RTNLGRP_NEIGH Notifies on ARP/NDP neighbor arrival/removal/change +.Ed +.Sh SEE ALSO +.Xr netlink 4 , +.Xr route 4 +.Sh HISTORY +The +.Dv NETLINK_ROUTE +protocol family appeared in +.Fx 13.2 . +.Sh AUTHORS +The netlink was implemented by +.An -nosplit +.An Alexander Chernikov Aq Mt melifaro@FreeBSD.org . +It was derived from the Google Summer of Code 2021 project by +.An Ng Peng Nam Sean . diff --git a/share/man/man4/rtsx.4 b/share/man/man4/rtsx.4 index 61894b84e3e5..69de84c6d707 100644 --- a/share/man/man4/rtsx.4 +++ b/share/man/man4/rtsx.4 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2020 Henri Hennebert <hlh@restart.be> .\" All rights reserved. .\" @@ -22,9 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 26, 2022 +.Dd May 26, 2025 .Dt RTSX 4 .Os .Sh NAME @@ -55,8 +55,7 @@ Driver attaches mmc bus on card insertion and detaches it on card removing. .Sh HARDWARE The .Nm -driver supports different specification compatible chips. -The following chips have been verified to work: +driver supports the following Realtek SD card readers: .Pp .Bl -bullet -compact .It @@ -73,17 +72,12 @@ RTS525A RTS5260 .It RTL8411B -.El -.Pp -It should also work for: -.Pp -.Bl -bullet -compact .It -RTS5249 +RTS5249 (unverified) .It -RTL8402 +RTL8402 (unverified) .It -RTL8411 +RTL8411 (unverified) .El .Sh SEE ALSO .Xr mmc 4 , @@ -95,7 +89,9 @@ RTL8411 .Sh HISTORY The .Nm -driver was ported from +driver appeared in +.Fx 13.0 +and was ported from .Ox with modifications found in Linux and .Nx . diff --git a/share/man/man4/rtw88.4 b/share/man/man4/rtw88.4 index 4508ab8ab4f7..4c2cba8311ae 100644 --- a/share/man/man4/rtw88.4 +++ b/share/man/man4/rtw88.4 @@ -1,31 +1,10 @@ .\"- -.\" Copyright (c) 2022 Bjoern A. Zeeb +.\" SPDX-License-Identifier: BSD-2-Clause .\" -.\" 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. +.\" Copyright (c) 2022-2025 Bjoern A. Zeeb .\" -.\" 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 August 7, 2022 -.Dt rtw88 4 +.Dd June 13, 2025 +.Dt RTW88 4 .Os .Sh NAME .Nm rtw88 @@ -44,40 +23,53 @@ to manually load the driver as a module at boot time: kld_list="${kld_list} if_rtw88" .Ed .Pp -The driver should automatically load any -.Xr rtw88fw 4 -firmware needed for the particular chipset. -.Pp -It is discouraged to load the driver from +It is not possible to load the driver from .Xr loader 8 . .Sh DESCRIPTION The .Nm -driver is derived from Realtek's Linux rtw88 driver and provides support for -the following chipsets: +driver is derived from Realtek's Linux rtw88 driver. .Pp -.Bl -tag -width Ds -offset indent -compact -.It Realtek 802.11n wireless 8723de (RTL8723DE) -.It Realtek 802.11ac wireless 8821ce (RTL8821CE) -.It Realtek 802.11ac wireless 8822be (RTL8822BE) -.It Realtek 802.11ac wireless 8822ce (RTL8822CE) -.El +This driver requires firmware to be loaded before it will work. +The package +.Pa wifi-firmware-rtw88-kmod +from the +.Pa ports/net/wifi-firmware-rtw88-kmod +port needs to be installed before the driver is loaded. +Otherwise no +.Xr wlan 4 +interface can be created using +.Xr ifconfig 8 . +One can use +.Xr fwget 8 +to install the correct firmware package. .Pp The driver uses the .\" No LinuxKPI man pages so no .Xr here. -.Em linuxkpi_wlan +.Sy linuxkpi_wlan and -.Em linuxkpi +.Sy linuxkpi compat framework to bridge between the Linux and -native FreeBSD driver code as well as to the native +native +.Fx +driver code as well as to the native .Xr net80211 4 wireless stack. -.Pp -While +.Sh HARDWARE +The .Nm -supports all 802.11 a/b/g/n and ac -the compatibility code currently only supports 802.11 a/b/g modes. -Support for 802.11 n/ac is to come. +driver supports PCIe devices with the following chipsets: +.Pp +.Bl -bullet -offset indent -compact +.It +Realtek 802.11n wireless 8723de (RTL8723DE) +.It +Realtek 802.11ac wireless 8821ce (RTL8821CE) +.It +Realtek 802.11ac wireless 8822be (RTL8822BE) +.It +Realtek 802.11ac wireless 8822ce (RTL8822CE) +.El .Sh LOADER TUNABLES .Bl -tag -width indent .It Va compat.linuxkpi.skb.mem_limit @@ -91,21 +83,29 @@ This tunable will work around a problem with DMA and limit allocations for network buffer memory to the lower 32bit of physical memory and make the driver work. .El -.Sh BUGS -Certainly. -.Pp -Does not seem to work (reliably) on machines with more than 4GB of -main memory. -See in the -.Sx LOADER TUNABLES -section above. .Sh SEE ALSO .Xr rtw88fw 4 , .Xr wlan 4 , +.Xr networking 7 , +.Xr fwget 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh HISTORY The .Nm driver first appeared in -.Fx 14.0 . +.Fx 13.2 . +.Sh BUGS +Certainly. +.Pp +Does not seem to work (reliably) on machines with more than 4GB of +main memory. +See in the +.Sx LOADER TUNABLES +section above. +.Pp +While +.Nm +supports 802.11a/b/g/n/ac modes, +the compatibility code currently only supports 802.11a/b/g modes. +Support for 802.11n/ac is yet to come. diff --git a/share/man/man4/rtw89.4 b/share/man/man4/rtw89.4 new file mode 100644 index 000000000000..8c7132673db5 --- /dev/null +++ b/share/man/man4/rtw89.4 @@ -0,0 +1,112 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023-2025 Bjoern A. Zeeb +.\" +.Dd June 13, 2025 +.Dt RTW89 4 +.Os +.Sh NAME +.Nm rtw89 +.Nd Realtek IEEE 802.11ax wireless network driver +.Sh SYNOPSIS +The driver will auto-load without any user interaction using +.Xr devmatch 8 +if enabled in +.Xr rc.conf 5 . +.Pp +Only if auto-loading is explicitly disabled, place the following +lines in +.Xr rc.conf 5 +to manually load the driver as a module at boot time: +.Bd -literal -offset indent +kld_list="${kld_list} if_rtw89" +.Ed +.Pp +It is not possible to load the driver from +.Xr loader 8 . +.Sh DESCRIPTION +The +.Nm +driver is derived from Realtek's Linux rtw89 driver. +.Pp +This driver requires firmware to be loaded before it will work. +The package +.Pa wifi-firmware-rtw89-kmod +from the +.Pa ports/net/wifi-firmware-rtw89-kmod +port needs to be installed before the driver is loaded. +Otherwise no +.Xr wlan 4 +interface can be created using +.Xr ifconfig 8 . +One should use +.Xr fwget 8 +to install the correct firmware package. +.Pp +The driver uses the +.\" No LinuxKPI man pages so no .Xr here. +.Sy linuxkpi_wlan +and +.Sy linuxkpi +compat framework to bridge between the Linux and +native +.Fx +driver code as well as to the native +.Xr net80211 4 +wireless stack. +.Sh HARDWARE +The +.Nm +driver supports PCIe devices with the following chipsets: +.Pp +.Bl -bullet -offset indent -compact +.It +Realtek 8851BE Wi-Fi 6 (RTL8851BE) +.It +Realtek 8852AE Wi-Fi 6 (RTL8852AE) +.It +Realtek 8852BE Wi-Fi 6 (RTL8852BE) +.It +Realtek 8852CE Wi-Fi 6E (RTL8852CE) +.It +Realtek 8922AE Wi-Fi 7 (RTL8922AE) +.El +.Sh LOADER TUNABLES +.Bl -tag -width indent +.It Va compat.linuxkpi.skb.mem_limit +If you are running a 64bit system with more than 4GB of main memory +you need to set this tunable to +.Sy 1 +in +.Xr loader.conf 5 +and reboot once to make it effective. +This tunable will work around a problem with DMA and limit allocations +for network buffer memory to the lower 32bit of physical memory and +make the driver work. +.El +.Sh SEE ALSO +.Xr wlan 4 , +.Xr networking 7 , +.Xr fwget 8 , +.Xr ifconfig 8 , +.Xr wpa_supplicant 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 14.2 . +.Sh BUGS +Certainly. +.Pp +Does not seem to work (reliably) on machines with more than 4GB of +main memory. +See in the +.Sx LOADER TUNABLES +section above. +.Pp +While +.Nm +supports 802.11a/b/g/n/ac/ax modes, +the compatibility code currently only supports 802.11a/b/g modes. +Support for 802.11n/ac/ax is yet to come. diff --git a/share/man/man4/rtwn.4 b/share/man/man4/rtwn.4 index 1ffafc6dfcf9..06761fdcde4e 100644 --- a/share/man/man4/rtwn.4 +++ b/share/man/man4/rtwn.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: ISC +.\" .\" $OpenBSD: rtwn.4,v 1.2 2015/07/09 11:28:53 stsp Exp $ .\" .\" Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr> @@ -16,14 +19,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" -.Dd January 2, 2019 +.Dd November 10, 2024 .Dt RTWN 4 .Os .Sh NAME .Nm rtwn -.Nd Realtek IEEE 802.11 wireless network driver +.Nd Realtek IEEE 802.11n/ac wireless network driver .Sh SYNOPSIS .Cd "options RTWN_DEBUG" .Cd "options RTWN_WITHOUT_UCODE" @@ -50,16 +51,14 @@ if_rtwn_usb_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for wireless network devices based on -the Realtek RTL8192C, RTL8188E, RTL8192E, RTL8812A and RTL8821A -programming APIs. -These APIs are used by a wide variety of chips; -most chips with USB and some with PCI interface are supported. -.Pp -To enable use for PCI/PCIe systems, see the rtwn_pci(4) driver; -for USB devices, use the rtwn_usb(4) driver. +driver provides support for 802.11n/ac wireless network PHYs supplied by +.Xr rtwn_pci 4 +and +.Xr rtwn_usb 4 . .Pp -The driver supports +The +.Nm +driver supports .Cm station , .Cm adhoc , .Cm hostap @@ -81,17 +80,40 @@ The .Nm driver can be configured at runtime with .Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports USB and PCI devices with the following chipsets: +.Pp +.Bl -bullet -offset indent -compact +.It +Realtek 802.11n wireless 8188e (RTL8188E) +.It +Realtek 802.11n wireless 8192c (RTL8192C) +.It +Realtek 802.11n wireless 8192e (RTL8192E) +.It +Realtek 802.11ac wireless 8812a (RTL8812A) +.It +Realtek 802.11ac wireless 8821a (RTL8821A) +.El +.Pp +For specific devices, see +.Xr rtwn_pci 4 +and +.Xr rtwn_usb 4 . .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/realtek.LICENSE" -compact +.Bl -tag -width "/usr/share/doc/legal/realtek.LICENSE" -compact .It Pa /usr/share/doc/legal/realtek.LICENSE .Nm firmware license .El .Pp -The driver (if not compiled with -.Cd options RTWN_WITHOUT_UCODE -) may use following firmware files, which are loaded -when an interface is brought up: +The driver +.Pq if not compiled with Cd options RTWN_WITHOUT_UCODE +may use following firmware files, +which are loaded when an interface is brought up: +.Pp .Bl -tag -width Ds -offset indent -compact .It Pa /boot/kernel/rtwn-rtl8188eefw.ko .It Pa /boot/kernel/rtwn-rtl8188eufw.ko @@ -105,41 +127,38 @@ when an interface is brought up: .El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev rtwn0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev rtwn0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev rtwn0 ssid my_net up" +.Dl ifconfig wlan create wlandev rtwn0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev rtwn0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Create an IBSS network with 128-bit WEP encryption on the channel 4: .Bd -literal -offset indent ifconfig wlan create wlandev rtwn0 wlanmode adhoc ssid my_net \e - wepmode on wepkey 0x01020304050607080910111213 weptxkey 1 \e - channel 4 + wepmode on wepkey 0x01020304050607080910111213 weptxkey 1 \e + channel 4 .Ed .Pp Join/create an 802.11b IBSS network with network name -.Dq Li my_net : +.Ar my_net : .Bd -literal -offset indent ifconfig wlan0 create wlandev rtwn0 wlanmode adhoc -ifconfig wlan0 inet 192.168.0.22 netmask 0xffffff00 ssid my_net \e - mode 11b +ifconfig wlan0 inet 192.0.2.20/24 ssid my_net mode 11b .Ed .Pp Create a host-based access point: .Bd -literal -offset indent ifconfig wlan0 create wlandev rtwn0 wlanmode hostap -ifconfig wlan0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap +ifconfig wlan0 inet 192.0.2.20/24 ssid my_ap .Ed .Sh LOADER TUNABLES Tunables can be set at the @@ -149,32 +168,32 @@ prompt before booting the kernel or stored in .Bl -tag -width indent .It Va dev.rtwn.%d.hwcrypto This tunable controls how key slots are assigned: -.br +.Pp 0 - disable h/w crypto support. Features that require access to frame contents (e.g., TCP/UDP/IP Rx checksum validation) will not work; -.br +.Pp 1 - use h/w crypto support for pairwise keys only; -.br +.Pp 2 - use h/w crypto support for all keys; may not work for multi-vap configurations. -.br +.Pp By default it is set to 1. .It Va dev.rtwn.%d.ratectl This tunable switches between rate control implementations: -.br +.Pp 0 - no rate control; -.br +.Pp 1 - driver sends 'tx complete' reports to net80211; algorithm is controlled via net80211; -.br +.Pp 2 - firmware-based rate control. -.br +.Pp By default it is set to 1; however driver may choose another algorithm in case if it is not implemented -.br +.Pp Currently selected algorithm is reported via -.Em Va dev.rtwn.%d.ratectl_selected +.Va dev.rtwn.%d.ratectl_selected read-only OID. .It Va dev.rtwn.%d.rx_buf_size (USB only) Controls size of temporary Rx buffer; smaller buffer size @@ -214,6 +233,7 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr wlan_xauth 4 , +.Xr networking 7 , .Xr hostapd 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 @@ -227,7 +247,9 @@ and the .Nm driver first appeared in -.Ox 5.8 . +.Ox 5.8 +and +.Fx 11.0 . .Sh AUTHORS The .Nm diff --git a/share/man/man4/rtwn_pci.4 b/share/man/man4/rtwn_pci.4 index 8e9bfd2efcea..e604007d5509 100644 --- a/share/man/man4/rtwn_pci.4 +++ b/share/man/man4/rtwn_pci.4 @@ -1,8 +1,10 @@ .\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2011 Adrian Chadd, Xenion Pty Ltd .\" Copyright (c) 2016 Andriy Voskoboinyk <avos@FreeBSD.org> .\" All rights reserved. -.\"" +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -27,14 +29,12 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGES. .\" -.\" $FreeBSD$ -.\"/ -.Dd January 2, 2019 +.Dd November 10, 2024 .Dt RTWN_PCI 4 .Os .Sh NAME .Nm rtwn_pci -.Nd "Realtek PCI device glue" +.Nd Realtek wireless rtwn network driver PCI/PCIe support .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -48,12 +48,24 @@ kernel configuration file: .Sh DESCRIPTION The .Nm -driver supports PCIe wireless network devices based on the Realtek -RTL8188CE/RTL8188EE chipsets. +driver provides support for PCIe wireless network devices to the +.Xr rtwn 4 +driver. .Pp Both RTL8188CE and RTL8188EE are highly integrated 802.11n adapters that combines a MAC, a 1T1R capable baseband and an RF in a single chip. They are operate in the 2GHz spectrum only. +.Sh HARDWARE +The +.Nm +driver supports the following PCIe Wi-Fi devices: +.Pp +.Bl -bullet -offset indent -compact +.It +Realtek 802.11n wireless 8188 (RTL8188EE) +.It +Realtek 802.11n wireless 8192 (RTL8192CE) +.El .Sh SEE ALSO .Xr pci 4 , .Xr rtwn 4 , diff --git a/share/man/man4/rtwn_usb.4 b/share/man/man4/rtwn_usb.4 index e6c2a2a89823..3a584d18014f 100644 --- a/share/man/man4/rtwn_usb.4 +++ b/share/man/man4/rtwn_usb.4 @@ -1,8 +1,10 @@ .\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2011 Adrian Chadd, Xenion Pty Ltd .\" Copyright (c) 2016 Andriy Voskoboinyk <avos@FreeBSD.org> .\" All rights reserved. -.\"" +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -27,14 +29,12 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGES. .\" -.\" $FreeBSD$ -.\"/ -.Dd November 1, 2021 +.Dd November 10, 2024 .Dt RTWN_USB 4 .Os .Sh NAME .Nm rtwn_usb -.Nd "Realtek USB device glue" +.Nd Realtek wireless rtwn network driver USB support .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -50,17 +50,18 @@ kernel configuration file: .Cd "device wlan" .Ed .Sh DESCRIPTION -This module provides the USB bus glue needed for the devices supported -by the +The +.Nm +driver provides support for USB wireless network devices to the .Xr rtwn 4 driver. .Sh HARDWARE The .Nm -driver supports Realtek RTL8188CUS/RTL8188RU/RTL8188EU/RTL8192CU/RTL8192EU/RTL8812AU/RTL8821AU -based USB wireless network adapters, including: +driver supports USB wireless network adapters based on certain +Realtek RTL 8188/8192/8812 and 8821 chipsets, including: .Pp -.Bl -column -compact "Belkin F7D1102 Surf Wireless Micro" "RTL8188CUS" "Bus" +.Bl -column -compact "Belkin F7D1102 Surf Wireless Micro" "RTL8188CUS" "USB 2.0" .It Em Card Ta Em Chip Ta Em Bus .It "Alfa AWUS036NHR v2" Ta RTL8188RU Ta USB 2.0 .It "ASUS USB-AC56" Ta RTL8812AU Ta USB 3.0 diff --git a/share/man/man4/rtwnfw.4 b/share/man/man4/rtwnfw.4 index 7654eed6ea89..98e3ef0c13aa 100644 --- a/share/man/man4/rtwnfw.4 +++ b/share/man/man4/rtwnfw.4 @@ -21,8 +21,6 @@ .\" (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 3, 2019 .Dt RTWNFW 4 .Os diff --git a/share/man/man4/rue.4 b/share/man/man4/rue.4 index ba85ae0c6c30..c30d8ca2c757 100644 --- a/share/man/man4/rue.4 +++ b/share/man/man4/rue.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 24, 2015 .Dt RUE 4 .Os diff --git a/share/man/man4/rum.4 b/share/man/man4/rum.4 index fed7195a970f..8e77839b106b 100644 --- a/share/man/man4/rum.4 +++ b/share/man/man4/rum.4 @@ -1,3 +1,5 @@ +.\"- +.\" SPDX-License-Identifier: ISC .\" .\" Copyright (c) 2005-2007 .\" Damien Bergamini <damien.bergamini@free.fr> @@ -14,14 +16,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" -.Dd November 8, 2018 +.Dd November 10, 2024 .Dt RUM 4 .Os .Sh NAME .Nm rum -.Nd Ralink Technology USB IEEE 802.11a/b/g wireless network device +.Nd Ralink Technology USB IEEE 802.11a/b/g wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -127,20 +127,18 @@ including: .El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev rum0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev rum0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev rum0 ssid my_net up" +.Dl ifconfig wlan create wlandev rum0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev rum0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: @@ -166,6 +164,7 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr wlan_xauth 4 , +.Xr networking 7 , .Xr hostapd 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 @@ -173,7 +172,9 @@ This should not happen. The .Nm driver first appeared in -.Ox 4.0 . +.Ox 4.0 +and +.Fx 7.0 . .Sh AUTHORS .An -nosplit The original diff --git a/share/man/man4/run.4 b/share/man/man4/run.4 index d27bca4b10b4..c3d9d75f8e28 100644 --- a/share/man/man4/run.4 +++ b/share/man/man4/run.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: ISC +.\" .\" $OpenBSD: run.4,v 1.22 2009/11/23 06:16:32 jmc Exp $ .\" .\" Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr> @@ -14,14 +17,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" -.Dd May 23, 2021 +.Dd April 1, 2025 .Dt RUN 4 .Os .Sh NAME .Nm run -.Nd Ralink Technology USB IEEE 802.11a/g/n wireless network device +.Nd Ralink Technology USB IEEE 802.11a/g/n wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -121,87 +122,150 @@ The .Nm driver supports the following wireless adapters: .Pp -.Bl -tag -width Ds -offset indent -compact -.It Airlink101 AWLL6090 -.It ASUS USB-N11 -.It ASUS USB-N13 ver. A1 -.It ASUS USB-N14 -.It ASUS USB-N66 -.It ASUS WL-160N -.It Belkin F5D8051 ver 3000 -.It Belkin F5D8053 -.It Belkin F5D8055 -.It Belkin F6D4050 ver 1 -.It Belkin F9L1103 -.It Buffalo WLI-UC-AG300N -.It Buffalo WLI-UC-G300HP -.It Buffalo WLI-UC-G300N -.It Buffalo WLI-UC-G301N -.It Buffalo WLI-UC-GN -.It Buffalo WLI-UC-GNM -.It Buffalo WLI-UC-GNM2 -.It Corega CG-WLUSB2GNL -.It Corega CG-WLUSB2GNR -.It Corega CG-WLUSB300AGN -.It Corega CG-WLUSB300GNM -.It D-Link DWA-130 rev B1 -.It D-Link DWA-130 rev F1 -.It D-Link DWA-140 rev B1, B2, B3, \&D1 -.It D-Link DWA-160 rev B2 -.It D-Link DWA-162 -.It DrayTek Vigor N61 -.It Edimax EW-7711UAn -.It Edimax EW-7711UTn -.It Edimax EW-7717Un -.It Edimax EW-7718Un -.It Edimax EW-7733UnD -.It Gigabyte GN-WB30N -.It Gigabyte GN-WB31N -.It Gigabyte GN-WB32L -.It Hawking HWDN1 -.It Hawking HWUN1 -.It Hawking HWUN2 -.It Hercules HWNU-300 -.It Linksys WUSB54GC v3 -.It Linksys WUSB600N -.It Logitec LAN-W150N/U2 -.It Mvix Nubbin MS-811N -.It Panda Wireless PAU06 -.It Planex GW-USMicroN -.It Planex GW-US300MiniS -.It Sitecom WL-182 -.It Sitecom WL-188 -.It Sitecom WL-301 -.It Sitecom WL-302 -.It Sitecom WL-315 -.It SMC SMCWUSBS-N2 -.It Sweex LW303 -.It Sweex LW313 -.It TP-LINK TL-WDN3200 -.It TP-LINK TL-WN321G v4 -.It TP-LINK TL-WN727N v3 -.It Unex DNUR-81 -.It Unex DNUR-82 -.It ZyXEL NWD2705 -.It ZyXEL NWD210N -.It ZyXEL NWD270N +.Bl -bullet -offset indent -compact +.It +Airlink101 AWLL6090 +.It +ASUS USB-N11 +.It +ASUS USB-N13 ver. A1 +.It +ASUS USB-N14 +.It +ASUS USB-N66 +.It +ASUS WL-160N +.It +Belkin F5D8051 ver 3000 +.It +Belkin F5D8053 +.It +Belkin F5D8055 +.It +Belkin F6D4050 ver 1 +.It +Belkin F9L1103 +.It +Buffalo WLI-UC-AG300N +.It +Buffalo WLI-UC-G300HP +.It +Buffalo WLI-UC-G300N +.It +Buffalo WLI-UC-G301N +.It +Buffalo WLI-UC-GN +.It +Buffalo WLI-UC-GNM +.It +Buffalo WLI-UC-GNM2 +.It +Corega CG-WLUSB2GNL +.It +Corega CG-WLUSB2GNR +.It +Corega CG-WLUSB300AGN +.It +Corega CG-WLUSB300GNM +.It +D-Link DWA-130 rev B1 +.It +D-Link DWA-130 rev F1 +.It +D-Link DWA-140 rev B1, B2, B3, \&D1 +.It +D-Link DWA-160 rev B2 +.It +D-Link DWA-162 +.It +DrayTek Vigor N61 +.It +Edimax EW-7711UAn +.It +Edimax EW-7711UTn +.It +Edimax EW-7717Un +.It +Edimax EW-7718Un +.It +Edimax EW-7733UnD +.It +Gigabyte GN-WB30N +.It +Gigabyte GN-WB31N +.It +Gigabyte GN-WB32L +.It +Hawking HWDN1 +.It +Hawking HWUN1 +.It +Hawking HWUN2 +.It +Hercules HWNU-300 +.It +Linksys WUSB54GC v3 +.It +Linksys WUSB600N +.It +Logitec LAN-W150N/U2 +.It +Mvix Nubbin MS-811N +.It +Panda Wireless PAU06 +.It +Planex GW-USMicroN +.It +Planex GW-US300MiniS +.It +Sitecom WL-182 +.It +Sitecom WL-188 +.It +Sitecom WL-301 +.It +Sitecom WL-302 +.It +Sitecom WL-315 +.It +Sitecom WL-364 +.It +SMC SMCWUSBS-N2 +.It +Sweex LW303 +.It +Sweex LW313 +.It +TP-LINK TL-WDN3200 +.It +TP-LINK TL-WN321G v4 +.It +TP-LINK TL-WN727N v3 +.It +Unex DNUR-81 +.It +Unex DNUR-82 +.It +ZyXEL NWD2705 +.It +ZyXEL NWD210N +.It +ZyXEL NWD270N .El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev run0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev run0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev run0 ssid my_net up" +.Dl ifconfig wlan create wlandev run0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev run0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: @@ -211,7 +275,7 @@ ifconfig wlan create wlandev run0 wlanmode adhoc ssid my_net \e .Ed .Sh DIAGNOSTICS .Bl -diag -.It "run%d: faild load firmware of file runfw" +.It "run%d: failed load firmware of file runfw" For some reason, the driver was unable to read the microcode file from the filesystem. The file might be missing or corrupted. @@ -234,6 +298,7 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr wlan_xauth 4 , +.Xr networking 7 , .Xr hostapd 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 diff --git a/share/man/man4/runfw.4 b/share/man/man4/runfw.4 index 127a04431361..559429083cb3 100644 --- a/share/man/man4/runfw.4 +++ b/share/man/man4/runfw.4 @@ -16,8 +16,6 @@ .\" (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 November 11, 2013 .Dt RUNFW 4 .Os diff --git a/share/man/man4/sa.4 b/share/man/man4/sa.4 index 928bf5e90292..96b11ebe5360 100644 --- a/share/man/man4/sa.4 +++ b/share/man/man4/sa.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 18, 2022 .Dt SA 4 .Os diff --git a/share/man/man4/safe.4 b/share/man/man4/safe.4 index 3d5cbec03784..89375d058bf7 100644 --- a/share/man/man4/safe.4 +++ b/share/man/man4/safe.4 @@ -1,4 +1,6 @@ -.\"- +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2003 Sam Leffler, Errno Consulting .\" All rights reserved. .\" @@ -23,14 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\"/ -.Dd July 29, 2020 +.Dd November 22, 2024 .Dt SAFE 4 .Os .Sh NAME .Nm safe -.Nd SafeNet crypto accelerator +.Nd SafeNet SafeXcel 1141/1741 crypto accelerator .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -48,11 +48,15 @@ module at boot time, place the following line in safe_load="YES" .Ed .Pp -.Nm sysctl Va hw.safe.debug -.Nm sysctl Va hw.safe.dump -.Nm sysctl Va hw.safe.rnginterval -.Nm sysctl Va hw.safe.rngbufsize -.Nm sysctl Va hw.safe.rngmaxalarm +In +.Xr sysctl.conf 5 : +.Bd -ragged -offset indent +.Cd hw.safe.debug +.Cd hw.safe.dump +.Cd hw.safe.rnginterval +.Cd hw.safe.rngbufsize +.Cd hw.safe.rngmaxalarm +.Ed .Sh DESCRIPTION The .Nm @@ -108,15 +112,13 @@ to dump the hardware interrupt registers. .Sh HARDWARE The .Nm -driver supports cards containing any of the following chips: -.Bl -tag -width "SafeNet 1141" -offset indent -.It SafeNet 1141 -The original chipset. +driver supports the following SafeXcel chips: +.Bl -column "SafeNet 1141" "The original chipset. Supports" -offset indent +.It SafeNet 1141 Ta The original chipset. Supports DES, Triple-DES, AES, MD5, and SHA-1 symmetric crypto operations, RNG, public key operations, and full IPsec packet processing. -.It SafeNet 1741 -A faster version of the 1141. +.It SafeNet 1741 Ta A faster version of the 1141. .El .Sh SEE ALSO .Xr crypt 3 , diff --git a/share/man/man4/safexcel.4 b/share/man/man4/safexcel.4 index 774dfddfb053..e14eebe40da2 100644 --- a/share/man/man4/safexcel.4 +++ b/share/man/man4/safexcel.4 @@ -1,4 +1,6 @@ -.\"- +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2020 Rubicon Communications, LLC (Netgate) .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,14 +24,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 29, 2020 +.Dd November 22, 2024 .Dt SAFEXCEL 4 .Os .Sh NAME .Nm safexcel -.Nd Inside Secure SafeXcel-IP-97 security packet engine +.Nd Inside Secure SafeXcel-IP-97 cryptographic offload engine .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -71,6 +71,11 @@ AES-CCM .Nm also implements SHA1 and SHA2 transforms, and can combine AES-CBC and AES-CTR with SHA1-HMAC and SHA2-HMAC for encrypt-then-authenticate operations. +.Sh HARDWARE +The +.Nm +driver supports the cryptographic acceleration functions of the +Inside Secure EIP-97 device found on some Marvell systems-on-chip. .Sh SEE ALSO .Xr crypto 4 , .Xr ipsec 4 , diff --git a/share/man/man4/sbp.4 b/share/man/man4/sbp.4 index eeddd5da02c9..2255fa2993ae 100644 --- a/share/man/man4/sbp.4 +++ b/share/man/man4/sbp.4 @@ -29,8 +29,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 8, 2012 .Dt SBP 4 .Os diff --git a/share/man/man4/sbp_targ.4 b/share/man/man4/sbp_targ.4 index 9a81a99a9b42..fe6451b61c20 100644 --- a/share/man/man4/sbp_targ.4 +++ b/share/man/man4/sbp_targ.4 @@ -29,8 +29,6 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 7, 2003 .Dt SBP_TARG 4 .Os diff --git a/share/man/man4/scc.4 b/share/man/man4/scc.4 index e03f43011b07..db0c6deaf6bd 100644 --- a/share/man/man4/scc.4 +++ b/share/man/man4/scc.4 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2006 Marcel Moolenaar .\" All rights reserved. .\" @@ -23,15 +25,13 @@ .\" (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 26, 2020 +.Dd May 26, 2025 .Dt SCC 4 .Os .\" .Sh NAME .Nm scc -.Nd driver for Serial Communications Controllers (SCC) devices +.Nd Serial Communications Controller driver .\" .Sh SYNOPSIS .Cd "device scc" @@ -50,7 +50,7 @@ take care of the details of the communication itself. .Sh HARDWARE The .Nm -driver supports the following classes of SCCs: +driver supports the following classes of Serial Communications Controllers: .Pp .Bl -bullet -compact .It diff --git a/share/man/man4/sched_4bsd.4 b/share/man/man4/sched_4bsd.4 index a02c40eb58a8..c8b3938fcbde 100644 --- a/share/man/man4/sched_4bsd.4 +++ b/share/man/man4/sched_4bsd.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 21, 2008 .Dt SCHED_4BSD 4 .Os diff --git a/share/man/man4/sched_ule.4 b/share/man/man4/sched_ule.4 index 7ba18d361a38..764ff394c9f6 100644 --- a/share/man/man4/sched_ule.4 +++ b/share/man/man4/sched_ule.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 10, 2012 .Dt SCHED_ULE 4 .Os diff --git a/share/man/man4/screen.4 b/share/man/man4/screen.4 index 2e08d28e9759..109aa2fe92b7 100644 --- a/share/man/man4/screen.4 +++ b/share/man/man4/screen.4 @@ -1,6 +1,4 @@ .\" -.\" $FreeBSD$ -.\" .Dd October 6, 2000 .Dt SCREEN 4 .Os diff --git a/share/man/man4/scsi.4 b/share/man/man4/scsi.4 index 79e7ab322611..380768c2d7c1 100644 --- a/share/man/man4/scsi.4 +++ b/share/man/man4/scsi.4 @@ -22,9 +22,7 @@ .\" 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 November 3, 2021 +.Dd December 11, 2023 .Dt CAM 4 .Os .Sh NAME @@ -192,30 +190,30 @@ Individual bus numbers can be wired down to specific controllers with a config line similar to the following: .Bd -literal -offset indent -hint.scbus.0.at="ahd1" +hint.scbus.0.at="mpr1" .Ed .Pp This assigns .Nm bus number 0 to the -.Em ahd1 +.Em mpr1 driver instance. For controllers supporting more than one bus, a particular bus can be assigned as follows: .Bd -literal -offset indent -hint.scbus.0.at="ahc1" +hint.scbus.0.at="ahci1" hint.scbus.0.bus="1" .Ed .Pp This assigns .Nm bus 0 to the bus 1 instance on -.Em ahc1 . +.Em ahci1 . Peripheral drivers can be wired to a specific bus, target, and lun as so: .Bd -literal -offset indent hint.da.0.at="scbus0" hint.da.0.target="0" -hint.da.0.unit="0" +hint.da.0.lun="0" .Ed .Pp This assigns @@ -230,19 +228,19 @@ wired to any particular controller, bus, target, and/or unit instance. .Pp This also works with .Xr nvme 4 -drives as well. +drives. .Bd -literal -offset indent hint.nvme.4.at="pci7:0:0" hint.scbus.10.at="nvme4" hint.nda.10.at="scbus10" hint.nda.10.target="1" -hint.nda.10.unit="12" +hint.nda.10.lun="12" hint.nda.11.at="scbus10" hint.nda.11.target="1" -hint.nda.11.unit="2" +hint.nda.11.lun="2" .Ed .Pp -This assigns the NVMe card living at PCI bus 7 slot 0 function 1 to scbus 10. +This assigns the NVMe card at PCI bus 7 slot 0 function 1 to scbus 10. The target for .Xr nda 4 devices is always 1. @@ -281,7 +279,7 @@ or bus and the system. The maximum size of a transfer is governed by the adapter. -Most adapters can transfer 64KB in a single operation, however +Most adapters can transfer 1MB in a single operation, however many can transfer larger amounts. .Sh TARGET MODE Some adapters support @@ -369,7 +367,7 @@ SIM used to stand for SCSI Interface Module. Now it is just SIM because it understands protocols other than SCSI. There are two types of SIM drivers: virtual and physical. Physical SIMs are typically called host bus adapters (HBA), but not universally. -Virtual SIM drivers are for communicating with virtual machine hosts. +Virtual SIM drivers are for communicating with network or virtual machine hosts. .Sh FILES see other .Nm diff --git a/share/man/man4/sctp.4 b/share/man/man4/sctp.4 index 2c47c5b5dcd3..287e16f3b599 100644 --- a/share/man/man4/sctp.4 +++ b/share/man/man4/sctp.4 @@ -24,9 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 9, 2020 +.Dd June 21, 2023 .Dt SCTP 4 .Os .Sh NAME @@ -299,12 +297,13 @@ This option lets the caller set it to a smaller value. Note that while the user can change this value, if the P-MTU is smaller than the value set by the user, then the P-MTU value will override any user setting. -.It Dv SCTP_DELAYED_ACK_TIME +.It Dv SCTP_DELAYED_SACK This option lets the user both set and get the -delayed ack time (in milliseconds) that +delayed ack time (in milliseconds) and the ack frequency that .Tn SCTP is using. -The default is 200 milliseconds. +The default delayed ack time is 200 milliseconds and the default +ack frequency is 2. .It Dv SCTP_PARTIAL_DELIVERY_POINT .Tn SCTP at times may need to start delivery of a diff --git a/share/man/man4/sdhci.4 b/share/man/man4/sdhci.4 index 676122fa6d1b..4a4e02539acd 100644 --- a/share/man/man4/sdhci.4 +++ b/share/man/man4/sdhci.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 25, 2020 .Dt SDHCI 4 .Os diff --git a/share/man/man4/sem.4 b/share/man/man4/sem.4 index 2767dc72a200..f2331738ff2d 100644 --- a/share/man/man4/sem.4 +++ b/share/man/man4/sem.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 7, 2014 .Dt SEM 4 .Os diff --git a/share/man/man4/send.4 b/share/man/man4/send.4 index e69e6e35ca4b..06e04f3c924d 100644 --- a/share/man/man4/send.4 +++ b/share/man/man4/send.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 19, 2010 .Dt SEND 4 .Os diff --git a/share/man/man4/ses.4 b/share/man/man4/ses.4 index 3d3f370270b2..8de664c8d7a2 100644 --- a/share/man/man4/ses.4 +++ b/share/man/man4/ses.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 12, 2019 .Dt SES 4 .Os diff --git a/share/man/man4/sfxge.4 b/share/man/man4/sfxge.4 index 0c6ac4f8db22..a9724074581e 100644 --- a/share/man/man4/sfxge.4 +++ b/share/man/man4/sfxge.4 @@ -26,8 +26,6 @@ .\" those of the authors and should not be interpreted as representing official .\" policies, either expressed or implied, of the FreeBSD Project. .\" -.\" $FreeBSD$ -.\" .Dd February 22, 2015 .Dt SFXGE 4 .Os diff --git a/share/man/man4/sg.4 b/share/man/man4/sg.4 new file mode 100644 index 000000000000..ac549452cc93 --- /dev/null +++ b/share/man/man4/sg.4 @@ -0,0 +1,63 @@ +.\" +.\" Copyright (c) 2024 Netflix, Inc. +.\" +.\" SPDX-License-Expression: BSD-2-Clause +.\" +.Dd May 6, 2024 +.Dt SG 4 +.Os +.Sh NAME +.Nm sg +.Nd Linux ioctl-compatible SCSI passthru device +.Sh SYNOPSIS +.Cd device sg +.Cd device scbus +.Sh DESCRIPTION +The +.Nm +driver provides a Linux compatible scsi passthru device. +This driver attaches to all +.Xr cam 4 +peripheral devices. +It is similar to the +.Xr pass 4 +device, but uses the Linux interfaces, rather than the FreeBSD CAM interfaces. +.Sh IOCTL +The following subset of the Linux sg ioctl interfaces are implemented: +.Bl -tag -width 12 +.It Va SG_SET_TIMEOUT +.Fa u_int to +Set the timeout in milliseconds. +.It Va SG_GET_TIMEOUT +Get the timeout in milliseconds +.It Va SG_GET_RESERVED_SIZE +.Fa u_int +Returns the size of the I/O one can do this device. +.It Va SG_GET_SCSI_ID +.Fa struct sg_scsi_id +Returns the bus number, channel, scsi bus ID number, lun and other information +about the SCSI device. +.It Va SG_GET_SG_TABLESIZE +.Fa u_int +Returns the table size, though hard wired to 0. +.It Va SG_GET_VERSION_NUM +.Fa u_int +Return the version number that is implemented. +.It Va SG_IO +.Fa struct sg_io_hdr +.El +All other ioctl interfaces return +.Va ENODEV . +.Sh FILES +.Bl -tag -width ".Pa /dev/sg*" -compact +.It Pa /dev/sg* +Passthru devices. +.El +.Sh SEE ALSO +.Xr cam 4 , +.Xr pass 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 7.0 . diff --git a/share/man/man4/sge.4 b/share/man/man4/sge.4 index 0322169b6e74..cdcedc81b86e 100644 --- a/share/man/man4/sge.4 +++ b/share/man/man4/sge.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 16, 2011 .Dt SGE 4 .Os diff --git a/share/man/man4/siba.4 b/share/man/man4/siba.4 index 13fd3dc936f0..4191971da325 100644 --- a/share/man/man4/siba.4 +++ b/share/man/man4/siba.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 13, 2017 .Dt SIBA 4 .Os diff --git a/share/man/man4/siftr.4 b/share/man/man4/siftr.4 index be5bf7d5411b..719ba0e3d280 100644 --- a/share/man/man4/siftr.4 +++ b/share/man/man4/siftr.4 @@ -27,9 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 7, 2022 +.Dd May 29, 2023 .Dt SIFTR 4 .Os .Sh NAME @@ -83,10 +81,7 @@ In the IPv4-only (default) mode, standard dotted decimal notation (e.g. "136.186.229.95") is used to format IPv4 addresses for logging. In IPv6 mode, standard dotted decimal notation is used to format IPv4 addresses, and standard colon-separated hex notation (see RFC 4291) is used to format IPv6 -addresses for logging. -Note that SIFTR uses uncompressed notation to format IPv6 addresses. -For example, the address "fe80::20f:feff:fea2:531b" would be logged as -"fe80:0:0:0:20f:feff:fea2:531b". +addresses (e.g. "fd00::2") for logging. .Ss Run-time Configuration .Nm utilises the @@ -122,18 +117,10 @@ By default, the file /var/log/siftr.log is used. The path can be changed at any time, even while the module is enabled. .El .Bl -tag -offset indent -width Va -.It Va net.inet.siftr.genhashes -controls whether a hash is generated for each TCP packet seen by -.Nm . -By default, the value is set to 0, which means no hashes are generated. -The hashes are useful to correlate which TCP packet triggered the generation of -a particular log message, but calculating them adds additional computational -overhead into the fast path. -.El -.Bl -tag -offset indent -width Va .It Va net.inet.siftr.port_filter -controls on which source or destination port siftr should capture -.Nm . +controls on which source or destination port +.Nm +should capture. By default, the value is set to 0, which means all ports are eligible for logging. Set to any other value, only packets where either the source or destination port is equal to this number are logged. @@ -155,9 +142,8 @@ The text below shows an example module enable log. The fields are tab delimited key-value pairs which describe some basic information about the system. .Bd -literal -offset indent -enable_time_secs=1238556193 enable_time_usecs=462104 \\ -siftrver=1.2.2 hz=1000 tcp_rtt_scale=32 \\ -sysname=FreeBSD sysver=604000 ipmode=4 +enable_time_secs=1685191807 enable_time_usecs=160752 \\ +siftrver=1.3.0 sysname=FreeBSD sysver=1400089 ipmode=4 .Ed .Pp Field descriptions are as follows: @@ -175,14 +161,6 @@ version of .Nm . .El .Bl -tag -offset indent -width Va -.It Va hz -tick rate of the kernel in ticks per second. -.El -.Bl -tag -offset indent -width Va -.It Va tcp_rtt_scale -smoothed RTT estimate scaling factor. -.El -.Bl -tag -offset indent -width Va .It Va sysname operating system name. .El @@ -207,9 +185,9 @@ The text below shows an example data log triggered by an IPv4 TCP/IP packet. The data is CSV formatted. .Bd -literal -offset indent -o,0xbec491a5,1238556193.463551,172.16.7.28,22,172.16.2.5,55931, \\ -1073725440,172312,34,66560,66608,8,1,4,1448,936,1,996,255, \\ -33304,208,66608,0,208,0 +o,1685191814.185109,10.1.1.2,32291,10.1.1.3,5001,1073725440, \\ +14480,2,65160,65700,7,9,4,1460,1000,1,16778209,230000,33580,0, \\ +65700,0,0,0,86707916,130 .Ed .Pp Field descriptions are as follows: @@ -224,127 +202,115 @@ for out. .El .Bl -tag -offset indent -width Va .It Va 2 -Hash of the packet that triggered the log message. -.El -.Bl -tag -offset indent -width Va -.It Va 3 Time at which the packet that triggered the log message was processed by the .Xr pfil 9 hook function, in seconds and microseconds since the UNIX epoch. .El .Bl -tag -offset indent -width Va -.It Va 4 +.It Va 3 The IPv4 or IPv6 address of the local host, in dotted quad (IPv4 packet) or colon-separated hex (IPv6 packet) notation. .El .Bl -tag -offset indent -width Va -.It Va 5 +.It Va 4 The TCP port that the local host is communicating via. .El .Bl -tag -offset indent -width Va -.It Va 6 +.It Va 5 The IPv4 or IPv6 address of the foreign host, in dotted quad (IPv4 packet) or colon-separated hex (IPv6 packet) notation. .El .Bl -tag -offset indent -width Va -.It Va 7 +.It Va 6 The TCP port that the foreign host is communicating via. .El .Bl -tag -offset indent -width Va -.It Va 8 +.It Va 7 The slow start threshold for the flow, in bytes. .El .Bl -tag -offset indent -width Va -.It Va 9 +.It Va 8 The current congestion window for the flow, in bytes. .El .Bl -tag -offset indent -width Va -.It Va 10 +.It Va 9 The current state of the t_flags2 field for the flow. .El .Bl -tag -offset indent -width Va -.It Va 11 +.It Va 10 The current sending window for the flow, in bytes. -The post scaled value is reported, except during the initial handshake (first -few packets), during which time the unscaled value is reported. +The post scaled value is reported. .El .Bl -tag -offset indent -width Va -.It Va 12 +.It Va 11 The current receive window for the flow, in bytes. The post scaled value is always reported. .El .Bl -tag -offset indent -width Va -.It Va 13 +.It Va 12 The current window scaling factor for the sending window. .El .Bl -tag -offset indent -width Va -.It Va 14 +.It Va 13 The current window scaling factor for the receiving window. .El .Bl -tag -offset indent -width Va -.It Va 15 +.It Va 14 The current state of the TCP finite state machine, as defined in .Aq Pa netinet/tcp_fsm.h . .El .Bl -tag -offset indent -width Va -.It Va 16 +.It Va 15 The maximum segment size for the flow, in bytes. .El .Bl -tag -offset indent -width Va -.It Va 17 -The current smoothed RTT estimate for the flow, in units of TCP_RTT_SCALE * HZ, -where TCP_RTT_SCALE is a define found in tcp_var.h, and HZ is the kernel's tick -timer. -Divide by TCP_RTT_SCALE * HZ to get the RTT in secs. -TCP_RTT_SCALE and HZ are reported in the enable log message. +.It Va 16 +The current smoothed RTT estimate for the flow, in units of microsecond. .El .Bl -tag -offset indent -width Va -.It Va 18 +.It Va 17 SACK enabled indicator. 1 if SACK enabled, 0 otherwise. .El .Bl -tag -offset indent -width Va -.It Va 19 +.It Va 18 The current state of the TCP flags for the flow. See .Aq Pa netinet/tcp_var.h for information about the various flags. .El .Bl -tag -offset indent -width Va -.It Va 20 -The current retransmission timeout length for the flow, in units of HZ, where HZ -is the kernel's tick timer. -Divide by HZ to get the timeout length in seconds. -HZ is reported in the enable log message. +.It Va 19 +The current retransmission timeout length for the flow, in units microsecond. .El .Bl -tag -offset indent -width Va -.It Va 21 +.It Va 20 The current size of the socket send buffer in bytes. .El .Bl -tag -offset indent -width Va -.It Va 22 +.It Va 21 The current number of bytes in the socket send buffer. .El .Bl -tag -offset indent -width Va -.It Va 23 +.It Va 22 The current size of the socket receive buffer in bytes. .El .Bl -tag -offset indent -width Va -.It Va 24 +.It Va 23 The current number of bytes in the socket receive buffer. .El .Bl -tag -offset indent -width Va -.It Va 25 +.It Va 24 The current number of unacknowledged bytes in-flight. Bytes acknowledged via SACK are not excluded from this count. .El .Bl -tag -offset indent -width Va -.It Va 26 +.It Va 25 The current number of segments in the reassembly queue. .El .Bl -tag -offset indent -width Va -.It Va 27 +.It Va 26 Flowid for the connection. A caveat: Zero '0' either represents a valid flowid or a default value when it's not being set. @@ -352,7 +318,7 @@ There is no easy way to differentiate without looking at actual network interface card and drivers being used. .El .Bl -tag -offset indent -width Va -.It Va 28 +.It Va 27 Flow type for the connection. Flowtype defines which protocol fields are hashed to produce the flowid. A complete listing is available in @@ -367,14 +333,13 @@ The text below shows an example module disable log. The fields are tab delimited key-value pairs which provide statistics about operations since the module was most recently enabled. .Bd -literal -offset indent -disable_time_secs=1238556197 disable_time_usecs=933607 \\ -num_inbound_tcp_pkts=356 num_outbound_tcp_pkts=627 \\ -total_tcp_pkts=983 num_inbound_skipped_pkts_malloc=0 \\ -num_outbound_skipped_pkts_malloc=0 num_inbound_skipped_pkts_mtx=0 \\ -num_outbound_skipped_pkts_mtx=0 num_inbound_skipped_pkts_tcb=0 \\ -num_outbound_skipped_pkts_tcb=0 num_inbound_skipped_pkts_icb=0 \\ -num_outbound_skipped_pkts_icb=0 total_skipped_tcp_pkts=0 \\ -flow_list=172.16.7.28;22-172.16.2.5;55931, +disable_time_secs=1685191816 disable_time_usecs=629397 \\ +num_inbound_tcp_pkts=10 num_outbound_tcp_pkts=10 \\ +total_tcp_pkts=20 num_inbound_skipped_pkts_malloc=0 \\ +num_outbound_skipped_pkts_malloc=0 num_inbound_skipped_pkts_tcpcb=2 \\ +num_outbound_skipped_pkts_tcpcb=2 num_inbound_skipped_pkts_inpcb=0 \\ +num_outbound_skipped_pkts_inpcb=0 total_skipped_tcp_pkts=4 \\ +flow_list=10.1.1.2;32291-10.1.1.3;5001,10.1.1.2;58544-10.1.1.3;5001, .Ed .Pp Field descriptions are as follows: @@ -417,32 +382,22 @@ Number of outbound packets that were not processed because of failed calls. .El .Bl -tag -offset indent -width Va -.It Va num_inbound_skipped_pkts_mtx -Number of inbound packets that were not processed because of failure to add the -packet to the packet processing queue. -.El -.Bl -tag -offset indent -width Va -.It Va num_outbound_skipped_pkts_mtx -Number of outbound packets that were not processed because of failure to add the -packet to the packet processing queue. -.El -.Bl -tag -offset indent -width Va -.It Va num_inbound_skipped_pkts_tcb +.It Va num_inbound_skipped_pkts_tcpcb Number of inbound packets that were not processed because of failure to find the TCP control block associated with the packet. .El .Bl -tag -offset indent -width Va -.It Va num_outbound_skipped_pkts_tcb +.It Va num_outbound_skipped_pkts_tcpcb Number of outbound packets that were not processed because of failure to find the TCP control block associated with the packet. .El .Bl -tag -offset indent -width Va -.It Va num_inbound_skipped_pkts_icb +.It Va num_inbound_skipped_pkts_inpcb Number of inbound packets that were not processed because of failure to find the IP control block associated with the packet. .El .Bl -tag -offset indent -width Va -.It Va num_outbound_skipped_pkts_icb +.It Va num_outbound_skipped_pkts_inpcb Number of outbound packets that were not processed because of failure to find the IP control block associated with the packet. .El @@ -555,8 +510,9 @@ As a result of needing to interrogate the TCP control block, certain packets during the lifecycle of a connection are unable to trigger a .Nm log message. -The initial handshake takes place without the existence of a control block and -the final ACK is exchanged when the connection is in the TIMEWAIT state. +The initial handshake takes place without the existence of a control block or +the complete initialization of the control block, and the final ACK is +exchanged when the connection is in the TIMEWAIT state. .Pp .Nm was designed to minimise the delay introduced to packets traversing the network @@ -785,9 +741,4 @@ value logged by does not take into account bytes that have been .No SACK Ap ed by the receiving host. -.It -Packet hash generation does not currently work for IPv6 based TCP packets. -.It -Compressed notation is not used for IPv6 address representation. -This consumes more bytes than is necessary in log output. .El diff --git a/share/man/man4/siis.4 b/share/man/man4/siis.4 index dca87f5bf93a..3ba7cd1b7bec 100644 --- a/share/man/man4/siis.4 +++ b/share/man/man4/siis.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 23, 2015 .Dt SIIS 4 .Os diff --git a/share/man/man4/simplebus.4 b/share/man/man4/simplebus.4 index 42d97dd33d03..78cb8d77f61b 100644 --- a/share/man/man4/simplebus.4 +++ b/share/man/man4/simplebus.4 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 12, 2010 .Dt SIMPLEBUS 4 .Os diff --git a/share/man/man4/sis.4 b/share/man/man4/sis.4 index ebaddc33517e..87c8e059e53a 100644 --- a/share/man/man4/sis.4 +++ b/share/man/man4/sis.4 @@ -28,8 +28,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 2, 2010 .Dt SIS 4 .Os diff --git a/share/man/man4/sk.4 b/share/man/man4/sk.4 index b24d18fe6e76..17ca8beb5e18 100644 --- a/share/man/man4/sk.4 +++ b/share/man/man4/sk.4 @@ -28,8 +28,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 29, 2012 .Dt SK 4 .Os diff --git a/share/man/man4/smartpqi.4 b/share/man/man4/smartpqi.4 index fbe435ca3a7f..5b7ea923e13e 100644 --- a/share/man/man4/smartpqi.4 +++ b/share/man/man4/smartpqi.4 @@ -1,5 +1,7 @@ -.\" Copyright (c) 2018 Murthy Bhat -.\" All rights reserved. +.\" Copyright (C) 2019-2023, Microchip Technology Inc. and its subsidiaries +.\" Copyright (C) 2016-2018, Microsemi Corporation +.\" Copyright (C) 2016, PMC-Sierra, Inc. +.\" Written by John Hall <john.hall@microchip.com> .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -22,25 +24,22 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ stable/10/share/man/man4/smartpqi.4 195614 2017-01-11 08:10:18Z jkim $ -.Dd April 6, 2018 +.Dd August 24, 2023 .Dt SMARTPQI 4 .Os .Sh NAME .Nm smartpqi -.Nd Microsemi smartpqi SCSI driver for PQI controllers +.Nd "Microchip Smart Storage SCSI driver" .Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your -kernel configuration file: +To compile this driver into the kernel, place these lines in the kernel +configuration file: .Bd -ragged -offset indent .Cd device pci .Cd device scbus .Cd device smartpqi .Ed .Pp -Alternatively, to load the driver as a -module at boot time, place the following line in +The driver can be loaded as a module at boot time by placing this line in .Xr loader.conf 5 : .Bd -literal -offset indent smartpqi_load="YES" @@ -48,36 +47,33 @@ smartpqi_load="YES" .Sh DESCRIPTION The .Nm -SCSI driver provides support for the new generation of PQI controllers from -Microsemi. -The -.Nm -driver is the first SCSI driver to implement the PQI queuing model. -.Pp -The -.Nm -driver will replace the aacraid driver for Adaptec Series 9 controllers. -.Pp -The -.Pa /dev/smartpqi? -device nodes provide access to the management interface of the controller. -One node exists per installed card. +driver provides support for Microchip Technology Inc. / Adaptec SmartRaid and +SmartHBA SATA/SAS/NVME PCIe controllers .Sh HARDWARE Controllers supported by the .Nm -driver include: +driver include, but not limited to: .Pp .Bl -bullet -compact .It HPE Gen10 Smart Array Controller Family .It -OEM Controllers based on the Microsemi Chipset +Adaptec SmartRaid and SmartHBA Controllers +.It +OEM Controllers based on the Microchip Technology Inc. SmartROC +and SmartIOC Chipsets .El .Sh FILES -.Bl -tag -width /boot/kernel/aac.ko -compact +.Bl -tag -width /boot/kernel/smartpqi.ko -compact .It Pa /dev/smartpqi? smartpqi management interface .El +.Sh NOTES +.Ss Configuration +To configure a Microchip Smart Storage controller, +refer to the User Guide for the controller, +which can be found by searching for the specific controller at +https://www.microchip.com/design-centers/storage .Sh SEE ALSO .Xr kld 4 , .Xr linux 4 , @@ -87,17 +83,13 @@ smartpqi management interface .Xr loader.conf 5 , .Xr camcontrol 8 , .Xr kldload 8 -.Rs -.%T "Microsemi Website" -.%U https://www.microsemi.com/ -.Re .Sh HISTORY The .Nm driver first appeared in .Fx 11.1 . .Sh AUTHORS -.An Murthy Bhat -.Aq murthy.bhat@microsemi.com +.An John Hall +.Aq john.hall@microchip.com .Sh BUGS The controller is not actually paused on suspend/resume. diff --git a/share/man/man4/smb.4 b/share/man/man4/smb.4 index 20fb70341acd..e944f1b76b5e 100644 --- a/share/man/man4/smb.4 +++ b/share/man/man4/smb.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifer: BSD-2-Clause +.\" .\" Copyright (c) 1998, Nicolas Souchu .\" Copyright (c) 2004, Joerg Wunsch .\" Copyright (c) 2015, Michael Gmelin <freebsd@grem.de> @@ -24,14 +27,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 25, 2015 .Dt SMB 4 .Os .Sh NAME .Nm smb -.Nd SMB generic I/O device driver +.Nd System Management Bus (SMBus) generic I/O device driver .Sh SYNOPSIS .Cd "device smb" .Sh DESCRIPTION diff --git a/share/man/man5/smbfs.5 b/share/man/man4/smbfs.4 index 79eaa9b20b39..df64bdc3884f 100644 --- a/share/man/man5/smbfs.5 +++ b/share/man/man4/smbfs.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2020 Gordon Bergling .\" .\" Redistribution and use in source and binary forms, with or without @@ -21,14 +24,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 6, 2022 -.Dt SMBFS 5 +.Dt SMBFS 4 .Os .Sh NAME .Nm smbfs -.Nd "SMB FS" +.Nd server message block (SMB1/CIFS) file system .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -61,10 +62,9 @@ and may be removed from a future version of .Fx . Users are advised to evaluate the -.Pa sysutils/fusefs-smbnetfs +.Pa filesystems/smbnetfs port instead. .Ef -.Pp .Sh SEE ALSO .Xr smbutil 1 , .Xr mount_smbfs 8 @@ -90,6 +90,7 @@ The device driver first appeared in .Fx 4.4 . .Sh AUTHORS +.An -nosplit The .Nm device driver was written by diff --git a/share/man/man4/smbios.4 b/share/man/man4/smbios.4 index 036ffc5ab291..0b7101903f24 100644 --- a/share/man/man4/smbios.4 +++ b/share/man/man4/smbios.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 22, 2020 .Dt SMBIOS 4 .Os diff --git a/share/man/man4/smbus.4 b/share/man/man4/smbus.4 index 1a117d52fd8a..250017defd36 100644 --- a/share/man/man4/smbus.4 +++ b/share/man/man4/smbus.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 7, 2021 .Dt SMBUS 4 .Os diff --git a/share/man/man4/smp.4 b/share/man/man4/smp.4 index 408f417ace7c..a02d69b0dc4f 100644 --- a/share/man/man4/smp.4 +++ b/share/man/man4/smp.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 4, 2019 .Dt SMP 4 .Os diff --git a/share/man/man4/smsc.4 b/share/man/man4/smsc.4 index dac2864adb27..61b12c7d230c 100644 --- a/share/man/man4/smsc.4 +++ b/share/man/man4/smsc.4 @@ -25,14 +25,12 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd November 24, 2015 +.Dd May 7, 2024 .Dt SMSC 4 .Os .Sh NAME .Nm smsc -.Nd "USB SMSC LAN9xxx Fast Ethernet driver" +.Nd "USB Microchip LAN9xxx Fast Ethernet driver" .Sh SYNOPSIS To load the driver as a module at boot time, place the following line in @@ -55,7 +53,7 @@ following lines in your kernel configuration file: The .Nm device driver provides support for USB Fast Ethernet adapters based -on the SMSC LAN9xxx chipsets. +on the Microchip (formerly SMSC) LAN9xxx chipsets. .Pp For more information on configuring this device, see .Xr ifconfig 8 . @@ -66,11 +64,11 @@ driver: .Pp .Bl -bullet -compact .It -SMSC LAN9500, LAN9500A, LAN9505 and LAN9505A based Ethernet adapters +LAN9500, LAN9500A, LAN9505 and LAN9505A based Ethernet adapters .It -SMSC LAN89530, LAN9530 and LAN9730 based Ethernet adapters +LAN89530, LAN9530 and LAN9730 based Ethernet adapters .It -SMSC LAN951x Ethernet adapters with integrated USB hub +LAN951x Ethernet adapters with integrated USB hub .El .Sh SEE ALSO .Xr arp 4 , diff --git a/share/man/man4/snd_als4000.4 b/share/man/man4/snd_als4000.4 index fbf63f4a5de0..7df6868cacd3 100644 --- a/share/man/man4/snd_als4000.4 +++ b/share/man/man4/snd_als4000.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 15, 2005 .Dt SND_ALS4000 4 .Os diff --git a/share/man/man4/snd_atiixp.4 b/share/man/man4/snd_atiixp.4 index 45c65f984989..1b83a969a625 100644 --- a/share/man/man4/snd_atiixp.4 +++ b/share/man/man4/snd_atiixp.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 29, 2006 .Dt SND_ATIIXP 4 .Os diff --git a/share/man/man4/snd_cmi.4 b/share/man/man4/snd_cmi.4 index 35aded63bbd5..5f233ec9b1c2 100644 --- a/share/man/man4/snd_cmi.4 +++ b/share/man/man4/snd_cmi.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 15, 2005 .Dt SND_CMI 4 .Os diff --git a/share/man/man4/snd_cs4281.4 b/share/man/man4/snd_cs4281.4 index ee7b4ddc0891..a05ac3997e29 100644 --- a/share/man/man4/snd_cs4281.4 +++ b/share/man/man4/snd_cs4281.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 15, 2005 .Dt SND_CS4281 4 .Os diff --git a/share/man/man4/snd_csa.4 b/share/man/man4/snd_csa.4 index ed0fb76dd006..8422387c906f 100644 --- a/share/man/man4/snd_csa.4 +++ b/share/man/man4/snd_csa.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 15, 2005 .Dt SND_CSA 4 .Os diff --git a/share/man/man4/snd_dummy.4 b/share/man/man4/snd_dummy.4 new file mode 100644 index 000000000000..2b9d26d318ef --- /dev/null +++ b/share/man/man4/snd_dummy.4 @@ -0,0 +1,69 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024 The FreeBSD Foundation +.\" +.\" Portions of this software were developed by Christos Margiolis +.\" <christos@FreeBSD.org> under sponsorship from the FreeBSD Foundation. +.\" +.\" 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. +.\" +.Dd July 15, 2024 +.Dt SND_DUMMY 4 +.Os +.Sh NAME +.Nm snd_dummy +.Nd Dummy audio driver +.Sh SYNOPSIS +To load the driver at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +snd_dummy_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver implements a virtual testing device, meaning it does not correspond to a +physical sound card. +It is intended for testing, so that test programs do not need to rely on +hardware being present in the machine in order to run. +.Pp +The driver attaches as a regular PCM device, with two channels (one playback +and one recording), as well as a mixer. +.Pp +Playback works by discarding all input, and recording by returning silence +(zeros). +.Sh SEE ALSO +.Xr sound 4 , +.Xr loader.conf 5 , +.Xr loader 8 +.Sh AUTHORS +The +.Nm +driver was implemented by +.An Christos Margiolis Aq Mt christos@FreeBSD.org +under sponsorship from the +.Fx +Foundation. +.Sh CAVEATS +Because the driver automatically attaches once the module is loaded, it can +only be attached once. diff --git a/share/man/man4/snd_emu10k1.4 b/share/man/man4/snd_emu10k1.4 index 1d4a8603a4ec..5ced043cf0cf 100644 --- a/share/man/man4/snd_emu10k1.4 +++ b/share/man/man4/snd_emu10k1.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 15, 2005 .Dt SND_EMU10K1 4 .Os diff --git a/share/man/man4/snd_emu10kx.4 b/share/man/man4/snd_emu10kx.4 index 690727416f54..cdfe3f03cd95 100644 --- a/share/man/man4/snd_emu10kx.4 +++ b/share/man/man4/snd_emu10kx.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 28, 2008 .Dt SND_EMU10KX 4 .Os diff --git a/share/man/man4/snd_envy24.4 b/share/man/man4/snd_envy24.4 index 5844d920cf04..fe65004a70d2 100644 --- a/share/man/man4/snd_envy24.4 +++ b/share/man/man4/snd_envy24.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 1, 2014 .Dt SND_ENVY24 4 .Os diff --git a/share/man/man4/snd_envy24ht.4 b/share/man/man4/snd_envy24ht.4 index a4f8084807b9..f909afc73284 100644 --- a/share/man/man4/snd_envy24ht.4 +++ b/share/man/man4/snd_envy24ht.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 11, 2018 .Dt SND_ENVY24HT 4 .Os diff --git a/share/man/man4/snd_es137x.4 b/share/man/man4/snd_es137x.4 index d00ea5fb9a35..e503df44acd1 100644 --- a/share/man/man4/snd_es137x.4 +++ b/share/man/man4/snd_es137x.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 29, 2006 .Dt SND_ES137X 4 .Os diff --git a/share/man/man4/snd_fm801.4 b/share/man/man4/snd_fm801.4 index 48807ec3a2f3..e72c07b23f4c 100644 --- a/share/man/man4/snd_fm801.4 +++ b/share/man/man4/snd_fm801.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 1, 2005 .Dt SND_FM801 4 .Os diff --git a/share/man/man4/snd_hda.4 b/share/man/man4/snd_hda.4 index ba7941633b44..93bac0e5b3b9 100644 --- a/share/man/man4/snd_hda.4 +++ b/share/man/man4/snd_hda.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2006-2008 Joel Dahl <joel@FreeBSD.org> .\" Copyright (c) 2008 Alexander Motin <mav@FreeBSD.org> .\" All rights reserved. @@ -23,9 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 16, 2019 +.Dd January 20, 2025 .Dt SND_HDA 4 .Os .Sh NAME @@ -386,6 +387,15 @@ Run-time equivalent of the .Va hint.pcm.%d.rec.autosrc tunable. .El +.Sh HARDWARE +The +.Nm +driver supports PCI class 04h +.Pq multimedia , +subclass 03h +.Pq HDA +audio controllers and codecs compatible with the +Intel High Definition Audio 1.0 specification. .Sh EXAMPLES Taking HP Compaq DX2300 with Realtek ALC888 HDA codec for example. This system has two audio connectors on a front side, three audio connectors @@ -585,17 +595,6 @@ other random inputs Controls have different precision. Some could be just an on/off triggers. Most of controls use logarithmic scale. -.Sh HARDWARE -The -.Nm -driver supports controllers having PCI class 4 (multimedia) and -subclass 3 (HDA), compatible with Intel HDA specification. -.Pp -The -.Nm -driver supports more than 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 snd_ich 4 , .Xr sound 4 , diff --git a/share/man/man4/snd_hdsp.4 b/share/man/man4/snd_hdsp.4 new file mode 100644 index 000000000000..ca24bcf22cd0 --- /dev/null +++ b/share/man/man4/snd_hdsp.4 @@ -0,0 +1,176 @@ +.\" Copyright (c) 2012 Ruslan Bukin <br@bsdpad.com> +.\" Copyright (c) 2024 Florian Walpen <dev@submerge.ch> +.\" 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. +.\" +.Dd October 28, 2024 +.Dt SND_HDSP 4 +.Os +.Sh NAME +.Nm snd_hdsp +.Nd "RME HDSP bridge device driver" +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device sound" +.Cd "device snd_hdsp" +.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 +snd_hdsp_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +bridge driver allows the generic audio driver +.Xr sound 4 +to attach to RME HDSP audio devices. +.Sh HARDWARE +The +.Nm +driver supports the following audio devices: +.Pp +.Bl -bullet -compact +.It +RME HDSP 9632 (optional AO4S-192 and AIS-192 extension boards) +.It +RME HDSP 9652 +.El +.Pp +By default, each +.Xr pcm 4 +device corresponds to a physical port on the sound card. +For ADAT ports, 8 channel, 4 channel and 2 channel formats are supported. +The effective number of ADAT channels is 8 channels at single speed +(32kHz-48kHz) and 4 channels at double speed (64kHz-96kHz). +Only the HDSP 9632 can operate at quad speed (128kHz-192kHz), ADAT is +disabled in this mode. +Depending on sample rate and channel format selected, not all pcm channels can +be mapped to ADAT channels and vice versa. +.Sh LOADER TUNABLES +These settings can be entered at the +.Xr loader 8 +prompt or in +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va hw.hdsp.unified_pcm +If set to 1, all physical ports are combined into one unified pcm device. +When opened in multi-channel audio software, this makes all ports available +at the same time, and fully synchronized. +For resulting channel numbers consult the following table: +.El +.Bl -column "Sound Card" "Single Speed" "Double Speed" "Quad Speed" +.Sy "Sound Card" Ta Sy "Single Speed" Ta Sy "Double Speed" Ta Sy "Quad Speed" +.It "" Ta "Play | Rec" Ta "Play | Rec" Ta "Play | Rec" +.It HDSP 9632 Ta " 16 | 16" Ta " 12 | 12" Ta " 8 | 8" +.It HDSP 9652 Ta " 26 | 26" Ta " 14 | 14" Ta " - | -" +.El +.Sh SYSCTL TUNABLES +These settings and informational values can be accessed at runtime with the +.Xr sysctl 8 +command. +If multiple RME HDSP sound cards are installed, each device has a separate +configuration. +To adjust the following sysctl identifiers for a specific sound card, insert +the respective device number in place of +.Ql 0 . +.Bl -tag -width indent +.It Va dev.hdsp.0.sample_rate +Set a fixed sample rate from 32000, 44100, 48000, up to 192000. +This is usually required for digital connections (AES, S/PDIF, ADAT). +The default value of 0 adjusts the sample rate according to pcm device settings. +.It Va dev.hdsp.0.period +The number of samples processed per interrupt, from 32, 64, 128, up to 4096. +Setting a lower value here results in less latency, but increases system load +due to frequent interrupt processing. +Extreme values may cause audio gaps and glitches. +.It Va dev.hdsp.0.clock_list +Lists possible clock sources to sync with, depending on the hardware model. +This includes internal and external master clocks as well as incoming digital +audio signals like AES, S/PDIF and ADAT. +.It Va dev.hdsp.0.clock_preference +Select a preferred clock source from the clock list. +HDSP cards will sync to this clock source when available, but fall back to +auto-sync with any other digital clock signal they receive. +Set this to +.Ql internal +if the HDSP card should act as master clock. +.It Va dev.hdsp.0.clock_source +Shows the actual clock source in use (read only). +This differs from what is set as clock preference when in auto-sync mode. +.It Va dev.hdsp.0.sync_status +Display the current sync status of all external clock sources. +Status indications are +.Ql none +for no signal at all, +.Ql lock +for when a valid signal is present, and +.Ql sync +for accurately synchronized signals (required for recording digital +audio). +.El +.Pp +The following tunables are applicable to HDSP 9632 devices only: +.Bl -tag -width indent +.It Va dev.hdsp.0.input_level +Select the sensitivity of the analog line input. +Available reference levels for the input signal are +.Ql LowGain , +.Ql +4dBu +and +.Ql -10dBV . +.It Va dev.hdsp.0.output_level +Select the gain level of the analog line output. +Available reference levels for the output signal are +.Ql HighGain , +.Ql +4dBu +and +.Ql -10dBV . +.It Va dev.hdsp.0.phones_level +Adjust the gain level of the phones output, separately from the analog line +output. +The signal can be lowered by 6 or 12 dB. +.El +.Pp +Where appropriate these sysctl values are modeled after official RME software on +other platforms, and adopt their terminology. +Consult the RME user manuals for additional information. +.Sh SEE ALSO +.Xr sound 4 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 15.0 . +.Sh AUTHORS +.An -nosplit +Based on +.Xr snd_hdspe 4 +originally written by +.An Ruslan Bukin <br@bsdpad.com> . +All adaptation to HDSP cards by +.An Florian Walpen <dev@submerge.ch> . diff --git a/share/man/man4/snd_hdspe.4 b/share/man/man4/snd_hdspe.4 index 676b945b8002..35dea518da64 100644 --- a/share/man/man4/snd_hdspe.4 +++ b/share/man/man4/snd_hdspe.4 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd February 13, 2012 +.Dd November 2, 2024 .Dt SND_HDSPE 4 .Os .Sh NAME @@ -57,10 +55,112 @@ driver supports the following audio devices: .Pp .Bl -bullet -compact .It -RME HDSPe AIO +RME HDSPe AIO (optional AO4S-192 and AI4S-192 extension boards) .It RME HDSPe RayDAT .El +.Pp +By default, each +.Xr pcm 4 +device corresponds to a physical port on the sound card. +For ADAT ports, 8 channel, 4 channel and 2 channel formats are supported. +The effective number of ADAT channels is 8 channels at single speed +(32kHz-48kHz), 4 channels at double speed (64kHz-96kHz), and 2 channels at +quad speed (128kHz-192kHz). +Depending on sample rate and channel format selected, not all pcm channels can +be mapped to ADAT channels and vice versa. +.Sh LOADER TUNABLES +These settings can be entered at the +.Xr loader 8 +prompt or in +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va hw.hdspe.unified_pcm +If set to 1, all physical ports are combined into one unified pcm device. +When opened in multi-channel audio software, this makes all ports available +at the same time, and fully synchronized. +For resulting channel numbers consult the following table: +.El +.Bl -column "HDSPe RayDAT" "Single Speed" "Double Speed" "Quad Speed" +.Sy "Sound Card" Ta Sy "Single Speed" Ta Sy "Double Speed" Ta Sy "Quad Speed" +.It "" Ta "Play | Rec" Ta "Play | Rec" Ta "Play | Rec" +.It HDSPe AIO Ta " 20 | 18" Ta " 16 | 14" Ta " 14 | 12" +.It HDSPe RayDAT Ta " 36 | 36" Ta " 20 | 20" Ta " 12 | 12" +.El +.Sh SYSCTL TUNABLES +These settings and informational values can be accessed at runtime with the +.Xr sysctl 8 +command. +If multiple RME HDSPe sound cards are installed, each device has a separate +configuration. +To adjust the following sysctl identifiers for a specific sound card, insert +the respective device number in place of +.Ql 0 . +.Bl -tag -width indent +.It Va dev.hdspe.0.sample_rate +Set a fixed sample rate from 32000, 44100, 48000, up to 192000. +This is usually required for digital connections (AES, S/PDIF, ADAT). +The default value of 0 adjusts the sample rate according to pcm device settings. +.It Va dev.hdspe.0.period +The number of samples processed per interrupt, from 32, 64, 128, up to 4096. +Setting a lower value here results in less latency, but increases system load +due to frequent interrupt processing. +Extreme values may cause audio gaps and glitches. +.It Va dev.hdspe.0.clock_list +Lists possible clock sources to sync with, depending on the hardware model. +This includes internal and external master clocks as well as incoming digital +audio signals like AES, S/PDIF and ADAT. +.It Va dev.hdspe.0.clock_preference +Select a preferred clock source from the clock list. +HDSPe cards will sync to this clock source when available, but fall back to +auto-sync with any other digital clock signal they receive. +Set this to +.Ql internal +if the HDSPe card should act as master clock. +.It Va dev.hdspe.0.clock_source +Shows the actual clock source in use (read only). +This differs from what is set as clock preference when in auto-sync mode. +.It Va dev.hdspe.0.sync_status +Display the current sync status of all external clock sources. +Status indications are +.Ql none +for no signal at all, +.Ql lock +for when a valid signal is present, and +.Ql sync +for accurately synchronized signals (required for recording digital +audio). +.El +.Pp +The following tunables are applicable to HDSPe AIO devices only: +.Bl -tag -width indent +.It Va dev.hdspe.0.input_level +Select the sensitivity of the analog line input. +Available reference levels for the input signal are +.Ql LowGain , +.Ql +4dBu +and +.Ql -10dBV . +.It Va dev.hdspe.0.output_level +Select the gain level of the analog line output. +Available reference levels for the output signal are +.Ql HighGain , +.Ql +4dBu +and +.Ql -10dBV . +.It Va dev.hdspe.0.phones_level +Adjust the gain level of the phones output, separately from the analog line +output. +Available reference levels for the output signal are +.Ql HighGain , +.Ql +4dBu +and +.Ql -10dBV . +.El +.Pp +Where appropriate these sysctl values are modeled after official RME software on +other platforms, and adopt their terminology. +Consult the RME user manuals for additional information. .Sh SEE ALSO .Xr sound 4 .Sh HISTORY @@ -74,3 +174,5 @@ The .Nm driver was written by .An Ruslan Bukin <br@bsdpad.com> . +.An Florian Walpen <dev@submerge.ch> +contributed clock source settings and restructured the pcm device mapping. diff --git a/share/man/man4/snd_ich.4 b/share/man/man4/snd_ich.4 index b03a0fd5569f..77e425f57ab6 100644 --- a/share/man/man4/snd_ich.4 +++ b/share/man/man4/snd_ich.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 6, 2009 .Dt SND_ICH 4 .Os diff --git a/share/man/man4/snd_maestro3.4 b/share/man/man4/snd_maestro3.4 index fa61a5b6f37f..3637f7406978 100644 --- a/share/man/man4/snd_maestro3.4 +++ b/share/man/man4/snd_maestro3.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 15, 2005 .Dt SND_MAESTRO3 4 .Os diff --git a/share/man/man4/snd_neomagic.4 b/share/man/man4/snd_neomagic.4 index 2865bbba344c..5a42e9e33811 100644 --- a/share/man/man4/snd_neomagic.4 +++ b/share/man/man4/snd_neomagic.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 1, 2005 .Dt SND_NEOMAGIC 4 .Os diff --git a/share/man/man4/snd_solo.4 b/share/man/man4/snd_solo.4 index 697611f32204..eed773edd36d 100644 --- a/share/man/man4/snd_solo.4 +++ b/share/man/man4/snd_solo.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 28, 2005 .Dt SND_SOLO 4 .Os diff --git a/share/man/man4/snd_spicds.4 b/share/man/man4/snd_spicds.4 index aea0c56e0935..15abc8f53319 100644 --- a/share/man/man4/snd_spicds.4 +++ b/share/man/man4/snd_spicds.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 28, 2007 .Dt SND_SPICDS 4 .Os diff --git a/share/man/man4/snd_t4dwave.4 b/share/man/man4/snd_t4dwave.4 index c96eefb1b6d7..ccf9dc022f56 100644 --- a/share/man/man4/snd_t4dwave.4 +++ b/share/man/man4/snd_t4dwave.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 1, 2005 .Dt SND_T4DWAVE 4 .Os diff --git a/share/man/man4/snd_uaudio.4 b/share/man/man4/snd_uaudio.4 index 17780692a669..00329a6d8e40 100644 --- a/share/man/man4/snd_uaudio.4 +++ b/share/man/man4/snd_uaudio.4 @@ -27,9 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd November 12, 2016 +.Dd February 15, 2025 .Dt SND_UAUDIO 4 .Os .Sh NAME @@ -53,24 +51,94 @@ snd_uaudio_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for -.Tn USB -audio class devices and -.Tn USB -MIDI class devices. +driver provides support for USB audio class devices and USB MIDI class devices. +.Pp +A USB audio device consists of a number of components: input terminals (e.g.\& +USB digital input), output terminals (e.g.\& speakers), and a number of units +in between (e.g.\& volume control). .Pp -A -.Tn USB -audio device consists of a number of components: -input terminals (e.g.\& USB digital input), output terminals (e.g.\& -speakers), and a number of units in between (e.g.\& volume control). +If the device supports multiple configurations, and there have been no +user-supplied values specified through the +.Xr sysctl 8 +interface, the driver will select the best matching configuration supported by +the device during attach. +"Best" means the configuration with the most channels and highest quality in +sample rate and sample size. .Pp Refer to the .Ql USB Audio Class Specification for more information. +.Sh SYSCTL VARIABLES +The following settings can be entered at the +.Xr loader 8 +prompt or in +.Xr loader.conf 5 +and can also be changed at runtime with the +.Xr sysctl 8 +command. +For a change to take effect during runtime, the device has to be re-attached. +.Bl -tag -width indent +.It Va hw.usb.uaudio.buffer_ms +Period of audio data processed at once, in milliseconds, from 1 to 8 (default +is 4). +Lower values mean less latency, but this can result in audible gaps due to +frequent CPU wakeups. +.It Va hw.usb.uaudio.default_bits +Preferred sample size in bits, from 0 to 32 (default is 0). +A value of 0 sets the sample size to the maximum supported sample size. +.Pp +Set this to select a smaller sample size if the device supports multiple sample +sizes. +.It Va hw.usb.uaudio.default_channels +Preferred number of sample channels, from 0 to 64 (default is 0). +USB 1.1 devices are limited to 4 channels due to bandwidth constraints, unless +a higher value is explicitly requested. +A value of 0 sets the sample channels to the maximum supported channel number. +.Pp +Set this to select a smaller channel number if the device supports multiple +channel configurations. +.It Va hw.usb.uaudio.default_rate +Preferred sample rate in Hz (default is 0). +If set to 0, the device's highest supported sample rate will be used. +.Pp +Note that if VCHANs are enabled, the sample rate will be overridden by +.Pa dev.pcm.%d.[play|rec].vchanrate +(see +.Xr sound 4 ) , +which can also be used to adjust the sample rate during runtime. +.Pp +If +.Pa hw.usb.uaudio.default_rate +is non-zero, +.Pa dev.pcm.%d.[play|rec].vchanrate +will use it as its maximum allowed value. +.It Va hw.usb.uaudio.handle_hid +Let +.Nm +handle HID volume keys, if any (default is 1). +.Bl -tag -width 2n +.It 0 +Disabled. +.It 1 +Enabled. +.El +.El +.Pp +If +.Xr usb 4 +has been compiled with +.Va USB_DEBUG +on, the following setting is also available: +.Bl -tag -width indent +.It Va hw.usb.uaudio.debug +Debug output level (default is 0). +.El .Sh SEE ALSO .Xr sound 4 , -.Xr usb 4 +.Xr usb 4 , +.Xr loader.conf 5 , +.Xr loader 8 , +.Xr sysctl 8 .Rs .%T "USB Audio Class Specifications" .%U http://www.usb.org/developers/docs/devclass_docs/ @@ -88,30 +156,9 @@ and modified for by .An Hiten Pandya Aq Mt hmp@FreeBSD.org . .Sh BUGS -The -.Tn PCM -framework in -.Fx -only supports synchronous device detach. -That means all mixer and DSP character devices belonging to a given -USB audio device must be closed when receiving an error on a DSP read, -a DSP write or a DSP IOCTL request. -Else the USB audio driver will wait for this to happen, preventing -enumeration of new devices on the parenting USB controller. -.Pp -Some USB audio devices might refuse to work properly unless the sample -rate is configured the same for both recording and playback, even if -only simplex is used. -See the -.Va dev.pcm.%d.[play|rec].vchanrate -sysctls. -.Pp -The -.Tn PCM -framework in +The PCM framework in .Fx -currently doesn't support the full set of USB audio mixer -controls. +currently does not support the full set of USB audio mixer controls. Some mixer controls are only available as .Va dev.pcm.%d.mixer sysctls. diff --git a/share/man/man4/snd_via8233.4 b/share/man/man4/snd_via8233.4 index 5637701beb37..5495854ac0e7 100644 --- a/share/man/man4/snd_via8233.4 +++ b/share/man/man4/snd_via8233.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 29, 2006 .Dt SND_VIA8233 4 .Os diff --git a/share/man/man4/snd_via82c686.4 b/share/man/man4/snd_via82c686.4 index 85c6c18e0b8d..4aa791215e7d 100644 --- a/share/man/man4/snd_via82c686.4 +++ b/share/man/man4/snd_via82c686.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 1, 2005 .Dt SND_VIA82C686 4 .Os diff --git a/share/man/man4/snd_vibes.4 b/share/man/man4/snd_vibes.4 index 9db6f0fe5b64..df6e3b754dfa 100644 --- a/share/man/man4/snd_vibes.4 +++ b/share/man/man4/snd_vibes.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 1, 2005 .Dt SND_VIBES 4 .Os diff --git a/share/man/man4/sndstat.4 b/share/man/man4/sndstat.4 index 92e17d86116a..5927e03ae439 100644 --- a/share/man/man4/sndstat.4 +++ b/share/man/man4/sndstat.4 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" This software was developed by Ka Ho Ng .\" under sponsorship from the FreeBSD Foundation. @@ -27,11 +27,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .\" Note: The date here should be updated whenever a non-trivial .\" change is made to the manual page. -.Dd April 15, 2021 +.Dd July 26, 2024 .Dt SNDSTAT 4 .Os .Sh NAME @@ -62,25 +60,63 @@ struct sndstioc_nv_arg { Here is an example of an nvlist object with explanations of the common fields: .Bd -literal -offset indent dsps (NVLIST ARRAY): 1 - from_user (BOOL): FALSE - nameunit (STRING): [pcm0] - devnode (STRING): [dsp0] - desc (STRING): [Generic (0x8086) (Analog Line-out)] - pchan (NUMBER): 1 (1) (0x1) - rchan (NUMBER): 0 (0) (0x0) - info_play (NVLIST): - min_rate (NUMBER): 48000 (48000) (0xbb80) - max_rate (NUMBER): 48000 (48000) (0xbb80) - formats (NUMBER): 16 (16) (0x10) - min_chn (NUMBER): 2 (2) (0x2) - max_chn (NUMBER): 2 (2) (0x2) - provider_info (NVLIST): - unit (NUMBER): 0 (0) (0x0) - bitperfect (BOOL): FALSE - pvchan (NUMBER): 1 (1) (0x1) - rvchan (NUMBER): 0 (0) (0x0) - provider (STRING): [sound(4)] - , + from_user (BOOL): FALSE + nameunit (STRING): [pcm0] + devnode (STRING): [dsp0] + desc (STRING): [Generic (0x8086) (Analog Line-out)] + pchan (NUMBER): 1 + rchan (NUMBER): 0 + info_play (NVLIST): + min_rate (NUMBER): 48000 + max_rate (NUMBER): 48000 + formats (NUMBER): 16 + min_chn (NUMBER): 2 + max_chn (NUMBER): 2 + provider_info (NVLIST): + unit (NUMBER): 0 + status (STRING): on hdaa0 + bitperfect (BOOL): FALSE + pvchan (BOOL): TRUE + pvchanrate (NUMBER): 48000 + pvchanformat (NUMBER): 0x00000010 + rvchan (BOOL): TRUE + rvchanrate (NUMBER): 48000 + rvchanformat (NUMBER): 0x00000010 + channel_info (NVLIST_ARRAY): 1 + name (STRING): dsp0.virtual_play.0 + parentchan (STRING): dsp0.play.0 + unit (NUMBER): 1 + caps (NUMBER): 0x073200 + latency (NUMBER): 2 + rate (NUMBER): 48000 + format (NUMBER): 0x201000 + pid (NUMBER): 1234 + comm (STRING): mpv + interrupts (NUMBER): 0 + feedcount (NUMBER): 0 + xruns (NUMBER): 0 + left_volume (NUMBER): 45 + right_volume (NUMBER): 45 + hwbuf_fmt (NUMBER): 0x200010 + hwbuf_rate (NUMBER): 48000 + hwbuf_size (NUMBER): 0 + hwbuf_blksz (NUMBER): 0 + hwbuf_blkcnt (NUMBER): 0 + hwbuf_free (NUMBER): 0 + hwbuf_ready (NUMBER): 0 + swbuf_fmt (NUMBER): 0x201000 + swbuf_rate (NUMBER): 48000 + swbuf_size (NUMBER): 16384 + swbuf_blksz (NUMBER): 2048 + swbuf_blkcnt (NUMBER): 8 + swbuf_free (NUMBER): 16384 + swbuf_ready (NUMBER): 0 + feederchain (STRING): + [userland -> + feeder_root(0x00201000) -> + feeder_format(0x00201000 -> 0x00200010) -> + feeder_volume(0x00200010) -> hardware] + provider (STRING): [sound(4)] .Ed .Bl -tag -width ".Dv provider_info" .It Dv from_user @@ -91,7 +127,7 @@ The device identification in the form of subsystem plus a unit number. .It Dv devnode The PCM audio device node relative path in devfs. .It Dv desc -The descripton of the PCM audio device. +The description of the PCM audio device. .It Dv pchan The number of playback channels supported by hardware. This can be 0 if this PCM audio device does not support playback at all. @@ -135,6 +171,93 @@ Provider-specific fields. This field may not exist if the PCM audio device is not provided by in-kernel interface. This field will not exist if the provider field is an empty string. +For the +.Xr sound 4 +provider, there are a number of name/value pairs inside this field: +.Bl -tag -width ".Dv channel_info" +.It Dv unit +Sound card unit. +.It Dv status +Status string. +Usually reports the driver the device is attached on. +.It Dv bitperfect +Whether the sound card has bit-perfect mode enabled. +.It Dv pvchan +Playback virtual channels enabled. +.It Dv pvchanrate +Playback virtual channel sample rate. +.It Dv pvchanformat +Playback virtual channel format. +.It Dv rvchan +Recording virtual channels enabled. +.It Dv rvchanrate +Recording virtual channel sample rate. +.It Dv rvchanformat +Recording virtual channel format. +.It Dv channel_info +Channel information. +There are a number of name/value pairs inside this field: +.Bl -tag -width ".Dv hwbuf_blkcnt" +.It Dv name +Channel name. +.It Dv parentchan +Parent channel name (e.g., in the case of virtual channels). +.It Dv unit +Channel unit. +.It Dv caps +OSS capabilities. +.It Dv latency +Latency. +.It Dv rate +Sampling rate. +.It Dv format +Sampling format. +.It Dv pid +PID of the process consuming the channel. +.It Dv comm +Name of the process consuming the channel. +.It Dv interrupts +Number of interrupts since the channel has been opened. +.It Dv xruns +Number of overruns/underruns, depending on channel direction. +.It Dv feedcount +Number of read/written bytes since the channel has been opened. +.It Dv left_volume +Left volume. +.It Dv right_volume +Right volume. +.It Dv hwbuf_format +Hardware buffer format. +.It Dv hwbuf_rate +Hardware buffer sample rate; +.It Dv hwbuf_size +Hardware buffer size. +.It Dv hwbuf_blksz +Hardware buffer block size. +.It Dv hwbuf_blkcnt +Hardware buffer block count. +.It Dv hwbuf_free +Free space in hardware buffer (in bytes). +.It Dv hwbuf_ready +Number of bytes ready to be read/written from hardware buffer. +.It Dv swbuf_format +Software buffer format. +.It Dv swbuf_rate +Software buffer sample rate; +.It Dv swbuf_size +Software buffer size. +.It Dv swbuf_blksz +Software buffer block size. +.It Dv swbuf_blkcnt +Software buffer block count. +.It Dv swbuf_free +Free space in software buffer (in bytes). +.It Dv swbuf_ready +Number of bytes ready to be read/written from software buffer. +.It Dv feederchain +Channel feeder chain. +.El +.El .It Dv provider A string specifying the provider of the PCm audio device. .El diff --git a/share/man/man4/snp.4 b/share/man/man4/snp.4 index ce0ef66c5721..3a42b93351e8 100644 --- a/share/man/man4/snp.4 +++ b/share/man/man4/snp.4 @@ -1,7 +1,5 @@ .\" -.\" $FreeBSD$ -.\" -.Dd November 5, 2008 +.Dd September 24, 2022 .Dt SNP 4 .Os .Sh NAME @@ -58,8 +56,6 @@ ioctl returns a positive value equal to the number of characters in a read buffer. Special values defined are: .Bl -tag -width ".Dv SNP_TTYCLOSE" -.It Dv SNP_OFLOW -device overflow occurred, device detached. .It Dv SNP_TTYCLOSE tty not attached. .It Dv SNP_DETACH @@ -89,11 +85,3 @@ Previous versions of .Nm were based on code written by .An Ugen J.S. Antsilevich Aq Mt ugen@NetVision.net.il . -.Sh BUGS -This version of -.Nm -does not return proper error codes when calling -.Dv FIONREAD . -It also does not allow -.Dv SNPSTTY -to detach itself from the TTY. diff --git a/share/man/man4/spigen.4 b/share/man/man4/spigen.4 index 8a8cc556be81..5ca5ef6b1329 100644 --- a/share/man/man4/spigen.4 +++ b/share/man/man4/spigen.4 @@ -23,8 +23,6 @@ .\" (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 August 21, 2020 .Dt SPIGEN 4 .Os diff --git a/share/man/man4/spkr.4 b/share/man/man4/spkr.4 index c1f0894cd5df..64dfee278de4 100644 --- a/share/man/man4/spkr.4 +++ b/share/man/man4/spkr.4 @@ -1,6 +1,4 @@ .\" -.\" $FreeBSD$ -.\" .Dd November 10, 2005 .Dt SPKR 4 .Os diff --git a/share/man/man4/splash.4 b/share/man/man4/splash.4 index fdc770f65ea8..0e52d9eb83c4 100644 --- a/share/man/man4/splash.4 +++ b/share/man/man4/splash.4 @@ -24,9 +24,7 @@ .\" (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 31, 2015 +.Dd July 09, 2024 .Dt SPLASH 4 .Os .Sh NAME @@ -205,7 +203,9 @@ have the following line in the kernel configuration file. .Pp .Dl device splash .Pp -Next, edit +Next for +.Xr syscons 4 , +edit .Pa /boot/loader.conf (see .Xr loader.conf 5 ) @@ -242,6 +242,18 @@ splash_txt_load="YES" bitmap_load="YES" bitmap_name="/boot/splash.bin" .Ed +.Pp +For +.Xr vt 4 , +edit +.Pa /boot/loader.conf +(see +.Xr loader.conf 5 ) +and include the following lines: +.Bd -literal -offset indent +splash="/boot/images/freebsd-logo-rev.png" +boot_mute="YES" +.Ed .\".Sh DIAGNOSTICS .Sh SEE ALSO .Xr vidcontrol 1 , @@ -292,10 +304,17 @@ and .Pa warp_saver modules were written by .An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org . +.Pa splash +png support for +.Xr vt 4 +was written by +.An Emmanuel Vadot Aq Mt manu@FreeBSD.org . .Sh CAVEATS -Both the splash screen and the screen saver work with +The screen saver works with .Xr syscons 4 only. +.Pp +For vt splash screen, only RGBA png are supported. .Sh BUGS If you load a screen saver while another screen saver has already been loaded, the first screen saver will not be automatically unloaded diff --git a/share/man/man4/ste.4 b/share/man/man4/ste.4 index 2839b00f43f9..ba82e22efd29 100644 --- a/share/man/man4/ste.4 +++ b/share/man/man4/ste.4 @@ -28,8 +28,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 24, 2009 .Dt STE 4 .Os diff --git a/share/man/man4/stf.4 b/share/man/man4/stf.4 index 8ffd2481a08b..c93600c15e0a 100644 --- a/share/man/man4/stf.4 +++ b/share/man/man4/stf.4 @@ -27,8 +27,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 16, 2021 .Dt STF 4 .Os @@ -203,7 +201,7 @@ The IPv4 WAN address. The prefix length of the IPv4 WAN address. .El .Pp -These can parameters are all configured through +These parameters are all configured through .Xr ifconfig 8 . .Pp The IPv6 address and prefix length can be configured like any other IPv6 address. diff --git a/share/man/man4/stge.4 b/share/man/man4/stge.4 index 527d241aa815..2dbaf70bc219 100644 --- a/share/man/man4/stge.4 +++ b/share/man/man4/stge.4 @@ -27,8 +27,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 23, 2010 .Dt STGE 4 .Os diff --git a/share/man/man4/sume.4 b/share/man/man4/sume.4 index 66c221cc2d08..219328a4f4c4 100644 --- a/share/man/man4/sume.4 +++ b/share/man/man4/sume.4 @@ -1,5 +1,5 @@ .\"- -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2020 Denis Salopek .\" @@ -24,8 +24,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 30, 2020 .Dt SUME 4 .Os diff --git a/share/man/man4/superio.4 b/share/man/man4/superio.4 index e242875e3b09..cee5e1640a0b 100644 --- a/share/man/man4/superio.4 +++ b/share/man/man4/superio.4 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2019 Andriy Gapon <avg@FreeBSD.org> .\" @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 11, 2019 .Dt SUPERIO 4 .Os @@ -50,6 +48,7 @@ superio_load="YES" Super I/O is an I/O controller that combines various low-bandwidth devices that can be functionally unrelated otherwise. A typical Super I/O can contain devices such as +.Pp .Bl -bullet -compact .It a floppy disk controller @@ -101,7 +100,46 @@ controllers and a bus driver for supported devices in those controllers. The .Nm driver supports a multitude of Super I/O controllers produced by Nuvoton, -formerly known as Winbond, and ITE. +formerly known as Winbond, and ITE, namely: +.Pp +.Bl -bullet -compact +.It +Fintek F81803 +.It +Fintek F81865 +.It +Nuvoton NCT5104D/NCT6102D/NCT6106D rev. A and B+ +.It +Nuvoton NCT5585D +.It +Nuvoton NCT6116D +.It +Nuvoton NCT6775 +.It +Nuvoton NCT6776 +.It +Nuvoton NCT6779 +.It +Nuvoton NCT6791 +.It +Nuvoton NCT6792 +.It +Nuvoton NCT6793 +.It +Nuvoton NCT6795 +.It +Nuvoton NCT6796D-E +.It +Winbond 83627HF/F/HG/G/S/THF/EHF/DHG/UHG/DHG-P +.It +Winbond 83637HF +.It +Winbond 83667HG/HG-B +.It +Winbond 83687THF +.It +Winbond 83697HF/UG +.El .Sh SEE ALSO .Xr superio 9 .Sh HISTORY diff --git a/share/man/man4/sym.4 b/share/man/man4/sym.4 index 222f3f54e96e..14eb1624ca2c 100644 --- a/share/man/man4/sym.4 +++ b/share/man/man4/sym.4 @@ -54,8 +54,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 26, 2020 .Dt SYM 4 .Os diff --git a/share/man/man4/syncache.4 b/share/man/man4/syncache.4 index 87b1bf35b8eb..e92502fd15ff 100644 --- a/share/man/man4/syncache.4 +++ b/share/man/man4/syncache.4 @@ -10,8 +10,6 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.\" $FreeBSD$ -.\" .Dd April 12, 2021 .Dt SYNCACHE 4 .Os diff --git a/share/man/man4/syncer.4 b/share/man/man4/syncer.4 index 30b38e40ee4a..326f14edae0f 100644 --- a/share/man/man4/syncer.4 +++ b/share/man/man4/syncer.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 14, 2000 .Dt SYNCER 4 .Os diff --git a/share/man/man4/syscons.4 b/share/man/man4/syscons.4 index bbc370ecd0d2..7e31680ced3f 100644 --- a/share/man/man4/syscons.4 +++ b/share/man/man4/syscons.4 @@ -24,15 +24,13 @@ .\" (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 May 25, 2022 +.Dd November 2, 2024 .Dt SYSCONS 4 .Os .Sh NAME .Nm syscons , .Nm sc -.Nd the console driver +.Nd the legacy console driver .Sh SYNOPSIS .Cd "options MAXCONS=N" .Cd "options SC_ALT_MOUSE_IMAGE" @@ -71,6 +69,14 @@ In In .Pa /boot/loader.conf : .Cd kern.vty=sc +.Sh DEPRECATION NOTICE +The +.Nm +console is deprecated, and will be removed in a future version of +.Fx . +Users are advised to migrate to the +.Xr vt 4 +console instead. .Sh DESCRIPTION The .Nm diff --git a/share/man/man4/sysmouse.4 b/share/man/man4/sysmouse.4 index e33021c15534..2955fbbf0e3d 100644 --- a/share/man/man4/sysmouse.4 +++ b/share/man/man4/sysmouse.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 25, 2014 .Dt SYSMOUSE 4 .Os diff --git a/share/man/man4/tap.4 b/share/man/man4/tap.4 index b7cfb9448da5..95a681a923d2 100644 --- a/share/man/man4/tap.4 +++ b/share/man/man4/tap.4 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" Based on PR#2411 .\" .Dd January 13, 2020 diff --git a/share/man/man4/tarfs.4 b/share/man/man4/tarfs.4 new file mode 100644 index 000000000000..1a2944de9063 --- /dev/null +++ b/share/man/man4/tarfs.4 @@ -0,0 +1,126 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2022 Klara, Inc. +.\" +.\" 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. +.\" +.Dd February 14, 2023 +.Dt TARFS 4 +.Os +.Sh NAME +.Nm tarfs +.Nd tarball filesystem +.Sh SYNOPSIS +To compile this driver into the kernel, place the following line in +your kernel configuration file: +.Bd -ragged -offset indent +.Cd "options TARFS" +.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 +tarfs_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver implements a read-only filesystem backed by a +.Xr tar 5 +file. +Currently, only POSIX archives, optionally compressed with +.Xr zstd 1 , +are supported. +.Pp +The preferred I/O size for +.Nm +filesystems can be adjusted using the +.Va vfs.tarfs.ioshift +sysctl setting and tunable. +Setting it to 0 will reset it to its default value. +Note that changes to this setting only apply to filesystems mounted +after the change. +.Pp +When the backing tar file is compressed with +.Xr zstd 1 , +I/O performance can be improved by ensuring that compressed data is +broken up into multiple frames. +This helps minimize unnecessary decompression work. +When using +.Xr bsdtar 1 +to create the tar file, this can be achieved using the +.Cm zstd:max-frame-size +and +.Cm zstd:frame-per-file +options. +Sensible frame sizes are powers of 2 between the system's base page size +(see +.Xr arch 7 ) +and the value of the +.Sy kern.maxphys +sysctl. +Smaller frames will generally yield a worse compression ratio and require extra +kernel memory to maintain an index, and larger frames will on average require +more CPU time to access data when performing random I/O. +.Sh DIAGNOSTICS +If enabled by the +.Dv TARFS_DEBUG +kernel option, the +.Va vfs.tarfs.debug +sysctl setting can be used to control debugging output from the +.Nm +driver. +Debugging output for individual sections of the driver can be enabled +by adding together the relevant values from the table below. +.Bl -column Value Description +.It 0x01 Ta Memory allocations +.It 0x02 Ta Checksum calculations +.It 0x04 Ta Filesystem operations (vfsops) +.It 0x08 Ta Path lookups +.It 0x10 Ta File operations (vnops) +.It 0x20 Ta General I/O +.It 0x40 Ta Decompression +.It 0x80 Ta Decompression index +.It 0x100 Ta Sparse file mapping +.It 0x200 Ta Bounce buffer usage +.El +.Sh SEE ALSO +.Xr tar 1 , +.Xr zstd 1 , +.Xr fstab 5 , +.Xr tar 5 , +.Xr mount 8 , +.Xr sysctl 8 +.Sh HISTORY +.An -nosplit +The +.Nm +driver was developed by +.An Stephen J. Kiernan Aq Mt stevek@FreeBSD.org +and +.An Dag-Erling Smørgrav Aq Mt des@FreeBSD.org +for Juniper Networks and Klara Systems. +This manual page was written by +.An Dag-Erling Smørgrav Aq Mt des@FreeBSD.org +for Juniper Networks and Klara Systems. diff --git a/share/man/man4/targ.4 b/share/man/man4/targ.4 index 45d5e59990b0..543597c81b18 100644 --- a/share/man/man4/targ.4 +++ b/share/man/man4/targ.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 13, 2011 .Dt TARG 4 .Os diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index cdb58c7cbacc..fcfda42908d8 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -31,10 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" -.Dd August 1, 2022 +.Dd June 27, 2025 .Dt TCP 4 .Os .Sh NAME @@ -175,7 +172,7 @@ socket option set. .Pp In addition to the facilities defined in RFC7413, this implementation supports a pre-shared key (PSK) mode of operation in which the TFO server requires the -client to be in posession of a shared secret in order for the client to be able +client to be in possession of a shared secret in order for the client to be able to successfully open TFO connections with the server. This is useful, for example, in environments where TFO servers are exposed to both internal and external clients and only wish to allow TFO connections from @@ -203,6 +200,35 @@ The alternate TCP stack must already be loaded in the kernel. To list the available TCP stacks, see .Va functions_available in the +.Sx FIB support +TCP sockets are FIB-aware. +They inherit the FIB of the process which created the socket, or that of the +listening socket for sockets created by +.Xr accept 2 . +In particular, the FIB is not inherited from that of the interface where the +initiating SYN packet was received. +When an incoming connection request arrives to a listening socket, the initial +handshake also occurs in the FIB of the listening socket, not that of the +received packet. +.Pp +By default, a TCP listening socket can accept connections originating from any +FIB. +If the +.Va net.inet.tcp.bind_all_fibs +tunable is set to 0, a listening socket will only accept connections +originating +from the FIB's listening socket. +Connection requests from other FIBs will be treated as though there is no +listening socket for the destination address and port. +In this mode, multiple listening sockets owned by the same user can listen on +the same address and port so long as they belong to different FIBs, similar to +the behavior of the +.Dv SO_REUSEPORT +socket option. +If the tunable is set to 0, all sockets added to a load-balancing group created +with the +.Dv SO_REUSEPORT_LB +socket option must belong to the same FIB. .Sx MIB (sysctl) Variables section further down. To list the default TCP stack, see @@ -282,6 +308,7 @@ this packetization may cause significant delays. The boolean option .Dv TCP_NODELAY defeats this algorithm. + .It Dv TCP_MAXSEG By default, a sender- and .No receiver- Ns Tn TCP @@ -291,6 +318,17 @@ The .Dv TCP_MAXSEG option allows the user to determine the result of this negotiation, and to reduce it if desired. +.It Dv TCP_MAXUNACKTIME +This +.Xr setsockopt 2 +option accepts an argument of +.Vt "u_int" +to set the per-socket interval, in seconds, in which the connection must +make progress. Progress is defined by at least 1 byte being acknowledged within +the set time period. If a connection fails to make progress, then the +.Tn TCP +stack will terminate the connection with a reset. Note that the default +value for this is zero which indicates no progress checks should be made. .It Dv TCP_NOOPT .Tn TCP usually sends a number of options in each packet, corresponding to @@ -371,7 +409,7 @@ Changes NUMA affinity filtering for an established TCP listen socket. This option takes a single integer argument which specifies the NUMA domain to filter on for this listen socket. -The argument can also have the follwing special values: +The argument can also have the following special values: .Bl -tag -width "Dv TCP_REUSPORT_LB_NUMA" .It Dv TCP_REUSPORT_LB_NUMA_NODOM Remove NUMA filtering for this listen socket. @@ -409,7 +447,7 @@ and the reverse source route is used in responding. The default congestion control algorithm for .Tn TCP is -.Xr cc_newreno 4 . +.Xr cc_cubic 4 . Other congestion control algorithms can be made available using the .Xr mod_cc 4 framework. @@ -423,6 +461,17 @@ branch of the MIB, which can also be read or modified with .Xr sysctl 8 . .Bl -tag -width ".Va v6pmtud_blackhole_mss" +.It Va ack_war_timewindow , ack_war_cnt +The challenge ACK throttling algorithm defined in RFC 5961 limits +the number of challenge ACKs sent per TCP connection to +.Va ack_war_cnt +during the time interval specified in milliseconds by +.Va ack_war_timewindow . +Setting +.Va ack_war_timewindow +or +.Va ack_war_cnt +to zero disables challenge ACK throttling. .It Va always_keepalive Assume that .Dv SO_KEEPALIVE @@ -455,13 +504,6 @@ See Maximum amount of time, in milliseconds, before a delayed ACK is sent. .It Va delayed_ack Delay ACK to try and piggyback it onto a data packet or another ACK. -.It Va do_lrd -Enable Lost Retransmission Detection for SACK-enabled sessions, disabled by -default. -Under severe congestion, a retransmission can be lost which then leads to a -mandatory Retransmission Timeout (RTO), followed by slow-start. -LRD will try to resend the repeatedly lost packet, preventing the time-consuming -RTO and performance reducing slow-start. .It Va do_prr Perform SACK loss recovery using the Proportional Rate Reduction (PRR) algorithm described in RFC6937. @@ -469,12 +511,6 @@ This improves the effectiveness of retransmissions particular in environments with ACK thinning or burst loss events, as chances to run out of the ACK clock are reduced, preventing lengthy and performance reducing RTO based loss recovery (default is true). -.It Va do_prr_conservative -While doing Proportional Rate Reduction, remain strictly in a packet conserving -mode, sending only one new packet for each ACK received. -Helpful when a misconfigured token bucket traffic policer causes persistent -high losses leading to RTO, but reduces PRR effectiveness in more common settings -(default is false). .It Va do_tcpdrain Flush packets in the .Tn TCP @@ -495,6 +531,13 @@ Outgoing connections will request ECN. Allow incoming connections to request ECN. Outgoing connections will not request ECN. (default) +.It 3 +Negotiate on incoming connection for Accurate ECN, ECN, or no ECN. +Outgoing connections will request Accurate ECN and fall back to +ECN depending on the capabilities of the server. +.It 4 +Negotiate on incoming connection for Accurate ECN, ECN, or no ECN. +Outgoing connections will not request ECN. .El .It Va ecn.maxretries Number of retries (SYN or SYN/ACK retransmits) before disabling ECN on a @@ -608,11 +651,6 @@ Defaults to 60 seconds. List of available TCP function blocks (TCP stacks). .It Va functions_default The default TCP function block (TCP stack). -.It Va functions_inherit_listen_socket_stack -Determines whether to inherit listen socket's TCP stack or use the current -system default TCP stack, as defined by -.Va functions_default . -Default is true. .It Va hostcache The TCP host cache is used to cache connection details and metrics to improve future performance of connections between the same hosts. @@ -659,7 +697,7 @@ cache. Time in seconds between pruning expired host cache entries. Defaults to 300 (5 minutes). .It Va hostcache.purge -Expire all entires on next pruning of host cache entries. +Expire all entries on next pruning of host cache entries. Any non-zero setting will be reset to zero, once the purge is running. .Bl -tag -compact @@ -696,6 +734,9 @@ Default is false. .It Va insecure_syn Use criteria defined in RFC793 instead of RFC5961 for accepting SYN segments. Default is false. +.It Va insecure_ack +Use criteria defined in RFC793 for validating SEG.ACK. +Default is false. .It Va isn_reseed_interval The interval (in seconds) specifying how often the secret data used in RFC 1948 initial sequence number calculations should be reseeded. @@ -734,47 +775,43 @@ A value of 2 results in any packets to closed ports being logged. Any value not listed above disables the logging (default is 0, i.e., the logging is disabled). -.It Va maxtcptw -When a TCP connection enters the -.Dv TIME_WAIT -state, its associated socket structure is freed, since it is of -negligible size and use, and a new structure is allocated to contain a -minimal amount of information necessary for sustaining a connection in -this state, called the compressed TCP -.Dv TIME_WAIT -state. -Since this structure is smaller than a socket structure, it can save -a significant amount of system memory. -The -.Va net.inet.tcp.maxtcptw -MIB variable controls the maximum number of these structures allocated. -By default, it is initialized to -.Va kern.ipc.maxsockets -/ 5. .It Va minmss Minimum TCP Maximum Segment Size; used to prevent a denial of service attack from an unreasonably low MSS. .It Va msl The Maximum Segment Lifetime, in milliseconds, for a packet. +.It Va msl_local +The Maximum Segment Lifetime, in milliseconds, for a packet when both endpoints +are local. +.Va msl_local +is only used if +.Va nolocaltimewait , +which is deprecated, is zero. .It Va mssdflt The default value used for the TCP Maximum Segment Size .Pq Dq MSS for IPv4 when no advice to the contrary is received from MSS negotiation. -.It Va newcwd +.It Va newcwv Enable the New Congestion Window Validation mechanism as described in RFC 7661. This gently reduces the congestion window during periods, where TCP is application limited and the network bandwidth is not utilized completely. That prevents self-inflicted packet losses once the application starts to transmit data at a higher speed. .It Va nolocaltimewait -Suppress creation of compressed TCP +Suppress the creation of TCP .Dv TIME_WAIT states for connections in which both endpoints are local. +The default is 0. +.Va nolocaltimewait +is deprecated and will be removed in +.Fx 16 . +.Va msl_local +can be used instead. .It Va path_mtu_discovery Enable Path MTU Discovery. .It Va pcbcount -Number of active process control blocks +Number of active protocol control blocks (read-only). .It Va perconn_stats_enable Controls the default collection of statistics for all connections using the @@ -841,17 +878,19 @@ Maximum size of automatic receive buffer. Initial .Tn TCP receive window (buffer size). -.It Va require_unique_port -Require unique ephemeral port for outgoing connections; -otherwise, the 4-tuple of local and remote ports and addresses must be unique. -Requiring a unique port limits the number of outgoing connections. +.It Va retries +Maximum number of consecutive timer based retransmits sent after a data +segment is lost (default and maximum is 12). .It Va rexmit_drop_options Drop TCP options from third and later retransmitted SYN segments of a connection. -.It Va rexmit_initial , rexmit_min , rexmit_slop +.It Va rexmit_initial , rexmit_min , rexmit_slop , rexmit_max Adjust the retransmit timer calculation for .Tn TCP . -The slop is +A new connection starts with timer set to +.Va rexmit_initial . +The +.Va rexmit_slop typically added to the raw calculation to take into account occasional variances that the .Tn SRTT @@ -871,9 +910,25 @@ For this reason, we use 200ms of slop and a near-0 minimum, which gives us an effective minimum of 200ms (similar to .Tn Linux ) . The initial value is used before an RTT measurement has been performed. +The +.Va rexmit_min +and +.Va rexmit_max +set minimum and maximum timer values that a connection may have. .It Va rfc1323 Implement the window scaling and timestamp options of RFC 1323/RFC 7323 -(default is true). +(default is 1). +Settings: +.Bl -tag -compact +.It 0 +Disable window scaling and timestamp option. +.It 1 +Enable window scaling and timestamp option. +.It 2 +Enable only window scaling. +.It 3 +Enable only timestamp option. +.El .It Va rfc3042 Enable the Limited Transmit algorithm as described in RFC 3042. It helps avoid timeouts on lossy links and also when the congestion window @@ -898,6 +953,13 @@ Global number of TCP SACK holes currently allocated. .It Va sack.globalmaxholes Maximum number of SACK holes per system, across all connections. Defaults to 65536. +.It Va sack.lrd +Enable Lost Retransmission Detection for SACK-enabled sessions, enabled by +default. +Under severe congestion, a retransmission can be lost which then leads to a +mandatory Retransmission Timeout (RTO), followed by slow-start. +LRD will try to resend the repeatedly lost packet, preventing the time-consuming +RTO and performance reducing slow-start or purge of the SACK scoreboard. .It Va sack.maxholes Maximum number of SACK holes per connection. Defaults to 128. @@ -1029,6 +1091,7 @@ when trying to use a TCP function block that is not available; .El .Sh SEE ALSO .Xr getsockopt 2 , +.Xr setfib 2 , .Xr socket 2 , .Xr stats 3 , .Xr sysctl 3 , @@ -1041,6 +1104,7 @@ when trying to use a TCP function block that is not available; .Xr siftr 4 , .Xr syncache 4 , .Xr tcp_bbr 4 , +.Xr tcp_rack 4 , .Xr setkey 8 , .Xr sysctl 8 , .Xr tcp_functions 9 @@ -1071,6 +1135,13 @@ when trying to use a TCP function block that is not available; .%T "The Addition of Explicit Congestion Notification (ECN) to IP" .%O "RFC 3168" .Re +.Rs +.%A "A. Ramaiah" +.%A "R. Stewart" +.%A "M. Dalal" +.%T "Improving TCP's Robustness to Blind In-Window Attacks" +.%O "RFC 5961" +.Re .Sh HISTORY The .Tn TCP diff --git a/share/man/man4/tcp_bbr.4 b/share/man/man4/tcp_bbr.4 index 604e205820fb..fb1023dc81c6 100644 --- a/share/man/man4/tcp_bbr.4 +++ b/share/man/man4/tcp_bbr.4 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2020, Gordon Bergling +.\" Copyright (c) 2020, Gordon Bergling <gbe@FreeBSD.org> .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -22,21 +22,13 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd September 24, 2020 +.Dd December 17, 2023 .Dt TCP_BBR 4 .Os .Sh NAME .Nm tcp_bbr .Nd TCP Bottleneck Bandwidth and Round-Trip Time Algorithm .Sh SYNOPSIS -To use this TCP stack you have to place the following line in your -kernel configuration file: -.Bd -ragged -offset indent -.Cd "options TCPHPTS" -.Ed -.Pp To load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent @@ -129,6 +121,7 @@ Minimum RTO in ms. .Xr h_ertt 4 , .Xr mod_cc 4 , .Xr tcp 4 , +.Xr tcp_rack 4 , .Xr mod_cc 9 .Rs .%A "Neal Cardwell" diff --git a/share/man/man4/tcp_rack.4 b/share/man/man4/tcp_rack.4 new file mode 100644 index 000000000000..73995d930a9a --- /dev/null +++ b/share/man/man4/tcp_rack.4 @@ -0,0 +1,162 @@ +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2022, Gordon Bergling <gbe@FreeBSD.org> +.\" +.\" 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. +.\" +.Dd March 18, 2024 +.Dt TCP_RACK 4 +.Os +.Sh NAME +.Nm tcp_rack +.Nd TCP RACK-TLP Loss Detection Algorithm for TCP +.Sh SYNOPSIS +To load the TCP stack as a module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +tcp_rack_load="YES" +.Ed +.Pp +To enable the TCP stack, place the following line in the +.Xr sysctl.conf 5 : +.Bd -literal -offset indent +net.inet.tcp.functions_default=rack +.Ed +.Sh DESCRIPTION +RACK-TLP uses per-segment transmit timestamps and selective +acknowledgments (SACKs) and has two parts. +Recent Acknowledgment (RACK) starts fast recovery quickly +using time-based inferences derived from acknowledgment (ACK) +feedback, and Tail Loss Probe (TLP) leverages RACK +and sends a probe packet to trigger ACK feedback to avoid +retransmission timeout (RTO) events. +.Pp +Compared to the widely used duplicate acknowledgment (DupAck) +threshold approach, RACK-TLP detects losses more efficiently +when there are application-limited flights of data, lost +retransmissions, or data packet reordering events. +.Pp +It is intended to be an alternative to the +DupAck threshold approach. +.Sh MIB Variables +The algorithm exposes the following scopes in the +.Va net.inet.tcp.rack +branch of the +.Xr sysctl 3 +MIB: +.Bl -tag -width indent +.It Va net.inet.tcp.rack.misc +Misc related controls +.It Va net.inet.tcp.rack.features +Feature controls +.It Va net.inet.tcp.rack.measure +Measure related controls +.It Va net.inet.tcp.rack.timers +Timer related controls +.It Va net.inet.tcp.rack.tlp +TLP and Rack related Controls +.It Va net.inet.tcp.rack.timely +Rack Timely RTT Controls +.It Va net.inet.tcp.rack.hdwr_pacing +Pacing related Controls +.It Va net.inet.tcp.rack.pacing +Pacing related Controls +.It Va net.inet.tcp.rack.tp +Rack tracepoint facility +.It Va net.inet.tcp.rack.probertt +ProbeRTT related Controls +.It Va net.inet.tcp.rack.stats +Rack Counters +.It Va net.inet.tcp.rack.sack_attack +Rack Sack Attack Counters and Controls +.El +.Pp +Besides the variables within the above scopes the following +variables are also exposed in the +.Va net.inet.tcp.rack +branch: +.Bl -tag -width indent +.It Va net.inet.tcp.rack.clear +Clear counters +.It Va net.inet.tcp.rack.opts +RACK Option Stats +.It Va net.inet.tcp.rack.outsize +MSS send sizes +.It Va net.inet.tcp.rack.req_measure_cnt +If doing dynamic pacing, how many measurements +must be in before we start pacing? +.It Va net.inet.tcp.rack.use_pacing +If set we use pacing, if clear we use only the original burst mitigation +.It Va net.inet.tcp.rack.rate_sample_method +What method should we use for rate sampling 0=high, 1=low +.El +.Sh SEE ALSO +.Xr cc_chd 4 , +.Xr cc_cubic 4 , +.Xr cc_hd 4 , +.Xr cc_htcp 4 , +.Xr cc_newreno 4 , +.Xr cc_vegas 4 , +.Xr h_ertt 4 , +.Xr mod_cc 4 , +.Xr tcp 4 , +.Xr tcp_bbr 4 , +.Xr mod_cc 9 +.Rs +.%A "Neal Cardwell" +.%A "Yuchung Cheng" +.%A "Nandita Dukkipati" +.%A "Priyaranjan Jha" +.%T "The RACK-TLP Loss Detection Algorithm for TCP" +.%O "RFC 8985" +.%D "February 2021" +.Re +.Rs +.%A "M. Allman" +.%A "V. Paxson" +.%A "E. Blanton" +.%T "TCP Congestion Control" +.%O "RFC 5681" +.%D "September 2009" +.Re +.Rs +.%A "M. Mathis" +.%A "Nandita Dukkipati" +.%A "Yuchung Cheng" +.%T "Proportional Rate Reduction for TCP" +.%O "RFC 6937" +.%D "May 2013" +.Re +.Sh HISTORY +The +.Nm +congestion control module first appeared in +.Fx 13.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +congestion control module was written by +.An Randall Stewart Aq Mt rrs@FreeBSD.org +and sponsored by Netflix, Inc. +This manual page was written by +.An Gordon Bergling Aq Mt gbe@FreeBSD.org . diff --git a/share/man/man4/tdfx.4 b/share/man/man4/tdfx.4 index 76dbdd3d2f29..663cd5827ce3 100644 --- a/share/man/man4/tdfx.4 +++ b/share/man/man4/tdfx.4 @@ -1,6 +1,4 @@ .\" -.\" $FreeBSD$ -.\" .Dd February 19, 2001 .Dt TDFX 4 .Os diff --git a/share/man/man4/termios.4 b/share/man/man4/termios.4 index c9993a6dc14c..08b0b81126c3 100644 --- a/share/man/man4/termios.4 +++ b/share/man/man4/termios.4 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)termios.4 8.4 (Berkeley) 4/19/94 -.\" $FreeBSD$ -.\" .Dd June 28, 2020 .Dt TERMIOS 4 .Os @@ -885,6 +882,8 @@ following masks: /* any char will restart after stop */ .It Dv IMAXBEL /* ring bell on input queue full */ +.It Dv IUTF8 +/* assume input is UTF-8 encoded */ .El .Pp In the context of asynchronous serial data transmission, a break diff --git a/share/man/man4/textdump.4 b/share/man/man4/textdump.4 index 9b8f88359a4a..bd479d6a6d05 100644 --- a/share/man/man4/textdump.4 +++ b/share/man/man4/textdump.4 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 18, 2019 .Dt TEXTDUMP 4 .Os diff --git a/share/man/man4/ti.4 b/share/man/man4/ti.4 index a589ec048ebf..bc22963330a0 100644 --- a/share/man/man4/ti.4 +++ b/share/man/man4/ti.4 @@ -28,8 +28,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 14, 2011 .Dt TI 4 .Os @@ -299,7 +297,7 @@ driver also includes a character device interface that can be used for additional diagnostics, configuration and debugging. With this character device interface, and a specially patched version of -.Xr gdb 1 , +.Xr gdb 1 Pq Pa ports/devel/gdb , the user can debug firmware running on the Tigon board. .Pp diff --git a/share/man/man4/timecounters.4 b/share/man/man4/timecounters.4 index 52c68d7b44a5..998bb95d8928 100644 --- a/share/man/man4/timecounters.4 +++ b/share/man/man4/timecounters.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 12, 2015 .Dt TIMECOUNTERS 4 .Os diff --git a/share/man/man5/tmpfs.5 b/share/man/man4/tmpfs.4 index b934fe02868d..7d24f7db9aea 100644 --- a/share/man/man5/tmpfs.5 +++ b/share/man/man4/tmpfs.4 @@ -1,6 +1,6 @@ .\"- .\" Copyright (c) 2007 Xin LI -.\" Copyright (c) 2017 The FreeBSD Foundation, Inc. +.\" Copyright (c) 2017 The FreeBSD Foundation .\" .\" Part of this documentation was written by .\" Konstantin Belousov <kib@FreeBSD.org> under sponsorship @@ -51,10 +51,8 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 21, 2022 -.Dt TMPFS 5 +.Dd September 18, 2023 +.Dt TMPFS 4 .Os .Sh NAME .Nm tmpfs @@ -110,36 +108,79 @@ The following options are available when mounting .Nm file systems: -.Bl -tag -width "It Cm maxfilesize" +.Bl -tag -width "maxfilesize" +.It Cm easize +Set the maximum memory size used by extended attributes in bytes. +The default is 16 megabytes. +.It Cm export +Accept the +.Cm export +option for compatibility with +.Xr nfsv4 4 . +This option does nothing. .It Cm gid -Specifies the group ID of the root inode of the file system. -Defaults to the mount point's GID. -.It Cm uid -Specifies the user ID of the root inode of the file system. -Defaults to the mount point's UID. -.It Cm mode -Specifies the mode (in octal notation) of the root inode of the file system. -Defaults to the mount point's mode. -.It Cm nonc -Do not use namecache to resolve names to files for the created mount. -This saves memory, but currently might impair scalability for highly -used mounts on large machines. +Set the group ID of the root inode of the file system. +The default is the mount point's GID. .It Cm inodes -Specifies the maximum number of nodes available to the file system. +Set the maximum number of nodes available to the file system. If not specified, the file system chooses a reasonable maximum based on the file system size, which can be limited with the .Cm size option. +.It Cm maxfilesize +Set the maximum file size in bytes. +The default is the maximum possible value. +.It Cm mode +Set the mode (in octal notation) of the root inode of the file system. +The default is the mount point's mode. +.It Cm nomtime +Disable the tracking of mtime updates caused by writes to the +shared mapped areas backed by +.Nm +files. +This option removes periodic scans, +which downgrade read-write-mapped pages to read-only to note the writes. +.It Cm nonc +Do not use namecache to resolve names to files for the created mount. +This saves memory, but currently might impair scalability for highly +used mounts on large machines. +.It Cm nosymfollow +Do not follow +.Xr symlink 7 Ap s +on the mounted file system. +.It Cm pgread +Enable pgcache read for the mount. .It Cm size -Specifies the total file system size in bytes, unless suffixed +Set the total file system size in bytes, unless suffixed with one of k, m, g, t, or p, which denote byte, kilobyte, megabyte, gigabyte, terabyte and petabyte respectively. If zero (the default) or a value larger than SIZE_MAX - PAGE_SIZE is given, the available amount of memory (including main memory and swap space) will be used. -.It Cm maxfilesize -Specifies the maximum file size in bytes. -Defaults to the maximum possible value. +.It Cm uid +Set the user ID of the root inode of the file system. +The default is the mount point's UID. +.It Cm union +Refer to +.Xr mount 8 . +.El +.Sh SYSCTL VARIABLES +The following +.Xr sysctl 8 +variables are available: +.Bl -tag -width indent +.It Va vfs.tmpfs.memory_percent +The percentage of memory plus swap space available at kernel file system +initialization that can be used by a file system with a size of 0. +When this amount of space in use is reached, new files cannot be created +and files cannot be extended. +The default is 95%. +Changing this value also changes +.Va vfs.tmpfs.memory_reserved . +.It Va vfs.tmpfs.memory_reserved +The currently-reserved amount of memory plus swap space +based on the memory percentage. +The minimum is compiled into the system, and defaults to 4 MB. .El .Sh EXAMPLES Mount a diff --git a/share/man/man4/tpm.4 b/share/man/man4/tpm.4 index e493c7232d4c..8736d24d1ee1 100644 --- a/share/man/man4/tpm.4 +++ b/share/man/man4/tpm.4 @@ -13,8 +13,6 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" .Dd October 31, 2018 .Dt TPM 4 .Os diff --git a/share/man/man4/tslog.4 b/share/man/man4/tslog.4 index 5b0f5fbb1264..e7f69a8d6f3f 100644 --- a/share/man/man4/tslog.4 +++ b/share/man/man4/tslog.4 @@ -1,4 +1,4 @@ -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2022 Mateusz Piotrowski <0mp@FreeBSD.org> .\" @@ -101,13 +101,13 @@ first appeared in .Fx 12.0 . Support for tracing boot loaders and userland process was added in -.Fx 14.0 . +.Fx 13.2 . .Ss TSLOG vs. Boottrace .Nm is oriented towards system developers while .Xr boottrace 4 is meant to be easy to use by system administrators. -Both faciliities provide an overview of timing and resource usage of the boot +Both facilities provide an overview of timing and resource usage of the boot process. .Ss TSLOG vs. DTrace .Xr dtrace 1 diff --git a/share/man/man4/tty.4 b/share/man/man4/tty.4 index 593920d807b7..caa31835a331 100644 --- a/share/man/man4/tty.4 +++ b/share/man/man4/tty.4 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)tty.4 8.3 (Berkeley) 4/19/94 -.\" $FreeBSD$ -.\" .Dd April 3, 2022 .Dt TTY 4 .Os @@ -290,7 +287,7 @@ and is the means by which most full\&-screen oriented programs determine the screen size. The .Va winsize -structure is defined in +structure is provided by .In sys/ioctl.h . .It Dv TIOCSWINSZ Fa struct winsize *ws Set the window size associated with the terminal to be the value in @@ -375,6 +372,7 @@ variables. .Xr stty 1 , .Xr ioctl 2 , .Xr ng_tty 4 , +.Xr pts 4 , .Xr pty 4 , .Xr termios 4 , .Xr getty 8 diff --git a/share/man/man4/tun.4 b/share/man/man4/tun.4 index a0c60647e86c..58f67cb20acb 100644 --- a/share/man/man4/tun.4 +++ b/share/man/man4/tun.4 @@ -1,5 +1,4 @@ .\" $NetBSD: tun.4,v 1.1 1996/06/25 22:17:37 pk Exp $ -.\" $FreeBSD$ .\" Based on PR#2411 .\" .Dd March 17, 2020 diff --git a/share/man/man4/twe.4 b/share/man/man4/twe.4 deleted file mode 100644 index 9f2eadfb2662..000000000000 --- a/share/man/man4/twe.4 +++ /dev/null @@ -1,275 +0,0 @@ -.\" -.\" Copyright (c) 2000 Michael Smith -.\" Copyright (c) 2000 BSDi -.\" 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. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 August 15, 2004 -.Dt TWE 4 -.Os -.Sh NAME -.Nm twe -.Nd 3ware 5000/6000/7000/8000 series PATA/SATA RAID adapter driver -.Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your -kernel configuration file: -.Bd -ragged -offset indent -.Cd "device pci" -.Cd "device twe" -.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 -twe_load="YES" -.Ed -.Sh DESCRIPTION -The -.Nm -driver provides support for AMCC's 3ware 5000/6000/7000/8000 series -PATA/SATA RAID adapters. -These adapters were formerly known as -.Dq 3ware Escalade . -.Pp -These devices support 2, 4, 8, or 12 ATA disk drives -and provide RAID0 (striping) and RAID1 (mirroring) functionality. -.Sh HARDWARE -The -.Nm -driver supports the following PATA/SATA RAID -controllers: -.Pp -.Bl -bullet -compact -.It -AMCC's 3ware 5000 series -.It -AMCC's 3ware 6000 series -.It -AMCC's 3ware 7000-2 -.It -AMCC's 3ware 7006-2 -.It -AMCC's 3ware 7500-4LP -.It -AMCC's 3ware 7500-8 -.It -AMCC's 3ware 7500-12 -.It -AMCC's 3ware 7506-4LP -.It -AMCC's 3ware 7506-8 -.It -AMCC's 3ware 7506-12 -.It -AMCC's 3ware 8006-2LP -.It -AMCC's 3ware 8500-4LP -.It -AMCC's 3ware 8500-8 -.It -AMCC's 3ware 8500-12 -.It -AMCC's 3ware 8506-4LP -.It -AMCC's 3ware 8506-8 -.It -AMCC's 3ware 8506-8MI -.It -AMCC's 3ware 8506-12 -.It -AMCC's 3ware 8506-12MI -.El -.Sh DIAGNOSTICS -.Ss Controller initialisation phase -.Bl -diag -.It twe%d: microcontroller not ready -.Pp -The controller's onboard CPU is not reporting that it is ready; -this may be due to either a board or system failure. -Initialisation has failed. -.It twe%d: no attention interrupt -.It twe%d: can't drain AEN queue -.It twe%d: reset not reported -.It twe%d: controller errors detected -.It twe%d: can't drain response queue -.It twe%d: reset %d failed, trying again -.Pp -The controller is not responding correctly to -the driver's attempts to reset and initialise it. -This process is retried several times. -.It twe%d: can't initialise controller, giving up -.Pp -Several attempts to reset and initialise the controller have failed; -initialisation has failed -and the driver will not attach to this controller. -.El -.Ss Driver initialisation/shutdown phase -.Bl -diag -.It twe%d: register window not available -.It twe%d: can't allocate register window -.It twe%d: can't allocate parent DMA tag -.It twe%d: can't allocate interrupt -.It twe%d: can't set up interrupt -.It twe%d: can't establish configuration hook -.Pp -A resource allocation error occurred while initialising the driver; -initialisation has failed -and the driver will not attach to this controller. -.It twe%d: can't detect attached units -.Pp -Fetching the list of attached units failed; initialisation has failed. -.It twe%d: error fetching capacity for unit %d -.It twe%d: error fetching state for unit %d -.It twe%d: error fetching descriptor size for unit %d -.It twe%d: error fetching descriptor for unit %d -.It twe%d: device_add_child failed -.It twe%d: bus_generic_attach returned %d -.Pp -Creation of the disk devices failed, either due to communication -problems with the adapter or due to resource shortage; -attachment of one or more units may have been aborted. -.El -.Ss Operational phase -.Bl -diag -.It twe%d: command completed - %s -.El -.Pp -A command was reported completed with a warning by the controller. -The warning may be one of: -.Bl -diag -.It redundant/inconsequential request ignored -.It failed to write zeroes to LBA 0 -.It failed to profile TwinStor zones -.El -.Bl -diag -.It twe%d: command failed - %s -.El -.Pp -A command was reported as failed by the controller. -The failure message may be one of: -.Bl -diag -.It aborted due to system command or reconfiguration -.It aborted -.It access error -.It access violation -.It device failure -.It controller error -.It timed out -.It invalid unit number -.It unit not available -.It undefined opcode -.It request incompatible with unit -.It invalid request -.It firmware error, reset requested -.Pp -The command will be returned to the operating system after a -fatal error. -.El -.Bl -diag -.It twe%d: command failed submission - controller wedged -.Pp -A command could not be delivered to the controller because -the controller is unresponsive. -.It twe%d: AEN: <%s> -.El -.Pp -The controller has reported a change in status using an AEN -(Asynchronous Event Notification). -The following AENs may be reported: -.Bl -diag -.It queue empty -.It soft reset -.It degraded mirror -.It controller error -.It rebuild fail -.It rebuild done -.It incomplete unit -.It initialisation done -.It unclean shutdown detected -.It drive timeout -.It drive error -.It rebuild started -.It aen queue full -.Pp -AENs are also queued internally for use by management tools. -.El -.Bl -diag -.It twe%d: error polling for signalled AENs -.Pp -The controller has reported -that one or more status messages are ready for the driver, -but attempting to fetch one of these has returned an error. -.It twe%d: AEN queue overflow, lost AEN <%s> -.Pp -A status message was retrieved from the controller, -but there is no more room to queue it in the driver. -The message is lost (but will be printed to the console). -.It twe%d: missing expected status bits %s -.It twe%d: unexpected status bits %s -.Pp -A check of the controller's status bits -indicates an unexpected condition. -.It twe%d: host interrupt -.Pp -The controller has signalled a host interrupt. -This serves an unknown purpose and is ignored. -.It twe%d: command interrupt -.Pp -The controller has signalled a command interrupt. -This is not used, and will be disabled. -.It twe%d: controller reset in progress... -.Pp -The controller is being reset by the driver. -Typically this is done when the driver has determined that the -controller is in an unrecoverable state. -.It twe%d: can't reset controller, giving up -.Pp -The driver has given up on resetting the controller. -No further I/O will be handled. -.It controller reset done, %d commands restarted -.Pp -The controller was successfully reset, -and outstanding commands were restarted. -.El -.Sh AUTHORS -.An -nosplit -The -.Nm -driver and manual page were written by -.An Michael Smith Aq Mt msmith@FreeBSD.org . -.Pp -Extensive work done on the driver by -.An Vinod Kashyap Aq Mt vkashyap@FreeBSD.org -and -.An Paul Saab Aq Mt ps@FreeBSD.org . -.Sh BUGS -The controller cannot handle I/O transfers -that are not aligned to a 512-byte boundary. -In order to support raw device access from user-space, -the driver will perform alignment fixup on non-aligned data. -This process is inefficient, -and thus in order to obtain best performance -user-space applications accessing the device -should do so with aligned buffers. diff --git a/share/man/man4/tws.4 b/share/man/man4/tws.4 index 40e49bd88121..35ac30910cd1 100644 --- a/share/man/man4/tws.4 +++ b/share/man/man4/tws.4 @@ -24,8 +24,6 @@ .\"OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\"SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 4, 2011 .Dt TWS 4 .Os diff --git a/share/man/man4/u3g.4 b/share/man/man4/u3g.4 index 53094929074f..51c883b8378e 100644 --- a/share/man/man4/u3g.4 +++ b/share/man/man4/u3g.4 @@ -1,3 +1,5 @@ +.\"- +.\" SPDX-License-Identifier: ISC .\" .\" Copyright (c) 2008 AnyWi Technologies .\" All rights reserved. @@ -16,14 +18,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" -.Dd June 15, 2021 +.Dd December 5, 2024 .Dt U3G 4 .Os .Sh NAME .Nm u3g -.Nd USB support for 3G datacards +.Nd USB support for 3G and 4G cellular modems .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -41,26 +41,46 @@ module at boot time, place the following line in u3g_load="YES" .Ed .Pp -If neither of the above is done, the driver will automatically be loaded -by devd(8) when the device is connected. +If neither of the above is done, the driver will be +automatically loaded by devd(8) when the device is connected. .Sh DESCRIPTION The .Nm -driver provides support for the multiple USB-to-serial interfaces exposed by -many 3G USB/PCCard modems. +driver provides support for USB-to-serial interfaces +exposed by many 3G and 4G modems. +The supported adapters provide the necessary modem port for +.Xr ppp 8 , +or +.Pa net/mpd5 +connections. +Depending on the specific device, extra ports provide other functions +such as an additional command port, diagnostic port, +GPS receiver port, or SIM toolkit port. .Pp The device is accessed through the .Xr ucom 4 driver which makes it behave like a .Xr tty 4 . +.Pp +In some adapters a mass storage device supported by the +.Xr umass 4 +driver is present which contains Windows and Mac OS X drivers. +The device starts up in disk mode (TruInstall, ZeroCD, etc.) +and requires additional commands to switch it to modem mode. +If your device is not switching automatically, please try to add quirks. +See +.Xr usbconfig 8 +and +.Xr usb_quirk 4 . .Sh HARDWARE The .Nm -driver supports the following adapters: +driver supports the following cellular modems: .Pp .Bl -bullet -compact .It -Option GT 3G Fusion, GT Fusion Quad, etc. (only 3G part, not WLAN) +Option GT 3G Fusion, GT Fusion Quad, etc. +.Pq 3G only, not WLAN .It Option GT 3G, GT 3G Quad, etc. .It @@ -72,9 +92,12 @@ Qualcomm Inc. CDMA MSM .It Qualcomm Inc. GOBI 1000, 2000 and 3000 devices with MDM1000 or MDM2000 chipsets .It -QUECTEL EC25, EM05, EM12-G. +QUECTEL BGX, ECX, EGX, EMX, EPX, RGX series +.It +Quectel EM160R +.Pq see Sx CAVEATS .It -Huawei B190, E180v, E220 ('<Huawei Mobile>') +Huawei B190, E180v, E220, E3372, E3372v153, E5573Cs322, ('<Huawei Mobile>') .It Novatel U740, MC950D, X950D, etc. .It @@ -83,26 +106,9 @@ Sierra MC875U, MC8775U, etc. Panasonic CF-F9 GOBI .El .Pp -(See +Many more are supported, see .Pa /sys/dev/usb/serial/u3g.c -for the complete list of supported cards for each vendor -mentioned above.) -.Pp -The supported 3G cards provide the necessary modem port for ppp, or mpd -connections as well as extra ports (depending on the specific device) to -provide other functions (additional command port, diagnostic port, SIM toolkit -port). -.Pp -In some of these devices a mass storage device supported by the -.Xr umass 4 -driver is present which contains Windows and Mac OS X drivers. -The device starts up in disk mode (TruInstall, ZeroCD, etc.) and requires -additional commands to switch it to modem mode. -If your device is not switching automatically, please try to add quirks. -See -.Xr usbconfig 8 -and -.Xr usb_quirk 4 . +for the complete list. .Sh FILES .Bl -tag -width "/dev/ttyU*.*.init" -compact .It Pa /dev/ttyU*.* @@ -149,6 +155,16 @@ driver was written by and .An Nick Hibma Aq Mt n_hibma@FreeBSD.org . Hardware for testing was provided by AnyWi Technologies, Leiden, NL. +.Sh CAVEATS +The Quectel EM160R is not officially supported in PPP mode. +In order to use it in PPP mode, the ctsrts option needs to be turned off, +for example, by adding: +.Pp +.Dl set ctsrts off +.Pp +to +.Pa /etc/ppp/ppp.conf +in the correct section. .Sh BUGS The automatic mode switch from disk mode to modem mode does not work unless the driver is either built into the kernel or loaded before the device is diff --git a/share/man/man4/uark.4 b/share/man/man4/uark.4 index 77d2d9d6c638..7c16921e0eb8 100644 --- a/share/man/man4/uark.4 +++ b/share/man/man4/uark.4 @@ -14,8 +14,6 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" .Dd April 26, 2017 .Dt UARK 4 .Os diff --git a/share/man/man4/uart.4 b/share/man/man4/uart.4 index 2fe7bb4175d5..98b61886371d 100644 --- a/share/man/man4/uart.4 +++ b/share/man/man4/uart.4 @@ -1,3 +1,5 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2003 Marcel Moolenaar .\" All rights reserved. @@ -23,14 +25,12 @@ .\" (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 July 11, 2020 +.Dd December 5, 2024 .Dt UART 4 .Os .Sh NAME .Nm uart -.Nd driver for Universal Asynchronous Receiver/Transmitter (UART) devices +.Nd Universal Asynchronous Receiver/Transmitter serial driver .Sh SYNOPSIS .Cd "device uart" .Pp @@ -271,6 +271,89 @@ be locked for devices that support more than one setting. The CLOCAL flag on callin ports should be locked off for logins to avoid certain security holes, but this needs to be done by getty if the callin port is used for anything else. +.Sh Console Tuneable +The +.Nm +driver can be designated as a system console. +.Bl -tag -width indent +.It Va hw.uart.console +Contains a number of +.Pa /etc/remote +like tag:value pairs, separated by commas. +.Bl -tag -width indent +.It Cm \&bd +Busy Detect. +Enable the so-called +.Dq Busy Detect +quirk for the device. +For NS 16550-compatible devices, this will use heuristics to ensure that the +UART is no longer busy before manipulating line control. +DesignWare-based UARTs need this due to a design flaw in the UART. +.It Cm \&br +Baudrate. +The data rate (bits per second) used for communications on the serial port. +When the device clock rate (see below) is set to 0, then the baud rate will be +used with the divisor to compute the device clock rate the first time the device +is initialized. +Only the traditional baud rates are allowed. +Rates larger than 19200 must be a multiple of 19200. +Baud rates between 1200 and 19200 must be a multiple of 1200. +Otherwise the baud rate must be a multiple of 75. +A value of '0' instructs the +.Nm +driver to not program the baud rate divisor and use the hardware as-is. +.It Cm \&ch +Channel. +Defaults to 0. +Has no effect on UARTs with only one channel. +.It Cm \&db +Data bits. +Defaults to 8. +.It Cm \&dt +Device type. +Specify the uart class to use for this device. +.Bl -tag -width indent +.It ns8250 +Traditional PC UART National Semiconductor 16550 and compatible devices. +.It pl011 +Common ARM UART, based on ARM Limited designs. +.El +.It Cm \&io +I/O port address. +Specifies the address of a UART in an Intel processor's I/O space. +Mutually exclusive with +.Sq mm . +.It Cm \&mm +Memory mapped I/O address. +Specifies the physical address of a memory-mapped UART. +Mutually exclusive with +.Sq io . +.It Cm \&pa +Parity. +The type of parity to use when sending data +to the host. +This may be one of ``even'', +``odd'', ``none'', ``zero'' (always set bit 8 to zero), +``one'' (always set bit 8 to 1). +The default is even parity. +.It Cm \&rs +Register shift. +Number of bits to shift left the base register offset. +.It Cm \&rw +Register width. +Size of operations to read and write the registers of the device. +.It Cm \&sb +Stopbits. +Defaults to 1. +.It Cm \&xo +Device clock (xtal oscillator). +Base frequency of the oscillator to use for the device. +When set to 0, and the baud rate is also set, the UART's initialization +code will compute this the first time and use that after. +Automatically computed values can be as large as 5% when the base +frequency is a poor match to the traditional baud rates. +.El +.El .Sh FILES .Bl -tag -width "/dev/ttyu?.init" -compact .It Pa /dev/ttyu? @@ -285,6 +368,11 @@ for callout ports .It Pa /dev/cuau?.lock corresponding callout initial-state and lock-state devices .El +.Sh EXAMPLES +.Dl hw.uart.console="io:0x2f8,br=115200" +.Pp +When the kernel is using a serial console port, it should use +COM2 instead of COM1 and set the baud rate to 115200. .Sh SEE ALSO .Xr cu 1 , .Xr puc 4 , diff --git a/share/man/man4/uath.4 b/share/man/man4/uath.4 index 57d9e222f92e..865f04b84232 100644 --- a/share/man/man4/uath.4 +++ b/share/man/man4/uath.4 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: ISC +.\" .\" Copyright (c) 2006 .\" Damien Bergamini <damien.bergamini@free.fr> .\" @@ -14,14 +16,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" .Dd April 7, 2009 .Dt UATH 4 .Os .Sh NAME .Nm uath -.Nd Atheros USB IEEE 802.11a/b/g wireless network device +.Nd Atheros USB IEEE 802.11a/b/g wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your diff --git a/share/man/man4/ubsa.4 b/share/man/man4/ubsa.4 index ddc492a9bde5..094f3ad1bdbf 100644 --- a/share/man/man4/ubsa.4 +++ b/share/man/man4/ubsa.4 @@ -26,8 +26,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 26, 2017 .Dt UBSA 4 .Os diff --git a/share/man/man4/ubser.4 b/share/man/man4/ubser.4 index d4b8bc7cb6e2..58a24c3e8b04 100644 --- a/share/man/man4/ubser.4 +++ b/share/man/man4/ubser.4 @@ -26,8 +26,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 26, 2017 .Dt UBSER 4 .Os diff --git a/share/man/man4/ubtbcmfw.4 b/share/man/man4/ubtbcmfw.4 index 0337124e2387..ec1ee6cf2c83 100644 --- a/share/man/man4/ubtbcmfw.4 +++ b/share/man/man4/ubtbcmfw.4 @@ -23,7 +23,6 @@ .\" SUCH DAMAGE. .\" .\" $Id: ubtbcmfw.4,v 1.3 2003/05/21 19:37:35 max Exp $ -.\" $FreeBSD$ .\" .Dd November 22, 2006 .Dt UBTBCMFW 4 diff --git a/share/man/man4/uchcom.4 b/share/man/man4/uchcom.4 index d55f116a354c..6cee3d82c2ce 100644 --- a/share/man/man4/uchcom.4 +++ b/share/man/man4/uchcom.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" $NetBSD: uchcom.4,v 1.2 2008/04/30 13:10:54 martin Exp $ .\" .\" Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -27,48 +30,74 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 26, 2017 +.Dd June 25, 2025 .Dt UCHCOM 4 .Os .Sh NAME .Nm uchcom -.Nd WinChipHead CH341/CH340 serial adapter driver +.Nd WinChipHead CH9102/CH343/CH341/CH340 USB to serial UART driver .Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your -kernel configuration file: -.Bd -ragged -offset indent .Cd "device usb" .Cd "device ucom" .Cd "device uchcom" -.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 -uchcom_load="YES" -.Ed +In +.Xr rc.conf 5 : +.Cd kld_list="uchcom" +.Pp +In +.Xr sysctl.conf 5 : +.Cd hw.usb.uchcom.debug=1 .Sh DESCRIPTION The .Nm -driver provides support for the WinChipHead CH341/CH340 USB-to-RS-232 -Bridge chip. -.Pp +driver provides support for the WinChipHead USB to serial UART adapters. +If the appropriate hardware is detected, +the driver will be loaded automatically by +.Xr devmatch 8 . +To load the driver manually, add it to the +.Ic kld_list +in +.Xr rc.conf 5 , +or use +.Xr kldload 8 +at runtime. The device is accessed through the .Xr ucom 4 -driver which makes it behave like a +driver, which makes it behave like a .Xr tty 4 . +.Pp +Call out through this interface with applications like +.Xr cu 1 +or +.Xr tip 1 . .Sh HARDWARE The .Nm -driver supports the following adapters: +driver supports the following USB to serial UART controllers: .Pp .Bl -bullet -compact .It -HL USB-RS232 +WinChipHead CH9102 (max 6Mbps) +.It +WinChipHead CH343 (max 6Mbps) +.It +WinChipHead CH341 (max 2Mbps) +.It +WinChipHead CH340 (max 2Mbps) +.El +.Sh SYSCTL VARIABLES +These settings can be entered in the +.Xr loader 8 +prompt, set in +.Xr loader.conf 5 , +.Xr sysctl.conf 5 , +or changed at runtime with +.Xr sysctl 8 : +.Bl -tag -width "hw.usb.uchcom.debug" +.It Va hw.usb.uchcom.debug +Enable debugging messages, default +.Ql 0 .El .Sh FILES .Bl -tag -width "/dev/ttyU*.init" -compact @@ -85,18 +114,14 @@ for callout ports corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO +.Xr cu 1 , .Xr tty 4 , .Xr ucom 4 , .Xr usb 4 .Sh HISTORY The .Nm -driver first appeared in -.Nx . -The first -.Fx -release to include it was -.Fx 8.0 . -.Sh BUGS -Actually, this chip seems unable to drive other than 8 data bits and -1 stop bit line. +driver appeared in +.Fx 8.0 +from +.Nx 5.0 . diff --git a/share/man/man4/ucom.4 b/share/man/man4/ucom.4 index 32b9574e96e7..b9f40777bc94 100644 --- a/share/man/man4/ucom.4 +++ b/share/man/man4/ucom.4 @@ -27,8 +27,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 11, 2020 .Dt UCOM 4 .Os diff --git a/share/man/man4/ucycom.4 b/share/man/man4/ucycom.4 index ec410ab0ff78..4f4790f51c03 100644 --- a/share/man/man4/ucycom.4 +++ b/share/man/man4/ucycom.4 @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2004 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2004 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 26, 2017 .Dt UCYCOM 4 .Os diff --git a/share/man/man4/udav.4 b/share/man/man4/udav.4 index da527f0ad9e2..f85c88494d9e 100644 --- a/share/man/man4/udav.4 +++ b/share/man/man4/udav.4 @@ -30,8 +30,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 24, 2015 .Dt UDAV 4 .Os diff --git a/share/man/man4/udbp.4 b/share/man/man4/udbp.4 index eaa9283d8050..f6ec43ae8b2d 100644 --- a/share/man/man4/udbp.4 +++ b/share/man/man4/udbp.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 20, 2017 .Dt UDBP 4 .Os diff --git a/share/man/man4/udl.4 b/share/man/man4/udl.4 index 572fe8f37a25..b2cfeba2489c 100644 --- a/share/man/man4/udl.4 +++ b/share/man/man4/udl.4 @@ -1,5 +1,4 @@ .\" $OpenBSD: udl.4,v 1.20 2012/09/18 17:11:41 jasper Exp $ -.\" $FreeBSD$ .\" .\" Copyright (c) 2009 Marcus Glocker <mglocker@openbsd.org> .\" @@ -15,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd February 15, 2015 +.Dd September 9, 2023 .Dt UDL 4 .Os .Sh NAME @@ -23,10 +22,11 @@ .Nd DisplayLink DL-120 / DL-160 USB display devices .Sh SYNOPSIS To compile this driver into the kernel, -place the following line in your +place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device udl" +.Cd "device videomode" .Ed .Pp Alternatively, to load the driver as a diff --git a/share/man/man4/udp.4 b/share/man/man4/udp.4 index 7249e9db9c60..b1dbff56154f 100644 --- a/share/man/man4/udp.4 +++ b/share/man/man4/udp.4 @@ -25,10 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)udp.4 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" -.Dd August 1, 2022 +.Dd January 20, 2025 .Dt UDP 4 .Os .Sh NAME @@ -110,6 +107,19 @@ Only one value is supported for this option: .Tn UDP_ENCAP_ESPINUDP from RFC 3948, defined in .In netinet/udp.h . +.Sh FIB support +UDP sockets are FIB-aware. +They inherit the FIB of the process which created the socket. +By default, a UDP socket bound to an address can receive datagrams originating +from any FIB. +If the +.Va net.inet.udp.bind_all_fibs +tunable is set to 0, all UDP sockets will receive only datagrams originating +from the same FIB as the socket. +In this mode, multiple sockets can be bound to the same address, so long as +each socket belongs to a different FIB, similar to the behavior of the +.Dv SO_REUSEPORT +option. .Sh MIB (sysctl) Variables The .Nm diff --git a/share/man/man4/udplite.4 b/share/man/man4/udplite.4 index 859c9667629e..38c0691a0f90 100644 --- a/share/man/man4/udplite.4 +++ b/share/man/man4/udplite.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 1, 2014 .Dt UDPLITE 4 .Os diff --git a/share/man/man4/uep.4 b/share/man/man4/uep.4 index 373a271cbb59..321d2f1e9514 100644 --- a/share/man/man4/uep.4 +++ b/share/man/man4/uep.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 5, 2018 .Dt UEP 4 .Os diff --git a/share/man/man4/ufoma.4 b/share/man/man4/ufoma.4 index 19028d99eb03..609a9b1f831c 100644 --- a/share/man/man4/ufoma.4 +++ b/share/man/man4/ufoma.4 @@ -25,8 +25,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 20, 2011 .Dt UFOMA 4 .Os diff --git a/share/man/man4/uftdi.4 b/share/man/man4/uftdi.4 index ddddce5deccd..b526143eaa25 100644 --- a/share/man/man4/uftdi.4 +++ b/share/man/man4/uftdi.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" $NetBSD: uftdi.4,v 1.5 2002/02/07 03:15:08 ross Exp $ .\" .\" Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -27,63 +30,90 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 26, 2017 +.Dd June 25, 2025 .Dt UFTDI 4 .Os .Sh NAME .Nm uftdi -.Nd USB support for serial adapters based on the FTDI family of USB -serial adapter chips. +.Nd Future Technology Devices International USB to serial UART driver .Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your -kernel configuration file: -.Bd -ragged -offset indent .Cd "device usb" .Cd "device ucom" .Cd "device uftdi" -.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 -uftdi_load="YES" -.Ed +In +.Xr rc.conf 5 : +.Cd kld_list="uftdi" +.Pp +In +.Xr sysctl.conf 5 : +.Cd hw.usb.uftdi.debug=1 +.Cd hw.usb.uftdi.skip_jtag_interfaces=0 .Sh DESCRIPTION The .Nm -driver provides support for various serial adapters based on the -following FTDI chips: +driver supports FTDI USB to serial UART devices. +If the appropriate hardware is detected, +the driver will be loaded automatically by +.Xr devmatch 8 . +To load the driver manually, add it to the +.Ic kld_list +in +.Xr rc.conf 5 , +or use +.Xr kldload 8 +at runtime. +The device is accessed through the +.Xr ucom 4 +driver which makes it behave like a +.Xr tty 4 . +.Pp +Call out through this interface with applications like +.Xr cu 1 +or +.Xr tip 1 . +.Sh HARDWARE +The +.Nm +driver supports the following USB to serial UART controllers: .Pp .Bl -bullet -compact .It -FT8U100AX +FTDI FT4232H .It -FT8U232AM +FTDI FT232R .It -FT8U232BM +FTDI FT230X .It -FT232R +FTDI FT2232H .It -FT2232C +FTDI FT2232D .It -FT2232D +FTDI FT2232C .It -FT2232H +FTDI FT8U232BM .It -FT4232H +FTDI FT8U232AM .It -FT230X +FTDI FT8U100AX .El -.Pp -The device is accessed through the -.Xr ucom 4 -driver which makes it behave like a -.Xr tty 4 . -.Pp +.Sh SYSCTL VARIABLES +These settings can be entered in the +.Xr loader 8 +prompt, set in +.Xr loader.conf 5 , +.Xr sysctl.conf 5 , +or changed at runtime with +.Xr sysctl 8 : +.Bl -tag -width "hw.usb.uftdi.skip_jtag_interfaces" +.It Va hw.usb.uftdi.debug +Enable debugging messages, default +.Ql 0 +.It Va hw.usb.uftdi.skip_jtag_interfaces +Ignore JTAG interfaces, default +.Ql 1 +.El +.Sh IOCTLS Many of the supported chips provide additional functionality such as bitbang mode and the MPSSE engine for serial bus emulation. The @@ -221,27 +251,6 @@ ioctl, you must pass the special value .Dv UFTDI_CONFIRM_ERASE as the argument to this ioctl. .El -.Sh HARDWARE -The -.Nm -driver supports the following adapters: -.Pp -.Bl -bullet -compact -.It -B&B Electronics USB->RS422/485 adapter -.It -Elexol USB MOD1 and USB MOD3 -.It -HP USB-Serial adapter shipped with some HP laptops -.It -Inland UAS111 -.It -QVS USC-1000 -.It -Buffalo PC-OP-RS / Kurouto-shikou KURO-RS universal remote -.It -Prologix GPIB-USB Controller -.El .Sh FILES .Bl -tag -width "/dev/ttyU*.init" -compact .It Pa /dev/ttyU* @@ -257,14 +266,14 @@ for callout ports corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO +.Xr cu 1 , .Xr tty 4 , .Xr ucom 4 , .Xr usb 4 .Sh HISTORY The .Nm -driver -appeared in +driver appeared in .Fx 4.8 from .Nx 1.5 . diff --git a/share/man/man4/ugen.4 b/share/man/man4/ugen.4 index 35580e8aa88b..bd387b0ee884 100644 --- a/share/man/man4/ugen.4 +++ b/share/man/man4/ugen.4 @@ -27,8 +27,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 14, 2021 .Dt UGEN 4 .Os diff --git a/share/man/man4/ugold.4 b/share/man/man4/ugold.4 index 79d2e5749f2d..d8b2f456fa65 100644 --- a/share/man/man4/ugold.4 +++ b/share/man/man4/ugold.4 @@ -15,8 +15,6 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" .Dd June 11, 2015 .Dt UGOLD 4 .Os diff --git a/share/man/man4/uhci.4 b/share/man/man4/uhci.4 index 871d78ef92d9..689dc4b8b5b8 100644 --- a/share/man/man4/uhci.4 +++ b/share/man/man4/uhci.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 24, 2018 .Dt UHCI 4 .Os diff --git a/share/man/man4/uhid.4 b/share/man/man4/uhid.4 index 491a2e871e76..f7c8a22a634c 100644 --- a/share/man/man4/uhid.4 +++ b/share/man/man4/uhid.4 @@ -27,8 +27,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd Oct 31, 2020 .Dt UHID 4 .Os diff --git a/share/man/man4/uhso.4 b/share/man/man4/uhso.4 index 37f7dc352a67..d88c925212eb 100644 --- a/share/man/man4/uhso.4 +++ b/share/man/man4/uhso.4 @@ -21,8 +21,6 @@ .\" (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 July 20, 2010 .Dt UHSO 4 .Os diff --git a/share/man/man4/uipaq.4 b/share/man/man4/uipaq.4 index 26bf35bf2d7e..b49344956541 100644 --- a/share/man/man4/uipaq.4 +++ b/share/man/man4/uipaq.4 @@ -28,9 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 26, 2017 +.Dd April 14, 2025 .Dt UIPAQ 4 .Os .Sh NAME @@ -52,23 +50,6 @@ module at boot time, place the following line in .Bd -literal -offset indent uipaq_load="YES" .Ed -.Sh HARDWARE -The -.Nm -driver supports the following adapters: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It ASUS P535 PDA -.It Casio BE300 PDA -.It Compaq IPaq PocketPC -.It HP Jornada 568 -.It HP iPAQ 22xx/Jornada 548 -.It HTC PPC6700 Modem -.It HTC Smart Phone -.It HTC Winmobile -.It Sharp W-ZERO3 ES Spart Phone -.It Most Windows CE based phones -.El .Sh DESCRIPTION The .Nm @@ -79,6 +60,33 @@ The device is accessed through the .Xr ucom 4 driver which makes it behave like a .Xr tty 4 . +.Sh HARDWARE +The +.Nm +driver supports the following iPAQ devices: +.Pp +.Bl -bullet -compact +.It +ASUS P535 PDA +.It +Casio BE300 PDA +.It +Compaq IPaq PocketPC +.It +HP Jornada 568 +.It +HP iPAQ 22xx/Jornada 548 +.It +HTC PPC6700 Modem +.It +HTC Smart Phone +.It +HTC Winmobile +.It +Sharp W-ZERO3 ES Spart Phone +.It +Most Windows CE based phones +.El .Sh FILES .Bl -tag -width "/dev/ttyU*.init" -compact .It Pa /dev/ttyU* diff --git a/share/man/man4/ukbd.4 b/share/man/man4/ukbd.4 index f443f51ce8e1..14d6cca51e6f 100644 --- a/share/man/man4/ukbd.4 +++ b/share/man/man4/ukbd.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 24, 2018 .Dt UKBD 4 .Os @@ -136,6 +134,15 @@ or .D1 Cd "options KBD_DISABLE_KEYMAP_LOADING" .Pp Do not allow the user to change the keymap. +.Pp +.D1 Cd "options KBD_DELAY1=200" +.Pp +Set the keyboard initial key repeat delay. +.Pp +.D1 Cd "options KBD_DELAY2=15" +.Pp +Set the keyboard key repeat delay. +.Pp Note that these options also affect the AT keyboard driver, .Xr atkbd 4 . .Sh SYSCTL VARIABLES diff --git a/share/man/man4/uled.4 b/share/man/man4/uled.4 index 6202737bd14a..99deb90bb0bd 100644 --- a/share/man/man4/uled.4 +++ b/share/man/man4/uled.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 31, 2017 .Dt ULED 4 .Os diff --git a/share/man/man4/ulpt.4 b/share/man/man4/ulpt.4 index 894211bf6ff7..4dbe34945f38 100644 --- a/share/man/man4/ulpt.4 +++ b/share/man/man4/ulpt.4 @@ -27,8 +27,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 22, 2006 .Dt ULPT 4 .Os diff --git a/share/man/man4/umass.4 b/share/man/man4/umass.4 index 1a3ff2845be1..03e8b6ff6ef1 100644 --- a/share/man/man4/umass.4 +++ b/share/man/man4/umass.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 27, 2020 .Dt UMASS 4 .Os diff --git a/share/man/man4/umb.4 b/share/man/man4/umb.4 new file mode 100644 index 000000000000..7ecc9a39c1ca --- /dev/null +++ b/share/man/man4/umb.4 @@ -0,0 +1,119 @@ +.\"- +.\" SPDX-License-Identifier: 0BSD +.\" +.\" Copyright (c) 2016 genua mbH +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.\" $NetBSD: umb.4,v 1.4 2019/08/30 09:22:17 wiz Exp $ +.\" +.Dd May 11, 2025 +.Dt UMB 4 +.Os +.Sh NAME +.Nm umb +.Nd USB Mobile Broadband Interface Model (MBIM) cellular modem driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device usb" +.Cd "device umb" +.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 +umb_load="YES" +.Ed +.Pp +If neither of the above is done, the driver will automatically be loaded +by devd(8) when the device is connected. +.Sh DESCRIPTION +The +.Nm +driver provides support for USB MBIM devices. +.Pp +MBIM devices establish connections via cellular networks such as +GPRS, UMTS, and LTE. +They appear as a regular point-to-point network interface, +transporting raw IP frames. +.Pp +Required configuration parameters like PIN and APN have to be set +with +.Xr umbctl 8 . +Once the SIM card has been unlocked with the correct PIN, it +will remain in this state until the MBIM device is power-cycled. +In case the device is connected to an "always-on" USB port, +it may be possible to connect to a provider without entering the +PIN again even if the system was rebooted. +.Sh HARDWARE +The +.Nm +driver should support any USB device implementing MBIM, including +the following cellular modems: +.Pp +.Bl -bullet -compact +.It +Ericsson H5321gw and N5321gw +.It +Fibocom L831-EAU +.It +Medion Mobile S4222 (MediaTek OEM) +.It +Sierra Wireless EM7345 +.It +Sierra Wireless EM7455 +.It +Sierra Wireless EM8805 +.It +Sierra Wireless MC8305 +.El +.Sh SEE ALSO +.Xr intro 4 , +.Xr netintro 4 , +.Xr usb 4 , +.Xr ifconfig 8 , +.Xr umbctl 8 +.Rs +.%T "Universal Serial Bus Communications Class Subclass Specification for Mobile Broadband Interface Model" +.%U http://www.usb.org/developers/docs/devclass_docs/MBIM10Errata1_073013.zip +.Re +.Sh HISTORY +The +.Nm +device driver first appeared in +.Ox 6.0 , +.Nx 9.0 , +and +.Fx 15.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Gerhard Roth Aq Mt gerhard@openbsd.org +and ported from +.Ox +by +.An Pierre Pronchery Aq Mt khorben@defora.org . +.Sh CAVEATS +The +.Nm +driver does not support IPv6. +.Pp +Devices which fail to provide a conforming MBIM implementation will +probably be attached as some other driver, such as +.Xr u3g 4 . diff --git a/share/man/man4/umcs.4 b/share/man/man4/umcs.4 index 5586e90a489f..0ed778066a6e 100644 --- a/share/man/man4/umcs.4 +++ b/share/man/man4/umcs.4 @@ -26,8 +26,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 26, 2017 .Dt UMCS 4 .Os diff --git a/share/man/man4/umct.4 b/share/man/man4/umct.4 index 35676c64cf40..53e9a4555dc9 100644 --- a/share/man/man4/umct.4 +++ b/share/man/man4/umct.4 @@ -23,8 +23,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 26, 2017 .Dt UMCT 4 .Os diff --git a/share/man/man4/umodem.4 b/share/man/man4/umodem.4 index e06da5afab0f..793f820f561f 100644 --- a/share/man/man4/umodem.4 +++ b/share/man/man4/umodem.4 @@ -27,8 +27,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 26, 2017 .Dt UMODEM 4 .Os diff --git a/share/man/man4/umoscom.4 b/share/man/man4/umoscom.4 index f2b6aec225a7..faad33bf9c4f 100644 --- a/share/man/man4/umoscom.4 +++ b/share/man/man4/umoscom.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 26, 2017 .Dt UMOSCOM 4 .Os diff --git a/share/man/man4/ums.4 b/share/man/man4/ums.4 index b27c55cef738..4e5ead6b0503 100644 --- a/share/man/man4/ums.4 +++ b/share/man/man4/ums.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 24, 2018 .Dt UMS 4 .Os diff --git a/share/man/man5/unionfs.5 b/share/man/man4/unionfs.4 index 7d5e16e3ff68..85714331b6ce 100644 --- a/share/man/man5/unionfs.5 +++ b/share/man/man4/unionfs.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2020 Gordon Bergling .\" .\" Redistribution and use in source and binary forms, with or without @@ -21,14 +24,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 27, 2020 -.Dt UNIONFS 5 +.Dt UNIONFS 4 .Os .Sh NAME .Nm unionfs -.Nd "UNION FS" +.Nd union mount file system .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -69,6 +70,7 @@ The device driver first appeared in .Fx 5.0 . .Sh AUTHORS +.An -nosplit The .Nm device driver was written by Jan-Simon Pendry for diff --git a/share/man/man4/unix.4 b/share/man/man4/unix.4 index 3de5f875fd09..2fdfde225b14 100644 --- a/share/man/man4/unix.4 +++ b/share/man/man4/unix.4 @@ -25,10 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)unix.4 8.1 (Berkeley) 6/9/93 -.\" $FreeBSD$ -.\" -.Dd June 24, 2022 +.Dd October 31, 2024 .Dt UNIX 4 .Os .Sh NAME @@ -80,6 +77,15 @@ removed when the socket is closed \(em .Xr unlink 2 must be used to remove the file. .Pp +Prior to binding a socket, +.Xr fchmod 2 +can be used to set the permissions of the socket file. +This avoids the race that would otherwise occur between creation of the file +and a subsequent call to +.Xr chmod 2 . +Once the socket is bound to a file name, the permissions of the file can not be +changed this way. +.Pp The length of .Ux Ns -domain address, required by @@ -335,14 +341,6 @@ The and .Dv LOCAL_CREDS_PERSISTENT options are mutually exclusive. -.It Dv LOCAL_CONNWAIT -Used with -.Dv SOCK_STREAM -sockets, this option causes the -.Xr connect 2 -function to block until -.Xr accept 2 -has been called on the listening socket. .It Dv LOCAL_PEERCRED Requested via .Xr getsockopt 2 @@ -452,6 +450,7 @@ The order is preserved for writes coming through a particular connection. .Sh SEE ALSO .Xr connect 2 , .Xr dup 2 , +.Xr fchmod 2 , .Xr fcntl 2 , .Xr getsockopt 2 , .Xr listen 2 , diff --git a/share/man/man4/upgt.4 b/share/man/man4/upgt.4 index e0512e73b979..5d4ada1d1a1f 100644 --- a/share/man/man4/upgt.4 +++ b/share/man/man4/upgt.4 @@ -1,5 +1,4 @@ .\" $OpenBSD: upgt.4,v 1.6 2008/04/17 14:01:22 jmc Exp $ -.\" $FreeBSD$ .\" .\" Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org> .\" Copyright (c) 2005-2007 @@ -49,13 +48,13 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 17, 2008 +.Dd February 18, 2025 .Dt UPGT 4 .Os .Sh NAME .Nm upgt .Nd Conexant/Intersil PrismGT SoftMAC USB IEEE 802.11b/g wireless network -device +driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -75,6 +74,11 @@ module at boot time, place the following line in .Bd -literal -offset indent if_upgt_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is slated to be removed in +.Fx 15.0 . .Sh DESCRIPTION The .Nm diff --git a/share/man/man4/uplcom.4 b/share/man/man4/uplcom.4 index 85822d7d0dc6..49c6fb42e231 100644 --- a/share/man/man4/uplcom.4 +++ b/share/man/man4/uplcom.4 @@ -27,8 +27,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 7, 2021 .Dt UPLCOM 4 .Os diff --git a/share/man/man4/ural.4 b/share/man/man4/ural.4 index ceb0eee26ef4..53ac1b5dd665 100644 --- a/share/man/man4/ural.4 +++ b/share/man/man4/ural.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: ISC +.\" .\" Copyright (c) 2005, 2006 .\" Damien Bergamini <damien.bergamini@free.fr> .\" @@ -13,14 +16,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" -.Dd April 13, 2008 +.Dd November 10, 2024 .Dt URAL 4 .Os .Sh NAME .Nm ural -.Nd "Ralink Technology RT2500USB IEEE 802.11 driver" +.Nd Ralink RT2500USB IEEE 802.11a/b/g wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -70,7 +71,7 @@ The driver supports USB 2.0 wireless adapters based on the Ralink Technology RT2500USB chipset, including: .Pp -.Bl -column -compact ".Li Atlantis Land A02-PCM-W54" "Bus" +.Bl -column -compact "Atlantis Land A02-PCM-W54" "Bus" .It Em Card Ta Em Bus .It "AMIT WL532U" Ta USB .It "ASUS WL-167g" Ta USB @@ -105,20 +106,18 @@ An up to date list can be found at .Pa http://ralink.rapla.net/ . .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev ural0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev ural0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev ural0 ssid my_net up" +.Dl ifconfig wlan create wlandev ural0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev ural0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: @@ -142,6 +141,7 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr wlan_xauth 4 , +.Xr networking 7 , .Xr hostapd 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 @@ -149,7 +149,9 @@ This should not happen. The .Nm driver first appeared in -.Ox 3.7 . +.Ox 3.7 +and +.Fx 6.0 . .Sh AUTHORS The original .Nm @@ -157,5 +159,5 @@ driver was written by .An Damien Bergamini Aq Mt damien.bergamini@free.fr . .Sh BUGS Host AP mode doesn't support client power save. -Clients using power save mode will experience -packet loss (disabling power saving on the client will fix this). +Clients using power save mode will experience packet loss +.Pq disabling power saving on the client will fix this . diff --git a/share/man/man4/ure.4 b/share/man/man4/ure.4 index cf483dca9d11..0d14a20f5f44 100644 --- a/share/man/man4/ure.4 +++ b/share/man/man4/ure.4 @@ -1,3 +1,5 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2015-2016 Kevin Lo <kevlo@FreeBSD.org> .\" All rights reserved. @@ -23,14 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd October 31, 2016 +.Dd April 8, 2025 .Dt URE 4 .Os .Sh NAME .Nm ure -.Nd "RealTek RTL8152/RTL8153 USB to Ethernet controller driver" +.Nd Realtek RTL8152/RTL8153/RTL8156 USB Ethernet driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -53,16 +53,12 @@ if_ure_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for USB Ethernet adapters based on the RealTek -RealTek RTL8152 and RTL8153 USB Ethernet controllers. -.Pp -NICs based on the RTL8152 are capable of 10 and 100Mbps speeds. -NICs based on the RTL8153 are capable of 10, 100 and 1000Mbps operation. +driver supports the Realtek USB Ethernet Controller family. .Pp The .Nm driver supports the following media types: -.Bl -tag -width ".Cm 10baseT/UTP" +.Bl -tag -width "10baseT/UTP" .It Cm autoselect Enable auto selection of the media type and options. The user can manually override @@ -88,24 +84,40 @@ or .Cm half-duplex modes. .It Cm 1000baseTX -Set 1000baseTX operation over twisted pair. -The RealTek gigE chips support 1000Mbps in +Set 1000baseTX (Gigabit Ethernet) operation over twisted pair. +The Realtek gigE chips support 1000Mbps in +.Cm full-duplex +mode only. +.It Cm 2500base-T +Set 2500Base-T operation over twisted pair. +The Realtek 8156/8156B chips support 2500Mbps in .Cm full-duplex mode only. .El .Pp The .Nm -driver supports the following media options: -.Bl -tag -width ".Cm full-duplex" +driver supports the following media options for 10/100 operation: +.Bl -tag -width "full-duplex" .It Cm full-duplex -Force full duplex operation. +Force full-duplex operation. .It Cm half-duplex -Force half duplex operation. +Force half-duplex operation. .El .Pp For more information on configuring this device, see .Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports the following USB Ethernet controllers: +.Bl -column "Realtek RTL8168/8169/8110/8211 via rgephy(4)" "10, 100, 1000, and 2500" +.It Model: Ta Speed (Mbps): +.It Realtek RTL8156/RTL8156B/RTL8156BG Ta 10, 100, 1000, and 2500 +.It Realtek RTL8153/RTL8153B Ta 10, 100, and 1000 +.It Realtek RTL8152 Ta 10 and 100 +.It Realtek RTL8168/8169/8110/8211 via rgephy(4) Ta 10, 100, and 1000 +.El .Sh DIAGNOSTICS .Bl -diag .It "ure%d: watchdog timeout" diff --git a/share/man/man4/urio.4 b/share/man/man4/urio.4 index 30048c14f16a..b7ad71e86b20 100644 --- a/share/man/man4/urio.4 +++ b/share/man/man4/urio.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 22, 2006 .Dt URIO 4 .Os diff --git a/share/man/man4/urndis.4 b/share/man/man4/urndis.4 index e03d620c9698..88e312d6370e 100644 --- a/share/man/man4/urndis.4 +++ b/share/man/man4/urndis.4 @@ -27,8 +27,6 @@ .\" .\" $OpenBSD: urndis.4,v 1.15 2013/07/16 16:05:49 schwarze Exp $ .\" -.\" $FreeBSD$ -.\" .Dd November 24, 2015 .Dt URNDIS 4 .Os @@ -105,4 +103,4 @@ and It was ported to .Fx by -.An Hans Petter Selasky Aq Mt hps@FreeBSD.org . +.An Hans Petter Selasky Aq Mt hselasky@FreeBSD.org . diff --git a/share/man/man4/urtw.4 b/share/man/man4/urtw.4 index d5b3624d6813..7252b8ac8579 100644 --- a/share/man/man4/urtw.4 +++ b/share/man/man4/urtw.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2008 Weongyo Jeong .\" All rights reserved. .\" @@ -22,14 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd October 17, 2009 +.Dd November 10, 2024 .Dt URTW 4 .Os .Sh NAME .Nm urtw -.Nd Realtek RTL8187B/L USB IEEE 802.11b/g wireless network device +.Nd Realtek RTL8187B/L USB IEEE 802.11b/g wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -61,6 +62,7 @@ and .Cm monitor mode operation. Only one virtual interface may be configured at any time. +.Pp For more information on configuring this device, see .Xr ifconfig 8 . .Sh HARDWARE @@ -68,35 +70,33 @@ The .Nm driver supports Realtek RTL8187B/L based wireless network devices, including: .Pp -.Bl -column "Shuttle XPC Accessory PN20" "RTL8225" "USB" -compact -offset 6n -.It Em "Card Radio Bus" -.It "Belkin F5D7050E RTL8225 USB" -.It "Linksys WUSB54GCv2 RTL8225 USB" -.It "Netgear WG111v2 RTL8225 USB" -.It "Netgear WG111v3 RTL8225 USB" -.It "Safehome WLG-1500SMA5 RTL8225 USB" -.It "Shuttle XPC Accessory PN20 RTL8225 USB" -.It "Sitecom WL168v1 RTL8225 USB" -.It "Sitecom WL168v4 RTL8225 USB" -.It "SureCom EP-9001-g(2A) RTL8225 USB" -.It "TRENDnet TEW-424UB V3.xR RTL8225 USB" +.Bl -column -offset indent "Shuttle XPC Accessory PN20" "RTL8225" "USB" -compact +.It Em Card Ta Em Radio Ta Em Bus +.It Belkin F5D7050E Ta RTL8225 Ta USB +.It Linksys WUSB54GCv2 Ta RTL8225 Ta USB +.It Netgear WG111v2 Ta RTL8225 Ta USB +.It Netgear WG111v3 Ta RTL8225 Ta USB +.It Safehome WLG-1500SMA5 Ta RTL8225 Ta USB +.It Shuttle XPC Accessory PN20 Ta RTL8225 Ta USB +.It Sitecom WL168v1 Ta RTL8225 Ta USB +.It Sitecom WL168v4 Ta RTL8225 Ta USB +.It SureCom EP-9001-g(2A) Ta RTL8225 Ta USB +.It TRENDnet TEW-424UB V3.xR Ta RTL8225 Ta USB .El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev urtw0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev urtw0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev urtw0 ssid my_net up" +.Dl ifconfig wlan create wlandev urtw0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev urtw0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Sh SEE ALSO .Xr intro 4 , diff --git a/share/man/man4/usb.4 b/share/man/man4/usb.4 index 6b7fbfb8e0a1..40cb8675b185 100644 --- a/share/man/man4/usb.4 +++ b/share/man/man4/usb.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 7, 2020 .Dt USB 4 .Os diff --git a/share/man/man4/usb_quirk.4 b/share/man/man4/usb_quirk.4 index 8751807f9dec..15f5a9718c8f 100644 --- a/share/man/man4/usb_quirk.4 +++ b/share/man/man4/usb_quirk.4 @@ -14,8 +14,6 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" .Dd August 19, 2017 .Dt USB_QUIRK 4 .Os @@ -78,6 +76,8 @@ does not identify properly mouse sends an unknown leading byte .It UQ_MS_REVZ mouse has Z-axis reversed +.It UQ_MS_VENDOR_BTN +mouse has buttons in vendor usage page .It UQ_NO_STRINGS string descriptors are broken .It UQ_POWER_CLAIM @@ -98,6 +98,8 @@ select configuration index 4 by default select configuration index 0 by default .It UQ_ASSUME_CM_OVER_DATA assume cm over data feature +.It UQ_IGNORE_CDC_CM +ignore cm descriptor .It UQ_WMT_IGNORE device should be ignored by wmt driver .El diff --git a/share/man/man4/usb_template.4 b/share/man/man4/usb_template.4 index 4a73389884d5..9e87ccb27b3a 100644 --- a/share/man/man4/usb_template.4 +++ b/share/man/man4/usb_template.4 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" .\" Copyright (c) 2008 Hans Petter Selasky. All rights reserved. .\" diff --git a/share/man/man4/usbhid.4 b/share/man/man4/usbhid.4 index 1b9e61ce1cad..5109bbe72de6 100644 --- a/share/man/man4/usbhid.4 +++ b/share/man/man4/usbhid.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 12, 2021 .Dt USBHID 4 .Os @@ -57,7 +55,11 @@ tunables: .It Va hw.usb.usbhid.enable Enable .Nm -and make its priority greater than other USB HID drivers have. +and make its priority greater than other USB HID drivers, such as +.Xr ukbd 4 , +.Xr ums 4 , +and +.Xr uhid 4 . Default is 0. .El .Bl -tag -width indent @@ -77,7 +79,7 @@ Default is 0. The .Nm driver first appeared in -.Fx 13.0. +.Fx 13.0 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/usfs.4 b/share/man/man4/usfs.4 index 815839fce312..98465fc9a211 100644 --- a/share/man/man4/usfs.4 +++ b/share/man/man4/usfs.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 17, 2018 .Dt USFS 4 .Os diff --git a/share/man/man4/uslcom.4 b/share/man/man4/uslcom.4 index 6465054f1208..3805cdb444d1 100644 --- a/share/man/man4/uslcom.4 +++ b/share/man/man4/uslcom.4 @@ -14,8 +14,6 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" .Dd December 9, 2019 .Dt USLCOM 4 .Os diff --git a/share/man/man4/uvisor.4 b/share/man/man4/uvisor.4 index 4412dd6bdc9d..21170d88d2b4 100644 --- a/share/man/man4/uvisor.4 +++ b/share/man/man4/uvisor.4 @@ -27,8 +27,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 26, 2017 .Dt UVISOR 4 .Os diff --git a/share/man/man4/uvscom.4 b/share/man/man4/uvscom.4 index 1dc5b93c5350..cabad068b3af 100644 --- a/share/man/man4/uvscom.4 +++ b/share/man/man4/uvscom.4 @@ -27,8 +27,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 26, 2017 .Dt UVSCOM 4 .Os diff --git a/share/man/man4/vale.4 b/share/man/man4/vale.4 index f805b1b4031b..a9f172e11fba 100644 --- a/share/man/man4/vale.4 +++ b/share/man/man4/vale.4 @@ -24,11 +24,9 @@ .\" .\" This document is derived in part from the enet man page (enet.4) .\" distributed with 4.3BSD Unix. -.\" -.\" $FreeBSD$ .\" $Id: $ .\" -.Dd March 6, 2022 +.Dd August 30, 2024 .Dt VALE 4 .Os .Sh NAME @@ -102,7 +100,8 @@ qemu -net nic -net netmap,ifname=vale2:c ... & qemu -net nic -net netmap,ifname=vale2:d ... & .Ed .Sh SEE ALSO -.Xr netmap 4 +.Xr netmap 4 , +.Xr valectl 8 .Pp Luigi Rizzo, Giuseppe Lettieri: VALE, a switched ethernet for virtual machines, June 2012, http://info.iet.unipi.it/~luigi/vale/ diff --git a/share/man/man4/veriexec.4 b/share/man/man4/veriexec.4 new file mode 100644 index 000000000000..14e4aeae0d10 --- /dev/null +++ b/share/man/man4/veriexec.4 @@ -0,0 +1,96 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024, Juniper Networks, Inc. +.\" +.\" 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 COPYRIGHT HOLDERS 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 COPYRIGHT +.\" OWNER 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. +.\" +.Dd August 1, 2024 +.Dt VERIEXEC 4 +.Os +.Sh NAME +.Nm veriexec +.Nd the veriexec device +.Sh SYNOPSIS +.In dev/veriexec/veriexec_ioctl.h +.Sh DESCRIPTION +The +.Nm +device is used by +.Xr veriexec 8 +to query and modify the state of +.Xr mac_veriexec 4 . +.Pp +Once +.Xr mac_veriexec 4 +is active, only a process which is marked as +.Ql trusted +(normally only +.Xr veriexec 8 ) +is able to more than the +.Dv VERIEXEC_GETSTATE +ioctl. +.Sh IOCTLS +The supported ioctls are described below. +.Bl -tag +.It Dv VERIEXEC_SIGNED_LOAD Vt struct verified_exec_params +Pass file information to +.Xr mac_veriexec 4 . +.Bd -literal +struct verified_exec_params { + unsigned char flags; + char fp_type[VERIEXEC_FPTYPELEN]; /* type of fingerprint */ + char file[MAXPATHLEN]; + unsigned char fingerprint[MAXFINGERPRINTLEN]; +}; +.Ed +.It Dv VERIEXEC_LABEL_LOAD Vt struct verified_exec_label_params +Pass file information and a label to +.Xr mac_veriexec 4 . +.Bd -literal +struct verified_exec_label_params { + struct verified_exec_params params; + char label[MAXLABELLEN]; +}; +.Ed +.It Dv VERIEXEC_ACTIVE +.It Dv VERIEXEC_DEBUG_OFF +.It Dv VERIEXEC_DEBUG_ON Vt int level +.It Dv VERIEXEC_ENFORCE +.It Dv VERIEXEC_GETSTATE +.It Dv VERIEXEC_GETVERSION +.It Dv VERIEXEC_LOCK +.It Dv VERIEXEC_VERIFIED_FILE Vt int fd +Rarely needed. +Tells +.Xr mac_veriexec 4 +that the file associated with +.Va fd +is verified. +.El +.Sh HISTORY +A +.Nm +device first appeared in +.Nx . +It was added to +.Fx 13.1 . diff --git a/share/man/man4/vga.4 b/share/man/man4/vga.4 index cf4179b72bfa..1cfe3414fe49 100644 --- a/share/man/man4/vga.4 +++ b/share/man/man4/vga.4 @@ -24,8 +24,6 @@ .\" (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 June 30, 1999 .Dt VGA 4 .Os diff --git a/share/man/man4/vge.4 b/share/man/man4/vge.4 index 7363b95a46ea..9c0a89a1034d 100644 --- a/share/man/man4/vge.4 +++ b/share/man/man4/vge.4 @@ -28,8 +28,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 29, 2011 .Dt VGE 4 .Os diff --git a/share/man/man4/viapm.4 b/share/man/man4/viapm.4 index a155e91f8230..becb4f6ae4ed 100644 --- a/share/man/man4/viapm.4 +++ b/share/man/man4/viapm.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 20, 2002 .Dt VIAPM 4 .Os diff --git a/share/man/man4/viawd.4 b/share/man/man4/viawd.4 index e579bf0887af..730c8afd68f2 100644 --- a/share/man/man4/viawd.4 +++ b/share/man/man4/viawd.4 @@ -23,8 +23,6 @@ .\" 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 diff --git a/share/man/man4/virtio.4 b/share/man/man4/virtio.4 index 75fec148a076..1e5ea0e4a7da 100644 --- a/share/man/man4/virtio.4 +++ b/share/man/man4/virtio.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 26, 2019 .Dt VIRTIO 4 .Os @@ -85,6 +83,10 @@ A pseudo-device to allow the VM to release memory back to the hypervisor is provided by the .Xr virtio_balloon 4 device driver. +.It Sy GPU +Graphics support is provided by the +.Xr virtio_gpu 4 +device driver. .It Sy SCSI An emulated SCSI HBA is provided by the .Xr virtio_scsi 4 @@ -94,6 +96,7 @@ device driver. .Xr virtio_balloon 4 , .Xr virtio_blk 4 , .Xr virtio_console 4 , +.Xr virtio_gpu 4 , .Xr virtio_random 4 , .Xr virtio_scsi 4 , .Xr vtnet 4 diff --git a/share/man/man4/virtio_balloon.4 b/share/man/man4/virtio_balloon.4 index b7ce0ed13cbb..1d680435313d 100644 --- a/share/man/man4/virtio_balloon.4 +++ b/share/man/man4/virtio_balloon.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 22, 2012 .Dt VIRTIO_BALLOON 4 .Os diff --git a/share/man/man4/virtio_blk.4 b/share/man/man4/virtio_blk.4 index 579fb4a9745e..64be2164d52a 100644 --- a/share/man/man4/virtio_blk.4 +++ b/share/man/man4/virtio_blk.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 2, 2013 .Dt VIRTIO_BLK 4 .Os diff --git a/share/man/man4/virtio_console.4 b/share/man/man4/virtio_console.4 index 542c8458c038..901c8bfc2564 100644 --- a/share/man/man4/virtio_console.4 +++ b/share/man/man4/virtio_console.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 22, 2014 .Dt VIRTIO_CONSOLE 4 .Os diff --git a/share/man/man9/vm_map_simplify_entry.9 b/share/man/man4/virtio_gpu.4 index 3c7a1f87df36..f8d48faa05f0 100644 --- a/share/man/man9/vm_map_simplify_entry.9 +++ b/share/man/man4/virtio_gpu.4 @@ -1,6 +1,9 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause .\" -.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org> +.\" Copyright (c) 2014 Bryan Venteicher .\" All rights reserved. +.\" Copyright (c) 2023 Arm Ltd .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -23,39 +26,29 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 19, 2003 -.Dt VM_MAP_SIMPLIFY_ENTRY 9 +.Dd August 14, 2023 +.Dt VIRTIO_GPU 4 .Os .Sh NAME -.Nm vm_map_simplify_entry -.Nd simplify a -.Vt vm_map_entry +.Nm virtio_gpu +.Nd VirtIO GPU driver .Sh SYNOPSIS -.In sys/param.h -.In vm/vm.h -.In vm/vm_map.h -.Ft void -.Fn vm_map_simplify_entry "vm_map_t map" "vm_map_entry_t entry" +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device virtio_gpu" +.Ed .Sh DESCRIPTION The -.Fn vm_map_simplify_entry -function simplifies the given -.Fa entry -by merging with either neighbour. -The -.Fa map -must be locked upon entry. -.Pp -This function also has the ability to merge with both neighbours. -.Pp -This function guarantees that the passed entry remains valid, although -possibly extended. +.Nm +device driver provides support for VirtIO gpu devices to create a +.Xr vt 4 +console. .Sh SEE ALSO -.Xr vm_map 9 , -.Xr vm_map_insert 9 , -.Xr vm_map_remove 9 -.Sh AUTHORS -This manual page was written by -.An Bruce M Simpson Aq Mt bms@spc.org . +.Xr virtio 4 , +.Xr vt 4 +.Sh HISTORY +The +.Nm +driver first appeared in FreeBSD 14.0. diff --git a/share/man/man4/virtio_random.4 b/share/man/man4/virtio_random.4 index d44b08d482f7..74852c2730c1 100644 --- a/share/man/man4/virtio_random.4 +++ b/share/man/man4/virtio_random.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 28, 2013 .Dt VIRTIO_RANDOM 4 .Os diff --git a/share/man/man4/virtio_scsi.4 b/share/man/man4/virtio_scsi.4 index 3828eef7eec8..0e62cd8f7ac9 100644 --- a/share/man/man4/virtio_scsi.4 +++ b/share/man/man4/virtio_scsi.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 24, 2012 .Dt VIRTIO_SCSI 4 .Os diff --git a/share/man/man4/vkbd.4 b/share/man/man4/vkbd.4 index c70d22620b5c..b6487ee576c9 100644 --- a/share/man/man4/vkbd.4 +++ b/share/man/man4/vkbd.4 @@ -1,5 +1,4 @@ .\" $Id: vkbd.4,v 1.4 2004/11/16 16:49:39 max Exp $ -.\" $FreeBSD$ .\" .Dd August 12, 2004 .Dt VKBD 4 diff --git a/share/man/man4/vlan.4 b/share/man/man4/vlan.4 index da5467d8588e..25405172ed62 100644 --- a/share/man/man4/vlan.4 +++ b/share/man/man4/vlan.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 26, 2020 .Dt VLAN 4 .Os @@ -132,7 +130,7 @@ in hardware: .Xr cxgbe 4 , .Xr em 4 , .Xr igb 4 , -.Xr ixgbe 4 , +.Xr ix 4 , .Xr jme 4 , .Xr liquidio 4 , .Xr msk 4 , diff --git a/share/man/man4/vmci.4 b/share/man/man4/vmci.4 index a216787e982e..8feea98ab337 100644 --- a/share/man/man4/vmci.4 +++ b/share/man/man4/vmci.4 @@ -1,8 +1,6 @@ .\" Copyright (c) 2018 VMware, Inc. .\" .\" SPDX-License-Identifier: (BSD-2-Clause OR GPL-2.0) -.\" -.\" $FreeBSD$ .Dd February 10, 2018 .Dt VMCI 4 .Os diff --git a/share/man/man4/vmd.4 b/share/man/man4/vmd.4 index 74419fd87ffe..590a368f006b 100644 --- a/share/man/man4/vmd.4 +++ b/share/man/man4/vmd.4 @@ -1,5 +1,5 @@ .\"- -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2021 Alexander Motin <mav@FreeBSD.org> .\" Copyright 2019 Cisco Systems, Inc. @@ -25,9 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd August 31, 2021 +.Dd October 6, 2022 .Dt VMD 4 .Os .Sh NAME @@ -36,7 +34,7 @@ .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: -.Bd -ragged -offset -indent +.Bd -ragged -offset indent .Cd "device vmd" .Ed .Pp @@ -57,6 +55,11 @@ The following tunables are settable via or .Xr sysctl 8 : .Bl -tag -width indent +.It Va hw.vmd.bypass_msi +By default all VMD devices remap children MSI/MSI-X interrupts into their +own. It creates additional isolation, but also complicates things due to +sharing, etc. Fortunately some VMD devices can bypass the remapping. +Defaults to 1. .It Va hw.vmd.max_msi Limits number of Message Signaled Interrupt (MSI) vectors allowed to each child device. diff --git a/share/man/man4/vmm.4 b/share/man/man4/vmm.4 index 5f2ebcd8c9c0..07c40541f404 100644 --- a/share/man/man4/vmm.4 +++ b/share/man/man4/vmm.4 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd December 19, 2013 +.Dd December 30, 2024 .Dt VMM 4 .Os .Sh NAME @@ -47,15 +45,22 @@ kldload vmm provides the kernel portion of the .Xr bhyve 4 hypervisor. -.Pp -An Intel CPU with VT-x/EPT or AMD CPU with SVM support is required. +The following platforms are supported: +.Bl -bullet -compat +.It +amd64: An Intel CPU with VT-x/EPT or AMD CPU with SVM support is required. +.It +arm64: The boot CPU must start in EL2 and the system must have a GICv3 interrupt +controller. +VHE support will be used if available. +.It +riscv: The CPUs must implement the H (hypervisor) RISC-V ISA extension. +.El .Pp PCI device passthrough to a virtual machine requires -hardware with VT-d support. +hardware with VT-d support and is available only on amd64. .Sh PCI PASSTHROUGH -When the hardware supports VT-d, and -.Nm -has been loaded at boot time, +On amd64 where the hardware supports VT-d, PCI devices can be reserved for use by the hypervisor. Entries consisting of the PCI .Ar bus Ns / Ns Ar slot Ns / Ns Ar function @@ -72,6 +77,19 @@ See the .Sx EXAMPLES section below for sample usage. .Pp +Note that +.Nm vmm +must be given first the right of refusal to all +.Xr pci 4 +devices it may need to claim. +As a result, the +.Nm vmm +kernel module almost certainly needs to be loaded from +.Xr loader.conf 5 +rather than by adding it to +.Va kld_list in +.Xr rc.conf 5 . +.Pp A large number of PCI device entries may require a string longer than the 128-character limit of .Xr loader.conf 5 @@ -81,22 +99,59 @@ The and .Va pptdevs3 variables can be used for additional entries. +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va hw.vmm.maxcpu +Maximum number of virtual CPUs. +The default is the number of physical CPUs in the system. +.El .Sh EXAMPLES Reserve three PCI devices for use by the hypervisor: bus 10 slot 0 function 0, bus 6 slot 5 function 0, and bus 6 slot 5 function 1. .Bd -literal -offset indent pptdevs="10/0/0 6/5/0 6/5/1" .Ed +.Pp +It is possible to detach +.Va ppt +from a PCI device without rebooting the host machine and then attach a host +driver, using the +.Xr devctl 8 +utility. +Suppose +.Va ppt +is currently attached to +.Va pci0:0:1:0 +and we want the host's +.Xr xhci 4 +driver to be attached instead: +.Bd -literal -offset indent +# devctl set driver -f pci0:0:1:0 xhci +.Ed +.Pp +The same can be applied to attach +.Va ppt +back: +.Bd -literal -offset indent +# devctl set driver -f pci0:0:1:0 ppt +.Ed .Sh SEE ALSO .Xr bhyve 4 , .Xr loader.conf 5 , .Xr bhyve 8 , .Xr bhyveload 8 , +.Xr devctl 8 , .Xr kldload 8 .Sh HISTORY .Nm vmm.ko first appeared in .Fx 10.0 . +arm64 and riscv support first appeared in +.Fx 15.0 . .Sh AUTHORS .An Neel Natu Aq neel@freebsd.org .An Peter Grehan Aq grehan@freebsd.org diff --git a/share/man/man4/vmx.4 b/share/man/man4/vmx.4 index b42eda327ef0..339c7d9047d7 100644 --- a/share/man/man4/vmx.4 +++ b/share/man/man4/vmx.4 @@ -15,8 +15,6 @@ .\" .\" $OpenBSD: src/share/man/man4/vmx.4,v 1.1 2013/05/31 20:18:44 reyk Exp $ .\" -.\" $FreeBSD$ -.\" .Dd December 26, 2020 .Dt VMX 4 .Os diff --git a/share/man/man4/vr.4 b/share/man/man4/vr.4 index da4ee5bcbc1c..c18133b57b0a 100644 --- a/share/man/man4/vr.4 +++ b/share/man/man4/vr.4 @@ -28,8 +28,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 25, 2012 .Dt VR 4 .Os diff --git a/share/man/man4/vt.4 b/share/man/man4/vt.4 index 65d8bc05f7a4..ad050bdd0d59 100644 --- a/share/man/man4/vt.4 +++ b/share/man/man4/vt.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2014 Warren Block .\" All rights reserved. .\" @@ -22,14 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 21, 2022 +.Dd July 7, 2024 .Dt "VT" 4 .Os .Sh NAME .Nm vt -.Nd virtual terminal console driver +.Nd virtual terminal system video console driver .Sh SYNOPSIS .Cd "options TERMINAL_KERN_ATTR=_attribute_" .Cd "options TERMINAL_NORM_ATTR=_attribute_" @@ -49,15 +50,19 @@ In .Cd kern.vt.color.<colornum>.rgb="<colorspec>" .Cd kern.vt.fb.default_mode="<X>x<Y>" .Cd kern.vt.fb.modes.<connector>="<X>x<Y>" +.Cd kern.vt.slow_down=<delay>" +.Cd screen.font="<X>x<Y>" .Pp In .Xr loader.conf 5 or .Xr sysctl.conf 5 : +.Cd kern.consmute=1 .Cd kern.vt.kbd_halt=1 .Cd kern.vt.kbd_poweroff=1 .Cd kern.vt.kbd_reboot=1 .Cd kern.vt.kbd_debug=1 .Cd kern.vt.kbd_panic=0 +.Cd kern.vt.enable_altgr=0 .Cd kern.vt.enable_bell=1 .Sh DESCRIPTION The @@ -220,6 +225,11 @@ The kernel uses .Nm when this value is not set. +Note that +.Ql sc +is not compatible with +.Xr UEFI 8 +boot. .It Va kern.vt.color. Ns Ar colornum Ns Va .rgb Set this value to override default palette entry for color .Pa colornum @@ -258,6 +268,21 @@ It will contain a list of connectors and their associated tunables. This is currently only supported by the .Cm vt_fb backend when it is paired with a KMS video driver. +.It Va kern.vt.slow_down +When debugging the kernel on modern laptops, the screen is often +the only available console, and relevant information will scroll +out of view before it can be captured by eye or camera. +.Pp +Setting +.Va kern.vt.slow_down +to a non-zero number will make console output synchronous (ie: +not dependent on timers and interrupts) and slow it down in proportion +to the number. +.It Va screen.font +Set this value to the base name of the desired font file located in +.Pa /boot/fonts . +Fonts can be converted for use with +.Xr vtfontcvt 8 . .El .Sh KEYBOARD SYSCTL TUNABLES These settings control whether certain special key combinations are enabled or @@ -274,6 +299,8 @@ and can also be changed at runtime with the .Xr sysctl 8 command. .Bl -tag -width indent +.It Va kern.vt.enable_altgr +Enable AltGr key (do not assume right Alt key as Alt). .It Va kern.vt.kbd_halt Enable halt keyboard combination. .It Va kern.vt.kbd_poweroff @@ -293,11 +320,13 @@ prompt, set in or changed at runtime with .Xr sysctl 8 . .Bl -tag -width indent +.It Va kern.consmute +Disable printing kernel messages to the system console. .It Va kern.vt.enable_bell Enable the terminal bell. .El .Sh FILES -.Bl -tag -width /usr/share/vt/keymaps/* -compact +.Bl -tag -width "/usr/share/vt/keymaps/*.kbd" -compact .It Pa /dev/console .It Pa /dev/consolectl .It Pa /dev/ttyv* @@ -310,13 +339,12 @@ console fonts keyboard layouts .El .Sh DEVCTL MESSAGES -.Bl -column "System" "Subsystem" "1234567" -compact +.Bl -column "System" "Subsystem" "Type" "Description" .Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" .It Li VT Ta BELL Ta RING Ta Notification that the console bell has rung. .El -.Pp -.Bl -column "Variable" "Meaning" -compact +.Bl -column "duration_ms" "Meaning" .Sy "Variable" Ta Sy "Meaning" .It Li duration_ms Ta Length of time the bell was requested to ring in milliseconds. .It Li enabled Ta true or false indicating whether or not the bell was administratively enabled when rung. @@ -342,7 +370,8 @@ To set a 1024x768 mode on all output connectors, put the following line in .Pp .Dl kern.vt.fb.default_mode="1024x768" .Pp -To set a 800x600 only on a laptop builtin screen, use the following line instead: +To set a 800x600 only on a laptop builtin screen, +use the following line instead: .Pp .Dl kern.vt.fb.modes.LVDS-1="800x600" .Pp @@ -357,6 +386,14 @@ To set black and white colors of console palette .Pp .Dl kern.vt.color.0.rgb="10,10,10" .Dl kern.vt.color.15.rgb="#f0f0f0" +.Pp +Load the 8x16 font in +.Xr loader.conf 5 +from +.Pa /boot/fonts/*.fnt[.gz] +at boot: +.Pp +.Dl screen.font="8x16" .Sh SEE ALSO .Xr kbdcontrol 1 , .Xr login 1 , @@ -370,6 +407,7 @@ To set black and white colors of console palette .Xr syscons 4 , .Xr ukbd 4 , .Xr kbdmap 5 , +.Xr loader.conf 5 , .Xr rc.conf 5 , .Xr ttys 5 , .Xr config 8 , diff --git a/share/man/man4/vte.4 b/share/man/man4/vte.4 index 23080a0e2789..293c2cbbc2cd 100644 --- a/share/man/man4/vte.4 +++ b/share/man/man4/vte.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 30, 2010 .Dt VTE 4 .Os diff --git a/share/man/man4/vtnet.4 b/share/man/man4/vtnet.4 index 5779a682d166..270366488a98 100644 --- a/share/man/man4/vtnet.4 +++ b/share/man/man4/vtnet.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 22, 2012 .Dt VTNET 4 .Os @@ -93,6 +91,10 @@ The number of queue pairs used is the lesser of the maximum supported by the driver and the hypervisor, the number of CPUs present in the guest, and this tunable if not zero. The default value is 0. +.It Va hw.vtnet.altq_disable +This tunable disables ALTQ support, allowing the use of multiqueue instead. +This option applies to all interfaces. +The default value is 0. .El .Sh SEE ALSO .Xr arp 4 , diff --git a/share/man/man4/vxlan.4 b/share/man/man4/vxlan.4 index 99f3411c02d2..5f2bd4695101 100644 --- a/share/man/man4/vxlan.4 +++ b/share/man/man4/vxlan.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 30, 2021 .Dt VXLAN 4 .Os diff --git a/share/man/man4/watchdog.4 b/share/man/man4/watchdog.4 index b61172335930..b74640de8469 100644 --- a/share/man/man4/watchdog.4 +++ b/share/man/man4/watchdog.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 2, 2018 .Dt WATCHDOG 4 .Os @@ -44,7 +42,7 @@ supports several optional .Xr ioctl 2 calls for configuration, and responds to a single operational -.Xr ioctl +.Xr ioctl 2 call, .Dv WDIOCPATPAT . It takes a single argument which represents a timeout value specified as a @@ -86,7 +84,7 @@ The watchdog might still be armed! .Pp The optional configuration -.Xr ioctl +.Xr ioctl 2 commands are listed here, along with the type of the parameter used. Examples of their use can be found in .Xr watchdogd 8 . @@ -110,7 +108,7 @@ Use an internal software watchdog instead of hardware. There is also an external software watchdog, which is used by default if no hardware watchdog was attached. .It Dv WDIOC_SETSOFTTIMEOUTACT Fa int -Set the action whan a soft timeout occurs. +Set the action when a soft timeout occurs. .El .Pp The actions that may be specified for the pre-timeout or the internal software @@ -129,7 +127,7 @@ printf(9) .Sh RETURN VALUES The .Dv WDIOCPATPAT -.Xr ioctl +.Xr ioctl 2 returns zero on success and non-zero on failure. .Bl -tag -width Er .It Bq Er EOPNOTSUPP @@ -143,7 +141,7 @@ Invalid flag combination passed. .El .Pp The configuration -.Xr ioctl +.Xr ioctl 2 operations return zero on success and non-zero on failure. .Sh EXAMPLES .Bd -literal -offset indent diff --git a/share/man/man4/wbwd.4 b/share/man/man4/wbwd.4 index a148ab4227cf..30800b4a1495 100644 --- a/share/man/man4/wbwd.4 +++ b/share/man/man4/wbwd.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 16, 2019 .Dt WBWD 4 .Os diff --git a/share/man/man4/wdatwd.4 b/share/man/man4/wdatwd.4 new file mode 100644 index 000000000000..48cd5d183505 --- /dev/null +++ b/share/man/man4/wdatwd.4 @@ -0,0 +1,91 @@ +.\"- +.\" Copyright (c) 2022 Tetsuya Uemura <t_uemura@macome.co.jp> +.\" +.\" 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. +.\" +.Dd November 18, 2022 +.Dt WDATWD 4 +.Os +.Sh NAME +.Nm wdatwd +.Nd device driver for the ACPI WDAT based watchdog interrupt 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 wdatwd" +.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 +wdatwd_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides +.Xr watchdog 4 +support for the watchdog interrupt timer in ACPI WDAT (Watchdog Action Table). +.Pp +Since WDAT itself is an abstraction for the real hardware such as ICH WDT, it +must be noted that only one driver can be used at a time, either the real +hardware specific driver or this driver. +.Sh SYSCTL VARIABLES +The following read-only +.Xr sysctl 8 +variables are available: +.Bl -tag -width indent +.It Va dev.wdatwd.%d.running +The status of the watchdog timer. 0 if not running, or 1 if running. +.It Va dev.wdatwd.%d.timeout +The current value of the watchdog timeout in millisecond. +This can be 0 on some systems, and the zero value means that the default +timeout is used. +.It Va dev.wdatwd.%d.timeout_configurable +Whether the timeout is configurable or not. +It is 0 if configurable or any positive value if not. +.It Va dev.wdatwd.%d.timeout_default +The default value of the watchdog timeout in millisecond if any. +.El +.Sh SEE ALSO +.Xr ichwd 4 , +.Xr watchdog 4 , +.Xr watchdog 8 , +.Xr watchdogd 8 , +.Xr watchdog 9 +.Rs +.%T Hardware Watchdog Timers Design Specification +.%R Requirements for Hardware Watchdog Timers Supported by Microsoft(R) Windows Vista(R) and Microsoft Windows Server(R) 2008 Operating Systems +.%A Microsoft Corporation +.%U http://msdn.microsoft.com/en-us/windows/hardware/gg463320.aspx +.%D 2006 +.Re +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Tetsuya Uemura Aq Mt t_uemura@macome.co.jp +of MACOME, Corporation. diff --git a/share/man/man4/wg.4 b/share/man/man4/wg.4 new file mode 100644 index 000000000000..8e2fcfe6b863 --- /dev/null +++ b/share/man/man4/wg.4 @@ -0,0 +1,238 @@ +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2020 Gordon Bergling <gbe@FreeBSD.org> +.\" +.\" 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. +.\" +.Dd February 12, 2025 +.Dt WG 4 +.Os +.Sh NAME +.Nm wg +.Nd "WireGuard protocol driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device wg" +.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 +if_wg_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides Virtual Private Network (VPN) interfaces for the secure +exchange of layer 3 traffic with other WireGuard peers using the WireGuard +protocol. +.Pp +A +.Nm +interface recognizes one or more peers, establishes a secure tunnel with +each on demand, and tracks each peer's UDP endpoint for exchanging encrypted +traffic with. +.Pp +The interfaces can be created at runtime using the +.Ic ifconfig Cm wg Ns Ar N Cm create +command. +The interface itself can be configured with +.Xr wg 8 . +.Pp +The following glossary provides a brief overview of WireGuard +terminology: +.Bl -tag -width indent -offset 3n +.It Peer +Peers exchange IPv4 or IPv6 traffic over secure tunnels. +Each +.Nm +interface may be configured to recognize one or more peers. +.It Key +Each peer uses its private key and corresponding public key to +identify itself to others. +A peer configures a +.Nm +interface with its own private key and with the public keys of its peers. +.It Pre-shared key +In addition to the public keys, each peer pair may be configured with a +unique pre-shared symmetric key. +This is used in their handshake to guard against future compromise of the +peers' encrypted tunnel if an attack on their +Diffie-Hellman exchange becomes feasible. +It is optional, but recommended. +.It Allowed IP addresses +A single +.Nm +interface may maintain concurrent tunnels connecting diverse networks. +The interface therefore implements rudimentary routing and reverse-path +filtering functions for its tunneled traffic. +These functions reference a set of allowed IP address ranges configured +against each peer. +.Pp +The interface will route outbound tunneled traffic to the peer configured +with the most specific matching allowed IP address range, or drop it +if no such match exists. +.Pp +The interface will accept tunneled traffic only from the peer +configured with the most specific matching allowed IP address range +for the incoming traffic, or drop it if no such match exists. +That is, tunneled traffic routed to a given peer cannot return through +another peer of the same +.Nm +interface. +This ensures that peers cannot spoof one another's traffic. +.It Handshake +Two peers handshake to mutually authenticate each other and to +establish a shared series of secret ephemeral encryption keys. +Either peer may initiate a handshake. +Handshakes occur only when there is traffic to send, and recur every +two minutes during transfers. +.It Connectionless +Due to the handshake behavior, there is no connected or disconnected +state. +.El +.Ss Keys +Private keys for WireGuard can be generated from any sufficiently +secure random source. +The Curve25519 keys and the pre-shared keys are both 32 bytes +long and are commonly encoded in base64 for ease of use. +.Pp +Keys can be generated with +.Xr wg 8 +as follows: +.Pp +.Dl $ wg genkey +.Pp +Although a valid Curve25519 key must have 5 bits set to +specific values, this is done by the interface and so it +will accept any random 32-byte base64 string. +.Sh NETMAP +.Xr netmap 4 +applications may open a WireGuard interface in emulated mode. +The netmap application will receive decrypted, unencapsulated packets prepended +by a dummy Ethernet header. +The Ethertype field will be one of +.Dv ETHERTYPE_IP +or +.Dv ETHERTYPE_IPV6 +depending on the address family of the packet. +Packets transmitted by the application should similarly begin with a dummy +Ethernet header; this header will be stripped before the packet is encrypted +and tunneled. +.Sh EXAMPLES +Create a +.Nm +interface and set random private key. +.Bd -literal -offset indent +# ifconfig wg0 create +# wg genkey | wg set wg0 listen-port 54321 private-key /dev/stdin +.Ed +.Pp +Retrieve the associated public key from a +.Nm +interface. +.Bd -literal -offset indent +$ wg show wg0 public-key +.Ed +.Pp +Connect to a specific endpoint using its public-key and set the allowed IP address +.Bd -literal -offset indent +# wg set wg0 peer '7lWtsDdqaGB3EY9WNxRN3hVaHMtu1zXw71+bOjNOVUw=' endpoint 10.0.1.100:54321 allowed-ips 192.168.2.100/32 +.Ed +.Pp +Remove a peer +.Bd -literal -offset indent +# wg set wg0 peer '7lWtsDdqaGB3EY9WNxRN3hVaHMtu1zXw71+bOjNOVUw=' remove +.Ed +.Sh DIAGNOSTICS +The +.Nm +interface supports runtime debugging, which can be enabled with: +.Pp +.D1 Ic ifconfig Cm wg Ns Ar N Cm debug +.Pp +Some common error messages include: +.Bl -diag +.It "Handshake for peer X did not complete after 5 seconds, retrying" +Peer X did not reply to our initiation packet, for example because: +.Bl -bullet +.It +The peer does not have the local interface configured as a peer. +Peers must be able to mutually authenticate each other. +.It +The peer endpoint IP address is incorrectly configured. +.It +There are firewall rules preventing communication between hosts. +.El +.It "Invalid handshake initiation" +The incoming handshake packet could not be processed. +This is likely due to the local interface not containing +the correct public key for the peer. +.It "Invalid initiation MAC" +The incoming handshake initiation packet had an invalid MAC. +This is likely because the initiation sender has the wrong public key +for the handshake receiver. +.It "Packet has unallowed src IP from peer X" +After decryption, an incoming data packet has a source IP address that +is not assigned to the allowed IPs of Peer X. +.El +.Sh SEE ALSO +.Xr inet 4 , +.Xr ip 4 , +.Xr ipsec 4 , +.Xr netintro 4 , +.Xr netmap 4 , +.Xr ovpn 4 , +.Xr ipf 5 , +.Xr pf.conf 5 , +.Xr ifconfig 8 , +.Xr ipfw 8 , +.Xr wg 8 +.Rs +.%T WireGuard whitepaper +.%U https://www.wireguard.com/papers/wireguard.pdf +.Re +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 13.2 . +.Sh AUTHORS +.An -nosplit +The +.Nm +device driver was written by +.An Jason A. Donenfeld Aq Mt Jason@zx2c4.com , +.An Matt Dunwoodie Aq Mt ncon@nconroy.net , +.An Kyle Evans Aq Mt kevans@FreeBSD.org , +and +.An Matt Macy Aq Mt mmacy@FreeBSD.org . +.Pp +This manual page was written by +.An Gordon Bergling Aq Mt gbe@FreeBSD.org +and is based on the +.Ox +manual page written by +.An David Gwynne Aq Mt dlg@openbsd.org . diff --git a/share/man/man4/witness.4 b/share/man/man4/witness.4 index 5deb9dcfa94a..f382a9378727 100644 --- a/share/man/man4/witness.4 +++ b/share/man/man4/witness.4 @@ -21,9 +21,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd November 18, 2015 +.Dd March 5, 2025 .Dt WITNESS 4 .Os .Sh NAME @@ -64,12 +62,12 @@ kernel option controls the maximum number of .Nm entries that are tracked in the kernel. The maximum number of entries can be queried via the -.Va debug.witness.count +.Va debug.witness.witness_count sysctl. It can also be set from the .Xr loader 8 via the -.Va debug.witness.count +.Va debug.witness.witness_count environment variable. .Pp The diff --git a/share/man/man4/wlan.4 b/share/man/man4/wlan.4 index d7a186a34efd..ff983c66c1cb 100644 --- a/share/man/man4/wlan.4 +++ b/share/man/man4/wlan.4 @@ -23,14 +23,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd January 26, 2021 +.Dd June 13, 2025 .Dt WLAN 4 .Os .Sh NAME .Nm wlan -.Nd generic 802.11 link-layer support +.Nd generic WiFi 802.11 link-layer support .Sh SYNOPSIS .Cd "device wlan" .Sh DESCRIPTION @@ -46,7 +44,7 @@ module is required by all native 802.11 drivers. .Nm supports multi-mode devices capable of operating in both 2.4GHz and 5GHz bands and supports numerous -802.11 standards: 802.11a, 802.11b, 802.11g, 802.11n, and 802.11s (Draft 3.0). +802.11 standards: 802.11a, 802.11b, 802.11g, 802.11n, 802.11ac, and 802.11s (Draft 3.0). The WPA, 802.11i, and 802.1x security protocols are supported through a combination of in-kernel code and user-mode applications. The WME/WMM multi-media protocols are supported entirely within @@ -168,20 +166,23 @@ not ratified and subject to change. Be aware that this specification is incompatible with earlier drafts. Stations implementing earlier drafts (e.g., Linux) may be incompatible. .Sh SEE ALSO -.Xr an 4 , .Xr ath 4 , .Xr bwi 4 , .Xr bwn 4 , .Xr ipw 4 , .Xr iwi 4 , +.Xr iwlwifi 4 , .Xr iwm 4 , .Xr iwn 4 , +.Xr iwx 4 , .Xr malo 4 , .Xr mwl 4 , .Xr netintro 4 , .Xr otus 4 , .Xr ral 4 , .Xr rsu 4 , +.Xr rtw88 4 , +.Xr rtw89 4 , .Xr rtwn 4 , .Xr rum 4 , .Xr run 4 , @@ -191,6 +192,7 @@ Stations implementing earlier drafts (e.g., Linux) may be incompatible. .Xr urtw 4 , .Xr wlan_acl 4 , .Xr wlan_ccmp 4 , +.Xr wlan_gcmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr wlan_xauth 4 , diff --git a/share/man/man4/wlan_acl.4 b/share/man/man4/wlan_acl.4 index 25314bd6a38f..0cd5c16a6f94 100644 --- a/share/man/man4/wlan_acl.4 +++ b/share/man/man4/wlan_acl.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 7, 2004 .Dt WLAN_ACL 4 .Os diff --git a/share/man/man4/wlan_amrr.4 b/share/man/man4/wlan_amrr.4 index 92477677ffdb..4b7830b008de 100644 --- a/share/man/man4/wlan_amrr.4 +++ b/share/man/man4/wlan_amrr.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 13, 2008 .Dt WLAN_AMRR 4 .Os diff --git a/share/man/man4/wlan_ccmp.4 b/share/man/man4/wlan_ccmp.4 index ccf7a2720635..ffd4da8694e9 100644 --- a/share/man/man4/wlan_ccmp.4 +++ b/share/man/man4/wlan_ccmp.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 7, 2004 .Dt WLAN_CCMP 4 .Os @@ -55,6 +53,7 @@ calculations in hardware, the module will do the work. .Sh SEE ALSO .Xr wlan 4 , +.Xr wlan_gcmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 .Sh STANDARDS diff --git a/share/man/man4/wlan_gcmp.4 b/share/man/man4/wlan_gcmp.4 new file mode 100644 index 000000000000..a7657a9ad91b --- /dev/null +++ b/share/man/man4/wlan_gcmp.4 @@ -0,0 +1,72 @@ +.\" +.\" Copyright (c) 2004 Sam Leffler +.\" All rights reserved. +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Bj\xc3\xb6rn Zeeb +.\" under sponsorship from the FreeBSD Foundation. +.\" +.\" 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. +.\" +.\" Based on wlan_ccmp.4. +.\" +.Dd June 13, 2025 +.Dt WLAN_GCMP 4 +.Os +.Sh NAME +.Nm wlan_gcmp +.Nd AES-GCMP crypto support for 802.11 devices +.Sh SYNOPSIS +.Cd "device wlan_gcmp" +.Sh DESCRIPTION +The +.Nm +module handles the +.Em Galois/Counter Mode Protocol +cryptographic requirements of the IEEE 802.11ad and WPA2/WPA3 protocols. +It does encapsulation and decapsulation of GCMP-encoded 802.11 frames +and optionally calculates the AES-GCMP cipher. +The +.Nm +module is an 802.11 cryptographic plugin module for use by the +.Xr wlan 4 +module. +This module is automatically loaded if an AES-GCMP key is configured; +typically by a WPA supplicant program such as wpa_supplicant, +or a WPA authenticator program such as +.Nm hostapd . +Should the underlying network device not be capable of doing the AES-GCMP +calculations in hardware, the +.Nm +module will do the work. +.Sh SEE ALSO +.Xr wlan 4 , +.Xr wlan_ccmp 4 , +.Xr wlan_tkip 4 , +.Xr wlan_wep 4 +.Sh STANDARDS +More information can be found in the IEEE 802.11, and WPA Standards. +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 15.0 . diff --git a/share/man/man4/wlan_tkip.4 b/share/man/man4/wlan_tkip.4 index 2a2a254fd329..e74c24d45614 100644 --- a/share/man/man4/wlan_tkip.4 +++ b/share/man/man4/wlan_tkip.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 7, 2004 .Dt WLAN_TKIP 4 .Os @@ -56,6 +54,7 @@ module will do the work. .Sh SEE ALSO .Xr wlan 4 , .Xr wlan_ccmp 4 , +.Xr wlan_gcmp 4 , .Xr wlan_wep 4 .Sh STANDARDS More information can be found in the IEEE 802.11, WPA, and 802.11i Standards. diff --git a/share/man/man4/wlan_wep.4 b/share/man/man4/wlan_wep.4 index 3bf1040d34b5..d83ef23e7a4e 100644 --- a/share/man/man4/wlan_wep.4 +++ b/share/man/man4/wlan_wep.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 7, 2004 .Dt WLAN_WEP 4 .Os @@ -53,6 +51,7 @@ module will do the work. .Sh SEE ALSO .Xr wlan 4 , .Xr wlan_ccmp 4 , +.Xr wlan_gcmp 4 , .Xr wlan_tkip 4 .Sh STANDARDS More information can be found in the IEEE 802.11 Standard. diff --git a/share/man/man4/wlan_xauth.4 b/share/man/man4/wlan_xauth.4 index b1fdfc5d4fd0..9c89648d65e4 100644 --- a/share/man/man4/wlan_xauth.4 +++ b/share/man/man4/wlan_xauth.4 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 7, 2004 .Dt WLAN_XAUTH 4 .Os diff --git a/share/man/man4/wmt.4 b/share/man/man4/wmt.4 index 0ebacc6c3edf..b9320371119f 100644 --- a/share/man/man4/wmt.4 +++ b/share/man/man4/wmt.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 19, 2017 .Dt WMT 4 .Os diff --git a/share/man/man4/wpi.4 b/share/man/man4/wpi.4 index 7a5143f572ff..9d8d5fb1bd65 100644 --- a/share/man/man4/wpi.4 +++ b/share/man/man4/wpi.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2004-2007 .\" Damien Bergamini <damien.bergamini@free.fr>. All rights reserved. .\" Benjamin Close <Benjamin.Close@clearchain.com>. All rights reserved. @@ -26,14 +29,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd January 31, 2016 +.Dd October 17, 2024 .Dt WPI 4 .Os .Sh NAME .Nm wpi -.Nd "Intel 3945ABG Wireless LAN IEEE 802.11 driver" +.Nd Intel PRO/Wireless 3945ABG IEEE 802.11a/b/g network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -50,16 +51,13 @@ kernel configuration file: Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : -.Bd -literal -offset indent -if_wpi_load="YES" -.Ed +.Pp +.Dl if_wpi_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for the -.Tn Intel -3945ABG Wireless network adapter. -The driver supports +driver supports running the +Intel PRO/Wireless 3945ABG network adapter in .Cm station , .Cm adhoc , .Cm adhoc-demo , @@ -67,6 +65,11 @@ The driver supports and .Cm monitor mode operation. +This driver requires the wpifw firmware module +and can be configured at runtime with +.Xr ifconfig 8 +or at boot in +.Xr rc.conf 5 . Only one virtual interface may be configured at any time. .Pp The @@ -83,17 +86,13 @@ The .Nm driver offloads both encryption and decryption of data frames to the hardware for the CCMP cipher. -.Pp -This driver requires the firmware built with the -.Nm wpifw 4 -module to work. -.Pp +.Sh HARDWARE The .Nm -driver can be configured at runtime with -.Xr ifconfig 8 . +driver provides support for the +Intel PRO/Wireless 3945ABG Mini PCIe network adapter. .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/intel_wpi.LICENSE" -compact +.Bl -tag -width "/usr/share/doc/legal/intel_wpi.LICENSE" -compact .It Pa /usr/share/doc/legal/intel_wpi.LICENSE .Nm firmware license @@ -106,7 +105,7 @@ ifconfig wlan0 create wlandev wpi0 inet 192.168.0.20 \e .Ed .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp .Dl "ifconfig wlan0 create wlandev wpi0 ssid my_net up" .Pp @@ -124,7 +123,7 @@ ifconfig wlan0 create wlandev wpi0 wlanmode adhoc ssid my_net \e .Ed .Pp Join/create an 802.11b IBSS network with network name -.Dq Li my_net : +.Ar my_net : .Bd -literal -offset indent ifconfig wlan0 create wlandev wpi0 wlanmode adhoc ifconfig wlan0 inet 192.168.0.22 netmask 0xffffff00 ssid my_net \e @@ -143,9 +142,7 @@ ifconfig wlan0 inet 192.168.0.10 netmask 0xffffff00 ssid my_ap \e The driver failed to load the firmware image using the .Xr firmware 9 subsystem. -Verify the -.Xr wpifw 4 -firmware module is installed. +Verify the wpifw firmware module is installed. .It "wpi%d: %s: timeout waiting for adapter to initialize, error %d" The onboard microcontroller failed to initialize in time. This should not happen. @@ -191,7 +188,7 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr wlan_xauth 4 , -.Xr wpifw 4 , +.Xr networking 7 , .Xr hostapd 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 @@ -209,10 +206,11 @@ ported to .Fx . .Sh CAVEATS -Hostap mode is not directly supported by the device; +.Cm Hostap +mode is not directly supported by the device; it is implemented through IBSS mode (as a result, DFS/passive channels are not available in this mode). .Pp -Powersave may be unstable on some networks (results in -occasional 'wpi%d: device timeout' messages); you can try -to disable it to improve device stability. +Powersave may be unstable on some networks +.Po results in occasional Sy 'wpi%d: device timeout' No messages Pc ; +you can try to disable it to improve device stability. diff --git a/share/man/man4/wsp.4 b/share/man/man4/wsp.4 index 847c79c71f29..50ada937e104 100644 --- a/share/man/man4/wsp.4 +++ b/share/man/man4/wsp.4 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 9, 2021 .Dt WSP 4 .Os @@ -51,27 +49,150 @@ The driver provides support for the Apple Internal Trackpad device found in many Apple laptops. .Pp -The driver simulates a three-button mouse using multi-finger tap +The driver simulates a three-button mouse using multi-finger press/tap detection. A single-finger press generates a left button click. -A two-finger tap maps to the right button; whereas a three-finger tap -gets treated as a middle button click. +A two-finger press maps to the right button; whereas a three-finger +press gets treated as a middle button click. +.Pp +The trackpad functions with presses and taps. +A press is a full-forced +press which causes a physical lowering of the trackpad. +A tap is a +touch of the trackpad which does not depress the physical trackpad. .Pp +The .Nm -supports dynamic reconfiguration using +driver supports receiving evdev input device data if enabled. +This data +is used for extended usage of the touchpad like multi-finger support, +pressure detection, tap support, and gestures. +At least the second bit of the +.Xr sysctl 8 +tunable +.Va kern.evdev.rcpt_mask +must be set. +This can be enabled with +.Va kern.evdev.rcpt_mask=3 . +.Pp +Vertical scrolling (z-axis) is enabled by default with a two-finger +tap and the movement of a finger up and down. +Horizontal scrolling (t-axis) is not natively supported by the sysmouse +protocol, therefore must be enabled with evdev data. +This can be enabled with the .Xr sysctl 8 -through nodes under -.Nm hw.usb.wsp . -Pointer sensitivity can be controlled using the sysctl tunable -.Nm hw.usb.wsp.scale_factor . -Tap to left-click can be controlled using the sysctl tunable -.Nm hw.usb.wsp.enable_single_tap_clicks , -set to 0 to disable single tap clicks or 1 to enable them (default). -Z-Axis sensitivity can be controlled using the sysctl tunable -.Nm hw.usb.wsp.z_factor . -Z-Axis inversion can be controlled using the sysctl tunable -.Nm hw.usb.wsp.z_invert , -set to 0 to disable (default) or 1 to enable inversion. +tunable +.Va kern.evdev.sysmouse_t_axis=3 . +Horizontal scrolling can be used with a two-finger tap and the movement +of a finger from side to side. +The +.Xr sysctl 8 +tunable +.Va hw.usb.wsp.t_factor +must be greater than 0 for horizontal scrolling to be enabled, too. +.Pp +Horizontal swiping with a three-finger tap is registered as mouse buttons +8 and 9, depending on the direction. +These buttons default to backwards and forwards keyboard events. +.Sh SYSCTL VARIABLES +The following variables are available as +.Xr sysctl 8 +tunables: +.Bl -tag -width indent +.It Va hw.usb.wsp.scale_factor +Controls the pointer sensitivity. +Default is 12. +.El +.Bl -tag -width indent +.It Va hw.usb.wsp.enable_single_tap_clicks +Enables single-tap to register as a left-click. +Default is 1 (enabled). +.El +.Bl -tag -width indent +.It Va hw.usb.wsp.enable_single_tap_movement +Enables movement on the trackpad follow a partially-released left-click. +Default is 1 (enabled). +.El +.Bl -tag -width indent +.It Va hw.usb.wsp.max_finger_diameter +Specifies the maximum finger diameter on the trackpad that is registered as a +finger (a lower value is used for palm detection). Default is 1900. +.El +.Bl -tag -width indent +.It Va max_scroll_finger_distance +Specifies the maximum distance between two fingers where z-axis +and t-axis movements are registered. +Z-axis and T-axis movements +are vertical and horizontal movements with more than one finger +tapped (not clicked), respectively. +Default is 8192. +.El +.Bl -tag -width indent +.It Va hw.usb.wsp.max_double_tap_distance +Specifies the maximum distance between two fingers that a two-finger +click will be registered as a right-click. +Default is 2500. +.El +.Bl -tag -width indent +.It Va hw.usb.wsp.scr_threshold +Specifies the minimum horizontal or vertical distance required to +register as a scrolling gesture. +Default is 20. +.El +.Bl -tag -width indent +.It Va hw.usb.wsp.z_factor +Z-axis sensitivity. +Default is 5. +.El +.Bl -tag -width indent +.It Va hw.usb.wsp.z_invert +Z-axis inversion. +Default is 0 (disabled). +.El +.Bl -tag -width indent +.It Va hw.usb.wsp.t_factor +T-axis sensitivity. +Default is 0 (disabled). +.El +.Bl -tag -width indent +.It Va hw.usb.wsp.t_invert +T-axis inversion. +Default is 0 (disabled). +.El +.Bl -tag -width indent +.It Va hw.usb.wsp.scroll_finger_count +Specifies the number of tapped fingers which registers as a scrolling +movement. +Default is 2. +.El +.Bl -tag -width indent +.It Va hw.usb.wsp.horizontal_swipe_finger_count +Speifies the number of tapped fingers which registers as a swipe +gesture. +Default is 3. +.El +.Bl -tag -width indent +.It Va hw.usb.wsp.pressure_touch_threshold +Specifies the threshold for a finger to be registered as a click. +Default is 50. +.El +.Bl -tag -width indent +.It Va hw.usb.wsp.pressure_untouch_threshold +Specifies the threshold for a finger to be registered as an unclick. +Default is 10. +.El +.Bl -tag -width indent +.It Va hw.usb.wsp.pressure_tap_threshold +Specifies the threadhold for a finger to be registered as a tap. +Default is 120. +.El +.Bl -tag -width indent +.It Va hw.usb.wsp.debug +Specifies the +.Nm +driver debugging level (0-3). +Default is 1. +.El .Sh FILES .Nm creates a blocking pseudo-device file, @@ -82,8 +203,7 @@ or .Em mousesystems type device--see .Xr moused 8 -for an explanation of these mouse -types. +for an explanation of these mouse types. .Sh SEE ALSO .Xr sysmouse 4 , .Xr usb 4 , diff --git a/share/man/man4/xb360gp.4 b/share/man/man4/xb360gp.4 index b19334cc3a0b..4e8d4b65fcfd 100644 --- a/share/man/man4/xb360gp.4 +++ b/share/man/man4/xb360gp.4 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 16, 2020 .Dt XB360GP 4 .Os @@ -86,13 +84,13 @@ input event device node. The .Nm driver first appeared in -.Fx 13.0. +.Fx 13.0 . .Sh AUTHORS .An -nosplit The .Nm driver was written by -.An Greg V Aq Mt greg@unrelenting.technology . +.An Val Packett Aq Mt val@packett.cool . .Pp This manual page was written by .An Vladimir Kondratyev Aq Mt wulf@FreeBSD.org . diff --git a/share/man/man4/xdma.4 b/share/man/man4/xdma.4 index f45efda8d12a..674da75d187b 100644 --- a/share/man/man4/xdma.4 +++ b/share/man/man4/xdma.4 @@ -26,8 +26,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 12, 2016 .Dt XDMA 4 .Os diff --git a/share/man/man4/xen.4 b/share/man/man4/xen.4 index c2b1f5be2cbf..284b09bc87b7 100644 --- a/share/man/man4/xen.4 +++ b/share/man/man4/xen.4 @@ -26,22 +26,19 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 30, 2015 +.Dd January 8, 2024 .Dt XEN 4 .Os .Sh NAME .Nm xen -.Nd Xen Hypervisor Guest (DomU) Support +.Nd Xen Hypervisor Support .Sh SYNOPSIS -To compile hardware-assisted virtualization (HVM) Xen guest support with -para-virtualized drivers into an amd64 or i386 kernel, -place the following lines in your kernel configuration file: -.Bd -ragged -offset indent -.Cd "options XENHVM" -.Cd "device xenpci" -.Ed +FreeBSD supports running both as a Xen guest and host on amd64 hardware. +Guest support is limited to HVM and PVH modes, while host support is limited to +PVH mode only. +.Pp +Xen support is built by default in the i386 and amd64 GENERIC kernels; note +however that host mode is only available on amd64. .Sh DESCRIPTION The Xen Hypervisor allows multiple virtual machines to be run on a single computer system. @@ -54,20 +51,18 @@ to access resources such as virtual network interfaces and disk devices. .Pp With later instruction set extensions from AMD and Intel to support fully virtualizable instructions, unmodified virtual memory systems can also be -supported; this is referred to as hardware-assisted virtualization (HVM). +supported; this is referred to as hardware-assisted virtualization (HVM and PVH). HVM configurations may either rely on transparently emulated hardware peripherals, or para-virtualized drivers, which are aware of virtualization, and hence able to optimize certain behaviors to improve performance or semantics. +PVH configurations rely on para-virtualized drivers exclusively for IO. .Pp .Fx -supports hardware-assisted virtualization (HVM) on both i386 and amd64 -kernels. -.Pp Para-virtualized device drivers are required in order to support certain functionality, such as processing management requests, returning idle physical memory pages to the hypervisor, etc. -.Ss Xen DomU device drivers +.Ss Xen device drivers These para-virtualized drivers are supported: .Bl -hang -offset indent -width blkfront .It Nm balloon @@ -89,6 +84,10 @@ suspend, crash, and halt requests. Expose Xen events via the .Pa /dev/xen/evtchn special device. +.It Nm gntdev +Allow access to the grant table interface via the +.Pa /dev/xen/gntdev +special device. .It Nm netback Export local network interfaces to other Xen domains where they can be imported via @@ -96,35 +95,30 @@ imported via .It Nm netfront Import network interfaces from other Xen domains as local network interfaces, which may be used for IPv4, IPv6, etc. -.It Nm pcifront -Allow physical PCI devices to be passed through into a PV domain. +.It Nm privcmd +Allow issuing hypercalls via the +.Pa /dev/xen/privcmd +special device. +.It Nm timer +Implementation of a one-shot high resolution per-CPU timer using the hypercall +interface. +.It Nm acpi cpu +When running as a host forwards power management related information from ACPI +to the hypervisor for better performance management. .It Nm xenpci Represents the Xen PCI device, an emulated PCI device that is exposed to HVM domains. This device allows detection of the Xen hypervisor, and provides interrupt and shared memory services required to interact with the hypervisor. +.It Nm xenstore +Information storage space shared between domains. .El -.Ss Performance considerations -In general, PV drivers will perform better than emulated hardware, and are -the recommended configuration for HVM installations. -.Pp -Using a hypervisor introduces a second layer of scheduling that may limit the -effectiveness of certain -.Fx -scheduling optimisations. -Among these is adaptive locking, which is no longer able to determine whether -a thread holding a lock is in execution. -It is recommended that adaptive locking be disabled when using Xen: -.Bd -unfilled -offset indent -.Cd "options NO_ADAPTIVE_MUTEXES" -.Cd "options NO_ADAPTIVE_RWLOCKS" -.Cd "options NO_ADAPTIVE_SX" -.Ed .Sh HISTORY Support for .Nm first appeared in .Fx 8.1 . +Support for host mode was added in 11.0 . .Sh AUTHORS .An -nosplit .Fx @@ -135,15 +129,10 @@ and Further refinements were made by .An Justin Gibbs Aq Mt gibbs@FreeBSD.org , .An Adrian Chadd Aq Mt adrian@FreeBSD.org , +.An Colin Percival Aq Mt cperciva@FreeBSD.org , and -.An Colin Percival Aq Mt cperciva@FreeBSD.org . +.An Roger Pau Monné Aq Mt royger@FreeBSD.org . This manual page was written by -.An Robert Watson Aq Mt rwatson@FreeBSD.org . -.Sh BUGS -.Fx -is only able to run as a Xen guest (DomU) and not as a Xen host (Dom0). -.Pp -As of this release, Xen PV DomU support is not heavily tested; instability -has been reported during VM migration of PV kernels. -.Pp -Certain PV driver features, such as the balloon driver, are under-exercised. +.An Robert Watson Aq Mt rwatson@FreeBSD.org , +and +.An Roger Pau Monné Aq Mt royger@FreeBSD.org . diff --git a/share/man/man4/xhci.4 b/share/man/man4/xhci.4 index d475c5e502fc..1f9aae5c56a0 100644 --- a/share/man/man4/xhci.4 +++ b/share/man/man4/xhci.4 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2011 Hans Petter Selasky. All rights reserved. +.\" Copyright (c) 2011-2022 Hans Petter Selasky. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -22,15 +22,14 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 24, 2018 +.Dd October 21, 2022 .Dt XHCI 4 .Os .Sh NAME .Nm xhci .Nd USB eXtensible Host Controller driver .Sh SYNOPSIS +.Cd "options USB_DEBUG" .Cd "device xhci" .Sh DESCRIPTION The @@ -48,7 +47,8 @@ The .Tn XHCI controller supports .Tn USB -connection speeds up to 5.0Gbps when using a USB 3.0 compliant device. +connection speeds from 5.0Gbps and above when using USB 3.x +compliant devices. .Sh HARDWARE The .Nm @@ -64,14 +64,37 @@ variables and tunables: .Bl -tag -width indent .It Va hw.usb.xhci.debug -Debug output level, where 0 is debugging disabled and larger values increase -debug message verbosity. -Default is 0. +Set debug output level, where 0 is debugging disabled and larger +values increase debug message verbosity. +The default value is 0. +.It Va hw.usb.xhci.dcepquirk +Set to enable quirk for deconfiguration of endpoints. +The default value is 0. +.It Va hw.usb.xhci.ctlquirk +Set to submit full USB control request as one job, up to 64kBytes. +Else the USB control request will be split into multiple smaller +requests. +The default value is 1. +.It Va hw.usb.xhci.streams +Set to enable USB streams support. +The default value is 0. +.It Va hw.usb.xhci.route +Set bitmap for switching EHCI ports to the XHCI controller. +The default value is 0. +.It Va hw.usb.xhci.polling +Set to use a timer to poll the interrupt handler. +The default value is 0. +.It Va hw.usb.xhci.dma32 +Set to only use 32-bit DMA for the XHCI controller. +The default value is 0. +.It Va hw.usb.xhci.ctlstep +Set to enable control endpoint status state stepping. +The default value is 0. .El .Sh SEE ALSO .Xr ehci 4 , .Xr ohci 4 , -.Xr uhci 4 , +.Xr uhci 4 and .Xr usb 4 .Sh HISTORY The diff --git a/share/man/man4/xl.4 b/share/man/man4/xl.4 index 81cf711a446c..309434154f4e 100644 --- a/share/man/man4/xl.4 +++ b/share/man/man4/xl.4 @@ -28,8 +28,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 23, 2008 .Dt XL 4 .Os diff --git a/share/man/man4/xnb.4 b/share/man/man4/xnb.4 index a23547d68ef0..31eaed8587f9 100644 --- a/share/man/man4/xnb.4 +++ b/share/man/man4/xnb.4 @@ -28,8 +28,6 @@ .\" .\" Authors: Alan Somers (Spectra Logic Corporation) .\" -.\" $FreeBSD$ -.\" .Dd June 6, 2014 .Dt XNB 4 .Os diff --git a/share/man/man4/xpt.4 b/share/man/man4/xpt.4 index c15ca4b55c4c..8faa40cfd561 100644 --- a/share/man/man4/xpt.4 +++ b/share/man/man4/xpt.4 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 10, 1998 .Dt XPT 4 .Os diff --git a/share/man/man4/zero.4 b/share/man/man4/zero.4 index c2ba4bd4b54b..f1cd52d455d1 100644 --- a/share/man/man4/zero.4 +++ b/share/man/man4/zero.4 @@ -29,8 +29,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 7, 1996 .Dt ZERO 4 .Os diff --git a/share/man/man4/zyd.4 b/share/man/man4/zyd.4 index 178adfb3a6e1..687adb97ad3d 100644 --- a/share/man/man4/zyd.4 +++ b/share/man/man4/zyd.4 @@ -1,6 +1,5 @@ .\" $OpenBSD: zyd.4,v 1.22 2007/05/24 02:49:57 cnst Exp $ .\" $NetBSD: zyd.4,v 1.1 2007/06/09 11:20:55 kiyohara Exp $ -.\" $FreeBSD$ .\" .\" Copyright (c) 1997, 1998, 1999 .\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -32,12 +31,12 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd March 7, 2013 +.Dd November 10, 2024 .Dt ZYD 4 .Os .Sh NAME .Nm zyd -.Nd ZyDAS ZD1211/ZD1211B USB IEEE 802.11b/g wireless network device +.Nd ZyDAS ZD1211/ZD1211B USB IEEE 802.11b/g wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -78,51 +77,95 @@ The following devices are known to be supported by the .Nm driver: .Pp -.Bl -tag -width Ds -offset indent -compact -.It 3COM 3CRUSB10075 -.It Acer WLAN-G-US1 -.It Airlink+ AWLL3025 -.It Airlink 101 AWLL3026 -.It AOpen 802.11g WL54 -.It Asus A9T integrated wireless -.It Asus WL-159g -.It Belkin F5D7050 v.4000 -.It Billion BiPAC 3011G -.It Buffalo WLI-U2-KG54L -.It CC&C WL-2203B -.It DrayTek Vigor 550 -.It Edimax EW-7317UG -.It Edimax EW-7317LDG -.It Fiberline Networks WL-43OU -.It iNexQ UR055g -.It Linksys WUSBF54G -.It Longshine LCS-8131G3 -.It MSI US54SE -.It MyTek MWU-201 USB adapter -.It Philips SNU5600 -.It Planet WL-U356 -.It Planex GW-US54GZ -.It Planex GW-US54GZL -.It Planex GW-US54Mini -.It Safecom SWMULZ-5400 -.It Sagem XG 760A -.It Sagem XG 76NA -.It Sandberg Wireless G54 USB -.It Sitecom WL-113 -.It SMC SMCWUSB-G -.It Sweex wireless USB 54 Mbps -.It Tekram/Siemens USB adapter -.It Telegent TG54USB -.It Trendnet TEW-424UB rev A -.It Trendnet TEW-429UB -.It TwinMOS G240 -.It Unicorn WL-54G -.It US Robotics 5423 -.It X-Micro XWL-11GUZX -.It Yakumo QuickWLAN USB -.It Zonet ZEW2501 -.It ZyXEL ZyAIR G-202 -.It ZyXEL ZyAIR G-220 +.Bl -bullet -offset indent -compact +.It +3COM 3CRUSB10075 +.It +Acer WLAN-G-US1 +.It +Airlink+ AWLL3025 +.It +Airlink 101 AWLL3026 +.It +AOpen 802.11g WL54 +.It +Asus A9T integrated wireless +.It +Asus WL-159g +.It +Belkin F5D7050 v.4000 +.It +Billion BiPAC 3011G +.It +Buffalo WLI-U2-KG54L +.It +CC&C WL-2203B +.It +DrayTek Vigor 550 +.It +Edimax EW-7317UG +.It +Edimax EW-7317LDG +.It +Fiberline Networks WL-43OU +.It +iNexQ UR055g +.It +Linksys WUSBF54G +.It +Longshine LCS-8131G3 +.It +MSI US54SE +.It +MyTek MWU-201 USB adapter +.It +Philips SNU5600 +.It +Planet WL-U356 +.It +Planex GW-US54GZ +.It +Planex GW-US54GZL +.It +Planex GW-US54Mini +.It +Safecom SWMULZ-5400 +.It +Sagem XG 760A +.It +Sagem XG 76NA +.It +Sandberg Wireless G54 USB +.It +Sitecom WL-113 +.It +SMC SMCWUSB-G +.It +Sweex wireless USB 54 Mbps +.It +Tekram/Siemens USB adapter +.It +Telegent TG54USB +.It +Trendnet TEW-424UB rev A +.It +Trendnet TEW-429UB +.It +TwinMOS G240 +.It +Unicorn WL-54G +.It +US Robotics 5423 +.It +X-Micro XWL-11GUZX +.It +Yakumo QuickWLAN USB +.It +Zonet ZEW2501 +.It +ZyXEL ZyAIR G-202 +.It +ZyXEL ZyAIR G-220 .El .Sh EXAMPLES The following @@ -132,14 +175,14 @@ channel 11: .Bd -literal -offset indent ifconfig wlan create wlandev zyd0 channel 11 \e wepmode on wepkey 0x1deadbeef1 weptxkey 1 \e - inet 192.168.1.1 netmask 255.255.255.0 + inet 192.0.2.20/24 .Ed .Pp Join an existing BSS network, -.Dq my_net : +.Ar my_net : .Bd -literal -offset indent -ifconfig wlan create wlandev zyd0 192.168.0.2 \e - netmask 0xffffff00 ssid my_net +ifconfig wlan create wlandev zyd0 192.0.2.20/24 \e + ssid my_net .Ed .Sh DIAGNOSTICS .Bl -diag @@ -168,6 +211,7 @@ This should not happen. .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , +.Xr networking 7 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh AUTHORS diff --git a/share/man/man5/Makefile b/share/man/man5/Makefile index 9be4c8dc46b0..e2abf1d60905 100644 --- a/share/man/man5/Makefile +++ b/share/man/man5/Makefile @@ -1,6 +1,3 @@ -# @(#)Makefile 8.1 (Berkeley) 6/5/93 -# $FreeBSD$ - .include <src.opts.mk> #MISSING: dump.5 plot.5 @@ -8,9 +5,7 @@ MAN= acct.5 \ ar.5 \ a.out.5 \ ${_boot.config.5} \ - cd9660.5 \ core.5 \ - devfs.5 \ devfs.conf.5 \ devfs.rules.5 \ device.hints.5 \ @@ -19,13 +14,10 @@ MAN= acct.5 \ elf.5 \ ethers.5 \ eui64.5 \ - ext2fs.5 \ fbtab.5 \ - fdescfs.5 \ forward.5 \ fs.5 \ fstab.5 \ - fusefs.5 \ group.5 \ hosts.5 \ hosts.equiv.5 \ @@ -33,27 +25,20 @@ MAN= acct.5 \ intro.5 \ libmap.conf.5 \ link.5 \ - linprocfs.5 \ - linsysfs.5 \ mailer.conf.5 \ make.conf.5 \ moduli.5 \ motd.5 \ mount.conf.5 \ - mqueuefs.5 \ - msdosfs.5 \ networks.5 \ nsmb.conf.5 \ nsswitch.conf.5 \ - nullfs.5 \ os-release.5 \ passwd.5 \ pbm.5 \ periodic.conf.5 \ phones.5 \ portindex.5 \ - portsnap.conf.5 \ - procfs.5 \ protocols.5 \ quota.user.5 \ rc.conf.5 \ @@ -63,20 +48,15 @@ MAN= acct.5 \ resolver.5 \ services.5 \ shells.5 \ - smbfs.5 \ src.conf.5 \ stab.5 \ style.Makefile.5 \ style.mdoc.5 \ sysctl.conf.5 \ - tmpfs.5 \ - unionfs.5 MLINKS= dir.5 dirent.5 -MLINKS+=ext2fs.5 ext4fs.5 MLINKS+=fs.5 inode.5 MLINKS+=hosts.equiv.5 rhosts.5 -MLINKS+=msdosfs.5 msdos.5 MLINKS+=passwd.5 master.passwd.5 MLINKS+=passwd.5 pwd.db.5 MLINKS+=passwd.5 spwd.db.5 @@ -86,10 +66,6 @@ MLINKS+=rc.conf.5 rc.conf.local.5 MLINKS+=resolver.5 resolv.conf.5 MLINKS+=src.conf.5 src-env.conf.5 -.if ${MK_AUTOFS} != "no" -MAN+= autofs.5 -.endif - .if ${MK_BLUETOOTH} != "no" MAN+= bluetooth.device.conf.5 \ bluetooth.hosts.5 \ @@ -101,7 +77,7 @@ MAN+= freebsd-update.conf.5 .endif .if ${MK_HESIOD} != "no" -MAN+= hesiod.conf.5 +MAN+= hesiod.conf.5 .endif .if ${MK_PF} != "no" diff --git a/share/man/man5/Makefile.depend b/share/man/man5/Makefile.depend index f80275d86ab1..11aba52f82cf 100644 --- a/share/man/man5/Makefile.depend +++ b/share/man/man5/Makefile.depend @@ -1,4 +1,3 @@ -# $FreeBSD$ # Autogenerated - do NOT edit! DIRDEPS = \ diff --git a/share/man/man5/a.out.5 b/share/man/man5/a.out.5 index aa4c7da96929..ddbb41e150e4 100644 --- a/share/man/man5/a.out.5 +++ b/share/man/man5/a.out.5 @@ -28,9 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)a.out.5 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" .Dd June 10, 2010 .Dt A.OUT 5 .Os @@ -386,7 +383,7 @@ The .Dv N_STAB mask selects bits of interest to symbolic debuggers such as -.Xr gdb 1 ; +.Xr gdb 1 Pq Pa ports/devel/gdb ; the values are described in .Xr stab 5 . .It Fa n_other @@ -429,7 +426,7 @@ so its minimum value (or the offset of the first string) is always 4 on 32-bit machines. .Sh SEE ALSO .Xr as 1 , -.Xr gdb 1 , +.Xr gdb 1 Pq Pa ports/devel/gdb , .Xr ld 1 , .Xr brk 2 , .Xr execve 2 , diff --git a/share/man/man5/acct.5 b/share/man/man5/acct.5 index 549eef2c70bb..217de8408de3 100644 --- a/share/man/man5/acct.5 +++ b/share/man/man5/acct.5 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)acct.5 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" .Dd February 13, 2017 .Dt ACCT 5 .Os diff --git a/share/man/man5/ar.5 b/share/man/man5/ar.5 index ca9f96d9c107..e26f385fe815 100644 --- a/share/man/man5/ar.5 +++ b/share/man/man5/ar.5 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 28, 2010 .Dt AR 5 .Os diff --git a/share/man/man5/bluetooth.device.conf.5 b/share/man/man5/bluetooth.device.conf.5 index f2f5bcdc8685..871ffe99636c 100644 --- a/share/man/man5/bluetooth.device.conf.5 +++ b/share/man/man5/bluetooth.device.conf.5 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 29, 2021 .Dt BLUETOOTH.DEVICE.CONF 5 .Os diff --git a/share/man/man5/bluetooth.hosts.5 b/share/man/man5/bluetooth.hosts.5 index 3afa145d055e..7f8ef2b6cc19 100644 --- a/share/man/man5/bluetooth.hosts.5 +++ b/share/man/man5/bluetooth.hosts.5 @@ -23,7 +23,6 @@ .\" SUCH DAMAGE. .\" .\" $Id: bluetooth.hosts.5,v 1.5 2003/05/20 22:52:39 max Exp $ -.\" $FreeBSD$ .\" .Dd May 8, 2003 .Dt BLUETOOTH.HOSTS 5 diff --git a/share/man/man5/bluetooth.protocols.5 b/share/man/man5/bluetooth.protocols.5 index 2968fa39991c..c2c6d57cfdb4 100644 --- a/share/man/man5/bluetooth.protocols.5 +++ b/share/man/man5/bluetooth.protocols.5 @@ -23,7 +23,6 @@ .\" SUCH DAMAGE. .\" .\" $Id: bluetooth.protocols.5,v 1.1 2003/05/20 22:52:39 max Exp $ -.\" $FreeBSD$ .\" .Dd May 8, 2003 .Dt BLUETOOTH.PROTOCOLS 5 diff --git a/share/man/man5/boot.config.5 b/share/man/man5/boot.config.5 index 53835d5329eb..0b6d4c7b34e9 100644 --- a/share/man/man5/boot.config.5 +++ b/share/man/man5/boot.config.5 @@ -21,8 +21,6 @@ .\" 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 October 12, 2020 .Dt BOOT.CONFIG 5 .Os diff --git a/share/man/man5/core.5 b/share/man/man5/core.5 index f109b7932308..8efc8c970014 100644 --- a/share/man/man5/core.5 +++ b/share/man/man5/core.5 @@ -25,10 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)core.5 8.3 (Berkeley) 12/11/93 -.\" $FreeBSD$ -.\" -.Dd October 5, 2021 +.Dd November 12, 2023 .Dt CORE 5 .Os .Sh NAME @@ -170,14 +167,15 @@ Packing is disabled with .Dl sysctl kern.coredump_pack_vmmapinfo=0 . .Sh EXAMPLES In order to store all core images in per-user private areas under -.Pa /var/coredumps , +.Pa /var/coredumps +(assuming the appropriate subdirectories exist and are writable by users), the following .Xr sysctl 8 command can be used: .Pp .Dl sysctl kern.corefile=/var/coredumps/\&%U/\&%N.core .Sh SEE ALSO -.Xr gdb 1 , +.Xr gdb 1 Pq Pa ports/devel/gdb , .Xr gzip 1 , .Xr kgdb 1 Pq Pa ports/devel/gdb , .Xr setrlimit 2 , diff --git a/share/man/man5/devfs.conf.5 b/share/man/man5/devfs.conf.5 index b41cd406fe35..f7141b76c3f6 100644 --- a/share/man/man5/devfs.conf.5 +++ b/share/man/man5/devfs.conf.5 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 25, 2019 .Dt DEVFS.CONF 5 .Os @@ -56,7 +54,7 @@ The action to take for the device. The action names are only significant to the first unique character. .It Ar devname The name of the device created by -.Xr devfs 5 . +.Xr devfs 4 . .It Ar arg The argument of the .Ar action . @@ -70,7 +68,7 @@ This action creates a symbolic link named that points to .Ar devname , the name of the device created by -.Xr devfs 5 . +.Xr devfs 4 . .It Ic own This action changes the ownership of .Ar devname . @@ -120,8 +118,8 @@ perm cd0 0660 .Ed .Sh SEE ALSO .Xr chmod 1 , +.Xr devfs 4 , .Xr devd.conf 5 , -.Xr devfs 5 , .Xr devfs.rules 5 , .Xr chown 8 .Sh AUTHORS diff --git a/share/man/man5/devfs.rules.5 b/share/man/man5/devfs.rules.5 index 07e2963911d0..e878c2a97738 100644 --- a/share/man/man5/devfs.rules.5 +++ b/share/man/man5/devfs.rules.5 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 1, 2020 .Dt DEVFS.RULES 5 .Os @@ -126,7 +124,7 @@ group, a similar rule may be used: .Dl "add path 'usb/*' mode 0660 group usb" .Sh SEE ALSO .Xr glob 3 , -.Xr devfs 5 , +.Xr devfs 4 , .Xr devfs.conf 5 , .Xr devfs 8 , .Xr service 8 diff --git a/share/man/man5/device.hints.5 b/share/man/man5/device.hints.5 index ecaed2ed8085..613e783e9583 100644 --- a/share/man/man5/device.hints.5 +++ b/share/man/man5/device.hints.5 @@ -23,8 +23,6 @@ .\" (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 November 19, 2019 .Dt DEVICE.HINTS 5 .Os diff --git a/share/man/man5/dir.5 b/share/man/man5/dir.5 index 64edd8fb5bda..06788ccc22c3 100644 --- a/share/man/man5/dir.5 +++ b/share/man/man5/dir.5 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)dir.5 8.3 (Berkeley) 4/19/94 -.\" $FreeBSD$ -.\" .Dd November 14, 2018 .Dt DIR 5 .Os diff --git a/share/man/man5/disktab.5 b/share/man/man5/disktab.5 index fd11e2ba7161..965030994bbf 100644 --- a/share/man/man5/disktab.5 +++ b/share/man/man5/disktab.5 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)disktab.5 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" .Dd October 14, 2006 .Dt DISKTAB 5 .Os diff --git a/share/man/man5/elf.5 b/share/man/man5/elf.5 index 95bc183a1f91..d89a917bd96f 100644 --- a/share/man/man5/elf.5 +++ b/share/man/man5/elf.5 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 25, 2022 +.Dd May 26, 2025 .Dt ELF 5 .Os .Sh NAME @@ -866,6 +864,13 @@ This section holds version control information. This section is of type .Sy SHT_PROGBITS . No attribute types are used. +.It .ctors +This legacy section holds pointers to initialization routines, +executed before calling the main program entry point. +This section is of type +.Sy SHT_PROGBITS . +The attributes used are +.Sy SHF_ALLOC . .It .data This section holds initialized data that contribute to the program's memory image. @@ -891,6 +896,13 @@ are unspecified. This section is of type .Sy SHT_PROGBITS . No attribute types are used. +.It .dtors +This legacy section holds pointers to finalization routines, +executed when the program exits normally. +This section is of type +.Sy SHT_PROGBITS . +The attributes used are +.Sy SHF_ALLOC . .It .dynamic This section holds dynamic linking information. The section's attributes @@ -917,7 +929,7 @@ This section is of type The attribute used is .Sy SHF_ALLOC . .It .fini -This section holds executable instructions that contribute to the process +This legacy section holds executable instructions that contribute to the process termination code. When a program exits normally the system arranges to execute the code in this section. @@ -927,6 +939,19 @@ The attributes used are .Sy SHF_ALLOC and .Sy SHF_EXECINSTR . +.It .fini_array +This section holds pointers to finalization routines. +When a program exits normally +.Xr rtld 1 +executes the code referenced by this section. +This section is of type +.Sy SHT_FINI_ARRAY . +The attributes used are +.Sy SHF_ALLOC . +Refer to +.Dv NT_FREEBSD_NOINIT_TAG +.Pq below +for a description of how initialization and finalization code is invoked. .It .got This section holds the global offset table. This section is of type @@ -939,7 +964,7 @@ This section is of type The attribute used is .Sy SHF_ALLOC . .It .init -This section holds executable instructions that contribute to the process +This legacy section holds executable instructions that contribute to the process initialization code. When a program starts to run the system arranges to execute the code in this section before calling the main program entry point. @@ -949,6 +974,20 @@ The attributes used are .Sy SHF_ALLOC and .Sy SHF_EXECINSTR . +.It .init_array +This section holds pointers to initialization routines. +When a program starts to run +.Xr rtld 1 +executes the code referenced by this section before calling the program entry +point. +This section is of type +.Sy SHT_INIT_ARRAY . +The attributes used are +.Sy SHF_ALLOC . +Refer to +.Dv NT_FREEBSD_NOINIT_TAG +.Pq below +for a description of how initialization and finalization code is invoked. .It .interp This section holds the pathname of a program interpreter. If the file has @@ -1022,7 +1061,7 @@ This section is of type The attribute used is .Sy SHF_ALLOC . .It .rodata1 -This section hold read-only data that typically contributes to a +This section holds read-only data that typically contributes to a non-writable segment in the process image. This section is of type .Sy SHT_PROGBITS . @@ -1067,6 +1106,9 @@ and .It .jcr This section holds information about Java classes that must be registered. +It is obsolete and binaries created for +.Fx 15 +or later do not process it. .It .eh_frame This section holds information used for C++ exception-handling. .El @@ -1341,7 +1383,7 @@ The .Va name and .Va desc -fields are padded to ensure 4-byte alignemnt. +fields are padded to ensure 4-byte alignment. .Va namesz and .Va descsz @@ -1383,11 +1425,15 @@ Disable stack gap. .It NT_FREEBSD_FCTL_WXNEEDED Pq Value: 0x08 Indicate that the binary requires mappings that are simultaneously writeable and executable. +.It NT_FREEBSD_FCTL_LA48 Pq Value: 0x10 +Request 48-bit linear address space on amd64. +.It NT_FREEBSD_FCTL_LA57 Pq Value: 0x40 +Accept 57-bit linear address space on amd64. .El .El .Sh SEE ALSO .Xr as 1 , -.Xr gdb 1 , +.Xr gdb 1 Pq Pa ports/devel/gdb , .Xr ld 1 , .Xr objdump 1 , .Xr readelf 1 , diff --git a/share/man/man5/ethers.5 b/share/man/man5/ethers.5 index e10bf3009e3b..03312d171b7d 100644 --- a/share/man/man5/ethers.5 +++ b/share/man/man5/ethers.5 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 12, 1995 .Dt ETHERS 5 .Os diff --git a/share/man/man5/eui64.5 b/share/man/man5/eui64.5 index 4e2dda6159c7..72fa6f722d5f 100644 --- a/share/man/man5/eui64.5 +++ b/share/man/man5/eui64.5 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 11, 2004 .Dt EUI64 5 .Os diff --git a/share/man/man5/fbtab.5 b/share/man/man5/fbtab.5 index 0598fd119903..ab87a5e2d71d 100644 --- a/share/man/man5/fbtab.5 +++ b/share/man/man5/fbtab.5 @@ -1,6 +1,4 @@ .\" -.\" $FreeBSD$ -.\" .Dd August 22, 1994 .Dt FBTAB 5 .Os diff --git a/share/man/man5/forward.5 b/share/man/man5/forward.5 index 78fa61b02577..e03c647ef2a7 100644 --- a/share/man/man5/forward.5 +++ b/share/man/man5/forward.5 @@ -29,8 +29,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 2, 1996 .Dt FORWARD 5 .Os diff --git a/share/man/man5/freebsd-update.conf.5 b/share/man/man5/freebsd-update.conf.5 index f03cdb1e8b8f..5f077cd8f04f 100644 --- a/share/man/man5/freebsd-update.conf.5 +++ b/share/man/man5/freebsd-update.conf.5 @@ -23,8 +23,6 @@ .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 17, 2022 .Dt FREEBSD-UPDATE.CONF 5 .Os diff --git a/share/man/man5/fs.5 b/share/man/man5/fs.5 index c52fa1f1b686..2e3d5da5dbd8 100644 --- a/share/man/man5/fs.5 +++ b/share/man/man5/fs.5 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)fs.5 8.2 (Berkeley) 4/19/94 -.\" $FreeBSD$ -.\" .Dd January 16, 2017 .Dt FS 5 .Os diff --git a/share/man/man5/fstab.5 b/share/man/man5/fstab.5 index 752c1c12cda1..787fe3933aca 100644 --- a/share/man/man5/fstab.5 +++ b/share/man/man5/fstab.5 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)fstab.5 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" .Dd April 14, 2014 .Dt FSTAB 5 .Os @@ -116,7 +113,7 @@ flag. Other options need both the file system specific flag and its argument, separated by an equal sign. For example, mounting an -.Xr msdosfs 5 +.Xr msdosfs 4 filesystem, the options .Bd -literal -offset indent -o sync -o noatime -m 644 -M 755 -u foo -g bar @@ -426,10 +423,9 @@ resides in # Swap space on a block device. /dev/da0p1 none swap sw 0 0 # -# Swap space using a block device with GBDE/GELI encryption. +# Swap space using a block device with GELI encryption. # aalgo, ealgo, keylen, sectorsize options are available # for .eli devices. -/dev/da1p1.bde none swap sw 0 0 /dev/da1p2.eli none swap sw 0 0 # # tmpfs. diff --git a/share/man/man5/group.5 b/share/man/man5/group.5 index 79efa3582530..044164a3c955 100644 --- a/share/man/man5/group.5 +++ b/share/man/man5/group.5 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" From: @(#)group.5 8.3 (Berkeley) 4/19/94 -.\" $FreeBSD$ -.\" .Dd February 8, 2013 .Dt GROUP 5 .Os diff --git a/share/man/man5/hesiod.conf.5 b/share/man/man5/hesiod.conf.5 index 364ea8041e6c..42585224d25f 100644 --- a/share/man/man5/hesiod.conf.5 +++ b/share/man/man5/hesiod.conf.5 @@ -16,8 +16,6 @@ .\" this software for any purpose. It is provided "as is" .\" without express or implied warranty. .\" -.\" $FreeBSD$ -.\" .Dd November 30, 1996 .Dt HESIOD.CONF 5 .Os diff --git a/share/man/man5/hosts.5 b/share/man/man5/hosts.5 index ca7586f039b7..674f86a1e550 100644 --- a/share/man/man5/hosts.5 +++ b/share/man/man5/hosts.5 @@ -25,10 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)hosts.5 8.2 (Berkeley) 12/11/93 -.\" $FreeBSD$ -.\" -.Dd May 25, 2021 +.Dd September 15, 2022 .Dt HOSTS 5 .Os .Sh NAME @@ -87,9 +84,6 @@ file resides in .Xr inet 3 , .Xr nsswitch.conf 5 , .Xr ifconfig 8 -.Rs -.%T "Name Server Operations Guide for BIND" -.Re .Sh HISTORY The .Nm diff --git a/share/man/man5/hosts.equiv.5 b/share/man/man5/hosts.equiv.5 index 10929f0d64d5..dbb3bb2f4205 100644 --- a/share/man/man5/hosts.equiv.5 +++ b/share/man/man5/hosts.equiv.5 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 25, 2013 .Dt HOSTS.EQUIV 5 .Os @@ -126,7 +124,6 @@ and their users except users from netgroup .Dq dau . .Sh SEE ALSO -.Xr rcp 1 , .Xr gethostbyname 3 , .Xr inet 3 , .Xr innetgr 3 , diff --git a/share/man/man5/hosts.lpd.5 b/share/man/man5/hosts.lpd.5 index 740708785e23..d1f227640783 100644 --- a/share/man/man5/hosts.lpd.5 +++ b/share/man/man5/hosts.lpd.5 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 1, 1996 .Dt HOSTS.LPD 5 .Os diff --git a/share/man/man5/intro.5 b/share/man/man5/intro.5 index 27912e3b1683..3e67b319da14 100644 --- a/share/man/man5/intro.5 +++ b/share/man/man5/intro.5 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -25,27 +28,41 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd February 16, 1997 +.Dd November 17, 2024 .Dt INTRO 5 .Os .Sh NAME .Nm intro -.Nd "introduction to file formats" +.Nd introduction to file formats .Sh DESCRIPTION -This section contains information about file formats. +This section contains information about the file formats +which comprise most data structures in the +.Bx +environment, including: +.Pp +.Bl -bullet -compact +.It +.Xr ascii 7 +configuration and resource files +.It +system binary file and stream structures +.It +composition of database files +.El .Sh FILES -.Bl -tag -width /etc/shells -compact -.It Pa /etc -location of most system configuration files +.Bl -tag -width "/usr/local/etc/" -compact +.It Pa /etc/ +base system software configuration files +.It Pa /usr/local/etc/ +locally installed software configuration files .El .Sh SEE ALSO .Xr apropos 1 , .Xr intro 1 , +.Xr hier 7 , .Xr intro 8 .Sh HISTORY The -.Nm -section manual page appeared in +.Nm Ns Pq 5 +manual page first appeared in .Fx 2.2 . diff --git a/share/man/man5/libmap.conf.5 b/share/man/man5/libmap.conf.5 index f59bc071ff51..ae876c1e25b3 100644 --- a/share/man/man5/libmap.conf.5 +++ b/share/man/man5/libmap.conf.5 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 16, 2013 .Dt LIBMAP.CONF 5 .Os diff --git a/share/man/man5/link.5 b/share/man/man5/link.5 index ca3e811fed9b..61c9c09e30bc 100644 --- a/share/man/man5/link.5 +++ b/share/man/man5/link.5 @@ -26,8 +26,6 @@ .\" (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 October 23, 1993 .Dt LINK 5 .Os diff --git a/share/man/man5/linprocfs.5 b/share/man/man5/linprocfs.5 deleted file mode 100644 index 23578c058af9..000000000000 --- a/share/man/man5/linprocfs.5 +++ /dev/null @@ -1,99 +0,0 @@ -.\" $FreeBSD$ -.\" Written by Garrett Wollman -.\" This file is in the public domain. -.\" -.Dd November 13, 2019 -.Dt LINPROCFS 5 -.Os -.Sh NAME -.Nm linprocfs -.Nd Linux process file system -.Sh SYNOPSIS -.Bd -literal -linproc /compat/linux/proc linprocfs rw 0 0 -.Ed -.Sh DESCRIPTION -The Linux process file system, or -.Nm , -emulates a subset of Linux' process file system and is required for -the complete operation of some Linux binaries. -.Pp -The -.Nm -provides a two-level view of process space. -At the highest level, processes themselves are named, according to -their process ids in decimal, with no leading zeros. -There is also a special node called -.Pa self -which always refers to the process making the lookup request. -.Pp -Each node is a directory containing several files: -.Bl -tag -width status -.It Pa exe -A reference to the vnode from which the process text was read. -This can be used to gain access to the process' symbol table, -or to start another copy of the process. -.It Pa mem -The complete virtual memory image of the process. -Only those addresses which exist in the process can be accessed. -Reads and writes to this file modify the process. -Writes to the text segment remain private to the process. -.El -.Pp -Each node is owned by the process's user, and belongs to that user's -primary group, except for the -.Pa mem -node, which belongs to the -.Li kmem -group. -.Sh FILES -.Bl -tag -width /compat/linux/proc/self/XXXXXXX -compact -.It Pa /compat/linux/proc -The normal mount point for the -.Nm . -.It Pa /compat/linux/proc/cpuinfo -CPU vendor and model information in human-readable form. -.It Pa /compat/linux/proc/meminfo -System memory information in human-readable form. -.It Pa /compat/linux/proc/pid -A directory containing process information for process -.Pa pid . -.It Pa /compat/linux/proc/self -A directory containing process information for the current process. -.It Pa /compat/linux/proc/self/exe -The executable image for the current process. -.It Pa /compat/linux/proc/self/mem -The complete virtual address space of the current process. -.El -.Sh EXAMPLES -To mount a -.Nm -file system on -.Pa /compat/linux/proc : -.Pp -.Dl "mount -t linprocfs linproc /compat/linux/proc" -.Sh SEE ALSO -.Xr mount 2 , -.Xr unmount 2 , -.Xr linux 4 , -.Xr procfs 5 , -.Xr pseudofs 9 -.Sh HISTORY -The -.Nm -first appeared in -.Fx 4.0 . -.Sh AUTHORS -.An -nosplit -The -.Nm -was derived from -.Nm procfs -by -.An Pierre Beyssac . -This manual page was written by -.An Dag-Erling Sm\(/orgrav , -based on the -.Xr procfs 5 -manual page by -.An Garrett Wollman . diff --git a/share/man/man5/mailer.conf.5 b/share/man/man5/mailer.conf.5 index c57dab0e067c..e7ec72abfdc5 100644 --- a/share/man/man5/mailer.conf.5 +++ b/share/man/man5/mailer.conf.5 @@ -29,8 +29,6 @@ .\" (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 26, 2017 .Dt MAILER.CONF 5 .Os diff --git a/share/man/man5/make.conf.5 b/share/man/man5/make.conf.5 index b3623b29a950..46bfa91d36ba 100644 --- a/share/man/man5/make.conf.5 +++ b/share/man/man5/make.conf.5 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd June 14, 2021 +.Dd November 15, 2022 .Dt MAKE.CONF 5 .Os .Sh NAME @@ -160,6 +158,15 @@ and .Va COPTFLAGS to contain the appropriate optimization directive to .Xr cc 1 . +To set the +.Va CPUTYPE +value, use +.Dq Li ?= +instead of +.Dq Li = +so that it can be overridden by +.Xr make 1 +targets. The automatic setting of .Va CFLAGS may be overridden using the @@ -573,11 +580,7 @@ The script used by to start, stop, and restart .Xr sendmail 8 . The default value is -.Pa /etc/rc.sendmail . -This value should match the -.Dq Li mta_start_script -setting in -.Xr rc.conf 5 . +.Pa /etc/rc.d/sendmail . .It Va SENDMAIL_SUBMIT_MC .Pq Vt str The default diff --git a/share/man/man5/moduli.5 b/share/man/man5/moduli.5 index becd3eaf0f5f..eead6cd0ab85 100644 --- a/share/man/man5/moduli.5 +++ b/share/man/man5/moduli.5 @@ -14,8 +14,6 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" .Dd July 19, 2012 .Dt MODULI 5 .Os diff --git a/share/man/man5/motd.5 b/share/man/man5/motd.5 index f8d8ee97c668..109fc4e56ca4 100644 --- a/share/man/man5/motd.5 +++ b/share/man/man5/motd.5 @@ -1,9 +1,8 @@ .\" $NetBSD: motd.5,v 1.2 1994/12/28 18:58:53 glass Exp $ .\" .\" This file is in the public domain. -.\" $FreeBSD$ .\" -.Dd October 18, 2020 +.Dd December 14, 2024 .Dt MOTD 5 .Os .Sh NAME @@ -26,9 +25,8 @@ and the contents are written to can be updated without a system reboot by manually restarting the motd service after updating .Pa /etc/motd.template : -.Bd -literal -offset -ident -compact -service motd restart -.Ed +.Pp +.Dl service motd restart .Pp Individual users may suppress the display of this file by creating a file named @@ -36,7 +34,10 @@ creating a file named in their home directories or through .Xr login.conf 5 . .Sh FILES -.Bl -tag -width $HOME/.hushlogin -compact +.Bl -tag -width "/etc/motd.template" -compact +.It Pa /etc/motd +Symbolic link to +.Pa /var/run/motd . .It Pa /etc/motd.template The template file that system administrators can edit. .It Pa /var/run/motd diff --git a/share/man/man5/mount.conf.5 b/share/man/man5/mount.conf.5 index e1127277bdd4..4b5c272ef601 100644 --- a/share/man/man5/mount.conf.5 +++ b/share/man/man5/mount.conf.5 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .\" .Dd October 17, 2013 .Dt MOUNT.CONF 5 @@ -52,7 +50,7 @@ The logic for this is in .Fn vfs_mountroot_conf0 . .It The kernel will first mount -.Xr devfs 5 +.Xr devfs 4 as the root file system. .It Next, the kernel will parse the in-memory config file created in step 1 @@ -62,7 +60,7 @@ See for the format of the config file. .It When the actual root file system is mounted, -.Xr devfs 5 +.Xr devfs 4 will be re-mounted on the .Pa /dev directory. @@ -223,7 +221,7 @@ For each root file system which is mounted, a directory .Em must exist so that the root mount logic can properly re-mount -.Xr devfs 5 . +.Xr devfs 4 . If this directory does not exist, the system may hang during the bootup process. .Sh SEE ALSO diff --git a/share/man/man5/networks.5 b/share/man/man5/networks.5 index 9483439339e9..f0fdf23357e5 100644 --- a/share/man/man5/networks.5 +++ b/share/man/man5/networks.5 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)networks.5 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" .Dd June 5, 1993 .Dt NETWORKS 5 .Os diff --git a/share/man/man5/nsmb.conf.5 b/share/man/man5/nsmb.conf.5 index 84674e455314..0da10343ed77 100644 --- a/share/man/man5/nsmb.conf.5 +++ b/share/man/man5/nsmb.conf.5 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2003 .\" Originally written by Sergey A. Osokin .\" Rewritten by Tom Rhodes @@ -23,16 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 2, 2018 .Dt NSMB.CONF 5 .Os .Sh NAME .Nm nsmb.conf -.Nd configuration file for -.Tn SMB -requests +.Nd configuration file for server message block (SMB1/CIFS) requests .Sh DESCRIPTION The .Nm diff --git a/share/man/man5/nsswitch.conf.5 b/share/man/man5/nsswitch.conf.5 index 63935d8e0fb9..3e033161f921 100644 --- a/share/man/man5/nsswitch.conf.5 +++ b/share/man/man5/nsswitch.conf.5 @@ -31,8 +31,6 @@ .\" 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 6, 2020 .Dt NSSWITCH.CONF 5 .Os diff --git a/share/man/man5/os-release.5 b/share/man/man5/os-release.5 index f578f8a52ce5..c2874a65d8d3 100644 --- a/share/man/man5/os-release.5 +++ b/share/man/man5/os-release.5 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 23, 2021 .Dt OS-RELEASE 5 .Os diff --git a/share/man/man5/passwd.5 b/share/man/man5/passwd.5 index 2b79680a20eb..b1d9e362492c 100644 --- a/share/man/man5/passwd.5 +++ b/share/man/man5/passwd.5 @@ -28,10 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" From: @(#)passwd.5 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" -.Dd June 30, 2022 +.Dd May 16, 2023 .Dt PASSWD 5 .Os .Sh NAME @@ -49,7 +46,7 @@ They can be used in conjunction with the Hesiod domains and .Sq Li uid , and the -.Tn NIS +NIS maps .Sq Li passwd.byname , .Sq Li passwd.byuid , @@ -131,7 +128,7 @@ The login name must not begin with a hyphen .Pq Ql \&- , and cannot contain 8-bit characters, tabs or spaces, or any of these symbols: -.Ql \&,:+&#%^\&(\&)!@~*?<>=|\e\\&/" . +.Ql \&,:+&#%^\&(\&)!@~*?<>=|\e\\&/"\&; . The dollar symbol .Pq Ql \&$ is allowed only as the last character for use with Samba. @@ -310,7 +307,7 @@ lookups occur from the .Sq Li master.passwd.byname , and .Sq Li master.passwd.byuid -.Tn NIS +NIS maps. .Sh COMPAT SUPPORT If @@ -361,7 +358,7 @@ or .Sq Li passwd.byname and .Sq Li passwd.byuid -.Tn NIS +NIS maps (with .Sq Li passwd_compat: nis ) to be included. @@ -372,7 +369,7 @@ or .Ar gid fields, the specified numbers will override the information retrieved from the Hesiod domain or the -.Tn NIS +NIS maps. Likewise, if the .Ar gecos , @@ -381,20 +378,20 @@ or .Ar shell entries contain text, it will override the information included via Hesiod or -.Tn NIS . +NIS . On some systems, the .Ar passwd field may also be overridden. .Sh FILES .Bl -tag -width ".Pa /etc/master.passwd" -compact .It Pa /etc/passwd -.Tn ASCII +ASCII password file, with passwords removed .It Pa /etc/pwd.db .Xr db 3 Ns -format password database, with passwords removed .It Pa /etc/master.passwd -.Tn ASCII +ASCII password file, with passwords intact .It Pa /etc/spwd.db .Xr db 3 Ns -format @@ -444,7 +441,7 @@ file format first appeared in .At v1 . .Pp The -.Tn NIS +NIS .Nm file format first appeared in SunOS. .Pp diff --git a/share/man/man5/pbm.5 b/share/man/man5/pbm.5 index 55d2c5c1be39..d70255c83bdb 100644 --- a/share/man/man5/pbm.5 +++ b/share/man/man5/pbm.5 @@ -1,6 +1,4 @@ .\" -.\" $FreeBSD$ -.\" .Dd September 27, 1991 .Dt PBM 5 .Os diff --git a/share/man/man5/periodic.conf.5 b/share/man/man5/periodic.conf.5 index 119c49502c9d..a2ed2b09d772 100644 --- a/share/man/man5/periodic.conf.5 +++ b/share/man/man5/periodic.conf.5 @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd March 9, 2022 +.Dd April 9, 2024 .Dt PERIODIC.CONF 5 .Os .Sh NAME @@ -636,11 +634,28 @@ The same as .Va daily_scrub_zfs_default_threshold but specific to the pool .Ao Ar poolname Ac Ns . +.It Va daily_trim_zfs_enable +.Pq Vt bool +Set to +.Dq Li YES +if you want to run a zfs trim daily. +.It Va daily_trim_zfs_pools +.Pq Vt str +A space separated list of names of zfs pools to trim. +If the list is empty or not set, all zfs pools are trimmed. .It Va daily_local .Pq Vt str Set to a list of extra scripts that should be run after all other daily scripts. All scripts must be absolute path names. +.It Va daily_diff_flags +.Pq Vt str +Set to the arguments to pass to the +.Xr diff 1 +utility when generating differences. +The default is +.Fl b +.Fl U Cm 0 . .El .Pp The following variables are used by the standard scripts that reside in @@ -809,7 +824,8 @@ Set to the arguments to pass to the .Xr diff 1 utility when generating differences. The default is -.Fl b u . +.Fl b +.Fl U Cm 0 . .It Va security_status_chksetuid_enable .Pq Vt bool Set to diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index 267d84387fe9..fe848b030484 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" $OpenBSD: pf.conf.5,v 1.406 2009/01/31 19:37:12 sobrado Exp $ .\" .\" Copyright (c) 2002, Daniel Hartmeier @@ -28,7 +27,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd March 9, 2022 +.Dd July 2, 2025 .Dt PF.CONF 5 .Os .Sh NAME @@ -101,6 +100,8 @@ Macro names may not be reserved words (for example .Ar in , .Ar out ) . Macros are not expanded inside quotes. +Ranges of network addresses used in macros that will be expanded in lists +later on must be quoted with additional simple quotes. .Pp For example, .Bd -literal -offset indent @@ -108,6 +109,11 @@ ext_if = \&"kue0\&" all_ifs = \&"{\&" $ext_if lo0 \&"}\&" pass out on $ext_if from any to any pass in on $ext_if proto tcp from any to any port 25 + +usr_lan_range = "'192.0.2.0/24'" +srv_lan_range = "'198.51.100.0 - 198.51.100.255'" +nat_ranges = \&"{\&" $usr_lan_range $srv_lan_range \&"}\&" +nat on $ext_if from $nat_ranges to any -> ($ext_if) .Ed .Sh TABLES Tables are named structures which can hold a collection of addresses and @@ -133,8 +139,8 @@ Tables can also be used for the redirect address of .Ar nat and .Ar rdr -rules and in the routing options of filter rules, but only for -.Ar round-robin +and in the routing options of filter rules, but not for +.Ar bitmask pools. .Pp Tables can be defined with any of the following @@ -168,7 +174,7 @@ will be cleared on load. .El .Pp Tables may be defined with the following attributes: -.Bl -tag -width persist +.Bl -tag -width counters .It Ar persist The .Ar persist @@ -196,9 +202,9 @@ Note that this feature carries significant memory overhead for large tables. .Pp For example, .Bd -literal -offset indent -table \*(Ltprivate\*(Gt const { 10/8, 172.16/12, 192.168/16 } -table \*(Ltbadhosts\*(Gt persist -block on fxp0 from { \*(Ltprivate\*(Gt, \*(Ltbadhosts\*(Gt } to any +table <private> const { 10/8, 172.16/12, 192.168/16 } +table <badhosts> persist +block on fxp0 from { <private>, <badhosts> } to any .Ed .Pp creates a table called private, to hold RFC 1918 private network @@ -216,8 +222,8 @@ these hosts can be blocked by using A table can also be initialized with an address list specified in one or more external files, using the following syntax: .Bd -literal -offset indent -table \*(Ltspam\*(Gt persist file \&"/etc/spammers\&" file \&"/etc/openrelays\&" -block on fxp0 from \*(Ltspam\*(Gt to any +table <spam> persist file \&"/etc/spammers\&" file \&"/etc/openrelays\&" +block on fxp0 from <spam> to any .Ed .Pp The files @@ -266,7 +272,8 @@ firewall at the risk of dropping valid idle connections. .It Ar tcp.first The state after the first packet. .It Ar tcp.opening -The state before the destination host ever sends a packet. +The state after the second packet but before both endpoints have +acknowledged the connection. .It Ar tcp.established The fully established state. .It Ar tcp.closing @@ -284,6 +291,21 @@ can prevent blocking of such packets. The state after one endpoint sends an RST. .El .Pp +SCTP timeout are handled similar to TCP, but with its own set of states: +.Pp +.Bl -tag -width xxxx -compact +.It Ar sctp.first +The state after the first packet. +.It Ar sctp.opening +The state before the destination host ever sends a packet. +.It Ar sctp.established +The fully established state. +.It Ar sctp.closing +The state after the first SHUTDOWN chunk has been sent. +.It Ar sctp.closed +The state after SHUTDOWN_ACK has been exchanged and the connection is closed. +.El +.Pp ICMP and UDP are handled in a fashion similar to TCP, but with a much more limited set of states: .Pp @@ -339,8 +361,8 @@ For example: .Bd -literal -offset indent set timeout tcp.first 120 set timeout tcp.established 86400 -set timeout { adaptive.start 6000, adaptive.end 12000 } -set limit states 10000 +set timeout { adaptive.start 60000, adaptive.end 120000 } +set limit states 100000 .Ed .Pp With 9000 state table entries, the timeout values are scaled to 50% @@ -387,7 +409,9 @@ set limit frags 20000 .Ed .Pp sets the maximum number of entries in the memory pool used for fragment -reassembly (generated by +reassembly (generated by the +.Ar set reassemble +option or .Ar scrub rules) to 20000. Using @@ -403,13 +427,10 @@ and options) to 2000. Using .Bd -literal -offset indent -set limit tables 1000 set limit table-entries 100000 .Ed .Pp -sets limits on the memory pools used by tables. -The first limits the number of tables that can exist to 1000. -The second limits the overall number of addresses that can be stored +sets the limit on the overall number of addresses that can be stored in tables to 100000. .Pp Various limits can be combined on a single line: @@ -481,6 +502,29 @@ For example: .Bd -literal -offset indent set optimization aggressive .Ed +.It Ar set reassemble yes | no Op Cm no-df +The +.Cm reassemble +option is used to enable or disable the reassembly of fragmented packets, +and can be set to +.Cm yes +or +.Cm no . +If +.Cm no-df +is also specified, fragments with the +.Dq dont-fragment +bit set are reassembled too, +instead of being dropped; +the reassembled packet will have the +.Dq dont-fragment +bit cleared. +The default value is +.Cm no . +.Pp +This option is ignored if there are pre-FreeBSD 14 +.Cm scrub +rules present. .It Ar set block-policy The .Ar block-policy @@ -493,10 +537,14 @@ action: Packet is silently dropped. .It Ar return A TCP RST is returned for blocked TCP packets, +an SCTP ABORT chunk is returned for blocked SCTP packets, an ICMP UNREACHABLE is returned for blocked UDP packets, and all other packets are silently dropped. .El .Pp +The default value is +.Cm drop . +.Pp For example: .Bd -literal -offset indent set block-policy return @@ -517,6 +565,7 @@ actions are possible: Incoming packet is silently dropped. .It Ar return Incoming packet is dropped and TCP RST is returned for TCP packets, +an SCTP ABORT chunk is returned for blocked SCTP packets, an ICMP UNREACHABLE is returned for UDP packets, and no response is sent for other packets. .El @@ -620,6 +669,8 @@ but can be overridden via this option. Setting this option may leave a small period of time where the fingerprints referenced by the currently active ruleset are inconsistent until the new ruleset finishes loading. +The default location for fingerprints is +.Pa /etc/pf.os . .Pp For example: .Pp @@ -664,13 +715,14 @@ and .Ar pass packets based on attributes of their Ethernet (layer 2) header. .Pp -For each packet processed by the packet filter, the filter rules are -evaluated in sequential order, from first to last. +Each time a packet processed by the packet filter comes in on or +goes out through an interface, the filter rules are evaluated in +sequential order, from first to last. The last matching rule decides what action is taken. If no rule matches the packet, the default action is to pass -the packet. +the packet without creating a state. .Pp -The folliwing actions can be used in the filter: +The following actions can be used in the filter: .Bl -tag -width xxxx .It Ar block The packet is blocked. @@ -679,12 +731,15 @@ Unlike for layer 3 traffic the packet is always silently dropped. The packet is passed; no state is created for layer 2 traffic. .El -.Sh PARAMETERS +.Ss Parameters applicable to layer 2 rules The rule parameters specify the packets to which a rule applies. A packet always comes in on, or goes out through, one interface. Most parameters are optional. If a parameter is specified, the rule only applies to packets with matching attributes. +The matching for some parameters can be inverted with the +.Cm !\& +operator. Certain parameters can be expressed as lists, in which case .Xr pfctl 8 generates all needed rule combinations. @@ -702,7 +757,7 @@ If a packet matches a rule which has the option set, this rule is considered the last matching rule, and evaluation of subsequent rules is skipped. -.It Ar on Aq Ar interface +.It Ar on Aq Ar ifspec This rule applies only to packets coming in on, or going out through, this particular interface or interface group. For more information on interface groups, @@ -710,6 +765,11 @@ see the .Ic group keyword in .Xr ifconfig 8 . +.Ar any +will match any existing interface except loopback ones. +.It Ar bridge-to Aq interface +Packets matching this rule will be sent out of the specified interface without +further processing. .It Ar proto Aq Ar protocol This rule applies only to packets of this protocol. Note that Ethernet protocol numbers are different from those used in @@ -749,19 +809,21 @@ Used to specify that packets must already be tagged with the given tag in order to match the rule. Inverse tag matching can also be done by specifying the ! operator before the tagged keyword. +.El .Sh TRAFFIC NORMALIZATION -Traffic normalization is used to sanitize packet content in such -a way that there are no ambiguities in packet interpretation on -the receiving side. -The normalizer does IP fragment reassembly to prevent attacks -that confuse intrusion detection systems by sending overlapping -IP fragments. -Packet normalization is invoked with the -.Ar scrub -directive. -.Pp -.Ar scrub -has the following options: +Traffic normalization is a broad umbrella term +for aspects of the packet filter which deal with +verifying packets, packet fragments, spoofed traffic, +and other irregularities. +.Ss Scrub +Scrub involves sanitising packet content in such a way +that there are no ambiguities in packet interpretation on the receiving side. +It is invoked with the +.Cm scrub +option, added to filter rules. +.Pp +Parameters are specified enclosed in parentheses. +At least one of the following parameters must be specified: .Bl -tag -width xxxx .It Ar no-df Clears the @@ -820,19 +882,8 @@ Replaces the IP identification field with random values to compensate for predictable values generated by many hosts. This option only applies to packets that are not fragmented after the optional fragment reassembly. -.It Ar fragment reassemble -Using -.Ar scrub -rules, fragments can be reassembled by normalization. -In this case, fragments are buffered until they form a complete -packet, and only the completed packet is passed on to the filter. -The advantage is that filter rules have to deal only with complete -packets, and can ignore fragments. -The drawback of caching fragments is the additional memory cost. .It Ar reassemble tcp Statefully normalizes TCP connections. -.Ar scrub reassemble tcp -rules may not have the direction (in/out) specified. .Ar reassemble tcp performs the following normalizations: .Pp @@ -884,6 +935,41 @@ blind attacker would have to guess the timestamp as well. .Pp For example, .Bd -literal -offset indent +match in all scrub (no-df random-id max-mss 1440) +.Ed +.Ss Scrub ruleset (pre-FreeBSD 14) +In order to maintain compatibility with older releases of FreeBSD +.Ar scrub +rules can also be specified in their own ruleset. +In such case they are invoked with the +.Ar scrub +directive. +If there are such rules present they determine packet reassembly behaviour. +When no such rules are present the option +.Ar set reassembly +takes precedence. +The +.Ar scrub +rules can take all parameters specified above for a +.Ar scrub +option of filter rules and 2 more parameters controlling fragment reassembly: +.Bl -tag -width xxxx +.It Ar fragment reassemble +Using +.Ar scrub +rules, fragments can be reassembled by normalization. +In this case, fragments are buffered until they form a complete +packet, and only the completed packet is passed on to the filter. +The advantage is that filter rules have to deal only with complete +packets, and can ignore fragments. +The drawback of caching fragments is the additional memory cost. +This is the default behaviour unless no fragment reassemble is specified. +.It Ar no fragment reassemble +Do not reassemble fragments. +.El +.Pp +For example, +.Bd -literal -offset indent scrub in on $ext_if all fragment reassemble .Ed .Pp @@ -895,6 +981,14 @@ much in the same way as works in the packet filter (see below). This mechanism should be used when it is necessary to exclude specific packets from broader scrub rules. +.Pp +.Ar scrub +rules in the +.Ar scrub +ruleset are evaluated for every packet before stateful filtering. +This means excessive usage of them will cause performance penalty. +.Ar scrub reassemble tcp +rules must not have the direction (in/out) specified. .Sh QUEUEING with ALTQ The ALTQ system is currently not available in the GENERIC kernel nor as loadable modules. @@ -1255,29 +1349,18 @@ If the .Xr dummynet 4 module is not loaded any traffic sent into a queue or pipe will be dropped. .Sh TRANSLATION -Translation rules modify either the source or destination address of the -packets associated with a stateful connection. -A stateful connection is automatically created to track packets matching -such a rule as long as they are not blocked by the filtering section of -.Nm pf.conf . -The translation engine modifies the specified address and/or port in the -packet, recalculates IP, TCP and UDP checksums as necessary, and passes it to -the packet filter for evaluation. -.Pp -Since translation occurs before filtering the filter -engine will see packets as they look after any -addresses and ports have been translated. -Filter rules will therefore have to filter based on the translated +Translation options modify either the source or destination address and +port of the packets associated with a stateful connection. +.Xr pf 4 +modifies the specified address and/or port in the packet and recalculates +IP, TCP, and UDP checksums as necessary. +.Pp +If specified on a +.Ic match +rule, subsequent rules will see packets as they look +after any addresses and ports have been translated. +These rules will therefore have to filter based on the translated address and port number. -Packets that match a translation rule are only automatically passed if -the -.Ar pass -modifier is given, otherwise they are -still subject to -.Ar block -and -.Ar pass -rules. .Pp The state entry created permits .Xr pf 4 @@ -1286,15 +1369,72 @@ and correctly direct return traffic for that connection. .Pp Various types of translation are possible with pf: .Bl -tag -width xxxx +.It Ar af-to +Translation between different address families (NAT64) is handled +using +.Ar af-to +rules. +Because address family translation overrides the routing table, it's +only possible to use +.Ar af-to +on inbound rules, and a source address of the resulting translation +must always be specified. +.Pp +The optional second argument is the host or subnet the original +addresses are translated into for the destination. +The lowest bits of the original destination address form the host +part of the new destination address according to the specified subnet. +It is possible to embed a complete IPv4 address into an IPv6 address +using a network prefix of /96 or smaller. +.Pp +When a destination address is not specified it is assumed that the host +part is 32-bit long. +For IPv6 to IPv4 translation this would mean using only the lower 32 +bits of the original IPv6 destination address. +For IPv4 to IPv6 translation the destination subnet defaults to the +subnet of the new IPv6 source address with a prefix length of /96. +See RFC 6052 Section 2.2 for details on how the prefix determines the +destination address encoding. +.Pp +For example, the following rules are identical: +.Bd -literal -offset indent +pass in inet af-to inet6 from 2001:db8::1 to 2001:db8::/96 +pass in inet af-to inet6 from 2001:db8::1 +.Ed +.Pp +In the above example the matching IPv4 packets will be modified to +have a source address of 2001:db8::1 and a destination address will +get prefixed with 2001:db8::/96, e.g. 198.51.100.100 will be +translated to 2001:db8::c633:6464. +.Pp +In the reverse case the following rules are identical: +.Bd -literal -offset indent +pass in inet6 from any to 64:ff9b::/96 af-to inet \e + from 198.51.100.1 to 0.0.0.0/0 +pass in inet6 from any to 64:ff9b::/96 af-to inet \e + from 198.51.100.1 +.Ed +.Pp +The destination IPv4 address is assumed to be embedded inside the +original IPv6 destination address, e.g. 64:ff9b::c633:6464 will be +translated to 198.51.100.100. +.Pp +The current implementation will only extract IPv4 addresses from the +IPv6 addresses with a prefix length of /96 and greater. .It Ar binat A -.Ar binat +.Ar binat-to rule specifies a bidirectional mapping between an external IP netblock and an internal IP netblock. -.It Ar nat +It expands to an outbound +.Ar nat-to +rule and an inbound +.Ar rdr-to +rule. +.It Ar nat-to A -.Ar nat -rule specifies that IP addresses are to be changed as the packet +.Ar nat-to +option specifies that IP addresses are to be changed as the packet traverses the given interface. This technique allows one or more IP addresses on the translating host to support network traffic for a larger range of @@ -1302,35 +1442,112 @@ machines on an "inside" network. Although in theory any IP address can be used on the inside, it is strongly recommended that one of the address ranges defined by RFC 1918 be used. These netblocks are: -.Bd -literal -10.0.0.0 - 10.255.255.255 (all of net 10, i.e., 10/8) -172.16.0.0 - 172.31.255.255 (i.e., 172.16/12) -192.168.0.0 - 192.168.255.255 (i.e., 192.168/16) +.Bd -literal -offset indent +10.0.0.0 - 10.255.255.255 (all of net 10.0.0.0, i.e., 10.0.0.0/8) +172.16.0.0 - 172.31.255.255 (i.e., 172.16.0.0/12) +192.168.0.0 - 192.168.255.255 (i.e., 192.168.0.0/16) .Ed -.It Pa rdr +.Pp +.Ar nat-to +is usually applied outbound. +If applied inbound, nat-to to a local IP address is not supported. +.It Pa rdr-to The packet is redirected to another destination and possibly a different port. -.Ar rdr -rules can optionally specify port ranges instead of single ports. -rdr ... port 2000:2999 -\*(Gt ... port 4000 +.Ar rdr-to +can optionally specify port ranges instead of single ports. +For instance: +.Bd -literal -offset indent +match in ... port 2000:2999 rdr-to ... port 4000 +.Ed redirects ports 2000 to 2999 (inclusive) to port 4000. -rdr ... port 2000:2999 -\*(Gt ... port 4000:* +.Bd -literal -offset indent +qmatch in ... port 2000:2999 rdr-to ... port 4000:* +.Ed redirects port 2000 to 4000, 2001 to 4001, ..., 2999 to 4999. .El .Pp +.Ar rdr-to +is usually applied inbound. +If applied outbound, rdr-to to a local IP address is not supported. In addition to modifying the address, some translation rules may modify source or destination ports for .Xr tcp 4 or .Xr udp 4 connections; implicitly in the case of -.Ar nat -rules and explicitly in the case of -.Ar rdr -rules. +.Ar nat-to +options and both implicitly and explicitly in the case of +.Ar rdr-to +ones. +A +.Ar rdr-to +opion may cause the source port to be modified if doing so avoids a conflict +with an existing connection. +A random source port in the range 50001-65535 is chosen in this case. Port numbers are never translated with a -.Ar binat -rule. +.Ar binat-to +option. +.Pp +Note that redirecting external incoming connections to the loopback +address, as in +.Bd -literal -offset indent +pass in on egress proto tcp from any to any port smtp \e + rdr-to 127.0.0.1 port spamd +.Ed +.Pp +will effectively allow an external host to connect to daemons +bound solely to the loopback address, circumventing the traditional +blocking of such connections on a real interface. +Unless this effect is desired, any of the local non-loopback addresses +should be used as redirection target instead, which allows external +connections only to daemons bound to this address or not bound to +any address. +.Pp +See +.Sx TRANSLATION EXAMPLES +below. +.Ss NAT ruleset (pre-FreeBSD 15) +In order to maintain compatibility with older releases of FreeBSD +.Ar NAT +rules can also be specified in their own ruleset. +A stateful connection is automatically created to track packets matching +such a rule as long as they are not blocked by the filtering section of +.Nm pf.conf . +Since translation occurs before filtering the filter +engine will see packets as they look after any +addresses and ports have been translated. +Filter rules will therefore have to filter based on the translated +address and port number. +Packets that match a translation rule are only automatically passed if +the +.Ar pass +modifier is given, otherwise they are +still subject to +.Ar block +and +.Ar pass +rules. +.Pp +The following rules can be defined in the NAT ruleset: +.Ar binat , +.Ar nat , +and +.Ar rdr . +They have the same effect as +.Ar binat-to , +.Ar nat-to +and +.Ar rdr-to +options for filter rules. +.Pp +The +.Ar no +option prefixed to a translation rule causes packets to remain untranslated, +much in the same way as +.Ar drop quick +works in the packet filter. +If no rule matches the packet it is passed to the filter engine unmodified. .Pp Evaluation order of the translation rules is dependent on the type of the translation rules and of the direction of a packet. @@ -1345,14 +1562,6 @@ Rules of the same type are evaluated in the same order in which they appear in the ruleset. The first matching rule decides what action is taken. .Pp -The -.Ar no -option prefixed to a translation rule causes packets to remain untranslated, -much in the same way as -.Ar drop quick -works in the packet filter (see below). -If no rule matches the packet it is passed to the filter engine unmodified. -.Pp Translation rules apply only to packets that pass through the specified interface, and if no interface is specified, translation is applied to packets on all interfaces. @@ -1365,22 +1574,8 @@ Redirections cannot reflect packets back through the interface they arrive on, they can only be redirected to hosts connected to different interfaces or to the firewall itself. .Pp -Note that redirecting external incoming connections to the loopback -address, as in -.Bd -literal -offset indent -rdr on ne3 inet proto tcp to port smtp -\*(Gt 127.0.0.1 port spamd -.Ed -.Pp -will effectively allow an external host to connect to daemons -bound solely to the loopback address, circumventing the traditional -blocking of such connections on a real interface. -Unless this effect is desired, any of the local non-loopback addresses -should be used as redirection target instead, which allows external -connections only to daemons bound to this address or not bound to -any address. -.Pp See -.Sx TRANSLATION EXAMPLES +.Sx COMPATIBILITY TRANSLATION EXAMPLES below. .Sh PACKET FILTERING .Xr pf 4 @@ -1398,6 +1593,7 @@ and layer 4 (see .Xr icmp 4 , .Xr icmp6 4 , .Xr tcp 4 , +.Xr sctp 4 , .Xr udp 4 ) headers. In addition, packets may also be @@ -1412,7 +1608,7 @@ and , the last matching rule decides what action is taken. For .Ar match -, rules are evaulated every time they match; the pass/block state of a packet +, rules are evaluated every time they match; the pass/block state of a packet remains unchanged. If no rule matches the packet, the default action is to pass the packet. @@ -1447,7 +1643,8 @@ can be overridden by specifying a message as a code or number. .It Ar return This causes a TCP RST to be returned for .Xr tcp 4 -packets and an ICMP UNREACHABLE for UDP and other packets. +packets, an SCTP ABORT for SCTP +and an ICMP UNREACHABLE for UDP and other packets. .El .Pp Options returning ICMP packets currently have no effect if @@ -1470,13 +1667,18 @@ rules differ from .Ar block and .Ar pass -rules in that parameters are set every time a packet matches the rule, not only +rules in that parameters are set for every rule a packet matches, not only on the last matching rule. For the following parameters, this means that the parameter effectively becomes "sticky" until explicitly overridden: +.Ar nat-to , +.Ar binat-to , +.Ar rdr-to , .Ar queue , .Ar dnpipe , -.Ar dnqueue +.Ar dnqueue , +.Ar rtable , +.Ar scrub . .It Ar pass The packet is passed; @@ -1518,10 +1720,6 @@ allows echo requests (such as those created by out statefully, and matches incoming echo replies correctly to states. .Pp Also, looking up states is usually faster than evaluating rules. -If there are 50 rules, all of them are evaluated sequentially in O(n). -Even with 50000 states, only 16 comparisons are needed to match a -state, since states are stored in a binary search tree that allows -searches in O(log2 n). .Pp Furthermore, correct handling of ICMP error messages is critical to many protocols, particularly TCP. @@ -1553,7 +1751,7 @@ handles state tracking. See .Sx STATEFUL TRACKING OPTIONS below for further details. -.Sh PARAMETERS +.Ss Parameters The rule parameters specify the packets to which a rule applies. A packet always comes in on, or goes out through, one interface. Most parameters are optional. @@ -1570,34 +1768,49 @@ If neither nor .Ar out are specified, the rule will match packets in both directions. -.It Ar log -In addition to the action specified, a log message is generated. +.It Ar log Pq Cm all | matches | to Ao Ar interface Ac | Cm user +In addition to any action specified, +log the packet. Only the packet that establishes the state is logged, unless the .Ar no state option is specified. The logged packets are sent to a .Xr pflog 4 -interface, by default -.Ar pflog0 . -This interface is monitored by the +interface, by default pflog0; +pflog0 is monitored by the .Xr pflogd 8 -logging daemon, which dumps the logged packets to the file +logging daemon which logs to the file .Pa /var/log/pflog in .Xr pcap 3 binary format. -.It Ar log (all) -Used to force logging of all packets for a connection. +.Pp +The keywords +.Cm all , matches , to , +and +.Cm user +are optional and can be combined using commas, +but must be enclosed in parentheses if given. +.Pp +Use +.Cm all +to force logging of all packets for a connection. This is not necessary when .Ar no state is explicitly specified. -As with -.Ar log , -packets are logged to -.Xr pflog 4 . -.It Ar log (user) -Logs the +.Pp +If +.Cm matches +is specified, +it logs the packet on all subsequent matching rules. +It is often combined with +.Cm to Aq Ar interface +to avoid adding noise to the default log file. +.Pp +The keyword +.Cm user +logs the .Ux user ID of the user that owns the socket and the PID of the process that has the socket open where the packet is sourced from or destined to @@ -1608,11 +1821,10 @@ Only the first packet logged via .Ar log (all, user) will have the user credentials logged when using stateful matching. -.It Ar log (to Aq Ar interface ) -Send logs to the specified -.Xr pflog 4 -interface instead of -.Ar pflog0 . +.Pp +To specify a logging interface other than pflog0, +use the syntax +.Cm to Aq Ar interface . .It Ar quick If a packet matches a rule which has the .Ar quick @@ -1627,6 +1839,8 @@ see the .Ic group keyword in .Xr ifconfig 8 . +.Ar any +will match any existing interface except loopback ones. .It Aq Ar af This rule applies only to packets of this address family. Supported values are @@ -1639,6 +1853,7 @@ Common protocols are .Xr icmp 4 , .Xr icmp6 4 , .Xr tcp 4 , +.Xr sctp 4 , and .Xr udp 4 . For a list of all the protocol name to number mappings used by @@ -1668,6 +1883,8 @@ Any address which is not currently routable. Any source address that fails a unicast reverse path forwarding (URPF) check, i.e. packets coming in on an interface other than that which holds the route back to the packet's source address. +.It Ar self +Expands to all addresses assigned to all interfaces. .It Aq Ar table Any address that matches the given table. .El @@ -1680,7 +1897,9 @@ For instance: means all addresses from 10.1.1.10 to 10.1.1.12, hence addresses 10.1.1.10, 10.1.1.11, and 10.1.1.12. .Pp -Interface names and interface group names can have modifiers appended: +Interface names and interface group names, and +.Ar self +can have modifiers appended: .Pp .Bl -tag -width xxxxxxxxxxxx -compact .It Ar :network @@ -1723,17 +1942,17 @@ Ports and ranges of ports are specified by using these operators: .Bd -literal -offset indent = (equal) != (unequal) -\*(Lt (less than) -\*(Le (less than or equal) -\*(Gt (greater than) -\*(Ge (greater than or equal) +< (less than) +<= (less than or equal) +> (greater than) +>= (greater than or equal) : (range including boundaries) -\*(Gt\*(Lt (range excluding boundaries) -\*(Lt\*(Gt (except range) +>< (range excluding boundaries) +<> (except range) .Ed .Pp -.Sq \*(Gt\*(Lt , -.Sq \*(Lt\*(Gt +.Sq >< , +.Sq <> and .Sq \&: are binary operators (they take two arguments). @@ -1741,15 +1960,15 @@ For instance: .Bl -tag -width Fl .It Ar port 2000:2004 means -.Sq all ports \*(Ge 2000 and \*(Le 2004 , +.Sq all ports >= 2000 and <= 2004 , hence ports 2000, 2001, 2002, 2003 and 2004. -.It Ar port 2000 \*(Gt\*(Lt 2004 +.It Ar port 2000 >< 2004 means -.Sq all ports \*(Gt 2000 and \*(Lt 2004 , +.Sq all ports > 2000 and < 2004 , hence ports 2001, 2002 and 2003. -.It Ar port 2000 \*(Lt\*(Gt 2004 +.It Ar port 2000 <> 2004 means -.Sq all ports \*(Lt 2000 or \*(Gt 2004 , +.Sq all ports < 2000 or > 2004 , hence ports 1-1999 and 2005-65535. .El .Pp @@ -1765,9 +1984,9 @@ The host, port and OS specifications are optional, as in the following examples: .Bd -literal -offset indent pass in all pass in from any to any -pass in proto tcp from any port \*(Le 1024 to any +pass in proto tcp from any port < 1024 to any pass in proto tcp from any to any port 25 -pass in proto tcp from 10.0.0.0/8 port \*(Gt 1024 \e +pass in proto tcp from 10.0.0.0/8 port >= 1024 \e to ! 10.1.2.3 port != ssh pass in proto tcp from any os "OpenBSD" .Ed @@ -1826,7 +2045,7 @@ The following example allows only selected users to open outgoing connections: .Bd -literal -offset indent block out proto { tcp, udp } all -pass out proto { tcp, udp } all user { \*(Lt 1000, dhartmei } +pass out proto { tcp, udp } all user { < 1000, dhartmei } .Ed .It Xo Ar flags Aq Ar a .Pf / Ns Aq Ar b @@ -1877,7 +2096,10 @@ if one flushes the state table. However, states created from such intermediate packets may be missing connection details such as the TCP window scaling factor. States which modify the packet flow, such as those affected by -.Ar nat , binat No or Ar rdr +.Ar af-to , +.Ar nat , +.Ar binat or +.Ar rdr rules, .Ar modulate No or Ar synproxy state options, or scrubbed with @@ -1934,20 +2156,21 @@ pass all tos 0x10 pass all tos 16 .Ed .It Ar allow-opts -By default, IPv4 packets with IP options or IPv6 packets with routing -extension headers are blocked. +By default, packets with IPv4 options or IPv6 hop-by-hop or destination +options header are blocked. When .Ar allow-opts is specified for a .Ar pass rule, packets that pass the filter based on that rule (last matching) -do so even if they contain IP options or routing extension headers. +do so even if they contain options. For packets that match state, the rule that initially created the state is used. The implicit .Ar pass -rule that is used when a packet does not match any rules does not -allow IP options. +rule, that is used when a packet does not match +any rules, does not allow IP options or option headers. +Note that IPv6 packets with type 0 routing headers are always dropped. .It Ar label Aq Ar string Adds a label (name) to the rule, which can be used to identify the rule. For instance, @@ -1977,15 +2200,15 @@ For example: .Bd -literal -offset indent ips = \&"{ 1.2.3.4, 1.2.3.5 }\&" pass in proto tcp from any to $ips \e - port \*(Gt 1023 label \&"$dstaddr:$dstport\&" + port > 1023 label \&"$dstaddr:$dstport\&" .Ed .Pp expands to .Bd -literal -offset indent pass in inet proto tcp from any to 1.2.3.4 \e - port \*(Gt 1023 label \&"1.2.3.4:\*(Gt1023\&" + port > 1023 label \&"1.2.3.4:>1023\&" pass in inet proto tcp from any to 1.2.3.5 \e - port \*(Gt 1023 label \&"1.2.3.5:\*(Gt1023\&" + port > 1023 label \&"1.2.3.5:>1023\&" .Ed .Pp The macro expansion for the @@ -1994,6 +2217,24 @@ directive occurs only at configuration file parse time, not during runtime. .It Ar ridentifier Aq Ar number Add an identifier (number) to the rule, which can be used to correlate the rule to pflog entries, even after ruleset updates. +.It Cm max-pkt-rate Ar number Ns / Ns Ar seconds +Measure the rate of packets matching the rule and states created by it. +When the specified rate is exceeded, the rule stops matching. +Only packets in the direction in which the state was created are considered, +so that typically requests are counted and replies are not. +For example, +to pass up to 100 ICMP packets per 10 seconds: +.Bd -literal -offset indent +block in proto icmp +pass in proto icmp max-pkt-rate 100/10 +.Ed +.Pp +When the rate is exceeded, all ICMP is blocked until the rate falls below +100 per 10 seconds again. +.Pp +.It Ar max-pkt-size Aq Ar number +Limit each packet to be no more than the specified number of bytes. +This includes the IP header, but not any layer 2 header. .It Xo Ar queue Aq Ar queue .No \*(Ba ( Aq Ar queue , .Aq Ar queue ) @@ -2020,15 +2261,22 @@ If the packet is transmitted on a .Xr vlan 4 interface, the queueing priority will be written as the priority code point in the 802.1Q VLAN header. -If two priorities are given, packets which have a TOS of +If two priorities are given, TCP ACKs with no data payload and packets +which have a TOS of .Cm lowdelay -and TCP ACKs with no data payload will be assigned to the second one. +will be assigned to the second one. .Pp For example: .Bd -literal -offset indent pass in proto tcp to port 25 set prio 2 pass in proto tcp to port 22 set prio (2, 5) .Ed +.It Oo Cm \&! Oc Ns Cm received-on Ar interface +Only match packets which were received on the specified +.Ar interface +(or interface group). +.Ar any +will match any existing interface except loopback ones. .It Ar tag Aq Ar string Packets matching this rule will be tagged with the specified string. @@ -2056,31 +2304,28 @@ Tags take the same macros as labels (see above). Used with filter, translation or scrub rules to specify that packets must already be tagged with the given tag in order to match the rule. -Inverse tag matching can also be done -by specifying the -.Cm !\& -operator before the -.Ar tagged -keyword. .It Ar rtable Aq Ar number Used to select an alternate routing table for the routing lookup. Only effective before the route lookup happened, i.e. when filtering inbound. .It Xo Ar divert-to Aq Ar host .Ar port Aq Ar port .Xc -Used to redirect packets to a local socket bound to -.Ar host -and +Used to +.Xr divert 4 +packets to the given divert .Ar port . -The packets will not be modified, so -.Xr getsockname 2 -on the socket will return the original destination address of the packet. +Historically +.Ox pf has another meaning for this, and +.Fx pf uses +this syntax to support +.Xr divert 4 instead. Hence, +.Ar host +has no meaning and can be set to anything like 127.0.0.1. +If a packet is re-injected and does not change direction then it will not be +re-diverted. .It Ar divert-reply -Used to receive replies for sockets that are bound to addresses -which are not local to the machine. -See -.Xr setsockopt 2 -for information on how to bind these sockets. +It has no meaning in +.Fx pf . .It Ar probability Aq Ar number A probability attribute can be attached to a rule, with a value set between 0 and 1, bounds not included. @@ -2173,8 +2418,8 @@ The option loops through the redirection address(es). .Pp When more than one redirection address is specified, -.Ar round-robin -is the only permitted pool type. +.Ar bitmask +is not permitted as a pool type. .It Ar static-port With .Ar nat @@ -2203,6 +2448,16 @@ nat on $gif_mape_if from $int_if:network to any \e .Ed .Pp sets PSID offset 6, PSID length 8, PSID 0x34. +.It Ar endpoint-independent +With +.Ar nat +rules, the +.Ar endpoint-independent +option caues +.Xr pf 4 +to always map connections from a UDP source address and port to the same +NAT address and port. +This feature implements "full-cone" NAT behavior. .El .Pp Additionally, the @@ -2324,7 +2579,7 @@ must be specified explicitly to apply options to a rule. .It Ar max Aq Ar number Limits the number of concurrent states the rule may create. When this limit is reached, further packets that would create -state will not match this rule until existing states time out. +state are dropped until existing states time out. .It Ar no-sync Prevent state changes for states created by this rule from appearing on the .Xr pfsync 4 @@ -2343,6 +2598,14 @@ easier. This is intended to be used in situations where one does not see all packets of a connection, e.g. in asymmetric routing situations. Cannot be used with modulate or synproxy state. +.It Ar pflow +States created by this rule are exported on the +.Xr pflow 4 +interface. +.It Ar allow-related +Automatically allow connections related to this one, regardless of rules that +might otherwise affect them. +This currently only applies to SCTP multihomed connection. .El .Pp Multiple options can be specified, separated by commas: @@ -2402,6 +2665,9 @@ Limit the rate of new connections over a time interval. The connection rate is an approximation calculated as a moving average. .El .Pp +When one of these limits is reached, further packets that would create +state are dropped until existing states time out. +.Pp Because the 3-way handshake ensures that the source address is not being spoofed, more aggressive action can be taken based on these limits. With the @@ -2430,9 +2696,9 @@ table and have all states originating from it flushed. Any new packets arriving from this host will be dropped unconditionally by the block rule. .Bd -literal -offset indent -block quick from \*(Ltbad_hosts\*(Gt +block quick from <bad_hosts> pass in on $ext_if proto tcp to $webserver port www keep state \e - (max-src-conn-rate 100/10, overload \*(Ltbad_hosts\*(Gt flush global) + (max-src-conn-rate 100/10, overload <bad_hosts> flush global) .Ed .Sh OPERATING SYSTEM FINGERPRINTING Passive OS Fingerprinting is a mechanism to inspect nuances of a TCP @@ -2560,6 +2826,8 @@ contain the necessary header information for the subprotocol that allows to filter on things such as TCP ports or to perform NAT. .Pp Besides the use of +.Ar set reassemble +option or .Ar scrub rules as described in .Sx TRAFFIC NORMALIZATION @@ -2568,7 +2836,11 @@ above, there are three options for handling fragments in the packet filter. One alternative is to filter individual fragments with filter rules. If no .Ar scrub -rule applies to a fragment, it is passed to the filter. +rule applies to a fragment or +.Ar set reassemble +is set to +.Cm no +, it is passed to the filter. Filter rules with matching IP header parameters decide whether the fragment is passed or blocked, in the same way as complete packets are filtered. @@ -2601,11 +2873,13 @@ rules. .Pp In most cases, the benefits of reassembly outweigh the additional memory cost, and it's recommended to use +.Ar set reassemble +option or .Ar scrub -rules to reassemble -all fragments via the +rules with the .Ar fragment reassemble -modifier. +modifier to reassemble +all fragments. .Pp The memory allocated for fragment caching can be limited using .Xr pfctl 8 . @@ -2816,12 +3090,13 @@ anchor, if any, before finally evaluating the .Ar pass rule. .Pp -Filter rule -.Ar anchors -can also be loaded inline in the ruleset within a brace ('{' '}') delimited -block. +An +.Ar anchor +rule can also contain a filter ruleset in a brace-delimited block. +In that case, no separate loading of rules into the anchor +is required. Brace delimited blocks may contain rules or other brace-delimited blocks. -When anchors are loaded this way the anchor name becomes optional. +When an anchor is populated this way the anchor name becomes optional. .Bd -literal -offset indent anchor "external" on $ext_if { block @@ -2838,25 +3113,36 @@ reference to an anchor name containing characters will require double quote .Pq Sq \&" characters around the anchor name. +.Sh SCTP CONSIDERATIONS +.Xr pf 4 +supports +.Xr sctp 4 +connections. +It can match ports, track state and NAT SCTP traffic. +However, it will not alter port numbers during nat or rdr translations. +Doing so would break SCTP multihoming. .Sh TRANSLATION EXAMPLES This example maps incoming requests on port 80 to port 8080, on which a daemon is running (because, for example, it is not run as root, and therefore lacks permission to bind to port 80). -.Bd -literal +.Bd -literal -offset indent # use a macro for the interface name, so it can be changed easily ext_if = \&"ne3\&" # map daemon on 8080 to appear to be on 80 -rdr on $ext_if proto tcp from any to any port 80 -\*(Gt 127.0.0.1 port 8080 +match in on $ext_if proto tcp from any to any port 80 \e + rdr-to 127.0.0.1 port 8080 .Ed .Pp -If the +If a .Ar pass -modifier is given, packets matching the translation rule are passed without -inspecting the filter rules: -.Bd -literal -rdr pass on $ext_if proto tcp from any to any port 80 -\*(Gt 127.0.0.1 \e - port 8080 +rule is used with the +.Ar quick +modifier, packets matching the translation rule are passed without +inspecting subsequent filter rules: +.Bd -literal -offset indent +pass in quick on $ext_if proto tcp from any to any port 80 \e + rdr-to 127.0.0.1 port 8080 .Ed .Pp In the example below, vlan12 is configured as 192.168.168.1; @@ -2867,29 +3153,8 @@ network appear as though it is the Internet routable address 204.92.77.111 to nodes behind any interface on the router except for the nodes on vlan12. (Thus, 192.168.168.1 can talk to the 192.168.168.0/24 nodes.) -.Bd -literal -nat on ! vlan12 from 192.168.168.0/24 to any -\*(Gt 204.92.77.111 -.Ed -.Pp -In the example below, the machine sits between a fake internal 144.19.74.* -network, and a routable external IP of 204.92.77.100. -The -.Ar no nat -rule excludes protocol AH from being translated. -.Bd -literal -# NO NAT -no nat on $ext_if proto ah from 144.19.74.0/24 to any -nat on $ext_if from 144.19.74.0/24 to any -\*(Gt 204.92.77.100 -.Ed -.Pp -In the example below, packets bound for one specific server, as well as those -generated by the sysadmins are not proxied; all other connections are. -.Bd -literal -# NO RDR -no rdr on $int_if proto { tcp, udp } from any to $server port 80 -no rdr on $int_if proto { tcp, udp } from $sysadmins to any port 80 -rdr on $int_if proto { tcp, udp } from any to any port 80 -\*(Gt 127.0.0.1 \e - port 80 +.Bd -literal -offset indent +match out on ! vlan12 from 192.168.168.0/24 to any nat-to 204.92.77.111 .Ed .Pp This longer example uses both a NAT and a redirection. @@ -2902,68 +3167,94 @@ The three mandatory anchors for are omitted from this example; see the .Xr ftp-proxy 8 manpage. -.Bd -literal +.Bd -literal -offset indent # NAT # Translate outgoing packets' source addresses (any protocol). # In this case, any address but the gateway's external address is mapped. -nat on $ext_if inet from ! ($ext_if) to any -\*(Gt ($ext_if) +pass out on $ext_if inet from ! ($ext_if) to any nat-to ($ext_if) # NAT PROXYING # Map outgoing packets' source port to an assigned proxy port instead of # an arbitrary port. # In this case, proxy outgoing isakmp with port 500 on the gateway. -nat on $ext_if inet proto udp from any port = isakmp to any -\*(Gt ($ext_if) \e - port 500 +pass out on $ext_if inet proto udp from any port = isakmp to any \e + nat-to ($ext_if) port 500 # BINAT # Translate outgoing packets' source address (any protocol). # Translate incoming packets' destination address to an internal machine # (bidirectional). -binat on $ext_if from 10.1.2.150 to any -\*(Gt $ext_if +pass on $ext_if from 10.1.2.150 to any binat-to $ext_if + +# Translate packets arriving on $peer_if addressed to 172.22.16.0/20 +# to the corresponding address in 172.21.16.0/20 (bidirectional). +pass on $peer_if from 172.21.16.0/20 to any binat-to 172.22.16.0/20 # RDR # Translate incoming packets' destination addresses. # As an example, redirect a TCP and UDP port to an internal machine. -rdr on $ext_if inet proto tcp from any to ($ext_if) port 8080 \e - -\*(Gt 10.1.2.151 port 22 -rdr on $ext_if inet proto udp from any to ($ext_if) port 8080 \e - -\*(Gt 10.1.2.151 port 53 +pass in on $ext_if inet proto tcp from any to ($ext_if) port 8080 \e + rdr-to 10.1.2.151 port 22 +pass in on $ext_if inet proto udp from any to ($ext_if) port 8080 \e + rdr-to 10.1.2.151 port 53 # RDR # Translate outgoing ftp control connections to send them to localhost # for proxying with ftp-proxy(8) running on port 8021. -rdr on $int_if proto tcp from any to any port 21 -\*(Gt 127.0.0.1 port 8021 +pass in on $int_if proto tcp from any to any port 21 \e + rdr-to 127.0.0.1 port 8021 .Ed .Pp In this example, a NAT gateway is set up to translate internal addresses using a pool of public addresses (192.0.2.16/28) and to redirect incoming web server connections to a group of web servers on the internal network. -.Bd -literal +.Bd -literal -offset indent # NAT LOAD BALANCE # Translate outgoing packets' source addresses using an address pool. # A given source address is always translated to the same pool address by # using the source-hash keyword. -nat on $ext_if inet from any to any -\*(Gt 192.0.2.16/28 source-hash +pass out on $ext_if inet from any to any nat-to 192.0.2.16/28 source-hash # RDR ROUND ROBIN # Translate incoming web server connections to a group of web servers on # the internal network. -rdr on $ext_if proto tcp from any to any port 80 \e - -\*(Gt { 10.1.2.155, 10.1.2.160, 10.1.2.161 } round-robin +pass in on $ext_if proto tcp from any to any port 80 \e + rdr-to { 10.1.2.155, 10.1.2.160, 10.1.2.161 } round-robin +.Ed +.Sh COMPATIBILITY TRANSLATION EXAMPLES +In the example below, the machine sits between a fake internal 144.19.74.* +network, and a routable external IP of 204.92.77.100. +The +.Ar no nat +rule excludes protocol AH from being translated. +.Bd -literal -offset indent +# NAT +no nat on $ext_if proto ah from 144.19.74.0/24 to any +nat on $ext_if from 144.19.74.0/24 to any -> 204.92.77.100 +.Ed +.Pp +In the example below, packets bound for one specific server, as well as those +generated by the sysadmins are not proxied; all other connections are. +.Bd -literal -offset indent +# RDR +no rdr on $int_if proto { tcp, udp } from any to $server port 80 +no rdr on $int_if proto { tcp, udp } from $sysadmins to any port 80 +rdr on $int_if proto { tcp, udp } from any to any port 80 \e + -> 127.0.0.1 port 80 .Ed .Sh FILTER EXAMPLES -.Bd -literal +.Bd -literal -offset indent # The external interface is kue0 # (157.161.48.183, the only routable address) # and the private network is 10.0.0.0/8, for which we are doing NAT. +# Reassemble incoming traffic +set reassemble yes + # use a macro for the interface name, so it can be changed easily ext_if = \&"kue0\&" -# normalize all incoming traffic -scrub in on $ext_if all fragment reassemble - # block and log everything by default block return log on $ext_if all @@ -3043,12 +3334,26 @@ pass out on $ext_if proto tcp from any to any port 80 # tag incoming packets as they are redirected to spamd(8). use the tag # to pass those packets through the packet filter. -rdr on $ext_if inet proto tcp from \*(Ltspammers\*(Gt to port smtp \e - tag SPAMD -\*(Gt 127.0.0.1 port spamd +rdr on $ext_if inet proto tcp from <spammers> to port smtp \e + tag SPAMD -> 127.0.0.1 port spamd block in on $ext_if pass in on $ext_if inet proto tcp tagged SPAMD .Ed +.Pp +In the example below, a router handling both address families +translates an internal IPv4 subnet to IPv6 using the well-known +64:ff9b::/96 prefix: +.Bd -literal -offset 4n +pass in on $v4_if inet af-to inet6 from ($v6_if) to 64:ff9b::/96 +.Ed +.Pp +Paired with the example above, the example below can be used on +another router handling both address families to translate back +to IPv4: +.Bd -literal -offset 4n +pass in on $v6_if inet6 to 64:ff9b::/96 af-to inet from ($v4_if) +.Ed .Sh GRAMMAR Syntax for .Nm @@ -3076,39 +3381,46 @@ option = "set" ( [ "timeout" ( timeout | "{" timeout-list "}" ) ] | [ "keepcounters" ] ) ether-rule = "ether" etheraction [ ( "in" | "out" ) ] - [ "quick" ] [ "on" ifspec ] [ etherprotospec ] - etherhosts [ "l3" hosts ] [ etherfilteropt-list ] + [ "quick" ] [ "on" ifspec ] [ "bridge-to" interface-name ] + [ etherprotospec ] [ etherhosts ] [ "l3" hosts ] + [ etherfilteropt-list ] pf-rule = action [ ( "in" | "out" ) ] [ "log" [ "(" logopts ")"] ] [ "quick" ] [ "on" ifspec ] [ route ] [ af ] [ protospec ] - hosts [ filteropt-list ] + [ hosts ] [ filteropt-list ] logopts = logopt [ "," logopts ] -logopt = "all" | "user" | "to" interface-name +logopt = "all" | "matches" | "user" | "to" interface-name etherfilteropt-list = etherfilteropt-list etherfilteropt | etherfilteropt -etherfilteropt = "tag" string | "tagged" string | "queue" ( string ) +etherfilteropt = "tag" string | "tagged" string | "queue" ( string ) | + "ridentifier" number | "label" string filteropt-list = filteropt-list filteropt | filteropt filteropt = user | group | flags | icmp-type | icmp6-type | "tos" tos | + "af-to" af "from" ( redirhost | "{" redirhost-list "}" ) + [ "to" ( redirhost | "{" redirhost-list "}" ) ] | ( "no" | "keep" | "modulate" | "synproxy" ) "state" [ "(" state-opts ")" ] | "fragment" | "no-df" | "min-ttl" number | "set-tos" tos | "max-mss" number | "random-id" | "reassemble tcp" | fragmentation | "allow-opts" | - "label" string | "tag" string | [ ! ] "tagged" string | + "label" string | "tag" string | [ "!" ] "tagged" string | + "max-pkt-rate" number "/" seconds | "set prio" ( number | "(" number [ [ "," ] number ] ")" ) | + "max-pkt-size" number | "queue" ( string | "(" string [ [ "," ] string ] ")" ) | "rtable" number | "probability" number"%" | "prio" number | "dnpipe" ( number | "(" number "," number ")" ) | "dnqueue" ( number | "(" number "," number ")" ) | - "ridentifier" number + "ridentifier" number | + [ ! ] "received-on" ( interface-name | interface-group ) nat-rule = [ "no" ] "nat" [ "pass" [ "log" [ "(" logopts ")" ] ] ] [ "on" ifspec ] [ af ] [ protospec ] hosts [ "tag" string ] [ "tagged" string ] - [ "-\*(Gt" ( redirhost | "{" redirhost-list "}" ) + [ "->" ( redirhost | "{" redirhost-list "}" ) [ portspec ] [ pooltype ] [ "static-port" ] [ "map-e-portset" number "/" number "/" number ] ] @@ -3117,19 +3429,19 @@ binat-rule = [ "no" ] "binat" [ "pass" [ "log" [ "(" logopts ")" ] ] ] [ "proto" ( proto-name | proto-number ) ] "from" address [ "/" mask-bits ] "to" ipspec [ "tag" string ] [ "tagged" string ] - [ "-\*(Gt" address [ "/" mask-bits ] ] + [ "->" address [ "/" mask-bits ] ] rdr-rule = [ "no" ] "rdr" [ "pass" [ "log" [ "(" logopts ")" ] ] ] [ "on" ifspec ] [ af ] [ protospec ] hosts [ "tag" string ] [ "tagged" string ] - [ "-\*(Gt" ( redirhost | "{" redirhost-list "}" ) + [ "->" ( redirhost | "{" redirhost-list "}" ) [ portspec ] [ pooltype ] ] antispoof-rule = "antispoof" [ "log" ] [ "quick" ] "for" ifspec [ af ] [ "label" string ] [ "ridentifier" number ] -table-rule = "table" "\*(Lt" string "\*(Gt" [ tableopts-list ] +table-rule = "table" "<" string ">" [ tableopts-list ] tableopts-list = tableopts-list tableopts | tableopts tableopts = "persist" | "const" | "counters" | "file" string | "{" [ tableaddr-list ] "}" @@ -3161,7 +3473,7 @@ schedulers = ( cbq-def | priq-def | hfsc-def ) bandwidth-spec = "number" ( "b" | "Kb" | "Mb" | "Gb" | "%" ) etheraction = "pass" | "block" -action = "pass" | "block" [ return ] | [ "no" ] "scrub" +action = "pass" | "match" | "block" [ return ] | [ "no" ] "scrub" return = "drop" | "return" | "return-rst" [ "( ttl" number ")" ] | "return-icmp" [ "(" icmpcode [ [ "," ] icmp6code ] ")" ] | "return-icmp6" [ "(" icmp6code ")" ] @@ -3177,7 +3489,8 @@ route = ( "route-to" | "reply-to" | "dup-to" ) [ pooltype ] af = "inet" | "inet6" -etherprotospec = "proto" ( proto-number | "{" proto-list "}" ) +etherprotospec = "proto" ( proto-number | "{" etherproto-list "}" ) +etherproto-list = proto-number [ [ "," ] etherproto-list ] protospec = "proto" ( proto-name | proto-number | "{" proto-list "}" ) proto-list = ( proto-name | proto-number ) [ [ "," ] proto-list ] @@ -3192,7 +3505,7 @@ hosts = "all" | "{" host-list "}" ) [ port ] ipspec = "any" | host | "{" host-list "}" -host = [ "!" ] ( address [ "/" mask-bits ] | "\*(Lt" string "\*(Gt" ) +host = [ "!" ] ( address [ "/" mask-bits ] | "<" string ">" ) redirhost = address [ "/" mask-bits ] routehost = "(" interface-name [ address [ "/" mask-bits ] ] ")" address = ( interface-name | interface-group | @@ -3208,9 +3521,9 @@ os = "os" ( os-name | "{" os-list "}" ) user = "user" ( unary-op | binary-op | "{" op-list "}" ) group = "group" ( unary-op | binary-op | "{" op-list "}" ) -unary-op = [ "=" | "!=" | "\*(Lt" | "\*(Le" | "\*(Gt" | "\*(Ge" ] +unary-op = [ "=" | "!=" | "<" | "<=" | ">" | ">=" ] ( name | number ) -binary-op = number ( "\*(Lt\*(Gt" | "\*(Gt\*(Lt" | ":" ) number +binary-op = number ( "<>" | "><" | ":" ) number op-list = ( unary-op | binary-op ) [ [ "," ] op-list ] os-name = operating-system-name @@ -3235,14 +3548,16 @@ state-opt = ( "max" number | "no-sync" | timeout | "sloppy" | "max-src-nodes" number | "max-src-states" number | "max-src-conn" number | "max-src-conn-rate" number "/" number | - "overload" "\*(Lt" string "\*(Gt" [ "flush" ] | - "if-bound" | "floating" ) + "overload" "<" string ">" [ "flush" ] | + "if-bound" | "floating" | "pflow" ) fragmentation = [ "fragment reassemble" ] timeout-list = timeout [ [ "," ] timeout-list ] timeout = ( "tcp.first" | "tcp.opening" | "tcp.established" | "tcp.closing" | "tcp.finwait" | "tcp.closed" | + "sctp.first" | "sctp.opening" | "sctp.established" | + "sctp.closing" | "sctp.closed" | "udp.first" | "udp.single" | "udp.multiple" | "icmp.first" | "icmp.error" | "other.first" | "other.single" | "other.multiple" | @@ -3295,7 +3610,9 @@ Service name database. .Xr ip 4 , .Xr ip6 4 , .Xr pf 4 , +.Xr pflow 4 , .Xr pfsync 4 , +.Xr sctp 4 , .Xr tcp 4 , .Xr udp 4 , .Xr hosts 5 , diff --git a/share/man/man5/pf.os.5 b/share/man/man5/pf.os.5 index 18c72468e64a..422f70e8a651 100644 --- a/share/man/man5/pf.os.5 +++ b/share/man/man5/pf.os.5 @@ -14,8 +14,6 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.\" $FreeBSD$ -.\" .Dd May 31, 2007 .Dt PF.OS 5 .Os diff --git a/share/man/man5/phones.5 b/share/man/man5/phones.5 index 713c88117688..373d90fca8f6 100644 --- a/share/man/man5/phones.5 +++ b/share/man/man5/phones.5 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)phones.5 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" .Dd June 5, 1993 .Dt PHONES 5 .Os diff --git a/share/man/man5/portindex.5 b/share/man/man5/portindex.5 index c997a256167f..f943975cc506 100644 --- a/share/man/man5/portindex.5 +++ b/share/man/man5/portindex.5 @@ -24,8 +24,6 @@ .\" (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 October 14, 2012 .Dt PORTINDEX 5 .Os diff --git a/share/man/man5/portsnap.conf.5 b/share/man/man5/portsnap.conf.5 deleted file mode 100644 index cef4c24815bf..000000000000 --- a/share/man/man5/portsnap.conf.5 +++ /dev/null @@ -1,147 +0,0 @@ -.\"- -.\" Copyright 2004-2005 Colin Percival -.\" All rights reserved -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted providing 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 ``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 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 30, 2005 -.Dt PORTSNAP.CONF 5 -.Os FreeBSD -.Sh NAME -.Nm portsnap.conf -.Nd configuration file for -.Xr portsnap 8 -.Sh DESCRIPTION -The -.Nm -file controls where -.Xr portsnap 8 -fetches ports tree snapshots from, -which RSA key should be trusted to sign the updates, and what -directories should hold the compressed and live ports trees. -.Pp -A line of the form -.Dl SERVERNAME=portsnap.example.com -specifies the source from which snapshots should be fetched. -This is equivalent to the -.Fl s Ar server -option to -.Xr portsnap 8 , -and will be ignored if the command-line -option is used. -.Pp -A line of the form -.Dl KEYPRINT=0123456789abc ... 456789abcdef -(64 characters in total) -specifies the SHA-256 hash of the OpenSSL public key file -belonging to an RSA keypair which is trusted to sign updates. -This is equivalent to the -.Fl k Ar KEY -option to -.Xr portsnap 8 , -and will be ignored if the command-line -option is used. -.Pp -A line of the form -.Dl WORKDIR=/path/to/workdir -specifies the directory in which portsnap should maintain its compressed -snapshot of the ports tree. -This is equivalent to the -.Fl d Ar workdir -option to -.Xr portsnap 8 , -and will be ignored if the command-line option -is used. -.Pp -A line of the form -.Dl PORTSDIR=/path/to/portstree -specifies the directory in which portsnap will create the live ports -tree from its compressed snapshot via the -.Cm extract -and -.Cm update -commands. -This is equivalent to the -.Fl p Ar portsdir -option to -.Xr portsnap 8 , -and will be ignored if the command-line option -is used. -.Pp -If more than one line of any of the above forms is included in -.Nm -then only the last one will take effect. -.Pp -A line of the form -.Dl INDEX INDEXFILE DESCRIBEFILE -will instruct -.Xr portsnap 8 -that the specified INDEX file is generated from the specified -describe file distributed by the portsnap server. -.Pp -Finally, a line of the form -.Dl REFUSE foo bar -will instruct -.Xr portsnap 8 -to ignore parts of the ports tree with paths starting with -.Ar foo -or -.Ar bar , -which are interpreted as extended regular expressions by -.Xr egrep 1 . -This will result in those parts of the tree not being updated -in the compressed snapshot when the -.Cm fetch -and -.Cm cron -commands are used and not being extracted when the -.Cm extract -command is used (unless a specific -.Ar path -is passed to -.Xr portsnap 8 ) , -and if those parts of the ports tree are present they -will not be updated when the -.Cm update -command is used. -Unlike the other options, the parameters in REFUSE lines -accumulate and all such lines are considered. -.Bf Em -Note that operating with an incomplete ports tree is not -supported and may cause unexpected results. -.Ef -.Pp -Any lines not of the above forms will be ignored. -.Sh FILES -.Bl -tag -width "/etc/portsnap.conf" -.It Pa /etc/portsnap.conf -Default location of the portsnap configuration file. -.El -.Sh SEE ALSO -.Xr egrep 1 , -.Xr fetch 1 , -.Xr sha256 1 , -.Xr portsnap 8 -.Sh AUTHORS -.An Colin Percival Aq Mt cperciva@FreeBSD.org diff --git a/share/man/man5/protocols.5 b/share/man/man5/protocols.5 index 1ccf0ce2be61..0b15e3ae654b 100644 --- a/share/man/man5/protocols.5 +++ b/share/man/man5/protocols.5 @@ -25,10 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)protocols.5 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" -.Dd June 5, 1993 +.Dd December 7, 2020 .Dt PROTOCOLS 5 .Os .Sh NAME @@ -37,9 +34,8 @@ .Sh DESCRIPTION The .Nm -file contains information regarding the known protocols used in the -.Tn DARPA -Internet. +file contains information regarding the assigned protocol numbers +used by IPv4 and IPv6 to identify the next level protocol. For each protocol a single line should be present with the following information: .Bd -unfilled -offset indent @@ -67,10 +63,22 @@ file resides in .El .Sh SEE ALSO .Xr getprotoent 3 +.Rs +.%R RFC 2780 +.%D March 2000 +.%T "IANA Allocation Guidelines For Values In the \ +Internet Protocol and Related Headers" +.Re +.Rs +.%R RFC 5237 +.%D February 2008 +.%T "IANA Allocation Guidelines for the Protocol Field" +.Re .Sh HISTORY The .Nm file format appeared in -.Bx 4.2 . +.Bx 4.2 , +describing the "known protocols used in the DARPA Internet". .Sh BUGS A name server should be used instead of a static file. diff --git a/share/man/man5/quota.user.5 b/share/man/man5/quota.user.5 index 0bcc591d5db9..7bfbd4eda3d1 100644 --- a/share/man/man5/quota.user.5 +++ b/share/man/man5/quota.user.5 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 30, 2007 .Dt QUOTA.USER 5 .Os diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 473f5b16a30f..2fd63e4f743d 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 7, 2022 +.Dd May 21, 2025 .Dt RC.CONF 5 .Os .Sh NAME @@ -80,8 +78,13 @@ script in the .Pa /etc/rc.conf.d directory or .Ao Ar dir Ac Ns Pa /rc.conf.d -directories specified in +directories (where +.Ao Ar dir Ac +is each entry specified in .Va local_startup , +but with any trailing +.Pa /rc.d +stripped), which will be included by the .Va load_rc_config function. @@ -100,9 +103,8 @@ and will be loaded. If .Ao Ar dir Ac Ns Pa /rc.conf.d/ Ns Ao Ar name Ac -is a directory, -all of files in the directory will be loaded. -Also see the +is a directory then all of the files in the directory will be loaded. +See also the .Va rc_conf_files variable below. .Pp @@ -192,6 +194,14 @@ services are enabled that utilize the force_depend check. .Pq Vt str .Xr chroot 8 to this directory before running the service. +.It Ao Ar name Ac Ns Va _cpuset +.Pq Vt str +A list of CPUs to run the service on. +Passed to +.Xr cpuset 1 +using the +.Fl l +flag. .It Ao Ar name Ac Ns Va _fib .Pq Vt int The @@ -239,9 +249,37 @@ such as PostgreSQL will not inherit the OOM killer protection. .Pp This variable has no effect on services running within a .Xr jail 8 . +.It Ao Ar name Ac Ns Va _setup +.Pq Vt str +Run the specified setup script right before starting the actual service +command. +Useful for automatic configuration file generation. +.It Ao Ar name Ac Ns Va _umask +.Pq Vt int +Run the service using this +.Xr umask 1 +value. .It Ao Ar name Ac Ns Va _user .Pq Vt str Run the service under this user account. +.It Ao Ar name Ac Ns Va _svcj +.Pq Vt bool +If set to +.Dq Li YES , +auto-jail the service with inherited filesystem and other +jail properties depending on +.Ao Ar name Ac Ns Va _svcj_options . +.It Ao Ar name Ac Ns Va _svcj_ipaddrs +.Pq Vt str +A list of IP addresses that the service jail will be permitted to use. +If this is not specified, the service jail will be permitted to use all +assigned IP addresses if networking is enabled in the jail. +.It Ao Ar name Ac Ns Va _svcj_options +.Pq Vt str +A list of jail properties for the service. +See +.Sx SERVICE JAILS +for a list of valid properties. .It Va apm_enable .Pq Vt bool If set to @@ -313,10 +351,6 @@ A whitespace-separated list of kernel modules to load right after the local disks are mounted, without any .Pa .ko extension or path. -Loading modules at this point in the boot process is -much faster than doing it via -.Pa /boot/loader.conf -for those modules not necessary for mounting local disks. .It Va kldxref_enable .Pq Vt bool Set to @@ -375,6 +409,12 @@ is set to these are the flags to pass to the .Xr powerd 8 daemon. +.It Va svcj_all_enable +Enable auto-jailing of all services which are not explicitly +excluded. +See +.Sx SERVICE JAILS +for more info. .It Va tmpmfs Controls the creation of a .Pa /tmp @@ -458,6 +498,33 @@ is mounted on normal systems. Clean the .Pa /var directory. +.It Va var_run_enable +.Pq Vt bool +Set to "YES" to enable saving of the +.Pa /var/run +directory structure into an mtree file at shutdown and the reload of the +.Pa /var/run +directory structure at boot. +.It Va var_run_autosave +.Pq Vt bool +In some cases it may be undesirable to save +.Pa /var/run +at shutdown. +When set to "NO" +.Pa /var/run +is loaded at reboot but not saved at shutdown. +Typically in this scenario +.Ql service var_run save +would be performed to save a copy of the +.Pa /var/run +directory structure once, to be reloaded during all subsequent reboots. +.It Va var_run_mtree +.Pq Vt str +Where to save the +.Pa /var/run +mtree. +The default location is +.Pa /var/db/mtree/BSD.var-run.mtree . .It Va local_startup .Pq Vt str List of directories to search for startup script files. @@ -495,20 +562,44 @@ your console login will display the default hostname of The NIS domain name of this host, or .Dq Li NO if NIS is not used. +.It Va hostid_enable +.Pq Vt bool +If set to +.Dq Li NO , +disable the generation or saving of the +.Pa hostid +and +.Pa machine-id +files at system boot and shutdown. +.It Va hostid_file +.Pq Vt str +Path to the +.Pa hostid +file, default +.Pa /etc/hostid . +.It Va hostid_uuidgen_flags +.Pq Vt str +Flags passed to +.Xr uuidgen 1 +when generating a software host UUID. +This is used only if the system cannot determine a hardware UUID. +Set to +.Dq Li -r +by default. +.It Va machine_id_file +.Pq Vt str +Path to the +.Pa machine-id +file, default +.Pa /etc/machine-id . .It Va dhclient_program .Pq Vt str -Path to the DHCP client program -.Pa ( /sbin/dhclient , -the -.Ox -DHCP client, -is the default). +Path to the DHCP client program, defaulting to +.Pa /sbin/dhclient . .It Va dhclient_flags .Pq Vt str Additional flags to pass to the DHCP client program. -For the -.Ox -DHCP client, see the +See the .Xr dhclient 8 manpage for a description of the command line options available. .It Va dhclient_flags_ Ns Aq Ar iface @@ -531,6 +622,15 @@ When specified, this variable overrides the variable for interface .Ar iface only. +.It Va dhclient_arpwait +.Pq Vt bool +Set to +.Dq Li NO +to stop +.Xr dhclient 8 +from waiting for ARP resolution, to make the system boot faster. +This may be done on networks where the DHCP server is certain to +know whether an address is available. .It Va synchronous_dhclient .Pq Vt bool Set to @@ -703,7 +803,7 @@ is also set to Setting this to .Dq Li YES will enable netflow logging via -.Xr ng_netflow 4 +.Xr ng_netflow 4 . .Pp By default a ipfw rule is inserted and all packets are duplicated with the ngtee command and netflow packets are sent to 127.0.0.1 on the netflow @@ -730,7 +830,8 @@ Destination server port for receiving netflow data .Pa 9995 ) . .It Va ipfw_netflow_version .Pq Vt int -Do not set for using version 5 of the netflow protocol, set it to 9 for using version 9. +Do not set for using version 5 of the netflow protocol, set it to 9 for using +version 9. .It Va ipfw_netflow_fib .Pq Vt int Only match packet in FIB @@ -1279,7 +1380,7 @@ Set to by default. This setting will be identical to .Dq Li YES , -if a dynamicrouting daemon is enabled, because redirect processing may +if a dynamic routing daemon is enabled, because redirect processing may cause performance issues for large routing tables. If no such service is enabled, this setting behaves like a .Dq Li NO . @@ -1347,13 +1448,18 @@ variables as described below. .Pp An .Va ifconfig_ Ns Aq Ar interface -variable is also assumed to exist for each value of +variable is assumed to exist for each value of .Ar interface . When an interface name contains any of the characters .Dq Li .-/+ they are translated to .Dq Li _ before lookup. +For example, the interface +.Va em0.102 +would be configured using the variable +.Va ifconfig_em0_102 . +.Pp The variable can contain arguments to .Xr ifconfig 8 , as well as special case-insensitive keywords described below. @@ -1361,6 +1467,18 @@ Such keywords are removed before passing the value to .Xr ifconfig 8 while the order of the other arguments is preserved. .Pp +For example, to assign the IPv4 address 192.0.2.1/24 to the interface em0: +.Bd -literal +ifconfig_em0="inet 192.0.2.1/24 up" +.Ed +.Pp +If the variable +.Va ifconfig_ Ns Ao Ar interface Ac Ns Pa _ipv6 +is set, then +.Va ifconfig_ Ns Aq Ar interface +does not need to be set unless an IPv4 address should also be assigned to +the interface. +.Pp It is possible to add IP alias entries using .Xr ifconfig 8 syntax with the address family keyword such as @@ -1369,8 +1487,8 @@ Assuming that the interface in question was .Li em0 , it might look something like this: .Bd -literal -ifconfig_em0_alias0="inet 127.0.0.253 netmask 0xffffffff" -ifconfig_em0_alias1="inet 127.0.0.254 netmask 0xffffffff" +ifconfig_em0_alias0="inet 127.0.0.253/32" +ifconfig_em0_alias1="inet 127.0.0.254/32" .Ed .Pp It also possible to configure multiple IP addresses in Classless @@ -1399,12 +1517,12 @@ netif_ipexpand_max="4096" .Pp In the case of .Li 192.0.2.5-23/24 , -the address 192.0.2.5 will be configured with the -netmask /24 and the addresses 192.0.2.6 to 192.0.2.23 with -the non-conflicting netmask /32 as explained in the +the address 192.0.2.5 will be configured with the prefix length /24 and the +addresses 192.0.2.6 to 192.0.2.23 with the non-conflicting prefix length /32 as +explained in the .Xr ifconfig 8 alias section. -Note that this special netmask handling is only for +Note that this special CIDR handling is only for .Li inet , not for the other address families such as .Li inet6 . @@ -1436,10 +1554,10 @@ its contents are passed to Execution stops at the first unsuccessful access, so if something like this is present: .Bd -literal -ifconfig_em0_alias0="inet 127.0.0.251 netmask 0xffffffff" -ifconfig_em0_alias1="inet 127.0.0.252 netmask 0xffffffff" -ifconfig_em0_alias2="inet 127.0.0.253 netmask 0xffffffff" -ifconfig_em0_alias4="inet 127.0.0.254 netmask 0xffffffff" +ifconfig_em0_alias0="inet 127.0.0.251/32" +ifconfig_em0_alias1="inet 127.0.0.252/32" +ifconfig_em0_alias2="inet 127.0.0.253/32" +ifconfig_em0_alias4="inet 127.0.0.254/32" .Ed .Pp Then note that alias4 would @@ -1453,16 +1571,16 @@ there is .Va ifconfig_ Ns Ao Ar interface Ac Ns Va _aliases variable, which has the same functionality as .Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n -and can have all of entries in a variable like the following: +and can have all of the entries in a variable like the following: .Bd -literal ifconfig_em0_aliases="\\ - inet 127.0.0.251 netmask 0xffffffff \\ - inet 127.0.0.252 netmask 0xffffffff \\ - inet 127.0.0.253 netmask 0xffffffff \\ - inet 127.0.0.254 netmask 0xffffffff" + inet 127.0.0.251/32 \\ + inet 127.0.0.252/32 \\ + inet 127.0.0.253/32 \\ + inet 127.0.0.254/32" .Ed .Pp -It also supports CIDR notation. +It also supports netmask notation for backward compatibility. .Pp If the .Pa /etc/start_if . Ns Aq Ar interface @@ -1499,7 +1617,7 @@ To create a vlan device named .Li em0.101 on .Li em0 -with the vlan tag 101 and the optional the IPv4 address 192.0.2.1/24: +with the vlan tag 101 and the optional IPv4 address 192.0.2.1/24: .Bd -literal vlans_em0="101" ifconfig_em0_101="inet 192.0.2.1/24" @@ -1532,7 +1650,7 @@ command by setting the variable. One or more .Xr wlan 4 -devices must be created for each wireless devices as of +devices must be created for each wireless device as of .Fx 8.0 . Debugging flags for .Xr wlan 4 @@ -1611,14 +1729,11 @@ may be configured. It will be used for all interfaces with no .Va ifconfig_ Ns Aq Ar interface variable. -This is intended to replace the no longer supported -.Va pccard_ifconfig -variable. .Pp It is also possible to rename an interface by doing: .Bd -literal ifconfig_em0_name="net0" -ifconfig_net0="inet 192.0.2.1 netmask 0xffffff00" +ifconfig_net0="inet 192.0.2.1/24" .Ed .It Va ipv6_enable .Pq Vt bool @@ -1636,7 +1751,7 @@ is added to all of .Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 and the .Va ipv6_activate_all_interfaces -is defined as +variable is defined as .Dq Li YES . .It Va ipv6_prefer .Pq Vt bool @@ -1677,7 +1792,7 @@ all interfaces which do not have a corresponding variable will be marked as .Dq Li IFDISABLED at creation. -This means that all of IPv6 functionality on that interface +This means that all IPv6 functionality on that interface is completely disabled to enforce a security policy. If the variable is set to .Dq YES , @@ -1779,7 +1894,7 @@ IPv6 functionality on an interface should be configured by .Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 , instead of setting ifconfig parameters in .Va ifconfig_ Ns Aq Ar interface . -If this variable is empty, all of IPv6 configurations on the +If this variable is empty, all IPv6 configurations on the specified interface by other variables such as .Va ipv6_prefix_ Ns Ao Ar interface Ac will be ignored. @@ -1975,9 +2090,9 @@ interfaces with: .Bd -literal gif_interfaces="gif0 gif1" gifconfig_gif0="100.64.0.1 100.64.0.2" -ifconfig_gif0="inet 10.0.0.1 10.0.0.2 netmask 255.255.255.252" +ifconfig_gif0="inet 10.0.0.1/30 10.0.0.2" gifconfig_gif1="inet6 2a00::1 2a01::1" -ifconfig_gif1="inet 10.1.0.1 10.1.0.2 netmask 255.255.255.252" +ifconfig_gif1="inet 10.1.0.1/30 10.1.0.2" .Ed .It Va ppp_enable .Pq Vt bool @@ -2062,7 +2177,7 @@ include the full path to the file. By default, the files specified are .Pa /etc/rc.conf and -.Pa /etc/rc.conf.local +.Pa /etc/rc.conf.local . .It Va zfs_enable .Pq Vt bool If set to @@ -2076,6 +2191,13 @@ A space-separated list of ZFS pool names for which new pool GUIDs should be assigned upon first boot. This is useful when using a ZFS pool copied from a template, such as a virtual machine image. +.It Va zpool_upgrade +.Pq Vt str +A space-separated list of ZFS pool names for which the version should be +upgraded upon first boot. +This is useful when using a ZFS pool generated by the +.Xr makefs 8 +utility. .It Va gptboot_enable .Pq Vt bool If set to @@ -2087,43 +2209,6 @@ which had the attribute set using .Xr gpart 8 utility. -.It Va gbde_autoattach_all -.Pq Vt bool -If set to -.Dq Li YES , -.Pa /etc/rc.d/gbde -will attempt to automatically initialize your .bde devices in -.Pa /etc/fstab . -.It Va gbde_devices -.Pq Vt str -List the devices that the script should try to attach, -or -.Dq Li AUTO . -.It Va gbde_lockdir -.Pq Vt str -The directory where the -.Xr gbde 4 -lockfiles are located. -The default lockfile directory is -.Pa /etc . -.Pp -The lockfile for each individual -.Xr gbde 4 -device can be overridden by setting the variable -.Va gbde_lock_ Ns Aq Ar device , -where -.Ar device -is the encrypted device without the -.Dq Pa /dev/ -and -.Dq Pa .bde -parts. -.It Va gbde_attach_attempts -.Pq Vt int -Number of times to attempt attaching to a -.Xr gbde 4 -device, i.e., how many times the user is asked for the pass-phrase. -Default is 3. .It Va geli_devices .Pq Vt str List of devices to automatically attach on boot. @@ -2241,6 +2326,12 @@ If set to run the .Xr syslogd 8 daemon. +Note, the +.Va syslogd_oomprotect +variable is set to +.Dq Li YES +by default in +.Pa /etc/defaults/rc.conf . .It Va syslogd_program .Pq Vt str Path to @@ -2303,7 +2394,30 @@ If set to .Dq Li YES , run the .Xr unbound 8 -daemon as a local caching resolver. +daemon as a local caching DNS resolver. +Note, the +.Va local_unbound_oomprotect +variable is set to +.Dq Li YES +by default in +.Pa /etc/defaults/rc.conf . +.It Va nscd_enable +.Pq Vt bool +Set to +.Dq Li YES +to start the +.Xr nscd 8 +caching daemon for the +.Nm nsswitch +subsystem. +.It Va nscd_flags +.Pq Vt str +If +.Va nscd_enable +is set to +.Dq Li YES , +these flags are passed to +.Xr nscd 8 . .It Va kdc_enable .Pq Vt bool Set to @@ -2385,12 +2499,12 @@ these are the flags to pass to it. .Pq Vt bool If set to .Dq Li YES , -.Pa /etc/motd +.Pa /var/run/motd will be updated at boot time to reflect the kernel release being run. If set to .Dq Li NO , -.Pa /etc/motd +.Pa /var/run/motd will not be updated. .It Va nfs_client_enable .Pq Vt bool @@ -2599,22 +2713,6 @@ is set to these are the flags to pass to the .Xr rpcbind 8 daemon. -.It Va keyserv_enable -.Pq Vt bool -If set to -.Dq Li YES , -run the -.Xr keyserv 8 -daemon on boot for running Secure RPC. -.It Va keyserv_flags -.Pq Vt str -If -.Va keyserv_enable -is set to -.Dq Li YES , -these are the flags to pass to -.Xr keyserv 8 -daemon. .It Va pppoed_enable .Pq Vt bool If set to @@ -2848,7 +2946,7 @@ If set to run the .Xr bsnmpd 1 daemon at system boot time. -Be sure to understand the security implications of running SNMP daemon +Be sure to understand the security implications of running an SNMP daemon on your host. .It Va bsnmpd_flags .Pq Vt str @@ -2990,10 +3088,14 @@ If is set to .Dq Li YES , this is the name of the routing daemon to use. +The default is +.Xr routed 8 . .It Va route6d_program .Pq Vt str The IPv6 equivalent of .Va routed_program . +The default is +.Xr route6d 8 . .It Va routed_flags .Pq Vt str If @@ -3020,6 +3122,14 @@ the interfaces specified in This should only be enabled with great care. You may want to fine-tune .Xr rtadvd.conf 5 . +.It Va rtadvd_flags +.Pq Vt str +If +.Va rtadvd_enable +is set to +.Dq Li YES , +these are the flags to pass to +.Xr rtadvd 8 . .It Va rtadvd_interfaces .Pq Vt str If @@ -3272,15 +3382,15 @@ This is the protocol type of the mouse connected to this host. This variable must be set if .Va moused_enable is set to -.Dq Li YES . -The +.Dq Li YES , +but defaults to +.Dq Li auto +as the .Xr moused 8 daemon is able to detect the appropriate mouse type automatically in many cases. Set this variable to -.Dq Li auto -to let the daemon detect it, or -select one from the following list if the automatic detection fails. +one from the following list if the automatic detection fails. .Pp If the mouse is attached to the PS/2 mouse port, choose .Dq Li auto @@ -3511,19 +3621,6 @@ program. The default is .Dq Li -d , which causes missing directories to be created. -.It Va mta_start_script -.Pq Vt str -This variable specifies the full path to the script to run to start -a mail transfer agent. -The default is -.Pa /etc/rc.sendmail . -The -.Va sendmail_* -variables which -.Pa /etc/rc.sendmail -uses are documented in the -.Xr rc.sendmail 8 -manual page. .It Va dumpdev .Pq Vt str Indicates the device (usually a swap partition) to which a crash dump @@ -3755,6 +3852,12 @@ Set to to start .Xr sshd 8 at system boot time. +Note, the +.Va sshd_oomprotect +variable is set to +.Dq Li YES +by default in +.Pa /etc/defaults/rc.conf . .It Va sshd_flags .Pq Vt str If @@ -3910,11 +4013,11 @@ The configuration filename used by utility. The default value is .Pa /etc/jail.conf . -.Pa /etc/jail. Ns Ao Ar jname Ac Ns Va .conf +.Pa /etc/jail\&. Ns Ao Va jname Ac Ns Pa .conf and -.Pa /etc/jail.conf.d/ Ns Ao Ar jname Ac Ns Va .conf +.Pa /etc/jail.conf.d/ Ns Ao Va jname Ac Ns Pa .conf will also be used if -.Va Ao Ar jname Ac Va +.Ao Va jname Ac is set in .Va jail_list . .It Va jail_parallel_start @@ -4200,7 +4303,7 @@ is also increased. Set to .Dq Li NO to prevent the system from trying to -recover pre-maturely terminated +recover prematurely terminated .Xr vi 1 sessions. .It Va ugidfw_enable @@ -4468,6 +4571,13 @@ Bus address of the USB Bluetooth controller. Check the output of .Xr usbconfig 8 on your system to find this information. +.It Va utx_enable +.Pq Vt bool +Set to +.Dq Li YES +to enable user accounting through the +.Xr utx 8 +facility. .It Va netwait_enable .Pq Vt bool If set to @@ -4674,7 +4784,283 @@ which means that the script will attempt to unlock all datasets. Define the total number of seconds to wait for the zfskeys script to unlock an encrypted dataset. The default is 10. +.It Va sendmail_enable +.Pq Vt str +If set to +.Dq Li YES , +run the +.Xr sendmail 8 +daemon at system boot time. +If set to +.Dq Li NO , +do not run a +.Xr sendmail 8 +daemon to listen for incoming network mail. +This does not preclude a +.Xr sendmail 8 +daemon listening on the SMTP port of the loopback interface. +The +.Dq Li NONE +option sets each +.Va sendmail_enable , +.Va sendmail_submit_enable , +.Va sendmail_outbound_enable , +.Va sendmail_msp_queue_enable +to +.Dq Li NO . +.It Va sendmail_cert_create +.Pq Vt str +If +.Va sendmail_enable +is set to +.Dq Li YES , +create a signed certificate +.Pa /etc/mail/certs/host.cert +representing +.Pa /etc/mail/certs/host.key +by the CA certificate in +.Pa /etc/mail/certs/cacert.pem . +This will enable connecting hosts to negotiate STARTTLS allowing incoming +email to be encrypted in transit. +.Xr sendmail 8 +needs to be configured to use these generated files. +The default configuration in +.Pa /etc/mail/freebsd.mc +has the required options in it. +.It Va sendmail_cert_cn +.Pq Vt str +If +.Va sendmail_enable +is set to +.Dq Li YES +and +.Va sendmail_cert_create +is set to +.Dq Li YES , +this is the Common Name (CN) of the certificate that will be created. +If +.Va sendmail_cert_cn +is not set, the system's hostname will be used. +If there is no hostname set, +.Dq Li amnesiac +will be used. +.It Va sendmail_flags +.Pq Vt str +If +.Va sendmail_enable +is set to +.Dq Li YES , +these are the flags to pass to the +.Xr sendmail 8 +daemon. +.It Va sendmail_submit_enable +.Pq Vt bool +If set to +.Dq Li YES +and +.Va sendmail_enable +is set to +.Dq Li NO , +run +.Xr sendmail 8 +using +.Va sendmail_submit_flags +instead of +.Va sendmail_flags . +This is intended to allow local mail submission via +a localhost-only listening SMTP service required for running +.Xr sendmail 8 +as a non-set-user-ID binary. +Note that this does not work inside +.Xr jail 2 +systems, as jails do not allow binding to just the localhost interface. +.It Va sendmail_submit_flags +.Pq Vt str +If +.Va sendmail_enable +is set to +.Dq Li NO +and +.Va sendmail_submit_enable +is set to +.Dq Li YES , +these are the flags to pass to the +.Xr sendmail 8 +daemon. +.It Va sendmail_outbound_enable +.Pq Vt bool +If set to +.Dq Li YES +and both +.Va sendmail_enable +and +.Va sendmail_submit_enable +are set to +.Dq Li NO , +run +.Xr sendmail 8 +using +.Va sendmail_outbound_flags +instead of +.Va sendmail_flags . +This is intended to allow local mail queue management +for systems that do not offer a listening SMTP service. +.It Va sendmail_outbound_flags +.Pq Vt str +If both +.Va sendmail_enable +and +.Va sendmail_submit_enable +are set to +.Dq Li NO +and +.Va sendmail_outbound_enable +is set to +.Dq Li YES , +these are the flags to pass to the +.Xr sendmail 8 +daemon. +.It Va sendmail_msp_queue_enable +.Pq Vt bool +If set to +.Dq Li YES , +start a client (MSP) queue runner +.Xr sendmail 8 +daemon at system boot time. +As of sendmail 8.12, a separate queue is used for command line +submissions. +The client queue runner ensures that nothing is +left behind in the submission queue. +.It Va sendmail_msp_queue_flags +.Pq Vt str +If +.Va sendmail_msp_queue_enable +is set to +daemon. +.Dq Li YES , +these are the flags to pass to the +.Xr sendmail 8 +.It Va precious_machine +If set to +.Dq Li YES , +some destructive actions require removal of the action-specific safe-belts +before being allowed. +For instance, the file +.Pa /var/run/noshutdown +is created to prevent +.Xr shutdown 8 +targeted at the wrong machine. .El +.Sh SERVICE JAILS +The service jails part of the rc system automatically puts a service +into a jail. +This jail inherits the filesystem and various other parts of the +parent (if you allow child-jails in your jails, service jails +can be used in jails) depending on the content of the +.Ao Ar name Ac Ns Va _svcj_options +variable. +Typically this variable is set inside rc scripts, but it can be +overriden in the rc config. +Valid options for +.Ao Ar name Ac Ns Va _svcj_options +are: +.Bl -tag -width indent-two +.It mlock +Allows to lock memory pages into the physical memory. +.It netv4 +Allows IPv4 network access and the ability to bind to reserved ports. +If +.Ao Ar name Ac Ns Va _svcj_ipaddrs +is set, only the IPv4 addresses listed there will be visible to the jail, +otherwise all assigned IPv4 addresses will be visible. +This can not be combined with +.Pa netv6 . +.It netv6 +Allows IPv6 network access and the ability to bind to reserved ports. +If +.Ao Ar name Ac Ns Va _svcj_ipaddrs +is set, only the IPv6 addresses listed there will be visible to the jail, +otherwise all assigned IPv6 addresses will be visible. +This can not be combined with +.Pa netv4 . +.It net_basic +Equivalent to enabling both +.Pa netv6 +and +.Pa netv4 . +.It net_raw +Allow to open raw sockets. +This option can be combined with +.Pa netv4 , +.Pa netv6 , +.Pa net_basic . +.It net_all +Allows IPv6 and IPv4 network access as for +.Pa netv4 +and +.Pa netv6 , +allows to open raw sockets, and allows to open sockets of protocol stacks that +have not had jail functionality added to them. +.It nfsd +Allows to run nfsd and affiliated daemons. +.It routing +Allows to modify the system routing table. +.It settime +Allows to set and slew the system time. +.It sysvipc +Inherits the SysV semaphores, SysV shared memory and +SysV messages from the host or the parent jail. +.It sysvipcnew +Creates a new namespace for SysV semaphores, SysV shared memory +and SysV messages for this particular service jail. +.It vmm +Allows access to +.Xr vmm 4 . +This option is only available when +.Xr vmm 4 +is enabled in the kernel. +.El + +All non-network options can be combined with all other options. +From the SysV options only one option can be specified. + +If the +.Ao Ar name Ac Ns Va _svcj +variable is set to +.Dq Li YES , +this particular service is started in a +service jail named +.Va svcj- Ns Ar name . + +The +.Va svcj_all_enable +variable allows to enable service jails for all services of the +system at once. +Services which have +.Ao Ar name Ac Ns Va _svcj +set to +.Dq Li NO +are excluded. +Some services may set +.Ao Ar name Ac Ns Va _svcj +to +.Dq Li NO +in the script to either prevent service jails for this +service at all, or may set it to +.Dq Li NO +if it is not set in the +rc config, to exclude it from +.Va svcj_all_enable +but allow to explicitely enable it. +The sshd service for example would not see other jails, if +it would run as a service jail. +This may or may not be what is needed, and as such it is +excluded from +.Va svcj_all_enable +but can be enabled via setting +.Va sshd_svcj +to +.Dq Li YES . .Sh FILES .Bl -tag -width "/etc/defaults/rc.conf" -compact .It Pa /etc/defaults/rc.conf @@ -4685,12 +5071,14 @@ The default is 10. .El .Sh SEE ALSO .Xr chmod 1 , -.Xr gdb 1 , -.Xr info 1 , +.Xr cpuset 1 , +.Xr gdb 1 Pq Pa ports/devel/gdb , .Xr kbdcontrol 1 , .Xr limits 1 , .Xr protect 1 , .Xr sh 1 , +.Xr umask 1 , +.Xr uuidgen 1 , .Xr vi 1 , .Xr vidcontrol 1 , .Xr bridge 4 , @@ -4759,11 +5147,11 @@ The default is 10. .Xr quotacheck 8 , .Xr quotaon 8 , .Xr rc 8 , -.Xr rc.sendmail 8 , .Xr rc.subr 8 , .Xr rcorder 8 , .Xr rfcomm_pppd 8 , .Xr route 8 , +.Xr route6d 8 , .Xr routed 8 , .Xr rpc.lockd 8 , .Xr rpc.statd 8 , @@ -4773,6 +5161,7 @@ The default is 10. .Xr rwhod 8 , .Xr savecore 8 , .Xr sdpd 8 , +.Xr sendmail 8 , .Xr service 8 , .Xr sshd 8 , .Xr swapon 8 , @@ -4781,6 +5170,7 @@ The default is 10. .Xr sysrc 8 , .Xr unbound 8 , .Xr usbconfig 8 , +.Xr utx 8 , .Xr wlandebug 8 , .Xr yp 8 , .Xr ypbind 8 , diff --git a/share/man/man5/rctl.conf.5 b/share/man/man5/rctl.conf.5 index 3bcc6141575d..bf64e54fc567 100644 --- a/share/man/man5/rctl.conf.5 +++ b/share/man/man5/rctl.conf.5 @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 14, 2011 +.Dd October 6, 2023 .Dt RCTL.CONF 5 .Os .Sh NAME @@ -63,7 +61,7 @@ To limit the number of processes for users in login class "testing", use a rule like .Bd -literal -offset indent # Resource limits for the "testing" class. -loginclass:testing:nproc:deny=100/user # At most 100 processes per user +loginclass:testing:maxproc:deny=100/user # At most 100 processes per user .Ed .Sh SEE ALSO .Xr rctl 8 diff --git a/share/man/man5/regdomain.5 b/share/man/man5/regdomain.5 index 495f4b70f1f7..a9408813a127 100644 --- a/share/man/man5/regdomain.5 +++ b/share/man/man5/regdomain.5 @@ -21,8 +21,6 @@ .\" 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 April 13, 2008 .Dt REGDOMAIN 5 .Os diff --git a/share/man/man5/remote.5 b/share/man/man5/remote.5 index 6bb598d64efe..63ff8318124b 100644 --- a/share/man/man5/remote.5 +++ b/share/man/man5/remote.5 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)remote.5 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" .Dd October 20, 2003 .Dt REMOTE 5 .Os @@ -92,7 +89,7 @@ serial port. When a modem is used, the data rate used to communicate with the remote modem may be different than this rate. This is a decimal number. -The default rate is 9600 bits per second. +The default rate is 115200 bits per second. .It Cm \&cm (str) An initial connection message to be sent to the remote host. diff --git a/share/man/man5/resolver.5 b/share/man/man5/resolver.5 index 468c635839c6..9f8c0d689a0a 100644 --- a/share/man/man5/resolver.5 +++ b/share/man/man5/resolver.5 @@ -25,10 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)resolver.5 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" -.Dd November 9, 2021 +.Dd November 23, 2022 .Dt RESOLVER 5 .Os .Sh NAME @@ -46,8 +43,10 @@ by the resolver routines the first time they are invoked by a process. The file is designed to be human readable and contains a list of keywords with values that provide various types of resolver information. .Pp -On a normally configured system this file should not be necessary. -The only name server to be queried will be on the local machine, +On a normally configured system, setting this file manually should not +be necessary. +The only name server(s) to be queried will be on the local machine +or automatically configured using DHCP or a similar mechanism, the domain name is determined from the host name, and the domain search path is constructed from the domain name. .Pp @@ -132,7 +131,7 @@ in _res.options. sets .Dv RES_USEVC to use TCP instead of UDP for queries. -.It Sy ndots: Ns Ar n +.It Sy ndots : Ns Ar n sets a threshold for the number of dots which must appear in a name given to .Fn res_query (see @@ -148,7 +147,7 @@ meaning that if there are any dots in a name, the name will be tried first as an absolute name before any .Em search list elements are appended to it. -.It Sy timeout: Ns Ar n +.It Sy timeout : Ns Ar n sets the initial amount of time the resolver will wait for a response from a remote name server before retrying the query via a different name server. @@ -161,7 +160,7 @@ the allowed maximum is .Dv RES_MAXRETRANS (see .In resolv.h ) . -.It Sy attempts: Ns Ar n +.It Sy attempts : Ns Ar n sets the number of times the resolver will send a query to each of its name servers before giving up and returning an error to the calling application. @@ -180,7 +179,7 @@ the resolver from obeying the standard and .Sy search rules with the given name. -.It Sy reload-period: Ns Ar n +.It Sy reload-period : Ns Ar n The resolver checks the modification time of .Pa /etc/resolv.conf every @@ -220,14 +219,34 @@ The file resides in .Pa /etc . .El +.Sh EXAMPLES +A basic resolv.conf file could be in the following form. +.Bd -literal -offset indent +# The domain directive is only necessary, if your local +# router advertises something like localdomain and you have +# set up your hostnames via an external domain. +domain localdomain.tld + +# In case you a running a local dns server or caching name server +# like local-unbound(8) for example. +nameserver 127.0.0.1 + +# IP address of the local or ISP name service +nameserver 192.168.2.1 + +# Fallback nameservers, in this case these from Google. +nameserver 8.8.8.8 +nameserver 8.8.4.4 + +# Attach an OPT pseudo-RR for the EDNS0 extension, +# as specified in RFC 2671. +options edns0 +.Ed .Sh SEE ALSO .Xr gethostbyname 3 , .Xr resolver 3 , .Xr hostname 7 , .Xr resolvconf 8 -.Rs -.%T "Name Server Operations Guide for BIND" -.Re .Sh HISTORY The .Nm resolv.conf diff --git a/share/man/man5/services.5 b/share/man/man5/services.5 index adda70a92dab..e7f65cb929fd 100644 --- a/share/man/man5/services.5 +++ b/share/man/man5/services.5 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -25,15 +28,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)services.5 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" -.Dd April 4, 2010 +.Dd April 29, 2024 .Dt SERVICES 5 .Os .Sh NAME .Nm services -.Nd service name data base +.Nd internet service name and port number data base .Sh DESCRIPTION The .Nm diff --git a/share/man/man5/shells.5 b/share/man/man5/shells.5 index 33a217b4b8a9..13c430cd3ef5 100644 --- a/share/man/man5/shells.5 +++ b/share/man/man5/shells.5 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)shells.5 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" .Dd June 5, 1993 .Dt SHELLS 5 .Os diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 36fb474b6597..63e9f471f1f1 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,6 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.\" $FreeBSD$ -.Dd July 6, 2022 +.Dd July 5, 2025 .Dt SRC.CONF 5 .Os .Sh NAME @@ -79,7 +78,11 @@ and .Va MAKEOBJDIRPREFIX as they are environment-only variables. .Pp -The values of variables are ignored regardless of their setting; +The values of +.Va WITH_ +and +.Va WITHOUT_ +variables are ignored regardless of their setting; even if they would be set to .Dq Li FALSE or @@ -127,9 +130,6 @@ checks. Do not build .Xr at 1 and related utilities. -.It Va WITHOUT_ATM -Do not build -programs and libraries related to ATM networking. .It Va WITHOUT_AUDIT Do not build audit support into system programs. .It Va WITHOUT_AUTHPF @@ -137,7 +137,7 @@ Do not build .Xr authpf 8 . .It Va WITHOUT_AUTOFS Do not build -.Xr autofs 5 +.Xr autofs 4 related programs, libraries, and kernel modules. .It Va WITHOUT_AUTO_OBJ Disable automatic creation of objdirs. @@ -158,6 +158,25 @@ This library is currently only used to perform signature verification and related operations for Verified Exec and .Xr loader 8 . +.Pp +Due to size constraints in the BIOS environment on x86, one may need to set +.Va LOADERSIZE +larger than the +default 500000, although often loader is under the 500k limit even with +this option. +Setting +.Va LOADERSIZE +larger than 500000 may cause +.Xr pxeboot 8 +to be too large to work. +Careful testing of the loader in the target environment when built with a larger +limit to establish safe limits is critical because different BIOS environments +reserve differing amounts of the low 640k space, making a precise limit for +everybody impossible. +.Pp +See also +.Va WITH_LOADER_PXEBOOT +for other considerations. When set, these options are also in effect: .Pp .Bl -inset -compact @@ -183,7 +202,7 @@ Do not build or install .Xr bhyve 8 , associated utilities, and examples. .Pp -This option only affects amd64/amd64. +This option only affects amd64/amd64 and arm64/aarch64. .It Va WITH_BHYVE_SNAPSHOT Include support for save and restore (snapshots) in .Xr bhyve 8 @@ -234,6 +253,11 @@ Do not build or install .It Va WITHOUT_BOOTPD Do not build or install .Xr bootpd 8 . +.It Va WITH_BRANCH_PROTECTION +Build with branch protection enabled. +On arm64 enable the use of pointer authentication and +branch target identification instructions on arm64. +These can be used to help mitigate some exploit techniques. .It Va WITHOUT_BSDINSTALL Do not build .Xr bsdinstall 8 , @@ -264,30 +288,29 @@ Build some programs without optional bzip2 support. .It Va WITHOUT_CALENDAR Do not build .Xr calendar 1 . -.It Va WITHOUT_CAPSICUM -Do not build Capsicum support into system programs. -When set, it enforces these options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_CASPER -.El .It Va WITHOUT_CAROOT Do not add the trusted certificates from the Mozilla NSS bundle to base. .It Va WITHOUT_CASPER -Do not build Casper program and related libraries. +This option has no effect. .It Va WITH_CCACHE_BUILD Use .Xr ccache 1 for the build. No configuration is required except to install the .Sy devel/ccache +or +.Sy devel/sccache package. When using with .Xr distcc 1 , set .Sy CCACHE_PREFIX=/usr/local/bin/distcc . +When using with sccache +set +.Sy CCACHE_NAME=sccache +in +.Xr src.conf 5 . The default cache directory of .Pa $HOME/.ccache will be used, which can be overridden by setting @@ -333,6 +356,8 @@ When set, it enforces these options: .Va WITHOUT_LOADER_ZFS .It .Va WITHOUT_ZFS +.It +.Va WITHOUT_ZFS_TESTS .El .It Va WITHOUT_CLANG Do not build the Clang C/C++ compiler during the regular phase of the build. @@ -386,14 +411,8 @@ Build clang-format. .It Va WITHOUT_CLANG_FULL Avoid building the ARCMigrate, Rewriter and StaticAnalyzer components of the Clang C/C++ compiler. -.It Va WITHOUT_CLANG_IS_CC -Do not install links to the Clang C/C++ compiler as -.Pa /usr/bin/cc , -.Pa /usr/bin/c++ -and -.Pa /usr/bin/cpp . -.It Va WITHOUT_CLEAN -Do not clean before building world and/or kernel. +.It Va WITH_CLEAN +Clean before building world and/or kernel. .It Va WITHOUT_CPP Do not build .Xr cpp 1 . @@ -436,6 +455,10 @@ When set, it enforces these options: .It .Va WITHOUT_LDNS_UTILS .It +.Va WITHOUT_LOADER_ZFS +.It +.Va WITHOUT_MITKRB5 +.It .Va WITHOUT_OPENSSH .It .Va WITHOUT_OPENSSL @@ -447,6 +470,8 @@ When set, it enforces these options: .Va WITHOUT_UNBOUND .It .Va WITHOUT_ZFS +.It +.Va WITHOUT_ZFS_TESTS .El .Pp When set, these options are also in effect: @@ -468,67 +493,29 @@ Do not build .Xr cxgbetool 8 .Pp This is a default setting on -arm/armv6, arm/armv7, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. +arm/armv7, powerpc/powerpc and riscv/riscv64. .It Va WITH_CXGBETOOL Build .Xr cxgbetool 8 .Pp This is a default setting on amd64/amd64, arm64/aarch64, i386/i386, powerpc/powerpc64 and powerpc/powerpc64le. -.It Va WITHOUT_CXX -Do not build C++ headers and runtime libraries. -It also prevents building binaries and libraries written in C++, including -.Xr devd 8 . -When set, it enforces these options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_CLANG -.It -.Va WITHOUT_CLANG_EXTRAS -.It -.Va WITHOUT_CLANG_FORMAT -.It -.Va WITHOUT_CLANG_FULL -.It -.Va WITHOUT_DTRACE_TESTS -.It -.Va WITHOUT_GOOGLETEST -.It -.Va WITHOUT_LLVM_COV -.It -.Va WITHOUT_OFED -.It -.Va WITHOUT_OFED_EXTRA -.It -.Va WITHOUT_OPENMP -.It -.Va WITHOUT_PMC -.It -.Va WITHOUT_TESTS -.El .It Va WITHOUT_DEBUG_FILES Avoid building or installing standalone debug files for each executable binary and shared library. .It Va WITH_DETECT_TZ_CHANGES Make the time handling code detect changes to the timezone files. -.It Va WITHOUT_DIALOG -Do not build +.It Va WITH_DIALOG +Do build .Xr dialog 1 , .Xr dialog 3 , .Xr dpv 1 , and .Xr dpv 3 . -When set, it enforces these options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_BSDINSTALL -.El .It Va WITHOUT_DICT Do not build the Webster dictionary files. .It Va WITH_DIRDEPS_BUILD -This is an experimental build system. +This is an alternate build system. For details see https://www.crufty.net/sjg/docs/freebsd-meta-mode.htm. Build commands can be seen from the top-level with: @@ -562,7 +549,14 @@ The build hides commands executed unless is defined. .Pp Note that there is currently no mass install feature for this. +This build is designed for producing packages, that can then be installed +on a target system. .Pp +The implementation in +.Fx +is incomplete. +Completion would require leaf directories for building each kernel +and package so that their dependencies can be tracked. When set, it enforces these options: .Pp .Bl -item -compact @@ -573,6 +567,10 @@ When set, it enforces these options: When set, these options are also in effect: .Pp .Bl -inset -compact +.It Va WITH_META_ERROR_TARGET +(unless +.Va WITHOUT_META_ERROR_TARGET +is set explicitly) .It Va WITH_META_MODE (unless .Va WITHOUT_META_MODE @@ -609,6 +607,13 @@ This must be set in the environment, make command line, or .Pa /etc/src-env.conf , not .Pa /etc/src.conf . +.It Va WITH_DISK_IMAGE_TOOLS_BOOTSTRAP +Build +.Xr etdump 1 , +.Xr makefs 8 +and +.Xr mkimg 1 +as bootstrap tools. .It Va WITHOUT_DMAGENT Do not build dma Mail Transport Agent. .It Va WITHOUT_DOCCOMPRESS @@ -622,6 +627,11 @@ When set, it enforces these options: .It .Va WITHOUT_CTF .El +.It Va WITH_DTRACE_ASAN +Compile userspace DTrace code (libdtrace, dtrace(1), lockstat(1), plockstat(1)) +with address and undefined behavior sanitizers. +Requires that Clang be used as the base system compiler +and that the runtime support library is available. .It Va WITH_DTRACE_TESTS Build and install the DTrace test suite in .Pa /usr/tests/cddl/usr.sbin/dtrace . @@ -645,7 +655,7 @@ and .Xr efivar 8 . .Pp This is a default setting on -powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpc64le. +i386/i386, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpc64le. .It Va WITH_EFI Build .Xr efivar 3 @@ -653,7 +663,7 @@ and .Xr efivar 8 . .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, riscv/riscv64 and riscv/riscv64sf. +amd64/amd64, arm/armv7, arm64/aarch64 and riscv/riscv64. .It Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP Do not build ELF Tool Chain tools (addr2line, nm, size, strings and strip) @@ -666,11 +676,18 @@ Avoid installing examples to .Pa /usr/share/examples/ . .It Va WITH_EXPERIMENTAL Include experimental features in the build. -.It Va WITH_EXTRA_TCP_STACKS -Build extra TCP stack modules. +.It Va WITHOUT_FDT +Do not build Flattened Device Tree support as part of the base system. +This includes the device tree compiler (dtc) and libfdt support library. +.Pp +This is a default setting on +amd64/amd64 and i386/i386. .It Va WITH_FDT Build Flattened Device Tree support as part of the base system. This includes the device tree compiler (dtc) and libfdt support library. +.Pp +This is a default setting on +arm/armv7, arm64/aarch64, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpc64le and riscv/riscv64. .It Va WITHOUT_FILE Do not build .Xr file 1 @@ -704,15 +721,12 @@ and .Xr ftpd 8 . .It Va WITHOUT_GAMES Do not build games. -.It Va WITHOUT_GH_BC -Install the traditional FreeBSD -.Xr bc 1 -and -.Xr dc 1 -programs instead of the enhanced versions. .It Va WITHOUT_GNU_DIFF Do not build GNU -.Xr diff3 1 . +.Xr diff3 1 ; +build BSD +.Xr diff3 1 +instead. .It Va WITHOUT_GOOGLETEST Neither build nor install .Lb libgmock , @@ -736,12 +750,12 @@ Do not build HTML docs. Do not build or install HyperV utilities. .Pp This is a default setting on -arm/armv6, arm/armv7, arm64/aarch64, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpc64le, riscv/riscv64 and riscv/riscv64sf. +arm/armv7, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpc64le and riscv/riscv64. .It Va WITH_HYPERV Build or install HyperV utilities. .Pp This is a default setting on -amd64/amd64 and i386/i386. +amd64/amd64, arm64/aarch64 and i386/i386. .It Va WITHOUT_ICONV Do not build iconv as part of libc. .It Va WITHOUT_INCLUDES @@ -775,15 +789,6 @@ Do not build .Xr inetd 8 . .It Va WITHOUT_INET_SUPPORT Build libraries, programs, and kernel modules without IPv4 support. -.It Va WITH_INIT_ALL_PATTERN -Build the base system or kernel with stack variables initialized to -.Pq compiler defined -debugging patterns on function entry. -This option requires the clang compiler. -.It Va WITH_INIT_ALL_ZERO -Build the base system or kernel with stack variables initialized -to zero on function entry. -This option requires that the clang compiler be used. .It Va WITHOUT_INSTALLLIB Set this to not install optional libraries. For example, when creating a @@ -820,6 +825,12 @@ and related utilities. .It Va WITHOUT_JAIL Do not build tools for the support of jails; e.g., .Xr jail 8 . +.It Va WITHOUT_JEMALLOC_LG_VADDR_WIDE +Disallow programs to use more than 48 address bits on amd64. +Incompatible with LA57 mode. +Enabling this option might result in a slight reduction in memory +consumption for jemalloc metadata, but also requires disabling LA57 +(if hardware supports it). .It Va WITHOUT_KDUMP Do not build .Xr kdump 1 @@ -843,9 +854,17 @@ is set explicitly) Build some programs without Kerberos support, like .Xr ssh 1 , .Xr telnet 1 , -.Xr sshd 8 , and -.Xr telnetd 8 . +.Xr sshd 8 . +.It Va WITH_KERNEL_BIN +Generate and install kernel.bin from kernel as part of the normal build and +install processes for the kernel. Available only on arm and arm64. + +Usually this will be added to the kernel config file with: + +makeoptions WITH_KERNEL_BIN=1 + +though it can also be used on the command line. .It Va WITH_KERNEL_RETPOLINE Enable the "retpoline" mitigation for CVE-2017-5715 in the kernel build. @@ -897,14 +916,21 @@ On 64-bit platforms, do not build 32-bit library set and a runtime linker. .Pp This is a default setting on -arm/armv6, arm/armv7, arm64/aarch64, i386/i386, powerpc/powerpc, powerpc/powerpc64le, riscv/riscv64 and riscv/riscv64sf. +arm/armv7, i386/i386, powerpc/powerpc, powerpc/powerpc64le and riscv/riscv64. +.It Va WITH_LIB32 +On 64-bit platforms, build the 32-bit library set and a +.Nm ld-elf32.so.1 +runtime linker. +.Pp +This is a default setting on +amd64/amd64, arm64/aarch64 and powerpc/powerpc64. .It Va WITHOUT_LLD Do not build LLVM's lld linker. .It Va WITHOUT_LLDB Do not build the LLDB debugger. .Pp This is a default setting on -arm/armv6, arm/armv7, riscv/riscv64 and riscv/riscv64sf. +arm/armv7 and riscv/riscv64. .It Va WITH_LLDB Build the LLDB debugger. .Pp @@ -914,23 +940,35 @@ amd64/amd64, arm64/aarch64, i386/i386, powerpc/powerpc, powerpc/powerpc64 and po Do not build the LLD linker during the bootstrap phase of the build. To be able to build the system an alternate linker must be provided via XLD. -.It Va WITHOUT_LLD_IS_LD -Do not install a -.Pa /usr/bin/ld symlink -to -.Pa ld.lld . -The system will not have a usable tool chain unless a linker is provided -some other way. .It Va WITHOUT_LLVM_ASSERTIONS Disable debugging assertions in LLVM. -.It Va WITH_LLVM_BINUTILS -Install LLVM's binutils (ar, addr2line, nm, etc.) instead of ELF Tool Chain's. +.It Va WITHOUT_LLVM_BINUTILS +Install ELF Tool Chain's binary utilities instead of LLVM's. +This includes +.Xr addr2line 1 , +.Xr ar 1 , +.Xr nm 1 , +.Xr objcopy 1 , +.Xr ranlib 1 , +.Xr readelf 1 , +.Xr size 1 , +and +.Xr strip 1 . +Regardless of this setting, LLVM tools are used for +.Xr c++filt 1 +and +.Xr objdump 1 . +.Xr strings 1 +is always provided by ELF Tool Chain. .It Va WITHOUT_LLVM_COV Do not build the .Xr llvm-cov 1 tool. .It Va WITHOUT_LLVM_CXXFILT Install ELF Tool Chain's cxxfilt as c++filt, instead of LLVM's llvm-cxxfilt. +.It Va WITH_LLVM_FULL_DEBUGINFO +Generate full debug information for LLVM libraries and tools, which uses +more disk space and build resources, but allows for easier debugging. .It Va WITHOUT_LLVM_TARGET_AARCH64 Do not build LLVM target support for AArch64. The @@ -989,13 +1027,13 @@ Do not build LLVM target support for X86. The .Va LLVM_TARGET_ALL option should be used rather than this in most cases. +.It Va WITHOUT_LOADER_BIOS_TEXTONLY +Include graphics, font and video mode support in the i386 and amd64 BIOS +boot loader. .It Va WITH_LOADER_EFI_SECUREBOOT Enable building .Xr loader 8 with support for verification based on certificates obtained from UEFI. -.It Va WITH_LOADER_FIREWIRE -Enable firewire support in /boot/loader on x86. -This option is a nop on all other platforms. .It Va WITHOUT_LOADER_GELI Disable inclusion of GELI crypto support in the boot chain binaries. .Pp @@ -1005,17 +1043,27 @@ powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpc64le. Build GELI bootloader support. .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, riscv/riscv64 and riscv/riscv64sf. +amd64/amd64, arm/armv7, arm64/aarch64, i386/i386 and riscv/riscv64. +.It Va WITHOUT_LOADER_IA32 +Do not build the 32-bit UEFI loader. +.Pp +This is a default setting on +arm/armv7, arm64/aarch64, i386/i386, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpc64le and riscv/riscv64. +.It Va WITH_LOADER_IA32 +Build the 32-bit UEFI loader. +.Pp +This is a default setting on +amd64/amd64. .It Va WITHOUT_LOADER_KBOOT Do not build kboot, a linuxboot environment loader .Pp This is a default setting on -arm/armv6, arm/armv7, arm64/aarch64, i386/i386, powerpc/powerpc, powerpc/powerpc64le, riscv/riscv64 and riscv/riscv64sf. +arm/armv7, i386/i386, powerpc/powerpc, powerpc/powerpc64le and riscv/riscv64. .It Va WITH_LOADER_KBOOT Build kboot, a linuxboot environment loader .Pp This is a default setting on -amd64/amd64 and powerpc/powerpc64. +amd64/amd64, arm64/aarch64 and powerpc/powerpc64. .It Va WITHOUT_LOADER_LUA Do not build LUA bindings for the boot loader. .Pp @@ -1025,27 +1073,38 @@ powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpc64le. Build LUA bindings for the boot loader. .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, riscv/riscv64 and riscv/riscv64sf. +amd64/amd64, arm/armv7, arm64/aarch64, i386/i386 and riscv/riscv64. .It Va WITHOUT_LOADER_OFW Disable building of openfirmware bootloader components. .Pp This is a default setting on -amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, riscv/riscv64 and riscv/riscv64sf. +amd64/amd64, arm/armv7, arm64/aarch64, i386/i386 and riscv/riscv64. .It Va WITH_LOADER_OFW Build openfirmware bootloader components. .Pp This is a default setting on powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpc64le. +.It Va WITHOUT_LOADER_PXEBOOT +Do not build pxeboot on i386/amd64. +When the pxeboot is too large, or unneeded, it may be disabled with this option. +See +.Va WITH_LOADER_PXEBOOT +for how to adjust the defaults when you need both a larger +.Pa /boot/loader +and +.Pa /boot/pxeboot +.Pp +This option only has an effect on x86. .It Va WITHOUT_LOADER_UBOOT Disable building of ubldr. .Pp This is a default setting on -amd64/amd64, arm64/aarch64, i386/i386, powerpc/powerpc64le, riscv/riscv64 and riscv/riscv64sf. +amd64/amd64, arm64/aarch64, i386/i386, powerpc/powerpc64le and riscv/riscv64. .It Va WITH_LOADER_UBOOT Build ubldr. .Pp This is a default setting on -arm/armv6, arm/armv7, powerpc/powerpc and powerpc/powerpc64. +arm/armv7, powerpc/powerpc and powerpc/powerpc64. .It Va WITH_LOADER_VERBOSE Build with extra verbose debugging in the loader. May explode already nearly too large loader over the limit. @@ -1057,6 +1116,8 @@ with support for verification similar to Verified Exec. .Pp Depends on .Va WITH_BEARSSL . +May require a larger +.Va LOADERSIZE . When set, these options are also in effect: .Pp .Bl -inset -compact @@ -1077,6 +1138,14 @@ The kernel has to be built with a module to parse the manifest. .Pp Depends on .Va WITH_LOADER_VERIEXEC . +.It Va WITH_LOADER_VERIEXEC_VECTX +Enable building +.Xr loader 8 +with support for hashing and verifying kernel and modules as a side effect +of loading. +.Pp +Depends on +.Va WITH_LOADER_VERIEXEC . .It Va WITHOUT_LOADER_ZFS Do not build ZFS file system boot loader support. .It Va WITHOUT_LOCALES @@ -1094,6 +1163,8 @@ and related programs. Build .Xr ls 1 without support for colors to distinguish file types. +.It Va WITHOUT_MACHDEP_OPTIMIZATIONS +Prefer machine-independent non-assembler code in libc and libm. .It Va WITHOUT_MAIL Do not build any mail support (MUA or MTA). When set, it enforces these options: @@ -1127,7 +1198,12 @@ for more details. .It Va WITH_MALLOC_PRODUCTION Disable assertions and statistics gathering in .Xr malloc 3 . -It also defaults the A and J runtime options to off. +The run-time options +.Dv opt.abort , +.Dv opt.abort_conf , +and +.Dv opt.junk +also default to false. .It Va WITHOUT_MAN Do not build manual pages. When set, these options are also in effect: @@ -1141,8 +1217,8 @@ is set explicitly) .It Va WITHOUT_MANCOMPRESS Do not install compressed man pages. Only the uncompressed versions will be installed. -.It Va WITH_MANSPLITPKG -Split man pages into their own packages during make package. +.It Va WITHOUT_MANSPLITPKG +Do not split man pages into their own packages during make package. .It Va WITHOUT_MAN_UTILS Do not build utilities for manual pages, .Xr apropos 1 , @@ -1151,6 +1227,25 @@ Do not build utilities for manual pages, .Xr whatis 1 , .Xr manctl 8 , and related support files. +.It Va WITH_META_ERROR_TARGET +Enable the META_MODE .ERROR target. +.Pp +This target will copy the meta file of a failed target +to +.Va ERROR_LOGDIR +(default is +.Ql ${SRCTOP:H}/error ) +to help with failure analysis. +Depends on +.Va WITH_META_MODE . +This default when +.Va WITH_DIRDEPS_BUILD +is set. +.Pp +This must be set in the environment, make command line, or +.Pa /etc/src-env.conf , +not +.Pa /etc/src.conf . .It Va WITH_META_MODE Create .Xr make 1 @@ -1207,12 +1302,14 @@ This must be set in the environment, make command line, or .Pa /etc/src-env.conf , not .Pa /etc/src.conf . +.It Va WITH_MITKRB5 +Set this to build MIT Kerberos 5 instead of KTH Heimdal. .It Va WITHOUT_MLX5TOOL Do not build .Xr mlx5tool 8 .Pp This is a default setting on -arm/armv6, arm/armv7, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. +arm/armv7, powerpc/powerpc and riscv/riscv64. .It Va WITH_MLX5TOOL Build .Xr mlx5tool 8 @@ -1230,8 +1327,6 @@ When set, it enforces these options: .Pp .Bl -item -compact .It -.Va WITHOUT_ATM -.It .Va WITHOUT_BLUETOOTH .El .Pp @@ -1245,9 +1340,18 @@ is set explicitly) .El .It Va WITHOUT_NETGRAPH_SUPPORT Build libraries, programs, and kernel modules without netgraph support. +.It Va WITHOUT_NETLINK +Do not build +.Xr genl 1 +utility. +.It Va WITHOUT_NETLINK_SUPPORT +Make libraries and programs use rtsock and +.Xr sysctl 3 +interfaces instead of +.Xr snl 3 . .It Va WITHOUT_NIS -Do not build NIS also known as -.Xr yp 8 +Do not build +.Xr NIS 8 support and related programs. If set, you might need to adopt your .Xr nsswitch.conf 5 @@ -1276,26 +1380,28 @@ will not be built either if this option is set. Do not build .Xr ntpd 8 and related programs. -.It Va WITHOUT_NVME -Do not build nvme related tools and kernel modules. -.Pp -This is a default setting on -arm/armv6, arm/armv7, powerpc/powerpc, riscv/riscv64 and riscv/riscv64sf. -.It Va WITH_NVME -Build nvme related tools and kernel modules. -.Pp -This is a default setting on -amd64/amd64, arm64/aarch64, i386/i386, powerpc/powerpc64 and powerpc/powerpc64le. +.It Va WITHOUT_NUAGEINIT +Do not install the limited cloud init support scripts. .It Va WITHOUT_OFED -Disable the build of the +Do not build the .Dq "OpenFabrics Enterprise Distribution" -Infiniband software stack, including kernel modules and userspace libraries. +InfiniBand software stack, including kernel modules and userspace libraries. +.Pp +This is a default setting on +arm/armv7. When set, it enforces these options: .Pp .Bl -item -compact .It .Va WITHOUT_OFED_EXTRA .El +.It Va WITH_OFED +Build the +.Dq "OpenFabrics Enterprise Distribution" +InfiniBand software stack, including kernel modules and userspace libraries. +.Pp +This is a default setting on +amd64/amd64, arm64/aarch64, i386/i386, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpc64le and riscv/riscv64. .It Va WITH_OFED_EXTRA Build the non-essential components of the .Dq "OpenFabrics Enterprise Distribution" @@ -1306,12 +1412,12 @@ Enable building LDAP support for kerberos using an openldap client from ports. Do not build LLVM's OpenMP runtime. .Pp This is a default setting on -arm/armv6, arm/armv7 and powerpc/powerpc. +arm/armv7 and powerpc/powerpc. .It Va WITH_OPENMP Build LLVM's OpenMP runtime. .Pp This is a default setting on -amd64/amd64, arm64/aarch64, i386/i386, powerpc/powerpc64, powerpc/powerpc64le, riscv/riscv64 and riscv/riscv64sf. +amd64/amd64, arm64/aarch64, i386/i386, powerpc/powerpc64, powerpc/powerpc64le and riscv/riscv64. .It Va WITHOUT_OPENSSH Do not build OpenSSH. .It Va WITHOUT_OPENSSL @@ -1330,6 +1436,10 @@ When set, it enforces these options: .It .Va WITHOUT_LDNS_UTILS .It +.Va WITHOUT_LOADER_ZFS +.It +.Va WITHOUT_MITKRB5 +.It .Va WITHOUT_OPENSSH .It .Va WITHOUT_OPENSSL_KTLS @@ -1339,6 +1449,8 @@ When set, it enforces these options: .Va WITHOUT_UNBOUND .It .Va WITHOUT_ZFS +.It +.Va WITHOUT_ZFS_TESTS .El .Pp When set, these options are also in effect: @@ -1353,12 +1465,12 @@ is set explicitly) Do not include kernel TLS support in OpenSSL. .Pp This is a default setting on -arm/armv6, arm/armv7, i386/i386, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpc64le, riscv/riscv64 and riscv/riscv64sf. +arm/armv7, i386/i386, powerpc/powerpc and riscv/riscv64. .It Va WITH_OPENSSL_KTLS Include kernel TLS support in OpenSSL. .Pp This is a default setting on -amd64/amd64 and arm64/aarch64. +amd64/amd64, arm64/aarch64, powerpc/powerpc64 and powerpc/powerpc64le. .It Va WITHOUT_PAM Do not build PAM library and modules. .Bf -symbolic @@ -1388,6 +1500,15 @@ When set, it enforces these options: .It Va WITHOUT_PIE Do not build dynamically linked binaries as Position-Independent Executable (PIE). +.Pp +This is a default setting on +arm/armv7, i386/i386 and powerpc/powerpc. +.It Va WITH_PIE +Build dynamically linked binaries as +Position-Independent Executable (PIE). +.Pp +This is a default setting on +amd64/amd64, arm64/aarch64, powerpc/powerpc64, powerpc/powerpc64le and riscv/riscv64. .It Va WITHOUT_PKGBOOTSTRAP Do not build .Xr pkg 7 @@ -1396,19 +1517,12 @@ bootstrap tool. Do not build .Xr pmccontrol 8 and related programs. -.It Va WITHOUT_PORTSNAP -Do not build or install -.Xr portsnap 8 -and related files. .It Va WITHOUT_PPP Do not build .Xr ppp 8 and related programs. -.It Va WITH_PROFILE -Build profiled libraries for use with -.Xr gprof 8 . -This option is deprecated and may not be present in a future version of -.Fx . +.It Va WITHOUT_PTHREADS_ASSERTIONS +Disable debugging assertions in pthreads library. .It Va WITHOUT_QUOTAS Do not build .Xr quota 1 @@ -1456,6 +1570,13 @@ utility. Build .Xr rpcbind 8 with warmstart support. +.It Va WITH_RUN_TESTS +Run tests as part of the build. +.It Va WITHOUT_SCTP_SUPPORT +Disable support in the kernel for the +.Xr sctp 4 +Stream Control Transmission Protocol +loadable kernel module. .It Va WITHOUT_SENDMAIL Do not build .Xr sendmail 8 @@ -1471,12 +1592,6 @@ as a set-user-ID root program. Do not build the .Bx 4.4 legacy docs. -.It Va WITHOUT_SHARED_TOOLCHAIN -Build the toolchain binaries as statically linked executables. -The set includes -.Xr cc 1 , -.Xr make 1 -and necessary utilities like assembler, linker and library archive manager. .It Va WITH_SORT_THREADS Enable threads in .Xr sort 1 . @@ -1505,7 +1620,10 @@ When set, it enforces these options: .Va WITHOUT_KERNEL_SYMBOLS .El .It Va WITHOUT_SSP -Do not build world with propolice stack smashing protection. +Do not build world with stack smashing protection. +See +.Xr mitigations 7 +for more information. .It Va WITH_STAGING Enable staging of files to a stage tree. This can be best thought of as auto-install to @@ -1609,6 +1727,8 @@ When set, it enforces these options: .Bl -item -compact .It .Va WITHOUT_DTRACE_TESTS +.It +.Va WITHOUT_ZFS_TESTS .El .Pp When set, these options are also in effect: @@ -1640,7 +1760,7 @@ Do not build or install and .Xr tftpd 8 . .It Va WITHOUT_TOOLCHAIN -Do not install header or +Do not install programs used for program development, compilers, debuggers etc. When set, it enforces these options: @@ -1655,14 +1775,21 @@ When set, it enforces these options: .It .Va WITHOUT_CLANG_FULL .It -.Va WITHOUT_INCLUDES -.It .Va WITHOUT_LLD .It .Va WITHOUT_LLDB .It .Va WITHOUT_LLVM_COV .El +.Pp +When set, these options are also in effect: +.Pp +.Bl -inset -compact +.It Va WITHOUT_LLVM_BINUTILS +(unless +.Va WITH_LLVM_BINUTILS +is set explicitly) +.El .It Va WITH_UBSAN Build the base system with Undefined Behavior Sanitizer (UBSan) to detect various kinds of undefined behavior at runtime. @@ -1672,6 +1799,11 @@ and that the runtime support library is available Do not build .Xr unbound 8 and related programs. +.It Va WITH_UNDEFINED_VERSION +Link libraries with --undefined-version which permits version maps to +contain symbols that are not present in the library. +If this is necessary to build a particular configuration, a bug is +present and the configuration should be reported. .It Va WITHOUT_UNIFIED_OBJDIR Use the historical object directory format for .Xr build 7 @@ -1752,6 +1884,11 @@ Build without support for the IEEE 802.1X protocol and without support for EAP-PEAP, EAP-TLS, EAP-LEAP, and EAP-TTLS protocols (usable only via 802.1X). +.It Va WITH_ZEROREGS +Build the basesystem with code to zero caller-used register contents +on function return. +This prevents leaking temporary values for side channel attacks. +Additionally this reduces the number of usable ROP gadgets for attackers. .It Va WITHOUT_ZFS Do not build the ZFS file system kernel module, libraries such as .Xr libbe 3 , @@ -1761,6 +1898,14 @@ or .Xr zfs 8 . Also disable ZFS support in utilities and libraries which implement ZFS-specific functionality. +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_ZFS_TESTS +.El +.It Va WITHOUT_ZFS_TESTS +Do not build and install the legacy ZFS test suite. .It Va WITHOUT_ZONEINFO Do not build the timezone database. When set, it enforces these options: @@ -1771,6 +1916,51 @@ When set, it enforces these options: .El .It Va WITH_ZONEINFO_LEAPSECONDS_SUPPORT Build leapsecond information in to the timezone database. +This option violates +.St -p1003.1 +and all other applicable standards, and is known to cause unexpected +issues with date/time handling in many applications and programming +languages. +.El +.Pp +The following options accept a single value from a list of valid values. +.Bl -tag -width indent +.It Va INIT_ALL +Control default initialization of stack variables in C and C++ code. +Options other than +.Li none +require the Clang compiler or GCC 12.0 or later. +The default value is +.Li none . +Valid values are: +.Bl -tag -width indent +.It Li none +Do not initialize stack variables (standard C/C++ behavior). +.It Li pattern +Build the base system or kernel with stack variables initialized to +.Pq compiler defined +debugging patterns on function entry. +.It Li zero +Build the base system or kernel with stack variables initialized +to zero on function entry. +This value is converted to +.Li none +for amd64 kernel builds due to incompatability with ifunc memset. +.El +.It Va LIBC_MALLOC +Specify the +.Xr malloc 3 +implementation used by libc. +The default value is +.Li jemalloc . +Valid values are: +.Bl -tag -width indent +.It Li jemalloc +.El +.Pp +Other implementations are expected in the future in both +.Fx +and downstream consumers. .El .Sh FILES .Bl -tag -compact -width Pa diff --git a/share/man/man5/stab.5 b/share/man/man5/stab.5 index 194c6afd6533..3070c5760ac6 100644 --- a/share/man/man5/stab.5 +++ b/share/man/man5/stab.5 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)stab.5 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" .Dd June 10, 2010 .Dt STAB 5 .Os diff --git a/share/man/man5/style.Makefile.5 b/share/man/man5/style.Makefile.5 index 4ced85704640..cc5d2f6bb28a 100644 --- a/share/man/man5/style.Makefile.5 +++ b/share/man/man5/style.Makefile.5 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2002-2003 David O'Brien <obrien@FreeBSD.org> +.\" Copyright (c) 2002-2003, 2023 David O'Brien <obrien@FreeBSD.org> .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,9 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd November 18, 2021 +.Dd July 17, 2023 .Dt STYLE.MAKEFILE 5 .Os .Sh NAME @@ -43,7 +41,7 @@ source tree. .Bl -bullet .It .Cm .PATH : -comes next if needed, and is spelled +comes first if needed, and is spelled .Dq Li ".PATH: " , with a single .Tn ASCII @@ -66,7 +64,7 @@ order is: .Va PROG Ns / Ns Oo Va SH Oc Ns Va LIB Ns / Ns Va SCRIPTS .Va FILES .Va LINKS -.Oo Va NO_ Oc Ns Va MAN +.Va MAN .Va MLINKS .Va INCS .Va SRCS @@ -88,7 +86,7 @@ order is: .Va INCS .Va FILES .Va LINKS -.Oo Va NO_ Oc Ns Va MAN +.Va MAN .Va MLINKS . .It Omit @@ -243,8 +241,6 @@ The simplest program .Pa Makefile is: .Bd -literal -offset indent -# $FreeBSD\&$ - PROG= foo \&.include <bsd.prog.mk> @@ -254,8 +250,6 @@ The simplest library .Pa Makefile is: .Bd -literal -offset indent -# $FreeBSD\&$ - LIB= foo SHLIB_MAJOR= 1 MAN= libfoo.3 @@ -268,10 +262,12 @@ SRCS= foo.c .Xr make.conf 5 , .Xr style 9 .Sh HISTORY -This manual page is inspired from the same source as +This manual page is inspired from the .Xr style 9 -manual page in -.Fx . +manual page and first appeared in +.Fx 5.1 . +.Sh AUTHORS +.An David O'Brien Aq deo@NUXI.org .Sh BUGS There are few hard and fast style rules here. The style of many things is too dependent on the context of the whole makefile, diff --git a/share/man/man5/style.mdoc.5 b/share/man/man5/style.mdoc.5 index 81f10b9df845..1c3ec2012118 100644 --- a/share/man/man5/style.mdoc.5 +++ b/share/man/man5/style.mdoc.5 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2018-2022 Mateusz Piotrowski <0mp@FreeBSD.org> .\" @@ -24,17 +24,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd January 29, 2022 +.Dd December 21, 2024 .Dt STYLE.MDOC 5 .Os .Sh NAME .Nm style.mdoc -.Nd -.Fx -.Xr mdoc 7 -file style guide +.Nd FreeBSD manual page style guide .Sh DESCRIPTION This file specifies the preferred style for manual pages in the .Fx @@ -76,6 +71,33 @@ Historically, was the preferred way before the deprecation of .Sy \&Li . .El +.Ss HARDWARE Section +Driver manuals in section four should have a +.Sx HARDWARE +section describing hardware known to work with the driver. +This section is drawn verbatim into the Release Hardware Notes, +therefore there are several things to note: +.Bl -dash -width "" +.It +The introductory sentence should be in the form: +.Bd -literal -offset indent +The +\&.Nm +driver supports the following $device_class: +.Ed +.Pp +Followed by the list of supported hardware. +.Pp +This defines what driver the subsection is referring to, +and allows the reader to search through the Hardware Notes +not only for the device models they have, +but also for the device type they are looking to acquire. +.It +The supported hardware should be listed as a bullet list, +or if complexity requires, a column list. +These two list types create very neat subsections +with clean starting and stopping points. +.El .Ss EXAMPLES Section .Bl -dash -width "" .It @@ -84,17 +106,17 @@ Format the section in the following way: .Bd -literal -offset indent \&.Bl -tag -width 0n -\&.It Sy Example 1\\&: No Doing Something +\&.It Sy Example 1\\&: Doing Something \&.Pp The following command does something. \&.Bd -literal -offset 2n -\&.Li # Ic make -VLEGAL +\&.Ic # make -VLEGAL \&.Ed -\&.It Sy Example 2\\&: No Doing Something Different +\&.It Sy Example 2\\&: Doing Something Different \&.Pp The following command does something different. \&.Bd -literal -offset 2n -\&.Li # Ic bectl list +\&.Ic # bectl list \&.Ed \&.Pp It is good to know this command. @@ -102,24 +124,22 @@ It is good to know this command. .Ed .Pp which renders as: -.Bd -filled -offset indent .Bl -tag -width 0n -.It Sy Example 1\&: No Doing Something +.It Sy Example 1\&: Doing Something .Pp The following command does something. .Bd -literal -offset 2n -.Li # Ic make -VLEGAL +.Ic # make -VLEGAL .Ed -.It Sy Example 2\&: No Doing Something Different +.It Sy Example 2\&: Doing Something Different .Pp The following command does something different. .Bd -literal -offset 2n -.Li # Ic bectl list +.Ic # bectl list .Ed .Pp It is good to know this command. .El -.Ed .El .Ss Lists .Bl -dash -width "" @@ -128,7 +148,8 @@ The .Fl width argument to the .Sy \&.Bl -macro should match the length of the longest item in the list, e.g.: +macro should match the length of the longest rendered item in the list, +e.g.: .Bd -literal -offset indent \&.Bl -tag -width "-a address" \&.It Fl a Ar address @@ -287,6 +308,7 @@ that would be rendered as: .Xr man 1 , .Xr mandoc 1 , .Xr mdoc 7 , +.Xr roff 7 , .Xr style 9 .Sh HISTORY This manual page first appeared in diff --git a/share/man/man5/sysctl.conf.5 b/share/man/man5/sysctl.conf.5 index 5df168661d85..cff141720fed 100644 --- a/share/man/man5/sysctl.conf.5 +++ b/share/man/man5/sysctl.conf.5 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 30, 2022 .Dt SYSCTL.CONF 5 .Os @@ -51,6 +49,13 @@ Comments can also exist at the end of a line, as seen in the .Sx EXAMPLES section, below. +.Pp +For kernel modules loaded via +.Xr rc.subr 8 +system, +additional module-specific settings can be applied +by adding a file in the same format named +.Pf /etc/sysctl.kld.d/<module name>.conf . .Sh FILES .Bl -tag -width /etc/rc.d/sysctl_lastload -compact .It Pa /etc/rc.d/sysctl @@ -69,6 +74,9 @@ Initial settings for .It Pa /etc/sysctl.conf.local Machine-specific settings for sites with a common .Pa /etc/sysctl.conf . +.It Pa /etc/sysctl.kld.d +Module specific settings for kernel modules loaded via +.Xr rc.subr 8 . .El .Sh EXAMPLES To turn off logging of programs that exit due to fatal signals you may use diff --git a/share/man/man6/Makefile b/share/man/man6/Makefile index be6547e592b5..9c94781169f8 100644 --- a/share/man/man6/Makefile +++ b/share/man/man6/Makefile @@ -1,5 +1,3 @@ -# $FreeBSD$ - MAN= intro.6 .include <bsd.prog.mk> diff --git a/share/man/man6/Makefile.depend b/share/man/man6/Makefile.depend index f80275d86ab1..11aba52f82cf 100644 --- a/share/man/man6/Makefile.depend +++ b/share/man/man6/Makefile.depend @@ -1,4 +1,3 @@ -# $FreeBSD$ # Autogenerated - do NOT edit! DIRDEPS = \ diff --git a/share/man/man6/intro.6 b/share/man/man6/intro.6 index d3978384efac..2cd184f934af 100644 --- a/share/man/man6/intro.6 +++ b/share/man/man6/intro.6 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 27, 2017 .Dt INTRO 6 .Os diff --git a/share/man/man7/Makefile b/share/man/man7/Makefile index 228c4ea393d5..021bf9251bda 100644 --- a/share/man/man7/Makefile +++ b/share/man/man7/Makefile @@ -1,6 +1,3 @@ -# @(#)Makefile 8.1 (Berkeley) 6/5/93 -# $FreeBSD$ - .include <src.opts.mk> #MISSING: eqnchar.7 ms.7 term.7 @@ -13,27 +10,31 @@ MAN= arch.7 \ crypto.7 \ development.7 \ environ.7 \ - ffs.7 \ firewall.7 \ growfs.7 \ hier.7 \ hostname.7 \ intro.7 \ maclabel.7 \ + mitigations.7 \ operator.7 \ orders.7 \ ports.7 \ release.7 \ sdoc.7 \ security.7 \ + simd.7 \ + sizeof.7 \ sprog.7 \ stats.7 \ stdint.7 \ sticky.7 \ tests.7 \ + tracing.7 \ tuning.7 MLINKS= intro.7 miscellaneous.7 +MLINKS+= growfs.7 growfs_fstab.7 MLINKS+= security.7 securelevel.7 MLINKS+= c.7 c78.7 MLINKS+= c.7 c89.7 @@ -42,7 +43,13 @@ MLINKS+= c.7 c95.7 MLINKS+= c.7 c99.7 MLINKS+= c.7 c11.7 MLINKS+= c.7 c17.7 -MLINKS+= c.7 c2x.7 +MLINKS+= c.7 c23.7 +MLINKS+= c.7 c2y.7 + +.if ${MK_INET} != "no" +MAN+= networking.7 +MLINKS+= networking.7 wifi.7 +.endif .if ${MK_TESTS} != "no" ATF= ${SRCTOP}/contrib/atf diff --git a/share/man/man7/Makefile.depend b/share/man/man7/Makefile.depend index f80275d86ab1..11aba52f82cf 100644 --- a/share/man/man7/Makefile.depend +++ b/share/man/man7/Makefile.depend @@ -1,4 +1,3 @@ -# $FreeBSD$ # Autogenerated - do NOT edit! DIRDEPS = \ diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index c7c2e224b33d..91f6953370d9 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -24,9 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd November 25, 2021 +.Dd April 12, 2025 .Dt ARCH 7 .Os .Sh NAME @@ -44,7 +42,7 @@ documentation. .Pp If not explicitly mentioned, sizes are in bytes. The architecture details in this document apply to -.Fx 12.0 +.Fx 13.0 and later, unless otherwise noted. .Pp .Fx @@ -89,7 +87,6 @@ release to support each architecture. .It Sy Architecture Ta Sy Initial Release .It aarch64 Ta 11.0 .It amd64 Ta 5.1 -.It armv6 Ta 10.0 .It armv7 Ta 12.0 .It i386 Ta 1.0 .It powerpc Ta 6.0 @@ -97,27 +94,28 @@ release to support each architecture. .It powerpc64 Ta 9.0 .It powerpc64le Ta 13.0 .It riscv64 Ta 12.0 -.It riscv64sf Ta 12.0 .El .Pp Discontinued architectures are shown in the following table. .Bl -column -offset indent "Architecture" "Initial Release" "Final Release" .It Sy Architecture Ta Sy Initial Release Ta Sy Final Release .It alpha Ta 3.2 Ta 6.4 -.It arm Ta 6.0 Ta 12.x +.It arm Ta 6.0 Ta 12.4 .It armeb Ta 8.0 Ta 11.4 +.It armv6 Ta 10.0 Ta 14.x .It ia64 Ta 5.0 Ta 10.4 -.It mips Ta 8.0 Ta 13.x -.It mipsel Ta 9.0 Ta 13.x -.It mipselhf Ta 12.0 Ta 13.x -.It mipshf Ta 12.0 Ta 13.x -.It mipsn32 Ta 9.0 Ta 13.x -.It mips64 Ta 9.0 Ta 13.x -.It mips64el Ta 9.0 Ta 13.x -.It mips64elhf Ta 12.0 Ta 13.x -.It mips64hf Ta 12.0 Ta 13.x +.It mips Ta 8.0 Ta 13.5 +.It mipsel Ta 9.0 Ta 13.5 +.It mipselhf Ta 12.0 Ta 13.5 +.It mipshf Ta 12.0 Ta 13.5 +.It mipsn32 Ta 9.0 Ta 13.5 +.It mips64 Ta 9.0 Ta 13.5 +.It mips64el Ta 9.0 Ta 13.5 +.It mips64elhf Ta 12.0 Ta 13.5 +.It mips64hf Ta 12.0 Ta 13.5 .It pc98 Ta 2.2 Ta 11.4 -.It sparc64 Ta 5.0 Ta 12.x +.It riscv64sf Ta 12.0 Ta 13.5 +.It sparc64 Ta 5.0 Ta 12.4 .El .Ss Type sizes All @@ -158,23 +156,19 @@ Examples are: .It Sy LP64 Ta Sy ILP32 counterpart .It Dv amd64 Ta Dv i386 .It Dv powerpc64 Ta Dv powerpc -.It Dv mips64* Ta Dv mips* -.It Dv aarch64 Ta Dv armv6/armv7 +.It Dv aarch64 Ta Dv armv7 .El .Pp .Dv aarch64 will support execution of -.Dv armv6 -or .Dv armv7 binaries if the CPU implements .Dv AArch32 -execution state, however -.Dv armv5 -binaries aren't supported. +execution state, however older arm binaries are not supported by +.Fx . .Pp On all supported architectures: -.Bl -column -offset -indent "long long" "Size" +.Bl -column -offset indent "long long" "Size" .It Sy Type Ta Sy Size .It short Ta 2 .It int Ta 4 @@ -196,24 +190,13 @@ Machine-dependent type sizes: .It Sy Architecture Ta Sy void * Ta Sy long double Ta Sy time_t .It aarch64 Ta 8 Ta 16 Ta 8 .It amd64 Ta 8 Ta 16 Ta 8 -.It armv6 Ta 4 Ta 8 Ta 8 .It armv7 Ta 4 Ta 8 Ta 8 .It i386 Ta 4 Ta 12 Ta 4 -.It mips Ta 4 Ta 8 Ta 8 -.It mipsel Ta 4 Ta 8 Ta 8 -.It mipselhf Ta 4 Ta 8 Ta 8 -.It mipshf Ta 4 Ta 8 Ta 8 -.It mipsn32 Ta 4 Ta 8 Ta 8 -.It mips64 Ta 8 Ta 8 Ta 8 -.It mips64el Ta 8 Ta 8 Ta 8 -.It mips64elhf Ta 8 Ta 8 Ta 8 -.It mips64hf Ta 8 Ta 8 Ta 8 .It powerpc Ta 4 Ta 8 Ta 8 .It powerpcspe Ta 4 Ta 8 Ta 8 .It powerpc64 Ta 8 Ta 8 Ta 8 .It powerpc64le Ta 8 Ta 8 Ta 8 .It riscv64 Ta 8 Ta 16 Ta 8 -.It riscv64sf Ta 8 Ta 16 Ta 8 .El .Pp .Sy time_t @@ -223,72 +206,93 @@ is 8 bytes on all supported architectures except i386. .It Sy Architecture Ta Sy Endianness Ta Sy char Signedness .It aarch64 Ta little Ta unsigned .It amd64 Ta little Ta signed -.It armv6 Ta little Ta unsigned .It armv7 Ta little Ta unsigned .It i386 Ta little Ta signed -.It mips Ta big Ta signed -.It mipsel Ta little Ta signed -.It mipselhf Ta little Ta signed -.It mipshf Ta big Ta signed -.It mipsn32 Ta big Ta signed -.It mips64 Ta big Ta signed -.It mips64el Ta little Ta signed -.It mips64elhf Ta little Ta signed -.It mips64hf Ta big Ta signed .It powerpc Ta big Ta unsigned .It powerpcspe Ta big Ta unsigned .It powerpc64 Ta big Ta unsigned .It powerpc64le Ta little Ta unsigned .It riscv64 Ta little Ta signed -.It riscv64sf Ta little Ta signed .El .Ss Page Size .Bl -column -offset indent "Architecture" "Page Sizes" .It Sy Architecture Ta Sy Page Sizes -.It aarch64 Ta 4K, 2M, 1G +.It aarch64 Ta 4K, 64K, 2M, 1G .It amd64 Ta 4K, 2M, 1G -.It armv6 Ta 4K, 1M .It armv7 Ta 4K, 1M .It i386 Ta 4K, 2M (PAE), 4M -.It mips Ta 4K -.It mipsel Ta 4K -.It mipselhf Ta 4K -.It mipshf Ta 4K -.It mipsn32 Ta 4K -.It mips64 Ta 4K -.It mips64el Ta 4K -.It mips64elhf Ta 4K -.It mips64hf Ta 4K .It powerpc Ta 4K .It powerpcspe Ta 4K .It powerpc64 Ta 4K .It powerpc64le Ta 4K .It riscv64 Ta 4K, 2M, 1G -.It riscv64sf Ta 4K, 2M, 1G .El +.Ss User Address Space Layout +.Bl -column -offset indent "riscv64 (Sv48)" "0x0001000000000000" "NNNU" +.It Sy Architecture Ta Sy Maximum Address Ta Sy Address Space Size +.It aarch64 Ta 0x0001000000000000 Ta 256TiB +.It amd64 (LA48) Ta 0x0000800000000000 Ta 128TiB +.It amd64 (LA57) Ta 0x0100000000000000 Ta 64PiB +.It armv7 Ta 0xbfc00000 Ta 3GiB +.It i386 Ta 0xffc00000 Ta 4GiB +.It powerpc Ta 0xfffff000 Ta 4GiB +.It powerpcspe Ta 0x7ffff000 Ta 2GiB +.It powerpc64 Ta 0x000fffffc0000000 Ta 4PiB +.It powerpc64le Ta 0x000fffffc0000000 Ta 4PiB +.It riscv64 (Sv39) Ta 0x0000004000000000 Ta 256GiB +.It riscv64 (Sv48) Ta 0x0000800000000000 Ta 128TiB +.El +.Pp +The layout of a process' address space can be queried via the +.Dv KERN_PROC_VM_LAYOUT +.Xr sysctl 3 +MIB. +.Pp +Historically, amd64 CPUs were limited to a 48-bit virtual address space. +Newer CPUs support 5-level page tables, which extend the significant bits of +addresses to 57 bits (LA57 mode). +The address space layout is determined by the CPU's support for LA57. +Setting the +.Sy vm.pmap.la57 +tunable to 0 forces the system into 4-level paging mode, even on hardware that +supports 5-level paging. +In this mode, all processes get a 48-bit address space. +The +.Sy vm.pmap.prefer_la48_uva +tunable determines whether processes running on a LA57 system are limited to +a 48-bit address space by default. +Some applications make use of unused upper bits in pointer values to store +information, and thus implicitly assume they are running in LA48 mode. +To avoid breaking compatibility, all processes run in LA48 mode by default. +The +.Xr elfctl 1 +utility can be used to request LA48 or LA57 mode for specific executables. +Similarly, +.Xr proccontrol 1 +can be used to configure the address space layout when executing a process. +.Pp +The RISC-V specification permits 3-level (Sv39), 4-level (Sv48), and +5-level (Sv57) page tables. +Hardware is only required to implement Sv39; implementations which support +Sv48 must also support Sv39, and implementations which support Sv57 must also +support Sv48. +The +.Sy vm.pmap.mode +tunable can be used to select the layout. +.Fx +currently supports Sv39 and Sv48 and defaults to using Sv39. .Ss Floating Point .Bl -column -offset indent "Architecture" "float, double" "long double" .It Sy Architecture Ta Sy float, double Ta Sy long double .It aarch64 Ta hard Ta soft, quad precision .It amd64 Ta hard Ta hard, 80 bit -.It armv6 Ta hard Ta hard, double precision .It armv7 Ta hard Ta hard, double precision .It i386 Ta hard Ta hard, 80 bit -.It mips Ta soft Ta identical to double -.It mipsel Ta soft Ta identical to double -.It mipselhf Ta hard Ta identical to double -.It mipshf Ta hard Ta identical to double -.It mipsn32 Ta soft Ta identical to double -.It mips64 Ta soft Ta identical to double -.It mips64el Ta soft Ta identical to double -.It mips64elhf Ta hard Ta identical to double -.It mips64hf Ta hard Ta identical to double .It powerpc Ta hard Ta hard, double precision .It powerpcspe Ta hard Ta hard, double precision .It powerpc64 Ta hard Ta hard, double precision .It powerpc64le Ta hard Ta hard, double precision .It riscv64 Ta hard Ta hard, quad precision -.It riscv64sf Ta soft Ta soft, quad precision .El .Ss Default Tool Chain .Fx @@ -298,7 +302,7 @@ as the default compiler on all supported CPU architectures, LLVM's .Xr ld.lld 1 as the default linker, and -ELF Tool Chain binary utilities such as +LLVM binary utilities such as .Xr objcopy 1 and .Xr readelf 1 . @@ -317,11 +321,10 @@ or similar things like boot sequences. .It Dv MACHINE Ta Dv MACHINE_CPUARCH Ta Dv MACHINE_ARCH .It arm64 Ta aarch64 Ta aarch64 .It amd64 Ta amd64 Ta amd64 -.It arm Ta arm Ta armv6, armv7 +.It arm Ta arm Ta armv7 .It i386 Ta i386 Ta i386 -.It mips Ta mips Ta mips, mipsel, mips64, mips64el, mipshf, mipselhf, mips64elhf, mipsn32 .It powerpc Ta powerpc Ta powerpc, powerpcspe, powerpc64, powerpc64le -.It riscv Ta riscv Ta riscv64, riscv64sf +.It riscv Ta riscv Ta riscv64 .El .Ss Predefined Macros The compiler provides a number of predefined macros. @@ -350,24 +353,13 @@ Architecture-specific macros: .It Sy Architecture Ta Sy Predefined macros .It aarch64 Ta Dv __aarch64__ .It amd64 Ta Dv __amd64__ , Dv __x86_64__ -.It armv6 Ta Dv __arm__ , Dv __ARM_ARCH >= 6 .It armv7 Ta Dv __arm__ , Dv __ARM_ARCH >= 7 .It i386 Ta Dv __i386__ -.It mips Ta Dv __mips__ , Dv __MIPSEB__ , Dv __mips_o32 -.It mipsel Ta Dv __mips__ , Dv __mips_o32 -.It mipselhf Ta Dv __mips__ , Dv __mips_o32 -.It mipshf Ta Dv __mips__ , Dv __MIPSEB__ , Dv __mips_o32 -.It mipsn32 Ta Dv __mips__ , Dv __MIPSEB__ , Dv __mips_n32 -.It mips64 Ta Dv __mips__ , Dv __MIPSEB__ , Dv __mips_n64 -.It mips64el Ta Dv __mips__ , Dv __mips_n64 -.It mips64elhf Ta Dv __mips__ , Dv __mips_n64 -.It mips64hf Ta Dv __mips__ , Dv __MIPSEB__ , Dv __mips_n64 .It powerpc Ta Dv __powerpc__ .It powerpcspe Ta Dv __powerpc__ , Dv __SPE__ .It powerpc64 Ta Dv __powerpc__ , Dv __powerpc64__ .It powerpc64le Ta Dv __powerpc__ , Dv __powerpc64__ .It riscv64 Ta Dv __riscv , Dv __riscv_xlen == 64 -.It riscv64sf Ta Dv __riscv , Dv __riscv_xlen == 64 , Dv __riscv_float_abi_soft .El .Pp Compilers may define additional variants of architecture-specific macros. @@ -429,34 +421,30 @@ It may also encode a variation in the size of the integer or pointer. It may also encode a ISA revision. It may also encode hard versus soft floating point ABI and usage. It may also encode a variant ABI when the other factors do not -uniquely define the ABI (e.g., MIPS' n32 ABI). +uniquely define the ABI. It, along with .Dv MACHINE , defines the ABI used by the system. -For example, the MIPS CPU processor family supports 9 different -combinations encoding pointer size, endian and hard versus soft float (for -8 combinations) as well as N32 (which only ever had one variation of -all these). Generally, the plain CPU name specifies the most common (or at least first) variant of the CPU. -This is why mips and mips64 imply 'big endian' while 'armv6' and 'armv7' +This is why powerpc and powerpc64 imply 'big endian' while armv7 and aarch64 imply little endian. If we ever were to support the so-called x32 ABI (using 32-bit pointers on the amd64 architecture), it would most likely be encoded as amd64-x32. -It is unfortunate that amd64 specifies the 64-bit evolution of the x86 -platform (it matches the 'first rule') as everybody else uses x86_64. -There is no standard name for the processor: each OS selects its own -conventions. +It is unfortunate that amd64 specifies the 64-bit evolution of the x86 platform +(it matches the 'first rule') as almost everybody else uses x86_64. +The +.Fx +port was so early, it predated processor name standardization after Intel joined +the market. +At the time, each OS selected its own conventions. +Backwards compatibility means it is not easy to change to the consensus name. .It Dv MACHINE_CPUARCH Represents the source location for a given .Dv MACHINE_ARCH . It is generally the common prefix for all the MACHINE_ARCH that share the same implementation, though 'riscv' breaks this rule. -For example, -.Dv MACHINE_CPUARCH -is defined to be mips for all the flavors of mips that we support -since we support them all with a shared set of sources. While amd64 and i386 are closely related, MACHINE_CPUARCH is not x86 for them. The @@ -480,7 +468,7 @@ in the top level Makefile for cross building. Unused outside of that scope. It is not passed down to the rest of the build. Makefiles outside of the top level should not use it at all (though -some have their own private copy for hysterical raisons). +some have their own private copy for historical reasons). .It Dv TARGET_ARCH Used to set .Dv MACHINE_ARCH @@ -490,8 +478,12 @@ Like it is unused outside of that scope. .El .Sh SEE ALSO +.Xr elfctl 1 , +.Xr proccontrol 1 , +.Xr sysctl 3 , .Xr src.conf 5 , -.Xr build 7 +.Xr build 7 , +.Xr simd 7 .Sh HISTORY An .Nm diff --git a/share/man/man7/ascii.7 b/share/man/man7/ascii.7 index 713a4922e759..11f4f63ccb47 100644 --- a/share/man/man7/ascii.7 +++ b/share/man/man7/ascii.7 @@ -25,10 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)ascii.7 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" -.Dd September 21, 2019 +.Dd January 4, 2025 .Dt ASCII 7 .Os .Sh NAME @@ -142,6 +139,44 @@ ESC ; [ { 11011 RS > ^ - 11110 US ? _ DEL 11111 .Ed +.Pp +The full +.Nm names +of the control character set: +.Bd -literal -offset left +NUL NULl +SOH Start Of Heading +STX Start Of Text +ETX End Of Text +EOT End Of Transmission +ENQ ENQuiry +ACK ACKnowledge +BEL BELl + BS BackSpace + HT Horizontal Tab + LF Line Feed (new line) + VT Vertical Tab + FF new page Form Feed + CR Carriage Return + SO Shift Out + SI Shift In +DLE Data Link Escape +DC1 Device Control 1 +DC2 Device Control 2 +DC3 Device Control 3 +DC4 Device Control 4 +NAK Negative AcKnowledge +SYN SYNchronous idle +ETB End of Transmission Block +CAN CANcel + EM End of Medium +SUB SUBstitute +ESC ESCape + FS File Separator + GS Group Separator + RS Record Separator + US Unit Separator +.Ed .Sh FILES .Bl -tag -width /usr/share/misc/ascii -compact .It Pa /usr/share/misc/ascii @@ -157,4 +192,4 @@ ESC ; [ { 11011 An .Nm manual page appeared in -.At v2 . +.At v1 . diff --git a/share/man/man7/bsd.snmpmod.mk.7 b/share/man/man7/bsd.snmpmod.mk.7 index 299daf227e18..fc6ca0ae20e1 100644 --- a/share/man/man7/bsd.snmpmod.mk.7 +++ b/share/man/man7/bsd.snmpmod.mk.7 @@ -26,8 +26,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 8, 2008 .Dt BSD.SNMPMOD.MK 7 .Os diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index 4e499c81b45c..0aae2c42ac04 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2000 .\" Mike W. Meyer .\" @@ -22,14 +25,14 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd August 10, 2021 +.Dd March 8, 2025 .Dt BUILD 7 .Os .Sh NAME .Nm build -.Nd General instructions on how to build the system +.Nd general instructions on how to build the +.Fx +system .Sh DESCRIPTION The sources for the .Fx @@ -398,6 +401,19 @@ Install the kernel to the directory .Pa ${DISTDIR}/kernel/boot/kernel . This target is used while building a release; see .Xr release 7 . +.It Cm packages +Create a +.Xr pkg 7 +repository containing packages that can be used to create or upgrade an +installation of the base system. +The output repository is placed in the object directory, under +.Pa repo/${PKG_ABI} +where +.Va PKG_ABI +is the +.Xr pkg 7 +ABI for the build target, for example, +.Pa /usr/obj/${SRCDIR}/repo/FreeBSD:15:amd64 . .It Cm packagekernel Archive the results of .Cm distributekernel , @@ -433,6 +449,8 @@ include: .Bl -tag -width ".Cm delete-old-libs" .It Cm check-old Print a list of old files and directories in the system. +.It Cm check-old-libs +Print a list of obsolete base system libraries. .It Cm delete-old Delete obsolete base system files and directories interactively. When @@ -484,6 +502,9 @@ The directory hierarchy prefix where built objects will be installed. If not set, .Va DESTDIR defaults to the empty string. +If set, +.Va DESTDIR +must specify an absolute path. .It Va MAKEOBJDIRPREFIX Defines the prefix for directory names in the tree of built objects. Defaults to @@ -496,6 +517,8 @@ and not via or .Pa /etc/src.conf or the command line. +.Va MAKEOBJDIRPREFIX +must specify an absolute path. .It Va WITHOUT_WERROR If defined, compiler warnings will not cause the build to halt, even if the makefile says otherwise. @@ -509,12 +532,35 @@ Additionally, builds in are influenced by the following .Xr make 1 variables: -.Bl -tag -width ".Va SUBDIR_OVERRIDE" +.Bl -tag -width ".Va LOCAL_MODULES_DIR" +.It Va CROSS_TOOLCHAIN +Requests use of an external toolchain to build either the world or kernel. +This value of this variable can either be the full path to a file, +or the base name of a file in +.Pa ${LOCALBASE}/share/toolchains . +The file should be a make file which sets variables to request an external +toolchain such as +.Va XCC . +.Pp +External toolchains are available in ports for both LLVM and GCC/binutils. +For external toolchains available in ports, +.Va CROSS_TOOLCHAIN +should be set to the name of the package. +LLVM toolchain packages use the name llvm<major version>. +GCC toolchains provide separate packages for each architecture and use the +name ${MACHINE_ARCH}-gcc<major version>. .It Va KERNCONF Overrides which kernel to build and install for the various kernel make targets. It defaults to .Cm GENERIC . +.It Va KERNBUILDDIR +Overrides the default directory to get all the opt_*.h files for +building a kernel module. +Useful for stand-alone modules that depend on +.Xr config 8 +options. +Automatically set for modules built with a kernel. .It Va KERNCONFDIR Overrides the directory in which .Va KERNCONF @@ -596,6 +642,20 @@ If set, this variable supplies a list of additional directories relative to the root of the source tree to build as part of the .Cm cross-tools target. +.It Va PKG_FORMAT +Specify a package compression format when building +.Pa src +into +.Cm packages . +Default: +.Ql tzst . +Consider using +.Ql tar +to disable compression. +Accepted options are documented in the +.Fl f +description of +.Xr pkg-create 8 . .It Va PORTS_MODULES A list of ports with kernel modules that should be built and installed as part of the @@ -603,6 +663,10 @@ as part of the and .Cm installkernel process. +This is currently incompatible with building +.Pa src +into +.Cm packages . .Bd -literal -offset indent make PORTS_MODULES=emulators/virtualbox-ose-kmod kernel .Ed @@ -656,7 +720,7 @@ and will only build the specified directory as was done historically. When combined with .Cm buildworld -it is necesarry to override +it is necessary to override .Va LOCAL_LIB_DIRS with any custom directories containing libraries. This allows building a subset of the system in the same way as @@ -713,7 +777,7 @@ using the .Fl D option of .Xr make 1 : -.Bl -tag -width ".Va -DNO_KERNELCONFIG" +.Bl -tag -width ".Va LOADER_DEFAULT_INTERP" .It Va LOADER_DEFAULT_INTERP Defines what interpreter the default loader program will have. Valid values include @@ -783,6 +847,10 @@ If set, the libraries phase will be skipped. If set, no object directories will be created. This should only be used if object directories were created in a previous build and no new directories are connected. +.It Va UNIVERSE_TOOLCHAIN +Requests use of the toolchain built as part of the +.Cm universe +target as an external toolchain. .It Va WORLDFAST If set, the build target .Cm buildworld @@ -812,7 +880,7 @@ Builds using the and related targets are influenced by the following .Xr make 1 variables: -.Bl -tag -width ".Va MAKE_JUST_KERNELS" +.Bl -tag -width ".Va USE_GCC_TOOLCHAINS" .It Va JFLAG Pass the value of this variable to each .Xr make 1 @@ -834,6 +902,15 @@ target for each supported architecture instead of the default action of building a world and one or more kernels. This variable implies .Va WITHOUT_KERNELS . +.It Va USE_GCC_TOOLCHAINS +Use external GCC toolchains to build the requested targets. +If the required toolchain package for a supported architecture is not installed, +the build for that architecture is skipped. +.Pp +A specific version of GCC can be used by setting the value of this variable +to the desired version +.Pq for example, Dq gcc14 ; +otherwise a default version of GCC is used. .It Va TARGETS Only build the listed targets instead of each supported architecture. .It Va EXTRA_TARGETS @@ -862,18 +939,14 @@ method of updating your system from the latest sources, please see the section in .Pa src/UPDATING . .Pp -The following sequence of commands can be used to cross-build the -system for the armv6 architecture on an amd64 host: +The following sequence of commands can be used to cross-build the system for +the arm64 (aarch64) architecture on a different host architecture, such as +amd64: .Bd -literal -offset indent cd /usr/src -make TARGET_ARCH=armv6 buildworld buildkernel -make TARGET_ARCH=armv6 DESTDIR=/clients/arm installworld installkernel +make TARGET=arm64 buildworld buildkernel +make TARGET=arm64 DESTDIR=/clients/arm64 installworld installkernel .Ed -.Sh HISTORY -The -.Nm -manpage first appeared in -.Fx 4.3 . .Sh SEE ALSO .Xr cc 1 , .Xr install 1 , @@ -881,14 +954,19 @@ manpage first appeared in .Xr make.conf 5 , .Xr src.conf 5 , .Xr arch 7 , +.Xr development 7 , .Xr pkg 7 , .Xr ports 7 , .Xr release 7 , .Xr tests 7 , .Xr config 8 , .Xr etcupdate 8 , -.Xr mergemaster 8 , .Xr reboot 8 , .Xr shutdown 8 +.Sh HISTORY +The +.Nm +manpage first appeared in +.Fx 4.3 . .Sh AUTHORS .An Mike W. Meyer Aq Mt mwm@mired.org diff --git a/share/man/man7/c.7 b/share/man/man7/c.7 index f8943cd9ca29..c95bab1c1f19 100644 --- a/share/man/man7/c.7 +++ b/share/man/man7/c.7 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 20, 2021 +.Dd November 4, 2024 .Dt C 7 .Os .Sh NAME @@ -36,7 +34,8 @@ .Nm c99 , .Nm c11 , .Nm c17 , -.Nm c2x +.Nm c23 , +.Nm c2y .Nd The C programming language .Sh DESCRIPTION C is a general purpose programming language, which has a strong connection @@ -114,9 +113,12 @@ development of the language did not stop. .Pp The ISO C standard was later extended with an amendment as ISO/IEC 9899/AMD1 in 1995. -This contained, for example, the wide-character support in <wchar.h> and -<wctype.h>, and also restricted character set support via diagraphs and -<iso646.h>. +This contained, for example, the wide-character support in +.In wchar.h +and +.In wctype.h , +and also restricted character set support via diagraphs and +.In iso646.h . This amendment is usually referred to as C95. Two technical corrigenda were also published: Technical Corrigendum 1 as ISO/IEC 9899/COR1 in 1994 and Technical Corrigendum 2 as ISO/IEC 9899/COR2 @@ -132,18 +134,23 @@ The improvements include (but are not limited to) the following: .Bl -bullet -offset indent .It digraphs, trigraphs, and alternative spellings for the operators that -use non-ISO646 characters in <iso646.h> +use non-ISO646 characters in +.In iso646.h .It -extended multibyte and wide character library support in <wchar.h> and -<wctype.h> +extended multibyte and wide character library support in +.In wchar.h +and +.In wctype.h .It variable length arrays .It flexible array members .It -complex (and imaginary) number arithmetic support in <complex.h> +complex (and imaginary) number arithmetic support in +.In complex.h .It -type-generic math macros in <tgmath.h> +type-generic math macros in +.In tgmath.h .It the long long int type and library functions .It @@ -159,15 +166,24 @@ BCPL style single-line comments .It allow mixed declarations and code .It -the vscanf family of functions in <stdio.h> and <wchar.h> +the +.Fn vscanf +family of functions in +.In stdio.h +and +.In wchar.h .It allow trailing comma in enum declaration .It inline functions .It -the snprintf family of functions in <stdio.h> +the +.Fn snprintf +family of functions in +.In stdio.h .It -boolean type and macros in <stdbool.h> +boolean type and macros in +.In stdbool.h .It empty macro arguments .It @@ -175,7 +191,8 @@ _Pragma preprocessing operator .It __func__ predefined identifier .It -va_copy macro in <stdarg.h> +va_copy macro in +.In stdarg.h .It additional strftime conversion specifiers .El @@ -187,24 +204,34 @@ and ISO/IEC 9899:1999/COR3:2007. The improvements include (but are not limited to) the following: .Bl -bullet -offset indent .It -support for multiple threads of execution and atomic operations in <threads.h> -and <stdatomic.h> +support for multiple threads of execution and atomic operations in +.In threads.h +and +.In stdatomic.h .It -additional floating-point characteristic macros in <float.h> +additional floating-point characteristic macros in +.In float.h .It -querying and specifying alignment of objects in <stdalign.h> and <stdlib.h> +querying and specifying alignment of objects in +.In stdalign.h +and +.In stdlib.h .It -Unicode character types and functions in <uchar.h> +Unicode character types and functions in +.In uchar.h .It type-generic expressions .It -static assertions in <assert.h> +static assertions in +.In assert.h .It anonymous structures and unions .It -remove the gets function from <stdio.h> +remove the gets function from +.In stdio.h .It -add the aligned_alloc, at_quick_exit, and quick_exit functions in <stdlib.h> +add the aligned_alloc, at_quick_exit, and quick_exit functions in +.In stdlib.h .El .Pp C11 was later superseded by ISO/IEC 9899:2018, also known as C17 which was @@ -213,17 +240,154 @@ It incorporates the Technical Corrigendum 1 (ISO/IEC 9899:2011/COR1:2012) which was published in 2012. It addressed defects and deficiencies in C11 without introducing new features, only corrections and clarifications. -Since there were no major changes in C17, the current standard for -Programming Language C, is still considered C11 \(em ISO/IEC 9899:2011, published -2011-12-08. .Pp -The next standard, the fifth, is currently referred to as C2x and is scheduled -to be adopted by the end of 2021, with a publication date of 2022. -When published, it will cancel and replace the fourth edition, ISO/IEC -9899:2018. +C23, formally ISO/IEC 9899:2024, is the current standard with significant +updates that supersede C17 (ISO/IEC 9899:2018). +The standardization effort began in 2016, informally as C2x, with the first +WG14 meeting in 2019, and was officially published on October 31, 2024. +C23 was originally anticipated for an earlier release, but the timeline was +extended due to COVID-19 pandemic. +With C23, the value of __STDC_VERSION__ has been updated from 201710L to +202311L. +Key changes include (but are not limited to) the following: +.Bl -bullet -offset indent +.It +Add null pointer type nullptr_t and the nullptr keyword +.It +Add constexpr keyword as a storage-class specifier for objects +.It +Redefine the usage of the auto keyword to support type inference while also +retaining its previous functionality as a storage-class specifier when used +with a type +.It +Add %b binary conversion specifier to the +.Fn printf +and +.Fn scanf +function families +.It +Add binary conversion support (0b and 0B) to the +.Fn strtol +and +.Fn wcstol +function families +.It +Add the #embed directive for binary resource inclusion and __has_embed to +check resource availability with preprocessor directives +.It +Add the #warning directive for diagnostics +.It +Add the #elifdef and #elifndef directives +.It +Add the u8 prefix for character literals to represent UTF-8 encoding, +compatible with C++17 +.It +Add the char8_t type for UTF-8 encoded data and update the types of u8 +character constants and string literals to char8_t +.It +Add functions +.Fn mbrtoc8 +and +.Fn c8rtomb +to convert between narrow multibyte +characters and UTF-8 encoding +.It +Define all char16_t strings and literals as UTF-16 encoded and char32_t +strings and literals as UTF-32 encoded unless specified otherwise +.It +Allow storage-class specifiers within compound literals +.It +Support the latest IEEE 754 standard, ISO/IEC 60559:2020, with binary and +(optional) decimal floating-point arithmetic +.It +Add single-argument _Static_assert for compatibility with C++17 +.It +Add _Decimal32, _Decimal64, _Decimal128 keywords for (optional) decimal +floating-point arithmetic +.It +Add digit separator ' (the single quote character) for literals +.It +Enable specification of the underlying type of an enum +.It +Standardize the +.Fn typeof +operator +.It +Add +.Fn memset_explicit +in +.In string.h +to securely erase sensitive data +regardless of optimizations +.It +Add +.Fn memccpy +in +.In string.h +for efficient string concatenation +.It +Add +.Fn memalignment +in +.In stdlib.h +to determine pointer alignment +.It +Add +.Fn strdup +and +.Fn strndup +in +.In string.h +to allocate string copies +.It +Introduce bit utility functions, macros, and types in the new header +.In stdbit.h +.It +Add +.Fn timegm +in +.In time.h +for converting time structures to calendar time +values +.It +Add __has_include for header availability checking via preprocessor +directives +.It +Add __has_c_attribute to check attribute availability via preprocessor +directives +.It +Add _BitInt(N) and unsigned _BitInt(N) for bit-precise integers, and +BITINT_MAXWIDTH for maximum bit width +.It +Elevate true and false to proper keywords (previously macros from +.In stdbool.h ) +.It +Add keywords alignas, alignof, bool, static_assert, thread_local; previously +defined keywords remain available as alternative spellings +.It +Enable zero initialization with {} (including initialization of VLAs) +.It +Introduce C++11 style attributes using [[]], with adding [[deprecated]], +[[fallthrough]], [[maybe_unused]], [[nodiscard]], and [[noreturn]] +.It +Deprecate _Noreturn, noreturn, header +.In stdnoreturn.h +features introduced +in C11 +.It +Remove trigraph support +.It +Remove K&R function definitions and declarations +.It +Remove non-two's-complement representations for signed integers +.El .Pp -Some useful features have been provided as extensions by some compilers, but -they cannot be considered as standard features. +The next version of the C Standard, informally named C2y, is anticipated +to release within the next six years, targeting 2030 at the latest. +A charter for C2y is still being drafted and discussed, with several +papers under debate from the January 2024 meeting in Strasbourg, France +indicating that this new version may address long-standing requests and +deficiencies noted by the C community, while preserving its core strengths. .Pp ISO/IEC JTC1/SC22/WG14 committee is responsible for the ISO/IEC 9899, C Standard. @@ -351,6 +515,11 @@ C Standard. .%A ISO/IEC .%T 9899:2018 (aka C17) .Re +.Pp +.Rs +.%A ISO/IEC +.%T 9899:2024 (aka C23) +.Re .Sh HISTORY This manual page first appeared in .Fx 9.0 . @@ -358,8 +527,6 @@ This manual page first appeared in .An -nosplit This manual page was originally written by .An Gabor Kovesdan Aq Mt gabor@FreeBSD.org . -It was updated for -.Fx 14.0 -by +It was updated by .An Faraz Vahedi Aq Mt kfv@kfv.io with information about more recent C standards. diff --git a/share/man/man7/clocks.7 b/share/man/man7/clocks.7 index 06b41ed551ca..3a218f844450 100644 --- a/share/man/man7/clocks.7 +++ b/share/man/man7/clocks.7 @@ -24,8 +24,6 @@ .\" 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 18, 2008 .Dt CLOCKS 7 diff --git a/share/man/man7/crypto.7 b/share/man/man7/crypto.7 index 941650d16371..37c441562fa4 100644 --- a/share/man/man7/crypto.7 +++ b/share/man/man7/crypto.7 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 11, 2022 .Dt CRYPTO 7 .Os diff --git a/share/man/man7/development.7 b/share/man/man7/development.7 index 346772b4fbb0..1b875fb14bda 100644 --- a/share/man/man7/development.7 +++ b/share/man/man7/development.7 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2018 Edward Tomasz Napierala <trasz@FreeBSD.org> .\" .\" Redistribution and use in source and binary forms, with or without @@ -21,9 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 21, 2022 +.Dd January 19, 2025 .Dt DEVELOPMENT 7 .Os .Sh NAME @@ -39,14 +40,14 @@ Doc is the documentation, such as the Handbook. To read more, see: .Pp -.Lk https://www.FreeBSD.org/doc/en/books/fdp-primer/ +.Lk https://docs.FreeBSD.org/en/books/fdp-primer/ .Pp Ports, described further in .Xr ports 7 , are the way to build, package, and install third party software. To read more, see: .Pp -.Lk https://www.FreeBSD.org/doc/en/books/porters-handbook/ +.Lk https://docs.FreeBSD.org/en/books/porters-handbook/ .Pp The last one, src, revolves around the source code for the base system, consisting of the kernel, and the libraries and utilities commonly called @@ -55,7 +56,7 @@ the world. The Committer's Guide, describing topics relevant to all committers, can be found at: .Pp -.Lk https://www.FreeBSD.org/doc/en/articles/committers-guide/ +.Lk https://docs.freebsd.org/en/articles/committers-guide/ .Pp .Fx src development takes place in the project-hosted @@ -69,7 +70,7 @@ The push URL is: .Pp There is also a list of public, read-only Git mirrors at: .Pp -.Lk https://docs.freebsd.org/en/books/handbook/mirrors/#external-mirrors +.Lk https://docs.FreeBSD.org/en/books/handbook/mirrors/#external-mirrors .Pp The .Ql main @@ -82,15 +83,16 @@ with an incremented major version number. Releases are then branched off STABLE and numbered with consecutive minor numbers. .Pp -Layout of the source tree is described in -.Xr hier 7 . +The layout of the source tree is described in its +.Pa README.md +file. Build instructions can be found in .Xr build 7 and .Xr release 7 . Kernel programming interfaces (KPIs) are documented in section 9 manual pages; use -.Ql "apropos -s 9 ." +.Ql apropos -s 9 \&. for a list. Regression test suite is described in .Xr tests 7 . @@ -117,7 +119,14 @@ build and test status of CURRENT and STABLE branches, the continuous integration system is at: .Pp .Lk https://ci.FreeBSD.org -.Pp +.Sh FILES +.Bl -compact -tag -width "/usr/src/tools/tools/git/git-arc.sh" +.It Pa /usr/src/CONTRIBUTING.md +.Fx +contribution guidelines +.It Pa /usr/src/tools/tools/git/git-arc.sh +Phabricator review tooling +.El .Sh EXAMPLES Check out the CURRENT branch, build it, and install, overwriting the current system: @@ -143,6 +152,13 @@ cd src/bin/ls make clean all install .Ed .Pp +Rebuild and reinstall a single loadable kernel module, in this case +.Xr sound 4 : +.Bd -literal -offset indent +cd src/sys/modules/sound +make all install clean cleandepend KMODDIR=/boot/kernel +.Ed +.Pp Quickly rebuild and reinstall the kernel, only recompiling the files changed since last build; note that this will only work if the full kernel build has been completed in the past, not on a fresh source tree: @@ -188,8 +204,7 @@ The .Nm manual page was originally written by .An Matthew Dillon Aq Mt dillon@FreeBSD.org -and first appeared -in +and first appeared in .Fx 5.0 , December 2002. It was since extensively modified by diff --git a/share/man/man7/environ.7 b/share/man/man7/environ.7 index 9a77100ff6d3..51fb6544fc5a 100644 --- a/share/man/man7/environ.7 +++ b/share/man/man7/environ.7 @@ -25,10 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)environ.7 8.3 (Berkeley) 4/19/94 -.\" $FreeBSD$ -.\" -.Dd August 5, 2020 +.Dd September 3, 2023 .Dt ENVIRON 7 .Os .Sh NAME @@ -67,6 +64,13 @@ are documented in the section of the appropriate manual page. .Sh ENVIRONMENT .Bl -tag -width LD_LIBRARY_PATH +.It Ev ARCHLEVEL +On +.Em amd64 , +controls the level of SIMD enhancements used. +See +.Xr simd 7 +for details. .It Ev BLOCKSIZE The size of the block units used by several disk-related commands, most notably @@ -197,7 +201,7 @@ The full pathname of the user's login shell. .It Ev TERM The kind of terminal for which output is to be prepared. This information is used by commands, such as -.Xr nroff 1 +.Xr nroff 1 Pq Pa ports/textproc/groff or .Xr plot 1 which may exploit special terminal capabilities. @@ -306,7 +310,8 @@ built-in command in .Xr setlocale 3 , .Xr system 3 , .Xr termcap 3 , -.Xr termcap 5 +.Xr termcap 5 , +.Xr simd 7 .Sh HISTORY The .Nm diff --git a/share/man/man7/firewall.7 b/share/man/man7/firewall.7 index 48558b21d5a8..041c66bdde40 100644 --- a/share/man/man7/firewall.7 +++ b/share/man/man7/firewall.7 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 26, 2001 .Dt FIREWALL 7 .Os diff --git a/share/man/man7/growfs.7 b/share/man/man7/growfs.7 index 2e04e00f6abf..43648d8d9f2b 100644 --- a/share/man/man7/growfs.7 +++ b/share/man/man7/growfs.7 @@ -22,48 +22,119 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd May 3, 2020 +.Dd November 22, 2022 .Dt GROWFS 7 .Os .Sh NAME -.Nm growfs -.Nd start up script to grow the root file-system +.Nm growfs , +.Nm growfs_fstab +.Nd start up scripts to grow the root file system and add swap .Sh DESCRIPTION +The +.Nm +script normally runs at the first boot after system installation. +If the boot disk is larger than the root file system and boot partitions, +and the root file system is in the last partition, +.Nm +can expand the root file system. +It can also add a swap partition, with a default size of 10% of the boot disk. +Swap is limited to twice the memory size up to 4 GB, +8 GB up to 8 GB of memory, and memory size over 8 GB. +It is also limited to the +.Xr sysctl 8 +value of +.Li vm.swap_maxpages +divided by 2. +By default, no swap partition is created if an existing swap partition is found +or is listed in +.Pa /etc/fstab , +or the disk is under 15 GB. +The +.Nm growfs_fstab +script adds any new swap partition to +.Pa /etc/fstab +after the root file system is made writable, +and enables its use as a dump partition if the +.Va dumpdev +variable from +.Xr rc.conf 5 +is set to +.Li AUTO . +.Pp The following options in .Pa /etc/rc.conf control the behavior of .Nm : -.Bl -tag -width ".Va growfs_enable" -offset indent +.Bl -tag -width ".Va growfs_swap_size" -offset indent .It Va growfs_enable .Pq Dq Li NO If set to .Dq Li YES , -the first time the machine boots, the root file-system will be automatically -expanded, if possible, to fill up all available space after it. +the first time the machine boots, the root file system will be automatically +expanded, if possible, to fill up all available space after it, +after optionally adding a swap device at the end. +.It Va growfs_swap_size +.Pq Dq Li \& +If set to +.Dq Li 0 , +the addition of a swap partition is disabled. +An empty value +.Pq Dq Li \& +allows the creation of a swap partition with the default size. +If set to another value, +the swap partition will be created with the specified size in bytes, +even if another swap partition is detected. .El .Pp -To expand the root file-system with-out rebooting, run the following command: +A setting for +.Va growfs_swap_size +can be set in the kernel environment, in which case it overrides +the value from +.Pa /etc/rc.conf . +.Pp +To expand the root file system without rebooting, run the following command: .Dl % /etc/rc.d/growfs onestart +In addition, if a swap partition is added, run the command: +.Dl % /etc/rc.d/growfs_fstab onestart +Note that if a disk is expanded again, +and if the root file system had previously been expanded +and a swap partition added, it is necessary to delete the swap +partition before this procedure +in order to expand the root file system to the new size. +A new swap partition can be created during the expansion. .Sh IMPLEMENTATION NOTES +The +.Nm +script only attempts to expand the root file system, +and free space must be available immediately after the root partition. +It is normally used on images that have a single file system. The script requires that -.Pa awk -be present and on the path. +.Xr awk 1 +be present and in the path. This usually means that .Pa /usr -should be mounted prior to running the script. +must be available prior to running the script. .Sh FILES -.Pa /etc/rc.conf +.Bl -tag -compact -width Pa +.It Pa /etc/fstab +.It Pa /etc/rc.conf +.El .Sh EXIT STATUS .Ex -std +.Sh SEE ALSO +.Xr fstab 5 , +.Xr rc.conf 5 , +.Xr growfs 8 , +.Xr zpool 8 .Sh HISTORY The .Nm manual page first appeared in .Fx 10.1 . -.Sh SEE ALSO -.Xr rc.conf 5 +The ability to add a swap partition was added in +.Fx 13.2 . .Sh AUTHORS The man page and script were written by .An John-Mark Gurney Aq Mt jmg@FreeBSD.org . +The ability to create a swap partition was added by +.An Michael Karels Aq Mt karels@FreeBSD.org . diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index f33cf5ac62cc..1c69b911f53b 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -25,130 +28,310 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)hier.7 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" -.Dd August 4, 2022 +.Dd October 10, 2024 .Dt HIER 7 .Os .Sh NAME .Nm hier -.Nd layout of file systems +.Nd index of +.Fx +file system hierarchy .Sh DESCRIPTION -A sketch of the file system hierarchy. .Bl -tag -width "/libexec/" .It Pa / root directory of the file system +.It Pa /COPYRIGHT +.Fx +copyright information .It Pa /bin/ -user utilities fundamental to both single-user and multi-user environments +fundamental +.Bx +user utilities; see +.Xr intro 1 .It Pa /boot/ -programs and configuration files used during operating system bootstrap +programs and configurations used during +.Fx +.Xr boot 8 .Pp -.Bl -tag -width "defaults/" -compact +.Bl -tag -width "loader.conf.d/" -compact .It Pa defaults/ -default bootstrapping configuration files; see +default boot configuration files; see .Xr loader.conf 5 +.It Pa device.hints +kernel variables for controlling drivers; see +.Xr device.hints 5 .It Pa dtb/ -Compiled flattened device tree (FDT) files; see +compiled flattened device tree (FDT) files; see .Xr fdt 4 and .Xr dtc 1 +.Pp +.Bl -tag -width "overlays/" -compact +.It Pa overlays/ +compiled +.Xr fdt 4 +overlays; see +.Va fdt_overlays +in +.Xr loader.conf 5 +.El +.Pp .It Pa efi/ -Mount point for EFI System Partition (ESP) on UEFI systems +the +.Xr uefi 8 +EFI System Partition (ESP) mount point .It Pa firmware/ -loadable kernel modules containing binary firmware for hardware that needs -firmware downloaded to it to function +loadable binary firmware kernel modules +.It Pa fonts/ +binary bitmap console fonts; see +.Xr loader.conf 5 +and +.Xr vtfontcvt 8 +.It Pa images/ +beastie boot menu images; see +.Xr loader_lua 8 .It Pa kernel/ -pure kernel executable (the operating system loaded into memory -at boot time) and kernel modules +.Fx +kernel and modules; see +.Xr kldstat 8 +.It Pa kernel.old/ +alternative kernel and modules +.It Pa loader.conf +boot loader configuration; see +.Xr loader.conf 5 +.It Pa loader.conf.d/ +.Xr loader.conf 5 +configuration files +.It Pa lua/ +scripts for the Lua boot loader; see +.Xr loader_lua 8 .It Pa modules/ -third-party loadable kernel modules, such as the ones installed from +third-party loadable kernel modules, such as those installed with +.Xr pkg 8 +or from .Xr ports 7 -.It Pa overlays/ -Compiled flattened device tree (FDT) overlays; see -.Xr fdt 4 -and -.Xr dtc 1 .It Pa zfs/ -.Xr zfs 8 -zpool cache files +ZFS +.Xr zpool 8 +cache files .El -.It Pa /cdrom/ -default mount point for CD-ROM drives .It Pa /compat/ -normally a link to -.Pa /usr/compat . -If not, then the -.Pa /usr/compat -comments apply -.It Pa /dev/ -device special files managed by -.Xr devfs 5 +files supporting binary compatibility with other operating systems .Pp -.Bl -tag -width "defaults/" -compact +.Bl -tag -width "loader.conf.d" -compact +.It Pa linux/ +default location for +.Xr linux 4 +compatibility run-time +.El +.It Pa /dev/ +device nodes and special files; see +.Xr intro 4 +and +.Xr devfs 4 +.Pp +.Bl -tag -width "loader.conf.d" -compact +.It Pa ada0 +first ATA storage device +.It Pa ada0p1 +first partition on ada0 +.It Pa cd0 +first optical drive +.It Pa cuaU0 +first USB serial port; see +.Xr cu 1 +.It Pa da0 +first SCSI storage device +.It Pa da0s1 +first partition on da0 +.It Pa dri/ +GPU character device nodes; see +.Xr drm 7 +.It Pa drm/ +GPU +.Xr drm 7 +special files .It Pa fd/ -file descriptor files; -see -.Xr \&fd 4 +file descriptor files; see +.Xr fd 4 +.It Pa fd0 +first floppy drive +.It Pa gpt/ +storage partitions by GPT label +.It Pa mmcsd0 +first SD storage device +.It Pa mmcsd0s1 +first partition on mmcsd0 +.It Pa nda0 +first NVMe storage device attached via +.Xr cam 3 +.It Pa null +infinite loop that accepts anything and contains nothing +.It Pa nvd0 +first NVMe storage device using NVMe namespaces +.It Pa pts/ +pseudo-terminals; see +.Xr pts 4 +.It Pa random +source of weak randomness; see +.Xr random 4 +.It Pa sa0 +first tape drive +.It Pa usb/ +USB busses +.It Pa vmm/ +active +.Xr bhyve 8 +virtual machines +.It Pa zvol/ +.Xr zfs 8 +volumes .El +.It Pa /entropy +provides initial state to RNG; see +.Xr save-entropy 8 .It Pa /etc/ -system configuration files and scripts -.Pp -.Bl -tag -width "defaults/" -compact -.It Pa defaults/ -default system configuration files; -see -.Xr rc 8 +base system configuration files and scripts; see +.Xr intro 5 +.Pp +.Bl -tag -width "freebsd-update.conf" -compact +.It Pa auto_master +autofs +.Xr automount 8 +configuration .It Pa bluetooth/ bluetooth configuration files +.It Pa cron.d/ +tables for driving scheduled tasks; see +.Xr crontab 5 +.It Pa crontab +root's cron table +.It Pa defaults/ +default system configuration files; see +.Xr rc 8 +.It Pa devd/ +configuration for +.Xr devd 8 , +the device state change daemon +.It Pa devfs.conf +boot time device configuration +.It Pa dma/ +configuration for +.Xr dma 8 +.It Pa freebsd-update.conf +configuration for the base system updater; see +.Xr freebsd-update 8 +.It Pa fstab +static filesystem configuration; see +.Xr fstab 5 +.It Pa hosts +database of local hosts if no network name server is running +.It Pa inetd.conf +configuration for +.Bx +heritage internet servers; see +.Xr inetd 8 .It Pa localtime -local timezone information; -see +local timezone information; see .Xr ctime 3 +.It Pa jail.conf.d/ +.Xr jail 8 +startup scripts +.It Pa login.conf +login class capability database; see +.Xr login.conf 5 +.It Pa machine-id +defines the UUID for the local system, required for dbus .It Pa mail/ -Sendmail control files +.Xr sendmail 8 +control files +.Pp +.Bl -tag -width "mailer.conf" -compact +.It Pa aliases +addresses to deliver system mail +.It Pa mailer.conf +.Xr mailwrapper 8 +configuration +.El +.Pp +.It Pa motd.template +message displayed upon tty login; see +.Xr motd 5 .It Pa mtree/ -mtree configuration files; -see +system mapper specification; see .Xr mtree 8 +.It Pa newsyslog.conf.d/ +log rotation configuration files. +.It Pa ntp/ +stored time for the Network Time Protocol +.It Pa ntp.conf +configuration for the NTP client, +.Xr ntpd 8 .It Pa pam.d/ -configuration files for the Pluggable Authentication Modules (PAM) -library +configuration files for the Pluggable Authentication Modules (PAM) library; +see +.Xr pam 3 .It Pa periodic/ -scripts that are run daily, weekly, and monthly, via +scripts that are run daily, weekly, or monthly by .Xr cron 8 ; see .Xr periodic 8 +.It Pa pf.conf +configuration for the Packet Filter firewall; see +.Xr pf 4 +.It Pa pkg/ +default configuration for the package manager, +.Xr pkg 8 +.It Pa ppp/ +PPP configuration files; see +.Xr ppp 8 +.It Pa rc.conf +system and daemon configuration; see +.Xr rc.conf 5 .It Pa rc.d/ -system and daemon startup/control scripts; -see +system and daemon startup/control scripts; see .Xr rc 8 +.It Pa resolv.conf +DNS configuration; see +.Xr resolv.conf 5 +.It Pa resolvconf.conf +DNS configuration manager configuration, often generated by +local-unbound; see +.Xr local-unbound 8 +or +.Xr resolvconf 8 .It Pa security/ -OpenBSM audit configuration files; -see +OpenBSM audit configuration files; see .Xr audit 8 -.It Pa ppp/ -ppp configuration files; -see -.Xr ppp 8 .It Pa ssh/ -OpenSSH configuration files; -see +OpenSSH configuration files; see .Xr ssh 1 .It Pa ssl/ OpenSSL configuration files -.El +.It Pa sysctl.conf +kernel state defaults; see +.Xr sysctl.conf 5 +.It Pa syslog.conf +system log configuration +.It Pa ttys +tty creation configuration; see +.Xr getty 8 +.It Pa wpa_supplicant.conf +client wifi configuration; see +.Xr wpa_supplicant.conf 5 +.El +.It Pa /home/ +home directories for users; the typical home for an interactive user +.Va beastie +would be +.Pa /home/beastie/ .It Pa /lib/ -critical system libraries needed for binaries in +system libraries critical to binaries in .Pa /bin and .Pa /sbin .Pp -.Bl -tag -width "defaults/" -compact -.It Pa casper/ -service-specific -.Xr libcasper 3 -Capsicum support libraries +.Bl -tag -width "nvmecontrol/" -compact .It Pa geom/ class-specific libraries for the .Xr geom 8 @@ -159,53 +342,55 @@ vendor-specific libraries to extend the utility .El .It Pa /libexec/ -critical system utilities needed for binaries in +system utilities critical to binaries in .Pa /bin and .Pa /sbin .It Pa /media/ -contains subdirectories to be used as mount points -for removable media such as CDs, USB drives, and -floppy disks +mount points for removable storage media such as CDs, DVDs, +and USB drives; see +.Xr automount 8 , +or +.Xr bsdisks 8 +if a using a desktop environment from +.Xr ports 7 .It Pa /mnt/ empty directory commonly used by system administrators as a temporary mount point .It Pa /net/ -automounted NFS shares; -see +automounted NFS shares; see .Xr auto_master 5 .It Pa /nonexistent/ a non-existent directory; -by convention, it serves as a home directory -for special user accounts -that need no home directory; -see also +by convention, it serves as a home directory for user accounts +that need no home directory; see also .Pa /var/empty/ .It Pa /proc/ -process file system; -see -.Xr procfs 5 +process file system; see +.Xr procfs 4 .It Pa /rescue/ -statically linked programs for emergency recovery; -see +statically linked programs for emergency recovery; see .Xr rescue 8 .It Pa /root/ -root's HOME directory +home directory of the root user .It Pa /sbin/ -system programs and administration utilities -fundamental to both single-user and multi-user environments +fundamental +.Bx +system administration utilities; see +.Xr intro 8 .It Pa /tmp/ -temporary files that are not guaranteed to persist across system reboots +temporary files commonly removed between system reboots; +see +.Va clear_tmp_enable +in +.Xr rc.conf 5 .It Pa /usr/ contains the majority of user utilities and applications .Pp .Bl -tag -width "freebsd-dist/" -compact .It Pa bin/ -common utilities, programming tools, and applications -.It Pa compat/ -files needed to support binary compatibility with other operating systems; -see -.Xr linux 4 +common utilities, programming tools, and applications; see +.Xr intro 1 .It Pa freebsd-dist/ distribution files .Pq like base.txz ; @@ -214,302 +399,180 @@ see and .Xr bsdinstall 8 .It Pa include/ -standard C include files -.Pp -.Bl -tag -width "kerberos5/" -compact -.It Pa arpa/ -C include files for Internet service protocols -.It Pa bsnmp/ -C include files for the SNMP daemon -.It Pa c++/ -C++ include files -.It Pa cam/ -C include files for the Common Access Methods Layer -.Bl -tag -width "kerberos5/" -compact -.It Pa scsi/ -SCSI device on top of CAM -.El -.It Pa dev/ -C include files for programming various -.Fx -devices -.Bl -tag -width "kerberos5/" -compact -.It Pa ic/ -various header files describing driver- and bus-independent -hardware circuits -.It Pa ofw/ -Open Firmware support -.It Pa pbio/ -8255 PPI cards; -see -.Xr pbio 4 -.It Pa ppbus/ -parallel port bus; -see -.Xr ppbus 4 -.It Pa usb/ -USB subsystem -.El -.It Pa fs/ -.Bl -tag -width "kerberos5/" -compact -.It Pa fdescfs/ -per-process file descriptors file system -.It Pa msdosfs/ -MS-DOS file system -.It Pa nfs/ -C include files for NFS (Network File System) version 2, 3 and 4 -.It Pa nullfs/ -loopback file system -.It Pa procfs/ -process file system -.It Pa smbfs/ -SMB/CIFS file system -.It Pa udf/ -UDF file system -.It Pa unionfs -union file system -.El -.It Pa geom/ -GEOM framework -.Bl -tag -width "kerberos5/" -compact -.It Pa concat/ -CONCAT GEOM class -.It Pa gate/ -GATE GEOM class -.It Pa mirror/ -MIRROR GEOM class -.It Pa nop/ -NOP GEOM class -.It Pa raid3/ -RAID3 GEOM class -.It Pa stripe/ -STRIPE GEOM class -.El -.It Pa libmilter/ -C include files for libmilter, -the -.Xr sendmail 8 -mail filter API -.It Pa machine/ -machine-specific C include files -.It Pa net/ -miscellaneous network C include files -.Bl -tag -width Fl -compact -.It Pa altq/ -C include files for alternate packet queueing; see -.Xr altq 4 -.El -.It Pa net80211/ -C include files for 802.11 wireless networking; -see -.Xr net80211 4 -.It Pa netinet/ -C include files for Internet standard protocols; -see -.Xr inet 4 -.It Pa netinet6/ -C include files for Internet protocol version 6; -see -.Xr inet6 4 -.It Pa netipsec/ -kernel key-management service; -see -.Xr ipsec 4 -.It Pa netsmb/ -SMB/CIFS requester -.It Pa nfs/ -C include files for NFS (Network File System) version 2 and 3 (legacy) -.It Pa openssl/ -OpenSSL (Cryptography/SSL toolkit) headers -.It Pa protocols/ -C include files for Berkeley service protocols -.It Pa rpc/ -remote procedure calls; -see -.Xr rpc 3 -.It Pa rpcsvc/ -definition of RPC service structures; see -.Xr rpc 3 -.It Pa security/ -PAM; see -.Xr pam 8 -.It Pa sys/ -system C include files (kernel data structures) -.\" .It Pa tcl/ -.\" Tcl language; -.\" see -.\" .Xr Tcl n -.\" .Bl -tag -width "kerberos5/" -compact -.\" .It Pa generic/ -.\" ??? -.\" .It Pa unix/ -.\" ??? -.\" .El -.It Pa ufs/ -C include files for UFS (The U-word File System) -.Bl -tag -width "kerberos5/" -compact -.It Pa ffs/ -Fast file system -.It Pa ufs/ -UFS file system -.El -.It Pa vm/ -virtual memory; -see -.Xr vmstat 8 -.El -.Pp +standard C include header files .It Pa lib/ -shared and archive +shared and .Xr ar 1 Ns -type -libraries +libraries; see +.Xr intro 3 .Pp .Bl -tag -width Fl -compact +.It Pa clang/ +shared libraries for the system compiler, +.Xr clang 1 .It Pa compat/ shared libraries for compatibility .It Pa debug/ standalone debug data for the kernel and base system libraries and binaries .It Pa dtrace/ -DTrace library scripts +.Xr dtrace 1 +library scripts .It Pa engines/ -OpenSSL (Cryptography/SSL toolkit) dynamically loadable engines +OpenSSL +.Pq Cryptography/SSL toolkit +dynamically loadable engines +.It Pa flua/ +.Fx +Lua shared libraries +.It Pa i18n/ +shared libraries for internationalization .El .Pp +.It Pa lib32/ +32-bit compatibility libraries .It Pa libdata/ miscellaneous utility data files .Pp .Bl -tag -width Fl -compact -.It Pa gcc/ -.Xr gcc 1 -configuration data .It Pa ldscripts/ -linker scripts; -see +linker scripts; see .Xr ld 1 .It Pa pkgconfig/ -pc files +collections of compiler and linker flags for the +.Xr pkgconf 1 +development tool .El .Pp .It Pa libexec/ -system daemons & system utilities (executed by other programs) +system daemons and utilities executed by programs .Pp -.Bl -tag -width Fl -compact -.It Pa aout/ -utilities to manipulate a.out executables -.It Pa elf/ -utilities to manipulate ELF executables +.Bl -tag -width "bsdinstall/" -compact +.It Pa bsdconfig/ +utilities called by the ncurses +.Fx +configuration wizard +.It Pa bsdinstall/ +utilities for +.Xr bsdinstall 8 +.It Pa dwatch/ +profiles for +.Xr dwatch 1 +.It Pa fwget/ +utilities called by +.Xr fwget 8 +.It Pa hyperv/ +scripts for communicating with the Hyper-V hypervisor .It Pa lpr/ -utilities and filters for LP print system; -see +utilities and filters for the line printer system; see .Xr lpr 1 .It Pa sendmail/ the .Xr sendmail 8 -binary; -see +binary; see .Xr mailwrapper 8 .It Pa sm.bin/ restricted shell for .Xr sendmail 8 ; see .Xr smrsh 8 +.It Pa zfs/ +Z file system utilities .El .Pp .It Pa local/ -local executables, libraries, etc. -Also used as the default destination for the +local executables, libraries, etc, installed by +.Xr pkg 7 +or .Xr ports 7 -framework. -Within -.Pa local/ , -the general layout sketched out by -.Nm -for -.Pa /usr -should be used. -Exceptions are the -ports documentation -.Po in -.Pa share/doc/<port>/ Ns Pc , -and -.Pa /usr/local/etc -.Po mimics -.Pa /etc Ns Pc . +.Pp +.Bl -tag -width Fl -compact +.It Pa bin/ +local user utilities, see +.Xr intro 1 +.It Pa etc/ +local program configurations +.It Pa include/ +local library headers +.It Pa lib/ +local libraries +.It Pa lib32/ +local 32-bit compatability libraries +.It Pa libdata/ +local utility data files +.It Pa libexec/ +utilities executed by local utilities +.It Pa sbin/ +local administration utilities +.It Pa share/ +local architecture-independent files +.It Pa share/doc/ +local documentation +.It Pa share/doc/freebsd/ +articles, books, FAQ, and handbooks available from the +.Fx +project +.It Pa share/man/ +local manual pages; see +.Xr man 1 +.El +.Pp .It Pa obj/ architecture-specific target tree produced by building .Fx -from source; -see +from source; see .Xr build 7 .It Pa ports/ .Fx ports collection; see .Xr ports 7 .It Pa sbin/ -system daemons & system utilities (executed by users) +system daemons and utilities meant for user execution; see +.Xr intro 8 .It Pa share/ architecture-independent files .Pp .Bl -tag -width Fl -compact +.It Pa atf/ +scripts for the Automated Testing Framework; see +.Xr ATF 7 +.It Pa bhyve/ +.Xr bhyve 8 +keyboard mappings .It Pa calendar/ -a variety of pre-fab calendar files; -see +system-wide calendar files; see .Xr calendar 1 +.It Pa certs/ +TLS certificates for +.Xr openssl 1 .It Pa dict/ -word lists; -see +word lists; see .Xr look 1 +.Pp .Bl -tag -width Fl -compact .It Pa freebsd .Fx Ns -specific terms, proper names, and jargon .It Pa web2 -words from Webster's 2nd International +words from Webster's Second International .El +.Pp .It Pa doc/ -miscellaneous documentation; -source for most of the printed -.Bx -manuals (available -from the -.Tn USENIX -association) -.Bl -tag -width Fl -compact -.It Pa FAQ/ -Frequently Asked Questions -.It Pa IPv6/ -implementation notes for IPv6 -.It Pa es/ -Spanish translations of documents in /usr/share/doc -.It Pa handbook/ -.Fx -Handbook -.It Pa ja/ -Japanese translations of documents in /usr/share/doc -.It Pa legal/ -License files for vendor supplied firmware files -.It Pa ncurses/ -HTML documents pertaining to ncurses; -see -.Xr ncurses 3 -.It Pa ntp/ -HTML documents pertaining to the Network Time Protocol -.It Pa ru/ -Russian translations of documents in /usr/share/doc -.It Pa tutorials/ -.Fx -tutorials -.It Pa zh/ -Chinese translations of documents in /usr/share/doc -.El +miscellaneous documentation +.It Pa dtrace/ +scripts for the Dynamic Tracing Compiler; see +.Xr dtrace 1 .It Pa examples/ various examples for users and programmers .It Pa firmware/ firmware images loaded by userland programs .It Pa games/ -ASCII text files used by various games +ASCII text files used by +.Bx +heritage games, see +.Xr intro 6 .It Pa keys/ known trusted and revoked keys +.Pp .Bl -tag -width Fl -compact .It Pa pkg/ fingerprints for @@ -517,25 +580,31 @@ fingerprints for and .Xr pkg 8 .El +.Pp .It Pa locale/ -localization files; -see +localization files; see .Xr setlocale 3 .It Pa man/ -manual pages +system manual pages; see +.Xr man 1 .It Pa misc/ -miscellaneous system-wide ASCII text files +miscellaneous system-wide files +.Pp .Bl -tag -width Fl -compact -.It Pa fonts/ -??? +.It Pa ascii +chart of the ASCII codepoints +.It Pa flowers +the meanings of flowers +.It Pa magic +magic numbers used by +.Xr file 1 .It Pa termcap -terminal characteristics database; -see +terminal characteristics database; see .Xr termcap 5 .El +.Pp .It Pa mk/ -templates for make; -see +templates for make; see .Xr make 1 .It Pa nls/ national language support files @@ -551,259 +620,149 @@ example (dot) files for new accounts .It Pa snmp/ MIBs, example files and tree definitions for the SNMP daemon +.Pp .Bl -tag -width Fl -compact .It Pa defs/ tree definition files for use with .Xr gensnmptree 1 .It Pa mibs/ -MIB files +management Information Base +.Pq MIB +files .El +.Pp .It Pa syscons/ -files used by syscons; -see .Xr syscons 4 +files +.Pp .Bl -tag -width Fl -compact .It Pa fonts/ -console fonts; -see +console fonts; see .Xr vidcontrol 1 and .Xr vidfont 1 .It Pa keymaps/ -console keyboard maps; -see +console keyboard maps; see .Xr kbdcontrol 1 and .Xr kbdmap 1 .It Pa scrnmaps/ console screen maps .El +.Pp .It Pa sysroot/ files necessary for the -sysroot compiler/linker argument to build non-native -binaries. -.Bl -tag -width Fl -compact +binaries +.Pp +.Bl -tag -width "VERSION/" -compact .It Pa VERSION/ files for .Fx -release VERSION. -By convention, +release VERSION; +by convention, .Dq VERSION matches .Xr uname 1 -.Fl r . -.Bl -tag -width Fl -compact -.It Pa MACHINE.MACHINE_ARCH/ -represent the binary ABI for these files. +.Fl r +.It Pa VERSION/MACHINE.MACHINE_ARCH/ +represent the binary ABI for these files; .Dq MACHINE matches .Xr uname 1 -.Fl m . +.Fl m ; .Dq MACHINE_ARCH matches .Xr uname 1 -.Fl p . -.El +.Fl p .El +.Pp .It Pa tabset/ tab description files for a variety of terminals; used in -the termcap file; -see +the termcap file; see .Xr termcap 5 .It Pa vi/ -localization support and utilities for +localization support and utilities for the .Xr vi 1 +editor .It Pa vt/ -files used by vt; -see +files used by the system console; see .Xr vt 4 +.Pp .Bl -tag -width Fl -compact .It Pa fonts/ -console fonts; -see -.Xr vidcontrol 1 +console fonts; see +.Xr vidcontrol 1 , +.Xr vidfont 1 , and -.Xr vidfont 1 +.Xr vtfontcvt 8 .It Pa keymaps/ -console keyboard maps; -see +console keyboard maps; see .Xr kbdcontrol 1 and .Xr kbdmap 1 -.\" .It Pa scrnmaps/ -.\" console screen maps .El +.Pp .It Pa zoneinfo/ -timezone configuration information; -see +timezone configuration information; see .Xr tzfile 5 .El .Pp .It Pa src/ .Fx source code; see -.Xr development 7 -.Pp -.Bl -tag -width "kerberos5/" -compact -.It Pa bin/ -source code for files in /bin -.It Pa cddl/ -utilities covered by the Common Development and Distribution License -.It Pa contrib/ -source code for contributed software -.It Pa crypto/ -source code for contributed cryptography software -.It Pa etc/ -source code for files in -.Pa /etc -.It Pa gnu/ -utilities covered by the GNU General Public License -.It Pa include/ -source code for files in -.Pa /usr/include -.It Pa kerberos5/ -build infrastructure for Kerberos version 5 -.It Pa lib/ -source code for files in -.Pa /lib -and -.Pa /usr/lib -.It Pa libexec/ -source code for files in -.Pa /usr/libexec -.It Pa release/ -files required to produce a -.Fx -release -.It Pa rescue/ -source code for files in -.Pa /rescue -.It Pa sbin/ -source code for files in -.Pa /sbin -.It Pa secure/ -build directory for files in -.Pa /usr/src/crypto -.It Pa share/ -source for files in -.Pa /usr/share -.It Pa stand/ -boot loader source code -.It Pa sys/ -kernel source code -.Bl -tag -width Fl -compact -.It Pa amd64/ -AMD64 architecture support -.It Pa arm/ -ARM architecture support -.It Pa arm64/ -ARMv8 architecture support -.It Pa cam/ -.Xr cam 4 -and -.Xr ctl 4 -.It Pa cddl/ -CDDL-licensed optional sources, including ZFS -and DTrace -.It Pa ddb/ -.Xr ddb 4 -.It Pa fs/ -most filesystems -.It Pa dev/ -device drivers -.It Pa geom/ -.Xr geom 4 -.It Pa i386/ -i386 (32 bit) architecture support -.It Pa kern/ -main part of the kernel -.It Pa net80211/ -.Xr net80211 4 -.It Pa netgraph/ -.Xr netgraph 4 -.It Pa netinet/ -.Xr inet 4 -.It Pa netinet6/ -.Xr inet6 4 -.It Pa netipsec/ -.Xr ipsec 4 -.It Pa netpfil/ -.Xr ipfw 4 -and -.Xr pf 4 -.It Pa opencrypto/ -.Xr crypto 7 -.It Pa powerpc/ -PowerPC/POWER architecture support -.It Pa riscv/ -RISC-V architecture support -.It Pa security/ -.Xr audit 4 -and -.Xr mac 4 -.It Pa sys/ -kernel headers -.It Pa ufs/ -Unix File System -.It Pa x86/ -code shared by AMD64 and i386 architectures -.El -.It Pa targets/ -support for experimental DIRDEPS_BUILD -.It Pa tests/ -source code for files in -.Pa /usr/tests -.It Pa tools/ -tools used for maintenance and testing of -.Fx -.It Pa usr.bin/ -source code for files in -.Pa /usr/bin -.It Pa usr.sbin/ -source code for files in -.Pa /usr/sbin -.El +.Xr development 7 ; +the layout of the source tree is described by the top-level +.Pa README.md +file .Pp .It Pa tests/ -The +the .Fx test suite; see .Xr tests 7 .El .It Pa /var/ -multi-purpose log, temporary, transient, and spool files +log, temporary, transient, and spool files .Pp -.Bl -tag -width "defaults/" -compact +.Bl -tag -width "preserve/" -compact .It Pa account/ system accounting files .Pp -.Bl -tag -width Fl -compact +.Bl -tag -width Ds -compact .It Pa acct -execution accounting file; -see +execution accounting file; see .Xr acct 5 .El .Pp .It Pa at/ -timed command scheduling files; -see -.Xr \&at 1 +timed command scheduling files; see +.Xr at 1 .Pp -.Bl -tag -width Fl -compact +.Bl -tag -width Ds -compact .It Pa jobs/ -directory containing job files +job files .It Pa spool/ -directory containing output spool files +output spool files .El .Pp +.It Pa audit/ +security event audit trail files; see +.Xr audit 8 +.It Pa authpf/ +user shell sessions for authenticating gateways; see +.Xr authpf 8 .It Pa backups/ -miscellaneous backup files +critical system configuration backups .It Pa cache/ -miscellaneous cached files +miscellaneous cache files .Pp -.Bl -tag -width Fl -compact +.Bl -tag -width Ds -compact .It Pa pkg/ cached packages for .Xr pkg 8 +.It Pa cups/ +cached printers for the Common Unix Prinitng system; see +.Xr cups 1 .El .Pp .It Pa crash/ @@ -812,66 +771,130 @@ default directory to store kernel crash dumps; see and .Xr savecore 8 .It Pa cron/ -files used by cron; -see +files used by cron; see .Xr cron 8 .Pp -.Bl -tag -width Fl -compact +.Bl -tag -width Ds -compact .It Pa tabs/ -crontab files; -see +crontab files; see .Xr crontab 5 .El .Pp .It Pa db/ -miscellaneous automatically generated system-specific database files -.Bl -tag -width Fl -compact +autogenerated system-specific database files +.Pp +.Bl -tag -width "freebsd-update/" -compact +.It Pa etcupdate/ +temporary files and log for +.Xr etcupdate 8 .It Pa freebsd-update/ +downloads and temporary files for .Xr freebsd-update 8 -work directory for temporary files and downloaded updates +.It Pa pkg/ +package database .El +.Pp .It Pa empty/ -empty directory for use by programs that need a specifically empty directory. -Used for instance by +for use by programs that require an empty directory, +used for instance by .Xr sshd 8 for privilege separation .It Pa games/ -miscellaneous game status and score files +status and score files for +.Bx +heritage games .It Pa heimdal/ Kerberos server databases; see .Xr kdc 8 +.It Pa lib/ +state information for ported Linux applications .It Pa log/ -miscellaneous system log files -.Pp -.Bl -tag -width Fl -compact -.It Pa utx.lastlogin -last login log; +system log files +.Pp +.Bl -tag -width "bsdinstall_log" -compact +.It Pa Xorg.0.log +.Xr Xserver 1 +log, if +.Xr X 7 +is installed rotates to +.Pa Xorg.0.log.old +.It Pa aculog +serial line access log; see +.Xr cu 1 +.It Pa auth.log +system authentication log +.It Pa bsdinstall_log +system installation log +.It Pa cron +scheduled task log; see +.Xr cron 8 +.It Pa cups/ +logs for +.Xr cups 1 +.It Pa daemon.log +default log for system daemons +.It Pa devd.log +default log for device state change daemon +.It Pa dmesg.today +system message buffer log, rotates to +.Pa dmesg.yesterday +.It Pa debug.log +undiscarded debug syslog messages +.It Pa lpd-errs +logs for the line printer spooler daemon; see +.Xr lpd 8 +.It Pa maillog +.Xr sendmail 8 +log, rotates and compresses to maillog.0.bz2 +.It Pa messages +general system log; see +.Xr syslogd 8 +.It Pa mount.today +currently loaded +.Xr fstab 5 , +rotates to +.Pa mount.yesterday +.It Pa pf.today +packet filter firewall log; see +.Xr pf 4 +.It Pa pflog +saved packets caught by +.Xr pflogd 8 +.It Pa ppp.log see +.Xr ppp 8 +.It Pa security +transcript of events marked with the security flag +.It Pa setuid.today +listing of executable files which run with elevated permissions, rotates +to +.Pa setuid.yesterday +.It Pa userlog +logs changes in users or groups +.It Pa utx.lastlogin +last login log; see .Xr getutxent 3 .It Pa utx.log -login/logout log; -see +login/logout log; see .Xr getutxent 3 +.It Pa xferlog +default log for +.Xr ftpd 8 .El .Pp .It Pa mail/ user mailbox files .It Pa msgs/ -system messages database; -see +system messages database; see .Xr msgs 1 .It Pa preserve/ -temporary home of files preserved after an accidental death -of an editor; -see -.Xr \&ex 1 +unused, present for historical reasons .It Pa quotas/ -file system quota information files +UFS quota information files .It Pa run/ -system information files describing various info about -system since it was booted +files containing information about the operating system since it was booted .Pp -.Bl -tag -width Fl -compact +.Bl -tag -width "wpa_supplicant/" -compact .It Pa bhyve/ .Xr bhyve 8 virtual machine @@ -882,46 +905,61 @@ writable by the group for command connection sockets; see .Xr ppp 8 .It Pa utx.active -database of current users; -see +database of current users; see .Xr getutxent 3 +.It Pa wpa_supplicant/ +IEEE Std. 802.11 wifi run time files .El .Pp .It Pa rwho/ -rwho data files; -see +information about other systems on the local network; see .Xr rwhod 8 , .Xr rwho 1 , and .Xr ruptime 1 .It Pa spool/ -miscellaneous printer and mail system spooling directories +printer and mail system spooling directories .Pp -.Bl -tag -width Fl -compact +.Bl -tag -width "clientmqueue/" -compact .It Pa clientmqueue/ -undelivered submission mail queue; -see +undelivered submission mail queue; see .Xr sendmail 8 +.It Pa cups/ +print jobs and temporary files for +.Xr cups 1 +.It Pa dma/ +undelivered mail queue for +.Dx +Mail Agent; see +.Xr dma 8 +.It Pa lock/ +serial device locks; see +.Xr uucplock 3 +.It Pa lpd/ +line printer spooler daemon spool .It Pa ftp/ -ftp root directory; -see +ftp root directory; see .Xr ftpd 8 .It Pa mqueue/ -undelivered mail queue; -see +undelivered mail queue for .Xr sendmail 8 .It Pa output/ line printer spooling directories .El .Pp .It Pa tmp/ -temporary files that are kept between system reboots +temporary files not removed between system reboots .Pp -.Bl -tag -width Fl -compact +.Bl -tag -width "vi.recover/" -compact .It Pa vi.recover/ -the directory where recovery files are stored +recovery files for the +.Xr vi 1 +editor .El .Pp +.It Pa unbound/ +files and configuration for +.Xr unbound 8 .It Pa yp/ the NIS maps; see .Xr yp 8 @@ -930,8 +968,8 @@ the NIS maps; see .Sh NOTES This manual page documents the default .Fx -file system layout, but -the actual hierarchy on a given system is defined at the system +file system layout. +The actual hierarchy on a given system is defined at the system administrator's discretion. A well-maintained installation will include a customized version of this document. @@ -945,5 +983,5 @@ this document. .Sh HISTORY A .Nm -manual page appeared in +manual page first appeared in 1979 with .At v7 . diff --git a/share/man/man7/hostname.7 b/share/man/man7/hostname.7 index ac00bd9c8818..2c15fb6f47b8 100644 --- a/share/man/man7/hostname.7 +++ b/share/man/man7/hostname.7 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)hostname.7 8.2 (Berkeley) 12/30/93 -.\" $FreeBSD$ -.\" .Dd December 25, 2013 .Dt HOSTNAME 7 .Os diff --git a/share/man/man7/intro.7 b/share/man/man7/intro.7 index 76385eca7144..d889c2dd299f 100644 --- a/share/man/man7/intro.7 +++ b/share/man/man7/intro.7 @@ -25,10 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)intro.7 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" -.Dd November 19, 2020 +.Dd June 23, 2025 .Dt INTRO 7 .Os .Sh NAME @@ -57,9 +54,6 @@ development introduction to .Fx .It Xr environ 7 user environment -.It Xr ffs 7 -commonly used filesystem in -.Fx .It Xr firewall 7 simple firewalls under .Fx @@ -68,6 +62,8 @@ file system hierarchy in .Fx .It Xr hostname 7 host name resolution description +.It Xr networking 7 +network connection quickstart guide .It Xr release 7 layout of .Fx @@ -85,6 +81,8 @@ statistics utilities available in introduction to the .Fx Test Suite +.It Xr tracing 7 +introduction to tracing and performance monitoring facilities .It Xr tuning 7 general advice on tuning .Fx diff --git a/share/man/man7/maclabel.7 b/share/man/man7/maclabel.7 index 0648fb565c9a..5006cc47beb3 100644 --- a/share/man/man7/maclabel.7 +++ b/share/man/man7/maclabel.7 @@ -31,8 +31,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 25, 2002 .Dt MACLABEL 7 .Os diff --git a/share/man/man7/mitigations.7 b/share/man/man7/mitigations.7 new file mode 100644 index 000000000000..c3c6ab55c480 --- /dev/null +++ b/share/man/man7/mitigations.7 @@ -0,0 +1,496 @@ +.\"- +.\" SPDX-License-Identifer: BSD-2-Clause +.\" +.\" Copyright © 2023 The FreeBSD Foundation +.\" +.\" This documentation was written by Ed Maste <emaste@freebsd.org>, and +.\" Olivier Certner <olce.freebsd@certner.fr> at Kumacom SAS, under +.\" sponsorship of the FreeBSD Foundation. +.\" +.\" 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. +.\" +.Dd January 29, 2025 +.Dt MITIGATIONS 7 +.Os +.Sh NAME +.Nm mitigations +.Nd FreeBSD Security Vulnerability Mitigations +.Sh SYNOPSIS +In +.Fx , +various security mitigations are employed to limit the impact of +vulnerabilities and protect the system from malicious attacks. +Some of these mitigations have run-time controls to enable them on a global +or per-process basis, some are optionally enabled or disabled at compile time, +and some are inherent to the implementation and have no controls. +.Pp +The following vulnerability mitigations are covered in this document: +.Pp +.Bl -bullet -compact +.It +Address Space Layout Randomization (ASLR) +.It +Position Independent Executable (PIE) +.It +Write XOR Execute page protection policy +.It +.Dv PROT_MAX +.It +Relocation Read-Only (RELRO) +.It +Bind Now +.It +Stack Overflow Protection +.It +Supervisor Mode Memory Protection +.It +Capsicum +.It +Firmware and Microcode +.It +Architectural Vulnerability Mitigations +.El +.Pp +Please note that the effectiveness and availability of these mitigations may +vary depending on the +.Fx +version and system configuration. +.Sh DESCRIPTION +Security vulnerability mitigations are techniques employed in +.Fx +to limit the potential impact of security vulnerabilities in software and +hardware. +It is essential to understand that mitigations do not directly address the +underlying security issues. +They are not a substitute for secure coding practices. +Mitigations serve as an additional layer of defense, helping to reduce the +likelihood of a successful exploitation of vulnerabilities by making it +more difficult for attackers to achieve their objectives. +.Pp +This manual page describes the security mitigations implemented in +.Fx +to enhance the overall security of the operating system. +Each mitigation is designed to protect against specific types of attacks +and vulnerabilities. +.\" +.Sh SOFTWARE VULNERABILITY MITIGATIONS +.Ss Address Space Layout Randomization (ASLR) +Address Space Layout Randomization (ASLR) is a security mitigation technique +that works by randomizing the memory addresses where system and application +code, data, and libraries are loaded, making it more challenging for attackers +to predict the memory layout and exploit vulnerabilities. +.Pp +ASLR introduces randomness into the memory layout during process execution, +reducing the predictability of memory addresses. +ASLR is intended to make exploitation more difficult in the event that an +attacker discovers a software vulnerability, such as a buffer overflow. +.Pp +ASLR can be enabled on both a global and per-process basis. +Global control is provided by a separate set of +.Xr sysctl 8 +knobs for 32- and 64-bit processes. +It can be or disabled on a per-process basis via +.Xr proccontrol 1 . +Note that an ASLR mode change takes effect upon address space change, +i.e., upon +.Xr execve 2 . +.Pp +Global controls for 32-bit processes: +.Bl -tag -width kern.elf32.aslr.pie_enable +.It Va kern.elf32.aslr.enable +Enable ASLR for 32-bit ELF binaries, other than Position Independent +Executable (PIE) binaries. +.It Va kern.elf32.aslr.pie_enable +Enable ASLR for 32-bit Position Independent Executable (PIE) ELF binaries. +.It Va kern.elf32.aslr.honor_sbrk +Reserve the legacy +.Xr sbrk 2 +region for compatibility with older binaries. +.It Va kern.elf32.aslr.stack +Randomize the stack location for 32-bit ELF binaries. +.El +.Pp +Global controls for 64-bit processes: +.Bl -tag -width kern.elf64.aslr.pie_enable +.It Va kern.elf64.aslr.enable +Enable ASLR for 64-bit ELF binaries, other than Position Independent +Executable (PIE) binaries. +.It Va kern.elf64.aslr.pie_enable +Enable ASLR for 64-bit Position Independent Executable (PIE) ELF binaries. +.It Va kern.elf64.aslr.honor_sbrk +Reserve the legacy +.Xr sbrk 2 +region for compatibility with older binaries. +.It Va kern.elf64.aslr.stack +Randomize the stack location for 64-bit ELF binaries. +.El +.Pp +To execute a command with ASLR enabled or disabled: +.Pp +proccontrol +.Fl m Ar aslr +.Op Fl s Ar enable | disable +.Ar command +.\" +.Ss Position Independent Executable (PIE) +PIE binaries are executable files that do not have a fixed load address. +They can be loaded at an arbitrary memory address by the +.Xr rtld 1 +run-time linker. +With ASLR they are loaded at a random address on each execution. +.\" +.Ss Write XOR Execute page protection policy +Write XOR Execute (W^X) is a vulnerability mitigation strategy that strengthens +the security of the system by controlling memory access permissions. +.Pp +Under the W^X mitigation, memory pages may be writable (W) or executable (E), +but not both at the same time. +This means that code execution is prevented in areas of memory that are +designated as writable, and writing or modification of memory is restricted in +areas marked for execution. +Applications that perform Just In Time (JIT) compilation need to be adapted +to be compatible with W^X. +.Pp +There are separate +.Xr sysctl 8 +knobs to control W^X policy enforcement for 32- and 64-bit processes. +The W^X policy is enabled by setting the appropriate +.Dv allow_wx +sysctl to 0. +.Bl -tag -width kern.elf64.allow_wx +.It Va kern.elf32.allow_wx +Allow 32-bit processes to map pages simultaneously writable and executable. +.It Va kern.elf64.allow_wx +Allow 64-bit processes to map pages simultaneously writable and executable. +.El +.\" +.Ss PROT_MAX +.Dv PROT_MAX +is a +.Fx Ns +-specific extension to +.Xr mmap 2 . +.Dv PROT_MAX +provides the ability to set the maximum protection of a region allocated by +.Xr mmap 2 +and later altered by +.Xr mprotect 2 . +For example, memory allocated originally with an mmap prot argument of +PROT_MAX(PROT_READ | PROT_WRITE) | PROT_READ +may be made writable by a future +.Xr mprotect 2 +call, but may not be made executable. +.\" +.Ss Relocation Read-Only (RELRO) +Relocation Read-Only (RELRO) is a mitigation tool that makes certain portions +of a program's address space that contain ELF metadata read-only, after +relocation processing by +.Xr rtld 1 . +.Pp +When enabled in isolation the RELRO option provides +.Em partial RELRO +support. +In this case the Procedure Linkage Table (PLT)-related part of the +Global Offset Table (GOT) (in the section typically named .got.plt) remains +writable. +.Pp +RELRO is enabled by default. +The +.Xr src.conf 5 +build-time option +.Va WITHOUT_RELRO +may be used to disable it. +.Ss BIND_NOW +The +.Va WITH_BIND_NOW +.Xr src.conf 5 +build-time option causes binaries to be built with the +.Dv DF_BIND_NOW +flag set. +The run-time loader +.Xr rtld 1 +will then perform all relocation processing when the process starts, instead of +on demand (on the first access to each symbol). +.Pp +When enabled in combination with +.Dv RELRO +(which is enabled by default) this provides +.Em full RELRO . +The entire GOT (.got and .got.plt) are made read-only at program startup, +preventing attacks on the relocation table. +Note that this results in a nonstandard Application Binary Interface (ABI), +and it is possible that some applications may not function correctly. +.\" +.Ss Stack Overflow Protection +.Fx +supports stack overflow protection using the Stack Smashing Protector +.Pq SSP +compiler feature. +Stack clash protection is also enabled, +if supported by the compiler for the given architecture. +In userland, SSP adds a per-process randomized canary at the end of every stack +frame which is checked for corruption upon return from the function, +and stack probing in +.Dv PAGE_SIZE +chunks. +In the kernel, a single randomized canary is used globally except on aarch64, +which has a +.Dv PERTHREAD_SSP +.Xr config 8 +option to enable per-thread randomized canaries. +If stack corruption is detected, then the process aborts to avoid potentially +malicious execution as a result of the corruption. +SSP may be enabled or disabled when building +.Fx +base with the +.Xr src.conf 5 +SSP knob. +.Pp +When +.Va WITH_SSP +is enabled, which is the default, world is built with the +.Fl fstack-protector-strong +and +.Fl fstack-clash-protection +compiler options. +The kernel is built with the +.Fl fstack-protector +option. +.Pp +In addition to SSP, a +.Dq FORTIFY_SOURCE +implementation is supported up to level 2 by defining +.Va _FORTIFY_SOURCE +to +.Dv 1 +or +.Dv 2 +before including any +.Fx +headers. +.Fx +world builds can set +.Va FORTIFY_SOURCE +in the environment or +.Pa /etc/src-env.conf +to provide a default value for +.Va _FORTIFY_SOURCE . +When enabled, +.Dq FORTIFY_SOURCE +enables extra bounds checking in various functions that accept buffers to be +written into. +These functions currently have extra bounds checking support: +.Bl -column -offset indent "snprintf()" "memmove()" "strncpy()" "vsnprintf()" "readlink()" +.It Fn bcopy Ta Fn bzero Ta Fn fgets Ta Fn getcwd Ta Fn gets +.It Fn memcpy Ta Fn memmove Ta Fn memset Ta Fn read Ta Fn readlink +.It Fn snprintf Ta Fn sprintf Ta Fn stpcpy Ta Fn stpncpy Ta Fn strcat +.It Fn strcpy Ta Fn strncat Ta Fn strncpy Ta Fn vsnprintf Ta Fn vsprintf +.El +.Pp +.Dq FORTIFY_SOURCE +requires compiler support from +.Xr clang 1 +or +.Xr gcc 1 , +which provide the +.Xr __builtin_object_size 3 +function that is used to determine the bounds of an object. +This feature works best at optimization levels +.Fl O1 +and above, as some object sizes may be less obvious without some data that the +compiler would collect in an optimization pass. +.Pp +Similar to SSP, violating the bounds of an object will cause the program to +abort in an effort to avoid malicious execution. +This effectively provides finer-grained protection than SSP for some class of +function and system calls, along with some protection for buffers allocated as +part of the program data. +.\" +.Ss Supervisor mode memory protection +Certain processors include features that prevent unintended access to memory +pages accessible to userspace (non-privileged) code, while in a privileged +mode. +One feature prevents execution, intended to mitigate exploitation of kernel +vulnerabilities from userland. +Another feature prevents unintended reads from or writes to user space memory +from the kernel. +This also provides effective protection against NULL pointer dereferences from +kernel. +.Bl -column -offset indent "Architecture" "Feature" "Access Type Prevented" +.It Sy Architecture Ta Sy Feature Ta Sy Access Type Prevented +.It amd64 Ta SMAP Ta Read / Write +.It amd64 Ta SMEP Ta Execute +.It arm64 Ta PAN Ta Read / Write +.It arm64 Ta PXN Ta Execute +.It riscv Ta SUM Ta Read / Write +.It riscv Ta - Ta Execute +.El +.Pp +These features are automatically used by the kernel. +There is no user-facing configuration. +.\" +.Ss Capsicum +Capsicum is a lightweight OS capability and sandbox framework. +See +.Xr capsicum 4 +for more information. +.Sh HARDWARE VULNERABILITY MITIGATIONS +.Ss Firmware and Microcode +Recent years have seen an unending stream of new hardware vulnerabilities, +notably CPU ones generally caused by detectable microarchitectural side-effects +of speculative execution which leak private data from some other thread or +process or sometimes even internal CPU state that is normally inaccessible. +Hardware vendors usually address these vulnerabilities as they are discovered by +releasing microcode updates, which may then be bundled into platform firmware +updates +.Pq historically called BIOS updates for PCs +or packages to be updated by the operating system at boot time. +.Pp +Platform firmware updates, if available from the manufacturer, +are the best defense as they provide coverage during early boot. +Install them with +.Pa sysutils/flashrom +from the +.Fx +Ports Collection. +.Pp +If platform firmware updates are no longer available, +packaged microcode is available for installation at +.Pa sysutils/cpu-microcode +and can be loaded at runtime using +.Xr loader.conf 5 , +see the package message for more details. +.Pp +The best defense overall against hardware vulnerabilities is to timely apply +these updates when available, as early as possible in the boot process, +and to disable the affected hardware's problematic functionalities when possible +(e.g., CPU Simultaneous Multi-Threading). +Software mitigations are only partial substitutes for these, but they can be +helpful on out-of-support hardware or as complements for just-discovered +vulnerabilities not yet addressed by vendors. +Some software mitigations depend on hardware capabilities provided by a +microcode update. +.Ss Architectural Vulnerability Mitigations +.Fx Ap s +usual policy is to apply by default all OS-level mitigations that do +not require recompilation, except those the particular hardware it is running on +is known not to be vulnerable to +.Pq which sometimes requires firmware updates , +or those that are extremely detrimental to performance in proportion to the +protection they actually provide. +OS-level mitigations generally can have noticeable performance impacts on +specific workloads. +If your threat model allows it, you may want to try disabling some of them in +order to possibly get better performance. +Conversely, minimizing the risks may require you to explicitly enable the most +expensive ones. +The description of each vulnerability/mitigation indicates whether it is enabled +or disabled by default and under which conditions. +It also lists the knobs to tweak to force a particular status. +.Ss Zenbleed +The +.Dq Zenbleed +vulnerability exclusively affects AMD processors based on the Zen2 +microarchitecture. +In contrast with, e.g., Meltdown and the different variants of Spectre, which +leak data by leaving microarchitectural traces, Zenbleed is a genuine hardware +bug affecting the CPU's architectural state. +With particular sequences of instructions whose last ones are mispredicted by +speculative execution, it is possible to make appear in an XMM register data +previously put in some XMM register by some preceding or concurrent task +executing on the same physical core +.Po disabling Simultaneous Muti-Threading +.Pq SMT +is thus not a sufficient protection +.Pc . +.Pp +According to the vulnerability's discoverer, all Zen2-based processors are +affected +.Po see +.Lk https://lock.cmpxchg8b.com/zenbleed.html +.Pc . +As of August 2023, AMD has not publicly listed any corresponding errata but has +issued a security bulletin +.Pq AMD-SB-7008 +entitled +.Dq Cross-Process Information Leak +indicating that platform firmware fixing the vulnerability will be distributed +to manufacturers no sooner than the end of 2023, except for Rome processors for +which it is already available. +No standalone CPU microcodes have been announced so far. +The only readily-applicable fix mentioned by the discoverer is to set a bit of +an undocumented MSR, which reportedly completely stops XMM register leaks. +.Pp +.Fx +currently sets this bit by default on all Zen2 processors. +In the future, it might set it by default only on those Zen2 processors whose +microcode has not been updated to revisions fixing the vulnerability, once such +microcode updates have been actually released and community-tested. +To this mitigation are associated the following knobs: +.Bl -tag -width indent +.It Va machdep.mitigations.zenbleed.enable +A read-write integer tunable and sysctl indicating whether the mitigation should +be forcibly disabled (0), enabled (1) or if it is left to +.Fx +to selectively apply it (2). +Any other integer value is silently converted to and treated as value 2. +Note that this setting is silently ignored when running on non-Zen2 processors +to ease applying a common configuration to heterogeneous machines. +.It Va machdep.mitigations.zenbleed.state +A read-only string indicating the current mitigation state. +It can be either +.Dq Not applicable , +if the processor is not Zen2-based, +.Dq Mitigation enabled +or +.Dq Mitigation disabled . +This state is automatically updated each time the sysctl +.Va machdep.mitigations.zenbleed.enable +is written to. +Note that it can become inaccurate if the chicken bit is set or cleared +directly via +.Xr cpuctl 4 +.Po which includes the +.Xr cpucontrol 8 +utility +.Pc . +.El +.Pp +The performance impact and threat models related to these mitigations +should be considered when configuring and deploying them in a +.Fx +system. +.Pp +Additional mitigation knobs are listed in the +.Sx KNOBS AND TWEAKS +section of +.Xr security 7 . +.Sh SEE ALSO +.Xr elfctl 1 , +.Xr proccontrol 1 , +.Xr rtld 1 , +.Xr mmap 2 , +.Xr src.conf 5 , +.Xr sysctl.conf 5 , +.Xr security 7 , +.Xr cpucontrol 8 , +.Xr sysctl 8 diff --git a/share/man/man7/networking.7 b/share/man/man7/networking.7 new file mode 100644 index 000000000000..2174577eb6a3 --- /dev/null +++ b/share/man/man7/networking.7 @@ -0,0 +1,93 @@ +.\" +.\" Copyright (c) 2024 Alexander Ziaee. Ohio. +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd March 21, 2025 +.Dt NETWORKING 7 +.Os +.Sh NAME +.Nm networking , +.Nm wifi +.Nd quickstart guide to connecting to a network +.Sh DESCRIPTION +In the following examples, it is assumed that +we are connecting to Ethernet with the first interface found by the +.Xr ix 4 +driver, and Wi-Fi with the first interface found by the +.Xr iwlwifi 4 +driver, though your hardware will vary. +.Sh EXAMPLES +.Bl -tag -width 0n +.It Sy Example 1: Connecting to an Ethernet network with DHCP +.Pp +Ask for a DHCP lease on the first Intel 10Gb Ethernet interface: +.Bd -literal -offset 2n +.Ic # dhclient ix0 +.Ed +.It Sy Example 2: Connecting to a cellular network with USB tethering +.Pp +Ask for a DHCP lease on the first USB tethering interface: +.Bd -literal -offset 2n +.Ic # dhclient ue0 +.Ed +.It Sy Example 3: Connecting to a Wi-Fi network +.Pp +Identify your Wi-Fi hardware: +.Bd -literal -offset 2n +.Ic % sysctl net.wlan.devices +.Ed +.Pp +Create the +.Sy wlan0 +interface with the first Intel Wi-Fi adapter: +.Bd -literal -offset 2n +.Ic # sysrc wlans_iwlwifi0="wlan0" +.Ed +.Pp +Set that interface to ask for a DHCP lease with +.Xr wpa_supplicant 8 : +.Bd -literal -offset 2n +.Ic # sysrc ifconfig_wlan0="WPA SYNCDHCP" +.Ed +.Pp +Enter the details of the Wi-Fi network: +.Bd -literal -offset 2n +.Ic # cd /etc/ +.Ic # wpa_passphrase \(dqmyssid\(dq \(dqmypassphrase\(dq >> wpa_supplicant.conf +.Ed +.Pp +Restart the network interface daemon: +.Bd -literal -offset 2n +.Ic # service netif restart +.Ed +.It Sy Example 4: Scanning for Wi-Fi networks +.Bd -literal -offset 2n +.Ic % ifconfig wlan0 scan +.Ed +.It Sy Example 5: Airplane mode +.Bd -literal -offset 2n +.Ic # service netif stop +.Ed +.El +.Sh SEE ALSO +.Xr bsdconfig 8 , +.Xr dhclient 8 , +.Xr ifconfig 8 , +.Xr wpa_passphrase 8 +.Pp +The Advanced Networking chapter of the +.Fx +Handbook. +.Sh CAVEATS +Shell Special Characters in the +.Ar SSID +or +.Ar passphrase +will need to be escaped for +.Xr wpa_passphrase 8 , +commonly using +.Ql \e , +see the manual page for your shell for more details. +.Pp +Stopping the network interface service also stops internal networking. diff --git a/share/man/man7/operator.7 b/share/man/man7/operator.7 index 1971f2ff7ff0..8d6f0d7085a4 100644 --- a/share/man/man7/operator.7 +++ b/share/man/man7/operator.7 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)operator.7 8.1 (Berkeley) 6/9/93 -.\" $FreeBSD$ -.\" .Dd April 8, 2009 .Dt OPERATOR 7 .Os diff --git a/share/man/man7/orders.7 b/share/man/man7/orders.7 index e8aa4d79f9f2..c1c2c1200e42 100644 --- a/share/man/man7/orders.7 +++ b/share/man/man7/orders.7 @@ -27,9 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd August 6, 2011 +.Dd November 20, 2022 .Dt ORDERS 7 .Os .Sh NAME @@ -48,6 +46,8 @@ The following table lists common multiples of bytes. .It Exabyte Ta EB Ta 2^60 Ta 10^18 .It Zettabyte Ta ZB Ta 2^70 Ta 10^21 .It Yottabyte Ta YB Ta 2^80 Ta 10^24 +.It Ronnabyte Ta RB Ta 2^90 Ta 10^27 +.It Quettabyte Ta QB Ta 2^100 Ta 10^30 .El .Pp The following table lists common bit rates as a power of ten. @@ -70,6 +70,8 @@ The following table lists common orders of magnitude as a power of ten. .Bl -column -offset 2n \ "Septillionth" "Order" "Prefix" "Symbol" "Decimal" .It Sy Name Ta Sy Order Ta Sy Prefix Ta Sy Symbol Ta Sy Decimal +.It Nonillionth Ta 10^-30 Ta quecto Ta q Ta 0.000000000000000000000000000001 +.It Octillionth Ta 10^-27 Ta ronto Ta r Ta 0.000000000000000000000000001 .It Septillionth Ta 10^-24 Ta yocto Ta y Ta 0.000000000000000000000001 .It Sextillionth Ta 10^-21 Ta zepto Ta z Ta 0.000000000000000000001 .It Quintillionth Ta 10^-18 Ta atto Ta a Ta 0.000000000000000001 @@ -91,6 +93,8 @@ The following table lists common orders of magnitude as a power of ten. .It Quintillion Ta 10^18 Ta exa Ta E Ta 1000000000000000000 .It Sextillion Ta 10^21 Ta zetta Ta Z Ta 1000000000000000000000 .It Septillion Ta 10^24 Ta yotta Ta Y Ta 1000000000000000000000000 +.It Octillion Ta 10^27 Ta ronna Ta R Ta 1000000000000000000000000000 +.It Nonillion Ta 10^30 Ta quetta Ta Q Ta 1000000000000000000000000000000 .El .Sh SEE ALSO .Xr units 1 , diff --git a/share/man/man7/ports.7 b/share/man/man7/ports.7 index 4ffa418d1dbb..b681a326f407 100644 --- a/share/man/man7/ports.7 +++ b/share/man/man7/ports.7 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 1997 David E. O'Brien .\" .\" All rights reserved. @@ -23,9 +25,7 @@ .\" (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 July 22, 2021 +.Dd March 21, 2025 .Dt PORTS 7 .Os .Sh NAME @@ -165,7 +165,7 @@ target. Configure .Va OPTIONS for this port using -.Xr dialog4ports 1 . +.Xr portconfig 1 Pq Pa ports/ports-mgmt/portconfig . .It Cm fetch Fetch all of the files needed to build this port from the sites listed in @@ -247,22 +247,22 @@ configured. Configure .Va OPTIONS for this port and all its dependencies using -.Xr dialog4ports 1 . +.Xr portconfig 1 Pq Pa ports/ports-mgmt/portconfig . .It Cm fetch-list -Show list of files to be fetched in order to build the port. +Show the list of files to fetch in order to build the port (but not its +dependencies). .It Cm fetch-recursive Fetch the distfiles of the port and all its dependencies. .It Cm fetch-recursive-list Show list of files that would be retrieved by .Cm fetch-recursive . -.It Cm run-depends-list , build-depends-list -Print a list of all the compile and run dependencies, and dependencies -of those dependencies, by port directory. +.It Cm build-depends-list , run-depends-list +Print a list of all the direct compile or run dependencies for this port. .It Cm all-depends-list -Print a list of all dependencies for the port. -.It Cm pretty-print-run-depends-list , pretty-print-build-depends-list -Print a list of all the compile and run dependencies, and dependencies -of those dependencies, by port name and version. +Print a list of all recursive dependencies for this port. +.It Cm pretty-print-build-depends-list , pretty-print-run-depends-list +Print a list of all the recursive compile or run dependencies for this port by +port name and version. .It Cm missing Print a list of missing dependencies to be installed for the port. .It Cm clean @@ -506,7 +506,7 @@ cluster (for .Cm fetchindex target). Defaults to -.Pa https://www.FreeBSD.org/ports/ . +.Pa https://download.FreeBSD.org/ports/index/ . .It Va FETCHINDEX Command to get .Pa INDEX @@ -739,16 +739,16 @@ Additional user documentation: .It .Xr pkg 8 .It -.Lk "https://www.FreeBSD.org/ports" "Searchable index of all ports" +.Lk "https://ports.FreeBSD.org" "Searchable index of all ports" .El .Sh HISTORY The Ports Collection appeared in .Fx 1.0 . It has since spread to -.Nx -and -.Ox . +.Nx , +.Ox , +and macOS. .Sh AUTHORS .An -nosplit This manual page was originated by diff --git a/share/man/man7/release.7 b/share/man/man7/release.7 index be475979dd0f..36c14afe0bf1 100644 --- a/share/man/man7/release.7 +++ b/share/man/man7/release.7 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 21, 2022 +.Dd May 20, 2025 .Dt RELEASE 7 .Os .Sh NAME @@ -152,7 +150,7 @@ The .Xr git 1 host used to check out the various trees. Defaults to -.Pa https://git.FreeeBSD.org . +.Pa https://git.FreeBSD.org . .It Va SRCBRANCH The .Li src/ @@ -284,6 +282,10 @@ within the This is intended for use only when .Fa /usr/ports is expected to exist by alternative means. +.It Va PKGBASE +Include base system packages for use with +.Xr pkg 8 +on the install media, instead of legacy tarball distribution sets. .El .Sh EMBEDDED BUILDS The following @@ -365,6 +367,25 @@ is used, the resulting files compressed with .Xr xz 1 compress to roughly the same size, regardless of the specified disk image size. +.It Va VMFS +(Deprecated.) +Set to specify which of the filesystem(s) listed in +.Va VMFSLIST +is linked to the historical non-filesystem-labelled file name. +Valid values are +.Va ufs +and +.Va zfs . +The default value is +.Va ufs . +.It Va VMFSLIST +Set to specify the list of file system types to build images for. +Valid values are one or both of +.Va ufs +and +.Va zfs . +The default value is +.Va ufs zfs . .It Va VMFORMATS Set to the target virtual disk image format(s) to create. By default, the @@ -426,6 +447,18 @@ values, run: cd /usr/src make -C release list-cloudware .Ed +.Sh OCI IMAGES +The +.Fx +release build tools have experimental support for building +Open Container Initiative (OCI) format container base images. +This is enabled using a +.Fa release.conf +variable: +.Bl -tag -width Ev +.It Va WITH_OCIIMAGES +Set to a non-null value to build OCI base images. +.El .Sh MAKEFILE TARGETS The release makefile .Pq Pa src/release/Makefile @@ -503,7 +536,7 @@ Displays the list of valid values. .It Cm list-vmtargets Displays the list of valid -.Va VMFORMAT +.Va VMFORMATS and .Va CLOUDWARE values. diff --git a/share/man/man7/sdoc.7 b/share/man/man7/sdoc.7 index d678c97e2818..cdfb25f0f59a 100644 --- a/share/man/man7/sdoc.7 +++ b/share/man/man7/sdoc.7 @@ -26,7 +26,6 @@ .\" SUCH DAMAGE. .\" .\" $Id: sec-doc.7,v 1.7 2001/12/22 00:14:12 rwatson Exp$ -.\" $FreeBSD$ .\" .Dd September 5, 2005 .Dt SDOC 7 diff --git a/share/man/man7/security.7 b/share/man/man7/security.7 index 49701bbe80f1..cdb4d066d3e6 100644 --- a/share/man/man7/security.7 +++ b/share/man/man7/security.7 @@ -1,5 +1,5 @@ .\" Copyright (C) 1998 Matthew Dillon. All rights reserved. -.\" Copyright (c) 2019 The FreeBSD Foundation, Inc. +.\" Copyright (c) 2019 The FreeBSD Foundation .\" .\" Parts of this documentation were written by .\" Konstantin Belousov <kib@FreeBSD.org> under sponsorship @@ -26,15 +26,21 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd January 14, 2022 +.Dd June 1, 2024 .Dt SECURITY 7 .Os .Sh NAME .Nm security .Nd introduction to security under FreeBSD .Sh DESCRIPTION +See +.Xr mitigations 7 +for a description of vulnerability mitigations in +.Fx . +This man page documents other +.Fx +security related topics. +.Pp Security is a function that begins and ends with the system administrator. While all .Bx @@ -97,9 +103,9 @@ It may not be able to take your machine down, but it can fill up your Internet pipe. .Pp A user account compromise is even more common than a DoS attack. -Many -sysadmins still run standard -.Xr telnetd 8 +Some +sysadmins still run +.Nm telnetd and .Xr ftpd 8 servers on their machines. @@ -338,8 +344,8 @@ virtually every server ever run as root, including basic system servers. If you are running a machine through which people only log in via .Xr sshd 8 and never log in via -.Xr telnetd 8 -then turn off those services! +.Nm telnetd +then turn off this service! .Pp .Fx now defaults to running @@ -537,7 +543,10 @@ kernel modules (see may not be loaded or unloaded. The kernel debugger may not be entered using the .Va debug.kdb.enter -sysctl. +sysctl unless a +.Xr MAC 9 +policy grants access, for example using +.Xr mac_ddb 4 . A panic or trap cannot be forced using the .Va debug.kdb.panic , .Va debug.kdb.panic_str @@ -958,16 +967,18 @@ Backwards compatibility shims for the interim sysctls under will not be added. .Bl -tag -width security.bsd.unprivileged_proc_debug .It Dv security.bsd.see_other_uids -Controls visibility of processes owned by different uid. +Controls visibility and reachability of subjects (e.g., processes) and objects +(e.g., sockets) owned by a different uid. The knob directly affects the .Dv kern.proc sysctls filtering of data, which results in restricted output from utilities like .Xr ps 1 . .It Dv security.bsd.see_other_gids -Same, for processes owned by different gid. +Same, for subjects and objects owned by a different gid. .It Dv security.bsd.see_jail_proc -Same, for processes belonging to a jail. +Same, for subjects and objects belonging to a different jail, including +sub-jails. .It Dv security.bsd.conservative_signals When enabled, unprivileged users are only allowed to send job control and usual termination signals like @@ -1047,7 +1058,7 @@ Controls mitigation of Special Register Buffer Data Sampling versus optimization of the MCU access. When set to zero, the mitigation is disabled, and the RDSEED and RDRAND instructions do not incur serialization overhead for shared buffer accesses, -and do not serialize off-core memory accessses. +and do not serialize off-core memory accesses. .It Dv kern.elf32.aslr.enable Controls system-global Address Space Layout Randomization (ASLR) for normal non-PIE (Position Independent Executable) 32-bit ELF binaries. @@ -1062,8 +1073,7 @@ position-independent (PIE) 32-bit binaries. Makes ASLR less aggressive and more compatible with old binaries relying on the sbrk area. .It Dv kern.elf32.aslr.stack -If ASLR is enabled for a binary, a non-zero value enables randomization -of the stack. +Enable randomization of the stack for 32-bit binaries. Otherwise, the stack is mapped at a fixed location determined by the process ABI. .It Dv kern.elf64.aslr.enable @@ -1098,6 +1108,7 @@ Enables mapping of simultaneously writable and executable pages for .Xr xdm 1 Pq Pa ports/x11/xorg-clients , .Xr group 5 , .Xr ttys 5 , +.Xr mitigations 7 , .Xr accton 8 , .Xr init 8 , .Xr sshd 8 , diff --git a/share/man/man7/simd.7 b/share/man/man7/simd.7 new file mode 100644 index 000000000000..d5092348d9b3 --- /dev/null +++ b/share/man/man7/simd.7 @@ -0,0 +1,242 @@ +.\" Copyright (c) 2023 The FreeBSD Foundation +. +.\" This documentation was written by Robert Clausecker <fuz@FreeBSD.org> +.\" under sponsorship from the FreeBSD Foundation. +. +.\" 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 +. +.Dd November 18, 2024 +.Dt SIMD 7 +.Os +.Sh NAME +.Nm simd +.Nd SIMD enhancements +. +.Sh DESCRIPTION +On some architectures, the +.Fx +.Em libc +provides enhanced implementations of commonly used functions, replacing +the architecture-independent implementations used otherwise. +Depending on architecture and function, an enhanced +implementation of a function may either always be used or the +.Em libc +detects at runtime which SIMD instruction set extensions are +supported and picks the most suitable implementation automatically. +On +.Cm amd64 , +the environment variable +.Ev ARCHLEVEL +can be used to override this mechanism. +.Pp +Enhanced functions are present for the following architectures: +.Bl -column FUNCTION_________ aarch64_ arm_ amd64_ i386_ ppc64_ -offset indent +.It Em FUNCTION Ta Em AARCH64 Ta Em ARM Ta Em AMD64 Ta Em I386 Ta Em PPC64 +.It bcmp Ta A Ta Ta S1 Ta S +.It bcopy Ta A Ta S Ta S Ta S Ta SV +.It bzero Ta A Ta S Ta S Ta S +.It div Ta Ta Ta S Ta S +.It index Ta A Ta Ta S1 +.It ldiv Ta Ta Ta S Ta S +.It lldiv Ta Ta Ta S +.It memchr Ta A Ta Ta S1 +.It memcmp Ta A Ta S Ta S1 Ta S +.It memccpy Ta A Ta Ta S1 +.It memcpy Ta A Ta S Ta S Ta S Ta SV +.It memmove Ta A Ta S Ta S Ta S Ta SV +.It memrchr Ta A Ta Ta S1 +.It memset Ta A Ta S Ta S Ta S +.It rindex Ta A Ta Ta S1 Ta S +.It stpcpy Ta A Ta Ta S1 +.It stpncpy Ta Ta Ta S1 +.It strcat Ta A Ta Ta S1 Ta S +.It strchr Ta A Ta Ta S1 Ta S +.It strchrnul Ta A Ta Ta S1 +.It strcmp Ta A Ta S Ta S1 Ta S +.It strcpy Ta A Ta Ta S1 Ta S Ta S2 +.It strcspn Ta S Ta Ta S2 +.It strlcat Ta A Ta Ta S1 +.It strlcpy Ta A Ta Ta S1 +.It strlen Ta A Ta S Ta S1 +.It strncat Ta A Ta Ta S1 +.It strncmp Ta A Ta S Ta S1 Ta S +.It strncpy Ta Ta Ta S1 Ta Ta S2 +.It strnlen Ta A Ta Ta S1 +.It strrchr Ta A Ta Ta S1 Ta S +.It strpbrk Ta S Ta Ta S2 +.It strsep Ta S Ta Ta S2 +.It strspn Ta S Ta Ta S2 +.It swab Ta Ta Ta Ta S +.It timingsafe_bcmp Ta A Ta Ta S1 +.It timingsafe_memcmp Ta S Ta Ta S +.It wcschr Ta Ta Ta Ta S +.It wcscmp Ta Ta Ta Ta S +.It wcslen Ta Ta Ta Ta S +.It wmemchr Ta Ta Ta Ta S +.El +.Pp +.Sy S Ns :\ scalar (non-SIMD), +.Sy 1 Ns :\ amd64 baseline, +.Sy 2 Ns :\ x86-64-v2 +or PowerPC\ 2.05, +.Sy 3 Ns :\ x86-64-v3, +.Sy 4 Ns :\ x86-64-v4, +.Sy V Ns :\ PowerPC\ VSX, +.Sy A Ns :\ Arm\ ASIMD (NEON). +. +.Sh ENVIRONMENT +.Bl -tag +.It Ev ARCHLEVEL +On +.Em amd64 , +controls the level of SIMD enhancements used. +If this variable is set to an architecture level from the list below +and that architecture level is supported by the processor, SIMD +enhancements up to +.Ev ARCHLEVEL +are used. +If +.Ev ARCHLEVEL +is unset, not recognised, or not supported by the processor, the highest +level of SIMD enhancements supported by the processor is used. +.Pp +A suffix beginning with +.Sq ":" +or +.Sq "+" +in +.Ev ARCHLEVEL +is ignored and may be used for future extensions. +The architecture level can be prefixed with a +.Sq "!" +character to force use of the requested architecture level, even if the +processor does not advertise that it is supported. +This usually causes applications to crash and should only be used for +testing purposes or if architecture level detection yields incorrect +results. +.Pp +The architecture levels follow the AMD64 SysV ABI supplement: +.Bl -tag -width x86-64-v2 +.It Cm scalar +scalar enhancements only (no SIMD) +.It Cm baseline +cmov, cx8, x87 FPU, fxsr, MMX, osfxsr, SSE, SSE2 +.It Cm x86-64-v2 +cx16, lahf/sahf, popcnt, SSE3, SSSE3, SSE4.1, SSE4.2 +.It Cm x86-64-v3 +AVX, AVX2, BMI1, BMI2, F16C, FMA, lzcnt, movbe, osxsave +.It Cm x86-64-v4 +AVX-512F/BW/CD/DQ/VL +.El +.El +. +.Sh DIAGNOSTICS +.Bl -diag +.It "Illegal Instruction" +Printed by +.Xr sh 1 +if a command is terminated through delivery of a +.Dv SIGILL +signal, see +.Xr signal 3 . +.Pp +Use of an unsupported architecture level was forced by setting +.Ev ARCHLEVEL +to a string beginning with a +.Sq "!" +character, causing a process to crash due to use of an unsupported +instruction. +Unset +.Ev ARCHLEVEL , +remove the +.Sq "!" +prefix or select a supported architecture level. +.Pp +Message may also appear for unrelated reasons. +.El +. +.Sh SEE ALSO +.Xr string 3 , +.Xr arch 7 +.Rs +.%A H. J. Lu +.%A Michael Matz +.%A Milind Girkar +.%A Jan Hubi\[u010D]ka \" \(vc +.%A Andreas Jaeger +.%A Mark Mitchell +.%B System V Application Binary Interface +.%D May 23, 2023 +.%T AMD64 Architecture Processor Supplement +.%O Version 1.0 +.Re +. +.Sh HISTORY +Architecture-specific enhanced +.Em libc +functions were added starting +with +.Fx 2.0 +for +.Cm i386 , +.Fx 6.0 +for +.Cm arm , +.Fx 6.1 +for +.Cm amd64 , +.Fx 11.0 +for +.Cm aarch64 , +and +.Fx 12.0 +for +.Cm powerpc64 . +SIMD-enhanced functions were first added with +.Fx 13.0 +for +.Cm powerpc64 +and with +.Fx 14.1 +for +.Cm amd64 . +.Pp +A +.Nm +manual page appeared in +.Fx 14.1 . +. +.Sh AUTHOR +.An Robert Clausecker Aq Mt fuz@FreeBSD.org +. +.Sh CAVEATS +Other parts of +.Fx +such as cryptographic routines in the kernel or in +OpenSSL may also use SIMD enhancements. +These enhancements are not subject to the +.Ev ARCHLEVEL +variable and may have their own configuration +mechanism. +. +.Sh BUGS +Use of SIMD enhancements cannot be configured on powerpc64. diff --git a/share/man/man7/sizeof.7 b/share/man/man7/sizeof.7 new file mode 100644 index 000000000000..b3c3af1acb52 --- /dev/null +++ b/share/man/man7/sizeof.7 @@ -0,0 +1,308 @@ +.\" +.\" Copyright (C) 2022 Jan Schaumann <jschauma@netmeister.org>. +.\" +.\" 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 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 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. +.\" +.Dd December 12, 2022 +.Dt sizeof 7 +.Os +.Sh NAME +.Nm sizeof +operator +.Nd yield the storage size of the given operand +.Sh SYNTAX +.Nm Vt ( type ) +.br +.Nm Vt expression +.Sh DESCRIPTION +The +.Nm +operator yields the size of its operand. +The +.Nm +operator cannot be applied to incomplete types and expressions +with incomplete types (e.g. +.Vt void , +or forward-defined +.Vt struct foo ), +and function types. +.Pp +The size of primitive (non-derived) data types in C may differ +across hardware platforms and implementations. +They are defined by corresponding Application Binary Interface (ABI) +specifications, see +.Xr arch 7 +for details about ABI used by +.Fx . +It may be necessary or useful for a program to be able +to determine the storage size of a data type or object +to account for the platform specifics. +.Pp +The unary +.Nm +operator yields the storage size of an expression or +data type in +.Em char sized units +(C language bytes). +As a result, +.Ql sizeof(char) +is always guaranteed to be 1. +(The number of bits per +.Vt char +is given by the +.Dv CHAR_BIT +definition in the +.In limits.h +header; many systems also provide the "number of bits +per byte" definition as +.Dv NBBY +in the +.In sys/param.h +header.) +.Sh EXAMPLES +Different platforms may use different data models. +For example, systems on which integers, longs, and +pointers are using 32 bits (e.g., i386) are referred +to as using the "ILP32" data model, systems using +64 bit longs and pointers (e.g., amd64 / x86_64) +as the "LP64" data model. +.Pp +The following examples illustrate the possible results +of calling +.Nm +on an ILP32 vs. an LP64 system: +.Pp +When applied to a simple variable or data type, +.Nm +returns the storage size of the data type of the object: +.Bl -column -offset indent \ + ".Li sizeof(struct flex)" ".Sy Result (ILP32)" ".Sy Result (LP64)" +.It Sy Object or type \ + Ta Sy Result (ILP32) \ + Ta Sy Result (LP64) +.It Li sizeof(char) \ + Ta 1 \ + Ta 1 +.It Li sizeof(int) \ + Ta 4 \ + Ta 4 +.It Li sizeof(long) \ + Ta 4 \ + Ta 8 +.It Li sizeof(float) \ + Ta 4 \ + Ta 4 +.It Li sizeof(double) \ + Ta 8 \ + Ta 8 +.It Li sizeof(char *) \ + Ta 4 \ + Ta 8 +.El +.Pp +For initialized data or uninitialized arrays of a +fixed size known at compile time, +.Nm +will return the correct storage size: +.Bd -literal -offset indent +#define DATA "1234567890" +char buf1[] = "abc"; +char buf2[1024]; +char buf3[1024] = { 'a', 'b', 'c' }; +.Ed +.Bl -column -offset indent \ + ".Li sizeof(struct flex)" ".Sy Result" +.It Sy Object or type \ + Ta Sy Result +.It Li sizeof(DATA) \ + Ta 11 +.It Li sizeof(buf1) \ + Ta 4 +.It Li sizeof(buf2) \ + Ta 1024 +.It Li sizeof(buf3) \ + Ta 1024 +.El +.Pp +The examples above are the same for ILP32 and LP64 +platforms, as they are based on character units. +.Pp +When applied to a struct or union, +.Nm +returns the total number of bytes in the object, +including any internal or trailing padding used to +align the object in memory. +This result may thus be larger than if the storage +size of each individual member had been added: +.Bd -literal -offset indent +struct s1 { + char c; +}; + +struct s2 { + char *s; + int i; +}; + +struct s3 { + char *s; + int i; + int j; +}; + +struct s4 { + int i; + uint64_t i64; +}; + +struct s5 { + struct s1 a; + struct s2 b; + struct s3 c; + struct s4 d; +}; +.Ed +.Bl -column -offset indent \ + ".Li sizeof(struct flex)" ".Sy Result (ILP32) " ".Sy Result (LP64)" +.It Sy Object or type \ + Ta Sy Result (ILP32) \ + Ta Sy Result (LP64) +.It Li sizeof(struct s1) \ + Ta 1 \ + Ta 1 +.It Li sizeof(struct s2) \ + Ta 8 \ + Ta 16 +.It Li sizeof(struct s3) \ + Ta 12 \ + Ta 16 +.It Li sizeof(struct s4) \ + Ta 12 \ + Ta 16 +.It Li sizeof(struct s5) \ + Ta 36 \ + Ta 56 +.El +.Pp +When applied to a struct containing a flexible array +member, +.Nm +returns the size of the struct +.Em without +the array, although again possibly including any +padding the compiler deemed appropriate: +.Bd -literal -offset indent +struct flex { + char c; + long b; + char array[]; +} +.Ed +.Bl -column -offset indent \ + ".Li sizeof(struct flex)" ".Sy Result (ILP32) " ".Sy Result (LP64)" +.It Sy Object or type \ + Ta Sy Result (ILP32) \ + Ta Sy Result (LP64) +.It Li sizeof(struct flex) \ + Ta 8 \ + Ta 16 +.El +.Pp +One of the more common uses of the +.Nm +operator is to determine the correct amount of memory +to allocate: +.Bd -literal -offset indent +int *nums = calloc(512, sizeof(int)); +.Ed +.Pp +The +.Nm +operator can be used to calculate the number of +elements in an array by dividing the size of the array +by the size of one of its elements: +.Bd -literal -offset indent +int nums[] = { 1, 2, 3, 4, 5 }; +const int howmany = sizeof(nums) / sizeof(nums[0]); +.Ed +.Pp +Many systems provide this shortcut as the macro +.Dv ntimes() +via the +.In sys/param.h +header file. +.Sh RESULT +The result of the +.Nm +operator is an unsigned integer type, defined in the +.Dv stddef.h +header as a +.Vt size_t . +.Sh NOTES +It is a common mistake to apply +.Nm +to a dynamically allocated array: +.Bd -literal -offset indent +char *buf; +if ((buf = malloc(BUFSIZ)) == NULL) { + perror("malloc"); +} +/* Warning: wrong! */ +(void)strncat(buf, input, sizeof(buf) - 1); +.Ed +.Pp +In that case, the operator will return the storage +size of the pointer ( +.Ql sizeof(char *) +), not the +allocated memory. +.Pp +.Nm +determines the +.Ev size +of the result of the expression given, but +.Em does not +evaluate the expression: +.Bd -literal -offset indent +int a = 42; +printf("%ld - %d\\n", sizeof(a = 10), a); /* Result: "4 - 42" */ +.Ed +.Pp +Since it is evaluated by the compiler and not the +preprocessor, the +.Nm +operator cannot be used in a preprocessor expression. +.Sh SEE ALSO +.Xr arch 7 , +.Xr operator 7 +.Sh STANDARDS +The +.Nm +operator conforms to +.St -ansiC . +.Pp +Handling of flexible array members in structures +conforms to +.St -isoC-99 . +.Sh AUTHORS +This manual page was written by +.An Jan Schaumann Aq Mt jschauma@netmeister.org . diff --git a/share/man/man7/sprog.7 b/share/man/man7/sprog.7 index f5a2d9ca4ec6..cc021a39b807 100644 --- a/share/man/man7/sprog.7 +++ b/share/man/man7/sprog.7 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 3, 2001 .Dt SPROG 7 .Os diff --git a/share/man/man7/stats.7 b/share/man/man7/stats.7 index 8be124392d19..715db70e118b 100644 --- a/share/man/man7/stats.7 +++ b/share/man/man7/stats.7 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2020 Daniel Ebdrup Jensen .\" @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 22, 2021 .Dt STATS 7 .Os diff --git a/share/man/man7/stdint.7 b/share/man/man7/stdint.7 index 2f36953d9a16..70bfac4ba283 100644 --- a/share/man/man7/stdint.7 +++ b/share/man/man7/stdint.7 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 15, 2002 .Dt STDINT 7 .Os diff --git a/share/man/man7/sticky.7 b/share/man/man7/sticky.7 index 28fab62ea4c9..7c2ae04e2532 100644 --- a/share/man/man7/sticky.7 +++ b/share/man/man7/sticky.7 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)sticky.8 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD$ -.\" .Dd June 5, 1993 .Dt STICKY 7 .Os diff --git a/share/man/man7/tests.7 b/share/man/man7/tests.7 index b253c1ab2458..61b0789b9149 100644 --- a/share/man/man7/tests.7 +++ b/share/man/man7/tests.7 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" $NetBSD: tests.kyua.7,v 1.2 2013/07/20 21:39:59 wiz Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -26,7 +25,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 19, 2020 +.Dd April 1, 2025 .Dt TESTS 7 .Os .Sh NAME @@ -158,7 +157,7 @@ The following configuration variables are available in the .Fx Test Suite: .Bl -tag -width "allow_sysctl_side_effects" -.It allow_devfs_side_effects +.It Va allow_devfs_side_effects If defined, enables tests that may destroy and recreate semipermanent device nodes, like disk devices. Without this variable, tests may still create and destroy devices nodes that @@ -167,16 +166,19 @@ them up afterwards. However, tests that require this variable have a relaxed cleanup requirement; they must recreate any devices that they destroyed, but not necessarily with the same devnames. -.It allow_sysctl_side_effects +.It Va allow_sysctl_side_effects Enables tests that change globally significant .Xr sysctl 8 variables. The tests will undo any changes in their cleanup phases. -.It disks +.It Va allow_network_access +Enables tests that need to access the network the test host is connected to. +Such tests may require properly configured Internet access. +.It Va disks Must be set to a space delimited list of disk device nodes. Tests that need destructive access to disks must use these devices. Tests are not required to preserve any data present on these disks. -.It fibs +.It Va fibs Must be set to a space delimited list of FIBs (routing tables). Tests that need to modify a routing table may use any of these. Tests will cleanup any new routes that they create. diff --git a/share/man/man7/tracing.7 b/share/man/man7/tracing.7 new file mode 100644 index 000000000000..0bd64f197084 --- /dev/null +++ b/share/man/man7/tracing.7 @@ -0,0 +1,97 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 Mateusz Piotrowski <0mp@FreeBSD.org> +.\" +.Dd June 19, 2025 +.Dt TRACING 7 +.Os +.Sh NAME +.Nm tracing +.Nd introduction to tracing and performance monitoring facilities +.Sh DESCRIPTION +.Fx +features a large variety of tracing and performance monitoring facilities. +Use them to measure performance and +troubleshoot kernel and userland problems both during +.Xr development 7 +and potentially on production systems. +The facilities differ in scope, ease of use, overhead, design, and limitations. +.Ss DTrace +.Xr dtrace 1 +is the most versatile tracing framework available on +.Fx +and is capable of tracing throughout the +.Fx +software stack from the kernel to the applications running in userland. +Refer to +.Xr dtrace 1 +and +.Xr SDT 9 +for more details. +.Pp +.Xr dwatch 1 +is a user-friendly wrapper for DTrace. +It simplifies common DTrace usage patterns and requires less expert knowledge +to operate. +.Pp +.Ss Userland Tracing +.Xr truss 1 +traces system calls. +It uses +.Xr sysdecode 3 +to pretty-print system call arguments and +.Xr ptrace 2 +to trace processes. +.Pp +.Xr ktrace 1 +is useful for debugging user programs. +It enables kernel trace logging for specified processes. +Like +.Xr truss 1 , +it mainly traces system calls, but instead of using +.Xr ptrace 2 , +it asynchronously logs entries to a trace file configured with +.Xr ktrace 2 +(typically +.Pa ktrace.out ) , +and it can log other types of kernel events, such as page faults and name lookups +.Po refer to +.Fl t +in +.Xr ktrace 1 +.Pc . +Also, programs can log to a +.Xr ktrace 1 +stream using the +.Xr utrace 2 +system call. +.Ss Kernel Tracing +.Xr ktr 4 +is a facility for logging strings in the kernel. +It comes in handy for some niche purposes during kernel development. +It lets kernel programmers log events to a global ring buffer, +which can later be dumped using +.Xr ktrdump 8 . +.Ss Hardware Counters +.Pp +.Xr pmcstat 8 , +and its kernel counterpart, +.Xr hwmpc 4 , +is the +.Fx +facility for conducting performance measurements with hardware counters. +.Ss Boot-Time And Shutdown Tracing +.Xr boottrace 4 +is a facility for tracing events at boot and shutdown. +Its target audience are system administrators. +.Pp +.Xr tslog 4 +is a developer-oriented tool for tracing boot-time events. +.Sh HISTORY +The +.Nm +manual page was written by +.An Mateusz Piotrowski Aq Mt 0mp@FreeBSD.org . +It first appeared in +.Fx 15.0 . diff --git a/share/man/man7/tuning.7 b/share/man/man7/tuning.7 index 63e09ecce098..ebba551f65d0 100644 --- a/share/man/man7/tuning.7 +++ b/share/man/man7/tuning.7 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 16, 2020 +.Dd January 23, 2025 .Dt TUNING 7 .Os .Sh NAME @@ -153,8 +151,7 @@ Striping can also improve the performance of a file system by splitting I/O operations across two or more disks. The -.Xr gstripe 8 , -.Xr gvinum 8 , +.Xr gstripe 8 and .Xr ccdconfig 8 utilities may be used to create simple striped file systems. @@ -482,7 +479,7 @@ By default is set at the maximum allowable port number. .Pp The -.Va kern.ipc.somaxconn +.Va kern.ipc.soacceptqueue sysctl limits the size of the listen queue for accepting new TCP connections. The default value of 128 is typically too low for robust handling of new connections in a heavily loaded web server environment. @@ -506,29 +503,6 @@ The read-only .Va kern.openfiles sysctl may be interrogated to determine the current number of open files on the system. -.Pp -The -.Va vm.swap_idle_enabled -sysctl is useful in large multi-user systems where you have lots of users -entering and leaving the system and lots of idle processes. -Such systems -tend to generate a great deal of continuous pressure on free memory reserves. -Turning this feature on and adjusting the swapout hysteresis (in idle -seconds) via -.Va vm.swap_idle_threshold1 -and -.Va vm.swap_idle_threshold2 -allows you to depress the priority of pages associated with idle processes -more quickly then the normal pageout algorithm. -This gives a helping hand -to the pageout daemon. -Do not turn this option on unless you need it, -because the tradeoff you are making is to essentially pre-page memory sooner -rather than later, eating more swap and disk bandwidth. -In a small system -this option will have a detrimental effect but in a large system that is -already doing moderate paging this option allows the VM system to stage -whole processes into and out of memory more easily. .Sh LOADER TUNABLES Some aspects of the system behavior may not be tunable at runtime because memory allocations they perform must occur early in the boot process. @@ -697,6 +671,7 @@ over services you export from your box (web services, email). .Xr ata 4 , .Xr dummynet 4 , .Xr eventtimers 4 , +.Xr ffs 4 , .Xr login.conf 5 , .Xr rc.conf 5 , .Xr sysctl.conf 5 , @@ -711,7 +686,6 @@ over services you export from your box (web services, email). .Xr gjournal 8 , .Xr gpart 8 , .Xr gstripe 8 , -.Xr gvinum 8 , .Xr ifconfig 8 , .Xr ipfw 8 , .Xr loader 8 , diff --git a/share/man/man8/Makefile b/share/man/man8/Makefile index 1257f3ab97bf..bd6bdfe4ba05 100644 --- a/share/man/man8/Makefile +++ b/share/man/man8/Makefile @@ -1,16 +1,13 @@ -# @(#)Makefile 8.1 (Berkeley) 6/5/93 -# $FreeBSD$ - .include <src.opts.mk> MAN= \ beinstall.8 \ crash.8 \ + debug.sh.8 \ diskless.8 \ intro.8 \ nanobsd.8 \ rc.8 \ - rc.sendmail.8 \ rc.subr.8 \ rescue.8 \ ${_uefi.8} \ diff --git a/share/man/man8/Makefile.depend b/share/man/man8/Makefile.depend index f80275d86ab1..11aba52f82cf 100644 --- a/share/man/man8/Makefile.depend +++ b/share/man/man8/Makefile.depend @@ -1,4 +1,3 @@ -# $FreeBSD$ # Autogenerated - do NOT edit! DIRDEPS = \ diff --git a/share/man/man8/beinstall.8 b/share/man/man8/beinstall.8 index dc43f53a119b..114483ba752a 100644 --- a/share/man/man8/beinstall.8 +++ b/share/man/man8/beinstall.8 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2018 Mateusz Piotrowski <0mp@FreeBSD.org> .\" @@ -23,8 +23,6 @@ .\" 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 October 30, 2020 .Dt BEINSTALL.SH 8 .Os @@ -43,10 +41,8 @@ source tree. also automatically performs .Pa /etc updates -(using either -.Xr etcupdate 8 -or -.Xr mergemaster 8 ) +(using +.Xr etcupdate 8 ) and package updates using .Xr pkg-upgrade 8 @@ -90,18 +86,12 @@ from ports (sysutils/beadm). .It Ev CONFIG_UPDATER Pq default: Dq Li "etcupdate" Config updater: .Xr etcupdate 8 -and -.Xr mergemaster 8 -are supported. +is supported. Set to an empty string to skip. .It Ev ETCUPDATE_FLAGS Pq default: Dq Li "-F" Flags for .Xr etcupdate 8 if used. -.It Ev MERGEMASTER_FLAGS Pq default: Dq Li "-iFU" -Flags for -.Xr mergemaster 8 -if used. .It Ev NO_PKG_UPGRADE Pq default: Dq Li "" If not empty, .Dq Li pkg upgrade @@ -119,7 +109,6 @@ lives in the src tree. .Xr development 7 , .Xr bectl 8 , .Xr etcupdate 8 , -.Xr mergemaster 8 , .Xr pkg 8 .Sh HISTORY .Nm diff --git a/share/man/man8/crash.8 b/share/man/man8/crash.8 index 11ed71ca3938..27c9c56533a5 100644 --- a/share/man/man8/crash.8 +++ b/share/man/man8/crash.8 @@ -30,8 +30,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 23, 2011 .Dt CRASH 8 .Os diff --git a/share/man/man8/debug.sh.8 b/share/man/man8/debug.sh.8 new file mode 100644 index 000000000000..bf0fdbd6bcf5 --- /dev/null +++ b/share/man/man8/debug.sh.8 @@ -0,0 +1,191 @@ +.\" Copyright (c) 1994-2021 Simon J. Gerraty +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" This file is provided in the hope that it will +.\" be of use. There is absolutely NO WARRANTY. +.\" Permission to copy, redistribute or otherwise +.\" use this file is hereby granted provided that +.\" the above copyright notice and this notice are +.\" left intact. +.\" +.\" Please send copies of changes and bug-fixes to: +.\" sjg@crufty.net +.\" +.Dd October 22, 2024 +.Dt DEBUG.SH 8 +.Os +.Sh NAME +.Nm debug.sh +.Nd selectively debug scripts +.Sh SYNOPSIS +.Bl -item -compact +.It +.Ic $_DEBUG_SH .\& Pa debug.sh +.Pp +.It +.Ic DebugOn Oo Fl eo Oc Ar tag ... +.It +.Ic DebugOff Oo Fl eo Oc Oo Cm rc= Ns Ar rc Oc Ar tag ... +.It +.Ic Debugging +.It +.Ic DebugAdd Ar tag +.It +.Ic DebugEcho Op Ar message +.It +.Ic DebugLog Op Ar message +.It +.Ic DebugShell Ar tag ... +.It +.Ic DebugTrace Ar message +.It +.Ic Debug Ar tag ... +.El +.Sh DESCRIPTION +.Nm +provides the following functions to facilitate flexible +run-time tracing of complicated shell scripts. +.Bl -tag -width 4n +.It Ic DebugOn Oo Fl eo Oc Ar tag ... +turns tracing on if any +.Ar tag +is found in +.Va DEBUG_SH +(a comma separated list of tags). +.Pp +It turns tracing off if +.Ar !tag +is found in +.Va DEBUG_SH . +.Pp +It sets +.Va DEBUG_ON +to the +.Ar tag +that caused tracing to be enabled, or +.Va DEBUG_OFF +if we matched +.Ar !tag . +.Pp +If +.Fl e +option is present, returns 1 if no +.Ar tag +matched. +.Pp +If +.Fl o +option is present, tracing is turned off unless there +was a matched +.Ar tag , +useful for functions too noisy to tace. +.It Ic DebugOff Oo Fl eo Oc Oo Cm rc= Ns Ar rc Oc Ar tag ... +turns tracing on if any +.Ar tag +matches +.Va DEBUG_OFF +or off if any +.Ar tag +matches +.Va DEBUG_ON . +This allows nested functions to not interfere with each other. +.Pp +The flags +.Fl e +and +.Fl o +are ignored, they just allow for symmetry with calls to +.Fn DebugOn . +.Pp +The optional +.Ar rc +value will be returned rather than the default of 0. +Thus if +.Fn DebugOff +is the last operation in a function, +.Ar rc +will be the return code of the function. +.It Ic Debugging +returns true if tracing is enabled. +It is useful for bounding complex debug actions, rather than +using lots of +.Ic $DEBUG_DO +lines. +.It Ic DebugAdd Ar tag +Add +.Ar tag +to +.Va DEBUG_SH +to influence later output, +possibly in a child process. +.It Ic DebugEcho +is just shorthand for: +.Bd -literal -offset indent +$DEBUG_DO echo "$@" +.Ed +.It Ic DebugLog Op Ar message +If debugging is enabled, output +.Ar message +prefixed with a time-stamp. +.It Ic DebugShell Ar tag ... +runs an interactive shell if any +.Ar tag +is found in +.Va DEBUG_INTERACTIVE , +and there is a tty available. +The shell used is defined by +.Va DEBUG_SHELL +or +.Va SHELL +and defaults to +.Pa /bin/sh . +.It Ic DebugTrace Ar message +Debug output can be very noisy, and it can be tricky +to align with the script. +This function outputs a very noticable banner indicating the value of +.Va DEBUG_ON , +and +.Ar message +is passed to +.Fn DebugLog , +finally the banner is repeated. +.It Ic Debug Ar tag ... +For backwards compatibility, calls +.Fn DebugOn +and if that does not turn tracing on, +it calls +.Fn DebugOff +to turn it off. +.El +.Pp +The variables +.Va DEBUG_SKIP +and +.Va DEBUG_DO +are set so as to enable/disable code that should be +skipped/run when debugging is turned on. +.Va DEBUGGING +is the same as +.Va DEBUG_SKIP +for backwards compatability and is only set by +.Fn Debug . +.Pp +The use of +.Ic $_DEBUG_SH +is to prevent multiple inclusion, +though it does no harm in this case. +.Sh BUGS +Does not work with some versions of +.Xr ksh 1 . +If a function turns tracing on, ksh turns it off when the +function returns - useless. +.Pp +PD ksh works ok ;-) +.Sh AUTHOR +.An -nosplit +.Nm +was written by +.An Simon J Gerraty Aq Mt sjg@crufty.net . + + diff --git a/share/man/man8/diskless.8 b/share/man/man8/diskless.8 index 0e956f3b4505..cc49854ae850 100644 --- a/share/man/man8/diskless.8 +++ b/share/man/man8/diskless.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1994 Gordon W. Ross, Theo de Raadt .\" Updated by Luigi Rizzo, Robert Watson .\" All rights reserved. @@ -24,14 +27,12 @@ .\" (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 May 3, 2020 +.Dd August 11, 2024 .Dt DISKLESS 8 .Os .Sh NAME .Nm diskless -.Nd booting a system over the network +.Nd booting a system over the network with PXE .Sh DESCRIPTION The ability to boot a machine over the network is useful for .Em diskless diff --git a/share/man/man8/intro.8 b/share/man/man8/intro.8 index 2c3649c4b18e..39b72af5f741 100644 --- a/share/man/man8/intro.8 +++ b/share/man/man8/intro.8 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)intro.8 8.2 (Berkeley) 12/11/93 -.\" $FreeBSD$ -.\" .Dd October 22, 2006 .Dt INTRO 8 .Os diff --git a/share/man/man8/nanobsd.8 b/share/man/man8/nanobsd.8 index c32527344493..2ba072541ada 100644 --- a/share/man/man8/nanobsd.8 +++ b/share/man/man8/nanobsd.8 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd May 19, 2016 +.Dd November 10, 2024 .Dt NANOBSD 8 .Os .Sh NAME @@ -33,7 +31,7 @@ applications .Sh SYNOPSIS .Nm -.Op Fl bfhiKknqvwX +.Op Fl BbfhIiKknqvWwX .Op Fl c Ar config-file .Sh DESCRIPTION The @@ -49,6 +47,8 @@ installation and maintenance. .Pp The following options are available: .Bl -tag -width ".Fl c Ar config-file" -offset indent +.It Fl B +Skip the install stages (both for kernel and world). .It Fl b Skip the build stages (both for kernel and world). .It Fl c Ar config-file @@ -57,6 +57,8 @@ Specify the configuration file to use. Skip the code slice extraction. .It Fl h Display usage information. +.It Fl I +Build the disk image from an existing build/install. .It Fl i Skip the disk image build stage. .It Fl K @@ -77,13 +79,17 @@ used for each build stage (world and kernel). Make output more quiet. .It Fl v Make output more verbose. +.It Fl W +Skip the +.Cm installworld +stage of the build. .It Fl w Skip the .Cm buildworld stage of the build. .It Fl X Make -.Cm native-xtools. +.Cm native-xtools . .El .Pp The features of diff --git a/share/man/man8/rc.8 b/share/man/man8/rc.8 index 8b6fc094b7db..b7bd7b2de1f0 100644 --- a/share/man/man8/rc.8 +++ b/share/man/man8/rc.8 @@ -28,10 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)rc.8 8.2 (Berkeley) 12/11/93 -.\" $FreeBSD$ -.\" -.Dd July 4, 2022 +.Dd September 20, 2024 .Dt RC 8 .Os .Sh NAME @@ -124,10 +121,9 @@ to load various .Xr rc.subr 8 shell functions to use. .It -Load the configuration files. +Load the configuration files (see below for reloading). .It -Determine if booting in a jail, -and add +Determine if booting in a jail, and add .Dq Li nojail (no jails allowed) or .Dq Li nojailvnet @@ -152,9 +148,13 @@ KEYWORD (refer to .Fl s flag). .It -Call each script in turn using +Call +.Fn run_rc_scripts +with the list of scripts to be run. +.Pp +For each script that will call .Fn run_rc_script -(from +(both functions are from .Xr rc.subr 8 ) , which sets .Va $1 @@ -175,9 +175,11 @@ Re-run this time including the scripts in the .Va $local_startup directories. -Ignore everything up to the -.Va $early_late_divider , -then start executing the scripts as described above. +Call +.Fn run_rc_scripts +again with the new list of scripts. +It will skip any that have already been run and +execute the rest as described above. .It If the file .Va ${firstboot_sentinel} @@ -371,6 +373,17 @@ the command name (see the .Sx EXAMPLES section). .Pp +The configuration files are normally read only once at the start of a boot +sequence; if a script needs to +.Cm enable +or +.Cm disable +any other script that would run later in the sequence, it must send a +.Dv SIGALRM +to the rc process (identified by +.Ev $RC_PID ) +to have it re-read the files. +.Pp The following key points apply to old-style scripts in .Pa /usr/local/etc/rc.d/ : .Bl -bullet @@ -438,18 +451,6 @@ is not set, when going from single-user to multi-user mode for example, the script does not do anything. .Pp The -.Pa /etc/rc.d/local -script can execute scripts from multiple -.Nm rc.d/ -directories. -The default location includes -.Pa /usr/local/etc/rc.d/ , -but these may be overridden with the -.Va local_startup -.Xr rc.conf 5 -variable. -.Pp -The .Pa /etc/rc.d/serial script is used to set any special configurations for serial devices. .Pp @@ -575,8 +576,8 @@ is unnecessary, but is often included. .Xr sysrc 8 .Pp .Rs -.%T "Practical rc.d scripting in BSD" -.%U "https://docs.freebsd.org/en/articles/rc-scripting/" +.%T Practical rc.d scripting in BSD +.%U <https://docs.freebsd.org/en/articles/rc-scripting/> .Re .Sh HISTORY The diff --git a/share/man/man8/rc.sendmail.8 b/share/man/man8/rc.sendmail.8 deleted file mode 100644 index d8dff43fdbe3..000000000000 --- a/share/man/man8/rc.sendmail.8 +++ /dev/null @@ -1,298 +0,0 @@ -.\" Copyright (c) 1995 -.\" Jordan K. Hubbard -.\" Copyright (c) 2002 The FreeBSD Project -.\" 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 October 19, 2013 -.Dt RC.SENDMAIL 8 -.Os -.Sh NAME -.Nm rc.sendmail -.Nd -.Xr sendmail 8 -startup script -.Sh DESCRIPTION -The -.Nm -script is used by -.Pa /etc/rc -at boot time to start -.Xr sendmail 8 . -It is meant to be -.Xr sendmail 8 -specific and not a generic script for all MTAs. -It is only called by -.Pa /etc/rc -if the -.Xr rc.conf 5 -.Va mta_start_script -variable is set to -.Pa /etc/rc.sendmail . -.Pp -The -.Nm -script can take an optional argument specifying the action to -perform. -The available actions are: -.Bl -tag -width ".Cm restart-mspq" -.It Cm start -Starts both the MTA and the MSP queue runner. -.It Cm stop -Stops both the MTA and the MSP queue runner. -.It Cm restart -Restarts both the MTA and the MSP queue runner. -.It Cm start-mta -Starts just the MTA. -.It Cm stop-mta -Stops just the MTA. -.It Cm restart-mta -Restarts just the MTA. -.It Cm start-mspq -Starts just the MSP queue runner. -.It Cm stop-mspq -Stops just the MSP queue runner. -.It Cm restart-mspq -Restarts just the MSP queue runner. -.El -.Pp -If no action is specified, -.Cm start -is assumed. -.Pp -The -.Nm -script is also used by -.Pa /etc/mail/Makefile -to enable the -.Pa Makefile Ns 's -.Cm start , stop , -and -.Cm restart -targets. -.Sh RC.CONF VARIABLES -The following variables affect the behavior of -.Nm . -They are defined in -.Pa /etc/defaults/rc.conf -and can be changed in -.Pa /etc/rc.conf . -.Bl -tag -width indent -.It Va sendmail_enable -.Pq Vt str -If set to -.Dq Li YES , -run the -.Xr sendmail 8 -daemon at system boot time. -If set to -.Dq Li NO , -do not run a -.Xr sendmail 8 -daemon to listen for incoming network mail. -This does not preclude a -.Xr sendmail 8 -daemon listening on the SMTP port of the loopback interface. -The -.Dq Li NONE -option is deprecated and should not be used. -It will be removed in a future release. -.It Va sendmail_cert_create -.Pq Vt str -If -.Va sendmail_enable -is set to -.Dq Li YES , -create a signed certificate -.Pa /etc/mail/certs/host.cert -representing -.Pa /etc/mail/certs/host.key -by the CA certificate in -.Pa /etc/mail/certs/cacert.pem . -This will enable connecting hosts to negotiate STARTTLS allowing incoming -email to be encrypted in transit. -.Xr sendmail 8 -needs to be configured to use these generated files. -The default configuration in -.Pa /etc/mail/freebsd.mc -has the required options in it. -.It Va sendmail_cert_cn -.Pq Vt str -If -.Va sendmail_enable -is set to -.Dq Li YES -and -.Va sendmail_cert_create -is set to -.Dq Li YES , -this is the Common Name (CN) of the certificate that will be created. -If -.Va sendmail_cert_cn -is not set, the system's hostname will be used. -If there is no hostname set, -.Dq Li amnesiac -will be used. -.It Va sendmail_flags -.Pq Vt str -If -.Va sendmail_enable -is set to -.Dq Li YES , -these are the flags to pass to the -.Xr sendmail 8 -daemon. -.It Va sendmail_submit_enable -.Pq Vt bool -If set to -.Dq Li YES -and -.Va sendmail_enable -is set to -.Dq Li NO , -run -.Xr sendmail 8 -using -.Va sendmail_submit_flags -instead of -.Va sendmail_flags . -This is intended to allow local mail submission via -a localhost-only listening SMTP service required for running -.Xr sendmail 8 -as a non-set-user-ID binary. -Note that this does not work inside -.Xr jail 2 -systems, as jails do not allow binding to just the localhost interface. -.It Va sendmail_submit_flags -.Pq Vt str -If -.Va sendmail_enable -is set to -.Dq Li NO -and -.Va sendmail_submit_enable -is set to -.Dq Li YES , -these are the flags to pass to the -.Xr sendmail 8 -daemon. -.It Va sendmail_outbound_enable -.Pq Vt bool -If set to -.Dq Li YES -and both -.Va sendmail_enable -and -.Va sendmail_submit_enable -are set to -.Dq Li NO , -run -.Xr sendmail 8 -using -.Va sendmail_outbound_flags -instead of -.Va sendmail_flags . -This is intended to allow local mail queue management -for systems that do not offer a listening SMTP service. -.It Va sendmail_outbound_flags -.Pq Vt str -If both -.Va sendmail_enable -and -.Va sendmail_submit_enable -are set to -.Dq Li NO -and -.Va sendmail_outbound_enable -is set to -.Dq Li YES , -these are the flags to pass to the -.Xr sendmail 8 -daemon. -.It Va sendmail_msp_queue_enable -.Pq Vt bool -If set to -.Dq Li YES , -start a client (MSP) queue runner -.Xr sendmail 8 -daemon at system boot time. -As of sendmail 8.12, a separate queue is used for command line -submissions. -The client queue runner ensures that nothing is -left behind in the submission queue. -.It Va sendmail_msp_queue_flags -.Pq Vt str -If -.Va sendmail_msp_queue_enable -is set to -.Dq Li YES , -these are the flags to pass to the -.Xr sendmail 8 -daemon. -.El -.Pp -These variables are used to determine how the -.Xr sendmail 8 -daemons are started: -.Bd -literal -offset indent -# MTA -if (${sendmail_enable} == NONE) - # Do nothing -else if (${sendmail_enable} == YES) - start sendmail with ${sendmail_flags} -else if (${sendmail_submit_enable} == YES) - start sendmail with ${sendmail_submit_flags} -else if (${sendmail_outbound_enable} == YES) - start sendmail with ${sendmail_outbound_flags} -endif - -# MSP Queue Runner -if (${sendmail_enable} != NONE && - [ -r /etc/mail/submit.cf] && - ${sendmail_msp_queue_enable} == YES) - start sendmail with ${sendmail_msp_queue_flags} -endif -.Ed -.Pp -To completely prevent any -.Xr sendmail 8 -daemons from starting, you must -set the following variables in -.Pa /etc/rc.conf : -.Bd -literal -offset indent -sendmail_enable="NO" -sendmail_submit_enable="NO" -sendmail_outbound_enable="NO" -sendmail_msp_queue_enable="NO" -.Ed -.Sh SEE ALSO -.Xr rc.conf 5 , -.Xr rc 8 , -.Xr sendmail 8 -.Sh HISTORY -The -.Nm -file appeared in -.Fx 4.6 . diff --git a/share/man/man8/rc.subr.8 b/share/man/man8/rc.subr.8 index 130962ecdcdf..1fd5041cecd8 100644 --- a/share/man/man8/rc.subr.8 +++ b/share/man/man8/rc.subr.8 @@ -27,9 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd March 18, 2022 +.Dd October 23, 2024 .Dt RC.SUBR 8 .Os .Sh NAME @@ -49,22 +47,34 @@ .It .Ic check_process Ar procname Op Ar interpreter .It +.Ic DebugOn Ar tag ... +.It +.Ic DebugOff Ar tag ... +.It .Ic debug Ar message .It +.Ic dot Ar file ... +.It .Ic err Ar exitval Ar message .It .Ic force_depend Ar name .It .Ic info Ar message .It +.Ic is_verified Ar file +.It .Ic load_kld Oo Fl e Ar regex Oc Oo Fl m Ar module Oc Ar file .It -.Ic load_rc_config Op Ar service +.Ic load_rc_config Oo Ar flag Oc Op Ar service .It .Ic load_rc_config_var Ar name Ar var .It .Ic mount_critical_filesystems Ar type .It +.Ic rc_log Ar message +.It +.Ic rc_trace Ar level Ar message +.It .Ic rc_usage Ar command ... .It .Ic reverse_list Ar item ... @@ -73,8 +83,16 @@ .It .Ic run_rc_script Ar file Ar argument .It +.Ic run_rc_scripts Oo options Oc Ar file ... +.It +.Ic safe_dot Ar file ... +.It +.Ic sdot Ar file ... +.It .Ic startmsg Oo Fl n Oc Ar message .It +.Ic vdot Ar file ... +.It .Ic wait_for_pids Op Ar pid ... .It .Ic warn Ar message @@ -116,7 +134,7 @@ The .Ar action argument may be one of the following: -.Bl -tag -width ".Cm remove" +.Bl -tag -width "remove" .It Cm add .Ar file is now being backed up by or possibly re-entered into this backup mechanism. @@ -193,6 +211,43 @@ argument that matches .Ar interpreter is handled as per .Ic check_pidfile . +.It Ic DebugOn Ar tag ... +Enable tracing if not already enabled, +and any +.Ar tag +is found in +.Va DEBUG_SH +(a comma separated list of tags). +.Pp +Record the +.Ar tag +that caused it to be enabled in +.Va DEBUG_ON , +set +.Va DEBUG_DO +empty and +.Va DEBUG_SKIP +to +.Ql \&: . +.Pp +See +.Xr debug.sh 8 +for more details. +.It Ic DebugOff Ar tag ... +Disable tracing if enabled and any +.Ar tag +matches +.Va DEBUG_ON , +which means it was the reason tracing was enabled. +.Pp +Set +.Va DEBUG_DO +to +.Ql \&: , +and +.Va DEBUG_ON , +.Va DEBUG_SKIP +empty. .It Ic debug Ar message Display a debugging message to .Va stderr , @@ -214,6 +269,23 @@ by the .Xr rc.conf 5 variable .Va rc_debug . +.It Ic dot Ar file ... +For reading in unverified files. +.Pp +Ensure shell +.Li verify +option is off. +This option is only meaningful when +.Xr mac_veriexec 4 +is active. +.Pp +Read each +.Ar file +if it exists. +.Pp +Restore previous state of the +.Li verify +option. .It Ic err Ar exitval message Display an error message to .Va stderr , @@ -250,6 +322,18 @@ If the script fails for any reason it will output a warning and return with a return value of 1. If it was successful it will return 0. +.It Ic is_verified Ar file +If +.Xr veriexec 8 +does not exist, or +.Xr mac_veriexec 4 +is not active, just return success. +Otherwise use +.Xr veriexec 8 +to check if +.Ar file +is verified. +If not verified the return code will be 80 (EAUTH). .It Ic info Ar message Display an informational message to .Va stdout , @@ -281,7 +365,7 @@ regular expression matching the module name can be supplied via By default, the module is assumed to have the same name as .Ar file , which is not always the case. -.It Ic load_rc_config Op Ar service +.It Ic load_rc_config Oo Ar flag Oc Op Ar service Source in the configuration file(s) for .Ar service . If no @@ -300,6 +384,34 @@ arguments defined by the calling script, to provide an easy mechanism for an administrator to override the behaviour of a given .Xr rc.d 8 script without requiring the editing of that script. +.Pp +The function named by +.Va load_rc_config_reader +(default is +.Ic dot ) +is used to read configuration unless +.Ar flag +is: +.Bl -tag -width Ds +.It Fl s +use +.Ic sdot +to read configuration, +because we want verified configuration or +to use +.Ic safe_dot +to read an unverified configuration. +.It Fl v +use +.Ic vdot +to read in configuration only if it is verified. +.El +.Pp +.Ic DebugOn +will be called with tags derived from +.Ar name +to enable tracing if any appear in +.Va DEBUG_SH . .It Ic load_rc_config_var Ar name Ar var Read the .Xr rc.conf 5 @@ -319,6 +431,34 @@ variable .Va critical_filesystems_ Ns Ar type , mounting each one that is not currently mounted. +.It Ic rc_log Ar message +Output +.Ar message +with a timestamp, which is both human readable and +easily parsed for post processing, using: +.Bd -literal -offset indent +date "+@ %s [%Y-%m-%d %H:%M:%S %Z] $*" +.Ed +.It Ic rc_trace Ar level Ar message +If the file +.Pa /etc/rc.conf.d/rc_trace +exists and is not empty attempt to set +.Va RC_LEVEL +based on its content. +If the file is empty or does not contain +a value for +.Va RC_LEVEL , +set it to +.Li 0 . +.Pp +If +.Ar level +is greater than or equal to +.Va RC_LEVEL +pass +.Ar message +to +.Ic rc_log . .It Ic rc_usage Ar command ... Print a usage message for .Va $0 , @@ -347,7 +487,7 @@ scripts to be implemented in a small amount of shell code. .Ar argument is searched for in the list of supported commands, which may be one of: -.Bl -tag -width ".Cm restart" -offset indent +.Bl -tag -width "restart" -offset indent .It Cm start Start the service. This should check that the service is to be started as specified by @@ -383,7 +523,7 @@ If or .Va procname is set, also support: -.Bl -tag -width ".Cm restart" -offset indent +.Bl -tag -width "status" -offset indent .It Cm poll Wait for the command to exit. .It Cm status @@ -395,7 +535,7 @@ Other supported commands are listed in the optional variable .Pp .Ar argument may have one of the following prefixes which alters its operation: -.Bl -tag -width ".Li force" -offset indent +.Bl -tag -width "force" -offset indent .It Li fast Skip the check for an existing running process, and sets @@ -439,7 +579,7 @@ but only certain small classes of them. .Ic run_rc_command uses the following shell variables to control its behaviour. Unless otherwise stated, these are optional. -.Bl -tag -width ".Va procname" -offset indent +.Bl -tag -width "procname" -offset indent .It Va name The name of this script. This is not optional. @@ -633,6 +773,8 @@ Login class to use with .Va ${name}_limits . Defaults to .Dq Li daemon . +.It Va ${name}_offcmd +Shell commands to run during start if a service is not enabled. .It Va ${name}_oomprotect .Xr protect 1 .Va command @@ -685,6 +827,16 @@ This is a generic version of .Va ${name}_fib , or .Va ${name}_nice . +.It Va ${name}_setup +Optional command to be run during +.Cm start , +.Cm restart , +and +.Cm reload +prior to the respective +.Ar argument Ns Va _precmd . +If the command fails for any reason it will output a warning, +but execution will continue. .It Ar argument Ns Va _cmd Shell commands which override the default method for .Ar argument . @@ -724,17 +876,16 @@ if .Ar argument Ns Va _cmd is not defined, then a default method is provided by .Ic run_rc_command : -.Bl -tag -width ".Sy Argument" -offset indent -.It Sy Argument -.Sy Default method -.It Cm start +.Bl -column "Argument" "Default Method" -offset indent +.It Sy Argument Ta Sy Default method +.It Cm start Ta If .Va command is not running and .Ic checkyesno Va rcvar succeeds, start .Va command . -.It Cm stop +.It Cm stop Ta Determine the PIDs of .Va command with @@ -746,7 +897,7 @@ or those PIDs, and run .Ic wait_for_pids on those PIDs. -.It Cm reload +.It Cm reload Ta Similar to .Cm stop , except that it uses @@ -763,21 +914,21 @@ It can be enabled via if appropriate: .Pp .Dl "extra_commands=reload" -.It Cm restart +.It Cm restart Ta Runs the .Cm stop method, then the .Cm start method. -.It Cm status +.It Cm status Ta Show the PID of .Va command , or some other script specific status operation. -.It Cm poll +.It Cm poll Ta Wait for .Va command to exit. -.It Cm rcvar +.It Cm rcvar Ta Display which .Xr rc.conf 5 variable is used (if any). @@ -793,7 +944,7 @@ The following variables are available to the methods as well as after .Ic run_rc_command has completed: -.Bl -tag -width ".Va rc_service" -offset indent +.Bl -tag -width "rc_service" -offset indent .It Va rc_arg Argument provided to .Ic run_rc_command , @@ -848,42 +999,94 @@ is started: .Ar argument Ns Va _postcmd . .Ed .Pp -The startup behaviour of +Call +.Ic rc_trace +to indicate that +.Ar file +is to be run. +.Pp +However, if +.Ic is_verified Ar file +fails, just return. +.Pp +.Ic DebugOn +will be called with tags derrived from +.Va name +and +.Va rc_arg +to enable tracing if any of those tags appear in +.Va DEBUG_SH . +.Pp +.Ic run_rc_script +executes .Ar file -depends upon the following checks: +unless: .Bl -enum .It -If .Ar file ends in -.Pa .sh , -it is sourced into the current shell. +.Pa .sh +and lives in +.Pa /etc/rc.d . .It -If .Ar file appears to be a backup or scratch file -(e.g., with a suffix of -.Pa ~ , # , .OLD , +.Po e.g., with a suffix of +.Pa ~ , # , .OLD , ,v , or -.Pa .orig ) , -ignore it. -.It -If -.Ar file -is not executable, ignore it. +.Pa .orig Pc . .It -If the -.Xr rc.conf 5 -variable -.Va rc_fast_and_loose -is empty, -source .Ar file -in a sub shell, -otherwise source +is not executable. +.El +.It Ic run_rc_scripts Oo options Oc file ... +Call +.Ic run_rc_script +for each +.Ar file , +unless it is already recorded as having been run. +.Pp +The +.Ar options +are: +.Bl -tag -width "--break break" +.It Ic --arg Ar arg +Pass +.Ar arg +to +.Ic run_rc_script , +default is +.Ar _boot +set by +.Xr rc 8 . +.It Ic --break Ar break +Stop processing if any .Ar file -into the current shell. +matches any +.Ar break .El +.It Ic safe_dot Ar file ... +Used by +.Ic sdot +when +.Xr mac_veriexec 4 +is active and +.Ar file +is not verified. +.Pp +This function limits the input from +.Ar file +to simple variable assignments with any +non-alphanumeric characters replaced with +.Ql _ . +.It Ic sdot Ar file ... +For reading in configuration files. +Skip files that do not exist or are empty. +Try using +.Ic vdot +and if that fails (the file is unverified) +fall back to using +.Ic safe_dot . .It Ic startmsg Oo Fl n Oc Ar message Display a start message to .Va stdout . @@ -913,6 +1116,27 @@ 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 vdot Ar file ... +For reading in only verified files. +.Pp +Ensure shell +.Li verify +option is on. +This option is only meaningful when +.Xr mac_veriexec 4 +is active, +otherwise this function is effectively the same as +.Ic dot . +.Pp +Read in each +.Ar file +if it exists and +.Ic is_verfied Ar file +is successful, otherwise set return code to 80 (EAUTH). +.Pp +Restore previous state of the +.Li verify +option. .It Ic wait_for_pids Op Ar pid ... Wait until all of the provided .Ar pids @@ -934,7 +1158,7 @@ and then .Ar message . .El .Sh FILES -.Bl -tag -width ".Pa /etc/rc.subr" -compact +.Bl -tag -width "/etc/rc.subr" -compact .It Pa /etc/rc.subr The .Nm @@ -943,6 +1167,7 @@ file resides in .El .Sh SEE ALSO .Xr rc.conf 5 , +.Xr debug.sh 8 , .Xr rc 8 .Sh HISTORY The diff --git a/share/man/man8/rescue.8 b/share/man/man8/rescue.8 index a87ffb31b1a9..3e14230a585b 100644 --- a/share/man/man8/rescue.8 +++ b/share/man/man8/rescue.8 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 30, 2022 .Dt RESCUE 8 .Os diff --git a/share/man/man8/uefi.8 b/share/man/man8/uefi.8 index b7d62fa4eeae..e29bed134850 100644 --- a/share/man/man8/uefi.8 +++ b/share/man/man8/uefi.8 @@ -21,9 +21,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd March 18, 2022 +.Dd August 31, 2023 .Dt UEFI 8 .Os .Sh NAME @@ -47,7 +45,7 @@ The boot process loads system bootstrap code located in an EFI System Partition (ESP). The ESP is a GPT or MBR partition with a specific identifier that contains an -.Xr msdosfs 5 +.Xr msdosfs 4 FAT file system with a specified file hierarchy. .Bl -column -offset indent "Partition Scheme" "ESP Identifier" .It Sy "Partition Scheme" Ta Sy "ESP Identifier" @@ -91,7 +89,7 @@ or .It .Pa loader.efi loads and boots the kernel, as described in -.Xr loader 8 . +.Xr loader.efi 8 . .El .Pp The @@ -110,14 +108,15 @@ Default kernel Typical non-default kernel (optional) .El .Sh SEE ALSO +.Xr msdosfs 4 , .Xr vt 4 , .Xr boot.config 5 , -.Xr msdosfs 5 , .Xr boot 8 , .Xr efibootmgr 8 , .Xr efidp 8 , .Xr efivar 8 , .Xr gpart 8 , +.Xr loader.efi 8 , .Xr uefisign 8 .Sh HISTORY EFI boot support for the ia64 architecture first appeared in @@ -127,7 +126,7 @@ boot support for amd64 first appeared in .Fx 10.1 ; for arm64 in .Fx 11.0 ; -for armv6 and armv7 in +for armv7 in .Fx 12.0 ; and for riscv in .Fx 13.0 . diff --git a/share/man/man8/yp.8 b/share/man/man8/yp.8 index 8ca91be23cd2..1663d4da26ca 100644 --- a/share/man/man8/yp.8 +++ b/share/man/man8/yp.8 @@ -25,9 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" from: @(#)yp.8 1.0 (deraadt) 4/26/93 -.\" $FreeBSD$ -.\" .Dd December 14, 2011 .Dt YP 8 .Os diff --git a/share/man/man9/BUF_ISLOCKED.9 b/share/man/man9/BUF_ISLOCKED.9 index 8616ff5d65a8..09dfc458c834 100644 --- a/share/man/man9/BUF_ISLOCKED.9 +++ b/share/man/man9/BUF_ISLOCKED.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 22, 2008 .Dt BUF_ISLOCKED 9 .Os diff --git a/share/man/man9/BUF_LOCK.9 b/share/man/man9/BUF_LOCK.9 index 9676af83efac..f70c3bb9be16 100644 --- a/share/man/man9/BUF_LOCK.9 +++ b/share/man/man9/BUF_LOCK.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 9, 2001 .Dt BUF_LOCK 9 .Os diff --git a/share/man/man9/BUF_LOCKFREE.9 b/share/man/man9/BUF_LOCKFREE.9 index 1226ceadacd6..489e5865025c 100644 --- a/share/man/man9/BUF_LOCKFREE.9 +++ b/share/man/man9/BUF_LOCKFREE.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 9, 2001 .Dt BUF_LOCKFREE 9 .Os diff --git a/share/man/man9/BUF_LOCKINIT.9 b/share/man/man9/BUF_LOCKINIT.9 index 98d3b2aa1149..40730c2055e8 100644 --- a/share/man/man9/BUF_LOCKINIT.9 +++ b/share/man/man9/BUF_LOCKINIT.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 6, 2005 .Dt BUF_LOCKINIT 9 .Os diff --git a/share/man/man9/BUF_RECURSED.9 b/share/man/man9/BUF_RECURSED.9 index fccf83f40e96..48cd2a58cef2 100644 --- a/share/man/man9/BUF_RECURSED.9 +++ b/share/man/man9/BUF_RECURSED.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 22, 2008 .Dt BUF_RECURSED 9 .Os diff --git a/share/man/man9/BUF_TIMELOCK.9 b/share/man/man9/BUF_TIMELOCK.9 index 151e7f5251b7..dc8f2420f396 100644 --- a/share/man/man9/BUF_TIMELOCK.9 +++ b/share/man/man9/BUF_TIMELOCK.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 9, 2001 .Dt BUF_TIMELOCK 9 .Os diff --git a/share/man/man9/BUF_UNLOCK.9 b/share/man/man9/BUF_UNLOCK.9 index e305a5d7f5c1..ed9f4cb82732 100644 --- a/share/man/man9/BUF_UNLOCK.9 +++ b/share/man/man9/BUF_UNLOCK.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 9, 2001 .Dt BUF_UNLOCK 9 .Os diff --git a/share/man/man9/BUS_ADD_CHILD.9 b/share/man/man9/BUS_ADD_CHILD.9 index ea3b2e5e7e73..bf77710866e2 100644 --- a/share/man/man9/BUS_ADD_CHILD.9 +++ b/share/man/man9/BUS_ADD_CHILD.9 @@ -22,8 +22,6 @@ .\" (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 April 8, 2018 .Dt BUS_ADD_CHILD 9 .Os diff --git a/share/man/man9/BUS_BIND_INTR.9 b/share/man/man9/BUS_BIND_INTR.9 index 162a8b5a9e08..206d20b2468e 100644 --- a/share/man/man9/BUS_BIND_INTR.9 +++ b/share/man/man9/BUS_BIND_INTR.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 14, 2009 .Dt BUS_BIND_INTR 9 .Os diff --git a/share/man/man9/BUS_CHILD_DELETED.9 b/share/man/man9/BUS_CHILD_DELETED.9 index 4ab46bef0a44..a7c0d736a3cc 100644 --- a/share/man/man9/BUS_CHILD_DELETED.9 +++ b/share/man/man9/BUS_CHILD_DELETED.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 21, 2012 .Dt BUS_CHILD_DELETED 9 .Os diff --git a/share/man/man9/BUS_CHILD_DETACHED.9 b/share/man/man9/BUS_CHILD_DETACHED.9 index b79b9c412d1c..8b59d1362d3d 100644 --- a/share/man/man9/BUS_CHILD_DETACHED.9 +++ b/share/man/man9/BUS_CHILD_DETACHED.9 @@ -25,9 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd August 21, 2012 +.Dd January 9, 2025 .Dt BUS_CHILD_DETACHED 9 .Os .Sh NAME @@ -41,7 +39,10 @@ .Sh DESCRIPTION The .Fn BUS_CHILD_DETACHED -method is invoked by the new-bus framework after a device is detached. +method is invoked by the new-bus framework after a device is detached +or if a driver's attach routine +.Pq see Xr DEVICE_ATTACH 9 +fails. A bus driver can provide an implementation of this method to reclaim any resources allocated on behalf of the child or to cleanup state not properly released by a diff --git a/share/man/man9/BUS_CHILD_LOCATION.9 b/share/man/man9/BUS_CHILD_LOCATION.9 index 647b942b087a..808b55b8981c 100644 --- a/share/man/man9/BUS_CHILD_LOCATION.9 +++ b/share/man/man9/BUS_CHILD_LOCATION.9 @@ -21,8 +21,6 @@ .\" (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 April 22, 2021 .Dt BUS_CHILD_LOCATION 9 .Os diff --git a/share/man/man9/BUS_CHILD_PNPINFO.9 b/share/man/man9/BUS_CHILD_PNPINFO.9 index eac9072d0514..2117aab62d38 100644 --- a/share/man/man9/BUS_CHILD_PNPINFO.9 +++ b/share/man/man9/BUS_CHILD_PNPINFO.9 @@ -21,8 +21,6 @@ .\" (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 April 22, 2021 .Dt BUS_CHILD_PNPINFO 9 .Os diff --git a/share/man/man9/BUS_CONFIG_INTR.9 b/share/man/man9/BUS_CONFIG_INTR.9 index 0a049a95875e..aaeb6c3ec089 100644 --- a/share/man/man9/BUS_CONFIG_INTR.9 +++ b/share/man/man9/BUS_CONFIG_INTR.9 @@ -23,14 +23,13 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd January 15, 2017 +.Dd January 16, 2025 .Dt BUS_CONFIG_INTR 9 .Os .\" .Sh NAME -.Nm BUS_CONFIG_INTR +.Nm BUS_CONFIG_INTR , +.Nm bus_config_intr .Nd "configure interrupt polarity and trigger mode" .\" .Sh SYNOPSIS @@ -38,9 +37,13 @@ .In sys/bus.h .Ft int .Fo BUS_CONFIG_INTR +.Fa "device_t bus" "device_t dev" "int irq" "enum intr_trigger trig" +.Fa "enum intr_polarity pol" +.Fc +.Ft int +.Fo bus_config_intr .Fa "device_t dev" "int irq" "enum intr_trigger trig" "enum intr_polarity pol" .Fc -.\" .Sh DESCRIPTION The .Fn BUS_CONFIG_INTR @@ -55,6 +58,11 @@ that it is called prior to .Xr BUS_SETUP_INTR 9 . .Pp The +.Fn bus_config_intr +function is a simple wrapper around +.Fn BUS_CONFIG_INTR . +.Pp +The .Fa trig argument can be one of: .Bl -tag -width ".Dv INTR_TRIGGER_CONFORM" diff --git a/share/man/man9/BUS_DESCRIBE_INTR.9 b/share/man/man9/BUS_DESCRIBE_INTR.9 index 86034170c597..80dce06ea7dd 100644 --- a/share/man/man9/BUS_DESCRIBE_INTR.9 +++ b/share/man/man9/BUS_DESCRIBE_INTR.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 9, 2015 .Dt BUS_DESCRIBE_INTR 9 .Os diff --git a/share/man/man9/BUS_GET_CPUS.9 b/share/man/man9/BUS_GET_CPUS.9 index d22fc2b6332a..d076bb827dec 100644 --- a/share/man/man9/BUS_GET_CPUS.9 +++ b/share/man/man9/BUS_GET_CPUS.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 1, 2016 .Dt BUS_GET_CPUS 9 .Os diff --git a/share/man/man9/BUS_GET_PROPERTY.9 b/share/man/man9/BUS_GET_PROPERTY.9 index 6d6bc14b4d8f..74fcd7f7dee8 100644 --- a/share/man/man9/BUS_GET_PROPERTY.9 +++ b/share/man/man9/BUS_GET_PROPERTY.9 @@ -1,5 +1,5 @@ .\" - -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2021 Semihalf .\" @@ -23,8 +23,6 @@ .\" (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 February 18, 2022 .Dt BUS_GET_PROPERTY 9 .Os diff --git a/share/man/man9/BUS_HINTED_CHILD.9 b/share/man/man9/BUS_HINTED_CHILD.9 new file mode 100644 index 000000000000..860ee3a995e3 --- /dev/null +++ b/share/man/man9/BUS_HINTED_CHILD.9 @@ -0,0 +1,37 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 John Baldwin <jhb@FreeBSD.org> +.Dd February 5, 2025 +.Dt BUS_HINTED_CHILD 9 +.Os +.Sh NAME +.Nm BUS_HINTED_CHILD +.Nd notify a bus device about a potential child device identified by hints +.Sh SYNOPSIS +.In sys/param.h +.In sys/bus.h +.Ft void +.Fn BUS_HINTED_CHILD "device_t dev" "const char *dname" "int dunit" +.Sh DESCRIPTION +The +.Fn BUS_HINTED_CHILD +method is invoked by the +.Xr bus_enumerate_hinted_children 9 +function for each set of named hints whose +.Dq at +hint matches the bus device +.Fa dev . +Typically, this method should determine if the set of hints for the given +device name and unit sufficiently describe a new device. +If so, a new device should be added via +.Xr BUS_ADD_CHILD 9 . +.Sh SEE ALSO +.Xr BUS_ADD_CHILD 9 , +.Xr bus_enumerate_hinted_children 9 , +.Xr device 9 +.Sh HISTORY +The +.Fn BUS_HINTED_CHILD +method first appeared in +.Fx 6.2 . diff --git a/share/man/man9/BUS_NEW_PASS.9 b/share/man/man9/BUS_NEW_PASS.9 index e647f8f6cbda..de34f0836dcc 100644 --- a/share/man/man9/BUS_NEW_PASS.9 +++ b/share/man/man9/BUS_NEW_PASS.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 8, 2009 .Dt BUS_NEW_PASS 9 .Os diff --git a/share/man/man9/BUS_PRINT_CHILD.9 b/share/man/man9/BUS_PRINT_CHILD.9 index a3709d94866b..037ca59f1a70 100644 --- a/share/man/man9/BUS_PRINT_CHILD.9 +++ b/share/man/man9/BUS_PRINT_CHILD.9 @@ -26,8 +26,6 @@ .\" (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 6, 2005 .Dt BUS_PRINT_CHILD 9 .Os diff --git a/share/man/man9/BUS_READ_IVAR.9 b/share/man/man9/BUS_READ_IVAR.9 index 153b324b56a4..51e17df20067 100644 --- a/share/man/man9/BUS_READ_IVAR.9 +++ b/share/man/man9/BUS_READ_IVAR.9 @@ -26,8 +26,6 @@ .\" (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 June 16, 1998 .Dt BUS_READ_IVAR 9 .Os diff --git a/share/man/man9/BUS_RESCAN.9 b/share/man/man9/BUS_RESCAN.9 index fbadfc5498d3..6f3eb39d593b 100644 --- a/share/man/man9/BUS_RESCAN.9 +++ b/share/man/man9/BUS_RESCAN.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 27, 2016 .Dt BUS_RESCAN 9 .Os diff --git a/share/man/man9/BUS_SETUP_INTR.9 b/share/man/man9/BUS_SETUP_INTR.9 index eab62e39ecc4..238f434e2d65 100644 --- a/share/man/man9/BUS_SETUP_INTR.9 +++ b/share/man/man9/BUS_SETUP_INTR.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 3, 2010 .Dt BUS_SETUP_INTR 9 .Os diff --git a/share/man/man9/CTASSERT.9 b/share/man/man9/CTASSERT.9 index 39f25d6dbe82..0a55b45059f0 100644 --- a/share/man/man9/CTASSERT.9 +++ b/share/man/man9/CTASSERT.9 @@ -24,8 +24,6 @@ .\" (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 August 1, 2015 .Dt CTASSERT 9 .Os diff --git a/share/man/man9/DB_COMMAND.9 b/share/man/man9/DB_COMMAND.9 index 15c2adce3580..b07281a353ac 100644 --- a/share/man/man9/DB_COMMAND.9 +++ b/share/man/man9/DB_COMMAND.9 @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd June 24, 2022 +.Dd July 5, 2023 .Dt DB_COMMAND 9 .Os .Sh NAME @@ -34,11 +32,17 @@ .Nm DB_SHOW_COMMAND , .Nm DB_SHOW_COMMAND_FLAGS , .Nm DB_SHOW_ALL_COMMAND , +.Nm DB_TABLE_COMMAND , +.Nm DB_TABLE_COMMAND_FLAGS , .Nm DB_ALIAS , .Nm DB_ALIAS_FLAGS , .Nm DB_SHOW_ALIAS , .Nm DB_SHOW_ALIAS_FLAGS , -.Nm DB_SHOW_ALL_ALIAS +.Nm DB_SHOW_ALL_ALIAS , +.Nm DB_TABLE_ALIAS , +.Nm DB_TABLE_ALIAS_FLAGS +.Nm DB_DECLARE_TABLE , +.Nm DB_DEFINE_TABLE , .Nd Extends the ddb command set .Sh SYNOPSIS .In ddb/ddb.h @@ -47,11 +51,17 @@ .Fn DB_SHOW_COMMAND "command_name" "command_function" .Fn DB_SHOW_COMMAND_FLAGS "command_name" "command_function" "flags" .Fn DB_SHOW_ALL_COMMAND "command_name" "command_function" +.Fn DB_TABLE_COMMAND "table" "command_name" "command_function" +.Fn DB_TABLE_COMMAND_FLAGS "table" "command_name" "command_function" "flags" .Fn DB_ALIAS "alias_name" "command_function" .Fn DB_ALIAS_FLAGS "alias_name" "command_function" "flags" .Fn DB_SHOW_ALIAS "alias_name" "command_function" .Fn DB_SHOW_ALIAS_FLAGS "alias_name" "command_function" "flags" .Fn DB_SHOW_ALL_ALIAS "alias_name" "command_function" +.Fn DB_TABLE_ALIAS "table" "alias_name" "command_function" +.Fn DB_TABLE_ALIAS_FLAGS "table" "alias_name" "command_function" "flags" +.Fn DB_DEFINE_TABLE "parent" "name" "table" +.Fn DB_DECLARE_TABLE "table" .Sh DESCRIPTION The .Fn DB_COMMAND @@ -78,10 +88,18 @@ command and command, respectively. .Pp The +.Fn DB_TABLE_COMMAND +macro is also similar to +.Fn DB_COMMAND +but adds the new command as a sub-command of the ddb command +.Fa table . +.Pp +The .Fn DB_ALIAS , .Fn DB_SHOW_ALIAS , +.Fn DB_SHOW_ALL_ALIAS , and -.Fn DB_SHOW_ALL_ALIAS +.Fn DB_TABLE_ALIAS macros register the existing .Fa command_function under the alternative command name @@ -117,6 +135,19 @@ For example, the .Sy examine command will display words in decimal form if it is passed the modifier "d". .El +.Pp +The +.Fn DB_DEFINE_TABLE +macro adds a new command +.Fa name +as a sub-command of the existing command table +.Fa parent . +The new command defines a table named +.Fa table +which contains sub-commands. +New commands and aliases can be added to this table by passing +.Fa table +as the first argument to one of the DB_TABLE_ macros. .Sh EXAMPLES In your module, the command is declared as: .Bd -literal diff --git a/share/man/man9/DECLARE_GEOM_CLASS.9 b/share/man/man9/DECLARE_GEOM_CLASS.9 index a6dc969e0986..108048f98ec0 100644 --- a/share/man/man9/DECLARE_GEOM_CLASS.9 +++ b/share/man/man9/DECLARE_GEOM_CLASS.9 @@ -22,8 +22,6 @@ .\" (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 August 13, 2007 .Dt DECLARE_GEOM_CLASS 9 .Os diff --git a/share/man/man9/DECLARE_MODULE.9 b/share/man/man9/DECLARE_MODULE.9 index 56f5b4e7444a..f7c49eee07db 100644 --- a/share/man/man9/DECLARE_MODULE.9 +++ b/share/man/man9/DECLARE_MODULE.9 @@ -26,8 +26,6 @@ .\" (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 February 13, 2018 .Dt DECLARE_MODULE 9 .Os diff --git a/share/man/man9/DEFINE_IFUNC.9 b/share/man/man9/DEFINE_IFUNC.9 index dbcd18f1b731..0bb75d1fd4da 100644 --- a/share/man/man9/DEFINE_IFUNC.9 +++ b/share/man/man9/DEFINE_IFUNC.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 18, 2019 .Dt DEFINE_IFUNC 9 .Os diff --git a/share/man/man9/DELAY.9 b/share/man/man9/DELAY.9 index 61cd235b5575..bfc8f7949f4b 100644 --- a/share/man/man9/DELAY.9 +++ b/share/man/man9/DELAY.9 @@ -25,8 +25,6 @@ .\" (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 April 20, 2013 .Dt DELAY 9 .Os diff --git a/share/man/man9/DEVICE_ATTACH.9 b/share/man/man9/DEVICE_ATTACH.9 index 68727715a9a5..8e7c46252a6f 100644 --- a/share/man/man9/DEVICE_ATTACH.9 +++ b/share/man/man9/DEVICE_ATTACH.9 @@ -26,9 +26,7 @@ .\" (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 15, 2017 +.Dd February 5, 2025 .Dt DEVICE_ATTACH 9 .Os .Sh NAME @@ -48,19 +46,20 @@ The .Fn DEVICE_ATTACH method should initialize the hardware and allocate other system resources (such as -.Xr devfs 5 +.Xr devfs 4 entries). .Pp Devices which implement buses should use this method to probe for the existence of devices attached to the bus and add them as children. If this is combined with the use of -.Xr bus_generic_attach 9 +.Xr bus_attach_children 9 the child devices will be automatically probed and attached. .Sh RETURN VALUES Zero is returned on success, otherwise an appropriate error is returned. .Sh SEE ALSO -.Xr devfs 5 , +.Xr devfs 4 , +.Xr bus_attach_children 9 , .Xr device 9 , .Xr DEVICE_DETACH 9 , .Xr DEVICE_IDENTIFY 9 , diff --git a/share/man/man9/DEVICE_DETACH.9 b/share/man/man9/DEVICE_DETACH.9 index 8b4c43c2f2d0..5f1bf7a3295f 100644 --- a/share/man/man9/DEVICE_DETACH.9 +++ b/share/man/man9/DEVICE_DETACH.9 @@ -26,8 +26,6 @@ .\" (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 June 16, 1998 .Dt DEVICE_DETACH 9 .Os diff --git a/share/man/man9/DEVICE_IDENTIFY.9 b/share/man/man9/DEVICE_IDENTIFY.9 index 0011f8a4492b..31063ae60dff 100644 --- a/share/man/man9/DEVICE_IDENTIFY.9 +++ b/share/man/man9/DEVICE_IDENTIFY.9 @@ -26,46 +26,46 @@ .\" (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 15, 2017 +.Dd February 5, 2025 .Dt DEVICE_IDENTIFY 9 .Os .Sh NAME .Nm DEVICE_IDENTIFY -.Nd identify a device, register it +.Nd identify new child devices and register them .Sh SYNOPSIS .In sys/param.h .In sys/bus.h .Ft void .Fn DEVICE_IDENTIFY "driver_t *driver" "device_t parent" .Sh DESCRIPTION -The identify function for a device is only needed for devices on buses -that cannot identify their children independently, e.g.\& the ISA bus. -It is used to recognize the device (usually done by accessing non-ambiguous -registers in the hardware) and to tell the kernel about it and thus -creating a new device instance. +The identify method of a device driver is used to add devices that cannot be +enumerated by the standard method on a bus device. +Devices can be enumerated in various ways including accessing non-ambiguous +device registers and parsing firmware tables. +Software-only pseudo devices are also often enumerated via identify methods. .Pp +For each newly identified device, +a new device instance should be created by invoking the .Xr BUS_ADD_CHILD 9 -is used to register the device as a child of the bus. -The device's resources (such as IRQ and I/O ports) are registered -with the kernel by calling -.Fn bus_set_resource -for each resource (refer to +method. +If the identify method is able to discover other properties about the new +device, those should also be set. +For example, device resources should be added to the device by calling .Xr bus_set_resource 9 -for more information). +for each resource. .Pp -Since the device tree and the device driver tree are disjoint, the -.Fn DEVICE_IDENTIFY -routine needs to take this into account. -If you load and unload your device driver that has the identify -routine, the child node has the potential for adding the same node -multiple times unless specific measure are taken to preclude that -possibility. +An identify method might be invoked multiple times. +If a device driver is unloaded and loaded, +the identify method will be called a second time after being reloaded. +As a result, the identify method should avoid duplicate devices. +Devices added by identify methods typically use a fixed device name +in which case +.Xr device_find_child 9 +can be used to detect existing devices. .Sh EXAMPLES The following pseudo-code shows an example of a function that probes for a piece of hardware and registers it and its resource -(an I/O port) with the kernel. +(an I/O port) with the parent bus device. .Bd -literal void foo_identify(driver_t *driver, device_t parent) @@ -74,21 +74,18 @@ foo_identify(driver_t *driver, device_t parent) retrieve_device_information; if (devices matches one of your supported devices && - not already in device tree) { - child = BUS_ADD_CHILD(parent, 0, "foo", -1); + device_get_child(parent, "foo", DEVICE_UNIT_ANY) == NULL) { + child = BUS_ADD_CHILD(parent, 0, "foo", DEVICE_UNIT_ANY); bus_set_resource(child, SYS_RES_IOPORT, 0, FOO_IOADDR, 1); } } .Ed .Sh SEE ALSO .Xr BUS_ADD_CHILD 9 , +.Xr bus_identify_children 9 , .Xr bus_set_resource 9 , .Xr device 9 , -.Xr device_add_child 9 , -.Xr DEVICE_ATTACH 9 , -.Xr DEVICE_DETACH 9 , -.Xr DEVICE_PROBE 9 , -.Xr DEVICE_SHUTDOWN 9 +.Xr device_find_child 9 .Sh AUTHORS This manual page was written by .An Alexander Langer Aq Mt alex@FreeBSD.org . diff --git a/share/man/man9/DEVICE_PROBE.9 b/share/man/man9/DEVICE_PROBE.9 index 5fef21ff0349..292ffceb89d8 100644 --- a/share/man/man9/DEVICE_PROBE.9 +++ b/share/man/man9/DEVICE_PROBE.9 @@ -26,8 +26,6 @@ .\" (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 February 8, 2012 .Dt DEVICE_PROBE 9 .Os diff --git a/share/man/man9/DEVICE_SHUTDOWN.9 b/share/man/man9/DEVICE_SHUTDOWN.9 index 0bf6a8bc8671..4ab3646bbae7 100644 --- a/share/man/man9/DEVICE_SHUTDOWN.9 +++ b/share/man/man9/DEVICE_SHUTDOWN.9 @@ -26,8 +26,6 @@ .\" (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 6, 2005 .Dt DEVICE_SHUTDOWN 9 .Os diff --git a/share/man/man9/DEV_MODULE.9 b/share/man/man9/DEV_MODULE.9 index e28b245ea635..084ba1704cc3 100644 --- a/share/man/man9/DEV_MODULE.9 +++ b/share/man/man9/DEV_MODULE.9 @@ -26,8 +26,6 @@ .\" (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 19, 2012 .Dt DEV_MODULE 9 .Os diff --git a/share/man/man9/DRIVER_MODULE.9 b/share/man/man9/DRIVER_MODULE.9 index 15f4a87c2276..c349375b68ce 100644 --- a/share/man/man9/DRIVER_MODULE.9 +++ b/share/man/man9/DRIVER_MODULE.9 @@ -26,8 +26,6 @@ .\" (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 April 19, 2022 .Dt DRIVER_MODULE 9 .Os diff --git a/share/man/man9/EVENTHANDLER.9 b/share/man/man9/EVENTHANDLER.9 index b369e2f03258..4bf3eebaa445 100644 --- a/share/man/man9/EVENTHANDLER.9 +++ b/share/man/man9/EVENTHANDLER.9 @@ -21,9 +21,8 @@ .\" 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 17, 2020 +.Dd October 7, 2022 .Dt EVENTHANDLER 9 .Os .Sh NAME @@ -258,150 +257,6 @@ The function removes all deregistered callbacks from the event list .Fa list . .El -.Ss Kernel Event Handlers -The following event handlers are present in the kernel: -.Bl -tag -width indent -.It Vt acpi_sleep_event -Callbacks invoked when the system is being sent to sleep. -.It Vt acpi_wakeup_event -Callbacks invoked when the system is being woken up. -.It Vt app_coredump_start -Callbacks invoked at start of application core dump. -.It Vt app_coredump_progress -Callbacks invoked during progress of application core dump. -.It Vt app_coredump_finish -Callbacks invoked at finish of application core dump. -.It Vt app_coredump_error -Callbacks invoked on error of application core dump. -.It Vt bpf_track -Callbacks invoked when a BPF listener attaches to/detaches from network interface. -.It Vt cpufreq_levels_changed -Callback invoked when cpu frequency levels have changed. -.It Vt cpufreq_post_change -Callback invoked after cpu frequency has changed. -.It Vt cpufreq_pre_change -Callback invoked before cpu frequency has changed. -.It Vt dcons_poll -Callback invoked to poll for dcons changes. -.It Vt device_attach -Callback invoked after a device has attached. -.It Vt device_detach -Callbacks invoked before and after a device has detached. -.It Vt dev_clone -Callbacks invoked when a new entry is created under -.Pa /dev . -.It Vt group_attach_event -Callback invoked when an interfance has been added to an interface group. -.It Vt group_change_event -Callback invoked when an change has been made to an interface group. -.It Vt group_detach_event -Callback invoked when an interfance has been removed from an interface group. -.It Vt ifaddr_event -Callbacks invoked when an address is set up on a network interface. -.It Vt ifaddr_event_ext -Callback invoked when an address has been added or removed from an interface. -.It Vt if_clone_event -Callbacks invoked when an interface is cloned. -.It Vt iflladdr_event -Callback invoked when an if link layer address event has happened. -.It Vt ifnet_arrival_event -Callbacks invoked when a new network interface appears. -.It Vt ifnet_departure_event -Callbacks invoked when a network interface is taken down. -.It Vt ifnet_link_event -Callback invoked when an interfance link event has happened. -.It Vt kld_load -Callbacks invoked after a linker file has been loaded. -.It Vt kld_unload -Callbacks invoked after a linker file has been successfully unloaded. -.It Vt kld_unload_try -Callbacks invoked before a linker file is about to be unloaded. -These callbacks may be used to return an error and prevent the unload from -proceeding. -.It Vt livedumper_start -Callback invoked before beginning a kernel dump of the live system. -.It Vt livedumper_dump -Callback invoked for each dumped block of data during a live kernel dump. -.It Vt livedumper_finish -Callback invoked once a live kernel dump has completed. -.It Vt lle_event -Callback invoked when a link layer event has happened. -.It Vt nmbclusters_change -Callback invoked when the number of mbuf clusters has changed. -.It Vt nmbufs_change -Callback invoked when the number of mbufs has changed. -.It Vt maxsockets_change -Callback invoked when the maximum number of sockets has changed. -.It Vt mountroot -Callback invoked when root has been mounted. -.It Vt power_profile_change -Callbacks invoked when the power profile of the system changes. -.It Vt power_resume -Callback invoked when the system has resumed. -.It Vt power_suspend -Callback invoked just before the system is suspended. -.It Vt process_ctor -Callback invoked when a process is created. -.It Vt process_dtor -Callback invoked when a process is destroyed. -.It Vt process_exec -Callbacks invoked when a process performs an -.Fn exec -operation. -.It Vt process_exit -Callbacks invoked when a process exits. -.It Vt process_fini -Callback invoked when a process memory is destroyed. -This is never called. -.It Vt process_fork -Callbacks invoked when a process forks a child. -.It Vt process_init -Callback invoked when a process is initialized. -.It Vt random_adaptor_attach -Callback invoked when a new random module has been loaded. -.It Vt register_framebuffer -Callback invoked when a new frame buffer is registered. -.It Vt route_redirect_event -Callback invoked when a route gets redirected to a new location. -.It Vt shutdown_pre_sync -Callbacks invoked at shutdown time, before file systems are synchronized. -.It Vt shutdown_post_sync -Callbacks invoked at shutdown time, after all file systems are synchronized. -.It Vt shutdown_final -Callbacks invoked just before halting the system. -.It Vt tcp_offload_listen_start -Callback invoked for TCP Offload to start listening for new connections. -.It Vt tcp_offload_listen_stop -Callback invoked ror TCP Offload to stop listening for new connections. -.It Vt thread_ctor -Callback invoked when a thread object is created. -.It Vt thread_dtor -Callback invoked when a thread object is destroyed. -.It Vt thread_init -Callback invoked when a thread object is initialized. -.It Vt thread_fini -Callback invoked when a thread object is deinitalized. -.It Vt usb_dev_configured -Callback invoked when a USB device is configured -.It Vt unregister_framebuffer -Callback invoked when a frame buffer is deregistered. -.It Vt vfs_mounted -Callback invoked when a file system is mounted. -.It Vt vfs_unmounted -Callback invoked when a file system is unmounted. -.It Vt vlan_config -Callback invoked when the vlan configuration has changed. -.It Vt vlan_unconfig -Callback invoked when a vlan is destroyed. -.It Vt vm_lowmem -Callbacks invoked when virtual memory is low. -.It Vt vxlan_start -Callback invoked when a vxlan interface starts. -.It Vt vxlan_stop -Callback invoked when a vxlan interface stops. -.It Vt watchdog_list -Callbacks invoked when the system watchdog timer is reinitialized. -.El .Sh RETURN VALUES The macro .Fn EVENTHANDLER_REGISTER diff --git a/share/man/man9/KASSERT.9 b/share/man/man9/KASSERT.9 index 0c6898a7799b..bab8efe5cfac 100644 --- a/share/man/man9/KASSERT.9 +++ b/share/man/man9/KASSERT.9 @@ -1,8 +1,11 @@ -.\" -*- nroff -*- +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2000 Jonathan M. Bresler -.\" .\" All rights reserved. +.\" Copyright (c) 2023-2024 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Mitchell Horne +.\" under sponsorship from the FreeBSD Foundation. .\" .\" This program is free software. .\" @@ -26,61 +29,173 @@ .\" (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 14, 2000 +.Dd March 19, 2024 .Dt KASSERT 9 .Os .Sh NAME .Nm KASSERT -.Nd kernel expression verification macro +.Nd kernel expression verification macros .Sh SYNOPSIS .Cd "options INVARIANTS" .Pp .In sys/param.h .In sys/systm.h .Fn KASSERT expression msg +.Fn MPASS expression .Sh DESCRIPTION -In a kernel compiled with -.Cd "options INVARIANTS" , -the -.Fn KASSERT -macro tests the given -.Fa expression -and if it is false, -calls the +Assertions are widely used within the +.Fx +kernel to verify programmatic assumptions. +For violations of run-time assumptions and invariants, it is desirable to fail +as soon and as loudly as possible. +Assertions are optional code; for non-recoverable error conditions an explicit +call to .Xr panic 9 -function, terminating the running system. +is usually preferred. .Pp -In a kernel that does not have +The +.Fn KASSERT +macro tests the given boolean +.Fa expression . +If +.Fa expression +evaluates to +.Dv false , +and the kernel is compiled with .Cd "options INVARIANTS" , the -.Fn KASSERT -macro is defined to be a no-op. -The -second argument is a +.Xr panic 9 +function is called. +This terminates the running system at the point of the error, possibly dropping +into the kernel debugger or initiating a kernel core dump. +The second argument, +.Fa msg , +is a .Xr printf 9 format string and its arguments, enclosed in parentheses. +The formatted string will become the panic string. +.Pp +In a kernel that is built without +.Cd "options INVARIANTS" , +the assertion macros are defined to be no-ops. +This eliminates the runtime overhead of widespread assertions from release +builds of the kernel. +Therefore, checks which can be performed in a constant amount of time can be +added as assertions without concern about their performance impact. +More expensive checks, such as those that output to console, or verify the +integrity of a chain of objects are generally best hidden behind the +.Cd DIAGNOSTIC +kernel option. +.Pp +The +.Fn MPASS +macro (read as: "must-pass") +is a convenience wrapper around +.Fn KASSERT +that automatically generates a simple assertion message including file and line +information. +.Ss Assertion Guidelines +When adding new assertions, keep in mind their primary purpose: to aid in +identifying and debugging of complex error conditions. +.Pp +The panic messages resulting from assertion failures should be useful without +the resulting kernel dump; the message may be included in a bug report, and +should contain the relevant information needed to discern how the assertion was +violated. +This is especially important when the error condition is difficult or +impossible for the developer to reproduce locally. +.Pp +Therefore, assertions should adhere to the following guidelines: +.Bl -enum +.It +Whenever possible, the value of a runtime variable checked by an assertion +condition should appear in its message. +.It +Unrelated conditions must appear in separate assertions. +.It +Multiple related conditions should be distinguishable (e.g. by value), or split +into separate assertions. +.It +When in doubt, print more information, not less. +.El +.Pp +Combined, this gives greater clarity into the exact cause of an assertion +panic; see +.Sx EXAMPLES +below. .Sh EXAMPLES -The kernel function -.Fn vput -must not be called with a -.Dv NULL -pointer. +A hypothetical +.Vt struct foo +object must not have its 'active' flag set when calling +.Fn foo_dealloc : .Bd -literal -offset indent void -vput(vp) - struct vnode *vp; +foo_dealloc(struct foo *fp) { - struct proc *p = curproc; - KASSERT(vp != NULL, ("vput: null vp")); + + KASSERT((fp->foo_flags & FOO_ACTIVE) == 0, + ("%s: fp %p is still active, flags=%x", __func__, fp, + fp->foo_flags)); ... } .Ed +.Pp +This assertion provides the full flag set for the object, as well as the memory +pointer, which may be used by a debugger to examine the object in detail +.Po +for example with a 'show foo' command in +.Xr ddb 4 +.Pc . +.Pp +The assertion +.Bd -literal -offset indent +MPASS(td == curthread); +.Ed +.Pp +located on line 87 of a file named foo.c would generate the following panic +message: +.Bd -literal -offset indent +panic: Assertion td == curthread failed at foo.c:87 +.Ed +.Pp +This is a simple condition, and the message provides enough information to +investigate the failure. +.Pp +The assertion +.Bd -literal -offset indent +MPASS(td == curthread && (sz >= SIZE_MIN && sz <= SIZE_MAX)); +.Ed +.Pp +is +.Em NOT +useful enough. +The message doesn't indicate which part of the assertion was violated, nor +does it report the value of +.Dv sz , +which may be critical to understanding +.Em why +the assertion failed. +.Pp +According to the guidelines above, this would be correctly expressed as: +.Bd -literal -offset indent +MPASS(td == curthread); +KASSERT(sz >= SIZE_MIN && sz <= SIZE_MAX, + ("invalid size argument: %u", sz)); +.Ed +.Sh HISTORY +The +.Nm MPASS +macro first appeared in +.Bsx +and was imported into +.Fx 5.0 . +The name originates as an acronym of "multi-processor assert", but has evolved +to mean "must pass", or "must-pass assert". .Sh SEE ALSO -.Xr config 8 , .Xr panic 9 .Sh AUTHORS This manual page was written by -.An Jonathan M. Bresler Aq Mt jmb@FreeBSD.org . +.An Jonathan M. Bresler Aq Mt jmb@FreeBSD.org +and +.An Mitchell Horne Aq Mt mhorne@FreeBSD.org . diff --git a/share/man/man9/LOCK_PROFILING.9 b/share/man/man9/LOCK_PROFILING.9 index 2b7777882cc9..e2b42cadb08b 100644 --- a/share/man/man9/LOCK_PROFILING.9 +++ b/share/man/man9/LOCK_PROFILING.9 @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2004 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2004 Dag-Erling Smørgrav .\" Copyright (c) 2005 Robert N. M. Watson .\" Copyright (c) 2006 Kip Macy .\" All rights reserved. @@ -27,8 +27,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 7, 2012 .Dt LOCK_PROFILING 9 .Os diff --git a/share/man/man9/MD5.9 b/share/man/man9/MD5.9 deleted file mode 100644 index 1b9fcd2fb6e9..000000000000 --- a/share/man/man9/MD5.9 +++ /dev/null @@ -1,78 +0,0 @@ -.\" $OpenBSD: md5.9,v 1.1 1996/04/17 21:40:14 mickey Exp $ -.\" -.\" Copyright (c) 1996 Michael Shalayeff -.\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by Michael Shalayeff -.\" 3. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 April 17, 1996 -.Dt MD5 9 -.Os -.Sh NAME -.Nm MD5 , -.Nm MD5Init , -.Nm MD5Transform -.Nd message digest routines -.Sh SYNOPSIS -.In sys/types.h -.In sys/md5.h -.Ft void -.Fn MD5Init "MD5_CTX *buf" -.Ft void -.Fn MD5Transform "uint32_t buf[4]" "const unsigned char block[64]" -.Sh DESCRIPTION -The -.Nm -module implements the RSA Data Security, Inc.\& MD5 Message-Digest Algorithm -(MD5). -It produces 128-bit MD5 Digest of data. -.Bl -hang -width MD5Transformxxx -.It Pa MD5Init -must be called just before -.Fn MD5Transform -will be used to produce a digest. -The -.Fa buf -argument is the storage for the digest being produced on subsequent -calls to the -.Fn MD5Transform -routine. -.It Pa MD5Transform -is the core of the MD5 algorithm, this alters an existing MD5 hash -kept in -.Fa buf -to reflect the addition of 64 characters -of new data passed in -.Fa block -argument. -.El -.Sh COPYRIGHTS -The code for MD5 transform was taken from Colin Plumb's -implementation, which has been placed in the public domain. -The MD5 cryptographic checksum was devised by Ronald Rivest, and is -documented in RFC 1321, "The MD5 Message Digest Algorithm". diff --git a/share/man/man9/MODULE_DEPEND.9 b/share/man/man9/MODULE_DEPEND.9 index b8e3104e3bec..a3b433a96b07 100644 --- a/share/man/man9/MODULE_DEPEND.9 +++ b/share/man/man9/MODULE_DEPEND.9 @@ -26,8 +26,6 @@ .\" (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 11, 2005 .Dt MODULE_DEPEND 9 .Os diff --git a/share/man/man9/MODULE_PNP_INFO.9 b/share/man/man9/MODULE_PNP_INFO.9 index 843135bede4b..529afd70096d 100644 --- a/share/man/man9/MODULE_PNP_INFO.9 +++ b/share/man/man9/MODULE_PNP_INFO.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 23, 2019 .Dt MODULE_PNP_INFO 9 .Os diff --git a/share/man/man9/MODULE_VERSION.9 b/share/man/man9/MODULE_VERSION.9 index e791ded652d7..c35a7f0aeee6 100644 --- a/share/man/man9/MODULE_VERSION.9 +++ b/share/man/man9/MODULE_VERSION.9 @@ -26,8 +26,6 @@ .\" (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 March 11, 2001 .Dt MODULE_VERSION 9 .Os diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 1913f03a48fd..f709a4818dd5 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,11 +1,10 @@ -# $FreeBSD$ - .include <src.opts.mk> MAN= accept_filter.9 \ accf_data.9 \ accf_dns.9 \ accf_http.9 \ + accf_tls.9 \ acl.9 \ alq.9 \ altq.9 \ @@ -29,6 +28,7 @@ MAN= accept_filter.9 \ BUS_ADD_CHILD.9 \ bus_adjust_resource.9 \ bus_alloc_resource.9 \ + bus_attach_children.9 \ BUS_BIND_INTR.9 \ bus_child_present.9 \ BUS_CHILD_DELETED.9 \ @@ -36,10 +36,8 @@ MAN= accept_filter.9 \ BUS_CHILD_LOCATION.9 \ BUS_CHILD_PNPINFO.9 \ BUS_CONFIG_INTR.9 \ - bus_delayed_attach_children.9 \ BUS_DESCRIBE_INTR.9 \ bus_dma.9 \ - bus_generic_attach.9 \ bus_generic_detach.9 \ bus_generic_new_pass.9 \ bus_generic_print_child.9 \ @@ -48,6 +46,7 @@ MAN= accept_filter.9 \ BUS_GET_CPUS.9 \ BUS_GET_PROPERTY.9 \ bus_get_resource.9 \ + BUS_HINTED_CHILD.9 \ bus_map_resource.9 \ BUS_NEW_PASS.9 \ BUS_PRINT_CHILD.9 \ @@ -62,17 +61,21 @@ MAN= accept_filter.9 \ callout.9 \ casuword.9 \ cd.9 \ + cdefs.9 \ cnv.9 \ condvar.9 \ config_intrhook.9 \ contigmalloc.9 \ copy.9 \ counter.9 \ + cpu_machdep.9 \ cpuset.9 \ + cr_bsd_visible.9 \ cr_cansee.9 \ + cr_canseejailproc.9 \ + cr_canseeothergids.9 \ + cr_canseeotheruids.9 \ critical_enter.9 \ - cr_seeothergids.9 \ - cr_seeotheruids.9 \ crypto.9 \ crypto_buffer.9 \ crypto_driver.9 \ @@ -190,12 +193,13 @@ MAN= accept_filter.9 \ ifnet.9 \ inittodr.9 \ insmntque.9 \ + intr_event.9 \ intro.9 \ - ithread.9 \ kasan.9 \ KASSERT.9 \ kern_reboot.9 \ kern_testfrwk.9 \ + kern_yield.9 \ kernacc.9 \ kernel_mount.9 \ khelp.9 \ @@ -203,6 +207,7 @@ MAN= accept_filter.9 \ kobj.9 \ kproc.9 \ kqueue.9 \ + kstack_contains.9 \ kthread.9 \ ktr.9 \ lock.9 \ @@ -214,7 +219,6 @@ MAN= accept_filter.9 \ mbchain.9 \ mbuf.9 \ mbuf_tags.9 \ - MD5.9 \ mdchain.9 \ memcchr.9 \ memguard.9 \ @@ -241,11 +245,11 @@ MAN= accept_filter.9 \ OF_package_to_path.9 \ ofw_bus_is_compatible.9 \ ofw_bus_status_okay.9 \ + ofw_graph.9 \ osd.9 \ owll.9 \ own.9 \ panic.9 \ - PCBGROUP.9 \ p_candebug.9 \ p_cansee.9 \ pci.9 \ @@ -265,6 +269,7 @@ MAN= accept_filter.9 \ pmap_copy.9 \ pmap_enter.9 \ pmap_extract.9 \ + pmap_kextract.9 \ pmap_growkernel.9 \ pmap_init.9 \ pmap_is_modified.9 \ @@ -302,7 +307,6 @@ MAN= accept_filter.9 \ rijndael.9 \ rman.9 \ rmlock.9 \ - rtalloc.9 \ rtentry.9 \ runqueue.9 \ rwlock.9 \ @@ -319,6 +323,7 @@ MAN= accept_filter.9 \ signal.9 \ sleep.9 \ sleepqueue.9 \ + smr.9 \ socket.9 \ stack.9 \ store.9 \ @@ -345,7 +350,6 @@ MAN= accept_filter.9 \ vaccess.9 \ vaccess_acl_nfs4.9 \ vaccess_acl_posix1e.9 \ - vcount.9 \ vflush.9 \ VFS.9 \ vfs_busy.9 \ @@ -389,7 +393,6 @@ MAN= accept_filter.9 \ vm_map_max.9 \ vm_map_protect.9 \ vm_map_remove.9 \ - vm_map_simplify_entry.9 \ vm_map_stack.9 \ vm_map_submap.9 \ vm_map_sync.9 \ @@ -431,6 +434,7 @@ MAN= accept_filter.9 \ VOP_GETEXTATTR.9 \ VOP_GETPAGES.9 \ VOP_INACTIVE.9 \ + VOP_INOTIFY.9 \ VOP_IOCTL.9 \ VOP_LINK.9 \ VOP_LISTEXTATTR.9 \ @@ -631,6 +635,8 @@ MLINKS+=bitset.9 BITSET_DEFINE.9 \ bitset.9 BIT_CMP.9 \ bitset.9 BIT_OR.9 \ bitset.9 BIT_OR2.9 \ + bitset.9 BIT_ORNOT.9 \ + bitset.9 BIT_ORNOT2.9 \ bitset.9 BIT_AND.9 \ bitset.9 BIT_AND2.9 \ bitset.9 BIT_ANDNOT.9 \ @@ -666,7 +672,12 @@ MLINKS+=buf_ring.9 buf_ring_alloc.9 \ buf_ring.9 buf_ring_peek.9 MLINKS+=bus_activate_resource.9 bus_deactivate_resource.9 MLINKS+=bus_alloc_resource.9 bus_alloc_resource_any.9 +MLINKS+=bus_attach_children.9 bus_delayed_attach_children.9 \ + bus_attach_children.9 bus_detach_children.9 \ + bus_attach_children.9 bus_enumerate_hinted_children.9 \ + bus_attach_children.9 bus_identify_children.9 MLINKS+=BUS_BIND_INTR.9 bus_bind_intr.9 +MLINKS+=BUS_CONFIG_INTR.9 bus_config_intr.9 MLINKS+=BUS_DESCRIBE_INTR.9 bus_describe_intr.9 MLINKS+=bus_dma.9 busdma.9 \ bus_dma.9 bus_dmamap_create.9 \ @@ -685,6 +696,9 @@ MLINKS+=bus_dma.9 busdma.9 \ bus_dma.9 bus_dmamem_free.9 \ bus_dma.9 bus_dma_tag_create.9 \ bus_dma.9 bus_dma_tag_destroy.9 +MLINKS+=bus_generic_print_child.9 bus_print_child_domain.9 \ + bus_generic_print_child.9 bus_print_child_footer.9 \ + bus_generic_print_child.9 bus_print_child_header.9 MLINKS+=bus_generic_read_ivar.9 bus_generic_write_ivar.9 MLINKS+=BUS_GET_CPUS.9 bus_get_cpus.9 MLINKS+=bus_map_resource.9 bus_unmap_resource.9 \ @@ -705,6 +719,14 @@ MLINKS+=bus_space.9 bus_space_alloc.9 \ bus_space.9 bus_space_copy_region_stream_8.9 \ bus_space.9 bus_space_free.9 \ bus_space.9 bus_space_map.9 \ + bus_space.9 bus_space_peek_1.9 \ + bus_space.9 bus_space_peek_2.9 \ + bus_space.9 bus_space_peek_4.9 \ + bus_space.9 bus_space_peek_8.9 \ + bus_space.9 bus_space_poke_1.9 \ + bus_space.9 bus_space_poke_2.9 \ + bus_space.9 bus_space_poke_4.9 \ + bus_space.9 bus_space_poke_8.9 \ bus_space.9 bus_space_read_1.9 \ bus_space.9 bus_space_read_2.9 \ bus_space.9 bus_space_read_4.9 \ @@ -799,7 +821,6 @@ MLINKS+=byteorder.9 be16dec.9 \ byteorder.9 le64enc.9 \ byteorder.9 le64toh.9 MLINKS+=callout.9 callout_active.9 \ - callout.9 callout_async_drain.9 \ callout.9 callout_deactivate.9 \ callout.9 callout_drain.9 \ callout.9 callout_init.9 \ @@ -872,8 +893,7 @@ MLINKS+=config_intrhook.9 config_intrhook_disestablish.9 \ config_intrhook.9 config_intrhook_drain.9 \ config_intrhook.9 config_intrhook_establish.9 \ config_intrhook.9 config_intrhook_oneshot.9 -MLINKS+=contigmalloc.9 contigmalloc_domainset.9 \ - contigmalloc.9 contigfree.9 +MLINKS+=contigmalloc.9 contigmalloc_domainset.9 MLINKS+=casuword.9 casueword.9 \ casuword.9 casueword32.9 \ casuword.9 casuword32.9 @@ -888,6 +908,7 @@ MLINKS+=counter.9 counter_u64_alloc.9 \ counter.9 counter_u64_add.9 \ counter.9 counter_enter.9 \ counter.9 counter_exit.9 \ + counter.9 counter_ratecheck.9 \ counter.9 counter_u64_add_protected.9 \ counter.9 counter_u64_fetch.9 \ counter.9 counter_u64_zero.9 \ @@ -895,6 +916,27 @@ MLINKS+=counter.9 counter_u64_alloc.9 \ counter.9 SYSCTL_ADD_COUNTER_U64.9 \ counter.9 SYSCTL_COUNTER_U64_ARRAY.9 \ counter.9 SYSCTL_ADD_COUNTER_U64_ARRAY.9 +MLINKS+=cpu_machdep.9 cpu_copy_thread.9 \ + cpu_machdep.9 cpu_exec_vmspace_reuse.9 \ + cpu_machdep.9 cpu_exit.9 \ + cpu_machdep.9 cpu_fetch_syscall_args.9 \ + cpu_machdep.9 cpu_fork.9 \ + cpu_machdep.9 cpu_fork_kthread_handler.9 \ + cpu_machdep.9 cpu_idle.9 \ + cpu_machdep.9 cpu_idle_wakeup.9 \ + cpu_machdep.9 cpu_procctl.9 \ + cpu_machdep.9 cpu_ptrace.9 \ + cpu_machdep.9 cpu_set_syscall_retval.9 \ + cpu_machdep.9 cpu_set_upcall.9 \ + cpu_machdep.9 cpu_set_user_tls.9 \ + cpu_machdep.9 cpu_switch.9 \ + cpu_machdep.9 cpu_sync_core.9 \ + cpu_machdep.9 cpu_thread_alloc.9 \ + cpu_machdep.9 cpu_thread_clean.9 \ + cpu_machdep.9 cpu_thread_exit.9 \ + cpu_machdep.9 cpu_thread_free.9 \ + cpu_machdep.9 cpu_throw.9 \ + cpu_machdep.9 cpu_update_pcb.9 MLINKS+=cpuset.9 CPUSET_T_INITIALIZER.9 \ cpuset.9 CPUSET_FSET.9 \ cpuset.9 CPU_CLR.9 \ @@ -912,6 +954,7 @@ MLINKS+=cpuset.9 CPUSET_T_INITIALIZER.9 \ cpuset.9 CPU_OVERLAP.9 \ cpuset.9 CPU_CMP.9 \ cpuset.9 CPU_OR.9 \ + cpuset.9 CPU_ORNOT.9 \ cpuset.9 CPU_AND.9 \ cpuset.9 CPU_ANDNOT.9 \ cpuset.9 CPU_CLR_ATOMIC.9 \ @@ -921,7 +964,8 @@ MLINKS+=cpuset.9 CPUSET_T_INITIALIZER.9 \ cpuset.9 CPU_OR_ATOMIC.9 \ cpuset.9 CPU_COPY_STORE_REL.9 MLINKS+=critical_enter.9 critical.9 \ - critical_enter.9 critical_exit.9 + critical_enter.9 critical_exit.9 \ + critical_enter.9 CRITICAL_ASSERT.9 MLINKS+=crypto_buffer.9 crypto_apply.9 \ crypto_buffer.9 crypto_apply_buf.9 \ crypto_buffer.9 crypto_buffer_contiguous_segment.9 \ @@ -973,13 +1017,20 @@ MLINKS+=DB_COMMAND.9 DB_ALIAS.9 \ DB_COMMAND.9 DB_SHOW_ALL_ALIAS.9 \ DB_COMMAND.9 DB_SHOW_ALL_COMMAND.9 \ DB_COMMAND.9 DB_SHOW_COMMAND.9 \ - DB_COMMAND.9 DB_SHOW_COMMAND_FLAGS.9 + DB_COMMAND.9 DB_SHOW_COMMAND_FLAGS.9 \ + DB_COMMAND.9 DB_DECLARE_TABLE.9 \ + DB_COMMAND.9 DB_DEFINE_TABLE.9 \ + DB_COMMAND.9 DB_TABLE_COMMAND.9 \ + DB_COMMAND.9 DB_TABLE_COMMAND_FLAGS.9 \ + DB_COMMAND.9 DB_TABLE_ALIAS.9 \ + DB_COMMAND.9 DB_TABLE_ALIAS_FLAGS.9 MLINKS+=DECLARE_MODULE.9 DECLARE_MODULE_TIED.9 MLINKS+=dev_clone.9 drain_dev_clone_events.9 MLINKS+=dev_refthread.9 devvn_refthread.9 \ dev_refthread.9 dev_relthread.9 MLINKS+=devfs_set_cdevpriv.9 devfs_clear_cdevpriv.9 \ - devfs_set_cdevpriv.9 devfs_get_cdevpriv.9 + devfs_set_cdevpriv.9 devfs_get_cdevpriv.9 \ + devfs_set_cdevpriv.9 devfs_foreach_cdevpriv.9 MLINKS+=device_add_child.9 device_add_child_ordered.9 MLINKS+=device_enable.9 device_disable.9 \ device_enable.9 device_is_enabled.9 @@ -994,8 +1045,12 @@ MLINKS+=device_get_sysctl.9 device_get_sysctl_ctx.9 \ MLINKS+=device_quiet.9 device_is_quiet.9 \ device_quiet.9 device_verbose.9 MLINKS+=device_set_desc.9 device_get_desc.9 \ + device_set_desc.9 device_set_descf.9 \ device_set_desc.9 device_set_desc_copy.9 MLINKS+=device_set_flags.9 device_get_flags.9 +MLINKS+=device_probe_and_attach.9 device_attach.9 \ + device_probe_and_attach.9 device_detach.9 \ + device_probe_and_attach.9 device_probe.9 MLINKS+=devstat.9 devicestat.9 \ devstat.9 devstat_new_entry.9 \ devstat.9 devstat_end_transaction.9 \ @@ -1022,13 +1077,19 @@ MLINKS+=dnv.9 dnvlist.9 \ dnv.9 dnvlist_take_number.9 \ dnv.9 dnvlist_take_nvlist.9 \ dnv.9 dnvlist_take_string.9 -MLINKS+=domain.9 DOMAIN_SET.9 \ +MLINKS+=domain.9 protosw.9 \ domain.9 domain_add.9 \ - domain.9 domain_init.9 \ - domain.9 pfctlinput.9 \ - domain.9 pffinddomain.9 \ - domain.9 pffindproto.9 \ - domain.9 pffindtype.9 + domain.9 protosw_register.9 \ + domain.9 protosw_unregister.9 +MLINKS+=dpcpu.9 DPCPU_DECLARE.9 \ + dpcpu.9 DPCPU_DEFINE.9 \ + dpcpu.9 DPCPU_DEFINE_STATIC.9 \ + dpcpu.9 DPCPU_GET.9 \ + dpcpu.9 DPCPU_ID_PTR.9 \ + dpcpu.9 DPCPU_ID_GET.9 \ + dpcpu.9 DPCPU_ID_SET.9 \ + dpcpu.9 DPCPU_PTR.9 \ + dpcpu.9 DPCPU_SET.9 MLINKS+=drbr.9 drbr_free.9 \ drbr.9 drbr_enqueue.9 \ drbr.9 drbr_dequeue.9 \ @@ -1096,7 +1157,8 @@ MLINKS+=fpu_kern.9 fpu_kern_alloc_ctx.9 \ fpu_kern.9 fpu_kern_thread.9 \ fpu_kern.9 is_fpu_kern_thread.9 MLINKS+=g_attach.9 g_detach.9 -MLINKS+=g_bio.9 g_alloc_bio.9 \ +MLINKS+=g_bio.9 bio.9 \ + g_bio.9 g_alloc_bio.9 \ g_bio.9 g_clone_bio.9 \ g_bio.9 g_destroy_bio.9 \ g_bio.9 g_duplicate_bio.9 \ @@ -1133,6 +1195,7 @@ MLINKS+=g_provider.9 g_destroy_provider.9 \ g_provider.9 g_error_provider.9 \ g_provider.9 g_new_providerf.9 MLINKS+=gone_in.9 gone_in_dev.9 +MLINKS+=groupmember.9 realgroupmember.9 MLINKS+=hash.9 hash32.9 \ hash.9 hash32_buf.9 \ hash.9 hash32_str.9 \ @@ -1187,8 +1250,7 @@ MLINKS+=ieee80211_node.9 ieee80211_dump_node.9 \ ieee80211_node.9 ieee80211_find_rxnode_withkey.9 \ ieee80211_node.9 ieee80211_free_node.9 \ ieee80211_node.9 ieee80211_iterate_nodes.9 \ - ieee80211_node.9 ieee80211_ref_node.9 \ - ieee80211_node.9 ieee80211_unref_node.9 + ieee80211_node.9 ieee80211_ref_node.9 MLINKS+=ieee80211_output.9 ieee80211_process_callback.9 \ ieee80211_output.9 M_SEQNO_GET.9 \ ieee80211_output.9 M_WME_GETAC.9 @@ -1305,20 +1367,27 @@ MLINKS+=ifnet.9 if_addmulti.9 \ ifnet.9 ifa_ifwithnet.9 \ ifnet.9 ifa_ref.9 \ ifnet.9 ifaddr.9 \ - ifnet.9 ifaddr_byindex.9 \ ifnet.9 ifaof_ifpforaddr.9 \ ifnet.9 ifioctl.9 \ ifnet.9 ifpromisc.9 \ ifnet.9 ifqueue.9 \ ifnet.9 ifunit.9 \ ifnet.9 ifunit_ref.9 +# IfAPI +MLINKS+=ifnet.9 ifapi.9 + MLINKS+=insmntque.9 insmntque1.9 -MLINKS+=ithread.9 ithread_add_handler.9 \ - ithread.9 ithread_create.9 \ - ithread.9 ithread_destroy.9 \ - ithread.9 ithread_priority.9 \ - ithread.9 ithread_remove_handler.9 \ - ithread.9 ithread_schedule.9 +MLINKS+=intr_event.9 intr_event_add_handler.9 \ + intr_event.9 intr_event_create.9 \ + intr_event.9 intr_event_destroy.9 \ + intr_event.9 intr_event_handle.9 \ + intr_event.9 intr_event_remove_handler.9 \ + intr_event.9 intr_priority.9 +MLINKS+=KASSERT.9 MPASS.9 +MLINKS+=kern_reboot.9 reboot.9 \ + kern_reboot.9 shutdown_nice.9 +MLINKS+=kern_yield.9 maybe_yield.9 \ + kern_yield.9 should_yield.9 MLINKS+=kernacc.9 useracc.9 MLINKS+=kernel_mount.9 free_mntarg.9 \ kernel_mount.9 mount_arg.9 \ @@ -1340,6 +1409,7 @@ MLINKS+=kmsan.9 KMSAN.9 \ kmsan.9 kmsan_check_bio.9 \ kmsan.9 kmsan_check_ccb.9 \ kmsan.9 kmsan_check_mbuf.9 \ + kmsan.9 kmsan_check_uio.9 \ kmsan.9 kmsan_mark.9 \ kmsan.9 kmsan_oirg.9 MLINKS+=kobj.9 DEFINE_CLASS.9 \ @@ -1366,9 +1436,7 @@ MLINKS+=kqueue.9 knlist_add.9 \ kqueue.9 knlist_empty.9 \ kqueue.9 knlist_init.9 \ kqueue.9 knlist_init_mtx.9 \ - kqueue.9 knlist_init_rw_reader.9 \ kqueue.9 knlist_remove.9 \ - kqueue.9 knlist_remove_inevent.9 \ kqueue.9 knote_fdclose.9 \ kqueue.9 KNOTE_LOCKED.9 \ kqueue.9 KNOTE_UNLOCKED.9 \ @@ -1396,9 +1464,14 @@ MLINKS+=lock.9 lockdestroy.9 \ lock.9 lockmgr_args_rw.9 \ lock.9 lockmgr_assert.9 \ lock.9 lockmgr_disown.9 \ + lock.9 lockmgr_disowned.9 \ + lock.9 lockmgr_lock_flags.9 \ lock.9 lockmgr_printinfo.9 \ lock.9 lockmgr_recursed.9 \ lock.9 lockmgr_rw.9 \ + lock.9 lockmgr_slock.9 \ + lock.9 lockmgr_unlock.9 \ + lock.9 lockmgr_xlock.9 \ lock.9 lockstatus.9 MLINKS+=LOCK_PROFILING.9 MUTEX_PROFILING.9 MLINKS+=make_dev.9 destroy_dev.9 \ @@ -1413,13 +1486,19 @@ MLINKS+=make_dev.9 destroy_dev.9 \ make_dev.9 make_dev_p.9 \ make_dev.9 make_dev_s.9 MLINKS+=malloc.9 free.9 \ + malloc.9 malloc_aligned.9 \ malloc.9 malloc_domainset.9 \ + malloc.9 malloc_domainset_aligned.9 \ + malloc.9 malloc_domainset_exec.9 \ + malloc.9 malloc_exec.9 \ + malloc.9 malloc_usable_size.9 \ malloc.9 mallocarray.9 \ malloc.9 mallocarray_domainset.9 \ malloc.9 MALLOC_DECLARE.9 \ malloc.9 MALLOC_DEFINE.9 \ malloc.9 realloc.9 \ - malloc.9 reallocf.9 + malloc.9 reallocf.9 \ + malloc.9 zfree.9 MLINKS+=mbchain.9 mb_detach.9 \ mbchain.9 mb_done.9 \ mbchain.9 mb_fixhdr.9 \ @@ -1463,6 +1542,7 @@ MLINKS+=\ mbuf.9 MGET.9 \ mbuf.9 m_get.9 \ mbuf.9 m_get2.9 \ + mbuf.9 m_get3.9 \ mbuf.9 m_getjcl.9 \ mbuf.9 m_getcl.9 \ mbuf.9 MGETHDR.9 \ @@ -1480,6 +1560,7 @@ MLINKS+=\ mbuf.9 m_pullup.9 \ mbuf.9 m_split.9 \ mbuf.9 mtod.9 \ + mbuf.9 mtodo.9 \ mbuf.9 M_TRAILINGSPACE.9 \ mbuf.9 m_unshare.9 \ mbuf.9 M_WRITABLE.9 @@ -1499,8 +1580,6 @@ MLINKS+=\ mbuf_tags.9 m_tag_next.9 \ mbuf_tags.9 m_tag_prepend.9 \ mbuf_tags.9 m_tag_unlink.9 -MLINKS+=MD5.9 MD5Init.9 \ - MD5.9 MD5Transform.9 MLINKS+=mdchain.9 md_append_record.9 \ mdchain.9 md_done.9 \ mdchain.9 md_get_int64.9 \ @@ -1530,8 +1609,6 @@ MLINKS+=microuptime.9 binuptime.9 \ microuptime.9 getsbinuptime.9 \ microuptime.9 nanouptime.9 \ microuptime.9 sbinuptime.9 -MLINKS+=mi_switch.9 cpu_switch.9 \ - mi_switch.9 cpu_throw.9 MLINKS+=mod_cc.9 CCV.9 \ mod_cc.9 DECLARE_CC_MODULE.9 MLINKS+=mtx_pool.9 mtx_pool_alloc.9 \ @@ -1562,7 +1639,8 @@ MLINKS+=mutex.9 mtx_assert.9 \ mutex.9 mtx_unlock_flags.9 \ mutex.9 mtx_unlock_spin.9 \ mutex.9 mtx_unlock_spin_flags.9 -MLINKS+=namei.9 NDFREE.9 \ +MLINKS+=namei.9 NDFREE_PNBUF.9 \ + namei.9 NDINIT_AT.9 \ namei.9 NDINIT.9 MLINKS+=netisr.9 netisr_clearqdrops.9 \ netisr.9 netisr_default_flow2cpu.9 \ @@ -1693,6 +1771,12 @@ MLINKS+=ofw_bus_is_compatible.9 ofw_bus_is_compatible_strict.9 \ ofw_bus_is_compatible.9 ofw_bus_search_compatible.9 MLINKS+= ofw_bus_status_okay.9 ofw_bus_get_status.9 \ ofw_bus_status_okay.9 ofw_bus_node_status_okay.9 +MLINKS+=ofw_graph.9 ofw_graph_get_device_by_port_ep.9 \ + ofw_graph.9 ofw_graph_get_endpoint_by_idx.9 \ + ofw_graph.9 ofw_graph_get_port_by_idx.9 \ + ofw_graph.9 ofw_graph_get_remove_endpoint.9 \ + ofw_graph.9 ofw_graph_get_remove_parent.9 \ + ofw_graph.9 ofw_graph_port_get_num_endpoints.9 MLINKS+=osd.9 osd_call.9 \ osd.9 osd_del.9 \ osd.9 osd_deregister.9 \ @@ -1703,22 +1787,16 @@ MLINKS+=osd.9 osd_call.9 \ osd.9 osd_reserve.9 \ osd.9 osd_set.9 \ osd.9 osd_set_reserved.9 -MLINKS+=panic.9 vpanic.9 -MLINKS+=PCBGROUP.9 in_pcbgroup_byhash.9 \ - PCBGROUP.9 in_pcbgroup_byinpcb.9 \ - PCBGROUP.9 in_pcbgroup_destroy.9 \ - PCBGROUP.9 in_pcbgroup_enabled.9 \ - PCBGROUP.9 in_pcbgroup_init.9 \ - PCBGROUP.9 in_pcbgroup_remove.9 \ - PCBGROUP.9 in_pcbgroup_update.9 \ - PCBGROUP.9 in_pcbgroup_update_mbuf.9 \ - PCBGROUP.9 in6_pcbgroup_byhash.9 +MLINKS+=panic.9 vpanic.9 \ + panic.9 KERNEL_PANICKED.9 MLINKS+=pci.9 pci_alloc_msi.9 \ pci.9 pci_alloc_msix.9 \ + pci.9 pci_clear_pme.9 \ pci.9 pci_disable_busmaster.9 \ pci.9 pci_disable_io.9 \ pci.9 pci_enable_busmaster.9 \ pci.9 pci_enable_io.9 \ + pci.9 pci_enable_pme.9 \ pci.9 pci_find_bsf.9 \ pci.9 pci_find_cap.9 \ pci.9 pci_find_dbsf.9 \ @@ -1731,6 +1809,7 @@ MLINKS+=pci.9 pci_alloc_msi.9 \ pci.9 pci_get_powerstate.9 \ pci.9 pci_get_vpd_ident.9 \ pci.9 pci_get_vpd_readonly.9 \ + pci.9 pci_has_pm.9 \ pci.9 pci_iov_attach.9 \ pci.9 pci_iov_attach_name.9 \ pci.9 pci_iov_detach.9 \ @@ -1775,10 +1854,9 @@ MLINKS+=PHOLD.9 PRELE.9 \ PHOLD.9 PROC_ASSERT_NOT_HELD.9 MLINKS+=pmap_copy.9 pmap_copy_page.9 MLINKS+=pmap_extract.9 pmap_extract_and_hold.9 -MLINKS+=pmap_init.9 pmap_init2.9 +MLINKS+=pmap_kextract.9 vtophys.9 MLINKS+=pmap_is_modified.9 pmap_ts_referenced.9 -MLINKS+=pmap_pinit.9 pmap_pinit0.9 \ - pmap_pinit.9 pmap_pinit2.9 +MLINKS+=pmap_pinit.9 pmap_pinit0.9 MLINKS+=pmap_qenter.9 pmap_qremove.9 MLINKS+=pmap_quick_enter_page.9 pmap_quick_remove_page.9 MLINKS+=pmap_remove.9 pmap_remove_all.9 \ @@ -1787,7 +1865,9 @@ MLINKS+=pmap_resident_count.9 pmap_wired_count.9 MLINKS+=pmap_zero_page.9 pmap_zero_area.9 MLINKS+=printf.9 log.9 \ printf.9 tprintf.9 \ - printf.9 uprintf.9 + printf.9 uprintf.9 \ + printf.9 vlog.9 \ + printf.9 vprintf.9 MLINKS+=priv.9 priv_check.9 \ priv.9 priv_check_cred.9 MLINKS+=prng.9 prng32.9 \ @@ -1796,8 +1876,7 @@ MLINKS+=prng.9 prng32.9 \ prng.9 prng64_bounded.9 MLINKS+=proc_rwmem.9 proc_readmem.9 \ proc_rwmem.9 proc_writemem.9 -MLINKS+=psignal.9 gsignal.9 \ - psignal.9 pgsignal.9 \ +MLINKS+=psignal.9 pgsignal.9 \ psignal.9 tdsignal.9 MLINKS+=pwmbus.9 pwm.9 MLINKS+=random.9 arc4rand.9 \ @@ -1834,6 +1913,7 @@ MLINKS+=rman.9 rman_activate_resource.9 \ rman.9 rman_get_rid.9 \ rman.9 rman_get_size.9 \ rman.9 rman_get_start.9 \ + rman.9 rman_get_type.9 \ rman.9 rman_get_virtual.9 \ rman.9 rman_init.9 \ rman.9 rman_init_from_resource.9 \ @@ -1848,6 +1928,7 @@ MLINKS+=rman.9 rman_activate_resource.9 \ rman.9 rman_set_bustag.9 \ rman.9 rman_set_mapping.9 \ rman.9 rman_set_rid.9 \ + rman.9 rman_set_type.9 \ rman.9 rman_set_virtual.9 MLINKS+=rmlock.9 rm_assert.9 \ rmlock.9 rm_destroy.9 \ @@ -1862,19 +1943,6 @@ MLINKS+=rmlock.9 rm_assert.9 \ rmlock.9 rm_wlock.9 \ rmlock.9 rm_wowned.9 \ rmlock.9 rm_wunlock.9 -MLINKS+=rtalloc.9 rtalloc1.9 \ - rtalloc.9 rtalloc_ign.9 \ - rtalloc.9 RT_ADDREF.9 \ - rtalloc.9 RT_LOCK.9 \ - rtalloc.9 RT_REMREF.9 \ - rtalloc.9 RT_RTFREE.9 \ - rtalloc.9 RT_UNLOCK.9 \ - rtalloc.9 RTFREE_LOCKED.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 \ @@ -2045,6 +2113,14 @@ MLINKS+=sleepqueue.9 init_sleepqueues.9 \ sleepqueue.9 sleepq_type.9 \ sleepqueue.9 sleepq_wait.9 \ sleepqueue.9 sleepq_wait_sig.9 +MLINKS+=smr.9 smr_advance.9 \ + smr.9 smr_create.9 \ + smr.9 smr_destroy.9 \ + smr.9 smr_enter.9 \ + smr.9 smr_exit.9 \ + smr.9 smr_poll.9 \ + smr.9 smr_synchronize.9 \ + smr.9 smr_wait.9 MLINKS+=socket.9 soabort.9 \ socket.9 soaccept.9 \ socket.9 sobind.9 \ @@ -2127,6 +2203,7 @@ MLINKS+=syscall_helper_register.9 syscall_helper_unregister.9 \ syscall_helper_register.9 SYSCALL_INIT_HELPER_COMPAT_F.9 \ syscall_helper_register.9 SYSCALL_INIT_HELPER_F.9 MLINKS+=sysctl.9 SYSCTL_DECL.9 \ + sysctl.9 SYSCTL_ADD_CONST_STRING.9 \ sysctl.9 SYSCTL_ADD_INT.9 \ sysctl.9 SYSCTL_ADD_LONG.9 \ sysctl.9 SYSCTL_ADD_NODE.9 \ @@ -2205,6 +2282,7 @@ MLINKS+=taskqueue.9 TASK_INIT.9 \ taskqueue.9 taskqueue_drain_timeout.9 \ taskqueue.9 taskqueue_enqueue.9 \ taskqueue.9 taskqueue_enqueue_timeout.9 \ + taskqueue.9 taskqueue_enqueue_timeout_sbt.9 \ taskqueue.9 TASKQUEUE_FAST_DEFINE.9 \ taskqueue.9 TASKQUEUE_FAST_DEFINE_THREAD.9 \ taskqueue.9 taskqueue_free.9 \ @@ -2301,7 +2379,6 @@ MLINKS+=usbdi.9 usbd_do_request.9 \ usbdi.9 usb_fifo_softc.9 \ usbdi.9 usb_fifo_wakeup.9 .endif -MLINKS+=vcount.9 count_dev.9 MLINKS+=vfsconf.9 vfs_modevent.9 \ vfsconf.9 vfs_register.9 \ vfsconf.9 vfs_unregister.9 @@ -2334,16 +2411,12 @@ MLINKS+=vm_map_lookup.9 vm_map_lookup_done.9 MLINKS+=vm_map_max.9 vm_map_min.9 \ vm_map_max.9 vm_map_pmap.9 MLINKS+=vm_map_stack.9 vm_map_growstack.9 -MLINKS+=vm_map_wire.9 vm_map_wire_mapped.9 \ - vm_page_wire.9 vm_page_unwire.9 \ - vm_page_wire.9 vm_page_unwire_noq.9 +MLINKS+=vm_map_wire.9 vm_map_unwire.9 MLINKS+=vm_page_alloc.9 vm_page_alloc_after.9 \ vm_page_alloc.9 vm_page_alloc_contig.9 \ vm_page_alloc.9 vm_page_alloc_contig_domain.9 \ vm_page_alloc.9 vm_page_alloc_domain.9 \ vm_page_alloc.9 vm_page_alloc_domain_after.9 \ - vm_page_alloc.9 vm_page_alloc_freelist.9 \ - vm_page_alloc.9 vm_page_alloc_freelist_domain.9 \ vm_page_alloc.9 vm_page_alloc_noobj.9 \ vm_page_alloc.9 vm_page_alloc_noobj_contig.9 \ vm_page_alloc.9 vm_page_alloc_noobj_contig_domain.9 \ @@ -2375,7 +2448,9 @@ MLINKS+=vm_page_free.9 vm_page_free_toq.9 \ vm_page_free.9 vm_page_free_zero.9 \ vm_page_free.9 vm_page_try_to_free.9 MLINKS+=vm_page_insert.9 vm_page_remove.9 -MLINKS+=vm_page_wire.9 vm_page_unwire.9 +MLINKS+=vm_page_wire.9 vm_page_unwire.9 \ + vm_page_wire.9 vm_page_unwire_noq.9 \ + vm_page_wire.9 vm_page_wire_mapped.9 MLINKS+=VOP_ACCESS.9 VOP_ACCESSX.9 MLINKS+=VOP_ATTRIB.9 VOP_GETATTR.9 \ VOP_ATTRIB.9 VOP_SETATTR.9 \ @@ -2386,6 +2461,7 @@ MLINKS+=VOP_CREATE.9 VOP_MKDIR.9 \ MLINKS+=VOP_FSYNC.9 VOP_FDATASYNC.9 MLINKS+=VOP_GETPAGES.9 VOP_PUTPAGES.9 MLINKS+=VOP_INACTIVE.9 VOP_RECLAIM.9 +MLINKS+=VOP_INOTIFY.9 VOP_INOTIFY_ADD_WATCH.9 MLINKS+=VOP_LOCK.9 vn_lock.9 \ VOP_LOCK.9 VOP_ISLOCKED.9 \ VOP_LOCK.9 VOP_UNLOCK.9 @@ -2436,7 +2512,6 @@ MLINKS+=superio.9 superio_devid.9 \ superio.9 superio_dev_enable.9 \ superio.9 superio_dev_enabled.9 \ superio.9 superio_find_dev.9 \ - superio.9 superio_find_dev.9 \ superio.9 superio_get_dma.9 \ superio.9 superio_get_iobase.9 \ superio.9 superio_get_irq.9 \ diff --git a/share/man/man9/Makefile.depend b/share/man/man9/Makefile.depend index f80275d86ab1..11aba52f82cf 100644 --- a/share/man/man9/Makefile.depend +++ b/share/man/man9/Makefile.depend @@ -1,4 +1,3 @@ -# $FreeBSD$ # Autogenerated - do NOT edit! DIRDEPS = \ diff --git a/share/man/man9/OF_child.9 b/share/man/man9/OF_child.9 index 8227401f5f14..43c9caa0aeaf 100644 --- a/share/man/man9/OF_child.9 +++ b/share/man/man9/OF_child.9 @@ -23,8 +23,6 @@ .\" (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 April 9, 2018 .Dt OF_CHILD 9 .Os diff --git a/share/man/man9/OF_device_from_xref.9 b/share/man/man9/OF_device_from_xref.9 index c8c206afe777..0b858866b654 100644 --- a/share/man/man9/OF_device_from_xref.9 +++ b/share/man/man9/OF_device_from_xref.9 @@ -23,21 +23,22 @@ .\" (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 April 9, 2018 +.Dd April 3, 2025 .Dt OF_DEVICE_FROM_XREF 9 .Os .Sh NAME .Nm OF_device_from_xref , .Nm OF_xref_from_device , .Nm OF_device_register_xref +.Nm OF_device_unregister_xref .Nd "manage mappings between xrefs and devices" .Sh SYNOPSIS .In dev/ofw/ofw_bus.h .In dev/ofw/ofw_bus_subr.h .Ft int .Fn OF_device_register_xref "phandle_t xref" "device_t dev" +.Ft void +.Fn OF_device_unregister_xref "phandle_t xref" "device_t dev" .Ft device_t .Fn OF_device_from_xref "phandle_t xref" .Ft phandle_t @@ -59,6 +60,15 @@ If a mapping entry for already exists, it is replaced with the new one. The function always returns 0. .Pp +.Fn OF_device_unregister_xref +removes a map entry from the effective phandle +.Fa xref +to device +.Fa dev . +If a mapping entry for +.Fa xref +does not exists, it silently returns. +.Pp .Fn OF_device_from_xref returns a device_t instance associated with the effective phandle .Fa xref . diff --git a/share/man/man9/OF_finddevice.9 b/share/man/man9/OF_finddevice.9 index d524a182f01c..cb24f4af9d72 100644 --- a/share/man/man9/OF_finddevice.9 +++ b/share/man/man9/OF_finddevice.9 @@ -23,8 +23,6 @@ .\" (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 April 9, 2018 .Dt OF_FINDDEVICE 9 .Os diff --git a/share/man/man9/OF_getprop.9 b/share/man/man9/OF_getprop.9 index 5d0607a0a3bf..3bb0068e3dc2 100644 --- a/share/man/man9/OF_getprop.9 +++ b/share/man/man9/OF_getprop.9 @@ -23,8 +23,6 @@ .\" (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 June 23, 2018 .Dt OF_GETPROP 9 .Os diff --git a/share/man/man9/OF_node_from_xref.9 b/share/man/man9/OF_node_from_xref.9 index 41b683fac928..755c82951382 100644 --- a/share/man/man9/OF_node_from_xref.9 +++ b/share/man/man9/OF_node_from_xref.9 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2018 Oleksandr Tymoshenko <gonzo@FreeBSD.org> .\" .\" All rights reserved. @@ -23,8 +25,6 @@ .\" (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 April 9, 2018 .Dt OF_NODE_FROM_XREF 9 .Os @@ -72,9 +72,9 @@ If one cannot be found or the OpenFirmware implementation does not support effective phandles, the function returns the input value. .Pp -.Fn OF_xref_from_xref +.Fn OF_xref_from_node returns the effective phandle for the kernel phandle -.Fa xref . +.Fa node . If one cannot be found or the OpenFirmware implementation does not support effective phandles, the function returns the input value. diff --git a/share/man/man9/OF_package_to_path.9 b/share/man/man9/OF_package_to_path.9 index 93ff504bfaae..d358ec87cdcb 100644 --- a/share/man/man9/OF_package_to_path.9 +++ b/share/man/man9/OF_package_to_path.9 @@ -23,8 +23,6 @@ .\" (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 April 9, 2018 .Dt OF_PACKAGE_TO_PATH 9 .Os diff --git a/share/man/man9/PCBGROUP.9 b/share/man/man9/PCBGROUP.9 deleted file mode 100644 index 85d1bc011f36..000000000000 --- a/share/man/man9/PCBGROUP.9 +++ /dev/null @@ -1,221 +0,0 @@ -.\" Copyright (c) 2014 Adrian Chadd -.\" 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. -.\" 3. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission. -.\" -.\" 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 July 23, 2014 -.Dt PCBGROUP 9 -.Os -.Sh NAME -.Nm PCBGROUP -.Nd Distributed Protocol Control Block Groups -.Sh SYNOPSIS -.Cd "options PCBGROUP" -.Pp -.In sys/param.h -.In netinet/in.h -.In netinet/in_pcb.h -.Ft void -.Fo in_pcbgroup_init -.Fa "struct inpcbinfo *pcbinfo" "u_int hashfields" "int hash_nelements" -.Fc -.Ft void -.Fn in_pcbgroup_destroy "struct inpcbinfo *pcbinfo" -.Ft struct inpcbgroup * -.Fo in_pcbgroup_byhash -.Fa "struct inpcbinfo *pcbinfo" "u_int hashtype" "uint32_t hash" -.Fc -.Ft struct inpcbgroup * -.Fn in_pcbgroup_byinpcb "struct inpcb *inp" -.Ft void -.Fn in_pcbgroup_update "struct inpcb *inp" -.Ft void -.Fn in_pcbgroup_update_mbuf "struct inpcb *inp" "struct mbuf *m" -.Ft void -.Fn in_pcbgroup_remove "struct inpcb *inp" -.Ft int -.Fn in_pcbgroup_enabled "struct inpcbinfo *pcbinfo" -.In netinet6/in6_pcb.h -.Ft struct inpcbgroup * -.Fo in6_pcbgroup_byhash -.Fa "struct inpcbinfo *pcbinfo" "u_int hashtype" "uint32_t hash" -.Fc -.Sh DESCRIPTION -This implementation introduces notions of affinity -for connections and distribute work so as to reduce lock contention, -with hardware work distribution strategies -such as RSS. -In this construction, connection groups supplement, rather than replace, -existing reservation tables for protocol 4-tuples, offering CPU-affine -lookup tables with minimal cache line migration and lock contention -during steady state operation. -.Pp -Internet protocols like UDP and TCP register to use connection groups -by providing an ipi_hashfields value other than IPI_HASHFIELDS_NONE. -This indicates to the connection group code whether a 2-tuple or -4-tuple is used as an argument to hashes that assign a connection to -a particular group. -This must be aligned with any hardware-offloaded distribution model, -such as RSS or similar approaches taken in embedded network boards. -Wildcard sockets require special handling, as in Willmann 2006, and -are shared between connection groups while being protected by -group-local locks. -Connection establishment and teardown can be signficantly more -expensive than without connection groups, but that steady-state -processing can be significantly faster. -.Pp -Enabling PCBGROUP in the kernel only provides the infrastructure -required to create and manage multiple PCB groups. -An implementation needs to fill in a few functions to provide PCB -group hash information in order for PCBs to be placed in a PCB group. -.Ss Operation -By default, each PCB info block (struct pcbinfo) has a single hash for -all PCB entries for the given protocol with a single lock protecting it. -This can be a significant source of lock contention on SMP hardware. -When a PCBGROUP is created, an array of separate hash tables are -created, each with its own lock. -A separate table for wildcard PCBs is provided. -By default, a PCBGROUP table is created for each available CPU. -The PCBGROUP code attempts to calculate a hash value from the given -PCB or mbuf when looking up a PCBGROUP. -While processing a received frame, -.Fn in_pcbgroup_byhash -can be used in conjunction with either a hardware-provided hash -value -.Po -eg the -.Xr RSS 9 -calculated hash value provided by some NICs -.Pc -or a software-provided hash value in order to choose a PCBGROUP -table to query. -A single table lock is held while performing a wildcard match. -However, all of the table locks are acquired before modifying the -wildcard table. -The PCBGROUP tables operate in conjunction with the normal single PCB list -in a PCB info block. -Thus, inserting and removing a PCB will still incur the same costs -as without PCBGROUP. -A protocol which uses PCBGROUP should fall back to the normal PCB list -lookup if a call to the PCBGROUP layer does not yield a lookup hit. -.Ss Usage -Initialize a PCBGROUP in a PCB info block -.Pq Vt "struct pcbinfo" -by calling -.Fn in_pcbgroup_init . -.Pp -Add a connection to a PCBGROUP with -.Fn in_pcbgroup_update . -Connections are removed by with -.Fn in_pcbgroup_remove . -These in turn will determine which PCBGROUP bucket the given PCB -is placed into and calculate the hash value appropriately. -.Pp -Wildcard PCBs are hashed differently and placed in a single wildcard -PCB list. -If -.Xr RSS 9 -is enabled and in use, RSS-aware wildcard PCBs are placed in a single -PCBGROUP based on RSS information. -Protocols may look up the PCB entry in a PCBGROUP by using the lookup -functions -.Fn in_pcbgroup_byhash -and -.Fn in_pcbgroup_byinpcb . -.Sh IMPLEMENTATION NOTES -The PCB code in -.Pa sys/netinet -and -.Pa sys/netinet6 -is aware of PCBGROUP and will call into the PCBGROUP code to do -PCBGROUP assignment and lookup, preferring a PCBGROUP lookup to the -default global PCB info table. -.Pp -An implementor wishing to experiment or modify the PCBGROUP assignment -should modify this set of functions: -.Bl -tag -width "12345678" -offset indent -.It Fn in_pcbgroup_getbucket No and Fn in6_pcbgroup_getbucket -Map a given 32 bit hash value to a PCBGROUP. -By default this is hash % number_of_pcbgroups. -However, this distribution may not align with NIC receive queues or -the -.Xr netisr 9 -configuration. -.It Fn in_pcbgroup_byhash No and Fn in6_pcbgroup_byhash -Map a 32 bit hash value and a hash type identifier to a PCBGROUP. -By default, this simply returns NULL. -This function is used by the -.Xr mbuf 9 -receive path in -.Pa sys/netinet/in_pcb.c -to map an mbuf to a PCBGROUP. -.It Fn in_pcbgroup_bytuple No and Fn in6_pcbgroup_bytuple -Map the source and destination address and port details to a PCBGROUP. -By default, this does a very simple XOR hash. -This function is used by both the PCB lookup code and as a fallback in -the -.Xr mbuf 9 -receive path in -.Pa sys/netinet/in_pcb.c . -.El -.Sh SEE ALSO -.Xr mbuf 9 , -.Xr netisr 9 , -.Xr RSS 9 -.Rs -.%A Paul Willmann -.%A Scott Rixner -.%A Alan L. Cox -.%T "An Evaluation of Network Stack Parallelization Strategies in Modern Operating Systems" -.%J "2006 USENIX Annual Technical Conference" -.%D 2006 -.%U http://www.ece.rice.edu/~willmann/pubs/paranet_usenix.pdf -.Re -.Sh HISTORY -PCBGROUP first appeared in -.Fx 9.0 . -.Sh AUTHORS -.An -nosplit -The PCBGROUP implementation was written by -.An Robert N. M. Watson Aq Mt rwatson@FreeBSD.org -under contract to Juniper Networks, Inc. -.Pp -This manual page written by -.An Adrian Chadd Aq Mt adrian@FreeBSD.org . -.Sh NOTES -The -.Xr RSS 9 -implementation currently uses -.Ic #ifdef -blocks to tie into PCBGROUP. -This is a sign that a more abstract programming API is needed. -.Pp -There is currently no support for re-balancing the PCBGROUP assignment, -nor is there any support for overriding which PCBGROUP a socket/PCB -should be in. -.Pp -No statistics are kept to indicate how often PCBGROUP lookups -succeed or fail. diff --git a/share/man/man9/PCI_IOV_ADD_VF.9 b/share/man/man9/PCI_IOV_ADD_VF.9 index 1294cd096245..512b0b8668cc 100644 --- a/share/man/man9/PCI_IOV_ADD_VF.9 +++ b/share/man/man9/PCI_IOV_ADD_VF.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 28, 2015 .Dt PCI_IOV_ADD_VF 9 .Os @@ -33,7 +31,7 @@ .Nd inform a PF driver that a VF is being created .Sh SYNOPSIS .In sys/bus.h -.In machine/stdarg.h +.In sys/stdarg.h .In sys/nv.h .In dev/pci/pci_iov.h .Ft int diff --git a/share/man/man9/PCI_IOV_INIT.9 b/share/man/man9/PCI_IOV_INIT.9 index 8b9a2c72f446..8ce94800f6d1 100644 --- a/share/man/man9/PCI_IOV_INIT.9 +++ b/share/man/man9/PCI_IOV_INIT.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 28, 2015 .Dt PCI_IOV_INIT 9 .Os @@ -33,7 +31,7 @@ .Nd enable SR-IOV on a PF device .Sh SYNOPSIS .In sys/bus.h -.In machine/stdarg.h +.In sys/stdarg.h .In sys/nv.h .In dev/pci/pci_iov.h .Ft int @@ -42,7 +40,7 @@ The .Fn PCI_IOV_INIT method is called by the PCI Single-Root I/O Virtualization (SR-IOV) -infrastucture when the user requests that SR-IOV be enabled on a Physical +infrastructure when the user requests that SR-IOV be enabled on a Physical Function (PF). The number of Virtual Functions (VFs) that will be created is passed to this method in the diff --git a/share/man/man9/PCI_IOV_UNINIT.9 b/share/man/man9/PCI_IOV_UNINIT.9 index db643eeb59b7..800c2752008b 100644 --- a/share/man/man9/PCI_IOV_UNINIT.9 +++ b/share/man/man9/PCI_IOV_UNINIT.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 28, 2015 .Dt PCI_IOV_UNINIT 9 .Os diff --git a/share/man/man9/PHOLD.9 b/share/man/man9/PHOLD.9 index 12e0f3e02f99..57c0f522645b 100644 --- a/share/man/man9/PHOLD.9 +++ b/share/man/man9/PHOLD.9 @@ -20,8 +20,6 @@ .\" (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 November 7, 2015 .Dt PHOLD 9 .Os diff --git a/share/man/man9/SDT.9 b/share/man/man9/SDT.9 index 2da0773a7b7e..65d1c9dc6515 100644 --- a/share/man/man9/SDT.9 +++ b/share/man/man9/SDT.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 18, 2015 .Dt SDT 9 .Os diff --git a/share/man/man9/SYSCALL_MODULE.9 b/share/man/man9/SYSCALL_MODULE.9 index aec57a89e9b3..a6d5349b4b0d 100644 --- a/share/man/man9/SYSCALL_MODULE.9 +++ b/share/man/man9/SYSCALL_MODULE.9 @@ -26,9 +26,7 @@ .\" (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 24, 2015 +.Dd June 15, 2023 .Dt SYSCALL_MODULE 9 .Os .Sh NAME @@ -78,10 +76,10 @@ event handler when it is called. .El .Pp The syscall number assigned to the module can be retrieved using the -.Xr modstat 3 +.Xr modstat 2 and -.Xr modfind 3 -library functions in libc. +.Xr modfind 2 +system calls. The MACRO .Fn SYSCALL_MODULE_HELPER includes diff --git a/share/man/man9/SYSINIT.9 b/share/man/man9/SYSINIT.9 index 28701f25f030..ae360a95c44f 100644 --- a/share/man/man9/SYSINIT.9 +++ b/share/man/man9/SYSINIT.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 1, 2010 .Dt SYSINIT 9 .Os @@ -62,6 +60,7 @@ are defined in struct sysinit { enum sysinit_sub_id subsystem; /* subsystem identifier*/ enum sysinit_elem_order order; /* init order within subsystem*/ + SLIST_ENTRY(sysinit) next; /* singly-linked list */ sysinit_cfunc_t func; /* function */ const void *udata; /* multiplexer/argument */ }; diff --git a/share/man/man9/VFS.9 b/share/man/man9/VFS.9 index 86852ce9caad..a269d8d070cf 100644 --- a/share/man/man9/VFS.9 +++ b/share/man/man9/VFS.9 @@ -26,8 +26,6 @@ .\" (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 February 9, 2010 .Dt VFS 9 .Os diff --git a/share/man/man9/VFS_CHECKEXP.9 b/share/man/man9/VFS_CHECKEXP.9 index d186136d749c..e374555f01fb 100644 --- a/share/man/man9/VFS_CHECKEXP.9 +++ b/share/man/man9/VFS_CHECKEXP.9 @@ -22,8 +22,6 @@ .\" (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 June 17, 2020 .Dt VFS_CHECKEXP 9 .Os diff --git a/share/man/man9/VFS_FHTOVP.9 b/share/man/man9/VFS_FHTOVP.9 index c2ac5d536aff..6eb9061b2a78 100644 --- a/share/man/man9/VFS_FHTOVP.9 +++ b/share/man/man9/VFS_FHTOVP.9 @@ -26,8 +26,6 @@ .\" (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 May 19, 2019 .Dt VFS_FHTOVP 9 .Os diff --git a/share/man/man9/VFS_MOUNT.9 b/share/man/man9/VFS_MOUNT.9 index e46c71a5825a..40ba8c700b24 100644 --- a/share/man/man9/VFS_MOUNT.9 +++ b/share/man/man9/VFS_MOUNT.9 @@ -26,8 +26,6 @@ .\" (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 May 23, 2009 .Dt VFS_MOUNT 9 .Os diff --git a/share/man/man9/VFS_QUOTACTL.9 b/share/man/man9/VFS_QUOTACTL.9 index 210f71631353..c29721e7d7f8 100644 --- a/share/man/man9/VFS_QUOTACTL.9 +++ b/share/man/man9/VFS_QUOTACTL.9 @@ -26,8 +26,6 @@ .\" (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 May 29, 2021 .Dt VFS_QUOTACTL 9 .Os diff --git a/share/man/man9/VFS_ROOT.9 b/share/man/man9/VFS_ROOT.9 index f81a500b3ab2..5e1b49056d3a 100644 --- a/share/man/man9/VFS_ROOT.9 +++ b/share/man/man9/VFS_ROOT.9 @@ -26,8 +26,6 @@ .\" (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 May 23, 2009 .Dt VFS_ROOT 9 .Os diff --git a/share/man/man9/VFS_SET.9 b/share/man/man9/VFS_SET.9 index f025727f3446..ded1a4902dcb 100644 --- a/share/man/man9/VFS_SET.9 +++ b/share/man/man9/VFS_SET.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 16, 2018 .Dt VFS_SET 9 .Os diff --git a/share/man/man9/VFS_STATFS.9 b/share/man/man9/VFS_STATFS.9 index 7a7e37141120..b9cd6b795209 100644 --- a/share/man/man9/VFS_STATFS.9 +++ b/share/man/man9/VFS_STATFS.9 @@ -26,8 +26,6 @@ .\" (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 May 23, 2009 .Dt VFS_STATFS 9 .Os diff --git a/share/man/man9/VFS_SYNC.9 b/share/man/man9/VFS_SYNC.9 index ed510dd7b664..97633e594e79 100644 --- a/share/man/man9/VFS_SYNC.9 +++ b/share/man/man9/VFS_SYNC.9 @@ -26,8 +26,6 @@ .\" (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 May 23, 2009 .Dt VFS_SYNC 9 .Os diff --git a/share/man/man9/VFS_UNMOUNT.9 b/share/man/man9/VFS_UNMOUNT.9 index 59113ee174db..f9fb14c45a8c 100644 --- a/share/man/man9/VFS_UNMOUNT.9 +++ b/share/man/man9/VFS_UNMOUNT.9 @@ -26,8 +26,6 @@ .\" (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 May 23, 2009 .Dt VFS_UNMOUNT 9 .Os diff --git a/share/man/man9/VFS_VGET.9 b/share/man/man9/VFS_VGET.9 index f762b8981acc..e3612d2c3924 100644 --- a/share/man/man9/VFS_VGET.9 +++ b/share/man/man9/VFS_VGET.9 @@ -26,8 +26,6 @@ .\" (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 7, 2005 .Dt VFS_VGET 9 .Os diff --git a/share/man/man9/VOP_ACCESS.9 b/share/man/man9/VOP_ACCESS.9 index 005f2e20e578..facb0da7c4c1 100644 --- a/share/man/man9/VOP_ACCESS.9 +++ b/share/man/man9/VOP_ACCESS.9 @@ -27,8 +27,6 @@ .\" (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 18, 2009 .Dt VOP_ACCESS 9 .Os diff --git a/share/man/man9/VOP_ACLCHECK.9 b/share/man/man9/VOP_ACLCHECK.9 index 363811213374..d1a09c59bf1d 100644 --- a/share/man/man9/VOP_ACLCHECK.9 +++ b/share/man/man9/VOP_ACLCHECK.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 23, 1999 .Dt VOP_ACLCHECK 9 .Os diff --git a/share/man/man9/VOP_ADVISE.9 b/share/man/man9/VOP_ADVISE.9 index 7cc29162f821..c6e8791615ce 100644 --- a/share/man/man9/VOP_ADVISE.9 +++ b/share/man/man9/VOP_ADVISE.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 26, 2015 .Dt VOP_ADVISE 9 .Os @@ -41,7 +39,7 @@ .Sh DESCRIPTION This call applies advice for a range of a file's data. It is used to implement the -.Xr posix_fadvise +.Xr posix_fadvise 2 system call. .Pp Its arguments are: diff --git a/share/man/man9/VOP_ADVLOCK.9 b/share/man/man9/VOP_ADVLOCK.9 index fab1e30484d2..0be4686be62e 100644 --- a/share/man/man9/VOP_ADVLOCK.9 +++ b/share/man/man9/VOP_ADVLOCK.9 @@ -26,8 +26,6 @@ .\" (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 February 10, 2021 .Dt VOP_ADVLOCK 9 .Os diff --git a/share/man/man9/VOP_ALLOCATE.9 b/share/man/man9/VOP_ALLOCATE.9 index 27ba348d5438..4fcbe773f236 100644 --- a/share/man/man9/VOP_ALLOCATE.9 +++ b/share/man/man9/VOP_ALLOCATE.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 8, 2021 .Dt VOP_ALLOCATE 9 .Os @@ -47,7 +45,7 @@ .Sh DESCRIPTION This call allocates storage for a range of offsets in a file. It is used to implement the -.Xr posix_fallocate +.Xr posix_fallocate 2 system call. .Pp Its arguments are: diff --git a/share/man/man9/VOP_ATTRIB.9 b/share/man/man9/VOP_ATTRIB.9 index ddfee1f5d1f9..d7c55bd683d8 100644 --- a/share/man/man9/VOP_ATTRIB.9 +++ b/share/man/man9/VOP_ATTRIB.9 @@ -26,8 +26,6 @@ .\" (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 October 2, 2021 .Dt VOP_ATTRIB 9 .Os @@ -39,12 +37,26 @@ .In sys/param.h .In sys/vnode.h .Ft int -.Fn VOP_GETATTR "struct vnode *vp" "struct vattr *vap" "struct ucred *cred" +.Fo VOP_GETATTR +.Fa struct vnode *vp +.Fa flags +.Fa struct vattr *vap +.Fa struct ucred *cred +.Fc .Ft int -.Fn VOP_SETATTR "struct vnode *vp" "struct vattr *vap" "struct ucred *cred" +.Fo VOP_SETATTR +.Fa struct vnode *vp +.Fa struct vattr *vap +.Fa struct ucred *cred +.Fc .Ft int -.Fn VOP_STAT "struct vnode *vp" "struct stat *sb" "struct ucred *active_cred" \ -"struct ucred *file_cred" +.Fo VOP_STAT +.Fa struct vnode *vp +.Fa struct stat *sb +.Fa flags +.Fa struct ucred *active_cred +.Fa struct ucred *file_cred +.Fc .Sh DESCRIPTION These entry points manipulate various attributes of a file or directory, including file permissions, owner, group, size, diff --git a/share/man/man9/VOP_BMAP.9 b/share/man/man9/VOP_BMAP.9 index 02869838274b..82dda716fd70 100644 --- a/share/man/man9/VOP_BMAP.9 +++ b/share/man/man9/VOP_BMAP.9 @@ -1,5 +1,5 @@ .\"- -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2019 The FreeBSD Foundation .\" @@ -27,8 +27,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 19, 2019 .Dt VOP_BMAP 9 .Os @@ -60,7 +58,7 @@ Return storage for the number of succeeding logical blocks that may be efficiently read at the same time as the requested block. This will usually be the number of logical blocks whose physical blocks are contiguously allocated. -However a file system is free to define "efficient" as it see fit. +However a file system is free to define "efficient" as it sees fit. .It Fa runb Like .Fa runp diff --git a/share/man/man9/VOP_BWRITE.9 b/share/man/man9/VOP_BWRITE.9 index d2ee5105166a..fb811124356e 100644 --- a/share/man/man9/VOP_BWRITE.9 +++ b/share/man/man9/VOP_BWRITE.9 @@ -26,8 +26,6 @@ .\" (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 July 24, 1996 .Dt VOP_BWRITE 9 .Os diff --git a/share/man/man9/VOP_COPY_FILE_RANGE.9 b/share/man/man9/VOP_COPY_FILE_RANGE.9 index 5ef3b2609572..aa17670954f4 100644 --- a/share/man/man9/VOP_COPY_FILE_RANGE.9 +++ b/share/man/man9/VOP_COPY_FILE_RANGE.9 @@ -23,15 +23,13 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 30, 2020 .Dt VOP_COPY_FILE_RANGE 9 .Os .Sh NAME .Nm VOP_COPY_FILE_RANGE -.Nd copy a byte range from one file to another or within one file -in a single file system +.Nd copy a byte range within a file or from one file to another in a single +file system or between multiple file systems .Sh SYNOPSIS .In sys/param.h .In sys/vnode.h diff --git a/share/man/man9/VOP_CREATE.9 b/share/man/man9/VOP_CREATE.9 index 7553ef015ffa..326e0e9107b9 100644 --- a/share/man/man9/VOP_CREATE.9 +++ b/share/man/man9/VOP_CREATE.9 @@ -26,8 +26,6 @@ .\" (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 November 2, 2018 .Dt VOP_CREATE 9 .Os diff --git a/share/man/man9/VOP_DEALLOCATE.9 b/share/man/man9/VOP_DEALLOCATE.9 index d20fe1590314..0db4d07ad2f0 100644 --- a/share/man/man9/VOP_DEALLOCATE.9 +++ b/share/man/man9/VOP_DEALLOCATE.9 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2021 The FreeBSD Foundation .\" diff --git a/share/man/man9/VOP_FSYNC.9 b/share/man/man9/VOP_FSYNC.9 index f5bc0e8364d0..e58119d9ed62 100644 --- a/share/man/man9/VOP_FSYNC.9 +++ b/share/man/man9/VOP_FSYNC.9 @@ -31,8 +31,6 @@ .\" (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 March 22, 2019 .Dt VOP_FSYNC 9 .Os diff --git a/share/man/man9/VOP_GETACL.9 b/share/man/man9/VOP_GETACL.9 index 6dbaca225ba7..94112f96891d 100644 --- a/share/man/man9/VOP_GETACL.9 +++ b/share/man/man9/VOP_GETACL.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 23, 1999 .Dt VOP_GETACL 9 .Os diff --git a/share/man/man9/VOP_GETEXTATTR.9 b/share/man/man9/VOP_GETEXTATTR.9 index 998ed2c4651a..b06105f83a0a 100644 --- a/share/man/man9/VOP_GETEXTATTR.9 +++ b/share/man/man9/VOP_GETEXTATTR.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 23, 1999 .Dt VOP_GETEXTATTR 9 .Os diff --git a/share/man/man9/VOP_GETPAGES.9 b/share/man/man9/VOP_GETPAGES.9 index d25fc9ab571a..bb344543c5e2 100644 --- a/share/man/man9/VOP_GETPAGES.9 +++ b/share/man/man9/VOP_GETPAGES.9 @@ -27,8 +27,6 @@ .\" (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 June 29, 2019 .Dt VOP_GETPAGES 9 .Os diff --git a/share/man/man9/VOP_INACTIVE.9 b/share/man/man9/VOP_INACTIVE.9 index 51397a123d43..a137d6fb8bc5 100644 --- a/share/man/man9/VOP_INACTIVE.9 +++ b/share/man/man9/VOP_INACTIVE.9 @@ -26,8 +26,6 @@ .\" (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 March 15, 2019 .Dt VOP_INACTIVE 9 .Os diff --git a/share/man/man9/VOP_INOTIFY.9 b/share/man/man9/VOP_INOTIFY.9 new file mode 100644 index 000000000000..43b644682153 --- /dev/null +++ b/share/man/man9/VOP_INOTIFY.9 @@ -0,0 +1,60 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 Klara, Inc. +.\" +.Dd May 27, 2025 +.Dt VOP_INOTIFY 9 +.Os +.Sh NAME +.Nm VOP_INOTIFY +.Nd vnode inotify interface +.Sh SYNOPSIS +.In sys/param.h +.In sys/vnode.h +.Ft int +.Fo VOP_INOTIFY +.Fa struct vnode *vp +.Fa struct vnode *dvp +.Fa struct componentname *cnp +.Fa int event +.Fa uint32_t cookie +.Fc +.Ft int +.Fo VOP_INOTIFY_ADD_WATCH +.Fa struct vnode *vp +.Fa struct inotify_softc *sc +.Fa uint32_t mask +.Fa uint32_t *wdp +.Fa struct thread *td +.Fc +.Sh DESCRIPTION +The +.Fn VOP_INOTIFY +operation notifies the +.Xr inotify 2 +subsystem of a file system event on a vnode. +The +.Fa dvp +and +.Fa cnp +arguments are optional and are only used to obtain a file name for the event. +If they are omitted, the inotify subsystem will use the file name cache to +find a name for the vnode, but this is more expensive. +.Pp +The +.Fn VOP_INOTIFY_ADD_WATCH +operation is for internal use by the inotify subsystem to add a watch to a +vnode. +.Sh LOCKS +The +.Fn VOP_INOTIFY +operation does not assume any particular vnode lock state. +The +.Fn VOP_INOTIFY_ADD_WATCH +operation should be called with the vnode locked. +.Sh RETURN VALUES +Zero is returned on success, otherwise an error code is returned. +.Sh SEE ALSO +.Xr inotify 2 , +.Xr vnode 9 diff --git a/share/man/man9/VOP_IOCTL.9 b/share/man/man9/VOP_IOCTL.9 index ba1208179fc3..5a58d842f82e 100644 --- a/share/man/man9/VOP_IOCTL.9 +++ b/share/man/man9/VOP_IOCTL.9 @@ -26,8 +26,6 @@ .\" (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 July 24, 1996 .Dt VOP_IOCTL 9 .Os diff --git a/share/man/man9/VOP_LINK.9 b/share/man/man9/VOP_LINK.9 index f5b7c68e7042..f553b331d5ac 100644 --- a/share/man/man9/VOP_LINK.9 +++ b/share/man/man9/VOP_LINK.9 @@ -26,8 +26,6 @@ .\" (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 July 24, 1996 .Dt VOP_LINK 9 .Os diff --git a/share/man/man9/VOP_LISTEXTATTR.9 b/share/man/man9/VOP_LISTEXTATTR.9 index 40fa880e80c0..b5cbe9486029 100644 --- a/share/man/man9/VOP_LISTEXTATTR.9 +++ b/share/man/man9/VOP_LISTEXTATTR.9 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 19, 2005 .Dt VOP_LISTEXTATTR 9 .Os diff --git a/share/man/man9/VOP_LOCK.9 b/share/man/man9/VOP_LOCK.9 index db4608037ade..92bb79d44e6d 100644 --- a/share/man/man9/VOP_LOCK.9 +++ b/share/man/man9/VOP_LOCK.9 @@ -26,9 +26,7 @@ .\" (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 February 25, 2008 +.Dd August 23, 2022 .Dt VOP_LOCK 9 .Os .Sh NAME @@ -44,7 +42,7 @@ .Ft int .Fn VOP_LOCK "struct vnode *vp" "int flags" .Ft int -.Fn VOP_UNLOCK "struct vnode *vp" "int flags" +.Fn VOP_UNLOCK "struct vnode *vp" .Ft int .Fn VOP_ISLOCKED "struct vnode *vp" .Ft int diff --git a/share/man/man9/VOP_LOOKUP.9 b/share/man/man9/VOP_LOOKUP.9 index 7a8d7a5c328a..9569c3157beb 100644 --- a/share/man/man9/VOP_LOOKUP.9 +++ b/share/man/man9/VOP_LOOKUP.9 @@ -26,8 +26,6 @@ .\" (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 August 8, 2018 .Dt VOP_LOOKUP 9 .Os diff --git a/share/man/man9/VOP_OPENCLOSE.9 b/share/man/man9/VOP_OPENCLOSE.9 index 5442e3277f46..9a4f7069962d 100644 --- a/share/man/man9/VOP_OPENCLOSE.9 +++ b/share/man/man9/VOP_OPENCLOSE.9 @@ -26,8 +26,6 @@ .\" (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 2, 2009 .Dt VOP_OPEN 9 .Os diff --git a/share/man/man9/VOP_PATHCONF.9 b/share/man/man9/VOP_PATHCONF.9 index feab41a86813..299b4dc2c9c1 100644 --- a/share/man/man9/VOP_PATHCONF.9 +++ b/share/man/man9/VOP_PATHCONF.9 @@ -26,8 +26,6 @@ .\" (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 31, 2020 .Dt VOP_PATHCONF 9 .Os diff --git a/share/man/man9/VOP_PRINT.9 b/share/man/man9/VOP_PRINT.9 index c8188fc0263f..3e91892bece5 100644 --- a/share/man/man9/VOP_PRINT.9 +++ b/share/man/man9/VOP_PRINT.9 @@ -26,8 +26,6 @@ .\" (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 July 24, 1996 .Dt VOP_PRINT 9 .Os diff --git a/share/man/man9/VOP_RDWR.9 b/share/man/man9/VOP_RDWR.9 index 2de7f9c9e7d2..2ff4b17431a4 100644 --- a/share/man/man9/VOP_RDWR.9 +++ b/share/man/man9/VOP_RDWR.9 @@ -26,8 +26,6 @@ .\" (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 July 24, 1996 .Dt VOP_RDWR 9 .Os diff --git a/share/man/man9/VOP_READDIR.9 b/share/man/man9/VOP_READDIR.9 index 70e3aa1a46bc..d2cf7c6c79cc 100644 --- a/share/man/man9/VOP_READDIR.9 +++ b/share/man/man9/VOP_READDIR.9 @@ -26,8 +26,6 @@ .\" (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 13, 2021 .Dt VOP_READDIR 9 .Os diff --git a/share/man/man9/VOP_READLINK.9 b/share/man/man9/VOP_READLINK.9 index ac07afc84f21..ff9ce181ee89 100644 --- a/share/man/man9/VOP_READLINK.9 +++ b/share/man/man9/VOP_READLINK.9 @@ -26,8 +26,6 @@ .\" (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 March 30, 2020 .Dt VOP_READLINK 9 .Os diff --git a/share/man/man9/VOP_READ_PGCACHE.9 b/share/man/man9/VOP_READ_PGCACHE.9 index 2efec4fa4013..8a99365eba28 100644 --- a/share/man/man9/VOP_READ_PGCACHE.9 +++ b/share/man/man9/VOP_READ_PGCACHE.9 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2021 The FreeBSD Foundation, Inc. +.\" Copyright (c) 2021 The FreeBSD Foundation .\" .\" This documentation was written by .\" Konstantin Belousov <kib@FreeBSD.org> under sponsorship @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 28, 2021 .Dt VOP_READ_PGCACHE 9 .Os diff --git a/share/man/man9/VOP_REALLOCBLKS.9 b/share/man/man9/VOP_REALLOCBLKS.9 index d38caf16d72e..b07b4ba61fd2 100644 --- a/share/man/man9/VOP_REALLOCBLKS.9 +++ b/share/man/man9/VOP_REALLOCBLKS.9 @@ -26,8 +26,6 @@ .\" (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 July 24, 1996 .Dt VOP_REALLOCBLKS 9 .Os diff --git a/share/man/man9/VOP_REMOVE.9 b/share/man/man9/VOP_REMOVE.9 index 38e3b060bc53..c4a702f8c147 100644 --- a/share/man/man9/VOP_REMOVE.9 +++ b/share/man/man9/VOP_REMOVE.9 @@ -26,8 +26,6 @@ .\" (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 July 24, 1996 .Dt VOP_REMOVE 9 .Os diff --git a/share/man/man9/VOP_RENAME.9 b/share/man/man9/VOP_RENAME.9 index 76bb0dc1a1c3..551178f52a35 100644 --- a/share/man/man9/VOP_RENAME.9 +++ b/share/man/man9/VOP_RENAME.9 @@ -26,8 +26,6 @@ .\" (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 July 24, 1996 .Dt VOP_RENAME 9 .Os diff --git a/share/man/man9/VOP_REVOKE.9 b/share/man/man9/VOP_REVOKE.9 index 610fdb7142aa..5444cbe25e8e 100644 --- a/share/man/man9/VOP_REVOKE.9 +++ b/share/man/man9/VOP_REVOKE.9 @@ -32,8 +32,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 20, 2019 .Dt VOP_REVOKE 9 .Os diff --git a/share/man/man9/VOP_SETACL.9 b/share/man/man9/VOP_SETACL.9 index b587771270d1..ec3b25a14e9d 100644 --- a/share/man/man9/VOP_SETACL.9 +++ b/share/man/man9/VOP_SETACL.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 23, 1999 .Dt VOP_SETACL 9 .Os diff --git a/share/man/man9/VOP_SETEXTATTR.9 b/share/man/man9/VOP_SETEXTATTR.9 index edae937b5af7..a0ca7a5a4fe1 100644 --- a/share/man/man9/VOP_SETEXTATTR.9 +++ b/share/man/man9/VOP_SETEXTATTR.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 23, 1999 .Dt VOP_SETEXTATTR 9 .Os diff --git a/share/man/man9/VOP_SETLABEL.9 b/share/man/man9/VOP_SETLABEL.9 index 6cfa7c4b15bb..4ab7dd9beaba 100644 --- a/share/man/man9/VOP_SETLABEL.9 +++ b/share/man/man9/VOP_SETLABEL.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 27, 2021 .Dt VOP_SETLABEL 9 .Os @@ -115,13 +113,13 @@ Depending on the underlying implementation of .Fn VOP_SETLABEL , other errors may also be possible. .Sh SEE ALSO +.Xr mac 9 , +.Xr mount 9 , +.Xr vnode 9 , .Xr VOP_CLOSEEXTATTR 9 , .Xr VOP_OPENEXTATTR 9 , .Xr VOP_READEXTATTR 9 , -.Xr VOP_WRITEXTATTR 9 , -.Xr mac 9 , -.Xr mount 9 , -.Xr vnode 9 +.Xr VOP_WRITEXTATTR 9 .Sh AUTHORS This manual page was written by .An Robert Watson . diff --git a/share/man/man9/VOP_STRATEGY.9 b/share/man/man9/VOP_STRATEGY.9 index 6600b8e921d5..866ec61ac58c 100644 --- a/share/man/man9/VOP_STRATEGY.9 +++ b/share/man/man9/VOP_STRATEGY.9 @@ -26,8 +26,6 @@ .\" (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 June 30, 2022 .Dt VOP_STRATEGY 9 .Os diff --git a/share/man/man9/VOP_VPTOCNP.9 b/share/man/man9/VOP_VPTOCNP.9 index 3e680ad12413..0c6517d11569 100644 --- a/share/man/man9/VOP_VPTOCNP.9 +++ b/share/man/man9/VOP_VPTOCNP.9 @@ -26,8 +26,6 @@ .\" (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 March 8, 2015 .Dt VOP_VPTOCNP 9 .Os diff --git a/share/man/man9/VOP_VPTOFH.9 b/share/man/man9/VOP_VPTOFH.9 index 3619a7b065a3..2a2f301e58b3 100644 --- a/share/man/man9/VOP_VPTOFH.9 +++ b/share/man/man9/VOP_VPTOFH.9 @@ -26,8 +26,6 @@ .\" (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 February 16, 2007 .Dt VOP_VPTOFH 9 .Os diff --git a/share/man/man9/accept_filter.9 b/share/man/man9/accept_filter.9 index fe863049f870..0b8acc904abc 100644 --- a/share/man/man9/accept_filter.9 +++ b/share/man/man9/accept_filter.9 @@ -22,8 +22,6 @@ .\" 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 June 25, 2000 .Dt ACCEPT_FILTER 9 diff --git a/share/man/man9/accf_data.9 b/share/man/man9/accf_data.9 index 9caeba9b0029..17584288b753 100644 --- a/share/man/man9/accf_data.9 +++ b/share/man/man9/accf_data.9 @@ -22,8 +22,6 @@ .\" 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 November 15, 2000 .Dt ACCF_DATA 9 diff --git a/share/man/man9/accf_dns.9 b/share/man/man9/accf_dns.9 index 0ea4bf46b19d..971dd964e530 100644 --- a/share/man/man9/accf_dns.9 +++ b/share/man/man9/accf_dns.9 @@ -22,8 +22,6 @@ .\" 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 July 16, 2008 .Dt ACCF_DNS 9 diff --git a/share/man/man9/accf_http.9 b/share/man/man9/accf_http.9 index 2a340605ecf5..f71bb7811dc0 100644 --- a/share/man/man9/accf_http.9 +++ b/share/man/man9/accf_http.9 @@ -22,15 +22,13 @@ .\" 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 November 15, 2000 .Dt ACCF_HTTP 9 .Os .Sh NAME .Nm accf_http -.Nd "buffer incoming connections until a certain complete HTTP requests arrive" +.Nd "buffer incoming connections until a certain complete HTTP request arrives" .Sh SYNOPSIS .Nm options INET .Nm options ACCEPT_FILTER_HTTP diff --git a/share/man/man9/accf_tls.9 b/share/man/man9/accf_tls.9 new file mode 100644 index 000000000000..d4dbc299e5bb --- /dev/null +++ b/share/man/man9/accf_tls.9 @@ -0,0 +1,95 @@ +.\" +.\" Copyright (c) 2024 Gleb Smirnoff <glebius@FreeBSD.org> +.\" +.\" 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. +.\" " +.Dd April 24, 2024 +.Dt ACCF_TLS 9 +.Os +.Sh NAME +.Nm accf_tls +.Nd "buffer incoming connections until a TLS handshake like request arrives" +.Sh SYNOPSIS +.Nm options INET +.Nm options ACCEPT_FILTER_TLS +.Nm kldload accf_tls +.Sh DESCRIPTION +This is a filter to be placed on a socket that will be using +.Fn accept 2 +to receive incoming HTTPS connections. +It prevents the application from receiving the connected descriptor via +.Fn accept 2 +until a full TLS handshake has been buffered by the kernel. +The +.Nm +will first check that byte at offset 0 is +.Va 0x16 , +which matches handshake type. +Then it will read 2-byte request length value at offset 3 and will +continue reading until reading the entire length of the handshake is buffered. +If something other than +.Va 0x16 +is at offset 0, the kernel will allow the application to receive the +connection descriptor via +.Fn accept 2 . +.Pp +The utility of +.Nm +is such that a server will not have to context switch several times +before performing the initial parsing of the request. +This effectively reduces the amount of required CPU utilization +to handle incoming requests by keeping active +processes in preforking servers such as Apache low +and reducing the size of the file descriptor set that needs +to be managed by interfaces such as +.Fn select , +.Fn poll +or +.Fn kevent +based servers. +.Sh EXAMPLES +Assuming ACCEPT_FILTER_TLS has been included in the kernel config +file or the +.Nm +module +has been loaded, this will enable the TLS accept filter +on the socket +.Fa sok . +.Bd -literal -offset 0i + struct accept_filter_arg afa; + + bzero(&afa, sizeof(afa)); + strcpy(afa.af_name, "tlsready"); + setsockopt(sok, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa)); +.Ed +.Sh SEE ALSO +.Xr setsockopt 2 , +.Xr accept_filter 9 +.Sh HISTORY +The +.Nm +accept filter was introduced in +.Fx 15.0 . +.Sh AUTHORS +The +.Nm +filter was written by +.An Maksim Yevmenkin . diff --git a/share/man/man9/acl.9 b/share/man/man9/acl.9 index d42ceff76a1c..57daa04cb5ae 100644 --- a/share/man/man9/acl.9 +++ b/share/man/man9/acl.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 4, 2015 .Dt ACL 9 .Os diff --git a/share/man/man9/alq.9 b/share/man/man9/alq.9 index 7d6210007dd3..5dcbb2b8475e 100644 --- a/share/man/man9/alq.9 +++ b/share/man/man9/alq.9 @@ -29,8 +29,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 26, 2010 .Dt ALQ 9 .Os diff --git a/share/man/man9/altq.9 b/share/man/man9/altq.9 index b88683ea584a..d4698377a9d0 100644 --- a/share/man/man9/altq.9 +++ b/share/man/man9/altq.9 @@ -26,8 +26,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 20, 2018 .Dt ALTQ 9 .Os diff --git a/share/man/man9/atomic.9 b/share/man/man9/atomic.9 index 784a776546de..df24cd4a4d2b 100644 --- a/share/man/man9/atomic.9 +++ b/share/man/man9/atomic.9 @@ -20,9 +20,7 @@ .\" (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 March 6, 2021 +.Dd December 16, 2024 .Dt ATOMIC 9 .Os .Sh NAME @@ -40,7 +38,6 @@ .Nm atomic_thread_fence .Nd atomic operations .Sh SYNOPSIS -.In sys/types.h .In machine/atomic.h .Ft void .Fn atomic_add_[acq_|rel_]<type> "volatile <type> *p" "<type> v" @@ -63,7 +60,7 @@ .Ft void .Fn atomic_interrupt_fence "void" .Ft <type> -.Fn atomic_load_[acq_]<type> "volatile <type> *p" +.Fn atomic_load_[acq_]<type> "const volatile <type> *p" .Ft <type> .Fn atomic_readandclear_<type> "volatile <type> *p" .Ft void @@ -483,10 +480,14 @@ and .Fn atomic_testandclear functions are only implemented for the types .Dq Li int , -.Dq Li long +.Dq Li long , +.Dq ptr , +.Dq Li 32 , and -.Dq Li 32 -and do not have any variants with memory barriers at this time. +.Dq Li 64 +and generally do not have any variants with memory barriers at this time +except for +.Fn atomic_testandset_acq_long . .Pp The type .Dq Li 64 diff --git a/share/man/man9/backlight.9 b/share/man/man9/backlight.9 index 3c6bca732205..926a723b3859 100644 --- a/share/man/man9/backlight.9 +++ b/share/man/man9/backlight.9 @@ -20,8 +20,6 @@ .\" (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 October 2, 2020 .Dt BACKLIGHT 9 .Os diff --git a/share/man/man9/bhnd.9 b/share/man/man9/bhnd.9 index 5cf37597304b..722ae6b6a393 100644 --- a/share/man/man9/bhnd.9 +++ b/share/man/man9/bhnd.9 @@ -26,8 +26,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 26, 2018 .Dt BHND 9 .Os diff --git a/share/man/man9/bhnd_erom.9 b/share/man/man9/bhnd_erom.9 index 8afda55d4bf8..1e8101f011cf 100644 --- a/share/man/man9/bhnd_erom.9 +++ b/share/man/man9/bhnd_erom.9 @@ -26,8 +26,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 9, 2017 .Dt BHND_EROM 9 .Os @@ -206,7 +204,7 @@ hardware core must be provided using the .Fa eio argument. The registers can be mapped using -.Xr bhnd_erom_io_map 9 . +.Fn bhnd_erom_io_map . .Pp On devices that do not provide standard .Xr bhnd_chipc 4 diff --git a/share/man/man9/bios.9 b/share/man/man9/bios.9 index e6774dfbc0a6..4bea48a18626 100644 --- a/share/man/man9/bios.9 +++ b/share/man/man9/bios.9 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .\" .\" Copyright (c) 1997 Michael Smith .\" All rights reserved. diff --git a/share/man/man9/bitset.9 b/share/man/man9/bitset.9 index d177bea51762..b77cfec63e26 100644 --- a/share/man/man9/bitset.9 +++ b/share/man/man9/bitset.9 @@ -22,8 +22,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 20, 2021 .Dt BITSET 9 .Os @@ -53,6 +51,8 @@ .Nm BIT_CMP , .Nm BIT_OR , .Nm BIT_OR2 , +.Nm BIT_ORNOT , +.Nm BIT_ORNOT2 , .Nm BIT_AND , .Nm BIT_AND2 , .Nm BIT_ANDNOT , @@ -125,6 +125,13 @@ .Fa "struct STRUCTNAME *src1" .Fa "struct STRUCTNAME *src2" .Fc +.Fn BIT_ORNOT "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" +.Fo BIT_ORNOT2 +.Fa "const SETSIZE" +.Fa "struct STRUCTNAME *dst" +.Fa "struct STRUCTNAME *src1" +.Fa "struct STRUCTNAME *src2" +.Fc .Fn BIT_AND "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" .Fo BIT_AND2 .Fa "const SETSIZE" @@ -186,7 +193,7 @@ These macros are meant to be used in the kernel and are visible if or .In sys/bitset.h are included in a program. -Userland programs must define +Userland programs must define .Dv _WANT_FREEBSD_BITSET before including these files to make the macros visible. .Pp @@ -461,6 +468,36 @@ equivalent of the scalar: .Fa src2 . ) .Pp The +.Fn BIT_ORNOT +macro sets bits not in +.Fa src +in +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst +|= +.Fa ~ src . ) +.Pp +The +.Fn BIT_ORNOT2 +macro computes +.Fa src1 +bitwise or not +.Fa src2 +and assigns the result to +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst += +.Fa src1 +| ~ +.Fa src2 . ) +.Pp +The .Fn BIT_AND macro clears bits absent from .Fa src diff --git a/share/man/man9/bpf.9 b/share/man/man9/bpf.9 index cddff70daf9b..b11013fe4bed 100644 --- a/share/man/man9/bpf.9 +++ b/share/man/man9/bpf.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 11, 2012 .Dt BPF 9 .Os diff --git a/share/man/man9/buf.9 b/share/man/man9/buf.9 index 43f56971541f..ecd4a1487735 100644 --- a/share/man/man9/buf.9 +++ b/share/man/man9/buf.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 22, 1998 .Dt BUF 9 .Os @@ -134,8 +132,6 @@ instantiated VM Buffers (struct buf's) prevent their underlying pages in the buffer cache from being freed. This can complicate the life of the paging system. -.\" .Sh SEE ALSO -.\" .Xr <fillmein> 9 .Sh HISTORY The .Nm diff --git a/share/man/man9/buf_ring.9 b/share/man/man9/buf_ring.9 index b45e94e41584..ae3b8505ce8c 100644 --- a/share/man/man9/buf_ring.9 +++ b/share/man/man9/buf_ring.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 27, 2012 .Dt BUF_RING 9 .Os diff --git a/share/man/man9/bus_activate_resource.9 b/share/man/man9/bus_activate_resource.9 index 95e0aba5a74d..7b87197b8d11 100644 --- a/share/man/man9/bus_activate_resource.9 +++ b/share/man/man9/bus_activate_resource.9 @@ -22,9 +22,7 @@ .\" (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 May 20, 2016 +.Dd March 13, 2024 .Dt BUS_ACTIVATE_RESOURCE 9 .Os .Sh NAME @@ -39,11 +37,11 @@ .In machine/resource.h .Ft int .Fo bus_activate_resource -.Fa "device_t dev" "int type" "int rid" "struct resource *r" +.Fa "device_t dev" "struct resource *r" .Fc .Ft int .Fo bus_deactivate_resource -.Fa "device_t dev" "int type" "int rid" "struct resource *r" +.Fa "device_t dev" "struct resource *r" .Fc .Sh DESCRIPTION These functions activate or deactivate a previously allocated resource. @@ -60,24 +58,6 @@ The arguments are as follows: .It Fa dev The device that requests ownership of the resource. Before allocation, the resource is owned by the parent bus. -.It Fa type -The type of resource you want to allocate. -It is one of: -.Pp -.Bl -tag -width ".Dv SYS_RES_MEMORY" -compact -.It Dv PCI_RES_BUS -for PCI bus numbers -.It Dv SYS_RES_IRQ -for IRQs -.It Dv SYS_RES_DRQ -for ISA DMA lines -.It Dv SYS_RES_IOPORT -for I/O ports -.It Dv SYS_RES_MEMORY -for I/O memory -.El -.It Fa rid -A pointer to a bus specific handle that identifies the resource being allocated. .It Fa r A pointer to the .Vt "struct resource" diff --git a/share/man/man9/bus_adjust_resource.9 b/share/man/man9/bus_adjust_resource.9 index bf88a70e920a..27173894e0ec 100644 --- a/share/man/man9/bus_adjust_resource.9 +++ b/share/man/man9/bus_adjust_resource.9 @@ -25,9 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 23, 2016 +.Dd March 13, 2024 .Dt BUS_ADJUST_RESOURCE 9 .Os .Sh NAME @@ -42,7 +40,7 @@ .In machine/resource.h .Ft int .Fo bus_adjust_resource -.Fa "device_t dev" "int type" "struct resource *r" +.Fa "device_t dev" "struct resource *r" .Fa "rman_res_t start" "rman_res_t end" .Fc .Sh DESCRIPTION @@ -54,13 +52,6 @@ should have been allocated by a previous call to .Xr bus_alloc_resource 9 . The new resource range must overlap the existing range of .Fa r . -The -.Fa type -argument should match the -.Fa type -argument passed to -.Xr bus_alloc_resource 9 -when the resource was initially allocated. .Pp Note that none of the constraints of the original allocation request such as alignment or boundary restrictions are checked by @@ -76,8 +67,8 @@ Grow an existing memory resource by 4096 bytes. struct resource *res; int error; - error = bus_adjust_resource(dev, SYS_RES_MEMORY, res, - rman_get_start(res), rman_get_end(res) + 0x1000); + error = bus_adjust_resource(dev, res, rman_get_start(res), + rman_get_end(res) + 0x1000); .Ed .Sh ERRORS .Fn bus_adjust_resource diff --git a/share/man/man9/bus_alloc_resource.9 b/share/man/man9/bus_alloc_resource.9 index 9c3c6e1cc94a..84a4c9c530c9 100644 --- a/share/man/man9/bus_alloc_resource.9 +++ b/share/man/man9/bus_alloc_resource.9 @@ -26,8 +26,6 @@ .\" (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 May 20, 2016 .Dt BUS_ALLOC_RESOURCE 9 .Os diff --git a/share/man/man9/bus_attach_children.9 b/share/man/man9/bus_attach_children.9 new file mode 100644 index 000000000000..5e3ca4c5e906 --- /dev/null +++ b/share/man/man9/bus_attach_children.9 @@ -0,0 +1,152 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 John Baldwin <jhb@FreeBSD.org> +.Dd February 5, 2025 +.Dt BUS_ATTACH_CHILDREN 9 +.Os +.Sh NAME +.Nm bus_attach_children , +.Nm bus_delayed_attach_children , +.Nm bus_detach_children , +.Nm bus_enumerate_hinted_children , +.Nm bus_identify_children +.Nd manage child devices of a bus device +.Sh SYNOPSIS +.In sys/param.h +.In sys/bus.h +.Ft void +.Fn bus_attach_children "device_t dev" +.Ft void +.Fn bus_delayed_attach_children "device_t bus" +.Ft int +.Fn bus_detach_children "device_t dev" +.Ft void +.Fn bus_enumerate_hinted_children "device_t bus" +.Ft void +.Fn bus_identify_children "device_t dev" +.Sh DESCRIPTION +These functions manage state transitions of child devices for +.Fa dev . +.Pp +.Fn bus_enumerate_hinted_children +walks the kernel environment to identify any device hints that describe a +device attached to +.Fa dev . +For each set of matching hints, +the +.Xr BUS_HINTED_CHILD 9 +method is invoked. +This function is typically called from a bus driver's +.Xr DEVICE_ATTACH 9 +method to add hinted devices. +Note that most bus drivers do not use hints to identify child devices. +This is typically used for legacy buses such as ISA that do not provide +a mechanism for enumerating devices. +.Pp +.Fn bus_identify_children +iterates over all eligible device drivers for children of +.Fa dev +invoking the +.Xr DEVICE_IDENTIFY 9 +method. +This allows device drivers to add child devices that are enumerated via +alternate mechanisms such as firmware tables. +This function is typically called from a bus driver's +.Xr DEVICE_ATTACH 9 +method. +.Pp +.Fn bus_attach_children +attaches device drivers to all children of +.Fa dev . +This function invokes +.Xr device_probe_and_attach 9 +on each child device ignoring errors. +It makes a best-effort pass to attach device drivers to all children. +Child devices are attached in increasing order. +Child devices with the same order are attached in FIFO order based +on the time when the device was created via +.Xr device_add_child 9 . +This function is typically called from a bus driver's +.Xr DEVICE_ATTACH 9 +method after adding devices. +.Pp +.Fn bus_delayed_attach_children +attaches device drivers to all children of +.Fa dev +after interrupts are enabled. +This function schedules a call to +.Fn bus_attach_children +after interrupts are enabled via +.Xr config_intrhook_establish 9 . +If interrupts are already enabled +(for example, when loading a device driver after booting), +.Fn bus_attach_children +is called immediately. +.Pp +.Fn bus_detach_children +detaches device drivers from all children of +.Fa dev +by calling +.Xr device_detach 9 +on each child device. +Unlike +.Fn bus_attach_children , +this function does not make a best-effort pass. +If a child device fails to detach, +.Fn bus_detach_children +immediately fails returning the error from the child's failed detach. +Child devices are detached in reverse order compared to +.Fn bus_attach_children . +That is, +child devices are detached in decreasing order, +and child devices with the same order are detached in LIFO order. +Detached devices are not deleted. +.Pp +.Fn bus_detach_children +is typically called at the start of a bus driver's +.Xr DEVICE_ATTACH 9 +method to give child devices a chance to veto the detach request. +It is usually paired with a later call to +.Fn device_delete_children 9 +to delete child devices. +If no additional logic is required between the two function calls, +a bus driver can use +.Xr bus_generic_detach 9 +to detach and delete children. +.Sh RETURN VALUES +.Sh SEE ALSO +.Xr config_intrhook_establish 9 , +.Xr device_add_child 9 , +.Xr DEVICE_ATTACH 9 , +.Xr device_delete_children 9 , +.Xr DEVICE_DETACH 9 , +.Xr device_detach 9 , +.Xr DEVICE_IDENTIFY 9 , +.Xr device_probe_and_attach 9 +.Sh HISTORY +.Fn bus_enumerate_hinted_children +first appeared in +.Fx 6.2 . +.Pp +.Fn bus_delayed_attach_children +first appeared in +.Fx 12.2 . +.Pp +.Fn bus_identify_children +first appeared in +.Fx 15.0 . +Its functionality is available in older releases via the deprecated +.Fn bus_generic_probe . +.Pp +.Fn bus_attach_children +first appeared in +.Fx 15.0 . +Its functionality is available in older releases via the deprecated +.Fn bus_generic_attach . +.Pp +.Fn bus_detach_children +first appeared in +.Fx 15.0 . +Its functionality is available in older releases via +.Fn bus_generic_detach . diff --git a/share/man/man9/bus_child_present.9 b/share/man/man9/bus_child_present.9 index 1862edc58daf..1d5c78f4d591 100644 --- a/share/man/man9/bus_child_present.9 +++ b/share/man/man9/bus_child_present.9 @@ -22,8 +22,6 @@ .\" (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 March 27, 2003 .Dt BUS_CHILD_PRESENT 9 .Os diff --git a/share/man/man9/bus_delayed_attach_children.9 b/share/man/man9/bus_delayed_attach_children.9 deleted file mode 100644 index 0ba923d54b49..000000000000 --- a/share/man/man9/bus_delayed_attach_children.9 +++ /dev/null @@ -1,55 +0,0 @@ -.\" -*- nroff -*- -.\" -.\" Copyright (c) 2019 M. Warner Losh -.\" -.\" 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 13, 2019 -.Dt BUS_DELAYED_ATTACH_CHILDREN 9 -.Os -.Sh NAME -.Nm bus_delayed_attach_children -.Nd "request that the children be attached when interrupts are enabled" -.Sh SYNOPSIS -.In sys/param.h -.In sys/bus.h -.Pp -.Ft int -.Fn bus_delayed_attach_children "device_t dev" -.Sh DESCRIPTION -The -.Fn bus_delayed_attach_children -function requests that the children of this device -be attached when interrupts are running. -If interrupts are currently running, this happens immediately. -If interrupts are not yet running, this happens after interrupts are enabled, but -before the system mounts root. -.Sh RETURN VALUES -A zero return value indicates success. -.Sh SEE ALSO -.Xr bus 9 , -.Xr device 9 , -.Xr driver 9 -.Sh AUTHORS -This manual page was written by -.An Warner Losh Aq Mt imp@FreeBSD.org . diff --git a/share/man/man9/bus_dma.9 b/share/man/man9/bus_dma.9 index 4fc3a70eca17..b644eeb2a476 100644 --- a/share/man/man9/bus_dma.9 +++ b/share/man/man9/bus_dma.9 @@ -49,8 +49,6 @@ .\" 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$ .\" $NetBSD: bus_dma.9,v 1.25 2002/10/14 13:43:16 wiz Exp $ .\" .Dd May 25, 2020 @@ -375,7 +373,7 @@ inclusive. The filter function should return zero if any mapping in this range can be accommodated by the device and non-zero otherwise. .Pp -.Em Note: The use of filters is deprecated. Proper operation is not guaranteed. +.Em Note: The use of filters is no longer supported and will result in an error. .It Vt bus_dma_segment_t A machine-dependent type that describes individual DMA segments. @@ -613,26 +611,10 @@ This area of is used to bounce requests that would otherwise conflict with the exclusion window. .It Fa filtfunc -Optional filter function (may be -.Dv NULL ) -to be called for any attempt to -map memory into the window described by -.Fa lowaddr -and -.Fa highaddr . -A filter function is only required when the single window described -by -.Fa lowaddr -and -.Fa highaddr -cannot adequately describe the constraints of the device. -The filter function will be called for every machine page -that overlaps the exclusion window. -.Pp -.Em Note: The use of filters is deprecated. Proper operation is not guaranteed. +Formerly the optional filter function; must be +.Dv NULL . .It Fa filtfuncarg -Argument passed to all calls to the filter function for this tag. -May be +Must be .Dv NULL . .It Fa maxsize Maximum size, in bytes, of the sum of all segment lengths in a given @@ -691,6 +673,14 @@ Returns .Er ENOMEM if sufficient memory is not available for tag creation or allocating mapping resources. +Returns +.Er EINVAL +if either +.Fa filtfunc +or +.Fa filtarg +arguments are not +.Dv NULL . .It Fn bus_dma_tag_destroy "dmat" Deallocate the DMA tag .Fa dmat diff --git a/share/man/man9/bus_generic_detach.9 b/share/man/man9/bus_generic_detach.9 index bba49a1ee75e..b7a2aa6e6105 100644 --- a/share/man/man9/bus_generic_detach.9 +++ b/share/man/man9/bus_generic_detach.9 @@ -26,9 +26,7 @@ .\" (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 15, 2017 +.Dd February 5, 2025 .Dt BUS_GENERIC_DETACH 9 .Os .Sh NAME @@ -46,13 +44,23 @@ This function provides an implementation of the .Xr DEVICE_DETACH 9 method which can be used by most bus code. -It simply calls the -.Xr DEVICE_DETACH 9 -method of each child device attached to the bus. +It uses +.Xr bus_detach_children 9 +to detach drivers from all child devices giving them a chance to veto the +detach request. +If +.Fn bus_detach_children +succeeds, +.Fn bus_generic_detach +calls +.Xr device_delete_children 9 +to delete all child devices. .Sh RETURN VALUES Zero is returned on success, otherwise an appropriate error is returned. .Sh SEE ALSO +.Xr bus_detach_children 9 , .Xr device 9 , +.Xr device_delete_children 9 , .Xr driver 9 .Sh AUTHORS This manual page was written by diff --git a/share/man/man9/bus_generic_new_pass.9 b/share/man/man9/bus_generic_new_pass.9 index 5718c57afe17..709f91c32da4 100644 --- a/share/man/man9/bus_generic_new_pass.9 +++ b/share/man/man9/bus_generic_new_pass.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 15, 2017 .Dt BUS_GENERIC_NEW_PASS 9 .Os diff --git a/share/man/man9/bus_generic_print_child.9 b/share/man/man9/bus_generic_print_child.9 index 5864e3a67957..8a72c8e743ec 100644 --- a/share/man/man9/bus_generic_print_child.9 +++ b/share/man/man9/bus_generic_print_child.9 @@ -26,39 +26,88 @@ .\" (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 15, 2017 +.Dd February 5, 2025 .Dt BUS_GENERIC_PRINT_CHILD 9 .Os .Sh NAME -.Nm bus_generic_print_child +.Nm bus_generic_print_child , +.Nm bus_print_child_domain , +.Nm bus_print_child_footer , +.Nm bus_print_child_header .Nd generic implementation of -.Dv DEVICE_PRINT_CHILD -for buses +.Xr BUS_PRINT_CHILD 9 .Sh SYNOPSIS .In sys/param.h .In sys/bus.h .Ft int .Fn bus_generic_print_child "device_t dev" "device_t child" +.Ft int +.Fn bus_print_child_domain "device_t dev" "device_t child" +.Ft int +.Fn bus_print_child_footer "device_t dev" "device_t child" +.Ft int +.Fn bus_print_child_header "device_t dev" "device_t child" .Sh DESCRIPTION -This implementation prints out the default device announcement message. -Given device 'foo0' on bus 'bar0' where foo0 has the name "FooCard 1234" the +.Fn bus_generic_print_child +prints out the default device announcement message. +Given device +.Sq foo0 +on bus +.Sq bar0 +where foo0 has the description +.Dq FooCard 1234 +and is associated with the NUMA domain 1, +the following would be printed: +.Bd -literal -offset indent +foo0: <FooCard 1234> numa-domain 1 on bar0 +.Ed .Pp -foo0: <FooCard 1234> on bar0 -.Pp -bus_generic_print_child itself calls two functions -.Fn bus_print_child_header +.Fn bus_generic_print_child +calls the three helper functions +.Fn bus_print_child_header , +.Fn bus_print_child_domain , and .Fn bus_print_child_footer . -The former prints "foo0: <FooCard 1234>" and the latter "on bar0". -These routines should be used if possible in your own code if +.Pp +.Fn bus_print_child_header +outputs the device name and unit followed by the device description +in angle brackets +.Po +.Dq foo0: <FooCard 1234> +.Pc . +.Pp +.Fn bus_print_child_domain +outputs +.Dq \& numa-domain +followed by the domain number if +.Fn bus_get_domain +returns a valid domain for the device +.Po +.Dq numa-domain 1 +.Pc . +If +.Fa dev +is not associated witha valid domain, +nothing is output. +.Pp +.Fn bus_print_child_footer +outputs the string +.Dq \& on +followed by the parent device's name and unit +.Po +.Dq \& on bar0 +.Pc . +.Pp +These functions can be used to implement +.Xr BUS_PRINT_CHILD 9 +in a bus driver if .Fn bus_generic_print_child -does not completely suit your needs. +is not sufficient. .Sh RETURN VALUES The number of characters output. .Sh SEE ALSO +.Xr BUS_PRINT_CHILD 9 , .Xr device 9 .Sh AUTHORS This manual page was written by diff --git a/share/man/man9/bus_generic_read_ivar.9 b/share/man/man9/bus_generic_read_ivar.9 index 6090f40ad170..3783de897775 100644 --- a/share/man/man9/bus_generic_read_ivar.9 +++ b/share/man/man9/bus_generic_read_ivar.9 @@ -26,8 +26,6 @@ .\" (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 15, 2017 .Dt BUS_GENERIC_READ_IVAR 9 .Os diff --git a/share/man/man9/bus_generic_shutdown.9 b/share/man/man9/bus_generic_shutdown.9 index a9b2a8f86a72..264a2127d6bb 100644 --- a/share/man/man9/bus_generic_shutdown.9 +++ b/share/man/man9/bus_generic_shutdown.9 @@ -26,8 +26,6 @@ .\" (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 15, 2017 .Dt BUS_GENERIC_SHUTDOWN 9 .Os diff --git a/share/man/man9/bus_get_resource.9 b/share/man/man9/bus_get_resource.9 index 33fc2e24ca74..f93a877daf55 100644 --- a/share/man/man9/bus_get_resource.9 +++ b/share/man/man9/bus_get_resource.9 @@ -30,7 +30,6 @@ .\" SUCH DAMAGE. .\" .\" $DragonFly: src/share/man/man9/bus_get_resource.9,v 1.1 2008/11/09 09:48:41 swildner Exp $ -.\" $FreeBSD$ .\" .Dd September 26, 2015 .Dt BUS_GET_RESOURCE 9 diff --git a/share/man/man9/bus_map_resource.9 b/share/man/man9/bus_map_resource.9 index 07b6591fd532..5cccb815b73b 100644 --- a/share/man/man9/bus_map_resource.9 +++ b/share/man/man9/bus_map_resource.9 @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd February 5, 2018 +.Dd March 13, 2024 .Dt BUS_MAP_RESOURCE 9 .Os .Sh NAME @@ -40,12 +38,12 @@ .In machine/resource.h .Ft int .Fo bus_map_resource -.Fa "device_t dev" "int type" "struct resource *r" +.Fa "device_t dev" "struct resource *r" .Fa "struct resource_map_request *args" "struct resource_map *map" .Fc .Ft int .Fo bus_unmap_resource -.Fa "device_t dev" "int type" "struct resource *r" "struct resource_map *map" +.Fa "device_t dev" "struct resource *r" "struct resource_map *map" .Fc .Ft void .Fn resource_init_map_request "struct resource_map_request *args" @@ -60,16 +58,6 @@ The arguments are as follows: .Bl -tag -width indent .It Fa dev The device that owns the resource. -.It Fa type -The type of resource to map. -It is one of: -.Pp -.Bl -tag -width ".Dv SYS_RES_MEMORY" -compact -.It Dv SYS_RES_IOPORT -for I/O ports -.It Dv SYS_RES_MEMORY -for I/O memory -.El .It Fa r A pointer to the .Vt "struct resource" diff --git a/share/man/man9/bus_release_resource.9 b/share/man/man9/bus_release_resource.9 index 731eda3b975a..5203295a7488 100644 --- a/share/man/man9/bus_release_resource.9 +++ b/share/man/man9/bus_release_resource.9 @@ -26,9 +26,7 @@ .\" (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 May 18, 2000 +.Dd March 13, 2024 .Dt BUS_RELEASE_RESOURCE 9 .Os .Sh NAME @@ -42,7 +40,7 @@ .In sys/rman.h .In machine/resource.h .Ft int -.Fn bus_release_resource "device_t dev" "int type" "int rid" "struct resource *r" +.Fn bus_release_resource "device_t dev" "struct resource *r" .Sh DESCRIPTION Free a resource allocated by .Xr bus_alloc_resource 9 . @@ -55,20 +53,6 @@ for IRQs). .Fa dev is the device that owns the resource. .It -.Fa type -is the type of resource that is released. -It must be of the same type you allocated it as before. -See -.Xr bus_alloc_resource 9 -for valid types. -.It -.Fa rid -is the resource ID of the resource. -The -.Fa rid -value must be the same as the one returned by -.Xr bus_alloc_resource 9 . -.It .Fa r is the pointer to .Va struct resource , @@ -90,12 +74,10 @@ The kernel will panic, if it cannot release the resource. bus_teardown_intr(dev, foosoftc->irqres, foosoftc->irqid); /* release IRQ resource */ - bus_release_resource(dev, SYS_RES_IRQ, foosoftc->irqid, - foosoftc->irqres); + bus_release_resource(dev, foosoftc->irqres); /* release I/O port resource */ - bus_release_resource(dev, SYS_RES_IOPORT, foosoftc->portid, - foosoftc->portres); + bus_release_resource(dev, foosoftc->portres); .Ed .Sh SEE ALSO .Xr bus_alloc_resource 9 , diff --git a/share/man/man9/bus_set_pass.9 b/share/man/man9/bus_set_pass.9 index f59d03b04bcb..6c34cc316bc1 100644 --- a/share/man/man9/bus_set_pass.9 +++ b/share/man/man9/bus_set_pass.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 8, 2009 .Dt BUS_SET_PASS 9 .Os diff --git a/share/man/man9/bus_set_resource.9 b/share/man/man9/bus_set_resource.9 index 9882deb734a5..06f1da9f842a 100644 --- a/share/man/man9/bus_set_resource.9 +++ b/share/man/man9/bus_set_resource.9 @@ -22,8 +22,6 @@ .\" (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 March 29, 2003 .Dt BUS_SET_RESOURCE 9 .Os diff --git a/share/man/man9/bus_space.9 b/share/man/man9/bus_space.9 index 9d5ca602acfe..12ab5d8dcddf 100644 --- a/share/man/man9/bus_space.9 +++ b/share/man/man9/bus_space.9 @@ -50,8 +50,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 1, 2021 .Dt BUS_SPACE 9 .Os diff --git a/share/man/man9/byteorder.9 b/share/man/man9/byteorder.9 index e5737f6afe79..42f33620ef1e 100644 --- a/share/man/man9/byteorder.9 +++ b/share/man/man9/byteorder.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 29, 2002 .Dt BYTEORDER 9 .Os diff --git a/share/man/man9/callout.9 b/share/man/man9/callout.9 index 5c011a20d338..0e59ef8ab2b1 100644 --- a/share/man/man9/callout.9 +++ b/share/man/man9/callout.9 @@ -27,15 +27,12 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd September 1, 2021 +.Dd January 22, 2024 .Dt CALLOUT 9 .Os .Sh NAME .Nm callout_active , .Nm callout_deactivate , -.Nm callout_async_drain , .Nm callout_drain , .Nm callout_init , .Nm callout_init_mtx , @@ -68,8 +65,6 @@ typedef void callout_func_t (void *); .Ft void .Fn callout_deactivate "struct callout *c" .Ft int -.Fn callout_async_drain "struct callout *c" "callout_func_t *drain" -.Ft int .Fn callout_drain "struct callout *c" .Ft void .Fn callout_init "struct callout *c" "int mpsafe" @@ -295,30 +290,6 @@ If the callout has an associated lock, then that lock must be held when this function is called. .Pp The function -.Fn callout_async_drain -is identical to -.Fn callout_stop -with one difference. -When -.Fn callout_async_drain -returns zero it will arrange for the function -.Fa drain -to be called using the same argument given to the -.Fn callout_reset -function. -.Fn callout_async_drain -If the callout has an associated lock, -then that lock must be held when this function is called. -Note that when stopping multiple callouts that use the same lock it is possible -to get multiple return's of zero and multiple calls to the -.Fa drain -function, depending upon which CPU's the callouts are running. -The -.Fa drain -function itself is called from the context of the completing callout -i.e. softclock or hardclock, just like a callout itself. -.Pp -The function .Fn callout_drain is identical to .Fn callout_stop diff --git a/share/man/man9/casuword.9 b/share/man/man9/casuword.9 index fdafd5a39799..2623bea97a92 100644 --- a/share/man/man9/casuword.9 +++ b/share/man/man9/casuword.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 19, 2019 .Dt CASU 9 .Os diff --git a/share/man/man9/cd.9 b/share/man/man9/cd.9 index 44c6b7df4a01..74151f8a282f 100644 --- a/share/man/man9/cd.9 +++ b/share/man/man9/cd.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 25, 2014 .Dt CD 9 .Os diff --git a/share/man/man9/cdefs.9 b/share/man/man9/cdefs.9 new file mode 100644 index 000000000000..cc56e34d070a --- /dev/null +++ b/share/man/man9/cdefs.9 @@ -0,0 +1,487 @@ +.\"- +.\" Copyright (c) 2024 M. Warner Losh <imp@FreeBSD.org> +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd May 9, 2025 +.Dt CDEFS 9 +.Os +.Sh NAME +.Nm cdefs +.Nd compiler portability macro definitions +.Sh DESCRIPTION +.In sys/cdefs.h +defines macros for compiler, C language standard portability, POSIX standards +compliance and symbol visibility. +It defines programming interfaces for the system header files to adopt to the +many environments +.Fx +supports compilation for. +It defines convenience macros for the +.Fx +sources, tailored to the base +system's needs. +.Pp +Most of these macros are for use inside the +.Fx +sources only. +They are not intended as a general portability layer. +.Sh Supported Compilers +.Bl -tag -offset 2n -width 0 +.It Compilers supported for building programs on Fx : +.Bl -column -offset 0n indent-two +.It Sy Compiler Ta Sy Versions +.It gcc Ta 9, 10, 11, 12, 13, 14 +.It clang Ta 10, 11, 12, 13, 14, 15, 16, 17, 18 +.It TinyC (tcc) Ta 0.9 +.It pcc Ta 1.1 +.El +.Pp +Due to testing constraints, tcc and pcc may not always work. +.It Compilers supported for building Fx itself: +.Bl -column -offset 0n indent-two +.It Sy Compiler Ta Sy Major Versions Supported +.It gcc Ta 12, 13, 14 +.It clang Ta 16, 17, 18 +.El +.Pp +Please note: Not every single minor versions of these compilers +will work or are supported. +.El +.Sh Macros and Magic for Programming Environment +.Nm +defines (or refrains from defining) a number of macros to increase portability +of compiled programs. +These are to allow more advanced language features to appear in header files. +The header files assume a compiler that accepts C prototype function +declarations. +They also assume that the compiler accepts ANSI C89 keywords for all language +dialects. +.Ss General Macros +General macros that facilitate multiple language environments and language +dialects. +.Bl -column "---------------" +.It Sy Macro Ta Sy Description +.It Dv __volatile Ta expands to volatile in C++ and C89 and newer environments, +__volatile in pre-ANSI environments that support this extension or nothing +otherwise. +.It Dv __inline Ta expands to inline in C++ and C89 and newer environments, +__inline in pre-ANSI environments that support this extension or nothing +otherwise. +.It Dv __restrict Ta expands to restrict in C99 and newer environments, or +__restrict otherwise. +.It Dv __CONCAT Ta used to paste two pre-processor tokens. +.It Dv __STRING Ta used to convert the argument to a string. +.It Dv __BEGIN_DECLS Ta Start a group of functions. +.It Dv __END_DECLS Ta End a group of functions. +In a C environment, these are defined as nothing. +In a C++ environment, these declare the functions to have +.Dq C +linkage. +.El +.Ss Function, Structure and Variable Modifiers +.Bl -column "---------------" +.It Sy Macro Ta Sy Description +.It Sy __weak_symbol Ta Declare the symbol to be a weak symbol +.It Sy __dead2 Ta Function will not return +.It Sy __pure2 Ta Function has no side effects +.It Sy __unused Ta To Variable may be unused (usually arguments), so do not +warn about it +.It Sy __used Ta Function really is used, so emit it even if it appears unused. +.It Sy __deprecated Ta Function interface has been deprecated, and clients +should migrate to a new interface. +A warning will be issued for clients of this interface. +.It Sy __deprecated1(msg) Ta Function interface has been deprecated, and clients +should migrate to a new interface. +The string +.Fa msg +will be included in a warning issued for clients of this interface. +.It Sy __packed Ta \&Do not have space between structure elements for natural alignment. +Used when communicating with external protocols. +.It Sy __aligned(x) Ta Specify in bytes the minimum alignment for the specified field, structure or variable +.It Sy __section(x) Ta Place function or variable in section Fa x +.It Sy __writeonly Ta Hint that the variable is only assigned to, but do not warn about it. +Useful for macros and other places the eventual use of the result is unknown. +.It Sy __alloc_size(x) Ta The function always returns at least the number of +bytes determined by argument number Fa x +.It Sy __alloc_size2(x,n) Ta The function always returns an array, whose size +is at least the number of bytes determined by argument number Fa x times the +number of elements specified by argument number Fa n +.It Sy __alloc_align(x) Ta Function either returns a pointer aligned to Fa x bytes +or Dv NULL. +.It Sy __min_size Ta Declare the array to have a certain, minimum size +.It Sy __malloc_like Ta Function behaves like the +.Dq malloc +family of functions. +.It Sy __pure Ta Function has no side effects +.It Sy __always_inline Ta Always inline this function when called +.It Sy __fastcall Ta Use the +.Dq fastcall +ABI to call and name mangle this function. +.It Sy __result_use_check Ta Warn if function caller does not use its return value +.It Sy __nodiscard Ta Equivalent to the standard +.Dq [[nodiscard]] +attribute. +If applied to a function, warn if function caller does not use its +return value. +The warning may be silenced using a cast to +.Vt void , +or in C++, using an assignment to +.Va std::ignore . +If applied to a struct, C++ class or enum, this applies to all functions +returning values of that type. +If applied to a C++ constructor, this applies to creating instances of +the class using that constructor. +.It Sy __returns_twice Ta Returns multiple times, like +.Xr fork 2 +.It Sy __unreachable Ta This code is not reachable at runtime +.It Sy __predict_true(x) Ta Hint to the compiler that +.Fa x +is true most of the time. +Should only be used when performance is improved for a frequently called bit of code. +.It Sy __predict_false(x) Ta Hint to the compiler that +.Fa x +is false most of the time. +Should only be used when performance is improved for a frequently called bit of code. +.It Sy __null_sentinel Ta The varadic function contains a parameter that is +a NULL sentinel to mark the end of its arguments. +.It Sy __exported Ta +.It Sy __hidden Ta +.It Sy __printflike(fmtarg,firstvararg) Ta Function is similar to +.Fn printf +which specifies the format argument with +.Fa fmtarg +and where the arguments formatted by that format start with the +.Fa firstvararg , +with 0 meaning that +.Dv va_arg +is used and cannot be checked. +.It Sy __scanflike(fmtarg,firstvararg) Ta Function is similar to +.Fn scanf +which specifies the format argument with +.Fa fmtarg +and where the arguments formatted by that format start with the +.Fa firstvararg , +with 0 meaning that +.Dv va_arg +is used and cannot be checked. +.It Sy __format_arg(f) Ta Specifies that arg +.Fa f +contains a string that will be passed to a function like +.Fn printf +or +.Fa scanf +after being translated in some way. +.It Sy __strfmonlike(fmtarg,firstvararg) Ta Function is similar to +.Fn scanf +which specifies the format argument with +.Fa fmtarg +and where the arguments formatted by that format start with the +.Fa firstvararg , +with 0 meaning that +.Dv va_arg +is used and cannot be checked. +.It Sy __strtimelike(fmtarg,firstvararg) Ta Function is similar to +.Fn scanf +which specifies the format argument with +.Fa fmtarg +and where the arguments formatted by that format start with the +.Fa firstvararg , +with 0 meaning that +.Dv va_arg +is used and cannot be checked. +.It Sy __printf0like(fmtarg,firstvararg) Ta Exactly the same +as +.Sy __printflike +except +.Fa fmtarg +may be +.Dv NULL. +.It Sy __strong_reference(sym,aliassym) Ta +.It Sy __weak_reference(sym,alias) Ta +.It Sy __warn_references(sym,msg) Ta +.It Sy __sym_compat(sym,impl,verid) Ta +.It Sy __sym_default(sym,impl,verid) Ta +.It Sy __GLOBAL(sym) Ta +.It Sy __WEAK(sym) Ta +.It Sy __DECONST(type,var) Ta +.It Sy __DEVOLATILE(type,var) Ta +.It Sy __DEQUALIFY(type,var) Ta +.It Sy __RENAME(x) Ta +.It Sy __arg_type_tag Ta +.It Sy __datatype_type_tag Ta +.It Sy __align_up(x,y) Ta +.It Sy __align_down(x,y) Ta +.It Sy __is_aligned(x,y) Ta +.El +.Ss Locking and Debugging Macros +Macros for lock annotation and debugging, as well as some general debugging +macros for address sanitizers. +.Bl -column "---------------" +.It Sy __lock_annotate(x) Ta +.It Sy __lockable Ta +.It Sy __locks_exclusive Ta +.It Sy __locks_shared Ta +.It Sy __trylocks_exclusive Ta +.It Sy __trylocks_shared Ta +.It Sy __unlocks Ta +.It Sy __asserts_exclusive Ta +.It Sy __asserts_shared Ta +.It Sy __requires_exclusive Ta +.It Sy __requires_shared Ta +.It Sy __requires_unlocked Ta +.It Sy __no_lock_analysis Ta +.It Sy __nosanitizeaddress Ta +.It Sy __nosanitizememory Ta +.It Sy __nosanitizethread Ta +.It Sy __nostackprotector Ta +.It Sy __guarded_by(x) Ta +.It Sy __pt_guarded_by(x) Ta +.El +.Ss Emulated Keywords +As C evolves, many of the old macros we once used have been incorporated into +the standard language. +As this happens, we add support for these keywords as macros for older +compilation environments. +Sometimes this results in a nop in the older environment. +.Bl -column "---------------" +.It Sy Keyword Ta Sy Description +.It Sy _Alignas(x) Ta +.It Sy _Alignof(x) Ta +.It Sy _Noreturn Ta Expands to +.Dq [[noreturn]] +in C++-11 and newer compilation environments, otherwise +.Dq __dead2 +.It Sy _Static_assert(x, y) Ta Compile time assertion that +.Fa x +is true, otherwise emit +.Fa y +as the error message. +.It Sy _Thread_local Ta Designate variable as thread local storage +.It Sy __generic Ta implement _Generic-like features which aren't entirely possible to emulate the _Generic keyword +.It Sy __noexcept Ta to emulate the C++11 argument-less noexcept form +.It Sy __noexcept_if Ta to emulate the C++11 conditional noexcept form +.It Sy _Nonnull Ta +.It Sy _Nullable Ta +.It Sy _Null_unspecified Ta +.El +.Ss Support Macros +The following macros are defined, or have specific values, to denote certain +things about the build environment. +.Bl -column "---------------" +.It Sy Macro Ta Sy Description +.It Sy __LONG_LONG_SUPPORTED Ta Variables may be declared +.Dq long long . +This is defined for C99 or newer and C++ environments. +.It Sy __STDC_LIMIT_MACROS Ta +.It Sy __STDC_CONSTANT_MACROS Ta +.El +.Ss Convenience Macros +These macros make it easier to do a number of things, even though strictly +speaking the standard places their normal form in another header. +.Bl -column "---------------" +.It Sy Macro Ta Sy Description +.It Sy __offsetof(type,field) Ta +.It Sy __rangeof(type,start,end) Ta +.It Sy __containerof(x,s,m) Ta +.El +.Ss ID Strings +This section is deprecated, but is kept around because too much contrib software +still uses these. +.Bl -column "---------------" +.It Sy Macro Ta Sy Description +.It Sy __IDSTRING(name,string) Ta +.It Sy __FBSDID(s) Ta +.It Sy __RCSID(s) Ta +.It Sy __RCSID_SOURCE(s) Ta +.It Sy __SCCSID(s) Ta +.It Sy __COPYRIGHT(s) Ta +.El +.Sh Supported C Environments +.Fx +supports a number C standard environments. +Selection of the language dialect is a compiler-dependent command line option, +though it is usually +.Fl std=XX +where XX is the standard to set for compiling, such as c89 or c23. +.Fx +provides a number of selection macros to control visibility of symbols. +Please see the section on Selection Macros for the specifics. +.Pp +.Bl -tag +.It K \*(Am R +Pre-ANSI Kernighan and Ritchie C. +Sometimes called +.Dq knr +or +.Dq C78 +to distinguish it from newer standards. +Support for this compilation environment is dependent on compilers supporting +this configuration. +Most of the old forms of C have been deprecated or removed in +.St -isoC-2023 . +Compilers make compiling in this mode increasingly difficult and support for it +may ultimately be removed from the tree. +.It St -ansiC +.Dv __STDC__ +is defined, however +.Dv __STDC_VERSION__ +is not. +.Pp +Strict environment selected with +.Dv _ANSI_SOURCE . +.It St -isoC-99 +.Dv __STDC_VERSION__ = 199901L +.Pp +Strict environment selected with +.Dv _C99_SOURCE . +.It St -isoC-2011 +.Dv __STDC_VERSION__ = 201112L +.Pp +Strict environment selected with +.Dv _C11_SOURCE . +.It ISO/IEC 9899:2018 (“ISO C17”) +.Dv __STDC_VERSION__ = 201710L +.Pp +Strict environment selected with +.Dv _C11_SOURCE +since there are no new C17 only symbols or macros. +.Pp +This version of the standard did not introduce any new features, only made +minor, technical corrections. +.It St -isoC-2023 +.Dv __STDC_VERSION__ = 202311L +Strict environment selected with +.Dv _C23_SOURCE +though ISO C23 support is only partially implemented. +.El +.Pp +For more information on C standards, see +.Xr c 7 . +.Ss Programming Environment Selection Macros +Defining the macros outlined below requests that the system header files provide +only the functions, structures and macros (symbols) defined by the appropriate +standard, while suppressing all extensions. +However, system headers not defined by that standard may define extensions. +You may only define one of the following for any compilation unit. +.Bl -column "---------------" +.It Sy Macro Ta Sy Environment +.It Dv _POSIX_SOURCE Ta St -p1003.1-88 including St -ansiC +.It Dv _POSIX_C_SOURCE = 1 Ta St -p1003.1-88 including St -ansiC +.It Dv _POSIX_C_SOURCE = 2 Ta St -p1003.1-90 including St -ansiC +.It Dv _POSIX_C_SOURCE = 199309 Ta St -p1003.1b-93 including St -ansiC +.It Dv _POSIX_C_SOURCE = 199506 Ta St -p1003.1c-95 including St -ansiC +.It Dv _POSIX_C_SOURCE = 200112 Ta St -p1003.1-2001 including St -isoC-99 +.It Dv _POSIX_C_SOURCE = 200809 Ta St -p1003.1-2008 including St -isoC-99 +.It Dv _POSIX_C_SOURCE = 202405 Ta St -p1003.1-2024 including ISO/IEC 9899:2018 ("ISO C17"), +.It Dv _XOPEN_SOURCE defined Ta St -p1003.1-90 with XPG Extensions to St -susv1 including St -ansiC . +However, +.Fx +implements this as a NOP because too much software breaks with the correct strict environment. +.It Dv _XOPEN_SOURCE = 500 Ta St -p1003.1c-95 and XPG extensions to St -susv2 including St -ansiC +.It Dv _XOPEN_SOURCE = 600 Ta St -p1003.1-2001 and XPG extensions to St -susv3 including St -isoC-99 +.It Dv _XOPEN_SOURCE = 700 Ta St -p1003.1-2008 and XPG extensions to St -susv4 including St -isoC-99 +.It Dv _XOPEN_SOURCE = 800 Ta St -p1003.1-2024 and XPG extensions to Version 5 of the Single UNIX Specification (“SUSv5”) including ISO/IEC 9899:2018 (“ISO C17”) +.It Dv _ANSI_SOURCE Ta St -ansiC +.It Dv _C99_SOURCE Ta St -isoC-99 +.It Dv _C11_SOURCE Ta St -isoC-2011 +.It Dv _C23_SOURCE Ta St -isoC-2023 +.It Dv _BSD_SOURCE Ta Everything, including Fx extensions +.El +.Pp +Note: +.St -p1003.1-2024 +and XPG extensions to Version 5 of the Single UNIX Specification ("SUSv5") +support is incomplete. +.Pp +When both POSIX and C environments are selected, the POSIX environment selects +which C environment is used. +However, when C11 dialect is selected with +.St -p1003.1-2008 , +definitions for +.St -isoC-2011 +are also included. +Likewise, when C23 dialog is selected with +.St -p1003.1-2008 +or +.St -p1003.1-2024 , +definitions for +.St -isoC-2023 +are also included. +.Ss Header Visibility Macros +These macros are set by +.Nm +to control the visibility of different standards. +Users must not define these, and doing so will produced undefined results. +They are documented here for developers working on system's header files. +.Bl -column "---------------" +.It Dv __XSI_VISIBLE Ta Restricts the visibility of XOPEN Single Unix Standard version. +Possible values are 500, 600, 700 or 800, corresponding to Issue 5, 6, 7, or 8 +of the Single Unix Standard. +These are extra functions in addition to the normal POSIX ones. +.It Dv __POSIX_VISIBLE Ta Make symbols associated with certain standards versions visible. +Set to the value assigned to +.Dv _POSIX_C_SOURCE +by convention with 199009 for +.St -p1003.1-88 +and 199209 +.St -p1003.1-90 . +.It Dv __ISO_C_VISIBLE Ta The C level that's visible. +Possible values include 1990, 1999, 2011, 2017 and 2023 for +.St -isoC-90 , +.St -isoC-99 , +.St -isoC-2011 , +ISO/IEC 9899:2018 ("ISO C17"), and +.St -isoC-2023 , +respectively. +.It Dv __BSD_VISIBLE Ta 1 if the +.Fx +extensions are visible, 0 otherwise. +.It Dv __EXT1_VISIBLE Ta 1 if the +.St -isoC-2011 +Appendix K 3.7.4.1 +extensions are visible, 0 otherwise. +.El +.Sh Supported C++ Environments +.Fx +supports C++11 and newer standards fully. +.Bl -tag +.It ISO/IEC 14882:1998 ("C++98") +.Dv __cplusplus = 199711 +.Pp +The first standardized version of C++. +Unlike K \*(Am R support in C, compilers dropped support for versions of +the language prior to C++98. +.It ISO/IEC 14882:2003 ("C++03") +.Dv __cplusplus = 199711 +.Pp +Note, this is the same value as C++98. +C++03 did not define a new value for +.Dv __cplusplus . +There is no way, at compile time, to detect the difference. +The standard resolved a number of defect reports and slightly +expanded value initialization. +Most compilers support it the same as C++98. +.It ISO/IEC 14882:2011 ("C++11") +.Dv __cplusplus = 201103 +.It ISO/IEC 14882:2014 ("C++14") +.Dv __cplusplus = 201402 +.It ISO/IEC 14882:2017 ("C++17") +.Dv __cplusplus = 201703 +.It ISO/IEC 14882:2020 ("C++20") +.Dv __cplusplus = 202002 +.It ISO/IEC 14882:2023 ("C++23") +.Dv __cplusplus = 202302 +.El +.Pp +.Fx +uses llvm project's libc++. +However, they are removing support for C++ prior to C++11. +While programs can still build with earlier environments for now, these changes +mean that +.Fl pedantic-errors +cannot be reliably enabled for standards older than C++11. +.Sh HISTORY +.In sys/cdefs.h +first appeared in +.Bx 4.3 NET/2 . diff --git a/share/man/man9/cnv.9 b/share/man/man9/cnv.9 index eaae3f7156ab..fa5310e174e1 100644 --- a/share/man/man9/cnv.9 +++ b/share/man/man9/cnv.9 @@ -23,16 +23,14 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd June 18, 2018 +.Dd January 3, 2025 .Dt CNV 9 .Os .Sh NAME .Nm cnvlist_get , .Nm cnvlist_take , .Nm cnvlist_free -.Nd "API for managing name/value pairs by cookie." +.Nd "API for managing name/value pairs by cookie" .Sh LIBRARY .Lb libnv .Sh SYNOPSIS @@ -117,7 +115,7 @@ The .Nm libnv library permits easy management of name/value pairs and can send and receive them over sockets. -For more information, also see +For more information, see .Xr nv 9 . .Pp The concept of cookies is explained in @@ -130,25 +128,28 @@ from .Pp The .Fn cnvlist_name -function returns the name of an element associated with the given cookie. +function returns the name of an element associated with +.Fa cookie . .Pp The .Fn cnvlist_type -function returns the type of an element associated with the given cookie. +function returns the type of an element associated with +.Fa cookie . Types which can be returned are described in .Xr nv 9 . .Pp The .Nm cnvlist_get -family of functions obtains the value associated with the given cookie. +functions return the value associated with +.Fa cookie . Returned strings, nvlists, descriptors, binaries, or arrays must not be modified -by the user, since they still belong to the nvlist. +by the user since they still belong to the nvlist. The nvlist must not be in an error state. .Pp The .Nm cnvlist_take -family of functions returns the value associated with the given cookie and -removes the element from the nvlist. +functions return the value associated with the given cookie and +remove the element from the nvlist. When the value is a string, binary, or array value, the caller is responsible for freeing the returned memory with .Fn free 3 . @@ -156,18 +157,21 @@ When the value is an nvlist, the caller is responsible for destroying the returned nvlist with .Fn nvlist_destroy . When the value is a descriptor, the caller is responsible for closing the -returned descriptor with the +returned descriptor with .Fn close 2 . .Pp The .Nm cnvlist_free -family of functions removes an element of the supplied cookie and frees all -resources. -If an element of the given cookie has the wrong type or does not exist, the +functions remove the element identified by +.Fa cookie +and free any associated resources. +If the element identified by +.Fa cookie +has the wrong type or does not exist, the program -is aborted. +aborts. .Sh EXAMPLES -The following example demonstrates how to deal with cnvlist API. +The following example demonstrates how to deal with the cnvlist API. .Bd -literal int type; void *cookie, *scookie, *bcookie; diff --git a/share/man/man9/condvar.9 b/share/man/man9/condvar.9 index 4a4e8741eda0..afadd7333e52 100644 --- a/share/man/man9/condvar.9 +++ b/share/man/man9/condvar.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 19, 2013 .Dt CONDVAR 9 .Os @@ -251,11 +249,11 @@ will fail if: Timeout expired. .El .Sh SEE ALSO +.Xr callout 9 , .Xr locking 9 , .Xr mtx_pool 9 , .Xr mutex 9 , .Xr rwlock 9 , .Xr sema 9 , .Xr sleep 9 , -.Xr sx 9 , -.Xr timeout 9 +.Xr sx 9 diff --git a/share/man/man9/config_intrhook.9 b/share/man/man9/config_intrhook.9 index 6892a089b00f..4ab491304b00 100644 --- a/share/man/man9/config_intrhook.9 +++ b/share/man/man9/config_intrhook.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 8, 2021 .Dt CONFIG_INTRHOOK 9 .Os diff --git a/share/man/man9/contigmalloc.9 b/share/man/man9/contigmalloc.9 index 5d6a531ecf98..2e5d55ae8ba1 100644 --- a/share/man/man9/contigmalloc.9 +++ b/share/man/man9/contigmalloc.9 @@ -23,13 +23,11 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd October 30, 2018 +.Dd July 26, 2024 .Dt CONTIGMALLOC 9 .Os .Sh NAME -.Nm contigmalloc , contigfree +.Nm contigmalloc .Nd manage contiguous kernel physical memory .Sh SYNOPSIS .In sys/types.h @@ -44,12 +42,6 @@ .Fa "unsigned long alignment" .Fa "vm_paddr_t boundary" .Fc -.Ft void -.Fo contigfree -.Fa "void *addr" -.Fa "unsigned long size" -.Fa "struct malloc_type *type" -.Fc .In sys/param.h .In sys/domainset.h .Ft "void *" @@ -111,10 +103,10 @@ Other flags (if present) are ignored. .Pp The .Fn contigfree -function deallocates memory allocated by a previous call to -.Fn contigmalloc -or -.Fn contigmalloc_domainset . +function is deprecated. +Use +.Xr free 9 +instead. .Sh IMPLEMENTATION NOTES The .Fn contigmalloc @@ -125,12 +117,6 @@ However, unless is specified, it may select a page for reclamation that must first be written to backing storage, causing it to sleep. .Pp -The -.Fn contigfree -function does not accept -.Dv NULL -as an address input, unlike -.Xr free 9 . .Sh RETURN VALUES The .Fn contigmalloc diff --git a/share/man/man9/copy.9 b/share/man/man9/copy.9 index 38dcb40b0b63..8b2d0dc67727 100644 --- a/share/man/man9/copy.9 +++ b/share/man/man9/copy.9 @@ -32,8 +32,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 11, 2020 .Dt COPY 9 .Os diff --git a/share/man/man9/counter.9 b/share/man/man9/counter.9 index 04376ba9c994..05af87e8263e 100644 --- a/share/man/man9/counter.9 +++ b/share/man/man9/counter.9 @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd March 11, 2021 +.Dd June 19, 2025 .Dt COUNTER 9 .Os .Sh NAME @@ -51,8 +49,14 @@ .Fn counter_u64_fetch "counter_u64_t c" .Ft void .Fn counter_u64_zero "counter_u64_t c" +.Ft struct counter_rate * +.Fn counter_rate_alloc "int flags" "int period" .Ft int64_t .Fn counter_ratecheck "struct counter_rate *cr" "int64_t limit" +.Ft uint64_t +.Fn counter_rate_get "struct counter_rate *cr" +.Ft void +.Fn counter_rate_free "struct counter_rate *cr" .Fn COUNTER_U64_SYSINIT "counter_u64_t c" .Fn COUNTER_U64_DEFINE_EARLY "counter_u64_t c" .In sys/sysctl.h @@ -135,6 +139,13 @@ value for any moment. Clear the counter .Fa c and set it to zero. +.It Fn counter_rate_alloc flags period +Allocate a new struct counter_rate. +.Fa flags +is passed to +.Xr malloc 9 . +.Fa period +is the time over which the rate is checked. .It Fn counter_ratecheck cr limit The function is a multiprocessor-friendly version of .Fn ppsratecheck @@ -142,11 +153,17 @@ which uses .Nm internally. Returns non-negative value if the rate is not yet reached during the current -second, and a negative value otherwise. -If the limit was reached on previous second, but was just reset back to zero, -then +period, and a negative value otherwise. +If the limit was reached during the previous period, but was just reset back +to zero, then .Fn counter_ratecheck returns number of events since previous reset. +.It Fn counter_rate_get cr +The number of hits to this check within the current period. +.It Fn counter_rate_free cr +Free the +.Fa cr +counter. .It Fn COUNTER_U64_SYSINIT c Define a .Xr SYSINIT 9 diff --git a/share/man/man9/cpu_machdep.9 b/share/man/man9/cpu_machdep.9 new file mode 100644 index 000000000000..415d86a8b766 --- /dev/null +++ b/share/man/man9/cpu_machdep.9 @@ -0,0 +1,425 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024 (holder) +.\" +.\" This software was developed by SRI International, the University of +.\" Cambridge Computer Laboratory (Department of Computer Science and +.\" Technology), and Capabilities Limited under Defense Advanced Research +.\" Projects Agency (DARPA) Contract No. FA8750-24-C-B047 ("DEC"). +.\" +.Dd January 31, 2025 +.Dt cpu_machdep 9 +.Os +.Sh NAME +.Nm cpu_machdep , +.Nm cpu_copy_thread , +.Nm cpu_exec_vmspace_reuse , +.Nm cpu_exit , +.Nm cpu_fetch_syscall_args , +.Nm cpu_fork , +.Nm cpu_fork_kthread_handler , +.Nm cpu_idle , +.Nm cpu_idle_wakeup , +.Nm cpu_procctl , +.Nm cpu_set_syscall_retval , +.Nm cpu_set_upcall , +.Nm cpu_set_user_tls , +.Nm cpu_switch , +.Nm cpu_sync_core , +.Nm cpu_thread_alloc , +.Nm cpu_thread_clean , +.Nm cpu_thread_exit , +.Nm cpu_thread_free , +.Nm cpu_throw , +.Nm cpu_update_pcb +.Nd machine-dependent interfaces to handle CPU and thread state +.Sh SYNOPSIS +.In sys/proc.h +.In sys/ptrace.h +.Ft void +.Fn cpu_copy_thread "struct thread *td" "struct thread *td0" +.Ft bool +.Fn cpu_exec_vmspace_reuse "struct proc *p" "struct vm_map *map" +.Ft void +.Fn cpu_exit "struct thread *td" +.Ft int +.Fn cpu_fetch_syscall_args "struct thread *td" +.Ft void +.Fo cpu_fork +.Fa "struct thread *td1" "struct proc *p2" "struct thread *td2" "int flags" +.Fc +.Ft void +.Fo cpu_fork_kthread_handler +.Fa "struct thread *td" "void (*func)(void *)" "void *arg" +.Fc +.Ft void +.Fn cpu_idle "int busy" +.Ft int +.Fn cpu_idle_wakeup "int cpu" +.Ft int +.Fo cpu_procctl +.Fa "struct thread *td" "int idtype" "id_t id" "int com" "void *data" +.Fc +.Ft int +.Fn cpu_ptrace "struct thread *_td" "int req" "void *addr" "int data" +.Ft void +.Fn cpu_set_syscall_retval "struct thread *td" "int error" +.Ft int +.Fo cpu_set_upcall +.Fa "struct thread *td" "void (*entry)(void *)" "void *arg" "stack_t *stack" +.Fc +.Ft int +.Fn cpu_set_user_tls "struct thread *td" "void *tls_base" "int thr_flags" +.Ft void +.Fn cpu_switch "struct thread *old" "struct thread *new" "struct mtx *mtx" +.Ft void +.Fn cpu_sync_core "void" +.Ft void +.Fn cpu_thread_alloc "struct thread *td" +.Ft void +.Fn cpu_thread_clean "struct thread *td" +.Ft void +.Fn cpu_thread_exit "struct thread *td" +.Ft void +.Fn cpu_thread_free "struct thread *td" +.Ft void +.Fn cpu_throw "struct thread *old" "struct thread *new" +.Ft void +.Fn cpu_update_pcb "struct thread *td" +.Sh DESCRIPTION +These functions provide architecture-specific implementations of +machine-independent abstractions. +.Pp +.Fn cpu_exec_vmspace_reuse +returns true if +.Fn exec_new_vmspace +can reuse an existing +.Vt struct vmspace +.Pq Fa map +for the process +.Fa p +during +.Xr execve 2 . +This is only invoked if +.Fa map +is not shared with any other consumers. +If this returns false, +.Fn exec_new_vmspace +will create a new +.Vt struct vmspace . +.Pp +.Fn cpu_exit +releases machine-dependent resources other than the address space for the +process containing +.Fa td +during process exit. +.Pp +.Fn cpu_fork +copies and updates machine-dependent state +(for example, the pcb and user registers) from the forking thread +.Fa td1 +in an existing process to the new thread +.Fa td2 +in the new process +.Fa p2 . +This function must set up the new thread's kernel stack and pcb so that +.Fa td2 +calls +.Fn fork_exit +when it begins execution passing a pointer to +.Fn fork_return +as the +.Fa callout +argument and +.Fa td2 +as the +.Fa arg +argument. +.Pp +.Fn cpu_fork_kthread_handler +adjusts a new thread's initial pcb and/or kernel stack to pass +.Fa func +and +.Fa arg +as the +.Fa callout +and +.Fa arg +arguments to +.Fn fork_exit . +This must be called before a new thread is scheduled to run and is +used to set the +.Dq main +function for kernel threads. +.Pp +.Fn cpu_copy_thread +copies machine-dependent state (for example, the pcb and user registers) from +.Fa td +to +.Fa td0 +when creating a new thread in the same process. +This function must set up the new thread's kernel stack and pcb so that +.Fa td0 +calls +.Fn fork_exit +when it begins execution passing a pointer to +.Fn fork_return +as the +.Fa callout +argument and +.Fa td0 +as the +.Fa arg +argument. +.Pp +.Fn cpu_set_upcall +updates a new thread's initial user register state to call +.Fa entry +with +.Fa arg +as the sole argument using the user stack described in +.Fa stack . +.Pp +.Fn cpu_set_user_tls +sets a new thread's initial user thread pointer register to +reference the user TLS base pointer +.Fa tls_base . +The +.Fa thr_flags +argument provides flags bits, from the same namespace as +.Va flags +member of the +.Vt struct thr_param +argument to the +.Xr thr_new 2 +syscall. +.Pp +.Fn cpu_update_pcb +updates the pcb of the current thread with current user register values. +This is invoked before writing out register notes in a core dump. +This function typically only has to update user registers for the current +thread that are saved in the pcb during context switches rather than +in the trapframe on kernel entry. +.Pp +Note that when +.Fn cpu_update_pcb +is used, +threads in a process other than the current thread are stopped, +typically by +.Fn thread_single . +The pcbs of those stopped threads should already be updated by +.Fn cpu_switch . +.Pp +.Fn cpu_fetch_syscall_args +fetches the current system call arguments for the native FreeBSD ABI from the +current thread's user register state and/or user stack. +The arguments are saved in the +.Fa td_sa +member of +.Fa td . +.Pp +.Fn cpu_set_syscall_retval +updates the user register state for +.Fa td +to store system call error and return values. +If +.Fa error +is 0, +indicate success and return the two values in +.Fa td_retval . +If +.Fa error +is +.Dv ERESTART, +adjust the user PC to re-invoke the current system call after returning +to user mode. +If +.Fa error +is +.Dv EJUSTRETURN , +leave the current user register state unchanged. +For any other value of +.Fa error , +indicate error and return +.Fa error +as the error code. +.Pp +.Fn cpu_idle +waits for the next interrupt to occur on the current CPU. +If an architecture supports low power idling, +this function should place the CPU into a low power state while waiting. +.Fa busy +is a hint from the scheduler. +If +.Fa busy +is non-zero, +the scheduler expects a short sleep, +so the CPU should prefer low-latency over maximum power savings. +If +.Fa busy +is zero, +the CPU should maximumize power savings including deferring unnecessary +clock interrupts via +.Fn cpu_idleclock . +.Pp +.Fn cpu_idle_wakeup +awakens the idle CPU with the ID +.Fa cpu +from a low-power state. +.Pp +.Fn cpu_procctl +handles any machine-dependent +.Xr procctl 2 +requests. +.Pp +.Fn cpu_ptrace +handles any machine-dependent +.Xr ptrace 2 +requests. +.Pp +.Fn cpu_switch +switches the current CPU between threads by swapping register state. +This function saves the current CPU register state in the pcb of +.Fa old +and loads register values from the pcb of +.Fa new +before returning. +While the pcb generally contains caller-save kernel register state, +it can also contain user registers that are not saved in the trapframe. +.Pp +After saving the current CPU register state of +.Fa old , +.Fn cpu_switch +stores +.Fa mtx +in the +.Fa td_lock +member of +.Fa old +transferring ownership of the old thread. +No data belonging to +.Fa old +can be accessed after that store. +Specifically, the old thread's kernel stack must not be accessed after +this point. +.Pp +When +.Dv SCHED_ULE +is being used, +this function must wait (via spinning) for the +.Fa td_lock +member of +.Fa new +to change to a value not equal to +.Va &blocked_lock +before loading register values from +.Fa new +or accessing its kernel stack. +.Pp +From the caller's perspective, +.Fn cpu_switch +returns when +.Fa old +is rescheduled in the future, +possibly on a different CPU. +However, the implementation of +.Fn cpu_switch +returns immediately on the same CPU into the previously-saved context of +.Fa new . +.Pp +.Fn cpu_throw +is similar to +.Fn cpu_switch +but does not save any state for +.Fa old +or write to the old thread's +.Fa td_lock +member. +.Pp +.Fn cpu_sync_core +ensures that all possible speculation and out-of-order execution is +serialized on the current CPU. +Note that this is called from an IPI handler so only has to handle +additional serialization beyond that provided by handling an IPI. +.Ss Thread Object Lifecycle +These functions support the management of machine-dependent thread +state in conjunction with a thread object's lifecycle. +.Pp +The general model is that a thread object is allocated each time a +new kernel thread is created either by system calls like +.Xr fork 2 +or +.Xr thr_new 2 +or when kernel-only threads are created via +.Xr kproc_create 9 , +.Xr kproc_kthread_add 9 , +or +.Xr kthread_add 9 . +When a kernel thread exits, +the thread object is freed. +However, there is one special case to support an optimization where each +free process object caches a thread object. +When a process exits, the last thread object is not freed but remains +attached to the process. +When the process object is later reused for a new process in +.Xr fork 2 , +the kernel recycles that last thread object and uses it as the initial +thread in the new process. +When a thread is recycled, some of the steps in the thread allocation +and free cycle are skipped as an optimization. +.Pp +.Fn cpu_thread_alloc +initializes machine-dependent fields in +.Fa td +after allocating a new kernel stack. +This function typically sets the +.Fa td_pcb +and initial +.Fa td_frame +pointers. +.Fn cpu_thread_alloc +is called both when allocating a new thread object and +when a recycled thread allocates a new kernel stack. +Note that this function is +.Em not +called if a recycled thread reuses its existing kernel stack. +.Pp +.Fn cpu_thread_clean +releases any machine-dependent resources for the last thread in a +process during +.Xr wait 2 . +The thread is a candidate for recycling so should be reset to run as a +new thread in case it is recycled by a future +.Xr fork 2 . +.Pp +.Fn cpu_thread_exit +cleans any machine-dependent state in +.Fa td +while it is exiting. +This is called by the exiting thread so cannot free state needed during +in-kernel execution. +.Pp +.Fn cpu_thread_free +releases any machine-dependent state in +.Fa td +when it is being freed. +This is called for any thread that was not the last thread in a process +once it has finished execution. +.Sh SEE ALSO +.Xr fork 2 , +.Xr procctl 2 , +.Xr ptrace 2 , +.Xr thr_new 2 , +.Xr wait 2 , +.Xr kproc_create 9 , +.Xr kproc_kthread_add 9 , +.Xr kthread_add 9 , +.Xr mi_switch 9 +.Sh AUTHORS +This manual page was +developed by SRI International, the University of Cambridge Computer +Laboratory (Department of Computer Science and Technology), and +Capabilities Limited under contract +.Pq FA8750-24-C-B047 +.Pq Do DEC Dc . diff --git a/share/man/man9/cpuset.9 b/share/man/man9/cpuset.9 index 29dbc8fc733b..20485059a4c8 100644 --- a/share/man/man9/cpuset.9 +++ b/share/man/man9/cpuset.9 @@ -22,9 +22,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd December 12, 2019 +.Dd September 23, 2022 .Dt CPUSET 9 .Os .Sh NAME @@ -47,6 +45,7 @@ .Nm CPU_OVERLAP , .Nm CPU_CMP , .Nm CPU_OR , +.Nm CPU_ORNOT , .Nm CPU_AND , .Nm CPU_ANDNOT , .Nm CPU_XOR , @@ -88,6 +87,7 @@ .Ft bool .Fn CPU_CMP "cpuset_t *cpuset1" "cpuset_t *cpuset2" .Fn CPU_OR "cpuset_t *dst" "cpuset_t *src1" "cpuset_t *src2" +.Fn CPU_ORNOT "cpuset_t *dst" "cpuset_t *src1" "cpuset_t *src2" .Fn CPU_AND "cpuset_t *dst" "cpuset_t *src1" "cpuset_t *src2" .Fn CPU_ANDNOT "cpuset_t *dst" "cpuset_t *src1" "cpuset_t *src2" .Fn CPU_XOR "cpuset_t *dst" "cpuset_t *src1" "cpuset_t *src2" @@ -110,9 +110,9 @@ Each CPU is represented by a single bit. The maximum number of CPUs representable by .Vt cpuset_t is -.Va MAXCPU . +.Va CPU_SETSIZE . Individual CPUs in cpusets are referenced with indices zero through -.Fa MAXCPU - 1 . +.Fa CPU_SETSIZE - 1 . .Pp The .Fn CPUSET_T_INITIALIZER @@ -298,6 +298,19 @@ is composed of multiple machine words, performs multiple individually atomic operations.) .Pp The +.Fn CPU_ORNOT +macro add CPUs not in +.Fa src +to +.Fa dst . +(It is the +.Nm +equivalent of the scalar: +.Fa dst +|= +.Fa ~ src . ) +.Pp +The .Fn CPU_AND macro removes CPUs absent from .Fa src diff --git a/share/man/man9/cr_bsd_visible.9 b/share/man/man9/cr_bsd_visible.9 new file mode 100644 index 000000000000..d16f4bb6dd8f --- /dev/null +++ b/share/man/man9/cr_bsd_visible.9 @@ -0,0 +1,117 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023 Olivier Certner <olce.freebsd@certner.fr> +.\" +.\" 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. +.\" +.Dd August 18, 2023 +.Dt CR_BSD_VISIBLE 9 +.Os +.Sh NAME +.Nm cr_bsd_visible +.Nd determine if subjects may see entities according to BSD security policies +.Sh SYNOPSIS +.In sys/proc.h +.Ft int +.Fn cr_bsd_visible "struct ucred *u1" "struct ucred *u2" +.Sh DESCRIPTION +This function determines if a subject with credentials +.Fa u1 +is denied seeing an object or subject associated to credentials +.Fa u2 +by the following policies and associated +.Xr sysctl 8 +knobs: +.Bl -tag -width indent +.It Va security.bsd.seeotheruids +If set to 0, subjects cannot see other subjects or objects if they are not +associated with the same real user ID. +The corresponding internal function is +.Xr cr_canseeotheruids 9 . +.It Va security.bsd.seeothergids +If set to 0, subjects cannot see other subjects or objects if they are not both +a member of at least one common group. +The corresponding internal function is +.Xr cr_canseeothergids 9 . +.It Va security.bsd.see_jail_proc +If set to 0, subjects cannot see other subjects or objects that are not +associated with the same jail as they are. +The corresponding internal function is +.Xr cr_canseejailproc 9 . +.El +.Pp +As usual, the superuser (effective user ID 0) is exempt from any of these +policies provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . +.Pp +This function is intended to be used as a helper to implement +.Xr cr_cansee 9 +and similar functions. +.Sh RETURN VALUES +This function returns zero if a subject with credentials +.Fa u1 +may see a subject or object with credentials +.Fa u2 +by the active above-mentioned policies, or +.Er ESRCH +otherwise. +.Sh ERRORS +.Bl -tag -width Er +.It Bq Er ESRCH +Credentials +.Fa u1 +and +.Fa u2 +do not have the same real user ID. +.It Bq Er ESRCH +Credentials +.Fa u1 +and +.Fa u2 +are not members of any common group +.Po +as determined by +.Xr realgroupmember 9 +.Pc . +.It Bq Er ESRCH +Credentials +.Fa u1 +and +.Fa u2 +are not in the same jail. +.El +.Sh SEE ALSO +.Xr cr_cansee 9 , +.Xr cr_canseejailproc 9 , +.Xr cr_canseeothergids 9 , +.Xr cr_canseeotheruids 9 , +.Xr priv_check_cred 9 +.Sh AUTHORS +This function and its manual page were written by +.An Olivier Certner Aq Mt olce.freebsd@certner.fr . diff --git a/share/man/man9/cr_cansee.9 b/share/man/man9/cr_cansee.9 index c4cc2d4a861e..a93afb8e5c89 100644 --- a/share/man/man9/cr_cansee.9 +++ b/share/man/man9/cr_cansee.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2006 Ceri Davies <ceri@FreeBSD.org> +.\" Copyright (c) 2023 Olivier Certner <olce.freebsd@certner.fr> .\" .\" All rights reserved. .\" @@ -23,45 +24,39 @@ .\" (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 November 19, 2006 +.Dd August 18, 2023 .Dt CR_CANSEE 9 .Os .Sh NAME .Nm cr_cansee .Nd "determine visibility of objects given their user credentials" .Sh SYNOPSIS -.In sys/param.h -.In sys/systm.h -.In sys/ucred.h +.In sys/proc.h .Ft int .Fn cr_cansee "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION -This function determines the visibility of objects in the -kernel based on the real user IDs and group IDs in the credentials +This function determines if a subject with credential .Fa u1 -and -.Fa u2 -associated with them. +can see a subject or object associated to credential +.Fa u2 . .Pp -The visibility of objects is influenced by the +Specific types of subjects may need to submit to additional or different +restrictions. +As an example, for processes, see +.Xr p_cansee 9 , +which calls this function. +.Pp +The implementation relies on +.Xr cr_bsd_visible 9 +and consequently the .Xr sysctl 8 -variables -.Va security.bsd.see_other_gids -and -.Va security.bsd.see_other_uids , -as per the description in -.Xr cr_seeothergids 9 -and -.Xr cr_seeotheruids 9 -respectively. +variables referenced in its manual page influence the result. .Sh RETURN VALUES -This function returns zero if the object with credential +This function returns zero if the subject with credential .Fa u1 can .Dq see -the object with credential +the subject or object with credential .Fa u2 , or .Er ESRCH @@ -69,24 +64,20 @@ otherwise. .Sh ERRORS .Bl -tag -width Er .It Bq Er ESRCH -The object with credential +The subject with credential .Fa u1 -cannot -.Dq see -the object with credential -.Fa u2 . -.It Bq Er ESRCH -The object with credential -.Fa u1 -has been jailed and the object with credential +has been jailed and the subject or object with credential .Fa u2 -does not belong to the same jail as -.Fa u1 . +does not belong to the same jail or one of its sub-jails, as determined by +.Xr prison_check 9 . .It Bq Er ESRCH The MAC subsystem denied visibility. +.It Bq Er ESRCH +.Xr cr_bsd_visible 9 +denied visibility according to the BSD security policies in force. .El .Sh SEE ALSO -.Xr cr_seeothergids 9 , -.Xr cr_seeotheruids 9 , +.Xr cr_bsd_visible 9 , .Xr mac 9 , -.Xr p_cansee 9 +.Xr p_cansee 9 , +.Xr prison_check 9 diff --git a/share/man/man9/cr_canseejailproc.9 b/share/man/man9/cr_canseejailproc.9 new file mode 100644 index 000000000000..775c76722b05 --- /dev/null +++ b/share/man/man9/cr_canseejailproc.9 @@ -0,0 +1,81 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023 Olivier Certner <olce.freebsd@certner.fr> +.\" +.\" 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. +.\" +.Dd August 18, 2023 +.Dt CR_CANSEEJAILPROC 9 +.Os +.Sh NAME +.Nm cr_canseejailproc +.Nd determine if subjects may see entities in sub-jails +.Sh SYNOPSIS +.Ft int +.Fn cr_canseejailproc "struct ucred *u1" "struct ucred *u2" +.Sh DESCRIPTION +.Bf -emphasis +This function is internal. +Its functionality is integrated into the function +.Xr cr_bsd_visible 9 , +which should be called instead. +.Ef +.Pp +This function checks if a subject associated to credentials +.Fa u1 +is denied seeing a subject or object associated to credentials +.Fa u2 +by a policy that requires both credentials to be associated to the same jail. +This is a restriction to the baseline jail policy that a subject can see +subjects or objects in its own jail or any sub-jail of it. +.Pp +This policy is active if and only if the +.Xr sysctl 8 +variable +.Va security.bsd.see_jail_proc +is set to zero. +.Pp +As usual, the superuser (effective user ID 0) is exempt from this policy +provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . +.Sh RETURN VALUES +The +.Fn cr_canseejailproc +function returns 0 if the policy is disabled, both credentials are associated to +the same jail, or if +.Fa u1 +has privilege exempting it from the policy. +Otherwise, it returns +.Er ESRCH . +.Sh SEE ALSO +.Xr cr_bsd_visible 9 , +.Xr priv_check_cred 9 +.Sh AUTHORS +This manual page was written by +.An Olivier Certner Aq Mt olce.freebsd@certner.fr . diff --git a/share/man/man9/cr_seeothergids.9 b/share/man/man9/cr_canseeothergids.9 index ea8f43667f19..530335d5d5f7 100644 --- a/share/man/man9/cr_seeothergids.9 +++ b/share/man/man9/cr_canseeothergids.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Joseph Koshy <jkoshy@FreeBSD.org> +.\" Copyright (c) 2023 Olivier Certner <olce.freebsd@certner.fr> .\" .\" All rights reserved. .\" @@ -25,58 +26,58 @@ .\" (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 November 11, 2003 -.Dt CR_SEEOTHERGIDS 9 +.Dd August 18, 2023 +.Dt CR_CANSEEOTHERGIDS 9 .Os .Sh NAME -.Nm cr_seeothergids -.Nd determine visibility of objects given their group memberships +.Nm cr_canseeothergids +.Nd determine if subjects may see entities in a disjoint group set .Sh SYNOPSIS .Ft int -.Fn cr_seeothergids "struct ucred *u1" "struct ucred *u2" +.Fn cr_canseeothergids "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION -This function determines the visibility of objects in the -kernel based on the group IDs in the credentials +.Bf -emphasis +This function is internal. +Its functionality is integrated into the function +.Xr cr_bsd_visible 9 , +which should be called instead. +.Ef +.Pp +This function checks if a subject associated to credentials .Fa u1 -and +is denied seeing a subject or object associated to credentials .Fa u2 -associated with them. +by a policy that requires both credentials to have at least one group in common. +For this determination, the real and supplementary group IDs are used, but +not the effective group IDs, as per +.Xr realgroupmember 9 . .Pp -The visibility of objects is influenced by the +This policy is active if and only if the .Xr sysctl 8 variable -.Va security.bsd.see_other_gids . -If this variable is non-zero then all objects in the kernel -are visible to each other irrespective of their group membership. -If this variable is zero then the object with credentials -.Fa u2 -is visible to the object with credentials -.Fa u1 -if either -.Fa u1 -is the super-user credential, or if at least one of -.Fa u1 Ns 's -group IDs is present in -.Fa u2 Ns 's -group set. -.Sh SYSCTL VARIABLES -.Bl -tag -width indent -.It Va security.bsd.see_other_gids -Must be non-zero if objects with unprivileged credentials are to be -able to see each other. -.El +.Va security.bsd.see_other_gids +is set to zero. +.Pp +As usual, the superuser (effective user ID 0) is exempt from this policy +provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . .Sh RETURN VALUES -This function returns zero if the object with credential +The +.Fn cr_canseeothergids +function returns 0 if the policy is disabled, the credentials share at least one +common group, or if .Fa u1 -can -.Dq see -the object with credential -.Fa u2 , -or -.Er ESRCH -otherwise. +has privilege exempting it from the policy. +Otherwise, it returns +.Er ESRCH . .Sh SEE ALSO -.Xr cr_seeotheruids 9 , -.Xr p_candebug 9 +.Xr cr_bsd_visible 9 , +.Xr priv_check_cred 9 , +.Xr realgroupmember 9 diff --git a/share/man/man9/cr_seeotheruids.9 b/share/man/man9/cr_canseeotheruids.9 index b7b7000b3608..230c5ea59b78 100644 --- a/share/man/man9/cr_seeotheruids.9 +++ b/share/man/man9/cr_canseeotheruids.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Joseph Koshy <jkoshy@FreeBSD.org> +.\" Copyright (c) 2023 Olivier Certner <olce.freebsd@certner.fr> .\" .\" All rights reserved. .\" @@ -25,58 +26,54 @@ .\" (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 November 11, 2003 -.Dt CR_SEEOTHERUIDS 9 +.Dd August 18, 2023 +.Dt CR_CANSEEOTHERUIDS 9 .Os .Sh NAME -.Nm cr_seeotheruids -.Nd determine visibility of objects given their user credentials +.Nm cr_canseeotheruids +.Nd determine if subjects may see entities with differing user ID .Sh SYNOPSIS .Ft int -.Fn cr_seeotheruids "struct ucred *u1" "struct ucred *u2" +.Fn cr_canseeotheruids "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION -This function determines the visibility of objects in the -kernel based on the real user IDs in the credentials +.Bf -emphasis +This function is internal. +Its functionality is integrated into the function +.Xr cr_bsd_visible 9 , +which should be called instead. +.Ef +.Pp +This function checks if a subject associated to credentials .Fa u1 -and +is denied seeing a subject or object associated to credentials .Fa u2 -associated with them. +by a policy that requires both credentials to have the same real user ID. .Pp -The visibility of objects is influenced by the +This policy is active if and only if the .Xr sysctl 8 variable -.Va security.bsd.see_other_uids . -If this variable is non-zero then all objects in the kernel -are visible to each other irrespective of their user IDs. -If this variable is zero then the object with credentials -.Fa u2 -is visible to the object with credentials -.Fa u1 -if either -.Fa u1 -is the super-user credential, or if -.Fa u1 -and -.Fa u2 -have the same real user ID. -.Sh SYSCTL VARIABLES -.Bl -tag -width indent -.It Va security.bsd.see_other_uids -Must be non-zero if objects with unprivileged credentials are to be -able to see each other. -.El +.Va security.bsd.see_other_uids +is set to zero. +.Pp +As usual, the superuser (effective user ID 0) is exempt from this policy +provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . .Sh RETURN VALUES -This function returns zero if the object with credential +The +.Fn cr_canseeotheruids +function returns 0 if the policy is disabled, both credentials have the same +real user ID, or if .Fa u1 -can -.Dq see -the object with credential -.Fa u2 , -or -.Er ESRCH -otherwise. +has privilege exempting it from the policy. +Otherwise, it returns +.Er ESRCH . .Sh SEE ALSO -.Xr cr_seeothergids 9 , -.Xr p_candebug 9 +.Xr cr_bsd_visible 9 , +.Xr priv_check_cred 9 diff --git a/share/man/man9/critical_enter.9 b/share/man/man9/critical_enter.9 index 3da3ac1d96a1..0b1e5559ed1d 100644 --- a/share/man/man9/critical_enter.9 +++ b/share/man/man9/critical_enter.9 @@ -21,9 +21,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd October 5, 2005 +.Dd March 20, 2023 .Dt CRITICAL_ENTER 9 .Os .Sh NAME @@ -37,15 +35,24 @@ .Fn critical_enter "void" .Ft void .Fn critical_exit "void" +.Fn CRITICAL_ASSERT "struct thread *td" .Sh DESCRIPTION These functions are used to prevent preemption in a critical region of code. All that is guaranteed is that the thread currently executing on a CPU will not be preempted. -Specifically, a thread in a critical region will not migrate to another -CPU while it is in a critical region. +Specifically, a thread in a critical region will not migrate to another CPU +while it is in a critical region, nor will the current CPU switch to a +different thread. The current CPU may still trigger faults and exceptions during a critical section; however, these faults are usually fatal. .Pp +The CPU might also receive and handle interrupts within a critical section. +When this occurs the interrupt exit will not result in a context switch, and +execution will continue in the critical section. +Thus, the net effect of a critical section on the current thread's execution is +similar to running with interrupts disabled, except that timer interrupts and +filtered interrupt handlers do not incur a latency penalty. +.Pp The .Fn critical_enter and @@ -56,18 +63,39 @@ while the current thread is in a critical section, then the preemption will be deferred until the current thread exits the outermost critical section. .Pp -Note that these functions are not required to provide any inter-CPU -synchronization, data protection, or memory ordering guarantees and thus -should +Note that these functions do not provide any inter-CPU synchronization, data +protection, or memory ordering guarantees, and thus should .Em not be used to protect shared data structures. .Pp -These functions should be used with care as an infinite loop within a -critical region will deadlock the CPU. +These functions should be used with care as an unbound or infinite loop within +a critical region will deadlock the CPU. Also, they should not be interlocked with operations on mutexes, sx locks, -semaphores, or other synchronization primitives. +semaphores, or other synchronization primitives, as these primitives may +require a context switch to operate. One exception to this is that spin mutexes include a critical section, so in certain cases critical sections may be interlocked with spin mutexes. +.Pp +Critical regions should be only as wide as necessary. +That is, code which does not require the critical section to operate correctly +should be excluded from its bounds whenever possible. +Abuse of critical sections has an effect on overall system latency and timer +precision, since disabling preemption will delay the execution of threaded +interrupt handlers and +.Xr callout 9 +events on the current CPU. +.Pp +The +.Fn CRITICAL_ASSERT +macro verifies that the provided thread +.Fa td +is currently executing in a critical section. +It is a wrapper around +.Xr KASSERT 9 . +.Sh SEE ALSO +.Xr callout 9 , +.Xr KASSERT 9 , +.Xr locking 9 .Sh HISTORY These functions were introduced in .Fx 5.0 . diff --git a/share/man/man9/crypto.9 b/share/man/man9/crypto.9 index 1a0ead7caa2a..4d54b7516b67 100644 --- a/share/man/man9/crypto.9 +++ b/share/man/man9/crypto.9 @@ -15,8 +15,6 @@ .\" MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR .\" PURPOSE. .\" -.\" $FreeBSD$ -.\" .Dd April 12, 2021 .Dt CRYPTO 9 .Os diff --git a/share/man/man9/crypto_buffer.9 b/share/man/man9/crypto_buffer.9 index 1e31cfec7879..f14ae93728f2 100644 --- a/share/man/man9/crypto_buffer.9 +++ b/share/man/man9/crypto_buffer.9 @@ -28,8 +28,6 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.\" $FreeBSD$ -.\" .Dd February 11, 2022 .Dt CRYPTO_BUFFER 9 .Os diff --git a/share/man/man9/crypto_driver.9 b/share/man/man9/crypto_driver.9 index a0587f4b5f83..51b036da6cef 100644 --- a/share/man/man9/crypto_driver.9 +++ b/share/man/man9/crypto_driver.9 @@ -28,8 +28,6 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.\" $FreeBSD$ -.\" .Dd April 12, 2021 .Dt CRYPTO_DRIVER 9 .Os diff --git a/share/man/man9/crypto_request.9 b/share/man/man9/crypto_request.9 index 1b7379245608..af62b9089561 100644 --- a/share/man/man9/crypto_request.9 +++ b/share/man/man9/crypto_request.9 @@ -28,9 +28,7 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.\" $FreeBSD$ -.\" -.Dd January 4, 2022 +.Dd May 8, 2025 .Dt CRYPTO_REQUEST 9 .Os .Sh NAME @@ -441,17 +439,12 @@ the callback is invoked synchronously if the request was processed by a software driver or asynchronously if the request was processed by a hardware driver. .Pp -If a request was scheduled to the taskqueue via -.Dv CRYPTO_F_ASYNC , +If a request was scheduled to the taskqueue with +.Dv CRYPTO_ASYNC_ORDERED , callbacks are always invoked asynchronously ignoring .Dv CRYPTO_F_CBIMM and .Dv CRYPTO_F_CBIFSYNC . -In this case, -.Dv CRYPTO_F_ASYNC_KEEPORDER -may be set to ensure that callbacks for requests on a given session are -invoked in the same order that requests were queued to the session via -.Fn crypto_dispatch . This flag is used by IPsec to ensure that decrypted network packets are passed up the network stack in roughly the same order they were received. .Ss Other Request Fields @@ -473,17 +466,6 @@ Set by drivers prior to completing a request via .Fn crypto_done . .It Fa crp_flags A bitmask of flags. -The following flags are available in addition to flags discussed previously: -.Bl -tag -width CRYPTO_F_DONE -.It Dv CRYPTO_F_DONE -Set by -.Fa crypto_done -before calling -.Fa crp_callback . -This flag is not very useful and will likely be removed in the future. -It can only be safely checked from the callback routine at which point -it is always set. -.El .It Fa crp_cipher_key Pointer to a request-specific encryption key. If this value is not set, diff --git a/share/man/man9/crypto_session.9 b/share/man/man9/crypto_session.9 index 78bc5e736655..7ff10237a810 100644 --- a/share/man/man9/crypto_session.9 +++ b/share/man/man9/crypto_session.9 @@ -28,8 +28,6 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.\" $FreeBSD$ -.\" .Dd June 22, 2020 .Dt CRYPTO_SESSION 9 .Os diff --git a/share/man/man9/dev_clone.9 b/share/man/man9/dev_clone.9 index 4fa93679ea9e..56bdd1a9a248 100644 --- a/share/man/man9/dev_clone.9 +++ b/share/man/man9/dev_clone.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 3, 2009 .Dt DEV_CLONE 9 .Os @@ -44,7 +42,7 @@ EVENTHANDLER_REGISTER(dev_clone, clone_handler, arg, priority); .Sh DESCRIPTION A device driver may register a listener that will be notified each time a name lookup on the -.Xr devfs 5 +.Xr devfs 4 mount point fails to find the vnode. A listener shall be registered for the .Va dev_clone @@ -74,5 +72,5 @@ that were started before .Fn drain_dev_clone_events call, are finished before it returns control. .Sh SEE ALSO -.Xr devfs 5 , +.Xr devfs 4 , .Xr namei 9 diff --git a/share/man/man9/dev_refthread.9 b/share/man/man9/dev_refthread.9 index c6aa7d955230..f615725b0a47 100644 --- a/share/man/man9/dev_refthread.9 +++ b/share/man/man9/dev_refthread.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 29, 2018 .Dt DEV_REFTHREAD 9 .Os @@ -49,7 +47,7 @@ The and .Fn dev_relthread routines provide a safe way to access -.Xr devfs 5 +.Xr devfs 4 devices that may be concurrently destroyed by .Fn destroy_dev (e.g., removable media). @@ -145,7 +143,7 @@ and do not initialize the value pointed to by the parameter in any way. .Ef .Sh SEE ALSO -.Xr devfs 5 , +.Xr devfs 4 , .Xr destroy_dev 9 .Sh CAVEATS Do not invoke diff --git a/share/man/man9/devclass.9 b/share/man/man9/devclass.9 index d3e848e8d904..cbf81f3b0fa3 100644 --- a/share/man/man9/devclass.9 +++ b/share/man/man9/devclass.9 @@ -26,8 +26,6 @@ .\" (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 June 16, 1998 .Dt DEVCLASS 9 .Os @@ -48,10 +46,11 @@ Each has a name and there cannot be two devclasses with the same name. This ensures that unique unit numbers are allocated to device instances. +All instances with the same name are treated as being the same. .Pp -Beware that this means -.Vt devclass -must be the same for different bus attachments of the same device driver. +When no specific unit number is needed, +.Vt DEVICE_UNIT_ANY +is used. .Sh SEE ALSO .Xr devclass_add_driver 9 , .Xr devclass_delete_driver 9 , diff --git a/share/man/man9/devclass_find.9 b/share/man/man9/devclass_find.9 index 2a2c88d45e20..1e5661e46b77 100644 --- a/share/man/man9/devclass_find.9 +++ b/share/man/man9/devclass_find.9 @@ -26,8 +26,6 @@ .\" (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 June 16, 1998 .Dt DEVCLASS_FIND 9 .Os diff --git a/share/man/man9/devclass_get_count.9 b/share/man/man9/devclass_get_count.9 index f645a49454f2..526a95cd5be3 100644 --- a/share/man/man9/devclass_get_count.9 +++ b/share/man/man9/devclass_get_count.9 @@ -23,8 +23,6 @@ .\" (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 5, 2004 .Dt DEVCLASS_GET_COUNT 9 .Os diff --git a/share/man/man9/devclass_get_device.9 b/share/man/man9/devclass_get_device.9 index 242785e1931a..e66e994b2a8e 100644 --- a/share/man/man9/devclass_get_device.9 +++ b/share/man/man9/devclass_get_device.9 @@ -26,8 +26,6 @@ .\" (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 June 16, 1998 .Dt DEVCLASS_GET_DEVICE 9 .Os diff --git a/share/man/man9/devclass_get_devices.9 b/share/man/man9/devclass_get_devices.9 index e6f8a15b6978..1c0c1354ae2d 100644 --- a/share/man/man9/devclass_get_devices.9 +++ b/share/man/man9/devclass_get_devices.9 @@ -26,8 +26,6 @@ .\" (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 May 19, 2005 .Dt DEVCLASS_GET_DEVICES 9 .Os diff --git a/share/man/man9/devclass_get_drivers.9 b/share/man/man9/devclass_get_drivers.9 index f2ba1481436c..b5937cb39854 100644 --- a/share/man/man9/devclass_get_drivers.9 +++ b/share/man/man9/devclass_get_drivers.9 @@ -26,8 +26,6 @@ .\" (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 May 19, 2005 .Dt DEVCLASS_GET_DRIVERS 9 .Os diff --git a/share/man/man9/devclass_get_maxunit.9 b/share/man/man9/devclass_get_maxunit.9 index 40a2d7929815..f99fa62fc5e7 100644 --- a/share/man/man9/devclass_get_maxunit.9 +++ b/share/man/man9/devclass_get_maxunit.9 @@ -26,8 +26,6 @@ .\" (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 10, 2010 .Dt DEVCLASS_GET_MAXUNIT 9 .Os diff --git a/share/man/man9/devclass_get_name.9 b/share/man/man9/devclass_get_name.9 index 5978dc16d944..e66e7de66bcc 100644 --- a/share/man/man9/devclass_get_name.9 +++ b/share/man/man9/devclass_get_name.9 @@ -26,8 +26,6 @@ .\" (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 June 16, 1998 .Dt DEVCLASS_GET_NAME 9 .Os diff --git a/share/man/man9/devclass_get_softc.9 b/share/man/man9/devclass_get_softc.9 index e4c55334fad4..3580c1e379e7 100644 --- a/share/man/man9/devclass_get_softc.9 +++ b/share/man/man9/devclass_get_softc.9 @@ -26,8 +26,6 @@ .\" (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 June 16, 1998 .Dt DEVCLASS_GET_SOFTC 9 .Os diff --git a/share/man/man9/devctl_notify.9 b/share/man/man9/devctl_notify.9 index 9d490c6bfe9d..701b470cdaaa 100644 --- a/share/man/man9/devctl_notify.9 +++ b/share/man/man9/devctl_notify.9 @@ -21,8 +21,6 @@ .\" (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 22, 2020 .Dt DEVCTL_NOTIFY 9 .Os diff --git a/share/man/man9/devctl_process_running.9 b/share/man/man9/devctl_process_running.9 index 8ac4e1c8b358..155d00398f4e 100644 --- a/share/man/man9/devctl_process_running.9 +++ b/share/man/man9/devctl_process_running.9 @@ -21,8 +21,6 @@ .\" (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 22, 2020 .Dt DEVCTL_PROCESS_RUNNING 9 .Os diff --git a/share/man/man9/devctl_safe_quote_sb.9 b/share/man/man9/devctl_safe_quote_sb.9 index 7560fd7dcc4b..e73574fbfa8c 100644 --- a/share/man/man9/devctl_safe_quote_sb.9 +++ b/share/man/man9/devctl_safe_quote_sb.9 @@ -21,8 +21,6 @@ .\" (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 22, 2020 .Dt DEVCTL_SAFE_QUOTE_SB 9 .Os diff --git a/share/man/man9/devfs_set_cdevpriv.9 b/share/man/man9/devfs_set_cdevpriv.9 index c040ca6d5a11..0cbfd3eebeb7 100644 --- a/share/man/man9/devfs_set_cdevpriv.9 +++ b/share/man/man9/devfs_set_cdevpriv.9 @@ -22,15 +22,14 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd December 2, 2015 +.Dd March 23, 2024 .Dt DEVFS_CDEVPRIV 9 .Os .Sh NAME .Nm devfs_set_cdevpriv , .Nm devfs_get_cdevpriv , -.Nm devfs_clear_cdevpriv +.Nm devfs_clear_cdevpriv , +.Nm devfs_foreach_cdevpriv .Nd manage per-open filedescriptor data for devices .Sh SYNOPSIS .In sys/param.h @@ -44,6 +43,12 @@ typedef void d_priv_dtor_t(void *data); .Fn devfs_set_cdevpriv "void *priv" "d_priv_dtor_t *dtr" .Ft void .Fn devfs_clear_cdevpriv "void" +.Ft int +.Fo devfs_foreach_cdevpriv +.Fa "struct cdev *dev" +.Fa "int (*cb)(void *data, void *arg)" +.Fa "void *arg" +.Fc .Sh DESCRIPTION The .Fn devfs_xxx_cdevpriv @@ -57,7 +62,7 @@ Currently, functioning of these functions is restricted to the context of the .Fa cdevsw switch method calls performed as -.Xr devfs 5 +.Xr devfs 4 operations in response to system calls that use filedescriptors. .Pp The @@ -113,10 +118,40 @@ filedescriptor, or .Fn devfs_clear_cdevpriv was called. .El +.Pp +The function +.Fn devfs_foreach_cdevpriv +sequentially calls the function +.Fa cb +for each +.Nm cdevpriv +structure, currently associated with the +.Fa cdev +device. +The iterated +.Nm cdevpriv +data pointer and the user-supplied context +.Fa arg +are passed to the function +.Fa cb . +If +.Fa cb +returns non-zero value, the iteration stops on that element. +The +.Fn devfs_foreach_cdevpriv +returns the return value from the last call to +.Fa cb , +or zero if no +.Nm cdevpriv +data is currently associated with the device. +.Pp +Current implementation of the iterator makes it impossible to use +any blockable locking inside the callback +.Fa cb . .Sh SEE ALSO .Xr close 2 , .Xr open 2 , -.Xr devfs 5 +.Xr devfs 4 .Sh HISTORY The .Fn devfs_cdevpriv diff --git a/share/man/man9/device.9 b/share/man/man9/device.9 index d5e30f0abefa..f813b7d72f53 100644 --- a/share/man/man9/device.9 +++ b/share/man/man9/device.9 @@ -26,8 +26,6 @@ .\" (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 15, 2017 .Dt DEVICE 9 .Os diff --git a/share/man/man9/device_add_child.9 b/share/man/man9/device_add_child.9 index 2ba2ca50b324..dfd0d19049bc 100644 --- a/share/man/man9/device_add_child.9 +++ b/share/man/man9/device_add_child.9 @@ -26,8 +26,6 @@ .\" (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 February 11, 2018 .Dt DEVICE_ADD_CHILD 9 .Os @@ -53,7 +51,7 @@ arguments specify the name and unit number of the device. If the name is unknown then the caller should pass .Dv NULL . If the unit is unknown then the caller should pass -.Dv -1 +.Dv DEVICE_UNIT_ANY and the system will choose the next available unit number. .Pp The name of the device is used to determine which drivers might be @@ -72,7 +70,7 @@ be specified as the device name. .Pp Normally unit numbers will be chosen automatically by the system and a unit number of -.Dv -1 +.Dv DEVICE_UNIT_ANY should be given. When a specific unit number is desired (e.g.,\& for wiring a particular piece of hardware to a pre-configured unit number), that unit should @@ -113,10 +111,10 @@ When adding a child to another device node, such as in an identify routine, use .Xr BUS_ADD_CHILD 9 instead of -.Xr device_add_child 9 . +.Fn device_add_child . .Xr BUS_ADD_CHILD 9 will call -.Xr device_add_child 9 +.Fn device_add_child and add the proper bus-specific data to the new child. .Fn device_add_child does not call diff --git a/share/man/man9/device_delete_child.9 b/share/man/man9/device_delete_child.9 index df56c599e9b9..819c7f5e36b9 100644 --- a/share/man/man9/device_delete_child.9 +++ b/share/man/man9/device_delete_child.9 @@ -26,9 +26,7 @@ .\" (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 June 16, 1998 +.Dd February 5, 2025 .Dt DEVICE_DELETE_CHILD 9 .Os .Sh NAME @@ -43,13 +41,26 @@ The specified device is removed from .Fa dev and deleted. -If the device is currently attached, it is first detached (see -.Xr DEVICE_ATTACH 9 -and -.Xr DEVICE_DETACH 9 ) . +If the device is currently attached, it is first detached via +.Xr device_detach 9 . +If +.Fn device_detach +fails, +its error value is returned. +Otherwise, +all descendant devices of +.Fa child +are deleted and zero is returned. +.Pp +The +.Xr BUS_CHILD_DELETED 9 +method is invoked for each device that is deleted. +This permits the parent device's driver to tear down any state associated +with child devices such as ivars. .Sh RETURN VALUES Zero is returned on success, otherwise an error is returned. .Sh SEE ALSO +.Xr BUS_CHILD_DELETED 9 , .Xr device_add_child 9 .Sh AUTHORS This manual page was written by diff --git a/share/man/man9/device_delete_children.9 b/share/man/man9/device_delete_children.9 index 1ac99c4589dc..d70fc6fe287a 100644 --- a/share/man/man9/device_delete_children.9 +++ b/share/man/man9/device_delete_children.9 @@ -26,8 +26,6 @@ .\" (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 28, 2018 .Dt DEVICE_DELETE_CHILDREN 9 .Os diff --git a/share/man/man9/device_enable.9 b/share/man/man9/device_enable.9 index 85b4f6ea5e6c..5f485ed9288c 100644 --- a/share/man/man9/device_enable.9 +++ b/share/man/man9/device_enable.9 @@ -26,8 +26,6 @@ .\" (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 June 16, 1998 .Dt DEVICE_ENABLE 9 .Os diff --git a/share/man/man9/device_find_child.9 b/share/man/man9/device_find_child.9 index 391f44b7bb9f..69c767c13589 100644 --- a/share/man/man9/device_find_child.9 +++ b/share/man/man9/device_find_child.9 @@ -26,8 +26,6 @@ .\" (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 February 8, 2005 .Dt DEVICE_FIND_CHILD 9 .Os diff --git a/share/man/man9/device_get_children.9 b/share/man/man9/device_get_children.9 index cbc1124a20a4..f9c36971e9b5 100644 --- a/share/man/man9/device_get_children.9 +++ b/share/man/man9/device_get_children.9 @@ -26,8 +26,6 @@ .\" (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 August 23, 2008 .Dt DEVICE_GET_CHILDREN 9 .Os diff --git a/share/man/man9/device_get_devclass.9 b/share/man/man9/device_get_devclass.9 index fcf869565aeb..142baaeb7013 100644 --- a/share/man/man9/device_get_devclass.9 +++ b/share/man/man9/device_get_devclass.9 @@ -26,8 +26,6 @@ .\" (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 June 16, 1998 .Dt DEVICE_GET_DEVCLASS 9 .Os diff --git a/share/man/man9/device_get_driver.9 b/share/man/man9/device_get_driver.9 index d764768b11f6..9694b2b411cb 100644 --- a/share/man/man9/device_get_driver.9 +++ b/share/man/man9/device_get_driver.9 @@ -26,8 +26,6 @@ .\" (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 June 16, 1998 .Dt DEVICE_GET_DRIVER 9 .Os diff --git a/share/man/man9/device_get_ivars.9 b/share/man/man9/device_get_ivars.9 index dd1450c32f93..deeede022a03 100644 --- a/share/man/man9/device_get_ivars.9 +++ b/share/man/man9/device_get_ivars.9 @@ -26,8 +26,6 @@ .\" (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 June 16, 1998 .Dt DEVICE_GET_IVARS 9 .Os diff --git a/share/man/man9/device_get_name.9 b/share/man/man9/device_get_name.9 index 1bf7ec842ecf..8a4a280b9514 100644 --- a/share/man/man9/device_get_name.9 +++ b/share/man/man9/device_get_name.9 @@ -22,8 +22,6 @@ .\" (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 April 21, 2003 .Dt DEVICE_GET_NAME 9 .Os diff --git a/share/man/man9/device_get_parent.9 b/share/man/man9/device_get_parent.9 index e5b9550295c9..f5649139ef61 100644 --- a/share/man/man9/device_get_parent.9 +++ b/share/man/man9/device_get_parent.9 @@ -22,8 +22,6 @@ .\" (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 April 21, 2003 .Dt DEVICE_GET_PARENT 9 .Os diff --git a/share/man/man9/device_get_property.9 b/share/man/man9/device_get_property.9 index d925f5f224db..dc7a720621f4 100644 --- a/share/man/man9/device_get_property.9 +++ b/share/man/man9/device_get_property.9 @@ -1,5 +1,5 @@ .\" - -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2021 Semihalf .\" @@ -23,9 +23,7 @@ .\" (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 February 18, 2022 +.Dd September 29, 2022 .Dt DEVICE_GET_PROPERTY 9 .Os .Sh NAME @@ -54,6 +52,9 @@ Currently the following types are supported: The underlying property is a string of bytes. .It Dv DEVICE_PROP_ANY Wildcard property type. +.It Dv DEVICE_PROP_HANDLE +Following a reference the underlying property is a handle of the +respective bus. .It Dv DEVICE_PROP_UINT32 The underlying property is an array of unsigned 32 bit integers. The diff --git a/share/man/man9/device_get_softc.9 b/share/man/man9/device_get_softc.9 index 5685773aeb96..c15868b35155 100644 --- a/share/man/man9/device_get_softc.9 +++ b/share/man/man9/device_get_softc.9 @@ -26,8 +26,6 @@ .\" (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 21, 2015 .Dt DEVICE_GET_SOFTC 9 .Os diff --git a/share/man/man9/device_get_state.9 b/share/man/man9/device_get_state.9 index 384395a30288..d4ca43f2bdae 100644 --- a/share/man/man9/device_get_state.9 +++ b/share/man/man9/device_get_state.9 @@ -26,8 +26,6 @@ .\" (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 June 16, 1998 .Dt DEVICE_GET_STATE 9 .Os diff --git a/share/man/man9/device_get_sysctl.9 b/share/man/man9/device_get_sysctl.9 index 876c48c77016..b01302ba373c 100644 --- a/share/man/man9/device_get_sysctl.9 +++ b/share/man/man9/device_get_sysctl.9 @@ -22,8 +22,6 @@ .\" (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 June 18, 2011 .Dt DEVICE_GET_SYSCTL 9 .Os diff --git a/share/man/man9/device_get_unit.9 b/share/man/man9/device_get_unit.9 index 0b222e96dd6d..b294e54489d6 100644 --- a/share/man/man9/device_get_unit.9 +++ b/share/man/man9/device_get_unit.9 @@ -26,8 +26,6 @@ .\" (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 June 16, 1998 .Dt DEVICE_GET_UNIT 9 .Os diff --git a/share/man/man9/device_printf.9 b/share/man/man9/device_printf.9 index 5dea95f82e5b..ee84feabcce8 100644 --- a/share/man/man9/device_printf.9 +++ b/share/man/man9/device_printf.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 21, 2003 .Dt DEVICE_PRINTF 9 .Os diff --git a/share/man/man9/device_probe_and_attach.9 b/share/man/man9/device_probe_and_attach.9 index 8f8c4af18d22..0c438be3a483 100644 --- a/share/man/man9/device_probe_and_attach.9 +++ b/share/man/man9/device_probe_and_attach.9 @@ -26,35 +26,139 @@ .\" (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 June 16, 1998 +.Dd February 5, 2025 .Dt DEVICE_PROBE_AND_ATTACH 9 .Os .Sh NAME +.Nm device_attach , +.Nm device_detach , +.Nm device_probe , .Nm device_probe_and_attach -.Nd initialise a device +.Nd manage device's connection to a device driver .Sh SYNOPSIS .In sys/param.h .In sys/bus.h .Ft int +.Fn device_attach "device_t dev" +.Ft int +.Fn device_detach "device_t dev" +.Ft int +.Fn device_probe "device_t dev" +.Ft int .Fn device_probe_and_attach "device_t dev" .Sh DESCRIPTION -This function is called during autoconfiguration to initialise the -devices in the system. -For each device, the +These functions manage the relationship between a device and device drivers. +.Pp +.Fn device_probe +invokes the .Xr DEVICE_PROBE 9 -method of each suitable driver is called and if a probe succeeds, a -description of the device is printed and the +method of each suitable driver and to find the driver with the best match for +.Fa dev . +If a matching driver is found, +.Fa dev +is set to the +.Dv DS_ALIVE +state and zero is returned. +If +.Fa dev +is already attached to a device driver or has been disabled via +.Xr device_disable 9 , +then it will not be probed and -1 is returned. +.Pp +.Fn device_attach +fully attaches a device driver to +.Fa dev . +This function prints a description of the device and invokes the +.Xr DEVICE_ATTACH 9 +method. +If the +.Xr DEVICE_ATTACH 9 +method succeeds, +.Fa dev +is set to the +.Dv DS_ATTACHED +state and zero is returned. +If the .Xr DEVICE_ATTACH 9 -method is called. -If the device is disabled using -.Xr device_disable 9 -then it will not be probed. +method fails, +.Xr BUS_CHILD_DETACHED 9 +is called and an error value is returned. +.Pp +If the device name and unit are disabled by a hint, +.Fn device_attach +disables the device, demotes it to the +.Dv DS_NOTPRESENT +state, +and returns +.Dv ENXIO . +The device retains its device name and unit and can be re-enabled via +.Xr devctl 8 . +.Pp +.Fn device_probe_and_attach +is a wrapper function around +.Fn device_probe +and +.Fn device_attach +that fully initialises a device. +If +.Fa dev +is already attached or disabled, +.Fn device_probe_and_attach +leaves the device unchanged and returns zero. +Otherwise, +.Fn device_probe +is used to identify a device driver for +.Fa dev +and +.Fn device_attach +finalizes attaching the driver to +.Fa dev . +Device drivers should generally use this function to initialize a device +rather than direct calls to +.Fn device_probe +and +.Fn device_attach . +.Pp +.Fn device_detach +detaches the device driver from +.Fa dev . +This function invokes the +.Xr DEVICE_DETACH 9 +method to tear down device driver state for +.Fa dev . +If the method fails, +its error value is returned and +.Fa dev +remains attached. +If the method succeeds, +otherwise, +.Xr BUS_CHILD_DETACHED 9 +is called, +the device is set to the +.Dv DS_NOTPRESENT +state, +and zero is returned. +If a device is busy, +.Fn device_detach +fails with +.Dv EBUSY +and leaving +.Fa dev +unchanged. .Sh RETURN VALUES Zero is returned on success, otherwise an appropriate error is returned. +In addition, +.Fn device_probe +returns -1 if +.Fa dev +is disabled or already attached. .Sh SEE ALSO +.Xr devctl 8 , +.Xr BUS_CHILD_DETACHED 9 , .Xr device 9 , +.Xr DEVICE_ATTACH 9 , +.Xr DEVICE_DETACH 9 , +.Xr DEVICE_PROBE 9 , .Xr driver 9 .Sh AUTHORS This manual page was written by diff --git a/share/man/man9/device_quiet.9 b/share/man/man9/device_quiet.9 index 08d88caf4348..c7e5aa829518 100644 --- a/share/man/man9/device_quiet.9 +++ b/share/man/man9/device_quiet.9 @@ -26,8 +26,6 @@ .\" (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 12, 2016 .Dt DEVICE_QUIET 9 .Os diff --git a/share/man/man9/device_set_desc.9 b/share/man/man9/device_set_desc.9 index ae29010450b1..5037c90fedb1 100644 --- a/share/man/man9/device_set_desc.9 +++ b/share/man/man9/device_set_desc.9 @@ -26,13 +26,12 @@ .\" (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 June 16, 1998 +.Dd January 9, 2024 .Dt DEVICE_SET_DESC 9 .Os .Sh NAME .Nm device_set_desc , +.Nm device_set_descf , .Nm device_set_desc_copy , .Nm device_get_desc .Nd access the description of a device @@ -42,6 +41,8 @@ .Ft void .Fn device_set_desc "device_t dev" "const char *desc" .Ft void +.Fn device_set_descf "device_t dev" "const char *fmt" "..." +.Ft void .Fn device_set_desc_copy "device_t dev" "const char *desc" .Ft const char * .Fn device_get_desc "device_t dev" @@ -56,6 +57,9 @@ is used to set the description if the string passed is a temporary buffer which will be overwritten. In this case, the system will copy the string, otherwise the pointer passed will be used directly. +.Fn device_set_descf +is a printf-like version of +.Fn device_set_desc . .Sh SEE ALSO .Xr device 9 .Sh AUTHORS diff --git a/share/man/man9/device_set_driver.9 b/share/man/man9/device_set_driver.9 index 345a0a99c1b3..72ae19f01576 100644 --- a/share/man/man9/device_set_driver.9 +++ b/share/man/man9/device_set_driver.9 @@ -22,8 +22,6 @@ .\" (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 April 21, 2003 .Dt DEVICE_SET_DRIVER 9 .Os diff --git a/share/man/man9/device_set_flags.9 b/share/man/man9/device_set_flags.9 index 3a836ffddfae..4f35a117bca5 100644 --- a/share/man/man9/device_set_flags.9 +++ b/share/man/man9/device_set_flags.9 @@ -26,8 +26,6 @@ .\" (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 6, 1999 .Dt DEVICE_GET_FLAGS 9 .Os diff --git a/share/man/man9/devstat.9 b/share/man/man9/devstat.9 index 5025fba6c3e1..3682ad024eae 100644 --- a/share/man/man9/devstat.9 +++ b/share/man/man9/devstat.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 15, 2020 .Dt DEVSTAT 9 .Os @@ -416,6 +414,7 @@ typedef enum { DEVSTAT_TYPE_IF_SCSI = 0x010, DEVSTAT_TYPE_IF_IDE = 0x020, DEVSTAT_TYPE_IF_OTHER = 0x030, + DEVSTAT_TYPE_IF_NVME = 0x040, DEVSTAT_TYPE_IF_MASK = 0x0f0, DEVSTAT_TYPE_PASS = 0x100 } devstat_type_flags; diff --git a/share/man/man9/devtoname.9 b/share/man/man9/devtoname.9 index 07ec04fb852f..b62f08efe5e9 100644 --- a/share/man/man9/devtoname.9 +++ b/share/man/man9/devtoname.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 10, 2012 .Dt DEVTONAME 9 .Os diff --git a/share/man/man9/disk.9 b/share/man/man9/disk.9 index 16f2654f4836..41436427cbc2 100644 --- a/share/man/man9/disk.9 +++ b/share/man/man9/disk.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 30, 2020 .Dt DISK 9 .Os @@ -53,7 +51,7 @@ disk-like storage devices to advertise the device to other kernel components, including .Xr GEOM 4 and -.Xr devfs 5 . +.Xr devfs 4 . .Pp Each disk device is described by a .Vt "struct disk" @@ -244,8 +242,8 @@ Typically used to store a pointer to the drivers structure for this disk device. .El .Sh SEE ALSO -.Xr GEOM 4 , -.Xr devfs 5 +.Xr devfs 4 , +.Xr GEOM 4 .Sh HISTORY The .Nm kernel disk storage API diff --git a/share/man/man9/dnv.9 b/share/man/man9/dnv.9 index 3d41cef673dc..16f603df8392 100644 --- a/share/man/man9/dnv.9 +++ b/share/man/man9/dnv.9 @@ -23,15 +23,13 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 26, 2016 +.Dd January 3, 2025 .Dt DNV 9 .Os .Sh NAME .Nm dnvlist_get , .Nm dnvlist_take -.Nd "API for getting name/value pairs. Nonexistent pairs do not raise an error." +.Nd "API for getting name/value pairs with a default value" .Sh LIBRARY .Lb libnv .Sh SYNOPSIS @@ -65,26 +63,32 @@ The .Nm libnv library permits easy management of name/value pairs and can send and receive them over sockets. -For more information, also see +For more information, see .Xr nv 9 . .Pp The .Nm dnvlist_get -family of functions returns the value associated with the specified name. -If an element of the specified name does not exist, the function returns the +functions return the value associated with +.Fa name . +If an element named +.Fa name +does not exist, the function returns the value provided in .Fa defval . Returned strings, nvlists, descriptors, binaries, or arrays must not be modified -by the user. -They still belong to the nvlist. +by the user since they still belong to the nvlist. If the nvlist is in an error state, attempts to use any of these functions will cause the program to abort. .Pp The .Nm dnvlist_take -family of functions returns the value associated with the specified name and -removes the element from the nvlist. -If an element of the supplied name does not exist, the value provided in +functions return the value associated with +.Fa name +and removes the associated element from +.Fa nvl . +If an element named +.Fa name +does not exist, the value provided in .Nm defval is returned. When the value is a string, binary, or array value, the caller is diff --git a/share/man/man9/domain.9 b/share/man/man9/domain.9 index 2d42e0b8cb40..dab8cff89e12 100644 --- a/share/man/man9/domain.9 +++ b/share/man/man9/domain.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved. +.\" Copyright (C) 2022 Gleb Smirnoff <glebius@FreeBSD.org> .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -24,223 +25,203 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd January 3, 2022 +.Dd September 14, 2022 .Dt DOMAIN 9 .Os .Sh NAME -.Nm domain_add , -.Nm domain_init , -.Nm pfctlinput , -.Nm pffinddomain , -.Nm pffindproto , -.Nm pffindtype , -.Nm DOMAIN_SET -.Nd "network domain management" +.Nm domain , +.Nm protosw +.Nd "programming interface for kernel socket implementation" .Sh SYNOPSIS .In sys/param.h .In sys/kernel.h .In sys/protosw.h .In sys/domain.h .Ft void -.Fn domain_add "void *data" -.Ft void -.Fn domain_init "void *data" +.Fn domain_add "struct domain *dom" .Ft void -.Fn pfctlinput "int cmd" "struct sockaddr *sa" -.Ft struct domain * -.Fn pffinddomain "int family" -.Ft struct protosw * -.Fn pffindproto "int family" "int protocol" "int type" -.Ft struct protosw * -.Fn pffindtype "int family" "int type" +.Fn domain_remove "struct domain *dom" .Ft void -.Fn DOMAIN_SET "name" +.Fn DOMAIN_SET "domain" +.Ft int +.Fn protosw_register "struct domain *dom" "struct protosw *pr" +.Ft int +.Fn protosw_unregister "struct protosw *pr" .Sh DESCRIPTION -Network protocols installed in the system are maintained within what -are called domains -(for example the -.Va inetdomain -and -.Va localdomain ) . +The +.Nm +subsystem allows implementation of communication protocols that are exposed to +the userland via the +.Xr socket 2 +API. +When an application performs a +.Fn socket "domain" "type" "protocol" +syscall, the kernel searches for a +.Nm +matching the +.Ar domain +argument, then within this domain, searches for a protocol +matching +.Ar type . +If the third argument, +.Ar protocol , +is not +.Dv 0 , +that value must also match. +The structure found must implement certain methods, so that +.Xr socket 2 +API works for this particular kind of a socket. +.Pp +A minimal +.Nm +structure implementing a domain shall be initialized with sparse C99 +initializer and has public fields as follows: .Bd -literal struct domain { - int dom_family; /* AF_xxx */ - char *dom_name; - int dom_flags; - int (*dom_probe)(void); /* check for support (optional) */ - int (*dom_externalize) /* externalize access rights */ - (struct mbuf *, struct mbuf **); - void (*dom_dispose) /* dispose of internalized rights */ - (struct mbuf *); - struct protosw *dom_protosw, *dom_protoswNPROTOSW; - struct domain *dom_next; - int (*dom_rtattach) /* initialize routing table */ - (void **, int); - int (*dom_rtdetach) /* clean up routing table */ - (void **, int); - void *(*dom_ifattach)(struct ifnet *); - void (*dom_ifdetach)(struct ifnet *, void *); - int (*dom_ifmtu)(struct ifnet *); - /* af-dependent data on ifnet */ + /* + * Mandatory fields. + */ + int dom_family; /* PF_xxx, first argument of socket(2) */ + char *dom_name; /* text name of the domain */ + u_int dom_nprotosw; /* length of dom_protosw[] */ + /* + * Following methods are optional. + */ + int (*dom_probe)(void); /* check for support */ + struct rib_head *(*dom_rtattach)(uint32_t); /* init route table */ + void (*dom_rtdetach)(struct rib_head *); /* clean up table */ + void *(*dom_ifattach)(struct ifnet *); /* interface attach */ + void (*dom_ifdetach)(struct ifnet *, void *);/* & detach callbacks */ + int (*dom_ifmtu)(struct ifnet *); /* mtu change */ + /* + * Mandatory variable size array of pointers to protosw structs. + */ + struct protosw *dom_protosw[]; }; .Ed .Pp -Each domain contains an array of protocol switch structures +Each domain contains the +.Va dom_protosw +array of protocol switch structures .Pq Vt "struct protosw *" , one for each socket type supported. +The array may have +.Dv NULL +spacers for loadable protocols. +Sparse C99 initializers shall be used to initialize +.Nm protosw +structures. +The structure has mandatory field +.Va pr_type +and mandatory +.Va pr_attach +method. +The rest of the methods are optional, but a meaningful protocol should +implement some. .Bd -literal struct protosw { - short pr_type; /* socket type used for */ - struct domain *pr_domain; /* domain protocol a member of */ - short pr_protocol; /* protocol number */ - short pr_flags; /* see below */ -/* protocol-protocol hooks */ - pr_input_t *pr_input; /* input to protocol (from below) */ - pr_output_t *pr_output; /* output to protocol (from above) */ - pr_ctlinput_t *pr_ctlinput; /* control input (from below) */ - pr_ctloutput_t *pr_ctloutput; /* control output (from above) */ -/* utility hooks */ - pr_fasttimo_t *pr_fasttimo; /* fast timeout (200ms) */ - pr_slowtimo_t *pr_slowtimo; /* slow timeout (500ms) */ - pr_drain_t *pr_drain; /* flush any excess space possible */ - - struct pr_usrreqs *pr_usrreqs; /* user-protocol hook */ + short pr_type; /* second argument of socket(2) */ + short pr_protocol; /* third argument of socket(2) or 0 */ + short pr_flags; /* see protosw.h */ + pr_soreceive_t *pr_soreceive; /* recv(2) */ + pr_rcvd_t *pr_rcvd; /* soreceive_generic() if PR_WANTRCV */ + pr_sosend_t *pr_sosend; /* send(2) */ + pr_send_t *pr_send; /* send(2) via sosend_generic() */ + pr_ready_t *pr_ready; /* sendfile/ktls readyness */ + pr_sopoll_t *pr_sopoll; /* poll(2) */ + pr_attach_t *pr_attach; /* creation: socreate(), sonewconn() */ + pr_detach_t *pr_detach; /* destruction: sofree() */ + pr_connect_t *pr_connect; /* connect(2) */ + pr_disconnect_t *pr_disconnect; /* sodisconnect() */ + pr_close_t *pr_close; /* close(2) */ + pr_shutdown_t *pr_shutdown; /* shutdown(2) */ + pr_abort_t *pr_abort; /* abrupt tear down: soabort() */ + pr_aio_queue_t *pr_aio_queue; /* aio(9) */ + pr_bind_t *pr_bind; /* bind(2) */ + pr_bindat_t *pr_bindat; /* bindat(2) */ + pr_listen_t *pr_listen; /* listen(2) */ + pr_accept_t *pr_accept; /* accept(2) */ + pr_connectat_t *pr_connectat; /* connectat(2) */ + pr_connect2_t *pr_connect2; /* socketpair(2) */ + pr_control_t *pr_control; /* ioctl(2) */ + pr_rcvoob_t *pr_rcvoob; /* soreceive_rcvoob() */ + pr_ctloutput_t *pr_ctloutput; /* control output (from above) */ + pr_peeraddr_t *pr_peeraddr; /* getpeername(2) */ + pr_sockaddr_t *pr_sockaddr; /* getsockname(2) */ + pr_sense_t *pr_sense; /* stat(2) */ }; .Ed .Pp -The following functions handle the registration of a new domain, -lookups of specific protocols and protocol types within those domains, -and handle control messages from the system. -.Pp -.Fn pfctlinput -is called by the system whenever an event occurs that could affect every -domain. -Examples of those types of events are routing table changes, interface -shutdowns or certain -.Tn ICMP -message types. -When called, -.Fn pfctlinput -calls the protocol specific -.Fn pr_ctlinput -function for each protocol in that has defined one, in every domain. +The following functions handle the registration of new domains and protocols. .Pp .Fn domain_add adds a new protocol domain to the system. -The argument -.Fa data -is cast directly to -.Vt "struct domain *" -within the function, but is declared -.Vt "void *" -in order to prevent compiler warnings when new domains are registered with -.Fn SYSINIT . In most cases .Fn domain_add is not called directly, instead .Fn DOMAIN_SET -is used. -.Pp -If the new domain has defined a probe routine, it is called first in +is used, which is a wrapper around +.Fn SYSINIT +macro. +If the new domain has defined a +.Va dom_probe +routine, it is called first in .Fn domain_add to determine if the domain should be supported on the current system. -If the probe routine returns a non-0 value, then the domain will not be -marked as supported. -Unsupported domains do not proceed with the initialization process and are not -discoverable by -.Fn pffinddomain , -.Fn pffindtype , -or -.Fn pffindproto . -.Pp -.Fn domain_init -is called after -.Fn domain_add -during boot and for each -.Xr vnet 9 . -If the new domain has defined an initialization routine, it is called during -.Fn domain_init ; -as well, each of the protocols within the domain that have defined an -initialization routine will have theirs called. -Note that domain initialization cannot fail at this time. -.Pp +If the probe routine returns a non-0 value, then the domain will not be added. Once a domain is added it cannot be completely unloaded. This is because there is no reference counting system in place to determine if there are any active references from sockets within that domain. +However, the exprimental +.Fn domain_remove +exists, and unloadable domains may be supported in the future. .Pp -.Fn pffinddomain -finds a domain by family. -If the domain cannot be found, -.Dv NULL -is returned. -.Pp -.Fn pffindtype -and -.Fn pffindproto -look up a protocol by its number or by its type. -In most cases, if the protocol or type cannot be found, -.Dv NULL -is returned, but -.Fn pffindproto -may return the default if the requested type is -.Dv SOCK_RAW , -a protocol switch type of -.Dv SOCK_RAW -is found, and the domain has a default raw protocol. -.Pp -Both functions are called by -.Fn socreate -in order to resolve the protocol for the socket currently being created. -.Pp -.Fn DOMAIN_SET -is a macro that simplifies the registration of a domain via -.Fn SYSINIT . -The code resulting from the macro expects there to be a domain structure -named -.Dq Fa name Ns Li domain -where -.Fa name -is the argument to -.Fn DOMAIN_SET : -.Bd -literal -struct domain localdomain = -{ AF_LOCAL, "local", unp_init, unp_externalize, unp_dispose, - localsw, &localsw[sizeof(localsw)/sizeof(localsw[0])] }; - -DOMAIN_SET(local); -.Ed +.Fn protosw_register +dynamically adds a protocol to a domain, if the latter +has an empty slot in its +.Va dom_protosw . +Dynamically added protocol can later be unloaded with +.Fn protosw_unregister . .Sh RETURN VALUES -Both -.Fn pffindtype +The +.Fn domain_add +never fails, but it may not add a domain if its +.Va dom_probe +fails. +.Pp +The +.Fn protosw_register +function may fail if: +.Bl -tag -width Er +.It Bq Er EEXIST +A protocol with the same value of +.Va pr_type and -.Fn pffindproto -return a -.Vt "struct protosw *" -for the protocol requested. -If the protocol or socket type is not found, -.Dv NULL -is returned. -In the case of -.Fn pffindproto , -the default protocol may be returned for -.Dv SOCK_RAW -types if the domain has a default raw protocol. +.Va pr_protocol +already exists in the domain. +.It Bq Er ENOMEM +The domain doesn't have any NULL slots in its +.Va dom_protosw . +.El .Sh SEE ALSO -.Xr socket 2 +.Xr socket 2 , +.Xr SYSINIT 9 .Sh HISTORY -The functions -.Fn domain_add , -.Fn pfctlinput , -.Fn pffinddomain , -.Fn pffindproto , -.Fn pffindtype -and -.Fn DOMAIN_SET -first appeared in -.Fx 4.4 . +The +.Nm +subsystem first appeared in +.Bx 4.3 +as the part of the very first +.Xr socket 2 +API implementation. +.Pp +The +.Nm +subsystem and this manual page were significantly rewritten in +.Fx 14 . .Sh AUTHORS This manual page was written by -.An Chad David Aq Mt davidc@acns.ab.ca . +.An Chad David Aq Mt davidc@acns.ab.ca +and +.An Gleb Smirnoff Aq Mt glebius@FreeBSD.org . diff --git a/share/man/man9/domainset.9 b/share/man/man9/domainset.9 index 969d9dd3b554..816ce29f04f7 100644 --- a/share/man/man9/domainset.9 +++ b/share/man/man9/domainset.9 @@ -22,8 +22,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 14, 2021 .Dt DOMAINSET 9 .Os diff --git a/share/man/man9/dpcpu.9 b/share/man/man9/dpcpu.9 index 1ab2766a5477..6a19b8de3950 100644 --- a/share/man/man9/dpcpu.9 +++ b/share/man/man9/dpcpu.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 5, 2018 .Dt DPCPU 9 .Os diff --git a/share/man/man9/drbr.9 b/share/man/man9/drbr.9 index 9c641cd0e841..49c70bacb5ef 100644 --- a/share/man/man9/drbr.9 +++ b/share/man/man9/drbr.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 27, 2012 .Dt DRBR 9 .Os diff --git a/share/man/man9/driver.9 b/share/man/man9/driver.9 index 5c47e39eb3d9..0cfbd2975ca9 100644 --- a/share/man/man9/driver.9 +++ b/share/man/man9/driver.9 @@ -26,8 +26,6 @@ .\" (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 April 19, 2022 .Dt DRIVER 9 .Os diff --git a/share/man/man9/efirt.9 b/share/man/man9/efirt.9 index cdf0ea21ad8d..c31f52bf2245 100644 --- a/share/man/man9/efirt.9 +++ b/share/man/man9/efirt.9 @@ -1,5 +1,5 @@ .\"- -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org> .\" @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 2, 2021 .Dt EFIRT 9 .Os diff --git a/share/man/man9/epoch.9 b/share/man/man9/epoch.9 index 1f191211b041..826f887212e1 100644 --- a/share/man/man9/epoch.9 +++ b/share/man/man9/epoch.9 @@ -24,9 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 30, 2020 +.Dd March 25, 2024 .Dt EPOCH 9 .Os .Sh NAME @@ -262,19 +260,15 @@ and then defers deletion. More general mutation or a synchronous free would have to follow a call to .Fn epoch_wait . -.Sh NOTES -The -.Nm -kernel programming interface is under development and is subject to change. .Sh SEE ALSO +.Xr callout 9 , .Xr locking 9 , .Xr mtx_pool 9 , .Xr mutex 9 , .Xr rwlock 9 , .Xr sema 9 , .Xr sleep 9 , -.Xr sx 9 , -.Xr timeout 9 +.Xr sx 9 .Sh HISTORY The .Nm diff --git a/share/man/man9/ether_gen_addr.9 b/share/man/man9/ether_gen_addr.9 index f69cb199e2c3..aa7d73ae0c8b 100644 --- a/share/man/man9/ether_gen_addr.9 +++ b/share/man/man9/ether_gen_addr.9 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (C) 2021 Kyle Evans <kevans@FreeBSD.org> .\" @@ -26,8 +26,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 1, 2021 .Dt ETHER_GEN_ADDR 9 .Os diff --git a/share/man/man9/eventtimers.9 b/share/man/man9/eventtimers.9 index 686f63c0ddfc..bbf8307ee538 100644 --- a/share/man/man9/eventtimers.9 +++ b/share/man/man9/eventtimers.9 @@ -22,8 +22,6 @@ .\" (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 April 2, 2014 .Dt EVENTTIMERS 9 .Os diff --git a/share/man/man9/extattr.9 b/share/man/man9/extattr.9 index bf79487f8bf4..3ee2ed5e2e83 100644 --- a/share/man/man9/extattr.9 +++ b/share/man/man9/extattr.9 @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd December 23, 1999 +.Dd September 5, 2023 .Dt EXTATTR 9 .Os .Sh NAME @@ -56,6 +54,11 @@ attribute data is protected according the normal discretionary and mandatory protections associated with the data in the file or directory; system attribute data is protected such that appropriate privilege is required to directly access or manipulate these attributes. +By default, processes in a +.Xr jail 8 +cannot access the system attribute data unless the +.Va allow.extattr +configuration parameter is specified. .Pp Reads of extended attribute data may return specific contiguous regions of the meta-data, in the style of @@ -79,8 +82,8 @@ Appropriate vnode extended attribute calls are: and .Xr VOP_SETEXTATTR 9 . .Sh SEE ALSO +.Xr jail 8 , .Xr VFS 9 , -.Xr VFS_EXTATTRCTL 9 , .Xr VOP_GETEXTATTR 9 , .Xr VOP_LISTEXTATTR 9 , .Xr VOP_SETEXTATTR 9 diff --git a/share/man/man9/fail.9 b/share/man/man9/fail.9 index d7447b1cd35d..346f4dc334a5 100644 --- a/share/man/man9/fail.9 +++ b/share/man/man9/fail.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 6, 2019 .Dt FAIL 9 .Os diff --git a/share/man/man9/fdt_pinctrl.9 b/share/man/man9/fdt_pinctrl.9 index 8f1f24a07a52..6c50488ca2ce 100644 --- a/share/man/man9/fdt_pinctrl.9 +++ b/share/man/man9/fdt_pinctrl.9 @@ -26,8 +26,6 @@ .\" (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 June 23, 2018 .Dt fdt_pinctrl 9 .Os diff --git a/share/man/man9/fetch.9 b/share/man/man9/fetch.9 index 16acb542c625..c544ec802d68 100644 --- a/share/man/man9/fetch.9 +++ b/share/man/man9/fetch.9 @@ -32,8 +32,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 22, 2021 .Dt FETCH 9 .Os diff --git a/share/man/man9/firmware.9 b/share/man/man9/firmware.9 index 6d91beb3ddd1..43f965a20fb7 100644 --- a/share/man/man9/firmware.9 +++ b/share/man/man9/firmware.9 @@ -21,9 +21,7 @@ .\" (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 27, 2021 +.Dd January 25, 2024 .Dt FIRMWARE 9 .Os .Sh NAME @@ -91,9 +89,12 @@ and unregistered by calling These functions are usually (but not exclusively) called by specially crafted kernel modules that contain the firmware image. The modules can be statically compiled in the kernel, or loaded by -.Nm /boot/loader , +.Pa /boot/loader , manually at runtime, or on demand by the firmware subsystem. .Pp +Firmware binary files may also be loaded directly rather than embedded into +kernel modules. +.Pp .Nm Clients of the firmware subsystem can request access to a given image by calling the function @@ -188,7 +189,7 @@ By default a firmware image will be deferred to a .Xr taskqueue 9 thread so the call may be done while holding a lock. In certain cases, such as on driver detach, this cannot be allowed. -.Sh FIRMWARE LOADING MECHANISMS +.Sh FIRMWARE LOADING VIA MODULES As mentioned before, any component of the system can register firmware images at any time by simply calling .Fn firmware_register . @@ -196,11 +197,11 @@ firmware images at any time by simply calling This is typically done when a module containing a firmware image is given control, whether compiled in, or preloaded by -.Nm /boot/loader , +.Pa /boot/loader , or manually loaded with .Xr kldload 8 . However, a system can implement additional mechanisms to bring -these images in memory before calling +these images into memory before calling .Fn firmware_register . .Pp When @@ -222,7 +223,7 @@ In particular, images are looked up in the directories specified by the sysctl variable .Nm kern.module_path which on most systems defaults to -.Nm /boot/kernel;/boot/modules . +.Pa /boot/kernel;/boot/modules . .Pp Note that in case a module contains multiple images, the caller should first request a @@ -254,26 +255,24 @@ colon-separated tuples indicating the image_file's to be embedded in the module, the imagename and version of each firmware image. .Pp If you need to embed firmware images into a system, you should write -appropriate entries in the <files.arch> file, e.g. this example is +appropriate entries in the <files.arch> or <files> file, e.g. this example is from -.Nm sys/arm/xscale/ixp425/files.ixp425 : +.Nm sys/conf/files .Bd -literal -ixp425_npe_fw.c optional npe_fw \\ - compile-with "${AWK} -f $S/tools/fw_stub.awk \\ - IxNpeMicrocode.dat:npe_fw -mnpe -c${.TARGET}" \\ - no-implicit-rule before-depend local \\ - clean "ixp425_npe_fw.c" +iwn1000fw.c optional iwn1000fw | iwnfw \\ + compile-with "${AWK} -f $S/tools/fw_stub.awk iwn1000.fw:iwn1000fw -miwn1000fw -c${.TARGET}" \\ + no-ctfconvert no-implicit-rule before-depend local \\ + clean "iwn1000fw.c" # # NB: ld encodes the path in the binary symbols generated for the # firmware image so link the file to the object directory to # get known values for reference in the _fw.c file. # -IxNpeMicrocode.fwo optional npe_fw \\ - dependency "IxNpeMicrocode.dat" \\ - compile-with "${LD} -b binary -d -warn-common \\ - -r -d -o ${.TARGET} IxNpeMicrocode.dat" \\ - no-implicit-rule \\ - clean "IxNpeMicrocode.fwo" +iwn1000fw.fwo optional iwn1000fw | iwnfw \\ + dependency "iwn1000.fw" \\ + compile-with "${NORMAL_FWO}" \\ + no-implicit-rule \\ + clean "iwn1000fw.fwo" .Ed .Pp Firmware was previously committed to the source tree as uuencoded files, @@ -285,16 +284,102 @@ the availability of the following tools: .Xr awk 1 , .Xr make 1 , the compiler and the linker. +.Sh LOADING BINARY FIRMWARE FILES +.Ss Binary Firmware Format +Binary firmware files can also be loaded, either from +.Pa /boot/loader , +or when +.Nm firmware_get +cannot find the registered firmware from a kernel module. +Binary firmware files are raw binary files that the creator of the firmware +made. +They offer an easier way to load firmware, but one that lacks the full +flexibility and generality of kernel modules with the following restrictions: +.Bl -bullet -compact +.It +Binary firmware files only hold one set of firmware. +.It +They do not offer kernel module dependencies to ensure they are loaded +automatically by the boot loader. +.It +They cannot be compiled into the kernel. +.It +The +.Nm imagename +is identical to the full path name used to load the module. +.It +The version number is assumed to be zero. +.El +.Ss Loading from Pa /boot/loader +Binary firmware files may be loaded either from the command line with +.Dq load -t firmware /boot/firmware/filename +or using the +.Xr loader.conf 5 +mechanism to load modules with a type of +.Dq firmware +For example +.Bd -literal +wififw_load="YES" +wififw_name="/boot/firmware/wifi2034_fw.bin" +wififw_type="firmware" +.Ed +.Ss On demand loading from Nm firmware_get +If no kernel module with an embedded firmware image named +.Nm imagename +is loaded, then +.Nm imagename +will be appended to the module path (by default +.Pa /boot/firmware/ ) +and if that file exists, it will be loaded and registered using +.Nm firmware_register +using the full path to the filename as +.Nm imagename . +.Ss Searching for imagename +.Nm firmware_get +uses the following algorithm to find firmware images: +.Bl -bullet -compact +.It +If an existing firmware image is registered for +.Fa imagename, +that image is returned. +.It +If +.Fa imagename +matches the trailing subpath of a registered image with a full path, that image is returned. +.It +The kernel linker searches for a kernel module named +.Fa imagename . +If a kernel module is found, it is loaded, and +the list of registered firmware images is searched again. +If a match is found, the matching image is returned. +.It +The kernel searches for a file named +.Fa imagename +in the firmware image path +(by default +.Pa /boot/firmware/ ) . +If that file exists and can be read, +it contents are registered as a firmware image with the full path as the +.Nm imagename +and that firmware is returned. +Currently, there is an 8MB limit on the size of the firmware image. +This can be changed by by the sysctl variable +.Nm debug.max_firmware_size . +.El .Sh SEE ALSO .Xr kld 4 , .Xr module 9 .Pp +.Pa /boot/firmware +.Pp .Pa /usr/share/examples/kld/firmware .Sh HISTORY The .Nm firmware system was introduced in .Fx 6.1 . +Binary firmware loading was introduced in +.Fx 15.0 . .Sh AUTHORS This manual page was written by .An Max Laier Aq Mt mlaier@FreeBSD.org . diff --git a/share/man/man9/fpu_kern.9 b/share/man/man9/fpu_kern.9 index 9b0da289ef40..92dc0eaa7e17 100644 --- a/share/man/man9/fpu_kern.9 +++ b/share/man/man9/fpu_kern.9 @@ -21,8 +21,6 @@ .\" (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 October 13, 2020 .Dt FPU_KERN 9 .Os @@ -187,7 +185,8 @@ and false otherwise. .Sh NOTES The .Nm -is currently implemented only for the i386, amd64, and arm64 architectures. +is currently implemented only for the i386, amd64, arm64, and powerpc +architectures. .Pp There is no way to handle floating point exceptions raised from kernel mode. @@ -207,6 +206,8 @@ facitily and this manual page were written by .An Konstantin Belousov Aq Mt kib@FreeBSD.org . The arm64 support was added by .An Andrew Turner Aq Mt andrew@FreeBSD.org . +The powerpc support was added by +.An Shawn Anastasio Aq Mt sanastasio@raptorengineering.com . .Sh BUGS .Fn fpu_kern_leave should probably have type diff --git a/share/man/man9/g_access.9 b/share/man/man9/g_access.9 index fcfc86958581..ef90af07574a 100644 --- a/share/man/man9/g_access.9 +++ b/share/man/man9/g_access.9 @@ -22,8 +22,6 @@ .\" (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 16, 2004 .Dt G_ACCESS 9 .Os diff --git a/share/man/man9/g_attach.9 b/share/man/man9/g_attach.9 index afacc90eb932..92f801c5ffea 100644 --- a/share/man/man9/g_attach.9 +++ b/share/man/man9/g_attach.9 @@ -22,8 +22,6 @@ .\" (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 October 10, 2020 .Dt G_ATTACH 9 .Os diff --git a/share/man/man9/g_bio.9 b/share/man/man9/g_bio.9 index 9b3e80127c79..407c38e6ca70 100644 --- a/share/man/man9/g_bio.9 +++ b/share/man/man9/g_bio.9 @@ -22,8 +22,6 @@ .\" (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 August 7, 2019 .Dt G_BIO 9 .Os diff --git a/share/man/man9/g_consumer.9 b/share/man/man9/g_consumer.9 index 1cdcacd8d975..a565b50e1ef1 100644 --- a/share/man/man9/g_consumer.9 +++ b/share/man/man9/g_consumer.9 @@ -22,8 +22,6 @@ .\" (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 16, 2004 .Dt G_CONSUMER 9 .Os diff --git a/share/man/man9/g_data.9 b/share/man/man9/g_data.9 index 698195019c4f..716d0be718c3 100644 --- a/share/man/man9/g_data.9 +++ b/share/man/man9/g_data.9 @@ -22,8 +22,6 @@ .\" (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 March 30, 2020 .Dt G_DATA 9 .Os diff --git a/share/man/man9/g_event.9 b/share/man/man9/g_event.9 index 32c4703100d8..e6fea9024d04 100644 --- a/share/man/man9/g_event.9 +++ b/share/man/man9/g_event.9 @@ -22,8 +22,6 @@ .\" (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 July 23, 2021 .Dt G_EVENT 9 .Os diff --git a/share/man/man9/g_geom.9 b/share/man/man9/g_geom.9 index 3deb032a8bc2..74c6979fceda 100644 --- a/share/man/man9/g_geom.9 +++ b/share/man/man9/g_geom.9 @@ -22,8 +22,6 @@ .\" (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 April 24, 2016 .Dt G_GEOM 9 .Os diff --git a/share/man/man9/g_provider.9 b/share/man/man9/g_provider.9 index b22ae0bc9044..940772b26fa5 100644 --- a/share/man/man9/g_provider.9 +++ b/share/man/man9/g_provider.9 @@ -22,8 +22,6 @@ .\" (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 16, 2004 .Dt G_PROVIDER 9 .Os @@ -52,7 +50,7 @@ The function creates a new provider on given geom .Fa gp . The name of the provider, which will appear as device in -.Xr devfs 5 , +.Xr devfs 4 , is created in a .Xr printf 3 Ns diff --git a/share/man/man9/g_provider_by_name.9 b/share/man/man9/g_provider_by_name.9 index 8293b15b8043..6c7e87c0276b 100644 --- a/share/man/man9/g_provider_by_name.9 +++ b/share/man/man9/g_provider_by_name.9 @@ -22,8 +22,6 @@ .\" (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 29, 2021 .Dt G_PROVIDER_BY_NAME 9 .Os diff --git a/share/man/man9/g_wither_geom.9 b/share/man/man9/g_wither_geom.9 index 337d9628d6d2..4e34cea9f5e5 100644 --- a/share/man/man9/g_wither_geom.9 +++ b/share/man/man9/g_wither_geom.9 @@ -22,8 +22,6 @@ .\" (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 16, 2004 .Dt G_WITHER_GEOM 9 .Os diff --git a/share/man/man9/get_cyclecount.9 b/share/man/man9/get_cyclecount.9 index eb8a5c5a2f3e..52242dd5c65d 100644 --- a/share/man/man9/get_cyclecount.9 +++ b/share/man/man9/get_cyclecount.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 15, 2011 .Dt GET_CYCLECOUNT 9 .Os diff --git a/share/man/man9/getenv.9 b/share/man/man9/getenv.9 index 072f42474fba..0550814871fa 100644 --- a/share/man/man9/getenv.9 +++ b/share/man/man9/getenv.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 21, 2020 .Dt GETENV 9 .Os diff --git a/share/man/man9/getnewvnode.9 b/share/man/man9/getnewvnode.9 index 57ecc986c7cd..d35c1a080158 100644 --- a/share/man/man9/getnewvnode.9 +++ b/share/man/man9/getnewvnode.9 @@ -24,9 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd November 21, 2001 +.Dd November 1, 2023 .Dt GETNEWVNODE 9 .Os .Sh NAME @@ -37,14 +35,12 @@ .In sys/vnode.h .In sys/mount.h .Ft int -.Fn getnewvnode "const char *tag" "struct mount *mp" "vop_t **vops" "struct vnode **vpp" +.Fn getnewvnode "const char *tag" "struct mount *mp" "struct vop_vector *vops" "struct vnode **vpp" .Sh DESCRIPTION The .Fn getnewvnode function initializes a new vnode, assigning it the vnode operations passed in .Fa vops . -The vnode is either freshly allocated, or taken from the head of the -free list depending on the number of vnodes already in the system. .Pp The arguments to .Fn getnewvnode @@ -63,7 +59,8 @@ Points to the new vnode upon successful completion. .Sh RETURN VALUES .Fn getnewvnode returns 0 on success. -There are currently no failure conditions - that do not result in a panic. +.Sh BUGS +It never returns an error, instead either succeeds or blocks indefinitely. .Sh AUTHORS This manual page was written by .An Chad David Aq Mt davidc@acns.ab.ca . diff --git a/share/man/man9/gone_in.9 b/share/man/man9/gone_in.9 index b2474d610b24..7521adfda204 100644 --- a/share/man/man9/gone_in.9 +++ b/share/man/man9/gone_in.9 @@ -23,8 +23,6 @@ .\" (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 August 16, 2021 .Dt GONE_IN 9 .Os diff --git a/share/man/man9/groupmember.9 b/share/man/man9/groupmember.9 index 84d57e63208e..e7e28bae3ac9 100644 --- a/share/man/man9/groupmember.9 +++ b/share/man/man9/groupmember.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved. +.\" Copyright (C) 2023 Olivier Certner <olce.freebsd@certner.fr> .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -24,37 +25,55 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 9, 2001 +.Dd October 31, 2024 .Dt GROUPMEMBER 9 .Os .Sh NAME .Nm groupmember -.Nd checks group set for a group ID +.Nd checks if credentials mandate some group membership .Sh SYNOPSIS .In sys/param.h .In sys/ucred.h -.Ft int -.Fn groupmember "gid_t gid" "struct ucred *cred" +.Ft bool +.Fn groupmember "gid_t gid" "const struct ucred *cred" +.Ft bool +.Fn realgroupmember "gid_t gid" "const struct ucred *cred" .Sh DESCRIPTION The .Fn groupmember -function checks to see if the given -.Fa gid -is in the group set of the credentials. +function checks if credentials +.Fa cred +indicate that the associated subject or object is a member of the group +designated by the group ID +.Fa gid . +.Pp +Considered groups in +.Fa cred +are the effective and supplementary groups. +The real group is not taken into account. .Pp -Its arguments are: -.Bl -tag -width ".Fa cred" -.It Fa gid -The group ID to check for. -.It Fa cred -The credentials to search for the group in. -.El +Function +.Fn realgroupmember +works the same except that it considers instead the real and supplementary +groups, and not the effective one. .Sh RETURN VALUES -If the -.Fa gid -is found, 1 is returned; otherwise, 0 is returned. +The +.Fn groupmember +and +.Fn realgroupmember +functions return +.Dv true +if the given credentials indicate membership of the group +.Fa gid , +or +.Dv false +otherwise. +.Sh SEE ALSO +.Xr getgroups 2 , +.Xr setgroups 2 .Sh AUTHORS -This manual page was written by -.An Chad David Aq Mt davidc@acns.ab.ca . +This manual page was initially written by +.An -nosplit +.An Chad David Aq Mt davidc@acns.ab.ca +and was revised by +.An Olivier Certner Aq Mt olce.freebsd@certner.fr . diff --git a/share/man/man9/hardclock.9 b/share/man/man9/hardclock.9 index 451ad8a28a93..757aed112ccb 100644 --- a/share/man/man9/hardclock.9 +++ b/share/man/man9/hardclock.9 @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 1, 2021 +.Dd February 27, 2023 .Dt HARDCLOCK 9 .Os .Sh NAME @@ -44,19 +44,18 @@ The rate ranges from .Va hz times per second on a very busy system, to twice a second on an idle system. The -.Va cnt +.Fa cnt argument reports an estimate of the number of ticks since the last call. -The sum of -.Va cnt -over a second averages -.Va hz -over the long haul. +Over long timescales, the average sum of +.Fa cnt +over one second is +.Va hz . See .Xr hz 9 for important details over shorter time scales. -The argument -.Va usermode -is none-zero when +The +.Fa usermode +argument is non-zero when .Fn hardclock is called from an context that interrupted usermode execution. .Pp @@ -77,18 +76,23 @@ or .Xr adjtime 2 induced changes and leap seconds, as well as any necessary compensations to keep in sync with PPS signals or external clocks, if -support for this is in the kernel (see -.Xr options 4 ) . +supported by the kernel. .It -Schedule softclock interrupts ( -.Xr swi 9 ) +Schedule softclock interrupts +.Po +.Xr swi 9 +.Pc processing. .It Collect .Xr hwpmc 4 statistics. .It -Do device polling, when enabled. +Do device polling, when enabled +.Po +see +.Xr polling 4 +.Pc . .It Implement software .Xr watchdog 9 @@ -102,5 +106,11 @@ processing. .Xr adjtime 2 , .Xr ntp_adjtime 2 , .Xr signal 3 , +.Xr hwpmc 4 , +.Xr polling 4 , .Xr ntpd 8 , -.Xr hz 9 +.Xr epoch 9 , +.Xr eventtimers 9 , +.Xr hz 9 , +.Xr swi 9 , +.Xr watchdog 9 diff --git a/share/man/man9/hash.9 b/share/man/man9/hash.9 index 9dade6cd1eab..d97ad251a1e0 100644 --- a/share/man/man9/hash.9 +++ b/share/man/man9/hash.9 @@ -24,7 +24,6 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $OpenBSD: hash.9,v 1.5 2003/04/17 05:08:39 jmc Exp $ -.\" $FreeBSD$ .\" .Dd June 30, 2015 .Dt HASH 9 diff --git a/share/man/man9/hashinit.9 b/share/man/man9/hashinit.9 index 5357a95e04fa..7d2f75d58d03 100644 --- a/share/man/man9/hashinit.9 +++ b/share/man/man9/hashinit.9 @@ -23,8 +23,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 29, 2016 .Dt HASHINIT 9 .Os diff --git a/share/man/man9/hexdump.9 b/share/man/man9/hexdump.9 index a731ab51ab93..c5a8f41882bc 100644 --- a/share/man/man9/hexdump.9 +++ b/share/man/man9/hexdump.9 @@ -26,8 +26,6 @@ .\" (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, 2003 .Dt HEXDUMP 9 .Os diff --git a/share/man/man9/hhook.9 b/share/man/man9/hhook.9 index 78e79d88cce6..592ac7a91414 100644 --- a/share/man/man9/hhook.9 +++ b/share/man/man9/hhook.9 @@ -27,8 +27,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 21, 2013 .Dt HHOOK 9 .Os diff --git a/share/man/man9/ieee80211.9 b/share/man/man9/ieee80211.9 index 35624f5f39cd..40c8c243a77c 100644 --- a/share/man/man9/ieee80211.9 +++ b/share/man/man9/ieee80211.9 @@ -25,9 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd January 26, 2021 +.Dd April 24, 2024 .Dt IEEE80211 9 .Os .Sh NAME @@ -516,6 +514,8 @@ General capabilities are specified by .Vt ic_caps . Hardware cryptographic capabilities are specified by .Vt ic_cryptocaps . +Software cryptographic capabilities are specified by +.Vt ic_sw_cryptocaps . 802.11n capabilities, if any, are specified by .Vt ic_htcaps . The diff --git a/share/man/man9/ieee80211_amrr.9 b/share/man/man9/ieee80211_amrr.9 index a90de3dc257a..69aa48184ff7 100644 --- a/share/man/man9/ieee80211_amrr.9 +++ b/share/man/man9/ieee80211_amrr.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 4, 2009 .Dt IEEE8021_AMRR 9 .Os diff --git a/share/man/man9/ieee80211_beacon.9 b/share/man/man9/ieee80211_beacon.9 index 87115fcbd601..3738b7dfabf8 100644 --- a/share/man/man9/ieee80211_beacon.9 +++ b/share/man/man9/ieee80211_beacon.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 4, 2009 .Dt IEEE80211_BEACON 9 .Os diff --git a/share/man/man9/ieee80211_bmiss.9 b/share/man/man9/ieee80211_bmiss.9 index 63b8e9f4ad51..2c3661b6f892 100644 --- a/share/man/man9/ieee80211_bmiss.9 +++ b/share/man/man9/ieee80211_bmiss.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 4, 2009 .Dt IEEE80211_BMISS 9 .Os diff --git a/share/man/man9/ieee80211_crypto.9 b/share/man/man9/ieee80211_crypto.9 index 1335551ad9f4..7e2d55588133 100644 --- a/share/man/man9/ieee80211_crypto.9 +++ b/share/man/man9/ieee80211_crypto.9 @@ -23,8 +23,6 @@ .\" 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$ .\" $Id: ieee80211_crypto.9,v 1.3 2004/03/04 10:42:56 bruce Exp $ .\" .Dd March 29, 2010 diff --git a/share/man/man9/ieee80211_ddb.9 b/share/man/man9/ieee80211_ddb.9 index c85dd7278725..0b4e9e233324 100644 --- a/share/man/man9/ieee80211_ddb.9 +++ b/share/man/man9/ieee80211_ddb.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 4, 2009 .Dt IEEE80211_DDB 9 .Os diff --git a/share/man/man9/ieee80211_input.9 b/share/man/man9/ieee80211_input.9 index 9422f0bc6330..7556bbc61291 100644 --- a/share/man/man9/ieee80211_input.9 +++ b/share/man/man9/ieee80211_input.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 4, 2009 .Dt IEEE80211_INPUT 9 .Os diff --git a/share/man/man9/ieee80211_node.9 b/share/man/man9/ieee80211_node.9 index b5f3e618a1a0..6dd492e3b33d 100644 --- a/share/man/man9/ieee80211_node.9 +++ b/share/man/man9/ieee80211_node.9 @@ -24,9 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 28, 2010 +.Dd October 2, 2023 .Dt IEEE80211_NODE 9 .Os .Sh NAME @@ -52,9 +50,6 @@ .Fn ieee80211_ref_node "struct ieee80211_node *" .\" .Ft void -.Fn ieee80211_unref_node "struct ieee80211_node *" -.\" -.Ft void .Fn ieee80211_free_node "struct ieee80211_node *" .\" .Ft void @@ -108,14 +103,10 @@ Routines that lookup a table entry return a (i.e. a pointer to a table entry with the reference count incremented). The .Fn ieee80211_ref_node -and -.Fn ieee80211_unref_node -calls explicitly increment/decrement the reference count of a node, -but are rarely used. -Instead most callers use +call explicitly increments the reference count of a node. .Fn ieee80211_free_node -to release a reference and, if the count goes to zero, reclaim the -table entry. +decrements the reference count of a node and if the count goes to zero +reclaims the table entry. .Pp The station table and its entries are exposed to drivers in several ways. Each frame transmitted to a station includes a reference to the diff --git a/share/man/man9/ieee80211_output.9 b/share/man/man9/ieee80211_output.9 index 6a8d3a71e0d8..80aa6d69e05d 100644 --- a/share/man/man9/ieee80211_output.9 +++ b/share/man/man9/ieee80211_output.9 @@ -23,8 +23,6 @@ .\" 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$ .\" $Id: ieee80211_output.9,v 1.5 2004/03/04 12:31:18 bruce Exp $ .\" .Dd March 29, 2010 diff --git a/share/man/man9/ieee80211_proto.9 b/share/man/man9/ieee80211_proto.9 index 6b0da064d811..9d2b38829be1 100644 --- a/share/man/man9/ieee80211_proto.9 +++ b/share/man/man9/ieee80211_proto.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 4, 2009 .Dt IEEE80211_PROTO 9 .Os diff --git a/share/man/man9/ieee80211_radiotap.9 b/share/man/man9/ieee80211_radiotap.9 index b7db14a0df02..74e4f8395805 100644 --- a/share/man/man9/ieee80211_radiotap.9 +++ b/share/man/man9/ieee80211_radiotap.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 11, 2019 .Dt IEEE80211_RADIOTAP 9 .Os diff --git a/share/man/man9/ieee80211_regdomain.9 b/share/man/man9/ieee80211_regdomain.9 index da310ddc7232..cf632724b939 100644 --- a/share/man/man9/ieee80211_regdomain.9 +++ b/share/man/man9/ieee80211_regdomain.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 4, 2009 .Dt IEEE80211_REGDOMAIN 9 .Os diff --git a/share/man/man9/ieee80211_scan.9 b/share/man/man9/ieee80211_scan.9 index 54cefa750645..9dd0b125144a 100644 --- a/share/man/man9/ieee80211_scan.9 +++ b/share/man/man9/ieee80211_scan.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 29, 2010 .Dt IEEE80211_SCAN 9 .Os diff --git a/share/man/man9/ieee80211_vap.9 b/share/man/man9/ieee80211_vap.9 index bd8d2a8a7184..ee811107f035 100644 --- a/share/man/man9/ieee80211_vap.9 +++ b/share/man/man9/ieee80211_vap.9 @@ -23,10 +23,8 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 4, 2009 -.Dt IEEE8021_VAP 9 +.Dt IEEE80211_VAP 9 .Os .Sh NAME .Nm net80211_vap diff --git a/share/man/man9/iflib.9 b/share/man/man9/iflib.9 index 263cc2c9ec15..9f312b9d4c2b 100644 --- a/share/man/man9/iflib.9 +++ b/share/man/man9/iflib.9 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .Dd September 20, 2018 .Dt IFLIB 9 .Os diff --git a/share/man/man9/iflibdd.9 b/share/man/man9/iflibdd.9 index 511121843210..67645fe5c87a 100644 --- a/share/man/man9/iflibdd.9 +++ b/share/man/man9/iflibdd.9 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .Dd May 3, 2018 .Dt IFLIBDD 9 .Os diff --git a/share/man/man9/iflibdi.9 b/share/man/man9/iflibdi.9 index 0d40333dd528..57fa02c60b25 100644 --- a/share/man/man9/iflibdi.9 +++ b/share/man/man9/iflibdi.9 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .Dd May 21, 2019 .Dt IFLIBDI 9 .Os diff --git a/share/man/man9/iflibtxrx.9 b/share/man/man9/iflibtxrx.9 index adb44def1d3f..df017dea0130 100644 --- a/share/man/man9/iflibtxrx.9 +++ b/share/man/man9/iflibtxrx.9 @@ -1,4 +1,3 @@ -.\" $FreeBSD$ .Dd December 17, 2020 .Dt IFLIBTXTX 9 .Os diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9 index dd203cb5580b..3c45e4f29e2d 100644 --- a/share/man/man9/ifnet.9 +++ b/share/man/man9/ifnet.9 @@ -26,12 +26,11 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd May 24, 2022 +.Dd December 10, 2024 .Dt IFNET 9 .Os .Sh NAME +.Nm if_t , .Nm ifnet , .Nm ifaddr , .Nm ifqueue , @@ -46,46 +45,44 @@ .In net/if_types.h .\" .Ss "Interface Manipulation Functions" -.Ft "struct ifnet *" +.Ft "if_t" .Fn if_alloc "u_char type" -.Ft "struct ifnet *" +.Ft "if_t" .Fn if_alloc_dev "u_char type" "device_t dev" -.Ft "struct ifnet *" +.Ft "if_t" .Fn if_alloc_domain "u_char type" "int numa_domain" .Ft void -.Fn if_attach "struct ifnet *ifp" +.Fn if_attach "if_t ifp" .Ft void -.Fn if_detach "struct ifnet *ifp" +.Fn if_detach "if_t ifp" .Ft void -.Fn if_free "struct ifnet *ifp" +.Fn if_free "if_t ifp" .Ft void -.Fn if_free_type "struct ifnet *ifp" "u_char type" +.Fn if_free_type "if_t ifp" "u_char type" .Ft void -.Fn if_down "struct ifnet *ifp" +.Fn if_down "if_t ifp" .Ft int .Fn ifioctl "struct socket *so" "u_long cmd" "caddr_t data" "struct thread *td" .Ft int -.Fn ifpromisc "struct ifnet *ifp" "int pswitch" +.Fn ifpromisc "if_t ifp" "int pswitch" .Ft int -.Fn if_allmulti "struct ifnet *ifp" "int amswitch" -.Ft "struct ifnet *" +.Fn if_allmulti "if_t ifp" "int amswitch" +.Ft "if_t" .Fn ifunit "const char *name" -.Ft "struct ifnet *" +.Ft "if_t" .Fn ifunit_ref "const char *name" .Ft void -.Fn if_up "struct ifnet *ifp" +.Fn if_up "if_t ifp" .\" .Ss "Interface Address Functions" .Ft "struct ifaddr *" -.Fn ifaddr_byindex "u_short idx" -.Ft "struct ifaddr *" .Fn ifa_ifwithaddr "struct sockaddr *addr" .Ft "struct ifaddr *" .Fn ifa_ifwithdstaddr "struct sockaddr *addr" "int fib" .Ft "struct ifaddr *" .Fn ifa_ifwithnet "struct sockaddr *addr" "int ignore_ptp" "int fib" .Ft "struct ifaddr *" -.Fn ifaof_ifpforaddr "struct sockaddr *addr" "struct ifnet *ifp" +.Fn ifaof_ifpforaddr "struct sockaddr *addr" "if_t ifp" .Ft void .Fn ifa_ref "struct ifaddr *ifa" .Ft void @@ -93,35 +90,221 @@ .\" .Ss "Interface Multicast Address Functions" .Ft int -.Fn if_addmulti "struct ifnet *ifp" "struct sockaddr *sa" "struct ifmultiaddr **ifmap" +.Fn if_addmulti "if_t ifp" "struct sockaddr *sa" "struct ifmultiaddr **ifmap" .Ft int -.Fn if_delmulti "struct ifnet *ifp" "struct sockaddr *sa" +.Fn if_delmulti "if_t ifp" "struct sockaddr *sa" .Ft "struct ifmultiaddr *" -.Fn if_findmulti "struct ifnet *ifp" "struct sockaddr *sa" +.Fn if_findmulti "if_t ifp" "struct sockaddr *sa" +.Ss "Output queue accessors" +.Fn if_dequeue "if_t ifp" "struct mbuf *m" .Ss "Output queue macros" .Fn IF_DEQUEUE "struct ifqueue *ifq" "struct mbuf *m" .\" +.Ss "if_t accesors" +.Ft uint64_t +.Fn if_setbaudrate "if_t ifp" "uint64_t baudrate" +.Ft uint64_t +.Fn if_getbaudrate "const if_t ifp" +.Ft int +.Fn if_setcapabilities "if_t ifp" "int capabilities" +.Ft int +.Fn if_setcapabilitiesbit "if_t ifp" "int setbit" "int clearbit" +.Ft int +.Fn if_getcapabilities "const if_t ifp" +.Ft int +.Fn if_togglecapenable "if_t ifp" "int togglecap" +.Ft int +.Fn if_setcapenable "if_t ifp" "int capenable" +.Ft int +.Fn if_setcapenablebit "if_t ifp" "int setcap" "int clearcap" +.Ft int +.Fn if_getcapenable "const if_t ifp" +.Ft int +.Fn if_setcapabilities2 "if_t ifp" "int capabilities" +.Ft int +.Fn if_setcapabilities2bit "if_t ifp" "int setbit" "int clearbit" +.Ft int +.Fn if_getcapabilities2 "const if_t ifp" +.Ft int +.Fn if_togglecapenable2 "if_t ifp" "int togglecap" +.Ft int +.Fn if_setcapenable2 "if_t ifp" "int capenable" +.Ft int +.Fn if_setcapenable2bit "if_t ifp" "int setcap" "int clearcap" +.Ft int +.Fn if_getcapenable2 "const if_t ifp" +.Ft int +.Fn if_getdunit "const if_t ifp" +.Ft int +.Fn if_getindex "const if_t ifp" +.Ft int +.Fn if_getidxgen "const if_t ifp" +.Ft const char * +.Fn if_getdname "const if_t ifp" +.Ft void +.Fn if_setdname "if_t ifp" "const char *name" +.Ft const char * +.Fn if_name "if_t ifp" +.Ft int +.Fn if_setname "if_t ifp" "const char *name" +.Ft void +.Fn if_setdescr "if_t ifp" "char *descrbuf" +.Ft char * +.Fn if_allocdescr "size_t sz" "int malloc_flag" +.Ft void +.Fn if_freedescr "char *descrbuf" +.Ft int +.Fn if_getalloctype "const if_t ifp" +.Ft int +.Fn if_gettype "const if_t ifp" +.Ft int +.Fn if_setdev "if_t ifp" "void *dev" +.Ft int +.Fn if_setdrvflagbits "if_t ifp" "int if_setflags" "int clear_flags" +.Ft int +.Fn if_getdrvflags "const if_t ifp" +.Ft int +.Fn if_setdrvflags "if_t ifp" "int flags" +.Ft int +.Fn if_getlinkstate "if_t ifp" +.Ft int +.Fn if_clearhwassist "if_t ifp" +.Ft int +.Fn if_sethwassistbits "if_t ifp" "int toset" "int toclear" +.Ft int +.Fn if_sethwassist "if_t ifp" "int hwassist_bit" +.Ft int +.Fn if_gethwassist "const if_t ifp" +.Ft int +.Fn if_togglehwassist "if_t ifp" "int toggle_bits" +.Ft int +.Fn if_setsoftc "if_t ifp" "void *softc" +.Ft void * +.Fn if_getsoftc "if_t ifp" +.Ft void +.Fn if_setllsoftc "if_t ifp" "void *softc" +.Ft void * +.Fn if_getllsoftc "if_t ifp" +.Ft u_int +.Fn if_getfib "if_t ifp" +.Ft uint8_t +.Fn if_getaddrlen "if_t ifp" +.Ft int +.Fn if_gethwaddr "const if_t ifp" "struct ifreq *" +.Ft const uint8_t * +.Fn if_getbroadcastaddr "const if_t ifp" +.Ft void +.Fn if_setbroadcastaddr "if_t ifp" "const uint8_t *" +.Ft int +.Fn if_setmtu "if_t ifp" "int mtu" +.Ft int +.Fn if_getmtu "const if_t ifp" +.Ft int +.Fn if_getmtu_family "const if_t ifp" "int family" +.Ft void +.Fn if_notifymtu "if_t ifp" +.Ft int +.Fn if_setflagbits "if_t ifp" "int set" "int clear" +.Ft int +.Fn if_setflags "if_t ifp" "int flags" +.Ft int +.Fn if_getflags "const if_t ifp" +.Ft int +.Fn if_getnumadomain "if_t ifp" +.Ft int +.Fn if_sendq_empty "if_t ifp" +.Ft int +.Fn if_setsendqready "if_t ifp" +.Ft int +.Fn if_setsendqlen "if_t ifp" "int tx_desc_count" +.Ft int +.Fn if_sethwtsomax "if_t ifp" "u_int if_hw_tsomax" +.Ft int +.Fn if_sethwtsomaxsegcount "if_t ifp" "u_int if_hw_tsomaxsegcount" +.Ft int +.Fn if_sethwtsomaxsegsize "if_t ifp" "u_int if_hw_tsomaxsegsize" +.Ft u_int +.Fn if_gethwtsomax "const if_t ifp" +.Ft u_int +.Fn if_gethwtsomaxsegcount "const if_t ifp" +.Ft u_int +.Fn if_gethwtsomaxsegsize "const if_t ifp" +.Ft void +.Fn if_setnetmapadapter "if_t ifp" "struct netmap_adapter *na" +.Ft struct netmap_adapter * +.Fn if_getnetmapadapter "if_t ifp" +.Ft void +.Fn if_input "if_t ifp" "struct mbuf* sendmp" +.Ft int +.Fn if_sendq_prepend "if_t ifp" "struct mbuf *m" +.Ft struct mbuf * +.Fn if_dequeue "if_t ifp" +.Ft int +.Fn if_setifheaderlen "if_t ifp" "int len" +.Ft void +.Fn if_setrcvif "struct mbuf *m" "if_t ifp" +.Ft void +.Fn if_setvtag "struct mbuf *m" "u_int16_t tag" +.Ft u_int16_t +.Fn if_getvtag "struct mbuf *m" +.Ft int +.Fn if_vlantrunkinuse "if_t ifp" +.Ft caddr_t +.Fn if_getlladdr "const if_t ifp" +.Ft struct vnet * +.Fn if_getvnet "const if_t ifp" +.Ft void * +.Fn if_gethandle "u_char" +.Ft void +.Fn if_bpfmtap "if_t ifp" "struct mbuf *m" +.Ft void +.Fn if_etherbpfmtap "if_t ifp" "struct mbuf *m" +.Ft void +.Fn if_vlancap "if_t ifp" +.Ft int +.Fn if_transmit "if_t ifp" "struct mbuf *m" +.Ft void +.Fn if_init "if_t ifp" "void *ctx" +.Ft int +.Fn if_resolvemulti "if_t ifp" "struct sockaddr **" "struct sockaddr *" +.Ft uint64_t +.Fn if_getcounter "if_t ifp" "ift_counter counter" +.Ft struct label * +.Fn if_getmaclabel "if_t ifp" +.Ft void +.Fn if_setmaclabel "if_t ifp" "struct label *label" +.Ft struct bpf_if * +.Fn if_getbpf "if_t ifp" +.Ft uint8_t +.Fn if_getpcp "if_t ifp" +.Ft void * +.Fn if_getl2com "if_t ifp" +.Ft struct ifvlantrunk * +.Fn if_getvlantrunk "if_t ifp" +.Ft bool +.Fn if_altq_is_enabled "if_t ifp" +.\" .Ss "struct ifnet Member Functions" .Ft void -.Fn \*(lp*if_input\*(rp "struct ifnet *ifp" "struct mbuf *m" +.Fn \*(lp*if_input\*(rp "if_t ifp" "struct mbuf *m" .Ft int .Fo \*(lp*if_output\*(rp -.Fa "struct ifnet *ifp" "struct mbuf *m" +.Fa "if_t ifp" "struct mbuf *m" .Fa "const struct sockaddr *dst" "struct route *ro" .Fc .Ft void -.Fn \*(lp*if_start\*(rp "struct ifnet *ifp" +.Fn \*(lp*if_start\*(rp "if_t ifp" .Ft int -.Fn \*(lp*if_transmit\*(rp "struct ifnet *ifp" "struct mbuf *m" +.Fn \*(lp*if_transmit\*(rp "if_t ifp" "struct mbuf *m" .Ft void -.Fn \*(lp*if_qflush\*(rp "struct ifnet *ifp" +.Fn \*(lp*if_qflush\*(rp "if_t ifp" .Ft int -.Fn \*(lp*if_ioctl\*(rp "struct ifnet *ifp" "u_long cmd" "caddr_t data" +.Fn \*(lp*if_ioctl\*(rp "if_t ifp" "u_long cmd" "caddr_t data" .Ft void .Fn \*(lp*if_init\*(rp "void *if_softc" .Ft int .Fo \*(lp*if_resolvemulti\*(rp -.Fa "struct ifnet *ifp" "struct sockaddr **retsa" "struct sockaddr *addr" +.Fa "if_t ifp" "struct sockaddr **retsa" "struct sockaddr *addr" .Fc .Ss "struct ifaddr member function" .Ft void @@ -198,8 +381,6 @@ address .Xr link_addr 3 ) describing the link layer implemented by the interface (if any) is accessed by the -.Fn ifaddr_byindex -function or .Va if_addr structure. (Some trivial interfaces do not provide any link layer addresses; @@ -218,232 +399,98 @@ Interfaces are also associated with an output queue, defined as a .Vt "struct ifqueue" ; this structure is used to hold packets while the interface is in the process of sending another. -.Ss The ifnet Structure -The fields of -.Vt "struct ifnet" +.Ss The ifnet accessors +The accessors for +.Vt "if_t" are as follows: -.Bl -tag -width ".Va if_capabilities" -offset indent -.It Va if_softc -.Pq Vt "void *" -A pointer to the driver's private state block. -(Initialized by driver.) -.It Va if_l2com -.Pq Vt "void *" -A pointer to the common data for the interface's layer 2 protocol. -(Initialized by -.Fn if_alloc . ) -.It Va if_vnet -.Pq Vt "struct vnet *" -A pointer to the virtual network stack instance. -(Initialized by -.Fn if_attach . ) -.It Va if_home_vnet -.Pq Vt "struct vnet *" -A pointer to the parent virtual network stack, where this -.Vt "struct ifnet" -originates from. -(Initialized by -.Fn if_attach . ) -.It Va if_link -.Pq Fn TAILQ_ENTRY ifnet -.Xr queue 3 -macro glue. -.It Va if_xname -.Pq Vt "char *" -The name of the interface, -(e.g., -.Dq Li fxp0 -or -.Dq Li lo0 ) . -(Initialized by driver -(usually via -.Fn if_initname ) . ) -.It Va if_dname -.Pq Vt "const char *" -The name of the driver. -(Initialized by driver -(usually via -.Fn if_initname ) . ) -.It Va if_dunit +.Bl -tag -width indent -offset indent +.It Fn if_getbaudrate Fn if_setbaudrate +.Pq Vt u_long +The line rate of the interface, in bits per second. +.It Fn if_setcapabilities Fn if_setcapabilitiesbit Fn if_getcapabilities +.Pq Vt int +Flags describing the capabilities the interface supports (see below). +.It Fn if_getcapenable Fn if_setcapenable Fn if_setcapenablebit Fn if_togglecapenable +.Pq Vt int +Flags describing the enabled capabilities of the interface (see below). +.It Fn if_getcapabilities2 Fn if_setcapabilities2 Fn if_setcapabilities2bit +.It Fn if_getcapenable2 Fn if_setcapenable2 Fn if_setcapenable2bit Fn if_togglecapenable2 +.It Fn if_getdunit .Pq Vt int A unique number assigned to each interface managed by a particular driver. Drivers may choose to set this to .Dv IF_DUNIT_NONE if a unit number is not associated with the device. -(Initialized by driver -(usually via -.Fn if_initname ) . ) -.It Va if_refcount -.Pq Vt u_int -The reference count. -(Initialized by -.Fn if_alloc . ) -.It Va if_addrhead -.Pq Vt "struct ifaddrhead" -The head of the -.Xr queue 3 -.Li TAILQ -containing the list of addresses assigned to this interface. -.It Va if_pcount -.Pq Vt int -A count of promiscuous listeners on this interface, used to -reference-count the -.Dv IFF_PROMISC -flag. -.It Va if_carp -.Pq Vt "struct carp_if *" -A pointer to the CARP interface structure, -.Xr carp 4 . -(Initialized by the driver-specific -.Fn if_ioctl -routine.) -.It Va if_bpf -.Pq Vt "struct bpf_if *" -Opaque per-interface data for the packet filter, -.Xr bpf 4 . -(Initialized by -.Fn bpf_attach . ) -.It Va if_index +(Initialized by driver, usually via +.Fn if_initname . ) +.It Fn if_getindex .Pq Vt u_short -A unique number assigned to each interface in sequence as it is -attached. +Return the unique number assigned to the device when attached. This number can be used in a .Vt "struct sockaddr_dl" to refer to a particular interface by index (see .Xr link_addr 3 ) . -(Initialized by -.Fn if_alloc . ) -.It Va if_vlantrunk -.Pq Vt struct ifvlantrunk * -A pointer to 802.1Q trunk structure, -.Xr vlan 4 . -(Initialized by the driver-specific -.Fn if_ioctl -routine.) -.It Va if_flags -.Pq Vt int -Flags describing operational parameters of this interface (see below). -(Manipulated by generic code.) -.It Va if_drv_flags -.Pq Vt int -Flags describing operational status of this interface (see below). -(Manipulated by driver.) -.It Va if_capabilities -.Pq Vt int -Flags describing the capabilities the interface supports (see below). -.It Va if_capenable -.Pq Vt int -Flags describing the enabled capabilities of the interface (see below). -.It Va if_linkmib -.Pq Vt "void *" -A pointer to an interface-specific MIB structure exported by -.Xr ifmib 4 . -(Initialized by driver.) -.It Va if_linkmiblen -.Pq Vt size_t -The size of said structure. -(Initialized by driver.) -.It Va if_data -.Pq Vt "struct if_data" -More statistics and information; see -.Sx "The if_data structure" , -below. -(Initialized by driver, manipulated by both driver and generic -code.) -.It Va if_multiaddrs -.Pq Vt struct ifmultihead -The head of the -.Xr queue 3 -.Li TAILQ -containing the list of multicast addresses assigned to this interface. -.It Va if_amcount -.Pq Vt int -A number of multicast requests on this interface, used to -reference-count the -.Dv IFF_ALLMULTI -flag. -.It Va if_addr -.Pq Vt "struct ifaddr *" -A pointer to the link-level interface address. -(Initialized by -.Fn if_alloc . ) -.\" .It Va if_llsoftc -.\" .Pq Vt "void *" -.\" The purpose of the field is unclear. -.It Va if_snd -.Pq Vt "struct ifaltq" -The output queue. -(Manipulated by driver.) -.It Va if_broadcastaddr -.Pq Vt "const u_int8_t *" -A link-level broadcast bytestring for protocols with variable address -length. -.It Va if_bridge -.Pq Vt "void *" -A pointer to the bridge interface structure, -.Xr if_bridge 4 . -(Initialized by the driver-specific -.Fn if_ioctl -routine.) -.It Va if_label -.Pq Vt "struct label *" -A pointer to the MAC Framework label structure, -.Xr mac 4 . -(Initialized by -.Fn if_alloc . ) -.It Va if_afdata -.Pq Vt "void *" -An address family dependent data region. -.It Va if_afdata_initialized -.Pq Vt int -Used to track the current state of address family initialization. -.It Va if_afdata_lock -.Pq Vt "struct rwlock" -An -.Xr rwlock 9 -lock used to protect -.Va if_afdata -internals. -.It Va if_linktask -.Pq Vt "struct task" -A -.Xr taskqueue 9 -task scheduled for link state change events of the interface. -.It Va if_addr_lock -.Pq Vt "struct rwlock" -An -.Xr rwlock 9 -lock used to protect interface-related address lists. -.It Va if_clones -.Pq Fn LIST_ENTRY ifnet -.Xr queue 3 -macro glue for the list of clonable network interfaces. -.It Va if_groups -.Pq Fn TAILQ_HEAD "" "ifg_list" -The head of the -.Xr queue 3 -.Li TAILQ -containing the list of groups per interface. -.It Va if_pf_kif -.Pq Vt "void *" -A pointer to the structure used for interface abstraction by -.Xr pf 4 . -.It Va if_lagg -.Pq Vt "void *" -A pointer to the -.Xr lagg 4 -interface structure. -.It Va if_alloctype -.Pq Vt u_char +This is initialized by +.Fn if_alloc . +.It Fn if_getidxgen +.It Fn if_getdname Fn if_setdname +.Pq Ft "const char *" +The name of the driver. +This is initialized by driver +(usually via +.Fn if_initname ) . +.It Fn if_name Fn if_setname +.Pq Vt "char *" +The name of the interface, +(e.g., +.Ql fxp0 +or +.Dq Li lo0 ) . +This is initialized by driver, usually via +.Fn if_initname . +.It Fn if_getalloctype +.Pq Ft u_char The type of the interface as it was at the time of its allocation. It is used to cache the type passed to .Fn if_alloc , but unlike .Va if_type , it would not be changed by drivers. -.It Va if_numa_domain +.It Fn if_gettype +.It Fn if_setdev +.It Fn if_getdrvflags Fn if_setdrvflags Fn if_setdrvflagbits +.It Fn if_getlinkstate +.It Fn if_clearhwassist Fn if_sethwassistbits +.Fn if_gethwassist Fn if_sethwassist Fn if_togglehwassist +.Pq Vt u_long +A detailed interpretation of the capabilities +to offload computational tasks for +.Em outgoing +packets. +The interface driver must keep this field in accord with +the current value of +.Va if_capenable . +.It Fn if_getsoftc Fn if_setsoftc +.Pq Ft "void *" +A pointer to the driver's private state block. +This is initialized by driver at attach. +.It Fn if_setllsoftc +.It Fn if_getllsoftc +.It Fn if_getfib +.It Fn if_getaddrlen +.It Fn if_gethwaddr +.It Fn if_getbroadcastaddr Fn if_setbroadcastaddr +Access the interface broadcast addess. +.It Fn if_setmtu +.It Fn if_getmtu +Access the interface MTU. +.It Fn if_setflags Fn if_getflags Fn if_setflagbits +.Pq Vt int +Flags describing operational parameters of this interface (see below). +These flags are manipulated by generic code. +.It Fn if_getnumadomain .Pq Vt uint8_t The NUMA domain of the hardware device associated with the interface. This is filled in with a wildcard value unless the kernel is NUMA @@ -452,6 +499,63 @@ using .Fn if_alloc_dev or .Fn if_alloc_domain . +.It Fn if_sendq_empty +.It Fn if_setsendqready +.It Fn if_setsendqlen +.It Fn if_sethwtsomax Fn if_gethwtsomax +.It Fn if_sethwtsomaxsegcount Fn if_gethwtsomaxsegcount +.It Fn if_sethwtsomaxsegsize Fn if_gethwtsomaxsegsize +.It Fn if_setnetmapadapter Fn if_getnetmapadapter +.It Fn if_setifheaderlen +.It Fn if_setrcvif +.It Fn if_setvtag Fn if_getvtag +.It Fn if_vlantrunkinuse +.It Fn if_getlladdr +.It Fn if_getvnet +.Pq Vt "struct vnet *" +A pointer to the virtual network stack instance. +This is initialized by +.Fn if_attach . +.It Fn if_gethandle +.It Fn if_vlancap +.It Fn if_getcounter +.It Fn if_getmaclabel Fn if_setmaclabel +.It Fn if_getbpf +.Pq Ft "struct bpf_if *" +Opaque per-interface data for the packet filter, +.Xr bpf 4 . +This is initialized by +.Fn bpf_attach . +.It Fn if_getpcp +.It Fn if_getl2com +A pointer to the common data for the interface's layer 2 protocol. +This is initialized by +.Fn if_alloc . +.Fn if_getvlantrunk "if_t ifp" +.Pq Ft struct ifvlantrunk * +A pointer to 802.1Q trunk structure, +.Xr vlan 4 . +This is initialized by the driver-specific +.Fn if_ioctl +routine. +.It Fn if_getdrvflags Fn if_setdrvflags Fn if_setdrvflagbits +.Pq Ft int +Flags describing operational status of this interface (see below). +These flags are manipulated by driver. +.It Fn if_addmulti Fn if_delmulti Fn if_findmulti +Add, remove, and find multicast addresses assigned to this interface. +.It Fn if_getifaddr +.Pq Vt "struct ifaddr *" +Get a pointer to the interface's link-level address. +.It Fn if_getbroadcastaddr Fn if_setbroadcastaddr +.Pq Ft "const u_int8_t *" +A link-level broadcast bytestring for protocols with variable address +length. +.It Fn if_getafdata +.Pq Ft "void *" +An address family dependent data region. +.It Fn if_addgroup Fn if_delgroup +Add and delete groups from the interface. .El .Pp References to @@ -614,6 +718,10 @@ This interface is in the permanently promiscuous mode (implies .It Dv IFF_ALLMULTI .Aq D* This interface is in all-multicasts mode (used by multicast routers). +.It Dv IFF_PALLMULTI +.Aq D +This interface is in the permanently all-multicasts mode (implies +.Dv IFF_ALLMULTI ) . .It Dv IFF_DRV_OACTIVE .Aq D* The interface's hardware output queue (if any) is full; output packets @@ -736,9 +844,9 @@ This Ethernet interface supports TCP6 Segmentation offloading. A shorthand for .Pq Dv IFCAP_TSO4 | IFCAP_TSO6 . .It Dv IFCAP_TOE4 -This Ethernet interface supports TCP offloading. +This Ethernet interface supports TCP4 Offload Engine. .It Dv IFCAP_TOE6 -This Ethernet interface supports TCP6 offloading. +This Ethernet interface supports TCP6 Offload Engine. .It Dv IFCAP_TOE A shorthand for .Pq Dv IFCAP_TOE4 | IFCAP_TOE6 . @@ -753,13 +861,6 @@ as those sent by .It Dv IFCAP_WOL A shorthand for .Pq Dv IFCAP_WOL_UCAST | IFCAP_WOL_MCAST | IFCAP_WOL_MAGIC . -.It Dv IFCAP_TOE4 -This Ethernet interface supports TCP4 Offload Engine. -.It Dv IFCAP_TOE6 -This Ethernet interface supports TCP6 Offload Engine. -.It Dv IFCAP_TOE -A shorthand for -.Pq Dv IFCAP_TOE4 | IFCAP_TOE6 . .It Dv IFCAP_VLAN_HWFILTER This interface supports frame filtering in hardware on .Xr vlan 4 @@ -900,18 +1001,6 @@ link-layer overhead. .It Va ifi_metric .Pq Vt u_long A dimensionless metric interpreted by a user-mode routing process. -.It Va ifi_baudrate -.Pq Vt u_long -The line rate of the interface, in bits per second. -.It Va ifi_hwassist -.Pq Vt u_long -A detailed interpretation of the capabilities -to offload computational tasks for -.Em outgoing -packets. -The interface driver must keep this field in accord with -the current value of -.Va if_capenable . .It Va ifi_epoch .Pq Vt time_t The system uptime when interface was attached or the statistics @@ -970,8 +1059,7 @@ Number of packets received for unknown network-layer protocol. .It Va ifi_lastchange .Pq Vt "struct timeval" The time of the last administrative change to the interface (as required -for -.Tn SNMP ) . +for SNMP ) . .El .Ss Interface Types The header file @@ -1006,7 +1094,7 @@ interface Serial Line IP .It Dv IFT_PARA Parallel-port IP -.Pq Dq Tn PLIP +.Pq Dq PLIP .It Dv IFT_ATM Asynchronous Transfer Mode .It Dv IFT_USB @@ -1071,7 +1159,7 @@ is a macro for The network mask for multi-access interfaces, and the confusion generator for point-to-point interfaces. .It Va ifa_ifp -.Pq Vt "struct ifnet *" +.Pq Vt "if_t" A link back to the interface structure. .It Va ifa_link .Pq Fn TAILQ_ENTRY ifaddr @@ -1192,9 +1280,7 @@ structure to be the first element in that list. (A pointer to this address structure is saved in the .Vt ifnet -structure and is accessed by the -.Fn ifaddr_byindex -function.) +structure.) The .Fa ifp must have been allocated by @@ -1335,7 +1421,7 @@ and appropriately. .Pp .It Dv SIOCGIFCAPNV -.Xr NV 9 +.Xr nv 9 version of the .Dv SIOCGIFCAP ioctl. @@ -1379,7 +1465,7 @@ non-modifiable capability bit in .Dv if_capabilities . .Pp .It Dv SIOCSIFCAPNV -.Xr NV 9 +.Xr nv 9 version of the .Dv SIOCSIFCAP ioctl. @@ -1511,10 +1597,6 @@ precisely .Fa addr will be returned. .Pp -.Fn ifaddr_byindex -returns the link-level address of the interface with the given index -.Fa idx . -.Pp All of these functions return a null pointer if no such address can be found. .Ss "Interface Multicast Address Functions" diff --git a/share/man/man9/inittodr.9 b/share/man/man9/inittodr.9 index 61524f206296..9fc697da14a1 100644 --- a/share/man/man9/inittodr.9 +++ b/share/man/man9/inittodr.9 @@ -29,8 +29,6 @@ .\" (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 March 22, 1997 .Dt INITTODR 9 .Os diff --git a/share/man/man9/insmntque.9 b/share/man/man9/insmntque.9 index 543c64a2bbe1..869d8767632b 100644 --- a/share/man/man9/insmntque.9 +++ b/share/man/man9/insmntque.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 29, 2022 .Dt INSMNTQUE 9 .Os diff --git a/share/man/man9/intr_event.9 b/share/man/man9/intr_event.9 new file mode 100644 index 000000000000..ba8faf877e6a --- /dev/null +++ b/share/man/man9/intr_event.9 @@ -0,0 +1,481 @@ +.\" Copyright (c) 2001 John H. Baldwin <jhb@FreeBSD.org> +.\" Copyright (c) 2006 Tom Rhodes <trhodes@FreeBSD.org> +.\" Copyright (c) 2021 Mitchell Horne <mhorne@FreeBSD.org> +.\" Copyright (c) 2022 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Mitchell Horne +.\" under sponsorship from the FreeBSD Foundation. +.\" +.\" 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. +.\" +.Dd January 24, 2025 +.Dt INTR_EVENT 9 +.Os +.Sh NAME +.Nm intr_event_add_handler , +.Nm intr_event_create , +.Nm intr_event_destroy , +.Nm intr_event_handle , +.Nm intr_event_remove_handler , +.Nm intr_priority +.Nd "kernel interrupt handler and thread API" +.Sh SYNOPSIS +.In sys/param.h +.In sys/bus.h +.In sys/interrupt.h +.Ft int +.Fo intr_event_add_handler +.Fa "struct intr_event *ie" +.Fa "const char *name" +.Fa "driver_filter_t filter" +.Fa "driver_intr_t handler" +.Fa "void *arg" +.Fa "u_char pri" +.Fa "enum intr_type flags" +.Fa "void **cookiep" +.Fc +.Ft int +.Fo intr_event_create +.Fa "struct intr_event **event" +.Fa "void *source" +.Fa "int flags" +.Fa "int irq" +.Fa "void (*pre_ithread)(void *)" +.Fa "void (*post_ithread)(void *)" +.Fa "void (*post_filter)(void *)" +.Fa "int (*assign_cpu)(void *, int)" +.Fa "const char *fmt" +.Fa "..." +.Fc +.Ft int +.Fn intr_event_destroy "struct intr_event *ie" +.Ft int +.Fn intr_event_handle "struct intr_event *ie" "struct trapframe *frame" +.Ft int +.Fn intr_event_remove_handler "void *cookie" +.Ft u_char +.Fn intr_priority "enum intr_type flags" +.Sh DESCRIPTION +The interrupt event API provides methods to manage the registration and +execution of interrupt handlers and their associated thread contexts. +.Pp +Each interrupt event in the system corresponds to a single hardware or software +interrupt source. +Each interrupt event maintains a list of interrupt handlers, sorted by +priority, which will be invoked when handling the event. +An interrupt event will typically, but not always, have an associated +.Xr kthread 9 , +known as the interrupt thread. +Finally, each event contains optional callback functions which will be +invoked before and after the handler functions themselves. +.Pp +An interrupt handler contains two distinct handler functions: +the +.Em filter +and the thread +.Em handler . +The +.Em filter +function is run from interrupt context and is intended to perform quick +handling such as acknowledging or masking a hardware interrupt, +and queueing work for the ensuing thread +.Em handler . +Both functions are optional; each interrupt handler may choose to register a +filter, a thread handler, or both. +Each interrupt handler also consists of a name, +a set of flags, +and an opaque argument which will be passed to both the +.Em filter +and +.Em handler +functions. +.Ss Handler Constraints +The +.Em filter +function is executed inside a +.Xr critical 9 +section. +Therefore, filters may not yield the CPU for any reason, and may only use spin +locks to access shared data. +Allocating memory within a filter is not permitted. +.Pp +The +.Em handler +function executes from the context of the associated interrupt kernel thread. +Sleeping is not permitted, but the interrupt thread may be preempted by higher +priority threads. +Thus, threaded handler functions may obtain non-sleepable locks, as described +in +.Xr locking 9 . +Any memory or zone allocations in an interrupt thread must specify the +.Dv M_NOWAIT +flag, and any allocation errors must be handled. +.Pp +The exception to these constraints is software interrupt threads, which are +allowed to sleep but should be allocated and scheduled using the +.Xr swi 9 +interface. +.Ss Function Descriptions +The +.Fn intr_event_create +function creates a new interrupt event. +The +.Fa event +argument points to a +.Vt struct intr_event +pointer that will reference the newly created event upon success. +The +.Fa source +argument is an opaque pointer which will be passed to the +.Fa pre_ithread , +.Fa post_ithread , +and +.Fa post_filter +callbacks. +The +.Fa flags +argument is a mask of properties of this thread. +The only valid flag currently for +.Fn intr_event_create +is +.Dv IE_SOFT +to specify that this interrupt thread is a software interrupt. +The +.Fa enable +and +.Fa disable +arguments specify optional functions used to enable and disable this +interrupt thread's interrupt source. +The +.Fa irq +argument is the unique interrupt vector number corresponding to the event. +The +.Fa pre_ithread , +.Fa post_ithread , +and +.Fa post_filter +arguments are callback functions that are invoked at different +points while handling an interrupt. +This is described in more detail in the +.Sx Handler Callbacks +section, below. +They may be +.Va NULL +to specify no callback. +The +.Fa assign_cpu +argument points to a callback function that will be invoked when binding +an interrupt to a particular CPU. +It may be +.Va NULL +if binding is unsupported. +The +remaining arguments form a +.Xr printf 9 +argument list that is used to build the base name of the new interrupt thread. +The full name of an interrupt thread is formed by concatenating the base +name of the interrupt thread with the names of all of its interrupt handlers. +.Pp +The +.Fn intr_event_destroy +function destroys a previously created interrupt event by releasing its +resources. +.\" The following is not true (yet): +.\"and arranging for the backing kernel thread to terminate. +An interrupt event can only be destroyed if it has no handlers remaining. +.Pp +The +.Fn intr_event_add_handler +function adds a new handler to an existing interrupt event specified by +.Fa ie . +The +.Fa name +argument specifies a name for this handler. +The +.Fa filter +argument provide the filter function to execute. +The +.Fa handler +argument provides the handler function to be executed from the +event's interrupt thread. +The +.Fa arg +argument will be passed to the +.Fa filter +and +.Fa handler +functions when they are invoked. +The +.Fa pri +argument specifies the priority of this handler, +corresponding to the values defined in +.In sys/priority.h . +It determines the order this handler is called relative to the other handlers +for this event, as well as the scheduling priority of the backing kernel +thread. +.Fa flags +argument can be used to specify properties of this handler as defined in +.In sys/bus.h . +If +.Fa cookiep +is not +.Dv NULL , +then it will be assigned a cookie that can be used later to remove this +handler. +.Pp +The +.Fn intr_event_handle +function is the main entry point into the interrupt handling code. +It must be called from an interrupt context. +The function will execute all filter handlers associated with the interrupt +event +.Fa ie , +and schedule the associated interrupt thread to run, if applicable. +The +.Fa frame +argument is used to pass a pointer to the +.Vt struct trapframe +containing the machine state at the time of the interrupt. +The main body of this function runs within a +.Xr critical 9 +section. +.Pp +The +.Fn intr_event_remove_handler +function removes an interrupt handler from the interrupt event specified by +.Fa ie . +The +.Fa cookie +argument, obtained from +.Fn intr_event_add_handler , +identifies the handler to remove. +.Pp +The +.Fn intr_priority +function translates the +.Dv INTR_TYPE_* +interrupt flags into interrupt thread scheduling priorities. +.Pp +The interrupt flags not related to the type of a particular interrupt +.Pq Dv INTR_TYPE_* +can be used to specify additional properties of both hardware and software +interrupt handlers. +The +.Dv INTR_EXCL +flag specifies that this handler cannot share an interrupt thread with +another handler. +The +.Dv INTR_MPSAFE +flag specifies that this handler is MP safe in that it does not need the +Giant mutex to be held while it is executed. +The +.Dv INTR_ENTROPY +flag specifies that the interrupt source this handler is tied to is a good +source of entropy, and thus that entropy should be gathered when an interrupt +from the handler's source triggers. +Presently, the +.Dv INTR_ENTROPY +flag is not valid for software interrupt handlers. +The +.Dv INTR_SLEEPABLE +flag specifies that the interrupt ithread may sleep. +Presently, the +.Dv INTR_SLEEPABLE +flag requires the +.Dv INTR_EXCL +flag to be set. +.Ss Handler Callbacks +Each +.Vt struct intr_event +is assigned three optional callback functions when it is created: +.Fa pre_ithread , +.Fa post_ithread , +and +.Fa post_filter . +These callbacks are intended to be defined by the interrupt controller driver, +to allow for actions such as masking and unmasking hardware interrupt signals. +.Pp +When an interrupt is triggered, all filters are run to determine if any +threaded interrupt handlers should be scheduled for execution by the associated +interrupt thread. If no threaded handlers are scheduled, the +.Fa post_filter +callback is invoked which should acknowledge the interrupt and permit it to +trigger in the future. +If any threaded handlers are scheduled, the +.Fa pre_ithread +callback is invoked instead. +This handler should acknowledge the interrupt, but it should also ensure that +the interrupt will not fire continuously until after the threaded handlers have +executed. +Typically this callback masks level-triggered interrupts in an interrupt +controller while leaving edge-triggered interrupts alone. +Once all threaded handlers have executed, +the +.Fa post_ithread +callback is invoked from the interrupt thread to enable future interrupts. +Typically this callback unmasks level-triggered interrupts in an interrupt +controller. +.Sh RETURN VALUES +The +.Fn intr_event_add_handler , +.Fn intr_event_create , +.Fn intr_event_destroy , +.Fn intr_event_handle , +and +.Fn intr_event_remove_handler +functions return zero on success and non-zero on failure. +The +.Fn intr_priority +function returns a process priority corresponding to the passed in interrupt +flags. +.Sh EXAMPLES +The +.Xr swi_add 9 +function demonstrates the use of +.Fn intr_event_create +and +.Fn intr_event_add_handler . +.Bd -literal -offset indent +int +swi_add(struct intr_event **eventp, const char *name, driver_intr_t handler, + void *arg, int pri, enum intr_type flags, void **cookiep) +{ + struct intr_event *ie; + int error = 0; + + if (flags & INTR_ENTROPY) + return (EINVAL); + + ie = (eventp != NULL) ? *eventp : NULL; + + if (ie != NULL) { + if (!(ie->ie_flags & IE_SOFT)) + return (EINVAL); + } else { + error = intr_event_create(&ie, NULL, IE_SOFT, 0, + NULL, NULL, NULL, swi_assign_cpu, "swi%d:", pri); + if (error) + return (error); + if (eventp != NULL) + *eventp = ie; + } + if (handler != NULL) { + error = intr_event_add_handler(ie, name, NULL, handler, arg, + PI_SWI(pri), flags, cookiep); + } + return (error); +} +.Ed +.Sh ERRORS +The +.Fn intr_event_add_handler +function will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa ie +or +.Fa name +arguments are +.Dv NULL . +.It Bq Er EINVAL +The +.Fa handler +and +.Fa filter +arguments are both +.Dv NULL . +.It Bq Er EINVAL +The +.Dv IH_EXCLUSIVE +flag is specified and the interrupt thread +.Fa ie +already has at least one handler, or the interrupt thread +.Fa ie +already has an exclusive handler. +.El +.Pp +The +.Fn intr_event_create +function will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +A flag other than +.Dv IE_SOFT +was specified in the +.Fa flags +parameter. +.El +.Pp +The +.Fn intr_event_destroy +function will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa ie +argument is +.Dv NULL . +.It Bq Er EBUSY +The interrupt event pointed to by +.Fa ie +has at least one handler which has not been removed with +.Fn intr_event_remove_handler . +.El +.Pp +The +.Fn intr_event_handle +function will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa ie +argument is +.Dv NULL . +.It Bq Er EINVAL +There are no interrupt handlers assigned to +.Fa ie . +.It Bq Er EINVAL +The interrupt was not acknowledged by any filter and has no associated thread +handler. +.El +.Pp +The +.Fn intr_event_remove_handler +function will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa cookie +argument is +.Dv NULL . +.El +.Sh SEE ALSO +.Xr critical 9 , +.Xr kthread 9 , +.Xr locking 9 , +.Xr malloc 9 , +.Xr swi 9 , +.Xr uma 9 +.Sh HISTORY +Interrupt threads and their corresponding API first appeared in +.Fx 5.0 . diff --git a/share/man/man9/intro.9 b/share/man/man9/intro.9 index 83956c0bbccf..e13566725976 100644 --- a/share/man/man9/intro.9 +++ b/share/man/man9/intro.9 @@ -1,105 +1,519 @@ -.\" Copyright (c) 1983, 1991, 1993 -.\" The Regents of the University of California. 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. -.\" 3. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. +.\" SPDX-License-Identifier: BSD-2-Clause .\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. +.\" Copyright (c) 2023 The FreeBSD Foundation .\" -.\" $FreeBSD$ +.\" This manual page was written by Mitchell Horne <mhorne@FreeBSD.org> under +.\" sponsorship from the FreeBSD Foundation. .\" -.Dd December 13, 1995 +.Dd January 30, 2024 .Dt INTRO 9 .Os .Sh NAME .Nm intro -.Nd "introduction to system kernel interfaces" +.Nd "introduction to kernel programming interfaces" .Sh DESCRIPTION -This section contains information about the interfaces and -subroutines in the kernel. -.Sh PROTOTYPES ANSI-C AND ALL THAT -Yes please. -.Pp -We would like all code to be fully prototyped. -.Pp -If your code compiles cleanly with -.Nm cc -.Ar -Wall -we would feel happy about it. -It is important to understand that this is not a question of just shutting up -.Nm cc , -it is a question about avoiding the things it complains about. -To put it bluntly, do not hide the problem by casting and other -obfuscating practices, solve the problem. -.Sh INDENTATION AND STYLE -Believe it or not, there actually exists a guide for indentation and style. -It is not generally applied though. -.Pp -We would appreciate if people would pay attention to it, and at least not -violate it blatantly. -.Pp -We do not mind it too badly if you have your own style, but please make -sure we can read it too. -.Pp -Please take time to read +Welcome to the +.Fx +kernel documentation. +Outside the source code itself, this set of +.Xr man 1 +pages is the primary resource for information on usage of the numerous +programming interfaces available within the kernel. +In some cases, it is also a source of truth for the implementation details +and/or design decisions behind a particular subsystem or piece of code. +.Pp +The intended audience of this documentation is developers, and the primary +authors are also developers. +It is written assuming a certain familiarity with common programming or +OS-level concepts and practices. +However, this documentation should also attempt to provide enough background +information that readers approaching a particular subsystem or interface for +the first time will be able to understand. +.Pp +To further set expectations, we acknowledge that kernel documentation, like the +source code itself, is forever a work-in-progress. +There will be large sections of the codebase whose documentation is subtly or +severely outdated, or missing altogether. +This documentation is a supplement to the source code, and can not always be +taken at face value. +.Pp +At its best, section 9 documentation will provide a description of a particular +piece of code that, paired with its implementation, fully informs the reader of +the intended and realized effects. +.Pp +.Xr man 1 +pages in this section most frequently describe functions, but may also +describe types, global variables, macros, or high-level concepts. +.Sh CODING GUIDELINES +Code written for the +.Fx +kernel is expected to conform to the established style and coding conventions. +Please see .Xr style 9 -for more information. -.Sh NAMING THINGS -Some general rules exist: -.Bl -enum -.It -If a function is meant as a debugging aid in DDB, it should be enclosed -in -.Bd -literal -offset indent -#ifdef DDB - -#endif /* DDB */ +for a detailed set of rules and guidelines. +.Sh OVERVIEW +Below is presented various subsystems. +.Ss Data Structures +There are implementations for many well-known data structures available in the +kernel. +.Bl -tag -width "Xr bitstring 3" +.It Xr bitstring 3 +Simple bitmap implementation. +.It Xr counter 9 +An SMP-safe general-purpose counter implementation. +.It Xr hash 9 +Hash map implementation. +.It Xr nv 9 +Name/value pairs. +.It Xr queue 3 +Singly-linked and doubly-linked lists, and queues. +.It Xr refcount 9 +An SMP-safe implementation of reference counts. +.It Xr sbuf 9 +Dynamic string composition. +.It Xr sglist 9 +A scatter/gather list implementation. +.El +.Ss Utility Functions +Functions or facilities of general usefulness or convenience. +See also the +.Sx Testing and Debugging Tools +or +.Sx Miscellaneous +sub-sections below. +.Pp +Formatted output and logging functions are described by +.Xr printf 9 . +.Pp +Endian-swapping functions: +.Xr byteorder 9 . +.Pp +Data output in hexadecimal format: +.Xr hexdump 9 . +.Pp +A rich set of macros for declaring +.Xr sysctl 8 +variables and functions is described by +.Xr sysctl 9 . +.Pp +Non-recoverable errors in the kernel should trigger a +.Xr panic 9 . +Run-time assertions can be verified using the +.Xr KASSERT 9 +macros. +Compile-time assertions should use +.Fn _Static_assert . +.Pp +The SYSINIT framework provides macros for declaring functions that will be +executed during start-up and shutdown; see +.Xr SYSINIT 9 . +.Pp +Deprecation messages may be emitted with +.Xr gone_in 9 . +.Pp +A unit number facility is provided by +.Xr unr 9 . +.Ss Synchronization Primitives +The +.Xr locking 9 +man page gives an overview of the various types of locks available in the +kernel and advice on their usage. +.Pp +Atomic primitives are described by +.Xr atomic 9 . +.Pp +The +.Xr epoch 9 +and +.Xr smr 9 +facilities are used to create lock-free data structures. +There is also +.Xr seqc 9 . +.Ss Memory Management +Dynamic memory allocations inside the kernel are generally done using +.Xr malloc 9 . +Frequently allocated objects may prefer to use +.Xr uma 9 . +.Pp +.\" MHTODO: It would be useful to have a vm_page(9) or similar +.\" high-level page which points to the following contents instead. +Much of the virtual memory system operates on +.Vt vm_page_t +structures. +The following functions are documented: +.Bd -ragged -offset indent +.Xr vm_page_advise 9 , +.Xr vm_page_alloc 9 , +.Xr vm_page_bits 9 , +.Xr vm_page_aflag 9 , +.Xr vm_page_alloc 9 , +.Xr vm_page_bits 9 , +.Xr vm_page_busy 9 , +.Xr vm_page_deactivate 9 , +.Xr vm_page_free 9 , +.Xr vm_page_grab 9 , +.Xr vm_page_insert 9 , +.Xr vm_page_lookup 9 , +.Xr vm_page_rename 9 , +.Xr vm_page_sbusy 9 , +.Xr vm_page_wire 9 +.Ed +.Pp +Virtual address space maps are managed with the +.Xr vm_map 9 +API. +.Pp +The machine-dependent portion of the virtual memory stack is the +.Xr pmap 9 +module. +.Pp +Allocation policies for NUMA memory domains are managed with the +.Xr domainset 9 +API. +.Ss File Systems +The kernel interface for file systems is +.Xr VFS 9 . +File system implementations register themselves with +.Xr vfsconf 9 . +.Pp +The +.Xr vnode 9 +is the abstract and filesystem-independent representation of a file, +directory, or other file-like entity within the kernel. +.Pp +The implementation of access control lists for filesystems is described by +.Xr acl 9 . +Also +.Xr vaccess 9 . +.Ss I/O and Storage +.\" TODO: This page needs to be rewritten before it can be included here. +.\" The buffer cache is described by: +.\" .Xr buf 9 +.\" .Pp +The GEOM framework represents I/O requests using the +.Xr bio 9 +structure. +.Pp +Disk drivers connect themselves to GEOM using the +.Xr disk 9 +API. +.Pp +The +.Xr devstat 9 +facility provides an interface for recording device statistics in disk drivers. +.Ss Networking +Much of the networking stack uses the +.Xr mbuf 9 , +a flexible memory management unit commonly used to store network packets. +.Pp +Network interfaces are implemented using the +.Xr ifnet 9 +API, which has functions for drivers and consumers. +.Pp +A framework for managing packet output queues is described by +.Xr altq 9 . +.Pp +To receive incoming packets, network protocols register themselves with +.Xr netisr 9 . +.Pp +Virtualization of the network stack is provided by +.Xr VNET 9 . +.Pp +The front-end for interfacing with network sockets from within the kernel is +described by +.Xr socket 9 . +The back-end interface for socket implementations is +.Xr domain 9 . +.Pp +The low-level packet filter interface is described by +.Xr pfil 9 . +.Pp +The +.Xr bpf 9 +interface provides a mechanism to redirect packets to userspace. +.Pp +The subsystem for IEEE 802.11 wireless networking is described by +.Xr ieee80211 9 . +.Pp +A framework for modular TCP implementations is described by +.Xr tcp_functions 9 . +.Pp +A framework for modular congestion control algorithms is described by +.Xr mod_cc 9 . +.Ss Device Drivers +.\" TODO: a bus(9) or newbus(9) page, as well as updates to existing pages +.\" would be helpful in laying out the high-level concepts of FreeBSD's device +.\" structure, and explaining the organization of existing documentation. +Consult the +.Xr device 9 +and +.Xr driver 9 +pages first. +.Pp +Most drivers act as devices, and provide a set of methods implementing the +device interface. +This includes methods such as +.Xr DEVICE_PROBE 9 , +.Xr DEVICE_ATTACH 9 , +and +.Xr DEVICE_DETACH 9 . +.Pp +In addition to devices, there are buses. +Buses may have children, in the form of devices or other buses. +Bus drivers will implement additional methods, such as +.Xr BUS_ADD_CHILD 9 , +.Xr BUS_READ_IVAR 9 , +or +.Xr BUS_RESCAN 9 . +.Pp +Buses often perform resource accounting on behalf of their children. +For this there is the +.Xr rman 9 +API. +.Pp +Drivers can request and manage their resources (e.g. memory-space or IRQ +number) from their parent using the following sets of functions: +.Bd -ragged -offset indent +.Xr bus_alloc_resource 9 , +.Xr bus_adjust_resource 9 , +.Xr bus_get_resource 9 , +.Xr bus_map_resource 9 , +.Xr bus_release_resource 9 , +.Xr bus_set_resource 9 .Ed .Pp -And the name of the procedure should start with the prefix -.Li DDB_ -to clearly identify the procedure as a debugger routine. +Direct Memory Access (DMA) is handled using the +.Xr busdma 9 +framework. +.Pp +Functions for accessing bus space (i.e. read/write) are provided by +.Xr bus_space 9 . +.Ss Clocks and Timekeeping +The kernel clock frequency and overall system time model is described by +.Xr hz 9 . +.Pp +A few global time variables, such as system up-time, are described by +.Xr time 9 . +.Pp +Raw CPU cycles are provided by +.Xr get_cyclecount 9 . +.Ss Userspace Memory Access +Direct read/write access of userspace memory from the kernel is not permitted, +and memory transactions that cross the kernel/user boundary must go through one +of several interfaces built for this task. +.Pp +Most device drivers use the +.Xr uiomove 9 +set of routines. +.Pp +Simpler primitives for reading or writing smaller chunks of memory are +described by +.Xr casuword 9 , +.Xr copy 9 , +.Xr fetch 9 , +and +.Xr store 9 . +.Ss Kernel Threads, Tasks, and Callbacks +Kernel threads and processes are created using the +.Xr kthread 9 +and +.Xr kproc 9 +interfaces, respectively. +.Pp +Where dedicated kernel threads are too heavyweight, there is also the +.Xr taskqueue 9 +interface. +.Pp +For low-latency callback handling, the +.Xr callout 9 +framework should be used. +.Pp +Dynamic handlers for pre-defined event hooks are registered and invoked using +the +.Xr EVENTHANDLER 9 +API. +.Ss Thread Switching and Scheduling +The machine-independent interface to a context switch is +.Xr mi_switch 9 . +.Pp +To prevent preemption, use a +.Xr critical 9 +section. +.Pp +To voluntarily yield the processor, use +.Xr kern_yield 9 . +.Pp +The various functions which will deliberately put a thread to sleep are +described by +.Xr sleep 9 . +Sleeping threads are removed from the scheduler and placed on a +.Xr sleepqueue 9 . +.\" TODO: This page is outdated and can't be included here yet. +.\".Pp +.\"The thread scheduler interface is described by +.\".Xr scheduler 9 . +.Ss Processes and Signals +To locate a process or process group by its identifier, use +.Xr pfind 9 +and +.Xr pgfind 9 . +Alternatively, the +.Xr pget 9 +function provides additional search specificity. +.Pp +The "hold count" of a process can be manipulated with +.Xr PHOLD 9 . +.Pp +The kernel interface for signals is described by +.Xr signal 9 . +.Pp +Signals can be sent to processes or process groups using the functions +described by +.Xr psignal 9 . +.Ss Security +See the overview in +.Xr security 7 . +.Pp +The basic structure for user credentials is +.Vt struct ucred , +managed by the +.Xr ucred 9 +API. +Thread credentials are verified using +.Xr priv 9 +to allow or deny certain privileged actions. +.Pp +Policies influenced by +.Va kern.securelevel +must use the +.Xr securelevel_gt 9 +or +.Xr securelevel_ge 9 +functions. +.Pp +The Mandatory Access Control (MAC) framework provides a wide set of hooks, +supporting dynamically-registered security modules; +see +.Xr mac 9 . +.Pp +Cryptographic services are provided by the OpenCrypto framework. +This API provides an interface for both consumers and crypto drivers; +see +.Xr crypto 9 . +.Pp +For information on random number generation, see +.Xr random 9 +and +.Xr prng 9 . +.Ss Kernel Modules +The interfaces for declaring loadable kernel modules are described by +.Xr module 9 . +.Ss Interrupts +.Xr intr_event 9 +describes the machine-independent portion of the interrupt framework +that supports registration and execution of interrupt handlers. +.Pp +Software interrupts are provided by +.Xr swi 9 . +.Pp +Device drivers register their interrupt handlers using the +.Xr bus_setup_intr 9 +function. +.Ss Testing and Debugging Tools +A kernel test framework: +.Xr kern_testfrwk 9 +.Pp +A facility for defining configurable fail points is described by +.Xr fail 9 . +.Pp +Commands for the +.Xr ddb 4 +kernel debugger are defined with the +.Xr DB_COMMAND 9 +family of macros. +.Pp +The +.Xr ktr 4 +tracing facility adds static tracepoints to many areas of the kernel. +These tracepoints are defined using the macros described by +.Xr ktr 9 . +.Pp +Static probes for DTrace are defined using the +.Xr SDT 9 +macros. +.Pp +Stack traces can be captured and printed with the +.Xr stack 9 +API. +.Pp +Kernel sanitizers can perform additional compiler-assisted checks against +memory use/access. +These runtimes are capable of detecting difficult-to-identify classes of bugs, +at the cost of a large overhead. +The Kernel Address Sanitizer +.Xr KASAN 9 +and Kernel Memory Sanitizer +.Xr KMSAN 9 +are supported. +.Pp +The +.Xr LOCK_PROFILING 9 +kernel config option enables extra code to assist with profiling and/or +debugging lock performance. +.Ss Driver Tools +Defined functions/APIs for specific types of devices. +.Bl -tag -width "Xr usbdi 9" +.It Xr iflib 9 +Programming interface for +.Xr iflib 4 +based network drivers. +.It Xr pci 9 +Peripheral Component Interconnect (PCI) and PCI Express (PCIe) programming API. +.It Xr pwmbus 9 +Pulse-Width Modulation (PWM) bus interface methods. +.It Xr usbdi 9 +Universal Serial Bus programming interface. +.It Xr superio 9 +Functions for Super I/O controller devices. .El -.Sh SCOPE OF SYMBOLS -It is important to carefully consider the scope of symbols in the kernel. -The default is to make everything static, unless some reason requires -the opposite. -.Pp -There are several reasons for this policy, -the main one is that the kernel is one monolithic name-space, -and pollution is not a good idea here either. -.Pp -For device drivers and other modules that do not add new internal interfaces -to the kernel, the entire source should be in one file if possible. -That way all symbols can be made static. -.Pp -If for some reason a module is split over multiple source files, then try -to split the module along some major fault-line and consider using the -number of global symbols as your guide. -The fewer the better. +.Ss Miscellaneous +Dynamic per-CPU variables: +.Xr dpcpu 9 . +.Pp +CPU bitmap management: +.Xr cpuset 9 . +.Pp +Kernel environment management: +.Xr getenv 9 . +.Pp +Contexts for CPU floating-point registers are managed by the +.Xr fpu_kern 9 +facility. +.Pp +For details on the shutdown/reboot procedure and available shutdown hooks, see +.Xr reboot 9 . +.Pp +A facility for asynchronous logging to files from within the kernel is provided +by +.Xr alq 9 . +.Pp +The +.Xr osd 9 +framework provides a mechanism to dynamically extend core structures in a way +that preserves KBI. +See the +.Xr hhook 9 +and +.Xr khelp 9 +APIs for information on how this is used. +.Pp +The kernel object implementation is described by +.Xr kobj 9 . .Sh SEE ALSO +.Xr man 1 , .Xr style 9 -.Sh HISTORY -The -.Nm -section manual page appeared in -.Fx 2.2 . +.Rs +.%T The FreeBSD Architecture Handbook +.%U https://docs.freebsd.org/en/books/arch-handbook/ +.Re diff --git a/share/man/man9/ithread.9 b/share/man/man9/ithread.9 deleted file mode 100644 index 2a2e44f3d6af..000000000000 --- a/share/man/man9/ithread.9 +++ /dev/null @@ -1,350 +0,0 @@ -.\" Copyright (c) 2001 John H. Baldwin <jhb@FreeBSD.org> -.\" -.\" 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 August 25, 2006 -.Dt ITHREAD 9 -.Os -.Sh NAME -.Nm ithread_add_handler , -.Nm ithread_create , -.Nm ithread_destroy , -.Nm ithread_priority , -.Nm ithread_remove_handler , -.Nm ithread_schedule -.Nd kernel interrupt threads -.Sh SYNOPSIS -.In sys/param.h -.In sys/bus.h -.In sys/interrupt.h -.Ft int -.Fo ithread_add_handler -.Fa "struct ithd *ithread" -.Fa "const char *name" -.Fa "driver_intr_t handler" -.Fa "void *arg" -.Fa "u_char pri" -.Fa "enum intr_type flags" -.Fa "void **cookiep" -.Fc -.Ft int -.Fo ithread_create -.Fa "struct ithd **ithread" -.Fa "int vector" -.Fa "int flags" -.Fa "void (*disable)(int)" -.Fa "void (*enable)(int)" -.Fa "const char *fmt" -.Fa "..." -.Fc -.Ft int -.Fn ithread_destroy "struct ithd *ithread" -.Ft u_char -.Fn ithread_priority "enum intr_type flags" -.Ft int -.Fn ithread_remove_handler "void *cookie" -.Ft int -.Fn ithread_schedule "struct ithd *ithread" "int do_switch" -.Sh DESCRIPTION -Interrupt threads are kernel threads that run a list of handlers when -triggered by either a hardware or software interrupt. -Each interrupt handler has a name, handler function, handler argument, -priority, and various flags. -Each interrupt thread maintains a list of handlers sorted by priority. -This results in higher priority handlers being executed prior to lower -priority handlers. -Each thread assumes the priority of its highest priority handler for its -process priority, or -.Dv PRIO_MAX -if it has no handlers. -Interrupt threads are also associated with a single interrupt source, -represented as a vector number. -.Pp -The -.Fn ithread_create -function creates a new interrupt thread. -The -.Fa ithread -argument points to an -.Vt struct ithd -pointer that will point to the newly created thread upon success. -The -.Fa vector -argument specifies the interrupt source to associate this thread with. -The -.Fa flags -argument is a mask of properties of this thread. -The only valid flag currently for -.Fn ithread_create -is -.Dv IT_SOFT -to specify that this interrupt thread is a software interrupt. -The -.Fa enable -and -.Fa disable -arguments specify optional functions used to enable and disable this -interrupt thread's interrupt source. -The functions receive the vector corresponding to the thread's interrupt -source as their only argument. -The remaining arguments form a -.Xr printf 9 -argument list that is used to build the base name of the new ithread. -The full name of an interrupt thread is formed by concatenating the base -name of an interrupt thread with the names of all of its interrupt handlers. -.Pp -The -.Fn ithread_destroy -function destroys a previously created interrupt thread by releasing its -resources and arranging for the backing kernel thread to terminate. -An interrupt thread can only be destroyed if it has no handlers remaining. -.Pp -The -.Fn ithread_add_handler -function adds a new handler to an existing interrupt thread specified by -.Fa ithread . -The -.Fa name -argument specifies a name for this handler. -The -.Fa handler -and -.Fa arg -arguments provide the function to execute for this handler and an argument -to pass to it. -The -.Fa pri -argument specifies the priority of this handler and is used both in sorting -it in relation to the other handlers for this thread and to specify the -priority of the backing kernel thread. -The -.Fa flags -argument can be used to specify properties of this handler as defined in -.In sys/bus.h . -If -.Fa cookiep -is not -.Dv NULL , -then it will be assigned a cookie that can be used later to remove this -handler. -.Pp -The -.Fn ithread_remove_handler -removes a handler from an interrupt thread. -The -.Fa cookie -argument specifies the handler to remove from its thread. -.Pp -The -.Fn ithread_schedule -function schedules an interrupt thread to run. -If the -.Fa do_switch -argument is non-zero and the interrupt thread is idle, then a context switch -will be forced after putting the interrupt thread on the run queue. -.Pp -The -.Fn ithread_priority -function translates the -.Dv INTR_TYPE_* -interrupt flags into interrupt handler priorities. -.Pp -The interrupt flags not related to the type of a particular interrupt -.Pq Dv INTR_TYPE_* -can be used to specify additional properties of both hardware and software -interrupt handlers. -The -.Dv INTR_EXCL -flag specifies that this handler cannot share an interrupt thread with -another handler. -The -.Dv INTR_MPSAFE -flag specifies that this handler is MP safe in that it does not need the -Giant mutex to be held while it is executed. -The -.Dv INTR_ENTROPY -flag specifies that the interrupt source this handler is tied to is a good -source of entropy, and thus that entropy should be gathered when an interrupt -from the handler's source triggers. -Presently, the -.Dv INTR_ENTROPY -flag is not valid for software interrupt handlers. -.Pp -It is not permitted to sleep in an interrupt thread; hence, any memory -or zone allocations in an interrupt thread should be specified with the -.Dv M_NOWAIT -flag set. -Any allocation errors must be handled thereafter. -.Sh RETURN VALUES -The -.Fn ithread_add_handler , -.Fn ithread_create , -.Fn ithread_destroy , -.Fn ithread_remove_handler , -and -.Fn ithread_schedule -functions return zero on success and non-zero on failure. -The -.Fn ithread_priority -function returns a process priority corresponding to the passed in interrupt -flags. -.Sh EXAMPLES -The -.Fn swi_add -function demonstrates the use of -.Fn ithread_create -and -.Fn ithread_add_handler . -.Bd -literal -offset indent -int -swi_add(struct ithd **ithdp, const char *name, driver_intr_t handler, - void *arg, int pri, enum intr_type flags, void **cookiep) -{ - struct proc *p; - struct ithd *ithd; - int error; - - if (flags & INTR_ENTROPY) - return (EINVAL); - - ithd = (ithdp != NULL) ? *ithdp : NULL; - - if (ithd != NULL) { - if ((ithd->it_flags & IT_SOFT) == 0) - return(EINVAL); - } else { - error = ithread_create(&ithd, pri, IT_SOFT, NULL, NULL, - "swi%d:", pri); - if (error) - return (error); - - if (ithdp != NULL) - *ithdp = ithd; - } - return (ithread_add_handler(ithd, name, handler, arg, pri + PI_SOFT, - flags, cookiep)); -} -.Ed -.Sh ERRORS -The -.Fn ithread_add_handler -function will fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -Any of the -.Fa ithread , -.Fa handler , -or -.Fa name -arguments are -.Dv NULL . -.It Bq Er EINVAL -The -.Dv INTR_EXCL -flag is specified and the interrupt thread -.Fa ithread -already has at least one handler, or the interrupt thread -.Fa ithread -already has an exclusive handler. -.It Bq Er ENOMEM -Could not allocate needed memory for this handler. -.El -.Pp -The -.Fn ithread_create -function will fail if: -.Bl -tag -width Er -.It Bq Er EAGAIN -The system-imposed limit on the total -number of processes under execution would be exceeded. -The limit is given by the -.Xr sysctl 3 -MIB variable -.Dv KERN_MAXPROC . -.It Bq Er EINVAL -A flag other than -.Dv IT_SOFT -was specified in the -.Fa flags -parameter. -.It Bq Er ENOMEM -Could not allocate needed memory for this interrupt thread. -.El -.Pp -The -.Fn ithread_destroy -function will fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The -.Fa ithread -argument is -.Dv NULL . -.It Bq Er EINVAL -The interrupt thread pointed to by -.Fa ithread -has at least one handler. -.El -.Pp -The -.Fn ithread_remove_handler -function will fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The -.Fa cookie -argument is -.Dv NULL . -.El -.Pp -The -.Fn ithread_schedule -function will fail if: -.Bl -tag -width Er -.It Bq Er EINVAL -The -.Fa ithread -argument is -.Dv NULL . -.It Bq Er EINVAL -The interrupt thread pointed to by -.Fa ithread -has no interrupt handlers. -.El -.Sh SEE ALSO -.Xr kthread 9 , -.Xr malloc 9 , -.Xr swi 9 , -.Xr uma 9 -.Sh HISTORY -Interrupt threads and their corresponding API first appeared in -.Fx 5.0 . -.Sh BUGS -Currently -.Vt struct ithd -represents both an interrupt source and an interrupt thread. -There should be a separate -.Vt struct isrc -that contains a vector number, enable and disable functions, etc.\& that -an ithread holds a reference to. diff --git a/share/man/man9/kasan.9 b/share/man/man9/kasan.9 index 051c3ee0dbbb..77d7e8f46aa8 100644 --- a/share/man/man9/kasan.9 +++ b/share/man/man9/kasan.9 @@ -25,9 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 29, 2021 +.Dd October 13, 2023 .Dt KASAN 9 .Os .Sh NAME @@ -52,7 +50,7 @@ kernel configuration file: .Nm is a subsystem which leverages compiler instrumentation to detect invalid memory accesses in the kernel. -Currently it is implemented only on the amd64 platform. +Currently it is implemented on the amd64 and arm64 platforms. .Pp When .Nm @@ -92,6 +90,12 @@ sysctl/tunable. .Pp The .Nm +runtime in a KASAN-configured kernel can be disabled by +setting the loader tunable +.Sy debug.kasan.disable=1 . +.Pp +The +.Nm runtime works by maintaining a shadow map for the kernel map. There exists a linear mapping between addresses in the kernel map and addresses in the shadow map. @@ -159,7 +163,7 @@ should be 0. was ported from .Nx and first appeared in -.Fx 14.0 . +.Fx 13.1 . .Sh BUGS Accesses to kernel memory outside of the kernel map are ignored by the .Nm @@ -168,7 +172,7 @@ When .Nm is configured, the kernel memory allocators are configured to use the kernel map, but some uses of the direct map remain. -For example, on amd64, accesses to page table pages are not tracked. +For example, on amd64 and arm64, accesses to page table pages are not tracked. .Pp Some kernel memory allocators explicitly permit accesses after an object has been freed. diff --git a/share/man/man9/kern_reboot.9 b/share/man/man9/kern_reboot.9 index fe8ccd7390c3..5ab17b892ef4 100644 --- a/share/man/man9/kern_reboot.9 +++ b/share/man/man9/kern_reboot.9 @@ -1,11 +1,18 @@ .\" $NetBSD: boot.9,v 1.2 1996/09/24 07:01:26 ghudson Exp $ .\" +.\" SPDX-License-Identifier: BSD-4-Clause +.\" .\" Copyright (c) 1997 .\" Mike Pritchard. All rights reserved. .\" .\" Copyright (c) 1994 Christopher G. Demetriou .\" All rights reserved. .\" +.\" Copyright (c) 2021,2023 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Mitchell Horne +.\" under sponsorship from the FreeBSD Foundation. +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -18,7 +25,7 @@ .\" must display the following acknowledgement: .\" This product includes software developed by Christopher G. Demetriou .\" for the NetBSD Project. -.\" 3. The name of the author may not be used to endorse or promote products +.\" 4. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR @@ -32,20 +39,22 @@ .\" (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 23, 2021 -.Dt KERN_REBOOT 9 +.Dd November 23, 2023 +.Dt REBOOT 9 .Os .Sh NAME -.Nm kern_reboot -.Nd halt or reboot the system +.Nm kern_reboot , +.Nm shutdown_nice +.Nd reboot, halt, or power off the system .Sh SYNOPSIS .In sys/types.h .In sys/systm.h .In sys/reboot.h +.Vt extern int rebooting; .Ft void .Fn kern_reboot "int howto" +.Ft void +.Fn shutdown_nice "int howto" .In sys/eventhandler.h .Fn EVENTHANDLER_REGISTER "shutdown_pre_sync" "shutdown_fn" "private" "priority" .Fn EVENTHANDLER_REGISTER "shutdown_post_sync" "shutdown_fn" "private" "priority" @@ -53,58 +62,232 @@ .Sh DESCRIPTION The .Fn kern_reboot -function handles final system shutdown, and either halts or reboots -the system. +function handles final system shutdown, and either halts, reboots, +or powers down the system. The exact action to be taken is determined by the flags passed in +.Fa howto . +.Pp +The relevant flags are: +.Bl -tag -compact -offset indent -width "RB_POWERCYCLE" +.It Dv RB_HALT +Halt the system in-place rather than restarting. +.It Dv RB_POWEROFF +Power down the system rather than restarting. +.It Dv RB_POWERCYCLE +Request a power-cycle in addition to restarting. +.It Dv RB_NOSYNC +Do not sync filesystems during shutdown. +.It Dv RB_DUMP +Dump kernel memory during shutdown. +.El +.Pp +The .Fa howto -and by whether or not the system has finished autoconfiguration. +field, and its full list of flags are described in additional detail by +.Xr reboot 2 . .Pp -If the system has finished autoconfiguration, .Fn kern_reboot -does the following: +performs the following actions: .Bl -enum -offset indent .It -If this is the first invocation of -.Fn kern_reboot -and the +Set the +.Va rebooting +variable to +.Dv 1 , +indicating that the reboot process has begun and cannot be stopped. +.It +Unless the .Dv RB_NOSYNC -flag is not set in +flag is set in .Fa howto , -syncs and unmounts the system disks by calling +sync and unmount the system's disks by calling .Xr vfs_unmountall 9 . .It -Disables interrupts. -.It -If rebooting after a crash (i.e., if +If rebooting after a panic +.Po .Dv RB_DUMP is set in .Fa howto , but .Dv RB_HALT -is not), saves a system crash dump. +is not set +.Pc , +initiate a system crash dump via +.Fn doadump . .It -Runs any shutdown hooks previously registered. +Print a message indicating that the system is about to be halted +or rebooted, and a report of the total system uptime. .It -Prints a message indicating that the system is about to be halted -or rebooted. +Execute all registered shutdown hooks. +See +.Sx SHUTDOWN HOOKS +below. .It -If -.Dv RB_HALT -is set in -.Fa howto , -halts the system. -Otherwise, reboots the system. +As a last resort, if none of the shutdown hooks handled the reboot, call the +machine-dependent +.Fn cpu_reset +function. +In the unlikely case that this is not supported, +.Fn kern_reboot +will loop forever at the end of the function. +This requires a manual reset of the system. .El .Pp -If the system has not finished autoconfiguration, .Fn kern_reboot -runs any shutdown hooks previously registered, -prints a message, and halts the system. +may be called from a typical kernel execution context, when the system is +running normally. +It may also be called as the final step of a kernel panic, or from the kernel +debugger. +Therefore, the code in this function is subject to restrictions described by +the +.Sx EXECUTION CONTEXT +section of the +.Xr panic 9 +man page. +.Pp +The +.Fn shutdown_nice +function is the intended path for performing a clean reboot or shutdown when +the system is operating under normal conditions. +Calling this function will send a signal to the +.Xr init 8 +process, instructing it to perform a shutdown. +When +.Xr init 8 +has cleanly terminated its children, it will perform the +.Xr reboot 2 +system call, which in turn calls +.Fn kern_reboot . +.Pp +If +.Fn shutdown_nice +is called before the +.Xr init 8 +process has been spawned, or if the system has panicked or otherwise halted, +.Fn kern_reboot +will be called directly. +.Sh SHUTDOWN HOOKS +The system defines three separate +.Xr EVENTHANDLER 9 +events, which are invoked successively during the shutdown procedure. +These are +.Va shutdown_pre_sync , +.Va shutdown_post_sync , +and +.Va shutdown_final . +They will be executed unconditionally in the listed order. +Handler functions registered to any of these events will receive the value of +.Fa howto +as their second argument, which may be used to decide what action to take. +.Pp +The +.Va shutdown_pre_sync +event is invoked before syncing filesystems to disk. +It enables any action or state transition that must happen before this point to +take place. +.Pp +The +.Va shutdown_post_sync +event is invoked at the point immediately after the filesystem sync has +finished. +It enables, for example, disk drivers to complete the sync by flushing their +cache to disk. +Note that this event still takes place before the optional kernel core dump. +.Pp +The +.Va shutdown_final +event is invoked as the very last step of +.Fn kern_reboot . +Drivers and subsystems such as +.Xr acpi 4 +can register handlers to this event that will perform the actual reboot, +power-off, or halt. +.Pp +Notably, the +.Va shutdown_final +event is also the point at which all kernel modules will have their shutdown +.Po +.Dv MOD_SHUTDOWN +.Pc +hooks executed, and when the +.Xr DEVICE_SHUTDOWN 9 +method will be executed recursively on all devices. +.Pp +All event handlers, like +.Fn kern_reboot +itself, may be run in either normal shutdown context or a kernel panic or +debugger context. +Handler functions are expected to take care not to trigger recursive panics. .Sh RETURN VALUES The .Fn kern_reboot function does not return. +.Pp +The +.Fn shutdown_nice +function will usually return to its caller, having initiated the asynchronous +system shutdown. +It will not return when called from a panic or debugger context, or during +early boot. +.Sh EXAMPLES +A hypothetical driver, foo(4), defines a +.Va shutdown_final +event handler that can handle system power-off by writing to a device register, +but it does not handle halt or reset. +.Bd -literal -offset indent +void +foo_poweroff_handler(struct void *arg, int howto) +{ + struct foo_softc *sc = arg; + uint32_t reg; + + if ((howto & RB_POWEROFF) != 0) { + reg = FOO_POWEROFF; + WRITE4(sc, FOO_POWEROFF_REG, reg); + } +} +.Ed +.Pp +The handler is then registered in the device attach routine: +.Bd -literal -offset indent +int +foo_attach(device_t dev) +{ + struct foo_softc *sc; + + ... + + /* Pass the device's software context as the private arg. */ + EVENTHANDLER_REGISTER(shutdown_final, foo_poweroff_handler, sc, + SHUTDOWN_PRI_DEFAULT); + + ... +} +.Ed +.Pp +This +.Va shutdown_final +handler uses the +.Dv RB_NOSYNC +flag to detect that a panic or other unusual condition has occurred, and +returns early: +.Bd -literal -offset indent +void +bar_shutdown_final(struct void *arg, int howto) +{ + + if ((howto & RB_NOSYNC) != 0) + return; + + /* Some code that is not panic-safe. */ + ... +} +.Ed .Sh SEE ALSO .Xr reboot 2 , +.Xr init 8 , +.Xr DEVICE_SHUTDOWN 9 , .Xr EVENTHANDLER 9 , +.Xr module 9 , +.Xr panic 9 , .Xr vfs_unmountall 9 diff --git a/share/man/man9/kern_testfrwk.9 b/share/man/man9/kern_testfrwk.9 index fd893dc54537..0ae694da75f6 100644 --- a/share/man/man9/kern_testfrwk.9 +++ b/share/man/man9/kern_testfrwk.9 @@ -21,8 +21,6 @@ .\" (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 November 12, 2015 .Dt KERN_TESTFRWK 9 .Os diff --git a/share/man/man9/kern_yield.9 b/share/man/man9/kern_yield.9 new file mode 100644 index 000000000000..ba8d64a66b1f --- /dev/null +++ b/share/man/man9/kern_yield.9 @@ -0,0 +1,134 @@ +.\" +.\" Copyright (c) 2023 The FreeBSD Foundation +.\" +.\" This documentation was written by Mitchell Horne <mhorne@FreeBSD.org> under +.\" sponsorship from the FreeBSD Foundation. +.\" +.\" 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. +.\" +.Dd January 30, 2023 +.Dt KERN_YIELD 9 +.Os +.Sh NAME +.Nm kern_yield , +.Nm maybe_yield , +.Nm should_yield +.Nd "functions for yielding execution of the current thread" +.Sh SYNOPSIS +.Ft void +.Fn kern_yield "int prio" +.Ft void +.Fn maybe_yield +.Ft bool +.Fn should_yield +.Sh DESCRIPTION +The +.Fn kern_yield +function causes the currently running thread to voluntarily, but +unconditionally, surrender its execution to the scheduler. +The +.Va prio +argument specifies the scheduling priority to be assigned before the context +switch, which has an influence on when execution will resume. +Note that the requested priority will take effect until the thread returns to +usermode, after which its base user priority will be restored. +Valid values for +.Va prio +are any of the +.Dv PRI_* +values defined in +.In sys/priority.h , +as well as the following special values: +.Bl -tag -width "PRI_UNCHANGED" +.It Dv PRI_USER +Schedule the thread with its base user priority; the value corresponding to +.Xr setpriority 2 / +.Xr nice 3 . +.It Dv PRI_UNCHANGED +Yield the thread without changing its priority. +.El +.Pp +The +.Fn should_yield +function checks if sufficient time has passed since the thread's last voluntary +context switch that yielding would be a useful service to other threads. +It returns +.Va true +when this is the case. +See +.Sx USAGE NOTES +for an elaboration of what this means. +.Pp +The +.Fn maybe_yield +function is a helper function for the common task of optionally yielding the +processor. +Internally, +.Fn kern_yield "PRI_USER" +will be called if +.Fn should_yield +returns +.Va true . +.Sh USAGE NOTES +Although the kernel supports preemption, this is usually reserved for +high-priority realtime or interrupt threads. +Kernel worker threads and timesharing threads are not guaranteed to preempt +each another. +Thus, threads executing in the kernel are expected to behave cooperatively +with respect to other threads in the system. +The yield functions are mostly intended to be used by threads which perform a +lot of work inside the kernel. +For example: +.Fn maybe_yield +is called by the +.Dv vlnru +process each time it reclaims a vnode. +.Pp +The scheduler aims to identify threads which monopolize the CPU, and will +schedule them with decreased priority. +Threads which regularly yield the processor will be given the chance to run +more often. +The possibly surprising effect of this is that, depending on the disposition of +other threads on the CPU's runqueue, a call to +.Fn kern_yield +does not guarantee that the yielding thread will be taken off the CPU. +.Pp +With the above considerations in mind, it is advised that code written using +.Fn kern_yield +be measured to confirm that its use has a positive effect on relevant +performance or responsiveness metrics. +Switching thread contexts has a non-zero cost, and thus yielding the processor +too eagerly could have a negative impact on performance. +.Pp +Additionally, since yielding is a cooperative action, it is advised that the +yielding thread release any locks that it may be holding, when possible. +Otherwise, threads which have been given the chance to run could end up waiting +on the yielding thread to release the lock, largely defeating the purpose of +the yield. +.Sh SEE ALSO +.Xr setpriority 2 , +.Xr nice 3 , +.Xr mi_switch 9 +.Sh AUTHORS +.An -nosplit +This manual page was written by +.An Mitchell Horne Aq Mt mhorne@FreeBSD.org . diff --git a/share/man/man9/kernacc.9 b/share/man/man9/kernacc.9 index f6d60dcf6463..9e48b01fe991 100644 --- a/share/man/man9/kernacc.9 +++ b/share/man/man9/kernacc.9 @@ -27,8 +27,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 16, 1996 .Dt KERNACC 9 .Os diff --git a/share/man/man9/kernel_mount.9 b/share/man/man9/kernel_mount.9 index 7a11007c288b..1f3ed02e1b65 100644 --- a/share/man/man9/kernel_mount.9 +++ b/share/man/man9/kernel_mount.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 20, 2021 .Dt KERNEL_MOUNT 9 .Os diff --git a/share/man/man9/khelp.9 b/share/man/man9/khelp.9 index 64e5232acba4..d619f385d513 100644 --- a/share/man/man9/khelp.9 +++ b/share/man/man9/khelp.9 @@ -27,9 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd February 15, 2011 +.Dd October 1, 2024 .Dt KHELP 9 .Os .Sh NAME @@ -50,8 +48,8 @@ .Fn "int khelp_destroy_osd" "struct osd *hosd" .Fn "int32_t khelp_get_id" "char *hname" .Fn "void * khelp_get_osd" "struct osd *hosd" "int32_t id" -.Fn "int khelp_add_hhook" "struct hookinfo *hki" "uint32_t flags" -.Fn "int khelp_remove_hhook" "struct hookinfo *hki" +.Fn "int khelp_add_hhook" "const struct hookinfo *hki" "uint32_t flags" +.Fn "int khelp_remove_hhook" "const struct hookinfo *hki" .Fn KHELP_DECLARE_MOD "hname" "hdata" "hhooks" "version" .Fn KHELP_DECLARE_MOD_UMA "hname" "hdata" "hhooks" "version" "ctor" "dtor" .Sh DESCRIPTION diff --git a/share/man/man9/kmsan.9 b/share/man/man9/kmsan.9 index a80ef7112451..d9d279e12140 100644 --- a/share/man/man9/kmsan.9 +++ b/share/man/man9/kmsan.9 @@ -25,9 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd August 10, 2021 +.Dd January 11, 2024 .Dt KMSAN 9 .Os .Sh NAME @@ -58,11 +56,13 @@ kernel configuration file: .Fn kmsan_check_ccb "const union ccb *" "const char *descr" .Ft void .Fn kmsan_check_mbuf "const struct mbuf *" "const char *descr" +.Ft void +.Fn kmsan_check_uio "const struct uio *" "const char *descr" .Sh DESCRIPTION .Nm is a subsystem which leverages compiler instrumentation to detect uses of uninitialized memory in the kernel. -Currently it is implemented only on the amd64 platform. +Currently it is implemented only on the amd64 and arm64 platforms. .Pp When .Nm @@ -110,6 +110,10 @@ should be used only for kernel testing and development. It is not recommended to enable .Nm in systems with less than 8GB of physical RAM. +.Pp +The sanitizer in a KMSAN-configured kernel can be disabled by setting the loader +tunable +.Sy debug.kmsan.disable=1 . .Sh FUNCTIONS The .Fn kmsan_mark @@ -304,6 +308,7 @@ f(size_t osz) .Xr busdma 9 , .Xr copyout 9 , .Xr KASAN 9 , +.Xr uio 9 , .Xr uma 9 .Rs .%A Evgeniy Stepanov diff --git a/share/man/man9/kobj.9 b/share/man/man9/kobj.9 index 0e1745e6bd6b..caa933da5586 100644 --- a/share/man/man9/kobj.9 +++ b/share/man/man9/kobj.9 @@ -26,8 +26,6 @@ .\" (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 November 14, 2011 .Dt KOBJ 9 .Os diff --git a/share/man/man9/kproc.9 b/share/man/man9/kproc.9 index 613ac31bc157..14ee056cb710 100644 --- a/share/man/man9/kproc.9 +++ b/share/man/man9/kproc.9 @@ -23,8 +23,6 @@ .\" (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 October 19, 2007 .Dt KPROC 9 .Os diff --git a/share/man/man9/kqueue.9 b/share/man/man9/kqueue.9 index 53f55b8efe03..8214d7c01673 100644 --- a/share/man/man9/kqueue.9 +++ b/share/man/man9/kqueue.9 @@ -22,17 +22,15 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd October 12, 2021 +.Dd December 18, 2023 .Dt KQUEUE 9 .Os .Sh NAME .Nm kqueue_add_filteropts , kqueue_del_filteropts , .Nm kqfd_register , .Nm knote_fdclose , -.Nm knlist_init , knlist_init_mtx , knlist_init_rw_reader , -.Nm knlist_add , knlist_remove , knlist_remove_inevent , knlist_empty , +.Nm knlist_init , knlist_init_mtx , +.Nm knlist_add , knlist_remove , knlist_empty , .Nm knlist_clear , knlist_delete , knlist_destroy , .Nm KNOTE_LOCKED , KNOTE_UNLOCKED .Nd "event delivery subsystem" @@ -57,13 +55,9 @@ .Ft void .Fn knlist_init_mtx "struct knlist *knl" "struct mtx *lock" .Ft void -.Fn knlist_init_rw_reader "struct knlist *knl" "struct rwlock *lock" -.Ft void .Fn knlist_add "struct knlist *knl" "struct knote *kn" "int islocked" .Ft void .Fn knlist_remove "struct knlist *knl" "struct knote *kn" "int islocked" -.Ft void -.Fn knlist_remove_inevent "struct knlist *knl" "struct knote *kn" .Ft int .Fn knlist_empty "struct knlist *knl" .Ft void @@ -161,8 +155,7 @@ function will be called to detach the if the .Vt knote has not already been detached by a call to -.Fn knlist_remove , -.Fn knlist_remove_inevent +.Fn knlist_remove or .Fn knlist_delete . The list @@ -190,16 +183,6 @@ The .Va kn_data value should be updated as necessary to reflect the current value, such as number of bytes available for reading, or buffer space available for writing. -If the note needs to be removed, -.Fn knlist_remove_inevent -must be called. -The function -.Fn knlist_remove_inevent -will remove the note from the list, the -.Va f_detach -function will not be called and the -.Vt knote -will not be returned as an event. .Pp Locks .Em must not @@ -260,10 +243,9 @@ is not required, but is commonly used. If used, the .Vt knlist must be initialized with either -.Fn knlist_init , -.Fn knlist_init_mtx +.Fn knlist_init or -.Fn knlist_init_rw_reader . +.Fn knlist_init_mtx . The .Vt knlist structure may be embedded into the object structure. @@ -308,19 +290,6 @@ style lock. .Pp The function -.Fn knlist_init_rw_reader -may be used to initialize a -.Vt knlist -when -.Fa lock -is a -.Xr rwlock 9 -read lock. -Lock is acquired via -.Fn rw_rlock -function. -.Pp -The function .Fn knlist_empty returns true when there are no .Vt knotes @@ -351,16 +320,6 @@ The function will be called when the .Vt knote is deleted during the next scan. -This function must not be used when -.Va f_isfd -is set in -.Vt "struct filterops" , -as the -.Fa td -argument of -.Fn fdrop -will be -.Dv NULL . .Pp The function .Fn knlist_delete diff --git a/share/man/man9/bus_generic_attach.9 b/share/man/man9/kstack_contains.9 index 468237767541..9e0c22bf43f1 100644 --- a/share/man/man9/bus_generic_attach.9 +++ b/share/man/man9/kstack_contains.9 @@ -1,10 +1,6 @@ -.\" -*- nroff -*- +.\" SPDX-License-Identifier: BSD-2-Clause .\" -.\" Copyright (c) 1998 Doug Rabson -.\" -.\" All rights reserved. -.\" -.\" This program is free software. +.\" Copyright (c) 2023 Joseph Koshy <jkoshy@FreeBSD.org> .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -26,33 +22,39 @@ .\" (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 15, 2017 -.Dt BUS_GENERIC_ATTACH 9 +.Dd May 2, 2023 +.Dt KSTACK_CONTAINS 9 .Os .Sh NAME -.Nm bus_generic_attach -.Nd generic implementation of -.Dv DEVICE_ATTACH -for buses +.Nm kstack_contains +.Nd determine if an address range lies within the kernel stack for a thread .Sh SYNOPSIS -.In sys/param.h -.In sys/bus.h -.Ft int -.Fn bus_generic_attach "device_t dev" +.In machine/stack.h +.Ft bool +.Fn kstack_contains "struct thread *td" "vm_offset_t va" "size_t len" .Sh DESCRIPTION -This function provides an implementation of the -.Xr DEVICE_ATTACH 9 -method which can be used by most bus code. -It simply calls -.Xr device_probe_and_attach 9 -for each child device attached to the bus. +This function can be used to determine whether a given address range +falls within the kernel stack for the thread pointed to by +.Fa td . .Sh RETURN VALUES -Zero is returned on success, otherwise an appropriate error is returned. +The function +.Fn kstack_contains +returns +.Dv true +if the range of addresses +.Bo +.Fa va Ns .. Ns ( +.Fa va Ns + Ns +.Fa len Ns - Ns 1 ) +.Bc +(both addresses inclusive) lies within the kernel stack for the thread +pointed to by argument +.Fa td , +or returns +.Dv false +otherwise. +.Sh ERRORS +This function does not return an error. .Sh SEE ALSO -.Xr device 9 , -.Xr driver 9 -.Sh AUTHORS -This manual page was written by -.An Doug Rabson . +.Xr kproc 9 , +.Xr kthread 9 diff --git a/share/man/man9/kthread.9 b/share/man/man9/kthread.9 index b7c0388bf8b2..266faa038322 100644 --- a/share/man/man9/kthread.9 +++ b/share/man/man9/kthread.9 @@ -23,8 +23,6 @@ .\" (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 July 15, 2014 .Dt KTHREAD 9 .Os diff --git a/share/man/man9/ktr.9 b/share/man/man9/ktr.9 index cfe9cacf8611..6910fcd54add 100644 --- a/share/man/man9/ktr.9 +++ b/share/man/man9/ktr.9 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 12, 2022 .Dt KTR 9 .Os @@ -61,7 +59,7 @@ style fashion. These events can then be dumped with .Xr ddb 4 , -.Xr gdb 1 +.Xr gdb 1 Pq Pa ports/devel/gdb or .Xr ktrdump 8 . .Pp diff --git a/share/man/man9/lock.9 b/share/man/man9/lock.9 index ef2380ae3f31..9cff6e3bd8aa 100644 --- a/share/man/man9/lock.9 +++ b/share/man/man9/lock.9 @@ -24,9 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd November 17, 2017 +.Dd June 21, 2024 .Dt LOCK 9 .Os .Sh NAME @@ -36,9 +34,14 @@ .Nm lockmgr_args , .Nm lockmgr_args_rw , .Nm lockmgr_disown , +.Nm lockmgr_disowned , +.Nm lockmgr_lock_flags , .Nm lockmgr_printinfo , .Nm lockmgr_recursed , .Nm lockmgr_rw , +.Nm lockmgr_slock , +.Nm lockmgr_unlock , +.Nm lockmgr_xlock , .Nm lockstatus , .Nm lockmgr_assert .Nd "lockmgr family of functions" @@ -58,6 +61,10 @@ .Fn lockmgr_args_rw "struct lock *lkp" "u_int flags" "struct rwlock *ilk" "const char *wmesg" "int prio" "int timo" .Ft void .Fn lockmgr_disown "struct lock *lkp" +.Ft int +.Fn lockmgr_disowned "const struct lock *lkp" +.Ft int +.Fn lockmgr_lock_flags "struct lock *lkp" "u_int flags" "struct lock_object *ilk" "const char *file" "int line" .Ft void .Fn lockmgr_printinfo "const struct lock *lkp" .Ft int @@ -65,6 +72,12 @@ .Ft int .Fn lockmgr_rw "struct lock *lkp" "u_int flags" "struct rwlock *ilk" .Ft int +.Fn lockmgr_slock "struct lock *lkp" "u_int flags" "const char *file" "int line" +.Ft int +.Fn lockmgr_unlock "struct lock *lkp" +.Ft int +.Fn lockmgr_xlock "struct lock *lkp" "u_int flags" "const char *file" "int line" +.Ft int .Fn lockstatus "const struct lock *lkp" .Pp .Cd "options INVARIANTS" @@ -110,10 +123,6 @@ should log messages about duplicate locks being acquired. Disable .Xr ktr 4 logging for this lock. -.It Dv LK_TIMELOCK -Use -.Fa timo -during a sleep; otherwise, 0 is used. .El .El .Pp @@ -184,6 +193,10 @@ Fail if operation has slept. .It Dv LK_NOWAIT Do not allow the call to sleep. This can be used to test the lock. +.It Dv LK_TIMELOCK +Use +.Fa timo +during a sleep; otherwise, 0 is used. .It Dv LK_NOWITNESS Skip the .Xr witness 4 @@ -255,12 +268,55 @@ and .Dv LK_TIMO_DEFAULT . .Pp The +.Fn lockmgr_lock_flags +function works like +.Fn lockmgr +but accepts explicit +.Fa file +and +.Fa line +arguments for lock tracing. +.Pp +The +.Fn lockmgr_slock , +.Fn lockmgr_xlock , +and +.Fn lockmgr_unlock +functions are lightweight entry points that function like +.Fn lockmgr +for the +.Dv LK_SHARED , +.Dv LK_EXCLUSIVE , +and +.Dv LK_RELEASE +operations respectively. +They provide functionality similar to +.Xr sx 9 +locks in that none of the additional +.Xr lockmgr 9 +features are supported. +Specifically, these functions do not support unlocking interlocks, the +.Dv LK_SLEEPFAIL +flag, or locks with shared locking disabled via +.Dv LK_NOSHARE . +They also accept explicit +.Fa file +and +.Fa line +arguments for lock tracing. +.Pp +The .Fn lockmgr_disown function switches the owner from the current thread to be .Dv LK_KERNPROC , if the lock is already held. .Pp The +.Fn lockmgr_disowned +function returns true or false according to whether the lock is held by +.Dv LK_KERNPROC . +.Pp +The .Fn lockmgr_printinfo function prints debugging information about the lock. It is used primarily by @@ -356,6 +412,8 @@ was requested and another thread had already requested a lock upgrade. was set, and a sleep would have been required, or .Dv LK_TRYUPGRADE operation was not able to upgrade the lock. +.It Bq Er EDEADLK +A shared lock was attempted while the thread already held the exclusive lock. .It Bq Er ENOLCK .Dv LK_SLEEPFAIL was set and @@ -400,6 +458,7 @@ exclusive lock, and a .Xr panic 9 will be the result of trying. .Sh SEE ALSO +.Xr witness 4 , .Xr condvar 9 , .Xr locking 9 , .Xr mtx_assert 9 , diff --git a/share/man/man9/locking.9 b/share/man/man9/locking.9 index 145ae6e9f1f5..b29cd07e2c2a 100644 --- a/share/man/man9/locking.9 +++ b/share/man/man9/locking.9 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd March 29, 2022 +.Dd February 3, 2023 .Dt LOCKING 9 .Os .Sh NAME @@ -145,6 +143,32 @@ for this reason, they should be avoided. See .Xr lock 9 for details. +.Ss Non-blocking synchronization +The kernel has two facilities, +.Xr epoch 9 +and +.Xr smr 9 , +which can be used to provide read-only access to a data structure while one or +more writers are concurrently modifying the data structure. +Specifically, readers using +.Xr epoch 9 +and +.Xr smr 9 +to synchronize accesses do not block writers, in contrast with reader/writer +locks, and they help ensure that memory freed by writers is not reused until +all readers which may be accessing it have finished. +Thus, they are a useful building block in the construction of lock-free +data structures. +.Pp +These facilities are difficult to use correctly and should be avoided +in preference to traditional mutual exclusion-based synchronization, +except when performance or non-blocking guarantees are a major concern. +.Pp +See +.Xr epoch 9 +and +.Xr smr 9 +for details. .Ss Counting semaphores Counting semaphores provide a mechanism for synchronizing access to a pool of resources. @@ -394,8 +418,11 @@ At this time this is a rather easy to remember table. .Sh SEE ALSO .Xr lockstat 1 , .Xr witness 4 , +.Xr atomic 9 , .Xr BUS_SETUP_INTR 9 , +.Xr callout 9 , .Xr condvar 9 , +.Xr epoch 9 , .Xr lock 9 , .Xr LOCK_PROFILING 9 , .Xr mtx_pool 9 , @@ -404,13 +431,7 @@ At this time this is a rather easy to remember table. .Xr rwlock 9 , .Xr sema 9 , .Xr sleep 9 , -.Xr sx 9 , -.Xr timeout 9 -.Sh HISTORY -These -functions appeared in -.Bsx 4.1 -through -.Fx 7.0 . +.Xr smr 9 , +.Xr sx 9 .Sh BUGS There are too many locking primitives to choose from. diff --git a/share/man/man9/mac.9 b/share/man/man9/mac.9 index 91b1aef88c94..98a455e46de3 100644 --- a/share/man/man9/mac.9 +++ b/share/man/man9/mac.9 @@ -31,8 +31,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 20, 2021 .Dt MAC 9 .Os @@ -150,16 +148,7 @@ for information on the MAC Framework APIs. .Xr acl 3 , .Xr mac 3 , .Xr posix1e 3 , -.Xr mac_biba 4 , -.Xr mac_bsdextended 4 , -.Xr mac_ddb 4 , -.Xr mac_ifoff 4 , -.Xr mac_lomac 4 , -.Xr mac_mls 4 , -.Xr mac_none 4 , -.Xr mac_partition 4 , -.Xr mac_seeotheruids 4 , -.Xr mac_test 4 , +.Xr mac 4 , .Xr ucred 9 , .Xr vaccess 9 , .Xr vaccess_acl_posix1e 9 , diff --git a/share/man/man9/make_dev.9 b/share/man/man9/make_dev.9 index cd038a703616..de56f350faa5 100644 --- a/share/man/man9/make_dev.9 +++ b/share/man/man9/make_dev.9 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 1999 Chris Costello .\" All rights reserved. .\" @@ -22,9 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd March 2, 2016 +.Dd January 19, 2025 .Dt MAKE_DEV 9 .Os .Sh NAME @@ -40,9 +41,7 @@ .Nm destroy_dev_sched_cb , .Nm destroy_dev_drain , .Nm dev_depends -.Nd manage -.Vt cdev Ns 's -and DEVFS registration for devices +.Nd create and destroy character devices including devfs registration .Sh SYNOPSIS .In sys/param.h .In sys/conf.h @@ -83,7 +82,7 @@ structure for a new device, which is returned into the .Fa cdev argument. It also notifies -.Xr devfs 5 +.Xr devfs 4 of the presence of the new device, that causes corresponding nodes to be created. Besides this, a @@ -107,6 +106,7 @@ struct make_dev_args { void *mda_si_drv2; }; .Ed +.Pp Before use and filling with the desired values, the structure must be initialized by the .Fn make_dev_args_init @@ -125,7 +125,7 @@ would print it. The name determines its path under .Pa /dev or other -.Xr devfs 5 +.Xr devfs 4 mount point and may contain slash .Ql / characters to denote subdirectories. @@ -168,10 +168,10 @@ member of the initialized The .Va args.mda_flags argument alters the operation of -.Fn make_dev_s. +.Fn make_dev_s . The following values are currently accepted: .Pp -.Bl -tag -width "It Dv MAKEDEV_CHECKNAME" -compact -offset indent +.Bl -tag -width "MAKEDEV_CHECKNAME" -compact -offset indent .It Dv MAKEDEV_REF reference the created device .It Dv MAKEDEV_NOWAIT @@ -202,12 +202,13 @@ is specified. .Pp The .Xr dev_clone 9 -event handler shall specify +event handler shall specify the .Dv MAKEDEV_REF -flag when creating a device in response to lookup, to avoid race where -the device created is destroyed immediately after -.Xr devfs_lookup 9 -drops his reference to cdev. +flag when creating a device in response to lookup, to avoid a race where +the created device is immediately destroyed after +.Fn devfs_lookup +drops its reference to +.Fa cdev . .Pp The .Dv MAKEDEV_ETERNAL @@ -228,13 +229,14 @@ and the device name is invalid or already exists. .Pp The .Fn make_dev_p -use of the form +use of the form: .Bd -literal -offset indent struct cdev *dev; int res; res = make_dev_p(flags, &dev, cdevsw, cred, uid, gid, perms, name); .Ed -is equivalent to the code +.Pp +is equivalent to the code: .Bd -literal -offset indent struct cdev *dev; struct make_dev_args args; @@ -243,7 +245,7 @@ int res; make_dev_args_init(&args); args.mda_flags = flags; args.mda_devsw = cdevsw; -args.mda_cred = cred; +args.mda_cr = cred; args.mda_uid = uid; args.mda_gid = gid; args.mda_mode = perms; @@ -252,10 +254,11 @@ res = make_dev_s(&args, &dev, name); .Pp Similarly, the .Fn make_dev_credf -function call is equivalent to +function call is equivalent to: .Bd -literal -offset indent - (void) make_dev_s(&args, &dev, name); +(void) make_dev_s(&args, &dev, name); .Ed +.Pp In other words, .Fn make_dev_credf does not allow the caller to obtain the return value, and in @@ -265,14 +268,14 @@ options, the function asserts that the device creation succeeded. .Pp The .Fn make_dev_cred -function is equivalent to the call +function is equivalent to the call: .Bd -literal -offset indent make_dev_credf(0, cdevsw, unit, cr, uid, gid, perms, fmt, ...); .Ed .Pp The .Fn make_dev -function call is the same as +function call is the same as: .Bd -literal -offset indent make_dev_credf(0, cdevsw, unit, NULL, uid, gid, perms, fmt, ...); .Ed @@ -379,7 +382,7 @@ is called, with argument .Fa arg . The .Fn destroy_dev_sched -function is the same as +function is the same as: .Bd -literal -offset indent destroy_dev_sched_cb(cdev, NULL, NULL); .Ed @@ -459,7 +462,7 @@ flag was specified and the provided device name already exists. .El .Sh SEE ALSO .Xr devctl 4 , -.Xr devfs 5 , +.Xr devfs 4 , .Xr dev_clone 9 .Sh HISTORY The diff --git a/share/man/man9/malloc.9 b/share/man/man9/malloc.9 index c240344ea77e..01d224fc3cb3 100644 --- a/share/man/man9/malloc.9 +++ b/share/man/man9/malloc.9 @@ -27,18 +27,26 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .\" $NetBSD: malloc.9,v 1.3 1996/11/11 00:05:11 lukem Exp $ -.\" $FreeBSD$ .\" -.Dd July 2, 2021 +.Dd August 4, 2024 .Dt MALLOC 9 .Os .Sh NAME .Nm malloc , +.Nm mallocarray , .Nm free , +.Nm zfree , .Nm realloc , .Nm reallocf , +.Nm malloc_usable_size , +.Nm malloc_aligned , +.Nm malloc_exec , +.Nm MALLOC_DECLARE , .Nm MALLOC_DEFINE , -.Nm MALLOC_DECLARE +.Nm malloc_domainset , +.Nm malloc_domainset_aligned , +.Nm malloc_domainset_exec , +.Nm mallocarray_domainset .Nd kernel memory management routines .Sh SYNOPSIS .In sys/types.h @@ -73,6 +81,7 @@ .Fn MALLOC_DEFINE type shortdesc longdesc .In sys/param.h .In sys/domainset.h +.In sys/malloc.h .Ft void * .Fn malloc_domainset "size_t size" "struct malloc_type *type" "struct domainset *ds" "int flags" .Ft void * @@ -116,7 +125,8 @@ Both and .Fn malloc_domainset_exec can be used to return executable memory. -Not all platforms enforce a distinction between executable and non-executable memory. +Not all platforms enforce a distinction between executable and non-executable +memory. .Pp The .Fn mallocarray @@ -259,6 +269,15 @@ This option should only be used in combination with .Dv M_NOWAIT when an allocation failure cannot be tolerated by the caller without catastrophic effects on the system. +.It Dv M_NEVERFREED +This is an internal flag used by the +.Xr uma 9 +allocator and should not be used in regular +.Fn malloc +invocations. +See the description of VM_ALLOC_NOFREE in +.Xr vm_page_alloc 9 +for more details. .El .Pp Exactly one of either diff --git a/share/man/man9/mbchain.9 b/share/man/man9/mbchain.9 index 3603ba188991..94bad32a0302 100644 --- a/share/man/man9/mbchain.9 +++ b/share/man/man9/mbchain.9 @@ -22,8 +22,6 @@ .\" (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 February 20, 2001 .Dt MBCHAIN 9 .Os diff --git a/share/man/man9/mbuf.9 b/share/man/man9/mbuf.9 index e573bfe6f52d..0262c598ed18 100644 --- a/share/man/man9/mbuf.9 +++ b/share/man/man9/mbuf.9 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd August 8, 2021 +.Dd December 28, 2023 .Dt MBUF 9 .Os .\" @@ -54,7 +52,10 @@ .Fc .\" .Ss Mbuf utility macros +.Ft type .Fn mtod "struct mbuf *mbuf" "type" +.Ft void * +.Fn mtodo "struct mbuf *mbuf" "offset" .Fn M_ALIGN "struct mbuf *mbuf" "u_int len" .Fn MH_ALIGN "struct mbuf *mbuf" "u_int len" .Ft int @@ -396,6 +397,14 @@ It is advisable to ensure that there is enough contiguous data in See .Fn m_pullup for details. +.It Fn mtodo mbuf offset +Return a data pointer at an offset (in bytes) into the data attached to +.Fa mbuf . +Returns a +.Ft void * +pointer . +.Sy Note : +The caller must ensure that the offset is in bounds of the attached data. .It Fn MGET mbuf how type Allocate an .Vt mbuf @@ -775,7 +784,9 @@ in the are contiguous and lay in the data area of .Fa mbuf , so they are accessible with -.Fn mtod mbuf type . +.Fn mtod +or +.Fn mtodo . .Fa len must be smaller than, or equal to, the size of an .Vt mbuf cluster . @@ -789,12 +800,13 @@ to the data contained in the returned mbuf is stored in If .Fa offsetp is NULL, the region may be accessed using -.Fn mtod mbuf type . +.Fn mtod mbuf type +or +.Fn mtodo mbuf 0 . If .Fa offsetp is non-NULL, the region may be accessed using -.Fn mtod mbuf uint8_t -+ *offsetp. +.Fn mtodo mbuf *offsetp . The region of the mbuf chain between its beginning and .Fa offset is not modified, therefore it is safe to hold pointers to data within @@ -1200,7 +1212,7 @@ the following various failure/extreme cases for testing of network drivers and other parts of the kernel that rely on .Vt mbufs . -.Bl -tag -width ident +.Bl -tag -width indent .It Va net.inet.ip.mbuf_frag_size Causes .Fn ip_output diff --git a/share/man/man9/mbuf_tags.9 b/share/man/man9/mbuf_tags.9 index 9f3e8c064054..834b1eb0614d 100644 --- a/share/man/man9/mbuf_tags.9 +++ b/share/man/man9/mbuf_tags.9 @@ -18,8 +18,6 @@ .\" MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR .\" PURPOSE. .\" -.\" $FreeBSD$ -.\" .Dd December 28, 2021 .Dt MBUF_TAGS 9 .Os diff --git a/share/man/man9/mdchain.9 b/share/man/man9/mdchain.9 index ed25c1eb6f20..d799775f0085 100644 --- a/share/man/man9/mdchain.9 +++ b/share/man/man9/mdchain.9 @@ -22,8 +22,6 @@ .\" (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 February 28, 2001 .Dt MDCHAIN 9 .Os diff --git a/share/man/man9/memcchr.9 b/share/man/man9/memcchr.9 index 0be3b79aa9a8..ce0e9cdac7ea 100644 --- a/share/man/man9/memcchr.9 +++ b/share/man/man9/memcchr.9 @@ -22,8 +22,6 @@ .\" 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 diff --git a/share/man/man9/memguard.9 b/share/man/man9/memguard.9 index 55cea93d98f2..61b047826f14 100644 --- a/share/man/man9/memguard.9 +++ b/share/man/man9/memguard.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 22, 2017 .Dt MEMGUARD 9 .Os diff --git a/share/man/man9/mi_switch.9 b/share/man/man9/mi_switch.9 index 835356744647..e04c2ee35ace 100644 --- a/share/man/man9/mi_switch.9 +++ b/share/man/man9/mi_switch.9 @@ -2,10 +2,14 @@ .\" .\" Copyright (c) 1996 The NetBSD Foundation, Inc. .\" All rights reserved. +.\" Copyright (c) 2023 The FreeBSD Foundation .\" .\" This code is derived from software contributed to The NetBSD Foundation .\" by Paul Kranenburg. .\" +.\" Portions of this documentation were written by Mitchell Horne +.\" under sponsorship from the FreeBSD Foundation. +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -27,132 +31,144 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd November 24, 1996 +.Dd January 7, 2025 .Dt MI_SWITCH 9 .Os .Sh NAME -.Nm mi_switch , -.Nm cpu_switch , -.Nm cpu_throw +.Nm mi_switch .Nd switch to another thread context .Sh SYNOPSIS .In sys/param.h .In sys/proc.h .Ft void -.Fn mi_switch "void" -.Ft void -.Fn cpu_switch "void" -.Ft void -.Fn cpu_throw "void" +.Fn mi_switch "int flags" .Sh DESCRIPTION The .Fn mi_switch -function implements the machine independent prelude to a thread context +function implements the machine-independent prelude to a thread context switch. -It is called from only a few distinguished places in the kernel -code as a result of the principle of non-preemptable kernel mode execution. +It is the single entry point for every context switch and is called from only +a few distinguished places in the kernel. +The context switch is, by necessity, always performed by the switched thread, +even when the switch is initiated from elsewhere; e.g. preemption requested via +Inter-Processor Interrupt (IPI). +.Pp The various major uses of -.Nm +.Fn mi_switch can be enumerated as follows: .Bl -enum -offset indent .It From within a function such as -.Xr cv_wait 9 , -.Xr mtx_lock 9 , +.Xr sleepq_wait 9 or -.Xr tsleep 9 +.Fn turnstile_wait when the current thread voluntarily relinquishes the CPU to wait for some resource or lock to become available. .It -After handling a trap -(e.g.\& a system call, device interrupt) -when the kernel prepares a return to user-mode execution. -This case is -typically handled by machine dependent trap-handling code after detection -of a change in the signal disposition of the current process, or when a -higher priority thread might be available to run. -The latter event is -communicated by the machine independent scheduling routines by calling -the machine defined -.Fn need_resched . +Involuntary preemption due to arrival of a higher-priority thread. +.It +At the tail end of +.Xr critical_exit 9 , +if preemption was deferred due to the critical section. +.It +Within the TDA_SCHED AST handler, when rescheduling before the return to +usermode was requested. +There are several reasons for this, a notable one coming from +.Fn sched_clock +when the running thread has exceeded its time slice. .It In the signal handling code (see .Xr issignal 9 ) if a signal is delivered that causes a process to stop. .It -When a thread dies in -.Xr thread_exit 9 -and control of the processor can be passed to the next runnable thread. -.It In -.Xr thread_suspend_check 9 +.Fn thread_suspend_check where a thread needs to stop execution due to the suspension state of the process as a whole. +.It +In +.Xr kern_yield 9 +when a thread wants to voluntarily relinquish the processor. .El .Pp +The +.Va flags +argument to .Fn mi_switch -records the amount of time the current thread has been running in the -process structures and checks this value against the CPU time limits -allocated to the process -(see -.Xr getrlimit 2 ) . -Exceeding the soft limit results in a -.Dv SIGXCPU -signal to be posted to the process, while exceeding the hard limit will -cause a -.Dv SIGKILL . +indicates the context switch type. +One of the following must be passed: +.Bl -tag -offset indent -width "SWT_REMOTEWAKEIDLE" +.It Dv SWT_OWEPREEMPT +Switch due to delayed preemption after exiting a critical section. +.It Dv SWT_TURNSTILE +Switch after propagating scheduling priority to the owner of a resource. +.It Dv SWT_SLEEPQ +Begin waiting on a +.Xr sleepqueue 9 . +.It Dv SWT_RELINQUISH +Yield call. +.It Dv SWT_NEEDRESCHED +Rescheduling was requested. +.It Dv SWT_IDLE +Switch from the idle thread. +.It Dv SWT_IWAIT +A kernel thread which handles interrupts has finished work and must wait for +interrupts to schedule additional work. +.It Dv SWT_SUSPEND +Thread suspended. +.It Dv SWT_REMOTEPREEMPT +Preemption by a higher-priority thread, initiated by a remote processor. +.It Dv SWT_REMOTEWAKEIDLE +Idle thread preempted, initiated by a remote processor. +.It Dv SWT_BIND +The running thread has been bound to another processor and must be switched +out. +.El .Pp -If the thread is still in the -.Dv TDS_RUNNING -state, -.Fn mi_switch -will put it back onto the run queue, assuming that -it will want to run again soon. -If it is in one of the other -states and KSE threading is enabled, the associated -.Em KSE -will be made available to any higher priority threads from the same -group, to allow them to be scheduled next. +In addition to the switch type, callers must specify the nature of the +switch by performing a bitwise OR with one of the +.Dv SW_VOL +or +.Dv SW_INVOL +flags, but not both. +Respectively, these flags denote whether the context switch is voluntary or +involuntary on the part of the current thread. +For an involuntary context switch in which the running thread is +being preempted, the caller should also pass the +.Dv SW_PREEMPT +flag. .Pp -After these administrative tasks are done, +Upon entry to +.Fn mi_switch , +the current thread must be holding its assigned thread lock. +It may be unlocked as part of the context switch. +After they have been rescheduled and execution resumes, threads will exit .Fn mi_switch -hands over control to the machine dependent routine -.Fn cpu_switch , -which will perform the actual thread context switch. +with their thread lock unlocked. .Pp +.Fn mi_switch +records the amount of time the current thread has been running before handing +control over to the scheduler, via +.Fn sched_switch . +After selecting a new thread to run, the scheduler will call .Fn cpu_switch -first saves the context of the current thread. -Next, it calls -.Fn choosethread -to determine which thread to run next. -Finally, it reads in the saved context of the new thread and starts to -execute the new thread. +to perform the low-level context switch. .Pp -.Fn cpu_throw -is similar to .Fn cpu_switch -except that it does not save the context of the old thread. -This function is useful when the kernel does not have an old thread -context to save, such as when CPUs other than the boot CPU perform their -first task switch, or when the kernel does not care about the state of the -old thread, such as in -.Fn thread_exit -when the kernel terminates the current thread and switches into a new -thread. -.Pp -To protect the -.Xr runqueue 9 , -all of these functions must be called with the -.Va sched_lock -mutex held. +is the machine-dependent function that performs the actual switch from the +running thread +.Fa oldtd +to the chosen thread +.Fa newtd . .Sh SEE ALSO -.Xr cv_wait 9 , +.Xr cpu_switch 9 , +.Xr cpu_throw 9 , +.Xr critical_exit 9 , .Xr issignal 9 , +.Xr kern_yield 9 , .Xr mutex 9 , -.Xr runqueue 9 , -.Xr tsleep 9 , -.Xr wakeup 9 +.Xr pmap 9 , +.Xr sleepqueue 9 , +.Xr thread_exit 9 diff --git a/share/man/man9/microseq.9 b/share/man/man9/microseq.9 index e9d86db26163..06e3ebdd3a0a 100644 --- a/share/man/man9/microseq.9 +++ b/share/man/man9/microseq.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 6, 1998 .Dt MICROSEQ 9 .Os diff --git a/share/man/man9/microtime.9 b/share/man/man9/microtime.9 index f5ea65d1fc34..d703d7b572d7 100644 --- a/share/man/man9/microtime.9 +++ b/share/man/man9/microtime.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 16, 2004 .Dt MICROTIME 9 .Os diff --git a/share/man/man9/microuptime.9 b/share/man/man9/microuptime.9 index 2ff5e9b25a4e..e1b9b193a971 100644 --- a/share/man/man9/microuptime.9 +++ b/share/man/man9/microuptime.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 21, 2015 .Dt MICROUPTIME 9 .Os diff --git a/share/man/man9/mod_cc.9 b/share/man/man9/mod_cc.9 index 0a275d2da8e1..09580aa943a9 100644 --- a/share/man/man9/mod_cc.9 +++ b/share/man/man9/mod_cc.9 @@ -29,8 +29,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 13, 2021 .Dt MOD_CC 9 .Os @@ -219,8 +217,8 @@ Note that currently not all TCP stacks call the .Va rttsample and .Va newround -function so dependancy on these functions is also -dependant upon which TCP stack is in use. +function so dependency on these functions is also +dependent upon which TCP stack is in use. .Pp The .Fn DECLARE_CC_MODULE @@ -261,7 +259,7 @@ function should return 0. .Pp The stack will skip calling any function pointer which is NULL, so there is no requirement to implement any of the function pointers (with the exception of -the cb_init <-> cc_data_sz dependancy noted above). +the cb_init <-> cc_data_sz dependency noted above). Using the C99 designated initialiser feature to set fields is encouraged. .Pp Each function pointer which deals with congestion control state is passed a @@ -372,7 +370,7 @@ LRO system. So for example if LRO pushed three in-order acknowledgements into one acknowledgement the variable would be set to three. .Pp -The +The .Va labc variable is used in conjunction with the CCF_USE_LOCAL_ABC flag to override what labc variable the congestion controller will use diff --git a/share/man/man9/module.9 b/share/man/man9/module.9 index 5bd9a13c6925..8cb558bca631 100644 --- a/share/man/man9/module.9 +++ b/share/man/man9/module.9 @@ -26,8 +26,6 @@ .\" (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 November 11, 2021 .Dt MODULE 9 .Os diff --git a/share/man/man9/mtx_pool.9 b/share/man/man9/mtx_pool.9 index ab2cc8b31b11..3273406143ab 100644 --- a/share/man/man9/mtx_pool.9 +++ b/share/man/man9/mtx_pool.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 6, 2010 .Dt MTX_POOL 9 .Os diff --git a/share/man/man9/mutex.9 b/share/man/man9/mutex.9 index 43d523a56c98..ccba09f3212f 100644 --- a/share/man/man9/mutex.9 +++ b/share/man/man9/mutex.9 @@ -26,9 +26,8 @@ .\" SUCH DAMAGE. .\" .\" from BSDI $Id: mutex.4,v 1.1.2.3 1998/04/27 22:53:13 ewv Exp $ -.\" $FreeBSD$ .\" -.Dd May 24, 2017 +.Dd February 17, 2023 .Dt MUTEX 9 .Os .Sh NAME @@ -74,7 +73,7 @@ .Fn mtx_trylock "struct mtx *mutex" .Ft int .Fn mtx_trylock_flags "struct mtx *mutex" "int flags" -.Ft void +.Ft int .Fn mtx_trylock_spin "struct mtx *mutex" .Ft int .Fn mtx_trylock_spin_flags "struct mtx *mutex" "int flags" diff --git a/share/man/man9/namei.9 b/share/man/man9/namei.9 index f98646725fb3..5bdffce8c360 100644 --- a/share/man/man9/namei.9 +++ b/share/man/man9/namei.9 @@ -31,15 +31,14 @@ .\" If you integrate this manpage in another OS, I'd appreciate a note .\" - eivind@FreeBSD.org .\" -.\" $FreeBSD$ -.\" -.Dd May 23, 2015 +.Dd May 16, 2025 .Dt NAMEI 9 .Os .Sh NAME .Nm namei , .Nm NDINIT , -.Nm NDFREE +.Nm NDINIT_AT , +.Nm NDFREE_PNBUF .Nd pathname translation and lookup operations .Sh SYNOPSIS .In sys/param.h @@ -49,11 +48,16 @@ .Fn namei "struct nameidata *ndp" .Ft void .Fo NDINIT -.Fa "struct nameidata *ndp" "u_long op" "u_long flags" -.Fa "enum uio_seg segflg" "const char *namep" "struct thread *td" +.Fa "struct nameidata *ndp" "enum nameiop op" "u_int64_t flags" +.Fa "enum uio_seg segflg" "const char *namep" +.Fc +.Ft void +.Fo NDINIT_AT +.Fa "struct nameidata *ndp" "enum nameiop op" "u_int64_t flags" +.Fa "enum uio_seg segflg" "const char *namep" "int dirfd" .Fc .Ft void -.Fn NDFREE "struct nameidata *ndp" "const uint flags" +.Fn NDFREE_PNBUF "struct nameidata *ndp" .Sh DESCRIPTION The .Nm @@ -73,13 +77,13 @@ flag was specified or not. .Pp The .Fn NDINIT -function is used to initialize +macro is used to initialize .Nm components. It takes the following arguments: .Bl -tag -width ".Fa segflg" .It Fa ndp -The +A pointer to the .Vt "struct nameidata" to initialize. .It Fa op @@ -97,7 +101,7 @@ will not result in .Fn VOP_RENAME being called. .It Fa flags -Operation flags. +Operation flags, described in the next section. Several of these can be effective at the same time. .It Fa segflg UIO segment indicator. @@ -108,10 +112,35 @@ or in the kernel address space .It Fa namep Pointer to the component's pathname buffer (the file or directory name that will be looked up). -.It Fa td -The thread context to use for -.Nm -operations and locks. +.El +.Pp +The +.Fn NDINIT_AT +macro is similar to +.Fn NDINIT , +but takes one extra argument: +.Bl -tag -width ".Fa segflg" +.It Fa dirfd +File descriptor referencing a directory, or the special value +.Dv AT_FDCWD +meaning the calling thread's current working directory. +Lookups will be performed relative to this directory. +.El +.Pp +The +.Fn NDFREE_PNBUF +macro is used to free the pathname buffer. +It must be called exactly once for each successful +.Fn namei +call. +It takes the following argument: +.Bl -tag -width ".Fa segflg" +.It Fa ndp +A pointer to a +.Vt "struct nameidata" +that was used in a successful +.Fn namei +call. .El .Sh NAMEI OPERATION FLAGS The @@ -119,14 +148,32 @@ The function takes the following set of .Dq "operation flags" that influence its operation: -.Bl -tag -width ".Dv WANTPARENT" +.Bl -tag -width NC_KEEPPOSENTRY +.It Dv NC_NOMAKEENTRY +An alias for +.Dv NOCACHE . +.It Dv NC_KEEPPOSENTRY +Keep the positive-caching entry in cache. +This flag is typically combined with +.Dv NOCACHE +to not cache a new entry, +but keep existing one, or with +.Dv MAKEENTRY . +.It Dv NOCACHE +Avoid +.Fn namei +creating this entry in the namecache if it is not +already present. +Normally, +.Fn namei +will add entries to the name cache +if they are not already there. .It Dv LOCKLEAF Lock vnode on return with .Dv LK_EXCLUSIVE unless .Dv LOCKSHARED is also set. -The .Xr VOP_UNLOCK 9 should be used to release the lock (or @@ -153,40 +200,70 @@ or .Xr VOP_UNLOCK 9 and .Xr vrele 9 . -.It Dv LOCKSHARED -Lock vnode on return with -.Dv LK_SHARED . -The -.Xr VOP_UNLOCK 9 -should be used -to release the lock (or -.Xr vput 9 -which is equivalent to calling -.Xr VOP_UNLOCK 9 -followed by -.Xr vrele 9 , -all in one). .It Dv WANTPARENT This flag allows the .Fn namei function to return the parent (directory) vnode in an unlocked state. The parent vnode must be released separately by using .Xr vrele 9 . -.It Dv NOCACHE -Avoid -.Fn namei -creating this entry in the namecache if it is not -already present. -Normally, +.It Dv WANTPARENT +This flag allows the .Fn namei -will add entries to the name cache -if they are not already there. +function to return the parent (directory) vnode in an unlocked state. +The parent vnode must be released separately by using +.Xr vrele 9 . +.It Dv FAILIFEXISTS +Makes the +.Nm +operation fail if the target exists. +It requires that the +.Dv LOCKPARENT +flag is set and +.Dv LOCKLEAF +is not. .It Dv FOLLOW With this flag, .Fn namei 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 EMPTYPATH +For +.Nm +call initialized with +.Fn NDINIT_AT , +allow the +.Fa namep +path to be empty. +In this case, the +.Fa dirfd +file descriptor may reference a file of arbitrary type, not +necessary a directory, and lookup returns the vnode for this file. +.It Dv LOCKSHARED +Lock vnode on return with +.Dv LK_SHARED , +if permitted by the file system that owns the vnode. +The file system must explicitly permit this by setting +.Dv MNTK_LOOKUP_SHARED +in +.Dv mp->mnt_kern_flag +during mount and by calling +.Fn VN_LOCK_ASHARE +when allocating the vnode. +If +.Dv LOCKLEAF +is specified but shared locking is not permitted, then the vnode will be +returned with +.Dv LK_EXCLUSIVE . +.Xr VOP_UNLOCK 9 +should be used +to release the lock (or +.Xr vput 9 +which is equivalent to calling +.Xr VOP_UNLOCK 9 +followed by +.Xr vrele 9 , +all in one). .It Dv NOFOLLOW Do not follow symbolic links (pseudo). This flag is not looked for by the actual code, which looks for @@ -194,17 +271,131 @@ This flag is not looked for by the actual code, which looks for .Dv NOFOLLOW is used to indicate to the source code reader that symlinks are intentionally not followed. -.It Dv SAVENAME -Do not free the pathname buffer at the end of the -.Fn namei -invocation; instead, free it later in -.Fn NDFREE -so that the caller may access the pathname buffer. -See below for details. -.It Dv SAVESTART -Retain an additional reference to the parent directory; do not free -the pathname buffer. -See below for details. +.It Dv RBENEATH +Requires that +.Nm +did not cross the +.Fa dirfd +directory. +The flag is used to implement +.Dv O_RESOLVE_BENEATH +flag for +.Xr openat 2 . +.It Dv NAMEILOOKUP +The component is embedded in a +.Nm +lookup structure, and the +.Fn vfs_lookup_nameidata +function can be used to obtain that structure. +This can be useful in +.Xr VOP_LOOKUP 9 +implementations which need to obtain extra lookup metadata. +.El +.Sh PARAMETERS DESCRIPTORS FLAGS +These flags are used for several purposes. +Some of them affects the global +.Nm +operation, some provide information for processing of the specific +path element, for instance, by the +.Dv VOP_LOOKUP +implementation of the involved filesystem. +.Bl -tag -width IGNOREWHITEOUT +.It Dv RDONLY +Specifies that the lookup should act as if the final node is located on +read-only mount. +The flag is typically used by file servers, e.g. NFS, +to handle read-only exports. +.It Dv ISRESTARTED +The +.Nm +was restarted with +.Fn NDRESTART . +This is used internally for double-root lookups used by ABI subsystems, +after the lookup with native root failed. +The components are reset to the original values, and lookup is repeated +with different root, once. +.It Dv IGNOREWHITEOUT +Ignore whiteouts, e.g. when checking if a directory is empty. +.It Dv ISWHITEOUT +The result of lookup is whiteout. +.It Dv DOWHITEOUT +Handle whiteouts, the instruction for the +.Fn VOP_LOOKUP +filesystem methods. +.It Dv WILLBEDIR +The lookup is done for creating a new entry that will be directory. +It allows the trailing slash in the path string. +.It Dv ISOPEN +The caller is the code that opens a file. +This allows to weaken the lock mode of the return vnode, if the +mount point indicates extended shared lock support. +.It Dv NOCROSSMOUNT +Do not cross mount points during lookup. +.Pp +For +.Dq .. +lookup leading to mount root, returns the root vnode of +the mount instead of the covered vnode of the filesystem where +the mount was placed. +.Pp +For other lookups passing over mount, do not jump into the mounted +filesystem. +This allows to descend into the file hierarchy otherwise shadowed +by the mount point. +.It Dv NOMACCHECK +Do not perform MAC checks during lookup. +.It Dv AUDITVNODE1 +Audit the looked up vnode information, use the first slot for audit information. +.It Dv AUDITVNODE2 +Same as +.Dv AUDITVNODE1 +but use the second slot. +.It Dv NOCAPCHECK +Do not perform capability checks. +If the calling process is in capability mode, lookup is denied outright. +.It Dv OPENREAD +The lookup was for open and file will be opened for read. +.It Dv OPENWRITE +The lookup was for open and file will be opened for write. +.It Dv WANTIOCTLCAPS +Leave ioctl caps for the caller. +See the description of +.Nm +results. +.It Dv OPENNAMED +Opening a named attribute (directory). +.It Dv NOEXECCHECK +Do not perform check for allowed execution on the starting directory. +It is used to implement the POSIX-required semantic for +.Xr openat 2 +lookups that must use the permissions from time the directory was +opened, and not when used for lookup. +.It Dv MAKEENTRY +Looked-up entry is to be added to name cache. +.It Dv ISSYMLINK +Current component is symlink, and it needs the interpretation +according to the +.Dv FOLLOW +or +.Dv NOFOLLOW +flags. +.It Dv ISLASTCN +This is last component of pathname. +It is handled specially, many flags augment its processing. +.It Dv ISDOTDOT +Current component name is +.Dq .. . +Usually implies a need to specially handle the vnode locking +for instantiation of the target vnode. +The generic +.Fn vn_vget_ino_gen +function and its more specialized variant +.Fn vn_vget_ino +might be useful. +.It Dv TRAILINGSLASH +Path ended in a slash. +.It Dv CREATENAMED +Create a named attribute dir. .El .Sh ALLOCATED ELEMENTS The @@ -219,23 +410,10 @@ and we have not gone through any symlinks with an absolute path, and the root otherwise. .Pp In this case, it is only used by -.Fn lookup , +.Fn vfs_lookup , and should not be considered valid after a call to .Fn namei . -If -.Dv SAVESTART -is set, this is set to the same as -.Va ni_dvp , -with an extra -.Xr vref 9 . -To block -.Fn NDFREE -from releasing -.Va ni_startdir , -the -.Dv NDF_NO_STARTDIR_RELE -can be set. .It Va ni_dvp Vnode pointer to directory of the object on which lookup is performed. This is available on successful return if @@ -246,13 +424,6 @@ is set. It is locked if .Dv LOCKPARENT is set. -Freeing this in -.Fn NDFREE -can be inhibited by -.Dv NDF_NO_DVP_RELE , NDF_NO_DVP_PUT , -or -.Dv NDF_NO_DVP_UNLOCK -(with the obvious effects). .It Va ni_vp Vnode pointer to the resulting object, .Dv NULL @@ -264,13 +435,6 @@ If .Dv LOCKLEAF is set, it is also locked. .Pp -Freeing this in -.Fn NDFREE -can be inhibited by -.Dv NDF_NO_VP_RELE , NDF_NO_VP_PUT , -or -.Dv NDF_NO_VP_UNLOCK -(with the obvious effects). .It Va ni_cnd.cn_pnbuf The pathname buffer contains the location of the file or directory that will be used by the @@ -279,29 +443,35 @@ operations. It is managed by the .Xr uma 9 zone allocation interface. -If the -.Dv SAVESTART -or -.Dv SAVENAME -flag is set, then the pathname buffer is available -after calling the -.Fn namei -function. -.Pp -To only deallocate resources used by the pathname buffer, -.Va ni_cnd.cn_pnbuf , -then -.Dv NDF_ONLY_PNBUF -flag can be passed to the -.Fn NDFREE -function. -To keep the pathname buffer intact, -the -.Dv NDF_NO_FREE_PNBUF -flag can be passed to the -.Fn NDFREE -function. .El +.Sh RESULTS +The +.Vt struct namei +member +.Dv ni_resflags +returns the following flags giving some details of the succesfull operation: +.Bl -tag -width NIRES_EMPTYPATH +.It Dv NIRES_ABS +The path passed was absolute. +.It Dv NIRES_STRICTREL +Restricted lookup result. +Only relative lookups were done to resolve the path to vnode. +.It Dv NIRES_EMPTYPATH +The +.Dv EMPTYPATH +flag was provided and used. +In particular, the passed path was empty. +.El +.Pp +If the +.Dv WANTIOCTLCAPS +flag was specified, on return the +.Va ni_filecaps +member of the +.Vt struct namei +contains the capabilities of the file descriptor used as +the lookup starting point +.Pq Va dirfd . .Sh RETURN VALUES If successful, .Fn namei @@ -310,6 +480,24 @@ will return 0, otherwise it will return an error. .Bl -tag -width Pa .It Pa src/sys/kern/vfs_lookup.c .El +.Sh EXAMPLES +Assuming the +.Dv path +variable contains a pointer to userspace path string, the following +example looks up the file named by it, and performs required error +and resource handling: +.Bd -literal + char *path; + struct nameidata nd; + int error; + + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | AUDITVNODE1, UIO_USERSPACE, + path); + if ((error = namei(&nd)) != 0) + return (error); + NDFREE_PNBUF(&nd); + ... use nd.ni_vp vnode +.Ed .Sh ERRORS Errors which .Fn namei @@ -347,7 +535,8 @@ An attempt is made to modify a file or directory on a read-only file system. .Xr VFS 9 , .Xr vnode 9 , .Xr vput 9 , -.Xr vref 9 +.Xr vref 9 , +.Xr vrele 9 .Sh AUTHORS .An -nosplit This manual page was written by diff --git a/share/man/man9/netisr.9 b/share/man/man9/netisr.9 index efcb8ed8e7b1..6bb59b45ad31 100644 --- a/share/man/man9/netisr.9 +++ b/share/man/man9/netisr.9 @@ -25,9 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 25, 2017 +.Dd April 12, 2023 .Dt NETISR 9 .Os .Sh NAME @@ -220,9 +218,6 @@ Routing socket loopback ARP .It Dv NETISR_IPV6 IPv6 -.It Dv NETISR_EPAIR -.Xr netstat 1 , -.Xr epair 4 .El .Sh AUTHORS This manual page and the diff --git a/share/man/man9/nv.9 b/share/man/man9/nv.9 index c80e70116d67..8c99f1d12200 100644 --- a/share/man/man9/nv.9 +++ b/share/man/man9/nv.9 @@ -27,9 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd June 19, 2018 +.Dd January 3, 2025 .Dt NV 9 .Os .Sh NAME @@ -282,11 +280,12 @@ .Sh DESCRIPTION The .Nm libnv -library allows to easily manage name value pairs as well as send and receive +library permits creating and managing name value pairs as well as +sending and receiving them over sockets. A group (list) of name value pairs is called an .Nm nvlist . -The API supports the following data types: +The API supports the following data types for values: .Bl -ohang -offset indent .It Sy null ( NV_TYPE_NULL ) There is no data associated with the name. @@ -332,7 +331,7 @@ The .Fn nvlist_create function allocates memory and initializes an nvlist. .Pp -The following flag can be provided: +The following flags can be provided: .Pp .Bl -tag -width "NV_FLAG_IGNORE_CASE" -compact -offset indent .It Dv NV_FLAG_IGNORE_CASE @@ -344,28 +343,36 @@ Names in the nvlist do not have to be unique. The .Fn nvlist_destroy function destroys the given nvlist. -Function does nothing if -.Dv NULL -nvlist is provided. -Function never modifies the -.Va errno -global variable. +This function does nothing if +.Fa nvl +is +.Dv NULL . +This function never modifies +.Va errno . .Pp The .Fn nvlist_error -function returns any error value that the nvlist accumulated. -If the given nvlist is -.Dv NULL -the +function returns the first error set on +.Fa nvl . +If +.Fa nvl +is not in the error state, +this function returns zero. +If +.Fa nvl +is +.Dv NULL , .Er ENOMEM -error will be returned. +is returned. .Pp The .Fn nvlist_set_error -function sets an nvlist to be in the error state. +function sets an the error value for +.Fa nvl . Subsequent calls to .Fn nvlist_error -will return the given error value. +will return +.Fa error . This function cannot be used to clear the error state from an nvlist. This function does nothing if the nvlist is already in the error state. .Pp @@ -373,16 +380,24 @@ The .Fn nvlist_empty function returns .Dv true -if the given nvlist is empty and +if +.Fa nvl +is empty and .Dv false otherwise. -The nvlist must not be in error state. +The nvlist must not be in the error state. .Pp The .Fn nvlist_flags -function returns flags used to create the nvlist with the -.Fn nvlist_create -function. +function returns the flags used to create +.Fa nvl +with the +.Fn nvlist_create , +.Fn nvlist_recv , +.Fn nvlist_unpack , +or +.Fn nvlist_xfer +functions. .Pp The .Fn nvlist_in_array @@ -394,7 +409,8 @@ is part of an array that is a member of another nvlist. .Pp The .Fn nvlist_clone -functions clones the given nvlist. +function clones +.Fa nvl . The clone shares no resources with its origin. This also means that all file descriptors that are part of the nvlist will be duplicated with the @@ -403,154 +419,170 @@ system call before placing them in the clone. .Pp The .Fn nvlist_dump -dumps nvlist content for debugging purposes to the given file descriptor +function dumps nvlist content for debugging purposes to the file descriptor .Fa fd . .Pp The .Fn nvlist_fdump -dumps nvlist content for debugging purposes to the given file stream +dumps nvlist content for debugging purposes to the file stream .Fa fp . .Pp The .Fn nvlist_size -function returns the size of the given nvlist after converting it to binary -buffer with the +function returns the size of the binary buffer that would be generated by the .Fn nvlist_pack function. .Pp The .Fn nvlist_pack function converts the given nvlist to a binary buffer. -The function allocates memory for the buffer, which should be freed with the +The function allocates memory for the buffer which should be freed with the .Xr free 3 function. If the .Fa sizep argument is not .Dv NULL , -the size of the buffer will be stored there. -The function returns +the size of the buffer is stored there. +This function returns .Dv NULL in case of an error (allocation failure). If the nvlist contains any file descriptors .Dv NULL will be returned. -The nvlist must not be in error state. +The nvlist must not be in the error state. .Pp The .Fn nvlist_unpack -function converts the given buffer to the nvlist. +function converts a binary buffer to a new nvlist. The .Fa flags -argument defines what type of the top level nvlist is expected to be. -Flags are set up using the -.Fn nvlist_create -function. -If the nvlist flags do not match the flags passed to -.Fn nvlist_unpack , -the nvlist will not be returned. -Every nested nvlist list should be checked using -.Fn nvlist_flags -function. -The function returns +argument has the same meaning as the +.Fa flags +argument passed to +.Fn nvlist_create . +If +.Fa flags +do not match the flags used to create the initial nvlist before it was packed, +this function will fail. +The flags of nested nvlists are not validated by this function. +The caller is responsible for validating the flags on any nested nvlists using +.Fn nvlist_flags . +This function returns the new nvlist on success or .Dv NULL in case of an error. .Pp The .Fn nvlist_send -function sends the given nvlist over the socket given by the -.Fa sock -argument. -Note that nvlist that contains file descriptors can only be send over +function sends +.Fa nvl +over the socket +.Fa sock . +Note that nvlists that contain file descriptors can only be sent over .Xr unix 4 domain sockets. .Pp The .Fn nvlist_recv -function receives nvlist over the socket given by the -.Fa sock -argument. -The +function receives an nvlist over the socket +.Fa sock . +As with +.Fn nvlist_unpack , +the .Fa flags -argument defines what type of the top level nvlist is expected to be. -Flags are set up using the -.Fn nvlist_create -function. -If the nvlist flags do not match the flags passed to -.Fn nvlist_recv , -the nvlist will not be returned. -Every nested nvlist list should be checked using -.Fn nvlist_flags -function. +argument is used to construct the new nvlist and must match the flags used +to construct the original nvlist written to +.Fa sock +by the peer. +The flags of nested nvlists are not validated by this function. +The caller is responsible for validating the flags on any nested nvlists using +.Fn nvlist_flags . +This function returns the new nvlist on success or +.Dv NULL +in case of an error. .Pp The .Fn nvlist_xfer -function sends the given nvlist over the socket given by the +function sends +.Fa nvl +over the socket .Fa sock -argument and receives nvlist over the same socket. +argument and then receives a new nvlist over the same socket. The .Fa flags -argument defines what type of the top level nvlist is expected to be. -Flags are set up using the -.Fn nvlist_create -function. -If the nvlist flags do not match the flags passed to -.Fn nvlist_xfer , -the nvlist will not be returned. -Every nested nvlist list should be checked using -.Fn nvlist_flags -function. -The given nvlist is always destroyed. +argument applies to the new nvlist similar to +.Fn nvlist_recv . +The nvlist +.Fa nvl +is always destroyed. +This function returns the new nvlist on success or +.Dv NULL +in case of an error. .Pp The .Fn nvlist_next -function iterates over the given nvlist returning names and types of subsequent +function iterates over +.Fa nvl +returning the names and types of subsequent elements. The .Fa cookiep -argument allows the function to figure out which element should be returned -next. -The +argument determines which element is returned. +If .Va *cookiep -should be set to -.Dv NULL -for the first call and should not be changed later. -Returning +is +.Dv NULL , +the values for the first element in the list are returned. +Otherwise, +.Va *cookiep +should contain the result of a prior call to +.Fn nvlist_next +in which case values for the next element from +.Fa nvl +are returned. +This function returns .Dv NULL -means there are no more elements on the nvlist. +when there are no more elements on +.Fa nvl . The .Fa typep -argument can be NULL. -Elements may not be removed from the nvlist while traversing it. -The nvlist must not be in error state. -Note that -.Fn nvlist_next -will handle -.Va cookiep -being set to +argument can be .Dv NULL . -In this case first element is returned or -.Dv NULL -if nvlist is empty. -This behavior simplifies removing the first element from the list. +Elements may not be removed from +.Fa nvl +the nvlist while traversing it. +.Fa nvl +must not be in the error state. +Additional actions can be performed on an element identified by a cookie +via the +.Xr cnv 9 +API . .Pp The .Fn nvlist_exists function returns .Dv true -if element of the given name exists (besides of its type) or +if an element named +.Fa name +exists in +.Fa nvl +(regardless of type) or .Dv false otherwise. -The nvlist must not be in error state. +The nvlist must not be in the error state. .Pp The .Fn nvlist_exists_type function returns .Dv true -if element of the given name and the given type exists or +if an element named +.Fa name +of type +.Fa type +exists or .Dv false otherwise. -The nvlist must not be in error state. +The nvlist must not be in the error state. .Pp The .Fn nvlist_exists_null , @@ -567,11 +599,13 @@ The .Fn nvlist_exists_descriptor_array functions return .Dv true -if element of the given name and the given type determined by the function name +if element named +.Fa name +with the type determined by the function name exists or .Dv false otherwise. -The nvlist must not be in error state. +The nvlist must not be in the error state. .Pp The .Fn nvlist_add_null , @@ -588,18 +622,23 @@ The .Fn nvlist_add_string_array , .Fn nvlist_add_nvlist_array , .Fn nvlist_add_descriptor_array -functions add element to the given nvlist. -When adding string or binary buffer the functions will allocate memory -and copy the data over. -When adding nvlist, the nvlist will be cloned and clone will be added. -When adding descriptor, the descriptor will be duplicated using the +functions add an element to +.Fa nvl . +When adding a string or binary buffer, these functions allocate memory +and copy the data. +When adding an nvlist, the +.Fa value +nvlist is cloned and the clone is added to +.Fa nvl . +When adding a file descriptor, the descriptor is duplicated via the .Xr dup 2 -system call and the new descriptor will be added. -The array functions will fail if there are any +system call and the new file descriptor is added. +The array functions fail if there are any .Dv NULL elements in the array, or if the array pointer is .Dv NULL . -If an error occurs while adding new element, internal error is set which can be +If an error occurs while adding a new element, +an internal error is set which can be examined using the .Fn nvlist_error function. @@ -614,17 +653,27 @@ The .Fn nvlist_move_string_array , .Fn nvlist_move_nvlist_array , .Fn nvlist_move_descriptor_array -functions add new element to the given nvlist, but unlike +functions add an element to +.Fa nvl , +but unlike the .Fn nvlist_add_<type> -functions they will consume the given resource. -In the case of strings, descriptors, or nvlists every elements must be -unique, or it could cause a double free. -The array functions will fail if there are any +functions they consume the given resource. +For string, file descriptor, binary buffer, or nvlist values, +no value should be moved into an nvlist multiple times; +doing so will cause that value to be freed multiple times. +Note that strings or binary buffers must be allocated with +.Xr malloc 3 , +and the pointers will be released via +.Xr free 3 +when +.Fa nvl +is destroyed. +The array functions fail if there are any .Dv NULL elements, or if the array pointer is .Dv NULL . If an error occurs while adding new element, the resource is destroyed and -internal error is set which can be examined using the +an internal error is set which can be examined using the .Fn nvlist_error function. .Pp @@ -640,37 +689,61 @@ The .Fn nvlist_get_string_array , .Fn nvlist_get_nvlist_array , .Fn nvlist_get_descriptor_array -functions return the value that corresponds to the given key name. -In the case of strings, nvlists, descriptors, binary, or arrays, the returned -resource should not be modified - they still belong to the nvlist. -If an element of the given name does not exist, the program will be aborted. -To avoid this, the caller should check for the existence of the name before -trying to obtain the value, or use the -.Xr dnvlist 3 -extension, which can provide a default value in the case of a missing element. -The nvlist must not be in error state. +functions return the value of the first element in +.Fa nvl +named +.Fa name . +For string, nvlist, file descriptor, binary buffer, or array values, +the returned resource must not be modified - it still belongs to +.Fa nvl . +.Pp +If an element named +.Fa name +does not exist, the program aborts. +To avoid this, the caller should check for the existence of the element before +trying to obtain the value or use the +.Xr dnv 9 +extension which provides a default value in the case of a missing element. +.Pp +The nvlist must not be in the error state. .Pp The .Fn nvlist_get_parent -function returns the parent nvlist of the nested nvlist. +function returns the parent nvlist of +.Fa nvl . .Pp The .Fn nvlist_get_array_next -function returns the next element from the array or -.Dv NULL -if the nvlist is not in array or it is the last element. -Note that -.Fn nvlist_get_array_next -only works if you added the nvlist array using the -.Fn nvlist_move_nvlist_array +function returns the next element after +.Fa nvl +from an array of nvlists. +If +.Fa nvl +is not in an array of nvlists or it is the last element, +this function returns +.Dv NULL . +An nvlist is only in an nvlist array if it was added to an nvlist array using +.Fn nvlist_add_nvlist_array , +.Fn nvlist_append_nvlist_array , or -.Fn nvlist_add_nvlist_array -functions. +.Fn nvlist_move_nvlist_array . .Pp The .Fn nvlist_get_pararr -function returns the next element in the array, or if not available -the parent of the nested nvlist. +function returns the next element after +.Fn nvl +from an array of nvlists. +If +.Fn nvl +is the last element in an array of nvlists, +the parent nvlist of +.Fa nvl is +returned. +If +.Fn nvl +is not in an array of nvlists, +.Dv NULL +is returned. .Pp The .Fn nvlist_take_bool , @@ -684,42 +757,38 @@ The .Fn nvlist_take_string_array , .Fn nvlist_take_nvlist_array , .Fn nvlist_take_descriptor_array -functions return value associated with the given name and remove the element -from the nvlist. -In case of string and binary values, the caller is responsible for free returned -memory using the +functions return the value of the element named +.Fa name +and remove the element from +.Fa nvl . +For string and binary buffer values, the caller is responsible for freeing +the returned value using the .Xr free 3 function. -In case of nvlist, the caller is responsible for destroying returned nvlist +For nvlist values, the caller is responsible for destroying the returned nvlist using the .Fn nvlist_destroy function. -In case of descriptor, the caller is responsible for closing returned descriptor +For file descriptor values, the caller is responsible for closing the +returned descriptor using the .Fn close 2 system call. -If an element of the given name does not exist, the program will be aborted. -To avoid that the caller should check for the existence of the given name -before trying to obtain the value, or use the -.Xr dnvlist 3 -extension, which can provide a default value in the case of a missing element. -In the case of an array of strings or binary values, the caller is responsible -for freeing every element of the array using the -.Xr free 3 -function. -In the case of an array of nvlists, the caller is responsible for destroying -every element of array using the -.Fn nvlist_destroy -function. -In the case of descriptors, the caller is responsible for closing every -element of array using the -.Fn close 2 -system call. -In every case involving an array, the caller must also free the pointer to -the array using the +For array values, the caller is responsible for destroying every element of +the array based on the element type. +In addition, the caller must also free the pointer to the array using the .Xr free 3 function. -The nvlist must not be in error state. +.Pp +If an element named +.Fa name +does not exist, the program aborts. +To avoid this, the caller should check for the existence of the element before +trying to obtain the value or use the +.Xr dnv 9 +extension which provides a default value in the case of a missing element. +.Pp +The nvlist must not be in the error state. .Pp The .Fn nvlist_append_bool_array , @@ -727,28 +796,46 @@ The .Fn nvlist_append_string_array , .Fn nvlist_append_nvlist_array , .Fn nvlist_append_descriptor_array -functions append an element to the existing array using the same semantics -as the add functions (i.e. the element will be copied when applicable). -If the array for a given key does not exist, then it will be created +functions append an element to an existing array using the same semantics +as the add functions (that is, the element will be copied when applicable). +If the array named +.Fa name +does not exist, then it will be created as if using the .Fn nvlist_add_<type>_array function. -The internal error is set on append failure. +If an error occurs while appending a new element, +an internal error is set on +.Fa nvl . .Pp The .Fn nvlist_free -function removes element of the given name from the nvlist (besides of its type) +function removes the first element named +.Fa name +from +.Fa nvl +(regardless of type) and frees all resources associated with it. -If element of the given name does not exist, the program will be aborted. -The nvlist must not be in error state. +If no element named +.Fa name +exists, the program aborts. +The nvlist must not be in the error state. .Pp The .Fn nvlist_free_type -function removes element of the given name and the given type from the nvlist +function removes the first element named +.Fa name +of type +.Fa type +from +.Fa nvl and frees all resources associated with it. -If element of the given name and the given type does not exist, the program -will be aborted. -The nvlist must not be in error state. +If no element named +.Fa name +of type +.Fa type +exists, the program aborts. +The nvlist must not be in the error state. .Pp The .Fn nvlist_free_null , @@ -763,20 +850,61 @@ The .Fn nvlist_free_string_array , .Fn nvlist_free_nvlist_array , .Fn nvlist_free_descriptor_array -functions remove element of the given name and the given type determined by the -function name from the nvlist and free all resources associated with it. -If element of the given name and the given type does not exist, the program -will be aborted. -The nvlist must not be in error state. -.Sh NOTES +functions remove the first element named +.Fa name +with the type determined by the function name from +.Fa nvl +free all resources associated with it. +If no element named +.Fa name +with the appropriate type exists, the program aborts. +The nvlist must not be in the error state. +.Ss Notes The .Fn nvlist_pack and .Fn nvlist_unpack -functions handle the byte-order conversions, so the binary buffer can be -packed/unpacked by the hosts with the different endianness. +functions handle byte-order conversions, so binary buffers can be +packed and unpacked on hosts with different endianness. +.Pp +The +.Fn nvlist_recv , +.Fn nvlist_send , +and +.Fn nvlist_xfer +functions can transfer nvlists between hosts with different endianness. +.Ss Kernel Considerations +The +.Nm nv , +.Nm cnv , +and +.Nm dnv +APIs can be used in the kernel with the following differences: +.Bl -bullet +.It +File descriptor and file descriptor array value types are not supported. +.It +.Fn nvlist_recv , +.Fn nvlist_send , +and +.Fn nvlist_xfer +are not supported. +.It +All memory allocations use the +.Dv M_NVLIST +memory type with +.Xr malloc 9 +and +.Xr free 9 . +As a result, any allocated buffers moved into an nvlist must be allocated with +.Dv M_NVLIST , +and buffers returned by functions such as +.Fn nvlist_pack +must be freed with +.Dv M_NVLIST . +.El .Sh EXAMPLES -The following example demonstrates how to prepare an nvlist and send it over +The following example demonstrates how to prepare an nvlist and send it over a .Xr unix 4 domain socket. .Bd -literal @@ -788,16 +916,18 @@ if (fd < 0) err(1, "open(\\"/tmp/foo\\") failed"); nvl = nvlist_create(0); + /* - * There is no need to check if nvlist_create() succeeded, + * There is no need to check if nvlist_create() succeeded * as the nvlist_add_<type>() functions can cope. * If it failed, nvlist_send() will fail. */ nvlist_add_string(nvl, "filename", "/tmp/foo"); nvlist_add_number(nvl, "flags", O_RDONLY); + /* * We just want to send the descriptor, so we can give it - * for the nvlist to consume (that's why we use nvlist_move + * for the nvlist to consume (that is why we use nvlist_move * not nvlist_add). */ nvlist_move_descriptor(nvl, "fd", fd); @@ -808,7 +938,7 @@ if (nvlist_send(sock, nvl) < 0) { nvlist_destroy(nvl); .Ed .Pp -Receiving nvlist and getting data: +Receiving an nvlist and retrieving element values: .Bd -literal nvlist_t *nvl; const char *command; @@ -819,25 +949,27 @@ nvl = nvlist_recv(sock, 0); if (nvl == NULL) err(1, "nvlist_recv() failed"); -/* For command we take pointer to nvlist's buffer. */ +/* For command we accept a pointer to the nvlist's internal buffer. */ command = nvlist_get_string(nvl, "command"); + /* * For filename we remove it from the nvlist and take * ownership of the buffer. */ filename = nvlist_take_string(nvl, "filename"); -/* The same for the descriptor. */ + +/* The same for the file descriptor. */ fd = nvlist_take_descriptor(nvl, "fd"); printf("command=%s filename=%s fd=%d\n", command, filename, fd); +/* command is freed by nvlist_destroy() */ nvlist_destroy(nvl); free(filename); close(fd); -/* command was freed by nvlist_destroy() */ .Ed .Pp -Iterating over nvlist: +Iterating over an nvlist: .Bd -literal nvlist_t *nvl; const char *name; @@ -900,7 +1032,7 @@ nvl = nvlist_recv(sock, 0); if (nvl == null) err(1, "nvlist_recv() failed"); -cookie = null; +cookie = NULL; do { while ((name = nvlist_next(nvl, &type, &cookie)) != NULL) { if (type == NV_TYPE_NVLIST) { @@ -933,8 +1065,7 @@ do { nvl = tmp; while ((name = nvlist_next(nvl, &type, &cookie)) != NULL) { if (type == NV_TYPE_NVLIST) { - nvl = nvlist_get_nvlist(nvl, - name); + nvl = nvlist_get_nvlist(nvl, name); cookie = NULL; } else if (type == NV_TYPE_NVLIST_ARRAY) { nvl = nvlist_get_nvlist_array(nvl, name, diff --git a/share/man/man9/nvmem.9 b/share/man/man9/nvmem.9 index fe06a98c29ce..812cd09a5e35 100644 --- a/share/man/man9/nvmem.9 +++ b/share/man/man9/nvmem.9 @@ -20,8 +20,6 @@ .\" (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 July 24, 2018 .Dt nvmem 9 .Os diff --git a/share/man/man9/ofw_bus_is_compatible.9 b/share/man/man9/ofw_bus_is_compatible.9 index 3f7dd0639716..1b44807e84e8 100644 --- a/share/man/man9/ofw_bus_is_compatible.9 +++ b/share/man/man9/ofw_bus_is_compatible.9 @@ -26,8 +26,6 @@ .\" (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 April 8, 2018 .Dt ofw_bus_is_compatible 9 .Os diff --git a/share/man/man9/ofw_bus_status_okay.9 b/share/man/man9/ofw_bus_status_okay.9 index c8861c6df106..8c77e777cb7f 100644 --- a/share/man/man9/ofw_bus_status_okay.9 +++ b/share/man/man9/ofw_bus_status_okay.9 @@ -26,8 +26,6 @@ .\" (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 April 8, 2018 .Dt ofw_bus_status_okay 9 .Os diff --git a/share/man/man9/ofw_graph.9 b/share/man/man9/ofw_graph.9 index becb5caffc1f..fe4b7a6b3b41 100644 --- a/share/man/man9/ofw_graph.9 +++ b/share/man/man9/ofw_graph.9 @@ -20,8 +20,6 @@ .\" (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 April 10, 2019 .Dt ofw_graph 9 .Os diff --git a/share/man/man9/osd.9 b/share/man/man9/osd.9 index c4060f409566..5e0e482914c3 100644 --- a/share/man/man9/osd.9 +++ b/share/man/man9/osd.9 @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd April 26, 2016 +.Dd October 07, 2024 .Dt OSD 9 .Os .Sh NAME @@ -51,7 +49,7 @@ .Fo osd_register .Fa "u_int type" .Fa "osd_destructor_t destructor" -.Fa "osd_method_t *methods" +.Fa "const osd_method_t *methods" .Fc .Ft void .Fo osd_deregister @@ -398,7 +396,7 @@ API. .Pp .Fn osd_get only acquires an -.Xr rmlock +.Xr rmlock 9 in read mode, therefore making it safe to use in the majority of contexts within the kernel including most fast paths. .Sh RETURN VALUES diff --git a/share/man/man9/owll.9 b/share/man/man9/owll.9 index a8b623a73a50..6df01ea2c748 100644 --- a/share/man/man9/owll.9 +++ b/share/man/man9/owll.9 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 22, 2016 .Dt OWLL 9 .Os diff --git a/share/man/man9/own.9 b/share/man/man9/own.9 index c508fb0944fd..b27ef82a8b45 100644 --- a/share/man/man9/own.9 +++ b/share/man/man9/own.9 @@ -21,8 +21,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 20, 2015 .Dt OWN 9 .Os diff --git a/share/man/man9/p_candebug.9 b/share/man/man9/p_candebug.9 index 722052a8c04d..be4710f0a15f 100644 --- a/share/man/man9/p_candebug.9 +++ b/share/man/man9/p_candebug.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Joseph Koshy <jkoshy@FreeBSD.org> +.\" Copyright (c) 2023 Olivier Certner <olce.freebsd@certner.fr> .\" .\" All rights reserved. .\" @@ -25,9 +26,7 @@ .\" (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 November 19, 2006 +.Dd August 18, 2023 .Dt P_CANDEBUG 9 .Os .Sh NAME @@ -39,24 +38,27 @@ .Ft int .Fn p_candebug "struct thread *td" "struct proc *p" .Sh DESCRIPTION -This function can be used to determine if a given process +This function determines if a given process .Fa p -is debuggable by the thread +is debuggable by some thread .Fa td . -.Sh SYSCTL VARIABLES +.Pp The following .Xr sysctl 8 variables directly influence the behaviour of .Fn p_candebug : .Bl -tag -width indent +.It Va security.bsd.unprivileged_proc_debug +Must be set to a non-zero value to allow unprivileged processes +access to the kernel's debug facilities. .It Va kern.securelevel Debugging of the init process is not allowed if this variable is .Li 1 or greater. -.It Va security.bsd.unprivileged_proc_debug -Must be set to a non-zero value to allow unprivileged processes -access to the kernel's debug facilities. .El +.Pp +Other such variables indirectly influence it; see +.Xr cr_bsd_visible 9 . .Sh RETURN VALUES The .Fn p_candebug @@ -70,35 +72,45 @@ is debuggable by thread or a non-zero error return value otherwise. .Sh ERRORS .Bl -tag -width Er -.It Bq Er EACCESS -The MAC subsystem denied debuggability. -.It Bq Er EAGAIN -Process -.Fa p -is in the process of being -.Fn exec Ns 'ed. .It Bq Er EPERM +An unprivileged process attempted to debug another process but the system is +configured to deny it +.Po +see +.Xr sysctl 8 +variable +.Va security.bsd.unprivileged_proc_debug +above +.Pc . +.It Bq Er ESRCH Thread .Fa td -lacks super-user credentials and process -.Fa p -is executing a set-user-ID or set-group-ID executable. +has been jailed and the process to debug does not belong to the same jail or one +of its sub-jails, as determined by +.Xr prison_check 9 . +.It Bq Er ESRCH +.Xr cr_bsd_visible 9 +denied visibility according to the BSD security policies in force. .It Bq Er EPERM Thread .Fa td -lacks super-user credentials and process +lacks superuser credentials and its (effective) group set is not a superset of +process .Fa p Ns 's -group set is not a subset of -.Fa td Ns 's -effective group set. +whole group set +.Pq "including real, effective and saved group IDs" . .It Bq Er EPERM Thread .Fa td -lacks super-user credentials and process -.Fa p Ns 's -user IDs do not match thread -.Fa td Ns 's -effective user ID. +lacks superuser credentials and its (effective) user ID does not match all user +IDs of process +.Fa p . +.It Bq Er EPERM +Thread +.Fa td +lacks superuser credentials and process +.Fa p +is executing a set-user-ID or set-group-ID executable. .It Bq Er EPERM Process .Fa p @@ -109,30 +121,25 @@ and the variable .Va kern.securelevel is greater than zero. -.It Bq Er ESRCH +.It Bq Er EBUSY Process .Fa p -is not visible to thread -.Fa td -as determined by -.Xr cr_seeotheruids 9 -or -.Xr cr_seeothergids 9 . -.It Bq Er ESRCH -Thread -.Fa td -has been jailed and process +is in the process of being +.Fn exec Ns 'ed. +.It Bq Er EPERM +Process .Fa p -does not belong to the same jail as -.Fa td . -.It Bq Er ESRCH -The MAC subsystem denied debuggability. +denied debuggability +.Po +see +.Xr procctl 2 , +command +.Dv PROC_TRACE_CTL +.Pc . .El .Sh SEE ALSO -.Xr jail 2 , -.Xr sysctl 8 , -.Xr cr_seeothergids 9 , -.Xr cr_seeotheruids 9 , +.Xr procctl 2 , +.Xr cr_bsd_visible 9 , .Xr mac 9 , .Xr p_cansee 9 , .Xr prison_check 9 diff --git a/share/man/man9/p_cansee.9 b/share/man/man9/p_cansee.9 index b94ec30ac103..7de0c9654995 100644 --- a/share/man/man9/p_cansee.9 +++ b/share/man/man9/p_cansee.9 @@ -24,21 +24,18 @@ .\" (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 November 19, 2006 +.Dd August 18, 2023 .Dt P_CANSEE 9 .Os .Sh NAME .Nm p_cansee .Nd determine visibility of a process .Sh SYNOPSIS -.In sys/param.h .In sys/proc.h .Ft int .Fn p_cansee "struct thread *td" "struct proc *p" .Sh DESCRIPTION -This function can be used to determine if a given process +This function determines if a given process .Fa p is visible to the thread .Fa td , @@ -47,13 +44,14 @@ where the notion of may be read as .Dq "awareness of existence" . .Pp -The function is implemented using -.Xr cr_cansee 9 , -and the dependencies on -.Xr sysctl 8 -variables documented in the -.Xr cr_cansee 9 -manual page apply. +This function explicitly allows a thread to always see its own process, +even with pending credentials changes +.Po +see +.Xr ucred 9 +.Pc . +Otherwise, it simply defers to +.Xr cr_cansee 9 . .Sh RETURN VALUES The .Fn p_cansee @@ -64,30 +62,18 @@ if the process denoted by .Fa p is visible by thread .Fa td , -or a non-zero error return value otherwise. +or ESRCH otherwise. .Sh ERRORS .Bl -tag -width Er .It Bq Er ESRCH -Process -.Fa p -is not visible to thread -.Fa td -as determined by -.Xr cr_cansee 9 . -.It Bq Er ESRCH Thread .Fa td -has been jailed and process +is not part of process .Fa p -does not belong to the same jail as -.Fa td . -.It Bq Er ESRCH -The MAC subsystem denied visibility. +and cannot see it as determined by +.Xr cr_cansee 9 . .El .Sh SEE ALSO -.Xr jail 2 , -.Xr sysctl 8 , .Xr cr_cansee 9 , -.Xr mac 9 , .Xr p_candebug 9 , -.Xr prison_check 9 +.Xr ucred 9 diff --git a/share/man/man9/panic.9 b/share/man/man9/panic.9 index c467b86dd5a1..ee422e45caef 100644 --- a/share/man/man9/panic.9 +++ b/share/man/man9/panic.9 @@ -1,7 +1,13 @@ .\" $NetBSD: panic.9,v 1.2 1996/10/09 17:20:04 explorer Exp $ .\" +.\" SPDX-License-Identifier: BSD-4-Clause +.\" .\" Copyright (c) 1996 Michael Graff. .\" All rights reserved. +.\" Copyright (c) 2023 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Mitchell Horne +.\" under sponsorship from the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -15,7 +21,7 @@ .\" must display the following acknowledgement: .\" This product includes software developed by Michael Graff .\" for the NetBSD Project. -.\" 3. The name of the author may not be used to endorse or promote products +.\" 4. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR @@ -29,9 +35,7 @@ .\" (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 April 23, 2015 +.Dd March 17, 2023 .Dt PANIC 9 .Os .Sh NAME @@ -40,10 +44,12 @@ .Sh SYNOPSIS .In sys/types.h .In sys/systm.h +.Vt extern char *panicstr; .Ft void .Fn panic "const char *fmt" ... .Ft void .Fn vpanic "const char *fmt" "va_list ap" +.Fn KERNEL_PANICKED .Sh DESCRIPTION The .Fn panic @@ -55,20 +61,97 @@ The message is a .Xr printf 3 style format string. -The message is printed to the console and the location -.Fa panicstr -is set to the address of the message text for retrieval from the OS -core dump. +The message is printed to the console and +.Va panicstr +is set pointing to the address of the message text. +This can be retrieved from a core dump at a later time. +.Pp +Upon entering the +.Fn panic +function the panicking thread disables interrupts and calls +.Xr critical_enter 9 . +This prevents the thread from being preempted or interrupted while the system +is still in a running state. +Next, it will instruct the other CPUs in the system to stop. +This synchronizes with other threads to prevent concurrent panic conditions +from interfering with one another. +In the unlikely event of concurrent panics, only one panicking thread will proceed. .Pp -If the kernel debugger is installed control is passed to it, otherwise -an attempt to save a core dump of the OS to a configured dump device -is made. +Control will be passed to the kernel debugger via +.Fn kdb_enter . +This is conditional on a debugger being installed and enabled by the +.Va debugger_on_panic +variable; see +.Xr ddb 4 +and +.Xr gdb 4 . +The debugger may initiate a system reset, or it may eventually return. .Pp +Finally, +.Xr kern_reboot 9 +is called to restart the system, and a kernel dump will be requested. If .Fn panic -is called twice (from the disk sync routines, for example) the system is -rebooted without syncing the disks. +is called recursively (from the disk sync routines, for example), +.Fn kern_reboot +will be instructed not to sync the disks. +.Pp +The +.Fn vpanic +function implements the main body of +.Fn panic . +It is suitable to be called by functions which perform their own +variable-length argument processing. +In all other cases, +.Fn panic +is preferred. +.Pp +The +.Fn KERNEL_PANICKED +macro is the preferred way to determine if the system has panicked. +It returns a boolean value. +Most often this is used to avoid taking an action that cannot possibly succeed +in a panic context. +.Sh EXECUTION CONTEXT +.\" TODO: This text describes the kernel debugger / kernel dump execution +.\" context as well. It could be moved to a future kdb(9) page, and this +.\" section would become a pointer. +Once the panic has been initiated, code executing in a panic context is subject +to the following restrictions: +.Bl -bullet +.It +Single-threaded execution. +The scheduler is disabled, and other CPUs are stopped/forced idle. +Functions that manipulate the scheduler state must be avoided. +This includes, but is not limited to, +.Xr wakeup 9 +and +.Xr sleepqueue 9 +functions. +.It +Interrupts are disabled. +Device I/O (e.g. to the console) must be achieved with polling. +.It +Dynamic memory allocation cannot be relied on, and must be avoided. +.It +Lock acquisition/release will be ignored, meaning these operations will appear +to succeed. +.It +Sleeping on a resource is not strictly prohibited, but will result in an +immediate return from the sleep function. +Time-based sleeps such as +.Xr pause 9 +may be performed as a busy-wait. +.El .Sh RETURN VALUES The .Fn panic -function does not return. +and +.Fn vpanic +functions do not return. +.Sh SEE ALSO +.Xr printf 3 , +.Xr ddb 4 , +.Xr gdb 4 , +.Xr KASSERT 9 , +.Xr kern_reboot 9 diff --git a/share/man/man9/pci.9 b/share/man/man9/pci.9 index 5dc9ef099a87..8f772e76ba99 100644 --- a/share/man/man9/pci.9 +++ b/share/man/man9/pci.9 @@ -23,19 +23,19 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd May 20, 2021 +.Dd March 27, 2025 .Dt PCI 9 .Os .Sh NAME .Nm pci , .Nm pci_alloc_msi , .Nm pci_alloc_msix , +.Nm pci_clear_pme , .Nm pci_disable_busmaster , .Nm pci_disable_io , .Nm pci_enable_busmaster , .Nm pci_enable_io , +.Nm pci_enable_pme , .Nm pci_find_bsf , .Nm pci_find_cap , .Nm pci_find_dbsf , @@ -52,6 +52,7 @@ .Nm pci_get_powerstate , .Nm pci_get_vpd_ident , .Nm pci_get_vpd_readonly , +.Nm pci_has_pm , .Nm pci_iov_attach , .Nm pci_iov_attach_name , .Nm pci_iov_detach , @@ -83,6 +84,8 @@ .Fn pci_alloc_msi "device_t dev" "int *count" .Ft int .Fn pci_alloc_msix "device_t dev" "int *count" +.Ft void +.Fn pci_clear_pme "device_t dev" .Ft int .Fn pci_disable_busmaster "device_t dev" .Ft int @@ -91,6 +94,8 @@ .Fn pci_enable_busmaster "device_t dev" .Ft int .Fn pci_enable_io "device_t dev" "int space" +.Ft void +.Fn pci_enable_pme "device_t dev" .Ft device_t .Fn pci_find_bsf "uint8_t bus" "uint8_t slot" "uint8_t func" .Ft int @@ -123,6 +128,8 @@ .Fn pci_get_vpd_ident "device_t dev" "const char **identptr" .Ft int .Fn pci_get_vpd_readonly "device_t dev" "const char *kw" "const char **vptr" +.Ft bool +.Fn pci_has_pm "device_t dev" .Ft int .Fn pci_msi_count "device_t dev" .Ft int @@ -357,6 +364,12 @@ When no more instances are located returns an error. .Pp The +.Fn pci_has_pm +function returns true if +.Fa dev +supports power management. +.Pp +The .Fn pci_find_extcap function is used to locate the first instance of a PCI-express extended capability register set for the device @@ -672,6 +685,16 @@ then the function will fail with .Er EOPNOTSUPP . .Pp The +.Fn pci_clear_pme +function is used to clear any pending PME# signal and disable generation +of power management events. +.Pp +The +.Fn pci_enable_pme +function is used to enable generation of power management events before +suspending a device. +.Pp +The .Fn pci_iov_attach function is used to advertise that the given device .Pq and associated device driver diff --git a/share/man/man9/pci_iov_schema.9 b/share/man/man9/pci_iov_schema.9 index b065b2e78dae..99589b59fb91 100644 --- a/share/man/man9/pci_iov_schema.9 +++ b/share/man/man9/pci_iov_schema.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 8, 2015 .Dt PCI_IOV_SCHEMA 9 .Os @@ -40,7 +38,7 @@ .Nm pci_iov_schema_add_unicast_mac .Nd PCI SR-IOV config schema interface .Sh SYNOPSIS -.In machine/stdarg.h +.In sys/stdarg.h .In sys/nv.h .In sys/iov_schema.h .Ft nvlist_t * diff --git a/share/man/man9/pfil.9 b/share/man/man9/pfil.9 index 620d024bf8d1..63eb3da8f2a3 100644 --- a/share/man/man9/pfil.9 +++ b/share/man/man9/pfil.9 @@ -27,8 +27,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 28, 2019 .Dt PFIL 9 .Os diff --git a/share/man/man9/pfind.9 b/share/man/man9/pfind.9 index 5a3f5caf1344..ebcf7a565150 100644 --- a/share/man/man9/pfind.9 +++ b/share/man/man9/pfind.9 @@ -22,9 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 11, 2001 +.Dd December 3, 2024 .Dt PFIND 9 .Os .Sh NAME @@ -36,7 +34,9 @@ .Ft "struct proc *" .Fn pfind "pid_t pid" .Ft "struct proc *" -.Fn zpfind "pid_t pid" +.Fn pfind_any "pid_t pid" +.Ft "struct proc *" +.Fn pfind_any_locked "pid_t pid" .Sh DESCRIPTION .Fn pfind takes a @@ -49,36 +49,39 @@ is on the .Va allproc list. .Pp -.Fn zpfind +.Fn pfind_any takes a .Fa pid as its argument. -If -.Fn zpfind -finds a process whose PID is equal to that of argument -and is a zombie process, meaning that it must reside on the -.Va zombproc -list, -.Fn zpfind -returns a pointer to that -.Vt proc -structure. +.Fn pfind_any +searches the +.Va allproc +list and returns the first process whose PID matches and whose state is +.Va PRS_ZOMBIE . .Pp -Both -.Fn pfind +.Fn pfind_any_locked +is similar to +.Fn pfind_any +,but it does not lock the process hash bucket +for the given +.Vt pid . +Instead, it asserts the corresponding process hash bucket is already locked. +All three functions +.Fn pfind , +.Fn pfind_any , and -.Fn zpfind +.Fn pgfind_any_locked lock the .Vt proc -structure that is returned using -.Fn PROC_LOCK "p" . +structure before returning. .Sh RETURN VALUES -.Fn pfind +.Fn pfind , +.Fn pfind_any , and -.Fn zpfind -return a pointer to a +.Fn pfind_any_locked +return pointer to a .Vt proc -structure on success and a +structure on success or .Dv NULL on failure. .Sh SEE ALSO diff --git a/share/man/man9/pget.9 b/share/man/man9/pget.9 index 12eda29ca7c8..af292d2180b1 100644 --- a/share/man/man9/pget.9 +++ b/share/man/man9/pget.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 3, 2014 .Dt PGET 9 .Os diff --git a/share/man/man9/pgfind.9 b/share/man/man9/pgfind.9 index 5a2cf289f64b..58e2e290fc2a 100644 --- a/share/man/man9/pgfind.9 +++ b/share/man/man9/pgfind.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 8, 2001 .Dt PGFIND 9 .Os diff --git a/share/man/man9/physio.9 b/share/man/man9/physio.9 index 977c4677df84..09f2886cf07b 100644 --- a/share/man/man9/physio.9 +++ b/share/man/man9/physio.9 @@ -27,8 +27,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 19, 2012 .Dt PHYSIO 9 .Os diff --git a/share/man/man9/pmap.9 b/share/man/man9/pmap.9 index 0b1987a19d3b..8c86f44d9ff2 100644 --- a/share/man/man9/pmap.9 +++ b/share/man/man9/pmap.9 @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd August 30, 2016 +.Dd January 12, 2024 .Dt PMAP 9 .Os .Sh NAME @@ -96,9 +94,9 @@ operation. .Xr pmap_extract_and_hold 9 , .Xr pmap_growkernel 9 , .Xr pmap_init 9 , -.Xr pmap_init2 9 , .Xr pmap_is_modified 9 , .Xr pmap_is_prefaultable 9 , +.Xr pmap_kextract 9 , .Xr pmap_map 9 , .Xr pmap_mincore 9 , .Xr pmap_object_init_pt 9 , @@ -106,7 +104,6 @@ operation. .Xr pmap_page_init 9 , .Xr pmap_pinit 9 , .Xr pmap_pinit0 9 , -.Xr pmap_pinit2 9 , .Xr pmap_protect 9 , .Xr pmap_qenter 9 , .Xr pmap_qremove 9 , diff --git a/share/man/man9/pmap_activate.9 b/share/man/man9/pmap_activate.9 index 8d9f0504c02b..9a3989833c45 100644 --- a/share/man/man9/pmap_activate.9 +++ b/share/man/man9/pmap_activate.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 21, 2003 .Dt PMAP_ACTIVATE 9 .Os diff --git a/share/man/man9/pmap_clear_modify.9 b/share/man/man9/pmap_clear_modify.9 index a873c91df9ad..708ea1aa4687 100644 --- a/share/man/man9/pmap_clear_modify.9 +++ b/share/man/man9/pmap_clear_modify.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 17, 2014 .Dt PMAP_CLEAR_MODIFY 9 .Os diff --git a/share/man/man9/pmap_copy.9 b/share/man/man9/pmap_copy.9 index 4899b6d970c6..cfc2428232dd 100644 --- a/share/man/man9/pmap_copy.9 +++ b/share/man/man9/pmap_copy.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 21, 2003 .Dt PMAP_COPY 9 .Os diff --git a/share/man/man9/pmap_enter.9 b/share/man/man9/pmap_enter.9 index 564c91d2f4f0..d4b8dd7eccd5 100644 --- a/share/man/man9/pmap_enter.9 +++ b/share/man/man9/pmap_enter.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 16, 2018 .Dt PMAP_ENTER 9 .Os diff --git a/share/man/man9/pmap_extract.9 b/share/man/man9/pmap_extract.9 index 77f3b47ec51e..896558797c74 100644 --- a/share/man/man9/pmap_extract.9 +++ b/share/man/man9/pmap_extract.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 21, 2003 .Dt PMAP_EXTRACT 9 .Os diff --git a/share/man/man9/pmap_growkernel.9 b/share/man/man9/pmap_growkernel.9 index 1385ddcb1273..4a39ed279fac 100644 --- a/share/man/man9/pmap_growkernel.9 +++ b/share/man/man9/pmap_growkernel.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 21, 2003 .Dt PMAP_GROWKERNEL 9 .Os diff --git a/share/man/man9/pmap_init.9 b/share/man/man9/pmap_init.9 index b377208231d6..3ca609d0d3fd 100644 --- a/share/man/man9/pmap_init.9 +++ b/share/man/man9/pmap_init.9 @@ -23,14 +23,11 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd June 10, 2005 +.Dd January 12, 2024 .Dt PMAP_INIT 9 .Os .Sh NAME -.Nm pmap_init , -.Nm pmap_init2 +.Nm pmap_init .Nd initialize the pmap subsystem .Sh SYNOPSIS .In sys/param.h @@ -38,8 +35,6 @@ .In vm/pmap.h .Ft void .Fn pmap_init "void" -.Ft void -.Fn pmap_init2 "void" .Sh DESCRIPTION The .Fn pmap_init @@ -47,17 +42,10 @@ function initializes the .Xr pmap 9 sub-system. It is called during system initialization by -.Fn vm_init , +.Fn vm_mem_init , to initialize any structures that the .Nm system needs in order to map between physical and virtual memory. -.Pp -The -.Fn pmap_init2 -function initializes a zone for the PV entries. -These are used to implement page sharing at the physical level. -A high water mark is set so that the system can recover from -excessive numbers of PV entries. .Sh SEE ALSO .Xr pmap 9 .Sh AUTHORS diff --git a/share/man/man9/pmap_is_modified.9 b/share/man/man9/pmap_is_modified.9 index 66493cda651e..4f6a15b8ba3a 100644 --- a/share/man/man9/pmap_is_modified.9 +++ b/share/man/man9/pmap_is_modified.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 17, 2014 .Dt PMAP_IS_MODIFIED 9 .Os @@ -36,7 +34,7 @@ .In sys/param.h .In vm/vm.h .In vm/pmap.h -.Ft boolean_t +.Ft bool .Fn pmap_is_modified "vm_page_t m" .Ft int .Fn pmap_ts_referenced "vm_page_t m" diff --git a/share/man/man9/pmap_is_prefaultable.9 b/share/man/man9/pmap_is_prefaultable.9 index 9c3a7490e732..eb8bd54c2953 100644 --- a/share/man/man9/pmap_is_prefaultable.9 +++ b/share/man/man9/pmap_is_prefaultable.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 21, 2003 .Dt PMAP_IS_PREFAULTABLE 9 .Os @@ -35,7 +33,7 @@ .In sys/param.h .In vm/vm.h .In vm/pmap.h -.Ft boolean_t +.Ft bool .Fn pmap_is_prefaultable "pmap_t pmap" "vm_offset_t va" .Sh DESCRIPTION The diff --git a/share/man/man9/pmap_kextract.9 b/share/man/man9/pmap_kextract.9 new file mode 100644 index 000000000000..a93bbc70b351 --- /dev/null +++ b/share/man/man9/pmap_kextract.9 @@ -0,0 +1,77 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023 The FreeBSD Foundation +.\" +.\" This manual page was written by Mina Galić <FreeBSD@igalic.co> under +.\" sponsorship from the FreeBSD Foundation. +.\" +.Dd October 16, 2023 +.Dt PMAP_KEXTRACT 9 +.Os +.Sh NAME +.Nm pmap_kextract , +.Nm vtophys +.Nd extract a physical address from the kernel page table +.Sh SYNOPSIS +.In sys/param.h +.In vm/vm.h +.In vm/pmap.h +.Ft vm_paddr_t +.Fo pmap_kextract +.Fa "vm_offset_t va" +.Fc +.Ft vm_paddr_t +.Fo vtophys +.Fa "vm_offset_t va" +.Fc +.Sh DESCRIPTION +The +.Fn pmap_kextract +function retrieves the underlying physical memory address corresponding to the +given kernel virtual address +.Fa va . +The caller is responsible for ensuring that +.Fa va +belongs to a valid mapping in the kernel address space. +The returned physical address is only meaningful as long as the mapping remains +stable, so the caller must also have some knowledge or guarantee of the +mapping's lifetime. +For example, it is invalid to call +.Fn pmap_kextract +with the address of a malloc'd object while there is a possibility for that +object to be freed concurrently. +.Pp +Unlike +.Xr pmap_extract 9 , +.Fn pmap_kextract +is safe to be called from any context; it has no internal locking or sleep. +.Pp +.Fn vtophys +is an alias for +.Fn pmap_kextract +and behaves identically. +.Sh RETURN VALUES +The +.Fn pmap_kextract +function returns the physical address of memory mapped at the kernel +virtual address +.Fa va . +.Pp +.Fn pmap_kextract +generally does not fail. +However, if supplied with an illegitimate value for +.Fa va , +the function may return zero, an invalid non-zero value, or call +.Xr panic 9 . +.Sh SEE ALSO +.Xr pmap 9 , +.Xr pmap_extract 9 +.Sh AUTHORS +.An -nosplit +This manual page was written by +.An Mina Galić Aq Mt FreeBSD@igalic.co , +based on the +.Xr pmap_extract 9 +page written by +.An Bruce M Simpson Aq Mt bms@spc.org . diff --git a/share/man/man9/pmap_map.9 b/share/man/man9/pmap_map.9 index f813a217ce9c..9af182864776 100644 --- a/share/man/man9/pmap_map.9 +++ b/share/man/man9/pmap_map.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 21, 2003 .Dt PMAP_MAP 9 .Os diff --git a/share/man/man9/pmap_mincore.9 b/share/man/man9/pmap_mincore.9 index 383387cfdb4a..38c3f9ac071e 100644 --- a/share/man/man9/pmap_mincore.9 +++ b/share/man/man9/pmap_mincore.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 21, 2003 .Dt PMAP_MINCORE 9 .Os diff --git a/share/man/man9/pmap_object_init_pt.9 b/share/man/man9/pmap_object_init_pt.9 index f87c8a9fc56a..a4c6f804fa55 100644 --- a/share/man/man9/pmap_object_init_pt.9 +++ b/share/man/man9/pmap_object_init_pt.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 21, 2003 .Dt PMAP_OBJECT_INIT_PT 9 .Os diff --git a/share/man/man9/pmap_page_exists_quick.9 b/share/man/man9/pmap_page_exists_quick.9 index cc377ab7793a..030d0e1fdddd 100644 --- a/share/man/man9/pmap_page_exists_quick.9 +++ b/share/man/man9/pmap_page_exists_quick.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 21, 2003 .Dt PMAP_PAGE_EXISTS_QUICK 9 .Os @@ -35,7 +33,7 @@ .In sys/param.h .In vm/vm.h .In vm/pmap.h -.Ft boolean_t +.Ft bool .Fn pmap_page_exists_quick "pmap_t pmap" "vm_page_t m" .Sh DESCRIPTION The @@ -48,13 +46,13 @@ It is typically called from the VM paging code. .Sh IMPLEMENTATION NOTES The PV count used above may be changed upwards or downwards in future; it is only necessary that -.Dv TRUE +.Dv true be returned for a small subset of pmaps for proper page aging. .Sh RETURN VALUES The .Fn pmap_page_exists_quick returns -.Dv TRUE +.Dv true only if the PV entry for the physical map .Fa pmap is one of the first 16 PVs linked from the page diff --git a/share/man/man9/pmap_page_init.9 b/share/man/man9/pmap_page_init.9 index d6787e36aa11..4e39f855a426 100644 --- a/share/man/man9/pmap_page_init.9 +++ b/share/man/man9/pmap_page_init.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 10, 2005 .Dt PMAP_PAGE_INIT 9 .Os diff --git a/share/man/man9/pmap_pinit.9 b/share/man/man9/pmap_pinit.9 index f001e7454744..8ef16a69e5fe 100644 --- a/share/man/man9/pmap_pinit.9 +++ b/share/man/man9/pmap_pinit.9 @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 21, 2003 +.Dd January 12, 2024 .Dt PMAP_PINIT 9 .Os .Sh NAME @@ -54,11 +52,6 @@ The function initializes the physical map .Fa pm , associated with process 0, the first process created in the system. -.Sh IMPLEMENTATION NOTES -The -.Fn pmap_pinit2 -function has been deprecated, and should be implemented as a stub -until further notice. .Sh SEE ALSO .Xr pmap 9 , .Xr pmap_growkernel 9 diff --git a/share/man/man9/pmap_protect.9 b/share/man/man9/pmap_protect.9 index 659dc6db6a2d..80959ced0a35 100644 --- a/share/man/man9/pmap_protect.9 +++ b/share/man/man9/pmap_protect.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 18, 2014 .Dt PMAP_PROTECT 9 .Os diff --git a/share/man/man9/pmap_qenter.9 b/share/man/man9/pmap_qenter.9 index d72174f15a30..bf7b79f2fc03 100644 --- a/share/man/man9/pmap_qenter.9 +++ b/share/man/man9/pmap_qenter.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 15, 2018 .Dt PMAP_QENTER 9 .Os diff --git a/share/man/man9/pmap_quick_enter_page.9 b/share/man/man9/pmap_quick_enter_page.9 index 2089dd98a932..418b657d9f7a 100644 --- a/share/man/man9/pmap_quick_enter_page.9 +++ b/share/man/man9/pmap_quick_enter_page.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 6, 2015 .Dt PMAP_QUICK_ENTER_PAGE 9 .Os diff --git a/share/man/man9/pmap_release.9 b/share/man/man9/pmap_release.9 index b328bd852c89..b343c4c66786 100644 --- a/share/man/man9/pmap_release.9 +++ b/share/man/man9/pmap_release.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 21, 2003 .Dt PMAP_RELEASE 9 .Os diff --git a/share/man/man9/pmap_remove.9 b/share/man/man9/pmap_remove.9 index 4426f0de7d42..0b48b92b52fa 100644 --- a/share/man/man9/pmap_remove.9 +++ b/share/man/man9/pmap_remove.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 21, 2003 .Dt PMAP_REMOVE 9 .Os diff --git a/share/man/man9/pmap_resident_count.9 b/share/man/man9/pmap_resident_count.9 index 343dc7cc5cf1..fae1f759c0d6 100644 --- a/share/man/man9/pmap_resident_count.9 +++ b/share/man/man9/pmap_resident_count.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 21, 2003 .Dt PMAP_RESIDENT_COUNT 9 .Os diff --git a/share/man/man9/pmap_unwire.9 b/share/man/man9/pmap_unwire.9 index 964eff9a469f..ca36d4e07205 100644 --- a/share/man/man9/pmap_unwire.9 +++ b/share/man/man9/pmap_unwire.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 17, 2014 .Dt PMAP_UNWIRE 9 .Os diff --git a/share/man/man9/pmap_zero_page.9 b/share/man/man9/pmap_zero_page.9 index 52e76520ec40..82cf9ccf79ee 100644 --- a/share/man/man9/pmap_zero_page.9 +++ b/share/man/man9/pmap_zero_page.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 30, 2016 .Dt PMAP_ZERO 9 .Os diff --git a/share/man/man9/printf.9 b/share/man/man9/printf.9 index 4d3a6fb8b2a5..9f026d1d2004 100644 --- a/share/man/man9/printf.9 +++ b/share/man/man9/printf.9 @@ -24,9 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd May 9, 2020 +.Dd April 25, 2023 .Dt PRINTF 9 .Os .Sh NAME @@ -94,11 +92,13 @@ and a These are used as a register value and a print mask for decoding bitmasks. The print mask is made up of two parts: the base and the arguments. -The base value is the output base expressed as an integer value; +The base value is the output base (radix) expressed as an octal value; for example, \e10 gives octal and \e20 gives hexadecimal. The arguments are made up of a sequence of bit identifiers. -Each bit identifier begins with an integer value which is the number of the -bit (starting from 1) this identifier describes. +Each bit identifier begins with an +.Em octal +value which is the number of the bit (starting from 1) this identifier +describes. The rest of the identifier is a string of characters containing the name of the bit. The string is terminated by either the bit number at the start of the next @@ -164,14 +164,14 @@ printf_test(void) { printf("reg=%b\en", 3, "\e10\e2BITTWO\e1BITONE"); - printf("out: %4D\en", "AAAA", ":"); + printf("out: %4D\en", "AAZZ", ":"); } .Ed .Pp will produce the following output: .Bd -literal -offset indent reg=3<BITTWO,BITONE> -out: 41:41:41:41 +out: 41:41:5a:5a .Ed .Pp The call diff --git a/share/man/man9/prison_check.9 b/share/man/man9/prison_check.9 index 4fe1f2f4eec4..7f174e3ceb2e 100644 --- a/share/man/man9/prison_check.9 +++ b/share/man/man9/prison_check.9 @@ -25,24 +25,23 @@ .\" (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 11, 2003 +.Dd August 18, 2023 .Dt PRISON_CHECK 9 .Os .Sh NAME .Nm prison_check -.Nd determine if two credentials belong to the same jail +.Nd determine if subjects may see entities according to jail restrictions .Sh SYNOPSIS .In sys/jail.h .Ft int .Fn prison_check "struct ucred *cred1" "struct ucred *cred2" .Sh DESCRIPTION -This function can be used to determine if the two credentials +This function determines if a subject with credentials .Fa cred1 -and +is denied access to subjects or objects with credentials .Fa cred2 -belong to the same jail. +according to the policy that a subject can see subjects or objects in its own +jail or any sub-jail of it. .Sh RETURN VALUES The .Fn prison_check @@ -50,12 +49,9 @@ function returns .Er ESRCH if -.Fa cred1 -has been jailed, and -.Fa cred1 -and .Fa cred2 -do not belong to the same jail. +is not in the same jail or a sub-jail of that of +.Fa cred1 . In all other cases, .Fn prison_check returns zero. diff --git a/share/man/man9/priv.9 b/share/man/man9/priv.9 index 93dce23855c1..80d0542e9bdf 100644 --- a/share/man/man9/priv.9 +++ b/share/man/man9/priv.9 @@ -26,8 +26,6 @@ .\" 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 19, 2018 .Dt PRIV 9 .Os diff --git a/share/man/man9/prng.9 b/share/man/man9/prng.9 index 20cfcf910442..9fcc6f1e3fab 100644 --- a/share/man/man9/prng.9 +++ b/share/man/man9/prng.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 5, 2020 .Dt PRNG 9 .Os diff --git a/share/man/man9/proc_rwmem.9 b/share/man/man9/proc_rwmem.9 index 10a4773ad0dc..fb59502608af 100644 --- a/share/man/man9/proc_rwmem.9 +++ b/share/man/man9/proc_rwmem.9 @@ -21,8 +21,6 @@ .\" (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, 2015 .Dt PROC_RWMEM 9 .Os diff --git a/share/man/man9/pseudofs.9 b/share/man/man9/pseudofs.9 index 98ccc6cae7b9..d87bbb0030c7 100644 --- a/share/man/man9/pseudofs.9 +++ b/share/man/man9/pseudofs.9 @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2001 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2001 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 20, 2007 .Dt PSEUDOFS 9 .Os @@ -38,9 +36,9 @@ The .Nm module offers an abstract API for pseudo-file systems such as -.Xr procfs 5 +.Xr procfs 4 and -.Xr linprocfs 5 . +.Xr linprocfs 4 . It takes care of all the hairy bits like interfacing with the VFS system, enforcing access control, keeping track of file numbers, and cloning files and directories that are process-specific. @@ -53,9 +51,9 @@ and callbacks that report file attributes or write the actual file contents into sbufs. .\" Insert more info here .Sh SEE ALSO -.Xr linprocfs 5 , -.Xr linsysfs 5 , -.Xr procfs 5 , +.Xr linprocfs 4 , +.Xr linsysfs 4 , +.Xr procfs 4 , .Xr sbuf 9 , .Xr vnode 9 .Sh HISTORY diff --git a/share/man/man9/psignal.9 b/share/man/man9/psignal.9 index aa170322e7cf..2d57673d0401 100644 --- a/share/man/man9/psignal.9 +++ b/share/man/man9/psignal.9 @@ -26,16 +26,14 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .\" $NetBSD: psignal.9,v 1.1 1996/06/22 22:57:35 pk Exp $ -.\" $FreeBSD$ .\" -.Dd October 8, 2011 +.Dd July 14, 2023 .Dt PSIGNAL 9 .Os .Sh NAME .Nm psignal , .Nm kern_psignal , .Nm pgsignal , -.Nm gsignal , .Nm tdsignal .Nd post signal to a thread, process, or process group .Sh SYNOPSIS @@ -46,8 +44,6 @@ .Ft void .Fn pgsignal "struct pgrp *pgrp" "int signum" "int checkctty" .Ft void -.Fn gsignal "int pgid" "int signum" -.Ft void .Fn tdsignal "struct thread *td" "int signum" .Sh DESCRIPTION These functions post a signal to a thread or one or more processes. @@ -129,24 +125,6 @@ is no action is taken. .Pp The -.Fn gsignal -function posts signal number -.Fa signum -to each member of the process group identified by the group id -.Fa pgid . -.Fn gsignal -first finds the group structure associated with -.Fa pgid , -then invokes -.Fn pgsignal -with the argument -.Fa checkctty -set to zero. -If -.Fa pgid -is zero no action is taken. -.Pp -The .Fn tdsignal function posts signal number .Fa signum diff --git a/share/man/man9/pwmbus.9 b/share/man/man9/pwmbus.9 index 858a27b9afe3..1cd10d6f92db 100644 --- a/share/man/man9/pwmbus.9 +++ b/share/man/man9/pwmbus.9 @@ -20,8 +20,6 @@ .\" (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 March 9, 2021 .Dt PWMBUS 9 .Os diff --git a/share/man/man9/random.9 b/share/man/man9/random.9 index 1c5f962b1363..f1833c63a2ff 100644 --- a/share/man/man9/random.9 +++ b/share/man/man9/random.9 @@ -23,10 +23,8 @@ .\" 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 March 22, 2021 +.Dd May 11, 2025 .Dt RANDOM 9 .Os .Sh NAME @@ -135,7 +133,7 @@ The deprecated .Fn random function will return a 31-bit value. It is obsolete and scheduled to be removed in -.Fx 14.0 . +.Fx 16.0 . Consider .Xr prng 9 instead and see diff --git a/share/man/man9/random_harvest.9 b/share/man/man9/random_harvest.9 index 6ae643ba2fb1..0f98d77bcc18 100644 --- a/share/man/man9/random_harvest.9 +++ b/share/man/man9/random_harvest.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 26, 2018 .Dt RANDOM_HARVEST 9 .Os diff --git a/share/man/man9/ratecheck.9 b/share/man/man9/ratecheck.9 index 9e02caf7e1cc..71f19839226f 100644 --- a/share/man/man9/ratecheck.9 +++ b/share/man/man9/ratecheck.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 11, 2022 .Dt RATECHECK 9 .Os diff --git a/share/man/man9/redzone.9 b/share/man/man9/redzone.9 index 6328236ced5d..f9a5cef6e5f5 100644 --- a/share/man/man9/redzone.9 +++ b/share/man/man9/redzone.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 9, 2009 .Dt REDZONE 9 .Os diff --git a/share/man/man9/refcount.9 b/share/man/man9/refcount.9 index 9171062a70b6..78631f9a865a 100644 --- a/share/man/man9/refcount.9 +++ b/share/man/man9/refcount.9 @@ -3,7 +3,7 @@ .\" Written by: John H. Baldwin <jhb@FreeBSD.org> .\" All rights reserved. .\" -.\" Copyright (c) 2019 The FreeBSD Foundation, Inc. +.\" Copyright (c) 2019 The FreeBSD Foundation .\" .\" Parts of this documentation was written by .\" Konstantin Belousov <kib@FreeBSD.org> under sponsorship @@ -30,9 +30,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd November 2, 2020 +.Dd October 12, 2022 .Dt REFCOUNT 9 .Os .Sh NAME @@ -48,7 +46,7 @@ .Fn refcount_init "volatile u_int *count" "u_int value" .Ft u_int .Fn refcount_load "volatile u_int *count" -.Ft void +.Ft u_int .Fn refcount_acquire "volatile u_int *count" .Ft bool .Fn refcount_acquire_checked "volatile u_int *count" @@ -91,6 +89,7 @@ qualifier. The .Fn refcount_acquire function is used to acquire a new reference. +It returns the counter value before the new reference was acquired. The caller is responsible for ensuring that it holds a valid reference while obtaining a new reference. For example, diff --git a/share/man/man9/resettodr.9 b/share/man/man9/resettodr.9 index 9818c8fd435b..a697500bc15d 100644 --- a/share/man/man9/resettodr.9 +++ b/share/man/man9/resettodr.9 @@ -29,8 +29,6 @@ .\" (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 November 13, 1995 .Dt RESETTODR 9 .Os diff --git a/share/man/man9/resource_int_value.9 b/share/man/man9/resource_int_value.9 index 3eed8761f63b..08efe41a29de 100644 --- a/share/man/man9/resource_int_value.9 +++ b/share/man/man9/resource_int_value.9 @@ -22,8 +22,6 @@ .\" (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 March 1, 2001 .Dt RESOURCE_INT_VALUE 9 .Os diff --git a/share/man/man9/rijndael.9 b/share/man/man9/rijndael.9 index 1d8d90412b0e..0084b3adfeb1 100644 --- a/share/man/man9/rijndael.9 +++ b/share/man/man9/rijndael.9 @@ -23,8 +23,6 @@ .\" 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 February 6, 2002 .Dt RIJNDAEL 9 diff --git a/share/man/man9/rman.9 b/share/man/man9/rman.9 index a5a8c34cde90..d175b60b4010 100644 --- a/share/man/man9/rman.9 +++ b/share/man/man9/rman.9 @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd May 20, 2016 +.Dd March 13, 2024 .Dt RMAN 9 .Os .Sh NAME @@ -42,7 +40,6 @@ .Nm rman_last_free_region , .Nm rman_release_resource , .Nm rman_reserve_resource , -.Nm rman_reserve_resource_bound , .Nm rman_make_alignment_flags , .Nm rman_get_start , .Nm rman_get_end , @@ -58,7 +55,9 @@ .Nm rman_set_bushandle , .Nm rman_get_bushandle , .Nm rman_set_rid , -.Nm rman_get_rid +.Nm rman_get_rid , +.Nm rman_set_type , +.Nm rman_get_type .Nd resource management functions .Sh SYNOPSIS .In sys/types.h @@ -90,11 +89,6 @@ .Fa "struct rman *rm" "rman_res_t start" "rman_res_t end" "rman_res_t count" .Fa "u_int flags" "device_t dev" .Fc -.Ft "struct resource *" -.Fo rman_reserve_resource_bound -.Fa "struct rman *rm" "rman_res_t start" "rman_res_t end" "rman_res_t count" -.Fa "rman_res_t bound" "u_int flags" "device_t dev" -.Fc .Ft uint32_t .Fn rman_make_alignment_flags "uint32_t size" .Ft rman_res_t @@ -127,6 +121,10 @@ .Fn rman_set_rid "struct resource *r" "int rid" .Ft int .Fn rman_get_rid "struct resource *r" +.Ft void +.Fn rman_set_type "struct resource *r" "int type" +.Ft int +.Fn rman_get_type "struct resource *r" .Sh DESCRIPTION The .Nm @@ -262,7 +260,7 @@ and are set to the bounds of the free region and zero is returned. .Pp The -.Fn rman_reserve_resource_bound +.Fn rman_reserve_resource function is where the bulk of the .Nm logic is located. @@ -275,7 +273,7 @@ The caller can specify the and .Fa end of an acceptable range, -as well as a boundary restriction and required alignment, +required alignment, and the code will attempt to find a free segment which fits. The .Fa start @@ -292,15 +290,13 @@ The alignment requirement .Pq if any is specified in .Fa flags . -The -.Fa bound -argument may be set to specify a boundary restriction such that an -allocated region may cross an address that is a multiple of the -boundary. -The -.Fa bound -argument must be a power of two. -It may be set to zero to specify no boundary restriction. +Often the +.Dv RF_ALIGNMENT_LOG2 +macro is used to specify alignment to a power-of-2 size, or +.Fn rman_make_alignment_flags +can be used to compute the +.Fa flags +value at runtime. A shared segment will be allocated if the .Dv RF_SHAREABLE flag is set, otherwise an exclusive segment will be allocated. @@ -308,15 +304,6 @@ If this shared segment already exists, the caller has its device added to the list of consumers. .Pp The -.Fn rman_reserve_resource -function is used to reserve resources within a previously established region. -It is a simplified interface to -.Fn rman_reserve_resource_bound -which passes 0 for the -.Fa bound -argument. -.Pp -The .Fn rman_make_alignment_flags function returns the flag mask corresponding to the desired alignment .Fa size . @@ -459,6 +446,14 @@ The function retrieves this RID. .Pp The +.Fn rman_set_type +function associates a resource type with a resource +.Fa r . +The +.Fn rman_get_type +function retrieves this type. +.Pp +The .Fn rman_get_device function returns a pointer to the device which reserved the resource .Fa r . diff --git a/share/man/man9/rmlock.9 b/share/man/man9/rmlock.9 index 283bd1b4fbb2..777492f89939 100644 --- a/share/man/man9/rmlock.9 +++ b/share/man/man9/rmlock.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .\" Based on rwlock.9 man page .Dd April 12, 2021 .Dt RMLOCK 9 diff --git a/share/man/man9/rtalloc.9 b/share/man/man9/rtalloc.9 deleted file mode 100644 index ea22f8717d4a..000000000000 --- a/share/man/man9/rtalloc.9 +++ /dev/null @@ -1,282 +0,0 @@ -.\" -.\" Copyright 1996 Massachusetts Institute of Technology -.\" -.\" Permission to use, copy, modify, and distribute this software and -.\" its documentation for any purpose and without fee is hereby -.\" granted, provided that both the above copyright notice and this -.\" permission notice appear in all copies, that both the above -.\" copyright notice and this permission notice appear in all -.\" supporting documentation, and that the name of M.I.T. not be used -.\" in advertising or publicity pertaining to distribution of the -.\" software without specific, written prior permission. M.I.T. makes -.\" no representations about the suitability of this software for any -.\" purpose. It is provided "as is" without express or implied -.\" warranty. -.\" -.\" THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS -.\" ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, -.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT -.\" SHALL M.I.T. 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 July 4, 2012 -.Dt RTALLOC 9 -.Os -.Sh NAME -.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 "struct rtentry *" -.Fn rtalloc1_fib "struct sockaddr *dst" "int report" "u_long flags" "u_int fibnum" -.Ft void -.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" -.Fn RO_RTFREE "struct route *ro" -.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 these structures for a -route corresponding to a particular end-node address, and to cause -certain protocol\- and interface-specific actions to take place. -.Pp -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 -.Fn rtalloc_fib -is the most simple variant. -Its main argument is -.Fa ro , -a pointer to a -.Fa "struct route" , -which is defined as follows: -.Bd -literal -offset indent -struct route { - 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 -.Ft "struct sockaddr" . -Before calling -.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_fib -returns without performing a lookup if -.Fa ro->ro_rt -is non-null and the -.Dv RTF_UP -flag is set in the rtentry's -.Fa rt_flags -field. -.Pp -The -.Fn rtalloc_ign_fib -function is the same as the -.Fn rtalloc_fib , -but there is additional -.Fa flags -argument, which is same as in -.Fn rtalloc1_fib . -.Pp -The -.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 unref and possibly free an unlocked route entries with -one our reference, for example previously allocated by -.Fn rtalloc_fib -or -.Fn rtalloc_ign_fib . -.Pp -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. -.Pp -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. -Its usage is contrary to -.Fn RT_ADDREF . -.Pp -The -.Fn RO_RTFREE -macro is used to free route entry that is referenced by struct route. -At certain circumstances the latter may not hold a reference on rtentry, -and -.Fn RO_RTFREE -treats such routes correctly. -.Pp -The -.Fn rtfree -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_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 -value -.Er EHOSTUNREACH . -.Sh SEE ALSO -.Xr route 4 , -.Xr rtentry 9 -.Sh HISTORY -The -.Nm rtalloc -facility first appeared in -.Bx 4.2 , -although with much different internals. -The -.Fn rtalloc_ign -function and the -.Fa flags -argument to -.Fn rtalloc1 -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 -The original version of this manual page was written by -.An -nosplit -.An "Garrett Wollman" . -It was significantly updated by -.An "Gleb Smirnoff" . diff --git a/share/man/man9/rtentry.9 b/share/man/man9/rtentry.9 index 65a63e481c4b..3f2e6c9ef656 100644 --- a/share/man/man9/rtentry.9 +++ b/share/man/man9/rtentry.9 @@ -26,8 +26,6 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 5, 2014 .Dt RTENTRY 9 .Os @@ -229,8 +227,7 @@ Empty space available for protocol-specific information. .El .Sh SEE ALSO .Xr route 4 , -.Xr route 8 , -.Xr rtalloc 9 +.Xr route 8 .Sh HISTORY The .Vt rtentry diff --git a/share/man/man9/runqueue.9 b/share/man/man9/runqueue.9 index d6028ba1a2b9..9938af8eaffa 100644 --- a/share/man/man9/runqueue.9 +++ b/share/man/man9/runqueue.9 @@ -20,8 +20,6 @@ .\" (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 August 15, 2010 .Dt RUNQUEUE 9 .Os diff --git a/share/man/man9/rwlock.9 b/share/man/man9/rwlock.9 index 2bbad71fb42c..632663871c4b 100644 --- a/share/man/man9/rwlock.9 +++ b/share/man/man9/rwlock.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 11, 2017 .Dt RWLOCK 9 .Os diff --git a/share/man/man9/sbuf.9 b/share/man/man9/sbuf.9 index 071e6f11e02e..d4ffa050a893 100644 --- a/share/man/man9/sbuf.9 +++ b/share/man/man9/sbuf.9 @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2000 Poul-Henning Kamp and Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2000 Poul-Henning Kamp and Dag-Erling Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd August 26, 2020 +.Dd October 3, 2023 .Dt SBUF 9 .Os .Sh NAME @@ -62,6 +60,8 @@ .Nm sbuf_printf_drain , .Nm sbuf_putbuf .Nd safe string composition +.Sh LIBRARY +.Lb libsbuf .Sh SYNOPSIS .In sys/types.h .In sys/sbuf.h @@ -358,7 +358,7 @@ function returns the current user flags. The .Fn sbuf_set_flags and -.Fn sbuf_get_flags +.Fn sbuf_clear_flags functions set or clear one or more user flags, respectively. The user flags are described under the .Fn sbuf_new diff --git a/share/man/man9/scheduler.9 b/share/man/man9/scheduler.9 index 8366692ca9d8..31f0309a49b8 100644 --- a/share/man/man9/scheduler.9 +++ b/share/man/man9/scheduler.9 @@ -20,8 +20,6 @@ .\" (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 November 3, 2000 .Dt SCHEDULER 9 .Os diff --git a/share/man/man9/securelevel_gt.9 b/share/man/man9/securelevel_gt.9 index b2706948eb83..4ba7dfe9e2a0 100644 --- a/share/man/man9/securelevel_gt.9 +++ b/share/man/man9/securelevel_gt.9 @@ -24,7 +24,6 @@ .\" 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 June 2, 2007 .Dt SECURELEVEL_GT 9 diff --git a/share/man/man9/selrecord.9 b/share/man/man9/selrecord.9 index aafbe4b3d96e..685079dacf3b 100644 --- a/share/man/man9/selrecord.9 +++ b/share/man/man9/selrecord.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 25, 2011 .Dt SELRECORD 9 .Os diff --git a/share/man/man9/sema.9 b/share/man/man9/sema.9 index 1f6e3b54eb24..5c1b9e0ee05e 100644 --- a/share/man/man9/sema.9 +++ b/share/man/man9/sema.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 1, 2006 .Dt SEMA 9 .Os diff --git a/share/man/man9/seqc.9 b/share/man/man9/seqc.9 index 34783fff7448..e13d73ecb5d7 100644 --- a/share/man/man9/seqc.9 +++ b/share/man/man9/seqc.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 29, 2019 .Dt SEQC 9 .Os diff --git a/share/man/man9/sf_buf.9 b/share/man/man9/sf_buf.9 index 8d73937c2878..e99e4841d449 100644 --- a/share/man/man9/sf_buf.9 +++ b/share/man/man9/sf_buf.9 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 28, 2007 .Dt SF_BUF 9 .Os diff --git a/share/man/man9/sglist.9 b/share/man/man9/sglist.9 index ec452194527b..f4930134e7cf 100644 --- a/share/man/man9/sglist.9 +++ b/share/man/man9/sglist.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd May 25, 2021 .Dt SGLIST 9 .Os @@ -287,7 +285,7 @@ to the scatter/gather list .Fa sg . .Pp The -.Nm sglist_append_mbuf +.Nm sglist_append_single_mbuf function appends the physical address ranges described by a single mbuf .Fa m to the scatter/gather list diff --git a/share/man/man9/shm_map.9 b/share/man/man9/shm_map.9 index e2b57d526334..d5d8cc038778 100644 --- a/share/man/man9/shm_map.9 +++ b/share/man/man9/shm_map.9 @@ -24,8 +24,6 @@ .\" 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 diff --git a/share/man/man9/signal.9 b/share/man/man9/signal.9 index a2e54fef012d..a41ceea4b00a 100644 --- a/share/man/man9/signal.9 +++ b/share/man/man9/signal.9 @@ -24,9 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd June 8, 2013 +.Dd July 14, 2023 .Dt SIGNAL 9 .Os .Sh NAME @@ -430,7 +428,6 @@ function returns either a valid signal number or zero. .Fn issignal returns either a valid signal number or zero. .Sh SEE ALSO -.Xr gsignal 9 , .Xr pgsignal 9 , .Xr psignal 9 .Sh AUTHORS diff --git a/share/man/man9/sleep.9 b/share/man/man9/sleep.9 index 78625e5e1184..10ad743c5738 100644 --- a/share/man/man9/sleep.9 +++ b/share/man/man9/sleep.9 @@ -23,8 +23,6 @@ .\" (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 June 19, 2019 .Dt SLEEP 9 .Os @@ -366,13 +364,13 @@ A non-zero timeout was specified and the timeout expired. .El .Sh SEE ALSO .Xr ps 1 , +.Xr callout 9 , .Xr locking 9 , .Xr malloc 9 , .Xr mi_switch 9 , .Xr mtx_sleep 9 , .Xr rw_sleep 9 , -.Xr sx_sleep 9 , -.Xr timeout 9 +.Xr sx_sleep 9 .Sh HISTORY The functions .Fn sleep diff --git a/share/man/man9/sleepqueue.9 b/share/man/man9/sleepqueue.9 index 64dfc3bdee55..6502ce37a027 100644 --- a/share/man/man9/sleepqueue.9 +++ b/share/man/man9/sleepqueue.9 @@ -20,8 +20,6 @@ .\" (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 June 19, 2019 .Dt SLEEPQUEUE 9 .Os @@ -383,8 +381,8 @@ interfaces. Almost all other code in the kernel should use one of those interfaces rather than manipulating sleep queues directly. .Sh SEE ALSO +.Xr callout 9 , .Xr condvar 9 , .Xr runqueue 9 , .Xr scheduler 9 , -.Xr sleep 9 , -.Xr timeout 9 +.Xr sleep 9 diff --git a/share/man/man9/smr.9 b/share/man/man9/smr.9 new file mode 100644 index 000000000000..32ef313c0988 --- /dev/null +++ b/share/man/man9/smr.9 @@ -0,0 +1,294 @@ +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023 The FreeBSD Foundation +.\" +.\" This documentation was written by Mark Johnston <markj@FreeBSD.org> +.\" under sponsorship from the FreeBSD Foundation. +.\" +.\" 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. +.\" +.Dd January 17, 2023 +.Dt SMR 9 +.Os +.Sh NAME +.Nm smr +.Nd safe memory reclamation for lock-free data structures +.Sh SYNOPSIS +.In sys/smr.h +.Ft smr_seq_t +.Fo smr_advance +.Fa "smr_t smr" +.Fc +.Ft smr_t +.Fo smr_create +.Fa "const char *name" +.Fc +.Ft void +.Fo smr_destroy +.Fa "smr_t smr" +.Fc +.Ft void +.Fo smr_enter +.Fa "smr_t smr" +.Fc +.Ft void +.Fo smr_exit +.Fa "smr_t smr" +.Fc +.Ft bool +.Fo smr_poll +.Fa "smr_t smr" +.Fa "smr_seq_t goal" +.Fa "bool wait" +.Fc +.Ft void +.Fo smr_synchronize +.Fa "smr_t smr" +.Fc +.Ft void +.Fo smr_wait +.Fa "smr_t smr" +.Fa "smr_seq_t goal" +.Fc +.Sh DESCRIPTION +Safe Memory Reclamation (SMR) is a facility which enables the implementation of +memory-safe lock-free data structures. +In typical usage, read accesses to an SMR-protected data structure, such as a +hash table or tree, are performed in a +.Dq read section +consisting of code bracketed by +.Fn smr_enter +and +.Fn smr_exit +calls, while mutations of the data structure are serialized by a traditional +mutex such as +.Xr mutex 9 . +In contrast with reader-writer locks such as +.Xr rwlock 9 , +.Xr rmlock 9 , +and +.Xr sx 9 , +SMR allows readers and writers to access the data structure concurrently. +Readers can always enter a read section immediately +.Po +.Fn smr_enter +never blocks +.Pc , +so mutations do not introduce read latency. +Furthermore, +.Fn smr_enter +and +.Fn smr_exit +operate only on per-CPU data and thus avoid some of the performance problems +inherent in the implementation of traditional reader-writer mutexes. +SMR can therefore be a useful building block for data structures which are +accessed frequently but are only rarely modified. +.Pp +Note that any SMR-protected data structure must be implemented carefully such +that operations behave correctly in the absence of mutual exclusion between +readers and writers. +The data structure must be designed to be lock-free; SMR merely facilitates +the implementation, for example by making it safe to follow dangling pointers +and by helping avoid the ABA problem. +.Pp +When shared accesses to and mutations of a data structure can proceed +concurrently, writers must take care to ensure that any items removed from the +structure are not freed and recycled while readers are accessing them in +parallel. +This requirement results in a two-phase approach to the removal of items: +first, the item is unlinked such that all pointers to the item are removed from +the structure, preventing any new readers from observing the item. +Then, the writer waits until some mechanism guarantees that no existing readers +are still accessing the item. +At that point the memory for that item can be freed and reused safely. +SMR provides this mechanism: readers may access a lock-free data structure in +between calls to the +.Fn smr_enter +and +.Fn smr_exit +functions, which together create a read section, and the +.Fn smr_advance , +.Fn smr_poll , +.Fn smr_wait , +and +.Fn smr_synchronize +functions can be used to wait for threads in read sections to finish. +All of these functions operate on a +.Ft smr_t +state block which holds both per-CPU and global state. +Readers load global state and modify per-CPU state, while writers must scan all +per-CPU states to detect active readers. +SMR is designed to amortize this cost by batching to give acceptable +performance in write-heavy workloads. +.Ss Readers +Threads enter a read section by calling +.Fn smr_enter . +Read sections should be short, and many operations are not permitted while in +a read section. +Specifically, context switching is disabled, and thus readers may not acquire +blocking mutexes such as +.Xr mutex 9 . +Another consequence of this is that the thread is pinned to the current CPU for +the duration of the read section. +Furthermore, read sections may not be nested: it is incorrect to call +.Fn smr_enter +with a given +.Ft smr_t +state block when already in a read section for that state block. +.Ss UMA Integration +To simplify the integration of SMR into consumers, the +.Xr uma 9 +kernel memory allocator provides some SMR-specified facilities. +This eliminates a good deal of complexity from the implementation of consumers +and automatically batches write operations. +.Pp +In typical usage, a UMA zone (created with the +.Dv UMA_ZONE_SMR +flag or initialized with the +.Fn uma_zone_set_smr +function) is coupled with a +.Ft smr_t +state block. +To insert an item into an SMR-protected data structure, memory is allocated +from the zone using the +.Fn uma_zalloc_smr +function. +Insertions and removals are serialized using traditional mutual exclusion +and items are freed using the +.Fn uma_zfree_smr +function. +Read-only lookup operations are performed in SMR read sections. +.Fn uma_zfree_smr +waits for all active readers which may be accessing the freed item to finish +their read sections before recycling that item's memory. +.Pp +If the zone has an associated per-item destructor, it will be invoked at some +point when no readers can be accessing a given item. +The destructor can be used to release additional resources associated with the +item. +Note however that there is no guarantee that the destructor will be invoked in +a bounded time period. +.Ss Writers +Consumers are expected to use SMR in conjunction with UMA and thus need only +make use of the +.Fn smr_enter +and +.Fn smr_exit +functions, and the SMR helper macros defined in +.Pa sys/smr_types.h . +However, an introduction to the write-side interface of SMR can be useful. +.Pp +Internally, SMR maintains a global +.Ql write sequence +number. +When entering a read section, +.Fn smr_enter +loads a copy of the write sequence and stores it in per-CPU memory, hence +.Ql observing +that value. +To exit a read section, this per-CPU memory is overwritten with an invalid +value, making the CPU inactive. +Writers perform two operations: advancing the write sequence number, and +polling all CPUs to see whether active readers have observed a given sequence +number. +These operations are performed by +.Fn smr_advance +and +.Fn smr_poll , +respectively, which do not require serialization between multiple writers. +.Pp +After a writer unlinks an item from a data structure, it increments the write +sequence number and tags the item with the new value returned by +.Fn smr_advance . +Once all CPUs have observed the new value, the writer can use +.Fn smr_poll +to deduce that no active readers have access to the unlinked item, and thus the +item is safe to recycle. +Because this pair of operations is relatively expensive, it is generally a good +idea to amortize this cost by accumulating a collection of multiple unlinked +items and tagging the entire batch with a target write sequence number. +.Pp +.Fn smr_poll +is a non-blocking operation and returns true only if all active readers are +guaranteed to have observed the target sequence number value. +.Fn smr_wait +is a variant of +.Fn smr_poll +which waits until all CPUs have observed the target sequence number value. +.Fn smr_synchronize +combines +.Fn smr_advance +with +.Fn smr_wait +to wait for all CPUs to observe a new write sequence number. +This is an expensive operation and should only be used if polling cannot be +deferred in some way. +.Ss Memory Ordering +The +.Fn smr_enter +function has acquire semantics, and the +.Fn smr_exit +function has release semantics. +The +.Fn smr_advance , +.Fn smr_poll , +.Fn smr_wait , +and +.Fn smr_synchronize +functions should not be assumed to have any guarantees with respect to memory +ordering. +In practice, some of these functions have stronger ordering semantics than +is stated here, but this is specific to the implementation and should not be +relied upon. +See +.Xr atomic 9 +for more details. +.Sh NOTES +Outside of +.Fx +the acronym SMR typically refers to a family of algorithms which enable +memory-safe read-only access to a data structure concurrent with modifications +to that data structure. +Here, SMR refers to a particular algorithm belonging to this family, as well as +its implementation in +.Fx . +See +.Pa sys/sys/smr.h +and +.Pa sys/kern/subr_smr.c +in the +.Fx +source tree for further details on the algorithm and the context. +.Pp +The acronym SMR is also used to mean "shingled magnetic recording", a +technology used to store data on hard disk drives which requires operating +system support. +These two uses of the acronym are unrelated. +.Sh SEE ALSO +.Xr atomic 9 , +.Xr locking 9 , +.Xr uma 9 +.Sh AUTHORS +The SMR algorithm and its implementation were provided by +.An Jeff Roberson Aq Mt jeff@FreeBSD.org . +This manual page was written by +.An Mark Johnston Aq Mt markj@FreeBSD.org . diff --git a/share/man/man9/socket.9 b/share/man/man9/socket.9 index 1c3f75785013..fb0ead0e20e1 100644 --- a/share/man/man9/socket.9 +++ b/share/man/man9/socket.9 @@ -24,9 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd October 18, 2018 +.Dd September 6, 2022 .Dt SOCKET 9 .Os .Sh NAME @@ -38,7 +36,7 @@ .Ft void .Fn soabort "struct socket *so" .Ft int -.Fn soaccept "struct socket *so" "struct sockaddr **nam" +.Fn soaccept "struct socket *so" "struct sockaddr *nam" .Ft int .Fn socheckuid "struct socket *so" "uid_t uid" .Ft int @@ -171,8 +169,7 @@ are only useful for protocol implementors. .Pp Except where otherwise indicated, .Nm -functions may sleep, and are not appropriate for use in an -.Xr ithread 9 +functions may sleep, and are not appropriate for use in an interrupt thread context or while holding non-sleepable kernel locks. .Ss Creating and Destroying Sockets A new socket may be created using @@ -461,10 +458,8 @@ argument, and use the same flag name space as the .Xr sendmsg 2 system call. .Pp -Kernel callers running in -.Xr ithread 9 -context, or with a mutex held, will wish to use non-blocking sockets and pass -the +Kernel callers running in an interrupt thread context, or with a mutex held, +will wish to use non-blocking sockets and pass the .Dv MSG_DONTWAIT flag in order to prevent these functions from sleeping. .Pp @@ -593,7 +588,7 @@ data between user and kernel code. .Xr shutdown 2 , .Xr socket 2 , .Xr ng_ksocket 4 , -.Xr ithread 9 , +.Xr intr_event 9 , .Xr msleep 9 , .Xr ucred 9 .Sh HISTORY diff --git a/share/man/man9/stack.9 b/share/man/man9/stack.9 index 9ac64ff333a8..c912cd309cb3 100644 --- a/share/man/man9/stack.9 +++ b/share/man/man9/stack.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 6, 2022 .Dt STACK 9 .Os diff --git a/share/man/man9/store.9 b/share/man/man9/store.9 index 6492fdbc3924..18fd646d609d 100644 --- a/share/man/man9/store.9 +++ b/share/man/man9/store.9 @@ -32,8 +32,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 22, 2021 .Dt STORE 9 .Os diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 index 64fcc7425b4e..484b4f144b2e 100644 --- a/share/man/man9/style.9 +++ b/share/man/man9/style.9 @@ -1,5 +1,5 @@ -.\"- -.\" Copyright (c) 1995-2022 The FreeBSD Project +.\" +.\" Copyright (c) 1995-2025 The FreeBSD Project .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -22,15 +22,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" From: @(#)style 1.14 (Berkeley) 4/28/95 -.\" $FreeBSD$ -.\" -.Dd July 28, 2022 +.Dd March 27, 2025 .Dt STYLE 9 .Os .Sh NAME .Nm style -.Nd "kernel source file style guide" +.Nd kernel source file style guide .Sh DESCRIPTION This file specifies the preferred style for kernel source files in the .Fx @@ -47,8 +44,6 @@ is silent on an issue. .Bd -literal /* * Style guide for FreeBSD. Based on the CSRG's KNF (Kernel Normal Form). - * - * @(#)style 1.14 (Berkeley) 4/28/95 */ /* @@ -57,35 +52,31 @@ is silent on an issue. /* Most single-line comments look like this. */ +// Although they may look like this. + /* * Multi-line comments look like this. Make them real sentences. Fill * them so they look like real paragraphs. */ .Ed .Pp -The copyright header should be a multi-line comment, with the first -line of the comment having a dash after the star like so: +C++ comments may be used in C and C++ code. +Single-line comments should be consistently either C or C++ within a file. +Multi-line comments should also be consistently either C or C++, but may differ +from single-line comments. +.Pp +The copyright header should be a multi-line comment like so: .Bd -literal -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * +/* * Copyright (c) 1984-2025 John Q. Public * - * Long, boring license goes here, but trimmed for brevity + * SPDX-License-Identifier: BSD-2-Clause */ .Ed .Pp -An automatic script collects license information from the tree for -all comments that start in the first column with -.Dq Li "/*-" . -If you desire to flag -.Xr indent 1 -to not reformat a comment that starts in the first column which is not a -license or copyright notice, change the dash to a star for those -comments. Comments starting in columns other than the first are never considered license statements. -Use the appropriate SPDX-License-Identifier line before the copyright. +Write the copyright lines before the appropriate SPDX-License-Identifier. If the copyright assertion contains the phrase .Dq Li "All Rights Reserved" that should be on the same line as the word @@ -112,12 +103,6 @@ lines should only be added when making substantial changes to the file, not for trivial changes. .Pp After any copyright and license comment, there is a blank line. -Include -.Li $\&FreeBSD$ -or -.Li __FBSDID("$\&FreeBSD$"); -only if you are certain the new code will be merged to stable/12. -The tag will be removed from legacy code in the future. Non-C/C++ source files follow the example above, while C/C++ source files follow the one below. Version control system ID tags should only exist once in a file @@ -137,23 +122,17 @@ Only add in front of foreign VCS IDs if the file is renamed. Add .Dq Li "From: " -and FreeBSD git hash with full path name if the file was derived -from another FreeBSD file and include relevant copyright info -from the original file. -.Bd -literal -/* From: @(#)style 1.14 (Berkeley) 4/28/95 */ -.Ed +and the +.Fx +git hash with full path name if the file was derived from another +.Fx +file and include relevant copyright info from the original file. .Pp Leave one blank line before the header files. .Pp Kernel include files .Pa ( sys/*.h ) come first. -If -.In sys/cdefs.h -is needed for -.Fn __FBSDID , -include it first. If either .In sys/types.h or @@ -531,7 +510,7 @@ parts of the cascade. Elements in a .Ic switch -statement that cascade should have a +statement that execute some code and then cascade to the next case should have a .Li FALLTHROUGH comment. Numerical arguments should be checked for accuracy. @@ -757,9 +736,10 @@ not: !(p = f()) .Ed .Pp -Do not use +Do not test without a comparison, or with unary .Ic \&! -for tests unless it is a boolean, e.g., use: +(except for booleans). +For example, use: .Bd -literal if (*p == '\e0') .Ed @@ -769,6 +749,16 @@ not: if (!*p) .Ed .Pp +Prefer: +.Bd -literal +if (count != 0) +.Ed +.Pp +over: +.Bd -literal +if (count) +.Ed +.Pp Routines returning .Vt "void *" should not have their return values cast @@ -776,7 +766,8 @@ to any pointer type. .Pp Values in .Ic return -statements should be enclosed in parentheses. +statements should be enclosed in parentheses where possible. +For example, parentheses cannot be used if the value is a C++ braced-init-list. .Pp Use .Xr err 3 @@ -818,19 +809,15 @@ vaf(const char *fmt, ...) static void usage(void) { - /* Optional blank line goes here. */ .Ed .Pp -Optionally, insert a blank line at the beginning of functions with no local -variables. +Functions should have local variable declarations first, followed by one +blank line, followed by the first statement. +If no local variables are declared, the first line should be a statement. Older versions of this .Nm -document required the blank line convention, so it is widely used in existing -code. -.Pp -Do not insert a blank line at the beginning of functions with local variables. -Instead, these should have local variable declarations first, followed by one -blank line, followed by the first statement. +document required a blank line before code. +Such lines should be removed when signficant changes are made to the code. .Pp Use .Xr printf 3 , @@ -914,8 +901,29 @@ New code should use .Fn _Static_assert instead of the older .Fn CTASSERT . +.Pp +.Fn __predict_true +and +.Fn __predict_false +should only be used in frequently executed code when it makes the code +measurably faster. +It is wasteful to make predictions for infrequently run code, like subsystem +initialization. +When using branch prediction hints, atypical error conditions should use +.Fn __predict_false +(document the exceptions). +Operations that almost always succeed use +.Fn __predict_true . +Only use the annotation for the entire if statement, +rather than individual clauses. +Do not add these annotations without empirical evidence of the likelihood of the +branch. .Sh FILES .Bl -tag -width indent +.It Pa /usr/src/tools/build/checkstyle9.pl +A script to check for violations of +.Nm +in a source file. .It Pa /usr/src/tools/tools/editing/freebsd.el An Emacs plugin to follow the .Fx @@ -935,11 +943,11 @@ indentation rules. .Xr style.mdoc 5 , .Xr style.lua 9 .Sh HISTORY -This manual page is largely based on the +This manual page was originally based on the .Pa src/admin/style/style file from the .Bx 4.4 Lite2 -release, with occasional updates to reflect the current practice and +release, with frequent updates to reflect the current practice and desire of the .Fx project. diff --git a/share/man/man9/style.lua.9 b/share/man/man9/style.lua.9 index 089b4e986dca..991a6f96b01b 100644 --- a/share/man/man9/style.lua.9 +++ b/share/man/man9/style.lua.9 @@ -1,5 +1,5 @@ .\"- -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org> .\" @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 25, 2018 .Dt STYLE.LUA 9 .Os @@ -46,15 +44,13 @@ is silent on an issue. The copyright header should be a series of single-line comments. Use the single-line comment style for every line in a multi-line comment. .Pp -After any copyright header, there is a blank line, and the -.Li $\&FreeBSD$ -comment for non-C/C++ source files. +After any copyright header there is a blank line. .Pp The preferred method of including other files and modules is with .Fn require name , such as: .Bd -literal --- $FreeBSD$ +-- License block config = require("config"); menu = require("menu"); diff --git a/share/man/man9/superio.9 b/share/man/man9/superio.9 index 832871d6980a..6318b5a45b50 100644 --- a/share/man/man9/superio.9 +++ b/share/man/man9/superio.9 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2019 Andriy Gapon <avg@FreeBSD.org> .\" @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 11, 2019 .Dt SUPERIO 9 .Os diff --git a/share/man/man9/swi.9 b/share/man/man9/swi.9 index 52a39fe61c86..ea6285b5d6a2 100644 --- a/share/man/man9/swi.9 +++ b/share/man/man9/swi.9 @@ -21,9 +21,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 25, 2020 +.Dd October 12, 2022 .Dt SWI 9 .Os .Sh NAME @@ -35,9 +33,7 @@ .In sys/param.h .In sys/bus.h .In sys/interrupt.h -.Vt "extern struct intr_event *tty_intr_event" ; .Vt "extern struct intr_event *clk_intr_event" ; -.Vt "extern void *vm_ih" ; .Ft int .Fo swi_add .Fa "struct intr_event **eventp" @@ -140,12 +136,6 @@ Instead, .Fa handler will be executed the next time that the software interrupt thread runs after being scheduled by another event. -Attaching a handler to the clock software interrupt thread and using this flag -when scheduling a software interrupt handler can be used to implement the -functionality performed by -.Fn setdelayed -in earlier versions of -.Fx . .It Dv SWI_FROMNMI Specifies that .Fn swi_sched @@ -155,24 +145,12 @@ On platforms allowing IPI sending from NMI context it immediately wakes via the IPI, otherwise it works just like SWI_DELAY. .El .Pp -The -.Va tty_intr_event -and .Va clk_intr_event -variables contain pointers to the software interrupt handlers for the tty and -clock software interrupts, respectively. -.Va tty_intr_event -is used to hang tty software interrupt handlers off of the same thread. -.Va clk_intr_event -is used to hang delayed handlers off of the clock software interrupt thread so -that the functionality of -.Fn setdelayed -can be obtained in conjunction with -.Dv SWI_DELAY . -The -.Va vm_ih -handler cookie is used to schedule software interrupt threads to run for the -VM subsystem. +is a pointer to the +.Vt struct intr_event +used to hang delayed handlers off of the clock interrupt, and is invoked +directly by +.Xr hardclock 9 . .Sh RETURN VALUES The .Fn swi_add @@ -227,7 +205,8 @@ is .Dv NULL . .El .Sh SEE ALSO -.Xr ithread 9 , +.Xr hardclock 9 , +.Xr intr_event 9 , .Xr taskqueue 9 .Sh HISTORY The @@ -250,7 +229,3 @@ The .Fn swi_remove function first appeared in .Fx 6.1 . -.Sh BUGS -Most of the global variables described in this manual page should not be -global, or at the very least should not be declared in -.In sys/interrupt.h . diff --git a/share/man/man9/sx.9 b/share/man/man9/sx.9 index 74d115ede245..473a47c27cf4 100644 --- a/share/man/man9/sx.9 +++ b/share/man/man9/sx.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 11, 2017 .Dt SX 9 .Os diff --git a/share/man/man9/syscall_helper_register.9 b/share/man/man9/syscall_helper_register.9 index c852ecabb63f..bad8eee3e37b 100644 --- a/share/man/man9/syscall_helper_register.9 +++ b/share/man/man9/syscall_helper_register.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 10, 2018 .Dt SYSCALL_HELPER_REGISTER 9 .Os diff --git a/share/man/man9/sysctl.9 b/share/man/man9/sysctl.9 index f2b1159e71a8..92c8532c8ed2 100644 --- a/share/man/man9/sysctl.9 +++ b/share/man/man9/sysctl.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 1, 2020 .Dt SYSCTL 9 .Os @@ -577,6 +575,10 @@ Current formats: node .It Cm A .Li "char *" +.It Cm C +.Li "int8_t" +.It Cm CU +.Li "uint8_t" .It Cm I .Li "int" .It Cm IK Ns Op Ar n @@ -593,6 +595,10 @@ gives milliKelvin .Li "quad_t" .It Cm QU .Li "u_quad_t" +.It Cm S +.Li "int16_t" +.It Cm SU +.Li "uint16_t" .It Cm "S,TYPE" .Li "struct TYPE" structures @@ -620,7 +626,7 @@ For example, .Fn SYSCTL_INT reports the raw value of an associated variable of type .Vt int . -However, nodes may also export a value that is a translatation of an internal +However, nodes may also export a value that is a translation of an internal representation. .Pp The @@ -698,7 +704,7 @@ macro or the function. If the .Fa len -argument in zero, the string length is computed at every access to the OID using +argument is zero, the string length is computed at every access to the OID using .Xr strlen 3 . Use the .Fn SYSCTL_CONST_STRING @@ -925,8 +931,8 @@ Examples of integer, opaque, string, and procedure sysctls follow: * flags are CTLFLAG_RD, the variable pointer is SYSCTL_NULL_INT_PTR, * and the value is declared. */ -SYSCTL_INT(_debug_sizeof, OID_AUTO, bio, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, - sizeof(struct bio), "sizeof(struct bio)"); +SYSCTL_INT(_kern, OID_AUTO, hz_max, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, HZ_MAXIMUM, + "Maximum hz value supported"); /* * Example of a variable integer value. Notice that the control @@ -1052,6 +1058,9 @@ The .Xr sysctl 8 utility first appeared in .Bx 4.4 . +.Nm SYSCTL_ADD_CONST_STRING +first appeared in +.Fx 12.1 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man9/sysctl_add_oid.9 b/share/man/man9/sysctl_add_oid.9 index d28aa799be8f..c6c41582473f 100644 --- a/share/man/man9/sysctl_add_oid.9 +++ b/share/man/man9/sysctl_add_oid.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 13, 2016 .Dt SYSCTL_ADD_OID 9 .Os diff --git a/share/man/man9/sysctl_ctx_init.9 b/share/man/man9/sysctl_ctx_init.9 index 28c7b9309de3..92ba3e1a4d26 100644 --- a/share/man/man9/sysctl_ctx_init.9 +++ b/share/man/man9/sysctl_ctx_init.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 31, 2014 .Dt SYSCTL_CTX_INIT 9 .Os diff --git a/share/man/man9/taskqueue.9 b/share/man/man9/taskqueue.9 index e13ad9498562..5afeffcb558b 100644 --- a/share/man/man9/taskqueue.9 +++ b/share/man/man9/taskqueue.9 @@ -26,8 +26,6 @@ .\" (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 April 25, 2022 .Dt TASKQUEUE 9 .Os diff --git a/share/man/man9/tcp_functions.9 b/share/man/man9/tcp_functions.9 index d0fb8ee2b217..8ba7f21c978c 100644 --- a/share/man/man9/tcp_functions.9 +++ b/share/man/man9/tcp_functions.9 @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd March 10, 2017 +.Dd July 13, 2024 .Dt TCP_FUNCTIONS 9 .Os .Sh NAME @@ -39,6 +37,7 @@ .Ft int .Fn register_tcp_functions_as_name "struct tcp_function_block *blk" \ "const char *name" "int wait" +.Ft int .Fn register_tcp_functions_as_names "struct tcp_function_block *blk" \ "int wait" "const char *names[]" "int *num_names" .Ft int @@ -114,6 +113,7 @@ argument. The .Fa num_names argument provides a pointer to the number of names. +This number must not exceed TCP_FUNCTION_NAME_NUM_MAX. This function will either succeed in registering all of the names in the array, or none of the names in the array. On failure, the @@ -178,9 +178,10 @@ struct tcp_function_block { uint32_t, u_int); int (*tfb_tcp_timer_active)(struct tcpcb *, uint32_t); void (*tfb_tcp_timer_stop)(struct tcpcb *, uint32_t); - /* Optional functions */ + /* Optional function */ void (*tfb_tcp_rexmit_tmr)(struct tcpcb *); - void (*tfb_tcp_handoff_ok)(struct tcpcb *); + /* Mandatory function */ + int (*tfb_tcp_handoff_ok)(struct tcpcb *); /* System use */ volatile uint32_t tfb_refcnt; uint32_t tfb_flags; @@ -263,37 +264,21 @@ However, care must be taken to ensure the retransmit timer leaves the TCP control block in a valid state for the remainder of the retransmit timer logic. .Pp -A user may select a new TCP stack before calling -.Xr connect 2 -or -.Xr listen 2 . -Optionally, a TCP stack may also allow a user to begin using the TCP stack for -a connection that is in a later state by setting a non-NULL function pointer in -the +A user may select a new TCP stack before calling at any time. +Therefore, the function pointer .Va tfb_tcp_handoff_ok -field. -If this field is non-NULL and a user attempts to select that TCP stack after -calling -.Xr connect 2 -or -.Xr listen 2 -for that socket, the kernel will call the function pointed to by the +field must be non-NULL. +If a user attempts to select that TCP stack, the kernel will call the function +pointed to by the .Va tfb_tcp_handoff_ok field. The function should return 0 if the user is allowed to switch the socket to use -the TCP stack. -Otherwise, the function should return an error code, which will be returned to -the user. -If the -.Va tfb_tcp_handoff_ok -field is -.Dv NULL -and a user attempts to select the TCP stack after calling -.Xr connect 2 -or -.Xr listen 2 -for that socket, the operation will fail and the kernel will return -.Er EINVAL . +the TCP stack. In this case, the kernel will call the function pointed to by +.Va tfb_tcp_fb_init +if this function pointer is non-NULL and finally perform the stack switch. +If the user is not allowed to switch the socket, the function should undo any +changes it made to the connection state configuration and return an error code, +which will be returned to the user. .Pp The .Va tfb_refcnt @@ -345,8 +330,11 @@ must be prepared to wait until all connections have stopped using the specified TCP stack. .Sh ERRORS The -.Fn register_tcp_functions -function will fail if: +.Fn register_tcp_functions , +.Fn register_tcp_functions_as_name , +and +.Fn register_tcp_functions_as_names +functions will fail if: .Bl -tag -width Er .It Bq Er EINVAL Any of the members of the @@ -355,7 +343,19 @@ argument are set incorrectly. .It Bq Er ENOMEM The function could not allocate memory for its internal data. .It Bq Er EALREADY -A function block is already registered with the same name. +The +.Fa blk +is already registered or a function block is already registered with the same +name. +.El +Additionally, +.Fn register_tcp_functions_as_names +will fail if: +.Bl -tag -width Er +.It Bq Er E2BIG +The number of names pointed to by the +.Fa num_names +argument is larger than TCP_FUNCTION_NAME_NUM_MAX. .El The .Fn deregister_tcp_functions diff --git a/share/man/man9/thread_exit.9 b/share/man/man9/thread_exit.9 index 6a06433acebd..a5822d6ef363 100644 --- a/share/man/man9/thread_exit.9 +++ b/share/man/man9/thread_exit.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 5, 2002 .Dt THREAD_EXIT 9 .Os diff --git a/share/man/man9/time.9 b/share/man/man9/time.9 index 443608dd3f5b..8a3f9eecc87f 100644 --- a/share/man/man9/time.9 +++ b/share/man/man9/time.9 @@ -29,8 +29,6 @@ .\" (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 May 4, 2021 .Dt TIME 9 .Os diff --git a/share/man/man9/tvtohz.9 b/share/man/man9/tvtohz.9 index cf07d603a790..947ab5b095a1 100644 --- a/share/man/man9/tvtohz.9 +++ b/share/man/man9/tvtohz.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 3, 2000 .Dt TVTOHZ 9 .Os @@ -45,9 +43,9 @@ of system ticks that would elapse. Returns the integral number of system ticks expected to elapse in the given interval, including the current tick. .Sh SEE ALSO +.Xr callout 9 , .Xr microtime 9 , -.Xr microuptime 9 , -.Xr timeout 9 +.Xr microuptime 9 .Sh HISTORY The .Nm diff --git a/share/man/man9/ucred.9 b/share/man/man9/ucred.9 index acd7c911a1fc..e9fe2e1d02fc 100644 --- a/share/man/man9/ucred.9 +++ b/share/man/man9/ucred.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 23, 2019 .Dt UCRED 9 .Os diff --git a/share/man/man9/uidinfo.9 b/share/man/man9/uidinfo.9 index 4dc93d2bfedd..99d96ee97b9a 100644 --- a/share/man/man9/uidinfo.9 +++ b/share/man/man9/uidinfo.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 10, 2001 .Dt UIDINFO 9 .Os diff --git a/share/man/man9/uio.9 b/share/man/man9/uio.9 index c17520da981f..e6240c4e51d3 100644 --- a/share/man/man9/uio.9 +++ b/share/man/man9/uio.9 @@ -23,8 +23,6 @@ .\" (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 March 11, 2017 .Dt UIO 9 .Os diff --git a/share/man/man9/unr.9 b/share/man/man9/unr.9 index c2e9b3943829..73717dd94115 100644 --- a/share/man/man9/unr.9 +++ b/share/man/man9/unr.9 @@ -22,24 +22,30 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 21, 2022 .Dt UNR 9 .Os .Sh NAME .Nm new_unrhdr , +.Nm clean_unrhdr , .Nm clear_unrhdr , .Nm delete_unrhdr , .Nm alloc_unr , .Nm alloc_unr_specific , -.Nm free_unr +.Nm free_unr , +.Nm create_iter_unr , +.Nm next_iter_unr , +.Nm free_iter_unr .Nd "kernel unit number allocator" .Sh SYNOPSIS .In sys/systm.h .Ft "struct unrhdr *" .Fn new_unrhdr "int low" "int high" "struct mtx *mutex" .Ft void +.Fn clean_unrhdr "struct unrhdr *uh" +.Ft void +.Fn clean_unrhdrl "struct unrhdr *uh" +.Ft void .Fn clear_unrhdr "struct unrhdr *uh" .Ft void .Fn delete_unrhdr "struct unrhdr *uh" @@ -51,6 +57,12 @@ .Fn alloc_unr_specific "struct unrhdr *uh" "u_int item" .Ft void .Fn free_unr "struct unrhdr *uh" "u_int item" +.Ft void * +.Fn create_iter_unr "struct unrhdr *uh" +.Ft int +.Fn next_iter_unr "void *handle" +.Ft void +.Fn free_iter_unr "void *handle" .Sh DESCRIPTION The kernel unit number allocator is a generic facility, which allows to allocate unit numbers within a specified range. @@ -86,6 +98,26 @@ This function frees the memory associated with the entity, it does not free any units. To free all units use .Fn clear_unrhdr . +.It Fn clean_unrhdr uh +Freeing unit numbers might result in some internal memory becoming unused. +There are +.Nm unit +allocator consumers that cannot tolerate taking +.Xr malloc 9 +locks to free the memory, while having their unit mutex locked. +For this reason, free of the unused memory after delete is postponed +until the consumer can afford calling into the +.Xr malloc 9 +subsystem. +Call +.Fn clean_unrhdr uh +to do the cleanup. +In particular, this needs to be done before freeing a unr, if +a deletion of units could have been performed. +.It Fn clean_unrhdrl +Same as +.Fn clean_unrhdr , +but assumes that the unr mutex is already owned, if any. .It Fn alloc_unr uh Return a new unit number. The lowest free number is always allocated. @@ -110,6 +142,41 @@ Free a previously allocated unit number. This function may require allocating memory, and thus it can sleep. There is no pre-locked variant. .El +.Sh ITERATOR INTERFACE +The +.Nm unr +facility provides an interface to iterate over all allocated units +for the given +.Dv unrhdr . +Iterators are identified by an opaque handle. +More than one iterators can operate simultaneously; the iterator position +data is recorded only in the iterator handle. +.Pp +Consumers must ensure that the unit allocator is not modified between +calls to the iterator functions. +In particular, the internal allocator mutex cannot provide consistency, +because it is acquired and dropped inside the +.Fn next_iter_unr +function. +If the allocator was modified, it is safe to free the iterator with +.Fn free_iter_unr +method nevertheless. +.Bl -tag -width indent +.It Fn create_iter_unr uh +Create an iterator. +Return the handle that should be passed to other iterator functions. +.It Fn next_iter_unr handle +Return the value of the next unit. +Units are returned in ascending order. +A return value of +.Li \-1 +indicates the end of iteration, in which +case +.Li \-1 +is returned for all future calls. +.It Fn free_iter_unr handle +Free the iterator, handle is no longer valid. +.El .Sh CODE REFERENCES The above functions are implemented in .Pa sys/kern/subr_unit.c . diff --git a/share/man/man9/usbdi.9 b/share/man/man9/usbdi.9 index 640222b8067c..47034b87c806 100644 --- a/share/man/man9/usbdi.9 +++ b/share/man/man9/usbdi.9 @@ -22,8 +22,6 @@ .\" 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 November 14, 2016 .Dt USBDI 9 .Os @@ -352,7 +350,7 @@ Example4: SETUP + STATUS - split .Ed .Sh USB TRANSFER CONFIG -To simply the search for endpoints the +To simplify the search for endpoints the .Nm usb module defines a USB config structure where it is possible to specify the characteristics of the wanted endpoint. diff --git a/share/man/man9/vaccess.9 b/share/man/man9/vaccess.9 index 4bf377406903..fe9a37d15358 100644 --- a/share/man/man9/vaccess.9 +++ b/share/man/man9/vaccess.9 @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd September 18, 2009 +.Dd August 23, 2022 .Dt VACCESS 9 .Os .Sh NAME @@ -42,7 +40,6 @@ .Fa "gid_t file_gid" .Fa "accmode_t accmode" .Fa "struct ucred *cred" -.Fa "int *privused" .Fc .Sh DESCRIPTION This call implements the logic for the @@ -59,19 +56,9 @@ owning UID owning GID .Fa file_gid , desired access mode -.Fa accmode , -requesting credential -.Fa cred , -and an optional call-by-reference -.Vt int -pointer returning whether or not -privilege was required for successful evaluation of the call; the -.Fa privused -pointer may be set to -.Dv NULL -by the caller in order not to be informed of -privilege information, or it may point to an integer that will be set to -1 if privilege is used, and 0 otherwise. +.Fa accmode +and requesting credential +.Fa cred . .Pp This call is intended to support implementations of .Xr VOP_ACCESS 9 , diff --git a/share/man/man9/vaccess_acl_nfs4.9 b/share/man/man9/vaccess_acl_nfs4.9 index c7293619a349..76cedc3466e9 100644 --- a/share/man/man9/vaccess_acl_nfs4.9 +++ b/share/man/man9/vaccess_acl_nfs4.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 18, 2009 .Dt VACCESS_ACL_NFS4 9 .Os diff --git a/share/man/man9/vaccess_acl_posix1e.9 b/share/man/man9/vaccess_acl_posix1e.9 index dc857a8ee61f..5b61a00e0c13 100644 --- a/share/man/man9/vaccess_acl_posix1e.9 +++ b/share/man/man9/vaccess_acl_posix1e.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 22, 2001 .Dt VACCESS_ACL_POSIX1E 9 .Os diff --git a/share/man/man9/vcount.9 b/share/man/man9/vcount.9 deleted file mode 100644 index 186a350ac56b..000000000000 --- a/share/man/man9/vcount.9 +++ /dev/null @@ -1,73 +0,0 @@ -.\" -*- nroff -*- -.\" -.\" Copyright (c) 2000 Andrew Stevenson -.\" -.\" All rights reserved. -.\" -.\" This program is free software. -.\" -.\" 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. -.\" -.\" If this manual page travels to places exotic (like projects other than -.\" FreeBSD) I would love to hear about it. -.\" Andrew <andrew@ugh.net.au> -.\" -.\" $FreeBSD$ -.\" -.Dd January 19, 2012 -.Dt VCOUNT 9 -.Os -.Sh NAME -.Nm vcount , -.Nm count_dev -.Nd "get total number of references to a device" -.Sh SYNOPSIS -.In sys/param.h -.In sys/time.h -.In sys/conf.h -.In sys/vnode.h -.Ft int -.Fn vcount "struct vnode *vp" -.Ft int -.Fn count_dev "struct cdev *dev" -.Sh DESCRIPTION -.Fn vcount -is used to get the number of references to a particular device. -It allows for the fact that multiple vnodes may reference the same device. -.Fn count_dev -does the same thing as -.Fn vcount , -but takes a -.Vt "struct cdev" -rather than a -.Vt "struct vnode" -pointer as an argument. -.Sh RETURN VALUES -.Fn vcount -and -.Fn count_dev -both return the number of references to the device. -.Sh SEE ALSO -.Xr VFS 9 , -.Xr vnode 9 -.Sh AUTHORS -This manual page was written by -.An Andrew Stevenson . diff --git a/share/man/man9/vflush.9 b/share/man/man9/vflush.9 index 280088f99269..b5d3cacf55d6 100644 --- a/share/man/man9/vflush.9 +++ b/share/man/man9/vflush.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 21, 2001 .Dt VFLUSH 9 .Os diff --git a/share/man/man9/vfs_busy.9 b/share/man/man9/vfs_busy.9 index 8b9ba86d2bac..5cbd1d6ff25f 100644 --- a/share/man/man9/vfs_busy.9 +++ b/share/man/man9/vfs_busy.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 11, 2013 .Dt VFS_BUSY 9 .Os diff --git a/share/man/man9/vfs_getnewfsid.9 b/share/man/man9/vfs_getnewfsid.9 index f43800c41a57..8eb958057920 100644 --- a/share/man/man9/vfs_getnewfsid.9 +++ b/share/man/man9/vfs_getnewfsid.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 21, 2001 .Dt VFS_GETNEWFSID 9 .Os diff --git a/share/man/man9/vfs_getopt.9 b/share/man/man9/vfs_getopt.9 index 1675fef8f6ee..ff0f027314c7 100644 --- a/share/man/man9/vfs_getopt.9 +++ b/share/man/man9/vfs_getopt.9 @@ -24,9 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd July 31, 2011 +.Dd May 19, 2024 .Dt VFS_GETOPT 9 .Os .Sh NAME @@ -48,7 +46,7 @@ .Fa "struct vfsoptlist *opts" "const char *name" "void **buf" "int *len" .Fc .Ft "char *" -.Fn vfs_getops "struct vfsoptlist *opts" "const char *name" "int *error" +.Fn vfs_getopts "struct vfsoptlist *opts" "const char *name" "int *error" .Ft int .Fo vfs_flagopt .Fa "struct vfsoptlist *opts" "const char *name" "uint64_t *flags" "uint64_t flag" @@ -179,7 +177,7 @@ function returns 0 if the option was found; otherwise, is returned. .Pp The -.Fn vfs_getops +.Fn vfs_getopts function returns the specified option if it is found, and is .Dv NUL terminated. diff --git a/share/man/man9/vfs_getvfs.9 b/share/man/man9/vfs_getvfs.9 index 93df89f7070a..639eccb7a988 100644 --- a/share/man/man9/vfs_getvfs.9 +++ b/share/man/man9/vfs_getvfs.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 21, 2001 .Dt VFS_GETVFS 9 .Os diff --git a/share/man/man9/vfs_mountedfrom.9 b/share/man/man9/vfs_mountedfrom.9 index d0d7542630f0..bd1b19190f9b 100644 --- a/share/man/man9/vfs_mountedfrom.9 +++ b/share/man/man9/vfs_mountedfrom.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 25, 2008 .Dt VFS_MOUNTEDFROM 9 .Os diff --git a/share/man/man9/vfs_rootmountalloc.9 b/share/man/man9/vfs_rootmountalloc.9 index 6453849f1e98..eee413a3946f 100644 --- a/share/man/man9/vfs_rootmountalloc.9 +++ b/share/man/man9/vfs_rootmountalloc.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 21, 2001 .Dt VFS_ROOTMOUNTALLOC 9 .Os diff --git a/share/man/man9/vfs_suser.9 b/share/man/man9/vfs_suser.9 index df68bc21efab..aff6410b4072 100644 --- a/share/man/man9/vfs_suser.9 +++ b/share/man/man9/vfs_suser.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 2, 2004 .Dt VFS_SUSER 9 .Os diff --git a/share/man/man9/vfs_timestamp.9 b/share/man/man9/vfs_timestamp.9 index 0103779402ce..19baff12449d 100644 --- a/share/man/man9/vfs_timestamp.9 +++ b/share/man/man9/vfs_timestamp.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd November 21, 2001 .Dt VFS_TIMESTAMP 9 .Os diff --git a/share/man/man9/vfs_unbusy.9 b/share/man/man9/vfs_unbusy.9 index 13cea5eba67f..8e3b8f1ed0d5 100644 --- a/share/man/man9/vfs_unbusy.9 +++ b/share/man/man9/vfs_unbusy.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 14, 2010 .Dt VFS_UNBUSY 9 .Os diff --git a/share/man/man9/vfs_unmountall.9 b/share/man/man9/vfs_unmountall.9 index e20020328153..a637a6b025f5 100644 --- a/share/man/man9/vfs_unmountall.9 +++ b/share/man/man9/vfs_unmountall.9 @@ -22,8 +22,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 26, 2001 .Dt VFS_UNMOUNTALL 9 .Os diff --git a/share/man/man9/vfsconf.9 b/share/man/man9/vfsconf.9 index 7e129c07ff08..ff299e3d535b 100644 --- a/share/man/man9/vfsconf.9 +++ b/share/man/man9/vfsconf.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 16, 2013 .Dt VFSCONF 9 .Os diff --git a/share/man/man9/vget.9 b/share/man/man9/vget.9 index 1a7d16cdc378..8bfc50681c7d 100644 --- a/share/man/man9/vget.9 +++ b/share/man/man9/vget.9 @@ -26,8 +26,6 @@ .\" (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 July 24, 1996 .Dt VGET 9 .Os diff --git a/share/man/man9/vgone.9 b/share/man/man9/vgone.9 index d34fe25878fd..319b54075198 100644 --- a/share/man/man9/vgone.9 +++ b/share/man/man9/vgone.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 8, 2019 .Dt VGONE 9 .Os diff --git a/share/man/man9/vhold.9 b/share/man/man9/vhold.9 index 503ce29c5643..d8e9e56e4b38 100644 --- a/share/man/man9/vhold.9 +++ b/share/man/man9/vhold.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd April 1, 2007 .Dt VHOLD 9 .Os diff --git a/share/man/man9/vinvalbuf.9 b/share/man/man9/vinvalbuf.9 index 260eb6f39b37..5660eb35fbbf 100644 --- a/share/man/man9/vinvalbuf.9 +++ b/share/man/man9/vinvalbuf.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd October 20, 2008 .Dt VINVALBUF 9 .Os diff --git a/share/man/man9/vm_fault_prefault.9 b/share/man/man9/vm_fault_prefault.9 index 39138e88a1ad..a61b453bd790 100644 --- a/share/man/man9/vm_fault_prefault.9 +++ b/share/man/man9/vm_fault_prefault.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 21, 2003 .Dt VM_FAULT_PREFAULT 9 .Os diff --git a/share/man/man9/vm_map.9 b/share/man/man9/vm_map.9 index 6d9e74bfa8d8..d08d54bd1004 100644 --- a/share/man/man9/vm_map.9 +++ b/share/man/man9/vm_map.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 3, 2018 .Dt VM_MAP 9 .Os @@ -51,15 +49,15 @@ subordinate maps, created using the function. .Bd -literal -offset indent struct vm_map { - struct vm_map_entry header; - struct sx lock; - struct mtx system_mtx; + struct vm_map_entry header; + union { + struct sx lock; + struct mtx system_mtx; + }; int nentries; vm_size_t size; u_int timestamp; - u_char needs_wakeup; - u_char system_map; - vm_flags_t flags; + u_int flags; vm_map_entry_t root; pmap_t pmap; int busy; @@ -85,12 +83,6 @@ A count of the members in use within the circular map entry list. Specifies the size of the virtual address space. .It Va timestamp Used to determine if the map has changed since its last access. -.It Va needs_wakeup -Indicates if a thread is waiting for an allocation within the map. -Used only by system maps. -.It Va system_map -Set to TRUE to indicate that map is a system map; otherwise, it belongs -to a user process. .It Va flags Map flags, described below. .It Va root @@ -108,6 +100,12 @@ Possible map flags: Wire all future pages in this map. .It Dv MAP_BUSY_WAKEUP There are waiters for the map busy status. +.It Va MAP_NEEDS_WAKEUP +Indicates if a thread is waiting for an allocation within the map. +Used only by system maps. +.It Va MAP_SYSTEM_MAP +If set, indicates that the map is the system map; otherwise, it belongs +to a user process. .El .Pp The following flags can be passed to @@ -325,7 +323,6 @@ is backed by a .Xr vm_map_pmap 9 , .Xr vm_map_protect 9 , .Xr vm_map_remove 9 , -.Xr vm_map_simplify_entry 9 , .Xr vm_map_stack 9 , .Xr vm_map_submap 9 , .Xr vm_map_sync 9 , diff --git a/share/man/man9/vm_map_check_protection.9 b/share/man/man9/vm_map_check_protection.9 index 1d475249d0c7..2e1bdc8de30c 100644 --- a/share/man/man9/vm_map_check_protection.9 +++ b/share/man/man9/vm_map_check_protection.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 19, 2003 .Dt VM_MAP_CHECK_PROTECTION 9 .Os diff --git a/share/man/man9/vm_map_delete.9 b/share/man/man9/vm_map_delete.9 index 8eea565a04da..c8e1cd2d010e 100644 --- a/share/man/man9/vm_map_delete.9 +++ b/share/man/man9/vm_map_delete.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 19, 2003 .Dt VM_MAP_DELETE 9 .Os diff --git a/share/man/man9/vm_map_entry_resize_free.9 b/share/man/man9/vm_map_entry_resize_free.9 index 9e70a8d757bf..07f80db581bf 100644 --- a/share/man/man9/vm_map_entry_resize_free.9 +++ b/share/man/man9/vm_map_entry_resize_free.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 17, 2004 .Dt VM_MAP_ENTRY_RESIZE_FREE 9 .Os diff --git a/share/man/man9/vm_map_find.9 b/share/man/man9/vm_map_find.9 index 031be99b767a..0a961dfa3475 100644 --- a/share/man/man9/vm_map_find.9 +++ b/share/man/man9/vm_map_find.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 12, 2013 .Dt VM_MAP_FIND 9 .Os diff --git a/share/man/man9/vm_map_findspace.9 b/share/man/man9/vm_map_findspace.9 index 29d465bd3583..5e5ebcbafd4d 100644 --- a/share/man/man9/vm_map_findspace.9 +++ b/share/man/man9/vm_map_findspace.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 19, 2003 .Dt VM_MAP_FINDSPACE 9 .Os diff --git a/share/man/man9/vm_map_inherit.9 b/share/man/man9/vm_map_inherit.9 index f8416c722cde..511403d8ea0a 100644 --- a/share/man/man9/vm_map_inherit.9 +++ b/share/man/man9/vm_map_inherit.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 19, 2003 .Dt VM_MAP_INHERIT 9 .Os diff --git a/share/man/man9/vm_map_init.9 b/share/man/man9/vm_map_init.9 index 25b8aeb39f21..f2e01bed4b50 100644 --- a/share/man/man9/vm_map_init.9 +++ b/share/man/man9/vm_map_init.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 19, 2003 .Dt VM_MAP_INIT 9 .Os diff --git a/share/man/man9/vm_map_insert.9 b/share/man/man9/vm_map_insert.9 index 20e062b446a3..2cd33e45fc32 100644 --- a/share/man/man9/vm_map_insert.9 +++ b/share/man/man9/vm_map_insert.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 11, 2013 .Dt VM_MAP_INSERT 9 .Os diff --git a/share/man/man9/vm_map_lock.9 b/share/man/man9/vm_map_lock.9 index 0f26412871fb..5b0afa1bdb4c 100644 --- a/share/man/man9/vm_map_lock.9 +++ b/share/man/man9/vm_map_lock.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 19, 2003 .Dt VM_MAP_LOCK 9 .Os diff --git a/share/man/man9/vm_map_lookup.9 b/share/man/man9/vm_map_lookup.9 index a28613fafdfd..fe19d09e00e8 100644 --- a/share/man/man9/vm_map_lookup.9 +++ b/share/man/man9/vm_map_lookup.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 19, 2003 .Dt VM_MAP_LOOKUP 9 .Os diff --git a/share/man/man9/vm_map_madvise.9 b/share/man/man9/vm_map_madvise.9 index dc283ebbb8b2..9163ca9d28b1 100644 --- a/share/man/man9/vm_map_madvise.9 +++ b/share/man/man9/vm_map_madvise.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 19, 2003 .Dt VM_MAP_MADVISE 9 .Os diff --git a/share/man/man9/vm_map_max.9 b/share/man/man9/vm_map_max.9 index 92d574dbeed6..0f5317851374 100644 --- a/share/man/man9/vm_map_max.9 +++ b/share/man/man9/vm_map_max.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 19, 2003 .Dt VM_MAP_MAX 9 .Os diff --git a/share/man/man9/vm_map_protect.9 b/share/man/man9/vm_map_protect.9 index d5986ce7b7c3..5ece889a85df 100644 --- a/share/man/man9/vm_map_protect.9 +++ b/share/man/man9/vm_map_protect.9 @@ -1,6 +1,6 @@ .\" .\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org> -.\" Copyright (c) 2021 The FreeBSD Foundation, Inc. +.\" Copyright (c) 2021 The FreeBSD Foundation .\" All rights reserved. .\" .\" Parts of this documentation were written by @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 23, 2021 .Dt VM_MAP_PROTECT 9 .Os diff --git a/share/man/man9/vm_map_remove.9 b/share/man/man9/vm_map_remove.9 index 79c678228175..c72abe745d9a 100644 --- a/share/man/man9/vm_map_remove.9 +++ b/share/man/man9/vm_map_remove.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 19, 2003 .Dt VM_MAP_REMOVE 9 .Os diff --git a/share/man/man9/vm_map_stack.9 b/share/man/man9/vm_map_stack.9 index 4036efb4f043..533a9a49a4b1 100644 --- a/share/man/man9/vm_map_stack.9 +++ b/share/man/man9/vm_map_stack.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd January 11, 2013 .Dt VM_MAP_STACK 9 .Os diff --git a/share/man/man9/vm_map_submap.9 b/share/man/man9/vm_map_submap.9 index 6f29d6b90b3f..9d96f9bd063a 100644 --- a/share/man/man9/vm_map_submap.9 +++ b/share/man/man9/vm_map_submap.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 19, 2003 .Dt VM_MAP_SUBMAP 9 .Os diff --git a/share/man/man9/vm_map_sync.9 b/share/man/man9/vm_map_sync.9 index dd487df273c6..028ef20b0499 100644 --- a/share/man/man9/vm_map_sync.9 +++ b/share/man/man9/vm_map_sync.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 9, 2011 .Dt VM_MAP_SYNC 9 .Os diff --git a/share/man/man9/vm_map_wire.9 b/share/man/man9/vm_map_wire.9 index f112f344e6bc..2bea01c74e2e 100644 --- a/share/man/man9/vm_map_wire.9 +++ b/share/man/man9/vm_map_wire.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 19, 2003 .Dt VM_MAP_WIRE 9 .Os diff --git a/share/man/man9/vm_page_aflag.9 b/share/man/man9/vm_page_aflag.9 index 0d0bdeb55085..4f45d7b71ef1 100644 --- a/share/man/man9/vm_page_aflag.9 +++ b/share/man/man9/vm_page_aflag.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 31, 2011 .Dt VM_PAGE_AFLAG 9 .Os diff --git a/share/man/man9/vm_page_alloc.9 b/share/man/man9/vm_page_alloc.9 index 95463483c25c..4bf8db33a28d 100644 --- a/share/man/man9/vm_page_alloc.9 +++ b/share/man/man9/vm_page_alloc.9 @@ -28,9 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd November 11, 2021 +.Dd August 4, 2024 .Dt VM_PAGE_ALLOC 9 .Os .Sh NAME @@ -89,17 +87,6 @@ .Fa "vm_page_t mpred" .Fc .Ft vm_page_t -.Fo vm_page_alloc_freelist -.Fa "int freelist" -.Fa "int req" -.Fc -.Ft vm_page_t -.Fo vm_page_alloc_freelist_domain -.Fa "int domain" -.Fa "int freelist" -.Fa "int req" -.Fc -.Ft vm_page_t .Fo vm_page_alloc_noobj .Fa "int req" .Fc @@ -214,19 +201,6 @@ or will carry the machine-dependent encoding of the memory attribute. Additionally, the direct mapping of the page, if any, will be updated to reflect the requested memory attribute. -.Pp -The -.Fn vm_page_alloc_freelist -and -.Fn vm_page_alloc_freelist_domain -functions behave identically to -.Fn vm_page_alloc_noobj -and -.Fn vm_page_alloc_noobj_domain , -respectively, except that a successful allocation will return a page from the -specified physical memory freelist. -These functions are not intended for use outside of the virtual memory -subsystem and exist only to support the requirements of certain platforms. .Sh REQUEST FLAGS All page allocator functions accept a .Fa req @@ -333,6 +307,10 @@ pages will be allocated by the caller in the near future. must be no larger than 65535. If the system is short of free pages, this hint may cause the kernel to reclaim memory more aggressively than it would otherwise. +.It Dv VM_ALLOC_NOFREE +The caller asserts that the returned page will never be released. +If this flag is specified, the allocator will try to fetch a page from a +special per-domain arena in order to curb long-term physical memory fragmentation. .El .Sh RETURN VALUES If the allocation was successful, a pointer to the diff --git a/share/man/man9/vm_page_bits.9 b/share/man/man9/vm_page_bits.9 index 43b54dcf93b6..c8900f4a45c0 100644 --- a/share/man/man9/vm_page_bits.9 +++ b/share/man/man9/vm_page_bits.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 1, 2001 .Dt VM_PAGE_BITS 9 .Os diff --git a/share/man/man9/vm_page_busy.9 b/share/man/man9/vm_page_busy.9 index 88511aafabca..ee8ca7e1f329 100644 --- a/share/man/man9/vm_page_busy.9 +++ b/share/man/man9/vm_page_busy.9 @@ -22,8 +22,6 @@ .\" 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 November 11, 2021 .Dt VM_PAGE_BUSY 9 .Os diff --git a/share/man/man9/vm_page_deactivate.9 b/share/man/man9/vm_page_deactivate.9 index fff5ea9b5499..ca6c0595cce7 100644 --- a/share/man/man9/vm_page_deactivate.9 +++ b/share/man/man9/vm_page_deactivate.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 24, 2001 .Dt VM_PAGE_DEACTIVATE 9 .Os diff --git a/share/man/man9/vm_page_dontneed.9 b/share/man/man9/vm_page_dontneed.9 index b30df14c7018..6f6628f747a2 100644 --- a/share/man/man9/vm_page_dontneed.9 +++ b/share/man/man9/vm_page_dontneed.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 30, 2001 .Dt VM_PAGE_DONTNEED 9 .Os diff --git a/share/man/man9/vm_page_free.9 b/share/man/man9/vm_page_free.9 index 7df970cf6da9..0a71076d164c 100644 --- a/share/man/man9/vm_page_free.9 +++ b/share/man/man9/vm_page_free.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 24, 2001 .Dt VM_PAGE_FREE 9 .Os diff --git a/share/man/man9/vm_page_grab.9 b/share/man/man9/vm_page_grab.9 index d19289ae9459..28a24e8bfa63 100644 --- a/share/man/man9/vm_page_grab.9 +++ b/share/man/man9/vm_page_grab.9 @@ -28,8 +28,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 23, 2013 .Dt VM_PAGE_GRAB 9 .Os diff --git a/share/man/man9/vm_page_insert.9 b/share/man/man9/vm_page_insert.9 index ce2c6ae91966..7f872c47ec97 100644 --- a/share/man/man9/vm_page_insert.9 +++ b/share/man/man9/vm_page_insert.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 17, 2001 .Dt VM_PAGE_INSERT 9 .Os diff --git a/share/man/man9/vm_page_lookup.9 b/share/man/man9/vm_page_lookup.9 index a268617e358b..74318fd60efd 100644 --- a/share/man/man9/vm_page_lookup.9 +++ b/share/man/man9/vm_page_lookup.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 13, 2001 .Dt VM_PAGE_LOOKUP 9 .Os diff --git a/share/man/man9/vm_page_rename.9 b/share/man/man9/vm_page_rename.9 index 64f6409b186c..359d334125dc 100644 --- a/share/man/man9/vm_page_rename.9 +++ b/share/man/man9/vm_page_rename.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd July 17, 2001 .Dt VM_PAGE_RENAME 9 .Os diff --git a/share/man/man9/vm_page_wire.9 b/share/man/man9/vm_page_wire.9 index 940cf9f6ceec..1f23bd5a263a 100644 --- a/share/man/man9/vm_page_wire.9 +++ b/share/man/man9/vm_page_wire.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd September 9, 2019 .Dt VM_PAGE_WIRE 9 .Os diff --git a/share/man/man9/vm_set_page_size.9 b/share/man/man9/vm_set_page_size.9 index 09afaba8341b..e0fda4f5c40f 100644 --- a/share/man/man9/vm_set_page_size.9 +++ b/share/man/man9/vm_set_page_size.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 21, 2014 .Dt VM_SET_PAGE_SIZE 9 .Os diff --git a/share/man/man9/vmem.9 b/share/man/man9/vmem.9 index f3a1c1d0b1d7..053aec856a78 100644 --- a/share/man/man9/vmem.9 +++ b/share/man/man9/vmem.9 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" $NetBSD: vmem.9,v 1.15 2013/01/29 22:02:17 wiz Exp $ .\" .\" Copyright (c)2006 YAMAMOTO Takashi, @@ -24,8 +27,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .\" ------------------------------------------------------------ .Dd May 17, 2019 .Dt VMEM 9 @@ -76,7 +77,7 @@ other than virtual memory. .\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .Fn vmem_create creates a new vmem arena. -.Bl -tag -width qcache_max +.Bl -tag -offset indent -width "qcache_max" .It Fa name The string to describe the vmem. .It Fa base @@ -119,7 +120,7 @@ wait flag. .\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .Fn vmem_xalloc allocates a resource from the arena. -.Bl -tag -width nocross +.Bl -tag -offset indent -width "qcache_max" .It Fa vm The arena which we allocate from. .It Fa size @@ -161,7 +162,7 @@ A bitwise OR of an allocation strategy and a .Xr malloc 9 wait flag. The allocation strategy is one of: -.Bl -tag width indent +.Bl -tag -width "M_FIRSTFIT" .It Dv M_FIRSTFIT Prefer allocation performance. .It Dv M_BESTFIT @@ -184,7 +185,7 @@ overwrites it with the start address of the allocated span. frees resource allocated by .Fn vmem_xalloc to the arena. -.Bl -tag -width addr +.Bl -tag -offset indent -width "qcache_max" .It Fa vm The arena which we free to. .It Fa addr @@ -205,7 +206,7 @@ argument used for .\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .Fn vmem_alloc allocates a resource from the arena. -.Bl -tag -width flags +.Bl -tag -offset indent -width "qcache_max" .It Fa vm The arena which we allocate from. .It Fa size @@ -230,7 +231,7 @@ overwrites it with the start address of the allocated span. frees resource allocated by .Fn vmem_alloc to the arena. -.Bl -tag -width addr +.Bl -tag -offset indent -width "qcache_max" .It Fa vm The arena which we free to. .It Fa addr @@ -251,7 +252,7 @@ argument used for .\" ------------------------------------------------------------ .Fn vmem_destroy destroys a vmem arena. -.Bl -tag -width vm +.Bl -tag -offset indent -width "qcache_max" .It Fa vm The vmem arena being destroyed. The caller should ensure that no one will use it anymore. diff --git a/share/man/man9/vn_deallocate.9 b/share/man/man9/vn_deallocate.9 index ce1515ddaaa1..6ce64dc67903 100644 --- a/share/man/man9/vn_deallocate.9 +++ b/share/man/man9/vn_deallocate.9 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2021 The FreeBSD Foundation .\" diff --git a/share/man/man9/vn_fullpath.9 b/share/man/man9/vn_fullpath.9 index 9f7287c287dd..116f519ec8aa 100644 --- a/share/man/man9/vn_fullpath.9 +++ b/share/man/man9/vn_fullpath.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 15, 2021 .Dt VN_FULLPATH 9 .Os diff --git a/share/man/man9/vn_isdisk.9 b/share/man/man9/vn_isdisk.9 index 5de75e53e1e7..1c218b4a72b7 100644 --- a/share/man/man9/vn_isdisk.9 +++ b/share/man/man9/vn_isdisk.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd June 28, 2021 .Dt VN_ISDISK 9 .Os diff --git a/share/man/man9/vnet.9 b/share/man/man9/vnet.9 index 7c254859c26c..28e28bfd3242 100644 --- a/share/man/man9/vnet.9 +++ b/share/man/man9/vnet.9 @@ -25,8 +25,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd December 10, 2020 .Dt VNET 9 .Os diff --git a/share/man/man9/vnode.9 b/share/man/man9/vnode.9 index 8d8da46b93ea..5dd087725e92 100644 --- a/share/man/man9/vnode.9 +++ b/share/man/man9/vnode.9 @@ -24,9 +24,7 @@ .\" (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 February 12, 2014 +.Dd October 9, 2024 .Dt VNODE 9 .Os .Sh NAME @@ -106,9 +104,21 @@ the vnode. The .Va v_op field is used by the -.Dv VOP_* -macros to call functions in the file system which implement the vnode's +.Fn VOP_* +functions to call functions in the file system which implement the vnode's functionality. +.Pp +The +.Fn VOP_* +function declarations and definitions are generated from +.Pa sys/kern/vnode_if.src +by the +.Pa sys/tools/vndoe_if.awk +script. +The interfaces are documented in their respective manual pages like +.Xr VOP_READ 9 +and +.Xr VOP_WRITE 9 . .Sh VNODE TYPES .Bl -tag -width VSOCK .It Dv VNON @@ -156,6 +166,16 @@ when holding a .Nm interlock, will cause a LOR (Lock Order Reversal) due to the intertwining of VM Objects and Vnodes. +.Sh FILES +.Bl -tag -width "sys/tools/vnode_if.awk" -compact +.It Pa sys/kern/vnode_if.src +The input file for +.Pa sys/tools/vnode_if.awk . +.It Pa sys/tools/vnode_if.awk +The script generating the source code of the +.Fn VOP_* +functions. +.El .Sh SEE ALSO .Xr malloc 9 , .Xr VFS 9 , diff --git a/share/man/man9/vnode_pager_purge_range.9 b/share/man/man9/vnode_pager_purge_range.9 index ecd21a084a39..8bd54de9b204 100644 --- a/share/man/man9/vnode_pager_purge_range.9 +++ b/share/man/man9/vnode_pager_purge_range.9 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2021 The FreeBSD Foundation .\" diff --git a/share/man/man9/vnode_pager_setsize.9 b/share/man/man9/vnode_pager_setsize.9 index 0dc3b2057930..8de33541f8a1 100644 --- a/share/man/man9/vnode_pager_setsize.9 +++ b/share/man/man9/vnode_pager_setsize.9 @@ -1,5 +1,5 @@ .\" -.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2021 The FreeBSD Foundation .\" diff --git a/share/man/man9/vref.9 b/share/man/man9/vref.9 index 7b0c0f3fa4cd..56afe7a01140 100644 --- a/share/man/man9/vref.9 +++ b/share/man/man9/vref.9 @@ -26,8 +26,6 @@ .\" (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 18, 2016 .Dt VREF 9 .Os diff --git a/share/man/man9/vrefcnt.9 b/share/man/man9/vrefcnt.9 index de7af26fb9c0..d6f73f157c8c 100644 --- a/share/man/man9/vrefcnt.9 +++ b/share/man/man9/vrefcnt.9 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd February 10, 2008 .Dt VREFCNT 9 .Os diff --git a/share/man/man9/vrele.9 b/share/man/man9/vrele.9 index a0d6a1e3f0ac..01a6a8951474 100644 --- a/share/man/man9/vrele.9 +++ b/share/man/man9/vrele.9 @@ -27,8 +27,6 @@ .\" (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 February 24, 2016 .Dt VRELE 9 .Os diff --git a/share/man/man9/vslock.9 b/share/man/man9/vslock.9 index 1cf3e5d55df7..4522822d8c3e 100644 --- a/share/man/man9/vslock.9 +++ b/share/man/man9/vslock.9 @@ -27,8 +27,6 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd August 29, 2012 .Dt VSLOCK 9 .Os diff --git a/share/man/man9/watchdog.9 b/share/man/man9/watchdog.9 index e43e739016fc..5a0cf55b65a3 100644 --- a/share/man/man9/watchdog.9 +++ b/share/man/man9/watchdog.9 @@ -22,8 +22,6 @@ .\" (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 February 28, 2004 .Dt WATCHDOG 9 .Os diff --git a/share/man/man9/zero_region.9 b/share/man/man9/zero_region.9 index 27b1b50be14d..1ad2166141fe 100644 --- a/share/man/man9/zero_region.9 +++ b/share/man/man9/zero_region.9 @@ -23,8 +23,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" .Dd March 2, 2021 .Dt ZERO_REGION 9 .Os diff --git a/share/man/man9/zone.9 b/share/man/man9/zone.9 index e26b29976807..9f13cf0e504a 100644 --- a/share/man/man9/zone.9 +++ b/share/man/man9/zone.9 @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2001 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2001 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -23,9 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD$ -.\" -.Dd February 15, 2022 +.Dd January 16, 2023 .Dt UMA 9 .Os .Sh NAME @@ -50,7 +48,7 @@ typedef void (*uma_free)(void *item, vm_size_t size, uint8_t pflag); .Ed .Ft uma_zone_t .Fo uma_zcreate -.Fa "char *name" "int size" +.Fa "char *name" "size_t size" .Fa "uma_ctor ctor" "uma_dtor dtor" "uma_init zinit" "uma_fini zfini" .Fa "int align" "uint16_t flags" .Fc @@ -79,6 +77,8 @@ typedef void (*uma_free)(void *item, vm_size_t size, uint8_t pflag); .Fn uma_zalloc_pcpu "uma_zone_t zone" "int flags" .Ft "void *" .Fn uma_zalloc_pcpu_arg "uma_zone_t zone" "void *arg" "int flags" +.Ft "void *" +.Fn uma_zalloc_smr "uma_zone_t zone" "int flags" .Ft void .Fn uma_zfree "uma_zone_t zone" "void *item" .Ft void @@ -88,6 +88,8 @@ typedef void (*uma_free)(void *item, vm_size_t size, uint8_t pflag); .Ft void .Fn uma_zfree_pcpu_arg "uma_zone_t zone" "void *item" "void *arg" .Ft void +.Fn uma_zfree_smr "uma_zone_t zone" "void *item" +.Ft void .Fn uma_prealloc "uma_zone_t zone" "int nitems" .Ft void .Fn uma_zone_reserve "uma_zone_t zone" "int nitems" @@ -117,6 +119,10 @@ typedef void (*uma_free)(void *item, vm_size_t size, uint8_t pflag); .Fn uma_zone_set_warning "uma_zone_t zone" "const char *warning" .Ft void .Fn uma_zone_set_maxaction "uma_zone_t zone" "void (*maxaction)(uma_zone_t)" +.Ft smr_t +.Fn uma_zone_get_smr "uma_zone_t zone" +.Ft void +.Fn uma_zone_set_smr "uma_zone_t zone" "smr_t smr" .In sys/sysctl.h .Fn SYSCTL_UMA_MAX parent nbr name access zone descr .Fn SYSCTL_ADD_UMA_MAX ctx parent nbr name access zone descr @@ -330,6 +336,14 @@ Cached items that have not been used for a long period may also be freed from zone. When this flag is set, the system will not reclaim memory from the zone's caches. +.It Dv UMA_ZONE_SMR +Create a zone whose items will be synchronized using the +.Xr smr 9 +mechanism. +Upon creation the zone will have an associated +.Ft smr_t +structure which can be fetched using +.Fn uma_zone_get_smr . .El .Pp Zones can be destroyed using @@ -390,6 +404,17 @@ then does nothing. .Pp The +.Fn uma_zalloc_smr +and +.Fn uma_zfree_smr +functions allocate and free items from an SMR-enabled zone, that is, +a zone created with +.Dv UMA_ZONE_SMR +or a zone that has had +.Fn uma_zone_set_smr +called. +.Pp +The .Fn uma_zalloc_domain function allows callers to specify a fixed .Xr numa 4 @@ -535,6 +560,16 @@ Therefore, this function should do very little work (similar to a signal handler). .Pp The +.Fn uma_zone_set_smr +function associates an existing +.Xr smr 9 +structure with a UMA zone. +The effect is similar to creating a zone with the +.Dv UMA_ZONE_SMR +flag, except that a new SMR structure is not created. +This function must be called before any allocations from the zone are performed. +.Pp +The .Fn SYSCTL_UMA_MAX parent nbr name access zone descr macro declares a static .Xr sysctl 9 @@ -577,7 +612,8 @@ non-executable memory. .Sh SEE ALSO .Xr numa 4 , .Xr vmstat 8 , -.Xr malloc 9 +.Xr malloc 9 , +.Xr smr 9 .Rs .%A Jeff Bonwick .%T "The Slab Allocator: An Object-Caching Kernel Memory Allocator" |