| /rk3399_ARM-atf/plat/common/ |
| H A D | plat_spmd_manifest.c | 31 int rc; in manifest_parse_attribute() local 35 rc = fdt_read_uint32(fdt, node, "maj_ver", &attr->major_version); in manifest_parse_attribute() 36 if (rc != 0) { in manifest_parse_attribute() 39 return rc; in manifest_parse_attribute() 42 rc = fdt_read_uint32(fdt, node, "min_ver", &attr->minor_version); in manifest_parse_attribute() 43 if (rc != 0) { in manifest_parse_attribute() 46 return rc; in manifest_parse_attribute() 49 rc = fdt_read_uint32(fdt, node, "spmc_id", &val32); in manifest_parse_attribute() 50 if (rc != 0) { in manifest_parse_attribute() 52 return rc; in manifest_parse_attribute() [all …]
|
| /rk3399_ARM-atf/drivers/auth/ |
| H A D | auth_mod.c | 96 int rc; in auth_hash() local 100 rc = auth_get_param(param->hash, img_desc->parent, in auth_hash() 102 if (rc != 0) { in auth_hash() 104 __func__, __LINE__, rc); in auth_hash() 105 return rc; in auth_hash() 109 rc = img_parser_get_auth_param(img_desc->img_type, param->data, in auth_hash() 111 if (rc != 0) { in auth_hash() 113 __func__, __LINE__, rc); in auth_hash() 114 return rc; in auth_hash() 118 rc = crypto_mod_verify_hash(data_ptr, data_len, in auth_hash() [all …]
|
| /rk3399_ARM-atf/services/std_svc/drtm/ |
| H A D | drtm_measurements.c | 44 int rc; in drtm_event_log_measure_and_record() local 53 rc = event_log_measure(data_base, data_size, hash_data, in drtm_event_log_measure_and_record() 55 if (rc != 0) { in drtm_event_log_measure_and_record() 56 return rc; in drtm_event_log_measure_and_record() 60 rc = event_log_write_pcr_event2(pcr, event_type, in drtm_event_log_measure_and_record() 64 if (rc != 0) { in drtm_event_log_measure_and_record() 65 return rc; in drtm_event_log_measure_and_record() 83 int rc; in drtm_event_log_init() local 88 rc = event_log_init_and_reg( in drtm_event_log_init() 91 if (rc < 0) { in drtm_event_log_init() [all …]
|
| H A D | drtm_remediation.c | 19 int rc; in drtm_set_error() local 21 rc = plat_set_drtm_error(x1); in drtm_set_error() 23 if (rc != 0) { in drtm_set_error() 33 int rc; in drtm_get_error() local 35 rc = plat_get_drtm_error(&error_code); in drtm_get_error() 37 if (rc != 0) { in drtm_get_error() 46 int rc = plat_set_drtm_error(err_code); in drtm_enter_remediation() local 48 if (rc != 0) { in drtm_enter_remediation() 50 __func__, rc); in drtm_enter_remediation()
|
| /rk3399_ARM-atf/drivers/auth/mbedtls/ |
| H A D | mbedtls_crypto.c | 96 int rc; in verify_signature() local 105 rc = mbedtls_asn1_get_alg(&p, end, &sig_oid, &sig_params); in verify_signature() 106 if (rc != 0) { in verify_signature() 111 rc = mbedtls_x509_get_sig_alg(&sig_oid, &sig_params, &md_alg, &pk_alg, &sig_opts); in verify_signature() 112 if (rc != 0) { in verify_signature() 120 rc = mbedtls_pk_parse_subpubkey(&p, end, &pk); in verify_signature() 121 if (rc != 0) { in verify_signature() 122 rc = CRYPTO_ERR_SIGNATURE; in verify_signature() 130 rc = mbedtls_asn1_get_bitstring_null(&p, end, &signature.len); in verify_signature() 131 if ((rc != 0) || ((size_t)(end - p) != signature.len)) { in verify_signature() [all …]
|
| H A D | mbedtls_psa_crypto.c | 174 int rc; in construct_psa_alg() local 181 rc = mbedtls_asn1_get_alg(&p, end, &sig_alg_oid, ¶ms); in construct_psa_alg() 182 if (rc != 0) { in construct_psa_alg() 183 rc = CRYPTO_ERR_SIGNATURE; in construct_psa_alg() 187 rc = mbedtls_x509_get_sig_alg(&sig_alg_oid, ¶ms, &md_alg, pk_alg, &sig_opts); in construct_psa_alg() 188 if (rc != 0) { in construct_psa_alg() 189 rc = CRYPTO_ERR_SIGNATURE; in construct_psa_alg() 198 rc = CRYPTO_SUCCESS; in construct_psa_alg() 202 rc = CRYPTO_SUCCESS; in construct_psa_alg() 206 rc = CRYPTO_ERR_SIGNATURE; in construct_psa_alg() [all …]
|
| /rk3399_ARM-atf/lib/fconf/ |
| H A D | fconf_cot_getter.c | 194 int rc; in get_oid() local 196 rc = fdt_read_uint32(dtb, node, prop, &phandle); in get_oid() 197 if (rc < 0) { in get_oid() 198 return rc; in get_oid() 207 rc = fdtw_read_string(dtb, node, "oid", *oid, MAX_OID_NAME_LEN); in get_oid() 209 return rc; in get_oid() 229 int rc; in populate_and_set_auth_methods() local 240 rc = get_oid(dtb, node, "signing-key", &oid); in populate_and_set_auth_methods() 241 if (rc < 0) { in populate_and_set_auth_methods() 251 return rc; in populate_and_set_auth_methods() [all …]
|
| H A D | fconf_dyn_cfg_getter.c | 78 int rc; in fconf_populate_dtb_registry() local 113 rc = fdt_read_uint64(dtb, child, "load-address", &val64); in fconf_populate_dtb_registry() 114 if (rc < 0) { in fconf_populate_dtb_registry() 116 return rc; in fconf_populate_dtb_registry() 120 rc = fdt_read_uint32(dtb, child, "max-size", &config_max_size); in fconf_populate_dtb_registry() 121 if (rc < 0) { in fconf_populate_dtb_registry() 123 return rc; in fconf_populate_dtb_registry() 126 rc = fdt_read_uint32(dtb, child, "id", &config_id); in fconf_populate_dtb_registry() 127 if (rc < 0) { in fconf_populate_dtb_registry() 129 return rc; in fconf_populate_dtb_registry() [all …]
|
| /rk3399_ARM-atf/plat/mediatek/common/lpm/ |
| H A D | mt_lp_rm.c | 20 struct mt_resource_constraint *const *rc; in mt_lp_rm_register() local 27 for (i = 0U, rc = rm->consts; *rc != NULL; i++, rc++) { in mt_lp_rm_register() 28 if ((*rc)->init != NULL) { in mt_lp_rm_register() 29 (*rc)->init(); in mt_lp_rm_register() 41 struct mt_resource_constraint const *rc = NULL; in mt_lp_rm_reset_constraint() local 47 rc = plat_mt_rm.plat_rm->consts[idx]; in mt_lp_rm_reset_constraint() 49 if ((rc == NULL) || (rc->reset == NULL)) { in mt_lp_rm_reset_constraint() 53 return rc->reset(cpuid, stateid); in mt_lp_rm_reset_constraint() 82 struct mt_resource_constraint const *rc; in mt_lp_rm_do_constraint() local 89 rc = rm->consts[constraint_id]; in mt_lp_rm_do_constraint() [all …]
|
| /rk3399_ARM-atf/plat/rpi/rpi3/ |
| H A D | rpi3_common_mboot.c | 29 int rc = 0; in plat_mboot_measure_image() local 44 rc = event_log_measure_and_record(metadata_ptr->pcr, in plat_mboot_measure_image() 49 if (rc != 0) { in plat_mboot_measure_image() 50 ERROR("Image measurement and recording failed (%d).\n", rc); in plat_mboot_measure_image() 51 return rc; in plat_mboot_measure_image() 55 rc = event_log_measure(image_data->image_base, image_data->image_size, in plat_mboot_measure_image() 57 if (rc != 0) { in plat_mboot_measure_image() 58 ERROR("Image measurement failed (%d).\n", rc); in plat_mboot_measure_image() 59 return rc; in plat_mboot_measure_image() 63 rc = event_log_write_pcr_event2(metadata_ptr->pcr, EV_POST_CODE, in plat_mboot_measure_image() [all …]
|
| H A D | rpi3_bl1_mboot.c | 50 int rc; in rpi3_bl1_tpm_early_interface_setup() local 65 rc = tpm_interface_init(spidev, &timeout_ops, &tpm_chip_data, 0); in rpi3_bl1_tpm_early_interface_setup() 66 if (rc != 0) { in rpi3_bl1_tpm_early_interface_setup() 90 int rc; in bl1_plat_mboot_init() local 95 rc = tpm_startup(&tpm_chip_data, TPM_SU_CLEAR); in bl1_plat_mboot_init() 96 if (rc != 0) { in bl1_plat_mboot_init() 102 rc = event_log_init_and_reg(event_log, event_log + sizeof(event_log), in bl1_plat_mboot_init() 104 if (rc < 0) { in bl1_plat_mboot_init() 105 ERROR("Failed to initialize event log (%d).\n", rc); in bl1_plat_mboot_init() 109 rc = event_log_write_header(algorithms, ARRAY_SIZE(algorithms), 0, NULL, in bl1_plat_mboot_init() [all …]
|
| H A D | rpi3_bl2_mboot.c | 52 int rc; in rpi3_bl2_tpm_early_interface_setup() local 58 rc = tpm_interface_init(spidev, &timeout_ops, &tpm_chip_data, 0); in rpi3_bl2_tpm_early_interface_setup() 59 if (rc != 0) { in rpi3_bl2_tpm_early_interface_setup() 73 int rc; in bl2_plat_mboot_init() local 80 rc = event_log_init_and_reg( in bl2_plat_mboot_init() 83 if (rc < 0) { in bl2_plat_mboot_init() 84 ERROR("Failed to initialize event log (%d).\n", rc); in bl2_plat_mboot_init() 91 int rc; in bl2_plat_mboot_finish() local 102 rc = rpi3_set_nt_fw_info(event_log_cur_size, &ns_log_addr); in bl2_plat_mboot_finish() 103 if (rc != 0) { in bl2_plat_mboot_finish() [all …]
|
| /rk3399_ARM-atf/plat/mediatek/common/lpm_v2/ |
| H A D | mt_lp_rm.c | 21 struct mt_resource_constraint *const *rc; in mt_lp_rm_register() local 28 for (i = 0U, rc = rm->consts; *rc != NULL; i++, rc++) { in mt_lp_rm_register() 29 if ((*rc)->init != NULL) in mt_lp_rm_register() 30 (*rc)->init(); in mt_lp_rm_register() 41 struct mt_resource_constraint const *rc = NULL; in mt_lp_rm_reset_constraint() local 46 rc = plat_mt_rm.plat_rm->consts[idx]; in mt_lp_rm_reset_constraint() 48 if ((rc == NULL) || (rc->reset == NULL)) in mt_lp_rm_reset_constraint() 51 return rc->reset(cpuid, stateid); in mt_lp_rm_reset_constraint() 78 struct mt_resource_constraint const *rc; in mt_lp_rm_do_constraint() local 84 rc = rm->consts[constraint_id]; in mt_lp_rm_do_constraint() [all …]
|
| /rk3399_ARM-atf/lib/psci/ |
| H A D | psci_main.c | 30 int rc; in psci_cpu_on() local 41 rc = psci_validate_entry_point(ep, entrypoint, context_id); in psci_cpu_on() 42 if (rc != PSCI_E_SUCCESS) { in psci_cpu_on() 43 return rc; in psci_cpu_on() 62 int rc; in psci_cpu_suspend() local 82 rc = psci_validate_power_state(power_state, &state_info); in psci_cpu_suspend() 83 if (rc != PSCI_E_SUCCESS) { in psci_cpu_suspend() 84 assert(rc == PSCI_E_INVALID_PARAMS); in psci_cpu_suspend() 85 return rc; in psci_cpu_suspend() 154 rc = psci_validate_entry_point(ep, entrypoint, context_id); in psci_cpu_suspend() [all …]
|
| H A D | psci_off.c | 48 int rc = PSCI_E_SUCCESS; in psci_do_cpu_off() local 69 rc = psci_plat_pm_ops->pwr_domain_off_early(&state_info); in psci_do_cpu_off() 70 if (rc == PSCI_E_DENIED) { in psci_do_cpu_off() 71 return rc; in psci_do_cpu_off() 97 rc = psci_spd_pm->svc_off(0); in psci_do_cpu_off() 98 if (rc != PSCI_E_SUCCESS) { in psci_do_cpu_off() 151 if (rc == PSCI_E_SUCCESS) { in psci_do_cpu_off() 184 return rc; in psci_do_cpu_off()
|
| /rk3399_ARM-atf/plat/arm/board/fvp/ |
| H A D | fvp_bl1_measured_boot.c | 39 int rc; in bl1_plat_mboot_init() local 65 rc = event_log_init_and_reg(event_log, event_log + event_log_max_size, in bl1_plat_mboot_init() 67 if (rc < 0) { in bl1_plat_mboot_init() 68 ERROR("Failed to initialize event log (%d).\n", rc); in bl1_plat_mboot_init() 72 rc = event_log_write_header(algos, ARRAY_SIZE(algos), 0, NULL, 0); in bl1_plat_mboot_init() 73 if (rc < 0) { in bl1_plat_mboot_init() 74 ERROR("Failed to write event log header (%d).\n", rc); in bl1_plat_mboot_init() 84 uint8_t *rc = transfer_list_event_log_finish( in bl1_plat_mboot_finish() local 90 if (rc != NULL) { in bl1_plat_mboot_finish() 94 int rc = arm_set_tb_fw_info((uintptr_t)event_log, event_log_cur_size, in bl1_plat_mboot_finish() local [all …]
|
| H A D | fvp_bl2_measured_boot.c | 73 int rc __unused; in bl2_plat_mboot_init() 92 rc = arm_get_tb_fw_info((uint64_t *)&event_log_base, in bl2_plat_mboot_init() 94 if (rc != 0) { in bl2_plat_mboot_init() 113 rc = event_log_init_and_reg((uint8_t *)event_log_base, event_log_finish, in bl2_plat_mboot_init() 115 if (rc < 0) { in bl2_plat_mboot_init() 116 ERROR("Failed to initialize event log (%d).\n", rc); in bl2_plat_mboot_init() 162 int rc = plat_get_nv_ctr(nv_ctr_oids[i], in fvp_populate_critical_data() local 164 if (rc != 0) { in fvp_populate_critical_data() 165 return rc; in fvp_populate_critical_data() 175 int rc = 0; in fvp_populate_and_measure_critical_data() local [all …]
|
| H A D | fvp_trusted_boot.c | 76 int rc; in plat_set_nv_ctr() local 80 rc = plat_get_nv_ctr_addr(cookie, &nv_ctr_addr); in plat_set_nv_ctr() 81 if (rc != 0) { in plat_set_nv_ctr() 82 return rc; in plat_set_nv_ctr() 103 int rc; in plat_get_nv_ctr() local 108 rc = plat_get_nv_ctr_addr(cookie, &nv_ctr_addr); in plat_get_nv_ctr() 109 if (rc != 0) { in plat_get_nv_ctr() 110 return rc; in plat_get_nv_ctr()
|
| /rk3399_ARM-atf/plat/arm/board/juno/ |
| H A D | juno_bl1_measured_boot.c | 34 int rc; in bl1_plat_mboot_init() local 54 rc = event_log_init_and_reg(event_log, event_log + event_log_max_size, in bl1_plat_mboot_init() 56 if (rc < 0) { in bl1_plat_mboot_init() 57 ERROR("Failed to initialize event log (%d).\n", rc); in bl1_plat_mboot_init() 61 rc = event_log_write_header(algos, ARRAY_SIZE(algos), 0, NULL, 0); in bl1_plat_mboot_init() 62 if (rc < 0) { in bl1_plat_mboot_init() 63 ERROR("Failed to write event log header (%d).\n", rc); in bl1_plat_mboot_init() 72 uint8_t *rc __unused; in bl1_plat_mboot_finish() 75 rc = transfer_list_event_log_finish( in bl1_plat_mboot_finish() 78 if (rc != NULL) in bl1_plat_mboot_finish()
|
| /rk3399_ARM-atf/plat/qemu/qemu/ |
| H A D | qemu_measured_boot.c | 47 int rc; in bl2_plat_mboot_init() local 68 rc = event_log_init_and_reg(event_log, event_log + sizeof(event_log), in bl2_plat_mboot_init() 70 if (rc < 0) { in bl2_plat_mboot_init() 71 ERROR("Failed to initialize event log (%d).\n", rc); in bl2_plat_mboot_init() 75 rc = event_log_write_header(algos, ARRAY_SIZE(algos), 0, NULL, 0); in bl2_plat_mboot_init() 76 if (rc < 0) { in bl2_plat_mboot_init() 77 ERROR("Failed to write event log header (%d).\n", rc); in bl2_plat_mboot_init() 91 int rc; in bl2_plat_mboot_finish() local 109 rc = qemu_set_nt_fw_info( in bl2_plat_mboot_finish() 114 if (rc != 0) { in bl2_plat_mboot_finish() [all …]
|
| /rk3399_ARM-atf/plat/imx/imx8m/ |
| H A D | imx8m_measured_boot.c | 62 int rc; in bl2_plat_mboot_init() local 78 rc = event_log_init_and_reg(event_log, event_log + sizeof(event_log), in bl2_plat_mboot_init() 80 if (rc < 0) { in bl2_plat_mboot_init() 81 ERROR("Failed to initialize event log (%d).\n", rc); in bl2_plat_mboot_init() 85 rc = event_log_write_header(algos, ARRAY_SIZE(algos), 0, NULL, 0); in bl2_plat_mboot_init() 86 if (rc < 0) { in bl2_plat_mboot_init() 87 ERROR("Failed to write event log header (%d).\n", rc); in bl2_plat_mboot_init() 94 int rc = 0; in bl2_plat_mboot_finish() local 104 rc = imx8m_set_nt_fw_info(event_log_cur_size, &ns_log_addr); in bl2_plat_mboot_finish() 105 if (rc != 0) { in bl2_plat_mboot_finish()
|
| /rk3399_ARM-atf/plat/arm/common/fconf/ |
| H A D | fconf_nv_cntr_getter.c | 25 int rc, node, child; in fconf_populate_nv_cntrs() local 42 rc = fdt_read_uint32(dtb, child, "id", &id); in fconf_populate_nv_cntrs() 43 if (rc < 0) { in fconf_populate_nv_cntrs() 45 return rc; in fconf_populate_nv_cntrs() 50 rc = fdt_get_reg_props_by_index(dtb, child, 0, ®, NULL); in fconf_populate_nv_cntrs() 51 if (rc < 0) { in fconf_populate_nv_cntrs() 53 return rc; in fconf_populate_nv_cntrs()
|
| /rk3399_ARM-atf/drivers/renesas/common/io/ |
| H A D | io_rcar.c | 395 int32_t rc; in load_bl33x() local 413 rc = file_to_offset(img[i], &offset, &cert, &noload, in load_bl33x() 415 if (rc != IO_SUCCESS) { in load_bl33x() 424 rc = io_open(rcar_handle, rcar_spec, &handle); in load_bl33x() 425 if (rc != IO_SUCCESS) { in load_bl33x() 426 WARN("%s: Failed to open FIP (%i)\n", __func__, rc); in load_bl33x() 431 rc = io_seek(handle, IO_SEEK_SET, offset); in load_bl33x() 432 if (rc != IO_SUCCESS) { in load_bl33x() 438 rc = check_load_area(dst, len); in load_bl33x() 439 if (rc != IO_SUCCESS) { in load_bl33x() [all …]
|
| /rk3399_ARM-atf/plat/arm/common/trp/ |
| H A D | arm_trp_setup.c | 48 int rc; in arm_trp_early_platform_setup() local 50 rc = arm_trp_process_manifest(manifest); in arm_trp_early_platform_setup() 51 if (rc != 0) { in arm_trp_early_platform_setup() 52 trp_boot_abort(rc); in arm_trp_early_platform_setup() 59 rc = console_pl011_register(PLAT_ARM_TRP_UART_BASE, in arm_trp_early_platform_setup() 63 if (rc == 0) { in arm_trp_early_platform_setup()
|
| /rk3399_ARM-atf/services/std_svc/spm/el3_spmc/ |
| H A D | spmc_pm.c | 47 uint64_t rc; in spmc_cpu_on_finish_handler() local 103 rc = spmc_sp_synchronous_entry(ec); in spmc_cpu_on_finish_handler() 104 if (rc != 0ULL) { in spmc_cpu_on_finish_handler() 105 ERROR("%s failed (%lu) on CPU%u\n", __func__, rc, linear_id); in spmc_cpu_on_finish_handler() 124 uint64_t rc; in spmc_send_pm_msg() local 153 rc = spmc_sp_synchronous_entry(ec); in spmc_send_pm_msg() 154 if (rc != 0ULL) { in spmc_send_pm_msg() 155 ERROR("%s failed (%lu) on CPU%u.\n", __func__, rc, linear_id); in spmc_send_pm_msg() 208 int32_t rc; in spmc_cpu_suspend_finish_handler() local 224 rc = spmc_send_pm_msg(FFA_PM_MSG_WB_REQ, FFA_WB_TYPE_NOTS2RAM); in spmc_cpu_suspend_finish_handler() [all …]
|