diff --git a/drivers/pcie/shell.c b/drivers/pcie/shell.c index 0da9aea4da8..8d4eb4dc37a 100644 --- a/drivers/pcie/shell.c +++ b/drivers/pcie/shell.c @@ -29,6 +29,12 @@ static void show_msi(const struct shell *shell, pcie_bdf_t bdf) (data & PCIE_MSI_MCR_64) ? ", 64-bit" : "", (data & PCIE_MSI_MCR_EN) ? ", enabled" : ""); } + + msi = pcie_get_cap(bdf, PCIE_MSIX_CAP_ID); + + if (msi) { + shell_fprintf(shell, SHELL_NORMAL, " MSI-X support\n"); + } #endif } diff --git a/include/drivers/pcie/msi.h b/include/drivers/pcie/msi.h index 4be2db081a5..4067059b598 100644 --- a/include/drivers/pcie/msi.h +++ b/include/drivers/pcie/msi.h @@ -73,10 +73,11 @@ extern u16_t pcie_msi_mdr(unsigned int irq); extern bool pcie_set_msi(pcie_bdf_t bdf, unsigned int irq); /* - * MSI capability ID in the PCI configuration capability list. + * MSI capability IDs in the PCI configuration capability list. */ -#define PCIE_MSI_CAP_ID 05U +#define PCIE_MSI_CAP_ID 0x05U +#define PCIE_MSIX_CAP_ID 0x11U /* * The first word of the MSI capability is shared with the