LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 07-13-2011, 10:17 PM   #1
Shum
LQ Newbie
 
Registered: Oct 2007
Posts: 23

Rep: Reputation: 0
how to view kernel memory map?


Yo! yo! 'sup my dawgs?

I'm trying my hand at a bit of kernel hacking/debugging and - forgive my n00bishness - is there a way to view the kernel's memory map and see what driver a particular area of memory is allocated to?

Two of my 8250 serial ports don't work. During initialisation the driver calls request_mem_region() to try and grab 32 bytes at 0xd0103000 and 0xd010b000. These calls fail and return -EBUSY.
System.map doesn't go this high in memory (_end is at 0xc0a0e000).

How can I find out what is interfering with my serial driver? Does anyone have any suggestion on how I might fix this?

Last edited by XavierP; 07-14-2011 at 03:19 AM. Reason: Moved to Linux-Kernel
 
Old 07-18-2011, 09:08 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 1,527

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
To probe whether the address range is already in use use:

int check_mem_region (unsigned long start, unsigned long length);

returns zero if the address range is available. Maybe you failed to release it on an earlier test of your code. Make sure you release in your __exit code.

If it isn't your driver, then make sure the standard serial driver isn't grabbing it. In your kernel build, either disable building the serial driver or build it as a module and blacklist it.

Finally, the PCI bus driver walks the bus and assigns devices to drivers based on their PCI ID. You should never have to be coding memory addresses yourself. You should be using the mechanisms that the kernel provides. Read the relevant parts of "Writing Linux Device Drivers"
 
  


Reply

Tags
driver, kernel, serial


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Linux Virtual memory mapping to Board memory map !rajkums! Linux - Kernel 4 10-19-2008 12:27 PM
Kernel virtual memory map TO Board memory map -----> Mapping !rajkums! Linux - Embedded & Single-board computer 0 10-18-2008 09:21 AM
LXer: Linux Distributions Bird's Eye View - a Mind Map LXer Syndicated Linux News 0 04-13-2006 10:33 PM
kernel's view of memory in FREEBSD mikage14 Linux - Newbie 2 05-07-2004 07:32 PM


All times are GMT -5. The time now is 08:08 PM.

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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration