fix(stm32mp2): remove mapping of BL2 DT area

To prevent from coding issues that could overwrite DT area, we were
mapping this area as read-only on STM32MP1. But on STM32MP2, we need
this area to put BL31 binary. We were then using dynamic mapping. But
the area is included in the whole SYSRAM memory mapping. This is not
allowed with dynamic mapping. As no other code is running at this step,
and we know what code is running in BL2, just remove this extra
read-only protection for STM32MP2. A message is added after the post
load process of FW-CONFIG file, as BL2 DT area will be overwritten
after that.
And remove the now useless macros DTB_BASE & DTB_LIMIT.
This corrects Coverity issue: CID 443168.

Change-Id: Ic01d6a443ecf7721380ef39dc570e2d1627008d0
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
diff --git a/plat/st/stm32mp2/bl2_plat_setup.c b/plat/st/stm32mp2/bl2_plat_setup.c
index 96ac68b..edada72 100644
--- a/plat/st/stm32mp2/bl2_plat_setup.c
+++ b/plat/st/stm32mp2/bl2_plat_setup.c
@@ -179,11 +179,6 @@
 
 	configure_mmu();
 
-	/* Prevent corruption of preloaded Device Tree */
-	mmap_add_dynamic_region(DTB_BASE, DTB_BASE,
-				DTB_LIMIT - DTB_BASE,
-				MT_RO_DATA | MT_SECURE);
-
 	if (dt_open_and_check(STM32MP_DTB_BASE) < 0) {
 		panic();
 	}
@@ -258,7 +253,10 @@
 				FW_CONFIG_ID);
 		fconf_populate("FW_CONFIG", STM32MP_FW_CONFIG_BASE);
 
-		mmap_remove_dynamic_region(DTB_BASE, DTB_LIMIT - DTB_BASE);
+		/*
+		 * After this step, the BL2 device tree area will be overwritten
+		 * with BL31 binary, no other data should be read from BL2 DT.
+		 */
 
 		break;
 
diff --git a/plat/st/stm32mp2/include/platform_def.h b/plat/st/stm32mp2/include/platform_def.h
index 2f7570d..0f22a93 100644
--- a/plat/st/stm32mp2/include/platform_def.h
+++ b/plat/st/stm32mp2/include/platform_def.h
@@ -81,13 +81,6 @@
 #define BL33_BASE			STM32MP_BL33_BASE
 
 /*******************************************************************************
- * DTB specific defines.
- ******************************************************************************/
-#define DTB_BASE			STM32MP_DTB_BASE
-#define DTB_LIMIT			(STM32MP_DTB_BASE + \
-					 STM32MP_DTB_SIZE)
-
-/*******************************************************************************
  * Platform specific page table and MMU setup constants
  ******************************************************************************/
 #define PLAT_PHY_ADDR_SPACE_SIZE	(ULL(1) << 33)