summaryrefslogtreecommitdiff
path: root/include/common/aarch64/asm_macros.S
diff options
context:
space:
mode:
authorSoby Mathew <soby.mathew@arm.com>2016-07-08 15:26:35 +0100
committerSoby Mathew <soby.mathew@arm.com>2016-07-19 10:19:08 +0100
commit738b1fd7c0628e9c6cc89e36629f27bde01559df (patch)
tree212b9d60976fa333a1bbbfa0b2b81115bce8f047 /include/common/aarch64/asm_macros.S
parenta4beaaffedb53f6d8bcc199aedaddc9f5c3eec7c (diff)
Rearrange assembly helper macros
This patch moves assembler macros which are not architecture specific to a new file `asm_macros_common.S` and moves the `el3_common_macros.S` into `aarch64` specific folder. Change-Id: I444a1ee3346597bf26a8b827480cd9640b38c826
Diffstat (limited to 'include/common/aarch64/asm_macros.S')
-rw-r--r--include/common/aarch64/asm_macros.S76
1 files changed, 1 insertions, 75 deletions
diff --git a/include/common/aarch64/asm_macros.S b/include/common/aarch64/asm_macros.S
index e7669899..cc8f4243 100644
--- a/include/common/aarch64/asm_macros.S
+++ b/include/common/aarch64/asm_macros.S
@@ -31,6 +31,7 @@
#define __ASM_MACROS_S__
#include <arch.h>
+#include <asm_macros_common.S>
.macro func_prologue
@@ -104,81 +105,6 @@
.endif
.endm
- /*
- * This macro is used to create a function label and place the
- * code into a separate text section based on the function name
- * to enable elimination of unused code during linking
- */
- .macro func _name
- .section .text.\_name, "ax"
- .type \_name, %function
- .func \_name
- \_name:
- .endm
-
- /*
- * This macro is used to mark the end of a function.
- */
- .macro endfunc _name
- .endfunc
- .size \_name, . - \_name
- .endm
-
- /*
- * Theses macros are used to create function labels for deprecated
- * APIs. If ERROR_DEPRECATED is non zero, the callers of these APIs
- * will fail to link and cause build failure.
- */
-#if ERROR_DEPRECATED
- .macro func_deprecated _name
- func deprecated\_name
- .endm
-
- .macro endfunc_deprecated _name
- endfunc deprecated\_name
- .endm
-#else
- .macro func_deprecated _name
- func \_name
- .endm
-
- .macro endfunc_deprecated _name
- endfunc \_name
- .endm
-#endif
-
- /*
- * Helper assembler macro to count trailing zeros. The output is
- * populated in the `TZ_COUNT` symbol.
- */
- .macro count_tz _value, _tz_count
- .if \_value
- count_tz "(\_value >> 1)", "(\_tz_count + 1)"
- .else
- .equ TZ_COUNT, (\_tz_count - 1)
- .endif
- .endm
-
- /*
- * This macro declares an array of 1 or more stacks, properly
- * aligned and in the requested section
- */
-#define DEFAULT_STACK_ALIGN (1 << 6) /* In case the caller doesnt provide alignment */
-
- .macro declare_stack _name, _section, _size, _count, _align=DEFAULT_STACK_ALIGN
- count_tz \_align, 0
- .if (\_align - (1 << TZ_COUNT))
- .error "Incorrect stack alignment specified (Must be a power of 2)."
- .endif
- .if ((\_size & ((1 << TZ_COUNT) - 1)) <> 0)
- .error "Stack size not correctly aligned"
- .endif
- .section \_section, "aw", %nobits
- .align TZ_COUNT
- \_name:
- .space ((\_count) * (\_size)), 0
- .endm
-
#if ENABLE_PLAT_COMPAT
/*
* This macro calculates the base address of an MP stack using the