Results 1 to 2 of 2
Hello
I want to write data to a physical address of my choice. For it I am writing a driver (just like parallel port driver). In my driver code I ...
- 10-22-2009 #1Just Joined!
- Join Date
- Oct 2009
- Posts
- 8
Problem in writing to physical memory through a module
Hello
I want to write data to a physical address of my choice. For it I am writing a driver (just like parallel port driver). In my driver code I use check_region() function to check whether the address is free or not. Then I use request_region() to reserve that address for my driver. When the driver is loaded using insmod, it is loaded successfully (i-e the address is reserved for my driver). The corresponding /dev/<filename> opens successfully but when I write to the /dev/<filename>, I get segmentation fault.
Where can the problem be?
If an address has been reserved for me, I should be able to write on it. But I can not write.
Kindly give me some clue.
Regards
Atif Shabir
- 10-22-2009 #2
top reasons for segmentation fault are using uninitialized pointers and dereferencing null pointers, most likely you have a bug in your code


Reply With Quote
