blob: 0a709c2df80f3aa96026e4062cd1d4f62cfab51a [file] [log] [blame]
Imre Kis2cfb2b42021-12-15 19:15:42 +01001// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved.
4 */
5
6#include <stddef.h>
7#include <stdint.h>
8#include "compiler.h"
9#include "libc_init.h"
10#include "sp_api.h"
11
12/*
13 * According to the FF-A specification an optional initialization descriptor can
14 * be passed to the SP in w0/x0-w3/x3 registers (a0-a3 parameters). As the exact
15 * register is implementation defined the first four registers are forwarded to
16 * the user code.
17 */
18void __noreturn _sp_entry(uintptr_t a0, uintptr_t a1,
19 uintptr_t a2, uintptr_t a3);
20void __noreturn _sp_entry(uintptr_t a0, uintptr_t a1,
21 uintptr_t a2, uintptr_t a3)
22{
23 (void)a1;
24 (void)a2;
25 (void)a3;
26
27 libc_init();
28
29 sp_main((struct ffa_init_info *)a0);
30}