public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Does the fixed_vector section have anything to do with the virtual vector table?
@ 2002-05-03  1:48 HuangQiang
  2002-05-14 14:23 ` Jonathan Larmour
  0 siblings, 1 reply; 8+ messages in thread
From: HuangQiang @ 2002-05-03  1:48 UTC (permalink / raw)
  To: eCos

Hi all:
Question as subject. Thank you for your reply.




-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ECOS] Does the fixed_vector section have anything to do with the  virtual vector table?
  2002-05-03  1:48 [ECOS] Does the fixed_vector section have anything to do with the virtual vector table? HuangQiang
@ 2002-05-14 14:23 ` Jonathan Larmour
  2002-05-16  1:56   ` [ECOS] Question about fixed vector table(ARM) HuangQiang
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Larmour @ 2002-05-14 14:23 UTC (permalink / raw)
  To: HuangQiang; +Cc: eCos

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [ECOS] Question about fixed vector table(ARM).
  2002-05-14 14:23 ` Jonathan Larmour
@ 2002-05-16  1:56   ` HuangQiang
  2002-05-16  4:46     ` Gary Thomas
  2002-05-16  5:00     ` Mark Salter
  0 siblings, 2 replies; 8+ messages in thread
From: HuangQiang @ 2002-05-16  1:56 UTC (permalink / raw)
  To: Jonathan Larmour; +Cc: eCos

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?

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ECOS] Question about fixed vector table(ARM).
  2002-05-16  1:56   ` [ECOS] Question about fixed vector table(ARM) HuangQiang
@ 2002-05-16  4:46     ` Gary Thomas
  2002-05-16  5:18       ` HuangQiang
  2002-05-16  5:00     ` Mark Salter
  1 sibling, 1 reply; 8+ messages in thread
From: Gary Thomas @ 2002-05-16  4:46 UTC (permalink / raw)
  To: HuangQiang; +Cc: Jonathan Larmour, eCos Discussion

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ECOS] Question about fixed vector table(ARM).
  2002-05-16  1:56   ` [ECOS] Question about fixed vector table(ARM) HuangQiang
  2002-05-16  4:46     ` Gary Thomas
@ 2002-05-16  5:00     ` Mark Salter
  2002-05-16  5:18       ` HuangQiang
  1 sibling, 1 reply; 8+ messages in thread
From: Mark Salter @ 2002-05-16  5:00 UTC (permalink / raw)
  To: jameshq; +Cc: ecos-discuss

>>>>> HuangQiang  writes:

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

A branch instruction has only a 24-bit range, so you would not
have access to the full address range if you used a branch in
the CPU vector table. We use the table at 0x20 to hold full 32-bit
addresses of the service routines. The instructions in the CPU
vector table simply load those 32-bit values to the PC register.

--Mark

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [ECOS] Question about fixed vector table(ARM).
  2002-05-16  4:46     ` Gary Thomas
@ 2002-05-16  5:18       ` HuangQiang
  0 siblings, 0 replies; 8+ messages in thread
From: HuangQiang @ 2002-05-16  5:18 UTC (permalink / raw)
  To: Gary Thomas; +Cc: eCos


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [ECOS] Question about fixed vector table(ARM).
  2002-05-16  5:00     ` Mark Salter
@ 2002-05-16  5:18       ` HuangQiang
  2002-05-16  5:32         ` Mark Salter
  0 siblings, 1 reply; 8+ messages in thread
From: HuangQiang @ 2002-05-16  5:18 UTC (permalink / raw)
  To: Mark Salter; +Cc: eCos



-----Original Message-----
From: Mark Salter [mailto:msalter@redhat.com]
Sent: 16 May 2002 12:59
To: jameshq@liverpool.ac.uk
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] Question about fixed vector table(ARM).

Thank you for your reply.

why can't we just use(for example for IRQ):

0x18  ldr pc, .IRQ      ; Can this jump to anywhere in the address
space(32-bit)?
.
.
0x50(label)    IRQ:    ; process the IRQ vector here.



by the above :  ext IRQ occurs --> load the instruction from 0x18 (ldr pc, .
IRQ) --> jump the IRQ label

while have fixed vector table:   reset occurs --> jump to fixed vector table
0x38 (what will be in here? Is it the address to label IRQ?) --> jump to IRQ
label address --> process IRQ

Thanks a lot!

>>>>> HuangQiang  writes:

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

A branch instruction has only a 24-bit range, so you would not
have access to the full address range if you used a branch in
the CPU vector table. We use the table at 0x20 to hold full 32-bit
addresses of the service routines. The instructions in the CPU
vector table simply load those 32-bit values to the PC register.

--Mark


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ECOS] Question about fixed vector table(ARM).
  2002-05-16  5:18       ` HuangQiang
@ 2002-05-16  5:32         ` Mark Salter
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Salter @ 2002-05-16  5:32 UTC (permalink / raw)
  To: jameshq; +Cc: ecos-discuss

>>>>> HuangQiang  writes:

> why can't we just use(for example for IRQ):

> 0x18  ldr pc, .IRQ      ; Can this jump to anywhere in the address
> space(32-bit)?

No. This is more limiting than a branch instruction. .IRQ has to
be within a 12bit offset of the PC for this instruction to work.

--Mark

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-05-16 12:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-03  1:48 [ECOS] Does the fixed_vector section have anything to do with the virtual vector table? HuangQiang
2002-05-14 14:23 ` Jonathan Larmour
2002-05-16  1:56   ` [ECOS] Question about fixed vector table(ARM) HuangQiang
2002-05-16  4:46     ` Gary Thomas
2002-05-16  5:18       ` HuangQiang
2002-05-16  5:00     ` Mark Salter
2002-05-16  5:18       ` HuangQiang
2002-05-16  5:32         ` Mark Salter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).