Lines Matching full:images

43 bootm_headers_t images;		/* pointers to os/initrd/fdt images */  variable
46 char * const argv[], bootm_headers_t *images,
54 static void boot_start_lmb(bootm_headers_t *images) in boot_start_lmb() argument
59 lmb_init(&images->lmb); in boot_start_lmb()
64 lmb_add(&images->lmb, (phys_addr_t)mem_start, mem_size); in boot_start_lmb()
66 arch_lmb_reserve(&images->lmb); in boot_start_lmb()
67 board_lmb_reserve(&images->lmb); in boot_start_lmb()
71 static inline void boot_start_lmb(bootm_headers_t *images) { } in boot_start_lmb() argument
77 memset((void *)&images, 0, sizeof(images)); in bootm_start()
78 images.verify = env_get_yesno("verify"); in bootm_start()
80 boot_start_lmb(&images); in bootm_start()
83 images.state = BOOTM_STATE_START; in bootm_start()
97 &images, &images.os.image_start, &images.os.image_len); in bootm_find_os()
98 if (images.os.image_len == 0) { in bootm_find_os()
107 images.os.type = image_get_type(os_hdr); in bootm_find_os()
108 images.os.comp = image_get_comp(os_hdr); in bootm_find_os()
109 images.os.os = image_get_os(os_hdr); in bootm_find_os()
111 images.os.end = image_get_image_end(os_hdr); in bootm_find_os()
112 images.os.load = image_get_load(os_hdr); in bootm_find_os()
113 images.os.arch = image_get_arch(os_hdr); in bootm_find_os()
118 if (fit_image_get_type(images.fit_hdr_os, in bootm_find_os()
119 images.fit_noffset_os, in bootm_find_os()
120 &images.os.type)) { in bootm_find_os()
126 if (fit_image_get_comp(images.fit_hdr_os, in bootm_find_os()
127 images.fit_noffset_os, in bootm_find_os()
128 &images.os.comp)) { in bootm_find_os()
134 if (fit_image_get_os(images.fit_hdr_os, images.fit_noffset_os, in bootm_find_os()
135 &images.os.os)) { in bootm_find_os()
141 if (fit_image_get_arch(images.fit_hdr_os, in bootm_find_os()
142 images.fit_noffset_os, in bootm_find_os()
143 &images.os.arch)) { in bootm_find_os()
148 images.os.end = fit_get_end(images.fit_hdr_os); in bootm_find_os()
150 if (fit_image_get_load(images.fit_hdr_os, images.fit_noffset_os, in bootm_find_os()
151 &images.os.load)) { in bootm_find_os()
160 images.os.type = IH_TYPE_KERNEL; in bootm_find_os()
161 images.os.comp = IH_COMP_NONE; in bootm_find_os()
162 images.os.os = IH_OS_LINUX; in bootm_find_os()
164 images.os.end = android_image_get_end(os_hdr); in bootm_find_os()
165 images.os.load = android_image_get_kload(os_hdr); in bootm_find_os()
166 images.ep = images.os.load; in bootm_find_os()
176 if (images.os.arch == IH_ARCH_I386 || in bootm_find_os()
177 images.os.arch == IH_ARCH_X86_64) { in bootm_find_os()
180 ret = boot_get_setup(&images, IH_ARCH_I386, &images.ep, &len); in bootm_find_os()
186 } else if (images.legacy_hdr_valid) { in bootm_find_os()
187 images.ep = image_get_ep(&images.legacy_hdr_os_copy); in bootm_find_os()
189 } else if (images.fit_uname_os) { in bootm_find_os()
192 ret = fit_image_get_entry(images.fit_hdr_os, in bootm_find_os()
193 images.fit_noffset_os, &images.ep); in bootm_find_os()
204 if (images.os.type == IH_TYPE_KERNEL_NOLOAD) { in bootm_find_os()
206 images.os.arch == IH_ARCH_ARM64) { in bootm_find_os()
210 ret = booti_setup(images.os.image_start, &image_addr, in bootm_find_os()
215 images.os.type = IH_TYPE_KERNEL; in bootm_find_os()
216 images.os.load = image_addr; in bootm_find_os()
217 images.ep = image_addr; in bootm_find_os()
219 images.os.load = images.os.image_start; in bootm_find_os()
220 images.ep += images.os.image_start; in bootm_find_os()
224 images.os.start = map_to_sysmem(os_hdr); in bootm_find_os()
230 * bootm_find_images - wrapper to find and locate various images
237 * "loadable" images (loadables are FIT only)
242 * 0, if all existing images were loaded correctly
250 ret = boot_get_ramdisk(argc, argv, &images, IH_INITRD_ARCH, in bootm_find_images()
251 &images.rd_start, &images.rd_end); in bootm_find_images()
259 ret = boot_get_fdt(flag, argc, argv, IH_ARCH_DEFAULT, &images, in bootm_find_images()
260 &images.ft_addr, &images.ft_len); in bootm_find_images()
265 set_working_fdt_addr((ulong)images.ft_addr); in bootm_find_images()
271 ret = boot_get_fpga(argc, argv, &images, IH_ARCH_DEFAULT, in bootm_find_images()
280 ret = boot_get_loadable(argc, argv, &images, IH_ARCH_DEFAULT, in bootm_find_images()
294 if (((images.os.type == IH_TYPE_KERNEL) || in bootm_find_other()
295 (images.os.type == IH_TYPE_KERNEL_NOLOAD) || in bootm_find_other()
296 (images.os.type == IH_TYPE_MULTI)) && in bootm_find_other()
297 (images.os.os == IH_OS_LINUX || in bootm_find_other()
298 images.os.os == IH_OS_VXWORKS)) in bootm_find_other()
446 static int bootm_load_os(bootm_headers_t *images, int boot_progress) in bootm_load_os() argument
448 image_info_t os = images->os; in bootm_load_os()
483 debug("images.os.start = 0x%lX, images.os.end = 0x%lx\n", in bootm_load_os()
485 debug("images.os.load = 0x%lx, load_end = 0x%lx\n", load, in bootm_load_os()
489 if (images->legacy_hdr_valid) { in bootm_load_os()
490 if (image_get_type(&images->legacy_hdr_os_copy) in bootm_load_os()
501 lmb_reserve(&images->lmb, images->os.load, (load_end - in bootm_load_os()
502 images->os.load)); in bootm_load_os()
623 * @param images Image header information
631 int states, bootm_headers_t *images, int boot_progress) in do_bootm_states() argument
637 images->state |= states; in do_bootm_states()
655 ret = bootm_load_os(images, 0); in do_bootm_states()
665 ulong rd_len = images->rd_end - images->rd_start; in do_bootm_states()
667 ret = boot_ramdisk_high(&images->lmb, images->rd_start, in do_bootm_states()
668 rd_len, &images->initrd_start, &images->initrd_end); in do_bootm_states()
670 env_set_hex("initrd_start", images->initrd_start); in do_bootm_states()
671 env_set_hex("initrd_end", images->initrd_end); in do_bootm_states()
677 boot_fdt_add_mem_rsv_regions(&images->lmb, images->ft_addr); in do_bootm_states()
678 ret = boot_relocate_fdt(&images->lmb, &images->ft_addr, in do_bootm_states()
679 &images->ft_len); in do_bootm_states()
686 boot_fn = bootm_os_get_boot_func(images->os.os); in do_bootm_states()
694 genimg_get_os_name(images->os.os), images->os.os); in do_bootm_states()
702 ret = boot_fn(BOOTM_STATE_OS_CMDLINE, argc, argv, images); in do_bootm_states()
704 ret = boot_fn(BOOTM_STATE_OS_BD_T, argc, argv, images); in do_bootm_states()
707 if (images->os.os == IH_OS_LINUX) in do_bootm_states()
710 ret = boot_fn(BOOTM_STATE_OS_PREP, argc, argv, images); in do_bootm_states()
719 images, boot_fn); in do_bootm_states()
734 images, boot_fn); in do_bootm_states()
815 char * const argv[], bootm_headers_t *images, in boot_get_kernel() argument
835 /* check image type, for FIT images get FIT kernel node */ in boot_get_kernel()
843 hdr = image_get_kernel(img_addr, images->verify); in boot_get_kernel()
873 memmove(&images->legacy_hdr_os_copy, hdr, in boot_get_kernel()
877 images->legacy_hdr_os = hdr; in boot_get_kernel()
879 images->legacy_hdr_valid = 1; in boot_get_kernel()
885 os_noffset = fit_image_load(images, img_addr, in boot_get_kernel()
893 images->fit_hdr_os = map_sysmem(img_addr, 0); in boot_get_kernel()
894 images->fit_uname_os = fit_uname_kernel; in boot_get_kernel()
895 images->fit_uname_cfg = fit_uname_config; in boot_get_kernel()
896 images->fit_noffset_os = os_noffset; in boot_get_kernel()
902 if (android_image_get_kernel(buf, images->verify, in boot_get_kernel()
929 bootm_headers_t images; in bootm_host_load_image() local
937 memset(&images, '\0', sizeof(images)); in bootm_host_load_image()
938 images.verify = 1; in bootm_host_load_image()
939 noffset = fit_image_load(&images, (ulong)fit, in bootm_host_load_image()