1590682b6SWarner Losh.\" 252467047SWarner Losh.\" Copyright (c) 2017 Netflix, Inc. 3590682b6SWarner Losh.\" 4590682b6SWarner Losh.\" Redistribution and use in source and binary forms, with or without 5590682b6SWarner Losh.\" modification, are permitted provided that the following conditions 6590682b6SWarner Losh.\" are met: 7590682b6SWarner Losh.\" 1. Redistributions of source code must retain the above copyright 8590682b6SWarner Losh.\" notice, this list of conditions and the following disclaimer. 9590682b6SWarner Losh.\" 2. Redistributions in binary form must reproduce the above copyright 10590682b6SWarner Losh.\" notice, this list of conditions and the following disclaimer in the 11590682b6SWarner Losh.\" documentation and/or other materials provided with the distribution. 12590682b6SWarner Losh.\" 13590682b6SWarner Losh.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR 14590682b6SWarner Losh.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 15590682b6SWarner Losh.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 16590682b6SWarner Losh.\" IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, 17590682b6SWarner Losh.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 18590682b6SWarner Losh.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19590682b6SWarner Losh.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20590682b6SWarner Losh.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21590682b6SWarner Losh.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22590682b6SWarner Losh.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23590682b6SWarner Losh.\" 24a1df36f1SBjoern A. Zeeb.Dd August 13, 2023 25590682b6SWarner Losh.Dt DEVMATCH 8 26590682b6SWarner Losh.Os 27590682b6SWarner Losh.Sh NAME 28590682b6SWarner Losh.Nm devmatch 29590682b6SWarner Losh.Nd print information about unattached devices 30590682b6SWarner Losh.Sh SYNOPSIS 31590682b6SWarner Losh.Nm 325cc5c925SPau Amma.Op Fl a | -all 335cc5c925SPau Amma.Op Fl d | -dump 345cc5c925SPau Amma.Op Oo Fl h | -hints Oc Ar file 355cc5c925SPau Amma.Op Oo Fl p | -nomatch Oc Ar event 36a1df36f1SBjoern A. Zeeb.Op Fl q | -quiet 375cc5c925SPau Amma.Op Fl u | -unbound 385cc5c925SPau Amma.Op Fl v | -verbose 39590682b6SWarner Losh.Sh DESCRIPTION 40590682b6SWarner LoshThe 41590682b6SWarner Losh.Nm 42590682b6SWarner Loshutility, without any arguments, prints all the kernel modules it has 43590682b6SWarner Loshfound for all the unattached, enabled devices in the system. 44590682b6SWarner Losh.Bl -tag -width 20m 45590682b6SWarner Losh.It Fl a Fl -all 46590682b6SWarner LoshInclude all devices, not just the ones that are unattached. 47590682b6SWarner Losh.It Fl d Fl -dump 48590682b6SWarner LoshProduce a human readable dump of the 49590682b6SWarner Losh.Pa linker.hints 50590682b6SWarner Loshfile. 513fa2c048SWarner Losh.It Fl h Fl -hints Ar file 523fa2c048SWarner LoshUse the named 533fa2c048SWarner Losh.Ar file 543fa2c048SWarner Loshinstead of 553fa2c048SWarner Losh.Pa linker.hints 563fa2c048SWarner Loshguessed from the current module load path. 573fa2c048SWarner Losh.It Fl p Fl -nomatch Ar event 58d38a8a7aSWarner LoshParse and use a standard NOMATCH event from 59d38a8a7aSWarner Losh.Xr devd 8 60d38a8a7aSWarner Loshfor matching instead of searching the device tree. 61a1df36f1SBjoern A. Zeeb.It Fl q Fl -quiet 62a1df36f1SBjoern A. ZeebSuppress some error messages and simply return a non-zero exit code. 63a1df36f1SBjoern A. ZeebThis is helpful to avoid an endless list of warnings during bootup if 64a1df36f1SBjoern A. Zeebno hints are available. 65590682b6SWarner Losh.It Fl u Fl -unbound 66590682b6SWarner LoshAttempt to produce a list of those drivers with PNP info whose driver 67aed4e355SWarner Loshtables with that PNP info cannot be found. 68590682b6SWarner Losh.It Fl v Fl -verbose 69590682b6SWarner LoshProduce more verbose output. 70590682b6SWarner Losh.El 71590682b6SWarner Losh.Sh SEE ALSO 72a8935083SWarner Losh.Xr rc.conf 5 , 73487340b0SConrad Meyer.Xr devinfo 8 , 74487340b0SConrad Meyer.Xr MODULE_PNP_INFO 9 75919c763aSGordon Bergling.Sh HISTORY 76919c763aSGordon Bergling.Nm 77919c763aSGordon Berglingfirst appeared in 78919c763aSGordon Bergling.Fx 12.0 . 796d6d6c36SGordon Bergling.Sh AUTHORS 806d6d6c36SGordon Bergling.An Warner Losh Aq Mt imp@FreeBSD.org 81590682b6SWarner Losh.Sh BUGS 82590682b6SWarner LoshThe kernel has hints in it, but we exclude it from the list of modules 83590682b6SWarner Loshto suggest for unmatched devices. 84590682b6SWarner LoshWe exclude it when suggesting drivers, but include it when looking for 85590682b6SWarner Loshunbound devices or producing a full dump of 86590682b6SWarner Losh.Pa linker.hints . 87590682b6SWarner LoshThis can be confusing. 88590682b6SWarner Losh.Pp 89590682b6SWarner LoshSome modules are hard links in 90590682b6SWarner Losh.Pa /boot/kernel 91590682b6SWarner Loshand will be reported twice. 92590682b6SWarner Losh.Pp 93590682b6SWarner LoshThe PNP string's attributes are evaluated once per PNP entry on that 94590682b6SWarner Loshbus rather than once. 95590682b6SWarner Losh.Pp 965cc5c925SPau AmmaThe term PNP is overloaded in 975cc5c925SPau Amma.Fx . 98590682b6SWarner LoshIt means, generically, the identifying data the bus provides about a 99590682b6SWarner Loshdevice. 100*7a71b350SYi-Chen LiWhile this includes old ISA PNP identifiers, it also includes the 101590682b6SWarner Loshlogical equivalent in USB, PCI, and others. 102590682b6SWarner Losh.Pp 103590682b6SWarner LoshMany drivers currently lack proper PNP table decorations and need to 104590682b6SWarner Loshbe updated. 105