Hailo 8 QNX PCIe driver

I finished (or so I thought) my port of the hailort-drivers + libhailort (hailo 8 branch) for the QNX 8.0 and using Hailo 8 for PCIe. Even though all the code for NNC has been ported. I am still stuck with VDMA not advancing (the counter I get with hailo_vdma_get_num_proc() stays at 0, I get no interrupts on enabled channels and eventually stuck after multiple HAILO_VDMA_LAUNCH_TRANSFER ioctl calls).

I have some questions for the driver developers at Hailo Technologies Ltd.

  1. Am I supposed to really use the virtual mapping of the client’s shared memory (+ offset) in my resource manager during HAILO_VDMA_LAUNCH_TRANSFER ioctl call? This address will not make sense in my driver’s process (it was mapped in the client’s virtual address space). My current workaround is to replace this value with the shm handle I get from m_mappings->handle() and adding a separate field for m_offset then use it in the ioctl to match the right shared memory.
  2. During your attempt to write a driver for QNX, did you pass a raw, physical memory pointer to the VDMA, or did you translate it to the PCI address space (with pci_device_map_as() call)?
  3. Why do you omit the HAILO_VDMA_BUFFER_SYNC ioctl call on QNX? Was it because the requested memory should not be cached (with PROT_NOCACHE)? Do you at any point manually invalidate/flush the caches?
  4. Why isn’t hailo_vdma_start_channel() called explicitly when the device is of NNC type? The only part where I see this code is when you load firmware through VDMA (and in the SOC path). Are the channels started after you load the firmware through the BARs?
  5. Is it possible to share the “PLDA PCIe reference manual” mentioned here? I suspect I would find my answers regarding this VDMA IP there.

This is my first time writing a DMA driver and a first time writing a resource manager for QNX 8.0. Thank you in advance for the replies.

1 Like