[U-Boot-Users] (Newbie) MPS8272ADS image layout

VanBaren, Gerald (AGRE) Gerald.VanBaren at smiths-aerospace.com
Thu May 20 20:48:04 CEST 2004


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




More information about the U-Boot mailing list