IMAP_ADDR is virtual or physical address?

Kumar Gala galak at kernel.crashing.org
Thu Feb 16 08:36:30 EST 2006


On Wed, 15 Feb 2006, dibacco at inwind.it wrote:

> I'm wondering if IMAP_ADDR is a virtual address or a physical one. Normally I see things like this in drivers:
> 
> static volatile immap_t *immr = (immap_t *) IMAP_ADDR;
> 
> It seems therefore a virtual address.

IMAP_ADDR tends to be a physical address, however its mapped 1:1 in the 
kernel via io_block_mapping() on a number of systems to get the 1:1 
mapping.

This is somewhat frowned upon, and drivers should really do their own 
ioremap() with a physical address for IMAP_ADDR.

> 
> But I can see the same also in some u-boot code where I imagine we are accessing physical addresses.
> 
> Clear my doubt please!!

In u-boot everything is mapped 1:1 so there is no difference between virt 
and phys addrs.

- kumar





More information about the Linuxppc-embedded mailing list