From 402b3cf8766fe2cb4ae462f7ee7761d08a1ba56c Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Tue, 9 Jul 2019 14:02:43 -0700 Subject: Switch AARCH32/AARCH64 to __aarch64__ NOTE: AARCH32/AARCH64 macros are now deprecated in favor of __aarch64__. All common C compilers pre-define the same macros to signal which architecture the code is being compiled for: __arm__ for AArch32 (or earlier versions) and __aarch64__ for AArch64. There's no need for TF-A to define its own custom macros for this. In order to unify code with the export headers (which use __aarch64__ to avoid another dependency), let's deprecate the AARCH32 and AARCH64 macros and switch the code base over to the pre-defined standard macro. (Since it is somewhat unintuitive that __arm__ only means AArch32, let's standardize on only using __aarch64__.) Change-Id: Ic77de4b052297d77f38fc95f95f65a8ee70cf200 Signed-off-by: Julius Werner --- bl2/bl2_main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'bl2') diff --git a/bl2/bl2_main.c b/bl2/bl2_main.c index 7d8d60c1..79b0e717 100644 --- a/bl2/bl2_main.c +++ b/bl2/bl2_main.c @@ -15,10 +15,10 @@ #include "bl2_private.h" -#ifdef AARCH32 -#define NEXT_IMAGE "BL32" -#else +#ifdef __aarch64__ #define NEXT_IMAGE "BL31" +#else +#define NEXT_IMAGE "BL32" #endif #if !BL2_AT_EL3 @@ -31,7 +31,7 @@ void bl2_setup(u_register_t arg0, u_register_t arg1, u_register_t arg2, /* Perform early platform-specific setup */ bl2_early_platform_setup2(arg0, arg1, arg2, arg3); -#ifdef AARCH64 +#ifdef __aarch64__ /* * Update pointer authentication key before the MMU is enabled. It is * saved in the rodata section, that can be writen before enabling the @@ -39,7 +39,7 @@ void bl2_setup(u_register_t arg0, u_register_t arg1, u_register_t arg2, * in the early platform setup. */ bl_handle_pauth(); -#endif /* AARCH64 */ +#endif /* __aarch64__ */ /* Perform late platform-specific setup */ bl2_plat_arch_setup(); @@ -55,7 +55,7 @@ void bl2_el3_setup(u_register_t arg0, u_register_t arg1, u_register_t arg2, /* Perform early platform-specific setup */ bl2_el3_early_platform_setup(arg0, arg1, arg2, arg3); -#ifdef AARCH64 +#ifdef __aarch64__ /* * Update pointer authentication key before the MMU is enabled. It is * saved in the rodata section, that can be writen before enabling the @@ -63,7 +63,7 @@ void bl2_el3_setup(u_register_t arg0, u_register_t arg1, u_register_t arg2, * in the early platform setup. */ bl_handle_pauth(); -#endif /* AARCH64 */ +#endif /* __aarch64__ */ /* Perform late platform-specific setup */ bl2_el3_plat_arch_setup(); @@ -97,14 +97,14 @@ void bl2_main(void) next_bl_ep_info = bl2_load_images(); #if !BL2_AT_EL3 -#ifdef AARCH32 +#ifndef __aarch64__ /* * For AArch32 state BL1 and BL2 share the MMU setup. * Given that BL2 does not map BL1 regions, MMU needs * to be disabled in order to go back to BL1. */ disable_mmu_icache_secure(); -#endif /* AARCH32 */ +#endif /* !__aarch64__ */ console_flush(); -- cgit v1.2.3