mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
hw/pci: Add pcie_count_ds_port() and pcie_find_port_first() helpers
These two helpers enable host bridges to operate differently depending on the number of downstream ports, in particular if there is only a single port. Useful for CXL where HDM address decoders are allowed to be implicit in the host bridge if there is only a single root port. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20230227153128.8164-2-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
415442a1b4
commit
84344ee2da
2 changed files with 40 additions and 0 deletions
|
@ -41,6 +41,8 @@ struct PCIEPort {
|
|||
void pcie_port_init_reg(PCIDevice *d);
|
||||
|
||||
PCIDevice *pcie_find_port_by_pn(PCIBus *bus, uint8_t pn);
|
||||
PCIDevice *pcie_find_port_first(PCIBus *bus);
|
||||
int pcie_count_ds_ports(PCIBus *bus);
|
||||
|
||||
#define TYPE_PCIE_SLOT "pcie-slot"
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(PCIESlot, PCIE_SLOT)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue