aboutsummaryrefslogtreecommitdiff
path: root/platform/include
diff options
context:
space:
mode:
authorEdison Ai <edison.ai@arm.com>2020-02-23 14:16:08 +0800
committerEdison Ai <edison.ai@arm.com>2020-02-25 15:59:29 +0800
commit1dfd7b1fed4132ea75c535e4cab3639e78da675b (patch)
tree3a682e4876761654b916f6deea537762384d1519 /platform/include
parentb5a03c2b7aa521c6aa09f8ada846a8613bb920d9 (diff)
downloadtrusted-firmware-m-1dfd7b1fed4132ea75c535e4cab3639e78da675b.tar.gz
Build: Add memory protection configuration
Add a config macro "CONFIG_TFM_ENABLE_MEMORY_PROTECT" to control if the memory protection function is enabled or not. The default value is "OFF" and it is set to "ON" when the isolation level greater than 1. Change-Id: I3e5495c97183e07a0f9b82ea4923ea20ee10071a Signed-off-by: Edison Ai <edison.ai@arm.com> Co-authored-by: Shawn Shan <shawn.shan@arm.com>
Diffstat (limited to 'platform/include')
-rw-r--r--platform/include/tfm_spm_hal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/include/tfm_spm_hal.h b/platform/include/tfm_spm_hal.h
index 0435212554..3607753630 100644
--- a/platform/include/tfm_spm_hal.h
+++ b/platform/include/tfm_spm_hal.h
@@ -105,7 +105,7 @@ enum tfm_plat_err_t tfm_spm_hal_post_init_platform(void);
*/
enum tfm_plat_err_t tfm_spm_hal_init_isolation_hw(void);
-#if TFM_LVL != 1
+#ifdef CONFIG_TFM_ENABLE_MEMORY_PROTECT
/**
* \brief This function initialises the HW used for isolation, and sets the
* default configuration for them.
@@ -114,7 +114,7 @@ enum tfm_plat_err_t tfm_spm_hal_init_isolation_hw(void);
* \return Returns values as specified by the \ref tfm_plat_err_t
*/
enum tfm_plat_err_t tfm_spm_hal_setup_isolation_hw(void);
-#endif
+#endif /* CONFIG_TFM_ENABLE_MEMORY_PROTECT */
/**
* \brief Configure peripherals for a partition based on the platform data and