This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: ROMRAM startup in arm arch
On Fri, 2003-01-31 at 10:42, Jonathan Larmour wrote:
> Gary D. Thomas wrote:
> > On Thu, 2003-01-30 at 18:17, Fabrice Gautier wrote:
> >
> >>Hi,
> >>
> >>It seems to me than when ROMRAM startup is choosen, the data section is
> >>copied twice. (I've looked into integrator and ebdxxx platforms). The first
> >>time in the platform specific code, along with the text section, and the
> >>second time is in vector.S. This second time is need to copy the data
> >>section in case of ROM startup.
> >>
> >>Is there really a need to copy twice here ?
> >
> >
> > I think you're right although the copy of the DATA segment
> > is a no-op (bytes are copied over themselves). I'm sure
> > that the reason it was done this way was for simplicity.
> > Also, if there ever was a case where the memory layout
> > for a ROMRAM startup program did not have the DATA segment
> > immediately follow the TEXT, this code would have to be
> > executed. Doing it always relieves the code from knowing
> > if this is the case.
>
> For large programs this could be very wasteful though.
>
> Are there any ARM platforms with ROMRAM startup that _don't_ copy it in
> the platform HAL?
>
> The AT91 seems to only relocate 0x10000 bytes (64K) no matter what which
> looks quite odd indeed.
>
> The aaed2000, excalibur, ebsa285, as well as edb7xxx and integrator as we
> know all seem to copy all ROM.
>
> So any reasons for me not to tweak vectors.S to relocate from ROM to RAM
> only for ROM startup? And fix the at91 to be consistent with the other
> platforms?
My only concern is that it would break if the DATA segment does
not follow the TEXT segment directly, as is the current case
for these platforms. I don't know if such a layout would ever
make sense, but it could come back to haunt us.
--
.--------------------------------------------------------.
| Mind: Embedded Linux and eCos Development |
|--------------------------------------------------------|
| Gary Thomas email: gary.thomas@mind.be |
| Mind ( http://mind.be ) tel: +1 (970) 229-1963 |
| gpg: http://www.chez-thomas.org/gary/gpg_key.asc |
'--------------------------------------------------------'
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss