4.5.4. PCIe#
4.5.4.1. Interface#
Functions
-
void SimbricksPcieIfDefaultParams(struct SimbricksBaseIfParams *params)#
-
SIMBRICKS_BASEIF_GENERIC(SimbricksPcieIfH2D, SimbricksProtoPcieH2D, SimbricksPcieIf)#
Generate queue access functions for both directions
-
SIMBRICKS_BASEIF_GENERIC(SimbricksPcieIfD2H, SimbricksProtoPcieD2H, SimbricksPcieIf)#
-
struct SimbricksPcieIf#
Public Members
-
struct SimbricksBaseIf base#
-
struct SimbricksBaseIf base#
4.5.4.2. Protocol#
Defines
-
SIMBRICKS_PROTO_PCIE_NBARS#
Number of PCI bars
-
SIMBRICKS_PROTO_PCIE_BAR_IO#
in bars.flags: this is an I/O port bar. (otherwise memory)
-
SIMBRICKS_PROTO_PCIE_BAR_64#
in bars.flags: this is a 64-bit bar. (otherwise 32-bit only)
-
SIMBRICKS_PROTO_PCIE_BAR_PF#
in bars.flags: this memory bar is prefetchable
-
SIMBRICKS_PROTO_PCIE_BAR_DUMMY#
in bars.flags: this memory bar is a dummy bar (device doesn’t get MMIO messages for this, but it does get exposed to software. used for MSI-X).
-
SIMBRICKS_PROTO_PCIE_D2H_MSG_READ#
Mask for type value in own_type field
-
SIMBRICKS_PROTO_PCIE_D2H_MSG_WRITE#
-
SIMBRICKS_PROTO_PCIE_D2H_MSG_INTERRUPT#
-
SIMBRICKS_PROTO_PCIE_D2H_MSG_READCOMP#
-
SIMBRICKS_PROTO_PCIE_D2H_MSG_WRITECOMP#
-
SIMBRICKS_PROTO_PCIE_INT_LEGACY_HI#
-
SIMBRICKS_PROTO_PCIE_INT_LEGACY_LO#
-
SIMBRICKS_PROTO_PCIE_INT_MSI#
-
SIMBRICKS_PROTO_PCIE_INT_MSIX#
-
SIMBRICKS_PROTO_PCIE_H2D_MSG_READ#
-
SIMBRICKS_PROTO_PCIE_H2D_MSG_WRITE#
-
SIMBRICKS_PROTO_PCIE_H2D_MSG_READCOMP#
-
SIMBRICKS_PROTO_PCIE_H2D_MSG_WRITECOMP#
-
SIMBRICKS_PROTO_PCIE_H2D_MSG_DEVCTRL#
-
SIMBRICKS_PROTO_PCIE_H2D_MSG_WRITE_POSTED#
-
SIMBRICKS_PROTO_PCIE_CTRL_INTX_EN#
-
SIMBRICKS_PROTO_PCIE_CTRL_MSI_EN#
-
SIMBRICKS_PROTO_PCIE_CTRL_MSIX_EN#
Functions
- struct SimbricksProtoPcieDevIntro __attribute__ ((packed))
information for each BAR exposed by the device
-
SIMBRICKS_PROTO_MSG_SZCHECK(struct SimbricksProtoPcieD2HRead)#
-
SIMBRICKS_PROTO_MSG_SZCHECK(struct SimbricksProtoPcieD2HWrite)#
-
SIMBRICKS_PROTO_MSG_SZCHECK(struct SimbricksProtoPcieD2HInterrupt)#
-
SIMBRICKS_PROTO_MSG_SZCHECK(struct SimbricksProtoPcieD2HReadcomp)#
-
SIMBRICKS_PROTO_MSG_SZCHECK(struct SimbricksProtoPcieD2HWritecomp)#
-
SIMBRICKS_PROTO_MSG_SZCHECK(union SimbricksProtoPcieD2H)#
-
SIMBRICKS_PROTO_MSG_SZCHECK(struct SimbricksProtoPcieH2DRead)#
-
SIMBRICKS_PROTO_MSG_SZCHECK(struct SimbricksProtoPcieH2DWrite)#
-
SIMBRICKS_PROTO_MSG_SZCHECK(struct SimbricksProtoPcieH2DReadcomp)#
-
SIMBRICKS_PROTO_MSG_SZCHECK(struct SimbricksProtoPcieH2DWritecomp)#
-
SIMBRICKS_PROTO_MSG_SZCHECK(struct SimbricksProtoPcieH2DDevctrl)#
-
SIMBRICKS_PROTO_MSG_SZCHECK(union SimbricksProtoPcieH2D)#
Variables
-
uint64_t len
length of the bar in bytes (len = 0 indicates unused bar)
-
uint64_t flags
flags (see SIMBRICKS_PROTO_PCIE_BAR_*)
-
uint16_t pci_vendor_id#
PCI vendor id
-
uint16_t pci_device_id#
PCI device id
-
uint8_t pci_class#
-
uint8_t pci_subclass#
-
uint8_t pci_revision#
-
uint8_t pci_progif#
-
uint8_t pci_msi_nvecs#
-
uint16_t pci_msix_nvecs#
-
uint8_t pci_msix_table_bar#
-
uint8_t pci_msix_pba_bar#
-
uint32_t pci_msix_table_offset#
-
uint32_t pci_msix_pba_offset#
-
uint16_t psi_msix_cap_offset#
-
uint32_t dummy
-
uint64_t req_id
-
uint64_t offset#
-
uint8_t pad[30]
-
uint64_t timestamp
-
uint8_t pad_[7]
-
uint8_t own_type
-
uint8_t data[]
-
uint16_t vector#
-
uint8_t inttype#
-
union SimbricksProtoBaseMsg base
-
struct SimbricksProtoPcieD2HRead read
-
struct SimbricksProtoPcieD2HWrite write
-
struct SimbricksProtoPcieD2HInterrupt interrupt#
-
struct SimbricksProtoPcieD2HReadcomp readcomp
-
struct SimbricksProtoPcieD2HWritecomp writecomp
-
uint8_t bar#
-
struct SimbricksProtoPcieH2DDevctrl devctrl#
-
struct SimbricksProtoPcieDevIntro#
- #include <proto.h>
welcome message sent by device to host. This message comes with the shared memory file descriptor attached.
Public Functions
- struct SimbricksProtoPcieDevIntro::@1 __attribute__ ((packed)) bars[SIMBRICKS_PROTO_PCIE_NBARS]
information for each BAR exposed by the device
Public Members
-
uint64_t len#
length of the bar in bytes (len = 0 indicates unused bar)
-
uint64_t flags#
flags (see SIMBRICKS_PROTO_PCIE_BAR_*)
-
uint16_t pci_vendor_id#
PCI vendor id
-
uint16_t pci_device_id#
PCI device id
-
uint8_t pci_class#
-
uint8_t pci_subclass#
-
uint8_t pci_revision#
-
uint8_t pci_progif#
-
uint8_t pci_msi_nvecs#
-
uint16_t pci_msix_nvecs#
-
uint8_t pci_msix_table_bar#
-
uint8_t pci_msix_pba_bar#
-
uint32_t pci_msix_table_offset#
-
uint32_t pci_msix_pba_offset#
-
uint16_t psi_msix_cap_offset#
-
struct SimbricksProtoPcieHostIntro#
- #include <proto.h>
welcome message sent by host to device
Public Members
-
uint32_t dummy#
-
uint32_t dummy#
-
struct SimbricksProtoPcieD2HRead#
-
struct SimbricksProtoPcieD2HWrite#
-
struct SimbricksProtoPcieD2HInterrupt#
-
struct SimbricksProtoPcieD2HReadcomp#
-
struct SimbricksProtoPcieD2HWritecomp#
-
union SimbricksProtoPcieD2H#
Public Members
-
union SimbricksProtoBaseMsg base#
-
struct SimbricksProtoPcieD2HRead read#
-
struct SimbricksProtoPcieD2HWrite write#
-
struct SimbricksProtoPcieD2HInterrupt interrupt#
-
struct SimbricksProtoPcieD2HReadcomp readcomp#
-
struct SimbricksProtoPcieD2HWritecomp writecomp#
-
union SimbricksProtoBaseMsg base#
-
struct SimbricksProtoPcieH2DRead#
-
struct SimbricksProtoPcieH2DWrite#
-
struct SimbricksProtoPcieH2DReadcomp#
-
struct SimbricksProtoPcieH2DWritecomp#
-
struct SimbricksProtoPcieH2DDevctrl#
-
union SimbricksProtoPcieH2D#
Public Members
-
union SimbricksProtoBaseMsg base#
-
struct SimbricksProtoPcieH2DRead read#
-
struct SimbricksProtoPcieH2DWrite write#
-
struct SimbricksProtoPcieH2DReadcomp readcomp#
-
struct SimbricksProtoPcieH2DWritecomp writecomp#
-
struct SimbricksProtoPcieH2DDevctrl devctrl#
-
union SimbricksProtoBaseMsg base#