LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 10-20-2008, 03:18 AM   #1
!rajkums!
LQ Newbie
 
Registered: Oct 2008
Posts: 5

Rep: Reputation: 0
IO and CPU register area mapping


Generally the available memory like RAM is passed on to the kernel image through bootloader. This memory area is then mapped to the virtual area starting from 0xC0000000.While filling the page table entries kernel, uses PHYS_TO_VIRT(x) and VIRT_TO_PHYS(x) macros.
But i am not getting how other IO areas and CPU peripheral register areas are getting mapped by the kernel. Can anybody explain the mechanism generally used for IO area mapping and the general virtual address at which it is being mapped? Does the kernel uses specific macros for this purpose ?
 
Old 10-20-2008, 08:19 PM   #2
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Isn't this done by the interaction between the BIOS and the boards before boot and then just passed on as part of "Plug and Play"? I can't believe that it could be renegotiated by the Linux kernel. We used to have to set jumpers on the boards and then weed out conflicts before PnP came along. You might want to look into the lspci command as a start, as it can list all the io and memory areas.
Code:
lspci -vv
Hmm, looks like you can do something from user space with "isapnptools" for old boards that need to be hardcoded. See http://www.linuxjournal.com/article/3269 or google "Linux Plug and Play" for more info.
 
Old 10-21-2008, 05:13 AM   #3
!rajkums!
LQ Newbie
 
Registered: Oct 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the reply Quake.
Yep. Somehow kernel is made to know that these are the areas which has to mapped as IO. May be in PC platform, BIOS interacts with the board and lets the kernel know about this.
But i am looking for how it is happening in a non-pc platform like an arm or ppc. In these platforms there is no BIOS concept and moreover these processors itself will be having in-built peripheral controllers and hence its register area. So, how these areas are getting mapped,by the kernel.
 
  


Reply



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
CPU Overheat Warning when opening terminal (CPU is not overheating) Virtuality Linux - Newbie 4 05-30-2007 04:10 AM
How to find CPU Cache ? (apart from dmesg|grep CPU) Dark Carnival Linux - Hardware 3 12-22-2005 07:10 PM
CPU register test arunka Programming 5 10-03-2005 11:47 PM
please help guys, wrong cpu speed shown with a regular non-mobile cpu !! : ( maku Linux - Hardware 1 01-02-2005 02:03 PM
physical scsi channel mapping to scsiX device node mapping, how to configure manually drthornt Linux - Hardware 3 02-09-2003 11:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration