Hello,
On 07.07.2014 12:29, Christian Menard wrote:
Hi all,
I'm trying to run Genode+NOVA on a Panasonic Toughpad FZ-M1. I'm new to Genode but thanks to documentation and good coding style I came along pretty good so far. However, I ran into a problem with DMA.
I tried to run the AHCI driver, but whenever the driver issued the first SATA- command, the hardware failed because it was not able to read from the specified DMA address.
If you are using our run script infrastructure, then in the generated config files for pulsar and for grub the IOMMU support for the kernel is enabled by default. In this case you have to use the pci_device_pd process. For the starting you may disable the IOMMU support for the kernel, please see repos/base-nova/run/env file.
After I enabled IOMMU by adding 'pci_device_pd' to my modules, I got the message "[init -> acpi -> pci_drv -> oci_device_pd] attachment
of DMA
memory @ cb48c000+1000 failed".
I presume your are running a 32bit Genode ? In this case all virtual addresses starting with 0xc0000000 can't be used by user applications. Your physical address is above the 3G border, that is why you get this message. There is no quick fix for this case - beside disabling iommu support or using a 64bit Genode. A real fix would be not to rely on a 1:1 physical to virtual mapping for DMA buffers.
I investigated more into the memory allocation process. As far as I understand it, the method 'alloc_dma_buffer' of the PCI session first allocates a dataspace in physical memory. Then it tries to attach this dataspace as a region to the driver's virtual address space. Thereby it enforces the virtual address to be equal to the physical address. So the allocator searches for a free block that contains that virtual address. But in my case it doesn't find a free block.
Do you have any ideas on how to resolve this issue? What I don't understand is why physical and virtual address of the dma buffer should be equal. Shouldn't
Please read the release notes of 13.02 regarding IOMMU support and device_pd [0]. If it does not answer your question, don't hesitate to ask again.
there by some mechanism that ensures that there is a free block that contains the DMA address before the DMA buffer is allocated in physical memory?
Tell me if you need any specification on the device. I would like to print the full Log here, but unfortunately I have no serial interface, I am only able to use a vga console.
Cheers,
Alex B.