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: Question about fixed vector table(ARM).



Thank you very much.

But why can't we just use(just put a  branch to the service routine into
address 0x00, why we need to jump from 0x00 to 0x20 then to the actual
service routine?) :

0x00    ldr     pc,.reset_vector

0x55(somewhere after the vector table)
reset_vector:   process the reset vetor here


reset occurs --> fetch code from 0x00 --> jump to reset_vector lable and
excute the code there.

Now while fixed_vector table is used it seems it happens like:

reset occurs --> fetch code from 0x00 --> branch to 0x20 (fixed vector
table, seen from the disassembled code)--> branch to reset_vector labe and
excute the code there

why is this needed?

thanks


-----Original Message-----
From: Gary Thomas [mailto:gthomas@redhat.com]
Sent: 16 May 2002 12:46
To: HuangQiang
Cc: Jonathan Larmour; eCos Discussion
Subject: Re: [ECOS] Question about fixed vector table(ARM).


On Thu, 2002-05-16 at 02:55, HuangQiang wrote:
> Thank you very much. I still have one question about the fixed vector
table.
> In ARM vectors.s file takes care of the vector table(from 0x00) setup and
> fixed vector table(from 0x20) setup. While branch to the vector it first
> branch to the vector table(from 0x00) and then directed to fixed vector
> table(from 0x20) then to the actual services routine. Why this fixed
vector
> table is needed here? Can't we just setup the vector table (from 0x00) and
> branch to the services routine indirection of fixed vector table?
>

The ARM instruction set doesn't provide a way to jump directly to an
arbitrary location in a single instruction which is required by the
interrupt/exception processing.  The instruction used:
        ldr     pc,.reset_vector                // 0x00
is a single instruction which picks up an address and jumps to it. The
contents of ".reset_vector" can be set to whatever is desired and is set
up by eCos applications as they start up.

> Thank you very much.
>
> best regards!
>
> james
>
> -----Original Message-----
> From: jlarmour@cambridge.redhat.com
[mailto:jlarmour@cambridge.redhat.com]On
> Behalf Of Jonathan Larmour
> Sent: 14 May 2002 22:24
> To: HuangQiang
> Cc: eCos
> Subject: Re: [ECOS] Does the fixed_vector section have anything to do with
> the virtual vector table?
>
>
> HuangQiang wrote:
> >
> > Hi all:
> > Question as subject. Thank you for your reply.
>
> Not at all. Virtual vectors are "soft" vectors - purely there for things
> that software requires. They're nothing to do with hardware devices.
That's
> why, for example, the virtual vector table layout is the same for every
> ecos target.
>
> Jifl
> --
> Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
> --[ "You can complain because roses have thorns, or you ]--
> --[  can rejoice because thorns have roses." -Lincoln   ]-- 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



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