aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexei Fedorov <Alexei.Fedorov@arm.com>2020-01-30 14:06:28 +0000
committerAlexei Fedorov <Alexei.Fedorov@arm.com>2020-01-30 14:06:28 +0000
commit09ed710aab26073c0f066d6c06093a89b19ed338 (patch)
tree9e8cf9150fedc1fa1c0ce613d7d9fae57173248d
parentf9f31112a66ab0d01e677c972271f260d2548db7 (diff)
downloadtf-a-tests-09ed710aab26073c0f066d6c06093a89b19ed338.tar.gz
TF-TF: Store boot parameters
This patch adds support for storing fw_config and hw_config addresses passed as arg0 and arg1 parameters in x0, x1 from BL31. Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Change-Id: I58ae379bb4a7ef1b6ce60a4e252c65d34dc14464
-rw-r--r--tftf/framework/aarch64/entrypoint.S26
-rw-r--r--tftf/framework/main.c4
2 files changed, 29 insertions, 1 deletions
diff --git a/tftf/framework/aarch64/entrypoint.S b/tftf/framework/aarch64/entrypoint.S
index 81fd207..6aa5645 100644
--- a/tftf/framework/aarch64/entrypoint.S
+++ b/tftf/framework/aarch64/entrypoint.S
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -17,6 +17,13 @@
* ----------------------------------------------------------------------------
*/
func tftf_entrypoint
+ /* --------------------------------------------------------------------
+ * Save arguments x0, x1 from the previous Boot loader
+ * --------------------------------------------------------------------
+ */
+ mov x20, x0
+ mov x21, x1
+
bl arch_init
/* --------------------------------------------------------------------
@@ -72,6 +79,15 @@ func tftf_entrypoint
bl platform_set_stack
/* --------------------------------------------------------------------
+ * Save fw_config and hw_config addresses passed in x0, x1 from the
+ * previous boot loader
+ * --------------------------------------------------------------------
+ */
+ mov x0, x20
+ mov x1, x21
+ bl save_fw_hw_configs
+
+ /* --------------------------------------------------------------------
* tftf_cold_boot_main() will perform the remaining architectural and
* platform setup, initialise the test framework's state, then run the
* tests.
@@ -187,3 +203,11 @@ el1_setup:
isb
ret
endfunc arch_init
+
+/* Set fw_config and hw_config addresses passed in x0, x1 */
+func save_fw_hw_configs
+ adrp x2, fw_config_base
+ str x0, [x2, :lo12:fw_config_base]
+ str x1, [x2, :lo12:hw_config_base]
+ ret
+endfunc save_fw_hw_configs
diff --git a/tftf/framework/main.c b/tftf/framework/main.c
index a2e84b7..2523a97 100644
--- a/tftf/framework/main.c
+++ b/tftf/framework/main.c
@@ -41,6 +41,10 @@ static u_register_t cpu_on_ctx_id_arr[PLATFORM_CORE_COUNT];
static unsigned int test_is_rebooting;
+/* Parameters arg0 and arg1 passed from BL31 */
+u_register_t fw_config_base;
+u_register_t hw_config_base;
+
static inline const test_suite_t *current_testsuite(void)
{
test_ref_t test_to_run;