blob: 76f2bde924e3c0b60448b189778462c7663287b9 [file] [log] [blame]
Marek Vasutecc23132025-01-29 18:04:34 +01001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2024 Marek Vasut <marek.vasut+renesas@mailbox.org>
4 */
5
6#include <image.h>
7#include <spl.h>
8
9void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
10{
11 debug("image entry point: 0x%lx\n", spl_image->entry_point);
12 if (spl_image->os == IH_OS_ARM_TRUSTED_FIRMWARE) {
13 typedef void (*image_entry_arg_t)(int, int, int, int)
14 __attribute__ ((noreturn));
15 image_entry_arg_t image_entry =
16 (image_entry_arg_t)(uintptr_t) spl_image->entry_point;
17 image_entry(IH_MAGIC, CONFIG_SPL_TEXT_BASE, 0, 0);
18 } else {
19 typedef void __noreturn (*image_entry_noargs_t)(void);
20 image_entry_noargs_t image_entry =
21 (image_entry_noargs_t)spl_image->entry_point;
22 image_entry();
23 }
24}