This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Memory Map conventions


> On the PXA, the physical memory map is as follows:
> 
> FLASH based at 0x00000000
> SDRAM based at 0xA0000000
> 
> However, the PXA reset code (at least for the uE250) does something
> different.  Rather than a one to one mapping from virtual address to
> physical address, the MMU setup goes through contortions to remap
> SDRAM from 0xA0000000 to 0x00000000 and remap FLASH from 0x00000000 to
> 0x50000000.  This makes the ROM/RAM addresses look the same as on the
> IXP platform.  However, it makes the bootup code complex and the
> current code cannot support ROMRAM images.  (In fact, from what I
> understand it doesn't look like ROM images will work properly either
> because I cannot find the copy from ROM to RAM).
> 
> My question is this:  What is the 'best-practice' for new ecos ports
> where the processor core is the same but the physical memory map has
> changed.  Is it preferred to maintain the physical memory map in the
> MMU mappings?  Or is it preferred to use the MMU to make the virtual
> memory map look the same as other existing ports?

You need RAM where the vectors is, ie at 0. If you don't do this, you
cannot install interrupt handler etc. So all ARM targets will somehow
get RAM at address 0 and FLASH somewhere else.

The ROM image will work, otherwise REDBOOT would not work, which is a
ROM image. ROM means it runs from ROM, so there is no need to do a
copy. The ROM image is linked to run at the higher address. The
startup code should be position independant so that it can run at the
low address and continue to run at the high address when the remap
occurs. 

ROMRAM startup copies itself from ROM into RAM.

So best practice is to put RAM at 0. It does not realy matter where
ROM goes after its remapped, but if you do put it at the same place as
some other HAL, it means you can copy the linker scripts etc.

        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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]