[U-Boot] ARM: Incorrect ROM protection range?

Wolfgang Denk wd at denx.de
Thu Feb 24 08:07:35 CET 2011


Dear Albert ARIBAUD,

In message <4D660030.409 at free.fr> you wrote:
> 
> You're right that U-Boot protection should cover the whole of U-Boot, 
> including the relocation tables...

True.  This was overlooked  during all thie relocation rework.

>                              ... I *think* protection uses a monitor 
> length define for this. Can you verify this point, and check what your 
> "monitor length" define amounts to? Maybe it does not cover the 
> relocation tables any more.

I'm not sure if all boards do the same; the common CFI driver
("drivers/mtd/cfi_flash.c", search for "Monitor protection ON by
default) protects an area of "monitor_flash_len" bytes
starting at CONFIG_SYS_MONITOR_BASE plus the environment sector(s).

monitor_flash_len gets normally computed in archh/*/lib/board.c; on
ARM, we have this:

	monitor_flash_len = _bss_start_ofs;

> Would it not be better to compute the actual image size rather than rely 
> on a define?

This is already the case.  It's just that the computation is not
correct any more.


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
Those who do not  understand  Unix  are  condemned  to  reinvent  it,
poorly.              - Henry Spencer, University of Toronto Unix hack


More information about the U-Boot mailing list