[okl4-developer] MMU fault on write to hardware_back_memsection
Geoffrey Lee
glee at ok-labs.com
Sun Jun 22 15:00:45 EST 2008
On Fri, Jun 20, 2008 at 04:14:24PM +0200, Lukas HANEL wrote:
> Hi
>
> I found my way through Linux device and driver registration and am
> finally able to start the NAND driver. After some adaptions I am now
> facing a real problem. After the control register of the NAND
> Controller, the driver will also ioremap three pages directly from the
> NAND memory. On the first write to these pages, the iguana server
> notices an mmu fault.
> <iguana_server> ARM mmu fault fs=8
>
> What can I do?
>
> I also specified this NAND memory in the machines.py. Is this
> interfering with hardware_back_memsection? But at a first sight, the
> call does not yield an error message.
hardware_back_memsection() only inserts the requested region into the
pagetable and so will not yield an error message.
>
> Note also that I had to implement dma_alloc_coherent and just copied the
> file from arch/l4/sys-i386/dma.c. Might this be a source for the problem?
>
The dma_alloc_coherent() function needs to be consistent with how
it is defined in native ARM Linux. For ARM, if the architecture
has coherent DMA it allocates out for the kmalloc() pool then does
a translation into a DMA address, otherwise it calls __dma_alloc()
with the nocache attribute set. Hence, I suspect that it
may be a cache-related problem?
For reference take a look at arch/arm/mm/consistent.c in the Linux
kernel source tree.
> thanks,
> Lukas Hänel
-gl
>
> _______________________________________________
> Developer mailing list
> Developer at okl4.org
> https://lists.okl4.org/mailman/listinfo/developer
>
--
More information about the Developer
mailing list