blob: 8ad22b11d96319ea15b205e8c5c3a2345752aa8a [file] [log] [blame]
Marc Moreno Berengue8e0fa7a2018-10-04 18:25:13 +01001/*
Tamas Kaman262dc7b2019-03-20 13:37:12 +01002 * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
Marc Moreno Berengue8e0fa7a2018-10-04 18:25:13 +01003 *
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 Kaman262dc7b2019-03-20 13:37:12 +010015#include "psa_client.h"
16#include "tfm_plat_defs.h"
Miklos Balintc7b1b6c2019-04-24 12:38:36 +020017#include "tfm_platform_api.h"
Marc Moreno Berengue8e0fa7a2018-10-04 18:25:13 +010018
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23/**
24 * \brief Resets the system.
25 *
26 * \details Requests a system reset to reset the MCU.
27 */
28TFM_LINK_SET_OBJECT_IN_PARTITION_SECTION("TFM_SP_PLATFORM")
29void tfm_platform_hal_system_reset(void);
30
Tamas Kaman262dc7b2019-03-20 13:37:12 +010031/*!
Miklos Balintc7b1b6c2019-04-24 12:38:36 +020032 * \brief Performs a platform-specific service
Tamas Kaman262dc7b2019-03-20 13:37:12 +010033 *
Miklos Balintc7b1b6c2019-04-24 12:38:36 +020034 * \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 Kaman262dc7b2019-03-20 13:37:12 +010038 *
Miklos Balintc7b1b6c2019-04-24 12:38:36 +020039 * \return Returns values as specified by the \ref tfm_platform_err_t
Tamas Kaman262dc7b2019-03-20 13:37:12 +010040 */
41TFM_LINK_SET_OBJECT_IN_PARTITION_SECTION("TFM_SP_PLATFORM")
Miklos Balintc7b1b6c2019-04-24 12:38:36 +020042enum 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 Kaman262dc7b2019-03-20 13:37:12 +010045
Marc Moreno Berengue8e0fa7a2018-10-04 18:25:13 +010046#ifdef __cplusplus
47}
48#endif
49
50#endif /* __TFM_PLATFORM_SYSTEM_H__ */