2
0

pci_expander_bridge.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  1. /*
  2. * PCI Expander Bridge Device Emulation
  3. *
  4. * Copyright (C) 2015 Red Hat Inc
  5. *
  6. * Authors:
  7. * Marcel Apfelbaum <marcel@redhat.com>
  8. *
  9. * This work is licensed under the terms of the GNU GPL, version 2 or later.
  10. * See the COPYING file in the top-level directory.
  11. */
  12. #include "qemu/osdep.h"
  13. #include "qapi/error.h"
  14. #include "hw/pci/pci.h"
  15. #include "hw/pci/pci_bus.h"
  16. #include "hw/pci/pci_host.h"
  17. #include "hw/pci/pcie_port.h"
  18. #include "hw/qdev-properties.h"
  19. #include "hw/pci/pci_bridge.h"
  20. #include "hw/pci-bridge/pci_expander_bridge.h"
  21. #include "hw/cxl/cxl.h"
  22. #include "qemu/range.h"
  23. #include "qemu/error-report.h"
  24. #include "qemu/module.h"
  25. #include "system/numa.h"
  26. #include "hw/boards.h"
  27. #include "qom/object.h"
  28. enum BusType { PCI, PCIE, CXL };
  29. #define TYPE_PXB_BUS "pxb-bus"
  30. typedef struct PXBBus PXBBus;
  31. DECLARE_INSTANCE_CHECKER(PXBBus, PXB_BUS,
  32. TYPE_PXB_BUS)
  33. #define TYPE_PXB_PCIE_BUS "pxb-pcie-bus"
  34. DECLARE_INSTANCE_CHECKER(PXBBus, PXB_PCIE_BUS,
  35. TYPE_PXB_PCIE_BUS)
  36. DECLARE_INSTANCE_CHECKER(PXBBus, PXB_CXL_BUS,
  37. TYPE_PXB_CXL_BUS)
  38. struct PXBBus {
  39. /*< private >*/
  40. PCIBus parent_obj;
  41. /*< public >*/
  42. char bus_path[8];
  43. };
  44. #define TYPE_PXB_PCIE_DEV "pxb-pcie"
  45. OBJECT_DECLARE_SIMPLE_TYPE(PXBPCIEDev, PXB_PCIE_DEV)
  46. static GList *pxb_dev_list;
  47. #define TYPE_PXB_HOST "pxb-host"
  48. CXLComponentState *cxl_get_hb_cstate(PCIHostState *hb)
  49. {
  50. CXLHost *host = PXB_CXL_HOST(hb);
  51. return &host->cxl_cstate;
  52. }
  53. bool cxl_get_hb_passthrough(PCIHostState *hb)
  54. {
  55. CXLHost *host = PXB_CXL_HOST(hb);
  56. return host->passthrough;
  57. }
  58. static int pxb_bus_num(PCIBus *bus)
  59. {
  60. PXBDev *pxb = PXB_DEV(bus->parent_dev);
  61. return pxb->bus_nr;
  62. }
  63. static uint16_t pxb_bus_numa_node(PCIBus *bus)
  64. {
  65. PXBDev *pxb = PXB_DEV(bus->parent_dev);
  66. return pxb->numa_node;
  67. }
  68. static void prop_pxb_uid_get(Object *obj, Visitor *v, const char *name,
  69. void *opaque, Error **errp)
  70. {
  71. uint32_t uid = pci_bus_num(PCI_BUS(obj));
  72. visit_type_uint32(v, name, &uid, errp);
  73. }
  74. static void pxb_bus_class_init(ObjectClass *class, void *data)
  75. {
  76. PCIBusClass *pbc = PCI_BUS_CLASS(class);
  77. pbc->bus_num = pxb_bus_num;
  78. pbc->numa_node = pxb_bus_numa_node;
  79. object_class_property_add(class, "acpi_uid", "uint32",
  80. prop_pxb_uid_get, NULL, NULL, NULL);
  81. object_class_property_set_description(class, "acpi_uid",
  82. "ACPI Unique ID used to distinguish this PCI Host Bridge / ACPI00016");
  83. }
  84. static const TypeInfo pxb_bus_info = {
  85. .name = TYPE_PXB_BUS,
  86. .parent = TYPE_PCI_BUS,
  87. .instance_size = sizeof(PXBBus),
  88. .class_init = pxb_bus_class_init,
  89. };
  90. static const TypeInfo pxb_pcie_bus_info = {
  91. .name = TYPE_PXB_PCIE_BUS,
  92. .parent = TYPE_PCIE_BUS,
  93. .instance_size = sizeof(PXBBus),
  94. .class_init = pxb_bus_class_init,
  95. };
  96. static const TypeInfo pxb_cxl_bus_info = {
  97. .name = TYPE_PXB_CXL_BUS,
  98. .parent = TYPE_CXL_BUS,
  99. .instance_size = sizeof(PXBBus),
  100. .class_init = pxb_bus_class_init,
  101. };
  102. static const char *pxb_host_root_bus_path(PCIHostState *host_bridge,
  103. PCIBus *rootbus)
  104. {
  105. PXBBus *bus = pci_bus_is_cxl(rootbus) ?
  106. PXB_CXL_BUS(rootbus) :
  107. pci_bus_is_express(rootbus) ? PXB_PCIE_BUS(rootbus) :
  108. PXB_BUS(rootbus);
  109. snprintf(bus->bus_path, 8, "0000:%02x", pxb_bus_num(rootbus));
  110. return bus->bus_path;
  111. }
  112. static char *pxb_host_ofw_unit_address(const SysBusDevice *dev)
  113. {
  114. const PCIHostState *pxb_host;
  115. const PCIBus *pxb_bus;
  116. const PXBDev *pxb_dev;
  117. int position;
  118. const DeviceState *pxb_dev_base;
  119. const PCIHostState *main_host;
  120. const SysBusDevice *main_host_sbd;
  121. pxb_host = PCI_HOST_BRIDGE(dev);
  122. pxb_bus = pxb_host->bus;
  123. pxb_dev = PXB_DEV(pxb_bus->parent_dev);
  124. position = g_list_index(pxb_dev_list, pxb_dev);
  125. assert(position >= 0);
  126. pxb_dev_base = DEVICE(pxb_dev);
  127. main_host = PCI_HOST_BRIDGE(pxb_dev_base->parent_bus->parent);
  128. main_host_sbd = SYS_BUS_DEVICE(main_host);
  129. if (main_host_sbd->num_mmio > 0) {
  130. return g_strdup_printf(HWADDR_FMT_plx ",%x",
  131. main_host_sbd->mmio[0].addr, position + 1);
  132. }
  133. if (main_host_sbd->num_pio > 0) {
  134. return g_strdup_printf("i%04x,%x",
  135. main_host_sbd->pio[0], position + 1);
  136. }
  137. return NULL;
  138. }
  139. static void pxb_host_class_init(ObjectClass *class, void *data)
  140. {
  141. DeviceClass *dc = DEVICE_CLASS(class);
  142. SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(class);
  143. PCIHostBridgeClass *hc = PCI_HOST_BRIDGE_CLASS(class);
  144. dc->fw_name = "pci";
  145. /* Reason: Internal part of the pxb/pxb-pcie device, not usable by itself */
  146. dc->user_creatable = false;
  147. sbc->explicit_ofw_unit_address = pxb_host_ofw_unit_address;
  148. hc->root_bus_path = pxb_host_root_bus_path;
  149. }
  150. static const TypeInfo pxb_host_info = {
  151. .name = TYPE_PXB_HOST,
  152. .parent = TYPE_PCI_HOST_BRIDGE,
  153. .class_init = pxb_host_class_init,
  154. };
  155. static void pxb_cxl_realize(DeviceState *dev, Error **errp)
  156. {
  157. SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
  158. CXLHost *cxl = PXB_CXL_HOST(dev);
  159. CXLComponentState *cxl_cstate = &cxl->cxl_cstate;
  160. struct MemoryRegion *mr = &cxl_cstate->crb.component_registers;
  161. cxl_component_register_block_init(OBJECT(dev), cxl_cstate,
  162. TYPE_PXB_CXL_HOST);
  163. sysbus_init_mmio(sbd, mr);
  164. }
  165. /*
  166. * Host bridge realization has no means of knowning state associated
  167. * with a particular machine. As such, it is nececssary to delay
  168. * final setup of the host bridge register space until later in the
  169. * machine bring up.
  170. */
  171. void pxb_cxl_hook_up_registers(CXLState *cxl_state, PCIBus *bus, Error **errp)
  172. {
  173. PXBCXLDev *pxb = PXB_CXL_DEV(pci_bridge_get_device(bus));
  174. CXLHost *cxl = pxb->cxl_host_bridge;
  175. CXLComponentState *cxl_cstate = &cxl->cxl_cstate;
  176. struct MemoryRegion *mr = &cxl_cstate->crb.component_registers;
  177. hwaddr offset;
  178. offset = memory_region_size(mr) * cxl_state->next_mr_idx;
  179. if (offset > memory_region_size(&cxl_state->host_mr)) {
  180. error_setg(errp, "Insufficient space for pxb cxl host register space");
  181. return;
  182. }
  183. memory_region_add_subregion(&cxl_state->host_mr, offset, mr);
  184. cxl_state->next_mr_idx++;
  185. }
  186. static void pxb_cxl_host_class_init(ObjectClass *class, void *data)
  187. {
  188. DeviceClass *dc = DEVICE_CLASS(class);
  189. PCIHostBridgeClass *hc = PCI_HOST_BRIDGE_CLASS(class);
  190. hc->root_bus_path = pxb_host_root_bus_path;
  191. dc->fw_name = "cxl";
  192. dc->realize = pxb_cxl_realize;
  193. /* Reason: Internal part of the pxb/pxb-pcie device, not usable by itself */
  194. dc->user_creatable = false;
  195. }
  196. /*
  197. * This is a device to handle the MMIO for a CXL host bridge. It does nothing
  198. * else.
  199. */
  200. static const TypeInfo cxl_host_info = {
  201. .name = TYPE_PXB_CXL_HOST,
  202. .parent = TYPE_PCI_HOST_BRIDGE,
  203. .instance_size = sizeof(CXLHost),
  204. .class_init = pxb_cxl_host_class_init,
  205. };
  206. /*
  207. * Registers the PXB bus as a child of pci host root bus.
  208. */
  209. static void pxb_register_bus(PCIDevice *dev, PCIBus *pxb_bus, Error **errp)
  210. {
  211. PCIBus *bus = pci_get_bus(dev);
  212. int pxb_bus_num = pci_bus_num(pxb_bus);
  213. if (bus->parent_dev) {
  214. error_setg(errp, "PXB devices can be attached only to root bus");
  215. return;
  216. }
  217. QLIST_FOREACH(bus, &bus->child, sibling) {
  218. if (pci_bus_num(bus) == pxb_bus_num) {
  219. error_setg(errp, "Bus %d is already in use", pxb_bus_num);
  220. return;
  221. }
  222. }
  223. QLIST_INSERT_HEAD(&pci_get_bus(dev)->child, pxb_bus, sibling);
  224. }
  225. static int pxb_map_irq_fn(PCIDevice *pci_dev, int pin)
  226. {
  227. PCIDevice *pxb = pci_get_bus(pci_dev)->parent_dev;
  228. /*
  229. * First carry out normal swizzle to handle
  230. * multiple root ports on a pxb instance.
  231. */
  232. pin = pci_swizzle_map_irq_fn(pci_dev, pin);
  233. /*
  234. * The bios does not index the pxb slot number when
  235. * it computes the IRQ because it resides on bus 0
  236. * and not on the current bus.
  237. * However QEMU routes the irq through bus 0 and adds
  238. * the pxb slot to the IRQ computation of the PXB
  239. * device.
  240. *
  241. * Synchronize between bios and QEMU by canceling
  242. * pxb's effect.
  243. */
  244. return pin - PCI_SLOT(pxb->devfn);
  245. }
  246. static void pxb_cxl_dev_reset(DeviceState *dev)
  247. {
  248. CXLHost *cxl = PXB_CXL_DEV(dev)->cxl_host_bridge;
  249. CXLComponentState *cxl_cstate = &cxl->cxl_cstate;
  250. PCIHostState *hb = PCI_HOST_BRIDGE(cxl);
  251. uint32_t *reg_state = cxl_cstate->crb.cache_mem_registers;
  252. uint32_t *write_msk = cxl_cstate->crb.cache_mem_regs_write_mask;
  253. int dsp_count = 0;
  254. cxl_component_register_init_common(reg_state, write_msk, CXL2_RC);
  255. /*
  256. * The CXL specification allows for host bridges with no HDM decoders
  257. * if they only have a single root port.
  258. */
  259. if (!PXB_CXL_DEV(dev)->hdm_for_passthrough) {
  260. dsp_count = pcie_count_ds_ports(hb->bus);
  261. }
  262. /* Initial reset will have 0 dsp so wait until > 0 */
  263. if (dsp_count == 1) {
  264. cxl->passthrough = true;
  265. /* Set Capability ID in header to NONE */
  266. ARRAY_FIELD_DP32(reg_state, CXL_HDM_CAPABILITY_HEADER, ID, 0);
  267. } else {
  268. ARRAY_FIELD_DP32(reg_state, CXL_HDM_DECODER_CAPABILITY, TARGET_COUNT,
  269. 8);
  270. }
  271. }
  272. static gint pxb_compare(gconstpointer a, gconstpointer b)
  273. {
  274. const PXBDev *pxb_a = a, *pxb_b = b;
  275. return pxb_a->bus_nr < pxb_b->bus_nr ? -1 :
  276. pxb_a->bus_nr > pxb_b->bus_nr ? 1 :
  277. 0;
  278. }
  279. static bool pxb_dev_realize_common(PCIDevice *dev, enum BusType type,
  280. Error **errp)
  281. {
  282. PXBDev *pxb = PXB_DEV(dev);
  283. DeviceState *ds, *bds = NULL;
  284. PCIBus *bus;
  285. const char *dev_name = NULL;
  286. Error *local_err = NULL;
  287. MachineState *ms = MACHINE(qdev_get_machine());
  288. if (ms->numa_state == NULL) {
  289. error_setg(errp, "NUMA is not supported by this machine-type");
  290. return false;
  291. }
  292. if (pxb->numa_node != NUMA_NODE_UNASSIGNED &&
  293. pxb->numa_node >= ms->numa_state->num_nodes) {
  294. error_setg(errp, "Illegal numa node %d", pxb->numa_node);
  295. return false;
  296. }
  297. if (dev->qdev.id && *dev->qdev.id) {
  298. dev_name = dev->qdev.id;
  299. }
  300. ds = qdev_new(type == CXL ? TYPE_PXB_CXL_HOST : TYPE_PXB_HOST);
  301. if (type == PCIE) {
  302. bus = pci_root_bus_new(ds, dev_name, NULL, NULL, 0, TYPE_PXB_PCIE_BUS);
  303. } else if (type == CXL) {
  304. bus = pci_root_bus_new(ds, dev_name, NULL, NULL, 0, TYPE_PXB_CXL_BUS);
  305. bus->flags |= PCI_BUS_CXL;
  306. PXB_CXL_DEV(dev)->cxl_host_bridge = PXB_CXL_HOST(ds);
  307. } else {
  308. bus = pci_root_bus_new(ds, "pxb-internal", NULL, NULL, 0, TYPE_PXB_BUS);
  309. bds = qdev_new("pci-bridge");
  310. bds->id = g_strdup(dev_name);
  311. qdev_prop_set_uint8(bds, PCI_BRIDGE_DEV_PROP_CHASSIS_NR, pxb->bus_nr);
  312. qdev_prop_set_bit(bds, PCI_BRIDGE_DEV_PROP_SHPC, false);
  313. }
  314. bus->parent_dev = dev;
  315. bus->address_space_mem = pci_get_bus(dev)->address_space_mem;
  316. bus->address_space_io = pci_get_bus(dev)->address_space_io;
  317. bus->map_irq = pxb_map_irq_fn;
  318. PCI_HOST_BRIDGE(ds)->bus = bus;
  319. PCI_HOST_BRIDGE(ds)->bypass_iommu = pxb->bypass_iommu;
  320. pxb_register_bus(dev, bus, &local_err);
  321. if (local_err) {
  322. error_propagate(errp, local_err);
  323. goto err_register_bus;
  324. }
  325. sysbus_realize_and_unref(SYS_BUS_DEVICE(ds), &error_fatal);
  326. if (bds) {
  327. qdev_realize_and_unref(bds, &bus->qbus, &error_fatal);
  328. }
  329. pci_word_test_and_set_mask(dev->config + PCI_STATUS,
  330. PCI_STATUS_66MHZ | PCI_STATUS_FAST_BACK);
  331. pci_config_set_class(dev->config, PCI_CLASS_BRIDGE_HOST);
  332. pxb_dev_list = g_list_insert_sorted(pxb_dev_list, pxb, pxb_compare);
  333. return true;
  334. err_register_bus:
  335. object_unref(OBJECT(bds));
  336. object_unparent(OBJECT(bus));
  337. object_unref(OBJECT(ds));
  338. return false;
  339. }
  340. static void pxb_dev_realize(PCIDevice *dev, Error **errp)
  341. {
  342. if (pci_bus_is_express(pci_get_bus(dev))) {
  343. error_setg(errp, "pxb devices cannot reside on a PCIe bus");
  344. return;
  345. }
  346. pxb_dev_realize_common(dev, PCI, errp);
  347. }
  348. static void pxb_dev_exitfn(PCIDevice *pci_dev)
  349. {
  350. PXBDev *pxb = PXB_DEV(pci_dev);
  351. pxb_dev_list = g_list_remove(pxb_dev_list, pxb);
  352. }
  353. static const Property pxb_dev_properties[] = {
  354. /* Note: 0 is not a legal PXB bus number. */
  355. DEFINE_PROP_UINT8("bus_nr", PXBDev, bus_nr, 0),
  356. DEFINE_PROP_UINT16("numa_node", PXBDev, numa_node, NUMA_NODE_UNASSIGNED),
  357. DEFINE_PROP_BOOL("bypass_iommu", PXBDev, bypass_iommu, false),
  358. };
  359. static void pxb_dev_class_init(ObjectClass *klass, void *data)
  360. {
  361. DeviceClass *dc = DEVICE_CLASS(klass);
  362. PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
  363. k->realize = pxb_dev_realize;
  364. k->exit = pxb_dev_exitfn;
  365. k->vendor_id = PCI_VENDOR_ID_REDHAT;
  366. k->device_id = PCI_DEVICE_ID_REDHAT_PXB;
  367. k->class_id = PCI_CLASS_BRIDGE_HOST;
  368. dc->desc = "PCI Expander Bridge";
  369. device_class_set_props(dc, pxb_dev_properties);
  370. dc->hotpluggable = false;
  371. set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
  372. }
  373. static const TypeInfo pxb_dev_info = {
  374. .name = TYPE_PXB_DEV,
  375. .parent = TYPE_PCI_DEVICE,
  376. .instance_size = sizeof(PXBDev),
  377. .class_init = pxb_dev_class_init,
  378. .interfaces = (InterfaceInfo[]) {
  379. { INTERFACE_CONVENTIONAL_PCI_DEVICE },
  380. { },
  381. },
  382. };
  383. static void pxb_pcie_dev_realize(PCIDevice *dev, Error **errp)
  384. {
  385. if (!pci_bus_is_express(pci_get_bus(dev))) {
  386. error_setg(errp, "pxb-pcie devices cannot reside on a PCI bus");
  387. return;
  388. }
  389. pxb_dev_realize_common(dev, PCIE, errp);
  390. }
  391. static void pxb_pcie_dev_class_init(ObjectClass *klass, void *data)
  392. {
  393. DeviceClass *dc = DEVICE_CLASS(klass);
  394. PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
  395. k->realize = pxb_pcie_dev_realize;
  396. k->exit = pxb_dev_exitfn;
  397. k->vendor_id = PCI_VENDOR_ID_REDHAT;
  398. k->device_id = PCI_DEVICE_ID_REDHAT_PXB_PCIE;
  399. k->class_id = PCI_CLASS_BRIDGE_HOST;
  400. dc->desc = "PCI Express Expander Bridge";
  401. dc->hotpluggable = false;
  402. set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
  403. }
  404. static const TypeInfo pxb_pcie_dev_info = {
  405. .name = TYPE_PXB_PCIE_DEV,
  406. .parent = TYPE_PXB_DEV,
  407. .instance_size = sizeof(PXBPCIEDev),
  408. .class_init = pxb_pcie_dev_class_init,
  409. .interfaces = (InterfaceInfo[]) {
  410. { INTERFACE_CONVENTIONAL_PCI_DEVICE },
  411. { },
  412. },
  413. };
  414. static void pxb_cxl_dev_realize(PCIDevice *dev, Error **errp)
  415. {
  416. /* A CXL PXB's parent bus is still PCIe */
  417. if (!pci_bus_is_express(pci_get_bus(dev))) {
  418. error_setg(errp, "pxb-cxl devices cannot reside on a PCI bus");
  419. return;
  420. }
  421. if (!pxb_dev_realize_common(dev, CXL, errp)) {
  422. return;
  423. }
  424. pxb_cxl_dev_reset(DEVICE(dev));
  425. }
  426. static const Property pxb_cxl_dev_properties[] = {
  427. DEFINE_PROP_BOOL("hdm_for_passthrough", PXBCXLDev, hdm_for_passthrough, false),
  428. };
  429. static void pxb_cxl_dev_class_init(ObjectClass *klass, void *data)
  430. {
  431. DeviceClass *dc = DEVICE_CLASS(klass);
  432. PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
  433. k->realize = pxb_cxl_dev_realize;
  434. k->exit = pxb_dev_exitfn;
  435. /*
  436. * XXX: These types of bridges don't actually show up in the hierarchy so
  437. * vendor, device, class, etc. ids are intentionally left out.
  438. */
  439. dc->desc = "CXL Host Bridge";
  440. device_class_set_props(dc, pxb_cxl_dev_properties);
  441. set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
  442. /* Host bridges aren't hotpluggable. FIXME: spec reference */
  443. dc->hotpluggable = false;
  444. device_class_set_legacy_reset(dc, pxb_cxl_dev_reset);
  445. }
  446. static const TypeInfo pxb_cxl_dev_info = {
  447. .name = TYPE_PXB_CXL_DEV,
  448. .parent = TYPE_PXB_PCIE_DEV,
  449. .instance_size = sizeof(PXBCXLDev),
  450. .class_init = pxb_cxl_dev_class_init,
  451. .interfaces =
  452. (InterfaceInfo[]){
  453. { INTERFACE_CONVENTIONAL_PCI_DEVICE },
  454. {},
  455. },
  456. };
  457. static void pxb_register_types(void)
  458. {
  459. type_register_static(&pxb_bus_info);
  460. type_register_static(&pxb_pcie_bus_info);
  461. type_register_static(&pxb_cxl_bus_info);
  462. type_register_static(&pxb_host_info);
  463. type_register_static(&cxl_host_info);
  464. type_register_static(&pxb_dev_info);
  465. type_register_static(&pxb_pcie_dev_info);
  466. type_register_static(&pxb_cxl_dev_info);
  467. }
  468. type_init(pxb_register_types)