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

Hello,
CRC32 currently will return 0 if its sent buf address of zero. Is this 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.
Regards,
Richard W.

Dear Richard,
in message FD2AC9A020DDD51194710008C7089B200BEE221C@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
participants (2)
-
Wolfgang Denk
-
Woodruff, Richard