blob: b4087546dd1dc9c58f2aa1e5c26f14720adc912c [file] [log] [blame]
Stefan Roesec8919012020-04-21 09:28:46 +02001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2020 Stefan Roese <sr@denx.de>
4 */
5
Stefan Roesec8919012020-04-21 09:28:46 +02006#include <cpu_func.h>
Simon Glass0f2af882020-05-10 11:40:05 -06007#include <log.h>
Stefan Roesec8919012020-04-21 09:28:46 +02008#include <spl.h>
9
10void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
11{
12 typedef void __noreturn (*image_entry_noargs_t)(void);
13 image_entry_noargs_t image_entry =
14 (image_entry_noargs_t)spl_image->entry_point;
15
16 /* Flush cache before jumping to application */
17 flush_cache((unsigned long)spl_image->load_addr, spl_image->size);
18
19 debug("image entry point: 0x%lx\n", spl_image->entry_point);
20 image_entry();
21}