AM64x MCU+ SDK  09.02.00
sdl_ip_rom_checksum.h File Reference

Introduction

This file contains the SDL-FL API's for ROM Checksum.

Go to the source code of this file.

Data Structures

struct  SDL_ROM_Checksum_obj
 This structure is used to store the resultant value of ROM Checksum. More...
 

Macros

#define SDL_ch(x, y, z)   (z ^ (x & (y ^ z)))
 
#define SDL_Maj(x, y, z)   (((x | y) & z) | (x & y))
 
#define SDL_S(x, n)   (SDL_ROR64c(x, n))
 
#define SDL_R(x, n)   (((uint64_t)(x)&SDL_CONST64(0xFFFFFFFFFFFFFFFFU))>>((uint64_t)n))
 
#define SDL_Sigma0(x)   (SDL_S(x, 28) ^ SDL_S(x, 34) ^ SDL_S(x, 39))
 
#define SDL_Sigma1(x)   (SDL_S(x, 14) ^ SDL_S(x, 18) ^ SDL_S(x, 41))
 
#define SDL_Gamma0(x)   (uint64_t)(SDL_S(x, 1) ^ SDL_S(x, 8) ^ SDL_R(x, 7))
 
#define SDL_Gamma1(x)   (uint64_t)(SDL_S(x, 19) ^ SDL_S(x, 61) ^ SDL_R(x, 6))
 
#define SDL_BLOCK_SIZE   (uint8_t)128
 
#define SDL_MIN(x, y)   ( ((x)<(y))?(x):(y) )
 
#define SDL_CONST64(x)   (uint64_t)x
 

Functions

void SDL_ROM_Checksum_init (SDL_ROM_Checksum_obj *const md)
 This API will Initialize the buffer where hash value to be stored. More...
 
int32_t SDL_ROM_Checksum_process (SDL_ROM_Checksum_obj *md, uint8_t *in, uint32_t inlen)
 This API is used to process the ROM region data. More...
 
void SDL_ROM_Checksum_compress (SDL_ROM_Checksum_obj *md, uint8_t *buf)
 This API is used to compress the data of ROM region and store the result in md->state. More...
 
int32_t SDL_ROM_Checksum_done (SDL_ROM_Checksum_obj *md)
 This API will increase our data length with the help of padding ( because our algorithm can compress only 1024-bit length of data at a time) and will compress then will store final has value in md->state. More...
 
int32_t SDL_ROM_Checksum_compareResult (uint64_t buflen, SDL_ROM_Checksum_obj *md, uint64_t *golden_value)
 This API will compare the resultant hash value of golden value. More...
 
void SDL_memcpy (void *dest, void *src, uint32_t n)
 This API will copy source pointer data to destination pointer. More...
 

Macro Definition Documentation

◆ SDL_ch

#define SDL_ch (   x,
  y,
 
)    (z ^ (x & (y ^ z)))

◆ SDL_Maj

#define SDL_Maj (   x,
  y,
 
)    (((x | y) & z) | (x & y))

◆ SDL_S

#define SDL_S (   x,
 
)    (SDL_ROR64c(x, n))

◆ SDL_R

#define SDL_R (   x,
 
)    (((uint64_t)(x)&SDL_CONST64(0xFFFFFFFFFFFFFFFFU))>>((uint64_t)n))

◆ SDL_Sigma0

#define SDL_Sigma0 (   x)    (SDL_S(x, 28) ^ SDL_S(x, 34) ^ SDL_S(x, 39))

◆ SDL_Sigma1

#define SDL_Sigma1 (   x)    (SDL_S(x, 14) ^ SDL_S(x, 18) ^ SDL_S(x, 41))

◆ SDL_Gamma0

#define SDL_Gamma0 (   x)    (uint64_t)(SDL_S(x, 1) ^ SDL_S(x, 8) ^ SDL_R(x, 7))

◆ SDL_Gamma1

#define SDL_Gamma1 (   x)    (uint64_t)(SDL_S(x, 19) ^ SDL_S(x, 61) ^ SDL_R(x, 6))

◆ SDL_BLOCK_SIZE

#define SDL_BLOCK_SIZE   (uint8_t)128

◆ SDL_MIN

#define SDL_MIN (   x,
 
)    ( ((x)<(y))?(x):(y) )

◆ SDL_CONST64

#define SDL_CONST64 (   x)    (uint64_t)x