public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Which is correct start address with romram mode with powerpc 8245 ??  0x0 or 0xfff00100??
@ 2005-08-10 11:05 Steven_cheng
  2005-08-11 12:48 ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Steven_cheng @ 2005-08-10 11:05 UTC (permalink / raw)
  To: ecos-discuss

Hi All,

    Does anyone use the ROMRAM startup mode with powerpc 8245 ??

In my platform (CPU : powerpc 8245 / RAM:256MB)
I use the Cogent csb281 as the sample then port my platform.
But I find that the binary code start in the address 0x100 when romram mode,
I'm confused the start address 0x0 with 0xfff00100 with romram mode.

Which is correct start address with romram mode with powerpc 8245 ??  0x0 or
0xfff00100??
And I find that the rom code has been copyed to ram,  but it does not jump
to ram then run.
Is it correct ??

Thank you~~

Steven Cheng



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

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

* Re: [ECOS] Which is correct start address with romram mode with powerpc 8245 ??  0x0 or 0xfff00100??
  2005-08-10 11:05 [ECOS] Which is correct start address with romram mode with powerpc 8245 ?? 0x0 or 0xfff00100?? Steven_cheng
@ 2005-08-11 12:48 ` Gary Thomas
  2005-08-12  1:50   ` [ECOS] Which is correct start address with romram mode withpowerpc " Steven_cheng
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2005-08-11 12:48 UTC (permalink / raw)
  To: Steven_cheng; +Cc: eCos Discussion

On Wed, 2005-08-10 at 19:06 +0800, Steven_cheng wrote:
> Hi All,
> 
>     Does anyone use the ROMRAM startup mode with powerpc 8245 ??
> 
> In my platform (CPU : powerpc 8245 / RAM:256MB)
> I use the Cogent csb281 as the sample then port my platform.
> But I find that the binary code start in the address 0x100 when romram mode,
> I'm confused the start address 0x0 with 0xfff00100 with romram mode.
> 
> Which is correct start address with romram mode with powerpc 8245 ??  0x0 or
> 0xfff00100??
> And I find that the rom code has been copyed to ram,  but it does not jump
> to ram then run.
> Is it correct ??

It depends on how you have your hardware "strapped".  The PowerPC
starts execution at the RESET vector, which is 0x100 offset from
the vector base.  You have a choice, determined by the hardware
settings at boot/reset time, whether the vector space lives at
0x00000000 or 0xFFF00000.  Note: this value can (and normally
does) change once eCos runs to always be at 0x00000000.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

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

* Re: [ECOS] Which is correct start address with romram mode withpowerpc 8245 ??  0x0 or 0xfff00100??
  2005-08-11 12:48 ` Gary Thomas
@ 2005-08-12  1:50   ` Steven_cheng
  2005-08-12 13:48     ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Steven_cheng @ 2005-08-12  1:50 UTC (permalink / raw)
  To: Gary Thomas; +Cc: eCos Discussion

Dear Thomas,

    Thank you for your reply~~
    I have one question about the vector address with different startup 
mode. I think the bootup procedure of the ROMRAM is similar to the 
ROM, it should bootup from ROM address, so the vector address of 
the ROMRAM should be the same with ROM.

In other words, the ROM and ROMRAM should bootup from ROM
address.  Is it correct ??

But I find that the vector adderss are different in ROM/ROMRAM/RAM
with Cogent csb281 images.

StarupMode |  Vector Address | Reset Vector Address
---------------------------------------------------------------
ROM            |    0xFFF00000   |   0xFFF00100
ROMRAM   |    0x0                  |   0x100
RAM            |    0x0                  |   0x100

The ROMRAM vectort address is the same with the RAM. Is is correct ??

Thank you ~~

Steven Cheng


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

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

* Re: [ECOS] Which is correct start address with romram mode withpowerpc 8245 ??  0x0 or 0xfff00100??
  2005-08-12  1:50   ` [ECOS] Which is correct start address with romram mode withpowerpc " Steven_cheng
@ 2005-08-12 13:48     ` Gary Thomas
  0 siblings, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2005-08-12 13:48 UTC (permalink / raw)
  To: Steven_cheng; +Cc: eCos Discussion

On Fri, 2005-08-12 at 09:52 +0800, Steven_cheng wrote:
> Dear Thomas,
> 
>     Thank you for your reply~~
>     I have one question about the vector address with different startup 
> mode. I think the bootup procedure of the ROMRAM is similar to the 
> ROM, it should bootup from ROM address, so the vector address of 
> the ROMRAM should be the same with ROM.
> 
> In other words, the ROM and ROMRAM should bootup from ROM
> address.  Is it correct ??
> 
> But I find that the vector adderss are different in ROM/ROMRAM/RAM
> with Cogent csb281 images.
> 
> StarupMode |  Vector Address | Reset Vector Address
> ---------------------------------------------------------------
> ROM            |    0xFFF00000   |   0xFFF00100
> ROMRAM   |    0x0                  |   0x100
> RAM            |    0x0                  |   0x100
> 
> The ROMRAM vectort address is the same with the RAM. Is is correct ??

Do you understand how the "start from RESET" works on this platform?
Try reading the documentation (hardware manuals) and you'll see that
after RESET, *ALL* addresses map only onto the FLASH, so it doesn't
really matter what address the ROMRAM version is linked at. It starts
executing, just like the ROM version, at 0x100 into the code.  The
next thing that gets done is to set up the hardware to actually be
able to access the RAM, etc.  Once this is done, the code is copied 
from the FLASH (aka ROM) to RAM and then execution continues from 
that RAM location.  Thus the code needs to be linked at RAM addresses
even though it starts out life in ROM (hence the ROMRAM moniker)

In the case of the ROM version, it actually executes from the ROM
(FLASH), so it must be linked to those addresses.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

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

end of thread, other threads:[~2005-08-12 13:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-10 11:05 [ECOS] Which is correct start address with romram mode with powerpc 8245 ?? 0x0 or 0xfff00100?? Steven_cheng
2005-08-11 12:48 ` Gary Thomas
2005-08-12  1:50   ` [ECOS] Which is correct start address with romram mode withpowerpc " Steven_cheng
2005-08-12 13:48     ` 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).