Commit d5dfdeb6 authored by Julius Werner's avatar Julius Werner
Browse files

Replace __ASSEMBLY__ with compiler-builtin __ASSEMBLER__



NOTE: __ASSEMBLY__ macro is now deprecated in favor of __ASSEMBLER__.

All common C compilers predefine a macro called __ASSEMBLER__ when
preprocessing a .S file. There is no reason for TF-A to define it's own
__ASSEMBLY__ macro for this purpose instead. To unify code with the
export headers (which use __ASSEMBLER__ to avoid one extra dependency),
let's deprecate __ASSEMBLY__ and switch the code base over to the
predefined standard.

Change-Id: Id7d0ec8cf330195da80499c68562b65cb5ab7417
Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
parent f61469e5
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#define TEGRA_CHIPID_TEGRA21 U(0x21) #define TEGRA_CHIPID_TEGRA21 U(0x21)
#define TEGRA_CHIPID_TEGRA18 U(0x18) #define TEGRA_CHIPID_TEGRA18 U(0x18)
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLER__
/* /*
* Tegra chip ID major/minor identifiers * Tegra chip ID major/minor identifiers
...@@ -57,6 +57,6 @@ bool tegra_platform_is_fpga(void); ...@@ -57,6 +57,6 @@ bool tegra_platform_is_fpga(void);
bool tegra_platform_is_unit_fpga(void); bool tegra_platform_is_unit_fpga(void);
bool tegra_platform_is_virt_dev_kit(void); bool tegra_platform_is_virt_dev_kit(void);
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLER__ */
#endif /* TEGRA_PLATFORM_H */ #endif /* TEGRA_PLATFORM_H */
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#ifndef PLATFORM_DEF_H #ifndef PLATFORM_DEF_H
#define PLATFORM_DEF_H #define PLATFORM_DEF_H
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLER__
#include <stdlib.h> #include <stdlib.h>
#endif #endif
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#ifndef PLAT_PRIVATE_H #ifndef PLAT_PRIVATE_H
#define PLAT_PRIVATE_H #define PLAT_PRIVATE_H
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLER__
#include <stdint.h> #include <stdint.h>
...@@ -140,7 +140,7 @@ extern const mmap_region_t plat_rk_mmap[]; ...@@ -140,7 +140,7 @@ extern const mmap_region_t plat_rk_mmap[];
uint32_t rockchip_get_uart_base(void); uint32_t rockchip_get_uart_base(void);
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLER__ */
/****************************************************************************** /******************************************************************************
* cpu up status * cpu up status
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#define PM_WARM_BOOT_SHT 0 #define PM_WARM_BOOT_SHT 0
#define PM_WARM_BOOT_BIT (1 << PM_WARM_BOOT_SHT) #define PM_WARM_BOOT_BIT (1 << PM_WARM_BOOT_SHT)
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLER__
struct psram_data_t { struct psram_data_t {
uint64_t sp; uint64_t sp;
...@@ -50,6 +50,6 @@ CASSERT(__builtin_offsetof(struct psram_data_t, boot_mpidr) == PSRAM_DT_MPIDR, ...@@ -50,6 +50,6 @@ CASSERT(__builtin_offsetof(struct psram_data_t, boot_mpidr) == PSRAM_DT_MPIDR,
extern void *sys_sleep_flag_sram; extern void *sys_sleep_flag_sram;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLER__ */
#endif #endif
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <lib/utils_def.h> #include <lib/utils_def.h>
#include <lib/xlat_tables/xlat_tables_defs.h> #include <lib/xlat_tables/xlat_tables_defs.h>
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLER__
#include <drivers/st/stm32mp1_clk.h> #include <drivers/st/stm32mp1_clk.h>
#include <boot_api.h> #include <boot_api.h>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#endif #endif
/* DDR power initializations */ /* DDR power initializations */
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLER__
enum ddr_type { enum ddr_type {
STM32MP_DDR3, STM32MP_DDR3,
STM32MP_LPDDR2, STM32MP_LPDDR2,
...@@ -254,7 +254,7 @@ enum ddr_type { ...@@ -254,7 +254,7 @@ enum ddr_type {
#define TAMP_BASE U(0x5C00A000) #define TAMP_BASE U(0x5C00A000)
#define TAMP_BKP_REGISTER_BASE (TAMP_BASE + U(0x100)) #define TAMP_BKP_REGISTER_BASE (TAMP_BASE + U(0x100))
#if !(defined(__LINKER__) || defined(__ASSEMBLY__)) #if !(defined(__LINKER__) || defined(__ASSEMBLER__))
static inline uint32_t tamp_bkpr(uint32_t idx) static inline uint32_t tamp_bkpr(uint32_t idx)
{ {
return TAMP_BKP_REGISTER_BASE + (idx << 2); return TAMP_BKP_REGISTER_BASE + (idx << 2);
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
#define OPTEED_C_RT_CTX_SIZE 0x60 #define OPTEED_C_RT_CTX_SIZE 0x60
#define OPTEED_C_RT_CTX_ENTRIES (OPTEED_C_RT_CTX_SIZE >> DWORD_SHIFT) #define OPTEED_C_RT_CTX_ENTRIES (OPTEED_C_RT_CTX_SIZE >> DWORD_SHIFT)
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLER__
#include <stdint.h> #include <stdint.h>
...@@ -157,6 +157,6 @@ void opteed_init_optee_ep_state(struct entry_point_info *optee_entry_point, ...@@ -157,6 +157,6 @@ void opteed_init_optee_ep_state(struct entry_point_info *optee_entry_point,
extern optee_context_t opteed_sp_context[OPTEED_CORE_COUNT]; extern optee_context_t opteed_sp_context[OPTEED_CORE_COUNT];
extern uint32_t opteed_rw; extern uint32_t opteed_rw;
extern struct optee_vectors *optee_vector_table; extern struct optee_vectors *optee_vector_table;
#endif /*__ASSEMBLY__*/ #endif /*__ASSEMBLER__*/
#endif /* OPTEED_PRIVATE_H */ #endif /* OPTEED_PRIVATE_H */
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
#define TLKD_C_RT_CTX_SIZE 0x60 #define TLKD_C_RT_CTX_SIZE 0x60
#define TLKD_C_RT_CTX_ENTRIES (TLKD_C_RT_CTX_SIZE >> DWORD_SHIFT) #define TLKD_C_RT_CTX_ENTRIES (TLKD_C_RT_CTX_SIZE >> DWORD_SHIFT)
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLER__
#include <stdint.h> #include <stdint.h>
...@@ -119,6 +119,6 @@ void tlkd_init_tlk_ep_state(struct entry_point_info *tlk_entry_point, ...@@ -119,6 +119,6 @@ void tlkd_init_tlk_ep_state(struct entry_point_info *tlk_entry_point,
uint64_t pc, uint64_t pc,
tlk_context_t *tlk_ctx); tlk_context_t *tlk_ctx);
#endif /*__ASSEMBLY__*/ #endif /*__ASSEMBLER__*/
#endif /* TLKD_PRIVATE_H */ #endif /* TLKD_PRIVATE_H */
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
#define TSPD_SP_CTX_SIZE 0x90 #define TSPD_SP_CTX_SIZE 0x90
#define TSPD_SP_CTX_ENTRIES (TSPD_SP_CTX_SIZE >> DWORD_SHIFT) #define TSPD_SP_CTX_ENTRIES (TSPD_SP_CTX_SIZE >> DWORD_SHIFT)
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLER__
#include <stdint.h> #include <stdint.h>
...@@ -227,6 +227,6 @@ uint64_t tspd_handle_sp_preemption(void *handle); ...@@ -227,6 +227,6 @@ uint64_t tspd_handle_sp_preemption(void *handle);
extern tsp_context_t tspd_sp_context[TSPD_CORE_COUNT]; extern tsp_context_t tspd_sp_context[TSPD_CORE_COUNT];
extern tsp_vectors_t *tsp_vectors; extern tsp_vectors_t *tsp_vectors;
#endif /*__ASSEMBLY__*/ #endif /*__ASSEMBLER__*/
#endif /* TSPD_PRIVATE_H */ #endif /* TSPD_PRIVATE_H */
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
/* Value returned by spm_sp_synchronous_entry() when a partition is preempted */ /* Value returned by spm_sp_synchronous_entry() when a partition is preempted */
#define SPM_SECURE_PARTITION_PREEMPTED U(0x1234) #define SPM_SECURE_PARTITION_PREEMPTED U(0x1234)
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLER__
#include <stdint.h> #include <stdint.h>
...@@ -114,6 +114,6 @@ int spm_response_add(uint16_t client_id, uint16_t handle, uint32_t token, ...@@ -114,6 +114,6 @@ int spm_response_add(uint16_t client_id, uint16_t handle, uint32_t token,
int spm_response_get(uint16_t client_id, uint16_t handle, uint32_t token, int spm_response_get(uint16_t client_id, uint16_t handle, uint32_t token,
u_register_t *x1, u_register_t *x2, u_register_t *x3); u_register_t *x1, u_register_t *x2, u_register_t *x3);
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLER__ */
#endif /* SPM_PRIVATE_H */ #endif /* SPM_PRIVATE_H */
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#define SP_C_RT_CTX_SIZE 0x60 #define SP_C_RT_CTX_SIZE 0x60
#define SP_C_RT_CTX_ENTRIES (SP_C_RT_CTX_SIZE >> DWORD_SHIFT) #define SP_C_RT_CTX_ENTRIES (SP_C_RT_CTX_SIZE >> DWORD_SHIFT)
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLER__
#include <stdint.h> #include <stdint.h>
...@@ -66,6 +66,6 @@ int spm_memory_attributes_set_smc_handler(sp_context_t *sp_ctx, ...@@ -66,6 +66,6 @@ int spm_memory_attributes_set_smc_handler(sp_context_t *sp_ctx,
u_register_t pages_count, u_register_t pages_count,
u_register_t smc_attributes); u_register_t smc_attributes);
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLER__ */
#endif /* SPM_PRIVATE_H */ #endif /* SPM_PRIVATE_H */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment