Lines Matching +full:bd +full:- +full:address
1 // SPDX-License-Identifier: GPL-2.0+
3 * Corscience GmbH & Co. KG - Simon Schwarz <schwarz@corscience.de>
4 * - Added prep subcommand support
5 * - Reorganized source - modeled after powerpc version
8 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
19 #include <u-boot/zlib.h>
55 * Allocate space for command line and board info - the in arch_lmb_reserve()
56 * address should be as high as possible within the reach of in arch_lmb_reserve()
65 sp -= 4096; in arch_lmb_reserve()
67 if (!gd->bd->bi_dram[bank].size || in arch_lmb_reserve()
68 sp < gd->bd->bi_dram[bank].start) in arch_lmb_reserve()
70 /* Watch out for RAM at end of address space! */ in arch_lmb_reserve()
71 bank_end = gd->bd->bi_dram[bank].start + in arch_lmb_reserve()
72 gd->bd->bi_dram[bank].size - 1; in arch_lmb_reserve()
75 lmb_reserve(lmb, sp, bank_end - sp + 1); in arch_lmb_reserve()
85 * announce_and_cleanup() - Print message and prepare for kernel boot
87 * @fake: non-zero to do everything except actually boot
109 * This may be useful for last-stage operations, like cancelling in announce_and_cleanup()
117 static void setup_start_tag (bd_t *bd) in setup_start_tag() argument
119 params = (struct tag *)bd->bi_boot_params; in setup_start_tag()
121 params->hdr.tag = ATAG_CORE; in setup_start_tag()
122 params->hdr.size = tag_size (tag_core); in setup_start_tag()
124 params->u.core.flags = 0; in setup_start_tag()
125 params->u.core.pagesize = 0; in setup_start_tag()
126 params->u.core.rootdev = 0; in setup_start_tag()
131 static void setup_memory_tags(bd_t *bd) in setup_memory_tags() argument
136 params->hdr.tag = ATAG_MEM; in setup_memory_tags()
137 params->hdr.size = tag_size (tag_mem32); in setup_memory_tags()
139 params->u.mem.start = bd->bi_dram[i].start; in setup_memory_tags()
140 params->u.mem.size = bd->bi_dram[i].size; in setup_memory_tags()
146 static void setup_commandline_tag(bd_t *bd, char *commandline) in setup_commandline_tag() argument
156 /* skip non-existent command lines so the kernel will still in setup_commandline_tag()
162 params->hdr.tag = ATAG_CMDLINE; in setup_commandline_tag()
163 params->hdr.size = in setup_commandline_tag()
166 strcpy (params->u.cmdline.cmdline, p); in setup_commandline_tag()
171 static void setup_initrd_tag(bd_t *bd, ulong initrd_start, ulong initrd_end) in setup_initrd_tag() argument
176 params->hdr.tag = ATAG_INITRD2; in setup_initrd_tag()
177 params->hdr.size = tag_size (tag_initrd); in setup_initrd_tag()
179 params->u.initrd.start = initrd_start; in setup_initrd_tag()
180 params->u.initrd.size = initrd_end - initrd_start; in setup_initrd_tag()
191 params->hdr.tag = ATAG_SERIAL; in setup_serial_tag()
192 params->hdr.size = tag_size (tag_serialnr); in setup_serial_tag()
193 params->u.serialnr.low = serialnr.low; in setup_serial_tag()
194 params->u.serialnr.high= serialnr.high; in setup_serial_tag()
204 params->hdr.tag = ATAG_REVISION; in setup_revision_tag()
205 params->hdr.size = tag_size (tag_revision); in setup_revision_tag()
206 params->u.revision.rev = rev; in setup_revision_tag()
210 static void setup_end_tag(bd_t *bd) in setup_end_tag() argument
212 params->hdr.tag = ATAG_NONE; in setup_end_tag()
213 params->hdr.size = 0; in setup_end_tag()
231 if (IMAGE_ENABLE_OF_LIBFDT && images->ft_len) { in boot_prep_linux()
241 setup_start_tag(gd->bd); in boot_prep_linux()
245 setup_commandline_tag(gd->bd, commandline); in boot_prep_linux()
249 setup_memory_tags(gd->bd); in boot_prep_linux()
253 * a specified location. And set images->initrd_start & in boot_prep_linux()
254 * images->initrd_end to relocated ramdisk's start/end in boot_prep_linux()
255 * addresses. So use them instead of images->rd_start & in boot_prep_linux()
256 * images->rd_end when possible. in boot_prep_linux()
258 if (images->initrd_start && images->initrd_end) { in boot_prep_linux()
259 setup_initrd_tag(gd->bd, images->initrd_start, in boot_prep_linux()
260 images->initrd_end); in boot_prep_linux()
261 } else if (images->rd_start && images->rd_end) { in boot_prep_linux()
262 setup_initrd_tag(gd->bd, images->rd_start, in boot_prep_linux()
263 images->rd_end); in boot_prep_linux()
267 setup_end_tag(gd->bd); in boot_prep_linux()
269 printf("FDT and ATAGS support not compiled in - hanging\n"); in boot_prep_linux()
309 armv8_switch_to_el1(0, (u64)gd->bd->bi_arch_number, in switch_to_el1()
330 void *res2))images->ep; in boot_jump_linux()
332 debug("## Transferring control to Linux (at address %lx)...\n", in boot_jump_linux()
344 update_os_arch_secondary_cores(images->os.arch); in boot_jump_linux()
347 armv8_switch_to_el2((u64)images->ft_addr, 0, 0, 0, in boot_jump_linux()
351 (images->os.arch == IH_ARCH_ARM)) in boot_jump_linux()
352 armv8_switch_to_el2(0, (u64)gd->bd->bi_arch_number, in boot_jump_linux()
353 (u64)images->ft_addr, 0, in boot_jump_linux()
354 (u64)images->ep, in boot_jump_linux()
357 armv8_switch_to_el2((u64)images->ft_addr, 0, 0, 0, in boot_jump_linux()
358 images->ep, in boot_jump_linux()
363 unsigned long machid = gd->bd->bi_arch_number; in boot_jump_linux()
369 kernel_entry = (void (*)(int, int, uint))images->ep; in boot_jump_linux()
383 debug("## Transferring control to Linux (at address %08lx)" \ in boot_jump_linux()
388 if (IMAGE_ENABLE_OF_LIBFDT && images->ft_len) in boot_jump_linux()
389 r2 = (unsigned long)images->ft_addr; in boot_jump_linux()
391 r2 = gd->bd->bi_boot_params; in boot_jump_linux()
417 return -1; in do_bootm_linux()
440 if (images->ft_addr) { in boot_prep_vxworks()
441 off = fdt_path_offset(images->ft_addr, "/memory"); in boot_prep_vxworks()
443 if (arch_fixup_fdt(images->ft_addr)) in boot_prep_vxworks()
457 /* ARM VxWorks requires device tree physical address to be passed */ in boot_jump_vxworks()
458 ((void (*)(void *))images->ep)(images->ft_addr); in boot_jump_vxworks()