Clarification on PCI BusID in https://docs.freebsd.org/en/books/handbook/x11/#x-config-gpu

I'm starting from scratch and following the docs and looking for clarification. I'm confused by the nVidia pci address changing when entered as a BusID.

In the example, it shows this output of pciconf -lv | grep -B3 display

vgapci0@pci0:0:2:0: [snip}
vendor = 'Intel Corporation'
[snip]
--
vgapci0@pci0:1:0:0: [snip]
vendor = 'NVIDIA Corporation'
[snip]

Then it has the sample 20-drivers.conf

Code:
Section "Device"
    Identifier "Card0"
    Driver     "intel"
    BusID     "pci0:0:2:0"
EndSection

Section "Device"
    Identifier "Card1"
    Driver     "nvidia"
    BusID     "pci0:0:2:1"
EndSection

The nvidia BusID vgapci0@pci0:1:0:0 changes to BusID "pci0:0:2:1"

Is this intentional, i.e. in 20-drivers.conf is the second card's BusID a +1 of the first entry, or should the nvidia's BusID actually be pci0:1:0:0 matching the output of pciconf -lv | grep -B3 display?

I'm configuring X on a Lenovo P14S type 21AK-0044us
pciconf gives Intel Corporation at pci0:0:2:0 and NVIDIA Corporation at pci0:3:0:0.

In 20-drivers.conf would I put nvidia at pci0:3:0:0 from the output of pciconf or at pci0:0:2:1 like in the handbook?
 
In 20-drivers.confwould I put nvidia at pci0:3:0:0from the output of pciconf
Yes pci0:3:0:0 for the NVidia. Use your own PCI bus settings for Intel GPU.
Intel Video commonly resides on pci0:0:2:0

Code:
vgapci0@pci0:0:2:0:    class=0x030000 rev=0x02 hdr=0x00 vendor=0x8086 device=0x3e9b subvendor=0x1028 subdevice=0x0906
    vendor     = 'Intel Corporation'
    device     = 'CoffeeLake-H GT2 [UHD Graphics 630]'
 
So the Intel PCI BUS scheme goes like this generally:

Top Level Motherboard features use this range of addresses.
0:0:0 to 0:0:31
Anything under this set is CPU and Motherboard related. Like the GPU. It uses a subset of pci0:0:0:0 at pci0:0:2:0
Many times motherboard ethernet will have its own PCI Bus Address. They usually start with an 1:0:0 Address.
(Ignore the pci0 parent)
0:0:0 to 254:0:0
This is the range of PCI addresses you may encounter.. Some Dual CPU Motherboards use >=128:0:0 for the second set of PCI Busses.
Under each parent bus are sub devices.
Like an video card might use one address for the video (3:0:0) and HDMI Audio is a sibling at 3:0:1

Most consumer motherboards might only use up to 8:0:0 for PCI BUS addresses. Depending on CPU and available slots.
 
Back
Top