Lines Matching refs:ret
211 int ret; in boot_get_kernel() local
220 ret = android_image_get_kernel(boot_img, vendor_boot_img, in boot_get_kernel()
226 if (ret) in boot_get_kernel()
227 return ret; in boot_get_kernel()
279 int ret = 0; in bootm_pre_load() local
282 ret = image_pre_load(data_addr); in bootm_pre_load()
284 if (ret) in bootm_pre_load()
285 ret = CMD_RET_FAILURE; in bootm_pre_load()
287 return ret; in bootm_pre_load()
305 int ret; in bootm_find_os() local
308 ret = boot_get_kernel(addr_fit, &images, &images.os.image_start, in bootm_find_os()
310 if (ret) { in bootm_find_os()
311 if (ret == -EPROTOTYPE) in bootm_find_os()
314 printf("ERROR %dE: can't get kernel image!\n", ret); in bootm_find_os()
404 ret = boot_get_setup(&images, IH_ARCH_I386, &images.ep, &len); in bootm_find_os()
405 if (ret < 0 && ret != -ENOENT) { in bootm_find_os()
414 int ret; in bootm_find_os() local
416 ret = fit_image_get_entry(images.fit_hdr_os, in bootm_find_os()
418 if (ret) { in bootm_find_os()
475 int ret; in bootm_find_images() local
490 ret = boot_get_ramdisk(select, &images, IH_INITRD_ARCH, in bootm_find_images()
492 if (ret) { in bootm_find_images()
505 ret = boot_get_fdt(buf, conf_fdt, IH_ARCH_DEFAULT, &images, in bootm_find_images()
507 if (ret) { in bootm_find_images()
524 ret = boot_get_fpga(&images); in bootm_find_images()
525 if (ret) { in bootm_find_images()
532 ret = boot_get_loadable(&images); in bootm_find_images()
533 if (ret) { in bootm_find_images()
574 size_t buf_size, int ret) in handle_decomp_error() argument
579 if (ret == -ENOSYS) in handle_decomp_error()
582 if ((comp_type == IH_COMP_GZIP && ret == Z_BUF_ERROR) || in handle_decomp_error()
586 printf("%s: uncompress error %d\n", name, ret); in handle_decomp_error()
684 int ret; in bootm_load_os() local
686 ret = booti_setup(load, &relocated_addr, &image_size, false); in bootm_load_os()
687 if (ret) { in bootm_load_os()
688 printf("Failed to prep arm64 kernel (err=%d)\n", ret); in bootm_load_os()
834 int ret; in process_subst() local
843 ret = cli_simple_process_macros(cmdline, buf, cmdline - buf); in process_subst()
845 return ret; in process_subst()
850 int ret; in bootm_process_cmdline() local
856 ret = fixup_silent_linux(buf, maxlen); in bootm_process_cmdline()
857 if (ret) in bootm_process_cmdline()
858 return log_msg_ret("silent", ret); in bootm_process_cmdline()
862 ret = process_subst(buf, maxlen); in bootm_process_cmdline()
863 if (ret) in bootm_process_cmdline()
864 return log_msg_ret("subst", ret); in bootm_process_cmdline()
876 int ret; in bootm_process_cmdline_env() local
894 ret = bootm_process_cmdline(buf, maxlen, flags); in bootm_process_cmdline_env()
895 if (!ret) { in bootm_process_cmdline_env()
896 ret = env_set("bootargs", buf); in bootm_process_cmdline_env()
902 if (ret == -ENOENT) in bootm_process_cmdline_env()
903 ret = 0; in bootm_process_cmdline_env()
906 if (ret) in bootm_process_cmdline_env()
907 return log_msg_ret("env", ret); in bootm_process_cmdline_env()
914 int ret = 0; in bootm_measure() local
920 return ret; in bootm_measure()
933 ret = tcg2_measurement_init(&dev, &elog, ign); in bootm_measure()
934 if (ret) in bootm_measure()
935 return ret; in bootm_measure()
939 ret = tcg2_measure_data(dev, &elog, 8, images->os.image_len, in bootm_measure()
942 if (ret) in bootm_measure()
947 ret = tcg2_measure_data(dev, &elog, 9, rd_len, initrd_buf, in bootm_measure()
950 if (ret) in bootm_measure()
954 ret = tcg2_measure_data(dev, &elog, 1, images->ft_len, in bootm_measure()
959 if (ret) in bootm_measure()
966 ret = tcg2_measure_data(dev, &elog, 1, strlen(s) + 1, (u8 *)s, in bootm_measure()
975 tcg2_measurement_term(dev, &elog, ret != 0); in bootm_measure()
978 return ret; in bootm_measure()
986 int ret = 0, need_boot_fn; in bootm_run_states() local
995 ret = bootm_start(); in bootm_run_states()
997 if (!ret && (states & BOOTM_STATE_PRE_LOAD)) in bootm_run_states()
998 ret = bootm_pre_load(bmi->addr_img); in bootm_run_states()
1000 if (!ret && (states & BOOTM_STATE_FINDOS)) in bootm_run_states()
1001 ret = bootm_find_os(bmi->cmd_name, bmi->addr_img); in bootm_run_states()
1003 if (!ret && (states & BOOTM_STATE_FINDOTHER)) { in bootm_run_states()
1008 ret = bootm_find_other(img_addr, bmi->conf_ramdisk, in bootm_run_states()
1012 if (IS_ENABLED(CONFIG_MEASURED_BOOT) && !ret && in bootm_run_states()
1017 if (!ret && (states & BOOTM_STATE_LOADOS)) { in bootm_run_states()
1019 ret = bootm_load_os(images, 0); in bootm_run_states()
1020 if (ret && ret != BOOTM_ERR_OVERLAP) in bootm_run_states()
1022 else if (ret == BOOTM_ERR_OVERLAP) in bootm_run_states()
1023 ret = 0; in bootm_run_states()
1028 if (!ret && (states & BOOTM_STATE_RAMDISK)) { in bootm_run_states()
1031 ret = boot_ramdisk_high(images->rd_start, rd_len, in bootm_run_states()
1034 if (!ret) { in bootm_run_states()
1041 if (!ret && (states & BOOTM_STATE_FDT)) { in bootm_run_states()
1043 ret = boot_relocate_fdt(&images->ft_addr, &images->ft_len); in bootm_run_states()
1048 if (ret) in bootm_run_states()
1049 return ret; in bootm_run_states()
1064 if (!ret && (states & BOOTM_STATE_OS_CMDLINE)) in bootm_run_states()
1065 ret = boot_fn(BOOTM_STATE_OS_CMDLINE, bmi); in bootm_run_states()
1066 if (!ret && (states & BOOTM_STATE_OS_BD_T)) in bootm_run_states()
1067 ret = boot_fn(BOOTM_STATE_OS_BD_T, bmi); in bootm_run_states()
1068 if (!ret && (states & BOOTM_STATE_OS_PREP)) { in bootm_run_states()
1073 ret = bootm_process_cmdline_env(flags); in bootm_run_states()
1074 if (ret) { in bootm_run_states()
1075 printf("Cmdline setup failed (err=%d)\n", ret); in bootm_run_states()
1076 ret = CMD_RET_FAILURE; in bootm_run_states()
1079 ret = boot_fn(BOOTM_STATE_OS_PREP, bmi); in bootm_run_states()
1084 if (!ret && (states & BOOTM_STATE_OS_FAKE_GO)) { in bootm_run_states()
1087 ret = boot_selected_os(BOOTM_STATE_OS_FAKE_GO, bmi, boot_fn); in bootm_run_states()
1088 if (!ret && cmd_list) in bootm_run_states()
1089 ret = run_command_list(cmd_list, -1, 0); in bootm_run_states()
1094 if (ret) { in bootm_run_states()
1095 printf("subcommand failed (err=%d)\n", ret); in bootm_run_states()
1096 return ret; in bootm_run_states()
1100 if (!ret && (states & BOOTM_STATE_OS_GO)) in bootm_run_states()
1101 ret = boot_selected_os(BOOTM_STATE_OS_GO, bmi, boot_fn); in bootm_run_states()
1108 if (ret == BOOTM_ERR_UNIMPLEMENTED) { in bootm_run_states()
1110 } else if (ret == BOOTM_ERR_RESET) { in bootm_run_states()
1115 return ret; in bootm_run_states()
1154 int ret; in bootm_boot_start() local
1168 ret = env_set("bootargs", cmdline); in bootm_boot_start()
1169 if (ret) { in bootm_boot_start()
1171 return ret; in bootm_boot_start()
1176 ret = bootm_run_states(&bmi, states); in bootm_boot_start()
1178 return ret; in bootm_boot_start()
1211 int ret; in bootm_host_load_image() local
1233 ret = image_decomp(image_comp, 0, data, image_type, load_buf, in bootm_host_load_image()
1237 if (ret) { in bootm_host_load_image()
1238 ret = handle_decomp_error(image_comp, load_end - 0, buf_size, ret); in bootm_host_load_image()
1239 if (ret != BOOTM_ERR_UNIMPLEMENTED) in bootm_host_load_image()
1240 return ret; in bootm_host_load_image()
1257 int ret; in bootm_host_load_images() local
1259 ret = bootm_host_load_image(fit, image_types[i], cfg_noffset); in bootm_host_load_images()
1260 if (!err && ret && ret != -ENOENT) in bootm_host_load_images()
1261 err = ret; in bootm_host_load_images()