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

Wolfgang Denk wd at denx.de
Fri Jul 25 18:08:29 CEST 2003


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