pnv_phb.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * QEMU PowerPC PowerNV Proxy PHB model
  3. *
  4. * Copyright (c) 2022, IBM Corporation.
  5. *
  6. * This code is licensed under the GPL version 2 or later. See the
  7. * COPYING file in the top-level directory.
  8. */
  9. #ifndef PCI_HOST_PNV_PHB_H
  10. #define PCI_HOST_PNV_PHB_H
  11. #include "hw/pci/pcie_host.h"
  12. #include "hw/pci/pcie_port.h"
  13. #include "hw/ppc/pnv.h"
  14. #include "qom/object.h"
  15. typedef struct PnvPhb4PecState PnvPhb4PecState;
  16. struct PnvPHB {
  17. PCIExpressHost parent_obj;
  18. uint32_t chip_id;
  19. uint32_t phb_id;
  20. uint32_t version;
  21. char bus_path[8];
  22. PnvChip *chip;
  23. PnvPhb4PecState *pec;
  24. /* The PHB backend (PnvPHB3, PnvPHB4 ...) being used */
  25. Object *backend;
  26. };
  27. #define TYPE_PNV_PHB "pnv-phb"
  28. OBJECT_DECLARE_SIMPLE_TYPE(PnvPHB, PNV_PHB)
  29. /*
  30. * PHB PCIe Root port
  31. */
  32. #define PNV_PHB3_DEVICE_ID 0x03dc
  33. #define PNV_PHB4_DEVICE_ID 0x04c1
  34. #define PNV_PHB5_DEVICE_ID 0x0652
  35. typedef struct PnvPHBRootPort {
  36. PCIESlot parent_obj;
  37. uint32_t version;
  38. } PnvPHBRootPort;
  39. #define TYPE_PNV_PHB_ROOT_PORT "pnv-phb-root-port"
  40. OBJECT_DECLARE_SIMPLE_TYPE(PnvPHBRootPort, PNV_PHB_ROOT_PORT)
  41. #endif /* PCI_HOST_PNV_PHB_H */