1 /* 2 * Copyright (c) 2018-2021, Arm Limited. All rights reserved. 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 15 #include "psa/client.h" 16 #include "tfm_plat_defs.h" 17 #include "tfm_platform_api.h" 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_RO_IN_PARTITION_SECTION("TFM_SP_PLATFORM", "PSA-ROT") 29 void tfm_platform_hal_system_reset(void); 30 31 /*! 32 * \brief Performs a platform-specific service 33 * 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) 38 * 39 * \return Returns values as specified by the \ref tfm_platform_err_t 40 */ 41 TFM_LINK_SET_RO_IN_PARTITION_SECTION("TFM_SP_PLATFORM", "PSA-ROT") 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); 45 46 #ifdef __cplusplus 47 } 48 #endif 49 50 #endif /* __TFM_PLATFORM_SYSTEM_H__ */ 51