Hello all,
These several days we are having a difficulty in our linux device driver development.
These several days we are having a difficulty in our linux device driver development.
case A ) Here we allocate the dma buffer for our accelerator device during the device driver(a platform driver) initialization and we don't have problem. That is, we use kmalloc + dma_map_single during the driver initialization and after the boot is complete, we run the application which uses the driver. During the application, the driver just calls dma_sync_single_for_device function and our accelerator device actually access the dma buffer with no problem. (no translation fault).
case B) Here we allocate the dma buffer for our accelerator device while the application runs after the boot (the buffer is not allocated during the drive initialization). While the application runs, the driver does the kmalloc + dma_map_single + dma_sync_single_for_device and then when then device accesses the dma buffer, we see translation fault. By printing the SMMU event data, we know it's for data read access, and the class is 'b10 which is 'Input address caused fault'. and it is from the first stage (S2=0).
We know that the SMMU reads STE, CD and 3 entries of translation table. (we use 48bit address). Can we know in what stage of this 5 stages the fault arose? By the way the io virtual address starts with 0x7ffff~ (48bit) in both cases. Could anyone suggest us what information to look into now?
Thank you,
Best regards,
Chan Kim
Chan Kim
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies