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]

Re: memory layout and vector location


Arnaud Mouiche wrote:
> 
> Hi!
> I'm looking at vector.S file for arm processor. Section layout isn't so
> clear for me ...
> 
> - How is define the startup section. Is it the 'rom_vectors' section ? but
> we don't find 'rom_vectors' section in vector.s , we just have a section
> named '.vectors' which, indeed, call reset_vector (that what we want)

Yes "rom_vectors" is the .vectors section.

> - What is the real aim of '.fixed vectors'. As I understand, it's a way to
> told the ROM monitor (for ROM startup) what kind of call do when an
> exception rise.

It's data that is shared between ROM monitors and applications and so has
to be at a fixed address, including, as you say what VSR handlers to call.

> Most part of the time, it seems that '.fixed_vectors'
> address is the same that 'vectors' address (i.e. 0x20 of ram).

It should effectively be the same all the time - the 'vectors' stuff is
copied to 0x20.

> But what
> happened if the starting point of our program is not 0x00 of the RAM but
> something else, as in this case, there is no relation between
> '.fixed_vectors' address and 'vectors' address ?

If it's an app built for RAM startup, the PC must have been set up some
other way. If it's ROM startup, the ARM always maps 0x0 to ROM, and the
jump to reset_vector puts it into the correct address space.

> - during startup (between LED 5 and LED 4), we copy the
> 'exception_handlers' table from '__exception_handlers' address to address
> 0x0. But If address 0x00 is map to ROM and if we don't have MMU to make RAM
> start at address 0x0, how could it work ?

Address 0x0 is only mapped to ROM very temporarily. Once you have loaded
and jumped to reset_vector, you are back into the address space that was
defined in the linker, e.g. 0x4000000. The ARM does this even without an
MMU explicitly for booting. Once you've jumped to ROM, RAM is now
accessible at 0x0.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine


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