diff options
author | Chris Kay <chris.kay@arm.com> | 2020-04-17 10:36:34 +0100 |
---|---|---|
committer | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2020-04-17 14:48:15 +0200 |
commit | 868a7d1eb40f0fc1438783cdf2547c140ded8d56 (patch) | |
tree | d63257d86f7dbda588d4d880e2cfbe69737116f1 /plat | |
parent | cc52800db495d0638d217984c8f28b4f1f487301 (diff) | |
download | trusted-firmware-a-868a7d1eb40f0fc1438783cdf2547c140ded8d56.tar.gz |
juno/sgm: Align SCP_BL2 to page boundary
This commit fixes an assertion that was triggering in certain contexts:
ERROR: mmap_add_region_check() failed. error -22
ASSERT: lib/xlat_tables_v2/xlat_tables_core.c:790
Change-Id: Ia55b3fb4f496c8cd791ea6093d122edae0a7e92a
Signed-off-by: Chris Kay <chris.kay@arm.com>
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Diffstat (limited to 'plat')
-rw-r--r-- | plat/arm/board/juno/include/platform_def.h | 4 | ||||
-rw-r--r-- | plat/arm/css/sgm/include/sgm_base_platform_def.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/plat/arm/board/juno/include/platform_def.h b/plat/arm/board/juno/include/platform_def.h index 43c267d08f..67802d4872 100644 --- a/plat/arm/board/juno/include/platform_def.h +++ b/plat/arm/board/juno/include/platform_def.h @@ -253,7 +253,9 @@ * anything else in this memory region and is handed over to the SCP before * BL31 is loaded over the top. */ -#define PLAT_CSS_MAX_SCP_BL2_SIZE (SCP_BL2_LIMIT - ARM_TB_FW_CONFIG_LIMIT) +#define PLAT_CSS_MAX_SCP_BL2_SIZE \ + ((SCP_BL2_LIMIT - ARM_TB_FW_CONFIG_LIMIT) & ~PAGE_SIZE_MASK) + #define PLAT_CSS_MAX_SCP_BL2U_SIZE PLAT_CSS_MAX_SCP_BL2_SIZE #define PLAT_ARM_G1S_IRQ_PROPS(grp) \ diff --git a/plat/arm/css/sgm/include/sgm_base_platform_def.h b/plat/arm/css/sgm/include/sgm_base_platform_def.h index 12fa07f3c6..8be0b344f9 100644 --- a/plat/arm/css/sgm/include/sgm_base_platform_def.h +++ b/plat/arm/css/sgm/include/sgm_base_platform_def.h @@ -137,7 +137,9 @@ * anything else in this memory region and is handed over to the SCP before * BL31 is loaded over the top. */ -#define PLAT_CSS_MAX_SCP_BL2_SIZE (SCP_BL2_LIMIT - ARM_TB_FW_CONFIG_LIMIT) +#define PLAT_CSS_MAX_SCP_BL2_SIZE \ + ((SCP_BL2_LIMIT - ARM_TB_FW_CONFIG_LIMIT) & ~PAGE_SIZE_MASK) + #define PLAT_CSS_MAX_SCP_BL2U_SIZE PLAT_CSS_MAX_SCP_BL2_SIZE /* |