]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
fix(bl31): avoid clearing of argument registers in RESET_TO_BL31 case
authorManish V Badarkhe <Manish.Badarkhe@arm.com>
Tue, 21 Feb 2023 11:13:34 +0000 (11:13 +0000)
committerManish V Badarkhe <Manish.Badarkhe@arm.com>
Thu, 9 Mar 2023 13:51:35 +0000 (13:51 +0000)
It was assumed that BL31 is the first bootloader to run so there's
no argument to relay from a previous bootloader in RESET_TO_BL31
case, however this is not true for every platform with a non-TF-A
bootloader that might get executed before BL31 while compiling in
RESET_TO_BL31 feature.

Thus, by avoiding zeroing registers, the arguments passed from the
previous bootloader to BL31 are preserved.

Change-Id: I7bb66a10d1fd551ba3fd59a7a38ab5bde3197f72
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
bl31/aarch64/bl31_entrypoint.S

index ed058648f52d4aa91202ac37c54dc2396f6a1600..dfb14e924e1c71ae5a76623642c817a33ba8bdf1 100644 (file)
@@ -66,17 +66,6 @@ func bl31_entrypoint
                _init_c_runtime=1                               \
                _exception_vectors=runtime_exceptions           \
                _pie_fixup_size=BL31_LIMIT - BL31_BASE
-
-       /* ---------------------------------------------------------------------
-        * For RESET_TO_BL31 systems, BL31 is the first bootloader to run so
-        * there's no argument to relay from a previous bootloader. Zero the
-        * arguments passed to the platform layer to reflect that.
-        * ---------------------------------------------------------------------
-        */
-       mov     x20, 0
-       mov     x21, 0
-       mov     x22, 0
-       mov     x23, 0
 #endif /* RESET_TO_BL31 */
 
        /* --------------------------------------------------------------------