1 /** 2 ****************************************************************************** 3 * @file tfm_low_level_security.h 4 * @author MCD Application Team 5 * @brief This file contains definitions for Secure Firmware Update security 6 * low level interface. 7 ****************************************************************************** 8 * @attention 9 * 10 * <h2><center>© Copyright (c) 2020 STMicroelectronics. 11 * All rights reserved.</center></h2> 12 * 13 * This software component is licensed by ST under BSD 3-Clause license, 14 * the "License"; You may not use this file except in compliance with the 15 * License. You may obtain a copy of the License at: 16 * opensource.org/licenses/BSD-3-Clause 17 * 18 ****************************************************************************** 19 */ 20 21 /* Define to prevent recursive inclusion -------------------------------------*/ 22 #ifndef TFM_LOW_LEVEL_SECURITY_H 23 #define TFM_LOW_LEVEL_SECURITY_H 24 25 #ifdef __cplusplus 26 extern "C" { 27 #endif 28 29 /* Includes ------------------------------------------------------------------*/ 30 #include "boot_hal_cfg.h" 31 #include "bootutil/bootutil_log.h" 32 33 /** @addtogroup TFM Secure Secure Boot / Firmware Update 34 * @{ 35 */ 36 37 /** @addtogroup TFM_LOW_LEVEL 38 * @{ 39 */ 40 /** @defgroup TFM_LOW_LEVEL_SECURITY Security Low Level define 41 * @{ 42 */ 43 #define SRAM2_PAGE_SIZE (0x400) 44 /** 45 * @} 46 */ 47 /** @defgroup TFM_LOW_LEVEL_SECURITY Security Low Level Interface 48 * @{ 49 */ 50 /** @defgroup TFM_SECURITY_Configuration Security Configuration 51 * @{ 52 */ 53 54 55 /** 56 * @} 57 */ 58 59 /** @defgroup TFM_SECURITY_Exported_Constants Exported Constants 60 * @{ 61 */ 62 63 /** @defgroup TFM_SECURITY_Exported_Constants_BOOL SFU Bool definition 64 * @{ 65 */ 66 typedef enum 67 { 68 TFM_FALSE = 0U, 69 TFM_TRUE = !TFM_FALSE 70 } TFM_BoolTypeDef; 71 72 /** 73 * @} 74 */ 75 76 /** @defgroup TFM_SECURITY_Exported_Constants_State TFM Functional State definition 77 * @{ 78 */ 79 typedef enum 80 { 81 TFM_DISABLE = 0U, 82 TFM_ENABLE = !TFM_DISABLE 83 } TFM_FunctionalState; 84 85 /** 86 * @} 87 */ 88 89 /** @defgroup TFM_SECURITY_Exported_Functions Exported Functions 90 * @{ 91 */ 92 void TFM_LL_SECU_ApplyRunTimeProtections(void); 93 void TFM_LL_SECU_UpdateRunTimeProtections(void); 94 void TFM_LL_SECU_CheckStaticProtections(void); 95 96 /** 97 * @} 98 */ 99 100 /** 101 * @} 102 */ 103 104 /** 105 * @} 106 */ 107 108 /** 109 * @} 110 */ 111 112 /** 113 * @} 114 */ 115 116 117 #ifdef __cplusplus 118 } 119 #endif 120 121 #endif /* TFM_LOW_LEVEL_SECURITY_H */ 122 123 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 124