• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
3 *
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
30    ASSERT(__INIT_CODE_END__ <= __STACKS_END__,
31        "Init code ends past the end of the stacks")
32
33}
34
35#endif /* ARM_RECLAIM_INIT_LD_S */
36