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.
- Am I supposed to really use the virtual mapping of the client’s shared memory (+ offset) in my resource manager during
HAILO_VDMA_LAUNCH_TRANSFERioctl 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 theshmhandle I get fromm_mappings->handle()and adding a separate field form_offsetthen use it in the ioctl to match the right shared memory. - 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)? - Why do you omit the
HAILO_VDMA_BUFFER_SYNCioctl call on QNX? Was it because the requested memory should not be cached (withPROT_NOCACHE)? Do you at any point manually invalidate/flush the caches? - Why isn’t
hailo_vdma_start_channel()called explicitly when the device is ofNNCtype? The only part where I see this code is when you load firmware through VDMA (and in theSOCpath). Are the channels started after you load the firmware through the BARs? - 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.