I am writing a user space MAC driver in Linux 2.6.23 hosted on a Arm11 mpcore. A contiguous block of physical memory is allocated and mmap'd to userspace.
/dev/mem with O_SYNC flag is used to mmap so that the user virtual memory is uncached (with no much benefit).
kptr = kmalloc(sz, GFP_DMA|GFP_KERNEL);
pptr = __pa(kptr);
fd = open("/dev/mem", O_RDWR|O_SYNC);
uptr = mmap(0, sz, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_LOCKED,fd, pptr);
The map'd user virtual memory is carved into network buffers and used for DMA.The MAC is successfully able to DMA ethernet frames to the physical memory. From the Rx interrupt handler bh (kernel logical memory) the frames received could be viewed and the cache functions also work fine. However, the mmap'd memory in user space does not reflect the changes.
Why is the physical memory mapped to user virtual does not reflect the chages ?
Or any suggestions on what could be going wrong here ?
Deb Rupam Banerjee
P.S: Please note that all buffer alignment's are taken care of.
- Readers' Choice Awards 2013
- Mars Needs Women
- RSS Feeds
- Sublime Text: One Editor to Rule Them All?
- December 2013 Issue of Linux Journal: Readers' Choice
- Raspberry Pi: the Perfect Home Server
- Linux Systems Administrator
- IBM Will Minimize Impact of Future Disasters
- Senior Perl Developer
- Technical Support Rep
- why is GNOME 3 in the fifth position at 14.1 %?
4 hours 51 min ago
- Sublime Is Brilliant!
9 hours 54 min ago
10 hours 13 min ago
- Rapid[Disk,Cache] better than native ram caching?
10 hours 38 min ago
- Nothing is perfect
10 hours 51 min ago
- Mixtapes Community
16 hours 30 min ago
- KDE is one true DE
17 hours 5 min ago
- Command Line Shells (Bash, Zsh, etc.) are 2nd place
17 hours 33 min ago
19 hours 28 min ago
- yes it's Jupiter Broadcasting
20 hours 48 min ago