Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12318

How to send custom size payload in PCIe TLP?

$
0
0

In my PCIe driver, after pci_ioremap_bar() to map BARs to memory spaces, I can use:

    unsigned int ioread8(void __iomem *addr);
    unsigned int ioread16(void __iomem *addr);
    unsigned int ioread32(void __iomem *addr);
    void iowrite8(u8 value, void __iomem *addr);
    void iowrite16(u16 value, void __iomem *addr);
    void iowrite32(u32 value, void __iomem *addr);
  • Each call generates a single MRd/MWr TLP with a maximum payload of 4B/32b.

  • My PCIe device supports TLP payload up to 1024 Bytes.

How can I take advantage of that and being able to send more bytes in a single TLP from CPU to my device?

My question puts aside the DMA. Simply PIO from the host/CPU. From my device, I can send 1KB TLP to dma_alloc_coherent() memory without any problem. I'd like to do the same way without using descriptors.

I know it isn't possible, but I read somewhere recent CPUs might have new features that would allow me to send more than one DWORD.


Viewing all articles
Browse latest Browse all 12318

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>