summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaurenw-arm <lauren.wehrmeister@arm.com>2023-05-03 12:48:55 -0500
committerSandrine Bailleux <sandrine.bailleux@arm.com>2023-05-04 10:06:28 +0100
commit9b266556d308c0af6f932fedd1c41fbda05204aa (patch)
tree7baba0c76fac9d220bb562088d322cd735a80102
parent73ede2bf1914929f0842560f01b6d996d4196ef1 (diff)
downloadarm-trusted-firmware-9b266556d308c0af6f932fedd1c41fbda05204aa.tar.gz
fix(tc): only suspend booting after running plat tests
1. When doing a normal boot, tc_bl31_common_platform_setup() should simply configure the platform and return. 2. When we are running the platform tests instead, tc_bl31_common_platform_setup() should run the tests then suspend booting (and thus never return). We were incorreclty suspending the boot in case 1 as well. Put that code under a preprocessor condition (PLATFORM_TEST_NV_COUNTERS or PLATFORM_TEST_TFM_TESTSUITE) to fix this. Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com> Change-Id: I7d20800e3bcd85261e2cdad325586d184e12a3e3
-rw-r--r--plat/arm/board/tc/tc_bl31_setup.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/plat/arm/board/tc/tc_bl31_setup.c b/plat/arm/board/tc/tc_bl31_setup.c
index aa88f7f3d..8ad1d3056 100644
--- a/plat/arm/board/tc/tc_bl31_setup.c
+++ b/plat/arm/board/tc/tc_bl31_setup.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020-2023, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2020-2023, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -53,6 +53,7 @@ void tc_bl31_common_platform_setup(void)
{
arm_bl31_platform_setup();
+#if defined(PLATFORM_TEST_NV_COUNTERS) || defined(PLATFORM_TEST_TFM_TESTSUITE)
#ifdef PLATFORM_TEST_NV_COUNTERS
nv_counter_test();
#elif PLATFORM_TEST_TFM_TESTSUITE
@@ -60,6 +61,7 @@ void tc_bl31_common_platform_setup(void)
#endif
/* Suspend booting */
plat_error_handler(-1);
+#endif
}
const plat_psci_ops_t *plat_arm_psci_override_pm_ops(plat_psci_ops_t *ops)