public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] (Newbie) MPS8272ADS image layout
@ 2004-05-20 17:58 Ward C. Travis
  2004-05-23  9:28 ` [U-Boot-Users] " Yuli Barcohen
  0 siblings, 1 reply; 6+ messages in thread
From: Ward C. Travis @ 2004-05-20 17:58 UTC (permalink / raw)
  To: u-boot

Forgive me if I have overlooked something simple.

I have compiled u-boot using 'config_MPC8272ADS' and, following Wolfgang's advice, modified as little as possible. I accepted all the defaults, providing no overrides on the make line.

Looking at he .srec file, it appears that the image is to be loaded at 0xfff00000 . The configuration words are based there and _start is placed beyond them, at the image + 0x0100 .

The ADS board I am working with has the standard 8MB flash SIMM, which when the board boots from flash is mapped beginning at 0xff800000.

I am unclear on how the MPC8272 reset vectors the PC to 0xfff00100. Perhaps the simple question is, should the image be loaded into flash at some other address? My flash is clear - it is a rented board - and so there is no previous loader or configuration words in flash; hence I must boot from EEPROM and download the code (with Metrowerks, via parallel) while flash is remapped for EEPROM boot. I currently am experimenting with programming the image at various offsets from the beginning of flash. But once I reconfigure to boot from flash and power-cycle, of course, I see no sign of activity.

Thanks for any advice,
-wt

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

* [U-Boot-Users] (Newbie) MPS8272ADS image layout
@ 2004-05-20 18:48 VanBaren, Gerald
  2004-05-20 19:51 ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: VanBaren, Gerald @ 2004-05-20 18:48 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: u-boot-users-admin at lists.sourceforge.net
> [mailto:u-boot-users-admin at lists.sourceforge.net]On Behalf Of Ward C.
> Travis
> Sent: Thursday, May 20, 2004 1:59 PM
> To: u-boot-users at lists.sourceforge.net
> Subject: [U-Boot-Users] (Newbie) MPS8272ADS image layout
>
>
> Forgive me if I have overlooked something simple.
>
> I have compiled u-boot using 'config_MPC8272ADS' and,
> following Wolfgang's advice, modified as little as possible.
> I accepted all the defaults, providing no overrides on the make line.
>
> Looking at he .srec file, it appears that the image is to be
> loaded at 0xfff00000 . The configuration words are based
> there and _start is placed beyond them, at the image + 0x0100 .
>
> The ADS board I am working with has the standard 8MB flash
> SIMM, which when the board boots from flash is mapped
> beginning at 0xff800000.
>
> I am unclear on how the MPC8272 reset vectors the PC to
> 0xfff00100. Perhaps the simple question is, should the image
> be loaded into flash at some other address? My flash is clear
> - it is a rented board - and so there is no previous loader
> or configuration words in flash; hence I must boot from
> EEPROM and download the code (with Metrowerks, via parallel)
> while flash is remapped for EEPROM boot. I currently am
> experimenting with programming the image at various offsets
> from the beginning of flash. But once I reconfigure to boot
> from flash and power-cycle, of course, I see no sign of activity.
>
> Thanks for any advice,
> -wt

You need to understand the standard PowerPC memory map, booting: the PowerPC (MPC8272 User's Manual, 603e User's Manual) are your references on this.

* On release from reset, the PowerPC fetches the Hardware Reset Config Word (HRCW) from the first 32 bytes of memory.  You need a valid HRCW for the PPC to run.  You may already have one, but probably not if your flash is zeroed.  (I believe the MPC8272ADS has an option to use a CPLD to supply the HRCW.  You can also strap RESETCFG to use a default HRCW to allow you to get the real one in flash.)

* On release from reset, the PPC sets BR0/OR0 to map the top 16MB of memory to CS0.  This will make your flash appear (twice, since it is 8MB) at 0xff000000..ffffffff.  The PowerPC then starts executing at offset 0xfff00100 (the reset vector, which is in the top 1MB of flash).  Note that there is an option to "low boot", selected via the HRCW, in which case CS0 is mapped to 0x00000000..0x000FFFFF and the reset vector is at 0x00000100 -- u-boot supports this option but it is not used as often as high boot.

You need to program your HRCW (the first 32 bytes of your u-boot image) at the start of your flash.  You need u-boot itself (which can include the first 256 bytes with no harm) needs to be programmed in the last 1MB of your flash.

Your text indicated that, when you are programming it, your flash is mapped to 0xff800000..ffffffff.  You want to program the u-boot image there (0xff800000) to get the HRCW in the first bytes of flash and program it AGAIN at 0xfff00000 to get the executable portion of u-boot in the right place.  (The first copy will have the executable portion in the wrong place and the second copy will have the HRCW in the wrong place -- don't worry about that, it is non-fatal.  You can fix it when you get your board running and have time to become more sophisticated.)

After doing this, a reset should bring u-boot to life.

gvb



******************************************
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege.  If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager.  Please do not copy it for any purpose, or disclose its contents to any other person.  The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company.  The recipient should check this e-mail and any attachments for the presence of viruses.  The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
******************************************

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

* [U-Boot-Users] (Newbie) MPS8272ADS image layout
@ 2004-05-20 19:00 Rune Torgersen
  0 siblings, 0 replies; 6+ messages in thread
From: Rune Torgersen @ 2004-05-20 19:00 UTC (permalink / raw)
  To: u-boot

> Looking at he .srec file, it appears that the image is to be 
> loaded at 0xfff00000 . The configuration words are based 
> there and _start is placed beyond them, at the image + 0x0100 .
> 
> The ADS board I am working with has the standard 8MB flash 
> SIMM, which when the board boots from flash is mapped 
> beginning at 0xff800000.

The flash is mapped to 0xff800000 but the CPU starts executing at
0xfff00100 (reset vector)
0xfff000000 contains the Hardware Configuration word. 

The HRCW is what decides the reset vector address, and ont eh motorola
ADS boards, theis is eityher feced from FLASH, or from a PLD, depening
om a board jumper/switch.

Flash the image at an offset so that when booting from FLASH SIMM, the
image is located at 0xfff00000
(When booting from EEPROM, find out the SIMM flash base address, and
program at an offset of 0x00700000 into it)

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

* [U-Boot-Users] (Newbie) MPS8272ADS image layout
  2004-05-20 18:48 [U-Boot-Users] " VanBaren, Gerald
@ 2004-05-20 19:51 ` Wolfgang Denk
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2004-05-20 19:51 UTC (permalink / raw)
  To: u-boot

In message <065ACD8E84315E4394C835E398C8D5EB09224B@cossmgmbx02.email.corp.tld> you wrote:
> 
>  that there is an option to "low boot", selected via the HRCW, in which
>  case CS0 is mapped to 0x00000000..0x000FFFFF and the reset vector is at
>  0x00000100 -- u-boot supports this option but it is not used as often as
>  high boot.

I disagree. At least for the systems I see there  are  morre  systems
using low-boot.


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
: ... and it's got weird formatting - Notepad, Write, Works  3  can't
: decipher it, and it's too big to go in DOS Edit. Help!
Install an operating system. :-)                  -- Tom Christiansen

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

* [U-Boot-Users] (Newbie) MPS8272ADS image layout
@ 2004-05-20 20:29 VanBaren, Gerald
  0 siblings, 0 replies; 6+ messages in thread
From: VanBaren, Gerald @ 2004-05-20 20:29 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: wd at denx.de [mailto:wd at denx.de]
> Sent: Thursday, May 20, 2004 3:51 PM
> To: VanBaren, Gerald (AGRE)
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [U-Boot-Users] (Newbie) MPS8272ADS image layout
>
>
> In message
> <065ACD8E84315E4394C835E398C8D5EB09224B@cossmgmbx02.email.corp
> .tld> you wrote:
> >
> >  that there is an option to "low boot", selected via the
> HRCW, in which
> >  case CS0 is mapped to 0x00000000..0x000FFFFF and the reset
> vector is at
> >  0x00000100 -- u-boot supports this option but it is not
> used as often as
> >  high boot.
>
> I disagree. At least for the systems I see there  are  morre  systems
> using low-boot.
>
>
> Best regards,
>
> Wolfgang Denk
>
> --
> Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
> Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
> : ... and it's got weird formatting - Notepad, Write, Works  3  can't
> : decipher it, and it's too big to go in DOS Edit. Help!
> Install an operating system. :-)                  -- Tom Christiansen


OK, I'll defer to Wolfgang's considerable experience.  With the "low boot" option the HRCW gets programmed properly (inherently) when programming u-boot (i.e. you don't have to do the double-program mess I described in my previous email).

Note to Ward Travis [w.travis at earthlink.net]: You select the "low boot" option in the HRCR Bit 16 "BMS" (Boot Memory Space).  You then want to program your u-boot image at 0xFF800000 (the start of your flash), change any jumpers that need changing (e.g. RSTCONF), and reset the board.  U-boot should just run.

gvb



******************************************
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege.  If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager.  Please do not copy it for any purpose, or disclose its contents to any other person.  The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company.  The recipient should check this e-mail and any attachments for the presence of viruses.  The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
******************************************

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

* [U-Boot-Users] Re: (Newbie) MPS8272ADS image layout
  2004-05-20 17:58 [U-Boot-Users] (Newbie) MPS8272ADS image layout Ward C. Travis
@ 2004-05-23  9:28 ` Yuli Barcohen
  0 siblings, 0 replies; 6+ messages in thread
From: Yuli Barcohen @ 2004-05-23  9:28 UTC (permalink / raw)
  To: u-boot

>>>>> Ward C Travis writes:

    Ward> Forgive me if I have overlooked something simple.  I have
    Ward> compiled u-boot using 'config_MPC8272ADS' and, following
    Ward> Wolfgang's advice, modified as little as possible. I accepted
    Ward> all the defaults, providing no overrides on the make line.

    Ward> Looking at he .srec file, it appears that the image is to be
    Ward> loaded at 0xfff00000 . The configuration words are based there
    Ward> and _start is placed beyond them, at the image + 0x0100 .

    Ward> The ADS board I am working with has the standard 8MB flash
    Ward> SIMM, which when the board boots from flash is mapped
    Ward> beginning at 0xff800000.

    Ward> I am unclear on how the MPC8272 reset vectors the PC to
    Ward> 0xfff00100. Perhaps the simple question is, should the image
    Ward> be loaded into flash at some other address?

The U-Boot must be loaded at the address for which it's built
i.e. 0xFFF00000. It will start running from 0xFFF00100 because the CPU
is "told" to do so by hard reset configuration word (HRCW), and it does
not matter what the flash start address is. Chapter 5 of MPC8272
reference manual would help.

    Ward> My flash is clear - it is a rented board - and so there is no
    Ward> previous loader or configuration words in flash; hence I must
    Ward> boot from EEPROM

No, you don't (and must not). This board provides three possible sources
for the HRCW: BCSR (the CPLD), flash and EEPROM. Unless somebody erased
first sector of the flash, there should be HRCW, but the most reliable
way is to use BCSR: it can't be erased. Unfortunately, it uses high boot
(0xFFF00100) and not low boot as it should be for such big flashes (more
than 1MB). This is the reason the U-Boot is built by default to start at
0xFFF00000. You should not change the jumpers to boot from EEPROM
because then CS0 will be mapped to EEPROM and the flash (containing the
U-Boot) will be unmapped. Please note that the HRCW which you see at the
beginning of the U-Boot image won't be used at all because these
addresses can't respond to first four bus transactions.

    Ward> and download the code (with Metrowerks, via parallel) while
    Ward> flash is remapped for EEPROM boot.  I currently am
    Ward> experimenting with programming the image at various offsets
    Ward> from the beginning of flash. But once I reconfigure to boot
    Ward> from flash and power-cycle, of course, I see no sign of
    Ward> activity.

-- 
========================================================================
 Yuli Barcohen       | Phone +972-9-765-1788 |  Software Project Leader
 yuli at arabellasw.com | Fax   +972-9-765-7494 | Arabella Software, Israel
========================================================================

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

end of thread, other threads:[~2004-05-23  9:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-20 17:58 [U-Boot-Users] (Newbie) MPS8272ADS image layout Ward C. Travis
2004-05-23  9:28 ` [U-Boot-Users] " Yuli Barcohen
  -- strict thread matches above, loose matches on Subject: below --
2004-05-20 18:48 [U-Boot-Users] " VanBaren, Gerald
2004-05-20 19:51 ` Wolfgang Denk
2004-05-20 19:00 Rune Torgersen
2004-05-20 20:29 VanBaren, Gerald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox