I have build an character driver in which i am allocating two PAGESIZE buffer using dma_alloc_coherent()
Now i am passing the PHYSICAL address of these BUFFER [src_ptr & dest_ptr] to user space using ioctl() as source_offset and dest_offset .
In user space this offeset is used as an offset for mmap call.
So on same /dev file say /dev/250 i am making TWO MMAP call
usr_src_ptr= mmap(0,page
This is my first post so please let me know if there is any mistake from .
My aim is to get approx 150MBytes of data transfer from KERNEL to user space.
I am trying to use the mamp() functionality provided in linux-kernel.
As we call mmap() in user-space we try to map virtual memory area of user-space process to the memory in the kernel-space.
the definition of mamp() inside kernel is done in my kernel module which try to allocate some memory in pages & maps it during mmap system call.
I have mapped the pci memory in user space like
fs = open("/dev/mem",O_RDWR | O_SYNC);
mmap_src = mmap(NULL, BUFF_COUNT, PROT_READ | PROT_WRITE, MAP_SHARED, fs, 0xe0000000);
0xe0000000 is the addressof pci memory device.
I have opened a device driver with a 16 KB kernel space using dma_alloc_coherent.
I have a user program which has 10 KB of data which is in a buffer created by malloc.
now when I do a fwrite in which I call copy_from_user to copy the data from user space to kernel space after which the starting address is given to a peripheral which picks it up.
Hi,
I just need to get this clarified.
here's my current scenario:
I'm currently writing a block driver for some scsi block device. My setup uses a 32-bit kernel 2.6.35.
I have simple program that tries to access the physical memory in user space, where the kernel stores the first struct page.
I am debugging one issue where a same program behaves differently on different Linux boxes (all 2.6 kernels). Basically on some linux box, mmap() of 16MB always succeeds, but on other linux box the same mmap() would fail with "ENOMEM".
I checked /proc//maps and saw the virtual memory map on different linux boxes are quite different.