diff options
Diffstat (limited to 'include/common/bl_common.ld.h')
-rw-r--r-- | include/common/bl_common.ld.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/common/bl_common.ld.h b/include/common/bl_common.ld.h index 5c5fe5b15..3fc8e970d 100644 --- a/include/common/bl_common.ld.h +++ b/include/common/bl_common.ld.h @@ -11,8 +11,10 @@ #ifdef __aarch64__ #define STRUCT_ALIGN 8 +#define BSS_ALIGN 16 #else #define STRUCT_ALIGN 4 +#define BSS_ALIGN 8 #endif #define CPU_OPS \ @@ -127,6 +129,22 @@ . = . + (__PERCPU_TIMESTAMP_SIZE__ * (PLATFORM_CORE_COUNT - 1)); \ __PMF_TIMESTAMP_END__ = .; + +/* + * The .bss section gets initialised to 0 at runtime. + * Its base address has bigger alignment for better performance of the + * zero-initialization code. + */ +#define BSS_SECTION \ + .bss (NOLOAD) : ALIGN(BSS_ALIGN) { \ + __BSS_START__ = .; \ + *(SORT_BY_ALIGNMENT(.bss*)) \ + *(COMMON) \ + BAKERY_LOCK_NORMAL \ + PMF_TIMESTAMP \ + __BSS_END__ = .; \ + } + /* * The xlat_table section is for full, aligned page tables (4K). * Removing them from .bss avoids forcing 4K alignment on |