[U-Boot-Users] MPC8266ADS patch

Curtis, Allen Allen.Curtis at Thales-IFS.com
Thu Sep 11 22:21:55 CEST 2003

> > <       $(OBJCOPY) -O binary $< $@ 2>/dev/null
> > ---
> > 	>       $(OBJCOPY) -O ppcboot $< $@ 2>/dev/null
> Please explain why. Does the MontaVista version of the  binutils  doe
> not understand "binary" output format any longer?
> The MontaVista tools will not convert binary to srec. You get an error
> message about unknown architecture. However I discovered the ppcboot
> which works fine.  Another solution is to use "dd" to strip the 64k

Well, this is a bug in the MV toolchain then. Complain at MV. We will
NOT add this to the Makefile as it breaks all other systems.

My suggestion was to add this as a comment to the Makefile.

> > Index: board/mpc8266ads/config.mk
> > ==================================================================
> > RCS file: /cvsroot/u-boot/u-boot/board/mpc8266ads/config.mk,v
> > retrieving revision 1.2
> > diff -r1.2 config.mk
> > 30c30
> > < TEXT_BASE = 0xfe000000
> > ---
> > 	> TEXT_BASE = 0xfff00000
> Please explain why you think this is necessary.
> The reset vector for 8260 is 0xfff00100. The easiest way to u-boot to put
> code at this location is to change TEXT_BASE. This is the same as the
> MPC8260 config.mk file....

There is no relation between the reset vector and TEXT_BASE. You  can
have the reset vector at 0x100 and TEXT_BASE - say - at 0x40000000. I
don't  think  I  want to change this configuration (which seems to be
working to several people) without a really good reason.

The reset address is either 0x00000100 or 0xfff00100. The current u-boot
configuration doesn't locate any code at these locations. The MPC8260
configuration specified TEXT_BASE as 0xfff00000 and it works. The current
u-boot configuration does not boot.

> FLASH_BASE 0xff800000 - the board ships with a 8MB SIMM. This is the base
> address.

You can map the flash at any  arbitrary  address.  I  don't  see  why
0xFF800000  would  be  any  better  than  0xFE000000  - on contrary -
mapping it at 0xFE000000 leaves enough room if there should ever be a
board with bigger flash chips.

As long as something responds to the 0xfff00xxx address range you are

> CFG_BCSR & CFG_PCI_INIT - according to the memory map in the MPC8266ADS
> manual, these are the physical addresses. You need to access the BCSR to
> enable the serial and Ethernet ports.

Physical addresses on a 82xx are programmable. The programming of the
memory controller decides where a device shows up  in  the  physiacal
memory  map. Please ignore the memory map given in the manyal - it is
just one example out of many possible, and it  is  an  example  which
will NOT work with Linux.

If the only hardware requirement is chip-select generation, this is correct.
It would be better to move these to another location.

> Actually I think it is a bug to map the BCSR at a  low  address  like
> 0x04500000.  Are  you  really,  really  sure that this will work with
> Linux?
> Virtual address != Physical address
> These are correct according to the documentation

You are wrong. There are certain address ranges in  Linux  which  are
mapped  with  virtual"physical 1:1. The IMMR and BCSR areas are among

This is very implementation specific. There have been several discussions
about the use of BATs with these architectures. 

> This works. The current u-boot implementation does not work. Perhaps the
> current configuration works with a different board configuration. If that
> true, then there should be a big note somewhere with detailed
> notes.

I doubt that you  have  any  Linux  applications  running  with  your

I see Linux and u-boot as two very different things. In my opinion it is
useful to have the BIOS follow the documented configuration. This helps the
person who is trying to bring up, and probably learn, a new platform. As
they become comfortable with the hardware they can deviate from the standard
configuration. The difference is that they made those changes and didn't
need to refer to several documents (or source code) to figure out a memory
map. When Linux boots, it assumes the BIOS is brain-dead and reconfigures
everything. The BCSR and IMMR will be relocated to what makes sense for that
operating environment.

More information about the U-Boot mailing list