diff options
Diffstat (limited to 'bl2u')
-rw-r--r-- | bl2u/bl2u.ld.S | 50 | ||||
-rw-r--r-- | bl2u/bl2u_main.c | 4 |
2 files changed, 13 insertions, 41 deletions
diff --git a/bl2u/bl2u.ld.S b/bl2u/bl2u.ld.S index 8d257cee9..a7752a490 100644 --- a/bl2u/bl2u.ld.S +++ b/bl2u/bl2u.ld.S @@ -1,11 +1,12 @@ /* - * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <platform_def.h> +#include <common/bl_common.ld.h> #include <lib/xlat_tables/xlat_tables_defs.h> OUTPUT_FORMAT(PLATFORM_LINKER_FORMAT) @@ -45,6 +46,9 @@ SECTIONS .rodata . : { __RODATA_START__ = .; *(SORT_BY_ALIGNMENT(.rodata*)) + + RODATA_COMMON + . = ALIGN(PAGE_SIZE); __RODATA_END__ = .; } >RAM @@ -55,6 +59,8 @@ SECTIONS *(SORT_BY_ALIGNMENT(.text*)) *(SORT_BY_ALIGNMENT(.rodata*)) + RODATA_COMMON + *(.vectors) __RO_END_UNALIGNED__ = .; /* @@ -73,44 +79,10 @@ SECTIONS */ __RW_START__ = . ; - /* - * .data must be placed at a lower address than the stacks if the stack - * protector is enabled. Alternatively, the .data.stack_protector_canary - * section can be placed independently of the main .data section. - */ - .data . : { - __DATA_START__ = .; - *(SORT_BY_ALIGNMENT(.data*)) - __DATA_END__ = .; - } >RAM - - stacks (NOLOAD) : { - __STACKS_START__ = .; - *(tzfw_normal_stacks) - __STACKS_END__ = .; - } >RAM - - /* - * The .bss section gets initialised to 0 at runtime. - * Its base address should be 16-byte aligned for better performance of the - * zero-initialization code. - */ - .bss : ALIGN(16) { - __BSS_START__ = .; - *(SORT_BY_ALIGNMENT(.bss*)) - *(COMMON) - __BSS_END__ = .; - } >RAM - - /* - * The xlat_table section is for full, aligned page tables (4K). - * Removing them from .bss avoids forcing 4K alignment on - * the .bss section. The tables are initialized to zero by the translation - * tables library. - */ - xlat_table (NOLOAD) : { - *(xlat_table) - } >RAM + DATA_SECTION >RAM + STACK_SECTION >RAM + BSS_SECTION >RAM + XLAT_TABLE_SECTION >RAM #if USE_COHERENT_MEM /* diff --git a/bl2u/bl2u_main.c b/bl2u/bl2u_main.c index d49c9ce9e..fcb73b9c7 100644 --- a/bl2u/bl2u_main.c +++ b/bl2u/bl2u_main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -34,7 +34,7 @@ void bl2u_main(void) int rc; /* Load the subsequent bootloader images */ rc = bl2u_plat_handle_scp_bl2u(); - if (rc) { + if (rc != 0) { ERROR("Failed to load SCP_BL2U (%i)\n", rc); panic(); } |