diff options
author | Soby Mathew <soby.mathew@arm.com> | 2018-10-18 09:20:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-18 09:20:04 +0100 |
commit | 7be05cd5d204dce5b6e18232516f20de7e9c26f8 (patch) | |
tree | bb465fcbaed3dfc3231e3f1c3b01a3b691ea2728 /plat | |
parent | 0a09313ec780d2f66efcda3eb2a5d1632719bd81 (diff) | |
parent | 0f58d4f2c8173e01ce3276fbc7bd981c3f23d902 (diff) | |
download | platform_external_arm-trusted-firmware-7be05cd5d204dce5b6e18232516f20de7e9c26f8.tar.gz platform_external_arm-trusted-firmware-7be05cd5d204dce5b6e18232516f20de7e9c26f8.tar.bz2 platform_external_arm-trusted-firmware-7be05cd5d204dce5b6e18232516f20de7e9c26f8.zip |
Merge pull request #1628 from antonio-nino-diaz-arm/an/sharing
plat/arm: Small reorganization of platform code
Diffstat (limited to 'plat')
-rw-r--r-- | plat/arm/board/common/board_css.mk | 9 | ||||
-rw-r--r-- | plat/arm/board/fvp/include/platform_def.h | 42 | ||||
-rw-r--r-- | plat/arm/board/juno/include/platform_def.h | 30 | ||||
-rw-r--r-- | plat/arm/board/juno/juno_common.c (renamed from plat/arm/board/common/board_css_common.c) | 0 | ||||
-rw-r--r-- | plat/arm/board/juno/platform.mk | 5 | ||||
-rw-r--r-- | plat/arm/css/sgi/include/platform_def.h | 32 | ||||
-rw-r--r-- | plat/arm/css/sgm/include/sgm_base_platform_def.h | 27 |
7 files changed, 130 insertions, 15 deletions
diff --git a/plat/arm/board/common/board_css.mk b/plat/arm/board/common/board_css.mk deleted file mode 100644 index 5ac213ace..000000000 --- a/plat/arm/board/common/board_css.mk +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. -# -# SPDX-License-Identifier: BSD-3-Clause -# - -PLAT_BL_COMMON_SOURCES += plat/arm/board/common/board_css_common.c - -include plat/arm/board/common/board_common.mk diff --git a/plat/arm/board/fvp/include/platform_def.h b/plat/arm/board/fvp/include/platform_def.h index 8f1a0cda9..ed1a30265 100644 --- a/plat/arm/board/fvp/include/platform_def.h +++ b/plat/arm/board/fvp/include/platform_def.h @@ -20,7 +20,6 @@ #include <arm_def.h> #include <arm_spm_def.h> -#include <board_arm_def.h> #include <common_def.h> #include <tzc400.h> #include <utils_def.h> @@ -45,6 +44,8 @@ */ #define PLAT_ARM_CLUSTER_COUNT FVP_CLUSTER_COUNT +#define PLAT_ARM_TRUSTED_SRAM_SIZE 0x00040000 /* 256 KB */ + #define PLAT_ARM_TRUSTED_ROM_BASE 0x00000000 #define PLAT_ARM_TRUSTED_ROM_SIZE 0x04000000 /* 64 MB */ @@ -134,6 +135,45 @@ #endif /* + * Size of cacheable stacks + */ +#if defined(IMAGE_BL1) +# if TRUSTED_BOARD_BOOT +# define PLATFORM_STACK_SIZE 0x1000 +# else +# define PLATFORM_STACK_SIZE 0x440 +# endif +#elif defined(IMAGE_BL2) +# if TRUSTED_BOARD_BOOT +# define PLATFORM_STACK_SIZE 0x1000 +# else +# define PLATFORM_STACK_SIZE 0x400 +# endif +#elif defined(IMAGE_BL2U) +# define PLATFORM_STACK_SIZE 0x400 +#elif defined(IMAGE_BL31) +# if ENABLE_SPM +# define PLATFORM_STACK_SIZE 0x500 +# elif PLAT_XLAT_TABLES_DYNAMIC +# define PLATFORM_STACK_SIZE 0x800 +# else +# define PLATFORM_STACK_SIZE 0x400 +# endif +#elif defined(IMAGE_BL32) +# define PLATFORM_STACK_SIZE 0x440 +#endif + +#define MAX_IO_DEVICES 3 +#define MAX_IO_HANDLES 4 + +/* Reserve the last block of flash for PSCI MEM PROTECT flag */ +#define PLAT_ARM_FIP_BASE V2M_FLASH0_BASE +#define PLAT_ARM_FIP_MAX_SIZE (V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE) + +#define PLAT_ARM_NVM_BASE V2M_FLASH0_BASE +#define PLAT_ARM_NVM_SIZE (V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE) + +/* * PL011 related constants */ #define PLAT_ARM_BOOT_UART_BASE V2M_IOFPGA_UART0_BASE diff --git a/plat/arm/board/juno/include/platform_def.h b/plat/arm/board/juno/include/platform_def.h index ed78b4610..0e5c6d9ac 100644 --- a/plat/arm/board/juno/include/platform_def.h +++ b/plat/arm/board/juno/include/platform_def.h @@ -20,7 +20,6 @@ #include <arm_def.h> -#include <board_arm_def.h> #include <board_css_def.h> #include <common_def.h> #include <css_def.h> @@ -53,6 +52,8 @@ */ #define PLAT_ARM_CLUSTER_COUNT JUNO_CLUSTER_COUNT +#define PLAT_ARM_TRUSTED_SRAM_SIZE 0x00040000 /* 256 KB */ + /* Use the bypass address */ #define PLAT_ARM_TRUSTED_ROM_BASE V2M_FLASH0_BASE + BL1_ROM_BYPASS_OFFSET @@ -163,6 +164,33 @@ #endif /* + * Size of cacheable stacks + */ +#if defined(IMAGE_BL1) +# if TRUSTED_BOARD_BOOT +# define PLATFORM_STACK_SIZE 0x1000 +# else +# define PLATFORM_STACK_SIZE 0x440 +# endif +#elif defined(IMAGE_BL2) +# if TRUSTED_BOARD_BOOT +# define PLATFORM_STACK_SIZE 0x1000 +# else +# define PLATFORM_STACK_SIZE 0x400 +# endif +#elif defined(IMAGE_BL2U) +# define PLATFORM_STACK_SIZE 0x400 +#elif defined(IMAGE_BL31) +# if PLAT_XLAT_TABLES_DYNAMIC +# define PLATFORM_STACK_SIZE 0x800 +# else +# define PLATFORM_STACK_SIZE 0x400 +# endif +#elif defined(IMAGE_BL32) +# define PLATFORM_STACK_SIZE 0x440 +#endif + +/* * Since free SRAM space is scant, enable the ASSERTION message size * optimization by fixing the PLAT_LOG_LEVEL_ASSERT to LOG_LEVEL_INFO (40). */ diff --git a/plat/arm/board/common/board_css_common.c b/plat/arm/board/juno/juno_common.c index 40b1a275a..40b1a275a 100644 --- a/plat/arm/board/common/board_css_common.c +++ b/plat/arm/board/juno/juno_common.c diff --git a/plat/arm/board/juno/platform.mk b/plat/arm/board/juno/platform.mk index e2ec3c1c8..f28139ddc 100644 --- a/plat/arm/board/juno/platform.mk +++ b/plat/arm/board/juno/platform.mk @@ -29,7 +29,8 @@ CSS_USE_SCMI_SDS_DRIVER := 1 PLAT_INCLUDES := -Iplat/arm/board/juno/include \ -Iplat/arm/css/drivers/sds -PLAT_BL_COMMON_SOURCES := plat/arm/board/juno/${ARCH}/juno_helpers.S +PLAT_BL_COMMON_SOURCES := plat/arm/board/juno/${ARCH}/juno_helpers.S \ + plat/arm/board/juno/juno_common.c # Flag to enable support for AArch32 state on JUNO JUNO_AARCH32_EL3_RUNTIME := 0 @@ -123,7 +124,7 @@ SKIP_A57_L1_FLUSH_PWR_DWN := 1 # Do not enable SVE ENABLE_SVE_FOR_NS := 0 -include plat/arm/board/common/board_css.mk +include plat/arm/board/common/board_common.mk include plat/arm/common/arm_common.mk include plat/arm/soc/common/soc_css.mk include plat/arm/css/common/css_common.mk diff --git a/plat/arm/css/sgi/include/platform_def.h b/plat/arm/css/sgi/include/platform_def.h index b87bded8f..629749056 100644 --- a/plat/arm/css/sgi/include/platform_def.h +++ b/plat/arm/css/sgi/include/platform_def.h @@ -9,12 +9,12 @@ #include <arm_def.h> #include <arm_spm_def.h> -#include <board_arm_def.h> #include <board_css_def.h> #include <common_def.h> #include <css_def.h> #include <soc_css_def.h> #include <utils_def.h> +#include <v2m_def.h> #include <xlat_tables_defs.h> #define CSS_SGI_MAX_CPUS_PER_CLUSTER 4 @@ -26,6 +26,8 @@ CSS_SGI_MAX_CPUS_PER_CLUSTER * \ CSS_SGI_MAX_PE_PER_CPU) +#define PLAT_ARM_TRUSTED_SRAM_SIZE 0x00040000 /* 256 KB */ + /* * PLAT_ARM_MMAP_ENTRIES depends on the number of entries in the * plat_arm_mmap array defined for each BL stage. @@ -86,6 +88,34 @@ */ #define PLAT_ARM_MAX_BL31_SIZE 0x3B000 +/* + * Size of cacheable stacks + */ +#if defined(IMAGE_BL1) +# if TRUSTED_BOARD_BOOT +# define PLATFORM_STACK_SIZE 0x1000 +# else +# define PLATFORM_STACK_SIZE 0x440 +# endif +#elif defined(IMAGE_BL2) +# if TRUSTED_BOARD_BOOT +# define PLATFORM_STACK_SIZE 0x1000 +# else +# define PLATFORM_STACK_SIZE 0x400 +# endif +#elif defined(IMAGE_BL2U) +# define PLATFORM_STACK_SIZE 0x400 +#elif defined(IMAGE_BL31) +# if ENABLE_SPM +# define PLATFORM_STACK_SIZE 0x500 +# else +# define PLATFORM_STACK_SIZE 0x400 +# endif +#elif defined(IMAGE_BL32) +# define PLATFORM_STACK_SIZE 0x440 +#endif + + #define PLAT_ARM_NSTIMER_FRAME_ID 0 #define PLAT_CSS_MHU_BASE 0x45000000 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 7d35bd5e3..eaba619af 100644 --- a/plat/arm/css/sgm/include/sgm_base_platform_def.h +++ b/plat/arm/css/sgm/include/sgm_base_platform_def.h @@ -8,13 +8,13 @@ #define __SGM_BASE_PLATFORM_DEF_H__ #include <arm_def.h> -#include <board_arm_def.h> #include <board_css_def.h> #include <common_def.h> #include <css_def.h> #include <soc_css_def.h> #include <tzc400.h> #include <tzc_common.h> +#include <v2m_def.h> /* CPU topology */ #define PLAT_ARM_CLUSTER_COUNT 1 @@ -82,6 +82,8 @@ * platforms *************************************************************************/ +#define PLAT_ARM_TRUSTED_SRAM_SIZE 0x00040000 /* 256 KB */ + /* MHU related constants */ #define PLAT_CSS_MHU_BASE 0x2b1f0000 @@ -204,6 +206,29 @@ */ #define PLAT_ARM_MAX_BL31_SIZE 0x3B000 +/* + * Size of cacheable stacks + */ +#if defined(IMAGE_BL1) +# if TRUSTED_BOARD_BOOT +# define PLATFORM_STACK_SIZE 0x1000 +# else +# define PLATFORM_STACK_SIZE 0x440 +# endif +#elif defined(IMAGE_BL2) +# if TRUSTED_BOARD_BOOT +# define PLATFORM_STACK_SIZE 0x1000 +# else +# define PLATFORM_STACK_SIZE 0x400 +# endif +#elif defined(IMAGE_BL2U) +# define PLATFORM_STACK_SIZE 0x400 +#elif defined(IMAGE_BL31) +# define PLATFORM_STACK_SIZE 0x400 +#elif defined(IMAGE_BL32) +# define PLATFORM_STACK_SIZE 0x440 +#endif + /******************************************************************************* * Memprotect definitions ******************************************************************************/ |