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.



> -----Original Message-----
> From: Grant Edwards [mailto:grante@visi.com]
> Sent: Tuesday, April 02, 2002 9:17 PM
> Subject: Re: [ECOS] Redboot from ROM and Virtual Vectors.
> 
> 
> I found that re-mapping memory, though requiring a bit of 
> tricky assembly language, made life much easier.


I also think that remapping is the way to go, however on my platform the
remapping works a bit differently than other ARM platform i have seen.

On my case, ROM goes from 0 to 0x400000 and an 8k SRAM starts at 0x400000. 
After remaping i get the SRAM at 0 and the first 8k of ram are remapped at
0x400000.

The vectors in SRAM are initialized by copying the vectors in ROM at zero.
In most case the ROM doesnt start at zero (but is remmaped to 0 at startup)
so that ROM vectors always stays at the same adress in ROM.

For now my workaround is to add some target specific code in vectors.S.
Basically each time there is a 
	ldr r1, =__exception_vectors
I add
#ifdef MY_TARGET
	add r1, #0x400000
#endif

I have tried to play with the Memory layout so that it dont have to do that
but so far it doesnt seems possible.

-- 
Fabrice Gautier, 
Fabrice_Gautier@sdesigns.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]