Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amount of cards in PCI info block does not match #150

Closed
hrw opened this issue Apr 27, 2023 · 3 comments
Closed

Amount of cards in PCI info block does not match #150

hrw opened this issue Apr 27, 2023 · 3 comments

Comments

@hrw
Copy link

hrw commented Apr 27, 2023

My "sbsa-ref" qemu machine has several PCIe/PCI cards plugged in. ACS ignores host bridge ones and legacy PCI ones.

But it does count PCIe/PCI bridges and then amount of listed cards in PCIE INFO block does not match:

 PCIE_INFO: Number of ECAM regions    :    1 
  Dev bdf 0x000300 type 0x10 RP bdf 0x000300
  Dev bdf 0x000400 type 0x10 RP bdf 0x000400
  Dev bdf 0x000500 type 0x10 RP bdf 0x000500
  Dev bdf 0x000600 type 0x10 RP bdf 0x000600
  Dev bdf 0x010000 type 0x01 RP bdf 0x000300
  Dev bdf 0x020000 type 0x01 RP bdf 0x000400
  Dev bdf 0x030000 type 0x01 RP bdf 0x000500
  Dev bdf 0x040000 type 0x80 RP bdf 0x000600
 PCIE_INFO: Number of BDFs found      :    8
 PCIE_INFO: Number of RCiEP           :    0 
 PCIE_INFO: Number of RCEC            :    0 
 PCIE_INFO: Number of EP              :    3 
 PCIE_INFO: Number of RP              :    4 
 PCIE_INFO: Number of iEP_EP          :    0 
 PCIE_INFO: Number of iEP_RP          :    0 

  ECAM 0:  Base 0xF0000000
  BDF: 0x300
  Seg: 0x0, Bus: 0x00, Dev: 0x03, Func: 0x0, Dev ID: 0x000C, Vendor ID: 0x1B36
  BDF: 0x400
  Seg: 0x0, Bus: 0x00, Dev: 0x04, Func: 0x0, Dev ID: 0x000C, Vendor ID: 0x1B36
  BDF: 0x500
  Seg: 0x0, Bus: 0x00, Dev: 0x05, Func: 0x0, Dev ID: 0x000C, Vendor ID: 0x1B36
  BDF: 0x600
  Seg: 0x0, Bus: 0x00, Dev: 0x06, Func: 0x0, Dev ID: 0x000C, Vendor ID: 0x1B36
  BDF: 0x10000
  Seg: 0x0, Bus: 0x01, Dev: 0x00, Func: 0x0, Dev ID: 0x000D, Vendor ID: 0x1B36
  BDF: 0x20000
  Seg: 0x0, Bus: 0x02, Dev: 0x00, Func: 0x0, Dev ID: 0x1111, Vendor ID: 0x1234
  BDF: 0x30000
  Seg: 0x0, Bus: 0x03, Dev: 0x00, Func: 0x0, Dev ID: 0x10D3, Vendor ID: 0x8086
  BDF: 0x40000
  Seg: 0x0, Bus: 0x04, Dev: 0x00, Func: 0x0, Dev ID: 0x000E, Vendor ID: 0x1B36

8 BDFs found, 3 end point, 4 root port type. One entry is missing - the PCIe/PCI bridge.

My qemu PCI(e) setup:

-device pcie-root-port,id=root_port_1.2,chassis=1,slot=2  \
  -device qemu-xhci,id=usb,bus=root_port_1.2 \
-device pcie-root-port,id=root_port_1.3,chassis=1,slot=3  \
  -device bochs-display,bus=root_port_1.3 \
-device pcie-root-port,id=root_port_1.4,chassis=1,slot=4  \
  -device e1000e,bus=root_port_1.4 \
-device pcie-root-port,id=root_port_1.5,chassis=1,slot=5  \
  -device pcie-pci-bridge,id=pci,bus=root_port_1.5 \
    -device virtio-rng-pci,bus=pci,addr=8 \
@gowthamsiddarthd
Copy link
Collaborator

Hi @hrw,

Thank you for reporting this. This has been fixed by the PR: #150

Regards,
ACS Team

@hrw
Copy link
Author

hrw commented May 5, 2023

 PCIE_INFO: Number of ECAM regions    :    1
 PCIE_INFO: Number of BDFs found      :    8
 PCIE_INFO: Number of RCiEP           :    0
 PCIE_INFO: Number of RCEC            :    0
 PCIE_INFO: Number of EP              :    3
 PCIE_INFO: Number of RP              :    4
 PCIE_INFO: Number of iEP_EP          :    0
 PCIE_INFO: Number of iEP_RP          :    0
 PCIE_INFO: Number of UP of switch    :    0
 PCIE_INFO: Number of DP of switch    :    0
 PCIE_INFO: Number of PCI/PCIe Bridge :    0
 PCIE_INFO: Number of PCIe/PCI Bridge :    1

@hrw hrw closed this as completed May 5, 2023
@hrw
Copy link
Author

hrw commented May 5, 2023

Also for some more complicated setup:

Shell> pci
   Seg  Bus  Dev  Func
   ---  ---  ---  ----
    00   00   00    00 ==> Bridge Device - Host/PCI bridge
             Vendor 1B36 Device 0008 Prog Interface 0
    00   00   01    00 ==> Network Controller - Ethernet controller
             Vendor 8086 Device 10D3 Prog Interface 0
    00   00   02    00 ==> Display Controller - VGA/8514 controller
             Vendor 1234 Device 1111 Prog Interface 0
    00   00   03    00 ==> Bridge Device - PCI/PCI bridge
             Vendor 1B36 Device 000C Prog Interface 0
    00   00   04    00 ==> Bridge Device - PCI/PCI bridge
             Vendor 1B36 Device 000C Prog Interface 0
    00   00   05    00 ==> Bridge Device - PCI/PCI bridge
             Vendor 1B36 Device 000C Prog Interface 0
    00   00   06    00 ==> Bridge Device - PCI/PCI bridge
             Vendor 1B36 Device 000C Prog Interface 0
    00   00   07    00 ==> Bridge Device - PCI/PCI bridge
             Vendor 1B36 Device 000C Prog Interface 0
    00   00   08    00 ==> Bridge Device - Host/PCI bridge
             Vendor 1B36 Device 000B Prog Interface 0
    00   01   00    00 ==> Serial Bus Controllers - USB
             Vendor 1B36 Device 000D Prog Interface 30
    00   02   00    00 ==> Bridge Device - PCI/PCI bridge
             Vendor 1B36 Device 000C Prog Interface 0
    00   03   00    00 ==> Mass Storage Controller - Serial ATA controller
             Vendor 8086 Device 2922 Prog Interface 1
    00   04   00    00 ==> Network Controller - Ethernet controller
             Vendor 8086 Device 10D3 Prog Interface 0
    00   05   00    00 ==> Bridge Device - PCI/PCI bridge
             Vendor 1B36 Device 000E Prog Interface 0
    00   06   08    00 ==> Pre 2.0 device - UNDEFINED
             Vendor 1AF4 Device 1005 Prog Interface 0
    00   07   00    00 ==> Bridge Device - PCI/PCI bridge
             Vendor 104C Device 8232 Prog Interface 0
    00   08   00    00 ==> Bridge Device - PCI/PCI bridge
             Vendor 104C Device 8233 Prog Interface 0
    00   09   00    00 ==> Multimedia Device - Audio device
             Vendor 8086 Device 2415 Prog Interface 0
Shell> fs0:bsa.efi


 BSA Architecture Compliance Suite
          Version 1.0.4

 Starting tests with print level :  3


 Creating Platform Information Tables
 PE_INFO: Number of PE detected       :    4
 GIC INFO: GIC version                :    v3
 GIC_INFO: Number of GICD             :    1
 GIC_INFO: Number of GICR RD          :    1
 GIC_INFO: Number of ITS              :    1
 TIMER_INFO: Number of system timers  :    0
 WATCHDOG_INFO: Number of Watchdogs   :    1
 PCIE_INFO: Number of ECAM regions    :    1
 PCIE_INFO: Number of BDFs found      :    11
 PCIE_INFO: Number of RCiEP           :    0
 PCIE_INFO: Number of RCEC            :    0
 PCIE_INFO: Number of EP              :    2
 PCIE_INFO: Number of RP              :    6
 PCIE_INFO: Number of iEP_EP          :    0
 PCIE_INFO: Number of iEP_RP          :    0
 PCIE_INFO: Number of UP of switch    :    1
 PCIE_INFO: Number of DP of switch    :    1
 PCIE_INFO: Number of PCI/PCIe Bridge :    0
 PCIE_INFO: Number of PCIe/PCI Bridge :    1

Linux says:

~ # lspci -nn
00:00.0 Host bridge [0600]: Red Hat, Inc. QEMU PCIe Host bridge [1b36:0008]
00:01.0 Ethernet controller [0200]: Intel Corporation 82574L Gigabit Network Connection [8086:10d3]
00:02.0 VGA compatible controller [0300]: Device [1234:1111] (rev 02)
00:03.0 Ethernet controller [0200]: Intel Corporation 82576 Gigabit Network Connection [8086:10c9] (rev 01)
00:04.0 PCI bridge [0604]: Red Hat, Inc. QEMU PCIe Root port [1b36:000c]
00:05.0 PCI bridge [0604]: Red Hat, Inc. QEMU PCIe Root port [1b36:000c]
00:06.0 PCI bridge [0604]: Red Hat, Inc. QEMU PCIe Root port [1b36:000c]
00:07.0 PCI bridge [0604]: Red Hat, Inc. QEMU PCIe Root port [1b36:000c]
00:08.0 PCI bridge [0604]: Red Hat, Inc. QEMU PCIe Root port [1b36:000c]
00:09.0 Host bridge [0600]: Red Hat, Inc. QEMU PCIe Expander bridge [1b36:000b]
01:00.0 USB controller [0c03]: Red Hat, Inc. QEMU XHCI Host Controller [1b36:000d] (rev 01)
02:00.0 PCI bridge [0604]: Red Hat, Inc. QEMU PCIe Root port [1b36:000c]
03:00.0 SATA controller [0106]: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] [8086:2922] (rev 02)
04:00.0 Ethernet controller [0200]: Intel Corporation 82574L Gigabit Network Connection [8086:10d3]
05:00.0 PCI bridge [0604]: Red Hat, Inc. Device [1b36:000e]
06:08.0 Unclassified device [00ff]: Red Hat, Inc. Virtio RNG [1af4:1005]
07:00.0 PCI bridge [0604]: Texas Instruments XIO3130 PCI Express Switch (Upstream) [104c:8232] (rev 02)
08:00.0 PCI bridge [0604]: Texas Instruments XIO3130 PCI Express Switch (Downstream) [104c:8233] (rev 01)
09:00.0 Multimedia audio controller [0401]: Intel Corporation 82801AA AC'97 Audio Controller [8086:2415] (rev 01)
~ # lspci -t
-[0000:00]-+-00.0
           +-01.0
           +-02.0
           +-03.0
           +-04.0-[01]----00.0
           +-05.0-[02-03]----00.0-[03]----00.0
           +-06.0-[04]----00.0
           +-07.0-[05-06]----00.0-[06]----08.0
           +-08.0-[07-09]----00.0-[08-09]----00.0-[09]----00.0
           \-09.0

QEMU command (pcie part):

-device igb \
-device pcie-root-port,id=root_port_1.2,chassis=1,slot=2  \
  -device qemu-xhci,id=usb,bus=root_port_1.2 \
-device pcie-root-port,id=root_port_1.3,chassis=1,slot=3  \
  -device bochs-display,bus=root_port_1.3 \
-device pcie-root-port,id=root_port_1.4,chassis=1,slot=4  \
  -device e1000e,bus=root_port_1.4 \
-device pcie-root-port,id=root_port_1.5,chassis=1,slot=5  \
  -device pcie-pci-bridge,id=pci,bus=root_port_1.5 \
    -device virtio-rng-pci,bus=pci,addr=8 \
\
\
-device pcie-root-port,id=root_port_1.12,chassis=1,slot=12  \
  -device x3130-upstream,id=upstream_port1,bus=root_port_1.12 \
    -device xio3130-downstream,id=downstream_port1,bus=upstream_port1,chassis=1,slot=20 \
      -device ac97,bus=downstream_port1 \
\
-device pxb-pcie,id=pcie1,bus_nr=2 \
-device pcie-root-port,id=root_port_2.1,bus=pcie1,chassis=2,slot=1 \
  -device ahci,bus=root_port_2.1 \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants