Marc Moreno Berengue | 8e0fa7a | 2018-10-04 18:25:13 +0100 | [diff] [blame] | 1 | /* |
Tamas Kaman | 262dc7b | 2019-03-20 13:37:12 +0100 | [diff] [blame] | 2 | * Copyright (c) 2018-2019, Arm Limited. All rights reserved. |
Marc Moreno Berengue | 8e0fa7a | 2018-10-04 18:25:13 +0100 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #ifndef __TFM_PLATFORM_SYSTEM_H__ |
| 9 | #define __TFM_PLATFORM_SYSTEM_H__ |
| 10 | /** |
| 11 | * \note The interfaces defined in this file must be implemented for each |
| 12 | * target. |
| 13 | */ |
| 14 | |
Tamas Kaman | 262dc7b | 2019-03-20 13:37:12 +0100 | [diff] [blame] | 15 | #include "psa_client.h" |
| 16 | #include "tfm_plat_defs.h" |
Miklos Balint | c7b1b6c | 2019-04-24 12:38:36 +0200 | [diff] [blame] | 17 | #include "tfm_platform_api.h" |
Marc Moreno Berengue | 8e0fa7a | 2018-10-04 18:25:13 +0100 | [diff] [blame] | 18 | |
| 19 | #ifdef __cplusplus |
| 20 | extern "C" { |
| 21 | #endif |
| 22 | |
| 23 | /** |
| 24 | * \brief Resets the system. |
| 25 | * |
| 26 | * \details Requests a system reset to reset the MCU. |
| 27 | */ |
| 28 | TFM_LINK_SET_OBJECT_IN_PARTITION_SECTION("TFM_SP_PLATFORM") |
| 29 | void tfm_platform_hal_system_reset(void); |
| 30 | |
Tamas Kaman | 262dc7b | 2019-03-20 13:37:12 +0100 | [diff] [blame] | 31 | /*! |
Miklos Balint | c7b1b6c | 2019-04-24 12:38:36 +0200 | [diff] [blame] | 32 | * \brief Performs a platform-specific service |
Tamas Kaman | 262dc7b | 2019-03-20 13:37:12 +0100 | [diff] [blame] | 33 | * |
Miklos Balint | c7b1b6c | 2019-04-24 12:38:36 +0200 | [diff] [blame] | 34 | * \param[in] request Request identifier (valid values vary |
| 35 | * based on the platform) |
| 36 | * \param[in] in_vec Input buffer to the requested service (or NULL) |
| 37 | * \param[out] out_vec Output buffer to the requested service (or NULL) |
Tamas Kaman | 262dc7b | 2019-03-20 13:37:12 +0100 | [diff] [blame] | 38 | * |
Miklos Balint | c7b1b6c | 2019-04-24 12:38:36 +0200 | [diff] [blame] | 39 | * \return Returns values as specified by the \ref tfm_platform_err_t |
Tamas Kaman | 262dc7b | 2019-03-20 13:37:12 +0100 | [diff] [blame] | 40 | */ |
| 41 | TFM_LINK_SET_OBJECT_IN_PARTITION_SECTION("TFM_SP_PLATFORM") |
Miklos Balint | c7b1b6c | 2019-04-24 12:38:36 +0200 | [diff] [blame] | 42 | enum tfm_platform_err_t tfm_platform_hal_ioctl(tfm_platform_ioctl_req_t request, |
| 43 | psa_invec *in_vec, |
| 44 | psa_outvec *out_vec); |
Tamas Kaman | 262dc7b | 2019-03-20 13:37:12 +0100 | [diff] [blame] | 45 | |
Marc Moreno Berengue | 8e0fa7a | 2018-10-04 18:25:13 +0100 | [diff] [blame] | 46 | #ifdef __cplusplus |
| 47 | } |
| 48 | #endif |
| 49 | |
| 50 | #endif /* __TFM_PLATFORM_SYSTEM_H__ */ |