diff --git a/docs/firmware-design.md b/docs/firmware-design.md index 70737b531becb1cc12a854e35a2fc62c05f0b0e2..c5a8cba39d0975e7de886acce8e2050f10bae8a3 100644 --- a/docs/firmware-design.md +++ b/docs/firmware-design.md @@ -184,7 +184,7 @@ BL1 performs minimal architectural initialization as follows. #### Platform initialization -BL1 enables issuing of snoop and DVM (Distributed Virtual Memory) requests from +BL1 enables issuing of snoop and DVM (Distributed Virtual Memory) requests to the CCI slave interface corresponding to the cluster that includes the primary CPU. BL1 also initializes a UART (PL011 console), which enables access to the `printf` family of functions in BL1. @@ -334,7 +334,9 @@ the clock frequency of the system counter, which is provided by the platform. BL3-1 performs detailed platform initialization, which enables normal world software to function correctly. It also retrieves entrypoint information for the BL3-3 image loaded by BL2 from the platform defined memory address populated -by BL2. BL3-1 also initializes a UART (PL011 console), which enables +by BL2. It enables issuing of snoop and DVM (Distributed Virtual Memory) +requests to the CCI slave interface corresponding to the cluster that includes +the primary CPU. BL3-1 also initializes a UART (PL011 console), which enables access to the `printf` family of functions in BL3-1. It enables the system level implementation of the generic timer through the memory mapped interface. @@ -543,11 +545,6 @@ implementation via a platform defined mechanism. On a cold boot, the platform must place any secondary CPUs into a safe state while the primary CPU executes a modified BL3-1 initialization, as described below. -#### Architectural initialization - -As the first image to execute in this configuration BL3-1 must ensure that -interconnect coherency is enabled (if required) before enabling the MMU. - #### Platform initialization In this configuration, when the CPU resets to BL3-1 there are no parameters diff --git a/plat/arm/board/fvp/fvp_bl31_setup.c b/plat/arm/board/fvp/fvp_bl31_setup.c index b50ae55c3dcdd97db1bdfecb0c096e5dc5dac384..f29af647787008674afe0bf89e91cf42130da4e2 100644 --- a/plat/arm/board/fvp/fvp_bl31_setup.c +++ b/plat/arm/board/fvp/fvp_bl31_setup.c @@ -45,13 +45,13 @@ void bl31_early_platform_setup(bl31_params_t *from_bl2, * No need for locks as no other CPU is active. */ fvp_cci_init(); -#if RESET_TO_BL31 + /* - * Enable CCI coherency for the primary CPU's cluster - * (if earlier BL has not already done so). + * Enable CCI coherency for the primary CPU's cluster. + * Earlier bootloader stages might already do this (e.g. Trusted + * Firmware's BL1 does it) but we can't assume so. There is no harm in + * executing this code twice anyway. * FVP PSCI code will enable coherency for other clusters. */ fvp_cci_enable(); - -#endif /* RESET_TO_BL31 */ } diff --git a/plat/arm/common/arm_bl31_setup.c b/plat/arm/common/arm_bl31_setup.c index 5c321fafcb680370afa77aba191926f407270441..7e8856bad9be83d5efa0f5a9733d99b3dc8b706b 100644 --- a/plat/arm/common/arm_bl31_setup.c +++ b/plat/arm/common/arm_bl31_setup.c @@ -179,16 +179,16 @@ void bl31_early_platform_setup(bl31_params_t *from_bl2, * No need for locks as no other CPU is active. */ arm_cci_init(); -#if RESET_TO_BL31 + /* - * Enable CCI coherency for the primary CPU's cluster - * (if earlier BL has not already done so). + * Enable CCI coherency for the primary CPU's cluster. + * Earlier bootloader stages might already do this (e.g. Trusted + * Firmware's BL1 does it) but we can't assume so. There is no harm in + * executing this code twice anyway. * Platform specific PSCI code will enable coherency for other * clusters. */ cci_enable_snoop_dvm_reqs(MPIDR_AFFLVL1_VAL(read_mpidr())); - -#endif /* RESET_TO_BL31 */ } /*******************************************************************************