Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
|
#include <zephyr/kernel.h>
#include <zephyr/types.h>
#include <stdbool.h>
#include <zephyr/drivers/pcie/pcie.h>
Go to the source code of this file.
Data Structures | |
struct | msix_vector |
struct | msi_vector |
Macros | |
#define | PCIE_MSI_MCR 0U |
#define | PCIE_MSI_MCR_EN 0x00010000U /* enable MSI */ |
#define | PCIE_MSI_MCR_MMC 0x000E0000U /* Multi Messages Capable mask */ |
#define | PCIE_MSI_MCR_MMC_SHIFT 17 |
#define | PCIE_MSI_MCR_MME 0x00700000U /* mask of # of enabled IRQs */ |
#define | PCIE_MSI_MCR_MME_SHIFT 20 |
#define | PCIE_MSI_MCR_64 0x00800000U /* 64-bit MSI */ |
#define | PCIE_MSI_MAP0 1U |
#define | PCIE_MSI_MAP1_64 2U |
#define | PCIE_MSI_MDR_32 2U |
#define | PCIE_MSI_MDR_64 3U |
#define | PCIE_MSIX_MCR 0U |
#define | PCIE_MSIX_MCR_EN 0x80000000U /* Enable MSI-X */ |
#define | PCIE_MSIX_MCR_FMASK 0x40000000U /* Function Mask */ |
#define | PCIE_MSIX_MCR_TSIZE 0x07FF0000U /* Table size mask */ |
#define | PCIE_MSIX_MCR_TSIZE_SHIFT 16 |
#define | PCIE_MSIR_TABLE_ENTRY_SIZE 16 |
#define | PCIE_MSIX_TR 1U |
#define | PCIE_MSIX_TR_BIR 0x00000007U /* Table BIR mask */ |
#define | PCIE_MSIX_TR_OFFSET 0xFFFFFFF8U /* Offset mask */ |
#define | PCIE_MSIX_PBA 2U |
#define | PCIE_MSIX_PBA_BIR 0x00000007U /* PBA BIR mask */ |
#define | PCIE_MSIX_PBA_OFFSET 0xFFFFFFF8U /* Offset mask */ |
#define | PCIE_VTBL_MA 0U /* Msg Address offset */ |
#define | PCIE_VTBL_MUA 4U /* Msg Upper Address offset */ |
#define | PCIE_VTBL_MD 8U /* Msg Data offset */ |
#define | PCIE_VTBL_VCTRL 12U /* Vector control offset */ |
Typedefs | |
typedef struct msi_vector | msi_vector_t |
Functions | |
uint32_t | pcie_msi_map (unsigned int irq, msi_vector_t *vector, uint8_t n_vector) |
Compute the target address for an MSI posted write. | |
uint16_t | pcie_msi_mdr (unsigned int irq, msi_vector_t *vector) |
Compute the data for an MSI posted write. | |
bool | pcie_msi_enable (pcie_bdf_t bdf, msi_vector_t *vectors, uint8_t n_vector, unsigned int irq) |
Configure the given PCI endpoint to generate MSIs. | |
bool | pcie_is_msi (pcie_bdf_t bdf) |
Check if the given PCI endpoint supports MSI/MSI-X. | |