[U-Boot-Users] Should CRC32 be changed to work against addres s 0 ?

Woodruff, Richard r-woodruff2 at ti.com
Fri Jul 25 18:21:35 CEST 2003


Pretty much as I guessed and I've changed mine. ... However, from my point
of view, as a user I'd rather take the exception when trying to touch zero
as opposed to a wrong answer.  I think that most mmu aware systems have
disallowed access to virtual address zero for some time.  If the code came
from the embedded space than maybe.

Richard W.

> -----Original Message-----
> From: Wolfgang Denk [mailto:wd at denx.de] 
> Sent: Friday, July 25, 2003 11:08 AM
> To: Woodruff, Richard
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [U-Boot-Users] Should CRC32 be changed to work 
> against address 0 ? 
> 
> 
> Dear Richard,
> 
> in message 
> <FD2AC9A020DDD51194710008C7089B200BEE221C at dlee17.itg.ti.com> 
> you wrote:
> >  
> > CRC32 currently will return 0 if its sent buf address of zero.  Is 
> > this
> 
> Arghhh...
> 
> > proper?  My ROM is at zero, so running a CRC32 over it might be a 
> > useful thing, however, CRC 32 always returns 0 for a start 
> address of 
> > zero.  Is there some reason this needs to be this way?  It doesn't 
> > seem right to me at first glance.
> 
> The reason is that the CRC32  code  was  designed  to  be  
> used  with user-land  applications in a standard OS, where a 
> NULL buffer pointer is always an indication of some problem.
> 
> With U-Boot, this is just a bug. Thanks for pointing it out.
> 
> Fixed in my local tree. Will push it to CVS later today.
> 
> Best regards,
> 
> Wolfgang Denk
> 
> -- 
> Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
> Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: 
> wd at denx.de ... Jesus cried with a loud voice: Lazarus, come 
> forth; the bug  hath been  found  and  thy  program  runneth. 
>  And  he  that was dead came
> forth...                              -- John 11:43-44 [version 2.0?]
> 




More information about the U-Boot mailing list