LinuxQuestions.org
Have you heard the LinuxQuestions.org Podcast?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Tags used in this thread
Popular LQ Tags ,

Reply
 
Thread Tools
Old 10-22-2009, 10:10 AM   #1
atif_shabir
LQ Newbie
 
Registered: Oct 2009
Posts: 7
Thanked: 0
Problem in writing to physical memory through a module


[Log in to get rid of this advertisement]
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
linuxfedora atif_shabir is offline  
Tag This Post ,
Reply With Quote
Old 11-19-2009, 04:06 AM   #2
anishakaul
Member
 
Registered: Dec 2008
Location: Gurgaon (India)
Distribution: Suse 10.3 Ubuntu 9.04
Posts: 57
Thanked: 0
Kindly post some code for us to look at !
linux anishakaul is offline     Reply With Quote
Old 11-19-2009, 04:48 AM   #3
cladisch
Member
 
Registered: Oct 2008
Location: Earth
Distribution: Slackware
Posts: 133
Thanked: 23
The physical address space and the kernel's address space are not identical.
You did not mention that you mapped your physical address, so I guess you didn't.
linuxslackware cladisch is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PCIe dma-able memory location in physical memory for Intel Nehalem / Tylersburg arch robvoo Linux - Kernel 4 07-31-2009 07:21 AM
Physical Memory and Virtual Memory Murdock1979 Linux - General 1 01-28-2008 08:35 AM
Problem with writing module mohsena Programming 3 10-16-2005 10:51 AM
problem with new memory module favnix Linux - Hardware 1 05-23-2005 05:46 AM
USB Flash memory writing problem tajuton Linux - Hardware 8 02-18-2004 03:17 AM


All times are GMT -5. The time now is 10:12 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration