blob: f7d67cb555e036bf6b1c41e7726382d0af0687d0 [file] [log] [blame]
Imre Kise6d73412021-10-18 14:01:47 +02001// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2021, 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
Balint Dobszay4f9d8e32023-04-13 13:55:08 +020029 sp_main((union ffa_boot_info *)a0);
Imre Kise6d73412021-10-18 14:01:47 +020030}