This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Why virtual address and Physical address are different in the memory layout of IXPD425 board ?
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Sujoy Ray <raysujoy at yahoo dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Mon, 9 Aug 2004 08:53:36 +0200
- Subject: Re: [ECOS] Why virtual address and Physical address are different in the memory layout of IXPD425 board ?
- References: <20040809061403.91749.qmail@web53402.mail.yahoo.com>
On Sun, Aug 08, 2004 at 11:14:03PM -0700, Sujoy Ray wrote:
>
> Hello:
>
> I was going through the memory laout of an IXPD425
> board provided in the following link:-
>
> http://sources.redhat.com/ecos/docs-latest/redboot/ixdp425.html
>
>
> It has following lines.
>
>
> Virtual Address Physical Address XCB Description
> 0x00000000 0x00000000 010 SDRAM
> (cached)
> 0x10000000 0x00000000 010 SDRAM (alias)
> 0x20000000 0x00000000 000 SDRAM
> (uncached)
>
> Now, I have following questions.
>
> 1. Why in the third line (SDRAM uncached), the virtual
> address and physical address are different? I know
> that virtual address can be different from the
> physical address. But normally it is not in the
> embedded scenario.
Probably the fundemental concept you are missing is the difference
between cachaed an uncached memory. Device drivers, particularly PCI
windows, need to access the ram in uncached mode. Normal programs make
use of the cache because of the extra performance it gives. Any easy
way to acheive this is to have the same memory in the address space
twice, once caches and one uncached. The code can then decide which
one to access.
> 2. Who is going to use this address? I have seen that
> all the addresses are assigned in the .ld file and
> those are static allocation. If this is true, then how
> this virtual address will be used.
The specific device drivers will know about this second mapping. It
will probably be hard coded somewhere.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss