[U-Boot] [PATCH 1/4] Use absolute addressing for mpc85xx boot page

Wolfgang Denk wd at denx.de
Tue Oct 14 10:48:08 CEST 2008


Dear Trent Piepho,

In message <1223941151-13969-1-git-send-email-tpiepho at freescale.com> you wrote:
> The boot page and reset vector need to be at the absolute address
> 0xfffff000 and 0xfffffffc, respectively, when the CPU boots.
...
> To handle to both different U-Boot image sizes and flash locations, what we
> do is take the upper bits of the boot page from the location of .text and
> the lower bits are taken from the absolute address 0xfffff000.  How many
> bits to take depends on the size of the flash bank.  In effect the upper

I would like to point out that it is essential that the code must  be
able  to handle the situation where the flash bank size is unknown at
compile time, and becomes known anly at runtime when the flash driver
probes the actual flash size on the board.

This may be not strictly needed for the Freescale evaluation  boards,
but  it is definitely needed for other boards, and we must be able to
handle this.

> The bss segment should go after the end of the u-boot image.  Which is only
> at the fixed address 0 for platforms that don't remap flash.  For those

I'm not sure what you mean here. Bss becomes significant only after
relocation to RAM. By then, it must be located in a valid RAM area.
"fixed address 0" is no such valid address.

> Since this part of the linker script is the same for all mpc85xx targets,
> maybe it should be placed into an include file instead of duplicated?

That would make sense, indeed.

> -  .bootpg ADDR(.text) + 0x7f000 :
> +  __flash_mask = 128M - 1;

Does the linker actually understand the "128M" notation? Interesting -
I didn't know that.

But - where is the number coming from? I guess that's a hard-wired
flash size for this specific board?

This is bad, for two reasons: it means we have to maintain the same
data in several places (in the linker script plus in the board config
file), and second, we cannot handle boards where several size options
exist.

Flash bank sizes must not be hard wired.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
As in certain cults it is possible to kill a process if you know  its
true name.                      -- Ken Thompson and Dennis M. Ritchie


More information about the U-Boot mailing list