blob: 20cb3b2d6ab416c2cd3825b368e9afebed4f2355 [file] [log] [blame]
Raef Coles237af692022-07-20 10:36:43 +01001/*
Sherry Zhang8faae452023-02-13 14:53:51 +08002 * Copyright (c) 2020-2023, Arm Limited. All rights reserved.
Raef Coles237af692022-07-20 10:36:43 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8/* Interop between TF-M fih.h and mcuboot fault_injection_hardening.h, so that
9 * platform code can target fih.h and for bl2 this will be redirected to
10 * fault_injection_hardening.h
11 */
12
13#ifndef __INTEROP_FIH_H__
14#define __INTEROP_FIH_H__
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20#include "stdint.h"
21
Raef Coles237af692022-07-20 10:36:43 +010022/*
Sherry Zhang8faae452023-02-13 14:53:51 +080023 * FIH return type macro changes the function return types to fih_ret.
Raef Coles237af692022-07-20 10:36:43 +010024 * All functions that need to be protected by FIH and called via FIH_CALL must
Sherry Zhang8faae452023-02-13 14:53:51 +080025 * return a fih_ret type.
Raef Coles237af692022-07-20 10:36:43 +010026 */
Sherry Zhang8faae452023-02-13 14:53:51 +080027#define FIH_RET_TYPE(type) fih_ret
Raef Coles237af692022-07-20 10:36:43 +010028
29#include "bootutil/fault_injection_hardening.h"
30
Raef Coles237af692022-07-20 10:36:43 +010031#ifdef __cplusplus
32}
33#endif /* __cplusplus */
34
35#endif /* __INTEROP_FIH_H__ */