aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Deprez <olivier.deprez@arm.com>2020-01-30 17:27:28 +0000
committerTrustedFirmware Code Review <review@review.trustedfirmware.org>2020-01-30 17:27:28 +0000
commit1b5952a79ca1a6feb7b23372420285e886497852 (patch)
tree9e8cf9150fedc1fa1c0ce613d7d9fae57173248d
parentf9f31112a66ab0d01e677c972271f260d2548db7 (diff)
parent09ed710aab26073c0f066d6c06093a89b19ed338 (diff)
downloadtf-a-tests-1b5952a79ca1a6feb7b23372420285e886497852.tar.gz
Merge "TF-TF: Store boot parameters"
-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 81fd207b4..6aa564562 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 a2e84b7ea..2523a9784 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;