[ECOS] Memory layout
Agarwal, Lomesh
lomesh.agarwal@intel.com
Wed Apr 10 18:23:00 GMT 2002
One more question. You said SECTION_fini, SECTION_rodata, SECTION_rodata1,
SECTION_fixup, SECTION_gcc_except_table, SECTION_fixed_vectors should all be
in ram. I am using ROM start type not RAM. So, shouldn't they be residing in
rom?
Thanks,
Lomesh
-----Original Message-----
From: Jonathan Larmour [mailto:jlarmour@redhat.com]
Sent: Wednesday, April 10, 2002 5:39 PM
To: Agarwal, Lomesh
Cc: eCos Discuss
Subject: Re: [ECOS] Memory layout
"Agarwal, Lomesh" wrote:
>
> During startup my flash is at 0 then I unalias it. After unaliasing flash
> sits at 0xc4000000 and RAM sits at 0.
> What about this:
> MEMORY
> {
> ram : ORIGIN = 0x00000000, LENGTH = 0x10000000
> rom : ORIGIN = 0xc4000000, LENGTH = 0x01000000
> }
This now looks right.
> SECTIONS
> {
> SECTIONS_BEGIN
> SECTION_rom_vectors (ram, 0x00000000, LMA_EQ_VMA) // vector page
gets
> remapped from ROM to RAM
It still has to be loaded into ROM, and the way eCos works, it copies the
vectors "manually" in vectors.S into the start of RAM - look at everything
about __exception_handlers in vectors.S. So actually this should be:
SECTION_rom_vectors (rom, 0xc4000000, LMA_EQ_VMA)
> SECTION_text (ram, 0x00002000, LMA_EQ_VMA)
Should be SECTION_text (rom, ALIGN(0x4), LMA_EQ_VMA)
> SECTION_fini (rom, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_rodata (rom, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_rodata1 (rom, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_fixup (rom, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_gcc_except_table (rom, ALIGN (0x4), LMA_EQ_VMA)
> SECTION_fixed_vectors (rom, 0x20, LMA_EQ_VMA)
Should be ram
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
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list