blob: f0b4297a24714113cfcfeb91d393868f268f7cad [file] [log] [blame]
Marc Moreno Berengue20dab392017-11-29 13:18:58 +00001/*
Edison Aibb614aa2018-11-21 15:15:00 +08002 * Copyright (c) 2017-2019, Arm Limited. All rights reserved.
Marc Moreno Berengue20dab392017-11-29 13:18:58 +00003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
Marc Moreno Berengueef202722018-08-10 13:43:43 +01008#ifndef __TFM_PLAT_DEFS_H__
9#define __TFM_PLAT_DEFS_H__
Marc Moreno Berengue20dab392017-11-29 13:18:58 +000010/**
11 * \note The interfaces defined in this file must be implemented for each
12 * target.
13 */
Marc Moreno Berengue20dab392017-11-29 13:18:58 +000014
15#include <stdint.h>
16#include <limits.h>
17
Marc Moreno Berengue9926df82018-08-10 13:45:52 +010018enum tfm_plat_err_t {
19 TFM_PLAT_ERR_SUCCESS = 0,
20 TFM_PLAT_ERR_SYSTEM_ERR,
Marc Moreno Berengue4cc81fc2018-08-10 14:32:01 +010021 TFM_PLAT_ERR_MAX_VALUE,
Marc Moreno Berengue20dab392017-11-29 13:18:58 +000022 /* Following entry is only to ensure the error code of int size */
Marc Moreno Berengue9926df82018-08-10 13:45:52 +010023 TFM_PLAT_ERR_FORCE_INT_SIZE = INT_MAX
Marc Moreno Berengue20dab392017-11-29 13:18:58 +000024};
25
Marc Moreno Berengue8e0fa7a2018-10-04 18:25:13 +010026/*!
27 * \def TFM_LINK_SET_OBJECT_IN_PARTITION_SECTION(TFM_PARTITION_NAME)
28 *
29 * \brief This macro provides a mechanism to place a function code in a specific
30 * secure partition at linker time in TF-M Level 3.
31 *
32 * \param[in] TFM_PARTITION_NAME TF-M partition name assigned in the manifest
Edison Aibb614aa2018-11-21 15:15:00 +080033 * file "name" field.
Marc Moreno Berengue8e0fa7a2018-10-04 18:25:13 +010034 */
35#define TFM_LINK_SET_OBJECT_IN_PARTITION_SECTION(TFM_PARTITION_NAME) \
36 __attribute__((section(TFM_PARTITION_NAME"_ATTR_FN")))
37
Marc Moreno Berengueef202722018-08-10 13:43:43 +010038#endif /* __TFM_PLAT_DEFS_H__ */