mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-20 19:44:23 +00:00
Remove .struct directive
This directive is not implemented by clang assembler. The traditional way to implement structs in assembly is using two macros for every field, one for the offset, and another one for the size. For every field, the offset can be calculated using the size and offset of the previous field. Change-Id: Iacc6781e8f302fb925898737b8e85ab4e88a51cc Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
This commit is contained in:
parent
be7d7f9f51
commit
f21b9f6d6e
2 changed files with 81 additions and 62 deletions
|
@ -35,38 +35,47 @@
|
||||||
# define REPORT_ERRATA 0
|
# define REPORT_ERRATA 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
.equ CPU_MIDR_SIZE, CPU_WORD_SIZE
|
||||||
|
.equ CPU_RESET_FUNC_SIZE, CPU_WORD_SIZE
|
||||||
|
.equ CPU_PWR_DWN_OPS_SIZE, CPU_WORD_SIZE * CPU_MAX_PWR_DWN_OPS
|
||||||
|
.equ CPU_ERRATA_FUNC_SIZE, CPU_WORD_SIZE
|
||||||
|
.equ CPU_ERRATA_LOCK_SIZE, CPU_WORD_SIZE
|
||||||
|
.equ CPU_ERRATA_PRINTED_SIZE, CPU_WORD_SIZE
|
||||||
|
|
||||||
|
#ifndef IMAGE_AT_EL3
|
||||||
|
.equ CPU_RESET_FUNC_SIZE, 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* The power down core and cluster is needed only in BL32 */
|
||||||
|
#ifndef IMAGE_BL32
|
||||||
|
.equ CPU_PWR_DWN_OPS_SIZE, 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Fields required to print errata status */
|
||||||
|
#if !REPORT_ERRATA
|
||||||
|
.equ CPU_ERRATA_FUNC_SIZE, 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Only BL32 requires mutual exclusion and printed flag. */
|
||||||
|
#if !(REPORT_ERRATA && defined(IMAGE_BL32))
|
||||||
|
.equ CPU_ERRATA_LOCK_SIZE, 0
|
||||||
|
.equ CPU_ERRATA_PRINTED_SIZE, 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Define the offsets to the fields in cpu_ops structure.
|
* Define the offsets to the fields in cpu_ops structure.
|
||||||
|
* Every offset is defined based on the offset and size of the previous
|
||||||
|
* field.
|
||||||
*/
|
*/
|
||||||
.struct 0
|
.equ CPU_MIDR, 0
|
||||||
CPU_MIDR: /* cpu_ops midr */
|
.equ CPU_RESET_FUNC, CPU_MIDR + CPU_MIDR_SIZE
|
||||||
.space 4
|
.equ CPU_PWR_DWN_OPS, CPU_RESET_FUNC + CPU_RESET_FUNC_SIZE
|
||||||
/* Reset fn is needed during reset */
|
.equ CPU_ERRATA_FUNC, CPU_PWR_DWN_OPS + CPU_PWR_DWN_OPS_SIZE
|
||||||
#if defined(IMAGE_AT_EL3)
|
.equ CPU_ERRATA_LOCK, CPU_ERRATA_FUNC + CPU_ERRATA_FUNC_SIZE
|
||||||
CPU_RESET_FUNC: /* cpu_ops reset_func */
|
.equ CPU_ERRATA_PRINTED, CPU_ERRATA_LOCK + CPU_ERRATA_LOCK_SIZE
|
||||||
.space 4
|
.equ CPU_OPS_SIZE, CPU_ERRATA_PRINTED + CPU_ERRATA_PRINTED_SIZE
|
||||||
#endif
|
|
||||||
#ifdef IMAGE_BL32 /* The power down core and cluster is needed only in BL32 */
|
|
||||||
CPU_PWR_DWN_OPS: /* cpu_ops power down functions */
|
|
||||||
.space (4 * CPU_MAX_PWR_DWN_OPS)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Fields required to print errata status. Only in BL32 that the printing
|
|
||||||
* require mutual exclusion and printed flag.
|
|
||||||
*/
|
|
||||||
#if REPORT_ERRATA
|
|
||||||
CPU_ERRATA_FUNC: /* CPU errata status printing function */
|
|
||||||
.space 4
|
|
||||||
#if defined(IMAGE_BL32)
|
|
||||||
CPU_ERRATA_LOCK:
|
|
||||||
.space 4
|
|
||||||
CPU_ERRATA_PRINTED:
|
|
||||||
.space 4
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
CPU_OPS_SIZE = .
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Write given expressions as words
|
* Write given expressions as words
|
||||||
|
|
|
@ -38,46 +38,56 @@
|
||||||
# define REPORT_ERRATA 0
|
# define REPORT_ERRATA 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
.equ CPU_MIDR_SIZE, CPU_WORD_SIZE
|
||||||
|
.equ CPU_EXTRA1_FUNC_SIZE, CPU_WORD_SIZE
|
||||||
|
.equ CPU_EXTRA2_FUNC_SIZE, CPU_WORD_SIZE
|
||||||
|
.equ CPU_RESET_FUNC_SIZE, CPU_WORD_SIZE
|
||||||
|
.equ CPU_PWR_DWN_OPS_SIZE, CPU_WORD_SIZE * CPU_MAX_PWR_DWN_OPS
|
||||||
|
.equ CPU_ERRATA_FUNC_SIZE, CPU_WORD_SIZE
|
||||||
|
.equ CPU_ERRATA_LOCK_SIZE, CPU_WORD_SIZE
|
||||||
|
.equ CPU_ERRATA_PRINTED_SIZE, CPU_WORD_SIZE
|
||||||
|
.equ CPU_REG_DUMP_SIZE, CPU_WORD_SIZE
|
||||||
|
|
||||||
|
#ifndef IMAGE_AT_EL3
|
||||||
|
.equ CPU_RESET_FUNC_SIZE, 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* The power down core and cluster is needed only in BL31 */
|
||||||
|
#ifndef IMAGE_BL31
|
||||||
|
.equ CPU_PWR_DWN_OPS_SIZE, 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Fields required to print errata status. */
|
||||||
|
#if !REPORT_ERRATA
|
||||||
|
.equ CPU_ERRATA_FUNC_SIZE, 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Only BL31 requieres mutual exclusion and printed flag. */
|
||||||
|
#if !(REPORT_ERRATA && defined(IMAGE_BL31))
|
||||||
|
.equ CPU_ERRATA_LOCK_SIZE, 0
|
||||||
|
.equ CPU_ERRATA_PRINTED_SIZE, 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(IMAGE_BL31) || !CRASH_REPORTING
|
||||||
|
.equ CPU_REG_DUMP_SIZE, 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Define the offsets to the fields in cpu_ops structure.
|
* Define the offsets to the fields in cpu_ops structure.
|
||||||
|
* Every offset is defined based in the offset and size of the previous
|
||||||
|
* field.
|
||||||
*/
|
*/
|
||||||
.struct 0
|
.equ CPU_MIDR, 0
|
||||||
CPU_MIDR: /* cpu_ops midr */
|
.equ CPU_RESET_FUNC, CPU_MIDR + CPU_MIDR_SIZE
|
||||||
.space 8
|
.equ CPU_EXTRA1_FUNC, CPU_RESET_FUNC + CPU_RESET_FUNC_SIZE
|
||||||
/* Reset fn is needed in BL at reset vector */
|
.equ CPU_EXTRA2_FUNC, CPU_EXTRA1_FUNC + CPU_EXTRA1_FUNC_SIZE
|
||||||
#if defined(IMAGE_AT_EL3)
|
.equ CPU_PWR_DWN_OPS, CPU_EXTRA2_FUNC + CPU_EXTRA2_FUNC_SIZE
|
||||||
CPU_RESET_FUNC: /* cpu_ops reset_func */
|
.equ CPU_ERRATA_FUNC, CPU_PWR_DWN_OPS + CPU_PWR_DWN_OPS_SIZE
|
||||||
.space 8
|
.equ CPU_ERRATA_LOCK, CPU_ERRATA_FUNC + CPU_ERRATA_FUNC_SIZE
|
||||||
#endif
|
.equ CPU_ERRATA_PRINTED, CPU_ERRATA_LOCK + CPU_ERRATA_LOCK_SIZE
|
||||||
CPU_EXTRA1_FUNC:
|
.equ CPU_REG_DUMP, CPU_ERRATA_PRINTED + CPU_ERRATA_PRINTED_SIZE
|
||||||
.space 8
|
.equ CPU_OPS_SIZE, CPU_REG_DUMP + CPU_REG_DUMP_SIZE
|
||||||
CPU_EXTRA2_FUNC:
|
|
||||||
.space 8
|
|
||||||
#ifdef IMAGE_BL31 /* The power down core and cluster is needed only in BL31 */
|
|
||||||
CPU_PWR_DWN_OPS: /* cpu_ops power down functions */
|
|
||||||
.space (8 * CPU_MAX_PWR_DWN_OPS)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Fields required to print errata status. Only in BL31 that the printing
|
|
||||||
* require mutual exclusion and printed flag.
|
|
||||||
*/
|
|
||||||
#if REPORT_ERRATA
|
|
||||||
CPU_ERRATA_FUNC:
|
|
||||||
.space 8
|
|
||||||
#if defined(IMAGE_BL31)
|
|
||||||
CPU_ERRATA_LOCK:
|
|
||||||
.space 8
|
|
||||||
CPU_ERRATA_PRINTED:
|
|
||||||
.space 8
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(IMAGE_BL31) && CRASH_REPORTING
|
|
||||||
CPU_REG_DUMP: /* cpu specific register dump for crash reporting */
|
|
||||||
.space 8
|
|
||||||
#endif
|
|
||||||
CPU_OPS_SIZE = .
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Write given expressions as quad words
|
* Write given expressions as quad words
|
||||||
|
|
Loading…
Add table
Reference in a new issue