blob: 7ca6039ad037b411f79a114a6900129f73fc9a5a [file] [log] [blame]
Summer Qin596f5552022-01-27 18:04:06 +08001/*
2 * Copyright (c) 2022, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#include "compiler_ext_defs.h"
9#include "runtime_defs.h"
10#include "sprt_partition_metadata_indicator.h"
11#include "sprt_main.h"
12
13#if defined(__ICCARM__)
14#pragma required = meta_init_c
15#endif
16
17__used static uintptr_t runtime_init_c(void)
18{
19 return PART_METADATA()->entry;
20}
21
22__naked void sprt_main(void)
23{
24 __asm volatile(
25#if !defined(__ICCARM__)
26 ".syntax unified \n"
27#endif
28 "bl runtime_init_c \n"
29 "bx r0 \n"
30 );
31}