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: "Jurica Baricevic" <jura at INTESIS dot hr>
- Subject: Re: [ECOS] Stand-alone application working from RAM
- From: Jesper Skov <jskov at redhat dot com>
- Date: 20 Jul 2000 08:48:48 +0200
- Cc: "Ecos" <ecos-discuss at sourceware dot cygnus dot com>
- References: <001a01bff19e$7874cab0$6b00a8c0@JURA>
>>>>> "Jurica" == Jurica Baricevic <jura@INTESIS.hr> writes:
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
Jesper