Lines Matching full:images
48 bootm_headers_t images; /* pointers to os/initrd/fdt images */ variable
61 char * const argv[], bootm_headers_t *images,
65 static void boot_start_lmb(bootm_headers_t *images) in boot_start_lmb() argument
68 lmb_init(&images->lmb); in boot_start_lmb()
73 lmb_add(&images->lmb, gd->bd->bi_dram[i].start, in boot_start_lmb()
82 lmb_add(&images->lmb, (phys_addr_t)mem_start, mem_size); in boot_start_lmb()
84 arch_lmb_reserve(&images->lmb); in boot_start_lmb()
85 board_lmb_reserve(&images->lmb); in boot_start_lmb()
89 static inline void boot_start_lmb(bootm_headers_t *images) { } in boot_start_lmb() argument
95 memset((void *)&images, 0, sizeof(images)); in bootm_start()
96 images.verify = env_get_yesno("verify"); in bootm_start()
98 boot_start_lmb(&images); in bootm_start()
101 images.state = BOOTM_STATE_START; in bootm_start()
115 &images, &images.os.image_start, &images.os.image_len); in bootm_find_os()
116 if (images.os.image_len == 0) { in bootm_find_os()
125 images.os.type = image_get_type(os_hdr); in bootm_find_os()
126 images.os.comp = image_get_comp(os_hdr); in bootm_find_os()
127 images.os.os = image_get_os(os_hdr); in bootm_find_os()
129 images.os.end = image_get_image_end(os_hdr); in bootm_find_os()
130 images.os.load = image_get_load(os_hdr); in bootm_find_os()
131 images.os.arch = image_get_arch(os_hdr); in bootm_find_os()
136 if (fit_image_get_type(images.fit_hdr_os, in bootm_find_os()
137 images.fit_noffset_os, in bootm_find_os()
138 &images.os.type)) { in bootm_find_os()
144 if (fit_image_get_comp(images.fit_hdr_os, in bootm_find_os()
145 images.fit_noffset_os, in bootm_find_os()
146 &images.os.comp)) { in bootm_find_os()
152 if (fit_image_get_os(images.fit_hdr_os, images.fit_noffset_os, in bootm_find_os()
153 &images.os.os)) { in bootm_find_os()
159 if (fit_image_get_arch(images.fit_hdr_os, in bootm_find_os()
160 images.fit_noffset_os, in bootm_find_os()
161 &images.os.arch)) { in bootm_find_os()
166 images.os.end = fit_get_end(images.fit_hdr_os); in bootm_find_os()
168 if (fit_image_get_load(images.fit_hdr_os, images.fit_noffset_os, in bootm_find_os()
169 &images.os.load)) { in bootm_find_os()
178 images.os.type = IH_TYPE_KERNEL; in bootm_find_os()
179 images.os.comp = android_image_get_comp(os_hdr); in bootm_find_os()
180 images.os.os = IH_OS_LINUX; in bootm_find_os()
182 images.os.end = android_image_get_end(os_hdr); in bootm_find_os()
183 images.os.load = android_image_get_kload(os_hdr); in bootm_find_os()
184 images.ep = images.os.load; in bootm_find_os()
194 if (images.os.arch == IH_ARCH_I386 || in bootm_find_os()
195 images.os.arch == IH_ARCH_X86_64) { in bootm_find_os()
198 ret = boot_get_setup(&images, IH_ARCH_I386, &images.ep, &len); in bootm_find_os()
204 } else if (images.legacy_hdr_valid) { in bootm_find_os()
205 images.ep = image_get_ep(&images.legacy_hdr_os_copy); in bootm_find_os()
207 } else if (images.fit_uname_os) { in bootm_find_os()
210 ret = fit_image_get_entry(images.fit_hdr_os, in bootm_find_os()
211 images.fit_noffset_os, &images.ep); in bootm_find_os()
222 if (images.os.type == IH_TYPE_KERNEL_NOLOAD) { in bootm_find_os()
223 images.os.load = images.os.image_start; in bootm_find_os()
224 images.ep += images.os.load; in bootm_find_os()
227 images.os.start = map_to_sysmem(os_hdr); in bootm_find_os()
233 * bootm_find_images - wrapper to find and locate various images
240 * "loadable" images (loadables are FIT only)
245 * 0, if all existing images were loaded correctly
253 ret = boot_get_ramdisk(argc, argv, &images, IH_INITRD_ARCH, in bootm_find_images()
254 &images.rd_start, &images.rd_end); in bootm_find_images()
262 ret = boot_get_fdt(flag, argc, argv, IH_ARCH_DEFAULT, &images, in bootm_find_images()
263 &images.ft_addr, &images.ft_len); in bootm_find_images()
269 set_working_fdt_addr((ulong)images.ft_addr); in bootm_find_images()
271 lmb_reserve(&images.lmb, (ulong)images.ft_addr, (ulong)images.ft_len); in bootm_find_images()
277 ret = boot_get_fpga(argc, argv, &images, IH_ARCH_DEFAULT, in bootm_find_images()
286 ret = boot_get_loadable(argc, argv, &images, IH_ARCH_DEFAULT, in bootm_find_images()
300 if (((images.os.type == IH_TYPE_KERNEL) || in bootm_find_other()
301 (images.os.type == IH_TYPE_KERNEL_NOLOAD) || in bootm_find_other()
302 (images.os.type == IH_TYPE_MULTI)) && in bootm_find_other()
303 (images.os.os == IH_OS_LINUX || in bootm_find_other()
304 images.os.os == IH_OS_VXWORKS)) in bootm_find_other()
501 static int bootm_load_os(bootm_headers_t *images, unsigned long *load_end, in bootm_load_os() argument
504 image_info_t os = images->os; in bootm_load_os()
531 printf("images.os.start = 0x%lX, images.os.end = 0x%lx\n", in bootm_load_os()
533 printf("images.os.load = 0x%lx, load_end = 0x%lx\n", load, in bootm_load_os()
537 if (images->legacy_hdr_valid) { in bootm_load_os()
538 if (image_get_type(&images->legacy_hdr_os_copy) in bootm_load_os()
550 images->os.image_len = *load_end - load; in bootm_load_os()
679 * @param images Image header information
687 int states, bootm_headers_t *images, int boot_progress) in do_bootm_states() argument
698 images->state |= states; in do_bootm_states()
718 ret = bootm_load_os(images, &load_end, 0); in do_bootm_states()
720 lmb_reserve(&images->lmb, images->os.load, in do_bootm_states()
721 (load_end - images->os.load)); in do_bootm_states()
732 boot_fdt_add_mem_rsv_regions(&images->lmb, images->ft_addr); in do_bootm_states()
737 ulong rd_len = images->rd_end - images->rd_start; in do_bootm_states()
739 ret = boot_ramdisk_high(&images->lmb, images->rd_start, in do_bootm_states()
740 rd_len, &images->initrd_start, &images->initrd_end); in do_bootm_states()
742 env_set_hex("initrd_start", images->initrd_start); in do_bootm_states()
743 env_set_hex("initrd_end", images->initrd_end); in do_bootm_states()
749 ret = boot_relocate_fdt(&images->lmb, &images->ft_addr, in do_bootm_states()
750 &images->ft_len); in do_bootm_states()
757 boot_fn = bootm_os_get_boot_func(images->os.os); in do_bootm_states()
765 genimg_get_os_name(images->os.os), images->os.os); in do_bootm_states()
773 ret = boot_fn(BOOTM_STATE_OS_CMDLINE, argc, argv, images); in do_bootm_states()
775 ret = boot_fn(BOOTM_STATE_OS_BD_T, argc, argv, images); in do_bootm_states()
778 if (images->os.os == IH_OS_LINUX) in do_bootm_states()
781 arch_preboot_os(BOOTM_STATE_OS_PREP, images); in do_bootm_states()
783 ret = boot_fn(BOOTM_STATE_OS_PREP, argc, argv, images); in do_bootm_states()
792 images, boot_fn); in do_bootm_states()
807 images, boot_fn); in do_bootm_states()
888 char * const argv[], bootm_headers_t *images, in boot_get_kernel() argument
908 /* check image type, for FIT images get FIT kernel node */ in boot_get_kernel()
916 hdr = image_get_kernel(img_addr, images->verify); in boot_get_kernel()
947 memmove(&images->legacy_hdr_os_copy, hdr, in boot_get_kernel()
951 images->legacy_hdr_os = hdr; in boot_get_kernel()
953 images->legacy_hdr_valid = 1; in boot_get_kernel()
959 os_noffset = fit_image_load(images, img_addr, in boot_get_kernel()
967 images->fit_hdr_os = map_sysmem(img_addr, 0); in boot_get_kernel()
968 images->fit_uname_os = fit_uname_kernel; in boot_get_kernel()
969 images->fit_uname_cfg = fit_uname_config; in boot_get_kernel()
970 images->fit_noffset_os = os_noffset; in boot_get_kernel()
976 if (android_image_get_kernel(buf, images->verify, in boot_get_kernel()
1005 bootm_headers_t images; in bootm_host_load_image() local
1013 memset(&images, '\0', sizeof(images)); in bootm_host_load_image()
1014 images.verify = 1; in bootm_host_load_image()
1015 noffset = fit_image_load_index(&images, (ulong)fit, in bootm_host_load_image()