18static inline void *kv_malloc(uint32_t x)
23static inline void *kv_zalloc(uint32_t x)
28static inline void kv_free(
void *x)
39static inline void *nv_psram_malloc(uint32_t x)
50static inline void nv_psram_free(
void *x)
56errcode_t kv_flash_write(
const uint32_t flash_offset, uint32_t write_size,
const uint8_t *write_data,
bool do_erase);
92#if (defined(CONFIG_NV_SUPPORT_DEBUG) && (CONFIG_NV_SUPPORT_DEBUG == NV_YES))
93#define nv_log_err(fmt, arg...) osal_printk(fmt, ##arg)
94#define nv_log_info(fmt, arg...) osal_printk(fmt, ##arg)
95#define nv_log_debug(fmt, arg...) osal_printk(fmt, ##arg)
97#define nv_log_err(fmt, arg...)
98#define nv_log_info(fmt, arg...)
99#define nv_log_debug(fmt, arg...)
uint32_t errcode_t
Definition of error code.
Definition errcode.h:30
void * osal_kmalloc(unsigned long size, unsigned int osal_gfp_flag)
Alloc dynamic memory.
Definition osal_addr.c:20
void osal_kfree(void *addr)
Free dynamic memory.
Definition osal_addr.c:52
void * osal_kzalloc(unsigned long size, unsigned int osal_gfp_flag)
Alloc dynamic memory.
Definition osal_addr.c:26
void nv_crypto_generate_random(uint32_t *rnd)
errcode_t nv_crypto_complete_hash(uint8_t *hash)
errcode_t nv_crypto_get_tag(uint32_t crypto_handle, uint8_t *tag, uint32_t *tag_len)
errcode_t nv_crypto_decode(uint32_t crypto_handle, const uintptr_t src, uintptr_t dest, uint32_t length)
errcode_t nv_crypto_validate_tag(uint32_t crypto_handle)
void nv_crypto_release_aes(uint32_t crypto_handle)
errcode_t kv_flash_read(const uint32_t flash_offset, const uint32_t read_size, uint8_t *read_buffer)
Definition nv_flash.c:11
errcode_t kv_flash_erase(const uint32_t flash_addr, uint32_t size)
Definition nv_flash.c:52
errcode_t nv_crypto_set_tag(uint32_t crypto_handle, uint8_t *tag, uint32_t tag_len)
errcode_t nv_crypto_update_hash(const uint8_t *src, uint32_t length)
errcode_t nv_crypto_start_hash(void)
errcode_t kv_flash_write(const uint32_t flash_offset, uint32_t write_size, const uint8_t *write_data, bool do_erase)
Definition nv_flash.c:20
errcode_t nv_crypto_encode(uint32_t crypto_handle, const uintptr_t src, uintptr_t dest, uint32_t length)
errcode_t nv_crypto_claim_aes(uint32_t *crypto_handle, const kv_key_header_t *header)
unsigned int uintptr_t
Definition td_type.h:65