Dear Matthias,

in message <[EMAIL PROTECTED]> you wrote:
> 
> even though I like the weak stuff, I agree with you. I also like Stefan's
> idea about removing the #ifdef from the code.
> 
> So I will update my patch in this direction.

Thanks.

> The main idea behind my patch is to fix the bootloader autoprotection
> for 4xx. Do you (sr, J., others) think i is also a good idea to add this:
> 
>         /* Monitor protection ON by default */
> #if (CFG_MONITOR_BASE >= CFG_FLASH_BASE)
>         flash_protect (FLAG_PROTECT_SET,
>                        CFG_MONITOR_BASE,
> +#if defined(CONFIG_4xx)
>                       0xffffffff,
> +#else
>                        CFG_MONITOR_BASE + monitor_flash_len  - 1,
> +#endif
>                        flash_get_info(CFG_MONITOR_BASE));
> #endif

No, I don't think this is a good idea.

First, I don't see what is so special about 4xx here. There are other
processors which have the reset vector at  the  end  of  the  address
space as well, so why do it for 4xx and not - for example - for 85xx?

Also, what makes you think it is  reasonable  to  protect  everything
from  CFG_MONITOR_BASE  to  the  end  of  memory? Yes, we usually pot
U-Boot close to the  end  of  the  flash  memory,  but  there  is  no
guarantee that every board configuration works that way. We could put
U-Boot  at  the  beginning  of  the  flash instead and just reserve a
single sector at the end of the flash for the reset vector. OK,  that
would need adaption of the linker script as well, but ...

I don't think this hardwired, absolute constant makes sense to me. If
0xffffffff is really the value to use, then it should be identical to
the "CFG_MONITOR_BASE + monitor_flash_len - 1" expression,  and  then
we should have no need for the #ifdef at all.

> To be honest, I hope to get my autoprotection patch into 1.3.3 (as a bug fix).

I see.


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: [EMAIL PROTECTED]
Microsoft Compatibility:
     your old Windows 3.11 application crash exactly as the new ones.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to