On Mon, 8 Apr 2024 13:58:00 +0200
Marcin Juszkiewicz <marcin.juszkiew...@linaro.org> wrote:

> For quite a while I am experimenting with PCI Express setup on SBSA-Ref 
> system. And finally decided to write.
> 
> We want to play with NUMA setup and "pxb-pcie" can be assigned to NUMA 
> node other than cpu0 one. But adding it makes other cards dissapear...
> 
> When I boot sbsa-ref I have plain PCIe setup:
> 
> (qemu) info pci
>    Bus  0, device   0, function 0:
>      Host bridge: PCI device 1b36:0008
>        PCI subsystem 1af4:1100
>        id ""
>    Bus  0, device   1, function 0:
>      Ethernet controller: PCI device 8086:10d3
>        PCI subsystem 8086:0000
>        IRQ 255, pin A
>        BAR0: 32 bit memory at 0xffffffffffffffff [0x0001fffe].
>        BAR1: 32 bit memory at 0xffffffffffffffff [0x0001fffe].
>        BAR2: I/O at 0xffffffffffffffff [0x001e].
>        BAR3: 32 bit memory at 0xffffffffffffffff [0x00003ffe].
>        BAR6: 32 bit memory at 0xffffffffffffffff [0x0003fffe].
>        id ""
>    Bus  0, device   2, function 0:
>      Display controller: PCI device 1234:1111
>        PCI subsystem 1af4:1100
>        BAR0: 32 bit prefetchable memory at 0x80000000 [0x80ffffff].
>        BAR2: 32 bit memory at 0x81084000 [0x81084fff].
>        BAR6: 32 bit memory at 0xffffffffffffffff [0x00007ffe].
>        id ""
> 
> Adding extra PCIe card works fine - both just "igb" and "igb" with 
> "pcie-root-port".
> 
> But adding "pcie-root-port" + "igb" and then "pxb-pcie" makes "igb" 
> dissapear:
> 
> ../code/qemu/build/qemu-system-aarch64
> -monitor telnet::45454,server,nowait
> -serial stdio
> -device pcie-root-port,id=ULyWl,slot=0,chassis=0
> -device igb,bus=ULyWl
> -device pxb-pcie,bus_nr=1

That's setting the base bus number to 1.  Very likely to clash with the bus
number for the bus below the root port.

Set it to bu_nr=128 or something like that.

There is no sanity checking for PXBs because the bus enumeration is
an EDK2 problem in general - short of enumerating the buses in QEMU
there isn't a way for it to tell.

J

Reply via email to