blob: 1c0fb1a13ffdb96c53d395eac89c4f7c3289dbe3 [file] [log] [blame]
Summer Qind0f42b12020-06-24 16:19:23 +08001/*
Sherry Zhang9714d962022-03-02 10:52:46 +08002 * Copyright (c) 2020-2022, Arm Limited. All rights reserved.
Summer Qind0f42b12020-06-24 16:19:23 +08003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#include "cmsis_compiler.h"
9#include "service_api.h"
Kevin Pengfc7b7712021-05-08 13:42:56 +080010#ifdef TFM_PSA_API
Kevin Pengeca45b92021-02-09 14:46:50 +080011#include "psa/service.h"
Kevin Pengfc7b7712021-05-08 13:42:56 +080012#include "svc_num.h"
13#else
14#include "tfm_core_svc.h"
15#endif /* TFM_PSA_API */
Sherry Zhang9714d962022-03-02 10:52:46 +080016#include "utilities.h"
Summer Qind0f42b12020-06-24 16:19:23 +080017
18__attribute__((naked))
19int32_t tfm_core_get_boot_data(uint8_t major_type,
20 struct tfm_boot_data *boot_status,
21 uint32_t len)
22{
23 __ASM volatile(
Sherry Zhang9714d962022-03-02 10:52:46 +080024 "SVC "M2S(TFM_SVC_GET_BOOT_DATA)" \n"
25 "BX lr \n"
26 );
Summer Qind0f42b12020-06-24 16:19:23 +080027}
Kevin Pengeca45b92021-02-09 14:46:50 +080028
29#ifdef TFM_PSA_API
30/* Entry point when Partition FLIH functions return */
31__attribute__((naked))
32void tfm_flih_func_return(psa_flih_result_t result)
33{
Sherry Zhang9714d962022-03-02 10:52:46 +080034 __ASM volatile("SVC "M2S(TFM_SVC_FLIH_FUNC_RETURN)" \n"
35 "BX r0 \n"
36 );
Kevin Pengeca45b92021-02-09 14:46:50 +080037}
38#endif /* TFM_PSA_API */