blob: 1ed1ad9792305c85818fad122224b68fa78a25f3 [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 Pengeca45b92021-02-09 14:46:50 +080010#include "psa/service.h"
Kevin Pengfc7b7712021-05-08 13:42:56 +080011#include "svc_num.h"
Sherry Zhang9714d962022-03-02 10:52:46 +080012#include "utilities.h"
Summer Qind0f42b12020-06-24 16:19:23 +080013
14__attribute__((naked))
15int32_t tfm_core_get_boot_data(uint8_t major_type,
16 struct tfm_boot_data *boot_status,
17 uint32_t len)
18{
19 __ASM volatile(
Sherry Zhang9714d962022-03-02 10:52:46 +080020 "SVC "M2S(TFM_SVC_GET_BOOT_DATA)" \n"
21 "BX lr \n"
22 );
Summer Qind0f42b12020-06-24 16:19:23 +080023}
Kevin Pengeca45b92021-02-09 14:46:50 +080024
Summer Qin484513b2022-10-09 17:40:24 +080025#if TFM_LVL != 1
Kevin Pengeca45b92021-02-09 14:46:50 +080026/* Entry point when Partition FLIH functions return */
27__attribute__((naked))
28void tfm_flih_func_return(psa_flih_result_t result)
29{
Sherry Zhang9714d962022-03-02 10:52:46 +080030 __ASM volatile("SVC "M2S(TFM_SVC_FLIH_FUNC_RETURN)" \n"
Sherry Zhang9714d962022-03-02 10:52:46 +080031 );
Kevin Pengeca45b92021-02-09 14:46:50 +080032}
Summer Qin484513b2022-10-09 17:40:24 +080033#endif /* TFM_LVL != 1 */