Hi,
in my design I am using a peripheral that uses the AXI DMA IP from Xilinx. I suspect that the descriptors of the transactions that are created are kept in cache and not moved to RAM. When the DMA begin to move data, it is reading wrong values from the descriptors.
I have checked my peripheral with a baremetal code and I needed to disable the cache in order for it to work.
For that, I used the CSR_DCACHE CSR from the CVA6 as explained in cva6 issue in order to disable it.
In order to do the same from Linux, I have created a new CSR (equivalent to the one above that can be used from baremetal) to which I can write from a Linux module.
I have a Linux module that disables the cache by writing a 0x0 to the newly created CSR. The system hangs when trying to do so though.
However, if I disable and enable the cache (by writing a 0x0 and later on a 0x1), the module loads into the kernel.
I want to fully disable it. ¿Has anyone been able to do so?
Another option could be to have a piece of memory as non-cacheable and assign it to my dma on the device tree but as long as I have been able to see, that is not an option so far. ¿Could anyone provide any info or hint about this?
Thank you in advance.
Hi,
in my design I am using a peripheral that uses the AXI DMA IP from Xilinx. I suspect that the descriptors of the transactions that are created are kept in cache and not moved to RAM. When the DMA begin to move data, it is reading wrong values from the descriptors.
I have checked my peripheral with a baremetal code and I needed to disable the cache in order for it to work.
For that, I used the CSR_DCACHE CSR from the CVA6 as explained in cva6 issue in order to disable it.
In order to do the same from Linux, I have created a new CSR (equivalent to the one above that can be used from baremetal) to which I can write from a Linux module.
I have a Linux module that disables the cache by writing a 0x0 to the newly created CSR. The system hangs when trying to do so though.
However, if I disable and enable the cache (by writing a 0x0 and later on a 0x1), the module loads into the kernel.
I want to fully disable it. ¿Has anyone been able to do so?
Another option could be to have a piece of memory as non-cacheable and assign it to my dma on the device tree but as long as I have been able to see, that is not an option so far. ¿Could anyone provide any info or hint about this?
Thank you in advance.