Results 1 to 3 of 3
Hello, I have been trying to write a driver to bee able to read and write to any memory address given by the user. I suspected that I was going ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-07-2011 #1Just Joined!
- Join Date
- Oct 2010
- Posts
- 1
writting driver
Hello, I have been trying to write a driver to bee able to read and write to any memory address given by the user. I suspected that I was going to have some problems because of memory violation issues and it turns out I was right....
When I try to access address B8002050 for example I get "Unable to handle kernel paging request at virtual address b8002050".....
Isn't there any way to do this whitout getting errors? I though I could access any memory address using a driver as it is executing as root and has the maximum priority level in the CPU....
The reason I am trying to do this is to check some configuration registers directly, as I am working on an embedded system which is having some issues....
Any ideas on how to do this?
Thanks a lot
- 11-11-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,143
Although the kernel runs in physical memory, there are still rules to follow in order to utilize some specific physical address. In userland, Linux does not allow direct access to physical ram, unless it is mapped first to a virtual address. In fact, you can do that in a user application with the mmap() function. You really do not need a kernel driver. Anyway, you might want to read this first: http://tldp.org/LDP/tlk/mm/memory.html, which is part of this document: The Linux Kernel
Last edited by Rubberman; 11-11-2011 at 05:32 PM.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 11-26-2011 #3Banned
- Join Date
- Nov 2011
- Posts
- 13


Reply With Quote

