From dcda29f637891adf19a609f9b0b3adc6867de3d0 Mon Sep 17 00:00:00 2001 From: Yatharth Kochar Date: Wed, 14 Oct 2015 15:28:11 +0100 Subject: FWU: Add Firmware Update support in BL2U for ARM platforms This patch adds support for Firmware update in BL2U for ARM platforms such that TZC initialization is performed on all ARM platforms and (optionally) transfer of SCP_BL2U image on ARM CSS platforms. BL2U specific functions are added to handle early_platform and plat_arch setup. The MMU is configured to map in the BL2U code/data area and other required memory. Change-Id: I57863295a608cc06e6cbf078b7ce34cbd9733e4f --- include/plat/arm/board/common/board_arm_def.h | 15 +++++++++++++++ include/plat/arm/common/plat_arm.h | 6 ++++++ 2 files changed, 21 insertions(+) (limited to 'include') diff --git a/include/plat/arm/board/common/board_arm_def.h b/include/plat/arm/board/common/board_arm_def.h index dae54180..b4e43134 100644 --- a/include/plat/arm/board/common/board_arm_def.h +++ b/include/plat/arm/board/common/board_arm_def.h @@ -53,6 +53,8 @@ # else # define PLATFORM_STACK_SIZE 0x400 # endif +#elif IMAGE_BL2U +# define PLATFORM_STACK_SIZE 0x200 #elif IMAGE_BL31 # define PLATFORM_STACK_SIZE 0x400 #elif IMAGE_BL32 @@ -85,6 +87,13 @@ # define PLAT_ARM_MMAP_ENTRIES 8 # endif #endif +#if IMAGE_BL2U +# if PLAT_fvp +# define PLAT_ARM_MMAP_ENTRIES 3 +# else +# define PLAT_ARM_MMAP_ENTRIES 4 +#endif +#endif #if IMAGE_BL31 #define PLAT_ARM_MMAP_ENTRIES 5 #endif @@ -111,6 +120,12 @@ # else # define MAX_XLAT_TABLES 4 # endif /* PLAT_ */ +#elif IMAGE_BL2U +# if PLAT_juno +# define MAX_XLAT_TABLES 3 +# else +# define MAX_XLAT_TABLES 4 +# endif /* PLAT_ */ #elif IMAGE_BL31 # define MAX_XLAT_TABLES 2 #elif IMAGE_BL32 diff --git a/include/plat/arm/common/plat_arm.h b/include/plat/arm/common/plat_arm.h index f8541c75..bcb2e2b8 100644 --- a/include/plat/arm/common/plat_arm.h +++ b/include/plat/arm/common/plat_arm.h @@ -165,6 +165,12 @@ void arm_bl2_plat_arch_setup(void); uint32_t arm_get_spsr_for_bl32_entry(void); uint32_t arm_get_spsr_for_bl33_entry(void); +/* BL2U utility functions */ +void arm_bl2u_early_platform_setup(struct meminfo *mem_layout, + void *plat_info); +void arm_bl2u_platform_setup(void); +void arm_bl2u_plat_arch_setup(void); + /* BL3-1 utility functions */ void arm_bl31_early_platform_setup(bl31_params_t *from_bl2, void *plat_params_from_bl2); -- cgit