Index: head/share/man/man4/cc_newreno.4 =================================================================== --- head/share/man/man4/cc_newreno.4 (revision 366011) +++ head/share/man/man4/cc_newreno.4 (revision 366012) @@ -1,154 +1,154 @@ .\" .\" Copyright (c) 2009 Lawrence Stewart .\" Copyright (c) 2011 The FreeBSD Foundation .\" All rights reserved. .\" .\" Portions of this documentation were written at the Centre for Advanced .\" Internet Architectures, Swinburne University of Technology, Melbourne, .\" Australia by Lawrence Stewart 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. .\" .\" $FreeBSD$ .\" .Dd August 6, 2019 .Dt CC_NEWRENO 4 .Os .Sh NAME .Nm cc_newreno .Nd NewReno Congestion Control Algorithm .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 .Nm module supports a number of socket options under TCP_CCALGOOPT (refer to .Xr tcp 4 and -.Xr moc_cc 9 for details) +.Xr mod_cc 9 for details) which can be set with .Xr setsockopt 2 and tested with .Xr getsockopt 2 . -The +The .Nm socket options use this structure defined in : .Bd -literal struct cc_newreno_opts { int name; uint32_t val; } .Ed .Bl -tag -width ".Va CC_NEWRENO_BETA_ECN" .It Va CC_NEWRENO_BETA Multiplicative window decrease factor, specified as a percentage, applied to the congestion window in response to a congestion signal per: cwnd = (cwnd * CC_NEWRENO_BETA) / 100. Default is 50. .It Va CC_NEWRENO_BETA_ECN Multiplicative window decrease factor, specified as a percentage, applied to the congestion window in response to an ECN congestion signal when .Va net.inet.tcp.cc.abe=1 per: cwnd = (cwnd * CC_NEWRENO_BETA_ECN) / 100. Default is 80. .El .Sh MIB Variables The algorithm exposes these variables in the .Va net.inet.tcp.cc.newreno branch of the .Xr sysctl 3 MIB: .Bl -tag -width ".Va beta_ecn" .It Va beta Multiplicative window decrease factor, specified as a percentage, applied to the congestion window in response to a congestion signal per: cwnd = (cwnd * beta) / 100. Default is 50. .It Va beta_ecn Multiplicative window decrease factor, specified as a percentage, applied to the congestion window in response to an ECN congestion signal when .Va net.inet.tcp.cc.abe=1 per: cwnd = (cwnd * beta_ecn) / 100. Default is 80. .El .Sh SEE ALSO .Xr cc_chd 4 , .Xr cc_cubic 4 , .Xr cc_hd 4 , .Xr cc_htcp 4 , .Xr cc_vegas 4 , .Xr mod_cc 4 , .Xr tcp 4 , .Xr mod_cc 9 .Rs .%A "Mark Allman" .%A "Vern Paxson" .%A "Ethan Blanton" .%T "TCP Congestion Control" .%O "RFC 5681" .Re .Rs .%A "Naeem Khademi" .%A "Michael Welzl" .%A "Grenville Armitage" .%A "Gorry Fairhurst" .%T "TCP Alternative Backoff with ECN (ABE)" .%O "RFC 8511" .Re .Sh ACKNOWLEDGEMENTS Development and testing of this software were made possible in part by grants from the FreeBSD Foundation and Cisco University Research Program Fund at Community Foundation Silicon Valley. .Sh HISTORY The .Nm congestion control algorithm first appeared in its modular form in .Fx 9.0 . .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 possible in part by a grant from the Cisco University Research Program Fund at Community Foundation Silicon Valley. More details are available at: .Pp http://caia.swin.edu.au/urp/newtcp/ .Sh AUTHORS .An -nosplit The .Nm congestion control module was written by .An James Healy Aq Mt jimmy@deefa.com , .An Lawrence Stewart Aq Mt lstewart@FreeBSD.org and .An David Hayes Aq Mt david.hayes@ieee.org . .Pp Support for TCP ABE was added by .An Tom Jones Aq Mt tj@enoti.me . .Pp This manual page was written by .An Lawrence Stewart Aq Mt lstewart@FreeBSD.org . Index: head/share/man/man4/ddb.4 =================================================================== --- head/share/man/man4/ddb.4 (revision 366011) +++ head/share/man/man4/ddb.4 (revision 366012) @@ -1,1620 +1,1618 @@ .\" .\" Mach Operating System .\" Copyright (c) 1991,1990 Carnegie Mellon University .\" Copyright (c) 2007 Robert N. M. Watson .\" All Rights Reserved. .\" .\" Permission to use, copy, modify and distribute this software and its .\" documentation is hereby granted, provided that both the copyright .\" notice and this permission notice appear in all copies of the .\" software, derivative works or modified versions, and any portions .\" thereof, and that both notices appear in supporting documentation. .\" .\" CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" .\" CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR .\" ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. .\" .\" Carnegie Mellon requests users of this software to return to .\" .\" Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU .\" School of Computer Science .\" Carnegie Mellon University .\" Pittsburgh PA 15213-3890 .\" .\" any improvements or extensions that they make and grant Carnegie Mellon .\" the rights to redistribute these changes. .\" .\" $FreeBSD$ .\" .Dd October 17, 2019 .Dt DDB 4 .Os .Sh NAME .Nm ddb .Nd interactive kernel debugger .Sh SYNOPSIS In order to enable kernel debugging facilities include: .Bd -ragged -offset indent .Cd options KDB .Cd options DDB .Ed .Pp To prevent activation of the debugger on kernel .Xr panic 9 : .Bd -ragged -offset indent .Cd options KDB_UNATTENDED .Ed .Pp In order to print a stack trace of the current thread on the console for a panic: .Bd -ragged -offset indent .Cd options KDB_TRACE .Ed .Pp To print the numerical value of symbols in addition to the symbolic representation, define: .Bd -ragged -offset indent .Cd options DDB_NUMSYM .Ed .Pp To enable the .Xr gdb 1 backend, so that remote debugging with .Xr kgdb 1 is possible, include: .Bd -ragged -offset indent .Cd options GDB .Ed .Sh DESCRIPTION The .Nm kernel debugger is an interactive debugger with a syntax inspired by .Xr gdb 1 . If linked into the running kernel, it can be invoked locally with the .Ql debug .Xr keymap 5 action, usually mapped to Ctrl+Alt+Esc, or by setting the .Va debug.kdb.enter sysctl to 1. The debugger is also invoked on kernel .Xr panic 9 if the .Va debug.debugger_on_panic .Xr sysctl 8 MIB variable is set non-zero, which is the default unless the .Dv KDB_UNATTENDED option is specified. .Pp The current location is called .Va dot . The .Va dot is displayed with a hexadecimal format at a prompt. The commands .Ic examine and .Ic write update .Va dot to the address of the last line examined or the last location modified, and set .Va next to the address of the next location to be examined or changed. Other commands do not change .Va dot , and set .Va next to be the same as .Va dot . .Pp The general command syntax is: .Ar command Ns Op Li / Ns Ar modifier .Oo Ar addr Oc Ns Op , Ns Ar count .Pp A blank line repeats the previous command from the address .Va next with count 1 and no modifiers. Specifying .Ar addr sets .Va dot to the address. Omitting .Ar addr uses .Va dot . A missing .Ar count is taken to be 1 for printing commands or infinity for stack traces. A .Ar count of -1 is equivalent to a missing .Ar count . Options that are supplied but not supported by the given .Ar command are usually ignored. .Pp The .Nm debugger has a pager feature (like the .Xr more 1 command) for the output. If an output line exceeds the number set in the .Va lines variable, it displays .Dq Li --More-- and waits for a response. The valid responses for it are: .Pp .Bl -tag -compact -width ".Li SPC" .It Li SPC one more page .It Li RET one more line .It Li q abort the current command, and return to the command input mode .El .Pp Finally, .Nm provides a small (currently 10 items) command history, and offers simple .Nm emacs Ns -style 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. .Sh COMMANDS .Ss COMMON DEBUGGER COMMANDS .Bl -tag -width indent -compact .It Ic help Print a short summary of the available commands and command abbreviations. .Pp .It Xo .Ic examine Ns Op Li / Ns Cm AISabcdghilmorsuxz ... .Oo Ar addr Oc Ns Op , Ns Ar count .Xc .It Xo .Ic x Ns Op Li / Ns Cm AISabcdghilmorsuxz ... .Oo Ar addr Oc Ns Op , Ns Ar count .Xc Display the addressed locations according to the formats in the modifier. Multiple modifier formats display multiple locations. If no format is specified, the last format specified for this command is used. .Pp The format characters are: .Bl -tag -compact -width indent .It Cm b look at by bytes (8 bits) .It Cm h look at by half words (16 bits) .It Cm l look at by long words (32 bits) .It Cm g look at by quad words (64 bits) .It Cm a print the location being displayed .It Cm A print the location with a line number if possible .It Cm x display in unsigned hex .It Cm z display in signed hex .It Cm o display in unsigned octal .It Cm d display in signed decimal .It Cm u display in unsigned decimal .It Cm r display in current radix, signed .It Cm c display low 8 bits as a character. Non-printing characters are displayed as an octal escape code (e.g., .Ql \e000 ) . .It Cm s display the null-terminated string at the location. Non-printing characters are displayed as octal escapes. .It Cm m display in unsigned hex with character dump at the end of each line. 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. 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 display a symbol name for the pointer stored at the address .El .Pp .It Ic xf Examine forward: execute an .Ic examine command with the last specified parameters to it except that the next address displayed by it is used as the start address. .Pp .It Ic xb Examine backward: execute an .Ic examine command with the last specified parameters to it except that the last start address subtracted by the size displayed by it is used as the start address. .Pp .It Ic print Ns Op Li / Ns Cm acdoruxz .It Ic p Ns Op Li / Ns Cm acdoruxz Print .Ar addr Ns s according to the modifier character (as described above for .Cm examine ) . Valid formats are: .Cm a , x , z , o , d , u , r , and .Cm c . If no modifier is specified, the last one specified to it is used. The argument .Ar addr can be a string, in which case it is printed as it is. For example: .Bd -literal -offset indent print/x "eax = " $eax "\enecx = " $ecx "\en" .Ed .Pp will print like: .Bd -literal -offset indent eax = xxxxxx ecx = yyyyyy .Ed .Pp .It Xo .Ic write Ns Op Li / Ns Cm bhl .Ar addr expr1 Op Ar expr2 ... .Xc .It Xo .Ic w Ns Op Li / Ns Cm bhl .Ar addr expr1 Op Ar expr2 ... .Xc Write the expressions specified after .Ar addr on the command line at succeeding locations starting with .Ar addr . The write unit size can be specified in the modifier with a letter .Cm b (byte), .Cm h (half word) or .Cm l (long word) respectively. If omitted, long word is assumed. .Pp .Sy Warning : since there is no delimiter between expressions, strange things may happen. It is best to enclose each expression in parentheses. .Pp .It Ic set Li $ Ns Ar variable Oo Li = Oc Ar expr Set the named variable or register with the value of .Ar expr . Valid variable names are described below. .Pp .It Ic break Ns Oo Li / Ns Cm u Oc Oo Ar addr Oc Ns Op , Ns Ar count .It Ic b Ns Oo Li / Ns Cm u Oc Oo Ar addr Oc Ns Op , Ns Ar count Set a break point at .Ar addr . If .Ar count is supplied, the .Ic continue command will not stop at this break point on the first .Ar count \- 1 times that it is hit. If the break point is set, a break point number is printed with .Ql # . This number can be used in deleting the break point or adding conditions to it. .Pp If the .Cm u modifier is specified, this command sets a break point in user address space. Without the .Cm u option, the address is considered to be in the kernel space, and a wrong space address is rejected with an error message. This modifier can be used only if it is supported by machine dependent routines. .Pp .Sy Warning : If a user text is shadowed by a normal user space debugger, user space break points may not work correctly. Setting a break point at the low-level code paths may also cause strange behavior. .Pp .It Ic delete Op Ar addr .It Ic d Op Ar addr .It Ic delete Li # Ns Ar number .It Ic d Li # Ns Ar number Delete the specified break point. The break point can be specified by a break point number with .Ql # , or by using the same .Ar addr specified in the original .Ic break command, or by omitting .Ar addr to get the default address of .Va dot . .Pp .It Ic halt Halt the system. .Pp .It Ic watch Oo Ar addr Oc Ns Op , Ns Ar size Set a watchpoint for a region. Execution stops when an attempt to modify the region occurs. The .Ar size argument defaults to 4. If you specify a wrong space address, the request is rejected with an error message. .Pp .Sy Warning : Attempts to watch wired kernel memory may cause unrecoverable error in some systems such as i386. Watchpoints on user addresses work best. .Pp .It Ic hwatch Oo Ar addr Oc Ns Op , Ns Ar size Set a hardware watchpoint for a region if supported by the architecture. Execution stops when an attempt to modify the region occurs. The .Ar size argument defaults to 4. .Pp .Sy Warning : The hardware debug facilities do not have a concept of separate address spaces like the watch command does. Use .Ic hwatch for setting watchpoints on kernel address locations only, and avoid its use on user mode address spaces. .Pp .It Ic dhwatch Oo Ar addr Oc Ns Op , Ns Ar size Delete specified hardware watchpoint. .Pp .It Ic kill Ar sig pid Send signal .Ar sig to process .Ar pid . The signal is acted on upon returning from the debugger. This command can be used to kill a process causing resource contention in the case of a hung system. See .Xr signal 3 for a list of signals. Note that the arguments are reversed relative to .Xr kill 2 . .Pp .It Ic step Ns Oo Li / Ns Cm p Oc Ns Op , Ns Ar count .It Ic s Ns Oo Li / Ns Cm p Oc Ns Op , Ns Ar count Single step .Ar count times. If the .Cm p modifier is specified, print each instruction at each step. Otherwise, only print the last instruction. .Pp .Sy Warning : depending on machine type, it may not be possible to single-step through some low-level code paths or user space code. On machines with software-emulated single-stepping (e.g., pmax), stepping through code executed by interrupt handlers will probably do the wrong thing. .Pp .It Ic continue Ns Op Li / Ns Cm c .It Ic c Ns Op Li / Ns Cm c Continue execution until a breakpoint or watchpoint. If the .Cm c modifier is specified, count instructions while executing. Some machines (e.g., pmax) also count loads and stores. .Pp .Sy Warning : when counting, the debugger is really silently single-stepping. This means that single-stepping on low-level code may cause strange behavior. .Pp .It Ic until Ns Op Li / Ns Cm p Stop at the next call or return instruction. If the .Cm p modifier is specified, print the call nesting depth and the cumulative instruction count at each call or return. Otherwise, only print when the matching return is hit. .Pp .It Ic next Ns Op Li / Ns Cm p .It Ic match Ns Op Li / Ns Cm p Stop at the matching return instruction. If the .Cm p modifier is specified, print the call nesting depth and the cumulative instruction count at each call or return. Otherwise, only print when the matching return is hit. .Pp .It Xo .Ic trace Ns Op Li / Ns Cm u .Op Ar pid | tid Ns .Op , Ns Ar count .Xc .It Xo .Ic t Ns Op Li / Ns Cm u .Op Ar pid | tid Ns .Op , Ns Ar count .Xc .It Xo .Ic where Ns Op Li / Ns Cm u .Op Ar pid | tid Ns .Op , Ns Ar count .Xc .It Xo .Ic bt Ns Op Li / Ns Cm u .Op Ar pid | tid Ns .Op , Ns Ar count .Xc Stack trace. The .Cm u option traces user space; if omitted, .Ic trace only traces kernel space. The optional argument .Ar count is the number of frames to be traced. If .Ar count is omitted, all frames are printed. .Pp .Sy Warning : User space stack trace is valid only if the machine dependent code supports it. .Pp .It Xo .Ic search Ns Op Li / Ns Cm bhl .Ar addr .Ar value .Op Ar mask Ns .Op , Ns Ar count .Xc Search memory for .Ar value . The optional .Ar count argument limits the search. .\" .Pp .It Ic reboot Op Ar seconds .It Ic reset Op Ar seconds 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. .Pp .It Ic thread Ar addr | tid Switch the debugger to the thread with ID .Ar tid , if the argument is a decimal number, or address .Ar addr , otherwise. .El -.Pp .Ss SPECIALIZED HELPER COMMANDS -.Pp .Bl -tag -width indent -compact .It Xo .Ic findstack .Ar addr .Xc Prints the thread address for a thread kernel-mode stack of which contains the specified address. If the thread is not found, search the thread stack cache and prints the cached stack address. Otherwise, prints nothing. .Pp .It Ic show Cm all procs Ns Op Li / Ns Cm a .It Ic ps Ns Op Li / Ns Cm a Display all process information. The process information may not be shown if it is not supported in the machine, or the bottom of the stack of the target process is not in the main memory at that time. The .Cm a modifier will print command line arguments for each process. .\" .Pp .It Ic show Cm all trace .It Ic alltrace Show a stack trace for every thread in the system. .Pp .It Ic show Cm all ttys Show all TTY's within the system. Output is similar to .Xr pstat 8 , but also includes the address of the TTY structure. .\" .Pp .It Ic show Cm all vnets Show the same output as "show vnet" does, but lists all virtualized network stacks within the system. .\" .Pp .It Ic show Cm allchains Show the same information like "show lockchain" does, but for every thread in the system. .\" .Pp .It Ic show Cm alllocks Show all locks that are currently held. This command is only available if .Xr witness 4 is included in the kernel. .\" .Pp .It Ic show Cm allpcpu The same as "show pcpu", but for every CPU present in the system. .\" .Pp .It Ic show Cm allrman Show information related with resource management, including interrupt request lines, DMA request lines, I/O ports, I/O memory addresses, and Resource IDs. .\" .Pp .It Ic show Cm apic Dump data about APIC IDT vector mappings. .\" .Pp .It Ic show Cm breaks Show breakpoints set with the "break" command. .\" .Pp .It Ic show Cm bio Ar addr Show information about the bio structure .Vt struct bio present at .Ar addr . See the .Pa sys/bio.h header file and .Xr g_bio 9 for more details on the exact meaning of the structure fields. .\" .Pp .It Ic show Cm buffer Ar addr Show information about the buf structure .Vt struct buf present at .Ar addr . See the .Pa sys/buf.h header file for more details on the exact meaning of the structure fields. .\" .Pp .It Ic show Cm callout Ar addr Show information about the callout structure .Vt struct callout 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. .\" .Pp .It Ic show Cm conifhk Lists hooks currently waiting for completion in run_interrupt_driven_config_hooks(). .\" .Pp .It Ic show Cm cpusets Print numbered root and assigned CPU affinity sets. See .Xr cpuset 2 for more details. .\" .Pp .It Ic show Cm cyrixreg Show registers specific to the Cyrix processor. .\" .Pp .It Ic show Cm devmap Prints the contents of the static device mapping table. Currently only available on the ARM architecture. .\" .Pp .It Ic show Cm domain Ar addr Print protocol domain structure .Vt struct domain at address .Ar addr . See the .Pa sys/domain.h header file for more details on the exact meaning of the structure fields. .\" .Pp .It Ic show Cm ffs Op Ar addr Show brief information about ffs mount at the address .Ar addr , if argument is given. Otherwise, provides the summary about each ffs mount. .\" .Pp .It Ic show Cm file Ar addr Show information about the file structure .Vt struct file present at address .Ar addr . .\" .Pp .It Ic show Cm files Show information about every file structure in the system. .\" .Pp .It Ic show Cm freepages Show the number of physical pages in each of the free lists. .\" .Pp .It Ic show Cm geom Op Ar addr If the .Ar addr argument is not given, displays the entire GEOM topology. If .Ar addr is given, displays details about the given GEOM object (class, geom, provider or consumer). .\" .Pp .It Ic show Cm idt Show IDT layout. The first column specifies the IDT vector. The second one is the name of the interrupt/trap handler. Those functions are machine dependent. .\" .Pp .It Ic show Cm igi_list Ar addr Show information about the IGMP structure .Vt struct igmp_ifsoftc present at .Ar addr . .\" .Pp .It Ic show Cm inodedeps Op Ar addr Show brief information about each inodedep structure. If .Ar addr is given, only inodedeps belonging to the fs located at the supplied address are shown. .\" .Pp .It Ic show Cm inpcb Ar addr Show information on IP Control Block .Vt struct in_pcb present at .Ar addr . .\" .Pp .It Ic show Cm intr Dump information about interrupt handlers. .\" .Pp .It Ic show Cm intrcnt Dump the interrupt statistics. .\" .Pp .It Ic show Cm irqs 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. .\" .Pp .It Ic show Cm lapic Show information from the local APIC registers for this CPU. .\" .Pp .It Ic show Cm lock Ar addr Show lock structure. The output format is as follows: .Bl -tag -width "flags" .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: Name of the lock. .It Ic flags: Flags passed to the lock initialization function. .Em flags values are lock class specific. .It Ic state: Current state of a lock. .Em state values are lock class specific. .It Ic owner: Lock owner. .El .\" .Pp .It Ic show Cm lockchain Ar addr Show all threads a particular thread at address .Ar addr is waiting on based on non-spin locks. .\" .Pp .It Ic show Cm lockedbufs Show the same information as "show buf", but for every locked .Vt struct buf object. .\" .Pp .It Ic show Cm lockedvnods List all locked vnodes in the system. .\" .Pp .It Ic show Cm locks Prints all locks that are currently acquired. This command is only available if .Xr witness 4 is included in the kernel. .\" .Pp .It Ic show Cm locktree .\" .Pp .It Ic show Cm malloc Ns Op Li / Ns Cm i Prints .Xr malloc 9 memory allocator statistics. If the .Cm i modifier is specified, format output as machine-parseable comma-separated values ("CSV"). The output columns are as follows: .Pp .Bl -tag -compact -offset indent -width "Requests" .It Ic Type Specifies a type of memory. It is the same as a description string used while defining the given memory type with .Xr MALLOC_DECLARE 9 . .It Ic InUse Number of memory allocations of the given type, for which .Xr free 9 has not been called yet. .It Ic MemUse Total memory consumed by the given allocation type. .It Ic Requests Number of memory allocation requests for the given memory type. .El .Pp The same information can be gathered in userspace with .Dq Nm vmstat Fl m . .\" .Pp .It Ic show Cm map Ns Oo Li / Ns Cm f Oc Ar addr Prints the VM map at .Ar addr . If the .Cm f modifier is specified the complete map is printed. .\" .Pp .It Ic show Cm msgbuf Print the system's message buffer. It is the same output as in the .Dq Nm dmesg case. 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. .\" .Pp .It Ic show Cm object Ns Oo Li / Ns Cm f Oc Ar addr Prints the VM object at .Ar addr . If the .Cm f option is specified the complete object is printed. .\" .Pp .It Ic show Cm panic Print the panic message if set. .\" .Pp .It Ic show Cm page Show statistics on VM pages. .\" .Pp .It Ic show Cm pageq Show statistics on VM page queues. .\" .Pp .It Ic show Cm pciregs Print PCI bus registers. The same information can be gathered in userspace by running .Dq Nm pciconf Fl lv . .\" .Pp .It Ic show Cm pcpu Print current processor state. The output format is as follows: .Pp .Bl -tag -compact -offset indent -width "spin locks held:" .It Ic cpuid Processor identifier. .It Ic curthread Thread pointer, process identifier and the name of the process. .It Ic curpcb Control block pointer. .It Ic fpcurthread FPU thread pointer. .It Ic idlethread Idle thread pointer. .It Ic APIC ID CPU identifier coming from APIC. .It Ic currentldt LDT pointer. .It Ic spin locks held Names of spin locks held. .El .\" .Pp .It Ic show Cm pgrpdump 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 .Ar addr . .\" .Pp .It Ic show Cm procvm Show process virtual memory layout. .\" .Pp .It Ic show Cm protosw Ar addr Print protocol switch structure .Vt struct protosw at address .Ar addr . .\" .Pp .It Ic show Cm registers Ns Op Li / Ns Cm u Display the register set. If the .Cm u modifier is specified, it displays user registers instead of kernel registers or the currently saved one. .Pp .Sy Warning : The support of the .Cm u modifier depends on the machine. If not supported, incorrect information will be displayed. .\" .Pp .It Ic show Cm rman Ar addr Show resource manager object .Vt struct rman at address .Ar addr . Addresses of particular pointers can be gathered with "show allrman" command. .\" .Pp .It Ic show Cm route Ar addr Show route table result for destination .Ar addr . At this time, INET and INET6 formatted addresses are supported. .\" .Pp .It Ic show Cm routetable Oo Ar af Oc Show full route table or tables. If .Ar af is specified, show only routes for the given numeric address family. If no argument is specified, dump the route table for all address families. .\" .Pp .It Ic show Cm rtc Show real time clock value. Useful for long debugging sessions. .\" .Pp .It Ic show Cm sleepchain Deprecated. 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. .\" .Pp .It Ic show Cm sockbuf Ar addr .It Ic show Cm socket Ar addr Those commands print .Vt struct sockbuf and .Vt struct socket objects placed 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 Show system registers (e.g., .Li cr0-4 on i386.) Not present on some platforms. .\" .Pp .It Ic show Cm tcpcb Ar addr Print TCP control block .Vt struct tcpcb lying at address .Ar addr . For exact interpretation of output, visit .Pa netinet/tcp.h header file. .\" .Pp .It Ic show Cm thread Op Ar addr | tid If no .Ar addr or .Ar tid is specified, show detailed information about current thread. Otherwise, print information about the thread with ID .Ar tid or kernel address .Ar addr . (If the argument is a decimal number, it is assumed to be a tid.) .\" .Pp .It Ic show Cm threads Show all threads within the system. Output format is as follows: .Pp .Bl -tag -compact -offset indent -width "Second column" .It Ic First column Thread identifier (TID) .It Ic Second column Thread structure address .It Ic Third column Backtrace. .El .\" .Pp .It Ic show Cm tty Ar addr Display the contents of a TTY structure in a readable form. .\" .Pp .It Ic show Cm turnstile Ar addr Show turnstile .Vt struct turnstile structure at address .Ar addr . Turnstiles are structures used within the .Fx kernel to implement synchronization primitives which, while holding a specific type of lock, cannot sleep or context switch to another thread. Currently, those are: .Xr mutex 9 , .Xr rwlock 9 , .Xr rmlock 9 . .\" .Pp .It Ic show Cm uma Ns Op Li / Ns Cm i Show UMA allocator statistics. If the .Cm i modifier is specified, format output as machine-parseable comma-separated values ("CSV"). The output contains the following columns: .Pp .Bl -tag -compact -offset indent -width "Total Mem" .It Cm "Zone" Name of the UMA zone. The same string that was passed to .Xr uma_zcreate 9 as a first argument. .It Cm "Size" Size of a given memory object (slab). .It Cm "Used" Number of slabs being currently used. .It Cm "Free" Number of free slabs within the UMA zone. .It Cm "Requests" Number of allocations requests to the given zone. .It Cm "Total Mem" Total memory in use (either allocated or free) by a zone, in bytes. .It Cm "XFree" Number of free slabs within the UMA zone that were freed on a different NUMA domain than allocated. (The count in the .Cm "Free" column is inclusive of .Cm "XFree" . ) .El .Pp The same information might be gathered in the userspace with the help of .Dq Nm vmstat Fl z . .\" .Pp .It Ic show Cm unpcb Ar addr Shows UNIX domain socket private control block .Vt struct unpcb present at the address .Ar addr . .\" .Pp .It Ic show Cm vmochk Prints, whether the internal VM objects are in a map somewhere 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. .\" .Pp .It Ic show Cm vnet Ar addr Prints virtualized network stack .Vt struct vnet structure present at the address .Ar addr . .\" .Pp .It Ic show Cm vnode Op Ar addr Prints vnode .Vt struct vnode structure lying at .Op Ar addr . For the exact interpretation of the output, look at the .Pa sys/vnode.h header file. .\" .Pp .It Ic show Cm vnodebufs Ar addr Shows clean/dirty buffer lists of the vnode located at .Ar addr . .\" .Pp .It Ic show Cm vpath Ar addr Walk the namecache to lookup the pathname of the vnode located at .Ar addr . .\" .Pp .It Ic show Cm watches Displays all watchpoints. Shows watchpoints set with "watch" command. .\" .Pp .It Ic show Cm witness Shows information about lock acquisition coming from the .Xr witness 4 subsystem. .El .Pp .Ss OFFLINE DEBUGGING COMMANDS .Bl -tag -width indent -compact .It Ic gdb Switches to remote GDB mode. In remote GDB mode, another machine is required that runs .Xr gdb 1 using the remote debug feature, with a connection to the serial console port on the target machine. .Pp .It Ic netdump Fl s Ar server Oo Fl g Ar gateway Fl c Ar client Fl i Ar iface Oc Configure .Xr netdump 4 with the provided parameters, and immediately perform a netdump. .Pp There are some known limitations. Principally, .Xr netdump 4 only supports IPv4 at this time. The address arguments to the .Ic netdump command must be dotted decimal IPv4 addresses. (Hostnames are not supported.) At present, the command only works if the machine is in a panic state. Finally, the .Nm .Ic netdump command does not provide any way to configure compression or encryption. .Pp .It Ic netgdb Fl s Ar server Oo Fl g Ar gateway Fl c Ar client Fl i Ar iface Oc Initiate a .Xr netgdb 4 session with the provided parameters. .Pp .Ic netgdb has identical limitations to .Ic netdump . .Pp .It Ic capture on .It Ic capture off .It Ic capture reset .It Ic capture status .Nm supports a basic output capture facility, which can be used to retrieve the results of debugging commands from userspace using .Xr sysctl 3 . .Ic capture on enables output capture; .Ic capture off disables capture. .Ic capture reset will clear the capture buffer and disable capture. .Ic capture status will report current buffer use, buffer size, and disposition of output capture. .Pp Userspace processes may inspect and manage .Nm capture state using .Xr sysctl 8 : .Pp .Va debug.ddb.capture.bufsize may be used to query or set the current capture buffer size. .Pp .Va debug.ddb.capture.maxbufsize may be used to query the compile-time limit on the capture buffer size. .Pp .Va debug.ddb.capture.bytes may be used to query the number of bytes of output currently in the capture buffer. .Pp .Va debug.ddb.capture.data returns the contents of the buffer as a string to an appropriately privileged process. .Pp This facility is particularly useful in concert with the scripting and .Xr textdump 4 facilities, allowing scripted debugging output to be captured and committed to disk as part of a textdump for later analysis. The contents of the capture buffer may also be inspected in a kernel core dump using .Xr kgdb 1 . .Pp .It Ic run .It Ic script .It Ic scripts .It Ic unscript Run, define, list, and delete scripts. See the .Sx SCRIPTING section for more information on the scripting facility. .Pp .It Ic textdump dump .It Ic textdump set .It Ic textdump status .It Ic textdump unset Use the .Ic textdump dump command to immediately perform a textdump. More information may be found in .Xr textdump 4 . The .Ic textdump set command may be used to force the next kernel core dump to be a textdump rather than a traditional memory dump or minidump. .Ic textdump status reports whether a textdump has been scheduled. .Ic textdump unset cancels a request to perform a textdump as the next kernel core dump. .El .Sh VARIABLES The debugger accesses registers and variables as .Li $ Ns Ar name . Register names are as in the .Dq Ic show Cm registers command. Some variables are suffixed with numbers, and may have some modifier following a colon immediately after the variable name. For example, register variables can have a .Cm u modifier to indicate user register (e.g., .Dq Li $eax:u ) . .Pp Built-in variables currently supported are: .Pp .Bl -tag -width ".Va tabstops" -compact .It Va radix Input and output radix. .It Va maxoff Addresses are printed as .Dq Ar symbol Ns Li + Ns Ar offset unless .Ar offset is greater than .Va maxoff . .It Va maxwidth The width of the displayed line. .It Va lines The number of lines. It is used by the built-in pager. Setting it to 0 disables paging. .It Va tabstops Tab stop width. .It Va work Ns Ar xx Work variable; .Ar xx can take values from 0 to 31. .El .Sh EXPRESSIONS Most expression operators in C are supported except .Ql ~ , .Ql ^ , and unary .Ql & . Special rules in .Nm are: .Bl -tag -width ".No Identifiers" .It Identifiers The name of a symbol is translated to the value of the symbol, which is the address of the corresponding object. .Ql \&. and .Ql \&: can be used in the identifier. If supported by an object format dependent routine, .Sm off .Oo Ar filename : Oc Ar func : lineno , .Sm on .Oo Ar filename : Oc Ns Ar variable , and .Oo Ar filename : Oc Ns Ar lineno can be accepted as a symbol. .It Numbers Radix is determined by the first two letters: .Ql 0x : hex, .Ql 0o : octal, .Ql 0t : decimal; otherwise, follow current radix. .It Li \&. .Va dot .It Li + .Va next .It Li .. address of the start of the last line examined. Unlike .Va dot or .Va next , this is only changed by .Ic examine or .Ic write command. .It Li ' last address explicitly specified. .It Li $ Ns Ar variable Translated to the value of the specified variable. It may be followed by a .Ql \&: and modifiers as described above. .It Ar a Ns Li # Ns Ar b A binary operator which rounds up the left hand side to the next multiple of right hand side. .It Li * Ns Ar expr Indirection. It may be followed by a .Ql \&: and modifiers as described above. .El .Sh SCRIPTING .Nm supports a basic scripting facility to allow automating tasks or responses to specific events. Each script consists of a list of DDB commands to be executed sequentially, and is assigned a unique name. Certain script names have special meaning, and will be automatically run on various .Nm events if scripts by those names have been defined. .Pp The .Ic script command may be used to define a script by name. Scripts consist of a series of .Nm commands separated with the .Ql \&; character. For example: .Bd -literal -offset indent script kdb.enter.panic=bt; show pcpu script lockinfo=show alllocks; show lockedvnods .Ed .Pp The .Ic scripts command lists currently defined scripts. .Pp The .Ic run command execute a script by name. For example: .Bd -literal -offset indent run lockinfo .Ed .Pp The .Ic unscript command may be used to delete a script by name. For example: .Bd -literal -offset indent unscript kdb.enter.panic .Ed .Pp These functions may also be performed from userspace using the .Xr ddb 8 command. .Pp Certain scripts are run automatically, if defined, for specific .Nm events. The follow scripts are run when various events occur: .Bl -tag -width kdb.enter.powerfail .It Va kdb.enter.acpi The kernel debugger was entered as a result of an .Xr acpi 4 event. .It Va kdb.enter.bootflags The kernel debugger was entered at boot as a result of the debugger boot flag being set. .It Va kdb.enter.break The kernel debugger was entered as a result of a serial or console break. .It Va kdb.enter.cam The kernel debugger was entered as a result of a .Xr CAM 4 event. .It Va kdb.enter.mac The kernel debugger was entered as a result of an assertion failure in the .Xr mac_test 4 module of the TrustedBSD MAC Framework. .It Va kdb.enter.ndis The kernel debugger was entered as a result of an .Xr ndis 4 breakpoint event. .It Va kdb.enter.netgraph The kernel debugger was entered as a result of a .Xr netgraph 4 event. .It Va kdb.enter.panic .Xr panic 9 was called. .It Va kdb.enter.powerpc The kernel debugger was entered as a result of an unimplemented interrupt type on the powerpc platform. .It Va kdb.enter.sysctl The kernel debugger was entered as a result of the .Va debug.kdb.enter sysctl being set. .It Va kdb.enter.unionfs The kernel debugger was entered as a result of an assertion failure in the union file system. .It Va kdb.enter.unknown The kernel debugger was entered, but no reason has been set. .It Va kdb.enter.vfslock The kernel debugger was entered as a result of a VFS lock violation. .It Va kdb.enter.watchdog The kernel debugger was entered as a result of a watchdog firing. .It Va kdb.enter.witness The kernel debugger was entered as a result of a .Xr witness 4 violation. .El .Pp In the event that none of these scripts is found, .Nm will attempt to execute a default script: .Bl -tag -width kdb.enter.powerfail .It Va kdb.enter.default The kernel debugger was entered, but a script exactly matching the reason for entering was not defined. This can be used as a catch-all to handle cases not specifically of interest; for example, .Va kdb.enter.witness might be defined to have special handling, and .Va kdb.enter.default might be defined to simply panic and reboot. .El .Sh HINTS On machines with an ISA expansion bus, a simple NMI generation card can be constructed by connecting a push button between the A01 and B01 (CHCHK# and GND) card fingers. Momentarily shorting these two fingers together may cause the bridge chipset to generate an NMI, which causes the kernel to pass control to .Nm . Some bridge chipsets do not generate a NMI on CHCHK#, so your mileage may vary. The NMI allows one to break into the debugger on a wedged machine to diagnose problems. Other bus' bridge chipsets may be able to generate NMI using bus specific methods. There are many PCI and PCIe add-in cards which can generate NMI for debugging. Modern server systems typically use IPMI to generate signals to enter the debugger. The .Va devel/ipmitool port can be used to send the .Cd chassis power diag command which delivers an NMI to the processor. Embedded systems often use JTAG for debugging, but rarely use it in combination with .Nm . .Pp For serial consoles, you can enter the debugger by sending a BREAK condition on the serial line if .Cd options BREAK_TO_DEBUGGER is specified in the kernel. Most terminal emulation programs can send a break sequence with a special key sequence or via a menu item. However, in some setups, sending the break can be difficult to arrange or happens spuriously, so if the kernel contains .Cd options ALT_BREAK_TO_DEBUGGER then the sequence of CR TILDE CTRL-B enters the debugger; CR TILDE CTRL-P causes a panic instead of entering the debugger; and CR TILDE CTRL-R causes an immediate reboot. In all the above sequences, CR is a Carriage Return and is usually sent by hitting the Enter or Return key. TILDE is the ASCII tilde character (~). CTRL-x is Control x created by hitting the control key and then x and then releasing both. .Pp The break to enter the debugger behavior may be enabled at run-time by setting the .Xr sysctl 8 .Va debug.kdb.break_to_debugger to 1. The alternate sequence to enter the debugger behavior may be enabled at run-time by setting the .Xr sysctl 8 .Va debug.kdb.alt_break_to_debugger to 1. The debugger may be entered by setting the .Xr sysctl 8 .Va debug.kdb.enter to 1. .Sh FILES Header files mentioned in this manual page can be found below .Pa /usr/include directory. .Pp .Bl -dash -compact .It .Pa sys/buf.h .It .Pa sys/domain.h .It .Pa netinet/in_pcb.h .It .Pa sys/socket.h .It .Pa sys/vnode.h .El .Sh SEE ALSO .Xr gdb 1 , .Xr kgdb 1 , .Xr acpi 4 , .Xr CAM 4 , .Xr mac_test 4 , .Xr ndis 4 , .Xr netgraph 4 , .Xr textdump 4 , .Xr witness 4 , .Xr ddb 8 , .Xr sysctl 8 , .Xr panic 9 .Sh HISTORY The .Nm debugger was developed for Mach, and ported to .Bx 386 0.1 . This manual page translated from .Xr man 7 macros by .An Garrett Wollman . .Pp .An Robert N. M. Watson added support for .Nm output capture, .Xr textdump 4 and scripting in .Fx 7.1 . Index: head/share/man/man4/ena.4 =================================================================== --- head/share/man/man4/ena.4 (revision 366011) +++ head/share/man/man4/ena.4 (revision 366012) @@ -1,279 +1,280 @@ .\" Copyright (c) 2015-2017 Amazon.com, Inc. or its affiliates. .\" 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 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. .\" .\" $FreeBSD$ .\" .Dd August 16, 2017 .Dt ENA 4 .Os .Sh NAME .Nm ena .Nd "FreeBSD kernel driver for Elastic Network Adapter (ENA) family" .Sh SYNOPSIS To compile this driver into the kernel, place the following line in the kernel configuration file: .Bd -ragged -offset indent .Cd "device ena" .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_ena_load="YES" .Ed .Sh DESCRIPTION The ENA is a networking interface designed to make good use of modern CPU features and system architectures. .Pp The ENA device exposes a lightweight management interface with a minimal set of memory mapped registers and extendable command set through an Admin Queue. .Pp The driver supports a range of ENA devices, is link-speed independent (i.e., the same driver is used for 10GbE, 25GbE, 40GbE, etc.), and has a negotiated and extendable feature set. .Pp Some ENA devices support SR-IOV. This driver is used for both the SR-IOV Physical Function (PF) and Virtual Function (VF) devices. .Pp The ENA devices enable high speed and low overhead network traffic processing by providing multiple Tx/Rx queue pairs (the maximum number is advertised by the device via the Admin Queue), a dedicated MSI-X interrupt vector per Tx/Rx queue pair, and CPU cacheline optimized data placement. .Pp The .Nm driver supports industry standard TCP/IP offload features such as checksum offload and TCP transmit segmentation offload (TSO). Receive-side scaling (RSS) is supported for multi-core scaling. .Pp The .Nm driver and its corresponding devices implement health monitoring mechanisms such as watchdog, enabling the device and driver to recover in a manner transparent to the application, as well as debug logs. .Pp Some of the ENA devices support a working mode called Low-latency Queue (LLQ), which saves several more microseconds. This feature will be implemented for driver in future releases. .Sh HARDWARE Supported PCI vendor ID/device IDs: .Pp .Bl -bullet -compact .It 1d0f:0ec2 - ENA PF .It 1d0f:1ec2 - ENA PF with LLQ support .It 1d0f:ec20 - ENA VF .It 1d0f:ec21 - ENA VF with LLQ support .El .Sh DIAGNOSTICS .Ss Device initialization phase: .Bl -diag .It ena%d: failed to init mmio read less .Pp Error occurred during initialization of the mmio register read request. .It ena%d: Can not reset device .Pp Device could not be reset. .br Device may not be responding or is already during reset. .It ena%d: device version is too low .Pp Version of the controller is too old and it is not supported by the driver. .It ena%d: Invalid dma width value %d .Pp The controller is able to request dma transaction width. .br Device stopped responding or it demanded invalid value. .It ena%d: Can not initialize ena admin queue with device .Pp Initialization of the Admin Queue failed. .br Device may not be responding or there was a problem with initialization of the resources. .It ena%d: Cannot get attribute for ena device rc: %d .Pp Failed to get attributes of the device from the controller. .It ena%d: Cannot configure aenq groups rc: %d .Pp Errors occurred when trying to configure AENQ groups. .El .Ss Driver initialisation/shutdown phase: .Bl -diag .It ena%d: PCI resource allocation failed! .It ena%d: allocating ena_dev failed .It ena%d: failed to pmap registers bar .It ena%d: Error while setting up bufring .It ena%d: Error with initialization of IO rings .It ena%d: can not allocate ifnet structure .It ena%d: Error with network interface setup .It ena%d: Failed to enable and set the admin interrupts .It ena%d: Failed to allocate %d, vectors %d .It ena%d: Failed to enable MSIX, vectors %d rc %d .It ena%d: Error with MSI-X enablement .It ena%d: could not allocate irq vector: %d .It ena%d: Unable to allocate bus resource: registers .Pp Resource allocation failed when initializing the device. .br Driver will not be attached. .It ena%d: ENA device init failed (err: %d) .Pp Device initialization failed. .br Driver will not be attached. .It ena%d: could not activate irq vector: %d .Pp Error occurred when trying to activate interrupt vectors for Admin Queue. .It ena%d: failed to register interrupt handler for irq %ju: %d .Pp Error occurred when trying to register Admin Queue interrupt handler. .It ena%d: Cannot setup mgmnt queue intr .Pp Error occurred during configuration of the Admin Queue interrupts. .It ena%d: Enable MSI-X failed .Pp Configuration of the MSI-X for Admin Queue failed. .br There could be lack of resources or interrupts could not have been configured. .br Driver will not be attached. .It ena%d: VLAN is in use, detach first .Pp VLANs are being used when trying to detach the driver. .br VLANs must be detached first and then detach routine have to be called again. .It ena%d: Unmapped RX DMA tag associations .It ena%d: Unmapped TX DMA tag associations .Pp Error occurred when trying to destroy RX/TX DMA tag. .It ena%d: Cannot init RSS .It ena%d: Cannot fill indirect table .It ena%d: Cannot fill indirect table .It ena%d: Cannot fill hash function .It ena%d: Cannot fill hash control .It ena%d: WARNING: RSS was not properly initialized, it will affect bandwidth .Pp Error occurred during initialization of one of RSS resources. .br The device will work with reduced performance because all RX packets will be passed to queue 0 and there will be no hash information. .It ena%d: failed to tear down irq: %d .It ena%d: dev has no parent while releasing res for irq: %d Release of the interrupts failed. .El .Ss Additional diagnostic: .Bl -diag .It ena%d: Cannot get attribute for ena device .Pp This message appears when trying to change MTU and driver is unable to get attributes from the device. .It ena%d: Invalid MTU setting. new_mtu: %d .Pp Requested MTU value is not supported and will not be set. .It ena%d: keep alive watchdog timeout .Pp Device stopped responding and will be reset. .It ena%d: Found a Tx that wasn't completed on time, qid %d, index %d. .Pp Packet was pushed to the NIC but not sent within given time limit. .br It may be caused by hang of the IO queue. .It ena%d: The number of lost tx completion is aboce the threshold (%d > %d). Reset the device .Pp If too many Tx wasn't completed on time the device is going to be reset. .br It may be caused by hanged queue or device. .It ena%d: trigger reset is on .Pp Device will be reset. .br Reset is triggered either by watchdog or if too many TX packets were not completed on time. .It ena%d: invalid value recvd .Pp Link status received from the device in the AENQ handler is invalid. .It ena%d: Allocation for Tx Queue %u failed .It ena%d: Allocation for Rx Queue %u failed .It ena%d: Unable to create Rx DMA map for buffer %d .It ena%d: Failed to create io TX queue #%d rc: %d .It ena%d: Failed to get TX queue handlers. TX queue num %d rc: %d .It ena%d: Failed to create io RX queue[%d] rc: %d .It ena%d: Failed to get RX queue handlers. RX queue num %d rc: %d .It ena%d: failed to request irq .It ena%d: could not allocate irq vector: %d .It ena%d: failed to register interrupt handler for irq %ju: %d .Pp IO resources initialization failed. .br Interface will not be brought up. .It ena%d: LRO[%d] Initialization failed! .Pp Initialization of the LRO for the RX ring failed. .It ena%d: failed to alloc buffer for rx queue .It ena%d: failed to add buffer for rx queue %d .It ena%d: refilled rx queue %d with %d pages only .Pp Allocation of resources used on RX path failed. .br If happened during initialization of the IO queue, the interface will not be brought up. .It ena%d: ioctl promisc/allmulti .Pp IOCTL request for the device to work in promiscuous/allmulti mode. .br See .Xr ifconfig 8 for more details. .It ena%d: too many fragments. Last fragment: %d! .Pp Packet with unsupported number of segments was queued for sending to the device. .br Packet will be dropped. +.El .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 and .Aq Mt mw@semihalf.com . .Sh SEE ALSO .Xr vlan 4 , .Xr ifconfig 8 .Sh AUTHORS The .Nm driver was written by -.An Semihalf. +.An Semihalf . Index: head/share/man/man4/fdc.4 =================================================================== --- head/share/man/man4/fdc.4 (revision 366011) +++ head/share/man/man4/fdc.4 (revision 366012) @@ -1,338 +1,338 @@ .\" .\" Copyright (c) 1994 Wilko Bulte .\" Copyright (c) 2001 Joerg Wunsch .\" 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 ``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 7, 2017 .Dt FDC 4 .Os .Sh NAME .Nm fdc .Nd "PC architecture floppy disk controller driver" .Sh SYNOPSIS .Cd device fdc .Pp In .Pa /boot/device.hints : .Cd hint.fdc.0.at="isa" .Cd hint.fdc.0.port="0x3F0" .Cd hint.fdc.0.irq="6" .Cd hint.fdc.0.drq="2" .Cd hint.fdc.0.flags="0x0" .Cd hint.fd.0.at="fdc0" .Cd hint.fd.0.drive="0" .Cd hint.fd.0.flags="0x0" .Cd hint.fd.1.at="fdc0" .Cd hint.fd.1.drive="1" .Cd hint.fd.1.flags="0x0" .Sh DESCRIPTION .Ss Device Usage This driver provides access to floppy disk drives. Floppy disks using either FM (single-density) or MFM (double or high-density) recording can be handled. .Pp Floppy disk controllers can connect up to four drives each. The .Nm driver can currently handle up to two drives per controller (or four drives on ACPI). Upon driver initialization, an attempt is made to find out the type of the floppy controller in use. The known controller types are either the original NE765 or i8272 chips, or alternatively .Em enhanced controllers that are compatible with the NE72065 or i82077 chips. These enhanced controllers (among other enhancements) implement a FIFO for floppy data transfers that will automatically be enabled once an enhanced chip has been detected. This FIFO activation can be disabled using the per-controller flags value of .Ar 0x1 . .Pp By default, this driver creates a single device node .Pa /dev/fd Ns Ar N for each attached drive with number .Ar N . For historical reasons, device nodes that use a trailing UFS-style partition letter (ranging from .Sq a through .Sq h ) can also be accessed, which will be implemented as symbolic links to the main device node. .Pp Accessing the main device node will attempt to autodetect the density of the available medium for multi-density devices. Thus it is possible to use either a 720 KB medium or a 1440 KB medium in a high-density 3.5 inch standard floppy drive. Normally, this autodetection will only happen once at the first call to .Xr open 2 for the device after inserting the medium. This assumes the drive offers proper changeline support so media changes can be detected by the driver. To indicate a drive that does not have the changeline support, this can be overridden using the per-drive device flags value of .Ar 0x10 (causing each call to .Xr open 2 to perform the autodetection). .Pp When trying to use a floppy device with special-density media, other device nodes can be created, of the form .Pa /dev/fd Ns Ar N . Ns Ar MMMM , where .Ar N is the drive number, and .Ar MMMM is a number between one and four digits describing the device density. Up to 15 additional subdevices per drive can be created that way. The administrator is free to decide on a policy how to assign these numbers. The two common policies are to either implement subdevices numbered 1 through 15, or to use a number that describes the medium density in kilobytes. Initially, each of those devices will be configured to the maximal density that is possible for the drive type (like 1200 KB for 5.25 inch HD drives or 1440 KB for 3.5 inch HD drives). The desired density to be used on that subdevice needs to be configured using .Xr fdcontrol 8 . .Pp Drive types are configured using the lower four bits of the per-drive device flags. The following values can be specified: .Bl -tag -width 2n -offset indent .It Ar 1 5.25 inch double-density device with 40 cylinders (360 KB native capacity) .It Ar 2 5.25 inch high-density device with 80 cylinders (1200 KB native capacity) .It Ar 3 3.5 inch double-density device with 80 cylinders (720 KB native capacity) .It Ar 4 3.5 inch high-density device with 80 cylinders (1440 KB native capacity) .It Ar 5 3.5 inch extra-density device with 80 cylinders (2880 KB native capacity, usage currently restricted to at most 1440 KB media) .It Ar 6 Same as type 5, available for compatibility with some BIOSes .El .Pp On IA32 architectures, the drive type can be specified as 0 for the drives. In that case, the CMOS configuration memory will be consulted to obtain the value for that drive. The ACPI probe automatically determines these values via the _FDE and _FDI methods, but this can be overridden by specifying a drive type hint. .Pp Normally, each configured drive will be probed at initialization time, using a short seek sequence. This is intended to find out about drives that have been configured but are actually missing or otherwise not responding. (The ACPI probe method does not perform this seek.) In some environments (like laptops with detachable drives), it might be desirable to bypass this drive probe, and pretend a drive to be there so the driver autoconfiguration will work even if the drive is currently not present. For that purpose, a per-drive device flags value of .Ar 0x20 needs to be specified. .Ss Programming Interface In addition to the normal read and write functionality, the .Nm driver offers a number of configurable options using .Xr ioctl 2 . In order to access any of this functionality, programmers need to include the header file .In sys/fdcio.h into their programs. The call to .Xr open 2 can be performed in two possible ways. When opening the device without the .Dv O_NONBLOCK flag set, the device is opened in a normal way, which would cause the main device nodes to perform automatic media density selection, and which will yield a file descriptor that is fully available for any I/O operation or any of the following .Xr ioctl 2 commands. .Pp When opening the device with .Dv O_NONBLOCK set, automatic media density selection will be bypassed, and the device remains in a half-opened state. No actual I/O operations are possible, but many of the .Xr ioctl 2 commands described below can be performed. This mode is intended for access to the device without the requirement to have an accessible media present, like for status inquiries to the drive, or in order to format a medium. .Dv O_NONBLOCK needs to be cleared before I/O operations are possible on the descriptor, which requires a prior specification of the density using the .Dv FD_STYPE command (see below). Operations that are not allowed on the half-opened descriptor will cause an error value of .Er EAGAIN . .Pp The following .Xr ioctl 2 commands are currently available: .Bl -tag -width ".Dv FD_READID" .It Dv FD_FORM Used to format a floppy disk medium. Third argument is a pointer to a .Vt "struct fd_formb" specifying which track to format, and which parameters to fill into the ID fields of the floppy disk medium. .It Dv FD_GTYPE Returns the current density definition record for the selected device. Third argument is a pointer to .Vt "struct fd_type" . .It Dv FD_STYPE Adjusts the density definition of the selected device. Third argument is a pointer to .Vt "struct fd_type" . For the fixed-density subdevices (1 through 15 per drive), this operation is restricted to a process with superuser privileges. For the auto-selecting subdevice 0, the operation is temporarily allowed to any process, but this setting will be lost again upon the next autoselection. This can be used when formatting a new medium (which will require to open the device using .Dv O_NONBLOCK , and thus to later adjust the density using .Dv FD_STYPE ) . .It Dv FD_GOPTS Obtain the current drive options. Third argument is a pointer to .Vt int , containing a bitwise union of the following possible flag values: .Bl -tag -width ".Dv FDOPT_NOERRLOG" .It Dv FDOPT_NORETRY Do not automatically retry operations upon failure. .It Dv FDOPT_NOERRLOG Do not cause .Dq "hard error" kernel logs for failed I/O operations. .It Dv FDOPT_NOERROR Do not indicate I/O errors when returning from .Xr read 2 or .Xr write 2 system calls. The caller is assumed to use .Dv FD_GSTAT calls in order to inquire about the success of each operation. This is intended to allow even erroneous data from bad blocks to be retrieved using normal I/O operations. .It Dv FDOPT_AUTOSEL Device performs automatic density selection. Unlike the above flags, this one is read-only. .El .It Dv FD_SOPTS Set device options, see above for their meaning. Third argument is a pointer to .Vt int . Drive options will always be cleared when closing the descriptor. .It Dv FD_CLRERR Clear the internal low-level error counter. Normally, controller-level I/O errors are only logged up to .Dv FDC_ERRMAX errors (currently defined to 100). This command resets the counter. Requires superuser privileges. .It Dv FD_READID Read one sector ID field from the floppy disk medium. Third argument is a pointer to .Vt "struct fdc_readid" , where the read data will be returned. Can be used to analyze a floppy disk medium. .It Dv FD_GSTAT Return the recent floppy disk controller status, if available. Third argument is a pointer to .Vt "struct fdc_status" , where the status registers (ST0, ST1, ST2, C, H, R, and N) are being returned. .Er EINVAL will be caused if no recent status is available. .It Dv FD_GDTYPE Returns the floppy disk drive type. Third argument is a pointer to .Vt "enum fd_drivetype" . 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 DEPRECATION NOTICE The PC Card attachment of this driver is scheduled for removal prior to the release of .Fx 13.0 .Sh FILES .Bl -tag -width ".Pa /dev/fd*" -compact .It Pa /dev/fd* floppy disk device nodes .El .Sh SEE ALSO -.Xr fdformat 1 , .Xr fdread 1 , .Xr fdwrite 1 , .Xr ioctl 2 , .Xr open 2 , .Xr read 2 , .Xr write 2 , -.Xr fdcontrol 8 +.Xr fdcontrol 8 , +.Xr fdformat 8 .Sh AUTHORS .An -nosplit This man page was initially written by .An Wilko Bulte , and later vastly rewritten by .An J\(:org Wunsch . Index: head/share/man/man4/gpioiic.4 =================================================================== --- head/share/man/man4/gpioiic.4 (revision 366011) +++ head/share/man/man4/gpioiic.4 (revision 366012) @@ -1,159 +1,158 @@ .\" Copyright (c) 2013, Luiz Otavio O Souza .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd December 1, 2019 .Dt GPIOIIC 4 .Os .Sh NAME .Nm gpioiic .Nd GPIO I2C bit-banging 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 gpio" .Cd "device gpioiic" .Cd "device iicbb" .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 gpioiic_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides an IIC bit-banging interface using two GPIO pins for the SCL and SDA lines on the bus. .Pp .Nm simulates an open collector kind of output when managing the pins on the bus, even on systems which don't directly support configuring gpio pins in that mode. The pins are never driven to the logical value of '1'. They are driven to '0' or switched to input mode (Hi-Z/tri-state), and an external pullup resistor pulls the line to the 1 state unless some other device on the bus is driving it to 0. -.Pp .Sh HINTS CONFIGURATION On a .Xr device.hints 5 based system, such as MIPS, these values are configurable for .Nm : .Bl -tag -width ".Va hint.gpioiic.%d.atXXX" .It Va hint.gpioiic.%d.at The .Nm gpiobus you are attaching to. Normally just gpiobus0 on systems with a single bank of gpio pins. .It Va hint.gpioiic.%d.pins This is a bitmask of the pins on the .Nm gpiobus that are to be used for SCLOCK and SDATA from the GPIO IIC bit-banging bus. To configure pin 0 and 7, use the bitmask of 0b10000001 and convert it to a hexadecimal value of 0x0081. Please note that this mask should only ever have two bits set (any other bits - i.e., pins - will be ignored). Because .Nm must be a child of the gpiobus, both gpio pins must be part of that bus. .It Va hint.gpioiic.%d.scl Indicates which bit in the .Va hint.gpioiic.%d.pins should be used as the SCLOCK source. Optional, defaults to 0. .It Va hint.gpioiic.%d.sda Indicates which bit in the .Va hint.gpioiic.%d.pins should be used as the SDATA source. Optional, defaults to 1. .El .Sh FDT CONFIGURATION On an .Xr FDT 4 based system, such as ARM, the DTS node for .Nm gpioiic conforms to the standard bindings document i2c/i2c-gpio.yaml. The device node typically appears at the root of the device tree. The following is an example of a .Nm node with one slave device on the IIC bus: .Bd -literal / { gpioiic0 { compatible = "i2c-gpio"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpioiic0>; scl-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; sda-gpios = <&gpio7 11 GPIO_ACTIVE_HIGH>; status = "okay"; /* One slave device on the i2c bus. */ rtc@51 { compatible="nxp,pcf2127"; reg = <0x51>; status = "okay"; }; }; }; .Ed .Pp Where: .Bl -tag -width ".Va compatible" .It Va compatible Should be set to "i2c-gpio". The deprecated string "gpioiic" is also accepted for backwards compatibility. .It Va scl-gpios Va sda-gpios These properties indicate which GPIO pins should be used for clock and data on the GPIO IIC bit-banging bus. There is no requirement that the two pins belong to the same gpio controller. .It Va pinctrl-names pinctrl-0 These properties may be required to configure the chosen pins as gpio pins, unless the pins default to that state on your system. .El .Sh SEE ALSO .Xr fdt 4 , .Xr gpio 4 , .Xr iic 4 , .Xr iicbb 4 , .Xr iicbus 4 .Sh HISTORY The .Nm manual page first appeared in .Fx 10.1 . .Sh AUTHORS This manual page was written by .An Luiz Otavio O Souza . Index: head/share/man/man4/iicmux.4 =================================================================== --- head/share/man/man4/iicmux.4 (revision 366011) +++ head/share/man/man4/iicmux.4 (revision 366012) @@ -1,148 +1,148 @@ .\"- .\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2019 Ian Lepore .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd January 1, 2020 .Dt IICMUX 4 .Os .Sh NAME .Nm iicmux .Nd I2C bus mulitiplexer framework .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "device iicmux" .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 iicmux_load="YES" .Ed .Pp Note that it is usually not necessary to explicitly load the driver module, as it will be loaded automatically along with the driver for the specific mux hardware in use. .Sh DESCRIPTION The .Nm framework provides support code to help implement drivers for various I2C bus multiplexer (mux) hardware. .Nm is not a standalone driver, it is a collection of support functions and driver methods which are used by individual mux hardware drivers. It will be loaded automatically when needed by a mux hardware driver. This manual page provides an overview of the I2C mux framework and its behavior. .Pp Generally speaking, an I2C mux is connected to an upstream I2C bus, and to one or more downstream I2C buses, and it can be commanded to connect any one of the downstream buses to the upstream bus. Some hardware may be able to connect multiple downstream buses at the same time, but that concept is not supported by .Nm . .Pp The .Nm framework operates automatically when I2C slave devices initiate I/O. It does not require (or even allow for) any external control to select the active downstream bus. .Pp When there is no I/O in progress, the mux is said to be in the .Dq idle state. Some mux hardware has the ability to disconnect all downstream buses when in an idle state. Other hardware must always have one of the downstream buses connected. Individual mux hardware drivers typically provide a way to select which downstream bus (if any) should be connected while in the idle state. In the absence of such configuration, whichever downstream bus was last used remains connected to the upstream bus. .Pp When an I2C slave device on a bus downstream of a mux initiates I/O, it first requests exclusive use of the bus by calling .Fn iicbus_request_bus . This request is communicated to the bus's parent, which is the .Nm framework mux driver. Once exclusive bus ownership is obtained, the mux driver connects the upstream I2C bus to the downstream bus which hosts the slave device that requested bus ownership. The mux hardware maintains that upstream-to-downstream connection until the slave device calls .Fn iicbus_release_bus . Before releasing ownership, the mux driver returns the mux hardware to the idle state. .Sh FDT CONFIGURATION On an .Xr fdt 4 based system, an I2C mux device node is defined as a child node of its upstream I2C bus when the mux device is an I2C slave itself. It may be defined as a child node of any other bus or device in the system when it is not an I2C slave, in which case the .Va i2c-parent property indicates which upstream bus the mux is attached to. In either case, the children of the mux node are additional I2C buses, which will have one or more I2C slave devices described in their child nodes. .Pp Drivers using the .Nm framework conform to the standard .Bk -words .Li i2c/i2c-mux.txt .Ek bindings document. .Sh HINTS CONFIGURATION On a .Xr device.hints 5 based system, these values are configurable for .Nm framework drivers : .Bl -tag -width indent .It Va hint...at The upstream .Xr iicbus 4 the .Nm instance is attached to. .El .Pp When configured via hints, the driver automatically adds an iicbus instance for every downstream bus supported by the chip. There is currently no way to indicate used versus unused downstream buses. .Sh SEE ALSO -.Xr iicbus 4 , +.Xr iicbus 4 .Sh HISTORY The .Nm framework first appeared in .Fx 13.0 . Index: head/share/man/man4/itwd.4 =================================================================== --- head/share/man/man4/itwd.4 (revision 366011) +++ head/share/man/man4/itwd.4 (revision 366012) @@ -1,75 +1,75 @@ .\" .\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD .\" .\" Copyright (c) 2012 Bjoern A. Zeeb .\" Copyright (c) 2019 Andriy Gapon .\" .\" 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 16, 2019 .Dt ITWD 4 .Os .Sh NAME .Nm itwd .Nd device driver for ITE Super I/O chips watchdog timer .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device superio" .Cd "device itwd" .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 itwd_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides .Xr watchdog 4 support for the watchdog timer present on at least the following Super I/O chips: .Bl -bullet -compact .It IT8721F .It IT8728F .It IT8771F .El .Sh SEE ALSO -.Xr superio 4 +.Xr superio 4 , .Xr watchdog 4 , .Xr device.hints 5 , .Xr watchdog 8 , .Xr watchdogd 8 , .Xr watchdog 9 .Sh AUTHORS .An -nosplit This manual page was written by .An Andriy Gapon Aq Mt avg@FreeBSD.org . Index: head/share/man/man4/linux.4 =================================================================== --- head/share/man/man4/linux.4 (revision 366011) +++ head/share/man/man4/linux.4 (revision 366012) @@ -1,163 +1,164 @@ .\" Copyright (c) 2000 Sheldon Hearn .\" 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 July 5, 2020 .Dt LINUX 4 .Os .Sh NAME .Nm linux .Nd Linux ABI support .Sh SYNOPSIS To compile support for this ABI into an i386 kernel place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "options COMPAT_LINUX" .Ed .Pp for an amd64 kernel use: .Bd -ragged -offset indent .Cd "options COMPAT_LINUX32" .Ed .Pp Alternatively, to load the ABI as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent linux_load="YES" .Ed .Sh DESCRIPTION The .Nm module provides limited Linux ABI (application binary interface) compatibility, making it possible to run many unmodified Linux applications and libraries without the need for virtualization or emulation. Some of the facilities provided are: .Bl -bullet .It An image activator for correctly branded .Xr elf 5 executable images .It Special signal handling for activated images .It Linux to native system call translation .It Linux-specific system calls .El .Pp Note that dynamically linked Linux executables will require a suitable environment in .Pa /compat/linux . This includes native Linux shared libraries, and Linux-specific virtual filesystems. To set it up, install the .Pa emulators/linux_base-c7 port or the linux_base-c7 package, and add the following line to the .Xr rc.conf 5 file: .Pp .Dl linux_enable="YES" .Pp To avoid mounting Linux-specific filesystems at startup, also add the following line: .Pp .Dl linux_mounts_enable="NO" .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 compat.linux.debug Enable debugging messages. Set to 0 to silence them. Defaults to 1. .It Va compat.linux.default_openfiles Default soft openfiles resource limit for Linux applications. Set to -1 to disable the limit. Defaults to 1024. .It Va compat.linux.emul_path Path to the Linux run-time environment. Defaults to .Pa /compat/linux . .It Va compat.linux.osname Linux kernel operating system name. .It Va compat.linux.osrelease Linux kernel operating system release. Changing this to something else is discouraged on non-development systems, because it may change the way Linux programs work. Recent versions of GNU libc are known to use different syscalls depending on the value of this sysctl. .It Va compat.linux.oss_version Linux Open Sound System version. .It Va compat.linux.preserve_vstatus When set to 1, it prevents Linux applications from resetting the .Xr termios 4 VSTATUS setting. From a user perspective, this makes .Va SIGINFO work for Linux executables. Defaults to 0. +.El .Sh FILES .Bl -tag -width /compat/linux/dev/shm -compact .It Pa /compat/linux minimal Linux run-time environment .It Pa /compat/linux/dev device file system, see .Xr devfs 5 .It Pa /compat/linux/dev/fd file descriptor file system mounted with the .Cm linrdlnk option, see .Xr fdescfs 5 .It Pa /compat/linux/dev/shm in-memory file system, see .Xr tmpfs 5 .It Pa /compat/linux/proc Linux process file system, see .Xr linprocfs 5 .It Pa /compat/linux/sys Linux kernel objects file system, see .Xr linsysfs 5 .El .Sh SEE ALSO .Xr brandelf 1 , .Xr pty 4 , .Xr elf 5 , .Xr fdescfs 5 , .Xr linprocfs 5 , .Xr linsysfs 5 , .Xr tmpfs 5 .Sh HISTORY Linux ABI support first appeared in .Fx 2.1 . .Sh BUGS Support for some of the Linux-specific system calls and system call arguments is missing. Index: head/share/man/man4/mem.4 =================================================================== --- head/share/man/man4/mem.4 (revision 366011) +++ head/share/man/man4/mem.4 (revision 366012) @@ -1,245 +1,246 @@ .\" Copyright (c) 1991 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. .\" .\" @(#)mem.4 5.3 (Berkeley) 5/2/91 .\" $FreeBSD$ .\" .Dd August 25, 2020 .Dt MEM 4 .Os .Sh NAME .Nm mem , .Nm kmem .Nd memory files .Sh SYNOPSIS .Cd "device mem" .Sh DESCRIPTION The special file .Pa /dev/mem is an interface to the physical memory of the computer. Byte offsets in this file are interpreted as physical memory addresses. Reading and writing this file is equivalent to reading and writing memory itself. Only offsets within the bounds of .Pa /dev/mem are allowed. .Pp Kernel virtual memory is accessed through the interface .Pa /dev/kmem in the same manner as .Pa /dev/mem . Only kernel virtual addresses that are currently mapped to memory are allowed. .Pp On ISA the I/O memory space begins at physical address 0x000a0000 and runs to 0x00100000. The per-process data size for the current process is .Dv UPAGES long, and ends at virtual address 0xf0000000. .Sh IOCTL INTERFACE The .Dv MEM_EXTRACT_PADDR ioctl can be used to look up the physical address and NUMA domain of a given virtual address in the calling process' address space. The request is described by .Bd -literal struct mem_extract { uint64_t me_vaddr; /* input */ uint64_t me_paddr; /* output */ int me_domain; /* output */ int me_state; /* output */ }; .Ed .Pp The ioctl returns an error if the address is not valid. The information returned by .Dv MEM_EXTRACT_PADDR may be out of date by the time that the ioctl call returns. Specifically, concurrent system calls, page faults, or system page reclamation activity may have unmapped the virtual page or replaced the backing physical page before the ioctl call returns. Wired pages, e.g., those locked by .Xr mlock 2 , will not be reclaimed by the system. .Pp The .Fa me_state field provides information about the state of the virtual page: .Bl -tag -width indent .It Dv ME_STATE_INVALID The virtual address is invalid. .It Dv ME_STATE_VALID The virtual address is valid but is not mapped at the time of the ioctl call. .It Dv ME_STATE_MAPPED The virtual address corresponds to a physical page mapping, and the .Fa me_paddr and .Fa me_domain fields are valid. .Pp Several architectures allow attributes to be associated with ranges of physical memory. These attributes can be manipulated via .Fn ioctl calls performed on .Pa /dev/mem . Declarations and data types are to be found in .In sys/memrange.h . .Pp The specific attributes, and number of programmable ranges may vary between architectures. The full set of supported attributes is: .Bl -tag -width indent .It Dv MDF_UNCACHEABLE The region is not cached. .It Dv MDF_WRITECOMBINE Writes to the region may be combined or performed out of order. .It Dv MDF_WRITETHROUGH Writes to the region are committed synchronously. .It Dv MDF_WRITEBACK Writes to the region are committed asynchronously. .It Dv MDF_WRITEPROTECT The region cannot be written to. .El .Pp Memory ranges are described by .Bd -literal struct mem_range_desc { uint64_t mr_base; /* physical base address */ uint64_t mr_len; /* physical length of region */ int mr_flags; /* attributes of region */ char mr_owner[8]; }; .Ed .Pp In addition to the region attributes listed above, the following flags may also be set in the .Fa mr_flags field: .Bl -tag -width indent .It MDF_FIXBASE The region's base address cannot be changed. .It MDF_FIXLEN The region's length cannot be changed. .It MDF_FIRMWARE The region is believed to have been established by the system firmware. .It MDF_ACTIVE The region is currently active. .It MDF_BOGUS We believe the region to be invalid or otherwise erroneous. .It MDF_FIXACTIVE The region cannot be disabled. .It MDF_BUSY The region is currently owned by another process and may not be altered. .El .Pp Operations are performed using .Bd -literal struct mem_range_op { struct mem_range_desc *mo_desc; int mo_arg[2]; }; .Ed .Pp The .Dv MEMRANGE_GET ioctl is used to retrieve current memory range attributes. If .Va mo_arg[0] is set to 0, it will be updated with the total number of memory range descriptors. If greater than 0, the array at .Va mo_desc will be filled with a corresponding number of descriptor structures, or the maximum, whichever is less. .Pp The .Dv MEMRANGE_SET ioctl is used to add, alter and remove memory range attributes. A range with the .Dv MDF_FIXACTIVE flag may not be removed; a range with the .Dv MDF_BUSY flag may not be removed or updated. .Pp .Va mo_arg[0] should be set to .Dv MEMRANGE_SET_UPDATE to update an existing or establish a new range, or to .Dv MEMRANGE_SET_REMOVE to remove a range. +.El .Sh RETURN VALUES .Bl -tag -width Er .It Bq Er EOPNOTSUPP Memory range operations are not supported on this architecture. .It Bq Er ENXIO No memory range descriptors are available (e.g., firmware has not enabled any). .It Bq Er EINVAL The memory range supplied as an argument is invalid or overlaps another range in a fashion not supported by this architecture. .It Bq Er EBUSY An attempt to remove or update a range failed because the range is busy. .It Bq Er ENOSPC An attempt to create a new range failed due to a shortage of hardware resources (e.g., descriptor slots). .It Bq Er ENOENT An attempt to remove a range failed because no range matches the descriptor base/length supplied. .It Bq Er EPERM An attempt to remove a range failed because the range is permanently enabled. .El .Sh FILES .Bl -tag -width /dev/kmem -compact .It Pa /dev/mem .It Pa /dev/kmem .El .Sh SEE ALSO .Xr kvm 3 , .Xr memcontrol 8 .Sh HISTORY The .Nm mem and .Nm kmem files appeared in .At v6 . The ioctl interface for memory range attributes was added in .Fx 3.2 . .Sh BUGS Busy range attributes are not yet managed correctly. .Pp This device is required for all users of .Xr kvm 3 to operate. Index: head/share/man/man4/nda.4 =================================================================== --- head/share/man/man4/nda.4 (revision 366011) +++ head/share/man/man4/nda.4 (revision 366012) @@ -1,207 +1,207 @@ .\" .\" Copyright (c) 2017 Netflix, 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. .\" .\" $FreeBSD$ .\" .Dd June 6, 2020 .Dt NDA 4 .Os .Sh NAME .Nm nda .Nd NVMe Direct Access device driver .Sh SYNOPSIS .Cd device nvme .Cd device scbus .Sh DESCRIPTION The .Nm driver provides support for direct access devices, implementing the .Tn NVMe command protocol, that are attached to the system through a host adapter supported by the CAM subsystem. .Sh SYSCTL VARIABLES The following variables are available as both .Xr sysctl 8 variables and .Xr loader 8 tunables: .Bl -tag -width 12 .It Va hw.nvme.use_nvd The .Xr nvme 4 driver will create .Nm device nodes for block storage when set to 0. Create .Xr nvd 4 device nodes for block storage when set to 1. See .Xr nvd 4 when set to 1. .It Va kern.cam.nda.nvd_compat When set to 1, .Xr nvd 4 aliases will be created for all .Nm devices, including partitions and other .Xr geom 4 providers that take their names from the disk's name. -.Xr nvd +.Xr nvd 4 devices will not, however, be reported in the .Va kern.disks .Xr sysctl 8 . .It Va kern.cam.nda.sort_io_queue This variable determines whether the software queued entries are sorted in LBA order or not. Sorting is almost always a waste of time. The default is to not sort. .It Va kern.cam.nda.enable_biospeedup This variable determines if the .Nm devices participate in the speedup protocol. When the device participates in the speedup, then when the upper layers send a .Va BIO_SPEEDUP , all current .Va BIO_DELETE requests not yet sent to the hardware are completed successfully immediate without sending them to the hardware. Used in low disk space scenarios when the filesystem encounters a critical shortage and needs blocks immediately. Since trims have maximum benefit when the LBA is unused for a long time, skipping the trim when space is needed for immediate writes results in little to no excess wear. When participation is disabled, .Va BIO_SPEEDUP requests are ignored. .It Va kern.cam.nda.max_trim The maximum number of LBA ranges to be collected together for each DSM trims send to the hardware. Defaults to 256, which is the maximum number of ranges the protocol supports. Sometimes poor trim performance can be mitigated by limiting the number of ranges sent to the device. This value must be between 1 and 256 inclusive. .El .Pp The following report per-device settings, and are read-only unless otherwise indicated. Replace .Va N with the device unit number. .Bl -tag -width 12 .It Va kern.cam.nda.N.rotating This variable reports whether the storage volume is spinning or flash. Its value is hard coded to 0 indicating flash. .It Va kern.cam.nda.N.unmapped_io This variable reports whether the .Nm driver accepts unmapped I/O for this unit. .It Va kern.cam.nda.N.flags This variable reports the current flags. .Bl -tag -width 12 .It Va OPEN The device is open. .It Va DIRTY Set when a write to the drive is scheduled. Cleared after flush commands. .It Va SCTX_INIT Internal flag set after .Xr sysctl 8 nodes have been created. .El .It Va kern.cam.nda.N.sort_io_queue Same as the .Va kern.cam.nda.sort_io_queue tunable. .It Va kern.cam.nda.N.trim_ticks Writable. When greater than zero, hold trims for up to this many ticks before sending to the drive. Sometimes waiting a little bit to collect more trims to send at one time improves trim performance. When 0, no delaying of trims are done. .It Va kern.cam.nda.N.trim_goal Writable. When delaying a bit to collect multiple trims, send the accumulated DSM TRIM to the drive. .It Va kern.cam.nda.N.trim_lbas Total number of LBAs that have been trimmed. .It Va kern.cam.nda.N.trim_ranges Total number of LBA ranges that have been trimmed. .It Va kern.cam.nda.N.trim_count Total number of trims sent to the hardware. .It Va kern.cam.nda.N.deletes Total number of .Va BIO_DELETE requests queued to the device. .El .Sh NAMESPACE MAPPING Each .Xr nvme 4 drive has one or more namespaces associated with it. One instance of the .Nm driver will be created for each of the namespaces on the drive. All the .Nm nodes for a .Xr nvme 4 device are at target 0. However, the namespace ID maps to the CAM lun, as reported in kernel messages and in the .Va devlist sub command of .Xr camcontrol 8 . .Pp Namespaces are managed with the .Va ns sub command of .Xr nvmecontrol 8 . Not all drives support namespace management, but all drives support at least one namespace. Device nodes for .Nm will be created and destroyed dynamically as namespaces are activated or detached. .Sh FILES .Bl -tag -width ".Pa /dev/nda*" -compact .It Pa /dev/nda* NVMe storage device nodes .El .Sh SEE ALSO .Xr cam 4 , .Xr geom 4 , .Xr nvd 4 , .Xr nvme 4 , .Xr gpart 8 .Sh HISTORY The .Nm driver first appeared in .Fx 12.0 . .Sh AUTHORS .An Warner Losh Aq Mt imp@FreeBSD.org Index: head/share/man/man4/ng_patch.4 =================================================================== --- head/share/man/man4/ng_patch.4 (revision 366011) +++ head/share/man/man4/ng_patch.4 (revision 366012) @@ -1,261 +1,262 @@ .\" Copyright (c) 2010 Maxim Ignatenko .\" Copyright (c) 2010 Vadim Goncharov .\" Copyright (c) 2015 Dmitry Vagin .\" 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 November 17, 2015 .Dt NG_PATCH 4 .Os .Sh NAME .Nm ng_patch .Nd "trivial mbuf data modifying netgraph node type" .Sh SYNOPSIS .In netgraph/ng_patch.h .Sh DESCRIPTION The .Nm patch node performs data modification of packets passing through it. Modifications are restricted to a subset of C language operations on unsigned integers of 8, 16, 32 or 64 bit size. These are: set to new value (=), addition (+=), subtraction (-=), multiplication (*=), division (/=), negation (= -), bitwise AND (&=), bitwise OR (|=), bitwise eXclusive OR (^=), shift left (<<=), shift right (>>=). A negation operation is the one exception: integer is treated as signed and second operand (the .Va value ) is not used. If there is more than one modification operation, they are applied to packets sequentially in the order they were specified by the user. The data payload of a packet is viewed as an array of bytes, with a zero offset corresponding to the very first byte of packet headers, and the .Va length bytes beginning from .Va offset -as a single integer in network byte order. An additional offset can be optionally +as a single integer in network byte order. +An additional offset can be optionally requested at configuration time to account for packet type. .Sh HOOKS This node type has two hooks: .Bl -tag -width ".Va out" .It Va in Packets received on this hook are modified according to rules specified in the configuration and then forwarded to the .Ar out hook, if it exists. Otherwise they are reflected back to the .Ar in hook. .It Va out Packets received on this hook are forwarded to the .Ar in hook without any changes. .El .Sh CONTROL MESSAGES This node type supports the generic control messages, plus the following: .Bl -tag -width foo .It Dv NGM_PATCH_SETDLT Pq Ic setdlt 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 .Cm DLT_EN10MB (Ethernet). DLT_ definitions can be found in .In net/bpf.h . If you want to work on the link layer header you must use no additional offset by specifying .Cm DLT_RAW . If -.Cm EN10MB +.Cm EN10MB is specified, then the optional additional offset will take into account the Ethernet header and a QinQ header if present. .It Dv NGM_PATCH_GETDLT Pq Ic getdlt This control message returns the data link type of the .Va in hook. .It Dv NGM_PATCH_SETCONFIG Pq Ic setconfig This command sets the sequence of modify operations that will be applied to incoming data on a hook. The following .Vt "struct ng_patch_config" must be supplied as an argument: .Bd -literal -offset 4n struct ng_patch_op { uint32_t offset; uint16_t length; /* 1,2,4 or 8 bytes */ uint16_t mode; uint64_t value; }; /* Patching modes */ #define NG_PATCH_MODE_SET 1 #define NG_PATCH_MODE_ADD 2 #define NG_PATCH_MODE_SUB 3 #define NG_PATCH_MODE_MUL 4 #define NG_PATCH_MODE_DIV 5 #define NG_PATCH_MODE_NEG 6 #define NG_PATCH_MODE_AND 7 #define NG_PATCH_MODE_OR 8 #define NG_PATCH_MODE_XOR 9 #define NG_PATCH_MODE_SHL 10 #define NG_PATCH_MODE_SHR 11 struct ng_patch_config { uint32_t count; uint32_t csum_flags; uint32_t relative_offset; struct ng_patch_op ops[]; }; .Ed .Pp The .Va csum_flags can be set to any combination of CSUM_IP, CSUM_TCP, CSUM_SCTP and CSUM_UDP (other values are ignored) for instructing the IP stack to recalculate the corresponding checksum before transmitting packet on output interface. The .Nm node does not do any checksum correction by itself. .It Dv NGM_PATCH_GETCONFIG Pq Ic getconfig This control message returns the current set of modify operations, in the form of a .Vt "struct ng_patch_config" . .It Dv NGM_PATCH_GET_STATS Pq Ic getstats Returns the node's statistics as a .Vt "struct ng_patch_stats" . .It Dv NGM_PATCH_CLR_STATS Pq Ic clrstats Clears the node's statistics. .It Dv NGM_PATCH_GETCLR_STATS Pq Ic getclrstats This command is identical to .Dv NGM_PATCH_GET_STATS , except that the statistics are also atomically cleared. .El .Sh SHUTDOWN This node shuts down upon receipt of a .Dv NGM_SHUTDOWN control message, or when all hooks have been disconnected. .Sh EXAMPLES This .Nm node was designed to modify TTL and TOS/DSCP fields in IP packets. As an example, suppose you have two adjacent simplex links to a remote network (e.g.\& satellite), so that the packets expiring in between will generate unwanted ICMP-replies which have to go forth, not back. Thus you need to raise TTL of every packet entering link by 2 to ensure the TTL will not reach zero there. To achieve this you can set an .Xr ipfw 8 rule to use the .Cm netgraph action to inject packets which are going to the simplex link into the patch node, by using the following .Xr ngctl 8 script: .Bd -literal -offset 4n /usr/sbin/ngctl -f- <<-SEQ mkpeer ipfw: patch 200 in name ipfw:200 ttl_add msg ttl_add: setconfig { count=1 csum_flags=1 ops=[ \e { mode=2 value=3 length=1 offset=8 } ] } SEQ /sbin/ipfw add 150 netgraph 200 ip from any to simplex.remote.net .Ed .Pp Here the .Dq Li ttl_add node of type .Nm is configured to add (mode .Dv NG_PATCH_MODE_ADD ) a .Va value of 3 to a one-byte TTL field, which is 9th byte of IP packet header. .Pp Another example would be two consecutive modifications of packet TOS field: say, you need to clear the .Dv IPTOS_THROUGHPUT bit and set the .Dv IPTOS_MINCOST bit. So you do: .Bd -literal -offset 4n /usr/sbin/ngctl -f- <<-SEQ mkpeer ipfw: patch 300 in name ipfw:300 tos_chg msg tos_chg: setconfig { count=2 csum_flags=1 ops=[ \e { mode=7 value=0xf7 length=1 offset=1 } \e { mode=8 value=0x02 length=1 offset=1 } ] } SEQ /sbin/ipfw add 160 netgraph 300 ip from any to any not dst-port 80 .Ed .Pp This first does .Dv NG_PATCH_MODE_AND clearing the fourth bit and then .Dv NG_PATCH_MODE_OR setting the third bit. .Pp In both examples the .Va csum_flags field indicates that IP checksum (but not TCP or UDP checksum) should be recalculated before transmit. .Pp Note: one should ensure that packets are returned to ipfw after processing inside .Xr netgraph 4 , by setting appropriate .Xr sysctl 8 variable: .Bd -literal -offset 4n sysctl net.inet.ip.fw.one_pass=0 .Ed .Sh SEE ALSO .Xr netgraph 4 , .Xr ng_ipfw 4 , .Xr ngctl 8 .Sh HISTORY The .Nm node type was implemented in .Fx 8.1 . .Sh AUTHORS .An "Maxim Ignatenko" Aq gelraen.ua@gmail.com . .Pp Relative offset code by .An "DMitry Vagin" .Pp This manual page was written by .An "Vadim Goncharov" Aq vadimnuclight@tpu.ru . .Sh BUGS The node blindly tries to apply every patching operation to each packet (except those which offset if greater than length of the packet), so be sure that you supply only the right packets to it (e.g. changing bytes in the ARP packets meant to be in IP header could corrupt them and make your machine unreachable from the network). .Pp .Em !!! WARNING !!! .Pp The output path of the IP stack assumes correct fields and lengths in the packets - changing them by to incorrect values can cause unpredictable results including kernel panics. Index: head/share/man/man4/psm.4 =================================================================== --- head/share/man/man4/psm.4 (revision 366011) +++ head/share/man/man4/psm.4 (revision 366012) @@ -1,875 +1,875 @@ .\" .\" Copyright (c) 1997 .\" Kazutaka YOKOTA .\" 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 as .\" the first lines of this file unmodified. .\" 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 June 2, 2020 .Dt PSM 4 .Os .Sh NAME .Nm psm .Nd PS/2 mouse style pointing device driver .Sh SYNOPSIS .Cd "options KBD_RESETDELAY=N" .Cd "options KBD_MAXWAIT=N" .Cd "options PSM_DEBUG=N" .Cd "options KBDIO_DEBUG=N" .Cd "device psm" .Pp In .Pa /boot/device.hints : .Cd hint.psm.0.at="atkbdc" .Cd hint.psm.0.irq="12" .Sh DESCRIPTION The .Nm driver provides support for the PS/2 mouse style pointing device. Currently there can be only one .Nm device node in the system. As the PS/2 mouse port is located at the auxiliary port of the keyboard controller, the keyboard controller driver, .Nm atkbdc , must also be configured in the kernel. Note that there is currently no provision of changing the .Em irq number. .Pp Basic PS/2 style pointing device has two or three buttons. Some devices may have a roller or a wheel and/or additional buttons. .Ss Device Resolution The PS/2 style pointing device usually has several grades of resolution, that is, sensitivity of movement. They are typically 25, 50, 100 and 200 pulse per inch. Some devices may have finer resolution. The current resolution can be changed at runtime. The .Nm driver allows the user to initially set the resolution via the driver flag (see .Sx "DRIVER CONFIGURATION" ) or change it later via the .Xr ioctl 2 command .Dv MOUSE_SETMODE (see .Sx IOCTLS ) . .Ss Report Rate Frequency, or report rate, at which the device sends movement and button state reports to the host system is also configurable. The PS/2 style pointing device typically supports 10, 20, 40, 60, 80, 100 and 200 reports per second. 60 or 100 appears to be the default value for many devices. Note that when there is no movement and no button has changed its state, the device will not send anything to the host system. The report rate can be changed via an ioctl call. .Ss Operation Levels The .Nm driver has three levels of operation. The current operation level can be set via an ioctl call. .Pp At the level zero the basic support is provided; the device driver will report horizontal and vertical movement of the attached device and state of up to three buttons. The movement and status are encoded in a series of fixed-length data packets (see .Sx "Data Packet Format" ) . This is the default level of operation and the driver is initially at this level when opened by the user program. .Pp The operation level one, the `extended' level, supports a roller (or wheel), if any, and up to 11 buttons. The movement of the roller is reported as movement along the Z axis. 8 byte data packets are sent to the user program at this level. .Pp At the operation level two, data from the pointing device is passed to the user program as is. Conversely, command from the user program is passed to the pointing device as is and the user program is responsible for status validation and error recovery. Modern PS/2 type pointing devices often use proprietary data format. Therefore, the user program is expected to have intimate knowledge about the format from a particular device when operating the driver at this level. This level is called `native' level. .Ss Data Packet Format Data packets read from the .Nm driver are formatted differently at each operation level. .Pp A data packet from the PS/2 mouse style pointing device is three bytes long at the operation level zero: .Pp .Bl -tag -width Byte_1 -compact .It Byte 1 .Bl -tag -width bit_7 -compact .It bit 7 One indicates overflow in the vertical movement count. .It bit 6 One indicates overflow in the horizontal movement count. .It bit 5 Set if the vertical movement count is negative. .It bit 4 Set if the horizontal movement count is negative. .It bit 3 Always one. .\" The ALPS GlidePoint clears this bit when the user `taps' the surface of .\" the pad, otherwise the bit is set. .\" Most, if not all, other devices always set this bit. .It bit 2 Middle button status; set if pressed. For devices without the middle button, this bit is always zero. .It bit 1 Right button status; set if pressed. .It bit 0 Left button status; set if pressed. .El .It Byte 2 Horizontal movement count in two's complement; -256 through 255. Note that the sign bit is in the first byte. .It Byte 3 Vertical movement count in two's complement; -256 through 255. Note that the sign bit is in the first byte. .El .Pp At the level one, a data packet is encoded in the standard format .Dv MOUSE_PROTO_SYSMOUSE as defined in .Xr mouse 4 . .Pp At the level two, native level, there is no standard on the size and format of the data packet. .Ss Acceleration The .Nm driver can somewhat `accelerate' the movement of the pointing device. The faster you move the device, the further the pointer travels on the screen. The driver has an internal variable which governs the effect of the acceleration. Its value can be modified via the driver flag or via an ioctl call. .Sh DRIVER CONFIGURATION .Ss Kernel Configuration Options There are following kernel configuration options to control the .Nm driver. They may be set in the kernel configuration file (see .Xr config 8 ) . .Bl -tag -width MOUSE .It Em KBD_RESETDELAY=X , KBD_MAXWAIT=Y The .Nm driver will attempt to reset the pointing device during the boot process. It sometimes takes a long while before the device will respond after reset. These options control how long the driver should wait before it eventually gives up waiting. The driver will wait .Fa X * .Fa Y msecs at most. If the driver seems unable to detect your pointing device, you may want to increase these values. The default values are 200 msec for .Fa X and 5 for .Fa Y . .It Em PSM_DEBUG=N , KBDIO_DEBUG=N Sets the debug level to .Fa N . The default debug level is zero. See .Sx DIAGNOSTICS for debug logging. .El .Ss Driver Flags The .Nm driver accepts the following driver flags. Set them in .Pa /boot/device.hints (see .Sx EXAMPLES below). .Bl -tag -width MOUSE .It bit 0..3 RESOLUTION This flag specifies the resolution of the pointing device. It must be zero through four. The greater the value is, the finer resolution the device will select. Actual resolution selected by this field varies according to the model of the device. Typical resolutions are: .Pp .Bl -tag -width 0_(medium_high)__ -compact .It Em 1 (low) 25 pulse per inch (ppi) .It Em 2 (medium low) 50 ppi .It Em 3 (medium high) 100 ppi .It Em 4 (high) 200 ppi .El .Pp Leaving this flag zero will selects the default resolution for the device (whatever it is). .It bit 4..7 ACCELERATION This flag controls the amount of acceleration effect. The smaller the value of this flag is, more sensitive the movement becomes. The minimum value allowed, thus the value for the most sensitive setting, is one. Setting this flag to zero will completely disables the acceleration effect. .It bit 8 NOCHECKSYNC The .Nm driver tries to detect the first byte of the data packet by checking the bit pattern of that byte. Although this method should work with most PS/2 pointing devices, it may interfere with some devices which are not so compatible with known devices. If you think your pointing device is not functioning as expected, and the kernel frequently prints the following message to the console, .Bd -literal -offset indent psmintr: out of sync (xxxx != yyyy). .Ed .Pp set this flag to disable synchronization check and see if it helps. .It bit 9 NOIDPROBE The .Nm driver will not try to identify the model of the pointing device and will not carry out model-specific initialization. The device should always act like a standard PS/2 mouse without such initialization. Extra features, such as wheels and additional buttons, will not be recognized by the .Nm driver. .It bit 10 NORESET When this flag is set, the .Nm driver will not reset the pointing device when initializing the device. If the .Fx kernel is started after another OS has run, the pointing device will inherit settings from the previous OS. However, because there is no way for the .Nm driver to know the settings, the device and the driver may not work correctly. The flag should never be necessary under normal circumstances. .It bit 11 FORCETAP Some pad devices report as if the fourth button is pressed when the user `taps' the surface of the device (see .Sx CAVEATS ) . This flag will make the .Nm driver assume that the device behaves this way. Without the flag, the driver will assume this behavior for ALPS GlidePoint models only. .It bit 12 IGNOREPORTERROR This flag makes .Nm driver ignore certain error conditions when probing the PS/2 mouse port. It should never be necessary under normal circumstances. .It bit 13 HOOKRESUME The built-in PS/2 pointing device of some laptop computers is somehow not operable immediately after the system `resumes' from the power saving mode, though it will eventually become available. There are reports that stimulating the device by performing I/O will help waking up the device quickly. This flag will enable a piece of code in the .Nm driver to hook the `resume' event and exercise some harmless I/O operations on the device. .It bit 14 INITAFTERSUSPEND This flag adds more drastic action for the above problem. It will cause the .Nm driver to reset and re-initialize the pointing device after the `resume' event. .El .Sh LOADER TUNABLES Extended support for Synaptics touchpads can be enabled by setting .Va hw.psm.synaptics_support to .Em 1 at boot-time. This will enable .Nm to handle packets from guest devices (sticks) and extra buttons. Similarly, extended support for IBM/Lenovo TrackPoint and Elantech touchpads can be enabled by setting .Va hw.psm.trackpoint_support or -.Va hw.psm.elantech_support, +.Va hw.psm.elantech_support , respectively, to .Em 1 at boot-time. .Pp Tap and drag gestures can be disabled by setting .Va hw.psm.tap_enabled to .Em 0 at boot-time. Currently, this is supported on Synaptics touchpads regardless of Extended support state and on Elantech touchpads with Extended support enabled. The behaviour may be changed after boot by setting the sysctl with the same name and by restarting .Xr moused 8 using .Pa /etc/rc.d/moused . .Pp Active multiplexing support can be disabled by setting .Va hw.psm.mux_disabled to .Em 1 at boot-time. This will prevent .Nm from enabling active multiplexing mode needed for some Synaptics touchpads. .Sh IOCTLS There are a few .Xr ioctl 2 commands for mouse drivers. These commands and related structures and constants are defined in .In sys/mouse.h . General description of the commands is given in .Xr mouse 4 . This section explains the features specific to the .Nm driver. .Pp .Bl -tag -width MOUSE -compact .It Dv MOUSE_GETLEVEL Ar int *level .It Dv MOUSE_SETLEVEL Ar int *level These commands manipulate the operation level of the .Nm driver. .Pp .It Dv MOUSE_GETHWINFO Ar mousehw_t *hw Returns the hardware information of the attached device in the following structure. .Bd -literal typedef struct mousehw { int buttons; /* number of buttons */ int iftype; /* I/F type */ int type; /* mouse/track ball/pad... */ int model; /* I/F dependent model ID */ int hwid; /* I/F dependent hardware ID */ } mousehw_t; .Ed .Pp The .Dv buttons field holds the number of buttons on the device. The .Nm driver currently can detect the 3 button mouse from Logitech and report accordingly. The 3 button mouse from the other manufacturer may or may not be reported correctly. However, it will not affect the operation of the driver. .Pp The .Dv iftype is always .Dv MOUSE_IF_PS2 . .Pp The .Dv type tells the device type: .Dv MOUSE_MOUSE , .Dv MOUSE_TRACKBALL , .Dv MOUSE_STICK , .Dv MOUSE_PAD , or .Dv MOUSE_UNKNOWN . The user should not heavily rely on this field, as the driver may not always, in fact it is very rarely able to, identify the device type. .Pp The .Dv model is always .Dv MOUSE_MODEL_GENERIC at the operation level 0. It may be .Dv MOUSE_MODEL_GENERIC or one of .Dv MOUSE_MODEL_XXX constants at higher operation levels. Again the .Nm driver may or may not set an appropriate value in this field. .Pp The .Dv hwid is the ID value returned by the device. Known IDs include: .Pp .Bl -tag -width 0__ -compact .It Em 0 Mouse (Microsoft, Logitech and many other manufacturers) .It Em 2 Microsoft Ballpoint mouse .It Em 3 Microsoft IntelliMouse .El .Pp .It Dv MOUSE_SYN_GETHWINFO Ar synapticshw_t *synhw Retrieves extra information associated with Synaptics Touchpad. Only available when a supported device has been detected. .Bd -literal typedef struct synapticshw { int infoMajor; /* major hardware revision */ int infoMinor; /* minor hardware revision */ int infoRot180; /* touchpad is rotated */ int infoPortrait; /* touchpad is a portrait */ int infoSensor; /* sensor model */ int infoHardware; /* hardware model */ int infoNewAbs; /* supports the newabs format */ int capPen; /* can detect a pen */ int infoSimplC; /* supports simple commands */ int infoGeometry; /* touchpad dimensions */ int capExtended; /* supports extended packets */ int capSleep; /* can be suspended/resumed */ int capFourButtons; /* has four buttons */ int capMultiFinger; /* can detect multiple fingers */ int capPalmDetect; /* can detect a palm */ int capPassthrough; /* can passthrough guest packets */ int capMiddle; /* has a physical middle button */ int nExtendedButtons; /* has N additional buttons */ int nExtendedQueries; /* supports N extended queries */ } synapticshw_t; .Ed .Pp See the .Em Synaptics TouchPad Interfacing Guide for more information about the fields in this structure. .Pp .It Dv MOUSE_GETMODE Ar mousemode_t *mode The command gets the current operation parameters of the mouse driver. .Bd -literal typedef struct mousemode { int protocol; /* MOUSE_PROTO_XXX */ int rate; /* report rate (per sec), -1 if unknown */ int resolution; /* MOUSE_RES_XXX, -1 if unknown */ int accelfactor; /* acceleration factor */ int level; /* driver operation level */ int packetsize; /* the length of the data packet */ unsigned char syncmask[2]; /* sync. bits */ } mousemode_t; .Ed .Pp The .Dv protocol is .Dv MOUSE_PROTO_PS2 at the operation level zero and two. .Dv MOUSE_PROTO_SYSMOUSE at the operation level one. .Pp The .Dv rate is the status report rate (reports/sec) at which the device will send movement report to the host computer. Typical supported values are 10, 20, 40, 60, 80, 100 and 200. Some mice may accept other arbitrary values too. .Pp The .Dv resolution of the pointing device must be one of .Dv MOUSE_RES_XXX constants or a positive value. The greater the value is, the finer resolution the mouse will select. Actual resolution selected by the .Dv MOUSE_RES_XXX constant varies according to the model of mouse. Typical resolutions are: .Pp .Bl -tag -width MOUSE_RES_MEDIUMHIGH__ -compact .It Dv MOUSE_RES_LOW 25 ppi .It Dv MOUSE_RES_MEDIUMLOW 50 ppi .It Dv MOUSE_RES_MEDIUMHIGH 100 ppi .It Dv MOUSE_RES_HIGH 200 ppi .El .Pp The .Dv accelfactor field holds a value to control acceleration feature (see .Sx Acceleration ) . It must be zero or greater. If it is zero, acceleration is disabled. .Pp The .Dv packetsize field specifies the length of the data packet. It depends on the operation level and the model of the pointing device. .Pp .Bl -tag -width level_0__ -compact .It Em level 0 3 bytes .It Em level 1 8 bytes .It Em level 2 Depends on the model of the device .El .Pp The array .Dv syncmask holds a bit mask and pattern to detect the first byte of the data packet. .Dv syncmask[0] is the bit mask to be ANDed with a byte. If the result is equal to .Dv syncmask[1] , the byte is likely to be the first byte of the data packet. Note that this detection method is not 100% reliable, thus, should be taken only as an advisory measure. .Pp .It Dv MOUSE_SETMODE Ar mousemode_t *mode The command changes the current operation parameters of the mouse driver as specified in .Ar mode . Only .Dv rate , .Dv resolution , .Dv level and .Dv accelfactor may be modifiable. Setting values in the other field does not generate error and has no effect. .Pp If you do not want to change the current setting of a field, put -1 there. You may also put zero in .Dv resolution and .Dv rate , and the default value for the fields will be selected. .Pp .It Dv MOUSE_READDATA Ar mousedata_t *data .\" The command reads the raw data from the device. .\" .Bd -literal .\" typedef struct mousedata { .\" int len; /* # of data in the buffer */ .\" int buf[16]; /* data buffer */ .\" } mousedata_t; .\" .Ed .\" .Pp .\" Upon returning to the user program, the driver will place the number .\" of valid data bytes in the buffer in the .\" .Dv len .\" field. .\" .Pp .It Dv MOUSE_READSTATE Ar mousedata_t *state .\" The command reads the hardware settings from the device. .\" Upon returning to the user program, the driver will place the number .\" of valid data bytes in the buffer in the .\" .Dv len .\" field. It is usually 3 bytes. .\" The buffer is formatted as follows: .\" .Pp .\" .Bl -tag -width Byte_1 -compact .\" .It Byte 1 .\" .Bl -tag -width bit_6 -compact .\" .It bit 7 .\" Reserved. .\" .It bit 6 .\" 0 - stream mode, 1 - remote mode. .\" In the stream mode, the pointing device sends the device status .\" whenever its state changes. In the remote mode, the host computer .\" must request the status to be sent. .\" The .\" .Nm .\" driver puts the device in the stream mode. .\" .It bit 5 .\" Set if the pointing device is currently enabled. Otherwise zero. .\" .It bit 4 .\" 0 - 1:1 scaling, 1 - 2:1 scaling. .\" 1:1 scaling is the default. .\" .It bit 3 .\" Reserved. .\" .It bit 2 .\" Left button status; set if pressed. .\" .It bit 1 .\" Middle button status; set if pressed. .\" .It bit 0 .\" Right button status; set if pressed. .\" .El .\" .It Byte 2 .\" .Bl -tag -width bit_6_0 -compact .\" .It bit 7 .\" Reserved. .\" .It bit 6..0 .\" Resolution code: zero through three. Actual resolution for .\" the resolution code varies from one device to another. .\" .El .\" .It Byte 3 .\" The status report rate (reports/sec) at which the device will send .\" movement report to the host computer. .\" .El These commands are not currently supported by the .Nm driver. .Pp .It Dv MOUSE_GETSTATUS Ar mousestatus_t *status The command returns the current state of buttons and movement counts as described in .Xr mouse 4 . .El .Sh FILES .Bl -tag -width /dev/npsm0 -compact .It Pa /dev/psm0 `non-blocking' device node .It Pa /dev/bpsm0 `blocking' device node .El .Sh EXAMPLES In order to install the .Nm driver, you need to add .Pp .Dl "device atkbdc" .Dl "device psm" .Pp to your kernel configuration file, and put the following lines to .Pa /boot/device.hints . .Pp .Dl hint.atkbdc.0.at="isa" .Dl hint.atkbdc.0.port="0x060" .Dl hint.psm.0.at="atkbdc" .Dl hint.psm.0.irq="12" .Pp If you add the following statement to .Pa /boot/device.hints , .Pp .Dl hint.psm.0.flags="0x2000" .Pp you will add the optional code to stimulate the pointing device after the `resume' event. .Pp .Dl hint.psm.0.flags="0x24" .Pp The above line will set the device resolution high (4) and the acceleration factor to 2. .Sh DIAGNOSTICS At debug level 0, little information is logged except for the following line during boot process: .Bd -literal -offset indent psm0: device ID X .Ed .Pp where .Fa X the device ID code returned by the found pointing device. See .Dv MOUSE_GETINFO for known IDs. .Pp At debug level 1 more information will be logged while the driver probes the auxiliary port (mouse port). Messages are logged with the LOG_KERN facility at the LOG_DEBUG level (see .Xr syslogd 8 ) . .Bd -literal -offset indent psm0: current command byte:xxxx kbdio: TEST_AUX_PORT status:0000 kbdio: RESET_AUX return code:00fa kbdio: RESET_AUX status:00aa kbdio: RESET_AUX ID:0000 [...] psm: status 00 02 64 psm0 irq 12 on isa psm0: model AAAA, device ID X, N buttons psm0: config:00000www, flags:0000uuuu, packet size:M psm0: syncmask:xx, syncbits:yy .Ed .Pp The first line shows the command byte value of the keyboard controller just before the auxiliary port is probed. It usually is 40, 45, 47 or 65, depending on how the motherboard BIOS initialized the keyboard controller upon power-up. .Pp The second line shows the result of the keyboard controller's test on the auxiliary port interface, with zero indicating no error; note that some controllers report no error even if the port does not exist in the system, however. .Pp The third through fifth lines show the reset status of the pointing device. The functioning device should return the sequence of FA AA . The ID code is described above. .Pp The seventh line shows the current hardware settings. .\" See .\" .Dv MOUSE_READSTATE .\" for definitions. These bytes are formatted as follows: .Pp .Bl -tag -width Byte_1 -compact .It Byte 1 .Bl -tag -width bit_6 -compact .It bit 7 Reserved. .It bit 6 0 - stream mode, 1 - remote mode. In the stream mode, the pointing device sends the device status whenever its state changes. In the remote mode, the host computer must request the status to be sent. The .Nm driver puts the device in the stream mode. .It bit 5 Set if the pointing device is currently enabled. Otherwise zero. .It bit 4 0 - 1:1 scaling, 1 - 2:1 scaling. 1:1 scaling is the default. .It bit 3 Reserved. .It bit 2 Left button status; set if pressed. .It bit 1 Middle button status; set if pressed. .It bit 0 Right button status; set if pressed. .El .It Byte 2 .Bl -tag -width bit_6_0 -compact .It bit 7 Reserved. .It bit 6..0 Resolution code: zero through three. Actual resolution for the resolution code varies from one device to another. .El .It Byte 3 The status report rate (reports/sec) at which the device will send movement report to the host computer. .El .Pp Note that the pointing device will not be enabled until the .Nm driver is opened by the user program. .Pp The rest of the lines show the device ID code, the number of detected buttons and internal variables. .Pp At debug level 2, much more detailed information is logged. .Sh SEE ALSO .Xr ioctl 2 , .Xr syslog 3 , .Xr atkbdc 4 , .Xr mouse 4 , .Xr sysmouse 4 , .Xr moused 8 , .Xr syslogd 8 .Rs .%T Synaptics TouchPad Interfacing Guide .%U http://www.synaptics.com/ .Re .\".Sh HISTORY .Sh AUTHORS .An -nosplit The .Nm driver is based on the work done by quite a number of people, including .An Eric Forsberg , .An Sandi Donno , .An Rick Macklem , .An Andrew Herbert , .An Charles Hannum , .An Shoji Yuen and .An Kazutaka Yokota to name the few. .Pp This manual page was written by .An Kazutaka Yokota Aq Mt yokota@FreeBSD.org . .Sh CAVEATS Many pad devices behave as if the first (left) button were pressed if the user `taps' the surface of the pad. In contrast, some pad products, e.g.\& some versions of ALPS GlidePoint and Interlink VersaPad, treat the tapping action as fourth button events. .Pp It is reported that ALPS GlidePoint, Synaptics Touchpad, IBM/Lenovo TrackPoint, and Interlink VersaPad require .Em INITAFTERSUSPEND flag in order to recover from suspended state. This flag is automatically set when one of these devices is detected by the .Nm driver. .Pp Some PS/2 mouse models from MouseSystems require to be put in the high resolution mode to work properly. Use the driver flag to set resolution. .Pp There is not a guaranteed way to re-synchronize with the first byte of the packet once we are out of synchronization with the data stream. However, if you are using the \fIXFree86\fP server and experiencing the problem, you may be able to make the X server synchronize with the mouse by switching away to a virtual terminal and getting back to the X server, unless the X server is accessing the mouse via .Xr moused 8 . Clicking any button without moving the mouse may also work. .Sh BUGS Enabling the extended support for Synaptics touchpads has been reported to cause problems with responsivity on some (newer) models of Synaptics hardware, particularly those with guest devices. Index: head/share/man/man4/rum.4 =================================================================== --- head/share/man/man4/rum.4 (revision 366011) +++ head/share/man/man4/rum.4 (revision 366012) @@ -1,188 +1,188 @@ .\" .\" Copyright (c) 2005-2007 .\" Damien Bergamini .\" .\" 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. .\" .\" $FreeBSD$ .\" .Dd November 8, 2018 .Dt RUM 4 .Os .Sh NAME .Nm rum .Nd Ralink Technology USB IEEE 802.11a/b/g wireless network 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 ehci" .Cd "device uhci" .Cd "device ohci" .Cd "device usb" .Cd "device rum" .Cd "device wlan" .Cd "device wlan_amrr" .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_rum_load="YES" .Ed .Sh DESCRIPTION The .Nm driver supports USB 2.0 and PCI Express Mini Card wireless adapters based on the Ralink RT2501USB and RT2601USB chipsets. .Pp Ralink PCI Express Mini Card adapters show up as normal USB 2.0 devices and are thus handled by the .Nm driver. .Pp The RT2501USB chipset is the second generation of 802.11a/b/g adapters from Ralink. It consists of two integrated chips, an RT2571W MAC/BBP and an RT2528 or RT5226 radio transceiver. .Pp The RT2601USB chipset consists of two integrated chips, an RT2671 MAC/BBP and an RT2527 or RT5225 radio transceiver. This chipset uses the MIMO (multiple-input multiple-output) technology with multiple antennas to extend the operating range of the adapter and to achieve higher throughput. .Pp All chips have hardware support for WEP, AES-CCM, TKIP, and Michael cryptographic operations. .Pp .Nm supports .Cm station , .Cm adhoc , .Cm adhoc-demo , .Cm hostap , 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 . .Sh HARDWARE The .Nm driver supports USB 2.0 wireless adapters based on the Ralink RT2501USB and RT2601USB chipsets, including: .Pp .Bl -column -compact "Atlantis Land A02-PCM-W54" "Bus" .It Em Card Ta Em Bus .It "3Com Aolynk WUB320g" Ta USB .It "Abocom WUG2700 Ta" Ta USB .It "Airlink101 AWLL5025" Ta USB .It "ASUS WL-167g ver 2" Ta USB .It "Belkin F5D7050 ver 3" Ta USB .It "Belkin F5D9050 ver 3" Ta USB .It "Buffalo WLI-U2-SG54HP" Ta USB .It "Buffalo WLI-U2-SG54HG" Ta USB .It "Buffalo WLI-U2-G54HP" Ta USB .It "Buffalo WLI-UC-G" Ta USB .It "CNet CWD-854 ver F" Ta USB .It "Conceptronic C54RU ver 2" Ta USB .It "Corega CG-WLUSB2GO" Ta USB .It "D-Link DWA-110" Ta USB .It "D-Link DWA-111" Ta USB .It "D-Link DWL-G122 rev C1" Ta USB .It "D-Link WUA-1340" Ta USB .It "Digitus DN-7003GR" Ta USB .It "Edimax EW-7318USG" Ta USB .It "Gigabyte GN-WB01GS" Ta USB .It "Gigabyte GN-WI05GS" Ta USB .It "Hawking HWUG1" Ta USB .It "Hawking HWU54DM" Ta USB .It "Hercules HWGUSB2-54-LB" Ta USB .It "Hercules HWGUSB2-54V2-AP" Ta USB .It "LevelOne WNC-0301USB v3" Ta USB .It "Linksys WUSB54G rev C" Ta USB .It "Linksys WUSB54GR" Ta USB .It "Planex GW-US54HP" Ta USB .It "Planex GW-US54Mini2" Ta USB .It "Planex GW-USMM" Ta USB .It "Senao NUB-3701" Ta USB .It "Sitecom WL-113 ver 2" Ta USB .It "Sitecom WL-172" Ta USB .It "Sweex LW053" Ta USB .It "TP-LINK TL-WN321G v1/v2/v3" 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 rum0 inet 192.168.0.20 \e netmask 0xffffff00 .Ed .Pp Join a specific BSS network with network name .Dq Li my_net : .Pp .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 .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev rum0 wlanmode adhoc ssid my_net \e wepmode on wepkey 0x01020304050607080910111213 weptxkey 1 .Ed .Sh DIAGNOSTICS .Bl -diag .It "rum%d: could not load 8051 microcode" An error occurred while attempting to upload the microcode to the onboard 8051 microcontroller unit. The driver will reset the hardware. This should not happen. .El .Sh SEE ALSO .Xr intro 4 , .Xr netintro 4 , .Xr usb 4 , .Xr wlan 4 , .Xr wlan_amrr 4 , .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr wlan_xauth 4 , .Xr hostapd 8 , .Xr ifconfig 8 , -.Xr wpa_supplicant 8 . +.Xr wpa_supplicant 8 .Rs .%T "Ralink Technology" .%U http://www.ralinktech.com/ .Re .Sh HISTORY The .Nm driver first appeared in .Ox 4.0 . .Sh AUTHORS .An -nosplit The original .Nm driver was written by .An Niall O'Higgins Aq Mt niallo@openbsd.org and .An Damien Bergamini Aq Mt damien@openbsd.org . Index: head/share/man/man4/smb.4 =================================================================== --- head/share/man/man4/smb.4 (revision 366011) +++ head/share/man/man4/smb.4 (revision 366012) @@ -1,200 +1,200 @@ .\" Copyright (c) 1998, Nicolas Souchu .\" Copyright (c) 2004, Joerg Wunsch .\" Copyright (c) 2015, Michael Gmelin .\" 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 25, 2015 .Dt SMB 4 .Os .Sh NAME .Nm smb .Nd SMB generic I/O device driver .Sh SYNOPSIS .Cd "device smb" .Sh DESCRIPTION The .Em smb character device driver provides generic I/O to any .Xr smbus 4 instance. To control SMB devices, use .Pa /dev/smb? with the ioctls described below. Any of these ioctl commands takes a pointer to .Vt struct smbcmd as its argument. .Bd -literal #include struct smbcmd { u_char cmd; u_char reserved; u_short op; union { char byte; char buf[2]; short word; } wdata; union { char byte; char buf[2]; short word; } rdata; int slave; char *wbuf; /* use wdata if NULL */ int wcount; char *rbuf; /* use rdata if NULL */ int rcount; }; .Ed .Pp The .Fa slave field is always used, and provides the address of the SMBus slave device. The slave address is specified in the seven most significant bits .Pq i.e., Dq "left-justified" . The least significant bit of the slave address must be zero. .Pp .Bl -column ".Dv SMB_QUICK_WRITE" -compact .It Em Ioctl Ta Em Description .Pp .It Dv SMB_QUICK_WRITE Ta .Em QuickWrite does not transfer any data. It just issues the device address with write intent to the bus. .It Dv SMB_QUICK_READ Ta .Em QuickRead does not transfer any data. It just issues the device address with read intent to the bus. .It Dv SMB_SENDB Ta .Em SendByte sends the byte provided in .Fa cmd to the device. .It Dv SMB_RECVB Ta .Em ReceiveByte reads a single byte from the device which is returned in .Fa cmd . .It Dv SMB_WRITEB Ta .Em WriteByte first sends the byte from .Fa cmd to the device, followed by the byte given in .Fa wdata.byte . .It Dv SMB_WRITEW Ta .Em WriteWord first sends the byte from .Fa cmd to the device, followed by the word given in .Fa wdata.word . Note that the SMBus byte-order is little-endian by definition. .It Dv SMB_READB Ta .Em ReadByte first sends the byte from .Fa cmd to the device, then reads one byte of data from the device. Returned data is stored in .Fa rdata.byte . .It Dv SMB_READW Ta .Em ReadWord first sends the byte from .Fa cmd to the device, then reads one word of data from the device. Returned data is stored in .Fa rdata.word . .It Dv SMB_PCALL Ta .Em ProcedureCall first sends the byte from .Fa cmd to the device, followed by the word provided in .Fa wdata.word . It then reads one word of data from the device and returns it in .Fa rdata.word . .It Dv SMB_BWRITE Ta .Em BlockWrite first sends the byte from .Fa cmd to the device, then the byte from .Fa wcount followed by .Fa wcount bytes of data that are taken from the buffer pointed to by .Fa wbuf . The SMBus specification mandates that no more than 32 bytes of data can be transferred in a single block read or write command. This value can be read from the constant .Dv SMB_MAXBLOCKSIZE . .It Dv SMB_BREAD Ta .Em BlockRead first sends the byte from .Fa cmd to the device, then reads a count of data bytes that the device is going to provide and then reads that many bytes. The count is returned in -.Fa rcount. +.Fa rcount . The data is returned in the buffer pointed to by .Fa rbuf . .El .Pp The .Xr read 2 and .Xr write 2 system calls are not implemented by this driver. .Sh ERRORS The .Xr ioctl 2 commands can cause the following driver-specific errors: .Bl -tag -width Er .It Bq Er ENXIO Device did not respond to selection. .It Bq Er EBUSY Device still in use. .It Bq Er ENODEV Operation not supported by device (not supposed to happen). .It Bq Er EINVAL General argument error. .It Bq Er EWOULDBLOCK SMBus transaction timed out. .El .Sh SEE ALSO .Xr ioctl 2 , .Xr smbus 4 .Sh HISTORY The .Nm manual page first appeared in .Fx 3.0 . .Sh AUTHORS This manual page was written by .An Nicolas Souchu and extended by .An Michael Gmelin Aq freebsd@grem.de . Index: head/share/man/man4/umass.4 =================================================================== --- head/share/man/man4/umass.4 (revision 366011) +++ head/share/man/man4/umass.4 (revision 366012) @@ -1,118 +1,117 @@ .\" Copyright (c) 1999 .\" Nick Hibma . All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd January 27, 2020 .Dt UMASS 4 .Os .Sh NAME .Nm umass .Nd USB Mass Storage Devices 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 scbus" .Cd "device usb" .Cd "device umass" .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 umass_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for Mass Storage devices that attach to the USB port. .Pp To use the .Nm driver, .Xr usb 4 and one of .Xr uhci 4 or .Xr ohci 4 or .Xr ehci 4 or .Xr xhci 4 must be configured in the kernel. Additionally, since .Nm uses the SCSI subsystem and sometimes acts as a SCSI device, it requires .Xr da 4 and .Xr scbus 4 to be included in the kernel. .Sh EXAMPLES .Bd -literal -offset indent device umass device scbus device da device pass .Ed .Pp Add the .Nm driver to the kernel. -.Pp .Bd -literal -offset indent camcontrol rescan 0:0:0 camcontrol rescan 0:0:1 camcontrol rescan 0:0:2 camcontrol rescan 0:0:3 .Ed .Pp Rescan all slots on a multi-slot flash reader, where the slots map to separate LUNs on a single SCSI ID. Typically only the first slot will be enabled at boot time. This assumes that the flash reader is the first SCSI bus in the system and has 4 slots. .Sh SEE ALSO .Xr cfumass 4 , .Xr ehci 4 , .Xr ohci 4 , .Xr uhci 4 , .Xr usb 4 , .Xr xhci 4 , .Xr camcontrol 8 .\".Sh HISTORY .Sh AUTHORS .An -nosplit The .Nm driver was written by .An MAEKAWA Masahide Aq Mt bishop@rr.iij4u.or.jp and .An Nick Hibma Aq Mt n_hibma@FreeBSD.org . .Pp This manual page was written by .An Nick Hibma Aq Mt n_hibma@FreeBSD.org . Index: head/share/man/man4/vale.4 =================================================================== --- head/share/man/man4/vale.4 (revision 366011) +++ head/share/man/man4/vale.4 (revision 366012) @@ -1,121 +1,120 @@ .\" Copyright (c) 2012 Luigi Rizzo, Universita` di Pisa .\" 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. .\" .\" This document is derived in part from the enet man page (enet.4) .\" distributed with 4.3BSD Unix. .\" .\" $FreeBSD$ .\" $Id: $ .\" .Dd February 6, 2020 .Dt VALE 4 .Os .Sh NAME .Nm vale .Nd a very fast Virtual Local Ethernet using the netmap API .Sh SYNOPSIS .Cd device netmap .Sh DESCRIPTION .Nm is a feature of the .Xr netmap 4 module that implements multiple Virtual switches that can be used to interconnect netmap clients, including traffic sources and sinks, packet forwarders, userspace firewalls, and so on. .Pp .Nm is implemented completely in software, and is extremely fast. On a modern machine it can move almost 20 Million packets per second (Mpps) per core with small frames, and about 70 Gbit/s with 1500 byte frames. .Sh OPERATION .Nm dynamically creates switches and ports as clients connect to it using the .Xr netmap 4 API. .Pp .Nm ports are named .Pa valeSSS:PPP where .Pa vale is the prefix indicating a VALE switch rather than a standard interface, .Pa SSS indicates a specific switch (the colon is a separator), and .Pa PPP indicates a port within the switch. Both SSS and PPP have the form [0-9a-zA-Z_]+ , the string cannot exceed IFNAMSIZ characters, and PPP cannot be the name of any existing OS network interface. .Pp See .Xr netmap 4 for details on the API. .Ss LIMITS .Nm currently supports up to 8 switches, with 254 ports per switch. .Sh SYSCTL VARIABLES See .Xr netmap 4 for a list of sysctl variables that affect .Nm bridges. -.El .Sh EXAMPLES Create one switch, with a traffic generator connected to one port, and a netmap-enabled tcpdump instance on another port: .Bd -literal -offset indent tcpdump -ni valea:1 & pkt-gen -i valea:0 -f tx & .Ed .Pp Create two switches, each connected to two qemu machines on different ports. .Bd -literal -offset indent qemu -net nic -net netmap,ifname=vale1:a ... & qemu -net nic -net netmap,ifname=vale1:b ... & qemu -net nic -net netmap,ifname=vale2:c ... & qemu -net nic -net netmap,ifname=vale2:d ... & .Ed .Sh SEE ALSO .Xr netmap 4 .Pp Luigi Rizzo, Giuseppe Lettieri: VALE, a switched ethernet for virtual machines, June 2012, http://info.iet.unipi.it/~luigi/vale/ .Sh AUTHORS .An -nosplit The .Nm switch was designed and implemented in 2012 by .An Luigi Rizzo and .An Giuseppe Lettieri at the Universita` di Pisa. .Pp .Nm was funded by the European Commission within FP7 Projects CHANGE (257422) and OPENLAB (287581). Index: head/share/man/man4/vmd.4 =================================================================== --- head/share/man/man4/vmd.4 (revision 366011) +++ head/share/man/man4/vmd.4 (revision 366012) @@ -1,64 +1,63 @@ .\"- .\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD .\" .\" Copyright 2019 Cisco Systems, 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. .\" .\" $FreeBSD$ .\" -.Dd Octber 9, 2019 +.Dd October 9, 2019 .Dt VMD 4 .Os .Sh NAME .Nm vmd .Nd Intel Volume Management 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 vmd" .Cd "device vmd_bus" .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 vmd_load="YES" .Ed -.Pp .Sh DESCRIPTION This driver attaches to Intel VMD devices as a new PCI domain and then triggers a probe of PCI devices. Intel VMD is used with Intel's VROC (Virtual RAID on chip) used with NVME drives on Skylake SP servers. .Sh SEE ALSO .Xr graid 8 .Sh HISTORY The .Nm driver first appeared in .Fx 13.0 . .Sh BUGS .Nm is currently only available on amd64. Index: head/share/man/man4/wbwd.4 =================================================================== --- head/share/man/man4/wbwd.4 (revision 366011) +++ head/share/man/man4/wbwd.4 (revision 366012) @@ -1,144 +1,144 @@ .\"- .\" Copyright (c) 2012 Bjoern A. Zeeb .\" 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 16, 2019 .Dt WBWD 4 .Os .Sh NAME .Nm wbwd .Nd device driver for Winbond/Nuvoton Super I/O chips watchdog timer .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device superio" .Cd "device wbwd" .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 wbwd_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides .Xr watchdog 4 support for the watchdog interrupt timer present on at least the following Super I/O chips: .Bl -bullet -compact .It Winbond 83627HF/F/HG/G .It Winbond 83627S .It Winbond 83697HF .It Winbond 83697UG .It Winbond 83637HF .It Winbond 83627THF .It Winbond 83687THF .It Winbond 83627EHF .It Winbond 83627DHG .It Winbond 83627UHG .It Winbond 83667HG .It Winbond 83627DHG-P .It Winbond 83667HG-B .It Nuvoton NCT6775 .It Nuvoton NCT6776 .It Nuvoton NCT6102 .It Nuvoton NCT6779 .It Nuvoton NCT6791 .It Nuvoton NCT6792 .El .Sh SYSCTL VARIABLES The .Nm driver provides the following options as .Xr sysctl 8 variables. .Bl -tag -width "xxxxxx" .It Va dev.wbwd.0.timeout_override This variable allows to program the timer to a value independent on the one provided by the .Xr watchdog 4 framework while still relying on the regular updates from e.g. .Xr watchdogd 8 . This is particularly useful if your system provides multiple watchdogs and you want them to fire in a special sequence to trigger an NMI after a shorter period than the reset timeout for example. The value set must not be lower than the sleep time of .Xr watchdogd 8 . A value of 0 disables this feature and the timeout value provided by .Xr watchdog 4 will be used. .It Va dev.wbwd.0.debug_verbose If set this sysctl will tell the driver to log its current state before and after the timer reset on each invocation from .Xr watchdog 9 to the kernel message buffer for debugging. .It Va dev.wbwd.0.debug This read-only value gives the state of some registers on last update. .El .Pp The .Nm driver also provides further sysctl options that are hidden by default. See the source code for more information. .Sh SEE ALSO -.Xr superio 4 +.Xr superio 4 , .Xr watchdog 4 , .Xr device.hints 5 , .Xr watchdog 8 , .Xr watchdogd 8 , .Xr watchdog 9 .Sh HISTORY The .Nm driver first appeared in .Fx 10.0 . .Sh AUTHORS .An -nosplit This manual page was written by .An Bjoern A. Zeeb Aq Mt bz@FreeBSD.org .