Thanks in Advance.
With the non-mmu nios2 our design defined sdram regions that we utilized for buffers in our custom device driver.
**** device driver
sharedMem = kmalloc( SHARED_MEMSIZE, GFP_USER );
if ( sharedMem == NULL)
{
res = -ENOMEM;
exit;
}
else
{
sharedMemVertAddr = ioremap( sharedMem, SHARED_MEMSIZE );
}
**** end device driver
So, in my user space code I have an ioctl that I call to get the address - "sharedMemAddr" from the driver then I do my:
memcpy( sharedMemAddr, (const void *)&sharedMem, sizeof(sharedMem) );
FOR THE MMU system I get -- "SEGV"
FOR THE non-MMU system the scheme works GREAT!
What do I need to do to get the MMU system to allow this type of "memcpy?"
With the non-mmu nios2 our design defined sdram regions that we utilized for buffers in our custom device driver.
**** device driver
sharedMem = kmalloc( SHARED_MEMSIZE, GFP_USER );
if ( sharedMem == NULL)
{
res = -ENOMEM;
exit;
}
else
{
sharedMemVertAddr = ioremap( sharedMem, SHARED_MEMSIZE );
}
**** end device driver
So, in my user space code I have an ioctl that I call to get the address - "sharedMemAddr" from the driver then I do my:
memcpy( sharedMemAddr, (const void *)&sharedMem, sizeof(sharedMem) );
FOR THE MMU system I get -- "SEGV"
FOR THE non-MMU system the scheme works GREAT!
What do I need to do to get the MMU system to allow this type of "memcpy?"