Daniel Boulby | b1b058d | 2018-09-18 11:52:49 +0100 | [diff] [blame] | 1 | /* |
Ambroise Vincent | e8b10e2 | 2019-07-16 17:19:38 +0100 | [diff] [blame] | 2 | * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved. |
Daniel Boulby | b1b058d | 2018-09-18 11:52:49 +0100 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | #ifndef ARM_RECLAIM_INIT_LD_S |
| 7 | #define ARM_RECLAIM_INIT_LD_S |
| 8 | |
| 9 | SECTIONS |
| 10 | { |
| 11 | .init __STACKS_START__ : { |
| 12 | . = . + PLATFORM_STACK_SIZE; |
| 13 | . = ALIGN(PAGE_SIZE); |
| 14 | __INIT_CODE_START__ = .; |
| 15 | /* |
| 16 | * Exclude PSCI initialization functions to ensure the init section |
| 17 | * does not become larger than the overlaid stack region |
| 18 | */ |
| 19 | *(EXCLUDE_FILE (*psci_setup.o).text.init*) |
| 20 | __INIT_CODE_UNALIGNED__ = .; |
| 21 | . = ALIGN(PAGE_SIZE); |
| 22 | __INIT_CODE_END__ = .; |
| 23 | } >RAM |
| 24 | |
| 25 | #ifdef BL31_PROGBITS_LIMIT |
| 26 | ASSERT(__INIT_CODE_END__ <= BL31_PROGBITS_LIMIT, |
| 27 | "BL31 init has exceeded progbits limit.") |
| 28 | #endif |
| 29 | |
Daniel Boulby | b1b058d | 2018-09-18 11:52:49 +0100 | [diff] [blame] | 30 | ASSERT(__INIT_CODE_END__ <= __STACKS_END__, |
| 31 | "Init code ends past the end of the stacks") |
Ambroise Vincent | e8b10e2 | 2019-07-16 17:19:38 +0100 | [diff] [blame] | 32 | |
Daniel Boulby | b1b058d | 2018-09-18 11:52:49 +0100 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | #endif /* ARM_RECLAIM_INIT_LD_S */ |