Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • early-display
  • variant-emmc-nvme-boot
  • 2023-01-25
  • v3
  • variant-emmc-nvme-boot
  • 2020-06-01
7 results

crc32.c

Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Simon Glass's avatar
    74a18ee8
    crc32: Correct endianness of crc32 result · 74a18ee8
    Simon Glass authored
    
    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>
    74a18ee8
    History
    crc32: Correct endianness of crc32 result
    Simon Glass authored
    
    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>