Skip to content
Snippets Groups Projects
Commit 74a18ee8 authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

crc32: Correct endianness of crc32 result


When crc32 is handled by the hash library, it requires the data to be in
big-endian format, since it reads it byte-wise. Thus at present the 'crc32'
command reports incorrect data. For example, previously we might see:

Peach # crc32 40000000 100
CRC32 for 40000000 ... 400000ff ==> 0d968558

but instead with the hash library we see:

Peach # crc32 40000000 100
CRC32 for 40000000 ... 400000ff ==> 5885960d

Correct this.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Reviewed-by: default avatarVadim Bendebury <vbendeb@google.com>
parent 2386060c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment