Index: head/share/man/man4/cas.4 =================================================================== --- head/share/man/man4/cas.4 (revision 357793) +++ head/share/man/man4/cas.4 (revision 357794) @@ -1,158 +1,135 @@ .\" .\" Copyright (c) 2009 Marius Strobl .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd March 24, 2012 .Dt CAS 4 .Os .Sh NAME .Nm cas .Nd Sun Cassini/Cassini+ and National Semiconductor DP83065 Saturn Gigabit Ethernet driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device miibus" .Cd "device cas" .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_cas_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for the Sun Cassini/Cassini+ and National Semiconductor DP83065 Saturn Gigabit Ethernet controllers found on-board in Sun UltraSPARC machines and as add-on cards. .Pp All controllers supported by the .Nm driver have TCP/UDP checksum offload capability for both receive and transmit, support for the reception and transmission of extended frames for .Xr vlan 4 and an interrupt coalescing/moderation mechanism as well as a 512-bit multicast hash filter. .Pp The .Nm driver also supports Jumbo Frames (up to 9022 bytes), which can be configured via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the .Xr ifconfig 8 utility configures the adapter to receive and transmit Jumbo Frames. .Sh HARDWARE The chips supported by the .Nm driver are: .Pp .Bl -bullet -compact .It National Semiconductor DP83065 Saturn Gigabit Ethernet .It Sun Cassini Gigabit Ethernet .It Sun Cassini+ Gigabit Ethernet .El .Pp The following add-on cards are known to work with the .Nm driver at this time: .Pp .Bl -bullet -compact .It Sun GigaSwift Ethernet 1.0 MMF (Cassini Kuheen) (part no.\& 501-5524) .It Sun GigaSwift Ethernet 1.0 UTP (Cassini) (part no.\& 501-5902) .It Sun GigaSwift Ethernet UTP (GCS) (part no.\& 501-6719) .It Sun Quad GigaSwift Ethernet UTP (QGE) (part no.\& 501-6522) .It Sun Quad GigaSwift Ethernet PCI-X (QGE-X) (part no.\& 501-6738) .El -.Sh NOTES -On sparc64 the -.Nm -driver respects the -.Va local-mac-address? -system configuration variable which can be set in the Open Firmware boot -monitor using the -.Ic setenv -command or by -.Xr eeprom 8 . -If set to -.Dq Li false -(the default), the -.Nm -driver will use the system's default MAC address for all of its devices. -If set to -.Dq Li true , -the unique MAC address of each interface is used if present rather than -the system's default MAC address. -.Pp -Supported interfaces having their own MAC address include on-board -versions on boards equipped with more than one Ethernet interface and -all add-on cards. .Sh SEE ALSO .Xr altq 4 , .Xr miibus 4 , .Xr netintro 4 , .Xr vlan 4 , .Xr eeprom 8 , .Xr ifconfig 8 .Sh HISTORY The .Nm device driver appeared in .Fx 8.0 and .Fx 7.3 . It is named after the .Nm driver which first appeared in .Ox 4.1 and supports the same set of controllers but is otherwise unrelated. .Sh AUTHORS .An -nosplit The .Nm driver was written by .An Marius Strobl Aq Mt marius@FreeBSD.org based on the .Xr gem 4 driver. Index: head/share/man/man4/dc.4 =================================================================== --- head/share/man/man4/dc.4 (revision 357793) +++ head/share/man/man4/dc.4 (revision 357794) @@ -1,450 +1,428 @@ .\" Copyright (c) 1997, 1998, 1999 .\" Bill Paul . All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by Bill Paul. .\" 4. Neither the name of the author nor the names of any co-contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD .\" 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 24, 2011 .Dt DC 4 .Os .Sh NAME .Nm dc .Nd "DEC/Intel 21143 and clone 10/100 Ethernet driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device miibus" .Cd "device dc" .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_dc_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for several PCI Fast Ethernet adapters and embedded controllers based on the DEC/Intel 21143 chipset and clones. .Pp All of supported chipsets have the same general register layout, DMA descriptor format and method of operation. All of the clone chips are based on the 21143 design with various modifications. The 21143 itself has support for 10baseT, BNC, AUI, MII and symbol media attachments, 10 and 100Mbps speeds in full or half duplex, built in NWAY autonegotiation and wake on LAN. The 21143 also offers several receive filter programming options including perfect filtering, inverse perfect filtering and hash table filtering. .Pp Some clone chips duplicate the 21143 fairly closely while others only maintain superficial similarities. Some support only MII media attachments. Others use different receiver filter programming mechanisms. At least one supports only chained DMA descriptors (most support both chained descriptors and contiguously allocated fixed size rings). Some chips (especially the PNIC) also have peculiar bugs. The .Nm driver does its best to provide generalized support for all of these chipsets in order to keep special case code to a minimum. .Pp These chips are used by many vendors which makes it difficult to provide a complete list of all supported cards. .Pp The .Nm driver supports the following media types: .Bl -tag -width ".Cm 10baseT/UTP" .It Cm autoselect Enable autoselection of the media type and options. The user can manually override the autoselected mode by adding media options to the .Pa /etc/rc.conf file. .Pp Note: the built-in NWAY autonegotiation on the original PNIC 82c168 chip is horribly broken and is not supported by the .Nm driver at this time (see the .Sx BUGS section for details). The original 82c168 appears on very early revisions of the LinkSys LNE100TX and Matrox FastNIC. .It Cm 10baseT/UTP Set 10Mbps operation. The .Cm mediaopt option can also be used to enable .Cm full-duplex operation. Not specifying .Cm full-duplex implies .Cm half-duplex mode. .It Cm 100baseTX Set 100Mbps (Fast Ethernet) operation. The .Cm mediaopt option can also be used to enable .Cm full-duplex operation. Not specifying .Cm full-duplex implies .Cm half-duplex mode. .El .Pp The .Nm driver supports the following media options: .Bl -tag -width ".Cm full-duplex" .It Cm full-duplex Force full duplex operation. The interface will operate in half duplex mode if this media option is not specified. .El .Pp Note that the 100baseTX media type may not be available on certain Intel 21143 adapters which support 10Mbps media attachments only. For more information on configuring this device, see .Xr ifconfig 8 . .Sh HARDWARE The .Nm driver provides support for the following chipsets: .Pp .Bl -bullet -compact .It DEC/Intel 21143 .It ADMtek AL981 Comet, AN985 Centaur, ADM9511 Centaur II and ADM9513 Centaur II .It ALi/ULi M5261 and M5263 .It ASIX Electronics AX88140A and AX88141 .It Conexant LANfinity RS7112 (miniPCI) .It Davicom DM9009, DM9100, DM9102 and DM9102A .It Lite-On 82c168 and 82c169 PNIC .It Lite-On/Macronix 82c115 PNIC II .It Macronix 98713, 98713A, 98715, 98715A, 98715AEC-C, 98725, 98727 and 98732 .It Xircom X3201 (cardbus only) .El .Pp The following NICs are known to work with the .Nm driver at this time: .Pp .Bl -bullet -compact .It 3Com OfficeConnect 10/100B (ADMtek AN985 Centaur-P) .It Abocom FE2500 .It Accton EN1217 (98715A) .It Accton EN2242 MiniPCI .It Adico AE310TX (98715A) .It Alfa Inc GFC2204 (ASIX AX88140A) .It Built in 10Mbps only Ethernet on Compaq Presario 7900 series desktops (21143, non-MII) .It Built in Sun DMFE 10/100 Mbps Ethernet on Sun Netra X1 and Sun Fire V100 (DM9102A, MII) .It Built in Ethernet on LinkSys EtherFast 10/100 Instant GigaDrive (DM9102, MII) .It CNet Pro110B (ASIX AX88140A) .It CNet Pro120A (98715A or 98713A) and CNet Pro120B (98715) .It Compex RL100-TX (98713 or 98713A) .It D-Link DFE-570TX (21143, MII, quad port) .It Digital DE500-BA 10/100 (21143, non-MII) .It ELECOM Laneed LD-CBL/TXA (ADMtek AN985) .It Hawking CB102 CardBus .It IBM EtherJet Cardbus Adapter .It Intel PRO/100 Mobile Cardbus (versions that use the X3201 chipset) .It Jaton XpressNet (Davicom DM9102) .It Kingston KNE100TX (21143, MII) .It Kingston KNE110TX (PNIC 82c169) .It LinkSys LNE100TX (PNIC 82c168, 82c169) .It LinkSys LNE100TX v2.0 (PNIC II 82c115) .It LinkSys LNE100TX v4.0/4.1 (ADMtek AN985 Centaur-P) .It Matrox FastNIC 10/100 (PNIC 82c168, 82c169) .It Melco LGY-PCI-TXL .It Microsoft MN-120 10/100 CardBus (ADMTek Centaur-C) .It Microsoft MN-130 10/100 PCI (ADMTek Centaur-P) .It NDC SOHOware SFA110A (98713A) .It NDC SOHOware SFA110A Rev B4 (98715AEC-C) .It NetGear FA310-TX Rev.\& D1, D2 or D3 (PNIC 82c169) .It Netgear FA511 .It PlaneX FNW-3602-T (ADMtek AN985) .It SMC EZ Card 10/100 1233A-TX (ADMtek AN985) .It SVEC PN102-TX (98713) .It Xircom Cardbus Realport .It Xircom Cardbus Ethernet 10/100 .It Xircom Cardbus Ethernet II 10/100 .El -.Sh NOTES -On sparc64 the -.Nm -driver respects the -.Va local-mac-address? -system configuration variable for the built in Sun DMFE 10/100 Mbps Ethernet -interfaces on Sun Netra X1 and Sun Fire V100. -This system configuration variable can be set in the Open Firmware boot -monitor using the -.Ic setenv -command or by -.Xr eeprom 8 . -If set to -.Dq Li false -(the default), the -.Nm -driver will use the system's default MAC address for both of the built in -devices. -If set to -.Dq Li true , -the unique MAC address of each interface is used rather than the system's -default MAC address. .Sh DIAGNOSTICS .Bl -diag .It "dc%d: couldn't map ports/memory" A fatal initialization error has occurred. .It "dc%d: couldn't map interrupt" A fatal initialization error has occurred. .It "dc%d: watchdog timeout" A packet was queued for transmission and a transmit command was issued, but the device failed to acknowledge the transmission before a timeout expired. This can happen if the device is unable to deliver interrupts for some reason, of if there is a problem with the network connection (cable or network equipment) that results in a loss of link. .It "dc%d: no memory for rx list" The driver failed to allocate an mbuf for the receiver ring. .It "dc%d: TX underrun -- increasing TX threshold" The device generated a transmit underrun error while attempting to DMA and transmit a packet. This happens if the host is not able to DMA the packet data into the NIC's FIFO fast enough. The driver will dynamically increase the transmit start threshold so that more data must be DMAed into the FIFO before the NIC will start transmitting it onto the wire. .It "dc%d: TX underrun -- using store and forward mode" The device continued to generate transmit underruns even after all possible transmit start threshold settings had been tried, so the driver programmed the chip for store and forward mode. In this mode, the NIC will not begin transmission until the entire packet has been transferred into its FIFO memory. .It "dc%d: chip is in D3 power state -- setting to D0" This message applies only to adapters which support power management. Some operating systems place the controller in low power mode when shutting down, and some PCI BIOSes fail to bring the chip out of this state before configuring it. The controller loses all of its PCI configuration in the D3 state, so if the BIOS does not set it back to full power mode in time, it will not be able to configure it correctly. The driver tries to detect this condition and bring the adapter back to the D0 (full power) state, but this may not be enough to return the driver to a fully operational condition. If you see this message at boot time and the driver fails to attach the device as a network interface, you will have to perform a second warm boot to have the device properly configured. .Pp Note that this condition only occurs when warm booting from another operating system. If you power down your system prior to booting .Fx , the card should be configured correctly. .El .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , .Xr miibus 4 , .Xr netintro 4 , .Xr ng_ether 4 , .Xr polling 4 , .Xr vlan 4 , .Xr eeprom 8 , .Xr ifconfig 8 .Rs .%T ADMtek AL981, AL983 and AL985 data sheets .%U http://www.admtek.com.tw .Re .Rs .%T ASIX Electronics AX88140A and AX88141 data sheets .%U http://www.asix.com.tw .Re .Rs .%T Davicom DM9102 data sheet .%U http://www.davicom.com.tw/userfile/24247/DM9102H-DS-F01-021508.pdf .Re .Rs .%T Intel 21143 Hardware Reference Manual .%U http://developer.intel.com .Re .Rs .%T Macronix 98713/A, 98715/A and 98725 data sheets .%U http://www.macronix.com .Re .Rs .%T Macronix 98713/A and 98715/A app notes .%U http://www.macronix.com .Re .Sh HISTORY The .Nm device driver first appeared in .Fx 4.0 . .Sh AUTHORS The .Nm driver was written by .An Bill Paul Aq Mt wpaul@ee.columbia.edu . .Sh BUGS The Macronix application notes claim that in order to put the chips in normal operation, the driver must write a certain magic number into the CSR16 register. The numbers are documented in the app notes, but the exact meaning of the bits is not. .Pp The 98713A seems to have a problem with 10Mbps full duplex mode. The transmitter works but the receiver tends to produce many unexplained errors leading to very poor overall performance. The 98715A does not exhibit this problem. All other modes on the 98713A seem to work correctly. .Pp The original 82c168 PNIC chip has built in NWAY support which is used on certain early LinkSys LNE100TX and Matrox FastNIC cards, however it is horribly broken and difficult to use reliably. Consequently, autonegotiation is not currently supported for this chipset: the driver defaults the NIC to 10baseT half duplex, and it is up to the operator to manually select a different mode if necessary. (Later cards use an external MII transceiver to implement NWAY autonegotiation and work correctly.) .Pp The .Nm driver programs 82c168 and 82c169 PNIC chips to use the store and forward setting for the transmit start threshold by default. This is to work around problems with some NIC/PCI bus combinations where the PNIC can transmit corrupt frames when operating at 100Mbps, probably due to PCI DMA burst transfer errors. .Pp The 82c168 and 82c169 PNIC chips also have a receiver bug that sometimes manifests during periods of heavy receive and transmit activity, where the chip will improperly DMA received frames to the host. The chips appear to upload several kilobytes of garbage data along with the received frame data, dirtying several RX buffers instead of just the expected one. The .Nm driver detects this condition and will salvage the frame; however, it incurs a serious performance penalty in the process. .Pp The PNIC chips also sometimes generate a transmit underrun error when the driver attempts to download the receiver filter setup frame, which can result in the receive filter being incorrectly programmed. The .Nm driver will watch for this condition and requeue the setup frame until it is transferred successfully. .Pp The ADMtek AL981 chip (and possibly the AN985 as well) has been observed to sometimes wedge on transmit: this appears to happen when the driver queues a sequence of frames which cause it to wrap from the end of the transmit descriptor ring back to the beginning. The .Nm driver attempts to avoid this condition by not queuing any frames past the end of the transmit ring during a single invocation of the .Fn dc_start routine. This workaround has a negligible impact on transmit performance. Index: head/share/man/man4/ddb.4 =================================================================== --- head/share/man/man4/ddb.4 (revision 357793) +++ head/share/man/man4/ddb.4 (revision 357794) @@ -1,1626 +1,1620 @@ .\" .\" 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.powerfail -The kernel debugger was entered as a result of a powerfail NMI on the sparc64 -platform. .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.trapsig -The kernel debugger was entered as a result of a trapsig event on the sparc64 -platform. .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/gem.4 =================================================================== --- head/share/man/man4/gem.4 (revision 357793) +++ head/share/man/man4/gem.4 (revision 357794) @@ -1,144 +1,121 @@ .\" $NetBSD: gem.4,v 1.2 2003/02/14 15:20:18 grant Exp $ .\" .\" Copyright (c) 2002 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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 25, 2009 .Dt GEM 4 .Os .Sh NAME .Nm gem .Nd ERI/GEM/GMAC Ethernet 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 miibus" .Cd "device gem" .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_gem_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for the GMAC Ethernet hardware found mostly in the last Apple PowerBooks G3s and most G4-based Apple hardware, as well as Sun UltraSPARC machines. .Pp All controllers supported by the .Nm driver have TCP checksum offload capability for both receive and transmit, support for the reception and transmission of extended frames for .Xr vlan 4 and a 512-bit multicast hash filter. .Sh HARDWARE Chips supported by the .Nm driver include: .Pp .Bl -bullet -compact .It Apple GMAC .It Sun ERI 10/100 Mbps Ethernet .It Sun GEM Gigabit Ethernet .El .Pp The following add-on cards are known to work with the .Nm driver at this time: .Pp .Bl -bullet -compact .It Sun Gigabit Ethernet PCI 2.0/3.0 (GBE/P) (part no.\& 501-4373) .It Sun Gigabit Ethernet SBus 2.0/3.0 (GBE/S) (part no.\& 501-4375) .El -.Sh NOTES -On sparc64 the -.Nm -driver respects the -.Va local-mac-address? -system configuration variable which can be set in the Open Firmware boot -monitor using the -.Ic setenv -command or by -.Xr eeprom 8 . -If set to -.Dq Li false -(the default), the -.Nm -driver will use the system's default MAC address for all of its devices. -If set to -.Dq Li true , -the unique MAC address of each interface is used if present rather than -the system's default MAC address. -.Pp -Supported interfaces having their own MAC address include the on-board -Sun ERI 10/100 Mbps on boards equipped with more than one Ethernet interface -and the Sun Gigabit Ethernet 2.0/3.0 GBE add-on cards. .Sh SEE ALSO .Xr altq 4 , .Xr miibus 4 , .Xr netintro 4 , .Xr vlan 4 , .Xr eeprom 8 , .Xr ifconfig 8 .Sh HISTORY The .Nm device driver appeared in .Nx 1.6 . The first .Fx version to include it was .Fx 5.0 . .Sh AUTHORS .An -nosplit The .Nm driver was written for .Nx by .An Eduardo Horvath Aq Mt eeh@NetBSD.org . It was ported to .Fx by .An Thomas Moestl Aq Mt tmm@FreeBSD.org and later on improved by .An Marius Strobl Aq Mt marius@FreeBSD.org . The man page was written by .An Thomas Klausner Aq Mt wiz@NetBSD.org . Index: head/share/man/man4/hme.4 =================================================================== --- head/share/man/man4/hme.4 (revision 357793) +++ head/share/man/man4/hme.4 (revision 357794) @@ -1,158 +1,135 @@ .\" $NetBSD: hme.4,v 1.4 2003/02/14 15:20:18 grant Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation .\" by Klaus Klein. .\" .\" 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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 February 12, 2020 .Dt HME 4 .Os .Sh NAME .Nm hme .Nd "Sun Microelectronics STP2002-STQ Ethernet interfaces 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 miibus" .Cd "device hme" .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_hme_load="YES" .Ed .Sh DEPRECATION NOTICE The .Nm driver is not present in .Fx 13.0 and later. See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more information. .Sh DESCRIPTION The .Nm driver supports Sun Microelectronics STP2002-STQ .Dq Happy Meal Ethernet Fast Ethernet interfaces. .Pp All controllers supported by the .Nm driver have TCP checksum offload capability for both receive and transmit, support for the reception and transmission of extended frames for .Xr vlan 4 and a 128-bit multicast hash filter. .Sh HARDWARE The .Nm driver supports the on-board Ethernet interfaces of many Sun .Tn UltraSPARC workstation and server models. .Pp Cards supported by the .Nm driver include: .Pp .Bl -bullet -compact .It Sun PCI SunSwift Adapter .Pq Dq SUNW,hme .It Sun SBus SunSwift Adapter .Dq ( hme and .Dq SUNW,hme ) .It Sun PCI Sun100BaseT Adapter 2.0 .Pq Dq SUNW,hme .It Sun SBus Sun100BaseT 2.0 .Pq Dq SUNW,hme .It Sun PCI Quad FastEthernet Controller .Pq Dq SUNW,qfe .It Sun SBus Quad FastEthernet Controller .Pq Dq SUNW,qfe .El -.Sh NOTES -On sparc64 the -.Nm -driver respects the -.Va local-mac-address? -system configuration variable which can be set in the Open Firmware boot -monitor using the -.Ic setenv -command or by -.Xr eeprom 8 . -If set to -.Dq Li false -(the default), the -.Nm -driver will use the system's default MAC address for all of its devices. -If set to -.Dq Li true , -the unique MAC address of each interface is used if present rather than -the system's default MAC address. -.Pp -Supported interfaces having their own MAC address include on-board versions -on boards equipped with more than one Ethernet interface and all add-on cards -except the single-port SBus versions. .Sh SEE ALSO .Xr altq 4 , .Xr intro 4 , .Xr miibus 4 , .Xr netintro 4 , .Xr vlan 4 , .Xr eeprom 8 , .Xr ifconfig 8 .Rs .%T "STP2002QFP Fast Ethernet, Parallel Port, SCSI (FEPS) User's Guide" .%D April 1996 .%A Sun Microelectronics .%U http://mediacast.sun.com/users/Barton808/media/STP2002QFP-FEPs_UG.pdf .Re .Sh HISTORY The .Nm driver first appeared in .Nx 1.5 . The first .Fx version to include it was .Fx 5.0 . .Sh AUTHORS The .Nm driver was written by .An Paul Kranenburg Aq Mt pk@NetBSD.org . Index: head/share/man/man4/le.4 =================================================================== --- head/share/man/man4/le.4 (revision 357793) +++ head/share/man/man4/le.4 (revision 357794) @@ -1,434 +1,381 @@ .\" $NetBSD: le.4,v 1.22 2004/10/04 19:12:52 rumble Exp $ .\" .\"- .\" Copyright (c) 1992, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" This software was developed by the Computer Systems Engineering group .\" at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and .\" contributed to Berkeley. .\" .\" 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. .\" .\" from: Header: le.4,v 1.2 92/10/13 05:31:33 leres Exp .\" from: @(#)le.4 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" .Dd February 15, 2017 .Dt LE 4 .Os .Sh NAME .Nm le .Nd "AMD Am7900 LANCE and Am79C9xx ILACC/PCnet Ethernet interface 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 le" .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_le_load="YES" .Ed .Pp For ISA non-PnP adapters, the port address as well as the IRQ and the DRQ numbers have to be specified in .Pa /boot/device.hints : .Cd hint.le.0.at="isa" .Cd hint.le.0.port="0x280" .Cd hint.le.0.irq="10" .Cd hint.le.0.drq="0" .Sh DESCRIPTION The .Nm driver provides support for Ethernet adapters based on the .Tn AMD Am7990 and .Tn Am79C90 .Pq CMOS, pin-compatible Local Area Network Controller for Ethernet .Pq Tn LANCE chips. .Pp The .Nm driver also supports Ethernet adapters based on the .Tn AMD Am79C900 Integrated Local Area Communications Controller .Pq Tn ILACC as well as the .Tn Am79C9xx PCnet family of chips, which are single-chip implementations of a .Tn LANCE chip and a DMA engine. This includes a superset of the .Tn PCI bus Ethernet chips supported by the .Xr pcn 4 driver. The .Nm driver treats all of these .Tn PCI bus Ethernet chips as an .Tn AMD Am79C970 PCnet-PCI and does not support the additional features like the MII bus and burst mode of .Tn AMD Am79C971 PCnet-FAST and greater chips. Thus the .Xr pcn 4 driver should be preferred for the latter. .Pp Generally, the .Nm driver aims at supporting as many different chips on as many different platforms as possible, partially at the cost of the best performance with some of these. .Pp The .Nm driver supports reception and transmission of extended frames for .Xr vlan 4 . Selective reception of multicast Ethernet frames is provided by a 64-bit mask; multicast destination addresses are hashed to a bit entry using the Ethernet CRC function. .Sh HARDWARE .Ss ISA The .Nm driver supports .Tn ISA bus Ethernet adapters which are based on the following chips: .Pp .Bl -bullet -compact .It .Tn AMD Am7990 and Am79C90 LANCE .It .Tn AMD Am79C960 PCnet-ISA .It .Tn AMD Am79C961 PCnet-ISA+ .It .Tn AMD Am79C961A PCnet-ISA II .El .Pp This includes support for the following Ethernet adapters: .Pp ISA non-PnP: .Pp .Bl -bullet -compact .It .Tn BICC Isolan .\" .It .\" .Tn Digital DEPCA .It .Tn Novell NE2100 .El .Pp ISA PnP: .Pp .Bl -bullet -compact .It .Tn AMD AM1500T/AM2100 .It .Tn AMD PCnet-32 .It .Tn AMD PCnet-ISA .It .Tn Allied Telesyn AT-1500 .It .Tn Boca LANCard Combo .It .Tn Cabletron E2100 Series DNI .It .Tn Cabletron E2200 Single Chip .It .Tn Melco Inc. LGY-IV .It .Tn Novell NE2100 .It .Tn Racal InterLan EtherBlaster .El .Pp The .Nm driver does not support the selection of media types and options via .Xr ifconfig 8 with .Tn ISA bus Ethernet adapters. .Ss PCI The .Tn PCI bus Ethernet chips supported by the .Nm driver are: .Pp .Bl -bullet -compact .It .Tn AMD Am53C974/Am79C970/Am79C974 PCnet-PCI .It .Tn AMD Am79C970A PCnet-PCI II .It .Tn AMD Am79C971 PCnet-FAST .It .Tn AMD Am79C972 PCnet-FAST+ .It .Tn AMD Am79C973/Am79C975 PCnet-FAST III .It .Tn AMD Am79C976 PCnet-PRO .It .Tn AMD Am79C978 PCnet-Home .El .Pp This includes support for the following Ethernet adapters: .Pp .Bl -bullet -compact .It .Tn AcerLAN NIC P20 .It .Tn Allied Telesyn AT-2450 and AT-2700 series .It .Tn VMware emulated AMD Am79C970A PCnet-PCI II interface .El .Pp The .Nm driver supports the selection of the following media types via .Xr ifconfig 8 with .Tn PCI bus Ethernet adapters: .Bl -tag -width ".Cm 10base5/AUI" .It Cm autoselect Enable autoselection of the media type. .It Cm 10baseT/UTP Select UTP media. .It Cm 10base5/AUI Select AUI/BNC media. .El .Pp The following media option is supported with these media types: .Bl -tag -width ".Cm full-duplex" .It Cm full-duplex Select full duplex operation. .El .Pp Note that unlike the .Xr pcn 4 driver, the .Nm driver does not support selecting 100Mbps (Fast Ethernet) media types. -.Ss sparc64 -The -.Nm -driver supports the on-board -.Tn LANCE -interfaces found in -.Tn Sun Ultra 1 -machines. -The -.Nm -driver allows the selection of the following media types via -.Xr ifconfig 8 -with these on-board interfaces: -.Bl -tag -width ".Cm 10base5/AUI" -.It Cm autoselect -Enable autoselection of the media type. -.It Cm 10baseT/UTP -Select UTP media. -.It Cm 10base5/AUI -Select AUI media. -.El -.Pp -When using autoselection, a default media type is selected for use by -examining all ports for carrier. -The first media type with which a carrier is detected will be selected. -Additionally, if carrier is dropped on a port, the driver will switch -between the possible ports until one with carrier is found. -.Pp -The -.Nm -driver also supports the following -.Tn Sun SBus -Ethernet add-on adapters: -.Pp -.Bl -bullet -compact -.It -.Tn SCSI HBA and Buffered Ethernet -.Pq SBE/S, P/N 501-1869 -.It -.Tn Fast SCSI and Buffered Ethernet -.Pq FSBE/S, P/N 501-2015 and 501-2981 -.El -.Pp -The -.Nm -driver does not support the selection of media types and options via -.Xr ifconfig 8 -with -.Tn SBus -Ethernet add-on adapters. -.Pp -For further information on configuring media types and options, see -.Xr ifconfig 8 . .Sh DIAGNOSTICS .Bl -diag .It "le%d: overflow" More packets came in from the Ethernet than there was space in the .Tn LANCE receive buffers. Packets were missed. .It "le%d: receive buffer error" The .Tn LANCE ran out of buffer space, packet dropped. .It "le%d: lost carrier" The Ethernet carrier disappeared during an attempt to transmit. The .Tn LANCE will finish transmitting the current packet, but will not automatically retry transmission if there is a collision. .It "le%d: excessive collisions, tdr %d" The Ethernet was extremely busy or jammed, outbound packets were dropped after 16 attempts to retransmit. .Pp TDR is the abbreviation of .Qq Time Domain Reflectometry . The optionally reported TDR value is an internal counter of the interval between the start of a transmission and the occurrence of a collision. This value can be used to determine the distance from the Ethernet tap to the point on the Ethernet cable that is shorted or open (unterminated). .It "le%d: dropping chained buffer" A packet did not fit into a single receive buffer and was dropped. Since the .Nm driver allocates buffers large enough to receive maximum sized Ethernet packets, this means some other station on the LAN transmitted a packet larger than allowed by the Ethernet standard. .It "le%d: transmit buffer error" The .Tn LANCE ran out of buffer space before finishing the transmission of a packet. If this error occurs, the driver software has a bug. .It "le%d: underflow" The .Tn LANCE ran out of buffer space before finishing the transmission of a packet. If this error occurs, the driver software has a bug. .It "le%d: controller failed to initialize" Driver failed to start the .Tn LANCE . This is potentially a hardware failure. .It "le%d: memory error" RAM failed to respond within the timeout when the .Tn LANCE wanted to read or write it. This is potentially a hardware failure. .It "le%d: receiver disabled" The receiver of the .Tn LANCE was turned off due to an error. .It "le%d: transmitter disabled" The transmitter of the .Tn LANCE was turned off due to an error. .El .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , .Xr intro 4 , .Xr netintro 4 , .Xr pcn 4 , .Xr vlan 4 , .Xr ifconfig 8 .Sh HISTORY The .Nm driver was ported from .Nx and first appeared in .Fx 6.1 . The .Nx version in turn was derived from the .Nm driver which first appeared in .Bx 4.4 . .Sh AUTHORS The .Nm driver was ported by .An Marius Strobl Aq Mt marius@FreeBSD.org . .\" .Sh BUGS .\" The Am7990 Revision C chips have a bug which causes garbage to be inserted .\" in front of the received packet occasionally. .\" The work-around is to ignore packets with an invalid destination address .\" (garbage will usually not match), by double-checking the destination .\" address of every packet in the driver. .\" This work-around can be enabled with the .\" .Dv LANCE_REVC_BUG .\" kernel option. .\" .Pp .\" When .\" .Dv LANCE_REVC_BUG .\" is enabled, the .\" .Nm .\" driver executes one or two calls to an inline Ethernet address comparison .\" function for every received packet. .\" On the .\" .Tn MC68000 .\" it is exactly eight instructions of 16 bits each. .\" There is one comparison for each unicast packet, and two comparisons for .\" each broadcast packet. .\" .Pp .\" In summary, the cost of the LANCE_REVC_BUG option is: .\" .Bl -enum -compact .\" .It .\" loss of multicast support, and .\" .It .\" eight extra .\" .Tn CPU .\" instructions per received packet, sometimes sixteen, depending on both the .\" processor, and the type of packet. .\" .El .\" .Pp .\" All sun3 systems are presumed to have this bad revision of the Am7990, .\" until proven otherwise. .\" Alas, the only way to prove what revision of the chip is in a particular .\" system is inspection of the date code on the chip package, .\" to compare against a list of what chip revisions were fabricated between .\" which dates. .\" .Pp .\" Alas, the Am7990 chip is so old that .\" .Tn AMD .\" has .\" .Qq de-archived .\" the production information about it; pending a search elsewhere, we do not .\" know how to identify the revision C chip from the date codes. Index: head/share/man/man4/man4.sparc64/ebus.4 =================================================================== --- head/share/man/man4/man4.sparc64/ebus.4 (revision 357793) +++ head/share/man/man4/man4.sparc64/ebus.4 (nonexistent) @@ -1,122 +0,0 @@ -.\"- -.\" Copyright (c) 1999 Matthew R. Green -.\" 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. -.\" -.\" from: OpenBSD: ebus.4,v 1.6 2004/09/23 18:28:51 jason Exp -.\" from: NetBSD: ebus.4,v 1.3 2002/03/13 21:42:20 wiz Exp -.\" $FreeBSD$ -.\" -.Dd September 1, 2006 -.Dt EBUS 4 sparc64 -.Os -.Sh NAME -.Nm ebus -.Nd "EBus controller and bus" -.Sh SYNOPSIS -.Cd "device ebus" -.Sh DESCRIPTION -The -.Nm -driver provides support for the EBus controller and bus found in most -.Tn PCI -based -.Tn UltraSPARC -systems. -The -.Tn EBus -bus is designed to provide the ability to put -.Tn ISA -and traditional -.Tn Intel -style peripherals in a -.Tn SPARC -based system with a minimal amount of glue logic. -In -.Tn UltraSPARC -systems it is implemented with either a PCIO or a PCIO-2 chip from -.Tn Sun Microelectronics . -The PCIO chip also implements a -.Xr hme 4 -compatible -.Tn PCI -network device. -The PCIO-2 chip also implements a -.Xr fwohci 4 -compatible -.Tn IEEE -.Tn 1394 -.Tn OHCI -interface, a -.Xr gem 4 -compatible -.Tn PCI -network device and an -.Xr ohci 4 -compatible -.Tn OHCI -.Tn USB -controller. -The -.Tn EBus -has four DMA channels, -similar to the DMA seen in the -.Xr esp 4 -.Tn SCSI -DMA. -.Sh SEE ALSO -.Xr atkbdc 4 , -.Xr auxio 4 , -.Xr eeprom 4 , -.Xr rtc 4 , -.Xr scc 4 , -.Xr snd_audiocs 4 , -.Xr uart 4 -.Rs -.%Q "Sun Microelectronics" -.%T "Peripheral Component Interconnect Input Output Controller" -.%V "Part No.: 802-7837-01" -.%D "March 1997" -.%U "http://www.sun.com/oem/products/manuals/802-7837.pdf" -.Re -.Sh HISTORY -The -.Nm -driver first appeared in -.Nx 1.5 . -The first -.Fx -version to include it was -.Fx 5.0 . -.Sh AUTHORS -.An -nosplit -The -.Nm -driver was written by -.An Matthew R. Green -and ported to -.Fx -by -.An Thomas Moestl Aq Mt tmm@FreeBSD.org . Property changes on: head/share/man/man4/man4.sparc64/ebus.4 ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/share/man/man4/man4.sparc64/clkbrd.4 =================================================================== --- head/share/man/man4/man4.sparc64/clkbrd.4 (revision 357793) +++ head/share/man/man4/man4.sparc64/clkbrd.4 (nonexistent) @@ -1,88 +0,0 @@ -.\"- -.\" Copyright (c) 2004 Jason L. Wright (jason@thought.net) -.\" 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 ``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. -.\" -.\" from: OpenBSD: clkbrd.4,v 1.2 2005/02/21 11:29:36 jmc Exp -.\" $FreeBSD$ -.\" -.Dd June 18, 2005 -.Dt CLKBRD 4 sparc64 -.Os -.Sh NAME -.Nm clkbrd -.Nd "clock board" -.Sh SYNOPSIS -.Cd "device clkbrd" -.Sh DESCRIPTION -The -.Nm -driver provides support for the clock board found in -.Tn Sun Enterprise xx00 -systems. -The clock board has three status LEDs labeled -.Dq Li Power , -.Dq Li Failure -and -.Dq Li Cycling . -These LEDs are also mirrored on the main front panel. -The -.Dq Li Cycling -LED can be made to blink by writing -.Tn ASCII -strings to the -.Pa /dev/led/clockboard -device. -.Pp -On attach the -.Nm -driver also prints out the number of board slots the chassis provides. -.Sh FILES -.Bl -tag -width ".Pa /dev/led/clockboard" -.It Pa /dev/led/clockboard -clock board LED device node -.El -.Sh SEE ALSO -.Xr fhc 4 , -.Xr led 4 -.Sh HISTORY -The -.Nm -driver first appeared in -.Ox 3.7 . -The first -.Fx -version to include it was -.Fx 6.0 . -.Sh AUTHORS -.An -nosplit -The -.Nm -driver was written by -.An Jason L. Wright -and ported to -.Fx -by -.An Marius Strobl Aq Mt marius@FreeBSD.org . -.Sh CAVEATS -Hardware management functionality is not implemented. Property changes on: head/share/man/man4/man4.sparc64/clkbrd.4 ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/share/man/man4/man4.sparc64/openfirm.4 =================================================================== --- head/share/man/man4/man4.sparc64/openfirm.4 (revision 357793) +++ head/share/man/man4/man4.sparc64/openfirm.4 (nonexistent) @@ -1,300 +0,0 @@ -.\"- -.\" Copyright (c) 1992, 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" This software was developed by the Computer Systems Engineering group -.\" at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and -.\" contributed to Berkeley. -.\" -.\" 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. -.\" -.\" from: @(#)openprom.4 8.1 (Berkeley) 6/5/93 -.\" from: OpenBSD: openprom.4,v 1.9 2004/03/22 22:07:21 miod Exp -.\" -.\"- -.\" Copyright (c) 2005 Marius Strobl -.\" 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 ``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 September 1, 2006 -.Dt OPENFIRM 4 sparc64 -.Os -.Sh NAME -.Nm openfirm -.Nd "Open Firmware interface" -.Sh SYNOPSIS -.In sys/types.h -.In sys/ioctl.h -.In dev/ofw/openfirmio.h -.Sh DESCRIPTION -The -.Pa /dev/openfirm -device is an interface to the -.Tn Open Firmware -device tree. -This interface is similar to the -.Tn SunOS / -.Tn Solaris -compatible -.Xr openprom 4 -interface and highly stylized. -It uses -.Xr ioctl 2 -calls for all operations. -These calls refer to the nodes in the -.Tn Open Firmware -device tree. -The nodes are represented by package handles, -which are simply integer values describing data areas. -Occasionally a package handle of 0 may be used or returned instead, -as described below. -.Pp -The calls that only take and/or return the package handle of a node -use a pointer to a -.Vt phandle_t -for this purpose. -The others use a pointer to a -.Vt "struct ofiocdesc" -descriptor, -which has the following definition: -.Bd -literal -struct ofiocdesc { - phandle_t of_nodeid; - int of_namelen; - const char *of_name; - int of_buflen; - char *of_buf; -}; -.Ed -.Pp -The -.Va of_nodeid -member is the package handle of the node that is passed in or returned. -Strings are passed in via the -.Va of_name -member of -.Va of_namelen -length. -The maximum accepted length of -.Va of_name -is -.Dv OFIOCMAXNAME . -The -.Va of_buf -member is used to return strings except for the -.Dv OFIOCSET -call where it is also used to pass in a string. -In the latter case the maximum accepted length of -.Va of_buf -is -.Dv OFIOCMAXVALUE . -Generally, -.Va of_buf -works in a value-result fashion. -At entry to the -.Xr ioctl 2 -call, -.Va of_buflen -is expected to reflect the buffer size. -On return, -.Va of_buflen -is updated to reflect the buffer contents. -.Pp -The following -.Xr ioctl 2 -calls are supported: -.Bl -tag -width ".Dv OFIOCGETOPTNODE" -.It Dv OFIOCGETOPTNODE -Uses a -.Vt phandle_t . -Takes nothing and returns the package handle of the -.Pa /options -node. -.It Dv OFIOCGETNEXT -Uses a -.Vt phandle_t . -Takes the package handle of a node and returns the package handle of the next -node in the -.Tn Open Firmware -device tree. -The node following the last node has a package handle of 0. -The node following the node with the package handle of 0 is the first node. -.It Dv OFIOCGETCHILD -Uses a -.Vt phandle_t . -Takes the package handle of a node and returns the package handle of the first -child of that node. -This child may have siblings. -These can be determined by using -.Dv OFIOCGETNEXT . -If the node does not have a child, -a package handle of 0 is returned. -.It Dv OFIOCGET -Uses a -.Vt "struct ofiocdesc" . -Takes the package handle of a node and the name of a property. -Returns the property value and its length. -If no such property is associated with that node, -the length of the value is set to \-1. -If the named property exists but has no value, -the length of the value is set to 0. -.It Dv OFIOCGETPROPLEN -Uses a -.Vt "struct ofiocdesc" . -Takes the package handle of a node and the name of a property. -Returns the length of the property value. -This call is the same as -.Dv OFIOCGET -except that only the length of the property value is returned. -It can be used to determine whether a node has a particular property or whether -a property has a value without the need to provide memory for storing the value. -.It Dv OFIOCSET -Uses a -.Vt "struct ofiocdesc" . -Takes the package handle of a node, -the name of a property and a property value. -Returns the property value and the length that actually have been written. -The -.Tn Open Firmware -may choose to truncate the value if it is too long or write a valid value -instead if the given value is invalid for the particular property. -Therefore the returned value should be checked. -The -.Tn Open Firmware -may also completely refuse to write the given value to the property. -In this case -.Er EINVAL -is returned. -.It Dv OFIOCNEXTPROP -Uses a -.Vt "struct ofiocdesc" . -Takes the package handle of a node and the name of a property. -Returns the name and the length of the next property of the node. -If the property referenced by the given name is the last property of the node, -.Er ENOENT -is returned. -.It Dv OFIOCFINDDEVICE -Uses a -.Vt "struct ofiocdesc" . -Takes the name or alias name of a device node. -Returns package handle of the node. -If no matching node is found, -.Er ENOENT -is returned. -.El -.Sh FILES -.Bl -tag -width ".Pa /dev/openfirm" -.It Pa /dev/openfirm -Open Firmware interface node -.El -.Sh DIAGNOSTICS -The following may result in rejection of an operation: -.Bl -tag -width Er -.It Bq Er EBADF -The requested operation requires permissions not specified at the call to -.Fn open . -.It Bq Er EINVAL -The given package handle is not 0 and does not correspond to any valid node, -or the given package handle is 0 where 0 is not allowed. -.It Bq Er ENAMETOOLONG -The given name or value exceeds the maximum allowed length of -.Dv OFIOCMAXNAME -and -.Dv OFIOCMAXVALUE -bytes respectively. -.It Bq Er ENOMEM -The kernel could not allocate memory to copy in data from user-space or to -retrieve data from the -.Tn Open Firmware . -.El -.Sh SEE ALSO -.Xr ioctl 2 , -.Xr openprom 4 , -.Xr eeprom 8 , -.Xr ofwdump 8 -.Rs -.%Q "IEEE Standards Organization" -.%B "IEEE Std 1275-1994:" -.%B "IEEE Standard for Boot Firmware (Initialization Configuration) Firmware:" -.%B Core Requirements and Practices" -.%O ISBN 1-55937-426-8 -.Re -.Sh HISTORY -The -.Nm -interface first appeared in -.Nx 1.6 . -The first -.Fx -version to include it was -.Fx 5.0 . -.Sh AUTHORS -The -.Nm -interface was ported to -.Fx -by -.An Thomas Moestl Aq Mt tmm@FreeBSD.org . -.Sh CAVEATS -Due to limitations within -.Tn Open Firmware -itself, -these functions run at elevated priority and may adversely affect system -performance. -.Pp -For at least the -.Pa /options -node the property value passed in to the -.Dv OFIOCSET -call has to be null-terminated and the value length passed in has to include -the terminating -.Ql \e0 . -However, as with the -.Dv OFIOCGET -call, -the returned value length does not include the terminating -.Ql \e0 . Property changes on: head/share/man/man4/man4.sparc64/openfirm.4 ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/share/man/man4/man4.sparc64/eeprom.4 =================================================================== --- head/share/man/man4/man4.sparc64/eeprom.4 (revision 357793) +++ head/share/man/man4/man4.sparc64/eeprom.4 (nonexistent) @@ -1,130 +0,0 @@ -.\"- -.\" Copyright (c) 2004 Jason L. Wright (jason@thought.net) -.\" Copyright (c) 2005 Marius Strobl -.\" 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 ``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. -.\" -.\" from: OpenBSD: clock.4,v 1.3 2004/09/24 07:04:15 miod Exp -.\" $FreeBSD$ -.\" -.Dd February 15, 2006 -.Dt EEPROM 4 sparc64 -.Os -.Sh NAME -.Nm eeprom -.Nd "non-volatile RAM / real time clock" -.Sh SYNOPSIS -.Cd "device genclock" -.Cd "device mk48txx" -.Cd "device eeprom" -.Sh DESCRIPTION -The -.Nm -driver is a front-end for the machine-independent -.Tn Mostek -MK48Txx driver. -The -.Tn Mostek -MK48Txx driver provides access to the real time clock and the watchdog part -of the supported chips to -.Fx -by interfacing them with the generic clock code and -.Xr watchdog 4 -respectively. -.Pp -.Tn Mostek -MK48Txx chips providing real time clock functionality are found on the -.Tn EBus , -.Tn FireHose -and -.Tn SBus -busses of -.Tn UltraSPARC -systems. -On systems where the hostid is stored in the NVRAM part of the -.Tn Mostek -MK48Txx chip the -.Nm -driver prints out the hostid on attach. -.Pp -On -.Tn Sun Enterprise -250 and 450 systems additionally the watchdog functionality of the -.Tn Mostek -MK48Txx chips is available. -The -.Nm -driver automatically registers the watchdog part with -.Xr watchdog 4 -on these systems. -Thus it can be used with -.Xr watchdog 8 -and -.Xr watchdogd 8 . -The timeout interval supported by the -.Tn Mostek -MK48Txx watchdog is 1/16 second to 128 seconds. -In the -.Tn Sun Enterprise -machines a system reset is triggered when the -.Tn Mostek -MK48Txx watchdog times out regardless of what the -.Tn Open Firmware -environment variable -.Va watchdog-reboot? -is set to. -.Sh DIAGNOSTICS -The following driver specific error message may be reported: -.Bl -diag -.It "mk48txx_attach: battery low" -The device signals that its battery is low and should be replaced. -The -.Nm -driver refused to attach the device in this case as the time in the real time -clock is probably invalid. -This gives the generic clock code the chance to use another device as the -system real time clock that otherwise would not have been chosen. -.El -.Sh SEE ALSO -.Xr ebus 4 , -.Xr fhc 4 , -.Xr rtc 4 , -.Xr sbus 4 , -.Xr watchdog 4 , -.Xr watchdog 8 , -.Xr watchdogd 8 -.Sh HISTORY -The -.Nm -driver first appeared in -.Fx 5.0 . -.Sh AUTHORS -.An -nosplit -The -.Nm -driver was written by -.An Thomas Moestl Aq Mt tmm@FreeBSD.org -based on the -.Nx -sparc64 clock code written by -.An Paul Kranenburg . Property changes on: head/share/man/man4/man4.sparc64/eeprom.4 ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/share/man/man4/man4.sparc64/openprom.4 =================================================================== --- head/share/man/man4/man4.sparc64/openprom.4 (revision 357793) +++ head/share/man/man4/man4.sparc64/openprom.4 (nonexistent) @@ -1,240 +0,0 @@ -.\"- -.\" Copyright (c) 1992, 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" This software was developed by the Computer Systems Engineering group -.\" at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and -.\" contributed to Berkeley. -.\" -.\" 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. -.\" -.\" from: @(#)openprom.4 8.1 (Berkeley) 6/5/93 -.\" from: OpenBSD: openprom.4,v 1.9 2004/03/22 22:07:21 miod Exp -.\" -.\"- -.\" Copyright (c) 2005 Marius Strobl -.\" 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 ``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 18, 2005 -.Dt OPENPROM 4 sparc64 -.Os -.Sh NAME -.Nm openprom -.Nd "OPENPROM interface" -.Sh SYNOPSIS -.In sys/types.h -.In sys/ioctl.h -.In dev/ofw/openpromio.h -.Sh DESCRIPTION -The -.Pa /dev/openfirm -device is a -.Tn SunOS / -.Tn Solaris -compatible interface to the -.Tn Open Firmware -device tree. -This interface is similar to the -.Xr openprom 4 -interface. -It uses -.Xr ioctl 2 -calls for all operations. -These calls refer to the nodes in the -.Tn Open Firmware -device tree. -However, -.Fx -only implements a subset of the -.Xr ioctl 2 -calls -.Tn SunOS / -.Tn Solaris -does. -The nodes are represented by integer values, -which are simply describing data areas. -Occasionally the number 0 may be used or returned instead, -as described below. -.Pp -All calls use a pointer to a -.Vt "struct openpromio" -descriptor, -which has the following definition: -.Bd -literal -struct openpromio { - uint32_t oprom_size; - char oprom_array[]; -}; -.Ed -.Pp -The -.Va oprom_size -member refers to the size of -.Va oprom_array . -The -.Va oprom_array -member actually works like a union. -Depending on the -.Xr ioctl 2 -call and whether the -.Vt "struct openpromio" -is used to pass in or return data, -.Va oprom_array -either contains an integer referring to a node or a string referring to a -property name or property value. -The maximum size of -.Va oprom_array -is -.Dv OPROMMAXPARAM . -.Pp -The following -.Xr ioctl 2 -calls are currently implemented: -.Bl -tag -width ".Dv OPROMGETPROP" -.It Dv OPROMNEXT -Takes the number of a node and returns the number of the next node in the -.Tn Open Firmware -device tree. -The node following the last node is number 0. -The node following number 0 is the first node. -.It Dv OPROMCHILD -Takes the number of a node and returns the number of the first child of that -node. -This child may have siblings. -These can be determined by using -.Dv OPROMNEXT . -If the node does not have a child, -0 is returned. -.It Dv OPROMGETPROP -Takes the name of a property. -Returns the property value. -The -.Dv OPROMGETPROP -call refers to the node previously returned by either the -.Dv OPROMNEXT -or the -.Dv OPROMCHILD -call, -depending on which one was invoked last. -If the property referenced by the given name is not associated with that node, -.Er EINVAL -is returned. -If the named property exists but has no value, -an empty string is returned. -.It Dv OPROMNXTPROP -Takes the name of a property. -Returns the name of the next property of the node. -As with the -.Dv OPROMGETPROP -call, -the -.Dv OPROMNXTPROP -call refers to the node previously returned by either the -.Dv OPROMNEXT -or the -.Dv OPROMCHILD -call. -If the property referenced by the given name is the last property of the node, -an empty string is returned. -.El -.Sh FILES -.Bl -tag -width ".Pa /dev/openprom" -.It Pa /dev/openprom -OPENPROM interface node -.El -.Sh DIAGNOSTICS -The following may result in rejection of an operation: -.Bl -tag -width Er -.It Bq Er EBUSY -The -.Pa /dev/openprom -node is already opened. -.It Bq Er EINVAL -The given node number is not 0 and does not correspond to any valid node, -or the given node number is 0 where 0 is not allowed, -or the given size value is invalid, -or the given property name exceeds the maximum allowed length of -.Dv OPROMMAXPARAM -bytes. -.It Bq Er ENOMEM -The kernel could not allocate memory to copy in data from user-space or to -retrieve data from the -.Tn Open Firmware . -.El -.Sh SEE ALSO -.Xr ioctl 2 , -.Xr openfirm 4 , -.Xr eeprom 8 , -.Xr ofwdump 8 -.Sh HISTORY -The first -.Fx -version to include the -.Nm -interface was -.Fx 5.0 . -.Sh AUTHORS -The -.Nm -interface was written by -.An Jake Burkholder Aq Mt jake@FreeBSD.org . -.Sh CAVEATS -Due to limitations within -.Tn Open Firmware -itself, -these functions run at elevated priority and may adversely affect system -performance. -.Pp -The -.Nm -interface exists entirely for compatibility with software like X11, -and only the features that are actually needed for that are implemented. -The interface sucks too much to actually use, -new code should use the -.Xr openfirm 4 -interface instead. Property changes on: head/share/man/man4/man4.sparc64/openprom.4 ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/share/man/man4/man4.sparc64/fhc.4 =================================================================== --- head/share/man/man4/man4.sparc64/fhc.4 (revision 357793) +++ head/share/man/man4/man4.sparc64/fhc.4 (nonexistent) @@ -1,82 +0,0 @@ -.\"- -.\" Copyright (c) 2004 Jason L. Wright (jason@thought.net) -.\" 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 ``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. -.\" -.\" from: OpenBSD: fhc.4,v 1.5 2004/09/28 21:42:59 jmc Exp -.\" $FreeBSD$ -.\" -.Dd June 18, 2005 -.Dt FHC 4 sparc64 -.Os -.Sh NAME -.Nm fhc -.Nd "FireHose controller and bus" -.Sh SYNOPSIS -.Cd "device fhc" -.Sh DESCRIPTION -The -.Nm -driver provides support for the -.Tn FireHose -controllers and busses found in -.Tn Sun Enterprise xx00 -systems. -These controllers are also used for board level functions on these systems. -Each board has three status LEDs labeled -.Dq Li Power , -.Dq Li Failure -and -.Dq Li Cycling . -The -.Dq Li Cycling -LEDs can be made to blink by writing -.Tn ASCII -strings to the -.Pa /dev/led/board Ns Ar N -devices where -.Ar N -represents the physical slot number of the board. -.Sh FILES -.Bl -tag -width ".Pa /dev/led/board Ns Ar N" -.It Pa /dev/led/board Ns Ar N -board -.Ar N -LED device node -.El -.Sh SEE ALSO -.Xr central 4 , -.Xr clkbrd 4 , -.Xr eeprom 4 , -.Xr led 4 , -.Xr uart 4 -.Sh HISTORY -The -.Nm -driver first appeared in -.Fx 5.1 . -.Sh AUTHORS -The -.Nm -driver was written by -.An Jake Burkholder Aq Mt jake@FreeBSD.org . Property changes on: head/share/man/man4/man4.sparc64/fhc.4 ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/share/man/man4/man4.sparc64/auxio.4 =================================================================== --- head/share/man/man4/man4.sparc64/auxio.4 (revision 357793) +++ head/share/man/man4/man4.sparc64/auxio.4 (nonexistent) @@ -1,80 +0,0 @@ -.\"- -.\" Copyright (c) 2004 Pyun YongHyeon -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" $FreeBSD$ -.\" -.Dd June 18, 2005 -.Dt AUXIO 4 sparc64 -.Os -.Sh NAME -.Nm auxio -.Nd "Sun Auxiliary I/O" -.Sh SYNOPSIS -.Cd "device auxio" -.Sh DESCRIPTION -The -.Nm -driver provides support for the auxiliary I/O device found on the -.Tn EBus -and -.Tn SBus -busses of -.Tn Sun UltraSPARC -workstation and small server class systems. -This device contains miscellaneous system controls, -including the front panel LED. -This LED can be made to blink by writing -.Tn ASCII -strings to the -.Pa /dev/led/auxioled -device. -.Sh FILES -.Bl -tag -width ".Pa /dev/led/auxioled" -.It Pa /dev/led/auxioled -Auxiliary I/O device node -.El -.Sh SEE ALSO -.Xr ebus 4 , -.Xr led 4 , -.Xr sbus 4 -.Sh HISTORY -The -.Nm -driver first appeared in -.Nx 1.5 . -The first -.Fx -version to include it was -.Fx 5.3 . -.Sh AUTHORS -.An -nosplit -The -.Nm -driver was written by -.An Matthew R. Green -and ported to -.Fx -by -.An Pyun YongHyeon Aq Mt yongari@FreeBSD.org . Property changes on: head/share/man/man4/man4.sparc64/auxio.4 ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/share/man/man4/man4.sparc64/sbus.4 =================================================================== --- head/share/man/man4/man4.sparc64/sbus.4 (revision 357793) +++ head/share/man/man4/man4.sparc64/sbus.4 (nonexistent) @@ -1,79 +0,0 @@ -.\"- -.\" Copyright (c) 2001 The NetBSD Foundation, Inc. -.\" All rights reserved. -.\" -.\" This code is derived from software contributed to The NetBSD Foundation -.\" by Paul Kranenburg. -.\" -.\" 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. -.\" -.\" from: OpenBSD: sbus.4,v 1.27 2005/03/05 01:44:48 miod Exp -.\" from: NetBSD: sbus.4,v 1.5 2002/01/21 17:54:10 wiz Exp -.\" $FreeBSD$ -.\" -.Dd September 1, 2006 -.Dt SBUS 4 sparc64 -.Os -.Sh NAME -.Nm sbus -.Nd SBus controller and bus -.Sh SYNOPSIS -.Cd "device sbus" -.Sh DESCRIPTION -The -.Nm -driver provides support for the SBus controllers and busses found in older -.Tn UltraSPARC -workstations and small to medium server class systems. -The SBus is an I/O interconnect bus supporting both on-board peripherals and -extension boards. -The SBus specifications define the bus protocol as well as the electrical and -mechanical properties of the extension slots. -.Sh SEE ALSO -.Xr auxio 4 , -.Xr eeprom 4 , -.Xr esp 4 , -.Xr hme 4 , -.Xr isp 4 , -.Xr le 4 , -.Xr scc 4 , -.Xr snd_audiocs 4 , -.Xr uart 4 -.Sh HISTORY -The -.Nm -driver first appeared in -.Nx 1.3 . -The first -.Fx -version to include it was -.Fx 5.0 . -.Sh AUTHORS -.An -nosplit -The -.Nm -driver was written by -.An Paul Kranenburg -and ported to -.Fx -by -.An Thomas Moestl Aq Mt tmm@FreeBSD.org . Property changes on: head/share/man/man4/man4.sparc64/sbus.4 ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/share/man/man4/man4.sparc64/snd_audiocs.4 =================================================================== --- head/share/man/man4/man4.sparc64/snd_audiocs.4 (revision 357793) +++ head/share/man/man4/man4.sparc64/snd_audiocs.4 (nonexistent) @@ -1,87 +0,0 @@ -.\"- -.\" Copyright (c) 2004 Pyun YongHyeon -.\" 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 15, 2005 -.Dt SND_AUDIOCS 4 sparc64 -.Os -.Sh NAME -.Nm snd_audiocs -.Nd "Crystal Semiconductor CS4231 audio device driver" -.Sh SYNOPSIS -To compile this driver into the kernel, place the following lines in your -kernel configuration file: -.Bd -ragged -offset indent -.Cd "device sound" -.Cd "device snd_audiocs" -.Ed -.Pp -Alternatively, to load the driver as a module at boot time, place the -following line in -.Xr loader.conf 5 : -.Bd -literal -offset indent -snd_audiocs_load="YES" -.Ed -.Sh DESCRIPTION -The -.Nm -bridge driver allows the generic audio driver -.Xr sound 4 -to attach to the CS4231 audio device. -Speaker output is enabled by default. -SBus based -.Tn UltraSPARC -workstations have no internal CD-ROM audio input capability. -.Sh HARDWARE -The -.Nm -driver supports the following audio devices: -.Pp -.Bl -bullet -compact -.It -CS4231 on SBus based UltraSPARC -.It -CS4231 on PCI/EBus based UltraSPARC -.El -.Sh SEE ALSO -.Xr ebus 4 , -.Xr sbus 4 , -.Xr sound 4 -.Sh HISTORY -The -.Nm -device driver first appeared in -.Fx 5.3 . -.Sh AUTHORS -.An -nosplit -The -.Nm -driver was ported by -.An Pyun YongHyeon Aq Mt yongari@FreeBSD.org -from the -.Ox -driver written by -.An Jason L. Wright . Property changes on: head/share/man/man4/man4.sparc64/snd_audiocs.4 ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/share/man/man4/man4.sparc64/Makefile.depend =================================================================== --- head/share/man/man4/man4.sparc64/Makefile.depend (revision 357793) +++ head/share/man/man4/man4.sparc64/Makefile.depend (nonexistent) @@ -1,11 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif Property changes on: head/share/man/man4/man4.sparc64/Makefile.depend ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/share/man/man4/man4.sparc64/creator.4 =================================================================== --- head/share/man/man4/man4.sparc64/creator.4 (revision 357793) +++ head/share/man/man4/man4.sparc64/creator.4 (nonexistent) @@ -1,88 +0,0 @@ -.\"- -.\" Copyright (c) 2002 Jason L. Wright (jason@thought.net) -.\" 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 ``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. -.\" -.\" from: OpenBSD: creator.4,v 1.20 2005/03/05 01:48:59 miod Exp -.\" $FreeBSD$ -.\" -.Dd June 18, 2005 -.Dt CREATOR 4 sparc64 -.Os -.Sh NAME -.Nm creator -.Nd "accelerated color frame buffer" -.Sh SYNOPSIS -.Cd "device creator" -.Sh DESCRIPTION -The -.Tn Sun Creator , -.Tn Sun Creator3D -and -.Tn Sun Elite3D -cards are color frame buffers with graphics acceleration available for -.Tn UltraSPARC -workstations with -.Tn UPA -slots. -The -.Nm -driver interfaces those frame buffers with the -.Xr syscons 4 -console driver. -It also provides separate character devices -.Pa /dev/fb* -allowing to -.Xr mmap 2 -these frame buffers -(used by X11). -.Sh FILES -.Bl -tag -width ".Pa /dev/fb*" -.It Pa /dev/fb* -.Nm -device nodes -.El -.Sh SEE ALSO -.Xr machfb 4 , -.Xr syscons 4 -.Sh HISTORY -The -.Nm -driver first appeared in -.Ox 3.2 . -The first -.Fx -version to include it was -.Fx 5.2 . -.Sh AUTHORS -.An -nosplit -The -.Nm -driver was written by -.An Jake Burkholder Aq Mt jake@FreeBSD.org -roughly based on the -.Ox -driver written by -.An "Jason L. Wright" . -.Sh CAVEATS -Font loading and mode switching are not implemented. Property changes on: head/share/man/man4/man4.sparc64/creator.4 ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/share/man/man4/man4.sparc64/central.4 =================================================================== --- head/share/man/man4/man4.sparc64/central.4 (revision 357793) +++ head/share/man/man4/man4.sparc64/central.4 (nonexistent) @@ -1,60 +0,0 @@ -.\"- -.\" Copyright (c) 2004 Jason L. Wright (jason@thought.net) -.\" 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 ``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. -.\" -.\" from: OpenBSD: central.4,v 1.3 2004/09/24 07:03:47 miod Exp -.\" $FreeBSD$ -.\" -.Dd June 18, 2005 -.Dt CENTRAL 4 sparc64 -.Os -.Sh NAME -.Nm central -.Nd "Central host controller and bus" -.Sh SYNOPSIS -.Cd "device central" -.Sh DESCRIPTION -The -.Nm -driver provides support for the -.Tn Central -host controller and bus found in -.Tn Sun Enterprise xx00 -systems. -It provides an attachment point for the main -.Xr fhc 4 -.Tn FireHose -controller used to control board level functions on the host. -.Sh SEE ALSO -.Xr fhc 4 -.Sh HISTORY -The -.Nm -driver first appeared in -.Fx 5.1 . -.Sh AUTHORS -The -.Nm -driver was written by -.An Jake Burkholder Aq Mt jake@FreeBSD.org . Property changes on: head/share/man/man4/man4.sparc64/central.4 ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/share/man/man4/man4.sparc64/rtc.4 =================================================================== --- head/share/man/man4/man4.sparc64/rtc.4 (revision 357793) +++ head/share/man/man4/man4.sparc64/rtc.4 (nonexistent) @@ -1,88 +0,0 @@ -.\"- -.\" Copyright (c) 2004 Jason L. Wright (jason@thought.net) -.\" Copyright (c) 2005 Marius Strobl -.\" 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 ``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. -.\" -.\" from: OpenBSD: clock.4,v 1.3 2004/09/24 07:04:15 miod Exp -.\" $FreeBSD$ -.\" -.Dd June 18, 2005 -.Dt RTC 4 sparc64 -.Os -.Sh NAME -.Nm rtc -.Nd "non-volatile RAM / real time clock" -.Sh SYNOPSIS -.Cd "device genclock" -.Cd "device mc146818" -.Cd "device rtc" -.Sh DESCRIPTION -The -.Nm -driver is a front-end for the machine-independent -.Tn Motorola -MC146818 and compatible clocks driver. -The -.Tn Motorola -MC146818 and compatible clocks driver provides access to the real time clock -part of the chips it supports to -.Fx -by interfacing with the generic clock code. -.Pp -.Tn Dallas / -.Tn Maxim Semiconductor -DS1287 chips -(those are compatible to the -.Tn Motorola -MC146818 clocks) -are found on the ISA bus of -.Tn UltraSPARC II -systems and the EBus bus of -.Tn UltraSPARC III -systems. -.Sh DIAGNOSTICS -The following driver specific error message may be reported: -.Bl -diag -.It "mc146818_attach_attach: battery low" -The device signals that its battery is low and should be replaced. -The -.Nm -driver refused to attach the device in this case as the time in the real time -clock is probably invalid. -This gives the generic clock code the chance to use another device as the -system real time clock that otherwise would not have been chosen. -.El -.Sh SEE ALSO -.Xr ebus 4 , -.Xr eeprom 4 -.Sh HISTORY -The -.Nm -driver first appeared in -.Fx 5.4 . -.Sh AUTHORS -The -.Nm -driver was written by -.An Marius Strobl Aq Mt marius@FreeBSD.org . Property changes on: head/share/man/man4/man4.sparc64/rtc.4 ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/share/man/man4/man4.sparc64/ofw_console.4 =================================================================== --- head/share/man/man4/man4.sparc64/ofw_console.4 (revision 357793) +++ head/share/man/man4/man4.sparc64/ofw_console.4 (nonexistent) @@ -1,126 +0,0 @@ -.\"- -.\" Copyright (c) 2001 Miodrag Vallat. -.\" Copyright (c) 2005 Marius Strobl -.\" 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. Redistribution of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.\" from: OpenBSD: pcons.4,v 1.4 2003/06/02 16:16:26 miod Exp -.\" $FreeBSD$ -.\" -.Dd June 18, 2005 -.Dt OFW_CONSOLE 4 sparc64 -.Os -.Sh NAME -.Nm ofw_console -.Nd "Open Firmware console" -.Sh SYNOPSIS -.Cd "device ofw_console" -.Cd "options OFWCONS_POLL_HZ=N" -.Pp -.Cd "options KDB" -.Cd "options DDB" -.Cd "options ALT_BREAK_TO_DEBUGGER" -.Sh DESCRIPTION -The -.Nm -driver provides a simple text console, -using the Open Firmware services for input and output. -It will use the Open Firmware console devices set via the -.Va input-device -and -.Va output-device -variables. -.Pp -This driver is deprecated and only provided as a fallback console mechanism -if the real console hardware can not be driven by -.Fx . -.Pp -In case the -.Nm -console appears to work too slowly, its responsiveness probably can be improved -by including -.Cd "options OFWCONS_POLL_HZ=N" . -When omitted, -.Dv OFWCONS_POLL_HZ -defaults to 4. -For example, on -.Tn Sun Ultra 2 -a value of 20 or higher works best. -Too high values, on the other hand, can cause -.Nm -to unnecessarily consume CPU. -.Sh FILES -.Bl -tag -width ".Pa /dev/keyboard" -compact -.It Pa /dev/console -.It Pa /dev/keyboard -terminal input device in case the console input device is the keyboard -.It Pa /dev/screen -terminal output device in case the console output device is the screen -.It Pa /dev/tty[a-z] -terminal device in case both the console input and output device is tty[a-z] -.El -.Sh SEE ALSO -.Xr creator 4 , -.Xr machfb 4 , -.Xr syscons 4 , -.Xr uart 4 , -.Xr eeprom 8 -.Sh HISTORY -The -.Nm -driver first appeared in -.Fx 5.0 . -.Sh AUTHORS -The -.Nm -driver was written by -.An Benno Rice Aq Mt benno@FreeBSD.org . -.Sh CAVEATS -Since the Open Firmware will handle BREAK -(or Stop-A) -sequences before -.Nm , -the preferred way to enter -.Xr ddb 4 -when using -.Nm -is to include -.Cd "options ALT_BREAK_TO_DEBUGGER" -in a ddb-enabled kernel, and enter the alternate BREAK sequence -(RETURN TILDE CTRL-b). -.Sh BUGS -The -.Nm -driver -is not a real -.Xr tty 4 -driver and is not MPSAFE. -The -.Nm -driver also does not attach to the hardware resources it actually talks to. -Therefore it cannot be included in the kernel together with real console -hardware drivers -like -.Xr creator 4 , -.Xr machfb 4 -and -.Xr uart 4 . Property changes on: head/share/man/man4/man4.sparc64/ofw_console.4 ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/share/man/man4/man4.sparc64/machfb.4 =================================================================== --- head/share/man/man4/man4.sparc64/machfb.4 (revision 357793) +++ head/share/man/man4/man4.sparc64/machfb.4 (nonexistent) @@ -1,180 +0,0 @@ -.\"- -.\" Copyright (c) 2002 Jason L. Wright (jason@thought.net) -.\" Copyright (c) 2005, 2006 Marius Strobl -.\" 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 ``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. -.\" -.\" from: OpenBSD: creator.4,v 1.20 2005/03/05 01:48:59 miod Exp -.\" $FreeBSD$ -.\" -.Dd September 2, 2006 -.Dt MACHFB 4 sparc64 -.Os -.Sh NAME -.Nm machfb -.Nd "accelerated color frame buffer" -.Sh SYNOPSIS -.Cd "device machfb" -.Sh DESCRIPTION -The -.Tn ATI Mach64 -family of chips are color frame buffers with graphics acceleration. -The -.Nm -driver interfaces those frame buffers with the -.Xr syscons 4 -console driver. -.Pp -.Tn ATI Mach64 -chips are very common as low-end graphics chips in -.Tn PCI -based -.Tn UltraSPARC -systems. -They are found on-board in -.Tn Sun Blade 100 , -.Tn Sun Blade 150 , -.Tn Sun Ultra 5 -and -.Tn Sun Ultra 10 -as well as on -.Tn Sun -OEM mainboards like the -.Tn Sun AXe . -They are also used on add-on cards like the -.Tn Sun PGX -and -.Tn Sun PGX64 . -.Pp -The -.Nm -driver requires the chip which it is supposed to drive to be also -supported by the -.Tn Open Firmware , -either by a built-in FCode driver package of the on-board firmware -or by additional FCode on the add-on card. -As a matter of course -.Tn UltraSPARC -systems with an on-board -.Tn ATI Mach64 chip -also have a built-in FCode driver package for this chip. -There are also mainboards like the -.Tn Sun AX1105 -and -.Tn Sun AXi -boards however, -which have built-in FCode for certain -.Tn ATI Mach64 -chips although they are not equipped with an on-board one. -Mainboards with built-in FCode for certain -.Tn ATI Mach64 -chips can be used with any add-on card which is based on one of those -chips, -including cards which are equipped with x86 firmware and intended for -use in PCs. -Otherwise an add-on card which comes with its own FCode like the -.Tn Sun PGX -or -.Tn Sun PGX64 -has to be used. -.Sh HARDWARE -The -.Nm -driver provides support for the following chips: -.Pp -.Bl -bullet -compact -.It -.Tn ATI 3D Rage II+ -.It -.Tn ATI 3D Rage IIC -.It -.Tn ATI 3D Rage I/II -.It -.Tn ATI 3D Rage LT -.It -.Tn ATI 3D Rage LT Pro -.It -.Tn ATI 3D Rage Pro -.It -.Tn ATI 3D Rage Pro Turbo -.It -.Tn ATI Mach64 CT -.It -.Tn ATI Mach64 VT -.It -.Tn ATI Mach64 VT4 -.It -.Tn ATI Mach64 VTB -.It -.Tn ATI Rage L Mobility -.It -.Tn ATI Rage Mobility -.It -.Tn ATI Rage Mobility M1 -.It -.Tn ATI Rage Mobility M3 -.It -.Tn ATI Rage XC -.It -.Tn ATI Rage XL -.El -.Pp -The -following add-on cards are known to work with the -.Nm -driver at this time: -.Pp -.Bl -bullet -compact -.It -.Tn ATI 3D Charger PCI -.It -.Tn Sun PGX 8-Bit Color Frame Buffer -(part no.\& 370-2256) -.It -.Tn Sun PGX64 8/24-Bit Color Frame Buffer -(part no.\& 370-4362) -.El -.Sh SEE ALSO -.Xr creator 4 , -.Xr syscons 4 -.Sh HISTORY -The -.Nm -driver first appeared in -.Nx 2.0 . -The first -.Fx -version to include it was -.Fx 6.0 . -.Sh AUTHORS -.An -nosplit -The -.Nm -driver was written by -.An Marius Strobl Aq Mt marius@FreeBSD.org -based on the -.Nx -driver written by -.An Bang Jun-Young . -.Sh CAVEATS -Font loading and mode switching are not implemented. Property changes on: head/share/man/man4/man4.sparc64/machfb.4 ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/share/man/man4/man4.sparc64/Makefile =================================================================== --- head/share/man/man4/man4.sparc64/Makefile (revision 357793) +++ head/share/man/man4/man4.sparc64/Makefile (nonexistent) @@ -1,22 +0,0 @@ -# $FreeBSD$ - -MAN= auxio.4 \ - central.4 \ - clkbrd.4 \ - creator.4 \ - ebus.4 \ - eeprom.4 \ - fhc.4 \ - machfb.4 \ - ofw_console.4 \ - openfirm.4 \ - openprom.4 \ - rtc.4 \ - sbus.4 \ - snd_audiocs.4 - -MLINKS= openfirm.4 openfirmware.4 - -MANSUBDIR=/sparc64 - -.include Property changes on: head/share/man/man4/man4.sparc64/Makefile ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: head/share/man/man4/pcm.4 =================================================================== --- head/share/man/man4/pcm.4 (revision 357793) +++ head/share/man/man4/pcm.4 (revision 357794) @@ -1,796 +1,792 @@ .\" .\" Copyright (c) 2009-2011 Joel Dahl .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd March 22, 2012 .Dt SOUND 4 .Os .Sh NAME .Nm sound , .Nm pcm , .Nm snd .Nd .Fx PCM audio device infrastructure .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "device sound" .Ed .Sh DESCRIPTION The .Nm driver is the main component of the .Fx sound system. It works in conjunction with a bridge device driver on supported devices and provides PCM audio record and playback once it attaches. Each bridge device driver supports a specific set of audio chipsets and needs to be enabled together with the .Nm driver. PCI and ISA PnP audio devices identify themselves so users are usually not required to add anything to .Pa /boot/device.hints . .Pp Some of the main features of the .Nm driver are: multichannel audio, per-application volume control, dynamic mixing through virtual sound channels, true full duplex operation, bit perfect audio, rate conversion and low latency modes. .Pp The .Nm driver is enabled by default, along with several bridge device drivers. Those not enabled by default can be loaded during runtime with .Xr kldload 8 or during boot via .Xr loader.conf 5 . The following bridge device drivers are available: .Pp .Bl -bullet -compact .It .Xr snd_ad1816 4 .It .Xr snd_ai2s 4 (enabled by default on powerpc) .It .Xr snd_als4000 4 .It .Xr snd_atiixp 4 .It -.Xr snd_audiocs 4 (enabled by default on sparc64) -.It .Xr snd_cmi 4 (enabled by default on amd64, i386) .It .Xr snd_cs4281 4 .It .Xr snd_csa 4 (enabled by default on amd64, i386) .It .Xr snd_davbus 4 (enabled by default on powerpc) .It .Xr snd_ds1 4 .It .Xr snd_emu10k1 4 .It .Xr snd_emu10kx 4 (enabled by default on amd64, i386) .It .Xr snd_envy24 4 .It .Xr snd_envy24ht 4 .It -.Xr snd_es137x 4 (enabled by default on amd64, i386, sparc64) +.Xr snd_es137x 4 (enabled by default on amd64, i386) .It .Xr snd_ess 4 .It .Xr snd_fm801 4 .It .Xr snd_gusc 4 .It .Xr snd_hda 4 (enabled by default on amd64, i386) .It .Xr snd_hdspe 4 .It .Xr snd_ich 4 (enabled by default on amd64, i386) .It .Xr snd_maestro 4 .It .Xr snd_maestro3 4 .It .Xr snd_mss 4 .It .Xr snd_neomagic 4 .It snd_sb16 .It snd_sb8 .It .Xr snd_sbc 4 .It .Xr snd_solo 4 .It .Xr snd_spicds 4 .It -.Xr snd_t4dwave 4 (enabled by default on sparc64) -.It -.Xr snd_uaudio 4 (enabled by default on amd64, i386, powerpc, sparc64) +.Xr snd_uaudio 4 (enabled by default on amd64, i386, powerpc) .It .Xr snd_via8233 4 (enabled by default on amd64, i386) .It .Xr snd_via82c686 4 .It .Xr snd_vibes 4 .El .Pp Refer to the manual page for each bridge device driver for driver specific settings and information. .Ss Legacy Hardware For old legacy .Tn ISA cards, the driver looks for .Tn MSS cards at addresses .Dv 0x530 and .Dv 0x604 . These values can be overridden in .Pa /boot/device.hints . Non-PnP sound cards require the following lines in .Xr device.hints 5 : .Bd -literal -offset indent hint.pcm.0.at="isa" hint.pcm.0.irq="5" hint.pcm.0.drq="1" hint.pcm.0.flags="0x0" .Ed .Pp Apart from the usual parameters, the flags field is used to specify the secondary .Tn DMA channel (generally used for capture in full duplex cards). Flags are set to 0 for cards not using a secondary .Tn DMA channel, or to 0x10 + C to specify channel C. .Ss Boot Variables In general, the module .Pa snd_foo corresponds to .Cd "device snd_foo" and can be loaded by the boot .Xr loader 8 via .Xr loader.conf 5 or from the command line using the .Xr kldload 8 utility. Options which can be specified in .Pa /boot/loader.conf include: .Bl -tag -width ".Va snd_driver_load" -offset indent .It Va snd_driver_load .Pq Dq Li NO If set to .Dq Li YES , this option loads all available drivers. .It Va snd_hda_load .Pq Dq Li NO If set to .Dq Li YES , only the Intel High Definition Audio bridge device driver and dependent modules will be loaded. .It Va snd_foo_load .Pq Dq Li NO If set to .Dq Li YES , load driver for card/chipset foo. .El .Pp To define default values for the different mixer channels, set the channel to the preferred value using hints, e.g.: .Va hint.pcm.0.line Ns = Ns Qq Li 0 . This will mute the input channel per default. .Ss Multichannel Audio Multichannel audio, popularly referred to as .Dq surround sound is supported and enabled by default. The FreeBSD multichannel matrix processor supports up to 18 interleaved channels, but the limit is currently set to 8 channels (as commonly used for 7.1 surround sound). The internal matrix mapping can handle reduction, expansion or re-routing of channels. This provides a base interface for related multichannel .Fn ioctl support. Multichannel audio works both with and without .Tn VCHANs . .Pp Most bridge device drivers are still missing multichannel matrixing support, but in most cases this should be trivial to implement. Use the .Va dev.pcm.%d.[play|rec].vchanformat .Xr sysctl 8 to adjust the number of channels used. The current multichannel interleaved structure and arrangement was implemented by inspecting various popular UNIX applications. There were no single standard, so much care has been taken to try to satisfy each possible scenario, despite the fact that each application has its own conflicting standard. .Ss EQ The Parametric Software Equalizer (EQ) enables the use of .Dq tone controls (bass and treble). Commonly used for ear-candy or frequency compensation due to the vast difference in hardware quality. EQ is disabled by default, but can be enabled with the .Va hint.pcm.%d.eq tunable. .Ss VCHANs Each device can optionally support more playback and recording channels than physical hardware provides by using .Dq virtual channels or .Tn VCHANs . .Tn VCHAN options can be configured via the .Xr sysctl 8 interface but can only be manipulated while the device is inactive. .Ss VPC FreeBSD supports independent and individual volume controls for each active application, without touching the master .Nm volume. This is sometimes referred to as Volume Per Channel (VPC). The .Tn VPC feature is enabled by default. .Ss Loader Tunables The following loader tunables are used to set driver configuration at the .Xr loader 8 prompt before booting the kernel, or they can be stored in .Pa /boot/loader.conf in order to automatically set them before booting the kernel. It is also possible to use .Xr kenv 1 to change these tunables before loading the .Nm driver. The following tunables can not be changed during runtime using .Xr sysctl 8 . .Bl -tag -width indent .It Va hint.pcm.%d.eq Set to 1 or 0 to explicitly enable (1) or disable (0) the equalizer. Requires a driver reload if changed. Enabling this will make bass and treble controls appear in mixer applications. This tunable is undefined by default. Equalizing is disabled by default. .It Va hint.pcm.%d.vpc Set to 1 or 0 to explicitly enable (1) or disable (0) the .Tn VPC feature. This tunable is undefined by default. .Tn VPC is however enabled by default. .El .Ss Runtime Configuration There are a number of .Xr sysctl 8 variables available which can be modified during runtime. These values can also be stored in .Pa /etc/sysctl.conf in order to automatically set them during the boot process. .Va hw.snd.* are global settings and .Va dev.pcm.* are device specific. .Bl -tag -width indent .It Va hw.snd.compat_linux_mmap Linux .Xr mmap 2 compatibility. The following values are supported (default is 0): .Bl -tag -width 2n .It -1 Force disabling/denying PROT_EXEC .Xr mmap 2 requests. .It 0 Auto detect proc/ABI type, allow .Xr mmap 2 for Linux applications, and deny for everything else. .It 1 Always allow PROT_EXEC page mappings. .El .It Va hw.snd.default_auto Automatically assign the default sound unit. The following values are supported (default is 1): .Bl -tag -width 2n .It 0 Do not assign the default sound unit automatically. .It 1 Use the best available sound device based on playing and recording capabilities of the device. .It 2 Use the most recently attached device. .El .It Va hw.snd.default_unit Default sound card for systems with multiple sound cards. When using .Xr devfs 5 , the default device for .Pa /dev/dsp . Equivalent to a symlink from .Pa /dev/dsp to .Pa /dev/dsp Ns Va ${hw.snd.default_unit} . .It Va hw.snd.feeder_eq_exact_rate Only certain rates are allowed for precise processing. The default behavior is however to allow sloppy processing for all rates, even the unsupported ones. Enable to toggle this requirement and only allow processing for supported rates. .It Va hw.snd.feeder_rate_max Maximum allowable sample rate. .It Va hw.snd.feeder_rate_min Minimum allowable sample rate. .It Va hw.snd.feeder_rate_polyphase_max Adjust to set the maximum number of allowed polyphase entries during the process of building resampling filters. Disabling polyphase resampling has the benefit of reducing memory usage, at the expense of slower and lower quality conversion. Only applicable when the SINC interpolator is used. Default value is 183040. Set to 0 to disable polyphase resampling. .It Va hw.snd.feeder_rate_quality Sample rate converter quality. Default value is 1, linear interpolation. Available options include: .Bl -tag -width 2n .It 0 Zero Order Hold, ZOH. Very fast, but with poor quality. .It 1 Linear interpolation. Fast, quality is subject to personal preference. Technically the quality is poor however, due to the lack of anti-aliasing filtering. .It 2 Bandlimited SINC interpolator. Implements polyphase banking to boost the conversion speed, at the cost of memory usage, with multiple high quality polynomial interpolators to improve the conversion accuracy. 100% fixed point, 64bit accumulator with 32bit coefficients and high precision sample buffering. Quality values are 100dB stopband, 8 taps and 85% bandwidth. .It 3 Continuation of the bandlimited SINC interpolator, with 100dB stopband, 36 taps and 90% bandwidth as quality values. .It 4 Continuation of the bandlimited SINC interprolator, with 100dB stopband, 164 taps and 97% bandwidth as quality values. .El .It Va hw.snd.feeder_rate_round Sample rate rounding threshold, to avoid large prime division at the cost of accuracy. All requested sample rates will be rounded to the nearest threshold value. Possible values range between 0 (disabled) and 500. Default is 25. .It Va hw.snd.latency Configure the buffering latency. Only affects applications that do not explicitly request blocksize / fragments. This tunable provides finer granularity than the .Va hw.snd.latency_profile tunable. Possible values range between 0 (lowest latency) and 10 (highest latency). .It Va hw.snd.latency_profile Define sets of buffering latency conversion tables for the .Va hw.snd.latency tunable. A value of 0 will use a low and aggressive latency profile which can result in possible underruns if the application cannot keep up with a rapid irq rate, especially during high workload. The default value is 1, which is considered a moderate/safe latency profile. .It Va hw.snd.maxautovchans Global .Tn VCHAN setting that only affects devices with at least one playback or recording channel available. The sound system will dynamically create up to this many .Tn VCHANs . Set to .Dq 0 if no .Tn VCHANs are desired. Maximum value is 256. .It Va hw.snd.report_soft_formats Controls the internal format conversion if it is available transparently to the application software. When disabled or not available, the application will only be able to select formats the device natively supports. .It Va hw.snd.report_soft_matrix Enable seamless channel matrixing even if the hardware does not support it. Makes it possible to play multichannel streams even with a simple stereo sound card. .It Va hw.snd.verbose Level of verbosity for the .Pa /dev/sndstat device. Higher values include more output and the highest level, four, should be used when reporting problems. Other options include: .Bl -tag -width 2n .It 0 Installed devices and their allocated bus resources. .It 1 The number of playback, record, virtual channels, and flags per device. .It 2 Channel information per device including the channel's current format, speed, and pseudo device statistics such as buffer overruns and buffer underruns. .It 3 File names and versions of the currently loaded sound modules. .It 4 Various messages intended for debugging. .El .It Va hw.snd.vpc_0db Default value for .Nm volume. Increase to give more room for attenuation control. Decrease for more amplification, with the possible cost of sound clipping. .It Va hw.snd.vpc_autoreset When a channel is closed the channel volume will be reset to 0db. This means that any changes to the volume will be lost. Enabling this will preserve the volume, at the cost of possible confusion when applications tries to re-open the same device. .It Va hw.snd.vpc_mixer_bypass The recommended way to use the .Tn VPC feature is to teach applications to use the correct .Fn ioctl : .Dv SNDCTL_DSP_GETPLAYVOL, SNDCTL_DSP_SETPLAYVOL, .Dv SNDCTL_DSP_SETRECVOL, SNDCTL_DSP_SETRECVOL. This is however not always possible. Enable this to allow applications to use their own existing mixer logic to control their own channel volume. .It Va hw.snd.vpc_reset Enable to restore all channel volumes back to the default value of 0db. .It Va dev.pcm.%d.bitperfect Enable or disable bitperfect mode. When enabled, channels will skip all dsp processing, such as channel matrixing, rate converting and equalizing. The pure .Nm stream will be fed directly to the hardware. If .Tn VCHANs are enabled, the bitperfect mode will use the .Tn VCHAN format/rate as the definitive format/rate target. The recommended way to use bitperfect mode is to disable .Tn VCHANs and enable this sysctl. Default is disabled. .It Va dev.pcm.%d.[play|rec].vchans The current number of .Tn VCHANs allocated per device. This can be set to preallocate a certain number of .Tn VCHANs . Setting this value to .Dq 0 will disable .Tn VCHANs for this device. .It Va dev.pcm.%d.[play|rec].vchanformat Format for .Tn VCHAN mixing. All playback paths will be converted to this format before the mixing process begins. By default only 2 channels are enabled. Available options include: .Bl -tag -width 2n .It s16le:1.0 Mono. .It s16le:2.0 Stereo, 2 channels (left, right). .It s16le:2.1 3 channels (left, right, LFE). .It s16le:3.0 3 channels (left, right, rear center). .It s16le:4.0 Quadraphonic, 4 channels (front/rear left and right). .It s16le:4.1 5 channels (4.0 + LFE). .It s16le:5.0 5 channels (4.0 + center). .It s16le:5.1 6 channels (4.0 + center + LFE). .It s16le:6.0 6 channels (4.0 + front/rear center). .It s16le:6.1 7 channels (6.0 + LFE). .It s16le:7.1 8 channels (4.0 + center + LFE + left and right side). .El .It Va dev.pcm.%d.[play|rec].vchanmode .Tn VCHAN format/rate selection. Available options include: .Bl -tag -width 2n .It fixed Channel mixing is done using fixed format/rate. Advanced operations such as digital passthrough will not work. Can be considered as a .Dq legacy mode. This is the default mode for hardware channels which lack support for digital formats. .It passthrough Channel mixing is done using fixed format/rate, but advanced operations such as digital passthrough also work. All channels will produce sound as usual until a digital format playback is requested. When this happens all other channels will be muted and the latest incoming digital format will be allowed to pass through undisturbed. Multiple concurrent digital streams are supported, but the latest stream will take precedence and mute all other streams. .It adaptive Works like the .Dq passthrough mode, but is a bit smarter, especially for multiple .Nm channels with different format/rate. When a new channel is about to start, the entire list of virtual channels will be scanned, and the channel with the best format/rate (usually the highest/biggest) will be selected. This ensures that mixing quality depends on the best channel. The downside is that the hardware DMA mode needs to be restarted, which may cause annoying pops or clicks. .El .It Va dev.pcm.%d.[play|rec].vchanrate Sample rate speed for .Tn VCHAN mixing. All playback paths will be converted to this sample rate before the mixing process begins. .It Va dev.pcm.%d.polling Experimental polling mode support where the driver operates by querying the device state on each tick using a .Xr callout 9 mechanism. Disabled by default and currently only available for a few device drivers. .El .Ss Recording Channels On devices that have more than one recording source (ie: mic and line), there is a corresponding .Pa /dev/dsp%d.r%d device. The .Xr mixer 8 utility can be used to start and stop recording from an specific device. .Ss Statistics Channel statistics are only kept while the device is open. So with situations involving overruns and underruns, consider the output while the errant application is open and running. .Ss IOCTL Support The driver supports most of the .Tn OSS .Fn ioctl functions, and most applications work unmodified. A few differences exist, while memory mapped playback is supported natively and in .Tn Linux emulation, memory mapped recording is not due to .Tn VM system design. As a consequence, some applications may need to be recompiled with a slightly modified audio module. See .In sys/soundcard.h for a complete list of the supported .Fn ioctl functions. .Sh FILES The .Nm drivers may create the following device nodes: .Pp .Bl -tag -width ".Pa /dev/audio%d.%d" -compact .It Pa /dev/audio%d.%d Sparc-compatible audio device. .It Pa /dev/dsp%d.%d Digitized voice device. .It Pa /dev/dspW%d.%d Like .Pa /dev/dsp , but 16 bits per sample. .It Pa /dev/dsp%d.p%d Playback channel. .It Pa /dev/dsp%d.r%d Record channel. .It Pa /dev/dsp%d.vp%d Virtual playback channel. .It Pa /dev/dsp%d.vr%d Virtual recording channel. .It Pa /dev/sndstat Current .Nm status, including all channels and drivers. .El .Pp The first number in the device node represents the unit number of the .Nm device. All .Nm devices are listed in .Pa /dev/sndstat . Additional messages are sometimes recorded when the device is probed and attached, these messages can be viewed with the .Xr dmesg 8 utility. .Pp The above device nodes are only created on demand through the dynamic .Xr devfs 5 clone handler. Users are strongly discouraged to access them directly. For specific sound card access, please instead use .Pa /dev/dsp or .Pa /dev/dsp%d . .Sh EXAMPLES Use the sound metadriver to load all .Nm bridge device drivers at once (for example if it is unclear which the correct driver to use is): .Pp .Dl kldload snd_driver .Pp Load a specific bridge device driver, in this case the Intel High Definition Audio driver: .Pp .Dl kldload snd_hda .Pp Check the status of all detected .Nm devices: .Pp .Dl cat /dev/sndstat .Pp Change the default sound device, in this case to the second device. This is handy if there are multiple .Nm devices available: .Pp .Dl sysctl hw.snd.default_unit=1 .Sh DIAGNOSTICS .Bl -diag .It pcm%d:play:%d:dsp%d.p%d: play interrupt timeout, channel dead The hardware does not generate interrupts to serve incoming (play) or outgoing (record) data. .It unsupported subdevice XX A device node is not created properly. .El .Sh SEE ALSO .Xr snd_ad1816 4 , .Xr snd_ai2s 4 , .Xr snd_als4000 4 , .Xr snd_atiixp 4 , .Xr snd_audiocs 4 , .Xr snd_cmi 4 , .Xr snd_cs4281 4 , .Xr snd_csa 4 , .Xr snd_davbus 4 , .Xr snd_ds1 4 , .Xr snd_emu10k1 4 , .Xr snd_emu10kx 4 , .Xr snd_envy24 4 , .Xr snd_envy24ht 4 , .Xr snd_es137x 4 , .Xr snd_ess 4 , .Xr snd_fm801 4 , .Xr snd_gusc 4 , .Xr snd_hda 4 , .Xr snd_hdspe 4 , .Xr snd_ich 4 , .Xr snd_maestro 4 , .Xr snd_maestro3 4 , .Xr snd_mss 4 , .Xr snd_neomagic 4 , .Xr snd_sbc 4 , .Xr snd_solo 4 , .Xr snd_spicds 4 , .Xr snd_t4dwave 4 , .Xr snd_uaudio 4 , .Xr snd_via8233 4 , .Xr snd_via82c686 4 , .Xr snd_vibes 4 , .Xr devfs 5 , .Xr device.hints 5 , .Xr loader.conf 5 , .Xr dmesg 8 , .Xr kldload 8 , .Xr mixer 8 , .Xr sysctl 8 .Rs .%T "Cookbook formulae for audio EQ biquad filter coefficients, by Robert Bristow-Johnson" .%U "http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt" .Re .Rs .%T "Julius O'Smith's Digital Audio Resampling" .%U "http://ccrma.stanford.edu/~jos/resample/" .Re .Rs .%T "Polynomial Interpolators for High-Quality Resampling of Oversampled Audio, by Olli Niemitalo" .%U "http://www.student.oulu.fi/~oniemita/dsp/deip.pdf" .Re .Rs .%T "The OSS API" .%U "http://www.opensound.com/pguide/oss.pdf" .Re .Sh HISTORY The .Nm device driver first appeared in .Fx 2.2.6 as .Nm pcm , written by .An Luigi Rizzo . It was later rewritten in .Fx 4.0 by .An Cameron Grant . The API evolved from the VOXWARE standard which later became OSS standard. .Sh AUTHORS .An -nosplit .An Luigi Rizzo Aq Mt luigi@iet.unipi.it initially wrote the .Nm pcm device driver and this manual page. .An Cameron Grant Aq Mt gandalf@vilnya.demon.co.uk later revised the device driver for .Fx 4.0 . .An Seigo Tanimura Aq Mt tanimura@r.dl.itc.u-tokyo.ac.jp revised this manual page. It was then rewritten for .Fx 5.2 . .Sh BUGS Some features of your sound card (e.g., global volume control) might not be supported on all devices. Index: head/share/man/man4/smp.4 =================================================================== --- head/share/man/man4/smp.4 (revision 357793) +++ head/share/man/man4/smp.4 (revision 357794) @@ -1,190 +1,190 @@ .\" Copyright (c) 1997 .\" Steve Passe . All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. The name of the developer may NOT be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd January 4, 2019 .Dt SMP 4 .Os .Sh NAME .Nm SMP .Nd description of the FreeBSD Symmetric Multi-Processor kernel .Sh SYNOPSIS .Cd options SMP .Sh DESCRIPTION The .Nm kernel implements symmetric multi-processor support. .Pp .Nm support can be disabled by setting the loader tunable .Va kern.smp.disabled to 1. .Pp The number of CPUs detected by the system is available in the read-only sysctl variable .Va hw.ncpu . .Pp The number of online threads per CPU core is available in the read-only sysctl variable .Va kern.smp.threads_per_core . The number of physical CPU cores detected by the system is available in the read-only sysctl variable .Va kern.smp.cores . .Pp .Fx allows specific CPUs on a multi-processor system to be disabled. This can be done using the .Va hint.lapic.X.disabled tunable, where X is the APIC ID of a CPU. Setting this tunable to 1 will result in the corresponding CPU being disabled. .Pp .Fx supports simultaneous multithreading on x86 and powerpc platforms. On x86, the logical CPUs can be disabled by setting the .Va machdep.hyperthreading_allowed tunable to zero. .Pp The .Xr sched_ule 4 scheduler implements CPU topology detection and adjusts the scheduling algorithms to make better use of modern multi-core CPUs. The sysctl variable .Va kern.sched.topology_spec reflects the detected CPU hardware in a parsable XML format. The top level XML tag is , which encloses one or more tags containing data about individual CPU groups. A CPU group contains CPUs that are detected to be "close" together, usually by being cores in a single multi-core processor. Attributes available in a tag are "level", corresponding to the nesting level of the CPU group and "cache-level", corresponding to the level of CPU caches shared by the CPUs in the group. The tag contains the and tags. The tag describes CPUs in the group. Its attributes are "count", corresponding to the number of CPUs in the group and "mask", corresponding to the integer binary mask in which each bit position set to 1 signifies a CPU belonging to the group. The contents (CDATA) of the tag is the comma-delimited list of CPU indexes (derived from the "mask" attribute). The tag contains special tags (if any) describing the relation of the CPUs in the group. The possible flags are currently "HTT" and "SMT", corresponding to the various implementations of hardware multithreading. An example topology_spec output for a system consisting of two quad-core processors is: .Bd -literal 0, 1, 2, 3, 4, 5, 6, 7 0, 1, 2, 3 4, 5, 6, 7 .Ed .Pp This information is used internally by the kernel to schedule related tasks on CPUs that are closely grouped together. .Sh COMPATIBILITY Support for multi-processor systems is present for all Tier-1 and Tier-2 architectures on .Fx . -Currently, this includes x86, powerpc, arm, and sparc64. +Currently, this includes x86, powerpc, mips, arm and arm64. Support is enabled using .Cd options SMP . It is permissible to use the SMP kernel configuration on non-SMP hardware. .Sh I386 NOTES For i386 systems, the .Nm kernel supports motherboards that follow the Intel MP specification, version 1.4. In addition to .Cd options SMP , i386 also requires .Cd device apic . The .Xr mptable 1 command may be used to view the status of multi-processor support. .Sh SEE ALSO .Xr cpuset 1 , .Xr mptable 1 , .Xr sched_4bsd 4 , .Xr sched_ule 4 , .Xr loader 8 , .Xr sysctl 8 , .Xr condvar 9 , .Xr msleep 9 , .Xr mtx_pool 9 , .Xr mutex 9 , .Xr rwlock 9 , .Xr sema 9 , .Xr sx 9 .Sh HISTORY The .Nm kernel's early history is not (properly) recorded. It was developed in a separate CVS branch until April 26, 1997, at which point it was merged into 3.0-current. By this date 3.0-current had already been merged with Lite2 kernel code. .Pp .Fx 5.0 introduced support for a host of new synchronization primitives, and a move towards fine-grained kernel locking rather than reliance on a Giant kernel lock. The SMPng Project relied heavily on the support of BSDi, who provided reference source code from the fine-grained SMP implementation found in .Bsx . .Pp .Fx 5.0 also introduced support for SMP on the sparc64 architecture. .Sh AUTHORS .An Steve Passe Aq Mt fsmp@FreeBSD.org .Sh CAVEATS The .Va kern.smp.threads_per_core and .Va kern.smp.cores sysctl variables are provided as a best-effort guess. If an architecture or platform adds SMT and .Fx has not yet implemented detection, the reported values may be inaccurate. In this case, .Va kern.smp.threads_per_core will report .Dv 1 and .Va kern.smp.cores will report the same value as .Va hw.ncpu . Index: head/share/man/man9/bus_dma.9 =================================================================== --- head/share/man/man9/bus_dma.9 (revision 357793) +++ head/share/man/man9/bus_dma.9 (revision 357794) @@ -1,1275 +1,1265 @@ .\" Copyright (c) 2002, 2003 Hiten M. Pandya. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions, and the following disclaimer, .\" without modification, immediately at the beginning of the file. .\" 2. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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, CONTRIBUTORS OR THE .\" VOICES IN HITEN PANDYA'S HEAD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED .\" TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR .\" PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF .\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING .\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS .\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation .\" by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, .\" NASA Ames Research Center. .\" .\" 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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$ .\" $NetBSD: bus_dma.9,v 1.25 2002/10/14 13:43:16 wiz Exp $ .\" .Dd August 11, 2018 .Dt BUS_DMA 9 .Os .Sh NAME .Nm bus_dma , .Nm bus_dma_tag_create , .Nm bus_dma_tag_destroy , .Nm bus_dma_template_init , .Nm bus_dma_template_tag , .Nm bus_dma_template_clone , .Nm bus_dmamap_create , .Nm bus_dmamap_destroy , .Nm bus_dmamap_load , .Nm bus_dmamap_load_bio , .Nm bus_dmamap_load_ccb , .Nm bus_dmamap_load_mbuf , .Nm bus_dmamap_load_mbuf_sg , .Nm bus_dmamap_load_uio , .Nm bus_dmamap_unload , .Nm bus_dmamap_sync , .Nm bus_dmamem_alloc , .Nm bus_dmamem_free .Nd Bus and Machine Independent DMA Mapping Interface .Sh SYNOPSIS .In machine/bus.h .Ft int .Fn bus_dma_tag_create "bus_dma_tag_t parent" "bus_size_t alignment" \ "bus_addr_t boundary" "bus_addr_t lowaddr" "bus_addr_t highaddr" \ "bus_dma_filter_t *filtfunc" "void *filtfuncarg" "bus_size_t maxsize" \ "int nsegments" "bus_size_t maxsegsz" "int flags" "bus_dma_lock_t *lockfunc" \ "void *lockfuncarg" "bus_dma_tag_t *dmat" .Ft int .Fn bus_dma_tag_destroy "bus_dma_tag_t dmat" .Ft void .Fo bus_dma_template_init .Fa "bus_dma_template_t template" .Fa "bus_dma_tag_t parent" .Fc .Ft int .Fo bus_dma_template_tag .Fa "bus_dma_template_t template" .Fa "bus_dma_tag_t *dmat" .Fc .Ft void .Fo bus_dma_template_clone .Fa "bus_dma_template_t template" .Fa "bus_dma_tag_t dmat" .Fc .Ft int .Fn bus_dmamap_create "bus_dma_tag_t dmat" "int flags" "bus_dmamap_t *mapp" .Ft int .Fn bus_dmamap_destroy "bus_dma_tag_t dmat" "bus_dmamap_t map" .Ft int .Fn bus_dmamap_load "bus_dma_tag_t dmat" "bus_dmamap_t map" "void *buf" \ "bus_size_t buflen" "bus_dmamap_callback_t *callback" "void *callback_arg" \ "int flags" .Ft int .Fn bus_dmamap_load_bio "bus_dma_tag_t dmat" "bus_dmamap_t map" \ "struct bio *bio" "bus_dmamap_callback_t *callback" "void *callback_arg" \ "int flags" .Ft int .Fn bus_dmamap_load_ccb "bus_dma_tag_t dmat" "bus_dmamap_t map" \ "union ccb *ccb" "bus_dmamap_callback_t *callback" "void *callback_arg" \ "int flags" .Ft int .Fn bus_dmamap_load_mbuf "bus_dma_tag_t dmat" "bus_dmamap_t map" \ "struct mbuf *mbuf" "bus_dmamap_callback2_t *callback" "void *callback_arg" \ "int flags" .Ft int .Fn bus_dmamap_load_mbuf_sg "bus_dma_tag_t dmat" "bus_dmamap_t map" \ "struct mbuf *mbuf" "bus_dma_segment_t *segs" "int *nsegs" "int flags" .Ft int .Fn bus_dmamap_load_uio "bus_dma_tag_t dmat" "bus_dmamap_t map" \ "struct uio *uio" "bus_dmamap_callback2_t *callback" "void *callback_arg" \ "int flags" .Ft void .Fn bus_dmamap_unload "bus_dma_tag_t dmat" "bus_dmamap_t map" .Ft void .Fn bus_dmamap_sync "bus_dma_tag_t dmat" "bus_dmamap_t map" \ "op" .Ft int .Fn bus_dmamem_alloc "bus_dma_tag_t dmat" "void **vaddr" \ "int flags" "bus_dmamap_t *mapp" .Ft void .Fn bus_dmamem_free "bus_dma_tag_t dmat" "void *vaddr" \ "bus_dmamap_t map" .Sh DESCRIPTION Direct Memory Access (DMA) is a method of transferring data without involving the CPU, thus providing higher performance. A DMA transaction can be achieved between device to memory, device to device, or memory to memory. .Pp The .Nm API is a bus, device, and machine-independent (MI) interface to DMA mechanisms. It provides the client with flexibility and simplicity by abstracting machine dependent issues like setting up DMA mappings, handling cache issues, bus specific features and limitations. .Sh OVERVIEW A tag structure .Vt ( bus_dma_tag_t ) is used to describe the properties of a group of related DMA transactions. One way to view this is that a tag describes the limitations of a DMA engine. For example, if a DMA engine in a device is limited to 32-bit addresses, that limitation is specified by a parameter when creating the tag for that device. Similarly, a tag can be marked as requiring buffers whose addresses are aligned to a specific boundary. .Pp Some devices may require multiple tags to describe DMA transactions with differing properties. For example, a device might require 16-byte alignment of its descriptor ring while permitting arbitrary alignment of I/O buffers. In this case, the driver must create one tag for the descriptor ring and a separate tag for I/O buffers. If a device has restrictions that are common to all DMA transactions in addition to restrictions that differ between unrelated groups of transactions, the driver can first create a .Dq parent tag that decribes the common restrictions. The per-group tags can then inherit these restrictions from this .Dq parent tag rather than having to list them explicitly when creating the per-group tags. .Pp A mapping structure .Vt ( bus_dmamap_t ) represents a mapping of a memory region for DMA. On systems with I/O MMUs, the mapping structure tracks any I/O MMU entries used by a request. For DMA requests that require bounce pages, the mapping tracks the bounce pages used. .Pp To prepare for one or more DMA transactions, a mapping must be bound to a memory region by calling one of the .Fn bus_dmamap_load functions. These functions configure the mapping which can include programming entries in an I/O MMU and/or allocating bounce pages. An output of these functions (either directly or indirectly by invoking a callback routine) is the list of scatter/gather address ranges a consumer can pass to a DMA engine to access the memory region. When a mapping is no longer needed, the mapping must be unloaded via .Fn bus_dmamap_unload . .Pp Before and after each DMA transaction, .Fn bus_dmamap_sync must be used to ensure that the correct data is used by the DMA engine and the CPU. If a mapping uses bounce pages, the sync operations copy data between the bounce pages and the memory region bound to the mapping. Sync operations also handle architecture-specific details such as CPU cache flushing and CPU memory operation ordering. .Sh STATIC VS DYNAMIC .Nm handles two types of DMA transactions: static and dynamic. Static transactions are used with a long-lived memory region that is reused for many transactions such as a descriptor ring. Dynamic transactions are used for transfers to or from transient buffers such as I/O buffers holding a network packet or disk block. Each transaction type uses a different subset of the .Nm API. .Ss Static Transactions Static transactions use memory regions allocated by .Nm . Each static memory region is allocated by calling .Fn bus_dmamem_alloc . This function requires a valid tag describing the properties of the DMA transactions to this region such as alignment or address restrictions. Multiple regions can share a single tag if they share the same restrictions. .Pp .Fn bus_dmamem_alloc allocates a memory region along with a mapping object. The associated tag, memory region, and mapping object must then be passed to .Fn bus_dmamap_load to bind the mapping to the allocated region and obtain the scatter/gather list. .Pp It is expected that .Fn bus_dmamem_alloc will attempt to allocate memory requiring less expensive sync operations (for example, implementations should not allocate regions requiring bounce pages), but sync operations should still be used. For example, a driver should use .Fn bus_dmamap_sync in an interrupt handler before reading descriptor ring entries written by the device prior to the interrupt. .Pp When a consumer is finished with a memory region, it should unload the mapping via .Fn bus_dmamap_unload and then release the memory region and mapping object via .Fn bus_dmamem_free . .Ss Dynamic Transactions Dynamic transactions map memory regions provided by other parts of the system. A tag must be created via .Fn bus_dma_tag_create to describe the DMA transactions to and from these memory regions, and a pool of mapping objects must be allocated via .Fn bus_dmamap_create to track the mappings of any in-flight transactions. .Pp When a consumer wishes to schedule a transaction for a memory region, the consumer must first obtain an unused mapping object from its pool of mapping objects. The memory region must be bound to the mapping object via one of the .Fn bus_dmamap_load functions. Before scheduling the transaction, the consumer should sync the memory region via .Fn bus_dmamap_sync with one or more of the .Dq PRE flags. After the transaction has completed, the consumer should sync the memory region via .Fn bus_dmamap_sync with one or more of the .Dq POST flags. The mapping can then be unloaded via .Fn bus_dmamap_unload , and the mapping object can be returned to the pool of unused mapping objects. .Pp When a consumer is no longer scheduling DMA transactions, the mapping objects should be freed via .Fn bus_dmamap_destroy , and the tag should be freed via .Fn bus_dma_tag_destroy . .Sh STRUCTURES AND TYPES .Bl -tag -width indent .It Vt bus_dma_tag_t A machine-dependent (MD) opaque type that describes the characteristics of a group of DMA transactions. DMA tags are organized into a hierarchy, with each child tag inheriting the restrictions of its parent. This allows all devices along the path of DMA transactions to contribute to the constraints of those transactions. .It Vt bus_dma_template_t A template structure for creating a .Fa bus_dma_tag_t from a set of defaults. Once initialized with .Fn bus_dma_template_init , a driver can over-ride individual fields to suit its needs. The following fields have the indicated values: .Bd -literal alignment 1 boundary 0 lowaddr BUS_SPACE_MAXADDR highaddr BUS_SPACE_MAXADDR maxsize BUS_SPACE_MAXSIZE nsegments BUS_SPACE_UNRESTRICTED maxsegsize BUS_SPACE_MAXSIZE flags 0 lockfunc NULL lockfuncarg NULL .Ed .Pp Descriptions of each field are documented with .Fn bus_dma_tag_create . Note that the .Fa filtfunc and .Fa filtfuncarg attributes of the DMA tag are not supported with templates. .It Vt bus_dma_filter_t Client specified address filter having the format: .Bl -tag -width indent .It Ft int .Fn "client_filter" "void *filtarg" "bus_addr_t testaddr" .El .Pp Address filters can be specified during tag creation to allow for devices whose DMA address restrictions cannot be specified by a single window. The .Fa filtarg argument is specified by the client during tag creation to be passed to all invocations of the callback. The .Fa testaddr argument contains a potential starting address of a DMA mapping. The filter function operates on the set of addresses from .Fa testaddr to .Ql trunc_page(testaddr) + PAGE_SIZE - 1 , inclusive. The filter function should return zero if any mapping in this range can be accommodated by the device and non-zero otherwise. .It Vt bus_dma_segment_t A machine-dependent type that describes individual DMA segments. It contains the following fields: .Bd -literal bus_addr_t ds_addr; bus_size_t ds_len; .Ed .Pp The .Fa ds_addr field contains the device visible address of the DMA segment, and .Fa ds_len contains the length of the DMA segment. Although the DMA segments returned by a mapping call will adhere to all restrictions necessary for a successful DMA operation, some conversion (e.g.\& a conversion from host byte order to the device's byte order) is almost always required when presenting segment information to the device. .It Vt bus_dmamap_t A machine-dependent opaque type describing an individual mapping. One map is used for each memory allocation that will be loaded. Maps can be reused once they have been unloaded. Multiple maps can be associated with one DMA tag. While the value of the map may evaluate to .Dv NULL on some platforms under certain conditions, it should never be assumed that it will be .Dv NULL in all cases. .It Vt bus_dmamap_callback_t Client specified callback for receiving mapping information resulting from the load of a .Vt bus_dmamap_t via .Fn bus_dmamap_load , .Fn bus_dmamap_load_bio or .Fn bus_dmamap_load_ccb . Callbacks are of the format: .Bl -tag -width indent .It Ft void .Fn "client_callback" "void *callback_arg" "bus_dma_segment_t *segs" \ "int nseg" "int error" .El .Pp The .Fa callback_arg is the callback argument passed to dmamap load functions. The .Fa segs and .Fa nseg arguments describe an array of .Vt bus_dma_segment_t structures that represent the mapping. This array is only valid within the scope of the callback function. The success or failure of the mapping is indicated by the .Fa error argument. More information on the use of callbacks can be found in the description of the individual dmamap load functions. .It Vt bus_dmamap_callback2_t Client specified callback for receiving mapping information resulting from the load of a .Vt bus_dmamap_t via .Fn bus_dmamap_load_uio or .Fn bus_dmamap_load_mbuf . .Pp Callback2s are of the format: .Bl -tag -width indent .It Ft void .Fn "client_callback2" "void *callback_arg" "bus_dma_segment_t *segs" \ "int nseg" "bus_size_t mapsize" "int error" .El .Pp Callback2's behavior is the same as .Vt bus_dmamap_callback_t with the addition that the length of the data mapped is provided via .Fa mapsize . .It Vt bus_dmasync_op_t Memory synchronization operation specifier. Bus DMA requires explicit synchronization of memory with its device visible mapping in order to guarantee memory coherency. The .Vt bus_dmasync_op_t allows the type of DMA operation that will be or has been performed to be communicated to the system so that the correct coherency measures are taken. The operations are represented as bitfield flags that can be combined together, though it only makes sense to combine PRE flags or POST flags, not both. See the .Fn bus_dmamap_sync description below for more details on how to use these operations. .Pp All operations specified below are performed from the host memory point of view, where a read implies data coming from the device to the host memory, and a write implies data going from the host memory to the device. Alternatively, the operations can be thought of in terms of driver operations, where reading a network packet or storage sector corresponds to a read operation in .Nm . .Bl -tag -width ".Dv BUS_DMASYNC_POSTWRITE" .It Dv BUS_DMASYNC_PREREAD Perform any synchronization required prior to an update of host memory by the device. .It Dv BUS_DMASYNC_PREWRITE Perform any synchronization required after an update of host memory by the CPU and prior to device access to host memory. .It Dv BUS_DMASYNC_POSTREAD Perform any synchronization required after an update of host memory by the device and prior to CPU access to host memory. .It Dv BUS_DMASYNC_POSTWRITE Perform any synchronization required after device access to host memory. .El .It Vt bus_dma_lock_t Client specified lock/mutex manipulation method. This will be called from within busdma whenever a client lock needs to be manipulated. In its current form, the function will be called immediately before the callback for a DMA load operation that has been deferred with .Dv BUS_DMA_LOCK and immediately after with .Dv BUS_DMA_UNLOCK . If the load operation does not need to be deferred, then it will not be called since the function loading the map should be holding the appropriate locks. This method is of the format: .Bl -tag -width indent .It Ft void .Fn "lockfunc" "void *lockfunc_arg" "bus_dma_lock_op_t op" .El .Pp The .Fa lockfuncarg argument is specified by the client during tag creation to be passed to all invocations of the callback. The .Fa op argument specifies the lock operation to perform. .Pp Two .Vt lockfunc implementations are provided for convenience. .Fn busdma_lock_mutex performs standard mutex operations on the sleep mutex provided via .Fa lockfuncarg . .Fn dflt_lock will generate a system panic if it is called. It is substituted into the tag when .Fa lockfunc is passed as .Dv NULL to .Fn bus_dma_tag_create and is useful for tags that should not be used with deferred load operations. .It Vt bus_dma_lock_op_t Operations to be performed by the client-specified .Fn lockfunc . .Bl -tag -width ".Dv BUS_DMA_UNLOCK" .It Dv BUS_DMA_LOCK Acquires and/or locks the client locking primitive. .It Dv BUS_DMA_UNLOCK Releases and/or unlocks the client locking primitive. .El .El .Sh FUNCTIONS .Bl -tag -width indent .It Fn bus_dma_tag_create "parent" "alignment" "boundary" "lowaddr" \ "highaddr" "*filtfunc" "*filtfuncarg" "maxsize" "nsegments" "maxsegsz" \ "flags" "lockfunc" "lockfuncarg" "*dmat" Allocates a DMA tag, and initializes it according to the arguments provided: .Bl -tag -width ".Fa filtfuncarg" .It Fa parent A parent tag from which to inherit restrictions. The restrictions passed in other arguments can only further tighten the restrictions inherited from the parent tag. .Pp All tags created by a device driver must inherit from the tag returned by .Fn bus_get_dma_tag to honor restrictions between the parent bridge, CPU memory, and the device. .It Fa alignment Alignment constraint, in bytes, of any mappings created using this tag. The alignment must be a power of 2. Hardware that can DMA starting at any address would specify .Em 1 for byte alignment. Hardware requiring DMA transfers to start on a multiple of 4K would specify .Em 4096 . .It Fa boundary Boundary constraint, in bytes, of the target DMA memory region. The boundary indicates the set of addresses, all multiples of the boundary argument, that cannot be crossed by a single .Vt bus_dma_segment_t . The boundary must be a power of 2 and must be no smaller than the maximum segment size. .Ql 0 indicates that there are no boundary restrictions. .It Fa lowaddr , highaddr Bounds of the window of bus address space that .Em cannot be directly accessed by the device. The window contains all addresses greater than .Fa lowaddr and less than or equal to .Fa highaddr . For example, a device incapable of DMA above 4GB, would specify a .Fa highaddr of .Dv BUS_SPACE_MAXADDR and a .Fa lowaddr of .Dv BUS_SPACE_MAXADDR_32BIT . Similarly a device that can only perform DMA to addresses below 16MB would specify a .Fa highaddr of .Dv BUS_SPACE_MAXADDR and a .Fa lowaddr of .Dv BUS_SPACE_MAXADDR_24BIT . Some implementations require that some region of device visible address space, overlapping available host memory, be outside the window. This area of .Ql safe memory is used to bounce requests that would otherwise conflict with the exclusion window. .It Fa filtfunc Optional filter function (may be .Dv NULL ) to be called for any attempt to map memory into the window described by .Fa lowaddr and .Fa highaddr . A filter function is only required when the single window described by .Fa lowaddr and .Fa highaddr cannot adequately describe the constraints of the device. The filter function will be called for every machine page that overlaps the exclusion window. .It Fa filtfuncarg Argument passed to all calls to the filter function for this tag. May be .Dv NULL . .It Fa maxsize Maximum size, in bytes, of the sum of all segment lengths in a given DMA mapping associated with this tag. .It Fa nsegments Number of discontinuities (scatter/gather segments) allowed in a DMA mapped region. If there is no restriction, .Dv BUS_SPACE_UNRESTRICTED may be specified. .It Fa maxsegsz Maximum size, in bytes, of a segment in any DMA mapped region associated with .Fa dmat . .It Fa flags Are as follows: .Bl -tag -width ".Dv BUS_DMA_ALLOCNOW" .It Dv BUS_DMA_ALLOCNOW Pre-allocate enough resources to handle at least one map load operation on this tag. If sufficient resources are not available, .Er ENOMEM is returned. This should not be used for tags that only describe buffers that will be allocated with .Fn bus_dmamem_alloc . Also, due to resource sharing with other tags, this flag does not guarantee that resources will be allocated or reserved exclusively for this tag. It should be treated only as a minor optimization. .It Dv BUS_DMA_COHERENT Indicate that the DMA engine and CPU are cache-coherent. Cached memory may be used to back allocations created by .Fn bus_dmamem_alloc . For .Fn bus_dma_tag_create , the .Dv BUS_DMA_COHERENT flag is currently implemented on arm64. .El .It Fa lockfunc Optional lock manipulation function (may be .Dv NULL ) to be called when busdma needs to manipulate a lock on behalf of the client. If .Dv NULL is specified, .Fn dflt_lock is used. .It Fa lockfuncarg Optional argument to be passed to the function specified by .Fa lockfunc . .It Fa dmat Pointer to a bus_dma_tag_t where the resulting DMA tag will be stored. .El .Pp Returns .Er ENOMEM if sufficient memory is not available for tag creation or allocating mapping resources. .It Fn bus_dma_tag_destroy "dmat" Deallocate the DMA tag .Fa dmat that was created by .Fn bus_dma_tag_create . .Pp Returns .Er EBUSY if any DMA maps remain associated with .Fa dmat or .Ql 0 on success. .It Fn bus_dma_template_init "*template" "parent" Initializes a .Fa bus_dma_template_t structure and associates it with an optional .Fa parent . The .Fa parent argument may be NULL. .It Fn bus_dma_template_tag "*template" "*dmat" Unpacks a template into a tag, and returns the tag via the .Fa dmat . All return values are identical to .Fn bus_dma_tag_create . .It Fn bus_dma_template_clone "*template" "dmat" Clones the fields from a tag to a template. This is useful for cloning tags when paired with .Fn bus_dma_template_tag . A template that is filled in as a clone does not need to be initialized first. .It Fn bus_dmamap_create "dmat" "flags" "*mapp" Allocates and initializes a DMA map. Arguments are as follows: .Bl -tag -width ".Fa nsegments" .It Fa dmat DMA tag. .It Fa flags Are as follows: .Bl -tag -width ".Dv BUS_DMA_COHERENT" .It Dv BUS_DMA_COHERENT Attempt to map the memory loaded with this map such that cache sync operations are as cheap as possible. This flag is typically set on maps when the memory loaded with these will be accessed by both a CPU and a DMA engine, frequently such as control data and as opposed to streamable data such as receive and transmit buffers. Use of this flag does not remove the requirement of using .Fn bus_dmamap_sync , but it may reduce the cost of performing these operations. -For -.Fn bus_dmamap_create , -the -.Dv BUS_DMA_COHERENT -flag is currently implemented on sparc64. .El .It Fa mapp Pointer to a .Vt bus_dmamap_t where the resulting DMA map will be stored. .El .Pp Returns .Er ENOMEM if sufficient memory is not available for creating the map or allocating mapping resources. .It Fn bus_dmamap_destroy "dmat" "map" Frees all resources associated with a given DMA map. Arguments are as follows: .Bl -tag -width ".Fa dmat" .It Fa dmat DMA tag used to allocate .Fa map . .It Fa map The DMA map to destroy. .El .Pp Returns .Er EBUSY if a mapping is still active for .Fa map . .It Fn bus_dmamap_load "dmat" "map" "buf" "buflen" "*callback" \ "callback_arg" "flags" Creates a mapping in device visible address space of .Fa buflen bytes of .Fa buf , associated with the DMA map .Fa map . This call will always return immediately and will not block for any reason. Arguments are as follows: .Bl -tag -width ".Fa buflen" .It Fa dmat DMA tag used to allocate .Fa map . .It Fa map A DMA map without a currently active mapping. .It Fa buf A kernel virtual address pointer to a contiguous (in KVA) buffer, to be mapped into device visible address space. .It Fa buflen The size of the buffer. .It Fa callback Fa callback_arg The callback function, and its argument. This function is called once sufficient mapping resources are available for the DMA operation. If resources are temporarily unavailable, this function will be deferred until later, but the load operation will still return immediately to the caller. Thus, callers should not assume that the callback will be called before the load returns, and code should be structured appropriately to handle this. See below for specific flags and error codes that control this behavior. .It Fa flags Are as follows: .Bl -tag -width ".Dv BUS_DMA_NOWAIT" .It Dv BUS_DMA_NOWAIT The load should not be deferred in case of insufficient mapping resources, and instead should return immediately with an appropriate error. .It Dv BUS_DMA_NOCACHE The generated transactions to and from the virtual page are non-cacheable. -For -.Fn bus_dmamap_load , -the -.Dv BUS_DMA_NOCACHE -flag is currently implemented on sparc64. .El .El .Pp Return values to the caller are as follows: .Bl -tag -width ".Er EINPROGRESS" .It 0 The callback has been called and completed. The status of the mapping has been delivered to the callback. .It Er EINPROGRESS The mapping has been deferred for lack of resources. The callback will be called as soon as resources are available. Callbacks are serviced in FIFO order. .Pp Note that subsequent load operations for the same tag that do not require extra resources will still succeed. This may result in out-of-order processing of requests. If the caller requires the order of requests to be preserved, then the caller is required to stall subsequent requests until a pending request's callback is invoked. .It Er ENOMEM The load request has failed due to insufficient resources, and the caller specifically used the .Dv BUS_DMA_NOWAIT flag. .It Er EINVAL The load request was invalid. The callback has been called and has been provided the same error. This error value may indicate that .Fa dmat , .Fa map , .Fa buf , or .Fa callback were invalid, or .Fa buflen was larger than the .Fa maxsize argument used to create the dma tag .Fa dmat . .El .Pp When the callback is called, it is presented with an error value indicating the disposition of the mapping. Error may be one of the following: .Bl -tag -width ".Er EINPROGRESS" .It 0 The mapping was successful and the .Fa dm_segs callback argument contains an array of .Vt bus_dma_segment_t elements describing the mapping. This array is only valid during the scope of the callback function. .It Er EFBIG A mapping could not be achieved within the segment constraints provided in the tag even though the requested allocation size was less than maxsize. .El .It Fn bus_dmamap_load_bio "dmat" "map" "bio" "callback" "callback_arg" "flags" This is a variation of .Fn bus_dmamap_load which maps buffers pointed to by .Fa bio for DMA transfers. .Fa bio may point to either a mapped or unmapped buffer. .It Fn bus_dmamap_load_ccb "dmat" "map" "ccb" "callback" "callback_arg" "flags" This is a variation of .Fn bus_dmamap_load which maps data pointed to by .Fa ccb for DMA transfers. The data for .Fa ccb may be any of the following types: .Bl -tag -width ".Er CAM_DATA_SG_PADDR" .It CAM_DATA_VADDR The data is a single KVA buffer. .It CAM_DATA_PADDR The data is a single bus address range. .It CAM_DATA_SG The data is a scatter/gather list of KVA buffers. .It CAM_DATA_SG_PADDR The data is a scatter/gather list of bus address ranges. .It CAM_DATA_BIO The data is contained in a .Vt struct bio attached to the CCB. .El .Pp .Fn bus_dmamap_load_ccb supports the following CCB XPT function codes: .Pp .Bl -item -offset indent -compact .It XPT_ATA_IO .It XPT_CONT_TARGET_IO .It XPT_SCSI_IO .El .It Fn bus_dmamap_load_mbuf "dmat" "map" "mbuf" "callback2" "callback_arg" \ "flags" This is a variation of .Fn bus_dmamap_load which maps mbuf chains for DMA transfers. A .Vt bus_size_t argument is also passed to the callback routine, which contains the mbuf chain's packet header length. The .Dv BUS_DMA_NOWAIT flag is implied, thus no callback deferral will happen. .Pp Mbuf chains are assumed to be in kernel virtual address space. .Pp Beside the error values listed for .Fn bus_dmamap_load , .Er EINVAL will be returned if the size of the mbuf chain exceeds the maximum limit of the DMA tag. .It Fn bus_dmamap_load_mbuf_sg "dmat" "map" "mbuf" "segs" "nsegs" "flags" This is just like .Fn bus_dmamap_load_mbuf except that it returns immediately without calling a callback function. It is provided for efficiency. The scatter/gather segment array .Va segs is provided by the caller and filled in directly by the function. The .Va nsegs argument is returned with the number of segments filled in. Returns the same errors as .Fn bus_dmamap_load_mbuf . .It Fn bus_dmamap_load_uio "dmat" "map" "uio" "callback2" "callback_arg" "flags" This is a variation of .Fn bus_dmamap_load which maps buffers pointed to by .Fa uio for DMA transfers. A .Vt bus_size_t argument is also passed to the callback routine, which contains the size of .Fa uio , i.e. .Fa uio->uio_resid . The .Dv BUS_DMA_NOWAIT flag is implied, thus no callback deferral will happen. Returns the same errors as .Fn bus_dmamap_load . .Pp If .Fa uio->uio_segflg is .Dv UIO_USERSPACE , then it is assumed that the buffer, .Fa uio is in .Fa "uio->uio_td->td_proc" Ns 's address space. User space memory must be in-core and wired prior to attempting a map load operation. Pages may be locked using .Xr vslock 9 . .It Fn bus_dmamap_unload "dmat" "map" Unloads a DMA map. Arguments are as follows: .Bl -tag -width ".Fa dmam" .It Fa dmat DMA tag used to allocate .Fa map . .It Fa map The DMA map that is to be unloaded. .El .Pp .Fn bus_dmamap_unload will not perform any implicit synchronization of DMA buffers. This must be done explicitly by a call to .Fn bus_dmamap_sync prior to unloading the map. .It Fn bus_dmamap_sync "dmat" "map" "op" Performs synchronization of a device visible mapping with the CPU visible memory referenced by that mapping. Arguments are as follows: .Bl -tag -width ".Fa dmat" .It Fa dmat DMA tag used to allocate .Fa map . .It Fa map The DMA mapping to be synchronized. .It Fa op Type of synchronization operation to perform. See the definition of .Vt bus_dmasync_op_t for a description of the acceptable values for .Fa op . .El .Pp The .Fn bus_dmamap_sync function is the method used to ensure that CPU's and device's direct memory access (DMA) to shared memory is coherent. For example, the CPU might be used to set up the contents of a buffer that is to be made available to a device. To ensure that the data are visible via the device's mapping of that memory, the buffer must be loaded and a DMA sync operation of .Dv BUS_DMASYNC_PREWRITE must be performed after the CPU has updated the buffer and before the device access is initiated. If the CPU modifies this buffer again later, another .Dv BUS_DMASYNC_PREWRITE sync operation must be performed before an additional device access. Conversely, suppose a device updates memory that is to be read by a CPU. In this case, the buffer must be loaded, and a DMA sync operation of .Dv BUS_DMASYNC_PREREAD must be performed before the device access is initiated. The CPU will only be able to see the results of this memory update once the DMA operation has completed and a .Dv BUS_DMASYNC_POSTREAD sync operation has been performed. .Pp If read and write operations are not preceded and followed by the appropriate synchronization operations, behavior is undefined. .It Fn bus_dmamem_alloc "dmat" "**vaddr" "flags" "*mapp" Allocates memory that is mapped into KVA at the address returned in .Fa vaddr and that is permanently loaded into the newly created .Vt bus_dmamap_t returned via .Fa mapp . Arguments are as follows: .Bl -tag -width ".Fa alignment" .It Fa dmat DMA tag describing the constraints of the DMA mapping. .It Fa vaddr Pointer to a pointer that will hold the returned KVA mapping of the allocated region. .It Fa flags Flags are defined as follows: .Bl -tag -width ".Dv BUS_DMA_NOWAIT" .It Dv BUS_DMA_WAITOK The routine can safely wait (sleep) for resources. .It Dv BUS_DMA_NOWAIT The routine is not allowed to wait for resources. If resources are not available, .Dv ENOMEM is returned. .It Dv BUS_DMA_COHERENT Attempt to map this memory in a coherent fashion. See .Fn bus_dmamap_create above for a description of this flag. For .Fn bus_dmamem_alloc , the .Dv BUS_DMA_COHERENT -flag is currently implemented on arm, arm64 and sparc64. +flag is currently implemented on arm and arm64. .It Dv BUS_DMA_ZERO Causes the allocated memory to be set to all zeros. .It Dv BUS_DMA_NOCACHE The allocated memory will not be cached in the processor caches. All memory accesses appear on the bus and are executed without reordering. For .Fn bus_dmamem_alloc , the .Dv BUS_DMA_NOCACHE flag is currently implemented on amd64 and i386 where it results in the Strong Uncacheable PAT to be set for the allocated virtual address range. .El .It Fa mapp Pointer to a .Vt bus_dmamap_t where the resulting DMA map will be stored. .El .Pp The size of memory to be allocated is .Fa maxsize as specified in the call to .Fn bus_dma_tag_create for .Fa dmat . .Pp The current implementation of .Fn bus_dmamem_alloc will allocate all requests as a single segment. .Pp An initial load operation is required to obtain the bus address of the allocated memory, and an unload operation is required before freeing the memory, as described below in .Fn bus_dmamem_free . Maps are automatically handled by this function and should not be explicitly allocated or destroyed. .Pp Although an explicit load is not required for each access to the memory referenced by the returned map, the synchronization requirements as described in the .Fn bus_dmamap_sync section still apply and should be used to achieve portability on architectures without coherent buses. .Pp Returns .Er ENOMEM if sufficient memory is not available for completing the operation. .It Fn bus_dmamem_free "dmat" "*vaddr" "map" Frees memory previously allocated by .Fn bus_dmamem_alloc . Any mappings will be invalidated. Arguments are as follows: .Bl -tag -width ".Fa vaddr" .It Fa dmat DMA tag. .It Fa vaddr Kernel virtual address of the memory. .It Fa map DMA map to be invalidated. .El .El .Sh RETURN VALUES Behavior is undefined if invalid arguments are passed to any of the above functions. If sufficient resources cannot be allocated for a given transaction, .Er ENOMEM is returned. All routines that are not of type .Vt void will return 0 on success or an error code on failure as discussed above. .Pp All .Vt void routines will succeed if provided with valid arguments. .Sh LOCKING Two locking protocols are used by .Nm . The first is a private global lock that is used to synchronize access to the bounce buffer pool on the architectures that make use of them. This lock is strictly a leaf lock that is only used internally to .Nm and is not exposed to clients of the API. .Pp The second protocol involves protecting various resources stored in the tag. Since almost all .Nm operations are done through requests from the driver that created the tag, the most efficient way to protect the tag resources is through the lock that the driver uses. In cases where .Nm acts on its own without being called by the driver, the lock primitive specified in the tag is acquired and released automatically. An example of this is when the .Fn bus_dmamap_load callback function is called from a deferred context instead of the driver context. This means that certain .Nm functions must always be called with the same lock held that is specified in the tag. These functions include: .Pp .Bl -item -offset indent -compact .It .Fn bus_dmamap_load .It .Fn bus_dmamap_load_bio .It .Fn bus_dmamap_load_ccb .It .Fn bus_dmamap_load_mbuf .It .Fn bus_dmamap_load_mbuf_sg .It .Fn bus_dmamap_load_uio .It .Fn bus_dmamap_unload .It .Fn bus_dmamap_sync .El .Pp There is one exception to this rule. It is common practice to call some of these functions during driver start-up without any locks held. So long as there is a guarantee of no possible concurrent use of the tag by different threads during this operation, it is safe to not hold a lock for these functions. .Pp Certain .Nm operations should not be called with the driver lock held, either because they are already protected by an internal lock, or because they might sleep due to memory or resource allocation. The following functions must not be called with any non-sleepable locks held: .Pp .Bl -item -offset indent -compact .It .Fn bus_dma_tag_create .It .Fn bus_dmamap_create .It .Fn bus_dmamem_alloc .El .Pp All other functions do not have a locking protocol and can thus be called with or without any system or driver locks held. .Sh SEE ALSO .Xr devclass 9 , .Xr device 9 , .Xr driver 9 , .Xr rman 9 , .Xr vslock 9 .Pp .Rs .%A "Jason R. Thorpe" .%T "A Machine-Independent DMA Framework for NetBSD" .%J "Proceedings of the Summer 1998 USENIX Technical Conference" .%Q "USENIX Association" .%D "June 1998" .Re .Sh HISTORY The .Nm interface first appeared in .Nx 1.3 . .Pp The .Nm API was adopted from .Nx for use in the CAM SCSI subsystem. The alterations to the original API were aimed to remove the need for a .Vt bus_dma_segment_t array stored in each .Vt bus_dmamap_t while allowing callers to queue up on scarce resources. .Sh AUTHORS The .Nm interface was designed and implemented by .An Jason R. Thorpe of the Numerical Aerospace Simulation Facility, NASA Ames Research Center. Additional input on the .Nm design was provided by .An -nosplit .An Chris Demetriou , .An Charles Hannum , .An Ross Harvey , .An Matthew Jacob , .An Jonathan Stone , and .An Matt Thomas . .Pp The .Nm interface in .Fx benefits from the contributions of .An Justin T. Gibbs , .An Peter Wemm , .An Doug Rabson , .An Matthew N. Dodd , .An Sam Leffler , .An Maxime Henrion , .An Jake Burkholder , .An Takahashi Yoshihiro , .An Scott Long and many others. .Pp This manual page was written by .An Hiten M. Pandya and .An Justin T. Gibbs .