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 from ROM and Virtual Vectors.


On Tue, Apr 02, 2002 at 05:42:49PM -0800, Fabrice Gautier wrote:

> When using Redboot, it seems that, at least on ARM, the VV table is
> initialized at run time.
> That means that the virtual vector cant reside in ROM. However the VV table
> is located in the .vector section which contains also the hardware vectors
> which are initialized in ROM (at compile time)

At one point a few years back, I messed with the ARM architecture HAL code
so that I could have the .vectors in ROM.  It was a pain, and required me to
maintain non-standard ARM/arch startup code. Then the guy who wanted the
vectors in ROM quit, so I added startup code that remaps memory to place RAM
at address 0 (where the interrupt vectors go).

As an aside, I put my VV table somewhere else entirely.  Interrupt vectors
are at the bottom of RAM (address 0x00000000).  On my board, RedBoot lives
at the top of RAM, and that's where my VV table is.

> Is there any target that has the virtual vectors hardcoded in ROM, or should
> they absolutely be located in RAM.

You're going to loose a lot of functionality if they're in ROM, but I
suppose you could get it to work that way.

> And can the hardware vectors on ARM reside in ROM forever or should they be
> placed in RAM at some point? (I think the other ARM targets have a remap
> function to chose wether the hard vectors are in RAM or ROM)

If you hack up the ARM startup code, you can get things to work with
interrupt vectors in ROM: you have to vector them through a secondary vector
table that's in RAM, so it adds complexity and slows things down.  It's
especially painful if that secondary table is too far away for a direct jump.

I found that re-mapping memory, though requiring a bit of tricky assembly
language, made life much easier.

-- 
Grant Edwards
grante@visi.com

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