This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: help me to port mbx860 ethernet
- To: Nohee Ko <nhko at gctsemi dot com>
- Subject: Re: [ECOS] help me to port mbx860 ethernet
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Mon, 21 May 2001 15:26:47 +0100
- Cc: ecos-discuss at sources dot redhat dot com
- Organization: Red Hat UK Ltd.
- References: <9860C773D04D834D83FD6FAD00A61E9311B6E8@gctsemi.gctsemi.com>
Nohee Ko wrote:
>
> hi.
> I'm confused about routine below.
> for (init_entry = __RedBoot_INIT_TAB__; init_entry !=
> &__RedBoot_INIT_TAB_END__; init_entry++) {
> (*init_entry->fun)();
> }
> this routine are in /redboot/current/src/main.c .
>
> what does this routine do?
> It seems to do such like "RedBoot_init or things".
Yes.
> But I can't exactly understand this routine.
> where is __RedBoot_INIT_TAB__, _RedBoot_INIT_TAB_END__ ?
They get defined in redboot's main.c:
CYG_HAL_TABLE_BEGIN( __RedBoot_INIT_TAB__, RedBoot_inits );
CYG_HAL_TABLE_END( __RedBoot_INIT_TAB_END__, RedBoot_inits );
extern struct init_tab_entry __RedBoot_INIT_TAB__[],
__RedBoot_INIT_TAB_END__;
You can see the definition of CYG_HAL_TABLE_* in
hal/common/current/include. It manipulates ELF symbols.
> And what does "(*init_entry->fun)()" function do?
It iterates over the contents of the table, calling the function in each
one.
> My board operates wrong when doing this routine ( actually right after
> power on)
> then, I can see weird message on my debug monitor.
> ==> +$T0540:fe00ef04;01:00004a8c;#b2
This indicates your board hit an exception at 0xfe00ef04. Perhaps
disassemble your image using powerpc-eabi-objdump -d to find exactly where
this address is.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine