blob: b5bf4736522e3382322014ecd77085e74dd5e3e5 [file] [log] [blame]
Daniel Boulbyb1b058d2018-09-18 11:52:49 +01001/*
Ambroise Vincente8b10e22019-07-16 17:19:38 +01002 * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
Daniel Boulbyb1b058d2018-09-18 11:52:49 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6#ifndef ARM_RECLAIM_INIT_LD_S
7#define ARM_RECLAIM_INIT_LD_S
8
9SECTIONS
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 Boulbyb1b058d2018-09-18 11:52:49 +010030 ASSERT(__INIT_CODE_END__ <= __STACKS_END__,
31 "Init code ends past the end of the stacks")
Ambroise Vincente8b10e22019-07-16 17:19:38 +010032
Daniel Boulbyb1b058d2018-09-18 11:52:49 +010033}
34
35#endif /* ARM_RECLAIM_INIT_LD_S */