1d9aed21cSWarner Losh.\" 252467047SWarner Losh.\" Copyright (c) 2017 Netflix, Inc. 3d9aed21cSWarner Losh.\" 4d9aed21cSWarner Losh.\" Redistribution and use in source and binary forms, with or without 5d9aed21cSWarner Losh.\" modification, are permitted provided that the following conditions 6d9aed21cSWarner Losh.\" are met: 7d9aed21cSWarner Losh.\" 1. Redistributions of source code must retain the above copyright 8d9aed21cSWarner Losh.\" notice, this list of conditions and the following disclaimer. 9d9aed21cSWarner Losh.\" 2. Redistributions in binary form must reproduce the above copyright 10d9aed21cSWarner Losh.\" notice, this list of conditions and the following disclaimer in the 11d9aed21cSWarner Losh.\" documentation and/or other materials provided with the distribution. 12d9aed21cSWarner Losh.\" 13d9aed21cSWarner Losh.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR 14d9aed21cSWarner Losh.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 15d9aed21cSWarner Losh.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 16d9aed21cSWarner Losh.\" IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, 17d9aed21cSWarner Losh.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 18d9aed21cSWarner Losh.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19d9aed21cSWarner Losh.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20d9aed21cSWarner Losh.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21d9aed21cSWarner Losh.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22d9aed21cSWarner Losh.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23d9aed21cSWarner Losh.\" 24a1df36f1SBjoern A. Zeeb.Dd August 13, 2023 25d9aed21cSWarner Losh.Dt DEVMATCH 8 26d9aed21cSWarner Losh.Os 27d9aed21cSWarner Losh.Sh NAME 28b98c7519SWarner Losh.Nm devmatch 29d9aed21cSWarner Losh.Nd print information about unattached devices 30d9aed21cSWarner Losh.Sh SYNOPSIS 31d9aed21cSWarner 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 39d9aed21cSWarner Losh.Sh DESCRIPTION 40d9aed21cSWarner LoshThe 41d9aed21cSWarner Losh.Nm 42d9aed21cSWarner Loshutility, without any arguments, prints all the kernel modules it has 43d9aed21cSWarner Loshfound for all the unattached, enabled devices in the system. 44d9aed21cSWarner Losh.Bl -tag -width 20m 45d9aed21cSWarner Losh.It Fl a Fl -all 46d9aed21cSWarner LoshInclude all devices, not just the ones that are unattached. 47d9aed21cSWarner Losh.It Fl d Fl -dump 48d9aed21cSWarner LoshProduce a human readable dump of the 49d9aed21cSWarner Losh.Pa linker.hints 50d9aed21cSWarner 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. 65d9aed21cSWarner Losh.It Fl u Fl -unbound 66d9aed21cSWarner LoshAttempt to produce a list of those drivers with PNP info whose driver 67aed4e355SWarner Loshtables with that PNP info cannot be found. 68d9aed21cSWarner Losh.It Fl v Fl -verbose 69d9aed21cSWarner LoshProduce more verbose output. 70d9aed21cSWarner Losh.El 71d9aed21cSWarner 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 81d9aed21cSWarner Losh.Sh BUGS 82d9aed21cSWarner LoshThe kernel has hints in it, but we exclude it from the list of modules 83d9aed21cSWarner Loshto suggest for unmatched devices. 84d9aed21cSWarner LoshWe exclude it when suggesting drivers, but include it when looking for 85d9aed21cSWarner Loshunbound devices or producing a full dump of 86d9aed21cSWarner Losh.Pa linker.hints . 87d9aed21cSWarner LoshThis can be confusing. 88d9aed21cSWarner Losh.Pp 89d9aed21cSWarner LoshSome modules are hard links in 90d9aed21cSWarner Losh.Pa /boot/kernel 91d9aed21cSWarner Loshand will be reported twice. 92d9aed21cSWarner Losh.Pp 93d9aed21cSWarner LoshThe PNP string's attributes are evaluated once per PNP entry on that 94d9aed21cSWarner Loshbus rather than once. 95d9aed21cSWarner Losh.Pp 965cc5c925SPau AmmaThe term PNP is overloaded in 975cc5c925SPau Amma.Fx . 98d9aed21cSWarner LoshIt means, generically, the identifying data the bus provides about a 99d9aed21cSWarner Loshdevice. 1007a71b350SYi-Chen LiWhile this includes old ISA PNP identifiers, it also includes the 101d9aed21cSWarner Loshlogical equivalent in USB, PCI, and others. 102d9aed21cSWarner Losh.Pp 103d9aed21cSWarner LoshMany drivers currently lack proper PNP table decorations and need to 104d9aed21cSWarner Loshbe updated. 105