summaryrefslogtreecommitdiff
path: root/bl2
diff options
context:
space:
mode:
authorSoby Mathew <soby.mathew@arm.com>2018-01-09 14:36:14 +0000
committerSoby Mathew <soby.mathew@arm.com>2018-02-26 16:31:10 +0000
commita6f340fe58b991882d075eed6916288fe4fa40c5 (patch)
treec29b8981449b06019c3695932ba6ef5bb4db1294 /bl2
parent6d31020e90093456efb373cde446b07770d38953 (diff)
Introduce the new BL handover interface
This patch introduces a new BL handover interface. It essentially allows passing 4 arguments between the different BL stages. Effort has been made so as to be compatible with the previous handover interface. The previous blx_early_platform_setup() platform API is now deprecated and the new blx_early_platform_setup2() variant is introduced. The weak compatiblity implementation for the new API is done in the `plat_bl_common.c` file. Some of the new arguments in the new API will be reserved for generic code use when dynamic configuration support is implemented. Otherwise the other registers are available for platform use. Change-Id: Ifddfe2ea8e32497fe1beb565cac155ad9d50d404 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Diffstat (limited to 'bl2')
-rw-r--r--bl2/aarch32/bl2_entrypoint.S19
-rw-r--r--bl2/aarch64/bl2_entrypoint.S18
2 files changed, 24 insertions, 13 deletions
diff --git a/bl2/aarch32/bl2_entrypoint.S b/bl2/aarch32/bl2_entrypoint.S
index e6fa5b98..d215f484 100644
--- a/bl2/aarch32/bl2_entrypoint.S
+++ b/bl2/aarch32/bl2_entrypoint.S
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -26,12 +26,14 @@ vector_base bl2_vector_table
func bl2_entrypoint
/*---------------------------------------------
- * Save from r1 the extents of the trusted ram
- * available to BL2 for future use.
- * r0 is not currently used.
+ * Save arguments x0 - x3 from BL1 for future
+ * use.
* ---------------------------------------------
*/
- mov r11, r1
+ mov r9, r0
+ mov r10, r1
+ mov r11, r2
+ mov r12, r3
/* ---------------------------------------------
* Set the exception vector to something sane.
@@ -111,8 +113,11 @@ func bl2_entrypoint
* specific early arch. setup e.g. mmu setup
* ---------------------------------------------
*/
- mov r0, r11
- bl bl2_early_platform_setup
+ mov r0, r9
+ mov r1, r10
+ mov r2, r11
+ mov r3, r12
+ bl bl2_early_platform_setup2
bl bl2_plat_arch_setup
/* ---------------------------------------------
diff --git a/bl2/aarch64/bl2_entrypoint.S b/bl2/aarch64/bl2_entrypoint.S
index 3ab8b5ab..bc8cbfd6 100644
--- a/bl2/aarch64/bl2_entrypoint.S
+++ b/bl2/aarch64/bl2_entrypoint.S
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -15,12 +15,14 @@
func bl2_entrypoint
/*---------------------------------------------
- * Save from x1 the extents of the tzram
- * available to BL2 for future use.
- * x0 is not currently used.
+ * Save arguments x0 - x3 from BL1 for future
+ * use.
* ---------------------------------------------
*/
- mov x20, x1
+ mov x20, x0
+ mov x21, x1
+ mov x22, x2
+ mov x23, x3
/* ---------------------------------------------
* Set the exception vector to something sane.
@@ -103,7 +105,11 @@ func bl2_entrypoint
* ---------------------------------------------
*/
mov x0, x20
- bl bl2_early_platform_setup
+ mov x1, x21
+ mov x2, x22
+ mov x3, x23
+ bl bl2_early_platform_setup2
+
bl bl2_plat_arch_setup
/* ---------------------------------------------