xref: /openbmc/u-boot/arch/powerpc/lib/spl.c (revision e8f80a5a)
1*83d290c5STom Rini // SPDX-License-Identifier: GPL-2.0+
2ea8256f0SStefan Roese /*
3ea8256f0SStefan Roese  * Copyright 2012 Stefan Roese <sr@denx.de>
4ea8256f0SStefan Roese  */
5ea8256f0SStefan Roese #include <common.h>
6ea8256f0SStefan Roese #include <config.h>
7ea8256f0SStefan Roese #include <spl.h>
8ea8256f0SStefan Roese #include <image.h>
9ea8256f0SStefan Roese #include <linux/compiler.h>
10ea8256f0SStefan Roese 
11ea8256f0SStefan Roese /*
12ea8256f0SStefan Roese  * This function jumps to an image with argument. Normally an FDT or ATAGS
13ea8256f0SStefan Roese  * image.
14ea8256f0SStefan Roese  */
15ea8256f0SStefan Roese #ifdef CONFIG_SPL_OS_BOOT
jump_to_image_linux(struct spl_image_info * spl_image)165bf5250eSVikas Manocha void __noreturn jump_to_image_linux(struct spl_image_info *spl_image)
17ea8256f0SStefan Roese {
185bf5250eSVikas Manocha 	debug("Entering kernel arg pointer: 0x%p\n", spl_image->arg);
19ea8256f0SStefan Roese 	typedef void (*image_entry_arg_t)(void *, ulong r4, ulong r5, ulong r6,
20ea8256f0SStefan Roese 					  ulong r7, ulong r8, ulong r9)
21ea8256f0SStefan Roese 		__attribute__ ((noreturn));
22ea8256f0SStefan Roese 	image_entry_arg_t image_entry =
23ca12e65cSSimon Glass 		(image_entry_arg_t)spl_image->entry_point;
24ea8256f0SStefan Roese 
255bf5250eSVikas Manocha 	image_entry(spl_image->arg, 0, 0, EPAPR_MAGIC, CONFIG_SYS_BOOTMAPSZ,
265bf5250eSVikas Manocha 		    0, 0);
27ea8256f0SStefan Roese }
28ea8256f0SStefan Roese #endif /* CONFIG_SPL_OS_BOOT */
29