drivers/pcie/shell: add basic probe for MSI-X capability
This trivial patch extends the PCIe shell to check for and report on a device's ability to use MSI-X interrupt signaling. Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This commit is contained in:
parent
baa8e61e16
commit
ea1e19107c
2 changed files with 9 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue