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: Redboot manual question? Thank you


On Wed, 2002-05-01 at 10:40, HuangQiang wrote:
> 
> hi all:
>    As been said in the redboot manual for ARM E7T board page 62:
> RedBoot also reserves RAM(0x00000000 ~ 0x0000bfff) for RedBoot runtime uses.
> So when download the ecos user program via arm-elf-gdb a.out -> load ->
> continue. then where will be the user program loadded to?(what location in
> RAM?) But the ecos user program also setup the vector table in vectors.s
> file. If the ecos user program is not loadded into RAM 0x00, how will these
> vector table be used?(for example: ecos user program loadded into 0x10000,
> then when a IRQ occurs, ARM processor will fetch the IRQ from 0x18, but now
> the vector table is located somewhere after 0x10000 (RAM)(coz the ecos user
> program with the vector table (in vectors.s) is loadded into 0x10000 RAM)
> How can this happens?

A quick look at arm/vectors.S would help.

The vectors startup code copies appropriate pointers from the "vectors"
section of your executable into the "fixed_vectors" (at 0x20).  These
are pointers used by the absolute code at 0x0..0x1F.  Most of them 
simply jump indirect via a pointer somewhere else.  In the case of
your executable, this would be somewhere in your code which got loaded
at 0x10000.  The instruction at 0x18 looks like this
  0x18:   ldr     pc, [pc, #18]   ; 0x38
where location 0x38 gets filled in with the pointer from your program
when it starts up.


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