Page MenuHomeFreeBSD

D49195.id151725.diff
No OneTemporary

D49195.id151725.diff

diff --git a/share/man/man4/pci.4 b/share/man/man4/pci.4
--- a/share/man/man4/pci.4
+++ b/share/man/man4/pci.4
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd October 4, 2022
+.Dd March 1, 2025
.Dt PCI 4
.Os
.Sh NAME
@@ -625,6 +625,10 @@
.El
.Sh DEVICE WIRING
You can wire the device unit at a given location with device.hints.
+.Ss BSF Based Wiring
+Devices may be wired to a Bus / Slot / Function (BSF) address.
+This is the form reported by
+.Xr pciconf 1 .
Entries of the form
.Va hints.<name>.<unit>.at="pci<B>:<S>:<F>"
or
@@ -660,8 +664,10 @@
.Ss Examples
Given the following lines in
.Pa /boot/device.hints :
-.Cd hint.nvme.3.at="pci6:0:0"
-.Cd hint.igb.8.at="pci14:0:0"
+.Bd -literal -offset indent -compact
+hint.nvme.3.at="pci6:0:0"
+hint.igb.8.at="pci14:0:0"
+.Ed
If there is a device that supports
.Xr igb 4
at PCI bus 14 slot 0 function 0,
@@ -676,6 +682,32 @@
If other igb or nvme cards are located elsewhere, they will be
assigned their unit numbers sequentially, skipping the unit numbers
that have 'at' hints.
+.Ss Location Based Wiring
+While simple to locate where to place a device for BSF wiring, the
+bus number of that is not invariant.
+Any number of changes to the devices within the system can cause
+this value to not be invariant from boot to boot.
+The UEFI Standard defines a device path that's based only on the invariant parts
+of the address: The root complex (domain), the slot number and the function.
+These paths are hard to construct by hand, please see
+.Xr devctl 8
+.Sq getpath
+command with a
+.Sq UEFI
+locator.
+The above example could also be expressed as
+.Bd -literal -offset indent -compact
+hint.nvme.3.at="PciRoot(0x2)/Pci(0x1,0x3)/Pci(0x0,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)"
+hint.nvme.8.at="PciRoot(0x1)/Pci(0x2,0x2)/Pci(0x0,0x0)/Pci(0x0,0x0)"
+.Ed
+The advantage of this notation is that you can specify the exact location a
+device will be at.
+For deployments of multiple systems with the same configuration, this can be
+helpful in managing the devices.
+However, even slight variation in motherboards can cause the path to change
+substantially.
+It is also less natural think of the UEFI Device Paths since so little else
+will report it.
.Sh FILES
.Bl -tag -width /dev/pci -compact
.It Pa /dev/pci

File Metadata

Mime Type
text/plain
Expires
Fri, Aug 21, 6:09 PM (8 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37045043
Default Alt Text
D49195.id151725.diff (2 KB)

Event Timeline