Raef Coles | 237af69 | 2022-07-20 10:36:43 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2020-2022, Arm Limited. All rights reserved. |
| 3 | * |
| 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 |
| 17 | extern "C" { |
| 18 | #endif /* __cplusplus */ |
| 19 | |
| 20 | #include "stdint.h" |
| 21 | |
Raef Coles | 237af69 | 2022-07-20 10:36:43 +0100 | [diff] [blame] | 22 | /* |
| 23 | * FIH return type macro changes the function return types to fih_int. |
| 24 | * All functions that need to be protected by FIH and called via FIH_CALL must |
| 25 | * return a fih_int type. |
| 26 | */ |
| 27 | #define FIH_RET_TYPE(type) fih_int |
| 28 | |
| 29 | #include "bootutil/fault_injection_hardening.h" |
| 30 | |
Raef Coles | 237af69 | 2022-07-20 10:36:43 +0100 | [diff] [blame] | 31 | #ifdef __cplusplus |
| 32 | } |
| 33 | #endif /* __cplusplus */ |
| 34 | |
| 35 | #endif /* __INTEROP_FIH_H__ */ |