Commit e98f594a authored by Nicolas Le Bayon's avatar Nicolas Le Bayon Committed by Lionel Debieve
Browse files

stm32mp1: Reduce MAX_XLAT_TABLES to 4



For STM32MP1, the address space is 4GB, which can be first divided
in 4 parts of 1GB. This LVL1 table is already mapped regardless
of MAX_XLAT_TABLES.
Fixing typo: Replace Ko to KB.

BL2/sp_min for platform STM32MP1 requires 4 MMU translation tables:
  - a level2 table and a level3 table for identity mapped SYSRAM
  - a level2 table mapping 2MB of BootROM runtime resources
  - a level2 table mapping 2MB of secure DDR (case BL32 is OP-TEE)

Change-Id: If80cbd4fccc7689b39dd540d6649b1313557f326
Signed-off-by: default avatarYann Gautier <yann.gautier@st.com>
Signed-off-by: default avatarLionel Debieve <lionel.debieve@st.com>
parent b8718d1f
...@@ -74,7 +74,7 @@ enum ddr_type { ...@@ -74,7 +74,7 @@ enum ddr_type {
#endif #endif
/* Section used inside TF binaries */ /* Section used inside TF binaries */
#define STM32MP_PARAM_LOAD_SIZE U(0x00002400) /* 9 Ko for param */ #define STM32MP_PARAM_LOAD_SIZE U(0x00002400) /* 9 KB for param */
/* 256 Octets reserved for header */ /* 256 Octets reserved for header */
#define STM32MP_HEADER_SIZE U(0x00000100) #define STM32MP_HEADER_SIZE U(0x00000100)
...@@ -95,9 +95,9 @@ enum ddr_type { ...@@ -95,9 +95,9 @@ enum ddr_type {
STM32MP_OPTEE_BASE) STM32MP_OPTEE_BASE)
#else #else
#if STACK_PROTECTOR_ENABLED #if STACK_PROTECTOR_ENABLED
#define STM32MP_BL32_SIZE U(0x00012000) /* 72 Ko for BL32 */ #define STM32MP_BL32_SIZE U(0x00012000) /* 72 KB for BL32 */
#else #else
#define STM32MP_BL32_SIZE U(0x00011000) /* 68 Ko for BL32 */ #define STM32MP_BL32_SIZE U(0x00011000) /* 68 KB for BL32 */
#endif #endif
#endif #endif
...@@ -107,23 +107,23 @@ enum ddr_type { ...@@ -107,23 +107,23 @@ enum ddr_type {
#ifdef AARCH32_SP_OPTEE #ifdef AARCH32_SP_OPTEE
#if STACK_PROTECTOR_ENABLED #if STACK_PROTECTOR_ENABLED
#define STM32MP_BL2_SIZE U(0x00019000) /* 100 Ko for BL2 */ #define STM32MP_BL2_SIZE U(0x00019000) /* 100 KB for BL2 */
#else #else
#define STM32MP_BL2_SIZE U(0x00017000) /* 92 Ko for BL2 */ #define STM32MP_BL2_SIZE U(0x00017000) /* 92 KB for BL2 */
#endif #endif
#else #else
#if STACK_PROTECTOR_ENABLED #if STACK_PROTECTOR_ENABLED
#define STM32MP_BL2_SIZE U(0x00018000) /* 96 Ko for BL2 */ #define STM32MP_BL2_SIZE U(0x00018000) /* 96 KB for BL2 */
#else #else
#define STM32MP_BL2_SIZE U(0x00016000) /* 88 Ko for BL2 */ #define STM32MP_BL2_SIZE U(0x00016000) /* 88 KB for BL2 */
#endif #endif
#endif #endif
#define STM32MP_BL2_BASE (STM32MP_BL32_BASE - \ #define STM32MP_BL2_BASE (STM32MP_BL32_BASE - \
STM32MP_BL2_SIZE) STM32MP_BL2_SIZE)
/* BL2 and BL32/sp_min require 5 tables */ /* BL2 and BL32/sp_min require 4 tables */
#define MAX_XLAT_TABLES 5 #define MAX_XLAT_TABLES U(4) /* 16 KB for mapping */
/* /*
* MAX_MMAP_REGIONS is usually: * MAX_MMAP_REGIONS is usually:
...@@ -137,7 +137,7 @@ enum ddr_type { ...@@ -137,7 +137,7 @@ enum ddr_type {
#endif #endif
/* DTB initialization value */ /* DTB initialization value */
#define STM32MP_DTB_SIZE U(0x00005000) /* 20Ko for DTB */ #define STM32MP_DTB_SIZE U(0x00005000) /* 20 KB for DTB */
#define STM32MP_DTB_BASE (STM32MP_BL2_BASE - \ #define STM32MP_DTB_BASE (STM32MP_BL2_BASE - \
STM32MP_DTB_SIZE) STM32MP_DTB_SIZE)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment