]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
misc_helpers: fix zero_normalmem() for BL2_AT_EL3
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 1 Feb 2018 04:17:29 +0000 (13:17 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 1 Feb 2018 04:17:29 +0000 (13:17 +0900)
The assertion in zero_normalmem() fails for BL2_AT_EL3.  This mode is
executed in EL3, so it should check sctlr_el3 instead of sctlr_el1.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
lib/aarch64/misc_helpers.S

index 9dfe46a2f2eaacb8d34d2e0962c0059c285818b3..3c64d3caac7b6b549a2d35dbfe0b86f190707c48 100644 (file)
@@ -198,7 +198,7 @@ func zeromem_dczva
         * Check for M bit (MMU enabled) of the current SCTLR_EL(1|3)
         * register value and panic if the MMU is disabled.
         */
-#if defined(IMAGE_BL1) || defined(IMAGE_BL31)
+#if defined(IMAGE_BL1) || defined(IMAGE_BL31) || (defined(IMAGE_BL2) && BL2_AT_EL3)
        mrs     tmp1, sctlr_el3
 #else
        mrs     tmp1, sctlr_el1