* [ECOS] ARM exception vector question
@ 2008-02-27 9:17 Tom Deconinck
2008-02-27 9:26 ` Gary Thomas
2008-02-27 15:22 ` [ECOS] " Grant Edwards
0 siblings, 2 replies; 4+ messages in thread
From: Tom Deconinck @ 2008-02-27 9:17 UTC (permalink / raw)
To: ecos-discuss
Hi,
Perhaps of topic... because not 100% eCos related
I was wondering, is there a limitation on the address you can jump to
from an exception vector of an ARM 7? Can I jump to just any address?
(I thought I read something about this, but I can't find it
anymore...)
I have 2 setups: one running code exclusively out of internal and
external ram, and that works fine.
The other one is running the exact same code, but from external flash.
If I dump the memory where the exception vectors are located (code
running from external flash), I get this:
00000000 : 0xe59ff018 - 442503144 ....
00000004 : 0xe59ff018 - 442503144 ....
00000008 : 0xe59ff018 - 442503144 ....
0000000c : 0xe59ff018 - 442503144 ....
00000010 : 0xe59ff018 - 442503144 ....
00000014 : 0xeafffffe - 352321538 ....
00000018 : 0xe59ff018 - 442503144 ....
0000001c : 0xe59ff018 - 442503144 ....
00000020 : 0x10000040 268435520 @...
00000024 : 0x10000164 268435812 d...
00000028 : 0x10000188 268435848 ....
0000002c : 0x100001b4 268435892 ....
00000030 : 0x100001d0 268435920 ....
00000034 : 0xe59e0100 - 442629888 ....
00000038 : 0x100002d0 268436176 ....
0000003c : 0x10000298 268436120 ....
00000040 : 0xe92d500e - 382906354 .P-.
e.g. the IRQ vector (0x34) jumps directly to an address in external
flash, is this allowed or do I need to jump to another location first?
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ECOS] ARM exception vector question
2008-02-27 9:17 [ECOS] ARM exception vector question Tom Deconinck
@ 2008-02-27 9:26 ` Gary Thomas
2008-02-27 10:39 ` Tom Deconinck
2008-02-27 15:22 ` [ECOS] " Grant Edwards
1 sibling, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2008-02-27 9:26 UTC (permalink / raw)
To: Tom Deconinck; +Cc: ecos-discuss
Tom Deconinck wrote:
> Hi,
>
> Perhaps of topic... because not 100% eCos related
>
> I was wondering, is there a limitation on the address you can jump to
> from an exception vector of an ARM 7? Can I jump to just any address?
> (I thought I read something about this, but I can't find it
> anymore...)
>
> I have 2 setups: one running code exclusively out of internal and
> external ram, and that works fine.
>
> The other one is running the exact same code, but from external flash.
> If I dump the memory where the exception vectors are located (code
> running from external flash), I get this:
> 00000000 : 0xe59ff018 - 442503144 ....
> 00000004 : 0xe59ff018 - 442503144 ....
> 00000008 : 0xe59ff018 - 442503144 ....
> 0000000c : 0xe59ff018 - 442503144 ....
> 00000010 : 0xe59ff018 - 442503144 ....
> 00000014 : 0xeafffffe - 352321538 ....
> 00000018 : 0xe59ff018 - 442503144 ....
> 0000001c : 0xe59ff018 - 442503144 ....
> 00000020 : 0x10000040 268435520 @...
> 00000024 : 0x10000164 268435812 d...
> 00000028 : 0x10000188 268435848 ....
> 0000002c : 0x100001b4 268435892 ....
> 00000030 : 0x100001d0 268435920 ....
> 00000034 : 0xe59e0100 - 442629888 ....
> 00000038 : 0x100002d0 268436176 ....
> 0000003c : 0x10000298 268436120 ....
> 00000040 : 0xe92d500e - 382906354 .P-.
>
> e.g. the IRQ vector (0x34) jumps directly to an address in external
> flash, is this allowed or do I need to jump to another location first?
>
Have you looked at the sources (hal/arm/arch/current/src/vectors.S)?
On the ARM, you can jump indirect through a pointer. This is done
using the instruction
ldr pc,<loc>
where <loc> is a longword that has the address you want to jump to.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ECOS] ARM exception vector question
2008-02-27 9:26 ` Gary Thomas
@ 2008-02-27 10:39 ` Tom Deconinck
0 siblings, 0 replies; 4+ messages in thread
From: Tom Deconinck @ 2008-02-27 10:39 UTC (permalink / raw)
To: ecos-discuss
On Wed, Feb 27, 2008 at 10:25 AM, Gary Thomas <gary@mlbassoc.com> wrote:
>
> Tom Deconinck wrote:
> > Hi,
> >
> > Perhaps of topic... because not 100% eCos related
> >
> > I was wondering, is there a limitation on the address you can jump to
> > from an exception vector of an ARM 7? Can I jump to just any address?
> > (I thought I read something about this, but I can't find it
> > anymore...)
> >
> > I have 2 setups: one running code exclusively out of internal and
> > external ram, and that works fine.
> >
> > The other one is running the exact same code, but from external flash.
> > If I dump the memory where the exception vectors are located (code
> > running from external flash), I get this:
> > 00000000 : 0xe59ff018 - 442503144 ....
> > 00000004 : 0xe59ff018 - 442503144 ....
> > 00000008 : 0xe59ff018 - 442503144 ....
> > 0000000c : 0xe59ff018 - 442503144 ....
> > 00000010 : 0xe59ff018 - 442503144 ....
> > 00000014 : 0xeafffffe - 352321538 ....
> > 00000018 : 0xe59ff018 - 442503144 ....
> > 0000001c : 0xe59ff018 - 442503144 ....
> > 00000020 : 0x10000040 268435520 @...
> > 00000024 : 0x10000164 268435812 d...
> > 00000028 : 0x10000188 268435848 ....
> > 0000002c : 0x100001b4 268435892 ....
> > 00000030 : 0x100001d0 268435920 ....
> > 00000034 : 0xe59e0100 - 442629888 ....
> > 00000038 : 0x100002d0 268436176 ....
> > 0000003c : 0x10000298 268436120 ....
> > 00000040 : 0xe92d500e - 382906354 .P-.
> >
> > e.g. the IRQ vector (0x34) jumps directly to an address in external
> > flash, is this allowed or do I need to jump to another location first?
> >
>
> Have you looked at the sources (hal/arm/arch/current/src/vectors.S)?
>
> On the ARM, you can jump indirect through a pointer. This is done
> using the instruction
> ldr pc,<loc>
> where <loc> is a longword that has the address you want to jump to.
>
>
>
Yes I have. It's using the technique you described
e.g. ldr pc, .IRQ and IRQ is defined as .word IRQ so that explains
why it works.
I got confused because I know there are some architectures that only
allow you to jump to a limited memory region from an exception vector,
and then let you jump to any other address from there on.
So my software hang issue has it's root cause somewhere else ;)
Another question: 0x00000014 and 0x00000034 are marked as a reserved
exception vector
Does it have to be set to zero explicitly or is the garbage data I've
got there now acceptable?
Thanks for the clarification.
Tom
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ECOS] Re: ARM exception vector question
2008-02-27 9:17 [ECOS] ARM exception vector question Tom Deconinck
2008-02-27 9:26 ` Gary Thomas
@ 2008-02-27 15:22 ` Grant Edwards
1 sibling, 0 replies; 4+ messages in thread
From: Grant Edwards @ 2008-02-27 15:22 UTC (permalink / raw)
To: ecos-discuss
On 2008-02-27, Tom Deconinck <t.deconinck@gmail.com> wrote:
> I was wondering, is there a limitation on the address you can
> jump to from an exception vector of an ARM 7?
A direct jump has to be within a certain offset (64K?, I
forget...). You can jump anywhere by using an indirect jump
(through a pointer that has to be located within that same
offset).
> Can I jump to just any address? (I thought I read something
> about this, but I can't find it anymore...)
Yes, if you use an indirect jump.
> I have 2 setups: one running code exclusively out of internal and
> external ram, and that works fine.
>
> The other one is running the exact same code, but from external flash.
> If I dump the memory where the exception vectors are located (code
> running from external flash), I get this:
> 00000000 : 0xe59ff018 - 442503144 ....
> 00000004 : 0xe59ff018 - 442503144 ....
> 00000008 : 0xe59ff018 - 442503144 ....
> 0000000c : 0xe59ff018 - 442503144 ....
> 00000010 : 0xe59ff018 - 442503144 ....
> 00000014 : 0xeafffffe - 352321538 ....
> 00000018 : 0xe59ff018 - 442503144 ....
> 0000001c : 0xe59ff018 - 442503144 ....
> 00000020 : 0x10000040 268435520 @...
> 00000024 : 0x10000164 268435812 d...
> 00000028 : 0x10000188 268435848 ....
> 0000002c : 0x100001b4 268435892 ....
> 00000030 : 0x100001d0 268435920 ....
> 00000034 : 0xe59e0100 - 442629888 ....
> 00000038 : 0x100002d0 268436176 ....
> 0000003c : 0x10000298 268436120 ....
> 00000040 : 0xe92d500e - 382906354 .P-.
>
> e.g. the IRQ vector (0x34) jumps directly to an address in external
> flash, is this allowed or do I need to jump to another location first?
It depends on how far away the destination is. There used to
be a bug in the assembler where it wouldn't warn you when you
tried to jump to an absolute address that was out of range, but
that's been fixed for years.
--
Grant Edwards grante Yow! I'm totally DESPONDENT
at over the LIBYAN situation
visi.com and the price of CHICKEN
...
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-27 15:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-27 9:17 [ECOS] ARM exception vector question Tom Deconinck
2008-02-27 9:26 ` Gary Thomas
2008-02-27 10:39 ` Tom Deconinck
2008-02-27 15:22 ` [ECOS] " Grant Edwards
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).