/device/soc/hisilicon/hi3861v100/sdk_liteos/platform/system/upg/ |
H A D | upg_check_secure.c | 44 hi_u32 upg_hash_one_content(hi_u32 flash_addr, hi_u32 total_size, hi_u8 *hash, hi_u32 hash_size) in upg_hash_one_content() argument 62 ret = (hi_u32)memcpy_s(block, this_size, (hi_u8 *)(HI_FLASH_BASE + flash_addr + offset), this_size); in upg_hash_one_content() 99 ret = (hi_u32)memcpy_s(block, this_size, (hi_u8 *)(HI_FLASH_BASE + param->flash_addr[i] + offset), in upg_hash_more_content() 102 ret = (hi_u32)memcpy_s(block, HI_BLOCK_SIZE, (hi_u8 *)(param->flash_addr[i] + offset), this_size); in upg_hash_more_content() 200 hi_void upg_crypto_set_secure_verify_param(upg_verify_param *param, hi_u32 flash_addr, in upg_crypto_set_secure_verify_param() argument 203 param->flash_addr[0] = (uintptr_t)flash_addr + head->section_offset; in upg_crypto_set_secure_verify_param() 219 param->flash_addr[1] = (uintptr_t)(para->raw_buf); in upg_crypto_set_secure_verify_param() 222 param->flash_addr[FLASH_ADDR_NUM - 1] = flash_addr in upg_crypto_set_secure_verify_param() 236 upg_set_secure_verify_param(upg_verify_param *param, hi_u32 flash_addr, const hi_upg_common_head *head) upg_set_secure_verify_param() argument 251 upg_check_upg_file_code(hi_u32 flash_addr, hi_upg_head *upg_head) upg_check_upg_file_code() argument 349 upg_check_upg_file(hi_u32 flash_addr, hi_upg_head *upg_head) upg_check_upg_file() argument [all...] |
H A D | upg_check_secure.h | 40 uintptr_t flash_addr[FLASH_ADDR_NUM]; member 52 hi_u32 upg_check_upg_file_code(hi_u32 flash_addr, hi_upg_head *upg_head); 54 hi_u32 upg_check_upg_file(hi_u32 flash_addr, hi_upg_head *upg_head); 55 hi_u32 upg_hash_one_content(hi_u32 flash_addr, hi_u32 total_size, hi_u8 *hash, hi_u32 hash_size);
|
H A D | upg_check_file.h | 39 hi_u32 upg_verify_file(hi_u32 flash_addr);
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/flashboot/upg/ |
H A D | boot_upg_check_secure.c | 224 hi_void boot_upg_set_secure_verify_param(upg_verify_param *param, hi_u32 flash_addr, HI_CONST hi_upg_head *upg_head) in boot_upg_set_secure_verify_param() argument 226 param->flash_addr[0] = (uintptr_t)flash_addr + upg_head->common.section_offset; in boot_upg_set_secure_verify_param() 230 param->flash_addr[1] = KERNEL_RAM_ADDR; in boot_upg_set_secure_verify_param() 233 param->flash_addr[2] = flash_addr + upg_head->common.section_offset + in boot_upg_set_secure_verify_param() 240 param->flash_addr[1] = flash_addr + upg_head->common.section_offset + in boot_upg_set_secure_verify_param() 248 hi_u32 boot_upg_secure_verify_code(hi_u32 flash_addr, HI_CONST hi_upg_head *upg_head) in boot_upg_secure_verify_code() argument 258 ret = hi_flash_read((flash_addr in boot_upg_secure_verify_code() 290 boot_upg_unsecure_verify_code(hi_u32 flash_addr, HI_CONST hi_upg_head *upg_head) boot_upg_unsecure_verify_code() argument 401 boot_upg_check_secure_info(hi_u32 flash_addr, hi_upg_head *upg_head) boot_upg_check_secure_info() argument 417 boot_upg_check_unsecure_info(hi_u32 flash_addr, hi_upg_head *upg_head) boot_upg_check_unsecure_info() argument [all...] |
H A D | boot_upg_check_secure.h | 48 uintptr_t flash_addr[FLASH_ADDR_NUM]; member 61 hi_u32 boot_upg_check_secure_info(hi_u32 flash_addr, hi_upg_head *upg_head); 62 hi_u32 boot_upg_check_unsecure_info(hi_u32 flash_addr, hi_upg_head *upg_head);
|
H A D | boot_upg_check.c | 221 hi_u32 boot_upg_check_file(hi_u32 flash_addr) in boot_upg_check_file() argument 229 ret = hi_flash_read(flash_addr, sizeof(hi_upg_head), (hi_u8 *)upg_head); in boot_upg_check_file() 244 ret = boot_upg_check_secure_info(flash_addr, upg_head); in boot_upg_check_file() 246 ret = boot_upg_check_unsecure_info(flash_addr, upg_head); in boot_upg_check_file()
|
H A D | boot_upg_tool.c | 125 hi_u32 boot_upg_hash_one_content(hi_u32 flash_addr, hi_u32 total_size, hi_u8 *hash, hi_u32 hash_size) in boot_upg_hash_one_content() argument 138 ret = hi_flash_read(flash_addr + offset, this_size, block); in boot_upg_hash_one_content() 170 ret = hi_flash_read(param->flash_addr[i] + offset, this_size, block); in boot_upg_hash_more_content() 172 cs = (uintptr_t)block ^ HI_BLOCK_SIZE ^ (uintptr_t)(param->flash_addr[i] + offset) ^ this_size; in boot_upg_hash_more_content() 173 ret = (hi_u32)memcpy_s(block, HI_BLOCK_SIZE, (hi_u8 *)(param->flash_addr[i] + offset), this_size, cs); in boot_upg_hash_more_content()
|
H A D | boot_upg_check.h | 27 hi_u32 boot_upg_check_file(hi_u32 flash_addr);
|
H A D | boot_upg_tool.h | 25 hi_u32 boot_upg_hash_one_content(hi_u32 flash_addr, hi_u32 total_size, hi_u8 *hash, hi_u32 hash_size);
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/commonboot/ |
H A D | boot_rom.h | 241 hi_u32(*read)(struct spi_flash_ctrl *spif_ctrl, hi_u32 flash_addr, 243 hi_u32(*write)(struct spi_flash_ctrl *spif_ctrl, hi_u32 flash_addr, 245 hi_u32(*erase)(struct spi_flash_ctrl *spif_ctrl, hi_u32 flash_addr, 268 hi_u32 spif_dma_read(hi_spi_flash_ctrl *spif_ctrl, hi_u32 flash_addr, hi_u32 read_size, hi_void *ram_addr, 270 hi_u32 spif_reg_erase(hi_spi_flash_ctrl *spif_ctrl, hi_u32 flash_addr, hi_u32 erase_size, hi_bool is_crash); 271 hi_u32 spif_dma_write(hi_spi_flash_ctrl *spif_ctrl, hi_u32 flash_addr, hi_u32 write_size, hi_void *ram_addr, 284 hi_u32 flash_write_prv(hi_spi_flash_ctrl *spif_ctrl, hi_u32 flash_addr, const hi_u8 *ram_addr, hi_u32 size, 286 hi_u32 flash_erase_prv(hi_spi_flash_ctrl *spif_ctrl, hi_u32 flash_addr, hi_u32 size); 287 hi_u32 flash_read_prv(hi_spi_flash_ctrl *spif_ctrl, hi_u32 flash_addr, hi_u8 *data, hi_u32 size); 293 typedef hi_u32 (*flash_read_func)(hi_u32 flash_addr, hi_u3 [all...] |
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/loaderboot/include/ |
H A D | hi_loaderboot_flash.h | 44 * @param flash_addr [IN] 类型 #hi_u32 待删除Flash的起始地址 54 hi_u32 hi_flash_erase(const hi_u32 flash_addr, hi_u32 flash_erase_size); 65 * @param flash_addr [IN] 类型 #hi_u32 Flash的起始地址 77 hi_u32 hi_flash_write(hi_u32 flash_addr, hi_u32 flash_write_size, const hi_u8 *flash_write_data, hi_bool do_erase); 87 * @param flash_addr [IN] 类型 #hi_u32 Flash的起始地址 98 hi_u32 hi_flash_read(hi_u32 flash_addr, hi_u32 flash_read_size, hi_u8 *flash_read_data);
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/flashboot/drivers/flash/ |
H A D | hi_flashboot_flash.c | 308 hi_u32 hi_flash_erase(hi_u32 flash_addr, hi_u32 flash_erase_size) in hi_flash_erase() argument 312 ret = sfc_check_para(spif_ctrl, flash_addr, flash_erase_size, HI_FLASH_CHECK_PARAM_OPT_ERASE); in hi_flash_erase() 323 ret = flash_protect_cancel(flash_addr); in hi_flash_erase() 328 ret = flash_erase_prv(spif_ctrl, flash_addr, flash_erase_size); in hi_flash_erase() 335 flash_info_print("hi_flash_erase ret:%x addr:%x len:%x\r\n", ret, flash_addr, flash_erase_size); in hi_flash_erase() 339 hi_u32 hi_flash_write(hi_u32 flash_addr, hi_u32 flash_write_size, const hi_u8 *flash_write_data, hi_bool do_erase) in hi_flash_write() argument 346 ret = sfc_check_para(spif_ctrl, flash_addr, flash_write_size, HI_FLASH_CHECK_PARAM_OPT_WRITE); in hi_flash_write() 357 ret = flash_protect_cancel(flash_addr); in hi_flash_write() 362 ret = flash_write_prv(spif_ctrl, flash_addr, flash_write_data, flash_write_size, do_erase); in hi_flash_write() 369 flash_info_print("hi_flash_write ret:%x addr:%x len:%x\r\n", ret, flash_addr, flash_write_siz in hi_flash_write() 373 hi_flash_read(hi_u32 flash_addr, hi_u32 flash_read_size, hi_u8 *flash_read_data) hi_flash_read() argument [all...] |
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/loaderboot/drivers/flash/ |
H A D | hi_loaderboot_flash.c | 254 hi_u32 hi_flash_erase(hi_u32 flash_addr, hi_u32 flash_erase_size) in hi_flash_erase() argument 258 ret = sfc_check_para(spif_ctrl, flash_addr, flash_erase_size, HI_FLASH_CHECK_PARAM_OPT_ERASE); in hi_flash_erase() 268 ret = flash_erase_prv(spif_ctrl, flash_addr, flash_erase_size); in hi_flash_erase() 276 flash_info_print("hi_flash_erase ret:%x addr:%x len:%x\r\n", ret, flash_addr, flash_erase_size); in hi_flash_erase() 280 hi_u32 hi_flash_write(hi_u32 flash_addr, hi_u32 flash_write_size, const hi_u8 *flash_write_data, hi_bool do_erase) in hi_flash_write() argument 287 ret = sfc_check_para(spif_ctrl, flash_addr, flash_write_size, HI_FLASH_CHECK_PARAM_OPT_WRITE); in hi_flash_write() 297 ret = flash_write_prv(spif_ctrl, flash_addr, flash_write_data, flash_write_size, do_erase); in hi_flash_write() 304 flash_info_print("hi_flash_write ret:%x addr:%x len:%x\r\n", ret, flash_addr, flash_write_size); in hi_flash_write() 308 hi_u32 hi_flash_read(hi_u32 flash_addr, hi_u32 flash_read_size, hi_u8 *flash_read_data) in hi_flash_read() argument 315 ret = sfc_check_para(spif_ctrl, flash_addr, flash_read_siz in hi_flash_read() [all...] |
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/loaderboot/common/nvm/ |
H A D | hi_nvm.c | 191 hi_u32 flash_addr = base_addr + i * block_size; in nv_init_common() local 192 if (nv_read_flash(flash_addr, block_size, data) != HI_ERR_SUCCESS) { in nv_init_common() 203 nv_ctrl->current_addr = flash_addr; in nv_init_common() 243 hi_u32 flash_addr; in nv_read_common() local 264 flash_addr = nv_ctrl->current_addr + nv_index->nv_offset; in nv_read_common() 265 ret = nv_read_flash(flash_addr, item_len, pdata); in nv_read_common() 271 ret = nv_read_flash(flash_addr + item_len, sizeof(crc), (hi_u8*)&crc); in nv_read_common() 300 hi_u32 flash_addr = nv_next_addr((HI_CONST hi_nv_ctrl *)nv_ctrl); in nv_block_write() local 306 ret = nv_write_flash(flash_addr, nv_ctrl->block_size, p_nv_file); in nv_block_write() 311 nv_ctrl->current_addr = flash_addr; in nv_block_write() [all...] |
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/flashboot/common/nvm/ |
H A D | hi_nvm.c | 192 hi_u32 flash_addr = base_addr + i * block_size; in nv_init_common() local 193 if (nv_read_flash(flash_addr, block_size, data) != HI_ERR_SUCCESS) { /* 读取 hi_nv_manage nv_head */ in nv_init_common() 204 nv_ctrl->current_addr = flash_addr; in nv_init_common() 245 hi_u32 flash_addr; in nv_read_common() local 266 flash_addr = nv_ctrl->current_addr + nv_index->nv_offset; in nv_read_common() 267 ret = nv_read_flash(flash_addr, item_len, pdata); in nv_read_common() 273 ret = nv_read_flash(flash_addr + item_len, sizeof(crc), (hi_u8*)&crc); in nv_read_common() 302 hi_u32 flash_addr = nv_next_addr((HI_CONST hi_nv_ctrl *)nv_ctrl); in nv_block_write() local 308 ret = nv_write_flash(flash_addr, nv_ctrl->block_size, p_nv_file); in nv_block_write() 313 nv_ctrl->current_addr = flash_addr; in nv_block_write() [all...] |
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/flashboot/include/ |
H A D | hi_flashboot.h | 530 hi_u32 hi_flash_erase(const hi_u32 flash_addr, hi_u32 flash_erase_size); 563 hi_u32 hi_flash_write(hi_u32 flash_addr, hi_u32 flash_write_size, const hi_u8 *p_flash_write_data, hi_bool do_erase); 584 hi_u32 hi_flash_read(hi_u32 flash_addr, hi_u32 flash_read_size, hi_u8 *p_flash_read_data);
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/platform/drivers/flash/ |
H A D | flash_prv.h | 283 hi_u32 (*read)(struct spi_flash_ctrl* spif_ctrl, hi_u32 flash_addr, hi_u32 read_size, 285 hi_u32 (*write)(struct spi_flash_ctrl* spif_ctrl, hi_u32 flash_addr, hi_u32 write_size, 287 hi_u32 (*erase)(struct spi_flash_ctrl* spif_ctrl, hi_u32 flash_addr, hi_u32 erase_size, hi_bool is_crash); 304 HI_EXTERN hi_u32 spif_dma_read(hi_spi_flash_ctrl* spif_ctrl, hi_u32 flash_addr, hi_u32 read_size, 306 HI_EXTERN hi_u32 spif_reg_erase(hi_spi_flash_ctrl* spif_ctrl, hi_u32 flash_addr, hi_u32 erase_size, hi_bool is_crash); 307 HI_EXTERN hi_u32 spif_dma_write(hi_spi_flash_ctrl* spif_ctrl, hi_u32 flash_addr, hi_u32 write_size, 314 HI_EXTERN hi_u32 flash_erase_prv(hi_spi_flash_ctrl* spif_ctrl, hi_u32 flash_addr, hi_u32 size, hi_bool is_crash);
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/components/at/src/ |
H A D | at_demo_hks.c | 195 hi_void hks_get_key_data(hi_u32 flash_addr, struct hks_blob *blob_key_data) in hks_get_key_data() argument 198 blob_key_data->data = (hi_u8*)(FLASH_BASE_ADDR + flash_addr + KYY_PARAM_MAX_LEN + LEN_BYTE); in hks_get_key_data() 199 blob_key_data->size = *((hi_u32 *)(FLASH_BASE_ADDR + flash_addr + KYY_PARAM_MAX_LEN)); in hks_get_key_data() 202 hi_u32 hks_get_enc_param(hi_u32 flash_addr, encrypt_param *enc_param, struct hks_crypt_param *hks_encry_param) in hks_get_enc_param() argument 206 ret = hi_flash_read(flash_addr, sizeof(encrypt_param), (hi_u8 *)enc_param); in hks_get_enc_param() 311 hi_void hks_get_conn_cipher_data(hi_u32 flash_addr, struct hks_blob *blob_cipher_data) in hks_get_conn_cipher_data() argument 313 hi_u32 cipher_data_size = *((hi_u32*)(FLASH_BASE_ADDR + flash_addr + sizeof(encrypt_param))); in hks_get_conn_cipher_data() 314 hi_u8 *cipher_data = (hi_u8*)(FLASH_BASE_ADDR + flash_addr + sizeof(encrypt_param) + LEN_BYTE); in hks_get_conn_cipher_data() 585 hi_void hks_get_cert_cipher_data(hi_u32 flash_addr, struct hks_blob *blob_cipher_data, hi_u32 cipher_data_size) in hks_get_cert_cipher_data() argument 587 hi_u8 *cipher_data = (hi_u8*)(FLASH_BASE_ADDR + flash_addr in hks_get_cert_cipher_data() [all...] |
H A D | at_general.c | 250 hi_u32 factory_check_file(hi_u32 flash_addr, hi_u32 bin_len) in factory_check_file() argument 258 ret = hi_flash_read(flash_addr, sizeof(hi_upg_head), (hi_u8 *)upg_head); in factory_check_file()
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/loaderboot/secure/ |
H A D | load_crypto.c | 374 static hi_u32 crypto_encrypt_data(hi_flash_crypto_content *content, hi_u32 flash_addr, hi_u32 len) in crypto_encrypt_data() argument 401 ret = hi_cipher_aes_crypto(flash_addr + SFC_BUFFER_BASE_ADDRESS, (uintptr_t)fw_cyp_data, len, HI_TRUE); in crypto_encrypt_data() 406 ret = g_flash_cmd_funcs.write(flash_addr, len, (hi_u8 *)fw_cyp_data, HI_TRUE); in crypto_encrypt_data()
|