- // Note that Virtualbox have to use ICH9 chipset for MSI support.
- // Qemu seems ok with default PIIX3, Bochs is pending to test...
- // See https://www.virtualbox.org/manual/ch03.html (section 3.5.1)
- pci_reg_t status =
- pci_read_cspace(device->cspace_base, PCI_REG_STATUS_CMD) >> 16;
+ /*
+ As a PCI bridge/root complex can be initialised from device tree node,
+ in that case, general information such as routing, rid remapping,
+ are vital to all msi setup of all peripherals under it.
+
+ Therefore, a wrapper around isrm_msi_* is needed in order to
+ improve overall readability and usability, where the bridge
+ device instance that contain these information will be
+ automatically passed to the underlay as credential to perform
+ configuration.
+ */
+
+ msienv_t env;
+
+ env = isrm_msi_start(pci_bridge);
+ isrm_msi_set_sideband(env, pci_requester_id(probe));