Summer Qin | d0f42b1 | 2020-06-24 16:19:23 +0800 | [diff] [blame] | 1 | /* |
Sherry Zhang | 9714d96 | 2022-03-02 10:52:46 +0800 | [diff] [blame] | 2 | * Copyright (c) 2020-2022, Arm Limited. All rights reserved. |
Summer Qin | d0f42b1 | 2020-06-24 16:19:23 +0800 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #include "cmsis_compiler.h" |
| 9 | #include "service_api.h" |
Kevin Peng | eca45b9 | 2021-02-09 14:46:50 +0800 | [diff] [blame] | 10 | #include "psa/service.h" |
Kevin Peng | fc7b771 | 2021-05-08 13:42:56 +0800 | [diff] [blame] | 11 | #include "svc_num.h" |
Sherry Zhang | 9714d96 | 2022-03-02 10:52:46 +0800 | [diff] [blame] | 12 | #include "utilities.h" |
Summer Qin | d0f42b1 | 2020-06-24 16:19:23 +0800 | [diff] [blame] | 13 | |
| 14 | __attribute__((naked)) |
| 15 | int32_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 Zhang | 9714d96 | 2022-03-02 10:52:46 +0800 | [diff] [blame] | 20 | "SVC "M2S(TFM_SVC_GET_BOOT_DATA)" \n" |
| 21 | "BX lr \n" |
| 22 | ); |
Summer Qin | d0f42b1 | 2020-06-24 16:19:23 +0800 | [diff] [blame] | 23 | } |
Kevin Peng | eca45b9 | 2021-02-09 14:46:50 +0800 | [diff] [blame] | 24 | |
Summer Qin | 484513b | 2022-10-09 17:40:24 +0800 | [diff] [blame^] | 25 | #if TFM_LVL != 1 |
Kevin Peng | eca45b9 | 2021-02-09 14:46:50 +0800 | [diff] [blame] | 26 | /* Entry point when Partition FLIH functions return */ |
| 27 | __attribute__((naked)) |
| 28 | void tfm_flih_func_return(psa_flih_result_t result) |
| 29 | { |
Sherry Zhang | 9714d96 | 2022-03-02 10:52:46 +0800 | [diff] [blame] | 30 | __ASM volatile("SVC "M2S(TFM_SVC_FLIH_FUNC_RETURN)" \n" |
Sherry Zhang | 9714d96 | 2022-03-02 10:52:46 +0800 | [diff] [blame] | 31 | ); |
Kevin Peng | eca45b9 | 2021-02-09 14:46:50 +0800 | [diff] [blame] | 32 | } |
Summer Qin | 484513b | 2022-10-09 17:40:24 +0800 | [diff] [blame^] | 33 | #endif /* TFM_LVL != 1 */ |