public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] RedBoot_INIT_TAB
@ 2002-06-05  6:41 Carles Perello
  2002-06-05  6:55 ` Gary Thomas
  0 siblings, 1 reply; 7+ messages in thread
From: Carles Perello @ 2002-06-05  6:41 UTC (permalink / raw)
  To: ecos-discuss

Hello,


While porting redboot to a new sa1110 platform I checked a problem with
the initialization loop:

for (init_entry = __RedBoot_INIT_TAB__; init_entry
!=&__RedBoot_INIT_TAB_END__;  init_entry++) {
         (*init_entry->fun)();
     }

I print the values following Gary's advice: 

RedBoot> +
CALLING 0x000086a8/0x50001b00
BACK
CALLING 0x000086ac/0x500006e4
BACK

however when I do an objdump of the downloaded code:

000086a8 <__CONFIG_options_TAB_END__>:
    86a8:       50001b80        andpl   r1, r0, r0, lsl #23

so..I guess the compiler is working right...which can be the source of
error?

cheers

carles






-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] RedBoot_INIT_TAB
  2002-06-05  6:41 [ECOS] RedBoot_INIT_TAB Carles Perello
@ 2002-06-05  6:55 ` Gary Thomas
       [not found]   ` <1023287315.24791.35.camel@stream.amrsystems.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Gary Thomas @ 2002-06-05  6:55 UTC (permalink / raw)
  To: Carles Perello; +Cc: eCos Discussion

On Wed, 2002-06-05 at 07:36, Carles Perello wrote:
> Hello,
> 
> 
> While porting redboot to a new sa1110 platform I checked a problem with
> the initialization loop:
> 
> for (init_entry = __RedBoot_INIT_TAB__; init_entry
> !=&__RedBoot_INIT_TAB_END__;  init_entry++) {
>          (*init_entry->fun)();
>      }
> 
> I print the values following Gary's advice: 
> 
> RedBoot> +
> CALLING 0x000086a8/0x50001b00
> BACK
> CALLING 0x000086ac/0x500006e4
> BACK

What happens after this?  Does it die here?

> 
> however when I do an objdump of the downloaded code:
> 
> 000086a8 <__CONFIG_options_TAB_END__>:
>     86a8:       50001b80        andpl   r1, r0, r0, lsl #23
> 
> so..I guess the compiler is working right...which can be the source of
> error?

I'm not sure what the question is.  It's perfectly reasonable for there
to be two (or more) symbols which have the same value.  'objdump' can
only show you one of them, which is probably what's your're seeing.

For example, in one of my RedBoot images, I have:
    00023e08 D __FIS_cmds_TAB__
    00023ec8 D __FIS_cmds_TAB_END__
    00023ec8 D __RedBoot_CMD_TAB__
    00024060 D __CONFIG_options_TAB__
    00024060 D __RedBoot_CMD_TAB_END__
    00024180 D __CONFIG_options_TAB_END__
    00024180 D __RedBoot_IDLE_TAB__
    00024188 D __RedBoot_IDLE_TAB_END__
    00024188 D __RedBoot_INIT_TAB__
    000241a8 D __NETDEVTAB__
    000241a8 D __RedBoot_INIT_TAB_END__
    000241b8 D __NETDEVTAB_END__

Here you can see that '__RedBoot_CMD_TAB_END__' and '__CONFIG_options_TAB__'
have the same value.  If I were to use objdump to display this area of memory,
or GDB for that matter, it might chose '__RedBoot_CMD_TAB_END__', even if
I was interested in '__CONFIG_options_TAB__'
    


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] RedBoot_INIT_TAB
       [not found]   ` <1023287315.24791.35.camel@stream.amrsystems.com>
@ 2002-06-05  7:41     ` Gary Thomas
  2002-06-05  7:55       ` Carles Perello
  0 siblings, 1 reply; 7+ messages in thread
From: Gary Thomas @ 2002-06-05  7:41 UTC (permalink / raw)
  To: Carles Perello; +Cc: eCos Discussion

* Please copy the public discussion list.

On Wed, 2002-06-05 at 08:28, Carles Perello wrote:
> On Wed, 2002-06-05 at 15:54, Gary Thomas wrote:
> 
> > 
> > What happens after this?  Does it die here?
> 
> Yes, if I activate the call to 0x000086a8/0x50001b00, at address
> 0x50001b00 there is nothing (thus it dies), however at 0x50001b80 I
> have: 

What *is* at 0x50001b00?

I'm confused where you put your print that gave this address.

> 
> 0x50001b80 <_do_flash_init>.
> 
> > I'm not sure what the question is.  It's perfectly reasonable for there
> > to be two (or more) symbols which have the same value.
> 
> well my reasoning was that the value assigned to _do_flash_init is
> right, however when I print the value within redboot it brings a wrong
> value (0x50001b00). 
> 
> cheers 
> 
> carles
> 
> 
> 



-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] RedBoot_INIT_TAB
  2002-06-05  7:41     ` Gary Thomas
@ 2002-06-05  7:55       ` Carles Perello
  2002-06-05  8:07         ` Gary Thomas
  0 siblings, 1 reply; 7+ messages in thread
From: Carles Perello @ 2002-06-05  7:55 UTC (permalink / raw)
  To: Gary Thomas; +Cc: ecos-discuss

On Wed, 2002-06-05 at 16:40, Gary Thomas wrote:

> What *is* at 0x50001b00?

ops sorry not to make myself clear,  I make the printf following the email 
http://sources.redhat.com/ml/ecos-discuss/2001-05/msg00559.html


Thus 0x50001b00 is the first printed value of init_entry->fun...which is
wrong and the system dies if I make the call....

cheers
carles


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] RedBoot_INIT_TAB
  2002-06-05  7:55       ` Carles Perello
@ 2002-06-05  8:07         ` Gary Thomas
  2002-06-05  9:11           ` Carles Perello
  0 siblings, 1 reply; 7+ messages in thread
From: Gary Thomas @ 2002-06-05  8:07 UTC (permalink / raw)
  To: Carles Perello; +Cc: eCos Discussion

On Wed, 2002-06-05 at 08:50, Carles Perello wrote:
> On Wed, 2002-06-05 at 16:40, Gary Thomas wrote:
> 
> > What *is* at 0x50001b00?
> 
> ops sorry not to make myself clear,  I make the printf following the email 
> http://sources.redhat.com/ml/ecos-discuss/2001-05/msg00559.html
> 
> 
> Thus 0x50001b00 is the first printed value of init_entry->fun...which is
> wrong and the system dies if I make the call....

I'm confused.  Your previous message shows what RedBoot is about
to execute, vs an objdump of the same data.  How did you get this RedBoot
image into memory (RAM/ROM/??)?  Things don't seem to be matching?

You might try this change:
    diag_dump_buf(__RedBoot_INIT_TAB__, &__RedBoot_INIT_TAB_END__);
    for (init_entry = __RedBoot_INIT_TAB__; init_entry != &__RedBoot_INIT_TAB_END__;  init_entry++) {
        (*init_entry->fun)();
    }

and compare the output with objdump of the same region.



-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] RedBoot_INIT_TAB
  2002-06-05  8:07         ` Gary Thomas
@ 2002-06-05  9:11           ` Carles Perello
  2002-06-05  9:32             ` Gary Thomas
  0 siblings, 1 reply; 7+ messages in thread
From: Carles Perello @ 2002-06-05  9:11 UTC (permalink / raw)
  To: Gary Thomas; +Cc: ecos-discuss

On Wed, 2002-06-05 at 17:07, Gary Thomas wrote:

> I'm confused.  Your previous message shows what RedBoot is about
> to execute, vs an objdump of the same data.  How did you get this RedBoot
> image into memory (RAM/ROM/??)?  Things don't seem to be matching?

I download a ROM image of redboot using JTAG. The objdump is from the
elf image equivalent of the binary I download.


> You might try this change:
>     diag_dump_buf(__RedBoot_INIT_TAB__, &__RedBoot_INIT_TAB_END__);
>     for (init_entry = __RedBoot_INIT_TAB__; init_entry != &__RedBoot_INIT_TAB_END__;  init_entry++) {
>         (*init_entry->fun)();
>     }

Now is me who is confused, if I do this (keeping the printf, but
comenting out the actual call) the output looks:

+00008688: 80 1B 00 50 E4 06 00 50                   |...P...P       |
CALLING 0x000086a8/0x50001b80
BACK
CALLING 0x000086ac/0x500006e4
BACK

if I remove the diag_dump_buf, then the output is:

+CALLING 0x000086a8/0x50001b00
BACK
CALLING 0x000086ac/0x500006e4
BACK

the values given by diag_dump_buf are correct..however the system still
dies..I'll be digging that way...










> 
> and compare the output with objdump of the same region.
> 
> 



-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] RedBoot_INIT_TAB
  2002-06-05  9:11           ` Carles Perello
@ 2002-06-05  9:32             ` Gary Thomas
  0 siblings, 0 replies; 7+ messages in thread
From: Gary Thomas @ 2002-06-05  9:32 UTC (permalink / raw)
  To: Carles Perello; +Cc: eCos Discussion

On Wed, 2002-06-05 at 10:06, Carles Perello wrote:
> On Wed, 2002-06-05 at 17:07, Gary Thomas wrote:
> 
> > I'm confused.  Your previous message shows what RedBoot is about
> > to execute, vs an objdump of the same data.  How did you get this RedBoot
> > image into memory (RAM/ROM/??)?  Things don't seem to be matching?
> 
> I download a ROM image of redboot using JTAG. The objdump is from the
> elf image equivalent of the binary I download.
> 
> 
> > You might try this change:
> >     diag_dump_buf(__RedBoot_INIT_TAB__, &__RedBoot_INIT_TAB_END__);
> >     for (init_entry = __RedBoot_INIT_TAB__; init_entry != &__RedBoot_INIT_TAB_END__;  init_entry++) {
> >         (*init_entry->fun)();
> >     }
> 
> Now is me who is confused, if I do this (keeping the printf, but
> comenting out the actual call) the output looks:
> 
> +00008688: 80 1B 00 50 E4 06 00 50                   |...P...P       |
> CALLING 0x000086a8/0x50001b80
> BACK
> CALLING 0x000086ac/0x500006e4
> BACK
> 
> if I remove the diag_dump_buf, then the output is:
> 
> +CALLING 0x000086a8/0x50001b00
> BACK
> CALLING 0x000086ac/0x500006e4
> BACK
> 
> the values given by diag_dump_buf are correct..however the system still
> dies..I'll be digging that way...

This is really scary!

Try turning off the CACHES (there are CDL options which say whether or
not to enable the caches at boot time)
  CYGSEM_HAL_ENABLE_DCACHE_ON_STARTUP
  CYGSEM_HAL_ENABLE_ICACHE_ON_STARTUP



-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-06-05 16:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-05  6:41 [ECOS] RedBoot_INIT_TAB Carles Perello
2002-06-05  6:55 ` Gary Thomas
     [not found]   ` <1023287315.24791.35.camel@stream.amrsystems.com>
2002-06-05  7:41     ` Gary Thomas
2002-06-05  7:55       ` Carles Perello
2002-06-05  8:07         ` Gary Thomas
2002-06-05  9:11           ` Carles Perello
2002-06-05  9:32             ` Gary Thomas

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).