AM62Px MCU+ SDK
09.02.01
Go to the documentation of this file.
42 #ifndef _sdl_ip_rom_checksum_H
43 #define _sdl_ip_rom_checksum_H
53 #define SDL_ch(x,y,z) (z ^ (x & (y ^ z))) //this function will (x AND y) XOR (NOT x AND z)
54 #define SDL_Maj(x,y,z) (((x | y) & z) | (x & y))
55 #define SDL_S(x, n) (SDL_ROR64c(x, n)) //Rotate right circular shift by n bits
56 #define SDL_R(x, n) (((uint64_t)(x)&SDL_CONST64(0xFFFFFFFFFFFFFFFFU))>>((uint64_t)n)) // Rotate left circular shift by n bits
57 #define SDL_Sigma0(x) (SDL_S(x, 28) ^ SDL_S(x, 34) ^ SDL_S(x, 39))
58 #define SDL_Sigma1(x) (SDL_S(x, 14) ^ SDL_S(x, 18) ^ SDL_S(x, 41))
59 #define SDL_Gamma0(x) (uint64_t)(SDL_S(x, 1) ^ SDL_S(x, 8) ^ SDL_R(x, 7)) // we perform the left and right shift after that we will perform the XOR of all the results
60 #define SDL_Gamma1(x) (uint64_t)(SDL_S(x, 19) ^ SDL_S(x, 61) ^ SDL_R(x, 6)) // we perform the left and right shift after that we will perform the XOR of all the results
61 #define SDL_BLOCK_SIZE (uint8_t)128 //Size of each block which will be processed;
62 #define SDL_MIN(x, y) ( ((x)<(y))?(x):(y) )
63 #define SDL_CONST64(x) (uint64_t)x
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.
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.
void SDL_memcpy(void *dest, void *src, uint32_t n)
This API will copy source pointer data to destination pointer.
uint32_t curlen
Definition: sdl_ip_rom_checksum.h:100
uint8_t state
Definition: tisci_pm_clock.h:3
This structure is used to store the resultant value of ROM Checksum.
Definition: sdl_ip_rom_checksum.h:92
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 ...
void SDL_ROM_Checksum_init(SDL_ROM_Checksum_obj *const md)
This API will Initialize the buffer where hash value to be stored.
uint64_t length
Definition: sdl_ip_rom_checksum.h:94
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.