This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Stand-alone application working from RAM
- To: "Jesper Skov" <jskov at redhat dot com>
- Subject: RE: [ECOS] Stand-alone application working from RAM
- From: "Jurica Baricevic" <jura at INTESIS dot hr>
- Date: Thu, 20 Jul 2000 16:50:15 +0200
- Cc: "Ecos" <ecos-discuss at sourceware dot cygnus dot com>
> >>>>> Jesper Skov wrote:
>
> Jurica> forgot to write it?). So, now I am going to link my
> Jurica> application to 0x80000000 (my rom_vectors section is at the
> Jurica> beginning of code) and hope that it will work. Otherwise, I
> Jurica> will have to go deeper into HAL... Anyway, I wonder is there
> Jurica> maybe anything else that I should care about?
>
> Yes, that might do it.
>
> Alternatively have the hal_memc_init macro copy the vectors there. I
> have the below (in a still not published platform HAL):
>
> (from platform.inc)
>
> #if !defined(CYG_HAL_STARTUP_RAM) || !defined(CYGSEM_HAL_USE_ROM_MONITOR)
> .macro hal_memc_init
> <possibly init memory controllers here!>
> #if !defined(CYGSEM_HAL_USE_ROM_MONITOR)
> // If we don't play nice with a ROM monitor, copy the required
> // vectors into the proper location.
> la t0,0x80000000 # dest addr
> la t1,utlb_vector # source addr
> la t3,utlb_vector_end # end dest addr
> 1:
> lw v0,0(t1) # get word
> addi t1,t1,4
> sw v0,0(t0) # write word
> addi t0,t0,4
> bne t1,t3,1b
> nop
>
> la t0,0x80000180 # dest addr
> la t1,other_vector # source addr
> la t3,other_vector_end # end dest addr
> 1:
> lw v0,0(t1) # get word
> addi t1,t1,4
> sw v0,0(t0) # write word
> addi t0,t0,4
> bne t1,t3,1b
> nop
> #endif
> .endm
> #define CYGPKG_HAL_MIPS_MEMC_DEFINED
> #endif
>
Thank you for the code - it helped me a lot since I didn't have to write it
by myself :-).
Only thing I had to modify is destination address of 'other_vector' because
my MIPS R3041 has general exception vector at 0x80000080.
Nevertheless, I am worried about using cached kernel segment in
'hal_memc_init' because cache is not yet initialized ('hal_cache_init' is
called latter).
Best regards,
Jura