Re: Memory mapping confusion | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
On 28-04-08 07:59, Chetan Nanda wrote:
I have a few basic question regarding mapping of memory (and other device) in Linux kernel. suppose if I have 32bit machine with more then 4GB of RAM , and also there are other devices that are memory mapped, so how will linux managed to access the devices (other then RAM) that are memory mapped?
Not all of memory is (permanently) mapped into the 32-bit address-space. The "more then 4GB" isn't even the main issue here: "more than 4G - PAGE_OFFSET - VMALLOC_RESERVE" is -- more than 896M with the standard values.
Please see http://mail.nl.linux.org/kernelnewbies/2008-04/msg00078.htmlioremap() is one of those "friends" it speaks of of vmalloc() which uses the VMALLOC_RESERVE window for creating mappings.
Is RAM (in PCs) always mapped to physical location 0 ?
Physically, yes. The direct map Linux has of (the first 896M of) it is at 3G virtual though.
How kernel identifies which device is at which address in entire 4GB address space?
The bus code enumerates devices -- to get an actual mapping of the addresses the bit of hardware uses and which _it_ specifies in physical space (well, bus-space, but same thing on x86) you call ioremap() to map that region into virtual memory after which you can access it.
Rene -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ
[Newbies FAQ] [Kernel List] [Site Home] [IETF Annouce] [Git] [Networking] [Security] [Bugtraq] [Rubini] [Photo] [Yosemite] [MIPS Linux] [ARM Linux] [Linux Security] [Linux Networking] [Linux RAID] [Linux SCSI] [Linux ACPI] [DDR & Rambus] [UNIX Filesystems] [Linux Resources]
![]() |
![]() |