diff options
author | Javier Almansa Sobrino <javier.almansasobrino@arm.com> | 2020-08-20 18:48:09 +0100 |
---|---|---|
committer | Javier Almansa Sobrino <javier.almansasobrino@arm.com> | 2020-09-25 15:45:50 +0100 |
commit | 1994e56221f06b47b3b38fba0a148ea505c940cd (patch) | |
tree | 42290bd994aebaceed39f7cd3e161ebfb44a2921 /bl31 | |
parent | 73740d98d99cb740ff67e188b6a7c1db816bf9f4 (diff) | |
download | trusted-firmware-a-1994e56221f06b47b3b38fba0a148ea505c940cd.tar.gz |
arm_fpga: Add support for unknown MPIDs
This patch allows the system to fallback to a default CPU library
in case the MPID does not match with any of the supported ones.
This feature can be enabled by setting SUPPORT_UNKNOWN_MPID build
option to 1 (enabled by default only on arm_fpga platform).
This feature can be very dangerous on a production image and
therefore it MUST be disabled for Release images.
Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: I0df7ef2b012d7d60a4fd5de44dea1fbbb46881ba
Diffstat (limited to 'bl31')
-rw-r--r-- | bl31/bl31.mk | 6 | ||||
-rw-r--r-- | bl31/bl31_main.c | 17 |
2 files changed, 22 insertions, 1 deletions
diff --git a/bl31/bl31.mk b/bl31/bl31.mk index 735d1fcfc5..cd6549bff9 100644 --- a/bl31/bl31.mk +++ b/bl31/bl31.mk @@ -7,6 +7,12 @@ ################################################################################ # Include Makefile for the SPM-MM implementation ################################################################################ +ifeq (${SUPPORT_UNKNOWN_MPID},1) + ifeq (${DEBUG},0) + $(warning WARNING: SUPPORT_UNKNOWN_MPID enabled) + endif +endif + ifeq (${SPM_MM},1) ifeq (${EL3_EXCEPTION_HANDLING},0) $(error EL3_EXCEPTION_HANDLING must be 1 for SPM-MM support) diff --git a/bl31/bl31_main.c b/bl31/bl31_main.c index 92a2027dd0..44bf32cb77 100644 --- a/bl31/bl31_main.c +++ b/bl31/bl31_main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -41,6 +41,15 @@ static int32_t (*bl32_init)(void); ******************************************************************************/ static uint32_t next_image_type = NON_SECURE; +#ifdef SUPPORT_UNKNOWN_MPID +/* + * Flag to know whether an unsupported MPID has been detected. To avoid having it + * landing on the .bss section, it is initialized to a non-zero value, this way + * we avoid potential WAW hazards during system bring up. + * */ +volatile uint32_t unsupported_mpid_flag = 1; +#endif + /* * Implement the ARM Standard Service function to get arguments for a * particular service. @@ -98,6 +107,12 @@ void bl31_main(void) NOTICE("BL31: %s\n", version_string); NOTICE("BL31: %s\n", build_message); +#ifdef SUPPORT_UNKNOWN_MPID + if (unsupported_mpid_flag == 0) { + NOTICE("Unsupported MPID detected!\n"); + } +#endif + /* Perform platform setup in BL31 */ bl31_platform_setup(); |