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: ROMRAM startup in arm arch


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.

-- 
.--------------------------------------------------------.
|       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


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