From e555db5bda1bd61cfe79bc0e9ee7e7d03c0a9abb Mon Sep 17 00:00:00 2001 From: Travis Geiselbrecht Date: Sun, 27 Feb 2022 19:36:59 -0800 Subject: [PATCH] [bus][pci] at least register that MSIX is available Doesn't yet have support for it, but set the bool and remember it was present when scanning devices. --- dev/bus/pci/bus_mgr/device.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dev/bus/pci/bus_mgr/device.cpp b/dev/bus/pci/bus_mgr/device.cpp index dea41f2d..2b0402fe 100644 --- a/dev/bus/pci/bus_mgr/device.cpp +++ b/dev/bus/pci/bus_mgr/device.cpp @@ -120,7 +120,11 @@ void device::dump(size_t indent) { printf(" "); } char str[14]; - printf("dev %s %04hx:%04hx\n", pci_loc_string(loc_, str), config_.vendor_id, config_.device_id); + printf("dev %s vid:pid %04hx:%04hx base:sub:intr %hhu:%hhu:%hhu %s%s\n", + pci_loc_string(loc_, str), config_.vendor_id, config_.device_id, + base_class(), sub_class(), interface(), + has_msi() ? "msi " : "", + has_msix() ? "msix " : ""); for (size_t b = 0; b < countof(bars_); b++) { if (bars_[b].valid) { for (size_t i = 0; i < indent + 1; i++) { @@ -246,8 +250,7 @@ status_t device::init_msix_capability(capability *cap) { pci_read_config_word(loc(), cap->config_offset + 8, &cap_buf[2]); //hexdump(cap_buf, sizeof(cap_buf)); - // TODO: we dont really support msi-x right now - return ERR_NOT_IMPLEMENTED; + return NO_ERROR; } status_t device::allocate_irq(uint *irq) {