OSDN Git Service

e500: fix pci host bridge class/type
authorMichael Davidsaver <mdavidsaver@gmail.com>
Sun, 26 Nov 2017 21:59:05 +0000 (15:59 -0600)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 14 Dec 2017 22:49:24 +0000 (09:49 +1100)
commit67113c03423a23e60915574275aed7d60e9f85e1
tree8a9faf4a056b0969bbb26f84c305973c8a6081dd
parentdf592270447317d70c7f6ab204bbab27db1dee21
e500: fix pci host bridge class/type

Correct some confusion wrt. the PCI facing
side of the PCI host bridge (not PCIe root complex).
The ref. manual for the mpc8533 (as well as
mpc8540 and mpc8540) give the class code as
PCI_CLASS_PROCESSOR_POWERPC.
While the PCI_HEADER_TYPE field is oddly omitted,
the tables in the "PCI Configuration Header"
section shows a type 0 layout using all 6 BAR
registers (as 2x 32, and 2x 64 bit regions)

So 997505065dc92e533debf5cb23012ba4e673d387
seems to be in error.  Although there was
perhaps some confusion as the mpc8533
has a separate PCIe root complex.
With PCIe, a root complex has PCI_HEADER_TYPE=1.

Neither the PCI host bridge, nor the PCIe
root complex advertise class PCI_CLASS_BRIDGE_PCI.

This was confusing Linux guests, which try
to interpret the host bridge as a pci-pci
bridge, but get confused and re-enumerate
the bus when the primary/secondary/subordinate
bus registers don't have valid values.

Signed-off-by: Michael Davidsaver <mdavidsaver@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/pci-host/ppce500.c