Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 07-13-2011, 11:17 PM   #1
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. 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 04:19 AM. Reason: Moved to Linux-Kernel
Old 07-18-2011, 10:08 AM   #2
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,881

Rep: Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760
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"


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

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

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