public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Gary Thomas <gthomas@cambridge.redhat.com>
To: "Narayana, Venkat A." <NarayVA@nsc-msg01.network.com>
Cc: "ecos-discuss@sources.redhat.com" <ecos-discuss@sources.redhat.com>
Subject: RE: [ECOS] What is RedBoot_INIT_TAB,
Date: Thu, 31 May 2001 08:54:00 -0000	[thread overview]
Message-ID: <XFMail.20010531095357.gthomas@cambridge.redhat.com> (raw)
In-Reply-To: <A7E1C26945C8D211ADBF0008C709661A02A48813@nsc-msg02.network.com>

On 31-May-2001 Narayana, Venkat A. wrote:
> Hi,
> I am trying to make a ROM startup for my XScale based board
> and i am getting an error, while single-stepping this code, which is in
> main.c/cyg_start fucn:
> 
> for (init_entry = __RedBoot_INIT_TAB__; init_entry !=
> &__RedBoot_INIT_TAB_END__;  init_entry++) {
>         (*init_entry->fun)();
>     }
> 
> I found that RedBoot_INIT_TAB is defined, in CYG_HAL_TABLE_BEGIN macro,
> but by the time i reach the above point, i.e cyg_start function, i haven't
> seen anything
> which is poulating this Table. So the question is, if no one is putting some
> data(actual a 
> function pointer), the why is it that we are calling init_entry->fun,
> function?

This table is filled in using the RedBoot_init() macro.  E.g. this is used
by the network initialization code in the file "redboot/current/src/net/net_io.c"

Depending on your configuration, you may or not have any entries in the table.

I'd suggest that you put some prints around the call and see what it's calling
and whether or not it gets back.  For example:

        printf("Calling %p/%p\n", init_entry, init_entry->fun);
        (*init_entry->fun)();
        printf("Back\n");

The extra value printed (init_entry) is to see whether or not things are properly
aligned.  This particular table has only 4 byte entries, but I've seen the compiler
do funny things like try and align table elements on 16 byte boundaries, etc.

> Is there something i didn't understood or missed?
> Could i choose to call this guy, only when the board is ' warm_reset'?

No, it needs to be there always.

Please run the test I've outlined. Let us know what happens.

  reply	other threads:[~2001-05-31  8:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-31  8:35 Narayana, Venkat A.
2001-05-31  8:54 ` Gary Thomas [this message]
2001-05-31  9:03 ` Jonathan Larmour
2001-05-31 10:02 ` [ECOS] Executable Size Carlos Camargo
2001-05-31 10:15   ` Jonathan Larmour
2001-05-31 10:45     ` Carlos Camargo
2001-05-31 11:26       ` Jonathan Larmour
2001-06-21  8:51 [ECOS] What is RedBoot_INIT_TAB, Narayana, Venkat A.
2001-06-21  8:59 ` Gary Thomas
2001-06-21 12:02 ` Jonathan Larmour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=XFMail.20010531095357.gthomas@cambridge.redhat.com \
    --to=gthomas@cambridge.redhat.com \
    --cc=NarayVA@nsc-msg01.network.com \
    --cc=ecos-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).